@diviswap/sdk 1.7.9 → 1.7.10
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 +9 -17
- package/package.json +3 -2
package/dist/cli/index.js
CHANGED
|
@@ -76,33 +76,25 @@ function getPackageRoot() {
|
|
|
76
76
|
return process.cwd();
|
|
77
77
|
}
|
|
78
78
|
try {
|
|
79
|
-
const
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
if (fs.existsSync(path.join(packagePath, "dist", "cli", "templates"))) {
|
|
84
|
-
return packagePath;
|
|
85
|
-
}
|
|
79
|
+
const packageJsonPath = __require.resolve("@diviswap/sdk/package.json");
|
|
80
|
+
const packageRoot = path.dirname(packageJsonPath);
|
|
81
|
+
if (fs.existsSync(path.join(packageRoot, "dist", "cli", "templates"))) {
|
|
82
|
+
return packageRoot;
|
|
86
83
|
}
|
|
87
84
|
} catch {
|
|
88
85
|
}
|
|
89
86
|
const cwd = process.cwd();
|
|
90
87
|
const pathsToCheck = [
|
|
91
|
-
path.join(cwd, "node_modules", "@
|
|
92
|
-
path.join(path.dirname(cwd), "node_modules", "@
|
|
93
|
-
path.join(path.dirname(path.dirname(cwd)), "node_modules", "@
|
|
88
|
+
path.join(cwd, "node_modules", "@diviswap", "sdk"),
|
|
89
|
+
path.join(path.dirname(cwd), "node_modules", "@diviswap", "sdk"),
|
|
90
|
+
path.join(path.dirname(path.dirname(cwd)), "node_modules", "@diviswap", "sdk")
|
|
94
91
|
];
|
|
95
92
|
for (const packagePath of pathsToCheck) {
|
|
96
93
|
if (fs.existsSync(path.join(packagePath, "dist", "cli", "templates"))) {
|
|
97
94
|
return packagePath;
|
|
98
95
|
}
|
|
99
96
|
}
|
|
100
|
-
|
|
101
|
-
const packageJsonPath = __require.resolve("@diviswap/sdk/package.json");
|
|
102
|
-
return path.dirname(packageJsonPath);
|
|
103
|
-
} catch {
|
|
104
|
-
return path.join(cwd, "node_modules", "@99darwin", "diviswap-sdk");
|
|
105
|
-
}
|
|
97
|
+
return path.join(cwd, "node_modules", "@diviswap", "sdk");
|
|
106
98
|
}
|
|
107
99
|
|
|
108
100
|
// src/cli/templates/index.ts
|
|
@@ -1922,7 +1914,7 @@ async function uninstall(options = {}) {
|
|
|
1922
1914
|
}
|
|
1923
1915
|
|
|
1924
1916
|
// package.json
|
|
1925
|
-
var version = "1.7.
|
|
1917
|
+
var version = "1.7.10";
|
|
1926
1918
|
|
|
1927
1919
|
// src/cli/index.ts
|
|
1928
1920
|
var program = new commander.Command();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@diviswap/sdk",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.10",
|
|
4
4
|
"description": "Official Diviswap SDK - Crypto rails made simple",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
"types": "./dist/services/index.d.ts",
|
|
26
26
|
"import": "./dist/services/index.mjs",
|
|
27
27
|
"require": "./dist/services/index.js"
|
|
28
|
-
}
|
|
28
|
+
},
|
|
29
|
+
"./package.json": "./package.json"
|
|
29
30
|
},
|
|
30
31
|
"scripts": {
|
|
31
32
|
"build": "tsup && node scripts/copy-templates.js",
|