create-agentuity 3.0.0-alpha.6 → 3.0.0-alpha.7
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/bin.d.ts +3 -0
- package/dist/bin.d.ts.map +1 -0
- package/dist/bin.js +40 -0
- package/dist/bin.js.map +1 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +26 -0
- package/dist/index.js.map +1 -0
- package/package.json +22 -9
- package/bin.js +0 -64
package/dist/bin.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bin.d.ts","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":""}
|
package/dist/bin.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { spawnSync } from 'node:child_process';
|
|
3
|
+
import { realpathSync, readFileSync } from 'node:fs';
|
|
4
|
+
import { dirname, resolve } from 'node:path';
|
|
5
|
+
import { fileURLToPath } from 'node:url';
|
|
6
|
+
import { getCliVersionSpecifier } from "./index.js";
|
|
7
|
+
// Read our own package.json to get the version. dist/bin.js lives alongside
|
|
8
|
+
// dist/index.js; the published package.json is one level up from dist/.
|
|
9
|
+
const here = dirname(fileURLToPath(import.meta.url));
|
|
10
|
+
const pkgJsonPath = resolve(here, '..', 'package.json');
|
|
11
|
+
const pkg = JSON.parse(readFileSync(pkgJsonPath, 'utf8'));
|
|
12
|
+
/**
|
|
13
|
+
* Only run when executed directly, not when imported for testing.
|
|
14
|
+
*
|
|
15
|
+
* When bunx runs this script it creates a symlink (e.g.
|
|
16
|
+
* ~/.bun/bin/create-agentuity) pointing to the real file.
|
|
17
|
+
* `process.argv[1]` is the symlink path while `import.meta.url` resolves
|
|
18
|
+
* to the real path, so we must resolve symlinks before comparing.
|
|
19
|
+
*/
|
|
20
|
+
function checkIsMain() {
|
|
21
|
+
const scriptPath = fileURLToPath(import.meta.url);
|
|
22
|
+
if (typeof Bun !== 'undefined') {
|
|
23
|
+
return Bun.main === scriptPath;
|
|
24
|
+
}
|
|
25
|
+
try {
|
|
26
|
+
return realpathSync(process.argv[1] ?? '') === scriptPath;
|
|
27
|
+
}
|
|
28
|
+
catch {
|
|
29
|
+
return process.argv[1] === scriptPath;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
if (checkIsMain()) {
|
|
33
|
+
const cliVersion = getCliVersionSpecifier(pkg.version);
|
|
34
|
+
const args = process.argv.slice(2);
|
|
35
|
+
const result = spawnSync('bunx', [`@agentuity/cli@${cliVersion}`, 'create', ...args], {
|
|
36
|
+
stdio: 'inherit',
|
|
37
|
+
});
|
|
38
|
+
process.exit(result.status ?? 0);
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=bin.js.map
|
package/dist/bin.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bin.js","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAEpD,4EAA4E;AAC5E,wEAAwE;AACxE,MAAM,IAAI,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AACrD,MAAM,WAAW,GAAG,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC;AACxD,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,WAAW,EAAE,MAAM,CAAC,CAAwB,CAAC;AAEjF;;;;;;;GAOG;AACH,SAAS,WAAW;IACnB,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAClD,IAAI,OAAO,GAAG,KAAK,WAAW,EAAE,CAAC;QAChC,OAAO,GAAG,CAAC,IAAI,KAAK,UAAU,CAAC;IAChC,CAAC;IACD,IAAI,CAAC;QACJ,OAAO,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,UAAU,CAAC;IAC3D,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,UAAU,CAAC;IACvC,CAAC;AACF,CAAC;AAED,IAAI,WAAW,EAAE,EAAE,CAAC;IACnB,MAAM,UAAU,GAAG,sBAAsB,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACvD,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACnC,MAAM,MAAM,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,kBAAkB,UAAU,EAAE,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC,EAAE;QACrF,KAAK,EAAE,SAAS;KAChB,CAAC,CAAC;IACH,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC;AAClC,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Derive the npm dist-tag from the create-agentuity version.
|
|
3
|
+
*
|
|
4
|
+
* Since create-agentuity and @agentuity/cli are published in lockstep
|
|
5
|
+
* under the same dist-tag, we use the prerelease identifier to determine
|
|
6
|
+
* which tag to install from:
|
|
7
|
+
*
|
|
8
|
+
* bun create agentuity@^3.0.0-alpha.0 → @agentuity/cli@alpha
|
|
9
|
+
* bun create agentuity@^2.0.0-beta.1 → @agentuity/cli@beta
|
|
10
|
+
* bun create agentuity@^2.0.0-rc.2 → @agentuity/cli@rc
|
|
11
|
+
* bun create agentuity → @agentuity/cli@latest
|
|
12
|
+
* bun create agentuity@2.0.2 → @agentuity/cli@2.0.2 (exact)
|
|
13
|
+
*
|
|
14
|
+
* For stable versions (no prerelease), we use the exact version number
|
|
15
|
+
* so that `bun create agentuity@2.0.2` pins to that specific CLI version.
|
|
16
|
+
*/
|
|
17
|
+
export declare function getCliVersionSpecifier(version: string): string;
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAQ9D"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Derive the npm dist-tag from the create-agentuity version.
|
|
3
|
+
*
|
|
4
|
+
* Since create-agentuity and @agentuity/cli are published in lockstep
|
|
5
|
+
* under the same dist-tag, we use the prerelease identifier to determine
|
|
6
|
+
* which tag to install from:
|
|
7
|
+
*
|
|
8
|
+
* bun create agentuity@^3.0.0-alpha.0 → @agentuity/cli@alpha
|
|
9
|
+
* bun create agentuity@^2.0.0-beta.1 → @agentuity/cli@beta
|
|
10
|
+
* bun create agentuity@^2.0.0-rc.2 → @agentuity/cli@rc
|
|
11
|
+
* bun create agentuity → @agentuity/cli@latest
|
|
12
|
+
* bun create agentuity@2.0.2 → @agentuity/cli@2.0.2 (exact)
|
|
13
|
+
*
|
|
14
|
+
* For stable versions (no prerelease), we use the exact version number
|
|
15
|
+
* so that `bun create agentuity@2.0.2` pins to that specific CLI version.
|
|
16
|
+
*/
|
|
17
|
+
export function getCliVersionSpecifier(version) {
|
|
18
|
+
// Prerelease: extract the tag from the prerelease identifier
|
|
19
|
+
const match = version.match(/-([a-zA-Z]+)/);
|
|
20
|
+
if (match?.[1]) {
|
|
21
|
+
return match[1].toLowerCase();
|
|
22
|
+
}
|
|
23
|
+
// Stable versions: use the exact version to ensure major version compatibility
|
|
24
|
+
return version;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,sBAAsB,CAAC,OAAe;IACrD,6DAA6D;IAC7D,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;IAC5C,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAChB,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;IAC/B,CAAC;IACD,+EAA+E;IAC/E,OAAO,OAAO,CAAC;AAChB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,20 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-agentuity",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.7",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"author": "Agentuity employees and contributors",
|
|
6
6
|
"description": "Create a new Agentuity project",
|
|
7
7
|
"type": "module",
|
|
8
|
-
"
|
|
9
|
-
|
|
8
|
+
"main": "./dist/index.js",
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"import": "./dist/index.js",
|
|
13
|
+
"types": "./dist/index.d.ts"
|
|
14
|
+
}
|
|
10
15
|
},
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"test": "bun test bin.test.js"
|
|
16
|
+
"bin": {
|
|
17
|
+
"create-agentuity": "./dist/bin.js"
|
|
14
18
|
},
|
|
15
19
|
"files": [
|
|
16
|
-
"
|
|
20
|
+
"dist",
|
|
21
|
+
"README.md"
|
|
17
22
|
],
|
|
23
|
+
"scripts": {
|
|
24
|
+
"clean": "rm -rf dist tsconfig.tsbuildinfo",
|
|
25
|
+
"build": "bunx tsc --build --force",
|
|
26
|
+
"typecheck": "bunx tsc --noEmit",
|
|
27
|
+
"test": "bun test",
|
|
28
|
+
"prepublishOnly": "bun run clean && bun run build"
|
|
29
|
+
},
|
|
18
30
|
"keywords": [
|
|
19
31
|
"agentuity",
|
|
20
32
|
"create",
|
|
@@ -22,8 +34,9 @@
|
|
|
22
34
|
"scaffold",
|
|
23
35
|
"bun"
|
|
24
36
|
],
|
|
25
|
-
"
|
|
26
|
-
"@
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@types/bun": "latest",
|
|
39
|
+
"typescript": "^5.9.0"
|
|
27
40
|
},
|
|
28
41
|
"publishConfig": {
|
|
29
42
|
"access": "public"
|
package/bin.js
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { spawnSync } from 'node:child_process';
|
|
3
|
-
import { realpathSync } from 'node:fs';
|
|
4
|
-
import { createRequire } from 'node:module';
|
|
5
|
-
import { fileURLToPath } from 'node:url';
|
|
6
|
-
|
|
7
|
-
const require = createRequire(import.meta.url);
|
|
8
|
-
const pkg = require('./package.json');
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Derive the npm dist-tag from the create-agentuity version.
|
|
12
|
-
*
|
|
13
|
-
* Since create-agentuity and @agentuity/cli are published in lockstep
|
|
14
|
-
* under the same dist-tag, we use the prerelease identifier to determine
|
|
15
|
-
* which tag to install from:
|
|
16
|
-
*
|
|
17
|
-
* bun create agentuity@^3.0.0-alpha.0 → @agentuity/cli@alpha
|
|
18
|
-
* bun create agentuity@^2.0.0-beta.1 → @agentuity/cli@beta
|
|
19
|
-
* bun create agentuity@^2.0.0-rc.2 → @agentuity/cli@rc
|
|
20
|
-
* bun create agentuity → @agentuity/cli@latest
|
|
21
|
-
* bun create agentuity@2.0.2 → @agentuity/cli@2.0.2 (exact)
|
|
22
|
-
*
|
|
23
|
-
* For stable versions (no prerelease), we use the exact version number
|
|
24
|
-
* so that `bun create agentuity@2.0.2` pins to that specific CLI version.
|
|
25
|
-
*
|
|
26
|
-
* @param {string} version - The create-agentuity package version
|
|
27
|
-
* @returns {string} Version specifier for @agentuity/cli (e.g. "2.0.2", "alpha", "beta")
|
|
28
|
-
*/
|
|
29
|
-
export function getCliVersionSpecifier(version) {
|
|
30
|
-
// Prerelease: extract the tag from the prerelease identifier
|
|
31
|
-
const match = version.match(/-([a-zA-Z]+)/);
|
|
32
|
-
if (match) {
|
|
33
|
-
return match[1].toLowerCase();
|
|
34
|
-
}
|
|
35
|
-
// Stable versions: use the exact version to ensure major version compatibility
|
|
36
|
-
return version;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
// Only run when executed directly, not when imported for testing.
|
|
40
|
-
// When bunx runs this script, it creates a symlink (e.g. ~/.bun/bin/create-agentuity)
|
|
41
|
-
// pointing to the real file. process.argv[1] is the symlink path while import.meta.url
|
|
42
|
-
// resolves to the real path, so we must resolve symlinks before comparing.
|
|
43
|
-
function checkIsMain() {
|
|
44
|
-
const scriptPath = fileURLToPath(import.meta.url);
|
|
45
|
-
if (typeof Bun !== 'undefined') {
|
|
46
|
-
return Bun.main === scriptPath;
|
|
47
|
-
}
|
|
48
|
-
try {
|
|
49
|
-
return realpathSync(process.argv[1]) === scriptPath;
|
|
50
|
-
} catch {
|
|
51
|
-
return process.argv[1] === scriptPath;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
const isMain = checkIsMain();
|
|
56
|
-
|
|
57
|
-
if (isMain) {
|
|
58
|
-
const cliVersion = getCliVersionSpecifier(pkg.version);
|
|
59
|
-
const args = process.argv.slice(2);
|
|
60
|
-
const result = spawnSync('bunx', [`@agentuity/cli@${cliVersion}`, 'create', ...args], {
|
|
61
|
-
stdio: 'inherit',
|
|
62
|
-
});
|
|
63
|
-
process.exit(result.status || 0);
|
|
64
|
-
}
|