@superwall/cli 2.3.0 → 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-D79LBw5E.js → apple-Bx_fm5M-.js} +14 -14
  3. package/dist/{assets-Diivv88t.js → assets-W5yvyf0V.js} +3 -3
  4. package/dist/auth.js +3 -3
  5. package/dist/{billing-CCuMv6mh.js → billing-C4lXR0xG.js} +3 -3
  6. package/dist/{bind-CVRlFlRo.js → bind-82oTpHZ3.js} +4 -4
  7. package/dist/{build-BCq0cGh-.js → build-7_8cBgBm.js} +8 -8
  8. package/dist/{client-CYtQvWJR.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-BZyUW60x.js → create-DEyveHS6.js} +29 -29
  12. package/dist/{create-BaP6hoQ1.js → create-Dk8U_B49.js} +6 -6
  13. package/dist/{doctor-kx01VvQX.js → doctor-Df2GwS4K.js} +6 -6
  14. package/dist/{drivers-D0818zGc.js → drivers-CTyYdBL7.js} +4 -4
  15. package/dist/entry.js +63 -28
  16. package/dist/{environment-a7W-0wg0.js → environment-djS0ik60.js} +8 -2
  17. package/dist/{existing-B7qxYiUX.js → existing-Das3PHGG.js} +2 -2
  18. package/dist/{held-CEyXc1SI.js → held-B8EFWDEc.js} +6 -6
  19. package/dist/held-BL4oizD6.js +16 -0
  20. package/dist/{integrate-RK5U0GTQ.js → integrate-Cz48dm_h.js} +23 -23
  21. package/dist/{log-NVhVe_oe.js → log-C0MDCfA2.js} +1 -1
  22. package/dist/{login-DrMLxlF4.js → login-CiK5T4w8.js} +7 -7
  23. package/dist/login-DdrOmi6m.js +16 -0
  24. package/dist/{login-NxCl2WuU.js → login-girc324T.js} +1 -1
  25. package/dist/{lookup-Dor6ch5A.js → lookup-us5vu5od.js} +3 -3
  26. package/dist/{migrate-CjSpcnNu.js → migrate-DaVwhdov.js} +27 -27
  27. package/dist/{migration-MlzZHGP-.js → migration-cS6UGeUj.js} +10 -10
  28. package/dist/{notification-url-C_QXtljc.js → notification-url-Hg42tAbW.js} +2 -2
  29. package/dist/{open-CBW0Cuog.js → open-BIuOZ9ka.js} +2 -2
  30. package/dist/{org-BJCyaL1b.js → org-BrR4HGvl.js} +2 -2
  31. package/dist/{paths-Cp_lgyWO.js → paths-CdwjySxK.js} +2 -2
  32. package/dist/{playbook-VqV7546k.js → playbook-BJ3opYIS.js} +11 -11
  33. package/dist/{promote-BSckFPwZ.js → promote-BQO-1ScY.js} +19 -19
  34. package/dist/{pull-DEumBwvc.js → pull-BhRswq6x.js} +24 -24
  35. package/dist/push-B3Onn_mL.js +24 -0
  36. package/dist/{push-D-dewDd1.js → push-CR110qRh.js} +7 -7
  37. package/dist/{registry-D6M1JxYC.js → registry-DZsWoWqH.js} +239 -130
  38. package/dist/{resources-DKn4itf3.js → resources-BMspgZO1.js} +2 -2
  39. package/dist/{run-Ccv5egCC.js → run-D4V6mq8_.js} +2 -2
  40. package/dist/{scan-Be17rMcQ.js → scan-CRexsHOE.js} +1 -1
  41. package/dist/scan-DUQjxOZf.js +4 -0
  42. package/dist/{scope-92neiQ2q.js → scope-Ct0_HoNq.js} +5 -5
  43. package/dist/{selection-C5ZY23dQ.js → selection-CgZJJ3FD.js} +2 -2
  44. package/dist/server-Cv-Ug9JF.js +24 -0
  45. package/dist/{server-DZ7L28w4.js → server-Dv1VwbNh.js} +8 -8
  46. package/dist/session-BCQuMcQ0.js +6 -0
  47. package/dist/{session-CdnUL4zt.js → session-CV0P8BjK.js} +7 -7
  48. package/dist/{session-gTuw2_8i.js → session-UiPlLFn6.js} +1 -1
  49. package/dist/{setup-esb3_a7N.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-miJDcjQ2.js → skills-CiWxt6vS.js} +15 -9
  53. package/dist/skills-DzOvse9L.js +14 -0
  54. package/dist/{source-push-NVrs53Uo.js → source-push-CX_k_yZD.js} +5 -5
  55. package/dist/{spinner-D6phP4Af.js → spinner-1uuKKZMc.js} +4 -4
  56. package/dist/{storage-BcvKhvzZ.js → storage-CrXGgIbS.js} +1 -1
  57. package/dist/storekit-B675ZNiA.js +16 -0
  58. package/dist/{storekit-Di3BkafX.js → storekit-CptdG4RJ.js} +3 -3
  59. package/dist/{telemetry-BpYXL-z3.js → telemetry-BqaPbM0k.js} +2 -2
  60. package/dist/{token-4dQOfOaK.js → token-zjjlkNDF.js} +1 -1
  61. package/dist/tools.js +125 -50
  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-DNfuZ9os.js +0 -19
  67. package/dist/held-C4BiAQ_X.js +0 -16
  68. package/dist/login-DV70XgZO.js +0 -16
  69. package/dist/push-YEPqa6hs.js +0 -24
  70. package/dist/scan-CocGVPe0.js +0 -4
  71. package/dist/server-1pOxW1GJ.js +0 -24
  72. package/dist/session-Cm0U68t3.js +0 -6
  73. package/dist/skills-B_oH2dYK.js +0 -14
  74. package/dist/storekit-D1A5VHT1.js +0 -16
  75. package/dist/upgrade-BnOq32zn.js +0 -7
  76. package/dist/upgrade-Cb6f4S_c.js +0 -117
