@superwall/cli 2.3.1 → 2.4.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 (76) hide show
  1. package/README.md +10 -0
  2. package/dist/{apple-z2qjOzIZ.js → apple-Bx_fm5M-.js} +14 -14
  3. package/dist/{assets-DXXegdDt.js → assets-W5yvyf0V.js} +3 -3
  4. package/dist/auth.js +3 -3
  5. package/dist/{billing-B8tOjsnY.js → billing-C4lXR0xG.js} +3 -3
  6. package/dist/{bind-Bx9K6LwP.js → bind-82oTpHZ3.js} +4 -4
  7. package/dist/{build-Bu2kkzRe.js → build-7_8cBgBm.js} +8 -8
  8. package/dist/{client-DOgk9gAS.js → client-ltxxHuxn.js} +3 -3
  9. package/dist/{config-BO1Y87kV.js → config-CGcG7GOt.js} +9 -1
  10. package/dist/create-CBCDWuyo.js +19 -0
  11. package/dist/{create-DzC_89gq.js → create-DEyveHS6.js} +29 -29
  12. package/dist/{create-B03MAuPe.js → create-Dk8U_B49.js} +6 -6
  13. package/dist/{doctor-BGZSKY_B.js → doctor-Df2GwS4K.js} +6 -6
  14. package/dist/{drivers-DqLgQxkC.js → drivers-CTyYdBL7.js} +4 -4
  15. package/dist/entry.js +63 -28
  16. package/dist/{environment-i8BhiBDB.js → environment-djS0ik60.js} +8 -2
  17. package/dist/{existing-BPOG5zLO.js → existing-Das3PHGG.js} +2 -2
  18. package/dist/{held-C56PYMRH.js → held-B8EFWDEc.js} +6 -6
  19. package/dist/held-BL4oizD6.js +16 -0
  20. package/dist/{integrate-DZ4Qvoch.js → integrate-Cz48dm_h.js} +23 -23
  21. package/dist/{log-NVhVe_oe.js → log-C0MDCfA2.js} +1 -1
  22. package/dist/{login-ONZdK8vN.js → login-CiK5T4w8.js} +7 -7
  23. package/dist/login-DdrOmi6m.js +16 -0
  24. package/dist/{login-p9GVEKzD.js → login-girc324T.js} +1 -1
  25. package/dist/{lookup-flTi0at0.js → lookup-us5vu5od.js} +3 -3
  26. package/dist/{migrate-DnXpbhL1.js → migrate-DaVwhdov.js} +27 -27
  27. package/dist/{migration-DJ1uNKhk.js → migration-cS6UGeUj.js} +10 -10
  28. package/dist/{notification-url-CCDeS5S-.js → notification-url-Hg42tAbW.js} +2 -2
  29. package/dist/{open-QdsZ_N47.js → open-BIuOZ9ka.js} +2 -2
  30. package/dist/{org-BiFPjoHD.js → org-BrR4HGvl.js} +2 -2
  31. package/dist/{paths-yRgm5Jpa.js → paths-CdwjySxK.js} +2 -2
  32. package/dist/{playbook-B-pRKNa4.js → playbook-BJ3opYIS.js} +11 -11
  33. package/dist/{promote-Djzk4C81.js → promote-BQO-1ScY.js} +19 -19
  34. package/dist/{pull-BLA9XwHj.js → pull-BhRswq6x.js} +24 -24
  35. package/dist/push-B3Onn_mL.js +24 -0
  36. package/dist/{push-gSBxGDik.js → push-CR110qRh.js} +7 -7
  37. package/dist/{registry-D3xmWk9p.js → registry-DZsWoWqH.js} +239 -130
  38. package/dist/{resources-BTnczJCA.js → resources-BMspgZO1.js} +2 -2
  39. package/dist/{run-C1SoizcJ.js → run-D4V6mq8_.js} +2 -2
  40. package/dist/{scan-Dwk_lT5q.js → scan-CRexsHOE.js} +1 -1
  41. package/dist/scan-DUQjxOZf.js +4 -0
  42. package/dist/{scope-Db7blD-l.js → scope-Ct0_HoNq.js} +5 -5
  43. package/dist/{selection-u2KiKu_d.js → selection-CgZJJ3FD.js} +2 -2
  44. package/dist/server-Cv-Ug9JF.js +24 -0
  45. package/dist/{server-Cb2N75JL.js → server-Dv1VwbNh.js} +8 -8
  46. package/dist/session-BCQuMcQ0.js +6 -0
  47. package/dist/{session-BDLQUJyV.js → session-CV0P8BjK.js} +7 -7
  48. package/dist/{session-CnDJp_HO.js → session-UiPlLFn6.js} +1 -1
  49. package/dist/{setup-BLahHpgy.js → setup-UWLhQG3M.js} +8 -8
  50. package/dist/skills/superwall-framework/SKILL.md +4 -3
  51. package/dist/skills/superwall-framework/references/onboarding-state.md +21 -14
  52. package/dist/{skills-zebMTZyr.js → skills-CiWxt6vS.js} +15 -9
  53. package/dist/skills-DzOvse9L.js +14 -0
  54. package/dist/{source-push-DxuJuwEf.js → source-push-CX_k_yZD.js} +5 -5
  55. package/dist/{spinner-BN3U1CVB.js → spinner-1uuKKZMc.js} +4 -4
  56. package/dist/{storage-VagEaaJC.js → storage-CrXGgIbS.js} +1 -1
  57. package/dist/storekit-B675ZNiA.js +16 -0
  58. package/dist/{storekit-CoOf4Rvh.js → storekit-CptdG4RJ.js} +3 -3
  59. package/dist/{telemetry-CM0BDwCK.js → telemetry-BqaPbM0k.js} +2 -2
  60. package/dist/{token-lUUOkTJA.js → token-zjjlkNDF.js} +1 -1
  61. package/dist/tools.js +124 -49
  62. package/dist/upgrade-AdyF7wXk.js +7 -0
  63. package/dist/upgrade-BBnmcyY2.js +206 -0
  64. package/package.json +2 -2
  65. package/prompts/commandments.xml +2 -0
  66. package/dist/create-BdZS_T68.js +0 -19
  67. package/dist/held-DSNUY-NZ.js +0 -16
  68. package/dist/login-Blrkm6oi.js +0 -16
  69. package/dist/push-BkMgOT6X.js +0 -24
  70. package/dist/scan-Kp-MAutK.js +0 -4
  71. package/dist/server-psYghr9K.js +0 -24
  72. package/dist/session-CehHJWZk.js +0 -6
  73. package/dist/skills-DDV4zcLR.js +0 -14
  74. package/dist/storekit-BcBb2jXB.js +0 -16
  75. package/dist/upgrade-CpTJv_M7.js +0 -7
  76. package/dist/upgrade-DZbKb67W.js +0 -117
