@superwall/cli 2.2.1 → 2.3.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.
- package/README.md +24 -11
- package/dist/{apple-DaqaI4vD.js → apple-D79LBw5E.js} +13 -13
- package/dist/assets-Diivv88t.js +89 -0
- package/dist/auth.d.ts +1 -1
- package/dist/auth.js +3 -3
- package/dist/{billing-DyKr2kmd.js → billing-CCuMv6mh.js} +3 -3
- package/dist/{bind-BpxebZf4.js → bind-CVRlFlRo.js} +4 -4
- package/dist/{build-DzbdRThf.js → build-BCq0cGh-.js} +7 -6
- package/dist/{client-BF9rCULI.js → client-CYtQvWJR.js} +3 -3
- package/dist/{create-B55V99TD.js → create-BZyUW60x.js} +28 -226
- package/dist/{create-D7AZHYGH.js → create-BaP6hoQ1.js} +6 -6
- package/dist/create-DNfuZ9os.js +19 -0
- package/dist/{doctor-B2mPKiaJ.js → doctor-kx01VvQX.js} +6 -6
- package/dist/{drivers-DOMky8Ug.js → drivers-D0818zGc.js} +3 -3
- package/dist/entry.js +19 -19
- package/dist/{environment-DBwo79dy.js → environment-a7W-0wg0.js} +1 -1
- package/dist/{existing-B4VK4BCL.js → existing-B7qxYiUX.js} +2 -2
- package/dist/held-C4BiAQ_X.js +16 -0
- package/dist/{held-DjcZPCwn.js → held-CEyXc1SI.js} +6 -6
- package/dist/{integrate-B8oHbvwz.js → integrate-RK5U0GTQ.js} +22 -22
- package/dist/login-DV70XgZO.js +16 -0
- package/dist/{login-DfhqWY9C.js → login-DrMLxlF4.js} +6 -6
- package/dist/{login-B8hgMLhS.js → login-NxCl2WuU.js} +1 -1
- package/dist/{lookup-r8p6H2ZC.js → lookup-Dor6ch5A.js} +2 -2
- package/dist/{migrate-DQf2Fosc.js → migrate-CjSpcnNu.js} +25 -22
- package/dist/{open-CrEnSL4v.js → migration-MlzZHGP-.js} +11 -49
- package/dist/{notification-url-BxPTEmkv.js → notification-url-C_QXtljc.js} +2 -2
- package/dist/open-CBW0Cuog.js +41 -0
- package/dist/{org-Cc2WGvl1.js → org-BJCyaL1b.js} +2 -2
- package/dist/{paths-BcNbJfpw.js → paths-Cp_lgyWO.js} +1 -1
- package/dist/{playbook-D9J8frkE.js → playbook-VqV7546k.js} +10 -10
- package/dist/{promote-C8T7DCFF.js → promote-BSckFPwZ.js} +18 -16
- package/dist/pull-DEumBwvc.js +303 -0
- package/dist/{push-Bzs1l_5C.js → push-D-dewDd1.js} +8 -6
- package/dist/push-YEPqa6hs.js +24 -0
- package/dist/{registry-CpxZbmxp.js → registry-D6M1JxYC.js} +230 -115
- package/dist/{resources-Bo6i7wBi.js → resources-DKn4itf3.js} +21 -7
- package/dist/{run-BUp4r8Kk.js → run-Ccv5egCC.js} +2 -2
- package/dist/{scan-8cxu2fx0.js → scan-Be17rMcQ.js} +1 -1
- package/dist/scan-CocGVPe0.js +4 -0
- package/dist/{scope-CPG_wWXL.js → scope-92neiQ2q.js} +5 -4
- package/dist/{selection-CMA4aG4V.js → selection-C5ZY23dQ.js} +16 -96
- package/dist/server-1pOxW1GJ.js +24 -0
- package/dist/{server-Xb3wp-mx.js → server-DZ7L28w4.js} +9 -7
- package/dist/{session-eZeXR9xU.js → session-CdnUL4zt.js} +444 -243
- package/dist/session-Cm0U68t3.js +6 -0
- package/dist/{session-DOZV1TP6.js → session-gTuw2_8i.js} +1 -1
- package/dist/setup-esb3_a7N.js +216 -0
- package/dist/skills/animate-onboarding/SKILL.md +1 -1
- package/dist/skills/mobile-design/SKILL.md +1 -1
- package/dist/skills/onboarding-questions/SKILL.md +1 -1
- package/dist/skills/superwall/SKILL.md +6 -7
- package/dist/skills/superwall/references/api.md +8 -3
- package/dist/skills/superwall/workflows/dashboard/playbook.md +4 -3
- package/dist/skills/superwall/workflows/dashboard/setup.md +7 -4
- package/dist/skills/superwall/workflows/migrate/adapty.md +4 -3
- package/dist/skills/superwall/workflows/migrate/playbook.md +2 -2
- package/dist/skills/superwall/workflows/migrate/qonversion.md +4 -3
- package/dist/skills/superwall/workflows/migrate/revenuecat.md +4 -3
- package/dist/skills/superwall-editor/SKILL.md +2 -3
- package/dist/skills/superwall-framework/SKILL.md +83 -13
- package/dist/skills/superwall-framework/references/cli.md +92 -21
- package/dist/skills/superwall-framework/references/migrate-from-editor.md +5 -1
- package/dist/{skills-BI19OGlS.js → skills-B_oH2dYK.js} +8 -8
- package/dist/{skills-DDf10ufO.js → skills-miJDcjQ2.js} +4 -4
- package/dist/source-push-NVrs53Uo.js +205 -0
- package/dist/{spinner-BClMQGGN.js → spinner-D6phP4Af.js} +3 -3
- package/dist/{storage-Po9E-CHL.js → storage-BcvKhvzZ.js} +1 -1
- package/dist/storekit-D1A5VHT1.js +16 -0
- package/dist/{storekit-Cbn9DBLA.js → storekit-Di3BkafX.js} +3 -3
- package/dist/{telemetry-s6dag6tb.js → telemetry-BpYXL-z3.js} +1 -1
- package/dist/{token-CPplNMVa.js → token-4dQOfOaK.js} +1 -1
- package/dist/tools.d.ts +1 -1
- package/dist/tools.js +216 -90
- package/dist/{upgrade-1OYm5NQU.js → upgrade-BnOq32zn.js} +2 -2
- package/dist/{upgrade-ahapZeex.js → upgrade-Cb6f4S_c.js} +1 -1
- package/package.json +2 -2
- package/dist/create-BYAPuhhf.js +0 -19
- package/dist/held-C9FqvNbn.js +0 -16
- package/dist/login-D-a7oS_8.js +0 -16
- package/dist/push-snV3SrnH.js +0 -22
- package/dist/scan-nUeXs9a1.js +0 -4
- package/dist/server-Boqa8jh_.js +0 -22
- package/dist/session-DtBpdlF-.js +0 -6
- package/dist/storekit-BU6Eq_UO.js +0 -16
- /package/dist/{reports-D_qbl7_u.js → reports-CwwKLUh0.js} +0 -0
- /package/dist/{storage-BbJF7z3l.d.ts → storage-gRyQetN9.d.ts} +0 -0
|
@@ -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-
|
|
3
|
-
import { n as readSession } from "./storage-
|
|
4
|
-
import { a as withQuery$1, t as ApiError } from "./client-
|
|
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-
|
|
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-a7W-0wg0.js";
|
|
3
|
+
import { n as readSession } from "./storage-BcvKhvzZ.js";
|
|
4
|
+
import { a as withQuery$1, t as ApiError } from "./client-CYtQvWJR.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-CEyXc1SI.js";
|
|
6
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-
|
|
7
|
+
import { a as defineCommand, d as readInput, i as defineCatalog, r as UsageError, t as apiCall } from "./spinner-D6phP4Af.js";
|
|
8
8
|
import { n as fg, t as THEME } from "./theme-DUsCh-Vd.js";
|
|
9
|
-
import { n as runWhoami } from "./session-
|
|
10
|
-
import {
|
|
11
|
-
import { n as orgForNewProject } from "./org-
|
|
12
|
-
import { n as findApplication, r as findProject, t as appNotFound } from "./lookup-
|
|
13
|
-
import { a as pickScope, i as pickProject, n as chooseApp, r as pickOrganization, t as boundOrganization } from "./scope-
|
|
9
|
+
import { n as runWhoami } from "./session-gTuw2_8i.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-DKn4itf3.js";
|
|
11
|
+
import { n as orgForNewProject } from "./org-BJCyaL1b.js";
|
|
12
|
+
import { n as findApplication, r as findProject, t as appNotFound } from "./lookup-Dor6ch5A.js";
|
|
13
|
+
import { a as pickScope, i as pickProject, n as chooseApp, r as pickOrganization, t as boundOrganization } from "./scope-92neiQ2q.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-
|
|
18
|
-
import { t as platformForIntegration } from "./bind-
|
|
17
|
+
import { a as runAscNotificationUrlSet, i as printServerNotifications, t as describeNotificationUrl } from "./notification-url-C_QXtljc.js";
|
|
18
|
+
import { t as platformForIntegration } from "./bind-CVRlFlRo.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-
|
|
145
|
+
const { runLogin } = await import("./login-DV70XgZO.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-
|
|
161
|
+
const { runLogout } = await import("./session-Cm0U68t3.js");
|
|
162
162
|
return runLogout(ctx);
|
|
163
163
|
}
|
|
164
164
|
});
|
|
@@ -1452,21 +1452,21 @@ function parseFlag(key, flag$1, raw) {
|
|
|
1452
1452
|
}
|
|
1453
1453
|
return parseChoice(key, flag$1, text);
|
|
1454
1454
|
}
|
|
1455
|
-
function parseArg(command$
|
|
1455
|
+
function parseArg(command$69, arg, word) {
|
|
1456
1456
|
if (word === void 0 || !arg.choices) return word;
|
|
1457
1457
|
const found = arg.choices.find((choice) => choice.toLowerCase() === word.toLowerCase());
|
|
1458
|
-
if (!found) throw new UsageError(`${command$
|
|
1458
|
+
if (!found) throw new UsageError(`${command$69} takes <${arg.name}> as one of: ${arg.choices.join(", ")} (not "${word}").`);
|
|
1459
1459
|
return found;
|
|
1460
1460
|
}
|
|
1461
|
-
function parseInput(command$
|
|
1461
|
+
function parseInput(command$69, operation, words, raw) {
|
|
1462
1462
|
const specs = operation.flags ?? {};
|
|
1463
|
-
for (const key of Object.keys(raw)) if (!(key in specs) && !(key in COMMON_FLAGS)) throw new UsageError(`${command$
|
|
1463
|
+
for (const key of Object.keys(raw)) if (!(key in specs) && !(key in COMMON_FLAGS)) throw new UsageError(`${command$69} has no --${kebab(key)}. Run superwall ${command$69} --help for its flags.`);
|
|
1464
1464
|
const flags = Object.fromEntries(Object.entries(specs).map(([key, flag$1]) => [key, parseFlag(key, flag$1, raw[key])]));
|
|
1465
|
-
for (const [key, flag$1] of Object.entries(specs)) if (flag$1.required && flags[key] === void 0) throw new UsageError(`${command$
|
|
1465
|
+
for (const [key, flag$1] of Object.entries(specs)) if (flag$1.required && flags[key] === void 0) throw new UsageError(`${command$69} needs --${kebab(key)}.`);
|
|
1466
1466
|
const specArgs = operation.args ?? [];
|
|
1467
|
-
if (words.length > specArgs.length) throw new UsageError(`${command$
|
|
1468
|
-
const args = Object.fromEntries(specArgs.map((arg, index) => [arg.name, parseArg(command$
|
|
1469
|
-
for (const arg of specArgs) if (arg.required && args[arg.name] === void 0) throw new UsageError(`${command$
|
|
1467
|
+
if (words.length > specArgs.length) throw new UsageError(`${command$69} doesn't take "${words.slice(specArgs.length).join(" ")}".`);
|
|
1468
|
+
const args = Object.fromEntries(specArgs.map((arg, index) => [arg.name, parseArg(command$69, arg, words[index])]));
|
|
1469
|
+
for (const arg of specArgs) if (arg.required && args[arg.name] === void 0) throw new UsageError(`${command$69} needs <${arg.name}>.`);
|
|
1470
1470
|
return {
|
|
1471
1471
|
args,
|
|
1472
1472
|
flags,
|
|
@@ -1629,7 +1629,7 @@ async function selectLatestVersion(session, kind, id$1) {
|
|
|
1629
1629
|
}
|
|
1630
1630
|
async function resolveDraftVersion(session, kind, id$1) {
|
|
1631
1631
|
const latest = await selectLatestVersion(session, kind, id$1);
|
|
1632
|
-
if (latest &&
|
|
1632
|
+
if (latest && EDITABLE$1.has(latest.state ?? "")) return latest.id;
|
|
1633
1633
|
const spec = KINDS[kind];
|
|
1634
1634
|
const created = await session.send("post", spec.versionPath, { data: {
|
|
1635
1635
|
type: spec.versionType,
|
|
@@ -2886,10 +2886,9 @@ async function runIapsCreate(session, input) {
|
|
|
2886
2886
|
const id$1 = iap.id;
|
|
2887
2887
|
const displayName = textOf$1(input, "displayName");
|
|
2888
2888
|
if (displayName) {
|
|
2889
|
-
const version = await
|
|
2890
|
-
if (!version) throw new Error(`Apple made no version of in-app purchase ${id$1} to localize.`);
|
|
2889
|
+
const version = await resolveDraftVersion(session, "iap", id$1);
|
|
2891
2890
|
const description = textOf$1(input, "description");
|
|
2892
|
-
await createLocalization(session, "iap", version
|
|
2891
|
+
await createLocalization(session, "iap", version, {
|
|
2893
2892
|
locale: textOf$1(input, "locale") ?? DEFAULT_LOCALE$2,
|
|
2894
2893
|
name: displayName,
|
|
2895
2894
|
...description ? { description } : {}
|
|
@@ -3470,7 +3469,7 @@ A purchase_key is for the app's bundle ID; an app with none gets --bundle-id sav
|
|
|
3470
3469
|
prompts: true,
|
|
3471
3470
|
mcp: false,
|
|
3472
3471
|
async run(ctx, input) {
|
|
3473
|
-
const { runAscKeysCreate } = await import("./create-
|
|
3472
|
+
const { runAscKeysCreate } = await import("./create-DNfuZ9os.js");
|
|
3474
3473
|
return runAscKeysCreate(ctx, input);
|
|
3475
3474
|
}
|
|
3476
3475
|
});
|
|
@@ -3857,7 +3856,7 @@ With --app it saves the key you hold on that app instead, as asc keys create --k
|
|
|
3857
3856
|
prompts: true,
|
|
3858
3857
|
mcp: false,
|
|
3859
3858
|
async run(ctx, { args, flags }) {
|
|
3860
|
-
const { upsertHeldKey: upsertHeldKey$1 } = await import("./held-
|
|
3859
|
+
const { upsertHeldKey: upsertHeldKey$1 } = await import("./held-C4BiAQ_X.js");
|
|
3861
3860
|
return upsertHeldKey$1(ctx, {
|
|
3862
3861
|
action: "update",
|
|
3863
3862
|
key: {
|
|
@@ -4860,10 +4859,9 @@ async function runSubscriptionGroupsCreate(session, input) {
|
|
|
4860
4859
|
} }, "group");
|
|
4861
4860
|
if (!group$1) throw new Error("Apple created no subscription group.");
|
|
4862
4861
|
if (displayName) {
|
|
4863
|
-
const version = await
|
|
4864
|
-
if (!version) throw new Error(`Apple made no version of subscription group ${group$1.id} to localize.`);
|
|
4862
|
+
const version = await resolveDraftVersion(session, "group", group$1.id);
|
|
4865
4863
|
const customAppName = textOf$1(input, "customAppName");
|
|
4866
|
-
await createLocalization(session, "group", version
|
|
4864
|
+
await createLocalization(session, "group", version, {
|
|
4867
4865
|
locale: textOf$1(input, "locale") ?? DEFAULT_LOCALE$1,
|
|
4868
4866
|
name: displayName,
|
|
4869
4867
|
...customAppName ? { customAppName } : {}
|
|
@@ -5110,7 +5108,7 @@ Exit codes
|
|
|
5110
5108
|
prompts: true,
|
|
5111
5109
|
mcp: false,
|
|
5112
5110
|
async run(ctx, input) {
|
|
5113
|
-
const { runSetupApple } = await import("./apple-
|
|
5111
|
+
const { runSetupApple } = await import("./apple-D79LBw5E.js");
|
|
5114
5112
|
return runSetupApple(ctx, input);
|
|
5115
5113
|
}
|
|
5116
5114
|
});
|
|
@@ -5244,10 +5242,9 @@ async function runSubscriptionsCreate(session, input) {
|
|
|
5244
5242
|
const id$1 = subscription.id;
|
|
5245
5243
|
const displayName = textOf$1(input, "displayName");
|
|
5246
5244
|
if (displayName) {
|
|
5247
|
-
const version = await
|
|
5248
|
-
if (!version) throw new Error(`Apple made no version of subscription ${id$1} to localize.`);
|
|
5245
|
+
const version = await resolveDraftVersion(session, "subscription", id$1);
|
|
5249
5246
|
const description = textOf$1(input, "description");
|
|
5250
|
-
await createLocalization(session, "subscription", version
|
|
5247
|
+
await createLocalization(session, "subscription", version, {
|
|
5251
5248
|
locale: textOf$1(input, "locale") ?? DEFAULT_LOCALE,
|
|
5252
5249
|
name: displayName,
|
|
5253
5250
|
...description ? { description } : {}
|
|
@@ -7742,7 +7739,7 @@ const command$45 = defineCommand({
|
|
|
7742
7739
|
prompts: true,
|
|
7743
7740
|
mcp: false,
|
|
7744
7741
|
async run(ctx, { args, flags }) {
|
|
7745
|
-
const { runBuildPipeline } = await import("./build-
|
|
7742
|
+
const { runBuildPipeline } = await import("./build-BCq0cGh-.js");
|
|
7746
7743
|
await runBuildPipeline({
|
|
7747
7744
|
output: ctx.output,
|
|
7748
7745
|
json: ctx.json
|
|
@@ -7803,7 +7800,7 @@ const command$46 = defineCommand({
|
|
|
7803
7800
|
prompts: true,
|
|
7804
7801
|
mcp: false,
|
|
7805
7802
|
async run(ctx, { args, flags }) {
|
|
7806
|
-
const { runCreate } = await import("./create-
|
|
7803
|
+
const { runCreate } = await import("./create-BZyUW60x.js");
|
|
7807
7804
|
return runCreate(ctx, {
|
|
7808
7805
|
dir: args.dir,
|
|
7809
7806
|
...flags
|
|
@@ -7846,7 +7843,7 @@ const command$47 = defineCommand({
|
|
|
7846
7843
|
prompts: true,
|
|
7847
7844
|
mcp: false,
|
|
7848
7845
|
async run(ctx, { args, flags }) {
|
|
7849
|
-
const { runStudio } = await import("./server-
|
|
7846
|
+
const { runStudio } = await import("./server-1pOxW1GJ.js");
|
|
7850
7847
|
await runStudio({
|
|
7851
7848
|
dirs: args.dir,
|
|
7852
7849
|
port: flags.port,
|
|
@@ -7886,7 +7883,7 @@ const command$48 = defineCommand({
|
|
|
7886
7883
|
prompts: true,
|
|
7887
7884
|
mcp: false,
|
|
7888
7885
|
async run(ctx, input) {
|
|
7889
|
-
const { runPromote } = await import("./promote-
|
|
7886
|
+
const { runPromote } = await import("./promote-BSckFPwZ.js");
|
|
7890
7887
|
return runPromote(ctx, input);
|
|
7891
7888
|
}
|
|
7892
7889
|
});
|
|
@@ -7921,7 +7918,7 @@ const command$49 = defineCommand({
|
|
|
7921
7918
|
},
|
|
7922
7919
|
overwriteSource: {
|
|
7923
7920
|
type: "boolean",
|
|
7924
|
-
describe: "Replace the
|
|
7921
|
+
describe: "Replace the pushed paywalls' source in the app's repo with yours even though it can't be merged - other paywalls and funnels stay"
|
|
7925
7922
|
}
|
|
7926
7923
|
},
|
|
7927
7924
|
examples: [["publish", "Push every changed paywall and funnel and make it live"], ["publish --id plus-upgrade --platform ios -m \"New annual price\"", "Ship one paywall on one platform and record why"]],
|
|
@@ -7930,14 +7927,50 @@ const command$49 = defineCommand({
|
|
|
7930
7927
|
prompts: true,
|
|
7931
7928
|
mcp: false,
|
|
7932
7929
|
async run(ctx, input) {
|
|
7933
|
-
const { runPush } = await import("./push-
|
|
7930
|
+
const { runPush } = await import("./push-YEPqa6hs.js");
|
|
7934
7931
|
return runPush(ctx, input, true);
|
|
7935
7932
|
}
|
|
7936
7933
|
});
|
|
7937
7934
|
|
|
7938
7935
|
//#endregion
|
|
7939
|
-
//#region src/commands/paywalls/
|
|
7936
|
+
//#region src/commands/paywalls/pull.ts
|
|
7940
7937
|
const command$50 = defineCommand({
|
|
7938
|
+
name: "pull",
|
|
7939
|
+
summary: "Bring teammates' published source into this project, merged with your edits",
|
|
7940
|
+
args: { dir: { describe: "Project directory, or with --app the folder to create superwall/ in (default: cwd)" } },
|
|
7941
|
+
flags: {
|
|
7942
|
+
app: {
|
|
7943
|
+
...app,
|
|
7944
|
+
describe: "Set up a new project from this app's source (id, name or dashboard link) in an empty folder"
|
|
7945
|
+
},
|
|
7946
|
+
platform: {
|
|
7947
|
+
type: "list",
|
|
7948
|
+
value: "platform",
|
|
7949
|
+
describe: "Limit to the apps of these platforms (repeatable, or comma-separated) - ios, android, web"
|
|
7950
|
+
},
|
|
7951
|
+
theirs: {
|
|
7952
|
+
type: "boolean",
|
|
7953
|
+
describe: "Where you and the source repo both changed a file, take the source repo's version"
|
|
7954
|
+
}
|
|
7955
|
+
},
|
|
7956
|
+
examples: [
|
|
7957
|
+
["pull", "Merge what teammates published into this project"],
|
|
7958
|
+
["pull --theirs", "Take the source repo's version of files you both changed"],
|
|
7959
|
+
["pull --app 20749", "Get every paywall of app 20749 into ./superwall, no GitHub needed"]
|
|
7960
|
+
],
|
|
7961
|
+
auth: "none",
|
|
7962
|
+
json: false,
|
|
7963
|
+
prompts: true,
|
|
7964
|
+
mcp: false,
|
|
7965
|
+
async run(ctx, input) {
|
|
7966
|
+
const { runPull } = await import("./pull-DEumBwvc.js");
|
|
7967
|
+
return runPull(ctx, input);
|
|
7968
|
+
}
|
|
7969
|
+
});
|
|
7970
|
+
|
|
7971
|
+
//#endregion
|
|
7972
|
+
//#region src/commands/paywalls/push.ts
|
|
7973
|
+
const command$51 = defineCommand({
|
|
7941
7974
|
name: "push",
|
|
7942
7975
|
summary: "Build and push your paywalls as immutable versions (production untouched)",
|
|
7943
7976
|
args: { dir: { describe: "Project directory (default: cwd)" } },
|
|
@@ -7965,7 +7998,7 @@ const command$50 = defineCommand({
|
|
|
7965
7998
|
},
|
|
7966
7999
|
overwriteSource: {
|
|
7967
8000
|
type: "boolean",
|
|
7968
|
-
describe: "Replace the
|
|
8001
|
+
describe: "Replace the pushed paywalls' source in the app's repo with yours even though it can't be merged - other paywalls and funnels stay"
|
|
7969
8002
|
}
|
|
7970
8003
|
},
|
|
7971
8004
|
examples: [["push", "Push every changed paywall and funnel as a new version"], ["push --id plus-upgrade -m \"New annual price\"", "Push one paywall and record why"]],
|
|
@@ -7974,7 +8007,7 @@ const command$50 = defineCommand({
|
|
|
7974
8007
|
prompts: true,
|
|
7975
8008
|
mcp: false,
|
|
7976
8009
|
async run(ctx, input) {
|
|
7977
|
-
const { runPush } = await import("./push-
|
|
8010
|
+
const { runPush } = await import("./push-YEPqa6hs.js");
|
|
7978
8011
|
return runPush(ctx, input, false);
|
|
7979
8012
|
}
|
|
7980
8013
|
});
|
|
@@ -8091,7 +8124,7 @@ function resourceHelp(resource) {
|
|
|
8091
8124
|
})),
|
|
8092
8125
|
{
|
|
8093
8126
|
title: "Related",
|
|
8094
|
-
lines: table((resource.related ?? []).map(([command$
|
|
8127
|
+
lines: table((resource.related ?? []).map(([command$69, text]) => [`superwall ${command$69}`, pc.dim(text)]), ([left]) => left.length)
|
|
8095
8128
|
},
|
|
8096
8129
|
{
|
|
8097
8130
|
title: "Examples",
|
|
@@ -8331,6 +8364,7 @@ async function create(context, api, resource, rawValue, value2, flags) {
|
|
|
8331
8364
|
if (!value$1) throw new Error(resource === "campaigns" ? "Usage: superwall campaigns create --description \"<description>\" --placement <placement>" : `Usage: superwall ${resource} create --identifier <identifier>`);
|
|
8332
8365
|
if (resource === "campaigns" && !value2) throw new Error("Usage: superwall campaigns create --description \"<description>\" --placement <placement> (campaigns need at least one placement)");
|
|
8333
8366
|
const scope = await pickScope(context, api, isAppScoped(resource) || resource === "products" && context.target.app !== void 0);
|
|
8367
|
+
const grants = resource === "products" ? await resolveProductEntitlements(context, api, scope, entitlementValues(flags.fields)) : void 0;
|
|
8334
8368
|
if (dryRun$1) {
|
|
8335
8369
|
const { projectCount: _projects, appCount: _apps,...where } = scope;
|
|
8336
8370
|
const plan = {
|
|
@@ -8338,15 +8372,20 @@ async function create(context, api, resource, rawValue, value2, flags) {
|
|
|
8338
8372
|
action: "create",
|
|
8339
8373
|
resource,
|
|
8340
8374
|
value: value$1,
|
|
8341
|
-
scope:
|
|
8375
|
+
scope: grants?.app ? {
|
|
8376
|
+
...where,
|
|
8377
|
+
applicationId: String(grants.app.id)
|
|
8378
|
+
} : where,
|
|
8379
|
+
...grants?.ids.length ? { entitlements: grants.ids } : {}
|
|
8342
8380
|
};
|
|
8343
8381
|
if (json) return context.output.data(plan);
|
|
8344
|
-
const target = scope.applicationId ? `${scope.appName ?? scope.applicationId} (${platformLabel(scope.appPlatform)})` : scope.projectName ?? scope.projectId;
|
|
8345
|
-
|
|
8382
|
+
const target = grants?.app ? appLabel(grants.app) : scope.applicationId ? `${scope.appName ?? scope.applicationId} (${platformLabel(scope.appPlatform)})` : resource === "entitlements" && scope.boundApplicationId ? `${scope.projectName ?? scope.projectId}, app ${scope.boundApplicationId}` : scope.projectName ?? scope.projectId;
|
|
8383
|
+
const granting = grants?.ids.length ? ` granting entitlement ${grants.ids.join(", ")}` : "";
|
|
8384
|
+
ui.info(`[dry-run] would create ${resource.replace(/s$/, "")} "${value$1}" in ${target}${granting}`);
|
|
8346
8385
|
return;
|
|
8347
8386
|
}
|
|
8348
8387
|
const created = await apiCall(context, `Creating ${resource.replace(/s$/, "")}`, () => {
|
|
8349
|
-
return createOne(api, resource, scope, value$1, value2, flags.fields);
|
|
8388
|
+
return createOne(api, resource, scope, value$1, value2, flags.fields, grants);
|
|
8350
8389
|
});
|
|
8351
8390
|
if (json) return context.output.data(created);
|
|
8352
8391
|
ui.success(`Created ${resource.replace(/s$/, "")} \`${rowName(created)}\` ${created.id ?? ""}`);
|
|
@@ -8363,7 +8402,7 @@ async function createApp(context, api, nameArg, fields) {
|
|
|
8363
8402
|
let name = nameArg;
|
|
8364
8403
|
let platform = textOf(fields.platform);
|
|
8365
8404
|
if (interactive && (!name || !platform)) {
|
|
8366
|
-
const { scanProject } = await import("./scan-
|
|
8405
|
+
const { scanProject } = await import("./scan-CocGVPe0.js");
|
|
8367
8406
|
const detected = (await scanProject(context.installDir).catch(() => null))?.apps[0];
|
|
8368
8407
|
if (detected && !name && !platform) {
|
|
8369
8408
|
ui.info(`Detected \`${detected.framework.name}\`` + (detected.details ? ` · \`${detected.details}\`` : ""));
|
|
@@ -8440,13 +8479,17 @@ async function createApp(context, api, nameArg, fields) {
|
|
|
8440
8479
|
const projectLabel = project$1.name ? ` in \`${project$1.name}\`` : "";
|
|
8441
8480
|
ui.success(`Added \`${platformLabel(platform)}\` app \`${name}\`${projectLabel}${key}`);
|
|
8442
8481
|
}
|
|
8443
|
-
function createOne(api, resource, scope, value$1, value2, fields) {
|
|
8482
|
+
function createOne(api, resource, scope, value$1, value2, fields, grants) {
|
|
8444
8483
|
switch (resource) {
|
|
8445
|
-
case "entitlements": return createEntitlement(api, scope, value$1);
|
|
8446
|
-
case "products":
|
|
8447
|
-
|
|
8448
|
-
|
|
8449
|
-
|
|
8484
|
+
case "entitlements": return createEntitlement(api, scope, value$1, scope.boundApplicationId);
|
|
8485
|
+
case "products": {
|
|
8486
|
+
const applicationId = grants?.app ? String(grants.app.id) : scope.applicationId;
|
|
8487
|
+
return createProduct(api, scope, value$1, {
|
|
8488
|
+
...productOptions(fields),
|
|
8489
|
+
...applicationId ? { applicationId } : {},
|
|
8490
|
+
...grants?.ids.length ? { entitlements: grants.ids } : {}
|
|
8491
|
+
});
|
|
8492
|
+
}
|
|
8450
8493
|
case "campaigns": return createCampaign(api, scope, value$1, String(value2));
|
|
8451
8494
|
default: throw new Error(`create is not supported for ${resource} yet.`);
|
|
8452
8495
|
}
|
|
@@ -8463,11 +8506,78 @@ function productOptions(fields) {
|
|
|
8463
8506
|
period_count: fields.periodCount !== void 0 ? Number(fields.periodCount) : 1,
|
|
8464
8507
|
...fields.trialDays !== void 0 ? { trial_period_days: Number(fields.trialDays) } : {}
|
|
8465
8508
|
};
|
|
8466
|
-
const entitlement = fields.entitlement;
|
|
8467
|
-
const entitlements = Array.isArray(entitlement) ? entitlement.map(String) : [];
|
|
8468
|
-
if (entitlements.length) options.entitlements = entitlements;
|
|
8469
8509
|
return options;
|
|
8470
8510
|
}
|
|
8511
|
+
const NATIVE_PLATFORMS = new Set(["ios", "android"]);
|
|
8512
|
+
const ANY_NATIVE_PLATFORMS = new Set([
|
|
8513
|
+
"stripe",
|
|
8514
|
+
"web",
|
|
8515
|
+
"webapp",
|
|
8516
|
+
"custom"
|
|
8517
|
+
]);
|
|
8518
|
+
function entitlementValues(fields) {
|
|
8519
|
+
const raw = fields.entitlement;
|
|
8520
|
+
return (Array.isArray(raw) ? raw : raw === void 0 || raw === null ? [] : [raw]).map((value$1) => String(value$1).trim()).filter(Boolean);
|
|
8521
|
+
}
|
|
8522
|
+
function appLabel(app$1) {
|
|
8523
|
+
return `${app$1.name ?? app$1.id} (${platformLabel(app$1.platform)})`;
|
|
8524
|
+
}
|
|
8525
|
+
function grantsFrom(product, entitlementApp) {
|
|
8526
|
+
if (ANY_NATIVE_PLATFORMS.has((product.platform ?? "").toLowerCase())) return NATIVE_PLATFORMS.has((entitlementApp?.platform ?? "").toLowerCase());
|
|
8527
|
+
return entitlementApp !== void 0 && String(entitlementApp.id) === String(product.id);
|
|
8528
|
+
}
|
|
8529
|
+
async function resolveProductEntitlements(context, api, scope, values) {
|
|
8530
|
+
if (values.length === 0) return { ids: [] };
|
|
8531
|
+
const apps = (await findProject(api, scope.projectId))?.applications ?? [];
|
|
8532
|
+
const rows = await apiCall(context, "Loading entitlements", () => listResource(api, "entitlements", scope));
|
|
8533
|
+
const projectLabel = scope.projectName ?? `Project ${scope.projectId}`;
|
|
8534
|
+
const appOf$1 = (row) => {
|
|
8535
|
+
const id$1 = row.application_id;
|
|
8536
|
+
if (id$1 === void 0 || id$1 === null) return void 0;
|
|
8537
|
+
return apps.find((app$1) => String(app$1.id) === String(id$1)) ?? { id: String(id$1) };
|
|
8538
|
+
};
|
|
8539
|
+
const describe$1 = (row) => {
|
|
8540
|
+
const app$1 = appOf$1(row);
|
|
8541
|
+
const name = row.identifier ? ` (${String(row.identifier)})` : "";
|
|
8542
|
+
return `${String(row.id)}${name} is on ${app$1 ? appLabel(app$1) : "no app"}`;
|
|
8543
|
+
};
|
|
8544
|
+
const wanted = values.map((value$1) => {
|
|
8545
|
+
const byId$1 = rows.filter((row) => String(row.id) === value$1);
|
|
8546
|
+
const found = byId$1.length > 0 ? byId$1 : rows.filter((row) => row.identifier === value$1);
|
|
8547
|
+
const [first] = found;
|
|
8548
|
+
if (!first) throw new Error(`${projectLabel} has no entitlement "${value$1}" - create it first: superwall entitlements create --identifier ${value$1} --app <app>`);
|
|
8549
|
+
return {
|
|
8550
|
+
first,
|
|
8551
|
+
found
|
|
8552
|
+
};
|
|
8553
|
+
});
|
|
8554
|
+
const fits = (app$1) => wanted.every(({ found }) => found.some((row) => grantsFrom(app$1, appOf$1(row))));
|
|
8555
|
+
const named = scope.applicationId ? apps.find((app$1) => String(app$1.id) === scope.applicationId) ?? {
|
|
8556
|
+
id: scope.applicationId,
|
|
8557
|
+
name: scope.appName,
|
|
8558
|
+
platform: scope.appPlatform
|
|
8559
|
+
} : void 0;
|
|
8560
|
+
const nativeApps = [...apps.filter((app$1) => (app$1.platform ?? "").toLowerCase() === "ios"), ...apps.filter((app$1) => (app$1.platform ?? "").toLowerCase() === "android")];
|
|
8561
|
+
const product = named ?? nativeApps.find(fits);
|
|
8562
|
+
if (!product) {
|
|
8563
|
+
const spread = wanted.map(({ found }) => found.map(describe$1).join(", ")).join("; ");
|
|
8564
|
+
throw new Error(`No app of ${projectLabel} can grant all of these entitlements: ${spread}. An iOS or Android product grants only its own app's entitlements - pass --app <id>, or create the missing ones there: superwall entitlements create --identifier <identifier> --app <id>`);
|
|
8565
|
+
}
|
|
8566
|
+
const ids = wanted.map(({ first, found }) => {
|
|
8567
|
+
const granted = found.filter((candidate) => grantsFrom(product, appOf$1(candidate)));
|
|
8568
|
+
const row = granted.find((candidate) => String(appOf$1(candidate)?.id) === String(product.id)) ?? granted[0];
|
|
8569
|
+
if (row) return String(row.id);
|
|
8570
|
+
const owner = appOf$1(first);
|
|
8571
|
+
const identifier = String(first.identifier ?? "<identifier>");
|
|
8572
|
+
if (ANY_NATIVE_PLATFORMS.has((product.platform ?? "").toLowerCase())) throw new Error(`Entitlement ${describe$1(first)} - ${appLabel(product)} products grant only iOS or Android entitlements: superwall entitlements create --identifier ${identifier} --app <ios or android app>`);
|
|
8573
|
+
const move = owner && NATIVE_PLATFORMS.has((owner.platform ?? "").toLowerCase()) ? `pass --app ${String(owner.id)} to create the product there, or ` : "";
|
|
8574
|
+
throw new Error(`Entitlement ${describe$1(first)}, not ${appLabel(product)} - ${move}create it on ${product.name ?? product.id}: superwall entitlements create --identifier ${identifier} --app ${String(product.id)}`);
|
|
8575
|
+
});
|
|
8576
|
+
return {
|
|
8577
|
+
app: product,
|
|
8578
|
+
ids: [...new Set(ids)]
|
|
8579
|
+
};
|
|
8580
|
+
}
|
|
8471
8581
|
|
|
8472
8582
|
//#endregion
|
|
8473
8583
|
//#region src/core/main/revenue-provider.ts
|
|
@@ -8602,7 +8712,7 @@ async function runResource(ctx, resource, action, value$1, value2, flags) {
|
|
|
8602
8712
|
if (action === "create") return create(ctx, ctx.api, resource, value$1, value2, flags);
|
|
8603
8713
|
if (action === "use" && resource === "apps") return useApp(ctx, ctx.api, value$1);
|
|
8604
8714
|
if (action === "storekit" && resource === "products") {
|
|
8605
|
-
const { writeStoreKit } = await import("./storekit-
|
|
8715
|
+
const { writeStoreKit } = await import("./storekit-D1A5VHT1.js");
|
|
8606
8716
|
return writeStoreKit(ctx, ctx.api, flags.fields.out);
|
|
8607
8717
|
}
|
|
8608
8718
|
throw new Error(`Unknown action "${action}" for ${resource}.`);
|
|
@@ -8616,15 +8726,15 @@ async function runOperation(ctx, owner, resource, op$1, args, flags) {
|
|
|
8616
8726
|
}
|
|
8617
8727
|
const toFlag = (field) => `--${field.replace(/_/g, "-")}`;
|
|
8618
8728
|
async function callOperation(context, owner, resource, op$1, ids, flags, merged = {}) {
|
|
8619
|
-
const command$
|
|
8729
|
+
const command$69 = `superwall ${owner === resource ? "" : `${owner.name} `}${resource.name} ${op$1.name}`;
|
|
8620
8730
|
const { method, path: template } = op$1;
|
|
8621
|
-
if (!method || !template) throw new Error(`${command$
|
|
8731
|
+
if (!method || !template) throw new Error(`${command$69} has no API endpoint.`);
|
|
8622
8732
|
const spec = await apiCall(context, "Loading the API reference", () => findSpec(op$1));
|
|
8623
8733
|
const args = [...ids];
|
|
8624
8734
|
const ctx = owner.appArg && args[0] && !context.target.app ? withApp(context, args.shift()) : context;
|
|
8625
8735
|
const positional = positionalParams(op$1);
|
|
8626
|
-
if (args.length < positional.length) throw new Error(`Usage: ${command$
|
|
8627
|
-
if (args.length > positional.length) throw new Error(`${command$
|
|
8736
|
+
if (args.length < positional.length) throw new Error(`Usage: ${command$69} ${usageOf(owner, op$1)}\nRun \`${command$69} --help\` for its flags.`);
|
|
8737
|
+
if (args.length > positional.length) throw new Error(`${command$69} takes ${positional.length || "no"} argument${positional.length === 1 ? "" : "s"}; got "${args.slice(positional.length).join(" ")}".`);
|
|
8628
8738
|
const pathValues = /* @__PURE__ */ new Map();
|
|
8629
8739
|
const query = {};
|
|
8630
8740
|
const queryNames = new Set(spec?.params.filter((param) => param.in === "query").map((param) => param.name));
|
|
@@ -8644,7 +8754,7 @@ async function callOperation(context, owner, resource, op$1, ids, flags, merged
|
|
|
8644
8754
|
if (queryParam) query[field] = coerce(raw, queryParam.type);
|
|
8645
8755
|
else if (bodyField) body[field] = coerce(raw, bodyField.type);
|
|
8646
8756
|
else if (!spec) (sendsBody ? body : query)[field] = raw;
|
|
8647
|
-
else throw new Error(`${command$
|
|
8757
|
+
else throw new Error(`${command$69} has no ${toFlag(field)}. \`${command$69} --help\` lists what it takes.`);
|
|
8648
8758
|
}
|
|
8649
8759
|
Object.assign(sendsBody ? body : query, parseParams(flags.data));
|
|
8650
8760
|
await fillScope(ctx, op$1, spec, pathValues, query, body);
|
|
@@ -8653,11 +8763,11 @@ async function callOperation(context, owner, resource, op$1, ids, flags, merged
|
|
|
8653
8763
|
});
|
|
8654
8764
|
if (missing$1.length > 0) {
|
|
8655
8765
|
const needs = missing$1.map((param) => `${toFlag(param.name)} <${param.type.replace(/"/g, "").replace(/ \| /g, "|")}>`);
|
|
8656
|
-
throw new Error(`${command$
|
|
8766
|
+
throw new Error(`${command$69} needs ${needs.join(" and ")}.`);
|
|
8657
8767
|
}
|
|
8658
8768
|
const url = withQuery(template.replace(/\{([^}]+)\}/g, (_, param) => {
|
|
8659
8769
|
const value$1 = pathValues.get(param);
|
|
8660
|
-
if (value$1 === void 0) throw new Error(`${command$
|
|
8770
|
+
if (value$1 === void 0) throw new Error(`${command$69} needs ${param}.`);
|
|
8661
8771
|
return encodeURIComponent(value$1);
|
|
8662
8772
|
}), query);
|
|
8663
8773
|
if (ctx.dryRun) return renderValue(ctx, {
|
|
@@ -8769,7 +8879,7 @@ async function dispatch(ctx, owner, words, flags) {
|
|
|
8769
8879
|
const nested = rest[0] ? findNested(owner, rest[0]) : void 0;
|
|
8770
8880
|
if (nested) rest = rest.slice(1);
|
|
8771
8881
|
const resource = nested ?? owner;
|
|
8772
|
-
const command$
|
|
8882
|
+
const command$69 = nested ? `${owner.name} ${nested.name}` : owner.name;
|
|
8773
8883
|
if (rest[0] && /^(\d+|https?:\/\/.*)$/.test(rest[0]) && findOperation(resource, "get")) rest = ["get", ...rest];
|
|
8774
8884
|
const [opName, ...args] = rest;
|
|
8775
8885
|
if (!opName) {
|
|
@@ -8781,7 +8891,7 @@ async function dispatch(ctx, owner, words, flags) {
|
|
|
8781
8891
|
if (!op$1) {
|
|
8782
8892
|
const known = resource.operations.map((candidate) => candidate.name);
|
|
8783
8893
|
const nestedNames = nested ? [] : (owner.nested ?? []).map((candidate) => candidate.name);
|
|
8784
|
-
throw new UsageError(`${command$
|
|
8894
|
+
throw new UsageError(`${command$69} has no "${opName}". It takes: ${[...known, ...nestedNames].join(", ")}.\nRun superwall ${command$69} --help for what each does.`, command$69);
|
|
8785
8895
|
}
|
|
8786
8896
|
await runOperation(ctx, owner, resource, op$1, args, flags);
|
|
8787
8897
|
}
|
|
@@ -8952,7 +9062,7 @@ const FLAGS = {
|
|
|
8952
9062
|
entitlement: {
|
|
8953
9063
|
type: "list",
|
|
8954
9064
|
value: "id",
|
|
8955
|
-
describe: "products create: entitlement ids to grant"
|
|
9065
|
+
describe: "products create: entitlement ids or identifiers to grant"
|
|
8956
9066
|
}
|
|
8957
9067
|
};
|
|
8958
9068
|
function defineResource(resource) {
|
|
@@ -8975,7 +9085,7 @@ function defineResource(resource) {
|
|
|
8975
9085
|
|
|
8976
9086
|
//#endregion
|
|
8977
9087
|
//#region src/commands/main/annotations.ts
|
|
8978
|
-
const command$
|
|
9088
|
+
const command$52 = defineResource({
|
|
8979
9089
|
name: "annotations",
|
|
8980
9090
|
summary: "Releases, campaigns and incidents marked on an app's charts",
|
|
8981
9091
|
operations: [
|
|
@@ -9025,7 +9135,7 @@ const command$51 = defineResource({
|
|
|
9025
9135
|
|
|
9026
9136
|
//#endregion
|
|
9027
9137
|
//#region src/commands/main/apps.ts
|
|
9028
|
-
const command$
|
|
9138
|
+
const command$53 = defineResource({
|
|
9029
9139
|
name: "apps",
|
|
9030
9140
|
summary: "Every app you can open",
|
|
9031
9141
|
appArg: true,
|
|
@@ -9278,7 +9388,7 @@ function renderAccountTree(tree) {
|
|
|
9278
9388
|
|
|
9279
9389
|
//#endregion
|
|
9280
9390
|
//#region src/commands/main/bootstrap.ts
|
|
9281
|
-
const command$
|
|
9391
|
+
const command$54 = defineCommand({
|
|
9282
9392
|
name: "bootstrap",
|
|
9283
9393
|
summary: "Everything at once: projects, apps, campaigns, products",
|
|
9284
9394
|
details: "The complete account tree: organizations, projects, apps, campaigns and their placements,\npaywalls, products and entitlements.",
|
|
@@ -9311,7 +9421,7 @@ const command$53 = defineCommand({
|
|
|
9311
9421
|
|
|
9312
9422
|
//#endregion
|
|
9313
9423
|
//#region src/commands/main/campaigns.ts
|
|
9314
|
-
const command$
|
|
9424
|
+
const command$55 = defineResource({
|
|
9315
9425
|
name: "campaigns",
|
|
9316
9426
|
summary: "Who sees which paywall, and when",
|
|
9317
9427
|
operations: [
|
|
@@ -9536,7 +9646,7 @@ const command$54 = defineResource({
|
|
|
9536
9646
|
|
|
9537
9647
|
//#endregion
|
|
9538
9648
|
//#region src/commands/main/entitlements.ts
|
|
9539
|
-
const command$
|
|
9649
|
+
const command$56 = defineResource({
|
|
9540
9650
|
name: "entitlements",
|
|
9541
9651
|
summary: "What a purchase unlocks",
|
|
9542
9652
|
operations: [
|
|
@@ -9614,7 +9724,7 @@ const command$55 = defineResource({
|
|
|
9614
9724
|
|
|
9615
9725
|
//#endregion
|
|
9616
9726
|
//#region src/commands/main/events.ts
|
|
9617
|
-
const command$
|
|
9727
|
+
const command$57 = defineResource({
|
|
9618
9728
|
name: "events",
|
|
9619
9729
|
summary: "Events sent to your webhooks",
|
|
9620
9730
|
operations: [
|
|
@@ -9655,7 +9765,7 @@ const command$56 = defineResource({
|
|
|
9655
9765
|
|
|
9656
9766
|
//#endregion
|
|
9657
9767
|
//#region src/commands/main/paywalls.ts
|
|
9658
|
-
const command$
|
|
9768
|
+
const command$58 = defineResource({
|
|
9659
9769
|
name: "paywalls",
|
|
9660
9770
|
summary: "Paywalls in the dashboard",
|
|
9661
9771
|
operations: [
|
|
@@ -9725,7 +9835,7 @@ const command$57 = defineResource({
|
|
|
9725
9835
|
|
|
9726
9836
|
//#endregion
|
|
9727
9837
|
//#region src/commands/main/products.ts
|
|
9728
|
-
const command$
|
|
9838
|
+
const command$59 = defineResource({
|
|
9729
9839
|
name: "products",
|
|
9730
9840
|
summary: "Products and their store prices",
|
|
9731
9841
|
operations: [
|
|
@@ -9757,7 +9867,7 @@ const command$58 = defineResource({
|
|
|
9757
9867
|
["--period <p>", "day | week | month | year"],
|
|
9758
9868
|
["--period-count <n>", "Periods per cycle, default 1"],
|
|
9759
9869
|
["--trial-days <n>", "Free-trial length in days"],
|
|
9760
|
-
["--entitlement <id>", "Entitlement to grant (repeatable)"]
|
|
9870
|
+
["--entitlement <id>", "Entitlement to grant, by id or identifier (repeatable); it must be on the product's app"]
|
|
9761
9871
|
]
|
|
9762
9872
|
},
|
|
9763
9873
|
{
|
|
@@ -9792,12 +9902,16 @@ const command$58 = defineResource({
|
|
|
9792
9902
|
mcp: false
|
|
9793
9903
|
}
|
|
9794
9904
|
],
|
|
9795
|
-
examples: [
|
|
9905
|
+
examples: [
|
|
9906
|
+
["products list --app <app>", "Products of an app's project"],
|
|
9907
|
+
["products create --identifier <id> --price 9.99 --period month", "A monthly subscription"],
|
|
9908
|
+
["products create --identifier <id> --price 9.99 --period month --entitlement pro", "One that grants pro"]
|
|
9909
|
+
]
|
|
9796
9910
|
});
|
|
9797
9911
|
|
|
9798
9912
|
//#endregion
|
|
9799
9913
|
//#region src/commands/main/users.ts
|
|
9800
|
-
const command$
|
|
9914
|
+
const command$60 = defineResource({
|
|
9801
9915
|
name: "users",
|
|
9802
9916
|
summary: "Your app's users: subscriptions, entitlements, attributes",
|
|
9803
9917
|
operations: [
|
|
@@ -9868,7 +9982,7 @@ const command$59 = defineResource({
|
|
|
9868
9982
|
|
|
9869
9983
|
//#endregion
|
|
9870
9984
|
//#region src/commands/main/webhooks.ts
|
|
9871
|
-
const command$
|
|
9985
|
+
const command$61 = defineResource({
|
|
9872
9986
|
name: "webhooks",
|
|
9873
9987
|
summary: "Endpoints that receive your events",
|
|
9874
9988
|
operations: [
|
|
@@ -9942,7 +10056,7 @@ Overwrites destination, filters, headers and disabled state; can stop or redirec
|
|
|
9942
10056
|
|
|
9943
10057
|
//#endregion
|
|
9944
10058
|
//#region src/commands/support/doctor.ts
|
|
9945
|
-
const command$
|
|
10059
|
+
const command$62 = defineCommand({
|
|
9946
10060
|
name: "doctor",
|
|
9947
10061
|
summary: "Check the health of your Superwall integration",
|
|
9948
10062
|
flags: { installDir },
|
|
@@ -9952,7 +10066,7 @@ const command$61 = defineCommand({
|
|
|
9952
10066
|
prompts: true,
|
|
9953
10067
|
mcp: false,
|
|
9954
10068
|
async run(ctx) {
|
|
9955
|
-
const { runDoctor } = await import("./doctor-
|
|
10069
|
+
const { runDoctor } = await import("./doctor-kx01VvQX.js");
|
|
9956
10070
|
return runDoctor(ctx);
|
|
9957
10071
|
}
|
|
9958
10072
|
});
|
|
@@ -10098,7 +10212,7 @@ async function runFeedback(ctx, { args, flags }) {
|
|
|
10098
10212
|
|
|
10099
10213
|
//#endregion
|
|
10100
10214
|
//#region src/commands/support/feedback.ts
|
|
10101
|
-
const command$
|
|
10215
|
+
const command$63 = defineCommand({
|
|
10102
10216
|
name: "feedback",
|
|
10103
10217
|
summary: "Report a bug or send feedback to the Superwall team",
|
|
10104
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.
|
|
@@ -10159,7 +10273,7 @@ Sends the supplied message and context to the Superwall team as a persisted even
|
|
|
10159
10273
|
|
|
10160
10274
|
//#endregion
|
|
10161
10275
|
//#region src/commands/support/skills.ts
|
|
10162
|
-
const command$
|
|
10276
|
+
const command$64 = defineCommand({
|
|
10163
10277
|
name: "skills",
|
|
10164
10278
|
summary: "Install or update the Superwall agent skills for your coding agents",
|
|
10165
10279
|
flags: {
|
|
@@ -10188,14 +10302,14 @@ const command$63 = defineCommand({
|
|
|
10188
10302
|
prompts: true,
|
|
10189
10303
|
mcp: false,
|
|
10190
10304
|
async run(ctx, input) {
|
|
10191
|
-
const { runSkills } = await import("./skills-
|
|
10305
|
+
const { runSkills } = await import("./skills-B_oH2dYK.js");
|
|
10192
10306
|
return runSkills(ctx, input);
|
|
10193
10307
|
}
|
|
10194
10308
|
});
|
|
10195
10309
|
|
|
10196
10310
|
//#endregion
|
|
10197
10311
|
//#region src/commands/support/upgrade.ts
|
|
10198
|
-
const command$
|
|
10312
|
+
const command$65 = defineCommand({
|
|
10199
10313
|
name: "upgrade",
|
|
10200
10314
|
summary: "Update the CLI to the latest version",
|
|
10201
10315
|
examples: [["upgrade", "Install the latest version globally with npm"]],
|
|
@@ -10204,14 +10318,14 @@ const command$64 = defineCommand({
|
|
|
10204
10318
|
prompts: true,
|
|
10205
10319
|
mcp: false,
|
|
10206
10320
|
async run(ctx) {
|
|
10207
|
-
const { runUpgrade } = await import("./upgrade-
|
|
10321
|
+
const { runUpgrade } = await import("./upgrade-BnOq32zn.js");
|
|
10208
10322
|
return runUpgrade(ctx);
|
|
10209
10323
|
}
|
|
10210
10324
|
});
|
|
10211
10325
|
|
|
10212
10326
|
//#endregion
|
|
10213
10327
|
//#region src/commands/workflows/integrate.ts
|
|
10214
|
-
const command$
|
|
10328
|
+
const command$66 = defineCommand({
|
|
10215
10329
|
name: "integrate",
|
|
10216
10330
|
summary: "Set up the SDK, placements, and dashboard in your app",
|
|
10217
10331
|
flags: {
|
|
@@ -10243,8 +10357,8 @@ const command$65 = defineCommand({
|
|
|
10243
10357
|
prompts: true,
|
|
10244
10358
|
mcp: false,
|
|
10245
10359
|
async run(ctx, { flags }) {
|
|
10246
|
-
const { runIntegrate } = await import("./integrate-
|
|
10247
|
-
const { printPlaybook } = await import("./playbook-
|
|
10360
|
+
const { runIntegrate } = await import("./integrate-RK5U0GTQ.js");
|
|
10361
|
+
const { printPlaybook } = await import("./playbook-VqV7546k.js");
|
|
10248
10362
|
if (flags.skill) return printPlaybook(ctx.installDir, "integrate");
|
|
10249
10363
|
await runIntegrate({
|
|
10250
10364
|
...ctx,
|
|
@@ -10256,7 +10370,7 @@ const command$65 = defineCommand({
|
|
|
10256
10370
|
|
|
10257
10371
|
//#endregion
|
|
10258
10372
|
//#region src/commands/workflows/migrate.ts
|
|
10259
|
-
const command$
|
|
10373
|
+
const command$67 = defineCommand({
|
|
10260
10374
|
name: "migrate",
|
|
10261
10375
|
summary: "Migrate from RevenueCat / Adapty / Qonversion, or rebuild a paywall or native screen as code",
|
|
10262
10376
|
args: { paywall: { describe: "A dashboard paywall id: scaffold it as code (if not already) and rebuild its pages with your agent, or copy the prompt" } },
|
|
@@ -10290,8 +10404,8 @@ const command$66 = defineCommand({
|
|
|
10290
10404
|
prompts: true,
|
|
10291
10405
|
mcp: false,
|
|
10292
10406
|
async run(ctx, { args, flags }) {
|
|
10293
|
-
const { runPaywallMigration, runProviderMigration, runScreenMigration } = await import("./migrate-
|
|
10294
|
-
const { printPlaybook } = await import("./playbook-
|
|
10407
|
+
const { runPaywallMigration, runProviderMigration, runScreenMigration } = await import("./migrate-CjSpcnNu.js");
|
|
10408
|
+
const { printPlaybook } = await import("./playbook-VqV7546k.js");
|
|
10295
10409
|
if (flags.screen !== void 0) return runScreenMigration(ctx, {
|
|
10296
10410
|
path: flags.screen,
|
|
10297
10411
|
screenshot: flags.screenshot
|
|
@@ -10304,7 +10418,7 @@ const command$66 = defineCommand({
|
|
|
10304
10418
|
|
|
10305
10419
|
//#endregion
|
|
10306
10420
|
//#region src/commands/workflows/review.ts
|
|
10307
|
-
const command$
|
|
10421
|
+
const command$68 = defineCommand({
|
|
10308
10422
|
name: "review",
|
|
10309
10423
|
summary: "Review an existing Superwall setup end to end",
|
|
10310
10424
|
flags: {
|
|
@@ -10325,8 +10439,8 @@ const command$67 = defineCommand({
|
|
|
10325
10439
|
prompts: true,
|
|
10326
10440
|
mcp: false,
|
|
10327
10441
|
async run(ctx, { flags }) {
|
|
10328
|
-
const { runReview } = await import("./integrate-
|
|
10329
|
-
const { printPlaybook } = await import("./playbook-
|
|
10442
|
+
const { runReview } = await import("./integrate-RK5U0GTQ.js");
|
|
10443
|
+
const { printPlaybook } = await import("./playbook-VqV7546k.js");
|
|
10330
10444
|
if (flags.skill) return printPlaybook(ctx.installDir, flags.fix ? "review-fix" : "review");
|
|
10331
10445
|
await runReview(ctx, flags.fix);
|
|
10332
10446
|
}
|
|
@@ -10340,22 +10454,23 @@ const GROUPS = [
|
|
|
10340
10454
|
title: "Workflows",
|
|
10341
10455
|
notes: ["Each takes --skill to print the playbook instead of running."],
|
|
10342
10456
|
commands: [
|
|
10343
|
-
command$
|
|
10344
|
-
command$
|
|
10345
|
-
command$
|
|
10457
|
+
command$66,
|
|
10458
|
+
command$68,
|
|
10459
|
+
command$67
|
|
10346
10460
|
]
|
|
10347
10461
|
},
|
|
10348
10462
|
{
|
|
10349
10463
|
id: "paywalls",
|
|
10350
10464
|
title: "Paywalls & funnels",
|
|
10351
|
-
notes: ["push and publish take -m <note> to record why, in the source commit.", "
|
|
10465
|
+
notes: ["push and publish take -m <note> to record why, in the source commit.", "build, push, promote, publish and pull take --platform <p> when a project pushes to several platforms."],
|
|
10352
10466
|
commands: [
|
|
10353
10467
|
command$46,
|
|
10354
10468
|
command$47,
|
|
10355
10469
|
command$45,
|
|
10356
|
-
command$
|
|
10470
|
+
command$51,
|
|
10357
10471
|
command$48,
|
|
10358
|
-
command$49
|
|
10472
|
+
command$49,
|
|
10473
|
+
command$50
|
|
10359
10474
|
]
|
|
10360
10475
|
},
|
|
10361
10476
|
{
|
|
@@ -10363,16 +10478,16 @@ const GROUPS = [
|
|
|
10363
10478
|
title: "Commands",
|
|
10364
10479
|
notes: ["superwall <command> --help lists its operations; <operation> --help, its flags."],
|
|
10365
10480
|
commands: [
|
|
10366
|
-
command$53,
|
|
10367
|
-
command$52,
|
|
10368
|
-
command$58,
|
|
10369
|
-
command$55,
|
|
10370
10481
|
command$54,
|
|
10371
|
-
command$
|
|
10482
|
+
command$53,
|
|
10372
10483
|
command$59,
|
|
10373
|
-
command$60,
|
|
10374
10484
|
command$56,
|
|
10375
|
-
command$
|
|
10485
|
+
command$55,
|
|
10486
|
+
command$58,
|
|
10487
|
+
command$60,
|
|
10488
|
+
command$61,
|
|
10489
|
+
command$57,
|
|
10490
|
+
command$52
|
|
10376
10491
|
]
|
|
10377
10492
|
},
|
|
10378
10493
|
{
|
|
@@ -10573,10 +10688,10 @@ proxy uses. No command prints a private key, and none revokes a key at Apple.`
|
|
|
10573
10688
|
id: "support",
|
|
10574
10689
|
title: "Support & updates",
|
|
10575
10690
|
commands: [
|
|
10576
|
-
command$
|
|
10577
|
-
command$63,
|
|
10691
|
+
command$62,
|
|
10578
10692
|
command$64,
|
|
10579
|
-
command$
|
|
10693
|
+
command$65,
|
|
10694
|
+
command$63
|
|
10580
10695
|
]
|
|
10581
10696
|
}
|
|
10582
10697
|
];
|
|
@@ -10586,7 +10701,7 @@ function visible(channel) {
|
|
|
10586
10701
|
function listGroups() {
|
|
10587
10702
|
return GROUPS.filter((group$1) => visible(group$1.channel)).map((group$1) => ({
|
|
10588
10703
|
...group$1,
|
|
10589
|
-
commands: group$1.commands.filter((command$
|
|
10704
|
+
commands: group$1.commands.filter((command$69) => visible(command$69.channel))
|
|
10590
10705
|
}));
|
|
10591
10706
|
}
|
|
10592
10707
|
|