taskin 0.1.0-beta.2 → 0.1.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +17 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -288,7 +288,20 @@ function detectPackageManager() {
|
|
|
288
288
|
}
|
|
289
289
|
return "npm";
|
|
290
290
|
}
|
|
291
|
+
function isBundledProvider(packageName) {
|
|
292
|
+
const bundledProviders = [
|
|
293
|
+
"@opentask/taskin-fs-provider",
|
|
294
|
+
"@opentask/taskin-core",
|
|
295
|
+
"@opentask/taskin-task-manager",
|
|
296
|
+
"@opentask/taskin-git-utils",
|
|
297
|
+
"@opentask/taskin-utils"
|
|
298
|
+
];
|
|
299
|
+
return bundledProviders.includes(packageName);
|
|
300
|
+
}
|
|
291
301
|
function isProviderInstalled(packageName) {
|
|
302
|
+
if (isBundledProvider(packageName)) {
|
|
303
|
+
return true;
|
|
304
|
+
}
|
|
292
305
|
try {
|
|
293
306
|
__require.resolve(packageName);
|
|
294
307
|
return true;
|
|
@@ -508,7 +521,10 @@ async function initializeTaskin(options) {
|
|
|
508
521
|
console.log();
|
|
509
522
|
info(`Setting up task provider: ${colors.highlight(selectedProvider.name)}`);
|
|
510
523
|
console.log();
|
|
511
|
-
|
|
524
|
+
const bundledProviders = ["fs"];
|
|
525
|
+
if (!bundledProviders.includes(selectedProvider.id)) {
|
|
526
|
+
await ensureProviderInstalled(selectedProvider);
|
|
527
|
+
}
|
|
512
528
|
const providerConfig = await setupProviderConfig(selectedProvider, cwd);
|
|
513
529
|
const config = {
|
|
514
530
|
version: "0.1.0",
|