@@ -1,21 +1,21 @@
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 { a as CHANNEL, g as TELEMETRY_KEY, h as TELEMETRY_HOST, t as API_HOST, v as VERSION, x as detectAgent } from "./environment-i8BhiBDB.js";
3
- import { n as readSession } from "./storage-VagEaaJC.js";
4
- import { a as withQuery$1, t as ApiError } from "./client-DOgk9gAS.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-C56PYMRH.js";
6
- import { n as readDefaultApp, r as readOnboardedApp, t as readAnonymousId, u as writeDefaultApp } from "./config-BO1Y87kV.js";
7
- import { a as defineCommand, d as readInput, i as defineCatalog, r as UsageError, t as apiCall } from "./spinner-BN3U1CVB.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";
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";
8
8
  import { n as fg, t as THEME } from "./theme-DUsCh-Vd.js";
9
- import { n as runWhoami } from "./session-CnDJp_HO.js";
10
- import { F as orgIdOf, M as textField, N as listOrgGroups, 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-BTnczJCA.js";
11
- import { n as orgForNewProject } from "./org-BiFPjoHD.js";
12
- import { n as findApplication, r as findProject, t as appNotFound } from "./lookup-flTi0at0.js";
13
- import { a as pickScope, i as pickProject, n as chooseApp, r as pickOrganization, t as boundOrganization } from "./scope-Db7blD-l.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
14
  import { a as listAscConfigs, i as findAppNotificationUrl, o as removeAscConfig, t as ascProxy } from "./client-BZ1UbpXz.js";
15
15
  import { i as listUnimportedAscProducts, n as findAscAppId, r as listAscApps, t as ascTypeDisplay } from "./products-DH_fK9tY.js";
16
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-CCDeS5S-.js";
18
- import { t as platformForIntegration } from "./bind-Bx9K6LwP.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";
19
19
  import pc from "picocolors";
20
20
 
21
21
  //#region src/ui/help-layout.ts
@@ -142,7 +142,7 @@ const command = defineCommand({
142
142
  prompts: true,
143
143
  mcp: false,
144
144
  async run(ctx, input) {
145
- const { runLogin } = await import("./login-Blrkm6oi.js");
145
+ const { runLogin } = await import("./login-DdrOmi6m.js");
146
146
  return runLogin(ctx, input);
147
147
  }
148
148
  });
@@ -158,7 +158,7 @@ const command$1 = defineCommand({
158
158
  prompts: true,
159
159
  mcp: false,
160
160
  async run(ctx) {
161
- const { runLogout } = await import("./session-CehHJWZk.js");
161
+ const { runLogout } = await import("./session-BCQuMcQ0.js");
162
162
  return runLogout(ctx);
163
163
  }
164
164
  });
@@ -372,13 +372,13 @@ function fieldsOf(schema, depth = 0) {
372
372
  const object = objectOf$1(schema);
373
373
  if (!object?.properties || depth >= MAX_DEPTH$1) return void 0;
374
374
  const required = new Set(object.required ?? []);
375
- return Object.entries(object.properties).map(([name, field]) => {
376
- const nested = fieldsOf(field, depth + 1);
375
+ return Object.entries(object.properties).map(([name, field$1]) => {
376
+ const nested = fieldsOf(field$1, depth + 1);
377
377
  return {
378
378
  name,
379
- type: typeOf(field),
379
+ type: typeOf(field$1),
380
380
  required: required.has(name),
381
- ...field.description ? { description: oneLine(field.description) } : {},
381
+ ...field$1.description ? { description: oneLine(field$1.description) } : {},
382
382
  ...nested ? { fields: nested } : {}
383
383
  };
384
384
  });
@@ -510,8 +510,8 @@ function findOperations(index, path, method) {
510
510
  }
511
511
  const line = (op$1) => `${op$1.method.padEnd(6)} ${op$1.path} — ${op$1.summary}`;
512
512
  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} `)];
513
+ return fields.flatMap((field$1) => {
514
+ return [`${indent}${field$1.name}${field$1.required ? "" : "?"}: ${field$1.type}${field$1.description ? ` — ${field$1.description}` : ""}`, ...renderFields(field$1.fields ?? [], `${indent} `)];
515
515
  });
516
516
  }
517
517
  function renderOperation(op$1) {
@@ -1156,8 +1156,8 @@ const SEARCHED_FIELDS = [
1156
1156
  ];
1157
1157
  function rowMatches(row, query) {
1158
1158
  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);
1159
+ return Object.entries(row).some(([field$1, value$1]) => {
1160
+ return SEARCHED_FIELDS.includes(field$1) && (typeof value$1 === "string" || typeof value$1 === "number") && String(value$1).toLowerCase().includes(needle);
1161
1161
  });
1162
1162
  }
1163
1163
  function matchingProjects(projects, query) {
@@ -1197,14 +1197,14 @@ function renderObject(value$1, indent = "", depth = 0) {
1197
1197
  const width = Math.max(0, ...keys.map((key) => key.length)) + 2;
1198
1198
  const out = [];
1199
1199
  for (const key of keys) {
1200
- const field = value$1[key];
1200
+ const field$1 = value$1[key];
1201
1201
  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)) {
1202
+ if (isScalar(field$1)) out.push(`${label}${scalar(field$1)}`);
1203
+ else if (Array.isArray(field$1)) out.push(...renderArray(label, field$1, indent, depth));
1204
+ else if (isRecord(field$1) && depth >= MAX_DEPTH) out.push(`${label}${pc.dim(`{ ${Object.keys(field$1).length} fields }`)}`);
1205
+ else if (isRecord(field$1)) {
1206
1206
  out.push(`${indent}${pc.dim(key)}`);
1207
- out.push(...renderObject(field, `${indent} `, depth + 1));
1207
+ out.push(...renderObject(field$1, `${indent} `, depth + 1));
1208
1208
  }
1209
1209
  }
1210
1210
  return out;
@@ -3469,7 +3469,7 @@ A purchase_key is for the app's bundle ID; an app with none gets --bundle-id sav
3469
3469
  prompts: true,
3470
3470
  mcp: false,
3471
3471
  async run(ctx, input) {
3472
- const { runAscKeysCreate } = await import("./create-BdZS_T68.js");
3472
+ const { runAscKeysCreate } = await import("./create-CBCDWuyo.js");
3473
3473
  return runAscKeysCreate(ctx, input);
3474
3474
  }
3475
3475
  });
@@ -3856,7 +3856,7 @@ With --app it saves the key you hold on that app instead, as asc keys create --k
3856
3856
  prompts: true,
3857
3857
  mcp: false,
3858
3858
  async run(ctx, { args, flags }) {
3859
- const { upsertHeldKey: upsertHeldKey$1 } = await import("./held-DSNUY-NZ.js");
3859
+ const { upsertHeldKey: upsertHeldKey$1 } = await import("./held-BL4oizD6.js");
3860
3860
  return upsertHeldKey$1(ctx, {
3861
3861
  action: "update",
3862
3862
  key: {
@@ -5108,7 +5108,7 @@ Exit codes
5108
5108
  prompts: true,
5109
5109
  mcp: false,
5110
5110
  async run(ctx, input) {
5111
- const { runSetupApple } = await import("./apple-z2qjOzIZ.js");
5111
+ const { runSetupApple } = await import("./apple-Bx_fm5M-.js");
5112
5112
  return runSetupApple(ctx, input);
5113
5113
  }
5114
5114
  });
@@ -6270,9 +6270,9 @@ function buildSelector(input) {
6270
6270
  selector.conditions = conditions;
6271
6271
  }
6272
6272
  if (input.orderBy) {
6273
- const [field, dir] = input.orderBy.split(":");
6273
+ const [field$1, dir] = input.orderBy.split(":");
6274
6274
  selector.orderBy = [{
6275
- field,
6275
+ field: field$1,
6276
6276
  sortOrder: (dir ?? "asc").toLowerCase().startsWith("desc") ? "DESCENDING" : "ASCENDING"
6277
6277
  }];
6278
6278
  }
@@ -6622,9 +6622,9 @@ function describeAppleError(error, request) {
6622
6622
  const apple = isRecord(parsed.error) && Array.isArray(parsed.error.errors) ? parsed.error.errors : void 0;
6623
6623
  if (!apple || apple.length === 0) return void 0;
6624
6624
  const lines = apple.filter(isRecord).map((e) => {
6625
- const field = typeof e.field === "string" && e.field ? `${e.field}: ` : "";
6625
+ const field$1 = typeof e.field === "string" && e.field ? `${e.field}: ` : "";
6626
6626
  const code = typeof e.messageCode === "string" && e.messageCode ? ` (${e.messageCode})` : "";
6627
- return ` • ${field}${String(e.message ?? "")}${code}`;
6627
+ return ` • ${field$1}${String(e.message ?? "")}${code}`;
6628
6628
  });
6629
6629
  return /* @__PURE__ */ new Error(`Apple Search Ads rejected ${request} (${error.status}):\n${lines.join("\n")}`);
6630
6630
  }
@@ -7739,7 +7739,7 @@ const command$45 = defineCommand({
7739
7739
  prompts: true,
7740
7740
  mcp: false,
7741
7741
  async run(ctx, { args, flags }) {
7742
- const { runBuildPipeline } = await import("./build-Bu2kkzRe.js");
7742
+ const { runBuildPipeline } = await import("./build-7_8cBgBm.js");
7743
7743
  await runBuildPipeline({
7744
7744
  output: ctx.output,
7745
7745
  json: ctx.json
@@ -7800,7 +7800,7 @@ const command$46 = defineCommand({
7800
7800
  prompts: true,
7801
7801
  mcp: false,
7802
7802
  async run(ctx, { args, flags }) {
7803
- const { runCreate } = await import("./create-DzC_89gq.js");
7803
+ const { runCreate } = await import("./create-DEyveHS6.js");
7804
7804
  return runCreate(ctx, {
7805
7805
  dir: args.dir,
7806
7806
  ...flags
@@ -7843,7 +7843,7 @@ const command$47 = defineCommand({
7843
7843
  prompts: true,
7844
7844
  mcp: false,
7845
7845
  async run(ctx, { args, flags }) {
7846
- const { runStudio } = await import("./server-psYghr9K.js");
7846
+ const { runStudio } = await import("./server-Cv-Ug9JF.js");
7847
7847
  await runStudio({
7848
7848
  dirs: args.dir,
7849
7849
  port: flags.port,
@@ -7883,7 +7883,7 @@ const command$48 = defineCommand({
7883
7883
  prompts: true,
7884
7884
  mcp: false,
7885
7885
  async run(ctx, input) {
7886
- const { runPromote } = await import("./promote-Djzk4C81.js");
7886
+ const { runPromote } = await import("./promote-BQO-1ScY.js");
7887
7887
  return runPromote(ctx, input);
7888
7888
  }
7889
7889
  });
@@ -7927,7 +7927,7 @@ const command$49 = defineCommand({
7927
7927
  prompts: true,
7928
7928
  mcp: false,
7929
7929
  async run(ctx, input) {
7930
- const { runPush } = await import("./push-BkMgOT6X.js");
7930
+ const { runPush } = await import("./push-B3Onn_mL.js");
7931
7931
  return runPush(ctx, input, true);
7932
7932
  }
7933
7933
  });
@@ -7963,7 +7963,7 @@ const command$50 = defineCommand({
7963
7963
  prompts: true,
7964
7964
  mcp: false,
7965
7965
  async run(ctx, input) {
7966
- const { runPull } = await import("./pull-BLA9XwHj.js");
7966
+ const { runPull } = await import("./pull-BhRswq6x.js");
7967
7967
  return runPull(ctx, input);
7968
7968
  }
7969
7969
  });
@@ -8007,7 +8007,7 @@ const command$51 = defineCommand({
8007
8007
  prompts: true,
8008
8008
  mcp: false,
8009
8009
  async run(ctx, input) {
8010
- const { runPush } = await import("./push-BkMgOT6X.js");
8010
+ const { runPush } = await import("./push-B3Onn_mL.js");
8011
8011
  return runPush(ctx, input, false);
8012
8012
  }
8013
8013
  });
@@ -8055,13 +8055,13 @@ function scopeFields(op$1, spec) {
8055
8055
  }] : [];
8056
8056
  });
8057
8057
  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") ? [{
8058
+ const body = (spec?.body ?? []).flatMap((field$1) => {
8059
+ const kind = SCOPE_PARAMS[field$1.name];
8060
+ return kind && (field$1.required || op$1.method === "POST") ? [{
8061
8061
  location: "body",
8062
- name: field.name,
8062
+ name: field$1.name,
8063
8063
  kind,
8064
- type: field.type
8064
+ type: field$1.type
8065
8065
  }] : [];
8066
8066
  });
8067
8067
  return [...query, ...body];
@@ -8135,12 +8135,12 @@ function resourceHelp(resource) {
8135
8135
  });
8136
8136
  }
8137
8137
  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();
8138
+ return fields.map((field$1) => {
8139
+ const flag$1 = `--${field$1.name.replace(/_/g, "-")}`;
8140
+ const bare = field$1.type.replace(/\s*\|\s*null\b/g, "").trim();
8141
8141
  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 ?? ""}`];
8142
+ const required = field$1.required ? `${pc.yellow("required")} ` : "";
8143
+ return [`${cmd(flag$1)}${type}`, `${required}${field$1.description ?? ""}`];
8144
8144
  });
