@datarails-ai/dr-appspace-cli 0.12.40 → 0.12.41
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 +34 -7
- 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.41",
|
|
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-10-
|
|
60
|
+
var BUILD_TIME = "2026-10-26T20:45:54.689Z";
|
|
61
61
|
function formatBuildTime(iso) {
|
|
62
62
|
if (iso === "") return "";
|
|
63
63
|
const d = new Date(iso);
|
|
@@ -22895,6 +22895,11 @@ ${said2}`, failed.status, failed.body);
|
|
|
22895
22895
|
read = await client.request(`/apps/${encodeURIComponent(appId)}/package`);
|
|
22896
22896
|
} catch (readErr) {
|
|
22897
22897
|
if (!serverError) throw err;
|
|
22898
|
+
if (readErr instanceof AppSpaceHttpError && readErr.status === 404) {
|
|
22899
|
+
return refail(
|
|
22900
|
+
`App Space has no app "${appId}" you can read (reading it back answered 404), so this push stored nothing and there is no app to \`get\`. Fix what the error above says, then run the same ship (or push) again.`
|
|
22901
|
+
);
|
|
22902
|
+
}
|
|
22898
22903
|
return refail(
|
|
22899
22904
|
`Could not read the app back to tell whether the push landed (${readErr instanceof Error ? readErr.message.split("\n")[0] : String(readErr)}). Run \`get\` into a fresh folder before pushing again.`
|
|
22900
22905
|
);
|
|
@@ -23532,7 +23537,9 @@ function setAsidePending(check5, pending) {
|
|
|
23532
23537
|
};
|
|
23533
23538
|
}
|
|
23534
23539
|
function interpret(status, body, path3, contract) {
|
|
23535
|
-
|
|
23540
|
+
const html = typeof body === "string" && /^<(!doctype html|html)/i.test(body.trimStart());
|
|
23541
|
+
if (status >= 500) return unchecked2(status, html ? null : detailOf(body) ?? body);
|
|
23542
|
+
if (html) {
|
|
23536
23543
|
return skip(`the request was intercepted before reaching App Space (HTTP ${String(status)}, an HTML page)`);
|
|
23537
23544
|
}
|
|
23538
23545
|
if (status === 200 && isObj4(body)) {
|
|
@@ -23565,6 +23572,24 @@ function interpret(status, body, path3, contract) {
|
|
|
23565
23572
|
}
|
|
23566
23573
|
return skip(`the server could not check it (HTTP ${String(status)})`);
|
|
23567
23574
|
}
|
|
23575
|
+
function unchecked2(status, detail) {
|
|
23576
|
+
const said2 = typeof detail === "string" && detail.trim() !== "" && !/^</.test(detail.trimStart()) ? firstLineOf(detail.trim()) : null;
|
|
23577
|
+
return {
|
|
23578
|
+
problems: [
|
|
23579
|
+
{
|
|
23580
|
+
code: "server:unchecked",
|
|
23581
|
+
pointer: "/",
|
|
23582
|
+
message: `NOT CHECKED: App Space could not check this package (HTTP ${String(status)}${said2 === null ? "" : `: ${said2}`}). The push runs the same checks and would be refused the same way, so nothing here was verified.`,
|
|
23583
|
+
fix: "Run --check again shortly. While it answers this, ship and push are refused too."
|
|
23584
|
+
}
|
|
23585
|
+
],
|
|
23586
|
+
skipped: []
|
|
23587
|
+
};
|
|
23588
|
+
}
|
|
23589
|
+
function firstLineOf(text3) {
|
|
23590
|
+
const line2 = text3.split("\n")[0] ?? "";
|
|
23591
|
+
return line2.length > 300 ? `${line2.slice(0, 299)}\u2026` : line2;
|
|
23592
|
+
}
|
|
23568
23593
|
function fromRefusal(status, detail, contract) {
|
|
23569
23594
|
const refused = `the push would be refused (${String(status)})`;
|
|
23570
23595
|
const tables = tablesOf2(contract);
|
|
@@ -31178,7 +31203,9 @@ async function afterWrite(dir, target, kind, contract, built, report, kit, skipp
|
|
|
31178
31203
|
if ((opts.expect ?? []).length > 0) notChecked3.push({ what: "headline", why: "--check runs no load" });
|
|
31179
31204
|
report.validate.problems = server.problems;
|
|
31180
31205
|
report.validate.checks_skipped = notChecked3;
|
|
31181
|
-
if (server.problems.length > 0)
|
|
31206
|
+
if (server.problems.length > 0) {
|
|
31207
|
+
report.failure = server.problems.every((one) => one.code === "server:unchecked") ? "package-unchecked" : "push-would-be-refused";
|
|
31208
|
+
}
|
|
31182
31209
|
await writeReport(dir, report);
|
|
31183
31210
|
const planned = metricsPlan === null ? "" : renderPlan(metricsPlan);
|
|
31184
31211
|
if (opts.json === true) printJson(report);
|
|
@@ -32125,7 +32152,7 @@ function describe5(report, skipped) {
|
|
|
32125
32152
|
return out;
|
|
32126
32153
|
}
|
|
32127
32154
|
async function planMetricsFor(contract, opts) {
|
|
32128
|
-
const
|
|
32155
|
+
const unchecked3 = (why) => ({
|
|
32129
32156
|
plan: null,
|
|
32130
32157
|
problems: [
|
|
32131
32158
|
{
|
|
@@ -32140,7 +32167,7 @@ async function planMetricsFor(contract, opts) {
|
|
|
32140
32167
|
try {
|
|
32141
32168
|
client = await connect(opts);
|
|
32142
32169
|
} catch (err) {
|
|
32143
|
-
return
|
|
32170
|
+
return unchecked3(`no session for ${opts.server ?? "this server"} (${err instanceof Error ? err.message.split("\n")[0] : String(err)})`);
|
|
32144
32171
|
}
|
|
32145
32172
|
try {
|
|
32146
32173
|
const plan = await planMetrics(contract, metricsTransport(client), {
|
|
@@ -32149,7 +32176,7 @@ async function planMetricsFor(contract, opts) {
|
|
|
32149
32176
|
});
|
|
32150
32177
|
return { plan, problems: plan.problems };
|
|
32151
32178
|
} catch (err) {
|
|
32152
|
-
if (err instanceof MetricsReadError) return
|
|
32179
|
+
if (err instanceof MetricsReadError) return unchecked3(err.message);
|
|
32153
32180
|
throw err;
|
|
32154
32181
|
} finally {
|
|
32155
32182
|
client.cleanup();
|