@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 +24 -15
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +24 -15
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +24 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +24 -15
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -440,6 +440,14 @@ var init_ui = __esm({
|
|
|
440
440
|
}
|
|
441
441
|
});
|
|
442
442
|
|
|
443
|
+
// package.json
|
|
444
|
+
var version;
|
|
445
|
+
var init_package = __esm({
|
|
446
|
+
"package.json"() {
|
|
447
|
+
version = "1.9.22";
|
|
448
|
+
}
|
|
449
|
+
});
|
|
450
|
+
|
|
443
451
|
// src/cli/util.ts
|
|
444
452
|
var util_exports = {};
|
|
445
453
|
__export(util_exports, {
|
|
@@ -529,10 +537,10 @@ function runAction(fn, opts = {}) {
|
|
|
529
537
|
function printBanner(opts = {}) {
|
|
530
538
|
const ui = getUI();
|
|
531
539
|
if (opts.compact) {
|
|
532
|
-
ui.smallHeader(
|
|
540
|
+
ui.smallHeader(`Runtime CLI v${version}`);
|
|
533
541
|
return;
|
|
534
542
|
}
|
|
535
|
-
ui.banner(
|
|
543
|
+
ui.banner(`Runtime CLI v${version}`, { full: true });
|
|
536
544
|
}
|
|
537
545
|
function ok(label, detail) {
|
|
538
546
|
getUI().ok(label, detail);
|
|
@@ -593,6 +601,7 @@ var init_util = __esm({
|
|
|
593
601
|
"src/cli/util.ts"() {
|
|
594
602
|
"use strict";
|
|
595
603
|
init_ui();
|
|
604
|
+
init_package();
|
|
596
605
|
DEFAULT_CLOUD_BASE_URL = "https://prismer.cloud";
|
|
597
606
|
ANSI = {
|
|
598
607
|
reset: "\x1B[0m",
|
|
@@ -4704,9 +4713,9 @@ var MemoryStore = class {
|
|
|
4704
4713
|
const row = db.prepare("SELECT * FROM memory_pages WHERE workspaceId = ? AND id = ?").get(this.opts.workspaceId, pageId);
|
|
4705
4714
|
return row ? this.rowToPage(row) : null;
|
|
4706
4715
|
}
|
|
4707
|
-
loadContent(pageId,
|
|
4716
|
+
loadContent(pageId, version2) {
|
|
4708
4717
|
const db = this.requireDb();
|
|
4709
|
-
const targetVersion =
|
|
4718
|
+
const targetVersion = version2 ?? db.prepare("SELECT version FROM memory_pages WHERE workspaceId = ? AND id = ?").get(this.opts.workspaceId, pageId)?.version;
|
|
4710
4719
|
if (targetVersion === void 0) return null;
|
|
4711
4720
|
const row = db.prepare(
|
|
4712
4721
|
`SELECT c.pageId, c.version, c.payloadKind, c.payloadValue
|
|
@@ -7169,7 +7178,7 @@ var Runner = class extends EventEmitter3 {
|
|
|
7169
7178
|
name: a.name,
|
|
7170
7179
|
adapterName: a.adapterName,
|
|
7171
7180
|
capabilities: a.capabilities,
|
|
7172
|
-
profiles: Array.from(a.profiles.entries()).map(([id,
|
|
7181
|
+
profiles: Array.from(a.profiles.entries()).map(([id, version2]) => ({ id, version: version2 }))
|
|
7173
7182
|
}))
|
|
7174
7183
|
};
|
|
7175
7184
|
this.ws.send(envelope("agent.host.declare", payload, this.config.daemon_id));
|
|
@@ -7857,8 +7866,8 @@ function buildAdapterCommand() {
|
|
|
7857
7866
|
});
|
|
7858
7867
|
return cmd;
|
|
7859
7868
|
}
|
|
7860
|
-
function runInstall(spec,
|
|
7861
|
-
const { argv0, args } = installCommand(spec,
|
|
7869
|
+
function runInstall(spec, version2, dryRun) {
|
|
7870
|
+
const { argv0, args } = installCommand(spec, version2);
|
|
7862
7871
|
getUI().line(`> ${argv0} ${args.join(" ")}`);
|
|
7863
7872
|
if (dryRun) {
|
|
7864
7873
|
getUI().line("(dry-run \u2014 not executing)");
|
|
@@ -8002,16 +8011,16 @@ function runHooks(spec, opts) {
|
|
|
8002
8011
|
hook: inspectHook(spec)
|
|
8003
8012
|
};
|
|
8004
8013
|
}
|
|
8005
|
-
function installCommand(spec,
|
|
8006
|
-
const ref =
|
|
8014
|
+
function installCommand(spec, version2) {
|
|
8015
|
+
const ref = version2 === "latest" ? spec.package : `${spec.package}@${version2}`;
|
|
8007
8016
|
switch (spec.manager) {
|
|
8008
8017
|
case "npm":
|
|
8009
8018
|
return { argv0: "npm", args: ["install", "-g", ref] };
|
|
8010
8019
|
case "pipx":
|
|
8011
|
-
const pyRef =
|
|
8020
|
+
const pyRef = version2 === "latest" ? spec.package : `${spec.package}==${version2}`;
|
|
8012
8021
|
return { argv0: "pipx", args: ["install", pyRef] };
|
|
8013
8022
|
case "pip":
|
|
8014
|
-
const pipRef =
|
|
8023
|
+
const pipRef = version2 === "latest" ? spec.package : `${spec.package}==${version2}`;
|
|
8015
8024
|
return { argv0: "pip", args: ["install", "--user", pipRef] };
|
|
8016
8025
|
}
|
|
8017
8026
|
}
|
|
@@ -8210,7 +8219,7 @@ function readAdapterConfig() {
|
|
|
8210
8219
|
return {};
|
|
8211
8220
|
}
|
|
8212
8221
|
}
|
|
8213
|
-
function recordInstallInConfig(spec, binPath,
|
|
8222
|
+
function recordInstallInConfig(spec, binPath, version2) {
|
|
8214
8223
|
const paths = resolvePaths();
|
|
8215
8224
|
if (!configExists(paths)) {
|
|
8216
8225
|
process.stderr.write(
|
|
@@ -8232,7 +8241,7 @@ function recordInstallInConfig(spec, binPath, version) {
|
|
|
8232
8241
|
package_manager: spec.manager,
|
|
8233
8242
|
package_name: spec.package,
|
|
8234
8243
|
binary: binPath,
|
|
8235
|
-
version,
|
|
8244
|
+
version: version2,
|
|
8236
8245
|
installed_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
8237
8246
|
};
|
|
8238
8247
|
saveConfig({ ...cfg, adapters }, paths);
|
|
@@ -11178,9 +11187,9 @@ async function readResponseError(res) {
|
|
|
11178
11187
|
|
|
11179
11188
|
// src/cli/index.ts
|
|
11180
11189
|
init_ui();
|
|
11181
|
-
|
|
11190
|
+
init_package();
|
|
11182
11191
|
function buildProgram() {
|
|
11183
|
-
const program = new Command18("prismer").description("Prismer Cloud daemon CLI (TS-only).").version(
|
|
11192
|
+
const program = new Command18("prismer").description("Prismer Cloud daemon CLI (TS-only).").version(version);
|
|
11184
11193
|
program.addCommand(buildBannerCommand());
|
|
11185
11194
|
program.addCommand(buildSetupCommand());
|
|
11186
11195
|
program.addCommand(buildConfigCommand());
|