@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.
- package/dist/components/ArctenAgent.d.ts.map +1 -1
- package/dist/index.cjs +30 -10
- package/dist/index.mjs +1899 -1861
- package/dist/lib/useAgent.d.ts.map +1 -1
- package/dist/utils/extract-tool-metadata.d.ts.map +1 -1
- package/package.json +1 -1
- package/scripts/cli-extract-types-auto.js +20 -20
|
@@ -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,
|
|
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,
|
|
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
|
@@ -36,45 +36,45 @@ async function main() {
|
|
|
36
36
|
|
|
37
37
|
const args = process.argv.slice(2);
|
|
38
38
|
|
|
39
|
-
//
|
|
40
|
-
|
|
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 (
|
|
44
|
-
// Use
|
|
45
|
-
const
|
|
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
|
-
|
|
49
|
+
bunProcess.on('close', (code) => {
|
|
51
50
|
process.exit(code || 0);
|
|
52
51
|
});
|
|
53
52
|
|
|
54
|
-
|
|
55
|
-
// If
|
|
56
|
-
|
|
53
|
+
bunProcess.on('error', (err) => {
|
|
54
|
+
// If bun fails, try tsx as fallback
|
|
55
|
+
tryTsxFallback(args);
|
|
57
56
|
});
|
|
58
57
|
} else {
|
|
59
|
-
// Fallback to
|
|
60
|
-
|
|
58
|
+
// Fallback to tsx via npx if bun isn't available
|
|
59
|
+
tryTsxFallback(args);
|
|
61
60
|
}
|
|
62
61
|
}
|
|
63
62
|
|
|
64
|
-
async function
|
|
65
|
-
const
|
|
63
|
+
async function tryTsxFallback(args) {
|
|
64
|
+
const hasNpx = await checkCommand('npx');
|
|
66
65
|
|
|
67
|
-
if (
|
|
68
|
-
|
|
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
|
-
|
|
73
|
+
tsxProcess.on('close', (code) => {
|
|
74
74
|
process.exit(code || 0);
|
|
75
75
|
});
|
|
76
76
|
|
|
77
|
-
|
|
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(' -
|
|
87
|
-
console.error(' -
|
|
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
|
}
|