@diviswap/sdk 1.7.10 → 1.7.11
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/cli/index.js +18 -1
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -72,6 +72,23 @@ async function detectFramework() {
|
|
|
72
72
|
return null;
|
|
73
73
|
}
|
|
74
74
|
function getPackageRoot() {
|
|
75
|
+
try {
|
|
76
|
+
const bundleDir = __dirname;
|
|
77
|
+
if (fs.existsSync(path.join(bundleDir, "templates"))) {
|
|
78
|
+
return path.dirname(path.dirname(bundleDir));
|
|
79
|
+
}
|
|
80
|
+
let packageRoot = bundleDir;
|
|
81
|
+
for (let i = 0; i < 5; i++) {
|
|
82
|
+
if (fs.existsSync(path.join(packageRoot, "dist", "cli", "templates"))) {
|
|
83
|
+
return packageRoot;
|
|
84
|
+
}
|
|
85
|
+
if (fs.existsSync(path.join(packageRoot, "src", "cli", "templates"))) {
|
|
86
|
+
return packageRoot;
|
|
87
|
+
}
|
|
88
|
+
packageRoot = path.dirname(packageRoot);
|
|
89
|
+
}
|
|
90
|
+
} catch {
|
|
91
|
+
}
|
|
75
92
|
if (fs.existsSync(path.join(process.cwd(), "src", "cli", "templates"))) {
|
|
76
93
|
return process.cwd();
|
|
77
94
|
}
|
|
@@ -1914,7 +1931,7 @@ async function uninstall(options = {}) {
|
|
|
1914
1931
|
}
|
|
1915
1932
|
|
|
1916
1933
|
// package.json
|
|
1917
|
-
var version = "1.7.
|
|
1934
|
+
var version = "1.7.11";
|
|
1918
1935
|
|
|
1919
1936
|
// src/cli/index.ts
|
|
1920
1937
|
var program = new commander.Command();
|