package/README.md CHANGED
@@ -609,6 +609,16 @@ asking. The framework itself is built to be written by agents: a plain npm
609
609
  project, file-based routes, ordinary React state — conventions an agent
610
610
  already knows, so it gets a paywall right on the first try.
611
611
 
612
+ When an agent confirms a Superwall bug, a wrong doc or a capability you needed
613
+ that Superwall lacks, it reports it with `superwall feedback` on its own and
614
+ tells you in one line. Reports reach the Superwall team with your account, and
615
+ the same request from many teams is merged into one:
616
+
617
+ ```bash
618
+ superwall feedback "no way to end a campaign on a schedule" --kind idea \
619
+ --use-case "runs a Black Friday offer that must stop at midnight" --app <app> --json
620
+ ```
621
+
612
622
  ## Upgrading to 2.0
613
623
 
614
624
  2.0 renamed several commands; the old names are unknown commands now.
@@ -1,21 +1,21 @@
1
- import "./token-4dQOfOaK.js";
1
+ import "./token-zjjlkNDF.js";
2
2
  import { t as blocks } from "./output-Ggzq5_-t.js";
3
- import "./environment-a7W-0wg0.js";
4
- import "./storage-BcvKhvzZ.js";
5
- import { t as ApiError } from "./client-CYtQvWJR.js";
6
- import { E as updateBundleId, a as chooseAppIntent, g as RefusedByApi, i as savedKey, m as KEY_LABEL, n as testModeWarning, p as KEY_KINDS, s as resolveApp, y as findIntegrations } from "./held-CEyXc1SI.js";
7
- import "./config-BO1Y87kV.js";
8
- import { t as apiCall } from "./spinner-D6phP4Af.js";
3
+ import "./environment-djS0ik60.js";
4
+ import "./storage-CrXGgIbS.js";
5
+ import { t as ApiError } from "./client-ltxxHuxn.js";
6
+ import { E as updateBundleId, a as chooseAppIntent, g as RefusedByApi, i as savedKey, m as KEY_LABEL, n as testModeWarning, p as KEY_KINDS, s as resolveApp, y as findIntegrations } from "./held-B8EFWDEc.js";
7
+ import "./config-CGcG7GOt.js";
8
+ import { t as apiCall } from "./spinner-1uuKKZMc.js";
9
9
  import "./ui-D_qf3Gvw.js";
10
- import "./paths-Cp_lgyWO.js";
11
- import "./resources-DKn4itf3.js";
12
- import "./org-BJCyaL1b.js";
13
- import "./lookup-Dor6ch5A.js";
14
- import "./scope-92neiQ2q.js";
10
+ import "./paths-CdwjySxK.js";
11
+ import "./resources-BMspgZO1.js";
12
+ import "./org-BrR4HGvl.js";
13
+ import "./lookup-us5vu5od.js";
14
+ import "./scope-Ct0_HoNq.js";
15
15
  import "./client-BZ1UbpXz.js";
16
16
  import "./timing-BVxPrYq3.js";
17
- import { n as ensureNotificationUrl, r as environmentLines, t as describeNotificationUrl } from "./notification-url-C_QXtljc.js";
18
- import { a as chooseTeam, n as keyAccess, o as signIn, r as keyRole, s as appleDeps, t as createAndSaveKey } from "./create-BaP6hoQ1.js";
17
+ import { n as ensureNotificationUrl, r as environmentLines, t as describeNotificationUrl } from "./notification-url-Hg42tAbW.js";
18
+ import { a as chooseTeam, n as keyAccess, o as signIn, r as keyRole, s as appleDeps, t as createAndSaveKey } from "./create-Dk8U_B49.js";
19
19
 
20
20
  //#region src/core/app-store-connect/setup/apple.ts
