@wraps.dev/cli 2.14.4 → 2.14.5
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 +46 -12
- package/dist/cli.js.map +1 -1
- package/dist/lambda/event-processor/.bundled +1 -1
- package/dist/lambda/event-processor/index.js +1 -1
- package/dist/lambda/event-processor/index.ts +1 -1
- package/dist/lambda/inbound-processor/.bundled +1 -1
- package/dist/lambda/inbound-processor/index.js +1 -1
- package/dist/lambda/inbound-processor/index.ts +1 -1
- package/dist/lambda/sms-event-processor/.bundled +1 -1
- package/dist/lambda/sms-event-processor/index.js +1 -1
- package/dist/lambda/sms-event-processor/index.ts +13 -14
- package/package.json +3 -3
package/dist/cli.js
CHANGED
|
@@ -22214,7 +22214,7 @@ function renderViewerPage(compiled, allSlugs) {
|
|
|
22214
22214
|
try {
|
|
22215
22215
|
const doc = iframe.contentDocument || iframe.contentWindow.document;
|
|
22216
22216
|
iframe.style.height = doc.documentElement.scrollHeight + 'px';
|
|
22217
|
-
} catch {} //
|
|
22217
|
+
} catch {} // baseline:allow-no-swallowed-errors \u2014 cross-origin iframe resize
|
|
22218
22218
|
}
|
|
22219
22219
|
iframe.addEventListener('load', resizeIframe);
|
|
22220
22220
|
|
|
@@ -22225,7 +22225,7 @@ function renderViewerPage(compiled, allSlugs) {
|
|
|
22225
22225
|
const data = JSON.parse(e.data);
|
|
22226
22226
|
// Reload iframe (and toolbar metadata by reloading the page)
|
|
22227
22227
|
iframe.src = '/${compiled.slug}/render?t=' + Date.now();
|
|
22228
|
-
} catch { //
|
|
22228
|
+
} catch { // baseline:allow-no-swallowed-errors \u2014 SSE parse error is expected
|
|
22229
22229
|
// "connected" message or parse error \u2014 ignore
|
|
22230
22230
|
}
|
|
22231
22231
|
};
|
|
@@ -26576,7 +26576,10 @@ async function workflowsPush(options) {
|
|
|
26576
26576
|
return;
|
|
26577
26577
|
}
|
|
26578
26578
|
const token = await resolveTokenAsync({ token: options.token });
|
|
26579
|
-
const apiResults = await pushToAPI2(toProcess, token, progress,
|
|
26579
|
+
const apiResults = await pushToAPI2(toProcess, token, progress, {
|
|
26580
|
+
force: options.force,
|
|
26581
|
+
draft: options.draft
|
|
26582
|
+
});
|
|
26580
26583
|
for (const w of toProcess) {
|
|
26581
26584
|
const apiResult = apiResults.find((r) => r.slug === w.slug);
|
|
26582
26585
|
if (apiResult?.success) {
|
|
@@ -26593,12 +26596,15 @@ async function workflowsPush(options) {
|
|
|
26593
26596
|
await saveLockfile(wrapsDir, lockfile);
|
|
26594
26597
|
const pushed = apiResults.filter((r) => r.success);
|
|
26595
26598
|
const conflicts = apiResults.filter((r) => r.conflict);
|
|
26599
|
+
const drafts = pushed.filter((r) => r.status === "draft");
|
|
26600
|
+
const enabled = pushed.filter((r) => r.status !== "draft");
|
|
26596
26601
|
if (isJsonMode()) {
|
|
26597
26602
|
if (conflicts.length === 0) {
|
|
26598
26603
|
jsonSuccess("email.workflows.push", {
|
|
26599
26604
|
pushed: pushed.map((r) => ({
|
|
26600
26605
|
slug: r.slug,
|
|
26601
|
-
id: r.id
|
|
26606
|
+
id: r.id,
|
|
26607
|
+
status: r.status
|
|
26602
26608
|
})),
|
|
26603
26609
|
unchanged,
|
|
26604
26610
|
conflicts: []
|
|
@@ -26611,9 +26617,14 @@ async function workflowsPush(options) {
|
|
|
26611
26617
|
}
|
|
26612
26618
|
} else {
|
|
26613
26619
|
console.log();
|
|
26614
|
-
if (
|
|
26620
|
+
if (enabled.length > 0) {
|
|
26615
26621
|
clack31.log.success(
|
|
26616
|
-
pc33.green(`${
|
|
26622
|
+
pc33.green(`${enabled.length} workflow(s) pushed and enabled`)
|
|
26623
|
+
);
|
|
26624
|
+
}
|
|
26625
|
+
if (drafts.length > 0) {
|
|
26626
|
+
clack31.log.success(
|
|
26627
|
+
pc33.green(`${drafts.length} workflow(s) pushed as draft`)
|
|
26617
26628
|
);
|
|
26618
26629
|
}
|
|
26619
26630
|
if (unchanged.length > 0) {
|
|
@@ -26637,7 +26648,7 @@ async function workflowsPush(options) {
|
|
|
26637
26648
|
conflict_count: conflicts.length
|
|
26638
26649
|
});
|
|
26639
26650
|
}
|
|
26640
|
-
async function pushToAPI2(workflows, token, progress,
|
|
26651
|
+
async function pushToAPI2(workflows, token, progress, options) {
|
|
26641
26652
|
if (!token) {
|
|
26642
26653
|
progress.info(
|
|
26643
26654
|
"No API token \u2014 skipping dashboard sync. Run: wraps auth login"
|
|
@@ -26669,7 +26680,8 @@ async function pushToAPI2(workflows, token, progress, force) {
|
|
|
26669
26680
|
settings: w.transformed.settings,
|
|
26670
26681
|
defaults: w.transformed.defaults,
|
|
26671
26682
|
cliProjectPath: w.parsed.cliProjectPath,
|
|
26672
|
-
force: force ?? false
|
|
26683
|
+
force: options.force ?? false,
|
|
26684
|
+
draft: options.draft ?? false
|
|
26673
26685
|
}))
|
|
26674
26686
|
})
|
|
26675
26687
|
});
|
|
@@ -26679,7 +26691,12 @@ async function pushToAPI2(workflows, token, progress, force) {
|
|
|
26679
26691
|
results.push({ slug: c.slug, success: false, conflict: true });
|
|
26680
26692
|
}
|
|
26681
26693
|
for (const r of data.results ?? []) {
|
|
26682
|
-
results.push({
|
|
26694
|
+
results.push({
|
|
26695
|
+
slug: r.slug,
|
|
26696
|
+
id: r.id,
|
|
26697
|
+
status: r.status,
|
|
26698
|
+
success: true
|
|
26699
|
+
});
|
|
26683
26700
|
}
|
|
26684
26701
|
const successCount = data.results?.length ?? 0;
|
|
26685
26702
|
const conflictCount = data.conflicts?.length ?? 0;
|
|
@@ -26700,7 +26717,12 @@ async function pushToAPI2(workflows, token, progress, force) {
|
|
|
26700
26717
|
} else if (resp.ok) {
|
|
26701
26718
|
const data = await resp.json();
|
|
26702
26719
|
for (const r of data.results) {
|
|
26703
|
-
results.push({
|
|
26720
|
+
results.push({
|
|
26721
|
+
slug: r.slug,
|
|
26722
|
+
id: r.id,
|
|
26723
|
+
status: r.status,
|
|
26724
|
+
success: true
|
|
26725
|
+
});
|
|
26704
26726
|
}
|
|
26705
26727
|
progress.succeed(`Synced ${workflows.length} workflows to dashboard`);
|
|
26706
26728
|
} else {
|
|
@@ -26737,7 +26759,8 @@ async function pushToAPI2(workflows, token, progress, force) {
|
|
|
26737
26759
|
settings: w.transformed.settings,
|
|
26738
26760
|
defaults: w.transformed.defaults,
|
|
26739
26761
|
cliProjectPath: w.parsed.cliProjectPath,
|
|
26740
|
-
force: force ?? false
|
|
26762
|
+
force: options.force ?? false,
|
|
26763
|
+
draft: options.draft ?? false
|
|
26741
26764
|
})
|
|
26742
26765
|
});
|
|
26743
26766
|
if (Number(resp.status) === 409) {
|
|
@@ -26747,7 +26770,12 @@ async function pushToAPI2(workflows, token, progress, force) {
|
|
|
26747
26770
|
);
|
|
26748
26771
|
} else if (resp.ok) {
|
|
26749
26772
|
const data = await resp.json();
|
|
26750
|
-
results.push({
|
|
26773
|
+
results.push({
|
|
26774
|
+
slug: data.slug,
|
|
26775
|
+
id: data.id,
|
|
26776
|
+
status: data.status,
|
|
26777
|
+
success: true
|
|
26778
|
+
});
|
|
26751
26779
|
progress.succeed(`Synced ${pc33.cyan(w.slug)} to dashboard`);
|
|
26752
26780
|
} else {
|
|
26753
26781
|
const body = await resp.text();
|
|
@@ -36430,6 +36458,11 @@ args.options([
|
|
|
36430
36458
|
description: "Preview changes without pushing",
|
|
36431
36459
|
defaultValue: false
|
|
36432
36460
|
},
|
|
36461
|
+
{
|
|
36462
|
+
name: "draft",
|
|
36463
|
+
description: "Push workflow as draft without enabling it",
|
|
36464
|
+
defaultValue: false
|
|
36465
|
+
},
|
|
36433
36466
|
{
|
|
36434
36467
|
name: "name",
|
|
36435
36468
|
description: "Output file slug for generated workflow",
|
|
@@ -36916,6 +36949,7 @@ Available commands: ${pc54.cyan("init")}, ${pc54.cyan("push")}, ${pc54.cyan("pre
|
|
|
36916
36949
|
await workflowsPush({
|
|
36917
36950
|
workflow: flags.workflow,
|
|
36918
36951
|
dryRun: flags.dryRun,
|
|
36952
|
+
draft: flags.draft,
|
|
36919
36953
|
force: flags.force,
|
|
36920
36954
|
yes: flags.yes,
|
|
36921
36955
|
json: flags.json,
|