@superwall/cli 1.6.1 → 1.6.2

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 (57) hide show
  1. package/README.md +6 -0
  2. package/dist/{actions-BdZ-7BJd.js → actions-H7f6knyY.js} +2 -2
  3. package/dist/{api-FjrCPu6r.js → api-Dv3LyZ5m.js} +7 -7
  4. package/dist/{app-YeJj35Ia.js → app-mJC5NDtW.js} +7 -7
  5. package/dist/{asa-4nk7HHy8.js → asa-D6H7Pjae.js} +8 -8
  6. package/dist/{asc-2TZOQuK1.js → asc-xCin0akG.js} +9 -9
  7. package/dist/{auth-QUYfKdwk.js → auth-ZlLL-Gko.js} +8 -8
  8. package/dist/auth.js +2 -2
  9. package/dist/{billing-BK7bpv1t.js → billing-C8kBge_S.js} +1 -1
  10. package/dist/{bind-Ch4VR2EY.js → bind-BIzaGq8K.js} +2 -2
  11. package/dist/build-B7BS1rF2.js +87 -0
  12. package/dist/{command-BJ_6850A.js → command-3fGYyC8r.js} +4 -4
  13. package/dist/{create-vSQxQlEP.js → create-CwnnNqv4.js} +20 -19
  14. package/dist/{dev-DEss5dwo.js → dev-CgGAb5Al.js} +9 -6
  15. package/dist/dev-Dx99K183.js +22 -0
  16. package/dist/{doctor-BYTfekBr.js → doctor-CyUvut31.js} +9 -9
  17. package/dist/{drivers-DGml3OlF.js → drivers-6RMOPIdn.js} +2 -2
  18. package/dist/entry.js +99 -32
  19. package/dist/{existing-DgSo639M.js → existing-DHpPn1y6.js} +2 -2
  20. package/dist/feedback-RKyGuQ8_.js +152 -0
  21. package/dist/{hosted-DqGp6oV2.js → hosted-BeGVAntr.js} +2 -2
  22. package/dist/{integrate-Cl9eKHoF.js → integrate-BR2LR-EK.js} +20 -20
  23. package/dist/{login-DS3MPeW2.js → login-Bhxgqwtm.js} +3 -3
  24. package/dist/{migrate-WiTO71PE.js → migrate-C-4ISELN.js} +22 -21
  25. package/dist/{open-studio-CbMUL5Va.js → open-studio-BnVD6tJ9.js} +16 -13
  26. package/dist/{output-XKuoEEjP.js → output-C-4UKMot.js} +1 -1
  27. package/dist/{pipeline-J9-nENTS.js → pipeline-CHX0Syre.js} +9 -494
  28. package/dist/{print-skill-BOGm5Szi.js → print-skill-BiZLdCKv.js} +6 -6
  29. package/dist/{promote-Ci085QxU.js → promote-Pgpz-3xl.js} +15 -14
  30. package/dist/publish-BPeuc3lq.js +35 -0
  31. package/dist/push-DcSQ4odB.js +35 -0
  32. package/dist/{query-BZStoGLM.js → query-CWLaZkdm.js} +7 -7
  33. package/dist/{resource-ClLHSXi6.js → resource-jwASPCrw.js} +11 -11
  34. package/dist/{run-CiaWn78U.js → run-D-NbZLpj.js} +2 -2
  35. package/dist/{scan-DEgX5HxV.js → scan-BmAW413l.js} +1 -1
  36. package/dist/selection-BGi6GyxC.js +496 -0
  37. package/dist/skills/superwall-framework/SKILL.md +109 -36
  38. package/dist/skills/superwall-framework/references/cli.md +45 -5
  39. package/dist/skills/superwall-framework/references/mobile-design.md +60 -181
  40. package/dist/{skills-DsBAVRTE.js → skills-AxAf7bDB.js} +77 -8
  41. package/dist/{skills-DjPCmUMU.js → skills-FK5aDuNV.js} +6 -6
  42. package/dist/{telemetry-EzV7cA7s.js → telemetry-Ch9cCTI-.js} +1 -1
  43. package/dist/{token-r5g876aI.js → token-BGAVPSQc.js} +1 -1
  44. package/dist/{update-Cz3Q3MFj.js → update-DIXbL-H9.js} +2 -2
  45. package/dist/{upgrade-BA_4sdnh.js → upgrade-De7JMI1g.js} +5 -5
  46. package/package.json +2 -2
  47. package/dist/dev-B9qmPH1W.js +0 -21
  48. package/dist/feedback-4LsBpZZx.js +0 -73
  49. package/dist/publish--TV-j8Zd.js +0 -34
  50. package/dist/push-CpGetsJF.js +0 -34
  51. package/dist/skills/superwall-framework/references/responsive.md +0 -162
  52. /package/dist/{api-output-CEhN-U_N.js → api-output-aJNw7Syy.js} +0 -0
  53. /package/dist/{asc-products-1e1DoGeL.js → asc-products-Dvcyef3_.js} +0 -0
  54. /package/dist/{org-CV8c849b.js → org-CQduIOic.js} +0 -0
  55. /package/dist/{params-BxgTuCzr.js → params-l3CrvRtR.js} +0 -0
  56. /package/dist/{reports-C0xHCLnt.js → reports-DqMs9xNR.js} +0 -0
  57. /package/dist/{storekit-Dlpbq5Wv.js → storekit-CC4gnTI6.js} +0 -0
