@superwall/cli 2.4.0 → 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.
Files changed (109) hide show
  1. package/dist/{apple-Bx_fm5M-.js → apple-Dyr7OFBx.js} +16 -15
  2. package/dist/approve-Czs1-JO9.js +186 -0
  3. package/dist/{assets-W5yvyf0V.js → assets-BrB9jQPQ.js} +3 -3
  4. package/dist/auth.d.ts +1 -1
  5. package/dist/auth.js +3 -3
  6. package/dist/{billing-C4lXR0xG.js → billing-D5qqIlVb.js} +3 -3
  7. package/dist/{bind-82oTpHZ3.js → bind-B3eEcRyp.js} +4 -4
  8. package/dist/browser-Bp3yRKlU.js +36 -0
  9. package/dist/{build-7_8cBgBm.js → build-DD9pSwHX.js} +9 -7
  10. package/dist/{client-ltxxHuxn.js → client-AI9H4GGB.js} +3 -3
  11. package/dist/{create-Dk8U_B49.js → create-B4m-IKlr.js} +8 -8
  12. package/dist/create-CJljlkJK.js +20 -0
  13. package/dist/{create-DEyveHS6.js → create-ChfgWpiM.js} +39 -67
  14. package/dist/{doctor-Df2GwS4K.js → doctor-XtXW6tKE.js} +6 -6
  15. package/dist/download-2Zu2I_Og.js +58 -0
  16. package/dist/{drivers-CTyYdBL7.js → drivers-CMEL13gp.js} +3 -3
  17. package/dist/entry.js +25 -24
  18. package/dist/{environment-djS0ik60.js → environment-BWT2S4qC.js} +3 -2
  19. package/dist/{existing-Das3PHGG.js → existing-b0GxFcnc.js} +2 -2
  20. package/dist/{session-CV0P8BjK.js → git-D7AVdugb.js} +96 -334
  21. package/dist/held-CX7Zf8u-.js +17 -0
  22. package/dist/{held-B8EFWDEc.js → held-D3PUNky2.js} +7 -7
  23. package/dist/install-CVUXsx8c.js +103 -0
  24. package/dist/{integrate-Cz48dm_h.js → integrate-qvKd9pVW.js} +27 -25
  25. package/dist/{login-girc324T.js → login-COmGHrU5.js} +2 -1
  26. package/dist/login-ClnJi1Ea.js +17 -0
  27. package/dist/{login-CiK5T4w8.js → login-PMoXUGqq.js} +8 -41
  28. package/dist/{lookup-us5vu5od.js → lookup-gjcKIZvh.js} +3 -2
  29. package/dist/{migrate-DaVwhdov.js → migrate-SkkLLdmr.js} +30 -25
  30. package/dist/{migration-cS6UGeUj.js → migration-DS44-3Zr.js} +9 -9
  31. package/dist/{notification-url-Hg42tAbW.js → notification-url-BjQPLf4-.js} +4 -4
  32. package/dist/{open-BIuOZ9ka.js → open-DQpm2yVs.js} +2 -2
  33. package/dist/{org-BrR4HGvl.js → org-C04eAO-j.js} +3 -2
  34. package/dist/organization-BOECL3vZ.js +39 -0
  35. package/dist/orgs-D6Kk96mG.js +81 -0
  36. package/dist/{paths-CdwjySxK.js → paths-REb-GrbX.js} +1 -1
  37. package/dist/{playbook-BJ3opYIS.js → playbook-Du4Oydbf.js} +10 -10
  38. package/dist/{products-DH_fK9tY.js → products-Cqq59DBQ.js} +1 -1
  39. package/dist/project-CP6hiHra.js +47 -0
  40. package/dist/{promote-BQO-1ScY.js → promote-Dm2_b1WK.js} +23 -18
  41. package/dist/pull-DsdOoG-D.js +36 -0
  42. package/dist/{pull-BhRswq6x.js → pull-F6pvO4To.js} +9 -28
  43. package/dist/pull-zYAbqo9n.js +106 -0
  44. package/dist/{push-CR110qRh.js → push-BIFLhAiO.js} +8 -6
  45. package/dist/push-CJVfvFZq.js +29 -0
  46. package/dist/push-D_l9KJZN.js +290 -0
  47. package/dist/push-SVzv7fzE.js +22 -0
  48. package/dist/{registry-DZsWoWqH.js → registry-DIJB0mJa.js} +687 -64
  49. package/dist/resolve--GsHj0Q1.js +171 -0
  50. package/dist/{resources-BMspgZO1.js → resources-BaP3p_LY.js} +3 -80
  51. package/dist/{run-D4V6mq8_.js → run-C5OPwhvS.js} +2 -2
  52. package/dist/run-CgLmD2vR.js +1345 -0
  53. package/dist/{scan-CRexsHOE.js → scan-Bj5y0zTZ.js} +1 -1
  54. package/dist/scan-v_WTE722.js +4 -0
  55. package/dist/{scope-Ct0_HoNq.js → scope-Bp_zwJOo.js} +5 -4
  56. package/dist/scope-CCb_7UvN.js +89 -0
  57. package/dist/sdk-TvT0p_nO.js +71 -0
  58. package/dist/selection-BltBpyp5.js +179 -0
  59. package/dist/series-TAixFBWW.js +685 -0
  60. package/dist/{server-Dv1VwbNh.js → server-CdVIboQn.js} +10 -8
  61. package/dist/server-CvJVusw3.js +29 -0
  62. package/dist/session-B8JNXkwN.js +6 -0
  63. package/dist/session-D3fgXQBt.js +219 -0
  64. package/dist/{session-UiPlLFn6.js → session-Ywim-P8M.js} +1 -1
  65. package/dist/{setup-UWLhQG3M.js → setup-zzjtTy8k.js} +9 -8
  66. package/dist/skills/index.json +5 -0
  67. package/dist/skills/superwall/SKILL.md +48 -30
  68. package/dist/skills/superwall/references/api.md +3 -2
  69. package/dist/skills/superwall-editor/SKILL.md +7 -5
  70. package/dist/skills/superwall-framework/SKILL.md +7 -5
  71. package/dist/skills/superwall-workspaces/SKILL.md +313 -0
  72. package/dist/skills/superwall-workspaces/references/cli.md +174 -0
  73. package/dist/skills/superwall-workspaces/references/slots.md +103 -0
  74. package/dist/{skills-CiWxt6vS.js → skills-2qYaUXGE.js} +4 -4
  75. package/dist/{skills-DzOvse9L.js → skills-8um2fBPS.js} +8 -8
  76. package/dist/{source-push-CX_k_yZD.js → source-push-kAep4gPe.js} +6 -5
  77. package/dist/{spinner-1uuKKZMc.js → spinner-BANVLncC.js} +16 -4
  78. package/dist/starter-CiLrp1cN.js +190 -0
  79. package/dist/status-CoYMK7QL.js +139 -0
  80. package/dist/{storage-CrXGgIbS.js → storage-DzP22xKn.js} +1 -1
  81. package/dist/storekit-D5eopLM0.js +17 -0
  82. package/dist/{storekit-CptdG4RJ.js → storekit-n1x0bWkQ.js} +4 -4
  83. package/dist/{telemetry-BqaPbM0k.js → telemetry-CXN6f-ZX.js} +1 -1
  84. package/dist/{token-zjjlkNDF.js → token-FmeHywYt.js} +1 -1
  85. package/dist/tools-skills/superwall/SKILL.md +49 -31
  86. package/dist/tools-skills/superwall/references/api.md +3 -2
  87. package/dist/tools-skills/superwall-editor/SKILL.md +7 -5
  88. package/dist/tools.d.ts +1 -1
  89. package/dist/tools.js +452 -27
  90. package/dist/try-BWbzgelb.js +120 -0
  91. package/dist/{selection-CgZJJ3FD.js → types-JdxmnCko.js} +1 -178
  92. package/dist/{upgrade-BBnmcyY2.js → upgrade-Bk5boOgW.js} +2 -2
  93. package/dist/{upgrade-AdyF7wXk.js → upgrade-CoWCEnoi.js} +2 -2
  94. package/package.json +5 -3
  95. package/dist/create-CBCDWuyo.js +0 -19
  96. package/dist/held-BL4oizD6.js +0 -16
  97. package/dist/login-DdrOmi6m.js +0 -16
  98. package/dist/push-B3Onn_mL.js +0 -24
  99. package/dist/scan-DUQjxOZf.js +0 -4
  100. package/dist/server-Cv-Ug9JF.js +0 -24
  101. package/dist/session-BCQuMcQ0.js +0 -6
  102. package/dist/storekit-B675ZNiA.js +0 -16
  103. /package/dist/{client-BZ1UbpXz.js → client-BJQXl62Q.js} +0 -0
  104. /package/dist/{devtools-pBl_vt03.js → devtools-ByZ6XYnn.js} +0 -0
  105. /package/dist/{input-vi0bou04.js → input-MDd67UIp.js} +0 -0
  106. /package/dist/{reports-CwwKLUh0.js → reports-CuhB1_ub.js} +0 -0
  107. /package/dist/{screenshot-file-tVBfUEIi.js → screenshot-file-XAS0Xy0e.js} +0 -0
  108. /package/dist/{storage-gRyQetN9.d.ts → storage-BjQCiTuz.d.ts} +0 -0
  109. /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 { C as detectAgent, _ as TELEMETRY_HOST, b as VERSION, o as AUTO_UPDATE_TARGET, s as CHANNEL, t as API_HOST, v as TELEMETRY_KEY } from "./environment-djS0ik60.js";
