@datarails-ai/dr-appspace-cli 0.10.7 → 0.10.8
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 +63 -3
- 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.8",
|
|
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-09-30T19:32
|
|
60
|
+
var BUILD_TIME = "2026-09-30T19:41:32.269Z";
|
|
61
61
|
function formatBuildTime(iso) {
|
|
62
62
|
if (iso === "") return "";
|
|
63
63
|
const d = new Date(iso);
|
|
@@ -25154,6 +25154,29 @@ function findNode(nodes, interaction) {
|
|
|
25154
25154
|
}
|
|
25155
25155
|
return void 0;
|
|
25156
25156
|
}
|
|
25157
|
+
function closedDialogOf(node) {
|
|
25158
|
+
const hidden = node.closest?.("[hidden]") ?? null;
|
|
25159
|
+
if (hidden === null) return void 0;
|
|
25160
|
+
const dialog = hidden.closest?.('[data-dr-component="dialog"]') ?? null;
|
|
25161
|
+
if (dialog === null || dialog.getAttribute("data-dr-open") === "true") return void 0;
|
|
25162
|
+
return dialog;
|
|
25163
|
+
}
|
|
25164
|
+
function dialogTriggerOf(dialog) {
|
|
25165
|
+
const marked2 = Array.from(dialog.querySelectorAll('[data-test="dialogTrigger"]'))[0];
|
|
25166
|
+
if (marked2 !== void 0) return marked2;
|
|
25167
|
+
return Array.from(dialog.querySelectorAll("button")).find((button) => (button.closest?.("[hidden]") ?? null) === null);
|
|
25168
|
+
}
|
|
25169
|
+
function openDialogNodeFor(document, interaction) {
|
|
25170
|
+
for (const box of Array.from(document.querySelectorAll('[role="dialog"]'))) {
|
|
25171
|
+
const node = findNode(box.querySelectorAll(INTERACTION_SELECTOR), { ...interaction, occurrence: 0 });
|
|
25172
|
+
if (node !== void 0) return node;
|
|
25173
|
+
}
|
|
25174
|
+
return void 0;
|
|
25175
|
+
}
|
|
25176
|
+
function press(window, node) {
|
|
25177
|
+
if (typeof node.click === "function") node.click();
|
|
25178
|
+
else node.dispatchEvent(new window.Event("click", { bubbles: true, cancelable: true }));
|
|
25179
|
+
}
|
|
25157
25180
|
function fire(window, node, interaction) {
|
|
25158
25181
|
const notes = [];
|
|
25159
25182
|
if (interaction.kind === "form") {
|
|
@@ -26557,7 +26580,7 @@ async function runUiSmoke(opts) {
|
|
|
26557
26580
|
const nodes = dom.window.document.querySelectorAll(
|
|
26558
26581
|
INTERACTION_SELECTOR
|
|
26559
26582
|
);
|
|
26560
|
-
|
|
26583
|
+
let node = findNode(nodes, interaction);
|
|
26561
26584
|
if (node === void 0) {
|
|
26562
26585
|
notExercised.push({
|
|
26563
26586
|
handler: interaction.handler,
|
|
@@ -26566,6 +26589,36 @@ async function runUiSmoke(opts) {
|
|
|
26566
26589
|
});
|
|
26567
26590
|
continue;
|
|
26568
26591
|
}
|
|
26592
|
+
const closed = closedDialogOf(node);
|
|
26593
|
+
let opened = false;
|
|
26594
|
+
if (closed !== void 0) {
|
|
26595
|
+
const trigger = dialogTriggerOf(closed);
|
|
26596
|
+
if (trigger === void 0 || trigger.disabled === true) {
|
|
26597
|
+
notExercised.push({
|
|
26598
|
+
handler: interaction.handler,
|
|
26599
|
+
kind: interaction.kind,
|
|
26600
|
+
why: `it sits in a closed dialog whose trigger the page drew ${trigger === void 0 ? "no button for" : "disabled"} (${interaction.label})`
|
|
26601
|
+
});
|
|
26602
|
+
continue;
|
|
26603
|
+
}
|
|
26604
|
+
press(dom.window, trigger);
|
|
26605
|
+
const openBy = Math.min(Date.now() + Math.min(perInteraction, 5e3), budgetUntil);
|
|
26606
|
+
let live = openDialogNodeFor(dom.window.document, interaction);
|
|
26607
|
+
while (live === void 0 && Date.now() < openBy) {
|
|
26608
|
+
await sleep(25);
|
|
26609
|
+
live = openDialogNodeFor(dom.window.document, interaction);
|
|
26610
|
+
}
|
|
26611
|
+
if (live === void 0) {
|
|
26612
|
+
notExercised.push({
|
|
26613
|
+
handler: interaction.handler,
|
|
26614
|
+
kind: interaction.kind,
|
|
26615
|
+
why: `it sits in a closed dialog, and pressing the dialog's trigger drew no ${interaction.kind} for it (${interaction.label})`
|
|
26616
|
+
});
|
|
26617
|
+
continue;
|
|
26618
|
+
}
|
|
26619
|
+
node = live;
|
|
26620
|
+
opened = true;
|
|
26621
|
+
}
|
|
26569
26622
|
if (node.disabled === true) {
|
|
26570
26623
|
notExercised.push({
|
|
26571
26624
|
handler: interaction.handler,
|
|
@@ -26605,6 +26658,13 @@ async function runUiSmoke(opts) {
|
|
|
26605
26658
|
);
|
|
26606
26659
|
outcome.problems.push(...notes);
|
|
26607
26660
|
outcomes2.push(outcome);
|
|
26661
|
+
if (opened) {
|
|
26662
|
+
for (const box of Array.from(dom.window.document.querySelectorAll('[role="dialog"]'))) {
|
|
26663
|
+
const cancel = box.querySelector('[data-test="dialogCancel"]');
|
|
26664
|
+
if (cancel instanceof dom.window.HTMLButtonElement) cancel.click();
|
|
26665
|
+
}
|
|
26666
|
+
await settle(Math.min(Date.now() + graceMs, budgetUntil), calls.length);
|
|
26667
|
+
}
|
|
26608
26668
|
}
|
|
26609
26669
|
}
|
|
26610
26670
|
if (canvasContexts.size > 0) caveats.push(canvasCaveat([...canvasContexts]));
|