@datarails-ai/dr-appspace-cli 0.10.19 → 0.10.21
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 -5
- 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.10.
|
|
16
|
+
version: "0.10.21",
|
|
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-05T09:55:27.001Z";
|
|
61
61
|
function formatBuildTime(iso) {
|
|
62
62
|
if (iso === "") return "";
|
|
63
63
|
const d = new Date(iso);
|
|
@@ -18714,6 +18714,9 @@ function shelf(path3, kit, charts, contract, problems) {
|
|
|
18714
18714
|
{ path: `vendor/${kit.assistant}/insights.css`, rel: "stylesheet" },
|
|
18715
18715
|
{ path: `vendor/${kit.widgets}/widgets.css`, rel: "stylesheet" },
|
|
18716
18716
|
...charts ? [{ path: `vendor/${kit.charts}/echarts.min.js`, rel: "script" }] : [],
|
|
18717
|
+
// Before the assistant: the drawer renders a reply through `window.drMd`
|
|
18718
|
+
// when it is there and prints the raw markdown when it is not.
|
|
18719
|
+
...kit.markdown ? [{ path: `vendor/${kit.markdown}/md.js`, rel: "script" }] : [],
|
|
18717
18720
|
{ path: `vendor/${kit.assistant}/insights.js`, rel: "script" },
|
|
18718
18721
|
{ path: `vendor/${kit.fmt}/fmt.js`, rel: "script" },
|
|
18719
18722
|
{ path: `vendor/${kit.widgets}/widgets.js`, rel: "script" }
|
|
@@ -19247,6 +19250,7 @@ var CONTROL_MARK = "data-dr-control";
|
|
|
19247
19250
|
var CONTROL_KIND = "data-dr-control-kind";
|
|
19248
19251
|
var CONTROL_BOXES = /* @__PURE__ */ new Set(["controls", "filters"]);
|
|
19249
19252
|
var WIDGET_LIBRARY2 = /^vendor\/dr-widgets@\d+\.\d+\.\d+\/widgets\.js$/;
|
|
19253
|
+
var ASSISTANT_MODULE = /^vendor\/dr-insights@(\d+\.\d+\.\d+)\/(insights\.(?:css|js))$/;
|
|
19250
19254
|
var WIDGET_ID = /^[a-z][a-z0-9_-]*$/;
|
|
19251
19255
|
var REQUIRED_WIDGET_ATTRS = ["data-dr-widget-title", "data-dr-widget-description", "data-dr-widget-source"];
|
|
19252
19256
|
var SPAN_MARK = "data-dr-span";
|
|
@@ -19326,12 +19330,22 @@ function checkPage2(app, page, kit) {
|
|
|
19326
19330
|
const css = `vendor/${kit.assistant}/insights.css`;
|
|
19327
19331
|
const js = `vendor/${kit.assistant}/insights.js`;
|
|
19328
19332
|
const loads = (tag, attr3, target) => elements.some((el) => el.tag === tag && resolveFromPlatformRoot(page.path, el.attrs[attr3]) === target);
|
|
19329
|
-
|
|
19333
|
+
const versionsLoaded = (tag, attr3, file) => elements.filter((el) => el.tag === tag).map((el) => ASSISTANT_MODULE.exec(resolveFromPlatformRoot(page.path, el.attrs[attr3]) ?? "")).filter((match) => match && match[2] === file).map((match) => match[1]);
|
|
19334
|
+
const cssVersions = versionsLoaded("link", "href", "insights.css");
|
|
19335
|
+
const jsVersions = versionsLoaded("script", "src", "insights.js");
|
|
19336
|
+
if (cssVersions.length === 0) {
|
|
19330
19337
|
violations.push({ rule: "R3.1", where: page.path, message: `${page.path} loads no stylesheet ${climb}${css}` });
|
|
19331
19338
|
}
|
|
19332
|
-
if (
|
|
19339
|
+
if (jsVersions.length === 0) {
|
|
19333
19340
|
violations.push({ rule: "R3.1", where: page.path, message: `${page.path} loads no script ${climb}${js}; without it no widget has an Ask button` });
|
|
19334
19341
|
}
|
|
19342
|
+
if (cssVersions.length > 0 && jsVersions.length > 0 && !jsVersions.some((version) => cssVersions.includes(version))) {
|
|
19343
|
+
violations.push({
|
|
19344
|
+
rule: "R3.1",
|
|
19345
|
+
where: page.path,
|
|
19346
|
+
message: `${page.path} loads the dr-insights script at ${jsVersions.join(", ")} and its stylesheet at ${cssVersions.join(", ")}; load both from one release (this kit writes ${kit.assistant})`
|
|
19347
|
+
});
|
|
19348
|
+
}
|
|
19335
19349
|
const uiKit = `${kit.uiKit}/dr.css`;
|
|
19336
19350
|
if (!loads("link", "href", uiKit)) {
|
|
19337
19351
|
violations.push({ rule: "R2.7", where: page.path, message: `${page.path} loads no stylesheet ${climb}${uiKit}; the grid, the card, the tab bar and every token come from it` });
|
|
@@ -25104,9 +25118,10 @@ var kit_default = {
|
|
|
25104
25118
|
description: "Templates a dashboard app is built from, and the checks the Insights Builder runs on every build (live data only, widgets only, an Ask button per widget).",
|
|
25105
25119
|
checks: "checks/run.mjs",
|
|
25106
25120
|
templates: "templates/",
|
|
25107
|
-
assistant: "dr-insights@1.
|
|
25121
|
+
assistant: "dr-insights@1.4.0",
|
|
25108
25122
|
charts: "echarts@5.6.0",
|
|
25109
25123
|
fmt: "dr-fmt@1.0.0",
|
|
25124
|
+
markdown: "dr-md@1.0.0",
|
|
25110
25125
|
uiKit: "ui-kit/v3",
|
|
25111
25126
|
widgets: "dr-widgets@1.1.2"
|
|
25112
25127
|
};
|