@superwall/cli 2.3.1 → 2.5.0
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/README.md +10 -0
- package/dist/{apple-z2qjOzIZ.js → apple-Dyr7OFBx.js} +17 -16
- package/dist/approve-Czs1-JO9.js +186 -0
- package/dist/{assets-DXXegdDt.js → assets-BrB9jQPQ.js} +3 -3
- package/dist/auth.d.ts +1 -1
- package/dist/auth.js +3 -3
- package/dist/{billing-B8tOjsnY.js → billing-D5qqIlVb.js} +3 -3
- package/dist/{bind-Bx9K6LwP.js → bind-B3eEcRyp.js} +4 -4
- package/dist/browser-Bp3yRKlU.js +36 -0
- package/dist/{build-Bu2kkzRe.js → build-DD9pSwHX.js} +10 -8
- package/dist/{client-DOgk9gAS.js → client-AI9H4GGB.js} +3 -3
- package/dist/{config-BO1Y87kV.js → config-CGcG7GOt.js} +9 -1
- package/dist/{create-B03MAuPe.js → create-B4m-IKlr.js} +8 -8
- package/dist/create-CJljlkJK.js +20 -0
- package/dist/{create-DzC_89gq.js → create-ChfgWpiM.js} +41 -69
- package/dist/{doctor-BGZSKY_B.js → doctor-XtXW6tKE.js} +6 -6
- package/dist/download-2Zu2I_Og.js +58 -0
- package/dist/{drivers-DqLgQxkC.js → drivers-CMEL13gp.js} +4 -4
- package/dist/entry.js +69 -33
- package/dist/{environment-i8BhiBDB.js → environment-BWT2S4qC.js} +9 -2
- package/dist/{existing-BPOG5zLO.js → existing-b0GxFcnc.js} +2 -2
- package/dist/{session-BDLQUJyV.js → git-D7AVdugb.js} +97 -335
- package/dist/held-CX7Zf8u-.js +17 -0
- package/dist/{held-C56PYMRH.js → held-D3PUNky2.js} +7 -7
- package/dist/install-CVUXsx8c.js +103 -0
- package/dist/{integrate-DZ4Qvoch.js → integrate-qvKd9pVW.js} +29 -27
- package/dist/{log-NVhVe_oe.js → log-C0MDCfA2.js} +1 -1
- package/dist/{login-p9GVEKzD.js → login-COmGHrU5.js} +2 -1
- package/dist/login-ClnJi1Ea.js +17 -0
- package/dist/{login-ONZdK8vN.js → login-PMoXUGqq.js} +9 -42
- package/dist/{lookup-flTi0at0.js → lookup-gjcKIZvh.js} +4 -3
- package/dist/{migrate-DnXpbhL1.js → migrate-SkkLLdmr.js} +33 -28
- package/dist/{migration-DJ1uNKhk.js → migration-DS44-3Zr.js} +10 -10
- package/dist/{notification-url-CCDeS5S-.js → notification-url-BjQPLf4-.js} +4 -4
- package/dist/{open-QdsZ_N47.js → open-DQpm2yVs.js} +2 -2
- package/dist/{org-BiFPjoHD.js → org-C04eAO-j.js} +3 -2
- package/dist/organization-BOECL3vZ.js +39 -0
- package/dist/orgs-D6Kk96mG.js +81 -0
- package/dist/{paths-yRgm5Jpa.js → paths-REb-GrbX.js} +2 -2
- package/dist/{playbook-B-pRKNa4.js → playbook-Du4Oydbf.js} +11 -11
- package/dist/{products-DH_fK9tY.js → products-Cqq59DBQ.js} +1 -1
- package/dist/project-CP6hiHra.js +47 -0
- package/dist/{promote-Djzk4C81.js → promote-Dm2_b1WK.js} +24 -19
- package/dist/pull-DsdOoG-D.js +36 -0
- package/dist/{pull-BLA9XwHj.js → pull-F6pvO4To.js} +9 -28
- package/dist/pull-zYAbqo9n.js +106 -0
- package/dist/{push-gSBxGDik.js → push-BIFLhAiO.js} +9 -7
- package/dist/push-CJVfvFZq.js +29 -0
- package/dist/push-D_l9KJZN.js +290 -0
- package/dist/push-SVzv7fzE.js +22 -0
- package/dist/{registry-D3xmWk9p.js → registry-DIJB0mJa.js} +890 -158
- package/dist/resolve--GsHj0Q1.js +171 -0
- package/dist/{resources-BTnczJCA.js → resources-BaP3p_LY.js} +3 -80
- package/dist/{run-C1SoizcJ.js → run-C5OPwhvS.js} +2 -2
- package/dist/run-CgLmD2vR.js +1345 -0
- package/dist/{scan-Dwk_lT5q.js → scan-Bj5y0zTZ.js} +1 -1
- package/dist/scan-v_WTE722.js +4 -0
- package/dist/{scope-Db7blD-l.js → scope-Bp_zwJOo.js} +6 -5
- package/dist/scope-CCb_7UvN.js +89 -0
- package/dist/sdk-TvT0p_nO.js +71 -0
- package/dist/selection-BltBpyp5.js +179 -0
- package/dist/series-TAixFBWW.js +685 -0
- package/dist/{server-Cb2N75JL.js → server-CdVIboQn.js} +10 -8
- package/dist/server-CvJVusw3.js +29 -0
- package/dist/session-B8JNXkwN.js +6 -0
- package/dist/session-D3fgXQBt.js +219 -0
- package/dist/{session-CnDJp_HO.js → session-Ywim-P8M.js} +1 -1
- package/dist/{setup-BLahHpgy.js → setup-zzjtTy8k.js} +9 -8
- package/dist/skills/index.json +5 -0
- package/dist/skills/superwall/SKILL.md +48 -30
- package/dist/skills/superwall/references/api.md +3 -2
- package/dist/skills/superwall-editor/SKILL.md +7 -5
- package/dist/skills/superwall-framework/SKILL.md +11 -8
- package/dist/skills/superwall-framework/references/onboarding-state.md +21 -14
- package/dist/skills/superwall-workspaces/SKILL.md +313 -0
- package/dist/skills/superwall-workspaces/references/cli.md +174 -0
- package/dist/skills/superwall-workspaces/references/slots.md +103 -0
- package/dist/{skills-zebMTZyr.js → skills-2qYaUXGE.js} +15 -9
- package/dist/skills-8um2fBPS.js +14 -0
- package/dist/{source-push-DxuJuwEf.js → source-push-kAep4gPe.js} +6 -5
- package/dist/{spinner-BN3U1CVB.js → spinner-BANVLncC.js} +17 -5
- package/dist/starter-CiLrp1cN.js +190 -0
- package/dist/status-CoYMK7QL.js +139 -0
- package/dist/{storage-VagEaaJC.js → storage-DzP22xKn.js} +1 -1
- package/dist/storekit-D5eopLM0.js +17 -0
- package/dist/{storekit-CoOf4Rvh.js → storekit-n1x0bWkQ.js} +4 -4
- package/dist/{telemetry-CM0BDwCK.js → telemetry-CXN6f-ZX.js} +2 -2
- package/dist/{token-lUUOkTJA.js → token-FmeHywYt.js} +1 -1
- package/dist/tools-skills/superwall/SKILL.md +49 -31
- package/dist/tools-skills/superwall/references/api.md +3 -2
- package/dist/tools-skills/superwall-editor/SKILL.md +7 -5
- package/dist/tools.d.ts +1 -1
- package/dist/tools.js +575 -75
- package/dist/try-BWbzgelb.js +120 -0
- package/dist/{selection-u2KiKu_d.js → types-JdxmnCko.js} +1 -178
- package/dist/upgrade-Bk5boOgW.js +206 -0
- package/dist/upgrade-CoWCEnoi.js +7 -0
- package/package.json +5 -3
- package/prompts/commandments.xml +2 -0
- package/dist/create-BdZS_T68.js +0 -19
- package/dist/held-DSNUY-NZ.js +0 -16
- package/dist/login-Blrkm6oi.js +0 -16
- package/dist/push-BkMgOT6X.js +0 -24
- package/dist/scan-Kp-MAutK.js +0 -4
- package/dist/server-psYghr9K.js +0 -24
- package/dist/session-CehHJWZk.js +0 -6
- package/dist/skills-DDV4zcLR.js +0 -14
- package/dist/storekit-BcBb2jXB.js +0 -16
- package/dist/upgrade-CpTJv_M7.js +0 -7
- package/dist/upgrade-DZbKb67W.js +0 -117
- /package/dist/{client-BZ1UbpXz.js → client-BJQXl62Q.js} +0 -0
- /package/dist/{devtools-pBl_vt03.js → devtools-ByZ6XYnn.js} +0 -0
- /package/dist/{input-vi0bou04.js → input-MDd67UIp.js} +0 -0
- /package/dist/{reports-CwwKLUh0.js → reports-CuhB1_ub.js} +0 -0
- /package/dist/{screenshot-file-tVBfUEIi.js → screenshot-file-XAS0Xy0e.js} +0 -0
- /package/dist/{storage-gRyQetN9.d.ts → storage-BjQCiTuz.d.ts} +0 -0
- /package/dist/{timing-BVxPrYq3.js → timing-Ca0TXY-A.js} +0 -0
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import { a as stripAnsi, l as readJson, o as cache, r as formatJson, t as blocks } from "./output-Ggzq5_-t.js";
|
|
2
|
-
import {
|
|
3
|
-
import { n as readSession } from "./storage-
|
|
4
|
-
import { a as withQuery$1, t as ApiError } from "./client-
|
|
5
|
-
import { C as listKeySources, S as listBundleIdSuggestions, T as replaceRevenueProvider, _ as checkServerNotifications, b as importAppKey, c as resolveAscOrgApi, d as runAscDocs, f as parseParams, h as REVENUE_INTEGRATIONS, i as savedKey, l as resolveAscTeam, m as KEY_LABEL, n as testModeWarning, p as KEY_KINDS, r as chooseKeyApp, t as upsertHeldKey, u as sendAscRequest, v as copyAppKey, w as removeAppKey, x as keyKind, y as findIntegrations } from "./held-
|
|
6
|
-
import {
|
|
7
|
-
import { a as defineCommand, d as readInput, i as defineCatalog, r as UsageError, t as apiCall } from "./spinner-
|
|
2
|
+
import { o as AUTO_UPDATE_TARGET, s as CHANNEL, t as API_HOST, v as TELEMETRY_HOST, w as detectAgent, x as VERSION, y as TELEMETRY_KEY } from "./environment-BWT2S4qC.js";
|
|
3
|
+
import { n as readSession } from "./storage-DzP22xKn.js";
|
|
4
|
+
import { a as withQuery$1, t as ApiError } from "./client-AI9H4GGB.js";
|
|
5
|
+
import { C as listKeySources, S as listBundleIdSuggestions, T as replaceRevenueProvider, _ as checkServerNotifications, b as importAppKey, c as resolveAscOrgApi, d as runAscDocs, f as parseParams, h as REVENUE_INTEGRATIONS, i as savedKey, l as resolveAscTeam, m as KEY_LABEL, n as testModeWarning, p as KEY_KINDS, r as chooseKeyApp, t as upsertHeldKey, u as sendAscRequest, v as copyAppKey, w as removeAppKey, x as keyKind, y as findIntegrations } from "./held-D3PUNky2.js";
|
|
6
|
+
import { f as writeDefaultApp, i as readOnboardedApp, r as readDefaultApp, t as readAnonymousId } from "./config-CGcG7GOt.js";
|
|
7
|
+
import { a as defineCommand, d as readInput, i as defineCatalog, r as UsageError, t as apiCall } from "./spinner-BANVLncC.js";
|
|
8
8
|
import { n as fg, t as THEME } from "./theme-DUsCh-Vd.js";
|
|
9
|
-
import { n as runWhoami } from "./session-
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { n as
|
|
13
|
-
import {
|
|
14
|
-
import { a as
|
|
15
|
-
import {
|
|
16
|
-
import { n as
|
|
17
|
-
import {
|
|
18
|
-
import { t as
|
|
9
|
+
import { n as runWhoami } from "./session-Ywim-P8M.js";
|
|
10
|
+
import { i as orgIdOf, t as listOrgGroups } from "./orgs-D6Kk96mG.js";
|
|
11
|
+
import { M as textField, O as field, T as rowName, a as createEntitlement, c as createProject, h as listResource, i as createCampaign, j as parseJson, k as isRecord, m as listProjects, r as createApplication, s as createProduct, t as RESOURCES, u as isAppScoped, y as platformLabel } from "./resources-BaP3p_LY.js";
|
|
12
|
+
import { n as orgForNewProject } from "./org-C04eAO-j.js";
|
|
13
|
+
import { i as parseDashboardUrl, n as findApplication, r as findProject, t as appNotFound } from "./lookup-gjcKIZvh.js";
|
|
14
|
+
import { a as pickScope, i as pickProject, n as chooseApp, r as pickOrganization, t as boundOrganization } from "./scope-Bp_zwJOo.js";
|
|
15
|
+
import { a as listAscConfigs, i as findAppNotificationUrl, o as removeAscConfig, t as ascProxy } from "./client-BJQXl62Q.js";
|
|
16
|
+
import { i as listUnimportedAscProducts, n as findAscAppId, r as listAscApps, t as ascTypeDisplay } from "./products-Cqq59DBQ.js";
|
|
17
|
+
import { n as readResourceFlags, r as textOf, t as fieldName } from "./input-MDd67UIp.js";
|
|
18
|
+
import { a as runAscNotificationUrlSet, i as printServerNotifications, t as describeNotificationUrl } from "./notification-url-BjQPLf4-.js";
|
|
19
|
+
import { t as platformForIntegration } from "./bind-B3eEcRyp.js";
|
|
19
20
|
import pc from "picocolors";
|
|
20
21
|
|
|
21
22
|
//#region src/ui/help-layout.ts
|
|
@@ -142,7 +143,7 @@ const command = defineCommand({
|
|
|
142
143
|
prompts: true,
|
|
143
144
|
mcp: false,
|
|
144
145
|
async run(ctx, input) {
|
|
145
|
-
const { runLogin } = await import("./login-
|
|
146
|
+
const { runLogin } = await import("./login-ClnJi1Ea.js");
|
|
146
147
|
return runLogin(ctx, input);
|
|
147
148
|
}
|
|
148
149
|
});
|
|
@@ -158,7 +159,7 @@ const command$1 = defineCommand({
|
|
|
158
159
|
prompts: true,
|
|
159
160
|
mcp: false,
|
|
160
161
|
async run(ctx) {
|
|
161
|
-
const { runLogout } = await import("./session-
|
|
162
|
+
const { runLogout } = await import("./session-B8JNXkwN.js");
|
|
162
163
|
return runLogout(ctx);
|
|
163
164
|
}
|
|
164
165
|
});
|
|
@@ -218,6 +219,16 @@ const team = {
|
|
|
218
219
|
value: "id",
|
|
219
220
|
describe: "The Apple team, when your organization has several"
|
|
220
221
|
};
|
|
222
|
+
const workspace = {
|
|
223
|
+
type: "string",
|
|
224
|
+
value: "workspace",
|
|
225
|
+
describe: "The workspace: an id, or a slug with --org (default: this project's)"
|
|
226
|
+
};
|
|
227
|
+
const projectDir = {
|
|
228
|
+
type: "string",
|
|
229
|
+
value: "path",
|
|
230
|
+
describe: "The workspace project (default: cwd)"
|
|
231
|
+
};
|
|
221
232
|
|
|
222
233
|
//#endregion
|
|
223
234
|
//#region src/core/analytics/query.ts
|
|
@@ -372,13 +383,13 @@ function fieldsOf(schema, depth = 0) {
|
|
|
372
383
|
const object = objectOf$1(schema);
|
|
373
384
|
if (!object?.properties || depth >= MAX_DEPTH$1) return void 0;
|
|
374
385
|
const required = new Set(object.required ?? []);
|
|
375
|
-
return Object.entries(object.properties).map(([name, field]) => {
|
|
376
|
-
const nested = fieldsOf(field, depth + 1);
|
|
386
|
+
return Object.entries(object.properties).map(([name, field$1]) => {
|
|
387
|
+
const nested = fieldsOf(field$1, depth + 1);
|
|
377
388
|
return {
|
|
378
389
|
name,
|
|
379
|
-
type: typeOf(field),
|
|
390
|
+
type: typeOf(field$1),
|
|
380
391
|
required: required.has(name),
|
|
381
|
-
...field.description ? { description: oneLine(field.description) } : {},
|
|
392
|
+
...field$1.description ? { description: oneLine(field$1.description) } : {},
|
|
382
393
|
...nested ? { fields: nested } : {}
|
|
383
394
|
};
|
|
384
395
|
});
|
|
@@ -510,8 +521,8 @@ function findOperations(index, path, method) {
|
|
|
510
521
|
}
|
|
511
522
|
const line = (op$1) => `${op$1.method.padEnd(6)} ${op$1.path} — ${op$1.summary}`;
|
|
512
523
|
function renderFields(fields, indent = " ") {
|
|
513
|
-
return fields.flatMap((field) => {
|
|
514
|
-
return [`${indent}${field.name}${field.required ? "" : "?"}: ${field.type}${field.description ? ` — ${field.description}` : ""}`, ...renderFields(field.fields ?? [], `${indent} `)];
|
|
524
|
+
return fields.flatMap((field$1) => {
|
|
525
|
+
return [`${indent}${field$1.name}${field$1.required ? "" : "?"}: ${field$1.type}${field$1.description ? ` — ${field$1.description}` : ""}`, ...renderFields(field$1.fields ?? [], `${indent} `)];
|
|
515
526
|
});
|
|
516
527
|
}
|
|
517
528
|
function renderOperation(op$1) {
|
|
@@ -1156,8 +1167,8 @@ const SEARCHED_FIELDS = [
|
|
|
1156
1167
|
];
|
|
1157
1168
|
function rowMatches(row, query) {
|
|
1158
1169
|
const needle = query.toLowerCase();
|
|
1159
|
-
return Object.entries(row).some(([field, value$1]) => {
|
|
1160
|
-
return SEARCHED_FIELDS.includes(field) && (typeof value$1 === "string" || typeof value$1 === "number") && String(value$1).toLowerCase().includes(needle);
|
|
1170
|
+
return Object.entries(row).some(([field$1, value$1]) => {
|
|
1171
|
+
return SEARCHED_FIELDS.includes(field$1) && (typeof value$1 === "string" || typeof value$1 === "number") && String(value$1).toLowerCase().includes(needle);
|
|
1161
1172
|
});
|
|
1162
1173
|
}
|
|
1163
1174
|
function matchingProjects(projects, query) {
|
|
@@ -1197,14 +1208,14 @@ function renderObject(value$1, indent = "", depth = 0) {
|
|
|
1197
1208
|
const width = Math.max(0, ...keys.map((key) => key.length)) + 2;
|
|
1198
1209
|
const out = [];
|
|
1199
1210
|
for (const key of keys) {
|
|
1200
|
-
const field = value$1[key];
|
|
1211
|
+
const field$1 = value$1[key];
|
|
1201
1212
|
const label = `${indent}${pc.dim(key.padEnd(width))}`;
|
|
1202
|
-
if (isScalar(field)) out.push(`${label}${scalar(field)}`);
|
|
1203
|
-
else if (Array.isArray(field)) out.push(...renderArray(label, field, indent, depth));
|
|
1204
|
-
else if (isRecord(field) && depth >= MAX_DEPTH) out.push(`${label}${pc.dim(`{ ${Object.keys(field).length} fields }`)}`);
|
|
1205
|
-
else if (isRecord(field)) {
|
|
1213
|
+
if (isScalar(field$1)) out.push(`${label}${scalar(field$1)}`);
|
|
1214
|
+
else if (Array.isArray(field$1)) out.push(...renderArray(label, field$1, indent, depth));
|
|
1215
|
+
else if (isRecord(field$1) && depth >= MAX_DEPTH) out.push(`${label}${pc.dim(`{ ${Object.keys(field$1).length} fields }`)}`);
|
|
1216
|
+
else if (isRecord(field$1)) {
|
|
1206
1217
|
out.push(`${indent}${pc.dim(key)}`);
|
|
1207
|
-
out.push(...renderObject(field, `${indent} `, depth + 1));
|
|
1218
|
+
out.push(...renderObject(field$1, `${indent} `, depth + 1));
|
|
1208
1219
|
}
|
|
1209
1220
|
}
|
|
1210
1221
|
return out;
|
|
@@ -1452,21 +1463,21 @@ function parseFlag(key, flag$1, raw) {
|
|
|
1452
1463
|
}
|
|
1453
1464
|
return parseChoice(key, flag$1, text);
|
|
1454
1465
|
}
|
|
1455
|
-
function parseArg(command$
|
|
1466
|
+
function parseArg(command$82, arg, word) {
|
|
1456
1467
|
if (word === void 0 || !arg.choices) return word;
|
|
1457
1468
|
const found = arg.choices.find((choice) => choice.toLowerCase() === word.toLowerCase());
|
|
1458
|
-
if (!found) throw new UsageError(`${command$
|
|
1469
|
+
if (!found) throw new UsageError(`${command$82} takes <${arg.name}> as one of: ${arg.choices.join(", ")} (not "${word}").`);
|
|
1459
1470
|
return found;
|
|
1460
1471
|
}
|
|
1461
|
-
function parseInput(command$
|
|
1472
|
+
function parseInput(command$82, operation, words, raw) {
|
|
1462
1473
|
const specs = operation.flags ?? {};
|
|
1463
|
-
for (const key of Object.keys(raw)) if (!(key in specs) && !(key in COMMON_FLAGS)) throw new UsageError(`${command$
|
|
1474
|
+
for (const key of Object.keys(raw)) if (!(key in specs) && !(key in COMMON_FLAGS)) throw new UsageError(`${command$82} has no --${kebab(key)}. Run superwall ${command$82} --help for its flags.`);
|
|
1464
1475
|
const flags = Object.fromEntries(Object.entries(specs).map(([key, flag$1]) => [key, parseFlag(key, flag$1, raw[key])]));
|
|
1465
|
-
for (const [key, flag$1] of Object.entries(specs)) if (flag$1.required && flags[key] === void 0) throw new UsageError(`${command$
|
|
1476
|
+
for (const [key, flag$1] of Object.entries(specs)) if (flag$1.required && flags[key] === void 0) throw new UsageError(`${command$82} needs --${kebab(key)}.`);
|
|
1466
1477
|
const specArgs = operation.args ?? [];
|
|
1467
|
-
if (words.length > specArgs.length) throw new UsageError(`${command$
|
|
1468
|
-
const args = Object.fromEntries(specArgs.map((arg, index) => [arg.name, parseArg(command$
|
|
1469
|
-
for (const arg of specArgs) if (arg.required && args[arg.name] === void 0) throw new UsageError(`${command$
|
|
1478
|
+
if (words.length > specArgs.length) throw new UsageError(`${command$82} doesn't take "${words.slice(specArgs.length).join(" ")}".`);
|
|
1479
|
+
const args = Object.fromEntries(specArgs.map((arg, index) => [arg.name, parseArg(command$82, arg, words[index])]));
|
|
1480
|
+
for (const arg of specArgs) if (arg.required && args[arg.name] === void 0) throw new UsageError(`${command$82} needs <${arg.name}>.`);
|
|
1470
1481
|
return {
|
|
1471
1482
|
args,
|
|
1472
1483
|
flags,
|
|
@@ -2758,7 +2769,7 @@ async function resolveDeliveryState(session, path) {
|
|
|
2758
2769
|
async function runScreenshotsUpload(session, input) {
|
|
2759
2770
|
const { kind, id: id$1 } = resolveTarget(input, PRICED);
|
|
2760
2771
|
const spec = SCREENSHOT[kind];
|
|
2761
|
-
const { readScreenshotFile } = await import("./screenshot-file-
|
|
2772
|
+
const { readScreenshotFile } = await import("./screenshot-file-XAS0Xy0e.js");
|
|
2762
2773
|
const file = readScreenshotFile(argOf(input, "file"));
|
|
2763
2774
|
const existing = await selectScreenshot(session, kind, id$1);
|
|
2764
2775
|
if (existing) await session.send("delete", `${spec.path}/${existing.id}`);
|
|
@@ -3469,7 +3480,7 @@ A purchase_key is for the app's bundle ID; an app with none gets --bundle-id sav
|
|
|
3469
3480
|
prompts: true,
|
|
3470
3481
|
mcp: false,
|
|
3471
3482
|
async run(ctx, input) {
|
|
3472
|
-
const { runAscKeysCreate } = await import("./create-
|
|
3483
|
+
const { runAscKeysCreate } = await import("./create-CJljlkJK.js");
|
|
3473
3484
|
return runAscKeysCreate(ctx, input);
|
|
3474
3485
|
}
|
|
3475
3486
|
});
|
|
@@ -3856,7 +3867,7 @@ With --app it saves the key you hold on that app instead, as asc keys create --k
|
|
|
3856
3867
|
prompts: true,
|
|
3857
3868
|
mcp: false,
|
|
3858
3869
|
async run(ctx, { args, flags }) {
|
|
3859
|
-
const { upsertHeldKey: upsertHeldKey$1 } = await import("./held-
|
|
3870
|
+
const { upsertHeldKey: upsertHeldKey$1 } = await import("./held-CX7Zf8u-.js");
|
|
3860
3871
|
return upsertHeldKey$1(ctx, {
|
|
3861
3872
|
action: "update",
|
|
3862
3873
|
key: {
|
|
@@ -5108,7 +5119,7 @@ Exit codes
|
|
|
5108
5119
|
prompts: true,
|
|
5109
5120
|
mcp: false,
|
|
5110
5121
|
async run(ctx, input) {
|
|
5111
|
-
const { runSetupApple } = await import("./apple-
|
|
5122
|
+
const { runSetupApple } = await import("./apple-Dyr7OFBx.js");
|
|
5112
5123
|
return runSetupApple(ctx, input);
|
|
5113
5124
|
}
|
|
5114
5125
|
});
|
|
@@ -6270,9 +6281,9 @@ function buildSelector(input) {
|
|
|
6270
6281
|
selector.conditions = conditions;
|
|
6271
6282
|
}
|
|
6272
6283
|
if (input.orderBy) {
|
|
6273
|
-
const [field, dir] = input.orderBy.split(":");
|
|
6284
|
+
const [field$1, dir] = input.orderBy.split(":");
|
|
6274
6285
|
selector.orderBy = [{
|
|
6275
|
-
field,
|
|
6286
|
+
field: field$1,
|
|
6276
6287
|
sortOrder: (dir ?? "asc").toLowerCase().startsWith("desc") ? "DESCENDING" : "ASCENDING"
|
|
6277
6288
|
}];
|
|
6278
6289
|
}
|
|
@@ -6622,9 +6633,9 @@ function describeAppleError(error, request) {
|
|
|
6622
6633
|
const apple = isRecord(parsed.error) && Array.isArray(parsed.error.errors) ? parsed.error.errors : void 0;
|
|
6623
6634
|
if (!apple || apple.length === 0) return void 0;
|
|
6624
6635
|
const lines = apple.filter(isRecord).map((e) => {
|
|
6625
|
-
const field = typeof e.field === "string" && e.field ? `${e.field}: ` : "";
|
|
6636
|
+
const field$1 = typeof e.field === "string" && e.field ? `${e.field}: ` : "";
|
|
6626
6637
|
const code = typeof e.messageCode === "string" && e.messageCode ? ` (${e.messageCode})` : "";
|
|
6627
|
-
return ` • ${field}${String(e.message ?? "")}${code}`;
|
|
6638
|
+
return ` • ${field$1}${String(e.message ?? "")}${code}`;
|
|
6628
6639
|
});
|
|
6629
6640
|
return /* @__PURE__ */ new Error(`Apple Search Ads rejected ${request} (${error.status}):\n${lines.join("\n")}`);
|
|
6630
6641
|
}
|
|
@@ -7739,7 +7750,7 @@ const command$45 = defineCommand({
|
|
|
7739
7750
|
prompts: true,
|
|
7740
7751
|
mcp: false,
|
|
7741
7752
|
async run(ctx, { args, flags }) {
|
|
7742
|
-
const { runBuildPipeline } = await import("./build-
|
|
7753
|
+
const { runBuildPipeline } = await import("./build-DD9pSwHX.js");
|
|
7743
7754
|
await runBuildPipeline({
|
|
7744
7755
|
output: ctx.output,
|
|
7745
7756
|
json: ctx.json
|
|
@@ -7800,7 +7811,7 @@ const command$46 = defineCommand({
|
|
|
7800
7811
|
prompts: true,
|
|
7801
7812
|
mcp: false,
|
|
7802
7813
|
async run(ctx, { args, flags }) {
|
|
7803
|
-
const { runCreate } = await import("./create-
|
|
7814
|
+
const { runCreate } = await import("./create-ChfgWpiM.js");
|
|
7804
7815
|
return runCreate(ctx, {
|
|
7805
7816
|
dir: args.dir,
|
|
7806
7817
|
...flags
|
|
@@ -7843,7 +7854,7 @@ const command$47 = defineCommand({
|
|
|
7843
7854
|
prompts: true,
|
|
7844
7855
|
mcp: false,
|
|
7845
7856
|
async run(ctx, { args, flags }) {
|
|
7846
|
-
const { runStudio } = await import("./server-
|
|
7857
|
+
const { runStudio } = await import("./server-CvJVusw3.js");
|
|
7847
7858
|
await runStudio({
|
|
7848
7859
|
dirs: args.dir,
|
|
7849
7860
|
port: flags.port,
|
|
@@ -7883,7 +7894,7 @@ const command$48 = defineCommand({
|
|
|
7883
7894
|
prompts: true,
|
|
7884
7895
|
mcp: false,
|
|
7885
7896
|
async run(ctx, input) {
|
|
7886
|
-
const { runPromote } = await import("./promote-
|
|
7897
|
+
const { runPromote } = await import("./promote-Dm2_b1WK.js");
|
|
7887
7898
|
return runPromote(ctx, input);
|
|
7888
7899
|
}
|
|
7889
7900
|
});
|
|
@@ -7927,7 +7938,7 @@ const command$49 = defineCommand({
|
|
|
7927
7938
|
prompts: true,
|
|
7928
7939
|
mcp: false,
|
|
7929
7940
|
async run(ctx, input) {
|
|
7930
|
-
const { runPush } = await import("./push-
|
|
7941
|
+
const { runPush } = await import("./push-CJVfvFZq.js");
|
|
7931
7942
|
return runPush(ctx, input, true);
|
|
7932
7943
|
}
|
|
7933
7944
|
});
|
|
@@ -7963,7 +7974,7 @@ const command$50 = defineCommand({
|
|
|
7963
7974
|
prompts: true,
|
|
7964
7975
|
mcp: false,
|
|
7965
7976
|
async run(ctx, input) {
|
|
7966
|
-
const { runPull } = await import("./pull-
|
|
7977
|
+
const { runPull } = await import("./pull-DsdOoG-D.js");
|
|
7967
7978
|
return runPull(ctx, input);
|
|
7968
7979
|
}
|
|
7969
7980
|
});
|
|
@@ -8007,7 +8018,7 @@ const command$51 = defineCommand({
|
|
|
8007
8018
|
prompts: true,
|
|
8008
8019
|
mcp: false,
|
|
8009
8020
|
async run(ctx, input) {
|
|
8010
|
-
const { runPush } = await import("./push-
|
|
8021
|
+
const { runPush } = await import("./push-CJVfvFZq.js");
|
|
8011
8022
|
return runPush(ctx, input, false);
|
|
8012
8023
|
}
|
|
8013
8024
|
});
|
|
@@ -8055,13 +8066,13 @@ function scopeFields(op$1, spec) {
|
|
|
8055
8066
|
}] : [];
|
|
8056
8067
|
});
|
|
8057
8068
|
if (op$1.method === "GET" || op$1.method === "DELETE") return query;
|
|
8058
|
-
const body = (spec?.body ?? []).flatMap((field) => {
|
|
8059
|
-
const kind = SCOPE_PARAMS[field.name];
|
|
8060
|
-
return kind && (field.required || op$1.method === "POST") ? [{
|
|
8069
|
+
const body = (spec?.body ?? []).flatMap((field$1) => {
|
|
8070
|
+
const kind = SCOPE_PARAMS[field$1.name];
|
|
8071
|
+
return kind && (field$1.required || op$1.method === "POST") ? [{
|
|
8061
8072
|
location: "body",
|
|
8062
|
-
name: field.name,
|
|
8073
|
+
name: field$1.name,
|
|
8063
8074
|
kind,
|
|
8064
|
-
type: field.type
|
|
8075
|
+
type: field$1.type
|
|
8065
8076
|
}] : [];
|
|
8066
8077
|
});
|
|
8067
8078
|
return [...query, ...body];
|
|
@@ -8124,7 +8135,7 @@ function resourceHelp(resource) {
|
|
|
8124
8135
|
})),
|
|
8125
8136
|
{
|
|
8126
8137
|
title: "Related",
|
|
8127
|
-
lines: table((resource.related ?? []).map(([command$
|
|
8138
|
+
lines: table((resource.related ?? []).map(([command$82, text]) => [`superwall ${command$82}`, pc.dim(text)]), ([left]) => left.length)
|
|
8128
8139
|
},
|
|
8129
8140
|
{
|
|
8130
8141
|
title: "Examples",
|
|
@@ -8135,12 +8146,12 @@ function resourceHelp(resource) {
|
|
|
8135
8146
|
});
|
|
8136
8147
|
}
|
|
8137
8148
|
function formatFieldRows(fields) {
|
|
8138
|
-
return fields.map((field) => {
|
|
8139
|
-
const flag$1 = `--${field.name.replace(/_/g, "-")}`;
|
|
8140
|
-
const bare = field.type.replace(/\s*\|\s*null\b/g, "").trim();
|
|
8149
|
+
return fields.map((field$1) => {
|
|
8150
|
+
const flag$1 = `--${field$1.name.replace(/_/g, "-")}`;
|
|
8151
|
+
const bare = field$1.type.replace(/\s*\|\s*null\b/g, "").trim();
|
|
8141
8152
|
const type = bare === "boolean" ? "" : ` ${pc.dim(`<${bare.length > 24 ? `${bare.slice(0, 23)}…` : bare}>`)}`;
|
|
8142
|
-
const required = field.required ? `${pc.yellow("required")} ` : "";
|
|
8143
|
-
return [`${cmd(flag$1)}${type}`, `${required}${field.description ?? ""}`];
|
|
8153
|
+
const required = field$1.required ? `${pc.yellow("required")} ` : "";
|
|
8154
|
+
return [`${cmd(flag$1)}${type}`, `${required}${field$1.description ?? ""}`];
|
|
8144
8155
|
});
|
|
8145
8156
|
}
|
|
8146
8157
|
async function operationHelp(owner, resource, op$1) {
|
|
@@ -8158,7 +8169,7 @@ async function operationHelp(owner, resource, op$1) {
|
|
|
8158
8169
|
"ending_before",
|
|
8159
8170
|
"iterator"
|
|
8160
8171
|
].includes(param.name) && !typed.has(param.name) && !SCOPE_PARAMS[param.name]);
|
|
8161
|
-
const body = (spec?.body ?? []).filter((field) => !SCOPE_PARAMS[field.name]);
|
|
8172
|
+
const body = (spec?.body ?? []).filter((field$1) => !SCOPE_PARAMS[field$1.name]);
|
|
8162
8173
|
flagRows.push(...formatFieldRows(params), ...formatFieldRows(body));
|
|
8163
8174
|
flagRows.push(...(op$1.flags ?? []).map(([flag$1, text]) => [cmd(flag$1), text]));
|
|
8164
8175
|
}
|
|
@@ -8270,7 +8281,7 @@ async function findAppView(ctx, ref) {
|
|
|
8270
8281
|
}
|
|
8271
8282
|
const ok = (text) => `${pc.green("✓")} ${text}`;
|
|
8272
8283
|
const missing = (text, fix) => `${pc.red("✗")} ${text}${fix ? ` ${pc.dim(fix)}` : ""}`;
|
|
8273
|
-
const value = (field) => field === null || field === void 0 || field === "" ? pc.dim("—") : String(field);
|
|
8284
|
+
const value = (field$1) => field$1 === null || field$1 === void 0 || field$1 === "" ? pc.dim("—") : String(field$1);
|
|
8274
8285
|
function section(title, rows) {
|
|
8275
8286
|
const shown = rows.filter(([, text]) => text !== "");
|
|
8276
8287
|
if (shown.length === 0) return [];
|
|
@@ -8402,7 +8413,7 @@ async function createApp(context, api, nameArg, fields) {
|
|
|
8402
8413
|
let name = nameArg;
|
|
8403
8414
|
let platform = textOf(fields.platform);
|
|
8404
8415
|
if (interactive && (!name || !platform)) {
|
|
8405
|
-
const { scanProject } = await import("./scan-
|
|
8416
|
+
const { scanProject } = await import("./scan-v_WTE722.js");
|
|
8406
8417
|
const detected = (await scanProject(context.installDir).catch(() => null))?.apps[0];
|
|
8407
8418
|
if (detected && !name && !platform) {
|
|
8408
8419
|
ui.info(`Detected \`${detected.framework.name}\`` + (detected.details ? ` · \`${detected.details}\`` : ""));
|
|
@@ -8712,7 +8723,7 @@ async function runResource(ctx, resource, action, value$1, value2, flags) {
|
|
|
8712
8723
|
if (action === "create") return create(ctx, ctx.api, resource, value$1, value2, flags);
|
|
8713
8724
|
if (action === "use" && resource === "apps") return useApp(ctx, ctx.api, value$1);
|
|
8714
8725
|
if (action === "storekit" && resource === "products") {
|
|
8715
|
-
const { writeStoreKit } = await import("./storekit-
|
|
8726
|
+
const { writeStoreKit } = await import("./storekit-D5eopLM0.js");
|
|
8716
8727
|
return writeStoreKit(ctx, ctx.api, flags.fields.out);
|
|
8717
8728
|
}
|
|
8718
8729
|
throw new Error(`Unknown action "${action}" for ${resource}.`);
|
|
@@ -8724,17 +8735,17 @@ async function runOperation(ctx, owner, resource, op$1, args, flags) {
|
|
|
8724
8735
|
if (!handler) throw new Error(`${name} has no handler "${op$1.handler}".`);
|
|
8725
8736
|
return handler(ctx, resource, op$1, args, flags);
|
|
8726
8737
|
}
|
|
8727
|
-
const toFlag = (field) => `--${field.replace(/_/g, "-")}`;
|
|
8738
|
+
const toFlag = (field$1) => `--${field$1.replace(/_/g, "-")}`;
|
|
8728
8739
|
async function callOperation(context, owner, resource, op$1, ids, flags, merged = {}) {
|
|
8729
|
-
const command$
|
|
8740
|
+
const command$82 = `superwall ${owner === resource ? "" : `${owner.name} `}${resource.name} ${op$1.name}`;
|
|
8730
8741
|
const { method, path: template } = op$1;
|
|
8731
|
-
if (!method || !template) throw new Error(`${command$
|
|
8742
|
+
if (!method || !template) throw new Error(`${command$82} has no API endpoint.`);
|
|
8732
8743
|
const spec = await apiCall(context, "Loading the API reference", () => findSpec(op$1));
|
|
8733
8744
|
const args = [...ids];
|
|
8734
8745
|
const ctx = owner.appArg && args[0] && !context.target.app ? withApp(context, args.shift()) : context;
|
|
8735
8746
|
const positional = positionalParams(op$1);
|
|
8736
|
-
if (args.length < positional.length) throw new Error(`Usage: ${command$
|
|
8737
|
-
if (args.length > positional.length) throw new Error(`${command$
|
|
8747
|
+
if (args.length < positional.length) throw new Error(`Usage: ${command$82} ${usageOf(owner, op$1)}\nRun \`${command$82} --help\` for its flags.`);
|
|
8748
|
+
if (args.length > positional.length) throw new Error(`${command$82} takes ${positional.length || "no"} argument${positional.length === 1 ? "" : "s"}; got "${args.slice(positional.length).join(" ")}".`);
|
|
8738
8749
|
const pathValues = /* @__PURE__ */ new Map();
|
|
8739
8750
|
const query = {};
|
|
8740
8751
|
const queryNames = new Set(spec?.params.filter((param) => param.in === "query").map((param) => param.name));
|
|
@@ -8745,16 +8756,16 @@ async function callOperation(context, owner, resource, op$1, ids, flags, merged
|
|
|
8745
8756
|
else pathValues.set(param, value$1);
|
|
8746
8757
|
}
|
|
8747
8758
|
const body = {};
|
|
8748
|
-
const bodyFields = new Map((spec?.body ?? []).map((field) => [field.name, field]));
|
|
8759
|
+
const bodyFields = new Map((spec?.body ?? []).map((field$1) => [field$1.name, field$1]));
|
|
8749
8760
|
const sendsBody = method !== "GET" && method !== "DELETE";
|
|
8750
8761
|
for (const [flag$1, raw] of Object.entries(flags.fields)) {
|
|
8751
|
-
const field = fieldName(flag$1);
|
|
8752
|
-
const queryParam = spec?.params.find((param) => param.in === "query" && param.name === field);
|
|
8753
|
-
const bodyField = bodyFields.get(field);
|
|
8754
|
-
if (queryParam) query[field] = coerce(raw, queryParam.type);
|
|
8755
|
-
else if (bodyField) body[field] = coerce(raw, bodyField.type);
|
|
8756
|
-
else if (!spec) (sendsBody ? body : query)[field] = raw;
|
|
8757
|
-
else throw new Error(`${command$
|
|
8762
|
+
const field$1 = fieldName(flag$1);
|
|
8763
|
+
const queryParam = spec?.params.find((param) => param.in === "query" && param.name === field$1);
|
|
8764
|
+
const bodyField = bodyFields.get(field$1);
|
|
8765
|
+
if (queryParam) query[field$1] = coerce(raw, queryParam.type);
|
|
8766
|
+
else if (bodyField) body[field$1] = coerce(raw, bodyField.type);
|
|
8767
|
+
else if (!spec) (sendsBody ? body : query)[field$1] = raw;
|
|
8768
|
+
else throw new Error(`${command$82} has no ${toFlag(field$1)}. \`${command$82} --help\` lists what it takes.`);
|
|
8758
8769
|
}
|
|
8759
8770
|
Object.assign(sendsBody ? body : query, parseParams(flags.data));
|
|
8760
8771
|
await fillScope(ctx, op$1, spec, pathValues, query, body);
|
|
@@ -8763,11 +8774,11 @@ async function callOperation(context, owner, resource, op$1, ids, flags, merged
|
|
|
8763
8774
|
});
|
|
8764
8775
|
if (missing$1.length > 0) {
|
|
8765
8776
|
const needs = missing$1.map((param) => `${toFlag(param.name)} <${param.type.replace(/"/g, "").replace(/ \| /g, "|")}>`);
|
|
8766
|
-
throw new Error(`${command$
|
|
8777
|
+
throw new Error(`${command$82} needs ${needs.join(" and ")}.`);
|
|
8767
8778
|
}
|
|
8768
8779
|
const url = withQuery(template.replace(/\{([^}]+)\}/g, (_, param) => {
|
|
8769
8780
|
const value$1 = pathValues.get(param);
|
|
8770
|
-
if (value$1 === void 0) throw new Error(`${command$
|
|
8781
|
+
if (value$1 === void 0) throw new Error(`${command$82} needs ${param}.`);
|
|
8771
8782
|
return encodeURIComponent(value$1);
|
|
8772
8783
|
}), query);
|
|
8773
8784
|
if (ctx.dryRun) return renderValue(ctx, {
|
|
@@ -8802,13 +8813,13 @@ async function fillScope(ctx, op$1, spec, pathValues, query, body) {
|
|
|
8802
8813
|
kind,
|
|
8803
8814
|
assign: (v) => pathValues.set(param, v)
|
|
8804
8815
|
});
|
|
8805
|
-
for (const field of scopeFields(op$1, spec)) {
|
|
8806
|
-
const target = field.location === "query" ? query : body;
|
|
8807
|
-
if (target[field.name] !== void 0) continue;
|
|
8808
|
-
const typed = (value$1) => field.location === "query" ? value$1 : coerce(value$1, field.type);
|
|
8809
|
-
wanted.set(`${field.location}:${field.name}`, {
|
|
8810
|
-
kind: field.kind,
|
|
8811
|
-
assign: (value$1) => target[field.name] = typed(value$1)
|
|
8816
|
+
for (const field$1 of scopeFields(op$1, spec)) {
|
|
8817
|
+
const target = field$1.location === "query" ? query : body;
|
|
8818
|
+
if (target[field$1.name] !== void 0) continue;
|
|
8819
|
+
const typed = (value$1) => field$1.location === "query" ? value$1 : coerce(value$1, field$1.type);
|
|
8820
|
+
wanted.set(`${field$1.location}:${field$1.name}`, {
|
|
8821
|
+
kind: field$1.kind,
|
|
8822
|
+
assign: (value$1) => target[field$1.name] = typed(value$1)
|
|
8812
8823
|
});
|
|
8813
8824
|
}
|
|
8814
8825
|
if (wanted.size === 0) return;
|
|
@@ -8879,7 +8890,7 @@ async function dispatch(ctx, owner, words, flags) {
|
|
|
8879
8890
|
const nested = rest[0] ? findNested(owner, rest[0]) : void 0;
|
|
8880
8891
|
if (nested) rest = rest.slice(1);
|
|
8881
8892
|
const resource = nested ?? owner;
|
|
8882
|
-
const command$
|
|
8893
|
+
const command$82 = nested ? `${owner.name} ${nested.name}` : owner.name;
|
|
8883
8894
|
if (rest[0] && /^(\d+|https?:\/\/.*)$/.test(rest[0]) && findOperation(resource, "get")) rest = ["get", ...rest];
|
|
8884
8895
|
const [opName, ...args] = rest;
|
|
8885
8896
|
if (!opName) {
|
|
@@ -8891,7 +8902,7 @@ async function dispatch(ctx, owner, words, flags) {
|
|
|
8891
8902
|
if (!op$1) {
|
|
8892
8903
|
const known = resource.operations.map((candidate) => candidate.name);
|
|
8893
8904
|
const nestedNames = nested ? [] : (owner.nested ?? []).map((candidate) => candidate.name);
|
|
8894
|
-
throw new UsageError(`${command$
|
|
8905
|
+
throw new UsageError(`${command$82} has no "${opName}". It takes: ${[...known, ...nestedNames].join(", ")}.\nRun superwall ${command$82} --help for what each does.`, command$82);
|
|
8895
8906
|
}
|
|
8896
8907
|
await runOperation(ctx, owner, resource, op$1, args, flags);
|
|
8897
8908
|
}
|
|
@@ -8942,15 +8953,15 @@ function schemaOfType(type, fields) {
|
|
|
8942
8953
|
function objectOf(fields) {
|
|
8943
8954
|
return {
|
|
8944
8955
|
type: "object",
|
|
8945
|
-
properties: Object.fromEntries(fields.map((field) => [field.name, schemaOfField(field)])),
|
|
8946
|
-
required: fields.filter((field) => field.required).map((field) => field.name)
|
|
8956
|
+
properties: Object.fromEntries(fields.map((field$1) => [field$1.name, schemaOfField(field$1)])),
|
|
8957
|
+
required: fields.filter((field$1) => field$1.required).map((field$1) => field$1.name)
|
|
8947
8958
|
};
|
|
8948
8959
|
}
|
|
8949
|
-
function schemaOfField(field) {
|
|
8950
|
-
const schema = schemaOfType(field.type, field.fields);
|
|
8951
|
-
return field.description ? {
|
|
8960
|
+
function schemaOfField(field$1) {
|
|
8961
|
+
const schema = schemaOfType(field$1.type, field$1.fields);
|
|
8962
|
+
return field$1.description ? {
|
|
8952
8963
|
...schema,
|
|
8953
|
-
description: field.description
|
|
8964
|
+
description: field$1.description
|
|
8954
8965
|
} : schema;
|
|
8955
8966
|
}
|
|
8956
8967
|
function schemaOfFlag(spec, describe$1) {
|
|
@@ -8977,7 +8988,7 @@ async function toolOf(owner, resource, op$1, flags) {
|
|
|
8977
8988
|
required.push(param);
|
|
8978
8989
|
}
|
|
8979
8990
|
const spec = op$1.method && op$1.path ? await findSpec(op$1) : void 0;
|
|
8980
|
-
const scoped = [...scopeParams(op$1).values(), ...scopeFields(op$1, spec).map((field) => field.kind)];
|
|
8991
|
+
const scoped = [...scopeParams(op$1).values(), ...scopeFields(op$1, spec).map((field$1) => field$1.kind)];
|
|
8981
8992
|
if (owner.appArg || scoped.length > 0 || op$1.handler) properties.app = APP;
|
|
8982
8993
|
if (scoped.includes("project") && !scoped.includes("app")) properties.project = {
|
|
8983
8994
|
type: "string",
|
|
@@ -8993,10 +9004,10 @@ async function toolOf(owner, resource, op$1, flags) {
|
|
|
8993
9004
|
properties[param.name] = schemaOfField(param);
|
|
8994
9005
|
if (param.required) required.push(param.name);
|
|
8995
9006
|
}
|
|
8996
|
-
for (const field of spec?.body ?? []) {
|
|
8997
|
-
if (known.has(field.name)) continue;
|
|
8998
|
-
properties[field.name] = schemaOfField(field);
|
|
8999
|
-
if (field.required) required.push(field.name);
|
|
9007
|
+
for (const field$1 of spec?.body ?? []) {
|
|
9008
|
+
if (known.has(field$1.name)) continue;
|
|
9009
|
+
properties[field$1.name] = schemaOfField(field$1);
|
|
9010
|
+
if (field$1.required) required.push(field$1.name);
|
|
9000
9011
|
}
|
|
9001
9012
|
for (const [flag$1, describe$1] of op$1.flags ?? []) {
|
|
9002
9013
|
const name = snakeOf(flag$1.split(/[ ,]/).find((part) => part.startsWith("--")) ?? "");
|
|
@@ -10066,7 +10077,7 @@ const command$62 = defineCommand({
|
|
|
10066
10077
|
prompts: true,
|
|
10067
10078
|
mcp: false,
|
|
10068
10079
|
async run(ctx) {
|
|
10069
|
-
const { runDoctor } = await import("./doctor-
|
|
10080
|
+
const { runDoctor } = await import("./doctor-XtXW6tKE.js");
|
|
10070
10081
|
return runDoctor(ctx);
|
|
10071
10082
|
}
|
|
10072
10083
|
});
|
|
@@ -10095,13 +10106,6 @@ function parseContext(pairs) {
|
|
|
10095
10106
|
}
|
|
10096
10107
|
return out;
|
|
10097
10108
|
}
|
|
10098
|
-
function linkedApp(cwd = proc?.cwd() ?? "") {
|
|
10099
|
-
const app$1 = readOnboardedApp(cwd);
|
|
10100
|
-
return {
|
|
10101
|
-
projectId: app$1?.projectId,
|
|
10102
|
-
applicationId: app$1?.applicationId
|
|
10103
|
-
};
|
|
10104
|
-
}
|
|
10105
10109
|
function readAttachments(paths) {
|
|
10106
10110
|
if (paths.length > MAX_FILES) throw new Error(`Attach at most ${MAX_FILES} files.`);
|
|
10107
10111
|
return paths.map((path) => {
|
|
@@ -10114,7 +10118,99 @@ function readAttachments(paths) {
|
|
|
10114
10118
|
};
|
|
10115
10119
|
});
|
|
10116
10120
|
}
|
|
10117
|
-
function
|
|
10121
|
+
async function resolveFeedbackTarget(api, { app: app$1, project: project$1 }, cwd = proc?.cwd() ?? "") {
|
|
10122
|
+
if (app$1) {
|
|
10123
|
+
const dashboard = parseDashboardUrl(app$1);
|
|
10124
|
+
if (dashboard) return {
|
|
10125
|
+
applicationId: dashboard.applicationId,
|
|
10126
|
+
organizationId: dashboard.orgId,
|
|
10127
|
+
projectId: project$1
|
|
10128
|
+
};
|
|
10129
|
+
if (/^\d+$/.test(app$1) || !api) return {
|
|
10130
|
+
applicationId: app$1,
|
|
10131
|
+
projectId: project$1
|
|
10132
|
+
};
|
|
10133
|
+
const found = await findApplication(api, app$1).catch(() => null);
|
|
10134
|
+
if (found === null) return {
|
|
10135
|
+
applicationId: app$1,
|
|
10136
|
+
projectId: project$1
|
|
10137
|
+
};
|
|
10138
|
+
if (!found) throw appNotFound(app$1);
|
|
10139
|
+
return {
|
|
10140
|
+
applicationId: String(found.app.id),
|
|
10141
|
+
projectId: String(found.project.id),
|
|
10142
|
+
organizationId: orgIdOf(found.project)
|
|
10143
|
+
};
|
|
10144
|
+
}
|
|
10145
|
+
if (project$1) {
|
|
10146
|
+
const found = api ? await findProject(api, project$1).catch(() => void 0) : void 0;
|
|
10147
|
+
return {
|
|
10148
|
+
projectId: project$1,
|
|
10149
|
+
organizationId: found && orgIdOf(found)
|
|
10150
|
+
};
|
|
10151
|
+
}
|
|
10152
|
+
const linked = readOnboardedApp(cwd);
|
|
10153
|
+
return {
|
|
10154
|
+
projectId: linked?.projectId,
|
|
10155
|
+
applicationId: linked?.applicationId
|
|
10156
|
+
};
|
|
10157
|
+
}
|
|
10158
|
+
const numericId = (id$1) => id$1 !== void 0 && /^\d+$/.test(id$1) ? Number(id$1) : void 0;
|
|
10159
|
+
function buildFeedbackBody(feedback, via) {
|
|
10160
|
+
const applicationId = numericId(feedback.applicationId);
|
|
10161
|
+
const context = feedback.projectId ? {
|
|
10162
|
+
project: feedback.projectId,
|
|
10163
|
+
...feedback.context
|
|
10164
|
+
} : feedback.context;
|
|
10165
|
+
return {
|
|
10166
|
+
kind: feedback.kind,
|
|
10167
|
+
message: feedback.message,
|
|
10168
|
+
title: feedback.title,
|
|
10169
|
+
use_case: feedback.useCase,
|
|
10170
|
+
command: feedback.command,
|
|
10171
|
+
application_id: applicationId,
|
|
10172
|
+
organization_id: applicationId === void 0 ? numericId(feedback.organizationId) : void 0,
|
|
10173
|
+
context,
|
|
10174
|
+
attachments: feedback.attachments,
|
|
10175
|
+
agent: feedback.agent,
|
|
10176
|
+
via,
|
|
10177
|
+
cli_version: VERSION
|
|
10178
|
+
};
|
|
10179
|
+
}
|
|
10180
|
+
function parseFeedbackReport(value$1) {
|
|
10181
|
+
const request = field(value$1, "request");
|
|
10182
|
+
const outcome = field(value$1, "outcome");
|
|
10183
|
+
const id$1 = field(value$1, "id");
|
|
10184
|
+
if (!isRecord(request) || typeof id$1 !== "number" || outcome !== "created" && outcome !== "merged") return void 0;
|
|
10185
|
+
const count = (key) => {
|
|
10186
|
+
const found = field(request, key);
|
|
10187
|
+
return typeof found === "number" ? found : 0;
|
|
10188
|
+
};
|
|
10189
|
+
const requestId = field(request, "id");
|
|
10190
|
+
return {
|
|
10191
|
+
object: "feedback_report",
|
|
10192
|
+
id: id$1,
|
|
10193
|
+
outcome,
|
|
10194
|
+
request: {
|
|
10195
|
+
id: typeof requestId === "number" ? requestId : 0,
|
|
10196
|
+
title: textField(request, "title") ?? "",
|
|
10197
|
+
kind: textField(request, "kind") ?? "other",
|
|
10198
|
+
status: textField(request, "status") ?? "open",
|
|
10199
|
+
report_count: count("report_count"),
|
|
10200
|
+
organization_count: count("organization_count")
|
|
10201
|
+
}
|
|
10202
|
+
};
|
|
10203
|
+
}
|
|
10204
|
+
const rateLimited = (error) => error instanceof ApiError && error.status === 429;
|
|
10205
|
+
async function sendToApi(api, feedback, via) {
|
|
10206
|
+
try {
|
|
10207
|
+
return parseFeedbackReport(await api.post("/v2/feedback", buildFeedbackBody(feedback, via)));
|
|
10208
|
+
} catch (error) {
|
|
10209
|
+
if (rateLimited(error)) throw error;
|
|
10210
|
+
return;
|
|
10211
|
+
}
|
|
10212
|
+
}
|
|
10213
|
+
function buildFeedbackEvent(feedback, via, distinctId, session, osRelease, report) {
|
|
10118
10214
|
return {
|
|
10119
10215
|
api_key: TELEMETRY_KEY(),
|
|
10120
10216
|
event: "feedback submitted",
|
|
@@ -10125,6 +10221,7 @@ function buildFeedbackEvent(feedback, via, distinctId, session, osRelease) {
|
|
|
10125
10221
|
title: feedback.title ?? null,
|
|
10126
10222
|
message: feedback.message,
|
|
10127
10223
|
kind: feedback.kind,
|
|
10224
|
+
use_case: feedback.useCase ?? null,
|
|
10128
10225
|
command: feedback.command ?? null,
|
|
10129
10226
|
project_id: feedback.projectId ?? null,
|
|
10130
10227
|
application_id: feedback.applicationId ?? null,
|
|
@@ -10141,13 +10238,17 @@ function buildFeedbackEvent(feedback, via, distinctId, session, osRelease) {
|
|
|
10141
10238
|
ci: proc?.env.CI === "true",
|
|
10142
10239
|
email: session?.userEmail ?? null,
|
|
10143
10240
|
org_name: session?.orgName ?? null,
|
|
10144
|
-
auth_method: session?.authMethod ?? null
|
|
10241
|
+
auth_method: session?.authMethod ?? null,
|
|
10242
|
+
feedback_report_id: report?.id ?? null,
|
|
10243
|
+
feedback_outcome: report?.outcome ?? null,
|
|
10244
|
+
feedback_request_id: report?.request.id ?? null,
|
|
10245
|
+
feedback_request_title: report?.request.title ?? null
|
|
10145
10246
|
}
|
|
10146
10247
|
};
|
|
10147
10248
|
}
|
|
10148
|
-
async function
|
|
10249
|
+
async function sendToTelemetry(feedback, via, report) {
|
|
10149
10250
|
const osRelease = proc ? await import("node:os").then((os) => os.release()).catch(() => void 0) : void 0;
|
|
10150
|
-
const payload = buildFeedbackEvent(feedback, via, readAnonymousId(), readSession(), osRelease);
|
|
10251
|
+
const payload = buildFeedbackEvent(feedback, via, readAnonymousId(), readSession(), osRelease, report);
|
|
10151
10252
|
try {
|
|
10152
10253
|
return (await fetch(`${TELEMETRY_HOST()}/capture/`, {
|
|
10153
10254
|
method: "POST",
|
|
@@ -10159,14 +10260,19 @@ async function submitFeedback(feedback, via) {
|
|
|
10159
10260
|
return false;
|
|
10160
10261
|
}
|
|
10161
10262
|
}
|
|
10162
|
-
|
|
10163
|
-
|
|
10164
|
-
|
|
10165
|
-
|
|
10166
|
-
|
|
10167
|
-
|
|
10168
|
-
|
|
10169
|
-
|
|
10263
|
+
async function submitFeedback(api, feedback, via) {
|
|
10264
|
+
const report = api ? await sendToApi(api, feedback, via) : void 0;
|
|
10265
|
+
const submitted = await sendToTelemetry(feedback, via, report);
|
|
10266
|
+
if (report) return report;
|
|
10267
|
+
return submitted ? {
|
|
10268
|
+
submitted,
|
|
10269
|
+
outcome: "queued"
|
|
10270
|
+
} : { submitted };
|
|
10271
|
+
}
|
|
10272
|
+
function formatFeedbackReport(report) {
|
|
10273
|
+
const { title, report_count, organization_count } = report.request;
|
|
10274
|
+
if (report.outcome === "created") return `Opened a new request: '${title}'`;
|
|
10275
|
+
return `Merged into '${title}' (${plural(report_count, "report")} from ${plural(organization_count, "team")})`;
|
|
10170
10276
|
}
|
|
10171
10277
|
async function runFeedback(ctx, { args, flags }) {
|
|
10172
10278
|
const { ui, json, interactive } = ctx;
|
|
@@ -10181,32 +10287,35 @@ async function runFeedback(ctx, { args, flags }) {
|
|
|
10181
10287
|
if (answer === null) return void ui.warn("Cancelled.");
|
|
10182
10288
|
message = answer.trim();
|
|
10183
10289
|
}
|
|
10184
|
-
if (!message) throw new Error("Usage: superwall feedback \"<message>\" [--title ...] [--kind bug] [--file log.txt]");
|
|
10290
|
+
if (!message) throw new Error("Usage: superwall feedback \"<message>\" [--title ...] [--kind bug] [--use-case ...] [--file log.txt]");
|
|
10185
10291
|
const kind = FEEDBACK_KINDS.find((candidate) => candidate === flags.kind);
|
|
10186
10292
|
if (!kind) throw new Error(`--kind must be one of: ${FEEDBACK_KINDS.join(", ")}`);
|
|
10187
10293
|
const agent = flags.agent ?? detectAgent();
|
|
10188
10294
|
const attachments = readAttachments(flags.file.filter(Boolean));
|
|
10189
10295
|
const context = parseContext(flags.context);
|
|
10190
|
-
const
|
|
10191
|
-
|
|
10296
|
+
const target = await resolveFeedbackTarget(ctx.api, {
|
|
10297
|
+
app: flags.app,
|
|
10298
|
+
project: flags.project
|
|
10299
|
+
});
|
|
10192
10300
|
const via = agent || !interactive ? "agent" : "human";
|
|
10193
10301
|
const spin = interactive ? ui.spinner() : null;
|
|
10194
10302
|
spin?.start("Sending your feedback");
|
|
10195
|
-
const
|
|
10303
|
+
const result = await submitFeedback(ctx.api, {
|
|
10196
10304
|
title: flags.title,
|
|
10197
10305
|
message,
|
|
10198
10306
|
kind,
|
|
10307
|
+
useCase: flags.useCase,
|
|
10199
10308
|
command: flags.command,
|
|
10200
10309
|
agent,
|
|
10201
|
-
projectId: flags.project ?? linked.projectId,
|
|
10202
|
-
applicationId,
|
|
10203
|
-
organizationId: await organizationOfApp(ctx.api, applicationId),
|
|
10204
10310
|
context,
|
|
10205
|
-
attachments
|
|
10311
|
+
attachments,
|
|
10312
|
+
...target
|
|
10206
10313
|
}, via);
|
|
10207
|
-
|
|
10208
|
-
|
|
10209
|
-
if (
|
|
10314
|
+
const sent$1 = "outcome" in result;
|
|
10315
|
+
spin?.stop(sent$1 ? "Sent" : "Failed to send");
|
|
10316
|
+
if (json) return ctx.output.data(result);
|
|
10317
|
+
if (!sent$1) throw new Error("Couldn't send your feedback - check your connection and try again.");
|
|
10318
|
+
if ("request" in result) return void ui.success(formatFeedbackReport(result));
|
|
10210
10319
|
ui.success("Thank you! We've received your feedback and will read through it. Really appreciate you helping us make Superwall better.");
|
|
10211
10320
|
}
|
|
10212
10321
|
|
|
@@ -10215,9 +10324,11 @@ async function runFeedback(ctx, { args, flags }) {
|
|
|
10215
10324
|
const command$63 = defineCommand({
|
|
10216
10325
|
name: "feedback",
|
|
10217
10326
|
summary: "Report a bug or send feedback to the Superwall team",
|
|
10218
|
-
details: `Goes straight to the Superwall team
|
|
10327
|
+
details: `Goes straight to the Superwall team, who read every report. Send one yourself, without asking first (Superwall's terms cover it), when you confirm a Superwall bug, a doc that is wrong or missing, or a capability the user needed that Superwall lacks; then tell the user in one line. Confirm it first: reproduce the bug, check the doc against what happens.
|
|
10328
|
+
|
|
10329
|
+
Say what the customer is trying to do and why in --use-case. Reports about the same thing are merged into one request, so don't search for an existing one: send it, and it adds a vote and this use case. Pass the app it happened in, and every ID and version a reproduction needs. Leave out secrets, API keys, tokens and end users' personal data. Without a shell, paste the relevant part of a log into the message: a tool cannot attach files.
|
|
10219
10330
|
|
|
10220
|
-
|
|
10331
|
+
Sending cannot be undone; repeating the call sends a duplicate report.`,
|
|
10221
10332
|
args: { message: { describe: "What happened: what you ran, what you expected, what you got (asked when left out)" } },
|
|
10222
10333
|
flags: {
|
|
10223
10334
|
title: {
|
|
@@ -10231,6 +10342,11 @@ Sends the supplied message and context to the Superwall team as a persisted even
|
|
|
10231
10342
|
default: "other",
|
|
10232
10343
|
describe: "What this is"
|
|
10233
10344
|
},
|
|
10345
|
+
useCase: {
|
|
10346
|
+
type: "string",
|
|
10347
|
+
value: "text",
|
|
10348
|
+
describe: "What the customer is trying to do, and why they need it"
|
|
10349
|
+
},
|
|
10234
10350
|
command: {
|
|
10235
10351
|
type: "string",
|
|
10236
10352
|
value: "text",
|
|
@@ -10263,11 +10379,15 @@ Sends the supplied message and context to the Superwall team as a persisted even
|
|
|
10263
10379
|
describe: "The agent sending it (detected when possible)"
|
|
10264
10380
|
}
|
|
10265
10381
|
},
|
|
10266
|
-
examples: [
|
|
10382
|
+
examples: [
|
|
10383
|
+
["feedback \"migrate crashed on Expo\"", "Send feedback"],
|
|
10384
|
+
["feedback \"push fails with 413 on a 2MB asset\" --title \"push 413\" --kind bug --use-case \"ships seasonal paywalls with hero videos\" --command \"superwall push\" --app <app> --file push.log --json", "For agents: a full bug report"],
|
|
10385
|
+
["feedback \"no way to schedule a campaign to end\" --kind idea --use-case \"runs a Black Friday offer that must stop at midnight\" --app <app> --json", "For agents: a missing capability"]
|
|
10386
|
+
],
|
|
10267
10387
|
auth: "optional",
|
|
10268
10388
|
json: true,
|
|
10269
10389
|
prompts: true,
|
|
10270
|
-
mcp: "
|
|
10390
|
+
mcp: "write",
|
|
10271
10391
|
run: (ctx, input) => runFeedback(ctx, input)
|
|
10272
10392
|
});
|
|
10273
10393
|
|
|
@@ -10302,7 +10422,7 @@ const command$64 = defineCommand({
|
|
|
10302
10422
|
prompts: true,
|
|
10303
10423
|
mcp: false,
|
|
10304
10424
|
async run(ctx, input) {
|
|
10305
|
-
const { runSkills } = await import("./skills-
|
|
10425
|
+
const { runSkills } = await import("./skills-8um2fBPS.js");
|
|
10306
10426
|
return runSkills(ctx, input);
|
|
10307
10427
|
}
|
|
10308
10428
|
});
|
|
@@ -10311,21 +10431,607 @@ const command$64 = defineCommand({
|
|
|
10311
10431
|
//#region src/commands/support/upgrade.ts
|
|
10312
10432
|
const command$65 = defineCommand({
|
|
10313
10433
|
name: "upgrade",
|
|
10314
|
-
summary: "Update the CLI to the latest version",
|
|
10315
|
-
examples: [["upgrade", "Install the latest version globally with npm"]],
|
|
10434
|
+
summary: "Update the CLI and its agent skills to the latest version",
|
|
10435
|
+
examples: [["upgrade", "Install the latest version globally with npm, then its skills"]],
|
|
10316
10436
|
auth: "none",
|
|
10317
10437
|
json: true,
|
|
10318
10438
|
prompts: true,
|
|
10319
10439
|
mcp: false,
|
|
10320
10440
|
async run(ctx) {
|
|
10321
|
-
const { runUpgrade } = await import("./upgrade-
|
|
10322
|
-
return runUpgrade(ctx);
|
|
10441
|
+
const { runUpgrade } = await import("./upgrade-CoWCEnoi.js");
|
|
10442
|
+
return runUpgrade(ctx, AUTO_UPDATE_TARGET());
|
|
10323
10443
|
}
|
|
10324
10444
|
});
|
|
10325
10445
|
|
|
10326
10446
|
//#endregion
|
|
10327
|
-
//#region src/commands/
|
|
10447
|
+
//#region src/commands/workspaces/approve.ts
|
|
10328
10448
|
const command$66 = defineCommand({
|
|
10449
|
+
name: "workspaces approve",
|
|
10450
|
+
summary: "Review what a version can do and make it live",
|
|
10451
|
+
details: "Admins only. Shows the version's manifest and how it differs from the live version, then asks. Without a terminal it needs --yes, and --accept-changes too when what the workspace can do changes.",
|
|
10452
|
+
args: { version: { describe: "The version id (default: the latest built that isn't live)" } },
|
|
10453
|
+
flags: {
|
|
10454
|
+
dir: projectDir,
|
|
10455
|
+
workspace,
|
|
10456
|
+
org: {
|
|
10457
|
+
type: "string",
|
|
10458
|
+
value: "id",
|
|
10459
|
+
describe: "The organization of a --workspace slug"
|
|
10460
|
+
},
|
|
10461
|
+
yes: {
|
|
10462
|
+
...yes,
|
|
10463
|
+
describe: "Go ahead without asking, when nothing it can do changes"
|
|
10464
|
+
},
|
|
10465
|
+
acceptChanges: {
|
|
10466
|
+
type: "boolean",
|
|
10467
|
+
describe: "With --yes: also accept changes to what it can do"
|
|
10468
|
+
}
|
|
10469
|
+
},
|
|
10470
|
+
examples: [
|
|
10471
|
+
["workspaces approve --workspace 42", "Review and approve the latest built version"],
|
|
10472
|
+
["workspaces approve 7 --workspace 42 --json", "Print version 7's manifest and changes, approving nothing"],
|
|
10473
|
+
["workspaces approve 7 --workspace 42 --yes --accept-changes", "Approve it without a terminal, having read them"]
|
|
10474
|
+
],
|
|
10475
|
+
auth: "required",
|
|
10476
|
+
json: true,
|
|
10477
|
+
prompts: true,
|
|
10478
|
+
mcp: false,
|
|
10479
|
+
channel: "next",
|
|
10480
|
+
async run(ctx, { args, flags }) {
|
|
10481
|
+
const { runWorkspaceApprove } = await import("./approve-Czs1-JO9.js");
|
|
10482
|
+
await runWorkspaceApprove(ctx, {
|
|
10483
|
+
version: args.version,
|
|
10484
|
+
...flags
|
|
10485
|
+
});
|
|
10486
|
+
}
|
|
10487
|
+
});
|
|
10488
|
+
|
|
10489
|
+
//#endregion
|
|
10490
|
+
//#region src/commands/workspaces/create.ts
|
|
10491
|
+
const command$67 = defineCommand({
|
|
10492
|
+
name: "workspaces create",
|
|
10493
|
+
summary: "Start a workspace: a mini-app that adds to the Superwall dashboard",
|
|
10494
|
+
args: { dir: { describe: "Where to put it (default: my-workspace)" } },
|
|
10495
|
+
flags: { install: {
|
|
10496
|
+
type: "boolean",
|
|
10497
|
+
default: true,
|
|
10498
|
+
describe: "Install dependencies after downloading (--no-install to skip)"
|
|
10499
|
+
} },
|
|
10500
|
+
examples: [["workspaces create", "Download the starter into my-workspace"], ["workspaces create churn-copilot", "Name the directory yourself"]],
|
|
10501
|
+
auth: "none",
|
|
10502
|
+
json: false,
|
|
10503
|
+
prompts: false,
|
|
10504
|
+
mcp: false,
|
|
10505
|
+
channel: "next",
|
|
10506
|
+
async run(ctx, { args, flags }) {
|
|
10507
|
+
const { runWorkspaceCreate } = await import("./starter-CiLrp1cN.js");
|
|
10508
|
+
await runWorkspaceCreate(ctx, {
|
|
10509
|
+
dir: args.dir,
|
|
10510
|
+
install: flags.install
|
|
10511
|
+
});
|
|
10512
|
+
}
|
|
10513
|
+
});
|
|
10514
|
+
|
|
10515
|
+
//#endregion
|
|
10516
|
+
//#region src/commands/workspaces/dev.ts
|
|
10517
|
+
const command$68 = defineCommand({
|
|
10518
|
+
name: "workspaces dev",
|
|
10519
|
+
summary: "Run a workspace on localhost against your real data, read-only",
|
|
10520
|
+
details: "Bundles the workspace the way the builder does, including its client.entry, and runs it in workerd. A local page plays the dashboard: it mounts pages and widgets, sends them context and theme over the bridge, and runs metrics and readouts. API calls go out with a short-lived, read-only token as you, limited to one organization and to the routes a workspace can read. It reads everything you can read in that organization, so only run code you trust. A staff account reaches only that organization too. Writes, outside hosts and raw sockets are refused. Every change rebuilds it.",
|
|
10521
|
+
args: { dir: { describe: "The workspace (default: cwd)" } },
|
|
10522
|
+
flags: {
|
|
10523
|
+
port: {
|
|
10524
|
+
type: "number",
|
|
10525
|
+
alias: "p",
|
|
10526
|
+
default: 8790,
|
|
10527
|
+
describe: "Port for the dev page; the frame takes the next one"
|
|
10528
|
+
},
|
|
10529
|
+
org: {
|
|
10530
|
+
type: "string",
|
|
10531
|
+
value: "id",
|
|
10532
|
+
describe: "The organization to run against; dev's token reaches only this one"
|
|
10533
|
+
},
|
|
10534
|
+
app: {
|
|
10535
|
+
...app,
|
|
10536
|
+
describe: "The app in the context: an id, a name or a dashboard link"
|
|
10537
|
+
},
|
|
10538
|
+
campaign: {
|
|
10539
|
+
type: "string",
|
|
10540
|
+
value: "id",
|
|
10541
|
+
describe: "The campaign in the context"
|
|
10542
|
+
},
|
|
10543
|
+
audience: {
|
|
10544
|
+
type: "string",
|
|
10545
|
+
value: "id",
|
|
10546
|
+
describe: "The audience in the context"
|
|
10547
|
+
},
|
|
10548
|
+
variant: {
|
|
10549
|
+
type: "list",
|
|
10550
|
+
value: "id",
|
|
10551
|
+
describe: "A variant in the context; repeat for several"
|
|
10552
|
+
},
|
|
10553
|
+
user: {
|
|
10554
|
+
type: "string",
|
|
10555
|
+
value: "id",
|
|
10556
|
+
describe: "The app user in the context"
|
|
10557
|
+
},
|
|
10558
|
+
alias: {
|
|
10559
|
+
type: "list",
|
|
10560
|
+
value: "id",
|
|
10561
|
+
describe: "An alias of that user; repeat for several"
|
|
10562
|
+
},
|
|
10563
|
+
environment: {
|
|
10564
|
+
type: "string",
|
|
10565
|
+
choices: ["PRODUCTION", "SANDBOX"],
|
|
10566
|
+
describe: "The environment in the context"
|
|
10567
|
+
},
|
|
10568
|
+
from: {
|
|
10569
|
+
type: "string",
|
|
10570
|
+
value: "iso",
|
|
10571
|
+
describe: "Start of the date range in the context"
|
|
10572
|
+
},
|
|
10573
|
+
to: {
|
|
10574
|
+
type: "string",
|
|
10575
|
+
value: "iso",
|
|
10576
|
+
describe: "End of the date range in the context"
|
|
10577
|
+
},
|
|
10578
|
+
context: {
|
|
10579
|
+
type: "string",
|
|
10580
|
+
value: "json",
|
|
10581
|
+
describe: "The whole context as JSON, for a slot this CLI doesn't know"
|
|
10582
|
+
}
|
|
10583
|
+
},
|
|
10584
|
+
examples: [["workspaces dev --org 1234", "Serve this workspace for one organization"], ["workspaces dev --app 5678 --user alice", "Fill in the app and the user a panel receives"]],
|
|
10585
|
+
auth: "required",
|
|
10586
|
+
json: false,
|
|
10587
|
+
prompts: true,
|
|
10588
|
+
mcp: false,
|
|
10589
|
+
channel: "next",
|
|
10590
|
+
async run(ctx, { args, flags }) {
|
|
10591
|
+
const { runWorkspaceDev } = await import("./run-CgLmD2vR.js");
|
|
10592
|
+
await runWorkspaceDev(ctx, {
|
|
10593
|
+
dir: args.dir,
|
|
10594
|
+
...flags
|
|
10595
|
+
});
|
|
10596
|
+
}
|
|
10597
|
+
});
|
|
10598
|
+
|
|
10599
|
+
//#endregion
|
|
10600
|
+
//#region src/commands/workspaces/install.ts
|
|
10601
|
+
const command$69 = defineCommand({
|
|
10602
|
+
name: "workspaces install",
|
|
10603
|
+
summary: "Choose where an entrypoint shows",
|
|
10604
|
+
details: "Admins only. Installs an entrypoint of the live version for the whole organization, or one app with --app. An app's row overrides the organization's there. Without an entrypoint, lists what's installed.",
|
|
10605
|
+
args: { entrypoint: { describe: "The entrypoint id from superwall.json" } },
|
|
10606
|
+
flags: {
|
|
10607
|
+
app: {
|
|
10608
|
+
...app,
|
|
10609
|
+
describe: "Install it for this app only (default: the whole organization)"
|
|
10610
|
+
},
|
|
10611
|
+
disable: {
|
|
10612
|
+
type: "boolean",
|
|
10613
|
+
describe: "Turn it off here, keeping its row"
|
|
10614
|
+
},
|
|
10615
|
+
remove: {
|
|
10616
|
+
type: "boolean",
|
|
10617
|
+
describe: "Remove its row, which ends sessions that are open"
|
|
10618
|
+
},
|
|
10619
|
+
position: {
|
|
10620
|
+
type: "number",
|
|
10621
|
+
value: "n",
|
|
10622
|
+
describe: "Order among the entrypoints shown in one slot, lowest first"
|
|
10623
|
+
},
|
|
10624
|
+
dir: projectDir,
|
|
10625
|
+
workspace,
|
|
10626
|
+
org: {
|
|
10627
|
+
type: "string",
|
|
10628
|
+
value: "id",
|
|
10629
|
+
describe: "The organization of a --workspace slug"
|
|
10630
|
+
},
|
|
10631
|
+
yes: {
|
|
10632
|
+
...yes,
|
|
10633
|
+
describe: "With --remove: go ahead without asking"
|
|
10634
|
+
}
|
|
10635
|
+
},
|
|
10636
|
+
examples: [
|
|
10637
|
+
["workspaces install", "List what's installed"],
|
|
10638
|
+
["workspaces install churn --app 5678", "Show it in one app"],
|
|
10639
|
+
["workspaces install churn --remove --yes", "Remove the organization-wide row"]
|
|
10640
|
+
],
|
|
10641
|
+
auth: "required",
|
|
10642
|
+
json: true,
|
|
10643
|
+
prompts: true,
|
|
10644
|
+
mcp: false,
|
|
10645
|
+
channel: "next",
|
|
10646
|
+
async run(ctx, { args, flags }) {
|
|
10647
|
+
const { runWorkspaceInstall } = await import("./install-CVUXsx8c.js");
|
|
10648
|
+
await runWorkspaceInstall(ctx, {
|
|
10649
|
+
entrypoint: args.entrypoint,
|
|
10650
|
+
...flags
|
|
10651
|
+
});
|
|
10652
|
+
}
|
|
10653
|
+
});
|
|
10654
|
+
|
|
10655
|
+
//#endregion
|
|
10656
|
+
//#region src/commands/workspaces/list.ts
|
|
10657
|
+
const command$70 = defineCommand({
|
|
10658
|
+
name: "workspaces list",
|
|
10659
|
+
summary: "List an organization's workspaces",
|
|
10660
|
+
flags: {
|
|
10661
|
+
org: {
|
|
10662
|
+
type: "string",
|
|
10663
|
+
value: "id",
|
|
10664
|
+
describe: "The organization (default: this project's, or asks)"
|
|
10665
|
+
},
|
|
10666
|
+
dir: projectDir
|
|
10667
|
+
},
|
|
10668
|
+
examples: [["workspaces list --org 1234", "Every workspace in organization 1234"]],
|
|
10669
|
+
auth: "required",
|
|
10670
|
+
json: true,
|
|
10671
|
+
prompts: true,
|
|
10672
|
+
mcp: false,
|
|
10673
|
+
channel: "next",
|
|
10674
|
+
async run(ctx, { flags }) {
|
|
10675
|
+
const { runWorkspaceList } = await import("./install-CVUXsx8c.js");
|
|
10676
|
+
await runWorkspaceList(ctx, flags);
|
|
10677
|
+
}
|
|
10678
|
+
});
|
|
10679
|
+
|
|
10680
|
+
//#endregion
|
|
10681
|
+
//#region src/commands/workspaces/logs.ts
|
|
10682
|
+
const command$71 = defineCommand({
|
|
10683
|
+
name: "workspaces logs",
|
|
10684
|
+
summary: "Show a version's build log",
|
|
10685
|
+
details: "The last 128 KiB, once the build has finished. The latest version by default.",
|
|
10686
|
+
args: { version: { describe: "The version id (default: the latest)" } },
|
|
10687
|
+
flags: {
|
|
10688
|
+
dir: projectDir,
|
|
10689
|
+
workspace,
|
|
10690
|
+
org: {
|
|
10691
|
+
type: "string",
|
|
10692
|
+
value: "id",
|
|
10693
|
+
describe: "The organization of a --workspace slug"
|
|
10694
|
+
}
|
|
10695
|
+
},
|
|
10696
|
+
examples: [["workspaces logs", "The latest version's build log"], ["workspaces logs 7", "Version 7's"]],
|
|
10697
|
+
auth: "required",
|
|
10698
|
+
json: true,
|
|
10699
|
+
prompts: false,
|
|
10700
|
+
mcp: false,
|
|
10701
|
+
channel: "next",
|
|
10702
|
+
async run(ctx, { args, flags }) {
|
|
10703
|
+
const { runWorkspaceLogs } = await import("./status-CoYMK7QL.js");
|
|
10704
|
+
await runWorkspaceLogs(ctx, {
|
|
10705
|
+
version: args.version,
|
|
10706
|
+
...flags
|
|
10707
|
+
});
|
|
10708
|
+
}
|
|
10709
|
+
});
|
|
10710
|
+
|
|
10711
|
+
//#endregion
|
|
10712
|
+
//#region src/commands/workspaces/open.ts
|
|
10713
|
+
const command$72 = defineCommand({
|
|
10714
|
+
name: "workspaces open",
|
|
10715
|
+
summary: "Open a workspace in the dashboard",
|
|
10716
|
+
args: { entrypoint: { describe: "An entrypoint to open inside an app, with --app" } },
|
|
10717
|
+
flags: {
|
|
10718
|
+
app: {
|
|
10719
|
+
...app,
|
|
10720
|
+
describe: "The app to open the entrypoint in"
|
|
10721
|
+
},
|
|
10722
|
+
dir: projectDir,
|
|
10723
|
+
workspace,
|
|
10724
|
+
org: {
|
|
10725
|
+
type: "string",
|
|
10726
|
+
value: "id",
|
|
10727
|
+
describe: "The organization of a --workspace slug"
|
|
10728
|
+
},
|
|
10729
|
+
open: {
|
|
10730
|
+
type: "boolean",
|
|
10731
|
+
default: true,
|
|
10732
|
+
describe: "Open your browser at a terminal (--no-open to only print the link)"
|
|
10733
|
+
}
|
|
10734
|
+
},
|
|
10735
|
+
examples: [["workspaces open", "This project's workspace"], ["workspaces open panel --app 5678", "One entrypoint, inside an app"]],
|
|
10736
|
+
auth: "required",
|
|
10737
|
+
json: true,
|
|
10738
|
+
prompts: false,
|
|
10739
|
+
mcp: false,
|
|
10740
|
+
channel: "next",
|
|
10741
|
+
async run(ctx, { args, flags }) {
|
|
10742
|
+
const { runWorkspaceOpen } = await import("./install-CVUXsx8c.js");
|
|
10743
|
+
await runWorkspaceOpen(ctx, {
|
|
10744
|
+
entrypoint: args.entrypoint,
|
|
10745
|
+
...flags
|
|
10746
|
+
});
|
|
10747
|
+
}
|
|
10748
|
+
});
|
|
10749
|
+
|
|
10750
|
+
//#endregion
|
|
10751
|
+
//#region src/commands/workspaces/pull.ts
|
|
10752
|
+
const command$73 = defineCommand({
|
|
10753
|
+
name: "workspaces pull",
|
|
10754
|
+
summary: "Bring teammates' pushes into this project, merged with your edits",
|
|
10755
|
+
args: { dir: { describe: "The workspace project, or with --workspace an empty folder to fill (default: cwd)" } },
|
|
10756
|
+
flags: {
|
|
10757
|
+
workspace,
|
|
10758
|
+
org: {
|
|
10759
|
+
type: "string",
|
|
10760
|
+
value: "id",
|
|
10761
|
+
describe: "The organization of a --workspace slug"
|
|
10762
|
+
},
|
|
10763
|
+
theirs: {
|
|
10764
|
+
type: "boolean",
|
|
10765
|
+
describe: "Where you and the source repo both changed a file, take the source repo's version"
|
|
10766
|
+
}
|
|
10767
|
+
},
|
|
10768
|
+
examples: [
|
|
10769
|
+
["workspaces pull", "Merge what teammates pushed into this project"],
|
|
10770
|
+
["workspaces pull --theirs", "Take the source repo's version of files you both changed"],
|
|
10771
|
+
["workspaces pull churn-copilot --workspace 42", "Get workspace 42's source into a new folder"]
|
|
10772
|
+
],
|
|
10773
|
+
auth: "required",
|
|
10774
|
+
json: true,
|
|
10775
|
+
prompts: false,
|
|
10776
|
+
mcp: false,
|
|
10777
|
+
channel: "next",
|
|
10778
|
+
async run(ctx, { args, flags }) {
|
|
10779
|
+
const { runWorkspacePull } = await import("./pull-zYAbqo9n.js");
|
|
10780
|
+
await runWorkspacePull(ctx, {
|
|
10781
|
+
dir: args.dir,
|
|
10782
|
+
...flags
|
|
10783
|
+
});
|
|
10784
|
+
}
|
|
10785
|
+
});
|
|
10786
|
+
|
|
10787
|
+
//#endregion
|
|
10788
|
+
//#region src/commands/workspaces/push.ts
|
|
10789
|
+
const command$74 = defineCommand({
|
|
10790
|
+
name: "workspaces push",
|
|
10791
|
+
summary: "Push this workspace's source and build it",
|
|
10792
|
+
details: "The first push creates the workspace from the manifest's name and records its id in superwall.workspace.json. Each push makes a version from the commit. Only you can see it until an admin approves it. When the source repo has commits this project doesn't, the push merges them, and your own copy runs them with your reads, so it asks first. Without a terminal it stops unless you pass --accept-merged-commits.",
|
|
10793
|
+
args: { dir: { describe: "The workspace project (default: cwd)" } },
|
|
10794
|
+
flags: {
|
|
10795
|
+
org: {
|
|
10796
|
+
type: "string",
|
|
10797
|
+
value: "id",
|
|
10798
|
+
describe: "The organization, on the first push"
|
|
10799
|
+
},
|
|
10800
|
+
m: {
|
|
10801
|
+
type: "string",
|
|
10802
|
+
value: "note",
|
|
10803
|
+
describe: "Why, recorded in the source commit"
|
|
10804
|
+
},
|
|
10805
|
+
overwriteSource: {
|
|
10806
|
+
type: "boolean",
|
|
10807
|
+
describe: "Replace what's in the source repo with this project"
|
|
10808
|
+
},
|
|
10809
|
+
acceptMergedCommits: {
|
|
10810
|
+
type: "boolean",
|
|
10811
|
+
describe: "Run commits this push merges from teammates in your copy, without asking"
|
|
10812
|
+
}
|
|
10813
|
+
},
|
|
10814
|
+
examples: [
|
|
10815
|
+
["workspaces push", "Push and build this project"],
|
|
10816
|
+
["workspaces push --org 1234 -m \"Add the cohort page\"", "The first push, with a note"],
|
|
10817
|
+
["workspaces push --json --accept-merged-commits", "In a script, taking in teammates' commits"]
|
|
10818
|
+
],
|
|
10819
|
+
auth: "required",
|
|
10820
|
+
json: true,
|
|
10821
|
+
prompts: true,
|
|
10822
|
+
mcp: false,
|
|
10823
|
+
channel: "next",
|
|
10824
|
+
async run(ctx, { args, flags }) {
|
|
10825
|
+
const { runWorkspacePush } = await import("./push-SVzv7fzE.js");
|
|
10826
|
+
await runWorkspacePush(ctx, {
|
|
10827
|
+
dir: args.dir,
|
|
10828
|
+
...flags
|
|
10829
|
+
});
|
|
10830
|
+
}
|
|
10831
|
+
});
|
|
10832
|
+
|
|
10833
|
+
//#endregion
|
|
10834
|
+
//#region src/commands/workspaces/share.ts
|
|
10835
|
+
const command$75 = defineCommand({
|
|
10836
|
+
name: "workspaces share",
|
|
10837
|
+
summary: "Ask an admin to review a version",
|
|
10838
|
+
details: "The latest built version by default. Until an organization owner or admin approves it, only its author can see it. Nobody is told automatically, so it says who to ask.",
|
|
10839
|
+
args: { version: { describe: "The version id (default: the latest built)" } },
|
|
10840
|
+
flags: {
|
|
10841
|
+
dir: projectDir,
|
|
10842
|
+
workspace,
|
|
10843
|
+
org: {
|
|
10844
|
+
type: "string",
|
|
10845
|
+
value: "id",
|
|
10846
|
+
describe: "The organization of a --workspace slug"
|
|
10847
|
+
}
|
|
10848
|
+
},
|
|
10849
|
+
examples: [["workspaces share", "Ask for review of the latest built version"]],
|
|
10850
|
+
auth: "required",
|
|
10851
|
+
json: true,
|
|
10852
|
+
prompts: false,
|
|
10853
|
+
mcp: false,
|
|
10854
|
+
channel: "next",
|
|
10855
|
+
async run(ctx, { args, flags }) {
|
|
10856
|
+
const { runWorkspaceShare } = await import("./status-CoYMK7QL.js");
|
|
10857
|
+
await runWorkspaceShare(ctx, {
|
|
10858
|
+
version: args.version,
|
|
10859
|
+
...flags
|
|
10860
|
+
});
|
|
10861
|
+
}
|
|
10862
|
+
});
|
|
10863
|
+
|
|
10864
|
+
//#endregion
|
|
10865
|
+
//#region src/commands/workspaces/status.ts
|
|
10866
|
+
const command$76 = defineCommand({
|
|
10867
|
+
name: "workspaces status",
|
|
10868
|
+
summary: "Show a workspace's state and its latest versions",
|
|
10869
|
+
flags: {
|
|
10870
|
+
dir: projectDir,
|
|
10871
|
+
workspace,
|
|
10872
|
+
org: {
|
|
10873
|
+
type: "string",
|
|
10874
|
+
value: "id",
|
|
10875
|
+
describe: "The organization of a --workspace slug"
|
|
10876
|
+
},
|
|
10877
|
+
all: {
|
|
10878
|
+
type: "boolean",
|
|
10879
|
+
describe: "List every version, not just the latest and the live one"
|
|
10880
|
+
}
|
|
10881
|
+
},
|
|
10882
|
+
examples: [["workspaces status", "This project's workspace"], ["workspaces status --workspace 42", "Any workspace you can see"]],
|
|
10883
|
+
auth: "required",
|
|
10884
|
+
json: true,
|
|
10885
|
+
prompts: false,
|
|
10886
|
+
mcp: false,
|
|
10887
|
+
channel: "next",
|
|
10888
|
+
async run(ctx, { flags }) {
|
|
10889
|
+
const { runWorkspaceStatus } = await import("./status-CoYMK7QL.js");
|
|
10890
|
+
await runWorkspaceStatus(ctx, flags);
|
|
10891
|
+
}
|
|
10892
|
+
});
|
|
10893
|
+
|
|
10894
|
+
//#endregion
|
|
10895
|
+
//#region src/commands/workspaces/try.ts
|
|
10896
|
+
const command$77 = defineCommand({
|
|
10897
|
+
name: "workspaces try",
|
|
10898
|
+
summary: "Upload a draft and run an entrypoint on the real runtime",
|
|
10899
|
+
details: "Nothing is saved: the draft runs as you, read-only and with no outside hosts, and only you can reach it for a day. A metric prints its series. A page, panel, tab, card or action opens in the dashboard. Readouts run with workspaces dev until the runtime takes them.",
|
|
10900
|
+
args: { entrypoint: {
|
|
10901
|
+
describe: "The entrypoint id from superwall.json",
|
|
10902
|
+
required: true
|
|
10903
|
+
} },
|
|
10904
|
+
flags: {
|
|
10905
|
+
dir: {
|
|
10906
|
+
type: "string",
|
|
10907
|
+
value: "path",
|
|
10908
|
+
describe: "The workspace (default: cwd)"
|
|
10909
|
+
},
|
|
10910
|
+
app: {
|
|
10911
|
+
...app,
|
|
10912
|
+
describe: "The app to run it for: an id, a name or a dashboard link"
|
|
10913
|
+
},
|
|
10914
|
+
org: {
|
|
10915
|
+
type: "string",
|
|
10916
|
+
value: "id",
|
|
10917
|
+
describe: "The organization, when the app alone doesn't find it"
|
|
10918
|
+
},
|
|
10919
|
+
from: {
|
|
10920
|
+
type: "string",
|
|
10921
|
+
value: "iso",
|
|
10922
|
+
describe: "Start of the window (default: --days ago)"
|
|
10923
|
+
},
|
|
10924
|
+
to: {
|
|
10925
|
+
type: "string",
|
|
10926
|
+
value: "iso",
|
|
10927
|
+
describe: "End of the window (default: now)"
|
|
10928
|
+
},
|
|
10929
|
+
days: {
|
|
10930
|
+
type: "number",
|
|
10931
|
+
default: 30,
|
|
10932
|
+
describe: "How far back the window starts"
|
|
10933
|
+
},
|
|
10934
|
+
interval: {
|
|
10935
|
+
type: "string",
|
|
10936
|
+
choices: [
|
|
10937
|
+
"hour",
|
|
10938
|
+
"day",
|
|
10939
|
+
"week",
|
|
10940
|
+
"month"
|
|
10941
|
+
],
|
|
10942
|
+
default: "day",
|
|
10943
|
+
describe: "Bucket size"
|
|
10944
|
+
},
|
|
10945
|
+
breakdown: {
|
|
10946
|
+
type: "string",
|
|
10947
|
+
value: "key",
|
|
10948
|
+
describe: "One of the metric's declared breakdowns"
|
|
10949
|
+
},
|
|
10950
|
+
filter: {
|
|
10951
|
+
type: "list",
|
|
10952
|
+
value: "key=value",
|
|
10953
|
+
describe: "One of the metric's declared filter values; repeat for several"
|
|
10954
|
+
},
|
|
10955
|
+
points: {
|
|
10956
|
+
type: "boolean",
|
|
10957
|
+
describe: "Print every point, not just each series' summary"
|
|
10958
|
+
},
|
|
10959
|
+
campaign: {
|
|
10960
|
+
type: "string",
|
|
10961
|
+
value: "id",
|
|
10962
|
+
describe: "For a frame: the campaign in its context"
|
|
10963
|
+
},
|
|
10964
|
+
user: {
|
|
10965
|
+
type: "string",
|
|
10966
|
+
value: "id",
|
|
10967
|
+
describe: "For a frame: the app user in its context"
|
|
10968
|
+
},
|
|
10969
|
+
environment: {
|
|
10970
|
+
type: "string",
|
|
10971
|
+
choices: ["PRODUCTION", "SANDBOX"],
|
|
10972
|
+
describe: "For a frame: the environment in its context"
|
|
10973
|
+
},
|
|
10974
|
+
open: {
|
|
10975
|
+
type: "boolean",
|
|
10976
|
+
default: true,
|
|
10977
|
+
describe: "Open a frame in your browser at a terminal (--no-open to only print the link)"
|
|
10978
|
+
}
|
|
10979
|
+
},
|
|
10980
|
+
examples: [
|
|
10981
|
+
["workspaces try transactions --app 5678", "Run a metric for one app over the last 30 days"],
|
|
10982
|
+
["workspaces try transactions --app 5678 --breakdown store --filter store=APP_STORE", "Split and filter it"],
|
|
10983
|
+
["workspaces try home --org 1234", "Open a page in the dashboard"]
|
|
10984
|
+
],
|
|
10985
|
+
auth: "required",
|
|
10986
|
+
json: true,
|
|
10987
|
+
prompts: true,
|
|
10988
|
+
mcp: false,
|
|
10989
|
+
channel: "next",
|
|
10990
|
+
async run(ctx, { args, flags }) {
|
|
10991
|
+
const { runWorkspaceTry } = await import("./try-BWbzgelb.js");
|
|
10992
|
+
await runWorkspaceTry(ctx, {
|
|
10993
|
+
entrypoint: args.entrypoint,
|
|
10994
|
+
...flags
|
|
10995
|
+
});
|
|
10996
|
+
}
|
|
10997
|
+
});
|
|
10998
|
+
|
|
10999
|
+
//#endregion
|
|
11000
|
+
//#region src/commands/workspaces/update.ts
|
|
11001
|
+
const command$78 = defineCommand({
|
|
11002
|
+
name: "workspaces update",
|
|
11003
|
+
summary: "Refresh a workspace's vendored SDK from the public repo",
|
|
11004
|
+
args: { dir: { describe: "The workspace (default: cwd)" } },
|
|
11005
|
+
flags: {
|
|
11006
|
+
install: {
|
|
11007
|
+
type: "boolean",
|
|
11008
|
+
default: true,
|
|
11009
|
+
describe: "Update the lockfile after downloading (--no-install to skip)"
|
|
11010
|
+
},
|
|
11011
|
+
force: {
|
|
11012
|
+
type: "boolean",
|
|
11013
|
+
describe: "Replace a vendored SDK that's newer than the latest published one"
|
|
11014
|
+
}
|
|
11015
|
+
},
|
|
11016
|
+
examples: [["workspaces update", "Replace vendor/workspace-sdk with the latest and update the lockfile"]],
|
|
11017
|
+
auth: "none",
|
|
11018
|
+
json: false,
|
|
11019
|
+
prompts: false,
|
|
11020
|
+
mcp: false,
|
|
11021
|
+
channel: "next",
|
|
11022
|
+
async run(ctx, { args, flags }) {
|
|
11023
|
+
const { runWorkspaceUpdate } = await import("./starter-CiLrp1cN.js");
|
|
11024
|
+
await runWorkspaceUpdate(ctx, {
|
|
11025
|
+
dir: args.dir,
|
|
11026
|
+
install: flags.install,
|
|
11027
|
+
force: flags.force
|
|
11028
|
+
});
|
|
11029
|
+
}
|
|
11030
|
+
});
|
|
11031
|
+
|
|
11032
|
+
//#endregion
|
|
11033
|
+
//#region src/commands/workflows/integrate.ts
|
|
11034
|
+
const command$79 = defineCommand({
|
|
10329
11035
|
name: "integrate",
|
|
10330
11036
|
summary: "Set up the SDK, placements, and dashboard in your app",
|
|
10331
11037
|
flags: {
|
|
@@ -10357,8 +11063,8 @@ const command$66 = defineCommand({
|
|
|
10357
11063
|
prompts: true,
|
|
10358
11064
|
mcp: false,
|
|
10359
11065
|
async run(ctx, { flags }) {
|
|
10360
|
-
const { runIntegrate } = await import("./integrate-
|
|
10361
|
-
const { printPlaybook } = await import("./playbook-
|
|
11066
|
+
const { runIntegrate } = await import("./integrate-qvKd9pVW.js");
|
|
11067
|
+
const { printPlaybook } = await import("./playbook-Du4Oydbf.js");
|
|
10362
11068
|
if (flags.skill) return printPlaybook(ctx.installDir, "integrate");
|
|
10363
11069
|
await runIntegrate({
|
|
10364
11070
|
...ctx,
|
|
@@ -10370,7 +11076,7 @@ const command$66 = defineCommand({
|
|
|
10370
11076
|
|
|
10371
11077
|
//#endregion
|
|
10372
11078
|
//#region src/commands/workflows/migrate.ts
|
|
10373
|
-
const command$
|
|
11079
|
+
const command$80 = defineCommand({
|
|
10374
11080
|
name: "migrate",
|
|
10375
11081
|
summary: "Migrate from RevenueCat / Adapty / Qonversion, or rebuild a paywall or native screen as code",
|
|
10376
11082
|
args: { paywall: { describe: "A dashboard paywall id: scaffold it as code (if not already) and rebuild its pages with your agent, or copy the prompt" } },
|
|
@@ -10404,8 +11110,8 @@ const command$67 = defineCommand({
|
|
|
10404
11110
|
prompts: true,
|
|
10405
11111
|
mcp: false,
|
|
10406
11112
|
async run(ctx, { args, flags }) {
|
|
10407
|
-
const { runPaywallMigration, runProviderMigration, runScreenMigration } = await import("./migrate-
|
|
10408
|
-
const { printPlaybook } = await import("./playbook-
|
|
11113
|
+
const { runPaywallMigration, runProviderMigration, runScreenMigration } = await import("./migrate-SkkLLdmr.js");
|
|
11114
|
+
const { printPlaybook } = await import("./playbook-Du4Oydbf.js");
|
|
10409
11115
|
if (flags.screen !== void 0) return runScreenMigration(ctx, {
|
|
10410
11116
|
path: flags.screen,
|
|
10411
11117
|
screenshot: flags.screenshot
|
|
@@ -10418,7 +11124,7 @@ const command$67 = defineCommand({
|
|
|
10418
11124
|
|
|
10419
11125
|
//#endregion
|
|
10420
11126
|
//#region src/commands/workflows/review.ts
|
|
10421
|
-
const command$
|
|
11127
|
+
const command$81 = defineCommand({
|
|
10422
11128
|
name: "review",
|
|
10423
11129
|
summary: "Review an existing Superwall setup end to end",
|
|
10424
11130
|
flags: {
|
|
@@ -10439,8 +11145,8 @@ const command$68 = defineCommand({
|
|
|
10439
11145
|
prompts: true,
|
|
10440
11146
|
mcp: false,
|
|
10441
11147
|
async run(ctx, { flags }) {
|
|
10442
|
-
const { runReview } = await import("./integrate-
|
|
10443
|
-
const { printPlaybook } = await import("./playbook-
|
|
11148
|
+
const { runReview } = await import("./integrate-qvKd9pVW.js");
|
|
11149
|
+
const { printPlaybook } = await import("./playbook-Du4Oydbf.js");
|
|
10444
11150
|
if (flags.skill) return printPlaybook(ctx.installDir, flags.fix ? "review-fix" : "review");
|
|
10445
11151
|
await runReview(ctx, flags.fix);
|
|
10446
11152
|
}
|
|
@@ -10454,9 +11160,9 @@ const GROUPS = [
|
|
|
10454
11160
|
title: "Workflows",
|
|
10455
11161
|
notes: ["Each takes --skill to print the playbook instead of running."],
|
|
10456
11162
|
commands: [
|
|
10457
|
-
command$
|
|
10458
|
-
command$
|
|
10459
|
-
command$
|
|
11163
|
+
command$79,
|
|
11164
|
+
command$81,
|
|
11165
|
+
command$80
|
|
10460
11166
|
]
|
|
10461
11167
|
},
|
|
10462
11168
|
{
|
|
@@ -10473,6 +11179,32 @@ const GROUPS = [
|
|
|
10473
11179
|
command$50
|
|
10474
11180
|
]
|
|
10475
11181
|
},
|
|
11182
|
+
{
|
|
11183
|
+
id: "workspaces",
|
|
11184
|
+
title: "Workspaces",
|
|
11185
|
+
prefix: "workspaces",
|
|
11186
|
+
channel: "next",
|
|
11187
|
+
topics: [{
|
|
11188
|
+
name: "workspaces",
|
|
11189
|
+
summary: "Mini-apps that add pages, panels and metrics to the Superwall dashboard",
|
|
11190
|
+
details: "A workspace is a Worker with a superwall.json manifest. It holds no credential: it calls Superwall as whoever is viewing it."
|
|
11191
|
+
}],
|
|
11192
|
+
commands: [
|
|
11193
|
+
command$67,
|
|
11194
|
+
command$68,
|
|
11195
|
+
command$77,
|
|
11196
|
+
command$78,
|
|
11197
|
+
command$74,
|
|
11198
|
+
command$73,
|
|
11199
|
+
command$76,
|
|
11200
|
+
command$71,
|
|
11201
|
+
command$75,
|
|
11202
|
+
command$66,
|
|
11203
|
+
command$69,
|
|
11204
|
+
command$70,
|
|
11205
|
+
command$72
|
|
11206
|
+
]
|
|
11207
|
+
},
|
|
10476
11208
|
{
|
|
10477
11209
|
id: "main",
|
|
10478
11210
|
title: "Commands",
|
|
@@ -10701,7 +11433,7 @@ function visible(channel) {
|
|
|
10701
11433
|
function listGroups() {
|
|
10702
11434
|
return GROUPS.filter((group$1) => visible(group$1.channel)).map((group$1) => ({
|
|
10703
11435
|
...group$1,
|
|
10704
|
-
commands: group$1.commands.filter((command$
|
|
11436
|
+
commands: group$1.commands.filter((command$82) => visible(command$82.channel))
|
|
10705
11437
|
}));
|
|
10706
11438
|
}
|
|
10707
11439
|
|