3
- import { n as readSession } from "./storage-CrXGgIbS.js";
4
- import { a as withQuery$1, t as ApiError } from "./client-ltxxHuxn.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-B8EFWDEc.js";
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
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-1uuKKZMc.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-UiPlLFn6.js";
10
- import { F as orgIdOf, M as textField, N as listOrgGroups, 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-BMspgZO1.js";
11
- import { n as orgForNewProject } from "./org-BrR4HGvl.js";
12
- import { i as parseDashboardUrl, n as findApplication, r as findProject, t as appNotFound } from "./lookup-us5vu5od.js";
13
- import { a as pickScope, i as pickProject, n as chooseApp, r as pickOrganization, t as boundOrganization } from "./scope-Ct0_HoNq.js";
14
- import { a as listAscConfigs, i as findAppNotificationUrl, o as removeAscConfig, t as ascProxy } from "./client-BZ1UbpXz.js";
15
- import { i as listUnimportedAscProducts, n as findAscAppId, r as listAscApps, t as ascTypeDisplay } from "./products-DH_fK9tY.js";
16
- import { n as readResourceFlags, r as textOf, t as fieldName } from "./input-vi0bou04.js";
17
- import { a as runAscNotificationUrlSet, i as printServerNotifications, t as describeNotificationUrl } from "./notification-url-Hg42tAbW.js";
18
- import { t as platformForIntegration } from "./bind-82oTpHZ3.js";
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-DdrOmi6m.js");
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-BCQuMcQ0.js");
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
@@ -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$69, arg, word) {
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$69} takes <${arg.name}> as one of: ${arg.choices.join(", ")} (not "${word}").`);
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$69, operation, words, raw) {
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$69} has no --${kebab(key)}. Run superwall ${command$69} --help for its flags.`);
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$69} needs --${kebab(key)}.`);
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$69} doesn't take "${words.slice(specArgs.length).join(" ")}".`);
1468
- const args = Object.fromEntries(specArgs.map((arg, index) => [arg.name, parseArg(command$69, arg, words[index])]));
1469
- for (const arg of specArgs) if (arg.required && args[arg.name] === void 0) throw new UsageError(`${command$69} needs <${arg.name}>.`);
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-tVBfUEIi.js");
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-CBCDWuyo.js");
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-BL4oizD6.js");
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-Bx_fm5M-.js");
5122
+ const { runSetupApple } = await import("./apple-Dyr7OFBx.js");
5112
5123
  return runSetupApple(ctx, input);
