@superwall/cli 2.6.1 → 2.7.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/dist/{apple-BE1GBJFP.js → apple-DfYTDEJy.js} +16 -16
- package/dist/{approve-yRZmvkCj.js → approve-CoQJhii4.js} +7 -7
- package/dist/{assets-DTAgbWw0.js → assets-BN0tFoj7.js} +3 -3
- package/dist/auth.d.ts +1 -1
- package/dist/auth.js +3 -3
- package/dist/{base-zc1wl_9b.js → base-DAnzMjI8.js} +2 -2
- package/dist/{billing-C1LV4-BN.js → billing-CFGrG-WZ.js} +3 -3
- package/dist/{build-CQd-pf7O.js → build-CTBvzIG8.js} +10 -10
- package/dist/{config-DCqRQTJ4.js → config-CJRNScT0.js} +4 -4
- package/dist/{create-wlCp83IH.js → create-BLs-0ETi.js} +29 -29
- package/dist/create-C_kjQp0N.js +18 -0
- package/dist/{create-Costu6UT.js → create-aWzdpjJU.js} +8 -8
- package/dist/{doctor-Bd9ffg51.js → doctor-ChI2Kfru.js} +21 -21
- package/dist/entry.js +28 -29
- package/dist/{environment-Dn7irhZr.js → environment-BQiaGqjB.js} +1 -1
- package/dist/{existing-BQMB_2AG.js → existing-Cxg_gSN1.js} +8 -8
- package/dist/{git-Hf9Wc7Hp.js → git-D9ooAMt7.js} +1 -1
- package/dist/held-CQMCqJMa.js +15 -0
- package/dist/{held-D5wSX2Mf.js → held-CmvNRCRD.js} +327 -22
- package/dist/{scope-DDYLQeZw.js → input-ApyzIzVy.js} +48 -7
- package/dist/{install-CxyqfKFe.js → install-DM0JBdpE.js} +12 -12
- package/dist/{integrate-MkyDDzI5.js → integrate-ZQUaScQ0.js} +21 -22
- package/dist/login-Cnt3UZKV.js +13 -0
- package/dist/{login-B7IqDafm.js → login-CvzBt9eM.js} +2 -2
- package/dist/{login-BMHDhxAx.js → login-Oo2NWLlX.js} +7 -7
- package/dist/{lookup-DkcT4E-5.js → lookup-CHLrO7v7.js} +3 -3
- package/dist/{migrate-CdFoZipj.js → migrate-mFKBset8.js} +30 -30
- package/dist/{notification-url-D6KKeXnk.js → notification-url-Dpx0pbYs.js} +3 -3
- package/dist/{open-COJE6ryI.js → open-CxgE8kLT.js} +2 -2
- package/dist/{org-BV8wwxwc.js → org-0KDPRSlc.js} +4 -4
- package/dist/{organization-9R_1PJKk.js → organization-Cg--QQtz.js} +4 -4
- package/dist/{orgs-ltP8H0Nl.js → orgs-Df8DzIav.js} +1 -1
- package/dist/{paths-Cb1RfjaX.js → paths-B4FNcaHO.js} +1 -1
- package/dist/{playbook-CVGolez9.js → playbook-pFhIg_0e.js} +10 -10
- package/dist/{promote-B_HnFEbX.js → promote-Crwz1xI0.js} +23 -23
- package/dist/{pull-DF4KYVcP.js → pull-BixwETu1.js} +10 -10
- package/dist/pull-C0gY7HGj.js +30 -0
- package/dist/{pull-lYRULo4v.js → pull-D8GfsKha.js} +30 -30
- package/dist/{push-BZN1Qpkq.js → push-BKoav_FU.js} +10 -10
- package/dist/{push-BnllH2Rd.js → push-BNFvZHUM.js} +8 -8
- package/dist/push-DOaBj8hr.js +29 -0
- package/dist/push-uWv5P0LA.js +21 -0
- package/dist/{registry-CqePfigB.js → registry-BPqRG08G.js} +268 -433
- package/dist/registry-DGHTk7l-.js +21 -0
- package/dist/{resolve-B4bd3Qjl.js → resolve-CarLrF4b.js} +3 -3
- package/dist/{resources-BaURbSpY.js → resources-BeXleviK.js} +15 -34
- package/dist/{run-Bme4Egyl.js → run-naBCXCfn.js} +14 -14
- package/dist/{scan-DugxddUU.js → scan-CtYVCqDS.js} +1 -1
- package/dist/scan-KWnscsk-.js +4 -0
- package/dist/{sdk-BFunw4Hc.js → sdk-BKVRAv23.js} +2 -2
- package/dist/{selection-C439nEhn.js → selection-CpEfqw2b.js} +1 -1
- package/dist/{series-B8NJK4yS.js → series-C9OU5kd7.js} +1 -1
- package/dist/server-DjBnyiwD.js +33 -0
- package/dist/{server-C_aMxzvS.js → server-Dp5Imq3v.js} +11 -11
- package/dist/{session-CfG3gzko.js → session-6HA1OwHe.js} +6 -6
- package/dist/session-BatiAUPQ.js +5 -0
- package/dist/{session-B7frlXXQ.js → session-BpLOLurZ.js} +1 -1
- package/dist/{setup-DQEasPhx.js → setup-RL-5c6SV.js} +10 -10
- package/dist/skills/superwall/SKILL.md +8 -1
- package/dist/skills/superwall/references/api.md +34 -3
- package/dist/skills/superwall/references/asc.md +5 -1
- package/dist/skills/superwall/workflows/dashboard/playbook.md +1 -1
- package/dist/skills/superwall/workflows/dashboard/setup.md +6 -2
- package/dist/skills/superwall/workflows/migrate/adapty.md +1 -1
- package/dist/skills/superwall/workflows/migrate/playbook.md +6 -1
- package/dist/skills/superwall/workflows/migrate/qonversion.md +1 -1
- package/dist/skills/superwall/workflows/migrate/revenuecat.md +1 -1
- package/dist/skills/superwall/workflows/placements/android.md +4 -1
- package/dist/skills/superwall/workflows/placements/expo.md +4 -1
- package/dist/skills/superwall/workflows/placements/flutter.md +4 -1
- package/dist/skills/superwall/workflows/placements/ios.md +4 -1
- package/dist/skills/superwall/workflows/placements/playbook.md +6 -1
- package/dist/skills/superwall/workflows/placements/react-native.md +4 -1
- package/dist/skills/superwall/workflows/placements/strategy.md +4 -1
- package/dist/skills/superwall-framework/SKILL.md +54 -4
- package/dist/skills/superwall-framework/references/cli.md +6 -0
- package/dist/skills/superwall-framework/references/elements-checkout.md +457 -0
- package/dist/skills/superwall-framework/references/examples.md +1 -0
- package/dist/skills/superwall-framework/references/layout.md +10 -0
- package/dist/skills/teleport/SKILL.md +1 -1
- package/dist/{skills-DnegE1A6.js → skills-C1ku2pgy.js} +5 -5
- package/dist/{skills-MmF7IyTg.js → skills-CkAWJveA.js} +8 -8
- package/dist/{source-push-MbJjh4Ki.js → source-push-D59hV02W.js} +6 -6
- package/dist/{spinner-Dcr-Dqdi.js → spinner-hTCJZAoJ.js} +42 -7
- package/dist/{starter-BlJ_InZJ.js → starter-jYb2nmlb.js} +3 -3
- package/dist/{status-DHRxg1ZA.js → status-DrD9CHtK.js} +7 -7
- package/dist/{storage-DdIAHolY.js → storage-D0Q4xBi-.js} +1 -1
- package/dist/storekit-CAOpa6_f.js +14 -0
- package/dist/{storekit-De998QOt.js → storekit-TLBxGIrN.js} +5 -5
- package/dist/{theme-BrUrye-c.js → theme-Bvv0yrk_.js} +5 -5
- package/dist/{token-CKCBQ4I8.js → token-SEWilQo9.js} +1 -1
- package/dist/tools-skills/superwall/SKILL.md +8 -1
- package/dist/tools-skills/superwall/references/api.md +34 -3
- package/dist/tools-skills/superwall/references/asc.md +5 -1
- package/dist/tools-skills/superwall/workflows/dashboard/playbook.md +1 -1
- package/dist/tools-skills/superwall/workflows/dashboard/setup.md +6 -2
- package/dist/tools-skills/superwall/workflows/migrate/adapty.md +1 -1
- package/dist/tools-skills/superwall/workflows/migrate/playbook.md +6 -1
- package/dist/tools-skills/superwall/workflows/migrate/qonversion.md +1 -1
- package/dist/tools-skills/superwall/workflows/migrate/revenuecat.md +1 -1
- package/dist/tools-skills/superwall/workflows/placements/android.md +4 -1
- package/dist/tools-skills/superwall/workflows/placements/expo.md +4 -1
- package/dist/tools-skills/superwall/workflows/placements/flutter.md +4 -1
- package/dist/tools-skills/superwall/workflows/placements/ios.md +4 -1
- package/dist/tools-skills/superwall/workflows/placements/playbook.md +6 -1
- package/dist/tools-skills/superwall/workflows/placements/react-native.md +4 -1
- package/dist/tools-skills/superwall/workflows/placements/strategy.md +4 -1
- package/dist/tools-skills/teleport/SKILL.md +1 -1
- package/dist/tools.d.ts +4 -2
- package/dist/tools.js +1352 -1187
- package/dist/{try-C8QQbG0b.js → try-BpMpLGCs.js} +15 -15
- package/dist/{ui-hFgji1e8.js → ui-Dye-QvEj.js} +26 -1
- package/dist/{upgrade-D0thxCA4.js → upgrade-BLFWdbGR.js} +7 -7
- package/dist/upgrade-BzN7PjKg.js +27 -0
- package/package.json +2 -2
- package/dist/create-CSHGZDfB.js +0 -18
- package/dist/held-Dmf5SR3p.js +0 -15
- package/dist/input-DOT_2Zvb.js +0 -42
- package/dist/login-Cp0-BgDZ.js +0 -13
- package/dist/pull-JxiMyRwY.js +0 -30
- package/dist/push-B5py7h5y.js +0 -29
- package/dist/push-DHlUMkbf.js +0 -21
- package/dist/registry-BGEYCWyD.js +0 -22
- package/dist/scan-J2DILUNE.js +0 -4
- package/dist/server-Cif9w5lM.js +0 -33
- package/dist/session-DvaPyOuH.js +0 -5
- package/dist/storekit-iBCWmeKn.js +0 -15
- package/dist/upgrade-CYFdpVpi.js +0 -27
- /package/dist/{design-lint-mgO-2SGS.js → design-lint-CeG3_ZWN.js} +0 -0
- /package/dist/{devtools-B6Vp6HMy.js → devtools-B3tCQFD-.js} +0 -0
- /package/dist/{download-DhGd4hOB.js → download-DVFHIwia.js} +0 -0
- /package/dist/{project-BomArwSj.js → project-Dml4t7jO.js} +0 -0
- /package/dist/{reports-hbxsd3Zo.js → reports-CJQ-8sj4.js} +0 -0
- /package/dist/{screenshot-file-Dix2Qynm.js → screenshot-file-CcqMLpL5.js} +0 -0
- /package/dist/{source-DQs6iLtC.js → source-Ct9kOCAb.js} +0 -0
- /package/dist/{storage-Bh3wT1Rn.d.ts → storage-BaK-MUM8.d.ts} +0 -0
- /package/dist/{timing-BKEEIBij.js → timing-m0ZUzYiP.js} +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import "./token-SEWilQo9.js";
|
|
2
|
+
import "./storage-D0Q4xBi-.js";
|
|
3
|
+
import "./environment-BQiaGqjB.js";
|
|
4
|
+
import "./config-CJRNScT0.js";
|
|
5
|
+
import "./held-CmvNRCRD.js";
|
|
6
|
+
import "./ui-Dye-QvEj.js";
|
|
7
|
+
import "./orgs-Df8DzIav.js";
|
|
8
|
+
import "./resources-BeXleviK.js";
|
|
9
|
+
import "./spinner-hTCJZAoJ.js";
|
|
10
|
+
import "./org-0KDPRSlc.js";
|
|
11
|
+
import "./theme-Bvv0yrk_.js";
|
|
12
|
+
import "./lookup-CHLrO7v7.js";
|
|
13
|
+
import { n as listGroups, t as GROUPS } from "./registry-BPqRG08G.js";
|
|
14
|
+
import "./session-BpLOLurZ.js";
|
|
15
|
+
import "./input-ApyzIzVy.js";
|
|
16
|
+
import "./client-BwYhzITp.js";
|
|
17
|
+
import "./products-CJq_iXv5.js";
|
|
18
|
+
import "./timing-m0ZUzYiP.js";
|
|
19
|
+
import "./notification-url-Dpx0pbYs.js";
|
|
20
|
+
|
|
21
|
+
export { GROUPS, listGroups };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { u as DASHBOARD_ORIGIN_OVERRIDE } from "./environment-
|
|
2
|
-
import { a as orgProjects, n as listOrganizations } from "./orgs-
|
|
1
|
+
import { u as DASHBOARD_ORIGIN_OVERRIDE } from "./environment-BQiaGqjB.js";
|
|
2
|
+
import { a as orgProjects, n as listOrganizations } from "./orgs-Df8DzIav.js";
|
|
3
3
|
import { n as ARTIFACT_FILE } from "./scope-Cg1AdAfO.js";
|
|
4
|
-
import { t as ArtifactError } from "./project-
|
|
4
|
+
import { t as ArtifactError } from "./project-Dml4t7jO.js";
|
|
5
5
|
import * as fs from "node:fs";
|
|
6
6
|
import * as path from "node:path";
|
|
7
7
|
|
|
@@ -1,31 +1,7 @@
|
|
|
1
|
-
import { b as ApiUnreachableError, y as ApiError } from "./config-
|
|
2
|
-
import {
|
|
1
|
+
import { b as ApiUnreachableError, y as ApiError } from "./config-CJRNScT0.js";
|
|
2
|
+
import { a as isRecord } from "./ui-Dye-QvEj.js";
|
|
3
|
+
import { r as listReachableProjects } from "./orgs-Df8DzIav.js";
|
|
3
4
|
|
|
4
|
-
//#region src/core/json.ts
|
|
5
|
-
function isRecord(value) {
|
|
6
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
7
|
-
}
|
|
8
|
-
function parseJson(body) {
|
|
9
|
-
if (body.trim() === "") return void 0;
|
|
10
|
-
try {
|
|
11
|
-
return JSON.parse(body);
|
|
12
|
-
} catch {
|
|
13
|
-
return;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
function field(value, key) {
|
|
17
|
-
return typeof value === "object" && value !== null ? Reflect.get(value, key) : void 0;
|
|
18
|
-
}
|
|
19
|
-
function textField(value, key) {
|
|
20
|
-
const found = field(value, key);
|
|
21
|
-
return typeof found === "string" && found.trim() !== "" ? found.trim() : void 0;
|
|
22
|
-
}
|
|
23
|
-
function listField(value, key) {
|
|
24
|
-
const found = field(value, key);
|
|
25
|
-
return Array.isArray(found) ? found : [];
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
//#endregion
|
|
29
5
|
//#region src/core/api/resources.ts
|
|
30
6
|
const RESOURCES = {
|
|
31
7
|
products: "/v2/products",
|
|
@@ -101,17 +77,22 @@ function createApplication(api, scope, opts) {
|
|
|
101
77
|
...opts.bundleId ? { bundle_id: opts.bundleId } : {}
|
|
102
78
|
});
|
|
103
79
|
}
|
|
104
|
-
function createCampaign(api, scope, description, placement) {
|
|
80
|
+
function createCampaign(api, scope, description, placement, paywall) {
|
|
105
81
|
if (!scope.applicationId) throw new Error("This project has no application to create a campaign in.");
|
|
82
|
+
const variant = paywall ? {
|
|
83
|
+
type: "treatment",
|
|
84
|
+
percentage: 100,
|
|
85
|
+
paywall
|
|
86
|
+
} : {
|
|
87
|
+
type: "holdout",
|
|
88
|
+
percentage: 100,
|
|
89
|
+
paywall: null
|
|
90
|
+
};
|
|
106
91
|
return api.post("/v2/campaigns", {
|
|
107
92
|
application_id: scope.applicationId,
|
|
108
93
|
description,
|
|
109
94
|
placements: [{ event_name: placement }],
|
|
110
|
-
audiences: [{ variants: [
|
|
111
|
-
type: "holdout",
|
|
112
|
-
percentage: 100,
|
|
113
|
-
paywall: null
|
|
114
|
-
}] }]
|
|
95
|
+
audiences: [{ variants: [variant] }]
|
|
115
96
|
});
|
|
116
97
|
}
|
|
117
98
|
function rowName(row) {
|
|
@@ -314,4 +295,4 @@ function promotePaywallVersion(api, paywallId, opts = {}) {
|
|
|
314
295
|
}
|
|
315
296
|
|
|
316
297
|
//#endregion
|
|
317
|
-
export {
|
|
298
|
+
export { pushPaywallVersion as C, versionProducts as D, titleCase as E, pushPaywallAssets as S, rowName as T, livePaywallVersion as _, createEntitlement as a, platformStore as b, createProject as c, linkSourceCommit as d, listAppPaywalls as f, livePaywall as g, listResource as h, createCampaign as i, findPaywall as l, listProjects as m, billingPlanOf as n, createHeadlessPaywall as o, listApplications as p, createApplication as r, createProduct as s, RESOURCES as t, isAppScoped as u, mintSourceAccess as v, pushedProducts as w, promotePaywallVersion as x, platformLabel as y };
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import "./token-
|
|
2
|
-
import "./storage-
|
|
3
|
-
import "./environment-
|
|
4
|
-
import { y as ApiError } from "./config-
|
|
5
|
-
import "./
|
|
6
|
-
import "./orgs-
|
|
7
|
-
import "./
|
|
8
|
-
import "./spinner-
|
|
9
|
-
import "./lookup-
|
|
1
|
+
import "./token-SEWilQo9.js";
|
|
2
|
+
import "./storage-D0Q4xBi-.js";
|
|
3
|
+
import "./environment-BQiaGqjB.js";
|
|
4
|
+
import { y as ApiError } from "./config-CJRNScT0.js";
|
|
5
|
+
import "./ui-Dye-QvEj.js";
|
|
6
|
+
import "./orgs-Df8DzIav.js";
|
|
7
|
+
import "./resources-BeXleviK.js";
|
|
8
|
+
import "./spinner-hTCJZAoJ.js";
|
|
9
|
+
import "./lookup-CHLrO7v7.js";
|
|
10
10
|
import "./types-Dc9U_4kp.js";
|
|
11
11
|
import { n as ARTIFACT_FILE } from "./scope-Cg1AdAfO.js";
|
|
12
|
-
import { a as findEntrypoint, o as readManifest, s as readProject, t as ArtifactError } from "./project-
|
|
13
|
-
import { C as TRIGGER_HEADER, S as READOUT_LIMITS, b as MOUNT_LOAD_TIMEOUT_MS, c as defaultRange, d as resolveWranglerPackage, f as API_HOST, g as CONTEXT_HEADER, h as BRIDGE_PROTOCOL, i as seriesProblem, l as parseContextJson, m as ARTIFACT_HEADER_PREFIX, o as SLOTS, p as ARTIFACT_COMPATIBILITY_DATE, r as readoutProblem, s as buildContext, t as checkMetricQuery, u as bundleArtifact, v as ENTRYPOINT_HEADER, w as isInternalPath, x as PLATFORM_HOST, y as METRIC_LIMITS } from "./series-
|
|
14
|
-
import { n as resolveOrganization, t as resolveAppScope } from "./organization-
|
|
15
|
-
import "./download-
|
|
16
|
-
import { i as warnIfSdkBehind } from "./sdk-
|
|
12
|
+
import { a as findEntrypoint, o as readManifest, s as readProject, t as ArtifactError } from "./project-Dml4t7jO.js";
|
|
13
|
+
import { C as TRIGGER_HEADER, S as READOUT_LIMITS, b as MOUNT_LOAD_TIMEOUT_MS, c as defaultRange, d as resolveWranglerPackage, f as API_HOST, g as CONTEXT_HEADER, h as BRIDGE_PROTOCOL, i as seriesProblem, l as parseContextJson, m as ARTIFACT_HEADER_PREFIX, o as SLOTS, p as ARTIFACT_COMPATIBILITY_DATE, r as readoutProblem, s as buildContext, t as checkMetricQuery, u as bundleArtifact, v as ENTRYPOINT_HEADER, w as isInternalPath, x as PLATFORM_HOST, y as METRIC_LIMITS } from "./series-C9OU5kd7.js";
|
|
14
|
+
import { n as resolveOrganization, t as resolveAppScope } from "./organization-Cg--QQtz.js";
|
|
15
|
+
import "./download-DVFHIwia.js";
|
|
16
|
+
import { i as warnIfSdkBehind } from "./sdk-BKVRAv23.js";
|
|
17
17
|
import { createRequire } from "node:module";
|
|
18
18
|
import * as fs from "node:fs";
|
|
19
19
|
import * as path from "node:path";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as Integration } from "./environment-
|
|
1
|
+
import { h as Integration } from "./environment-BQiaGqjB.js";
|
|
2
2
|
import { existsSync, readFileSync } from "node:fs";
|
|
3
3
|
import { basename, dirname, join, relative, sep } from "node:path";
|
|
4
4
|
import fg from "fast-glob";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as VENDORED_SDK } from "./project-
|
|
2
|
-
import { n as PUBLIC_REPO, t as PUBLIC_REF } from "./download-
|
|
1
|
+
import { r as VENDORED_SDK } from "./project-Dml4t7jO.js";
|
|
2
|
+
import { n as PUBLIC_REPO, t as PUBLIC_REF } from "./download-DVFHIwia.js";
|
|
3
3
|
import * as fs from "node:fs";
|
|
4
4
|
import * as path from "node:path";
|
|
5
5
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as bundleDir, n as MANIFEST_FILE, o as readManifest, t as ArtifactError } from "./project-
|
|
1
|
+
import { i as bundleDir, n as MANIFEST_FILE, o as readManifest, t as ArtifactError } from "./project-Dml4t7jO.js";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import { execFile } from "node:child_process";
|
|
4
4
|
import * as fs from "node:fs";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import "./token-SEWilQo9.js";
|
|
2
|
+
import "./storage-D0Q4xBi-.js";
|
|
3
|
+
import "./environment-BQiaGqjB.js";
|
|
4
|
+
import "./config-CJRNScT0.js";
|
|
5
|
+
import "./skills-C1ku2pgy.js";
|
|
6
|
+
import "./scan-CtYVCqDS.js";
|
|
7
|
+
import "./ui-Dye-QvEj.js";
|
|
8
|
+
import "./orgs-Df8DzIav.js";
|
|
9
|
+
import "./resources-BeXleviK.js";
|
|
10
|
+
import "./spinner-hTCJZAoJ.js";
|
|
11
|
+
import "./org-0KDPRSlc.js";
|
|
12
|
+
import "./theme-Bvv0yrk_.js";
|
|
13
|
+
import "./lookup-CHLrO7v7.js";
|
|
14
|
+
import "./types-Dc9U_4kp.js";
|
|
15
|
+
import "./session-6HA1OwHe.js";
|
|
16
|
+
import "./existing-Cxg_gSN1.js";
|
|
17
|
+
import "./paths-B4FNcaHO.js";
|
|
18
|
+
import "./setup-RL-5c6SV.js";
|
|
19
|
+
import "./framework-DW5fqjh4.js";
|
|
20
|
+
import "./login-Oo2NWLlX.js";
|
|
21
|
+
import "./browser-BVjaf98V.js";
|
|
22
|
+
import "./login-CvzBt9eM.js";
|
|
23
|
+
import "./git-D9ooAMt7.js";
|
|
24
|
+
import "./scope-Cg1AdAfO.js";
|
|
25
|
+
import "./upgrade-BLFWdbGR.js";
|
|
26
|
+
import "./base-DAnzMjI8.js";
|
|
27
|
+
import "./selection-CpEfqw2b.js";
|
|
28
|
+
import "./source-Ct9kOCAb.js";
|
|
29
|
+
import "./assets-BN0tFoj7.js";
|
|
30
|
+
import "./source-push-D59hV02W.js";
|
|
31
|
+
import { t as runStudio } from "./server-Dp5Imq3v.js";
|
|
32
|
+
|
|
33
|
+
export { runStudio };
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { x as VERSION } from "./environment-
|
|
2
|
-
import { y as ApiError } from "./config-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { x as VERSION } from "./environment-BQiaGqjB.js";
|
|
2
|
+
import { y as ApiError } from "./config-CJRNScT0.js";
|
|
3
|
+
import { n as ui } from "./ui-Dye-QvEj.js";
|
|
4
|
+
import { C as pushPaywallVersion, D as versionProducts, p as listApplications, x as promotePaywallVersion } from "./resources-BeXleviK.js";
|
|
5
5
|
import { f as readLock, n as collectProjectDeclarations, r as writeProjectTypes } from "./types-Dc9U_4kp.js";
|
|
6
|
-
import { i as writeProjectScaffold, l as resolveApps, n as requireApi } from "./session-
|
|
6
|
+
import { i as writeProjectScaffold, l as resolveApps, n as requireApi } from "./session-6HA1OwHe.js";
|
|
7
7
|
import { i as resolveFramework, n as frameworkVersion } from "./framework-DW5fqjh4.js";
|
|
8
8
|
import { n as openBrowser } from "./browser-BVjaf98V.js";
|
|
9
|
-
import { c as renderUpdateNotice, l as resolveUpdate, s as refreshUpdateCheck } from "./upgrade-
|
|
10
|
-
import { i as planTargets, s as wantedPlatforms } from "./base-
|
|
11
|
-
import { i as requireProject, o as resolveProjectDirs, u as LAYOUT_HINT } from "./selection-
|
|
12
|
-
import { t as collectSourceFiles } from "./source-
|
|
13
|
-
import { n as requireAssets, r as syncAssets, t as assetBaseUrl } from "./assets-
|
|
14
|
-
import { a as listApplicationCatalogue, c as projectForApplication, i as warnNotPortable, o as listProjectCatalogue, r as pushSource, s as productListings, u as resolveBinding } from "./source-push-
|
|
9
|
+
import { c as renderUpdateNotice, l as resolveUpdate, s as refreshUpdateCheck } from "./upgrade-BLFWdbGR.js";
|
|
10
|
+
import { i as planTargets, s as wantedPlatforms } from "./base-DAnzMjI8.js";
|
|
11
|
+
import { i as requireProject, o as resolveProjectDirs, u as LAYOUT_HINT } from "./selection-CpEfqw2b.js";
|
|
12
|
+
import { t as collectSourceFiles } from "./source-Ct9kOCAb.js";
|
|
13
|
+
import { n as requireAssets, r as syncAssets, t as assetBaseUrl } from "./assets-BN0tFoj7.js";
|
|
14
|
+
import { a as listApplicationCatalogue, c as projectForApplication, i as warnNotPortable, o as listProjectCatalogue, r as pushSource, s as productListings, u as resolveBinding } from "./source-push-D59hV02W.js";
|
|
15
15
|
import { execFile } from "node:child_process";
|
|
16
16
|
import * as fs from "node:fs";
|
|
17
17
|
import * as path from "node:path";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { n as readSession } from "./storage-
|
|
2
|
-
import { S as apiKeyFromEnv, f as ENV_API_KEY, t as API_HOST } from "./environment-
|
|
3
|
-
import { x as createSuperwallApi } from "./config-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { n as readSession } from "./storage-D0Q4xBi-.js";
|
|
2
|
+
import { S as apiKeyFromEnv, f as ENV_API_KEY, t as API_HOST } from "./environment-BQiaGqjB.js";
|
|
3
|
+
import { x as createSuperwallApi } from "./config-CJRNScT0.js";
|
|
4
|
+
import { n as ui } from "./ui-Dye-QvEj.js";
|
|
5
|
+
import { p as listApplications, y as platformLabel } from "./resources-BeXleviK.js";
|
|
6
6
|
import { f as readLock, m as writeApp } from "./types-Dc9U_4kp.js";
|
|
7
|
-
import { n as performLoginWithUi } from "./login-
|
|
7
|
+
import { n as performLoginWithUi } from "./login-CvzBt9eM.js";
|
|
8
8
|
import * as fs from "node:fs";
|
|
9
9
|
import * as path from "node:path";
|
|
10
10
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as resolveApiHost, i as removeSession, n as readSession, o as serializeSession, s as sessionOrgName } from "./storage-
|
|
1
|
+
import { a as resolveApiHost, i as removeSession, n as readSession, o as serializeSession, s as sessionOrgName } from "./storage-D0Q4xBi-.js";
|
|
2
2
|
|
|
3
3
|
//#region src/core/account/session.ts
|
|
4
4
|
function runWhoami(ctx) {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { d as DASHBOARD_URL } from "./environment-
|
|
2
|
-
import { y as ApiError } from "./config-
|
|
3
|
-
import { d as readBundledSkill } from "./skills-
|
|
4
|
-
import { i as readPackageJson, r as allDeps, t as scanProject } from "./scan-
|
|
5
|
-
import { l as findPaywall, m as listProjects, p as listApplications, r as createApplication, y as platformLabel } from "./resources-
|
|
6
|
-
import { a as resolveScopeFromKey } from "./theme-
|
|
7
|
-
import { n as findApplication } from "./lookup-
|
|
1
|
+
import { d as DASHBOARD_URL } from "./environment-BQiaGqjB.js";
|
|
2
|
+
import { y as ApiError } from "./config-CJRNScT0.js";
|
|
3
|
+
import { d as readBundledSkill } from "./skills-C1ku2pgy.js";
|
|
4
|
+
import { i as readPackageJson, r as allDeps, t as scanProject } from "./scan-CtYVCqDS.js";
|
|
5
|
+
import { l as findPaywall, m as listProjects, p as listApplications, r as createApplication, y as platformLabel } from "./resources-BeXleviK.js";
|
|
6
|
+
import { a as resolveScopeFromKey } from "./theme-Bvv0yrk_.js";
|
|
7
|
+
import { n as findApplication } from "./lookup-CHLrO7v7.js";
|
|
8
8
|
import { c as isScreenOrigin, f as readLock, m as writeApp, v as writeOrigin } from "./types-Dc9U_4kp.js";
|
|
9
|
-
import { c as requirePlatform, n as requireApi, r as projectPackageName } from "./session-
|
|
10
|
-
import { c as readPrompt, l as detectDrivers, n as stripReport, o as runWithDriverFallback, p as copyToClipboard, t as detectExisting } from "./existing-
|
|
9
|
+
import { c as requirePlatform, n as requireApi, r as projectPackageName } from "./session-6HA1OwHe.js";
|
|
10
|
+
import { c as readPrompt, l as detectDrivers, n as stripReport, o as runWithDriverFallback, p as copyToClipboard, t as detectExisting } from "./existing-Cxg_gSN1.js";
|
|
11
11
|
import { r as pnpmWorkspaceAbove, t as IGNORE_WORKSPACE_INSTALL } from "./framework-DW5fqjh4.js";
|
|
12
|
-
import { t as gitAvailable } from "./git-
|
|
12
|
+
import { t as gitAvailable } from "./git-D9ooAMt7.js";
|
|
13
13
|
import { createRequire } from "node:module";
|
|
14
14
|
import { execFile } from "node:child_process";
|
|
15
15
|
import * as fs from "node:fs";
|
|
@@ -144,12 +144,19 @@ superwall apps list --json
|
|
|
144
144
|
superwall apps get <app> --json # everything about one app
|
|
145
145
|
superwall apps update <app> --bundle-id com.acme.app --json
|
|
146
146
|
superwall paywalls list --app <id|dashboard link> --search onboarding --json
|
|
147
|
-
superwall campaigns create --description "New user paywall" --placement onboarding_complete --app <id> --json
|
|
147
|
+
superwall campaigns create --description "New user paywall" --placement onboarding_complete --paywall <paywall> --app <id> --json
|
|
148
148
|
superwall campaigns audiences --help # what a nested resource can do
|
|
149
149
|
superwall api docs variant # find endpoints by keyword
|
|
150
150
|
superwall api docs /v2/campaigns/{id}/audiences/{audience_id}/variants post # exact body
|
|
151
151
|
```
|
|
152
152
|
|
|
153
|
+
Without `--paywall` (it needs a CLI newer than 2.6.1), the new campaign's
|
|
154
|
+
audience is a 100% holdout: the placement shows no paywall and the SDK reports
|
|
155
|
+
NoAudienceMatch/holdout until a treatment gets traffic, with
|
|
156
|
+
`superwall campaigns variants create <campaign> <audience> --type treatment --paywall <paywall>`.
|
|
157
|
+
Under `--json` the create result carries a `warnings` array when an audience
|
|
158
|
+
shows no paywall.
|
|
159
|
+
|
|
153
160
|
## App Store Connect - App Store Connect API
|
|
154
161
|
|
|
155
162
|
Use when: creating or managing anything in App Store Connect - subscriptions,
|
|
@@ -171,8 +171,28 @@ superwall products create --identifier com.acme.pro.monthly \
|
|
|
171
171
|
superwall products create --identifier pro_monthly --app <custom store id> \
|
|
172
172
|
--price 9.99 --period month --json
|
|
173
173
|
|
|
174
|
-
#
|
|
175
|
-
|
|
174
|
+
# Change a product's trial or period: the CLI reads the product and merges
|
|
175
|
+
# --trial-days, --period and --period-count into its stored subscription.
|
|
176
|
+
# On a one-time product --trial-days needs --period too. Don't combine these
|
|
177
|
+
# flags with --subscription; that is refused. update is destructive: outside a
|
|
178
|
+
# terminal it changes nothing without --yes, so pass it (or --dry-run first).
|
|
179
|
+
superwall products update <id> --trial-days 3 --yes --json
|
|
180
|
+
superwall products update <id> --period year --period-count 1 --yes --json
|
|
181
|
+
|
|
182
|
+
# --subscription replaces the whole subscription as a JSON object; null clears
|
|
183
|
+
# it, so the product becomes one-time.
|
|
184
|
+
superwall products update <id> \
|
|
185
|
+
--subscription '{"period":"year","period_count":1,"trial_period_days":3}' --yes --json
|
|
186
|
+
superwall products update <id> --subscription null --yes --json
|
|
187
|
+
|
|
188
|
+
# Prefer these flags over a raw `superwall patch /v2/products/<id>`. They need
|
|
189
|
+
# a CLI newer than 2.6.1; on 2.6.1 and older --subscription is sent as a string
|
|
190
|
+
# and refused, so use
|
|
191
|
+
# superwall patch /v2/products/<id> -d 'subscription:={"period":"year","period_count":1,"trial_period_days":3}'
|
|
192
|
+
|
|
193
|
+
# Campaigns: a description, the placement that triggers it and the paywall it
|
|
194
|
+
# shows to 100% of users (--paywall needs a CLI newer than 2.6.1)
|
|
195
|
+
superwall campaigns create --description "Onboarding paywall" --placement onboarding_complete --paywall <paywall> --project <id> --app <id> --json
|
|
176
196
|
|
|
177
197
|
# Placements: trigger an existing campaign on another event
|
|
178
198
|
superwall campaigns placements create <campaignId> --event-name onboarding_complete --project <id> --app <id> --json
|
|
@@ -182,6 +202,13 @@ superwall campaigns placements create <campaignId> --event-name onboarding_compl
|
|
|
182
202
|
directly - add the first platform with `apps create` and a project is created
|
|
183
203
|
for you.
|
|
184
204
|
|
|
205
|
+
Without `--paywall`, `campaigns create` seeds its audience with a single
|
|
206
|
+
holdout at 100%: the placement shows no paywall and the SDK reports
|
|
207
|
+
NoAudienceMatch/holdout until a treatment gets traffic. Fix it with
|
|
208
|
+
`superwall campaigns variants create <campaign> <audience> --type treatment --paywall <paywall> --json`.
|
|
209
|
+
Under `--json` the create result carries a `warnings` array whenever an
|
|
210
|
+
audience shows no paywall (holdout-only or disabled); read it before you move on.
|
|
211
|
+
|
|
185
212
|
### StoreKit config
|
|
186
213
|
|
|
187
214
|
```bash
|
|
@@ -192,8 +219,12 @@ superwall products storekit --project <id> [--out Superwall.storekit] --json
|
|
|
192
219
|
`products` is how many were written, `id` is the Superwall product id, and
|
|
193
220
|
`reason` is `other_store`, `no_price` or `no_identifier`. Price a `no_price`
|
|
194
221
|
product with
|
|
222
|
+
`superwall patch /v2/products/<id> -d 'price[amount]:=<minor units>' -d 'price[currency]=USD'`,
|
|
223
|
+
then export again. The warning prints
|
|
195
224
|
`superwall products update <id> --price '{"amount":<minor units>,"currency":"USD"}'`
|
|
196
|
-
(
|
|
225
|
+
for each one (`amount` in minor units, 399 = $3.99), which works on a CLI newer
|
|
226
|
+
than 2.6.1 (add `--yes` outside a terminal); on 2.6.1 and older it fails with a
|
|
227
|
+
400 from the API, so use the `patch` there.
|
|
197
228
|
|
|
198
229
|
## App Store Connect
|
|
199
230
|
|
|
@@ -115,7 +115,11 @@ ends by reporting the product's `state` and anything still `missing` before it
|
|
|
115
115
|
can be submitted. `superwall asc <resource> --help` lists each one's operations.
|
|
116
116
|
|
|
117
117
|
Everything else goes through the raw proxy (`asc get|post|patch|delete /v1/…`),
|
|
118
|
-
which is where validation applies.
|
|
118
|
+
which is where validation applies. The raw writes take `--dry-run` like the
|
|
119
|
+
resource commands (`asc post|patch|delete … --dry-run`): the body is built and
|
|
120
|
+
checked against Apple's schema, then the request is printed and nothing is sent
|
|
121
|
+
(`--json` gives `{ "dryRun": true, "requests": [...] }`). A body the schema
|
|
122
|
+
refuses still fails in dry-run unless you pass `--force`.
|
|
119
123
|
|
|
120
124
|
## Connecting ASC credentials
|
|
121
125
|
|
|
@@ -41,7 +41,7 @@ placement (in code) → campaign (routes it) → audience (who) → paywal
|
|
|
41
41
|
- Otherwise create with real pricing:
|
|
42
42
|
`superwall products create --identifier pro_yearly --price 39.99 --period year --trial-days 7 --entitlement pro --app <id> --json`
|
|
43
43
|
5. **Carry each placement.** `superwall campaigns list --project <id> --app <id> --json`. For each placement not already on
|
|
44
|
-
a campaign: `superwall campaigns create --description "<description>" --placement <placement> --project <id> --app <id> --json` (campaigns require an initial placement;
|
|
44
|
+
a campaign: `superwall campaigns create --description "<description>" --placement <placement> --paywall <paywall> --project <id> --app <id> --json` (campaigns require an initial placement; without `--paywall`, which needs a CLI newer than 2.6.1, the audience is a 100% holdout, the placement shows no paywall and the SDK reports NoAudienceMatch/holdout until `superwall campaigns variants create <campaign> <audience> --type treatment --paywall <paywall> --json`; under `--json` the result carries a `warnings` array when an audience shows no paywall), or add more with `superwall campaigns placements create <campaignId> --event-name <placement> --project <id> --app <id> --json`.
|
|
45
45
|
|
|
46
46
|
## Guardrails
|
|
47
47
|
|
|
@@ -94,12 +94,16 @@ entitlements on its own app. CLI 2.2.1 and older take only the numeric id from
|
|
|
94
94
|
|
|
95
95
|
```bash
|
|
96
96
|
superwall campaigns list --project <id> --app <id> --json
|
|
97
|
-
superwall campaigns create --description "Onboarding" --placement onboarding_complete --project <id> --app <id> --json
|
|
97
|
+
superwall campaigns create --description "Onboarding" --placement onboarding_complete --paywall <paywall> --project <id> --app <id> --json
|
|
98
98
|
superwall campaigns placements create <campaignId> --event-name another_placement --project <id> --app <id> --json
|
|
99
99
|
```
|
|
100
100
|
|
|
101
101
|
- `create` takes a **description**, not an identifier - name it for the surface.
|
|
102
|
-
- A campaign can carry several related placements; call `campaigns
|
|
102
|
+
- A campaign can carry several related placements; call `campaigns placements create` once per placement.
|
|
103
|
+
- Without `--paywall` (it needs a CLI newer than 2.6.1) the audience is a 100% holdout: the placement shows
|
|
104
|
+
no paywall (the SDK reports NoAudienceMatch/holdout) until
|
|
105
|
+
`superwall campaigns variants create <campaign> <audience> --type treatment --paywall <paywall> --json`.
|
|
106
|
+
Under `--json` the create result carries a `warnings` array when an audience shows no paywall.
|
|
103
107
|
- Adding a placement that's already on the campaign is safe to skip - list first.
|
|
104
108
|
|
|
105
109
|
## What the CLI cannot do (leave manual)
|
|
@@ -122,7 +122,7 @@ Produce: product ids, access-level ids (→ entitlements), and one row per `getP
|
|
|
122
122
|
superwall entitlements create --identifier premium --app <appId> --json
|
|
123
123
|
superwall products create --identifier com.app.premium_monthly --name "Premium Monthly" --entitlement premium --app <appId> --json
|
|
124
124
|
superwall products create --identifier com.app.premium_yearly --name "Premium Yearly" --entitlement premium --app <appId> --json
|
|
125
|
-
superwall campaigns create --description "Main paywall" --placement main --project <projectId> --app <appId> --json
|
|
125
|
+
superwall campaigns create --description "Main paywall" --placement main --paywall <paywall> --project <projectId> --app <appId> --json
|
|
126
126
|
superwall campaigns placements create <campaignId> --event-name onboarding --project <projectId> --app <appId> --json
|
|
127
127
|
```
|
|
128
128
|
|
|
@@ -73,6 +73,11 @@ superwall entitlements create --identifier <id> --app <appId> --json
|
|
|
73
73
|
superwall products list --project <projectId> --json
|
|
74
74
|
superwall products create --identifier <storeId> --entitlement <id> --app <appId> --json
|
|
75
75
|
superwall campaigns list --project <projectId> --app <appId> --json
|
|
76
|
-
superwall campaigns create --description "<description>" --placement <placement> --project <projectId> --app <appId> --json
|
|
76
|
+
superwall campaigns create --description "<description>" --placement <placement> --paywall <paywall> --project <projectId> --app <appId> --json
|
|
77
77
|
superwall campaigns placements create <campaignId> --event-name <placement> --project <projectId> --app <appId> --json
|
|
78
78
|
```
|
|
79
|
+
|
|
80
|
+
Without `--paywall` (it needs a CLI newer than 2.6.1) the audience is a 100%
|
|
81
|
+
holdout: the placement shows no paywall and the SDK reports NoAudienceMatch/holdout
|
|
82
|
+
until `superwall campaigns variants create <campaign> <audience> --type treatment --paywall <paywall> --json`.
|
|
83
|
+
Under `--json` the create result carries a `warnings` array when an audience shows no paywall.
|
|
@@ -119,7 +119,7 @@ Produce: product ids, entitlement/permission ids (→ entitlements), and one row
|
|
|
119
119
|
superwall entitlements create --identifier premium --app <appId> --json
|
|
120
120
|
superwall products create --identifier com.app.premium_monthly --name "Premium Monthly" --entitlement premium --app <appId> --json
|
|
121
121
|
superwall products create --identifier com.app.premium_yearly --name "Premium Yearly" --entitlement premium --app <appId> --json
|
|
122
|
-
superwall campaigns create --description "Main paywall" --placement paywall_main --project <projectId> --app <appId> --json
|
|
122
|
+
superwall campaigns create --description "Main paywall" --placement paywall_main --paywall <paywall> --project <projectId> --app <appId> --json
|
|
123
123
|
```
|
|
124
124
|
|
|
125
125
|
Each product MUST grant the entitlements it unlocked in the old provider (`--entitlement <identifier>`, repeat for several); a product with none unlocks nothing. CLI 2.2.1 and older take only the numeric id from `superwall entitlements list --json`.
|
|
@@ -214,7 +214,7 @@ manual create when possible - `superwall asc keys create --help`). Then one camp
|
|
|
214
214
|
a placement per call site:
|
|
215
215
|
|
|
216
216
|
```bash
|
|
217
|
-
superwall campaigns create --description "Main paywall" --placement start_workout --project <projectId> --app <appId> --json
|
|
217
|
+
superwall campaigns create --description "Main paywall" --placement start_workout --paywall <paywall> --project <projectId> --app <appId> --json
|
|
218
218
|
superwall campaigns placements create <campaignId> --event-name unlock_export --project <projectId> --app <appId> --json
|
|
219
219
|
```
|
|
220
220
|
|
|
@@ -147,10 +147,13 @@ A placement is inert without a campaign:
|
|
|
147
147
|
|
|
148
148
|
```bash
|
|
149
149
|
superwall campaigns list --project <id> --app <id> --json
|
|
150
|
-
superwall campaigns create --description "Editor upgrade paywall" --placement unlock_export --project <id> --app <id> --json
|
|
150
|
+
superwall campaigns create --description "Editor upgrade paywall" --placement unlock_export --paywall <paywall> --project <id> --app <id> --json
|
|
151
151
|
superwall campaigns placements create <campaignId> --event-name another_placement --project <id> --app <id> --json
|
|
152
152
|
```
|
|
153
153
|
|
|
154
|
+
Without `--paywall` (it needs a CLI newer than 2.6.1) the campaign's audience is a
|
|
155
|
+
100% holdout and the placement shows no paywall; see `../../references/api.md`.
|
|
156
|
+
|
|
154
157
|
## Pitfalls
|
|
155
158
|
|
|
156
159
|
- **Registering during composition.** Never call `register` in a composable's
|
|
@@ -131,10 +131,13 @@ function AddProjectButton({ count, freeLimit }: { count: number; freeLimit: numb
|
|
|
131
131
|
|
|
132
132
|
```bash
|
|
133
133
|
superwall campaigns list --project <id> --app <id> --json
|
|
134
|
-
superwall campaigns create --description "Editor upgrade paywall" --placement unlock_export --project <id> --app <id> --json
|
|
134
|
+
superwall campaigns create --description "Editor upgrade paywall" --placement unlock_export --paywall <paywall> --project <id> --app <id> --json
|
|
135
135
|
superwall campaigns placements create <campaignId> --event-name another_placement --project <id> --app <id> --json
|
|
136
136
|
```
|
|
137
137
|
|
|
138
|
+
Without `--paywall` (it needs a CLI newer than 2.6.1) the campaign's audience is a
|
|
139
|
+
100% holdout and the placement shows no paywall; see `../../references/api.md`.
|
|
140
|
+
|
|
138
141
|
## Pitfalls
|
|
139
142
|
|
|
140
143
|
- **Registering during render.** Call `registerPlacement` from an event handler
|
|
@@ -113,10 +113,13 @@ ElevatedButton(
|
|
|
113
113
|
|
|
114
114
|
```bash
|
|
115
115
|
superwall campaigns list --project <id> --app <id> --json
|
|
116
|
-
superwall campaigns create --description "Editor upgrade paywall" --placement unlock_export --project <id> --app <id> --json
|
|
116
|
+
superwall campaigns create --description "Editor upgrade paywall" --placement unlock_export --paywall <paywall> --project <id> --app <id> --json
|
|
117
117
|
superwall campaigns placements create <campaignId> --event-name another_placement --project <id> --app <id> --json
|
|
118
118
|
```
|
|
119
119
|
|
|
120
|
+
Without `--paywall` (it needs a CLI newer than 2.6.1) the campaign's audience is a
|
|
121
|
+
100% holdout and the placement shows no paywall; see `../../references/api.md`.
|
|
122
|
+
|
|
120
123
|
## Pitfalls
|
|
121
124
|
|
|
122
125
|
- **Registering inside `build`.** Never call `registerPlacement` from a widget's
|
|
@@ -140,10 +140,13 @@ A placement is inert without a campaign:
|
|
|
140
140
|
|
|
141
141
|
```bash
|
|
142
142
|
superwall campaigns list --project <id> --app <id> --json
|
|
143
|
-
superwall campaigns create --description "Editor upgrade paywall" --placement unlock_export --project <id> --app <id> --json
|
|
143
|
+
superwall campaigns create --description "Editor upgrade paywall" --placement unlock_export --paywall <paywall> --project <id> --app <id> --json
|
|
144
144
|
superwall campaigns placements create <campaignId> --event-name another_placement --project <id> --app <id> --json
|
|
145
145
|
```
|
|
146
146
|
|
|
147
|
+
Without `--paywall` (it needs a CLI newer than 2.6.1) the campaign's audience is a
|
|
148
|
+
100% holdout and the placement shows no paywall; see `../../references/api.md`.
|
|
149
|
+
|
|
147
150
|
## Pitfalls
|
|
148
151
|
|
|
149
152
|
- **Registering inside `body`/render.** Never call `register` from within a
|
|
@@ -46,9 +46,14 @@ Exact API, gating semantics, placement examples, audit checklist, and pitfalls:
|
|
|
46
46
|
A placement cannot present a paywall until a campaign routes it in the dashboard:
|
|
47
47
|
|
|
48
48
|
- `superwall campaigns list --project <id> --app <id> --json` - existing campaigns and placements.
|
|
49
|
-
- `superwall campaigns create --description "<description>" --placement <placement_name> --project <id> --app <id> --json` - create one with its required first placement.
|
|
49
|
+
- `superwall campaigns create --description "<description>" --placement <placement_name> --paywall <paywall> --project <id> --app <id> --json` - create one with its required first placement and the paywall it shows to 100% of users.
|
|
50
50
|
- `superwall campaigns placements create <campaignId> --event-name <placement_name> --project <id> --app <id> --json` - route another placement.
|
|
51
51
|
|
|
52
|
+
Without `--paywall` (it needs a CLI newer than 2.6.1) the audience is a 100%
|
|
53
|
+
holdout: the placement shows no paywall and the SDK reports NoAudienceMatch/holdout
|
|
54
|
+
until `superwall campaigns variants create <campaign> <audience> --type treatment --paywall <paywall> --json`.
|
|
55
|
+
Under `--json` the create result carries a `warnings` array when an audience shows no paywall.
|
|
56
|
+
|
|
52
57
|
Analytics-only, future, and paused placements may intentionally remain unrouted.
|
|
53
58
|
For placements expected to present now, use one campaign per distinct paywall
|
|
54
59
|
surface - not one per trigger. Don't create duplicates.
|
|
@@ -116,10 +116,13 @@ function AddProjectButton({ count, freeLimit }: { count: number; freeLimit: numb
|
|
|
116
116
|
|
|
117
117
|
```bash
|
|
118
118
|
superwall campaigns list --project <id> --app <id> --json
|
|
119
|
-
superwall campaigns create --description "Editor upgrade paywall" --placement unlock_export --project <id> --app <id> --json
|
|
119
|
+
superwall campaigns create --description "Editor upgrade paywall" --placement unlock_export --paywall <paywall> --project <id> --app <id> --json
|
|
120
120
|
superwall campaigns placements create <campaignId> --event-name another_placement --project <id> --app <id> --json
|
|
121
121
|
```
|
|
122
122
|
|
|
123
|
+
Without `--paywall` (it needs a CLI newer than 2.6.1) the campaign's audience is a
|
|
124
|
+
100% holdout and the placement shows no paywall; see `../../references/api.md`.
|
|
125
|
+
|
|
123
126
|
## Pitfalls
|
|
124
127
|
|
|
125
128
|
- **Registering during render.** Call `register` from an event handler or effect,
|
|
@@ -213,10 +213,13 @@ user sees. Analytics-only or future placements can remain unrouted intentionally
|
|
|
213
213
|
|
|
214
214
|
```bash
|
|
215
215
|
superwall campaigns list --project <id> --app <id> --json
|
|
216
|
-
superwall campaigns create --description "Editor upgrade paywall" --placement unlock_export --project <id> --app <id> --json
|
|
216
|
+
superwall campaigns create --description "Editor upgrade paywall" --placement unlock_export --paywall <paywall> --project <id> --app <id> --json
|
|
217
217
|
superwall campaigns placements create <campaignId> --event-name another_placement --project <id> --app <id> --json
|
|
218
218
|
```
|
|
219
219
|
|
|
220
|
+
Without `--paywall` (it needs a CLI newer than 2.6.1) the campaign's audience is a
|
|
221
|
+
100% holdout and the placement shows no paywall; see `../../references/api.md`.
|
|
222
|
+
|
|
220
223
|
Rule of thumb: one campaign per distinct paywall surface/decision (onboarding,
|
|
221
224
|
settings upgrade, win-back), routing the placements that belong to it - not one
|
|
222
225
|
campaign per trigger, and no duplicates.
|