@superwall/cli 2.3.1 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/README.md +10 -0
  2. package/dist/{apple-z2qjOzIZ.js → apple-Dyr7OFBx.js} +17 -16
  3. package/dist/approve-Czs1-JO9.js +186 -0
  4. package/dist/{assets-DXXegdDt.js → assets-BrB9jQPQ.js} +3 -3
  5. package/dist/auth.d.ts +1 -1
  6. package/dist/auth.js +3 -3
  7. package/dist/{billing-B8tOjsnY.js → billing-D5qqIlVb.js} +3 -3
  8. package/dist/{bind-Bx9K6LwP.js → bind-B3eEcRyp.js} +4 -4
  9. package/dist/browser-Bp3yRKlU.js +36 -0
  10. package/dist/{build-Bu2kkzRe.js → build-DD9pSwHX.js} +10 -8
  11. package/dist/{client-DOgk9gAS.js → client-AI9H4GGB.js} +3 -3
  12. package/dist/{config-BO1Y87kV.js → config-CGcG7GOt.js} +9 -1
  13. package/dist/{create-B03MAuPe.js → create-B4m-IKlr.js} +8 -8
  14. package/dist/create-CJljlkJK.js +20 -0
  15. package/dist/{create-DzC_89gq.js → create-ChfgWpiM.js} +41 -69
  16. package/dist/{doctor-BGZSKY_B.js → doctor-XtXW6tKE.js} +6 -6
  17. package/dist/download-2Zu2I_Og.js +58 -0
  18. package/dist/{drivers-DqLgQxkC.js → drivers-CMEL13gp.js} +4 -4
  19. package/dist/entry.js +69 -33
  20. package/dist/{environment-i8BhiBDB.js → environment-BWT2S4qC.js} +9 -2
  21. package/dist/{existing-BPOG5zLO.js → existing-b0GxFcnc.js} +2 -2
  22. package/dist/{session-BDLQUJyV.js → git-D7AVdugb.js} +97 -335
  23. package/dist/held-CX7Zf8u-.js +17 -0
  24. package/dist/{held-C56PYMRH.js → held-D3PUNky2.js} +7 -7
  25. package/dist/install-CVUXsx8c.js +103 -0
  26. package/dist/{integrate-DZ4Qvoch.js → integrate-qvKd9pVW.js} +29 -27
  27. package/dist/{log-NVhVe_oe.js → log-C0MDCfA2.js} +1 -1
  28. package/dist/{login-p9GVEKzD.js → login-COmGHrU5.js} +2 -1
  29. package/dist/login-ClnJi1Ea.js +17 -0
  30. package/dist/{login-ONZdK8vN.js → login-PMoXUGqq.js} +9 -42
  31. package/dist/{lookup-flTi0at0.js → lookup-gjcKIZvh.js} +4 -3
  32. package/dist/{migrate-DnXpbhL1.js → migrate-SkkLLdmr.js} +33 -28
  33. package/dist/{migration-DJ1uNKhk.js → migration-DS44-3Zr.js} +10 -10
  34. package/dist/{notification-url-CCDeS5S-.js → notification-url-BjQPLf4-.js} +4 -4
  35. package/dist/{open-QdsZ_N47.js → open-DQpm2yVs.js} +2 -2
  36. package/dist/{org-BiFPjoHD.js → org-C04eAO-j.js} +3 -2
  37. package/dist/organization-BOECL3vZ.js +39 -0
  38. package/dist/orgs-D6Kk96mG.js +81 -0
  39. package/dist/{paths-yRgm5Jpa.js → paths-REb-GrbX.js} +2 -2
  40. package/dist/{playbook-B-pRKNa4.js → playbook-Du4Oydbf.js} +11 -11
  41. package/dist/{products-DH_fK9tY.js → products-Cqq59DBQ.js} +1 -1
  42. package/dist/project-CP6hiHra.js +47 -0
  43. package/dist/{promote-Djzk4C81.js → promote-Dm2_b1WK.js} +24 -19
  44. package/dist/pull-DsdOoG-D.js +36 -0
  45. package/dist/{pull-BLA9XwHj.js → pull-F6pvO4To.js} +9 -28
  46. package/dist/pull-zYAbqo9n.js +106 -0
  47. package/dist/{push-gSBxGDik.js → push-BIFLhAiO.js} +9 -7
  48. package/dist/push-CJVfvFZq.js +29 -0
  49. package/dist/push-D_l9KJZN.js +290 -0
  50. package/dist/push-SVzv7fzE.js +22 -0
  51. package/dist/{registry-D3xmWk9p.js → registry-DIJB0mJa.js} +890 -158
  52. package/dist/resolve--GsHj0Q1.js +171 -0
  53. package/dist/{resources-BTnczJCA.js → resources-BaP3p_LY.js} +3 -80
  54. package/dist/{run-C1SoizcJ.js → run-C5OPwhvS.js} +2 -2
  55. package/dist/run-CgLmD2vR.js +1345 -0
  56. package/dist/{scan-Dwk_lT5q.js → scan-Bj5y0zTZ.js} +1 -1
  57. package/dist/scan-v_WTE722.js +4 -0
  58. package/dist/{scope-Db7blD-l.js → scope-Bp_zwJOo.js} +6 -5
  59. package/dist/scope-CCb_7UvN.js +89 -0
  60. package/dist/sdk-TvT0p_nO.js +71 -0
  61. package/dist/selection-BltBpyp5.js +179 -0
  62. package/dist/series-TAixFBWW.js +685 -0
  63. package/dist/{server-Cb2N75JL.js → server-CdVIboQn.js} +10 -8
  64. package/dist/server-CvJVusw3.js +29 -0
  65. package/dist/session-B8JNXkwN.js +6 -0
  66. package/dist/session-D3fgXQBt.js +219 -0
  67. package/dist/{session-CnDJp_HO.js → session-Ywim-P8M.js} +1 -1
  68. package/dist/{setup-BLahHpgy.js → setup-zzjtTy8k.js} +9 -8
  69. package/dist/skills/index.json +5 -0
  70. package/dist/skills/superwall/SKILL.md +48 -30
  71. package/dist/skills/superwall/references/api.md +3 -2
  72. package/dist/skills/superwall-editor/SKILL.md +7 -5
  73. package/dist/skills/superwall-framework/SKILL.md +11 -8
  74. package/dist/skills/superwall-framework/references/onboarding-state.md +21 -14
  75. package/dist/skills/superwall-workspaces/SKILL.md +313 -0
  76. package/dist/skills/superwall-workspaces/references/cli.md +174 -0
  77. package/dist/skills/superwall-workspaces/references/slots.md +103 -0
  78. package/dist/{skills-zebMTZyr.js → skills-2qYaUXGE.js} +15 -9
  79. package/dist/skills-8um2fBPS.js +14 -0
  80. package/dist/{source-push-DxuJuwEf.js → source-push-kAep4gPe.js} +6 -5
  81. package/dist/{spinner-BN3U1CVB.js → spinner-BANVLncC.js} +17 -5
  82. package/dist/starter-CiLrp1cN.js +190 -0
  83. package/dist/status-CoYMK7QL.js +139 -0
  84. package/dist/{storage-VagEaaJC.js → storage-DzP22xKn.js} +1 -1
  85. package/dist/storekit-D5eopLM0.js +17 -0
  86. package/dist/{storekit-CoOf4Rvh.js → storekit-n1x0bWkQ.js} +4 -4
  87. package/dist/{telemetry-CM0BDwCK.js → telemetry-CXN6f-ZX.js} +2 -2
  88. package/dist/{token-lUUOkTJA.js → token-FmeHywYt.js} +1 -1
  89. package/dist/tools-skills/superwall/SKILL.md +49 -31
  90. package/dist/tools-skills/superwall/references/api.md +3 -2
  91. package/dist/tools-skills/superwall-editor/SKILL.md +7 -5
  92. package/dist/tools.d.ts +1 -1
  93. package/dist/tools.js +575 -75
  94. package/dist/try-BWbzgelb.js +120 -0
  95. package/dist/{selection-u2KiKu_d.js → types-JdxmnCko.js} +1 -178
  96. package/dist/upgrade-Bk5boOgW.js +206 -0
  97. package/dist/upgrade-CoWCEnoi.js +7 -0
  98. package/package.json +5 -3
  99. package/prompts/commandments.xml +2 -0
  100. package/dist/create-BdZS_T68.js +0 -19
  101. package/dist/held-DSNUY-NZ.js +0 -16
  102. package/dist/login-Blrkm6oi.js +0 -16
  103. package/dist/push-BkMgOT6X.js +0 -24
  104. package/dist/scan-Kp-MAutK.js +0 -4
  105. package/dist/server-psYghr9K.js +0 -24
  106. package/dist/session-CehHJWZk.js +0 -6
  107. package/dist/skills-DDV4zcLR.js +0 -14
  108. package/dist/storekit-BcBb2jXB.js +0 -16
  109. package/dist/upgrade-CpTJv_M7.js +0 -7
  110. package/dist/upgrade-DZbKb67W.js +0 -117
  111. /package/dist/{client-BZ1UbpXz.js → client-BJQXl62Q.js} +0 -0
  112. /package/dist/{devtools-pBl_vt03.js → devtools-ByZ6XYnn.js} +0 -0
  113. /package/dist/{input-vi0bou04.js → input-MDd67UIp.js} +0 -0
  114. /package/dist/{reports-CwwKLUh0.js → reports-CuhB1_ub.js} +0 -0
  115. /package/dist/{screenshot-file-tVBfUEIi.js → screenshot-file-XAS0Xy0e.js} +0 -0
  116. /package/dist/{storage-gRyQetN9.d.ts → storage-BjQCiTuz.d.ts} +0 -0
  117. /package/dist/{timing-BVxPrYq3.js → timing-Ca0TXY-A.js} +0 -0
