dacty-launch 1.6.3 → 1.6.4

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/index.js +15 -7
  2. package/package.json +5 -4
package/index.js CHANGED
@@ -1,10 +1,18 @@
1
1
  #!/usr/bin/env node
2
- const { execSync } = require('child_process');
2
+ const importLocal = require('import-local');
3
3
 
4
- try {
5
- // Forward the command to the main dactyclaw package transparently
6
- const args = process.argv.slice(2).join(' ');
7
- execSync(`npx --yes --package dactyclaw dacty-launch ${args}`, { stdio: 'inherit', cwd: process.cwd() });
8
- } catch (error) {
9
- process.exit(1);
4
+ if (importLocal(__filename)) {
5
+ console.log('Using local version of dactyclaw alias');
6
+ } else {
7
+ try {
8
+ require('dactyclaw/bin/dacty-launch.js');
9
+ } catch (error) {
10
+ if (error.code === 'MODULE_NOT_FOUND') {
11
+ console.error('\n❌ Error: The core "dactyclaw" package could not be found.');
12
+ console.error('Please make sure npx has correctly installed the actual dependencies.');
13
+ process.exit(1);
14
+ } else {
15
+ throw error;
16
+ }
17
+ }
10
18
  }
package/package.json CHANGED
@@ -1,16 +1,17 @@
1
1
  {
2
2
  "name": "dacty-launch",
3
- "version": "1.6.3",
3
+ "version": "1.6.4",
4
4
  "description": "Proxy for launching Dactyclaw agent tokens (Alias)",
5
5
  "bin": {
6
- "dacty-launch": "node_modules/dactyclaw/bin/dacty-launch.js"
6
+ "dacty-launch": "./index.js"
7
7
  },
8
8
  "dependencies": {
9
- "dactyclaw": "latest"
9
+ "dactyclaw": "^1.3.5",
10
+ "import-local": "^3.1.0"
10
11
  },
11
12
  "scripts": {
12
13
  "test": "echo \"Error: no test specified\" && exit 1"
13
14
  },
14
15
  "author": "dactyclaw",
15
16
  "license": "ISC"
16
- }
17
+ }