@datarails-ai/dr-appspace-cli 0.12.67 → 0.12.69

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.
Files changed (2) hide show
  1. package/dist/cli.js +23 -16
  2. 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.67",
16
+ version: "0.12.69",
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-05T08:07:56.103Z";
60
+ var BUILD_TIME = "2026-11-05T11:53:43.742Z";
61
61
  function formatBuildTime(iso) {
62
62
  if (iso === "") return "";
63
63
  const d = new Date(iso);
@@ -9316,6 +9316,8 @@ function pageGateKey(roles) {
9316
9316
  var NAV_OPEN = /<nav\b[^>]*\bdata-dr-kit\s*=\s*["']nav["'][^>]*>/gi;
9317
9317
  var ANCHOR = /<a\b([^>]*)>/gi;
9318
9318
  var HREF = /\bhref\s*=\s*["']([^"']*)["']/i;
9319
+ var NAV_HREF = /(?<![\w-])href\s*=\s*["']([^"']*)["']/i;
9320
+ var NAV_CLOSE = /<\/nav\s*>/i;
9319
9321
  var ROLE_ATTR2 = /\bdata-dr-role\s*=\s*["']([^"']*)["']/i;
9320
9322
  var PAGE_LITERAL = /["'`](?:\.\/)?([A-Za-z0-9_-]+\.html)(?:[?#][^"'`]*)?["'`]/g;
9321
9323
  function targetOf(href, from = "ui/index.html") {
@@ -9335,15 +9337,15 @@ function navLinks(html, { owned = false, from } = {}) {
9335
9337
  if (owned) regions.push(text4);
9336
9338
  else {
9337
9339
  for (const open2 of text4.matchAll(NAV_OPEN)) {
9338
- const start = open2.index + open2[0].length;
9339
- const end = text4.indexOf("</nav>", start);
9340
- regions.push(text4.slice(start, end === -1 ? text4.length : end));
9340
+ const rest = text4.slice(open2.index + open2[0].length);
9341
+ const end = rest.search(NAV_CLOSE);
9342
+ regions.push(end === -1 ? rest : rest.slice(0, end));
9341
9343
  }
9342
9344
  }
9343
9345
  const out = [];
9344
9346
  for (const region of regions) {
9345
9347
  for (const anchor of region.matchAll(ANCHOR)) {
9346
- const target = targetOf(HREF.exec(anchor[1])?.[1], from);
9348
+ const target = targetOf((owned ? HREF : NAV_HREF).exec(anchor[1])?.[1], from);
9347
9349
  if (target === null) continue;
9348
9350
  out.push({ target, gate: gateRoles(ROLE_ATTR2.exec(anchor[1])?.[1]) });
9349
9351
  }
@@ -11696,8 +11698,11 @@ function tabBars(pages, typed) {
11696
11698
  if (tabs.length > 0) stored.set(page.path, tabs);
11697
11699
  }
11698
11700
  const targetsOf = (path3) => stored.has(path3) ? new Set(stored.get(path3).map((tab) => tab.target)) : null;
11699
- const same5 = (a, b) => a !== null && b !== null && a.size === b.size && [...a].every((one) => b.has(one));
11700
- const carries = (path3, listed) => same5(targetsOf(path3), listed) && stored.get(path3).every((tab) => !tab.current);
11701
+ const suffix = (href) => href.replace(/^[^?#]*/, "");
11702
+ const carries = (path3, tabs) => {
11703
+ const other = stored.get(path3);
11704
+ return other !== void 0 && other.length === tabs.length && other.every((tab, index) => !tab.current && tab.target === tabs[index].target && tab.label === tabs[index].label && suffix(tab.href) === suffix(tabs[index].href));
11705
+ };
11701
11706
  const out = /* @__PURE__ */ new Map();
11702
11707
  for (const page of pages) {
11703
11708
  const tabs = stored.get(page.path);
@@ -11716,7 +11721,7 @@ function tabBars(pages, typed) {
11716
11721
  return tab.target !== null && // The href as `composedTabs` writes it: a `?view=monthly` or `#sales` the author added is theirs.
11717
11722
  tab.href === relativeTo(page.path, tab.target) && ascending && tab.current === (tab.target === page.path) && (target === void 0 || tab.label === headingOf(target));
11718
11723
  });
11719
- const stale = kitShaped && (dead.length > 0 || missing.length > 0 && !missing.every((path3) => carries(path3, listed)));
11724
+ const stale = kitShaped && (dead.length > 0 || missing.length > 0 && !missing.every((path3) => carries(path3, tabs)));
11720
11725
  if (stale) {
11721
11726
  out.set(page.path, { kind: "recomposed", tabs, problem: null });
11722
11727
  continue;
@@ -12600,11 +12605,11 @@ var UI_KIT2 = "ui-kit/v4";
12600
12605
  var CHARTS = "echarts@5.6.0";
12601
12606
  var FMT = "dr-fmt@2.1.0";
12602
12607
  var TOKENS = "dr-tokens@1.0.0";
12603
- var WIDGETS = "dr-app-widgets@1.6.4";
12608
+ var WIDGETS = "dr-app-widgets@1.6.6";
12604
12609
  var COMPONENTS = "dr-components@1.6.0";
12605
12610
  var CONTROLS = "dr-components-controls@1.2.1";
12606
12611
  var DASHBOARD_RUNTIME = "dr-app-runtime@1.13.4";
12607
- var DASHBOARD_WIDGETS = "dr-app-widgets@1.6.4";
12612
+ var DASHBOARD_WIDGETS = "dr-app-widgets@1.6.6";
12608
12613
  var DASHBOARD_BAR = "dr-app-dashboard@1.0.0";
12609
12614
  var ASSISTANT = "dr-insights@1.4.1";
12610
12615
  var MARKDOWN = "dr-md@1.0.0";
@@ -31889,6 +31894,8 @@ function pageRoles2(page) {
31889
31894
  var NAV_OPEN2 = /<nav\b[^>]*\bdata-dr-kit\s*=\s*["']nav["'][^>]*>/gi;
31890
31895
  var ANCHOR2 = /<a\b([^>]*)>/gi;
31891
31896
  var HREF2 = /\bhref\s*=\s*["']([^"']*)["']/i;
31897
+ var NAV_HREF2 = /(?<![\w-])href\s*=\s*["']([^"']*)["']/i;
31898
+ var NAV_CLOSE2 = /<\/nav\s*>/i;
31892
31899
  var ROLE_ATTR4 = /\bdata-dr-role\s*=\s*["']([^"']*)["']/i;
31893
31900
  var PAGE_LITERAL2 = /["'`](?:\.\/)?([A-Za-z0-9_-]+\.html)(?:[?#][^"'`]*)?["'`]/g;
31894
31901
  function targetOf2(href, from = "ui/index.html") {
@@ -31908,15 +31915,15 @@ function navLinks2(html, { owned = false, from } = {}) {
31908
31915
  if (owned) regions.push(text4);
31909
31916
  else {
31910
31917
  for (const open2 of text4.matchAll(NAV_OPEN2)) {
31911
- const start = open2.index + open2[0].length;
31912
- const end = text4.indexOf("</nav>", start);
31913
- regions.push(text4.slice(start, end === -1 ? text4.length : end));
31918
+ const rest = text4.slice(open2.index + open2[0].length);
31919
+ const end = rest.search(NAV_CLOSE2);
31920
+ regions.push(end === -1 ? rest : rest.slice(0, end));
31914
31921
  }
31915
31922
  }
31916
31923
  const out = [];
31917
31924
  for (const region of regions) {
31918
31925
  for (const anchor of region.matchAll(ANCHOR2)) {
31919
- const target = targetOf2(HREF2.exec(anchor[1])?.[1], from);
31926
+ const target = targetOf2((owned ? HREF2 : NAV_HREF2).exec(anchor[1])?.[1], from);
31920
31927
  if (target === null) continue;
31921
31928
  out.push({ target, gate: gateRoles2(ROLE_ATTR4.exec(anchor[1])?.[1]) });
31922
31929
  }
@@ -32539,7 +32546,7 @@ var kit_default2 = {
32539
32546
  checks: "checks/run.mjs",
32540
32547
  contract: "contract/extract.mjs",
32541
32548
  charts: "echarts@5.6.0",
32542
- appWidgets: "dr-app-widgets@1.6.4",
32549
+ appWidgets: "dr-app-widgets@1.6.6",
32543
32550
  appComponents: "dr-components@1.6.0",
32544
32551
  appControls: "dr-components-controls@1.2.1"
32545
32552
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datarails-ai/dr-appspace-cli",
3
- "version": "0.12.67",
3
+ "version": "0.12.69",
4
4
  "description": "Datarails App Space CLI — build, try, push and publish App Space apps",
5
5
  "type": "module",
6
6
  "engines": {