@datarails-ai/dr-appspace-cli 0.12.70 → 0.12.71
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.js +20 -10
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -13,7 +13,7 @@ import { fileURLToPath as fileURLToPath6 } from "url";
|
|
|
13
13
|
// package.json
|
|
14
14
|
var package_default = {
|
|
15
15
|
name: "@datarails-ai/dr-appspace-cli",
|
|
16
|
-
version: "0.12.
|
|
16
|
+
version: "0.12.71",
|
|
17
17
|
description: "Datarails App Space CLI \u2014 build, try, push and publish App Space apps",
|
|
18
18
|
type: "module",
|
|
19
19
|
engines: {
|
|
@@ -57,7 +57,7 @@ var package_default = {
|
|
|
57
57
|
};
|
|
58
58
|
|
|
59
59
|
// src/buildInfo.ts
|
|
60
|
-
var BUILD_TIME = "2026-11-
|
|
60
|
+
var BUILD_TIME = "2026-11-08T16:13:27.404Z";
|
|
61
61
|
function formatBuildTime(iso) {
|
|
62
62
|
if (iso === "") return "";
|
|
63
63
|
const d = new Date(iso);
|
|
@@ -12622,6 +12622,7 @@ var CLOAK_REVEAL_MS = 3e3;
|
|
|
12622
12622
|
var CLOAK = `<style data-dr-cloak>main[data-dr-app]{visibility:hidden;animation:dr-reveal 0s linear ${CLOAK_REVEAL_MS}ms forwards}html[data-dr-app-runtime] main[data-dr-app]{visibility:visible;animation:none}main[data-dr-app]:has(>[data-dr-portal]){visibility:visible;animation:none}@keyframes dr-reveal{to{visibility:visible}}</style><noscript><style>main[data-dr-app]{visibility:visible;animation:none}</style></noscript>`;
|
|
12623
12623
|
var DEFAULT_VERSION = "0.1.0";
|
|
12624
12624
|
var DEFAULT_API_VERSION = "appspace/v1";
|
|
12625
|
+
var RUNTIME_VERSION = 1;
|
|
12625
12626
|
var ROLES = ["list", "inbox", "save", "remove", "submit", "decide", "summary", "history", "custom"];
|
|
12626
12627
|
var ROLE_SET = new Set(ROLES);
|
|
12627
12628
|
var REQUIRED_KEYS = {
|
|
@@ -17485,7 +17486,8 @@ function manifestOf(contract, app, handlers, names, model, served = [], readers
|
|
|
17485
17486
|
// empty one too, so the verifier says "blank" and the round trip holds;
|
|
17486
17487
|
// a contract that states none writes the manifest it always did.
|
|
17487
17488
|
...typeof app.description === "string" ? { description: app.description } : {},
|
|
17488
|
-
version: app.version ?? DEFAULT_VERSION
|
|
17489
|
+
version: app.version ?? DEFAULT_VERSION,
|
|
17490
|
+
runtime: RUNTIME_VERSION
|
|
17489
17491
|
};
|
|
17490
17492
|
if (named5(app.nav_label)) manifest.nav = { label: app.nav_label };
|
|
17491
17493
|
manifest.routes = routesOf2(app, contract.pages ?? []);
|
|
@@ -24696,6 +24698,10 @@ async function recordAsInput(dir, path3) {
|
|
|
24696
24698
|
}
|
|
24697
24699
|
|
|
24698
24700
|
// src/commands/appspace/get.ts
|
|
24701
|
+
function headline(appId, pkg) {
|
|
24702
|
+
const runtime = pkg.runtime === void 0 ? "" : `, runtime ${pkg.runtime}`;
|
|
24703
|
+
return `${appId} (${pkg.stage}, revision ${pkg.revision}${runtime})`;
|
|
24704
|
+
}
|
|
24699
24705
|
function requirePlainName(kind, name, verb = "write") {
|
|
24700
24706
|
if (name === "" || name === "." || name === ".." || /[\\/]/.test(name)) {
|
|
24701
24707
|
throw new Error(
|
|
@@ -24969,10 +24975,10 @@ async function runGet(appId, opts) {
|
|
|
24969
24975
|
const restored = await restoreOwnedFiles(dir, contract, { force: opts.force === true });
|
|
24970
24976
|
await recordPulled(dir, contract);
|
|
24971
24977
|
if (opts.json === true) {
|
|
24972
|
-
printJson({ id: appId, dir, revision: pkg.revision, stage: pkg.stage, contract, owned: restored.wrote, kept: restored.kept });
|
|
24978
|
+
printJson({ id: appId, dir, revision: pkg.revision, stage: pkg.stage, runtime: pkg.runtime, contract, owned: restored.wrote, kept: restored.kept });
|
|
24973
24979
|
return 0;
|
|
24974
24980
|
}
|
|
24975
|
-
process.stdout.write(`${appId
|
|
24981
|
+
process.stdout.write(`${headline(appId, pkg)}
|
|
24976
24982
|
`);
|
|
24977
24983
|
process.stdout.write(`${dir}
|
|
24978
24984
|
`);
|
|
@@ -25536,10 +25542,10 @@ var RUNTIME_LIBRARIES = [
|
|
|
25536
25542
|
}
|
|
25537
25543
|
];
|
|
25538
25544
|
var MIN_DASHBOARD_RUNTIME = "1.13.0";
|
|
25539
|
-
var
|
|
25545
|
+
var RUNTIME_VERSION2 = /^vendor\/dr-app-runtime@(\d+\.\d+\.\d+)\/runtime\.js$/;
|
|
25540
25546
|
function runtimeBelowMinimum(page) {
|
|
25541
25547
|
const { elements } = parseHtml(page.text);
|
|
25542
|
-
return elements.filter((el) => el.tag === "script" && el.attrs.src !== void 0).map((el) =>
|
|
25548
|
+
return elements.filter((el) => el.tag === "script" && el.attrs.src !== void 0).map((el) => RUNTIME_VERSION2.exec(resolveFromPlatformRoot(page.path, el.attrs.src) ?? "")?.[1]).filter((version) => version !== void 0 && compareVersions(version, MIN_DASHBOARD_RUNTIME) < 0);
|
|
25543
25549
|
}
|
|
25544
25550
|
function compareVersions(a, b) {
|
|
25545
25551
|
const left = a.split(".").map(Number);
|
|
@@ -33691,7 +33697,7 @@ async function loadContract(dir, opts) {
|
|
|
33691
33697
|
}
|
|
33692
33698
|
const app = assembled.contract["app"];
|
|
33693
33699
|
record2.name = typeof app["name"] === "string" ? app["name"] : null;
|
|
33694
|
-
const
|
|
33700
|
+
const headline2 = resolveExpectations(opts.expect, assembled.contract, assembled.widgetIds);
|
|
33695
33701
|
const overlay = {};
|
|
33696
33702
|
for (const [path3, text4] of Object.entries(assembled.transforms)) {
|
|
33697
33703
|
if (!insideFolder(dir, path3)) throw new Error(`refusing to write the transform ${JSON.stringify(path3)} outside ${dir}.`);
|
|
@@ -33715,7 +33721,7 @@ async function loadContract(dir, opts) {
|
|
|
33715
33721
|
`).join("")
|
|
33716
33722
|
);
|
|
33717
33723
|
}
|
|
33718
|
-
return { contract: assembled.contract, assemble: record2, headline, overlay };
|
|
33724
|
+
return { contract: assembled.contract, assemble: record2, headline: headline2, overlay };
|
|
33719
33725
|
}
|
|
33720
33726
|
function pageDrafts(named13) {
|
|
33721
33727
|
const doc = named13.doc;
|
|
@@ -34725,6 +34731,10 @@ function registerEjectCommand(parent) {
|
|
|
34725
34731
|
}
|
|
34726
34732
|
|
|
34727
34733
|
// src/commands/appspace/list.ts
|
|
34734
|
+
function formatListLine(a) {
|
|
34735
|
+
const runtime = a.runtime === void 0 ? "-" : `r${a.runtime}`;
|
|
34736
|
+
return `${a.stage.padEnd(9)} ${runtime.padEnd(4)} ${a.id.padEnd(24)} ${a.name}`;
|
|
34737
|
+
}
|
|
34728
34738
|
function registerListCommand(parent) {
|
|
34729
34739
|
withJsonOption(
|
|
34730
34740
|
withServerOptions(
|
|
@@ -34747,7 +34757,7 @@ function registerListCommand(parent) {
|
|
|
34747
34757
|
return;
|
|
34748
34758
|
}
|
|
34749
34759
|
for (const a of apps) {
|
|
34750
|
-
process.stdout.write(`${
|
|
34760
|
+
process.stdout.write(`${formatListLine(a)}
|
|
34751
34761
|
`);
|
|
34752
34762
|
}
|
|
34753
34763
|
} finally {
|