@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.
Files changed (2) hide show
  1. package/dist/cli/index.js +18 -1
  2. 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.10";
1934
+ var version = "1.7.11";
1918
1935
 
1919
1936
  // src/cli/index.ts
1920
1937
  var program = new commander.Command();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diviswap/sdk",
3
- "version": "1.7.10",
3
+ "version": "1.7.11",
4
4
  "description": "Official Diviswap SDK - Crypto rails made simple",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",