@arcteninc/core 0.0.28 → 0.0.31

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.
@@ -1 +1 @@
1
- {"version":3,"file":"useAgent.d.ts","sourceRoot":"","sources":["../../src/lib/useAgent.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EAGf,MAAM,oBAAoB,CAAC;AAE5B,wBAAgB,QAAQ,CAAC,EACvB,UAAqC,EACrC,aAAmC,EACnC,WAAW,EAAE,aAAa,EAC1B,cAAsB,EACtB,IAAI,EACJ,KAAU,EACV,SAAc,EACd,YAAY,EACZ,YAAiB,EACjB,eAAoB,EACpB,cAAc,EAAE,qBAAqB,EACrC,UAAU,EACV,QAAQ,EACR,UAAU,GACX,GAAE,eAAoB,GAAG,cAAc,CAkZvC"}
1
+ {"version":3,"file":"useAgent.d.ts","sourceRoot":"","sources":["../../src/lib/useAgent.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EAGf,MAAM,oBAAoB,CAAC;AAE5B,wBAAgB,QAAQ,CAAC,EACvB,UAAqC,EACrC,aAAmC,EACnC,WAAW,EAAE,aAAa,EAC1B,cAAsB,EACtB,IAAI,EACJ,KAAU,EACV,SAAc,EACd,YAAY,EACZ,YAAiB,EACjB,eAAoB,EACpB,cAAc,EAAE,qBAAqB,EACrC,UAAU,EACV,QAAQ,EACR,UAAU,GACX,GAAE,eAAoB,GAAG,cAAc,CA0avC"}
@@ -1 +1 @@
1
- {"version":3,"file":"extract-tool-metadata.d.ts","sourceRoot":"","sources":["../../src/utils/extract-tool-metadata.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,GAAG,CAAC;CACjB;AAGD,UAAU,yBAAyB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,GAAG,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,SAAS,EAAE,QAAQ,EAAE,EACrB,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,yBAAyB,CAAC,GAAG,IAAI,GAC/D,YAAY,EAAE,CAiChB"}
1
+ {"version":3,"file":"extract-tool-metadata.d.ts","sourceRoot":"","sources":["../../src/utils/extract-tool-metadata.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,GAAG,CAAC;CACjB;AAGD,UAAU,yBAAyB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,GAAG,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,SAAS,EAAE,QAAQ,EAAE,EACrB,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,yBAAyB,CAAC,GAAG,IAAI,GAC/D,YAAY,EAAE,CAyDhB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcteninc/core",
3
- "version": "0.0.28",
3
+ "version": "0.0.31",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",
@@ -36,45 +36,45 @@ async function main() {
36
36
 
37
37
  const args = process.argv.slice(2);
38
38
 
39
- // Try tsx first (lightweight TypeScript runner for Node.js)
40
- // Use npx to run it without requiring installation
41
- const hasTsx = await checkCommand('npx');
39
+ // Check for bun first (faster and preferred if available)
40
+ const hasBun = await checkCommand('bun');
42
41
 
43
- if (hasTsx) {
44
- // Use tsx via npx - it's lightweight and works great with Node.js
45
- const tsxProcess = spawn('npx', ['-y', 'tsx', tsScript, ...args], {
42
+ if (hasBun) {
43
+ // Use bun directly - it's faster and can run TypeScript natively
44
+ const bunProcess = spawn('bun', [tsScript, ...args], {
46
45
  stdio: 'inherit',
47
46
  shell: true
48
47
  });
49
48
 
50
- tsxProcess.on('close', (code) => {
49
+ bunProcess.on('close', (code) => {
51
50
  process.exit(code || 0);
52
51
  });
53
52
 
54
- tsxProcess.on('error', (err) => {
55
- // If tsx fails, try bun as fallback
56
- tryBunFallback(args);
53
+ bunProcess.on('error', (err) => {
54
+ // If bun fails, try tsx as fallback
55
+ tryTsxFallback(args);
57
56
  });
58
57
  } else {
59
- // Fallback to bun if npx isn't available
60
- tryBunFallback(args);
58
+ // Fallback to tsx via npx if bun isn't available
59
+ tryTsxFallback(args);
61
60
  }
62
61
  }
63
62
 
64
- async function tryBunFallback(args) {
65
- const hasBun = await checkCommand('bun');
63
+ async function tryTsxFallback(args) {
64
+ const hasNpx = await checkCommand('npx');
66
65
 
67
- if (hasBun) {
68
- const bunProcess = spawn('bun', [tsScript, ...args], {
66
+ if (hasNpx) {
67
+ // Use tsx via npx - it's lightweight and works great with Node.js
68
+ const tsxProcess = spawn('npx', ['-y', 'tsx', tsScript, ...args], {
69
69
  stdio: 'inherit',
70
70
  shell: true
71
71
  });
72
72
 
73
- bunProcess.on('close', (code) => {
73
+ tsxProcess.on('close', (code) => {
74
74
  process.exit(code || 0);
75
75
  });
76
76
 
77
- bunProcess.on('error', (err) => {
77
+ tsxProcess.on('error', (err) => {
78
78
  console.error('❌ Error: Could not run script');
79
79
  console.error('Please ensure you have Node.js (with npx) or bun installed');
80
80
  process.exit(1);
@@ -83,8 +83,8 @@ async function tryBunFallback(args) {
83
83
  console.error('❌ Error: Could not find a TypeScript runner');
84
84
  console.error('');
85
85
  console.error('Please install one of the following:');
86
- console.error(' - Node.js (comes with npx) - recommended');
87
- console.error(' - bun: curl -fsSL https://bun.sh/install | bash');
86
+ console.error(' - bun: curl -fsSL https://bun.sh/install | bash (recommended)');
87
+ console.error(' - Node.js (comes with npx)');
88
88
  process.exit(1);
89
89
  }
90
90
  }