@datarails-ai/dr-appspace-cli 0.12.46 → 0.12.48

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 -5
  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.46",
16
+ version: "0.12.48",
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-28T21:01:12.571Z";
60
+ var BUILD_TIME = "2026-10-28T22:46:44.664Z";
61
61
  function formatBuildTime(iso) {
62
62
  if (iso === "") return "";
63
63
  const d = new Date(iso);
@@ -11205,6 +11205,7 @@ function isRefusal(problem6) {
11205
11205
  function restateDashboard(composed, pages, handlerName, handler, { refuse: refuse2, note, stated: stated2 }) {
11206
11206
  const app = isPlainObject7(composed.app) ? composed.app : {};
11207
11207
  const typed = isPlainObject7(composed.elements) ? composed.elements : {};
11208
+ const spec = specRows(composed);
11208
11209
  const declared = treeOf(typed);
11209
11210
  const conflicts = new Map(declared.problems.map((problem6) => [uidOfPointer(problem6.pointer), problem6]));
11210
11211
  const paths = new Set(pages.map((page) => page.path));
@@ -11348,7 +11349,7 @@ function restateDashboard(composed, pages, handlerName, handler, { refuse: refus
11348
11349
  const held = declared.parent.get(uid) ?? null;
11349
11350
  const parent = held !== null && kept.includes(held) ? held : null;
11350
11351
  if (conflicts.has(uid) && (parent !== null || kept.includes(typed[uid].parent))) refuse2(conflicts.get(uid).code, conflicts.get(uid).pointer, conflicts.get(uid).message);
11351
- elements[uid] = cardOf(typed[uid], uid, path3, handlerName, sections, refuse2, parent);
11352
+ elements[uid] = cardOf(typed[uid], uid, path3, handlerName, sections, refuse2, parent, spec);
11352
11353
  }
11353
11354
  const otherRegions = own2.filter((uid) => typed[uid].type === "region" && !handled.has(uid) && !dropped.has(uid) && !duplicates.has(uid));
11354
11355
  for (const uid of otherRegions) elements[uid] = region(uid, typed[uid].role ?? "header", "section", []);
@@ -11377,7 +11378,16 @@ function restateDashboard(composed, pages, handlerName, handler, { refuse: refus
11377
11378
  data: dataOf(composed, handler)
11378
11379
  };
11379
11380
  }
11380
- function cardOf(element, uid, path3, handlerName, sections, refuse2, parent = null) {
11381
+ function specRows(composed) {
11382
+ const data = isPlainObject7(composed.data) ? composed.data : {};
11383
+ return isPlainObject7(data.widgets) ? data.widgets : {};
11384
+ }
11385
+ function specLabel(row) {
11386
+ if (!isPlainObject7(row)) return null;
11387
+ if (named5(row.label)) return row.label;
11388
+ return isPlainObject7(row.copy) && named5(row.copy.label) ? row.copy.label : null;
11389
+ }
11390
+ function cardOf(element, uid, path3, handlerName, sections, refuse2, parent = null, rows2 = {}) {
11381
11391
  const props = isPlainObject7(element.props) ? element.props : {};
11382
11392
  const spec = named5(element.id) ? element.id : named5(props.card) ? props.card : named5(props.id) ? props.id : null;
11383
11393
  if (spec === null) {
@@ -11395,7 +11405,9 @@ function cardOf(element, uid, path3, handlerName, sections, refuse2, parent = nu
11395
11405
  let frame2 = isPlainObject7(element.card) ? element.card : {};
11396
11406
  if (Object.keys(frame2).length === 0) {
11397
11407
  frame2 = {};
11398
- for (const key of ["title", "subtitle"]) if (named5(props[key])) frame2[key] = props[key];
11408
+ const row = rows2[spec ?? uid];
11409
+ const labelled = (kind === "kpi" || kind === "" && isPlainObject7(row) && row.kind === "kpi") && specLabel(row) !== null;
11410
+ for (const key of labelled ? ["subtitle"] : ["title", "subtitle"]) if (named5(props[key])) frame2[key] = props[key];
11399
11411
  }
11400
11412
  const section = named5(element.section) && sections.some((entry) => entry.id === element.section) ? element.section : void 0;
11401
11413
  return {
@@ -22997,6 +23009,11 @@ function describePostCommit(result) {
22997
23009
  }
22998
23010
  return lines.join("");
22999
23011
  }
23012
+ function describeServerWarnings(result) {
23013
+ const said2 = new Set((result.post_commit_failed ?? []).map((f) => f.warning).filter((w) => typeof w === "string"));
23014
+ return (Array.isArray(result.warnings) ? result.warnings : []).filter((line2) => typeof line2 === "string" && line2.trim() !== "" && !said2.has(line2)).map((line2) => `warning: ${line2}
23015
+ `).join("");
23016
+ }
23000
23017
  async function bindForPush(client, appId, contract, opts) {
23001
23018
  const transport = metricsTransport(client);
23002
23019
  const app = contract?.app;
@@ -23122,6 +23139,7 @@ async function pushFolder(dir, opts) {
23122
23139
  owner: result.owner ?? null
23123
23140
  });
23124
23141
  if (pushFailed(result)) process.exitCode = 1;
23142
+ process.stderr.write(describeServerWarnings(result));
23125
23143
  if (opts.json === true) {
23126
23144
  printJson(result);
23127
23145
  return outcome;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datarails-ai/dr-appspace-cli",
3
- "version": "0.12.46",
3
+ "version": "0.12.48",
4
4
  "description": "Datarails App Space CLI — build, try, push and publish App Space apps",
5
5
  "type": "module",
6
6
  "engines": {