@prismer/runtime 1.9.21 → 1.9.23

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/cli.cjs CHANGED
@@ -457,6 +457,14 @@ var init_ui = __esm({
457
457
  }
458
458
  });
459
459
 
460
+ // package.json
461
+ var version;
462
+ var init_package = __esm({
463
+ "package.json"() {
464
+ version = "1.9.22";
465
+ }
466
+ });
467
+
460
468
  // src/cli/util.ts
461
469
  var util_exports = {};
462
470
  __export(util_exports, {
@@ -544,10 +552,10 @@ function runAction(fn, opts = {}) {
544
552
  function printBanner(opts = {}) {
545
553
  const ui = getUI();
546
554
  if (opts.compact) {
547
- ui.smallHeader("Runtime CLI v1.9.7");
555
+ ui.smallHeader(`Runtime CLI v${version}`);
548
556
  return;
549
557
  }
550
- ui.banner("Runtime CLI v1.9.7", { full: true });
558
+ ui.banner(`Runtime CLI v${version}`, { full: true });
551
559
  }
552
560
  function ok(label, detail) {
553
561
  getUI().ok(label, detail);
@@ -610,6 +618,7 @@ var init_util = __esm({
610
618
  import_node_fs3 = require("fs");
611
619
  import_node_path3 = require("path");
612
620
  init_ui();
621
+ init_package();
613
622
  DEFAULT_CLOUD_BASE_URL = "https://prismer.cloud";
614
623
  ANSI = {
615
624
  reset: "\x1B[0m",
@@ -2431,8 +2440,8 @@ function buildAdapterCommand() {
2431
2440
  });
2432
2441
  return cmd;
2433
2442
  }
2434
- function runInstall(spec, version, dryRun) {
2435
- const { argv0, args } = installCommand(spec, version);
2443
+ function runInstall(spec, version2, dryRun) {
2444
+ const { argv0, args } = installCommand(spec, version2);
2436
2445
  getUI().line(`> ${argv0} ${args.join(" ")}`);
2437
2446
  if (dryRun) {
2438
2447
  getUI().line("(dry-run \u2014 not executing)");
@@ -2576,16 +2585,16 @@ function runHooks(spec, opts) {
2576
2585
  hook: inspectHook(spec)
2577
2586
  };
2578
2587
  }
2579
- function installCommand(spec, version) {
2580
- const ref = version === "latest" ? spec.package : `${spec.package}@${version}`;
2588
+ function installCommand(spec, version2) {
2589
+ const ref = version2 === "latest" ? spec.package : `${spec.package}@${version2}`;
2581
2590
  switch (spec.manager) {
2582
2591
  case "npm":
2583
2592
  return { argv0: "npm", args: ["install", "-g", ref] };
2584
2593
  case "pipx":
2585
- const pyRef = version === "latest" ? spec.package : `${spec.package}==${version}`;
2594
+ const pyRef = version2 === "latest" ? spec.package : `${spec.package}==${version2}`;
2586
2595
  return { argv0: "pipx", args: ["install", pyRef] };
2587
2596
  case "pip":
2588
- const pipRef = version === "latest" ? spec.package : `${spec.package}==${version}`;
2597
+ const pipRef = version2 === "latest" ? spec.package : `${spec.package}==${version2}`;
2589
2598
  return { argv0: "pip", args: ["install", "--user", pipRef] };
2590
2599
  }
2591
2600
  }
@@ -2784,7 +2793,7 @@ function readAdapterConfig() {
2784
2793
  return {};
2785
2794
  }
2786
2795
  }
2787
- function recordInstallInConfig(spec, binPath, version) {
2796
+ function recordInstallInConfig(spec, binPath, version2) {
2788
2797
  const paths = resolvePaths();
2789
2798
  if (!configExists(paths)) {
2790
2799
  process.stderr.write(
@@ -2806,7 +2815,7 @@ function recordInstallInConfig(spec, binPath, version) {
2806
2815
  package_manager: spec.manager,
2807
2816
  package_name: spec.package,
2808
2817
  binary: binPath,
2809
- version,
2818
+ version: version2,
2810
2819
  installed_at: (/* @__PURE__ */ new Date()).toISOString()
2811
2820
  };
2812
2821
  saveConfig({ ...cfg, adapters }, paths);
@@ -5898,9 +5907,9 @@ var MemoryStore = class {
5898
5907
  const row = db.prepare("SELECT * FROM memory_pages WHERE workspaceId = ? AND id = ?").get(this.opts.workspaceId, pageId);
5899
5908
  return row ? this.rowToPage(row) : null;
5900
5909
  }
5901
- loadContent(pageId, version) {
5910
+ loadContent(pageId, version2) {
5902
5911
  const db = this.requireDb();
5903
- const targetVersion = version ?? db.prepare("SELECT version FROM memory_pages WHERE workspaceId = ? AND id = ?").get(this.opts.workspaceId, pageId)?.version;
5912
+ const targetVersion = version2 ?? db.prepare("SELECT version FROM memory_pages WHERE workspaceId = ? AND id = ?").get(this.opts.workspaceId, pageId)?.version;
5904
5913
  if (targetVersion === void 0) return null;
5905
5914
  const row = db.prepare(
5906
5915
  `SELECT c.pageId, c.version, c.payloadKind, c.payloadValue
@@ -8512,7 +8521,7 @@ var Runner = class extends import_node_events3.EventEmitter {
8512
8521
  name: a.name,
8513
8522
  adapterName: a.adapterName,
8514
8523
  capabilities: a.capabilities,
8515
- profiles: Array.from(a.profiles.entries()).map(([id, version]) => ({ id, version }))
8524
+ profiles: Array.from(a.profiles.entries()).map(([id, version2]) => ({ id, version: version2 }))
8516
8525
  }))
8517
8526
  };
8518
8527
  this.ws.send(envelope("agent.host.declare", payload, this.config.daemon_id));
@@ -10945,9 +10954,9 @@ async function readResponseError(res) {
10945
10954
 
10946
10955
  // src/cli/index.ts
10947
10956
  init_ui();
10948
- var VERSION = "1.9.7";
10957
+ init_package();
10949
10958
  function buildProgram() {
10950
- const program = new import_commander18.Command("prismer").description("Prismer Cloud daemon CLI (TS-only).").version(VERSION);
10959
+ const program = new import_commander18.Command("prismer").description("Prismer Cloud daemon CLI (TS-only).").version(version);
10951
10960
  program.addCommand(buildBannerCommand());
10952
10961
  program.addCommand(buildSetupCommand());
10953
10962
  program.addCommand(buildConfigCommand());