@superwall/cli 2.6.0-beta.2 → 2.6.1
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 +47 -16
- package/dist/{apple-Dc5pOPms.js → apple-BE1GBJFP.js} +17 -19
- package/dist/{approve-BSbdmOez.js → approve-yRZmvkCj.js} +9 -11
- package/dist/{assets-C_RjojkK.js → assets-DTAgbWw0.js} +3 -3
- package/dist/auth.d.ts +11 -4
- package/dist/auth.js +4 -5
- package/dist/base-zc1wl_9b.js +82 -0
- package/dist/{billing-B6HK-F_a.js → billing-C1LV4-BN.js} +3 -3
- package/dist/{build-DK88pTMW.js → build-CQd-pf7O.js} +35 -16
- package/dist/{client-x08fpvay.js → config-DCqRQTJ4.js} +162 -15
- package/dist/create-CSHGZDfB.js +18 -0
- package/dist/{create-kpqEhqkk.js → create-Costu6UT.js} +9 -9
- package/dist/{create-B6-Dr3GZ.js → create-wlCp83IH.js} +41 -41
- package/dist/{doctor-DYbm8IKQ.js → doctor-Bd9ffg51.js} +50 -10
- package/dist/entry.js +45 -40
- package/dist/{environment-BFNzLLPN.js → environment-Dn7irhZr.js} +1 -1
- package/dist/{drivers-Dyi-y9Jn.js → existing-BQMB_2AG.js} +305 -8
- package/dist/framework-DW5fqjh4.js +65 -0
- package/dist/{source-BccdO4aL.js → git-Hf9Wc7Hp.js} +34 -92
- package/dist/{held-sKq3xrsT.js → held-D5wSX2Mf.js} +9 -9
- package/dist/held-Dmf5SR3p.js +15 -0
- package/dist/{install-DsIsif39.js → install-CxyqfKFe.js} +15 -17
- package/dist/{integrate-B8eA676b.js → integrate-MkyDDzI5.js} +33 -38
- package/dist/{login-BlpfYapG.js → login-B7IqDafm.js} +3 -3
- package/dist/{login-Blhxi20A.js → login-BMHDhxAx.js} +8 -9
- package/dist/login-Cp0-BgDZ.js +13 -0
- package/dist/{lookup-Dg55W9S7.js → lookup-DkcT4E-5.js} +28 -4
- package/dist/{migrate-DoRb9jmA.js → migrate-CdFoZipj.js} +66 -45
- package/dist/{notification-url-D82msWF5.js → notification-url-D6KKeXnk.js} +4 -4
- package/dist/{open-BAqLpTSI.js → open-COJE6ryI.js} +2 -2
- package/dist/{org-C4G7WjTV.js → org-BV8wwxwc.js} +4 -4
- package/dist/{organization-CmuQwcKN.js → organization-9R_1PJKk.js} +4 -4
- package/dist/{orgs-1OzwUtpT.js → orgs-ltP8H0Nl.js} +1 -2
- package/dist/{paths-gBbqgkS7.js → paths-Cb1RfjaX.js} +1 -1
- package/dist/{playbook-BKqlv77S.js → playbook-CVGolez9.js} +10 -14
- package/dist/{products-Cqq59DBQ.js → products-CJq_iXv5.js} +1 -1
- package/dist/{promote-D0i8A0CO.js → promote-B_HnFEbX.js} +27 -28
- package/dist/{pull-DgQ_UmGv.js → pull-DF4KYVcP.js} +72 -26
- package/dist/pull-JxiMyRwY.js +30 -0
- package/dist/{pull-CiIrJ5ik.js → pull-lYRULo4v.js} +33 -39
- package/dist/push-B5py7h5y.js +29 -0
- package/dist/{push-7N4XIVtg.js → push-BZN1Qpkq.js} +23 -12
- package/dist/{push-BWsXO7FN.js → push-BnllH2Rd.js} +8 -7
- package/dist/push-DHlUMkbf.js +21 -0
- package/dist/registry-BGEYCWyD.js +22 -0
- package/dist/{registry-aAR_8VOw.js → registry-CqePfigB.js} +1287 -902
- package/dist/{resolve-CcOpO_5s.js → resolve-B4bd3Qjl.js} +4 -4
- package/dist/{resources-DNwvf8rg.js → resources-BaURbSpY.js} +15 -2
- package/dist/{run-tVYJ3V5j.js → run-Bme4Egyl.js} +15 -17
- package/dist/{scan-dv0rrY4C.js → scan-DugxddUU.js} +1 -1
- package/dist/scan-J2DILUNE.js +4 -0
- package/dist/{scope-ehZ7L1nj.js → scope-Cg1AdAfO.js} +33 -3
- package/dist/{scope-BXoQo30_.js → scope-DDYLQeZw.js} +24 -18
- package/dist/screenshot-file-Dix2Qynm.js +127 -0
- package/dist/{sdk-DEfQttek.js → sdk-BFunw4Hc.js} +1 -1
- package/dist/{framework-JFLjmD5Y.js → selection-C439nEhn.js} +4 -54
- package/dist/{series-D2ZpZ8cx.js → series-B8NJK4yS.js} +1 -1
- package/dist/{server-CcZGdYjE.js → server-C_aMxzvS.js} +40 -18
- package/dist/server-Cif9w5lM.js +33 -0
- package/dist/{session-dHBtgSN0.js → session-B7frlXXQ.js} +1 -1
- package/dist/{base-83ZTv6up.js → session-CfG3gzko.js} +8 -83
- package/dist/session-DvaPyOuH.js +5 -0
- package/dist/{migration-BUedsREQ.js → setup-DQEasPhx.js} +290 -28
- package/dist/skills/index.json +5 -0
- package/dist/skills/superwall/SKILL.md +37 -10
- package/dist/skills/superwall/references/api.md +66 -21
- package/dist/skills/superwall/references/asa.md +109 -64
- package/dist/skills/superwall/references/dashboard-links.md +65 -28
- package/dist/skills/superwall/references/data-analytics.md +1 -1
- package/dist/skills/superwall/workflows/dashboard/setup.md +15 -5
- package/dist/skills/superwall/workflows/integrate/flutter.md +9 -7
- package/dist/skills/superwall-framework/SKILL.md +248 -36
- package/dist/skills/superwall-framework/references/cli.md +98 -7
- package/dist/skills/superwall-framework/references/examples.md +2 -2
- package/dist/skills/superwall-framework/references/layout.md +30 -2
- package/dist/skills/superwall-framework/references/migrate-from-editor.md +5 -0
- package/dist/skills/superwall-framework/references/migrate-from-native.md +5 -0
- package/dist/skills/teleport/SKILL.md +154 -0
- package/dist/skills/teleport/references/experiments.md +328 -0
- package/dist/skills/teleport/references/setup.md +157 -0
- package/dist/{skills-Q7xB784d.js → skills-DnegE1A6.js} +139 -9
- package/dist/{skills-Bqz2l_bx.js → skills-MmF7IyTg.js} +8 -12
- package/dist/source-DQs6iLtC.js +82 -0
- package/dist/{source-push-CG948HrX.js → source-push-MbJjh4Ki.js} +38 -14
- package/dist/{spinner-IA6hV8nI.js → spinner-Dcr-Dqdi.js} +7 -5
- package/dist/{starter-BtUUQWhd.js → starter-BlJ_InZJ.js} +2 -2
- package/dist/{status-CB_MrFu5.js → status-DHRxg1ZA.js} +9 -11
- package/dist/{output-Ggzq5_-t.js → storage-DdIAHolY.js} +40 -1
- package/dist/storekit-De998QOt.js +203 -0
- package/dist/storekit-iBCWmeKn.js +15 -0
- package/dist/{bind-DcWIIPgk.js → theme-BrUrye-c.js} +29 -6
- package/dist/token-CKCBQ4I8.js +100 -0
- package/dist/tools-skills/animate-onboarding/SKILL.md +1 -1
- package/dist/tools-skills/mobile-design/SKILL.md +1 -1
- package/dist/tools-skills/onboarding-questions/SKILL.md +1 -1
- package/dist/tools-skills/superwall/SKILL.md +43 -17
- package/dist/tools-skills/superwall/references/api.md +74 -24
- package/dist/tools-skills/superwall/references/asa.md +109 -64
- package/dist/tools-skills/superwall/references/dashboard-links.md +65 -28
- package/dist/tools-skills/superwall/references/data-analytics.md +1 -1
- package/dist/tools-skills/superwall/workflows/dashboard/playbook.md +4 -3
- package/dist/tools-skills/superwall/workflows/dashboard/setup.md +21 -8
- package/dist/tools-skills/superwall/workflows/integrate/flutter.md +9 -7
- package/dist/tools-skills/superwall/workflows/migrate/adapty.md +4 -3
- package/dist/tools-skills/superwall/workflows/migrate/playbook.md +2 -2
- package/dist/tools-skills/superwall/workflows/migrate/qonversion.md +4 -3
- package/dist/tools-skills/superwall/workflows/migrate/revenuecat.md +4 -3
- package/dist/tools-skills/superwall-editor/SKILL.md +2 -3
- package/dist/tools-skills/teleport/SKILL.md +154 -0
- package/dist/tools-skills/teleport/references/experiments.md +328 -0
- package/dist/tools-skills/teleport/references/setup.md +157 -0
- package/dist/tools.d.ts +1 -1
- package/dist/tools.js +1232 -746
- package/dist/{try-CS3jLyoP.js → try-C8QQbG0b.js} +17 -19
- package/dist/{lock-DgSx-p8Y.js → types-Dc9U_4kp.js} +86 -80
- package/dist/upgrade-CYFdpVpi.js +27 -0
- package/dist/upgrade-D0thxCA4.js +348 -0
- package/package.json +11 -3
- package/dist/config-CGcG7GOt.js +0 -113
- package/dist/create-Du8Fx7W5.js +0 -20
- package/dist/existing-WQ3pz94o.js +0 -97
- package/dist/held-DmOhszHR.js +0 -17
- package/dist/log-C0MDCfA2.js +0 -62
- package/dist/login-D9jfRO8w.js +0 -17
- package/dist/pull-CO5HlqBe.js +0 -36
- package/dist/push-BIhGDNpL.js +0 -30
- package/dist/push-BgqTddLA.js +0 -22
- package/dist/run-B-YoyB-a.js +0 -100
- package/dist/scan-BU41gcQY.js +0 -4
- package/dist/screenshot-file-XAS0Xy0e.js +0 -16
- package/dist/server-BemmM1FV.js +0 -29
- package/dist/session-4aITGsF1.js +0 -6
- package/dist/setup-m94dpT3t.js +0 -217
- package/dist/spawn-DmmmHIP-.js +0 -71
- package/dist/storage-pR0Wb0d9.js +0 -41
- package/dist/storekit-BMxyYAHj.js +0 -17
- package/dist/storekit-CQnwlpKV.js +0 -47
- package/dist/telemetry-DU56L7Cy.js +0 -56
- package/dist/theme-DUsCh-Vd.js +0 -25
- package/dist/token-BbUeExGJ.js +0 -70
- package/dist/upgrade-CKn88PZD.js +0 -206
- package/dist/upgrade-DfD3-ClG.js +0 -7
- /package/dist/{browser-Bp3yRKlU.js → browser-BVjaf98V.js} +0 -0
- /package/dist/{client-BJQXl62Q.js → client-BwYhzITp.js} +0 -0
- /package/dist/{design-lint-CiFc78aM.js → design-lint-mgO-2SGS.js} +0 -0
- /package/dist/{devtools-ByZ6XYnn.js → devtools-B6Vp6HMy.js} +0 -0
- /package/dist/{input-MDd67UIp.js → input-DOT_2Zvb.js} +0 -0
- /package/dist/{project-NoMtbMyl.js → project-BomArwSj.js} +0 -0
- /package/dist/{reports-HYVp169R.js → reports-hbxsd3Zo.js} +0 -0
- /package/dist/{storage-Bdz5AmqS.d.ts → storage-Bh3wT1Rn.d.ts} +0 -0
- /package/dist/{timing-Ca0TXY-A.js → timing-BKEEIBij.js} +0 -0
- /package/dist/{ui-D_qf3Gvw.js → ui-hFgji1e8.js} +0 -0
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
# Set up app to web
|
|
2
|
+
|
|
3
|
+
The playbook for "set up an app-to-web flow" or "an app-to-web experiment".
|
|
4
|
+
Do every step; each ends with how to tell it worked. The recommendations are
|
|
5
|
+
today's (November 2026) and may change. The `superwall-framework` skill
|
|
6
|
+
covers everything about writing the paywall; this file only adds what
|
|
7
|
+
teleport needs.
|
|
8
|
+
|
|
9
|
+
## Checklist
|
|
10
|
+
|
|
11
|
+
- [ ] 1. Prerequisites hold (SDK, web paywall domain, Stripe, app links)
|
|
12
|
+
- [ ] 2. Products: Stripe products for the web, a store product for each fallback
|
|
13
|
+
- [ ] 3. `config.ts`: `teleport.route`, `fallbacks`, direct Apple Pay with prepaid cards blocked
|
|
14
|
+
- [ ] 4. The Apple Pay gate on the push that reaches `teleport.route`
|
|
15
|
+
- [ ] 5. The teleport route sells Stripe on the web and the store in the app
|
|
16
|
+
- [ ] 6. Prepaid cards blocked in Stripe Radar too
|
|
17
|
+
- [ ] 7. Pushed, verified on an iPhone, attached to a campaign
|
|
18
|
+
|
|
19
|
+
## 1. Prerequisites
|
|
20
|
+
|
|
21
|
+
- **SuperwallKit 4.18.0 or later** in the iOS app. On an older SDK, and on
|
|
22
|
+
Android, teleport doesn't run: the route opens in the app and a Stripe
|
|
23
|
+
purchase goes to Superwall's hosted checkout. Read the version from the
|
|
24
|
+
app's package manager, never assume it.
|
|
25
|
+
- **A web paywall domain and Stripe connected** on the Superwall app the
|
|
26
|
+
paywall is pushed to: the teleport page opens on that domain, and Stripe
|
|
27
|
+
takes the payment. Both are dashboard settings; when either is missing,
|
|
28
|
+
say so and stop, the user sets them up.
|
|
29
|
+
- **A way back to the app:** its universal link (associated domains), its
|
|
30
|
+
URL scheme, or both. The framework picks the link; `no_app` from
|
|
31
|
+
`returnToApp()` means neither is set.
|
|
32
|
+
|
|
33
|
+
## 2. Products
|
|
34
|
+
|
|
35
|
+
Stripe products (`{environment}:{priceId}:{offer}`, such as
|
|
36
|
+
`live:price_123:7days-free`) are what the web page sells. Give each one a
|
|
37
|
+
store product to fall back to in the app. Never hardcode a price: the stores
|
|
38
|
+
price them at runtime. Create what's missing with `superwall products
|
|
39
|
+
create` (the `superwall-framework` skill's `references/cli.md`); list first.
|
|
40
|
+
|
|
41
|
+
## 3. `config.ts`
|
|
42
|
+
|
|
43
|
+
```ts
|
|
44
|
+
import { definePaywall } from "superwall/config";
|
|
45
|
+
|
|
46
|
+
export default definePaywall({
|
|
47
|
+
name: "Web checkout",
|
|
48
|
+
teleport: {
|
|
49
|
+
route: "plan", // the web half opens here; prepared, warmed and pre-rendered
|
|
50
|
+
fallbacks: { monthly: "annual" }, // "Continue In-App Instead" on the teleport screen
|
|
51
|
+
},
|
|
52
|
+
checkout: { mode: "applePay", prepaidCards: "block" },
|
|
53
|
+
products: { monthly: "live:price_MONTHLY:7days-free", annual: "pro_5999_year" },
|
|
54
|
+
});
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
- `route` is required by this playbook even though the type makes it
|
|
58
|
+
optional: it is what makes the browser open at once.
|
|
59
|
+
- `checkout` only applies to the web half here: inside the iOS app a
|
|
60
|
+
purchase never uses it. `"applePay"` is direct Apple Pay: Apple's sheet
|
|
61
|
+
opens on the tap, and Stripe's card sheet is only the fallback where
|
|
62
|
+
Apple Pay can't open. Always use it on a teleport paywall; `"sheet"`
|
|
63
|
+
(Stripe's embedded checkout) makes every shopper start from a card form.
|
|
64
|
+
A teleport page left without `checkout` uses `"applePay"` too, but write
|
|
65
|
+
it so `prepaidCards` has a place.
|
|
66
|
+
- **Stripe Managed Payments:** direct Apple Pay is not available with it.
|
|
67
|
+
A Managed Payments checkout session comes back as Stripe's embedded
|
|
68
|
+
checkout, so `useApplePay(product).product` reads `session_unsupported`
|
|
69
|
+
and the tap opens the card sheet. Ask the user whether their Stripe
|
|
70
|
+
account uses Managed Payments; when it does, recommend direct Apple Pay
|
|
71
|
+
and let them choose `checkout: { mode: "applePay", managedPayments:
|
|
72
|
+
false, prepaidCards: "block" }` for this paywall (Stripe stops acting as
|
|
73
|
+
merchant of record on it). Their call, not yours.
|
|
74
|
+
- Leave `completion` (`"confirmation"`) and `introductoryOfferEligibility`
|
|
75
|
+
(`"automatic"`) at their defaults unless the user is testing them
|
|
76
|
+
([experiments.md](experiments.md)).
|
|
77
|
+
|
|
78
|
+
## 4. The Apple Pay gate
|
|
79
|
+
|
|
80
|
+
The push that reaches `teleport.route` decides whether the shopper goes to
|
|
81
|
+
the web:
|
|
82
|
+
|
|
83
|
+
```tsx
|
|
84
|
+
const applePay = useApplePay();
|
|
85
|
+
router.push("plan", { teleport: applePay.available });
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
`available` is Apple's own card check
|
|
89
|
+
(`ApplePaySession.canMakePaymentsWithActiveCard`), the same in the iOS
|
|
90
|
+
app's web view as in a browser; on Android it is `false`
|
|
91
|
+
(`unsupported_browser`), where teleport doesn't run anyway. The answer is
|
|
92
|
+
asked when the paywall opens and cached for the page; an error or a timeout
|
|
93
|
+
is asked again. A tap that must wait for the answer uses
|
|
94
|
+
`const { available } = await checkApplePay()` instead.
|
|
95
|
+
|
|
96
|
+
Verify: in the studio (Chrome) `useApplePay()` reads `false,
|
|
97
|
+
unsupported_browser`, so the push stays in the app. That is expected; the
|
|
98
|
+
teleport itself only runs on an iPhone (step 7).
|
|
99
|
+
|
|
100
|
+
## 5. The teleport route
|
|
101
|
+
|
|
102
|
+
The route runs in two places: on the web page after a teleport, and in the
|
|
103
|
+
app for shoppers without Apple Pay. Branch on `useDevice().host`:
|
|
104
|
+
|
|
105
|
+
- `"ios-sdk"` or `"android-sdk"`: sell the store product. A Stripe
|
|
106
|
+
`purchase()` in the iOS app would teleport again, and the Android app
|
|
107
|
+
can't teleport, so it would open hosted checkout instead.
|
|
108
|
+
- anything else (`"web-teleport"` on the teleport page): sell the Stripe
|
|
109
|
+
product, preselecting `useTeleport().productReference` when the app
|
|
110
|
+
passed one.
|
|
111
|
+
|
|
112
|
+
Keep the first render of the route to what the pre-render knows (locale,
|
|
113
|
+
products and prices, trial, `productReference`); the `superwall-framework`
|
|
114
|
+
skill's teleport rule lists the details.
|
|
115
|
+
|
|
116
|
+
## 6. Prepaid cards in Stripe
|
|
117
|
+
|
|
118
|
+
`prepaidCards: "block"` refuses prepaid cards on Stripe's card sheet and
|
|
119
|
+
hosted checkout. An Apple Pay payment can't be filtered by card type from
|
|
120
|
+
the paywall, so also ask the user to add a rule in the Stripe dashboard
|
|
121
|
+
(Radar → Rules): `Block if :card_funding: = 'prepaid'`, and to check it
|
|
122
|
+
in test mode. That is a person's step; list it in the hand-over.
|
|
123
|
+
|
|
124
|
+
## 7. Push, verify, attach
|
|
125
|
+
|
|
126
|
+
1. `superwall push`, then fix every pre-render warning it prints for the
|
|
127
|
+
teleport route (the page would render in the browser instead).
|
|
128
|
+
2. On an iPhone with a card in Wallet, open the paywall from the app (the
|
|
129
|
+
SDK's debugger, or its placement), tap through to `plan`: the browser
|
|
130
|
+
opens on the plan, Apple Pay pays, "You're all set", Return to App, and
|
|
131
|
+
the app is unlocked.
|
|
132
|
+
3. On an iPhone or simulator with an empty Wallet, the same tap opens
|
|
133
|
+
`plan` in the app with the store product.
|
|
134
|
+
4. On the web page, the pay button opens Apple's sheet straight away, not
|
|
135
|
+
a card form. A card form means `"sheet"` mode or Managed Payments
|
|
136
|
+
(step 3).
|
|
137
|
+
5. In the browser, cancel the payment and use Continue In-App Instead on
|
|
138
|
+
the teleport screen: the store sheet opens for the fallback.
|
|
139
|
+
6. `superwall promote` (or `publish`), then attach the paywall to its
|
|
140
|
+
campaign (the `superwall` skill's dashboard workflow). For an
|
|
141
|
+
experiment, each variant is its own paywall: see
|
|
142
|
+
[experiments.md](experiments.md#ab-tests-one-paywall-per-variant).
|
|
143
|
+
|
|
144
|
+
## Pitfalls
|
|
145
|
+
|
|
146
|
+
- Teleporting a route other than `teleport.route` with
|
|
147
|
+
`router.push(route, { teleport: true })`: it opens cold. Make it the
|
|
148
|
+
route, or call `useTeleport().prefetch(route)` when it must stay
|
|
149
|
+
another one.
|
|
150
|
+
- Reading `useApplePay()?.available`: it is always defined; read it
|
|
151
|
+
without `?.`. `useVariables().device.isApplePayAvailable` is deprecated
|
|
152
|
+
and always `true` in the app.
|
|
153
|
+
- Answers kept in component state are lost on the web: keep what the web
|
|
154
|
+
half needs in `useQueryState`, which the teleport carries along.
|
|
155
|
+
- Returning to the app with `openDeepLink` or a hand-built link: use
|
|
156
|
+
`useTeleport().returnToApp()`, or `close()` / `router.back()` on the
|
|
157
|
+
first web route.
|
package/dist/tools.d.ts
CHANGED