5113
5124
  }
5114
5125
  });
@@ -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-7_8cBgBm.js");
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-DEyveHS6.js");
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-Cv-Ug9JF.js");
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-BQO-1ScY.js");
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-B3Onn_mL.js");
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-BhRswq6x.js");
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-B3Onn_mL.js");
8021
+ const { runPush } = await import("./push-CJVfvFZq.js");
8011
8022
  return runPush(ctx, input, false);
8012
8023
  }
8013
8024
  });
@@ -8124,7 +8135,7 @@ function resourceHelp(resource) {
8124
8135
  })),
8125
8136
  {
8126
8137
  title: "Related",
8127
- lines: table((resource.related ?? []).map(([command$69, text]) => [`superwall ${command$69}`, pc.dim(text)]), ([left]) => left.length)
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",
@@ -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-DUQjxOZf.js");
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-B675ZNiA.js");
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}.`);
@@ -8726,15 +8737,15 @@ async function runOperation(ctx, owner, resource, op$1, args, flags) {
8726
8737
  }
8727
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$69 = `superwall ${owner === resource ? "" : `${owner.name} `}${resource.name} ${op$1.name}`;
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$69} has no API endpoint.`);
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$69} ${usageOf(owner, op$1)}\nRun \`${command$69} --help\` for its flags.`);
8737
- if (args.length > positional.length) throw new Error(`${command$69} takes ${positional.length || "no"} argument${positional.length === 1 ? "" : "s"}; got "${args.slice(positional.length).join(" ")}".`);
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));
@@ -8754,7 +8765,7 @@ async function callOperation(context, owner, resource, op$1, ids, flags, merged
8754
8765
  if (queryParam) query[field$1] = coerce(raw, queryParam.type);
8755
8766
  else if (bodyField) body[field$1] = coerce(raw, bodyField.type);
8756
8767
  else if (!spec) (sendsBody ? body : query)[field$1] = raw;
8757
- else throw new Error(`${command$69} has no ${toFlag(field$1)}. \`${command$69} --help\` lists what it takes.`);
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$69} needs ${needs.join(" and ")}.`);
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$69} needs ${param}.`);
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, {
@@ -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$69 = nested ? `${owner.name} ${nested.name}` : owner.name;
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$69} has no "${opName}". It takes: ${[...known, ...nestedNames].join(", ")}.\nRun superwall ${command$69} --help for what each does.`, command$69);
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
  }
@@ -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-Df2GwS4K.js");
10080
+ const { runDoctor } = await import("./doctor-XtXW6tKE.js");
10070
10081
  return runDoctor(ctx);
10071
10082
  }
10072
10083
  });
@@ -10411,7 +10422,7 @@ const command$64 = defineCommand({
10411
10422
  prompts: true,
10412
10423
  mcp: false,
10413
10424
  async run(ctx, input) {
10414
- const { runSkills } = await import("./skills-DzOvse9L.js");
10425
+ const { runSkills } = await import("./skills-8um2fBPS.js");
10415
10426
  return runSkills(ctx, input);
10416
10427
  }
10417
10428
  });
@@ -10427,14 +10438,600 @@ const command$65 = defineCommand({
10427
10438
  prompts: true,
10428
10439
  mcp: false,
10429
10440
  async run(ctx) {
10430
- const { runUpgrade } = await import("./upgrade-AdyF7wXk.js");
10441
+ const { runUpgrade } = await import("./upgrade-CoWCEnoi.js");
10431
10442
  return runUpgrade(ctx, AUTO_UPDATE_TARGET());
10432
10443
  }
10433
10444
  });
10434
10445
 
10435
10446
  //#endregion
10436
- //#region src/commands/workflows/integrate.ts
10447
+ //#region src/commands/workspaces/approve.ts
10437
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({
10438
11035
  name: "integrate",
10439
11036
  summary: "Set up the SDK, placements, and dashboard in your app",
10440
11037
  flags: {
@@ -10466,8 +11063,8 @@ const command$66 = defineCommand({
10466
11063
  prompts: true,
10467
11064
  mcp: false,
10468
11065
  async run(ctx, { flags }) {
10469
- const { runIntegrate } = await import("./integrate-Cz48dm_h.js");
10470
- const { printPlaybook } = await import("./playbook-BJ3opYIS.js");
11066
+ const { runIntegrate } = await import("./integrate-qvKd9pVW.js");
11067
+ const { printPlaybook } = await import("./playbook-Du4Oydbf.js");
10471
11068
  if (flags.skill) return printPlaybook(ctx.installDir, "integrate");
10472
11069
  await runIntegrate({
10473
11070
  ...ctx,
@@ -10479,7 +11076,7 @@ const command$66 = defineCommand({
10479
11076
 
10480
11077
  //#endregion
10481
11078
  //#region src/commands/workflows/migrate.ts
10482
- const command$67 = defineCommand({
11079
+ const command$80 = defineCommand({
10483
11080
  name: "migrate",
10484
11081
  summary: "Migrate from RevenueCat / Adapty / Qonversion, or rebuild a paywall or native screen as code",
10485
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" } },
@@ -10513,8 +11110,8 @@ const command$67 = defineCommand({
10513
11110
  prompts: true,
10514
11111
  mcp: false,
10515
11112
  async run(ctx, { args, flags }) {
10516
- const { runPaywallMigration, runProviderMigration, runScreenMigration } = await import("./migrate-DaVwhdov.js");
10517
- const { printPlaybook } = await import("./playbook-BJ3opYIS.js");
11113
+ const { runPaywallMigration, runProviderMigration, runScreenMigration } = await import("./migrate-SkkLLdmr.js");
11114
+ const { printPlaybook } = await import("./playbook-Du4Oydbf.js");
10518
11115
  if (flags.screen !== void 0) return runScreenMigration(ctx, {
10519
11116
  path: flags.screen,
10520
11117
  screenshot: flags.screenshot
@@ -10527,7 +11124,7 @@ const command$67 = defineCommand({
10527
11124
 
10528
11125
  //#endregion
10529
11126
  //#region src/commands/workflows/review.ts
10530
- const command$68 = defineCommand({
11127
+ const command$81 = defineCommand({
10531
11128
  name: "review",
10532
11129
  summary: "Review an existing Superwall setup end to end",
10533
11130
  flags: {
@@ -10548,8 +11145,8 @@ const command$68 = defineCommand({
10548
11145
  prompts: true,
10549
11146
  mcp: false,
10550
11147
  async run(ctx, { flags }) {
10551
- const { runReview } = await import("./integrate-Cz48dm_h.js");
10552
- const { printPlaybook } = await import("./playbook-BJ3opYIS.js");
11148
+ const { runReview } = await import("./integrate-qvKd9pVW.js");
11149
+ const { printPlaybook } = await import("./playbook-Du4Oydbf.js");
10553
11150
  if (flags.skill) return printPlaybook(ctx.installDir, flags.fix ? "review-fix" : "review");
10554
11151
  await runReview(ctx, flags.fix);
10555
11152
  }
@@ -10563,9 +11160,9 @@ const GROUPS = [
10563
11160
  title: "Workflows",
10564
11161
  notes: ["Each takes --skill to print the playbook instead of running."],
10565
11162
  commands: [
10566
- command$66,
10567
- command$68,
10568
- command$67
11163
+ command$79,
11164
+ command$81,
11165
+ command$80
10569
11166
  ]
10570
11167
  },
10571
11168
  {
@@ -10582,6 +11179,32 @@ const GROUPS = [
10582
11179
  command$50
10583
11180
  ]
10584
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
+ },
10585
11208
  {
10586
11209
  id: "main",
10587
11210
  title: "Commands",
@@ -10810,7 +11433,7 @@ function visible(channel) {
10810
11433
  function listGroups() {
10811
11434
  return GROUPS.filter((group$1) => visible(group$1.channel)).map((group$1) => ({
10812
11435
  ...group$1,
10813
- commands: group$1.commands.filter((command$69) => visible(command$69.channel))
11436
+ commands: group$1.commands.filter((command$82) => visible(command$82.channel))
10814
11437
  }));
10815
11438
  }
10816
11439