@@ -1,6 +0,0 @@
1
- import "./output-Ggzq5_-t.js";
2
- import "./environment-i8BhiBDB.js";
3
- import "./storage-VagEaaJC.js";
4
- import { n as runWhoami, t as runLogout } from "./session-CnDJp_HO.js";
5
-
6
- export { runLogout, runWhoami };
@@ -1,14 +0,0 @@
1
- import "./token-lUUOkTJA.js";
2
- import "./output-Ggzq5_-t.js";
3
- import "./environment-i8BhiBDB.js";
4
- import "./storage-VagEaaJC.js";
5
- import "./client-DOgk9gAS.js";
6
- import "./config-BO1Y87kV.js";
7
- import "./telemetry-CM0BDwCK.js";
8
- import "./spawn-DmmmHIP-.js";
9
- import "./spinner-BN3U1CVB.js";
10
- import "./ui-D_qf3Gvw.js";
11
- import "./paths-yRgm5Jpa.js";
12
- import { a as bundledSkills, c as knownSkills, d as readBundledSkill, f as runSkills, i as SUPERWALL_SKILLS_SOURCE, l as normalizeSkillFrontmatter, m as skillsRefFor, n as SKILLS_INSTALL_SOURCE, o as checkSkillsSync, p as skillSummary, r as SKILLS_REF, s as ensureSkillsCurrent, t as PLAYBOOKS, u as normalizeSkillsDir } from "./skills-zebMTZyr.js";
13
-
14
- export { PLAYBOOKS, SKILLS_INSTALL_SOURCE, SKILLS_REF, SUPERWALL_SKILLS_SOURCE, bundledSkills, checkSkillsSync, ensureSkillsCurrent, knownSkills, normalizeSkillFrontmatter, normalizeSkillsDir, readBundledSkill, runSkills, skillSummary, skillsRefFor };
@@ -1,16 +0,0 @@
1
- import "./token-lUUOkTJA.js";
2
- import "./output-Ggzq5_-t.js";
3
- import "./environment-i8BhiBDB.js";
4
- import "./storage-VagEaaJC.js";
5
- import "./client-DOgk9gAS.js";
6
- import "./config-BO1Y87kV.js";
7
- import "./spinner-BN3U1CVB.js";
8
- import "./ui-D_qf3Gvw.js";
9
- import "./resources-BTnczJCA.js";
10
- import "./org-BiFPjoHD.js";
11
- import "./lookup-flTi0at0.js";
12
- import "./scope-Db7blD-l.js";
13
- import "./input-vi0bou04.js";
14
- import { n as writeStoreKit, t as generateStoreKit } from "./storekit-CoOf4Rvh.js";
15
-
16
- export { generateStoreKit, writeStoreKit };
@@ -1,7 +0,0 @@
1
- import "./output-Ggzq5_-t.js";
2
- import "./environment-i8BhiBDB.js";
3
- import "./config-BO1Y87kV.js";
4
- import "./spawn-DmmmHIP-.js";
5
- import { a as runUpgrade, i as refreshUpdateCheck, n as isNewerVersion, r as maybeNotifyUpdate, t as flushUpdateCheck } from "./upgrade-DZbKb67W.js";
6
-
7
- export { flushUpdateCheck, isNewerVersion, maybeNotifyUpdate, refreshUpdateCheck, runUpgrade };
@@ -1,117 +0,0 @@
1
- import { m as RUNNING_VIA_NPX, v as VERSION } from "./environment-i8BhiBDB.js";
2
- import { c as readUpdateCheck, g as writeUpdateCheck } from "./config-BO1Y87kV.js";
3
- import { r as spawnStream } from "./spawn-DmmmHIP-.js";
4
- import pc from "picocolors";
5
-
6
- //#region src/core/support/upgrade.ts
7
- const CHECK_INTERVAL_MS = 1440 * 60 * 1e3;
8
- const REGISTRY_URL = "https://registry.npmjs.org/superwall/latest";
9
- const pending = [];
10
- function isNewerVersion(latest, current) {
11
- const l = latest.split(".").map((n) => parseInt(n, 10));
12
- const c = current.split(".").map((n) => parseInt(n, 10));
13
- for (let i = 0; i < 3; i++) {
14
- const a = l[i] ?? 0;
15
- const b = c[i] ?? 0;
16
- if (Number.isNaN(a) || Number.isNaN(b)) return false;
17
- if (a !== b) return a > b;
18
- }
19
- return false;
20
- }
21
- async function selectLatestVersion() {
22
- try {
23
- const res = await fetch(REGISTRY_URL, {
24
- headers: { accept: "application/json" },
25
- signal: AbortSignal.timeout(5e3)
26
- });
27
- if (!res.ok) return null;
28
- const { version } = await res.json();
29
- return version ?? null;
30
- } catch {
31
- return null;
32
- }
33
- }
34
- function selectAvailableUpdate() {
35
- const latest = readUpdateCheck()?.latest;
36
- if (!latest || !isNewerVersion(latest, VERSION)) return null;
37
- return latest;
38
- }
39
- function refreshUpdateCheck() {
40
- if (process.env.NODE_TEST_CONTEXT) return;
41
- const cached = readUpdateCheck();
42
- if ((cached?.checkedAt ? Date.now() - Date.parse(cached.checkedAt) : Infinity) < CHECK_INTERVAL_MS) return;
43
- pending.push(selectLatestVersion().then((version) => {
44
- if (version) writeUpdateCheck({
45
- latest: version,
46
- checkedAt: (/* @__PURE__ */ new Date()).toISOString()
47
- });
48
- }));
49
- }
50
- async function flushUpdateCheck(capMs = 2e3) {
51
- if (pending.length === 0) return;
52
- await Promise.race([Promise.allSettled(pending), new Promise((done) => setTimeout(done, capMs).unref())]);
53
- }
54
- function maybeNotifyUpdate(stream) {
55
- const latest = selectAvailableUpdate();
56
- if (!latest) return;
57
- stream.write(`${pc.dim(`Update available ${VERSION} → ${latest} · run \`superwall upgrade\``)}\n`);
58
- }
59
- async function runUpgrade(ctx) {
60
- const { ui } = ctx;
61
- if (RUNNING_VIA_NPX()) {
62
- if (ctx.json) return ctx.output.data({
63
- upgraded: false,
64
- via: "npx"
65
- });
66
- ui.info("You're running via npx, which always fetches the latest published version - nothing to upgrade.");
67
- return;
68
- }
69
- ui.intro("Superwall upgrade");
70
- const spin = ui.spinner();
71
- spin.start("Checking the latest version");
72
- const latest = await selectLatestVersion();
73
- if (!latest) {
74
- spin.stop("Check failed");
75
- throw new Error("Couldn't reach the npm registry - try again.");
76
- }
77
- if (!isNewerVersion(latest, VERSION)) {
78
- spin.stop(`You're on the latest version (\`${VERSION}\`)`);
79
- if (ctx.json) return ctx.output.data({
80
- upgraded: false,
81
- version: VERSION
82
- });
83
- return;
84
- }
85
- spin.message(`Upgrading \`${VERSION}\` → \`${latest}\``);
86
- const errors = [];
87
- const { code } = await spawnStream({
88
- bin: "npm",
89
- args: [
90
- "install",
91
- "--global",
92
- `superwall@${latest}`
93
- ],
94
- cwd: process.cwd(),
95
- onStdoutLine: () => {},
96
- onStderrLine: (line) => errors.push(line)
97
- });
98
- if (code !== 0) {
99
- spin.stop("Upgrade failed");
100
- const detail = errors.slice(-3).join(" ").trim();
101
- throw new Error(`npm couldn't upgrade the package${detail ? ` (${detail.slice(0, 200)})` : ""}. Try: npm install --global superwall@latest`);
102
- }
103
- writeUpdateCheck({
104
- latest,
105
- checkedAt: (/* @__PURE__ */ new Date()).toISOString()
106
- });
107
- spin.stop(`Upgraded \`${VERSION}\` → \`${latest}\``);
108
- if (ctx.json) return ctx.output.data({
109
- upgraded: true,
110
- from: VERSION,
111
- to: latest
112
- });
113
- ui.outro("You're on the latest version.");
114
- }
115
-
116
- //#endregion
117
- export { runUpgrade as a, refreshUpdateCheck as i, isNewerVersion as n, maybeNotifyUpdate as r, flushUpdateCheck as t };
File without changes
File without changes
File without changes