package/README.md CHANGED
@@ -190,6 +190,12 @@ device, user and eligibility, and asks you for every purchase, restore,
190
190
  permission and callback outcome. Product data is read from Superwall, never
191
191
  invented, and the same build runs unchanged inside a real SDK webview.
192
192
 
193
+ ### Build
194
+
195
+ `superwall build` writes the same single-file HTML document a push would
196
+ version — `superwall/.superwall/build/<kind>/<id>/[<platform>/]index.html` —
197
+ and stops there, no login needed. `--id`, `--platform`, `--out`, `--json`.
198
+
193
199
  ### Push, promote, publish
194
200
 
195
201
  Git semantics on purpose: **push saves, promote ships.** Every push builds
@@ -1,5 +1,5 @@
1
- import { m as Integration } from "./output-XKuoEEjP.js";
2
- import { i as loadBundledSkill } from "./skills-DsBAVRTE.js";
1
+ import { m as Integration } from "./output-C-4UKMot.js";
2
+ import { i as loadBundledSkill } from "./skills-AxAf7bDB.js";
3
3
 
4
4
  //#region src/core/agent/actions.ts
5
5
  /** Skill reference file per framework, so an agent only sees its own platform's docs. */
@@ -1,12 +1,12 @@
1
- import "./output-XKuoEEjP.js";
2
- import "./telemetry-EzV7cA7s.js";
3
- import "./update-Cz3Q3MFj.js";
4
- import "./token-r5g876aI.js";
5
- import { t as defineCommand } from "./command-BJ_6850A.js";
1
+ import "./output-C-4UKMot.js";
2
+ import "./telemetry-Ch9cCTI-.js";
3
+ import "./update-DIXbL-H9.js";
4
+ import "./token-BGAVPSQc.js";
5
+ import { t as defineCommand } from "./command-3fGYyC8r.js";
6
6
  import "./ui-4gLyfrgl.js";
7
7
  import { E as titleCase, T as rowName, b as platformLabel, g as listResource, h as listProjects, m as listOrganizations } from "./resources-Bf9O1JNM.js";
8
- import { t as parseParams } from "./params-BxgTuCzr.js";
9
- import { n as emitJson, t as apiCall } from "./api-output-CEhN-U_N.js";
8
+ import { t as parseParams } from "./params-l3CrvRtR.js";
9
+ import { n as emitJson, t as apiCall } from "./api-output-aJNw7Syy.js";
10
10
  import pc from "picocolors";
11
11
 
12
12
  //#region src/commands/platform/api.ts
@@ -1,12 +1,12 @@
1
- import { i as loadSession, r as clearSession } from "./token-r5g876aI.js";
2
- import { a as superwallApi } from "./command-BJ_6850A.js";
1
+ import { i as loadSession, r as clearSession } from "./token-BGAVPSQc.js";
2
+ import { a as superwallApi } from "./command-3fGYyC8r.js";
3
3
  import { n as ui } from "./ui-4gLyfrgl.js";