8145
8145
  }
8146
8146
  async function operationHelp(owner, resource, op$1) {
@@ -8158,7 +8158,7 @@ async function operationHelp(owner, resource, op$1) {
8158
8158
  "ending_before",
8159
8159
  "iterator"
8160
8160
  ].includes(param.name) && !typed.has(param.name) && !SCOPE_PARAMS[param.name]);
8161
- const body = (spec?.body ?? []).filter((field) => !SCOPE_PARAMS[field.name]);
8161
+ const body = (spec?.body ?? []).filter((field$1) => !SCOPE_PARAMS[field$1.name]);
8162
8162
  flagRows.push(...formatFieldRows(params), ...formatFieldRows(body));
8163
8163
  flagRows.push(...(op$1.flags ?? []).map(([flag$1, text]) => [cmd(flag$1), text]));
8164
8164
  }
@@ -8270,7 +8270,7 @@ async function findAppView(ctx, ref) {
8270
8270
  }
8271
8271
  const ok = (text) => `${pc.green("✓")} ${text}`;
8272
8272
  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);
8273
+ const value = (field$1) => field$1 === null || field$1 === void 0 || field$1 === "" ? pc.dim("—") : String(field$1);
8274
8274
  function section(title, rows) {
8275
8275
  const shown = rows.filter(([, text]) => text !== "");
8276
8276
  if (shown.length === 0) return [];
@@ -8402,7 +8402,7 @@ async function createApp(context, api, nameArg, fields) {
8402
8402
  let name = nameArg;
8403
8403
  let platform = textOf(fields.platform);
8404
8404
  if (interactive && (!name || !platform)) {
8405
- const { scanProject } = await import("./scan-Kp-MAutK.js");
8405
+ const { scanProject } = await import("./scan-DUQjxOZf.js");
8406
8406
  const detected = (await scanProject(context.installDir).catch(() => null))?.apps[0];
8407
8407
  if (detected && !name && !platform) {
8408
8408
  ui.info(`Detected \`${detected.framework.name}\`` + (detected.details ? ` · \`${detected.details}\`` : ""));
@@ -8712,7 +8712,7 @@ async function runResource(ctx, resource, action, value$1, value2, flags) {
8712
8712
  if (action === "create") return create(ctx, ctx.api, resource, value$1, value2, flags);
8713
8713
  if (action === "use" && resource === "apps") return useApp(ctx, ctx.api, value$1);
8714
8714
  if (action === "storekit" && resource === "products") {
8715
- const { writeStoreKit } = await import("./storekit-BcBb2jXB.js");
8715
+ const { writeStoreKit } = await import("./storekit-B675ZNiA.js");
8716
8716
  return writeStoreKit(ctx, ctx.api, flags.fields.out);
8717
8717
  }
8718
8718
  throw new Error(`Unknown action "${action}" for ${resource}.`);
@@ -8724,7 +8724,7 @@ async function runOperation(ctx, owner, resource, op$1, args, flags) {
8724
8724
  if (!handler) throw new Error(`${name} has no handler "${op$1.handler}".`);
8725
8725
  return handler(ctx, resource, op$1, args, flags);
8726
8726
  }
8727
- const toFlag = (field) => `--${field.replace(/_/g, "-")}`;
8727
+ const toFlag = (field$1) => `--${field$1.replace(/_/g, "-")}`;
8728
8728
  async function callOperation(context, owner, resource, op$1, ids, flags, merged = {}) {
8729
8729
  const command$69 = `superwall ${owner === resource ? "" : `${owner.name} `}${resource.name} ${op$1.name}`;
8730
8730
  const { method, path: template } = op$1;
@@ -8745,16 +8745,16 @@ async function callOperation(context, owner, resource, op$1, ids, flags, merged
8745
8745
  else pathValues.set(param, value$1);
8746
8746
  }
8747
8747
  const body = {};
8748
- const bodyFields = new Map((spec?.body ?? []).map((field) => [field.name, field]));
8748
+ const bodyFields = new Map((spec?.body ?? []).map((field$1) => [field$1.name, field$1]));
8749
8749
  const sendsBody = method !== "GET" && method !== "DELETE";
8750
8750
  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$69} has no ${toFlag(field)}. \`${command$69} --help\` lists what it takes.`);
8751
+ const field$1 = fieldName(flag$1);
8752
+ const queryParam = spec?.params.find((param) => param.in === "query" && param.name === field$1);
8753
+ const bodyField = bodyFields.get(field$1);
8754
+ if (queryParam) query[field$1] = coerce(raw, queryParam.type);
8755
+ else if (bodyField) body[field$1] = coerce(raw, bodyField.type);
8756
+ 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.`);
8758
8758
  }
8759
8759
  Object.assign(sendsBody ? body : query, parseParams(flags.data));
8760
8760
  await fillScope(ctx, op$1, spec, pathValues, query, body);
@@ -8802,13 +8802,13 @@ async function fillScope(ctx, op$1, spec, pathValues, query, body) {
8802
8802
  kind,
8803
8803
  assign: (v) => pathValues.set(param, v)
8804
8804
  });
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)
8805
+ for (const field$1 of scopeFields(op$1, spec)) {
8806
+ const target = field$1.location === "query" ? query : body;
8807
+ if (target[field$1.name] !== void 0) continue;
8808
+ const typed = (value$1) => field$1.location === "query" ? value$1 : coerce(value$1, field$1.type);
8809
+ wanted.set(`${field$1.location}:${field$1.name}`, {
8810
+ kind: field$1.kind,
8811
+ assign: (value$1) => target[field$1.name] = typed(value$1)
8812
8812
  });
8813
8813
  }
8814
8814
  if (wanted.size === 0) return;
@@ -8942,15 +8942,15 @@ function schemaOfType(type, fields) {
8942
8942
  function objectOf(fields) {
8943
8943
  return {
8944
8944
  type: "object",
8945
- properties: Object.fromEntries(fields.map((field) => [field.name, schemaOfField(field)])),
8946
- required: fields.filter((field) => field.required).map((field) => field.name)
8945
+ properties: Object.fromEntries(fields.map((field$1) => [field$1.name, schemaOfField(field$1)])),
8946
+ required: fields.filter((field$1) => field$1.required).map((field$1) => field$1.name)
8947
8947
  };
8948
8948
  }
8949
- function schemaOfField(field) {
8950
- const schema = schemaOfType(field.type, field.fields);
8951
- return field.description ? {
8949
+ function schemaOfField(field$1) {
8950
+ const schema = schemaOfType(field$1.type, field$1.fields);
8951
+ return field$1.description ? {
8952
8952
  ...schema,
8953
- description: field.description
8953
+ description: field$1.description
8954
8954
  } : schema;
8955
8955
  }
8956
8956
  function schemaOfFlag(spec, describe$1) {
@@ -8977,7 +8977,7 @@ async function toolOf(owner, resource, op$1, flags) {
8977
8977
  required.push(param);
8978
8978
  }
8979
8979
  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)];
8980
+ const scoped = [...scopeParams(op$1).values(), ...scopeFields(op$1, spec).map((field$1) => field$1.kind)];
8981
8981
  if (owner.appArg || scoped.length > 0 || op$1.handler) properties.app = APP;
8982
8982
  if (scoped.includes("project") && !scoped.includes("app")) properties.project = {
8983
8983
  type: "string",
@@ -8993,10 +8993,10 @@ async function toolOf(owner, resource, op$1, flags) {
8993
8993
  properties[param.name] = schemaOfField(param);
8994
8994
  if (param.required) required.push(param.name);
8995
8995
  }
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);
8996
+ for (const field$1 of spec?.body ?? []) {
8997
+ if (known.has(field$1.name)) continue;
8998
+ properties[field$1.name] = schemaOfField(field$1);
8999
+ if (field$1.required) required.push(field$1.name);
9000
9000
  }
9001
9001
  for (const [flag$1, describe$1] of op$1.flags ?? []) {
9002
9002
  const name = snakeOf(flag$1.split(/[ ,]/).find((part) => part.startsWith("--")) ?? "");
@@ -10066,7 +10066,7 @@ const command$62 = defineCommand({
10066
10066
  prompts: true,
10067
10067
  mcp: false,
10068
10068
  async run(ctx) {
10069
- const { runDoctor } = await import("./doctor-BGZSKY_B.js");
10069
+ const { runDoctor } = await import("./doctor-Df2GwS4K.js");
10070
10070
  return runDoctor(ctx);
10071
10071
  }
10072
10072
  });
@@ -10095,13 +10095,6 @@ function parseContext(pairs) {
10095
10095
  }
10096
10096
  return out;
10097
10097
  }
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
10098
  function readAttachments(paths) {
10106
10099
  if (paths.length > MAX_FILES) throw new Error(`Attach at most ${MAX_FILES} files.`);
10107
10100
  return paths.map((path) => {
@@ -10114,7 +10107,99 @@ function readAttachments(paths) {
10114
10107
  };
10115
10108
  });
10116
10109
  }
10117
- function buildFeedbackEvent(feedback, via, distinctId, session, osRelease) {
10110
+ async function resolveFeedbackTarget(api, { app: app$1, project: project$1 }, cwd = proc?.cwd() ?? "") {
10111
+ if (app$1) {
10112
+ const dashboard = parseDashboardUrl(app$1);
10113
+ if (dashboard) return {
10114
+ applicationId: dashboard.applicationId,
10115
+ organizationId: dashboard.orgId,
10116
+ projectId: project$1
10117
+ };
10118
+ if (/^\d+$/.test(app$1) || !api) return {
10119
+ applicationId: app$1,
10120
+ projectId: project$1
10121
+ };
10122
+ const found = await findApplication(api, app$1).catch(() => null);
10123
+ if (found === null) return {
10124
+ applicationId: app$1,
10125
+ projectId: project$1
10126
+ };
10127
+ if (!found) throw appNotFound(app$1);
10128
+ return {
10129
+ applicationId: String(found.app.id),
10130
+ projectId: String(found.project.id),
10131
+ organizationId: orgIdOf(found.project)
10132
+ };
10133
+ }
10134
+ if (project$1) {
10135
+ const found = api ? await findProject(api, project$1).catch(() => void 0) : void 0;
10136
+ return {
10137
+ projectId: project$1,
10138
+ organizationId: found && orgIdOf(found)
10139
+ };
10140
+ }
10141
+ const linked = readOnboardedApp(cwd);
10142
+ return {
10143
+ projectId: linked?.projectId,
10144
+ applicationId: linked?.applicationId
10145
+ };
10146
+ }
10147
+ const numericId = (id$1) => id$1 !== void 0 && /^\d+$/.test(id$1) ? Number(id$1) : void 0;
10148
+ function buildFeedbackBody(feedback, via) {
10149
+ const applicationId = numericId(feedback.applicationId);
10150
+ const context = feedback.projectId ? {
10151
+ project: feedback.projectId,
10152
+ ...feedback.context
10153
+ } : feedback.context;
10154
+ return {
10155
+ kind: feedback.kind,
10156
+ message: feedback.message,
10157
+ title: feedback.title,
10158
+ use_case: feedback.useCase,
10159
+ command: feedback.command,
10160
+ application_id: applicationId,
10161
+ organization_id: applicationId === void 0 ? numericId(feedback.organizationId) : void 0,
10162
+ context,
10163
+ attachments: feedback.attachments,
10164
+ agent: feedback.agent,
10165
+ via,
10166
+ cli_version: VERSION
10167
+ };
10168
+ }
10169
+ function parseFeedbackReport(value$1) {
10170
+ const request = field(value$1, "request");
10171
+ const outcome = field(value$1, "outcome");
10172
+ const id$1 = field(value$1, "id");
10173
+ if (!isRecord(request) || typeof id$1 !== "number" || outcome !== "created" && outcome !== "merged") return void 0;
10174
+ const count = (key) => {
10175
+ const found = field(request, key);
10176
+ return typeof found === "number" ? found : 0;
10177
+ };
10178
+ const requestId = field(request, "id");
10179
+ return {
10180
+ object: "feedback_report",
10181
+ id: id$1,
10182
+ outcome,
10183
+ request: {
10184
+ id: typeof requestId === "number" ? requestId : 0,
10185
+ title: textField(request, "title") ?? "",
10186
+ kind: textField(request, "kind") ?? "other",
10187
+ status: textField(request, "status") ?? "open",
10188
+ report_count: count("report_count"),
10189
+ organization_count: count("organization_count")
10190
+ }
10191
+ };
10192
+ }
10193
+ const rateLimited = (error) => error instanceof ApiError && error.status === 429;
10194
+ async function sendToApi(api, feedback, via) {
10195
+ try {
10196
+ return parseFeedbackReport(await api.post("/v2/feedback", buildFeedbackBody(feedback, via)));
10197
+ } catch (error) {
10198
+ if (rateLimited(error)) throw error;
10199
+ return;
10200
+ }
10201
+ }
10202
+ function buildFeedbackEvent(feedback, via, distinctId, session, osRelease, report) {
10118
10203
  return {
10119
10204
  api_key: TELEMETRY_KEY(),
10120
10205
  event: "feedback submitted",
@@ -10125,6 +10210,7 @@ function buildFeedbackEvent(feedback, via, distinctId, session, osRelease) {
10125
10210
  title: feedback.title ?? null,
10126
10211
  message: feedback.message,
10127
10212
  kind: feedback.kind,
10213
+ use_case: feedback.useCase ?? null,
10128
10214
  command: feedback.command ?? null,
10129
10215
  project_id: feedback.projectId ?? null,
10130
10216
  application_id: feedback.applicationId ?? null,
@@ -10141,13 +10227,17 @@ function buildFeedbackEvent(feedback, via, distinctId, session, osRelease) {
10141
10227
  ci: proc?.env.CI === "true",
10142
10228
  email: session?.userEmail ?? null,
10143
10229
  org_name: session?.orgName ?? null,
10144
- auth_method: session?.authMethod ?? null
10230
+ auth_method: session?.authMethod ?? null,
10231
+ feedback_report_id: report?.id ?? null,
10232
+ feedback_outcome: report?.outcome ?? null,
10233
+ feedback_request_id: report?.request.id ?? null,
10234
+ feedback_request_title: report?.request.title ?? null
10145
10235
  }
10146
10236
  };
10147
10237
  }
10148
- async function submitFeedback(feedback, via) {
10238
+ async function sendToTelemetry(feedback, via, report) {
10149
10239
  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);
10240
+ const payload = buildFeedbackEvent(feedback, via, readAnonymousId(), readSession(), osRelease, report);
10151
10241
  try {
10152
10242
  return (await fetch(`${TELEMETRY_HOST()}/capture/`, {
10153
10243
  method: "POST",
@@ -10159,14 +10249,19 @@ async function submitFeedback(feedback, via) {
10159
10249
  return false;
10160
10250
  }
10161
10251
  }
10162
- const ORG_LOOKUP_MS = 3e3;
10163
- async function organizationOfApp(api, applicationId) {
10164
- if (!api || !applicationId) return void 0;
10165
- const lookup = findApplication(api, applicationId).then((found) => found ? orgIdOf(found.project) : void 0).catch(() => void 0);
10166
- const timeout = new Promise((resolve) => {
10167
- setTimeout(() => resolve(void 0), ORG_LOOKUP_MS).unref?.();
10168
- });
10169
- return Promise.race([lookup, timeout]);
10252
+ async function submitFeedback(api, feedback, via) {
10253
+ const report = api ? await sendToApi(api, feedback, via) : void 0;
10254
+ const submitted = await sendToTelemetry(feedback, via, report);
10255
+ if (report) return report;
10256
+ return submitted ? {
10257
+ submitted,
10258
+ outcome: "queued"
10259
+ } : { submitted };
10260
+ }
10261
+ function formatFeedbackReport(report) {
10262
+ const { title, report_count, organization_count } = report.request;
10263
+ if (report.outcome === "created") return `Opened a new request: '${title}'`;
10264
+ return `Merged into '${title}' (${plural(report_count, "report")} from ${plural(organization_count, "team")})`;
10170
10265
  }
10171
10266
  async function runFeedback(ctx, { args, flags }) {
10172
10267
  const { ui, json, interactive } = ctx;
@@ -10181,32 +10276,35 @@ async function runFeedback(ctx, { args, flags }) {
10181
10276
  if (answer === null) return void ui.warn("Cancelled.");
10182
10277
  message = answer.trim();
10183
10278
  }
10184
- if (!message) throw new Error("Usage: superwall feedback \"<message>\" [--title ...] [--kind bug] [--file log.txt]");
10279
+ if (!message) throw new Error("Usage: superwall feedback \"<message>\" [--title ...] [--kind bug] [--use-case ...] [--file log.txt]");
10185
10280
  const kind = FEEDBACK_KINDS.find((candidate) => candidate === flags.kind);
10186
10281
  if (!kind) throw new Error(`--kind must be one of: ${FEEDBACK_KINDS.join(", ")}`);
10187
10282
  const agent = flags.agent ?? detectAgent();
10188
10283
  const attachments = readAttachments(flags.file.filter(Boolean));
10189
10284
  const context = parseContext(flags.context);
10190
- const linked = linkedApp();
10191
- const applicationId = flags.app ?? linked.applicationId;
10285
+ const target = await resolveFeedbackTarget(ctx.api, {
10286
+ app: flags.app,
10287
+ project: flags.project
10288
+ });
10192
10289
  const via = agent || !interactive ? "agent" : "human";
10193
10290
  const spin = interactive ? ui.spinner() : null;
10194
10291
  spin?.start("Sending your feedback");
10195
- const ok$1 = await submitFeedback({
10292
+ const result = await submitFeedback(ctx.api, {
10196
10293
  title: flags.title,
10197
10294
  message,
10198
10295
  kind,
10296
+ useCase: flags.useCase,
10199
10297
  command: flags.command,
10200
10298
  agent,
10201
- projectId: flags.project ?? linked.projectId,
10202
- applicationId,
10203
- organizationId: await organizationOfApp(ctx.api, applicationId),
10204
10299
  context,
10205
- attachments
10300
+ attachments,
10301
+ ...target
10206
10302
  }, via);
10207
- spin?.stop(ok$1 ? "Sent" : "Failed to send");
10208
- if (json) return ctx.output.data({ submitted: ok$1 });
10209
- if (!ok$1) throw new Error("Couldn't send your feedback - check your connection and try again.");
10303
+ const sent$1 = "outcome" in result;
10304
+ spin?.stop(sent$1 ? "Sent" : "Failed to send");
10305
+ if (json) return ctx.output.data(result);
10306
+ if (!sent$1) throw new Error("Couldn't send your feedback - check your connection and try again.");
10307
+ if ("request" in result) return void ui.success(formatFeedbackReport(result));
10210
10308
  ui.success("Thank you! We've received your feedback and will read through it. Really appreciate you helping us make Superwall better.");
10211
10309
  }
10212
10310
 
@@ -10215,9 +10313,11 @@ async function runFeedback(ctx, { args, flags }) {
10215
10313
  const command$63 = defineCommand({
10216
10314
  name: "feedback",
10217
10315
  summary: "Report a bug or send feedback to the Superwall team",
10218
- details: `Goes straight to the Superwall team. Pass the app it happened in so the team can find the account. Report anything you confirm doesn't work, as a reproducible report with every ID and version in context. Without a shell, paste the relevant part of a log into the message: a tool cannot attach files.
10316
+ 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.
10317
+
10318
+ 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
10319
 
10220
- Sends the supplied message and context to the Superwall team as a persisted event. Sending cannot be undone; repeating the call can send duplicate feedback.`,
10320
+ Sending cannot be undone; repeating the call sends a duplicate report.`,
10221
10321
  args: { message: { describe: "What happened: what you ran, what you expected, what you got (asked when left out)" } },
10222
10322
  flags: {
10223
10323
  title: {
@@ -10231,6 +10331,11 @@ Sends the supplied message and context to the Superwall team as a persisted even
10231
10331
  default: "other",
10232
10332
  describe: "What this is"
10233
10333
  },
10334
+ useCase: {
10335
+ type: "string",
10336
+ value: "text",
10337
+ describe: "What the customer is trying to do, and why they need it"
10338
+ },
10234
10339
  command: {
10235
10340
  type: "string",
10236
10341
  value: "text",
@@ -10263,11 +10368,15 @@ Sends the supplied message and context to the Superwall team as a persisted even
10263
10368
  describe: "The agent sending it (detected when possible)"
10264
10369
  }
10265
10370
  },
10266
- examples: [["feedback \"migrate crashed on Expo\"", "Send feedback"], ["feedback \"push fails with 413 on a 2MB asset\" --title \"push 413\" --kind bug --command \"superwall push\" --app <app> --file push.log --json", "For agents: a full bug report"]],
10371
+ examples: [
10372
+ ["feedback \"migrate crashed on Expo\"", "Send feedback"],
10373
+ ["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"],
10374
+ ["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"]
10375
+ ],
10267
10376
  auth: "optional",
10268
10377
  json: true,
10269
10378
  prompts: true,
10270
- mcp: "destructive",
10379
+ mcp: "write",
10271
10380
  run: (ctx, input) => runFeedback(ctx, input)
10272
10381
  });
10273
10382
 
@@ -10302,7 +10411,7 @@ const command$64 = defineCommand({
10302
10411
  prompts: true,
10303
10412
  mcp: false,
10304
10413
  async run(ctx, input) {
10305
- const { runSkills } = await import("./skills-DDV4zcLR.js");
10414
+ const { runSkills } = await import("./skills-DzOvse9L.js");
10306
10415
  return runSkills(ctx, input);
10307
10416
  }
10308
10417
  });
@@ -10311,15 +10420,15 @@ const command$64 = defineCommand({
10311
10420
  //#region src/commands/support/upgrade.ts
10312
10421
  const command$65 = defineCommand({
10313
10422
  name: "upgrade",
10314
- summary: "Update the CLI to the latest version",
10315
- examples: [["upgrade", "Install the latest version globally with npm"]],
10423
+ summary: "Update the CLI and its agent skills to the latest version",
10424
+ examples: [["upgrade", "Install the latest version globally with npm, then its skills"]],
10316
10425
  auth: "none",
10317
10426
  json: true,
10318
10427
  prompts: true,
10319
10428
  mcp: false,
10320
10429
  async run(ctx) {
10321
- const { runUpgrade } = await import("./upgrade-CpTJv_M7.js");
10322
- return runUpgrade(ctx);
10430
+ const { runUpgrade } = await import("./upgrade-AdyF7wXk.js");
10431
+ return runUpgrade(ctx, AUTO_UPDATE_TARGET());
10323
10432
  }
10324
10433
  });
10325
10434
 
@@ -10357,8 +10466,8 @@ const command$66 = defineCommand({
10357
10466
  prompts: true,
10358
10467
  mcp: false,
10359
10468
  async run(ctx, { flags }) {
10360
- const { runIntegrate } = await import("./integrate-DZ4Qvoch.js");
10361
- const { printPlaybook } = await import("./playbook-B-pRKNa4.js");
10469
+ const { runIntegrate } = await import("./integrate-Cz48dm_h.js");
10470
+ const { printPlaybook } = await import("./playbook-BJ3opYIS.js");
10362
10471
  if (flags.skill) return printPlaybook(ctx.installDir, "integrate");
10363
10472
  await runIntegrate({
10364
10473
  ...ctx,
@@ -10404,8 +10513,8 @@ const command$67 = defineCommand({
10404
10513
  prompts: true,
10405
10514
  mcp: false,
10406
10515
  async run(ctx, { args, flags }) {
10407
- const { runPaywallMigration, runProviderMigration, runScreenMigration } = await import("./migrate-DnXpbhL1.js");
10408
- const { printPlaybook } = await import("./playbook-B-pRKNa4.js");
10516
+ const { runPaywallMigration, runProviderMigration, runScreenMigration } = await import("./migrate-DaVwhdov.js");
10517
+ const { printPlaybook } = await import("./playbook-BJ3opYIS.js");
10409
10518
  if (flags.screen !== void 0) return runScreenMigration(ctx, {
10410
10519
  path: flags.screen,
10411
10520
  screenshot: flags.screenshot
@@ -10439,8 +10548,8 @@ const command$68 = defineCommand({
10439
10548
  prompts: true,
10440
10549
  mcp: false,
10441
10550
  async run(ctx, { flags }) {
10442
- const { runReview } = await import("./integrate-DZ4Qvoch.js");
10443
- const { printPlaybook } = await import("./playbook-B-pRKNa4.js");
10551
+ const { runReview } = await import("./integrate-Cz48dm_h.js");
10552
+ const { printPlaybook } = await import("./playbook-BJ3opYIS.js");
10444
10553
  if (flags.skill) return printPlaybook(ctx.installDir, flags.fix ? "review-fix" : "review");
10445
10554
  await runReview(ctx, flags.fix);
10446
10555
  }