create-agentuity 3.0.0-alpha.1 → 3.0.0-alpha.3

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.js +16 -18
  2. package/package.json +2 -2
package/bin.js CHANGED
@@ -8,31 +8,29 @@ const require = createRequire(import.meta.url);
8
8
  const pkg = require('./package.json');
9
9
 
10
10
  /**
11
- * Derive the @agentuity/cli version specifier from the create-agentuity version.
11
+ * Derive the npm dist-tag from the create-agentuity version.
12
12
  *
13
- * Since create-agentuity and @agentuity/cli are published in lockstep with
14
- * identical version numbers, we use the exact version to ensure compatibility.
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:
15
16
  *
16
- * This matters when users pin a specific version, e.g.:
17
- * bun create agentuity@^1.0.0 → should use @agentuity/cli@1.0.x, not @latest
18
- * bun create agentuity@2.0.0 should use @agentuity/cli@2.0.0
19
- * bun create agentuity uses @latest create-agentuity, gets @latest CLI
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)
20
22
  *
21
- * Prerelease versions use their dist-tag instead:
22
- * - Beta versions (-beta.) @beta
23
- * - Other prereleases (-alpha., -rc., etc.) → @next
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.
24
25
  *
25
26
  * @param {string} version - The create-agentuity package version
26
- * @returns {string} Version specifier for @agentuity/cli (e.g. "2.0.2", "beta", "next")
27
+ * @returns {string} Version specifier for @agentuity/cli (e.g. "2.0.2", "alpha", "beta")
27
28
  */
28
29
  export function getCliVersionSpecifier(version) {
29
- // Check for beta prerelease first
30
- if (/-beta\./.test(version)) {
31
- return 'beta';
32
- }
33
- // Check for other prerelease identifiers: alpha, rc, canary, next, etc.
34
- if (/-([a-zA-Z]+)/.test(version)) {
35
- return 'next';
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();
36
34
  }
37
35
  // Stable versions: use the exact version to ensure major version compatibility
38
36
  return version;
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "create-agentuity",
3
- "version": "3.0.0-alpha.1",
3
+ "version": "3.0.0-alpha.3",
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
8
  "bin": {
9
- "create-agentuity": "bin.js"
9
+ "create-agentuity": "./bin.js"
10
10
  },
11
11
  "scripts": {
12
12
  "build": "echo 'No build required'",