nylorun 0.18.3-beta → 0.20.0-beta

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/nylo.js CHANGED
@@ -3,7 +3,7 @@ import "./baseline.js";
3
3
  import { runCommand } from "./command.js";
4
4
  import { CliError } from "./errors.js";
5
5
  /**
6
- * `nylo` became part of `nylorun`. Until nylorun 0.19, which removes it, this command names the
6
+ * `nylo` became part of `nylorun`. Until a later release removes it, this command names the
7
7
  * `nylorun` command that replaces each of its own and exits 2.
8
8
  */
9
9
  const REPLACEMENTS = {
@@ -18,7 +18,7 @@ function nyloMessage(argv) {
18
18
  const replacement = REPLACEMENTS[argv[0] ?? ""];
19
19
  return `${replacement
20
20
  ? `nylo is part of nylorun now: nylo ${argv[0]} is ${replacement}.`
21
- : "nylo is part of nylorun now: run nylorun --help."} nylorun 0.19 removes nylo.`;
21
+ : "nylo is part of nylorun now: run nylorun --help."} A later nylorun release removes nylo.`;
22
22
  }
23
23
  runCommand(async () => {
24
24
  throw new CliError(nyloMessage(process.argv.slice(2)), 2);
@@ -1,3 +1,5 @@
1
+ /** This CLI's version, from its `package.json` (`nylorun --version`). */
2
+ export declare function cliVersion(): string;
1
3
  /** An image this CLI release pins in its `package.json` `nylorun` (D7). */
2
4
  export type PinnedImage = "runtime" | "studio";
3
5
  /**
@@ -6,6 +6,18 @@ function cliPackageJsonPath() {
6
6
  // src/stack/*.ts and dist/stack/*.js both sit two levels below the package root.
7
7
  return join(dirname(fileURLToPath(import.meta.url)), "..", "..", "package.json");
8
8
  }
9
+ /** This CLI's version, from its `package.json` (`nylorun --version`). */
10
+ export function cliVersion() {
11
+ try {
12
+ const version = JSON.parse(readFileSync(cliPackageJsonPath(), "utf8")).version;
13
+ if (typeof version === "string")
14
+ return version;
15
+ }
16
+ catch (error) {
17
+ throw new CliError(`Cannot read CLI package.json: ${error instanceof Error ? error.message : String(error)}`, 1);
18
+ }
19
+ throw new CliError("nylorun's package.json has no version.", 1);
20
+ }
9
21
  /**
10
22
  * The version this CLI release pins for an image, from its `package.json`
11
23
  * `nylorun.runtime` or `nylorun.studio`: the tag of `ghcr.io/nylorun/<name>`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nylorun",
3
- "version": "0.18.3-beta",
3
+ "version": "0.20.0-beta",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "description": "Set up and run local Nylorun Tenants (Runtime and Studio) with Docker Compose, and act on a Tenant through its Runtime and Management APIs",
@@ -30,9 +30,9 @@
30
30
  "prepack": "npm run build"
31
31
  },
32
32
  "dependencies": {
33
- "@nylorun/admin": "0.19.2-beta",
34
- "@nylorun/agents": "0.26.0-beta",
35
- "@nylorun/core": "0.26.0-beta"
33
+ "@nylorun/admin": "0.19.4-beta",
34
+ "@nylorun/agents": "0.28.0-beta",
35
+ "@nylorun/core": "0.28.0-beta"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@earendil-works/pi-ai": "1.2.0",
@@ -46,7 +46,7 @@
46
46
  "nylo": "dist/nylo.js"
47
47
  },
48
48
  "nylorun": {
49
- "runtime": "0.30.0-beta",
50
- "studio": "0.31.0-beta"
49
+ "runtime": "0.32.0-beta",
50
+ "studio": "0.32.0-beta"
51
51
  }
52
52
  }