21
21
  const STEPS = [
@@ -1,6 +1,6 @@
1
- import { r as ASSET_HOST } from "./environment-a7W-0wg0.js";
2
- import { t as ApiError } from "./client-CYtQvWJR.js";
3
- import { S as pushPaywallAssets } from "./resources-DKn4itf3.js";
1
+ import { r as ASSET_HOST } from "./environment-djS0ik60.js";
2
+ import { t as ApiError } from "./client-ltxxHuxn.js";
3
+ import { S as pushPaywallAssets } from "./resources-BMspgZO1.js";
4
4
  import * as fs from "node:fs";
5
5
 
6
6
  //#region src/core/paywalls/assets.ts
package/dist/auth.js CHANGED
@@ -1,6 +1,6 @@
1
- import { n as resolveAuthToken, r as NotLoggedInError, t as getOAuthAccessToken } from "./token-4dQOfOaK.js";
1
+ import { n as resolveAuthToken, r as NotLoggedInError, t as getOAuthAccessToken } from "./token-zjjlkNDF.js";
2
2
  import "./output-Ggzq5_-t.js";
3
- import "./environment-a7W-0wg0.js";
4
- import "./storage-BcvKhvzZ.js";
3
+ import "./environment-djS0ik60.js";
4
+ import "./storage-CrXGgIbS.js";
5
5
 
6
6
  export { NotLoggedInError, getOAuthAccessToken, resolveAuthToken };
@@ -1,6 +1,6 @@
1
- import { f as Integration } from "./environment-a7W-0wg0.js";
2
- import { i as readPackageJson, r as allDeps } from "./scan-Be17rMcQ.js";
3
- import { d as readBundledSkill } from "./skills-miJDcjQ2.js";
1
+ import { m as Integration } from "./environment-djS0ik60.js";
2
+ import { i as readPackageJson, r as allDeps } from "./scan-CRexsHOE.js";
3
+ import { d as readBundledSkill } from "./skills-CiWxt6vS.js";
4
4
  import { readFileSync } from "node:fs";
5
5
  import fg from "fast-glob";
6
6
 
@@ -1,8 +1,8 @@
1
- import { f as Integration } from "./environment-a7W-0wg0.js";
2
- import { n as withSpinner } from "./spinner-D6phP4Af.js";
1
+ import { m as Integration } from "./environment-djS0ik60.js";
2
+ import { n as withSpinner } from "./spinner-1uuKKZMc.js";
3
3
  import { n as ui } from "./ui-D_qf3Gvw.js";
4
- import { c as createProject, m as listProjects, r as createApplication, y as platformLabel } from "./resources-DKn4itf3.js";
5
- import { n as orgForNewProject } from "./org-BJCyaL1b.js";
4
+ import { c as createProject, m as listProjects, r as createApplication, y as platformLabel } from "./resources-BMspgZO1.js";
5
+ import { n as orgForNewProject } from "./org-BrR4HGvl.js";
6
6
 
7
7
  //#region src/core/account/bind.ts
8
8
  const NEW = "__new__";
@@ -1,13 +1,13 @@
1
- import "./token-4dQOfOaK.js";
1
+ import "./token-zjjlkNDF.js";
2
2
  import "./output-Ggzq5_-t.js";
3
- import { v as VERSION } from "./environment-a7W-0wg0.js";
4
- import "./storage-BcvKhvzZ.js";
5
- import "./client-CYtQvWJR.js";
6
- import "./config-BO1Y87kV.js";
3
+ import { b as VERSION } from "./environment-djS0ik60.js";
4
+ import "./storage-CrXGgIbS.js";
5
+ import "./client-ltxxHuxn.js";
6
+ import "./config-CGcG7GOt.js";
7
7
  import { n as ui } from "./ui-D_qf3Gvw.js";
8
- import "./resources-DKn4itf3.js";
9
- import { t as assetBaseUrl } from "./assets-Diivv88t.js";
10
- import { a as resolveProjectDir, b as writeProjectTypes, d as kb, h as took, i as requireProject, k as readLock, n as parseIds, s as selectSurfaces, y as collectProjectDeclarations, z as resolveFramework } from "./selection-C5ZY23dQ.js";
8
+ import "./resources-BMspgZO1.js";
9
+ import { t as assetBaseUrl } from "./assets-W5yvyf0V.js";
10
+ import { a as resolveProjectDir, b as writeProjectTypes, d as kb, h as took, i as requireProject, k as readLock, n as parseIds, s as selectSurfaces, y as collectProjectDeclarations, z as resolveFramework } from "./selection-CgZJJ3FD.js";
11
11
  import * as fs from "node:fs";
12
12
  import * as path from "node:path";
13
13
  import pc from "picocolors";
@@ -1,6 +1,6 @@
1
- import { n as resolveAuthToken, r as NotLoggedInError } from "./token-4dQOfOaK.js";
2
- import { _ as USER_AGENT } from "./environment-a7W-0wg0.js";
3
- import { a as resolveApiHost, n as readSession } from "./storage-BcvKhvzZ.js";
1
+ import { n as resolveAuthToken, r as NotLoggedInError } from "./token-zjjlkNDF.js";
2
+ import { y as USER_AGENT } from "./environment-djS0ik60.js";
3
+ import { a as resolveApiHost, n as readSession } from "./storage-CrXGgIbS.js";
4
4
 
5
5
  //#region src/core/api/client.ts
6
6
  const BODY_SNIPPET = 200;
@@ -81,6 +81,14 @@ function writeUpdateCheck(check) {
81
81
  config.updateCheck = check;
82
82
  write(config);
83
83
  }
84
+ function readAutoUpdate() {
85
+ return read().autoUpdate;
86
+ }
87
+ function writeAutoUpdate(update) {
88
+ const config = read();
89
+ config.autoUpdate = update;
90
+ write(config);
91
+ }
84
92
  function readOnboardingIdempotencyKey() {
85
93
  const config = read();
86
94
  if (config.onboardingIdempotencyKey) return config.onboardingIdempotencyKey;
@@ -102,4 +110,4 @@ function writeTelemetryNoticeShown() {
102
110
  }
103
111
 
104
112
  //#endregion
105
- export { readOnboardingIdempotencyKey as a, readUpdateCheck as c, writeOnboardedApp as d, writeOnboardedOrg as f, writeUpdateCheck as g, writeTelemetryNoticeShown as h, readOnboardedOrg as i, telemetryNoticeShown as l, writeSkillsSync as m, readDefaultApp as n, readOpenedOrgs as o, writeOpenedOrgs as p, readOnboardedApp as r, readSkillsSync as s, readAnonymousId as t, writeDefaultApp as u };
113
+ export { writeTelemetryNoticeShown as _, readOnboardedOrg as a, readSkillsSync as c, writeAutoUpdate as d, writeDefaultApp as f, writeSkillsSync as g, writeOpenedOrgs as h, readOnboardedApp as i, readUpdateCheck as l, writeOnboardedOrg as m, readAutoUpdate as n, readOnboardingIdempotencyKey as o, writeOnboardedApp as p, readDefaultApp as r, readOpenedOrgs as s, readAnonymousId as t, telemetryNoticeShown as u, writeUpdateCheck as v };
@@ -0,0 +1,19 @@
1
+ import "./token-zjjlkNDF.js";
2
+ import "./output-Ggzq5_-t.js";
3
+ import "./environment-djS0ik60.js";
4
+ import "./storage-CrXGgIbS.js";
5
+ import "./client-ltxxHuxn.js";
6
+ import "./held-B8EFWDEc.js";
7
+ import "./config-CGcG7GOt.js";
8
+ import "./spinner-1uuKKZMc.js";
9
+ import "./ui-D_qf3Gvw.js";
10
+ import "./paths-CdwjySxK.js";
11
+ import "./resources-BMspgZO1.js";
12
+ import "./org-BrR4HGvl.js";
13
+ import "./lookup-us5vu5od.js";
14
+ import "./scope-Ct0_HoNq.js";
15
+ import "./client-BZ1UbpXz.js";
16
+ import "./timing-BVxPrYq3.js";
17
+ import { i as runAscKeysCreate, n as keyAccess, r as keyRole, t as createAndSaveKey } from "./create-Dk8U_B49.js";
18
+
19
+ export { createAndSaveKey, keyAccess, keyRole, runAscKeysCreate };
@@ -1,41 +1,41 @@
1
- import "./token-4dQOfOaK.js";
1
+ import "./token-zjjlkNDF.js";
2
2
  import "./output-Ggzq5_-t.js";
3
- import "./environment-a7W-0wg0.js";
4
- import "./storage-BcvKhvzZ.js";
5
- import "./client-CYtQvWJR.js";
6
- import "./config-BO1Y87kV.js";
7
- import "./telemetry-BpYXL-z3.js";
3
+ import "./environment-djS0ik60.js";
4
+ import "./storage-CrXGgIbS.js";
5
+ import "./client-ltxxHuxn.js";
6
+ import "./config-CGcG7GOt.js";
7
+ import "./telemetry-BqaPbM0k.js";
8
8
  import "./spawn-DmmmHIP-.js";
9
- import "./spinner-D6phP4Af.js";
9
+ import "./spinner-1uuKKZMc.js";
10
10
  import "./ui-D_qf3Gvw.js";
11
11
  import "./theme-DUsCh-Vd.js";
12
- import "./log-NVhVe_oe.js";
13
- import "./scan-Be17rMcQ.js";
14
- import "./existing-B7qxYiUX.js";
15
- import "./paths-Cp_lgyWO.js";
16
- import { O as field } from "./resources-DKn4itf3.js";
17
- import "./org-BJCyaL1b.js";
18
- import "./lookup-Dor6ch5A.js";
19
- import "./bind-CVRlFlRo.js";
20
- import "./login-DrMLxlF4.js";
21
- import "./skills-miJDcjQ2.js";
22
- import "./assets-Diivv88t.js";
23
- import "./selection-C5ZY23dQ.js";
24
- import { n as requireApi, t as LoginRequiredError, u as projectPackageName } from "./session-CdnUL4zt.js";
25
- import "./source-push-NVrs53Uo.js";
26
- import "./login-NxCl2WuU.js";
27
- import "./run-Ccv5egCC.js";
28
- import "./drivers-D0818zGc.js";
29
- import { _ as slugOf, c as scaffoldFromPaywall, g as writeTemplate, h as writeSurfaceFiles, i as migrationFor, m as starterConfig, o as offerMigration, s as projectDirOf } from "./migration-MlzZHGP-.js";
30
- import "./server-DZ7L28w4.js";
31
- import { i as startStudio, n as migrationNextSteps, t as askStudio } from "./open-CBW0Cuog.js";
32
- import { a as devCommand, c as uniqueSurfaceId, i as detectPackageManager, n as connectApp, o as initGit, r as detectHostApp, s as installDependencies, t as alreadyAProject } from "./setup-esb3_a7N.js";
12
+ import "./log-C0MDCfA2.js";
13
+ import "./scan-CRexsHOE.js";
14
+ import "./existing-Das3PHGG.js";
15
+ import "./paths-CdwjySxK.js";
16
+ import { O as field } from "./resources-BMspgZO1.js";
17
+ import "./org-BrR4HGvl.js";
18
+ import "./lookup-us5vu5od.js";
19
+ import "./bind-82oTpHZ3.js";
20
+ import "./login-CiK5T4w8.js";
21
+ import "./skills-CiWxt6vS.js";
22
+ import "./assets-W5yvyf0V.js";
23
+ import "./selection-CgZJJ3FD.js";
24
+ import { n as requireApi, t as LoginRequiredError, u as projectPackageName } from "./session-CV0P8BjK.js";
25
+ import "./source-push-CX_k_yZD.js";
26
+ import "./login-girc324T.js";
27
+ import "./run-D4V6mq8_.js";
28
+ import "./drivers-CTyYdBL7.js";
29
+ import { _ as slugOf, c as scaffoldFromPaywall, g as writeTemplate, h as writeSurfaceFiles, i as migrationFor, m as starterConfig, o as offerMigration, s as projectDirOf } from "./migration-cS6UGeUj.js";
30
+ import "./server-Dv1VwbNh.js";
31
+ import { i as startStudio, n as migrationNextSteps, t as askStudio } from "./open-BIuOZ9ka.js";
32
+ import { a as devCommand, c as uniqueSurfaceId, i as detectPackageManager, n as connectApp, o as initGit, r as detectHostApp, s as installDependencies, t as alreadyAProject } from "./setup-UWLhQG3M.js";
33
33
  import { execFile } from "node:child_process";
34
34
  import * as fs from "node:fs";
35
+ import * as os$1 from "node:os";
35
36
  import * as path from "node:path";
36
37
  import pc from "picocolors";
37
38
  import { promisify } from "node:util";
38
- import * as os$1 from "node:os";
39
39
  import { gunzipSync } from "node:zlib";
40
40
 
41
41
  //#region src/core/paywalls/project/examples.ts
@@ -1,10 +1,10 @@
1
1
  import { r as formatJson, t as blocks } from "./output-Ggzq5_-t.js";
2
- import { b as appleCredentialsFromEnv, d as ENV_APPLE_PASSWORD, u as ENV_APPLE_ID, v as VERSION } from "./environment-a7W-0wg0.js";
3
- import { t as ApiError } from "./client-CYtQvWJR.js";
4
- import { i as savedKey, m as KEY_LABEL, n as testModeWarning, o as chooseIosApp, s as resolveApp, t as upsertHeldKey, x as keyKind, y as findIntegrations } from "./held-CEyXc1SI.js";
5
- import { t as apiCall } from "./spinner-D6phP4Af.js";
6
- import { n as SUPERWALL_HOME } from "./paths-Cp_lgyWO.js";
7
- import { A as listField, M as textField, O as field, j as parseJson } from "./resources-DKn4itf3.js";
2
+ import { S as appleCredentialsFromEnv, b as VERSION, f as ENV_APPLE_ID, p as ENV_APPLE_PASSWORD } from "./environment-djS0ik60.js";
3
+ import { t as ApiError } from "./client-ltxxHuxn.js";
4
+ import { i as savedKey, m as KEY_LABEL, n as testModeWarning, o as chooseIosApp, s as resolveApp, t as upsertHeldKey, x as keyKind, y as findIntegrations } from "./held-B8EFWDEc.js";
5
+ import { t as apiCall } from "./spinner-1uuKKZMc.js";
6
+ import { n as SUPERWALL_HOME } from "./paths-CdwjySxK.js";
7
+ import { A as listField, M as textField, O as field, j as parseJson } from "./resources-BMspgZO1.js";
8
8
  import { c as replaceAppPurchaseKey, s as replaceAppAscKey } from "./client-BZ1UbpXz.js";
9
9
  import { t as timing } from "./timing-BVxPrYq3.js";
10
10
  import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
@@ -1,13 +1,13 @@
1
- import "./token-4dQOfOaK.js";
1
+ import "./token-zjjlkNDF.js";
2
2
  import "./output-Ggzq5_-t.js";
3
- import { y as apiKeyFromEnv } from "./environment-a7W-0wg0.js";
4
- import { n as readSession } from "./storage-BcvKhvzZ.js";
3
+ import { x as apiKeyFromEnv } from "./environment-djS0ik60.js";
4
+ import { n as readSession } from "./storage-CrXGgIbS.js";
5
5
  import "./spawn-DmmmHIP-.js";
6
6
  import { n as ui } from "./ui-D_qf3Gvw.js";
7
7
  import { n as fg, t as THEME } from "./theme-DUsCh-Vd.js";
8
- import { t as scanProject } from "./scan-Be17rMcQ.js";
9
- import { t as detectExisting } from "./existing-B7qxYiUX.js";
10
- import { t as detectDrivers } from "./drivers-D0818zGc.js";
8
+ import { t as scanProject } from "./scan-CRexsHOE.js";
9
+ import { t as detectExisting } from "./existing-Das3PHGG.js";
10
+ import { t as detectDrivers } from "./drivers-CTyYdBL7.js";
11
11
 
12
12
  //#region src/core/support/doctor.ts
13
13
  async function runDoctor(ctx, deps = {}) {
@@ -1,9 +1,9 @@
1
- import { t as getOAuthAccessToken } from "./token-4dQOfOaK.js";
2
- import { t as API_HOST, v as VERSION } from "./environment-a7W-0wg0.js";
3
- import { n as readSession } from "./storage-BcvKhvzZ.js";
1
+ import { t as getOAuthAccessToken } from "./token-zjjlkNDF.js";
2
+ import { b as VERSION, t as API_HOST } from "./environment-djS0ik60.js";
3
+ import { n as readSession } from "./storage-CrXGgIbS.js";
4
4
  import { n as readVersion, r as spawnStream, t as onPath } from "./spawn-DmmmHIP-.js";
5
- import { basename, join } from "node:path";
6
5
  import { tmpdir } from "node:os";
6
+ import { basename, join } from "node:path";
7
7
  import { readFile, rm } from "node:fs/promises";
8
8
  import { query } from "@anthropic-ai/claude-agent-sdk";
9
9
 
package/dist/entry.js CHANGED
@@ -1,36 +1,37 @@
1
1
  import { n as __require, r as __toESM, t as __commonJS } from "./chunk-DQxbwPpZ.js";
2
- import "./token-4dQOfOaK.js";
2
+ import "./token-zjjlkNDF.js";
3
3
  import { a as stripAnsi, d as useStores, i as writeJson } from "./output-Ggzq5_-t.js";
4
- import { S as isNonInteractive, a as CHANNEL, v as VERSION } from "./environment-a7W-0wg0.js";
5
- import "./storage-BcvKhvzZ.js";
6
- import { i as superwallApi } from "./client-CYtQvWJR.js";
7
- import { O as useAscRefresh } from "./held-CEyXc1SI.js";
8
- import "./config-BO1Y87kV.js";
9
- import { n as maybeShowTelemetryNotice, r as track, t as flushTelemetry } from "./telemetry-BpYXL-z3.js";
4
+ import { b as VERSION, s as CHANNEL, w as isNonInteractive } from "./environment-djS0ik60.js";
5
+ import "./storage-CrXGgIbS.js";
6
+ import { i as superwallApi } from "./client-ltxxHuxn.js";
7
+ import { O as useAscRefresh } from "./held-B8EFWDEc.js";
8
+ import "./config-CGcG7GOt.js";
9
+ import { n as maybeShowTelemetryNotice, r as track, t as flushTelemetry } from "./telemetry-BqaPbM0k.js";
10
10
  import "./spawn-DmmmHIP-.js";
11
- import { i as refreshUpdateCheck, r as maybeNotifyUpdate, t as flushUpdateCheck } from "./upgrade-Cb6f4S_c.js";
12
- import { c as onChannel, f as useHost, l as summaryOf, o as examplesOf, r as UsageError, s as flagName } from "./spinner-D6phP4Af.js";
11
+ import { a as printAutoUpdate, i as maybeNotifyUpdate, l as selectAutoUpdate, n as isGlobalInstall, o as recordAutoUpdate, s as refreshUpdateCheck, t as flushUpdateCheck } from "./upgrade-BBnmcyY2.js";
12
+ import { c as onChannel, f as useHost, l as summaryOf, o as examplesOf, r as UsageError, s as flagName } from "./spinner-1uuKKZMc.js";
13
13
  import { r as useRenderer, t as silentRenderer } from "./ui-D_qf3Gvw.js";
14
14
  import { t as THEME } from "./theme-DUsCh-Vd.js";
15
- import { n as styleMarkdown, r as wrapReportLine } from "./log-NVhVe_oe.js";
16
- import { t as scanProject } from "./scan-Be17rMcQ.js";
17
- import { t as detectExisting } from "./existing-B7qxYiUX.js";
18
- import { n as SUPERWALL_HOME, r as expandHome } from "./paths-Cp_lgyWO.js";
19
- import { a as renderPage, i as exampleLines, n as cmd, r as detailLines, t as listGroups } from "./registry-D6M1JxYC.js";
20
- import "./session-gTuw2_8i.js";
21
- import "./resources-DKn4itf3.js";
22
- import "./org-BJCyaL1b.js";
23
- import "./lookup-Dor6ch5A.js";
24
- import "./scope-92neiQ2q.js";
15
+ import { n as styleMarkdown, r as wrapReportLine } from "./log-C0MDCfA2.js";
16
+ import { t as scanProject } from "./scan-CRexsHOE.js";
17
+ import { t as detectExisting } from "./existing-Das3PHGG.js";
18
+ import { n as SUPERWALL_HOME, r as expandHome } from "./paths-CdwjySxK.js";
19
+ import { a as renderPage, i as exampleLines, n as cmd, r as detailLines, t as listGroups } from "./registry-DZsWoWqH.js";
20
+ import "./session-UiPlLFn6.js";
21
+ import "./resources-BMspgZO1.js";
22
+ import "./org-BrR4HGvl.js";
23
+ import "./lookup-us5vu5od.js";
24
+ import "./scope-Ct0_HoNq.js";
25
25
  import "./client-BZ1UbpXz.js";
26
26
  import "./products-DH_fK9tY.js";
27
27
  import "./input-vi0bou04.js";
28
28
  import "./timing-BVxPrYq3.js";
29
- import "./notification-url-C_QXtljc.js";
30
- import "./bind-CVRlFlRo.js";
29
+ import "./notification-url-Hg42tAbW.js";
30
+ import "./bind-82oTpHZ3.js";
31
31
  import { spawn } from "node:child_process";
32
32
  import * as fs from "node:fs";
33
33
  import { existsSync, mkdirSync, readFileSync, renameSync, rmSync, writeFileSync } from "node:fs";
34
+ import os, { tmpdir } from "node:os";
34
35
  import * as path from "node:path";
35
36
  import { join, resolve } from "node:path";
36
37
  import pc from "picocolors";
@@ -38,7 +39,6 @@ import { PassThrough, Stream } from "node:stream";
38
39
  import process$1, { cwd, env } from "node:process";
39
40
  import ansiEscapes from "ansi-escapes";
40
41
  import wrapAnsi from "wrap-ansi";
41
- import os from "node:os";
42
42
  import tty from "node:tty";
43
43
  import { EventEmitter } from "node:events";
44
44
  import { Buffer } from "node:buffer";
@@ -27718,6 +27718,42 @@ function startAscRefresh(spawn$1 = spawn) {
27718
27718
  return;
27719
27719
  }
27720
27720
  }
27721
+ function startAutoUpdate(version, spawn$1 = spawn, isGlobal = isGlobalInstall) {
27722
+ const entry = process.argv[1];
27723
+ if (!entry) return false;
27724
+ recordAutoUpdate(version);
27725
+ if (!isGlobal()) return false;
27726
+ try {
27727
+ const child = spawn$1(process.execPath, [
27728
+ entry,
27729
+ "upgrade",
27730
+ "--json"
27731
+ ], {
27732
+ cwd: tmpdir(),
27733
+ detached: true,
27734
+ stdio: "ignore",
27735
+ env: {
27736
+ ...process.env,
27737
+ SW_AUTO_UPDATE: version
27738
+ }
27739
+ });
27740
+ child.on("error", () => {});
27741
+ child.unref();
27742
+ return true;
27743
+ } catch {
27744
+ return false;
27745
+ }
27746
+ }
27747
+ function finishTerminal(stdout, mode, command, update, start$1 = startAutoUpdate) {
27748
+ refreshUpdateCheck();
27749
+ if (command === "upgrade") return;
27750
+ const version = update ? selectAutoUpdate() : null;
27751
+ if (version && start$1(version)) {
27752
+ if (mode !== "json") printAutoUpdate(stdout, version);
27753
+ return;
27754
+ }
27755
+ if (mode !== "json") maybeNotifyUpdate(stdout);
27756
+ }
27721
27757
  const terminalHost = {
27722
27758
  api: superwallApi,
27723
27759
  renderer: (mode) => selectRenderer({ mode }),
@@ -27733,11 +27769,7 @@ const terminalHost = {
27733
27769
  starting: (ui, mode) => {
27734
27770
  if (mode === "rich") maybeShowTelemetryNotice(ui);
27735
27771
  },
27736
- finishing: (stdout, mode, command) => {
27737
- if (mode === "json") return;
27738
- refreshUpdateCheck();
27739
- if (command !== "upgrade") maybeNotifyUpdate(stdout);
27740
- },
27772
+ finishing: (stdout, mode, command, update) => finishTerminal(stdout, mode, command, update),
27741
27773
  fail: () => {
27742
27774
  process.exitCode = 1;
27743
27775
  },
@@ -27942,12 +27974,14 @@ function takeGlobals(tokens) {
27942
27974
  const globals = {
27943
27975
  json: false,
27944
27976
  interactive: true,
27977
+ update: true,
27945
27978
  help: false,
27946
27979
  rest: []
27947
27980
  };
27948
27981
  for (const token of tokens) if (token === "--json") globals.json = true;
27949
27982
  else if (token === "--no-interactive") globals.interactive = false;
27950
27983
  else if (token === "--interactive") globals.interactive = true;
27984
+ else if (token === "--no-update") globals.update = false;
27951
27985
  else if (token === "--help" || token === "-h") globals.help = true;
27952
27986
  else globals.rest.push(token);
27953
27987
  return globals;
@@ -28053,7 +28087,8 @@ function resolveCommand(command, rest, globals) {
28053
28087
  words: parsed.positionals,
28054
28088
  flags: parsed.values,
28055
28089
  json: globals.json,
28056
- interactive: globals.interactive
28090
+ interactive: globals.interactive,
28091
+ update: globals.update
28057
28092
  };
28058
28093
  if (command.kind === "command") command.validate(input);
28059
28094
  return {
@@ -1,5 +1,5 @@
1
1
  //#region package.json
2
- var version = "2.3.0";
2
+ var version = "2.4.0";
3
3
 
4
4
  //#endregion
5
5
  //#region src/environment.ts
@@ -66,6 +66,12 @@ function isNonInteractive() {
66
66
  return !process.stdout.isTTY || !process.stdin.isTTY || process.env.CI === "true";
67
67
  }
68
68
  const RUNNING_VIA_NPX = () => process.argv[1]?.includes("_npx") ?? false;
69
+ const isOn = (name) => {
70
+ const value = resolveEnv(name)?.toLowerCase();
71
+ return value !== void 0 && value !== "0" && value !== "false";
72
+ };
73
+ const AUTO_UPDATE = () => !isOn("SUPERWALL_NO_UPDATE") && !isOn("CI") && !RUNNING_VIA_NPX();
74
+ const AUTO_UPDATE_TARGET = () => resolveEnv("SW_AUTO_UPDATE");
69
75
 
70
76
  //#endregion
71
- export { resolveEnv as C, isNonInteractive as S, USER_AGENT as _, CHANNEL as a, appleCredentialsFromEnv as b, DASHBOARD_URL as c, ENV_APPLE_PASSWORD as d, Integration as f, TELEMETRY_KEY as g, TELEMETRY_HOST as h, AUTH_HOST as i, ENV_API_KEY as l, RUNNING_VIA_NPX as m, API_HOST_OVERRIDE as n, CHANNELS as o, OAUTH_SCOPE as p, ASSET_HOST as r, CLI_CLIENT_ID as s, API_HOST as t, ENV_APPLE_ID as u, VERSION as v, detectAgent as x, apiKeyFromEnv as y };
77
+ export { detectAgent as C, appleCredentialsFromEnv as S, resolveEnv as T, TELEMETRY_HOST as _, AUTO_UPDATE as a, VERSION as b, CHANNELS as c, ENV_API_KEY as d, ENV_APPLE_ID as f, RUNNING_VIA_NPX as g, OAUTH_SCOPE as h, AUTH_HOST as i, CLI_CLIENT_ID as l, Integration as m, API_HOST_OVERRIDE as n, AUTO_UPDATE_TARGET as o, ENV_APPLE_PASSWORD as p, ASSET_HOST as r, CHANNEL as s, API_HOST as t, DASHBOARD_URL as u, TELEMETRY_KEY as v, isNonInteractive as w, apiKeyFromEnv as x, USER_AGENT as y };
@@ -1,5 +1,5 @@
1
- import { f as Integration } from "./environment-a7W-0wg0.js";
2
- import { i as readPackageJson, r as allDeps } from "./scan-Be17rMcQ.js";
1
+ import { m as Integration } from "./environment-djS0ik60.js";
2
+ import { i as readPackageJson, r as allDeps } from "./scan-CRexsHOE.js";
3
3
  import { readFileSync } from "node:fs";
4
4
  import fg from "fast-glob";
5
5
 
@@ -1,10 +1,10 @@
1
1
  import { l as readJson, o as cache } from "./output-Ggzq5_-t.js";
2
- import { t as ApiError } from "./client-CYtQvWJR.js";
3
- import { d as readInput, t as apiCall } from "./spinner-D6phP4Af.js";
4
- import { A as listField, M as textField, O as field, c as createProject, k as isRecord, m as listProjects, r as createApplication } from "./resources-DKn4itf3.js";
5
- import { n as orgForNewProject } from "./org-BJCyaL1b.js";
6
- import { n as findApplication } from "./lookup-Dor6ch5A.js";
7
- import { r as pickOrganization } from "./scope-92neiQ2q.js";
2
+ import { t as ApiError } from "./client-ltxxHuxn.js";
3
+ import { d as readInput, t as apiCall } from "./spinner-1uuKKZMc.js";
4
+ import { A as listField, M as textField, O as field, c as createProject, k as isRecord, m as listProjects, r as createApplication } from "./resources-BMspgZO1.js";
5
+ import { n as orgForNewProject } from "./org-BrR4HGvl.js";
6
+ import { n as findApplication } from "./lookup-us5vu5od.js";
7
+ import { r as pickOrganization } from "./scope-Ct0_HoNq.js";
8
8
  import { a as listAscConfigs, c as replaceAppPurchaseKey, l as replaceAscConfig, r as createAscConfig, s as replaceAppAscKey, t as ascProxy } from "./client-BZ1UbpXz.js";
9
9
 
10
10
  //#region src/core/app-store-connect/api/spec.ts
@@ -0,0 +1,16 @@
1
+ import "./token-zjjlkNDF.js";
2
+ import "./output-Ggzq5_-t.js";
3
+ import "./environment-djS0ik60.js";
4
+ import "./storage-CrXGgIbS.js";
5
+ import "./client-ltxxHuxn.js";
6
+ import { t as upsertHeldKey } from "./held-B8EFWDEc.js";
7
+ import "./config-CGcG7GOt.js";
8
+ import "./spinner-1uuKKZMc.js";
9
+ import "./ui-D_qf3Gvw.js";
10
+ import "./resources-BMspgZO1.js";
11
+ import "./org-BrR4HGvl.js";
12
+ import "./lookup-us5vu5od.js";
13
+ import "./scope-Ct0_HoNq.js";
14
+ import "./client-BZ1UbpXz.js";
15
+
16
+ export { upsertHeldKey };
@@ -1,33 +1,33 @@
1
- import "./token-4dQOfOaK.js";
1
+ import "./token-zjjlkNDF.js";
2
2
  import { r as formatJson, t as blocks } from "./output-Ggzq5_-t.js";
3
- import { c as DASHBOARD_URL, v as VERSION } from "./environment-a7W-0wg0.js";
4
- import { i as removeSession, n as readSession, s as sessionOrgName } from "./storage-BcvKhvzZ.js";
5
- import { i as superwallApi } from "./client-CYtQvWJR.js";
6
- import { r as readOnboardedApp } from "./config-BO1Y87kV.js";
7
- import { i as updateTelemetryTags } from "./telemetry-BpYXL-z3.js";
3
+ import { b as VERSION, u as DASHBOARD_URL } from "./environment-djS0ik60.js";
4
+ import { i as removeSession, n as readSession, s as sessionOrgName } from "./storage-CrXGgIbS.js";
5
+ import { i as superwallApi } from "./client-ltxxHuxn.js";
6
+ import { i as readOnboardedApp } from "./config-CGcG7GOt.js";
7
+ import { i as updateTelemetryTags } from "./telemetry-BqaPbM0k.js";
8
8
  import "./spawn-DmmmHIP-.js";
9
- import { n as withSpinner } from "./spinner-D6phP4Af.js";
9
+ import { n as withSpinner } from "./spinner-1uuKKZMc.js";
10
10
  import { n as ui } from "./ui-D_qf3Gvw.js";
11
11
  import "./theme-DUsCh-Vd.js";
12
- import { t as stripReport } from "./log-NVhVe_oe.js";
13
- import { n as SUPPORTED_LABEL, t as scanProject } from "./scan-Be17rMcQ.js";
14
- import { t as detectExisting } from "./existing-B7qxYiUX.js";
15
- import { r as expandHome } from "./paths-Cp_lgyWO.js";
16
- import { A as listField, O as field, T as rowName, h as listResource, p as listApplications, s as createProduct, y as platformLabel } from "./resources-DKn4itf3.js";
17
- import "./org-BJCyaL1b.js";
18
- import "./lookup-Dor6ch5A.js";
19
- import "./scope-92neiQ2q.js";
12
+ import { t as stripReport } from "./log-C0MDCfA2.js";
13
+ import { n as SUPPORTED_LABEL, t as scanProject } from "./scan-CRexsHOE.js";
14
+ import { t as detectExisting } from "./existing-Das3PHGG.js";
15
+ import { r as expandHome } from "./paths-CdwjySxK.js";
16
+ import { A as listField, O as field, T as rowName, h as listResource, p as listApplications, s as createProduct, y as platformLabel } from "./resources-BMspgZO1.js";
17
+ import "./org-BrR4HGvl.js";
18
+ import "./lookup-us5vu5od.js";
19
+ import "./scope-Ct0_HoNq.js";
20
20
  import { a as listAscConfigs, r as createAscConfig } from "./client-BZ1UbpXz.js";
21
21
  import { i as listUnimportedAscProducts, n as findAscAppId, r as listAscApps, t as ascTypeDisplay } from "./products-DH_fK9tY.js";
22
22
  import "./input-vi0bou04.js";
23
- import { n as resolveAppBinding, r as resolveScopeFromKey, t as platformForIntegration } from "./bind-CVRlFlRo.js";
24
- import "./login-DrMLxlF4.js";
25
- import { s as ensureSkillsCurrent } from "./skills-miJDcjQ2.js";
26
- import { t as generateStoreKit } from "./storekit-Di3BkafX.js";
27
- import { n as performLoginWithUi, t as createLoginGate } from "./login-NxCl2WuU.js";
28
- import { a as copyToClipboard, r as buildCopyPrompt, t as runAction } from "./run-Ccv5egCC.js";
29
- import { n as selectHostedStatus, t as detectDrivers } from "./drivers-D0818zGc.js";
30
- import { r as actionById, t as detectBilling } from "./billing-CCuMv6mh.js";
23
+ import { n as resolveAppBinding, r as resolveScopeFromKey, t as platformForIntegration } from "./bind-82oTpHZ3.js";
24
+ import "./login-CiK5T4w8.js";
25
+ import { s as ensureSkillsCurrent } from "./skills-CiWxt6vS.js";
26
+ import { t as generateStoreKit } from "./storekit-CptdG4RJ.js";
27
+ import { n as performLoginWithUi, t as createLoginGate } from "./login-girc324T.js";
28
+ import { a as copyToClipboard, r as buildCopyPrompt, t as runAction } from "./run-D4V6mq8_.js";
29
+ import { n as selectHostedStatus, t as detectDrivers } from "./drivers-CTyYdBL7.js";
30
+ import { r as actionById, t as detectBilling } from "./billing-C4lXR0xG.js";
31
31
  import { n as writeReport, t as readReport } from "./reports-CwwKLUh0.js";
32
32
  import { readFileSync, writeFileSync } from "node:fs";
33
33
  import { basename } from "node:path";
@@ -1,8 +1,8 @@
1
1
  import { n as fg, t as THEME } from "./theme-DUsCh-Vd.js";
2
+ import { pathToFileURL } from "node:url";
2
3
  import pc from "picocolors";
3
4
  import { link } from "ansi-escapes";
4
5
  import wrapAnsi from "wrap-ansi";
5
- import { pathToFileURL } from "node:url";
6
6
 
7
7
  //#region src/ui/log.ts
8
8
  function brand(text) {
@@ -1,11 +1,11 @@
1
- import { f as Integration, i as AUTH_HOST, p as OAUTH_SCOPE, s as CLI_CLIENT_ID, t as API_HOST } from "./environment-a7W-0wg0.js";
2
- import { c as writePendingLogin, l as writeSession, o as serializeSession, r as removePendingLogin, t as readPendingLogin } from "./storage-BcvKhvzZ.js";
3
- import { a as readOnboardingIdempotencyKey, d as writeOnboardedApp, f as writeOnboardedOrg, i as readOnboardedOrg } from "./config-BO1Y87kV.js";
4
- import { r as track } from "./telemetry-BpYXL-z3.js";
5
- import { r as UsageError } from "./spinner-D6phP4Af.js";
1
+ import { h as OAUTH_SCOPE, i as AUTH_HOST, l as CLI_CLIENT_ID, m as Integration, t as API_HOST } from "./environment-djS0ik60.js";
2
+ import { c as writePendingLogin, l as writeSession, o as serializeSession, r as removePendingLogin, t as readPendingLogin } from "./storage-CrXGgIbS.js";
3
+ import { a as readOnboardedOrg, m as writeOnboardedOrg, o as readOnboardingIdempotencyKey, p as writeOnboardedApp } from "./config-CGcG7GOt.js";
4
+ import { r as track } from "./telemetry-BqaPbM0k.js";
5
+ import { r as UsageError } from "./spinner-1uuKKZMc.js";
6
6
  import { n as ui } from "./ui-D_qf3Gvw.js";
7
- import { t as scanProject } from "./scan-Be17rMcQ.js";
8
- import { s as ensureSkillsCurrent } from "./skills-miJDcjQ2.js";
7
+ import { t as scanProject } from "./scan-CRexsHOE.js";
8
+ import { s as ensureSkillsCurrent } from "./skills-CiWxt6vS.js";
9
9
  import { spawn } from "node:child_process";
10
10
  import { setTimeout } from "node:timers/promises";
11
11