@mimicprotocol/cli 0.0.1-rc.25 → 0.0.1-rc.26

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.
@@ -34,7 +34,7 @@ var __importStar = (this && this.__importStar) || (function () {
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.execBinCommand = exports.installDependencies = exports.detectPackageManager = void 0;
37
- const child_process_1 = require("child_process");
37
+ const cross_spawn_1 = require("cross-spawn");
38
38
  const fs = __importStar(require("fs"));
39
39
  const path = __importStar(require("path"));
40
40
  const detectFromUserAgent = () => {
@@ -69,22 +69,22 @@ exports.detectPackageManager = detectPackageManager;
69
69
  const installDependencies = (cwd) => {
70
70
  const pm = (0, exports.detectPackageManager)(cwd);
71
71
  if (pm === 'npm')
72
- return (0, child_process_1.spawnSync)('npm', ['install'], { cwd, stdio: 'inherit' });
72
+ return (0, cross_spawn_1.sync)('npm', ['install'], { cwd, stdio: 'inherit' });
73
73
  if (pm === 'pnpm')
74
- return (0, child_process_1.spawnSync)('pnpm', ['install'], { cwd, stdio: 'inherit' });
74
+ return (0, cross_spawn_1.sync)('pnpm', ['install'], { cwd, stdio: 'inherit' });
75
75
  if (pm === 'yarn')
76
- return (0, child_process_1.spawnSync)('yarn', ['install'], { cwd, stdio: 'inherit' });
76
+ return (0, cross_spawn_1.sync)('yarn', ['install'], { cwd, stdio: 'inherit' });
77
77
  if (pm === 'bun')
78
- return (0, child_process_1.spawnSync)('bun', ['install'], { cwd, stdio: 'inherit' });
79
- return (0, child_process_1.spawnSync)('npm', ['install'], { cwd, stdio: 'inherit' });
78
+ return (0, cross_spawn_1.sync)('bun', ['install'], { cwd, stdio: 'inherit' });
79
+ return (0, cross_spawn_1.sync)('npm', ['install'], { cwd, stdio: 'inherit' });
80
80
  };
81
81
  exports.installDependencies = installDependencies;
82
82
  const execBinCommand = (bin, args, cwd) => {
83
83
  const localBin = path.join(cwd, 'node_modules', '.bin', bin);
84
84
  if (fs.existsSync(localBin)) {
85
- return (0, child_process_1.spawnSync)(localBin, args, { cwd, stdio: 'inherit' });
85
+ return (0, cross_spawn_1.sync)(localBin, args, { cwd, stdio: 'inherit' });
86
86
  }
87
87
  // Fallback to spawning the bin directly (global or resolved in PATH)
88
- return (0, child_process_1.spawnSync)(bin, args, { cwd, stdio: 'inherit' });
88
+ return (0, cross_spawn_1.sync)(bin, args, { cwd, stdio: 'inherit' });
89
89
  };
90
90
  exports.execBinCommand = execBinCommand;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mimicprotocol/cli",
3
- "version": "0.0.1-rc.25",
3
+ "version": "0.0.1-rc.26",
4
4
  "license": "GPL-3.0",
5
5
  "private": false,
6
6
  "type": "commonjs",
@@ -23,6 +23,7 @@
23
23
  "@oclif/core": "^4.2.2",
24
24
  "@oclif/plugin-not-found": "^3.2.38",
25
25
  "axios": "^1.7.9",
26
+ "cross-spawn": "^7.0.6",
26
27
  "ethers": "^6.13.5",
27
28
  "form-data": "^4.0.1",
28
29
  "js-yaml": "^4.1.0",
@@ -33,6 +34,7 @@
33
34
  "devDependencies": {
34
35
  "@oclif/test": "^4.1.7",
35
36
  "@types/chai": "^4.3.5",
37
+ "@types/cross-spawn": "^6.0.6",
36
38
  "@types/express": "4.17.17",
37
39
  "@types/js-yaml": "^4.0.9",
38
40
  "@types/lodash": "^4.17.15",