@sylphai/adal-cli 0.4.0 → 0.5.0-beta.2

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/bin/adal-cli.js +10 -7
  2. package/package.json +5 -5
package/bin/adal-cli.js CHANGED
@@ -97,15 +97,17 @@ function findPlatformPackage() {
97
97
  }
98
98
 
99
99
  // If no cache or cache is stale, search for the package
100
+ // Look for the 'adal' wrapper script (not adal-cli.js) which uses bundled Bun
101
+ const wrapperName = platform === 'win32' ? 'adal.cmd' : 'adal';
100
102
  const possiblePaths = [
101
103
  // When installed globally
102
- path.join(__dirname, '..', '..', packageName, 'adal-cli.js'),
104
+ path.join(__dirname, '..', '..', packageName, wrapperName),
103
105
  // When installed locally in a project
104
- path.join(process.cwd(), 'node_modules', packageName, 'adal-cli.js'),
106
+ path.join(process.cwd(), 'node_modules', packageName, wrapperName),
105
107
  // When running from development
106
- path.join(__dirname, '..', 'node_modules', packageName, 'adal-cli.js'),
108
+ path.join(__dirname, '..', 'node_modules', packageName, wrapperName),
107
109
  // Alternative global location
108
- require.resolve.paths(packageName).map(p => path.join(p, packageName, 'adal-cli.js')).filter(Boolean)
110
+ require.resolve.paths(packageName).map(p => path.join(p, packageName, wrapperName)).filter(Boolean)
109
111
  ].flat();
110
112
 
111
113
  for (const testPath of possiblePaths) {
@@ -118,7 +120,7 @@ function findPlatformPackage() {
118
120
  // Try using require.resolve as last resort
119
121
  try {
120
122
  const packagePath = require.resolve(`${packageName}/package.json`);
121
- const platformBinary = path.join(path.dirname(packagePath), 'adal-cli.js');
123
+ const platformBinary = path.join(path.dirname(packagePath), wrapperName);
122
124
  if (fs.existsSync(platformBinary)) {
123
125
  saveCachedPath(platformBinary); // Cache the found path
124
126
  return platformBinary;
@@ -144,10 +146,11 @@ if (!platformBinary) {
144
146
  process.exit(1);
145
147
  }
146
148
 
147
- // Execute the platform-specific binary with all arguments
148
- const child = spawn(process.execPath, [platformBinary, ...process.argv.slice(2)], {
149
+ // Execute the platform-specific wrapper (uses bundled Bun runtime)
150
+ const child = spawn(platformBinary, process.argv.slice(2), {
149
151
  stdio: 'inherit',
150
152
  env: process.env,
153
+ shell: platform === 'win32', // Windows needs shell for .cmd files
151
154
  });
152
155
 
153
156
  // Forward the exit code
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sylphai/adal-cli",
3
- "version": "0.4.0",
3
+ "version": "0.5.0-beta.2",
4
4
  "description": "AI-powered CLI for development and research tasks",
5
5
  "bin": {
6
6
  "adal": "bin/adal-cli.js"
@@ -9,10 +9,10 @@
9
9
  "postinstall": "node lib/setup-cache.js"
10
10
  },
11
11
  "optionalDependencies": {
12
- "@sylphai/adal-cli-darwin-arm64": "0.4.0",
13
- "@sylphai/adal-cli-darwin-x64": "0.4.0",
14
- "@sylphai/adal-cli-linux-x64": "0.4.0",
15
- "@sylphai/adal-cli-win32-x64": "0.4.0"
12
+ "@sylphai/adal-cli-darwin-arm64": "0.5.0-beta.2",
13
+ "@sylphai/adal-cli-darwin-x64": "0.5.0-beta.2",
14
+ "@sylphai/adal-cli-linux-x64": "0.5.0-beta.2",
15
+ "@sylphai/adal-cli-win32-x64": "0.5.0-beta.2"
16
16
  },
17
17
  "files": [
18
18
  "bin/",