4
- import { i as onboardingHooks, n as performLogin } from "./login-DS3MPeW2.js";
5
- import { i as SUPPORTED_LABEL, t as scanProject } from "./scan-DEgX5HxV.js";
6
- import { r as getHostedStatus } from "./hosted-DqGp6oV2.js";
4
+ import { i as onboardingHooks, n as performLogin } from "./login-Bhxgqwtm.js";
5
+ import { i as SUPPORTED_LABEL, t as scanProject } from "./scan-BmAW413l.js";
6
+ import { r as getHostedStatus } from "./hosted-BeGVAntr.js";
7
7
  import { t as withSpinner } from "./spinner-DFctF_Jw.js";
8
- import { n as resolveAppBinding, r as resolveScopeFromKey, t as platformForIntegration } from "./bind-Ch4VR2EY.js";
9
- import { t as ACTIONS } from "./actions-BdZ-7BJd.js";
8
+ import { n as resolveAppBinding, r as resolveScopeFromKey, t as platformForIntegration } from "./bind-BIzaGq8K.js";
9
+ import { t as ACTIONS } from "./actions-H7f6knyY.js";
10
10
 
11
11
  //#region src/commands/workflow/integrate/app.ts
12
12
  async function performLoginWithUi(app, onProvisioned) {
@@ -1,14 +1,14 @@
1
- import "./output-XKuoEEjP.js";
2
- import "./telemetry-EzV7cA7s.js";
3
- import "./update-Cz3Q3MFj.js";
4
- import "./token-r5g876aI.js";
5
- import { r as ApiError, t as defineCommand } from "./command-BJ_6850A.js";
1
+ import "./output-C-4UKMot.js";
2
+ import "./telemetry-Ch9cCTI-.js";
3
+ import "./update-DIXbL-H9.js";
4
+ import "./token-BGAVPSQc.js";
5
+ import { r as ApiError, t as defineCommand } from "./command-3fGYyC8r.js";
6
6
  import "./ui-4gLyfrgl.js";
7
7
  import "./spinner-DFctF_Jw.js";
8
8
  import { h as listProjects } from "./resources-Bf9O1JNM.js";
9
- import { t as requireOrg } from "./org-CV8c849b.js";
10
- import { t as parseParams } from "./params-BxgTuCzr.js";
11
- import { n as emitJson, t as apiCall } from "./api-output-CEhN-U_N.js";
9
+ import { t as requireOrg } from "./org-CQduIOic.js";
10
+ import { t as parseParams } from "./params-l3CrvRtR.js";
11
+ import { n as emitJson, t as apiCall } from "./api-output-aJNw7Syy.js";
12
12
  import { readFileSync } from "node:fs";
13
13
 
14
14
  //#region src/core/api/asa.ts
@@ -1,15 +1,15 @@
1
- import { g as SUPERWALL_HOME } from "./output-XKuoEEjP.js";
2
- import "./telemetry-EzV7cA7s.js";
3
- import "./update-Cz3Q3MFj.js";
4
- import "./token-r5g876aI.js";
5
- import { t as defineCommand } from "./command-BJ_6850A.js";
1
+ import { g as SUPERWALL_HOME } from "./output-C-4UKMot.js";
2
+ import "./telemetry-Ch9cCTI-.js";
3
+ import "./update-DIXbL-H9.js";
4
+ import "./token-BGAVPSQc.js";
5
+ import { t as defineCommand } from "./command-3fGYyC8r.js";
6
6
  import "./ui-4gLyfrgl.js";
7
7
  import "./spinner-DFctF_Jw.js";
8
8
  import { T as rowName } from "./resources-Bf9O1JNM.js";
9
- import { t as requireOrg } from "./org-CV8c849b.js";
10
- import { t as parseParams } from "./params-BxgTuCzr.js";
11
- import { n as emitJson, t as apiCall } from "./api-output-CEhN-U_N.js";
12
- import { a as ascProxy, c as listAscConfigs, i as listAscApps, n as fetchUnimportedAscProducts, o as createAscConfig, r as findAscAppId, s as deleteAscConfig, t as ascTypeDisplay } from "./asc-products-1e1DoGeL.js";
9
+ import { t as requireOrg } from "./org-CQduIOic.js";
10
+ import { t as parseParams } from "./params-l3CrvRtR.js";
11
+ import { n as emitJson, t as apiCall } from "./api-output-aJNw7Syy.js";
12
+ import { a as ascProxy, c as listAscConfigs, i as listAscApps, n as fetchUnimportedAscProducts, o as createAscConfig, r as findAscAppId, s as deleteAscConfig, t as ascTypeDisplay } from "./asc-products-Dvcyef3_.js";
13
13
  import { dirname, join } from "node:path";
14
14
  import { homedir } from "node:os";
15
15
  import { existsSync, mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
@@ -1,13 +1,13 @@
1
- import { o as API_HOST } from "./output-XKuoEEjP.js";
2
- import { i as track } from "./telemetry-EzV7cA7s.js";
3
- import "./update-Cz3Q3MFj.js";
4
- import { i as loadSession, r as clearSession } from "./token-r5g876aI.js";
5
- import { t as defineCommand } from "./command-BJ_6850A.js";
1
+ import { o as API_HOST } from "./output-C-4UKMot.js";
2
+ import { i as track } from "./telemetry-Ch9cCTI-.js";
3
+ import "./update-DIXbL-H9.js";
4
+ import { i as loadSession, r as clearSession } from "./token-BGAVPSQc.js";
5
+ import { t as defineCommand } from "./command-3fGYyC8r.js";
6
6
  import "./ui-4gLyfrgl.js";
7
- import { n as ensureSkillsCurrent } from "./skills-DsBAVRTE.js";
7
+ import { n as ensureSkillsCurrent } from "./skills-AxAf7bDB.js";
8
8
  import "./spawn-DSoTXy_j.js";
9
- import { i as onboardingHooks, n as performLogin, t as loginWithApiKey } from "./login-DS3MPeW2.js";
10
- import { t as scanProject } from "./scan-DEgX5HxV.js";
9
+ import { i as onboardingHooks, n as performLogin, t as loginWithApiKey } from "./login-Bhxgqwtm.js";
10
+ import { t as scanProject } from "./scan-BmAW413l.js";
11
11
 
12
12
  //#region src/commands/account/auth.ts
13
13
  const runLogin = defineCommand({
package/dist/auth.js CHANGED
@@ -1,4 +1,4 @@
1
- import "./output-XKuoEEjP.js";
2
- import { n as resolveAuthToken, o as NotLoggedInError, t as getOAuthAccessToken } from "./token-r5g876aI.js";
1
+ import "./output-C-4UKMot.js";
2
+ import { n as resolveAuthToken, o as NotLoggedInError, t as getOAuthAccessToken } from "./token-BGAVPSQc.js";
3
3
 
4
4
  export { NotLoggedInError, getOAuthAccessToken, resolveAuthToken };
@@ -1,4 +1,4 @@
1
- import { n as allDeps, r as readPackageJson } from "./scan-DEgX5HxV.js";
1
+ import { n as allDeps, r as readPackageJson } from "./scan-BmAW413l.js";
2
2
  import { readFileSync } from "node:fs";
3
3
  import fg from "fast-glob";
4
4
 
@@ -1,7 +1,7 @@
1
- import { m as Integration } from "./output-XKuoEEjP.js";
1
+ import { m as Integration } from "./output-C-4UKMot.js";
2
2
  import { n as ui } from "./ui-4gLyfrgl.js";
3
3
  import { b as platformLabel, h as listProjects, n as createApplication, s as createProject } from "./resources-Bf9O1JNM.js";
4
- import { t as requireOrg } from "./org-CV8c849b.js";
4
+ import { t as requireOrg } from "./org-CQduIOic.js";
5
5
 
6
6
  //#region src/core/account/bind.ts
7
7
  const NEW = "__new__";
@@ -0,0 +1,87 @@
1
+ import { y as VERSION } from "./output-C-4UKMot.js";
2
+ import "./telemetry-Ch9cCTI-.js";
3
+ import "./update-DIXbL-H9.js";
4
+ import "./token-BGAVPSQc.js";
5
+ import { t as defineCommand } from "./command-3fGYyC8r.js";
6
+ import { n as ui } from "./ui-4gLyfrgl.js";
7
+ import "./resources-Bf9O1JNM.js";
8
+ import { A as assetBaseUrl, _ as collectProjectDeclarations, k as loadFramework, m as took, n as parseIds, o as requireProject, r as projectDir, s as selectSurfaces, u as kb, v as writeProjectTypes, x as readLock } from "./selection-BGi6GyxC.js";
9
+ import pc from "picocolors";
10
+ import * as path from "node:path";
11
+ import * as fs from "node:fs";
12
+
13
+ //#region src/commands/paywalls/build.ts
14
+ const PLATFORMS = new Set([
15
+ "ios",
16
+ "android",
17
+ "web"
18
+ ]);
19
+ function parseBuildPlatforms(value) {
20
+ const platforms = parseIds(value);
21
+ for (const platform of platforms) if (!PLATFORMS.has(platform)) throw new Error(`Unknown platform "${platform}" — use ios, android or web.`);
22
+ return platforms.length === 0 ? [void 0] : platforms;
23
+ }
24
+ function outputFile(out, surface, platform) {
25
+ return path.join(out, surface.kind, surface.id, ...platform ? [platform] : [], "index.html");
26
+ }
27
+ function boundAssetBaseUrl(project, surface, platform) {
28
+ if (platform === void 0) return void 0;
29
+ const lock = readLock(project.superwallDir);
30
+ const section = surface.kind === "paywall" ? lock.paywalls : lock.funnels;
31
+ const applicationId = lock.apps[platform];
32
+ if (section[surface.id]?.[platform] === void 0 || applicationId === void 0) return void 0;
33
+ return assetBaseUrl(applicationId);
34
+ }
35
+ async function runBuildPipeline(context, options = {}) {
36
+ const dir = projectDir(context);
37
+ const framework = await (options.load ?? loadFramework)(dir);
38
+ const project = requireProject(framework.discoverProject(dir), dir);
39
+ writeProjectTypes(project, (await collectProjectDeclarations(framework, project.root)).products);
40
+ const surfaces = selectSurfaces(project, context.argv.id);
41
+ const platforms = parseBuildPlatforms(context.argv.platform);
42
+ const out = path.resolve(typeof context.argv.out === "string" && context.argv.out !== "" ? context.argv.out : path.join(project.superwallDir, ".superwall", "build"));
43
+ context.output.render({
44
+ kind: "intro",
45
+ text: `Superwall ${pc.dim(`v${VERSION}`)}`
46
+ });
47
+ for (const surface of surfaces) for (const problem of surface.diagnostics ?? []) ui.warn(problem);
48
+ const outcomes = [];
49
+ const at = Date.now();
50
+ for (const surface of surfaces) for (const platform of platforms) {
51
+ const built = await framework.buildSnapshot(project, surface, {
52
+ platform,
53
+ assetBaseUrl: boundAssetBaseUrl(project, surface, platform)
54
+ });
55
+ const file = outputFile(out, surface, platform);
56
+ fs.mkdirSync(path.dirname(file), { recursive: true });
57
+ fs.writeFileSync(file, built.html);
58
+ outcomes.push({
59
+ kind: surface.kind,
60
+ id: surface.id,
61
+ platform: platform ?? null,
62
+ file,
63
+ bytes: built.bytes,
64
+ snapshotId: built.snapshotId
65
+ });
66
+ context.output.render({
67
+ kind: "step",
68
+ text: `${surface.kind}/${surface.id}${platform ? ` ${platform}` : ""} ${pc.dim(`${kb(built.bytes)} · ${built.snapshotId.slice(0, 8)}`)} → ${path.relative(process.cwd(), file)}`
69
+ });
70
+ }
71
+ context.output.render({
72
+ kind: "outro",
73
+ text: `${outcomes.length} ${outcomes.length === 1 ? "snapshot" : "snapshots"} built ${took(at)}`
74
+ });
75
+ if (context.json) context.output.data({ builds: outcomes });
76
+ return outcomes;
77
+ }
78
+ const runBuild = defineCommand({
79
+ name: "build",
80
+ output: "both",
81
+ async run(context) {
82
+ await runBuildPipeline(context);
83
+ }
84
+ });
85
+
86
+ //#endregion
87
+ export { outputFile, parseBuildPlatforms, runBuild, runBuildPipeline };
@@ -1,7 +1,7 @@
1
- import { i as writeJson, n as createCommandOutput, o as API_HOST, x as isNonInteractive } from "./output-XKuoEEjP.js";
2
- import { i as track, n as maybeShowTelemetryNotice } from "./telemetry-EzV7cA7s.js";
3
- import { a as refreshUpdateCheck, i as maybeNotifyUpdate } from "./update-Cz3Q3MFj.js";
4
- import { a as saveSession, i as loadSession, n as resolveAuthToken, o as NotLoggedInError } from "./token-r5g876aI.js";
1
+ import { i as writeJson, n as createCommandOutput, o as API_HOST, x as isNonInteractive } from "./output-C-4UKMot.js";
2
+ import { i as track, n as maybeShowTelemetryNotice } from "./telemetry-Ch9cCTI-.js";
3
+ import { a as refreshUpdateCheck, i as maybeNotifyUpdate } from "./update-DIXbL-H9.js";
4
+ import { a as saveSession, i as loadSession, n as resolveAuthToken, o as NotLoggedInError } from "./token-BGAVPSQc.js";
5
5
  import { r as useRenderer, t as selectRenderer } from "./ui-4gLyfrgl.js";
6
6
  import pc from "picocolors";
7
7
  import { resolve } from "node:path";
@@ -1,26 +1,27 @@
1
- import "./output-XKuoEEjP.js";
2
- import "./telemetry-EzV7cA7s.js";
3
- import "./update-Cz3Q3MFj.js";
4
- import "./token-r5g876aI.js";
5
- import { t as defineCommand } from "./command-BJ_6850A.js";
1
+ import "./output-C-4UKMot.js";
2
+ import "./telemetry-Ch9cCTI-.js";
3
+ import "./update-DIXbL-H9.js";
4
+ import "./token-BGAVPSQc.js";
5
+ import { t as defineCommand } from "./command-3fGYyC8r.js";
6
6
  import "./ui-4gLyfrgl.js";
7
- import "./skills-DsBAVRTE.js";
7
+ import "./skills-AxAf7bDB.js";
8
8
  import "./spawn-DSoTXy_j.js";
9
- import "./login-DS3MPeW2.js";
10
- import { n as allDeps, r as readPackageJson, t as scanProject } from "./scan-DEgX5HxV.js";
11
- import "./drivers-DGml3OlF.js";
12
- import "./hosted-DqGp6oV2.js";
13
- import { t as detectExisting } from "./existing-DgSo639M.js";
9
+ import "./login-Bhxgqwtm.js";
10
+ import { n as allDeps, r as readPackageJson, t as scanProject } from "./scan-BmAW413l.js";
11
+ import "./drivers-6RMOPIdn.js";
12
+ import "./hosted-BeGVAntr.js";
13
+ import { t as detectExisting } from "./existing-DHpPn1y6.js";
14
14
  import "./spinner-DFctF_Jw.js";
15
15
  import { b as platformLabel, h as listProjects, n as createApplication, p as listApplications } from "./resources-Bf9O1JNM.js";
16
- import "./org-CV8c849b.js";
17
- import { r as resolveScopeFromKey } from "./bind-Ch4VR2EY.js";
18
- import { A as requireApi, L as writeApp, N as requirePlatform, f as gitAvailable, j as projectPackageName, k as LoginRequiredError } from "./pipeline-J9-nENTS.js";
19
- import "./actions-BdZ-7BJd.js";
20
- import "./app-YeJj35Ia.js";
21
- import "./run-CiaWn78U.js";
22
- import { b as writeTemplate, c as migrationFor, d as projectDirOf, f as scaffoldFromPaywall, i as startStudio, n as migrationNextSteps, s as isSuperwallProject, t as askStudio, u as offerMigration, v as starterConfig, x as slugOf, y as writeSurfaceFiles } from "./open-studio-CbMUL5Va.js";
23
- import "./dev-DEss5dwo.js";
16
+ import { C as writeApp } from "./selection-BGi6GyxC.js";
17
+ import "./org-CQduIOic.js";
18
+ import { r as resolveScopeFromKey } from "./bind-BIzaGq8K.js";
19
+ import { _ as requireApi, b as requirePlatform, g as LoginRequiredError, o as gitAvailable, v as projectPackageName } from "./pipeline-CHX0Syre.js";
20
+ import "./actions-H7f6knyY.js";
21
+ import "./app-mJC5NDtW.js";
22
+ import "./run-D-NbZLpj.js";
23
+ import { b as writeTemplate, c as migrationFor, d as projectDirOf, f as scaffoldFromPaywall, i as startStudio, n as migrationNextSteps, s as isSuperwallProject, t as askStudio, u as offerMigration, v as starterConfig, x as slugOf, y as writeSurfaceFiles } from "./open-studio-BnVD6tJ9.js";
24
+ import "./dev-CgGAb5Al.js";
24
25
  import pc from "picocolors";
25
26
  import * as path from "node:path";
26
27
  import * as os$1 from "node:os";
@@ -1,9 +1,10 @@
1
- import { y as VERSION } from "./output-XKuoEEjP.js";
2
- import { r as ApiError, t as defineCommand } from "./command-BJ_6850A.js";
1
+ import { y as VERSION } from "./output-C-4UKMot.js";
2
+ import { r as ApiError, t as defineCommand } from "./command-3fGYyC8r.js";
3
3
  import { n as ui } from "./ui-4gLyfrgl.js";
4
- import { r as openBrowser } from "./login-DS3MPeW2.js";
4
+ import { r as openBrowser } from "./login-Bhxgqwtm.js";
5
5
  import { D as versionProducts, S as promotePaywallVersion, p as listApplications, w as pushPaywallVersion } from "./resources-Bf9O1JNM.js";
6
- import { A as requireApi, C as requireAssets, D as collectProjectDeclarations, E as loadFramework, I as readLock, M as writeProjectScaffold, O as writeProjectTypes, P as resolveApps, S as assetBaseUrl, T as frameworkVersion, a as projectDir, b as wantedPlatforms, d as pushSource, g as projectForApplication, h as fetchProducts, l as LAYOUT_HINT, m as warnNotPortable, o as projectDirs, p as collectSourceFiles, s as requireProject, v as planTargets, w as syncAssets, x as resolveBinding } from "./pipeline-J9-nENTS.js";
6
+ import { A as assetBaseUrl, M as syncAssets, O as frameworkVersion, _ as collectProjectDeclarations, i as projectDirs, j as requireAssets, k as loadFramework, l as LAYOUT_HINT, o as requireProject, r as projectDir, v as writeProjectTypes, x as readLock } from "./selection-BGi6GyxC.js";
7
+ import { _ as requireApi, a as pushSource, c as warnNotPortable, f as planTargets, h as resolveBinding, l as fetchProducts, m as wantedPlatforms, s as collectSourceFiles, u as projectForApplication, x as resolveApps, y as writeProjectScaffold } from "./pipeline-CHX0Syre.js";
7
8
  import pc from "picocolors";
8
9
  import * as path from "node:path";
9
10
  import * as fs from "node:fs";
@@ -256,7 +257,7 @@ function createStudioActions(framework, project) {
256
257
  return { unreachable: reason(error) };
257
258
  }
258
259
  },
259
- async run(action, surface, onProgress = () => {}) {
260
+ async run(action, surface, onProgress = () => {}, options = {}) {
260
261
  const step = async (name, work) => {
261
262
  onProgress(name, "start");
262
263
  const value = await work();
@@ -271,6 +272,8 @@ function createStudioActions(framework, project) {
271
272
  applicationId: target.applicationId
272
273
  });
273
274
  if (action === "promote") {
275
+ const requested = options.version;
276
+ if (requested !== void 0 && targets.length > 1) throw new Error(`v${requested} targets one paywall — \`${surface.id}\` is pushed to ${targets.map((target) => target.platform).join(", ")}; run \`superwall promote --id ${surface.id} --platform <platform> --version ${requested}\` instead.`);
274
277
  let version$1 = 0;
275
278
  for (const target of targets) {
276
279
  const binding = await resolveBinding({
@@ -281,7 +284,7 @@ function createStudioActions(framework, project) {
281
284
  surfaces: project.surfaces,
282
285
  create: false
283
286
  });
284
- version$1 = (await step("promote", () => promotePaywallVersion(client, binding.paywallId))).version;
287
+ version$1 = (await step("promote", () => promotePaywallVersion(client, binding.paywallId, { version: requested }))).version;
285
288
  }
286
289
  return {
287
290
  ok: true,
@@ -0,0 +1,22 @@
1
+ import "./output-C-4UKMot.js";
2
+ import "./telemetry-Ch9cCTI-.js";
3
+ import "./update-DIXbL-H9.js";
4
+ import "./token-BGAVPSQc.js";
5
+ import "./command-3fGYyC8r.js";
6
+ import "./ui-4gLyfrgl.js";
7
+ import "./skills-AxAf7bDB.js";
8
+ import "./spawn-DSoTXy_j.js";
9
+ import "./login-Bhxgqwtm.js";
10
+ import "./scan-BmAW413l.js";
11
+ import "./hosted-BeGVAntr.js";
12
+ import "./spinner-DFctF_Jw.js";
13
+ import "./resources-Bf9O1JNM.js";
14
+ import "./selection-BGi6GyxC.js";
15
+ import "./org-CQduIOic.js";
16
+ import "./bind-BIzaGq8K.js";
17
+ import "./pipeline-CHX0Syre.js";
18
+ import "./actions-H7f6knyY.js";
19
+ import "./app-mJC5NDtW.js";
20
+ import { t as runDev } from "./dev-CgGAb5Al.js";
21
+
22
+ export { runDev };
@@ -1,14 +1,14 @@
1
- import { b as apiKeyFromEnv } from "./output-XKuoEEjP.js";
2
- import "./telemetry-EzV7cA7s.js";
3
- import "./update-Cz3Q3MFj.js";
4
- import { i as loadSession } from "./token-r5g876aI.js";
5
- import { t as defineCommand } from "./command-BJ_6850A.js";
1
+ import { b as apiKeyFromEnv } from "./output-C-4UKMot.js";
2
+ import "./telemetry-Ch9cCTI-.js";
3
+ import "./update-DIXbL-H9.js";
4
+ import { i as loadSession } from "./token-BGAVPSQc.js";
5
+ import { t as defineCommand } from "./command-3fGYyC8r.js";
6
6
  import { a as THEME, n as ui, o as fg } from "./ui-4gLyfrgl.js";
7
7
  import "./spawn-DSoTXy_j.js";
8
- import { t as scanProject } from "./scan-DEgX5HxV.js";
9
- import { t as detectDrivers } from "./drivers-DGml3OlF.js";
10
- import "./hosted-DqGp6oV2.js";
11
- import { t as detectExisting } from "./existing-DgSo639M.js";
8
+ import { t as scanProject } from "./scan-BmAW413l.js";
9
+ import { t as detectDrivers } from "./drivers-6RMOPIdn.js";
10
+ import "./hosted-BeGVAntr.js";
11
+ import { t as detectExisting } from "./existing-DHpPn1y6.js";
12
12
 
13
13
  //#region src/commands/account/doctor.ts
14
14
  const runDoctor = defineCommand({
@@ -1,6 +1,6 @@
1
- import { y as VERSION } from "./output-XKuoEEjP.js";
1
+ import { y as VERSION } from "./output-C-4UKMot.js";
2
2
  import { n as readVersion, r as spawnStream, t as onPath } from "./spawn-DSoTXy_j.js";
3
- import { n as getHostedAuthToken, r as getHostedStatus, t as getHostedAnthropicBaseUrl } from "./hosted-DqGp6oV2.js";
3
+ import { n as getHostedAuthToken, r as getHostedStatus, t as getHostedAnthropicBaseUrl } from "./hosted-BeGVAntr.js";
4
4
  import { basename, join } from "node:path";
5
5
  import { tmpdir } from "node:os";
6
6
  import { readFile, rm } from "node:fs/promises";