@superwall/cli 1.6.1 → 1.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/README.md +116 -3
- package/dist/{actions-BdZ-7BJd.js → actions-B7ym3oVS.js} +2 -2
- package/dist/{api-FjrCPu6r.js → api-CZzirVMj.js} +8 -8
- package/dist/{app-YeJj35Ia.js → app-DH6U8yuI.js} +11 -10
- package/dist/{asa-4nk7HHy8.js → asa-C-sQzPPn.js} +10 -10
- package/dist/{asc-2TZOQuK1.js → asc-1ZBJ6DwS.js} +282 -43
- package/dist/asc-Bf7zBbyS.js +65 -0
- package/dist/{asc-products-1e1DoGeL.js → asc-products-9JXtDxI4.js} +2 -35
- package/dist/{auth-QUYfKdwk.js → auth-YRhlV3DE.js} +11 -10
- package/dist/auth.js +2 -2
- package/dist/{billing-BK7bpv1t.js → billing-CCYHdApx.js} +1 -1
- package/dist/{bind-Ch4VR2EY.js → bind-YrJvuRF9.js} +3 -3
- package/dist/build-DLoCW5Ri.js +87 -0
- package/dist/bundle-id-CKxl_026.js +121 -0
- package/dist/{command-BJ_6850A.js → command-CMIz81Da.js} +5 -5
- package/dist/{create-vSQxQlEP.js → create-pkANt1Gs.js} +22 -21
- package/dist/dev-DZy6pOnB.js +22 -0
- package/dist/{dev-DEss5dwo.js → dev-DmB3XqaJ.js} +16 -8
- package/dist/{doctor-BYTfekBr.js → doctor-H-hf-Yww.js} +10 -10
- package/dist/{drivers-DGml3OlF.js → drivers-Qx9LxmRN.js} +2 -2
- package/dist/entry.js +453 -43
- package/dist/{existing-DgSo639M.js → existing-AVEfZu2A.js} +2 -2
- package/dist/feedback-CKf-rpBW.js +152 -0
- package/dist/{hosted-DqGp6oV2.js → hosted-CXe9TrWx.js} +2 -2
- package/dist/{integrate-Cl9eKHoF.js → integrate-brmhPG-S.js} +23 -22
- package/dist/{login-DS3MPeW2.js → login-Do4wFuLv.js} +31 -16
- package/dist/{migrate-WiTO71PE.js → migrate-C9ERDR6y.js} +24 -23
- package/dist/notification-url-DuKF2659.js +1273 -0
- package/dist/{open-studio-CbMUL5Va.js → open-studio-DOw-6ydc.js} +17 -14
- package/dist/{org-CV8c849b.js → org-sj7uyvp-.js} +2 -2
- package/dist/{output-XKuoEEjP.js → output-C4o2gJ1K.js} +12 -2
- package/dist/{pipeline-J9-nENTS.js → pipeline-BqzqZhX1.js} +10 -495
- package/dist/{print-skill-BOGm5Szi.js → print-skill-ZojRSybs.js} +7 -7
- package/dist/{promote-Ci085QxU.js → promote-BG8X4Nv_.js} +17 -16
- package/dist/publish-sxLh-G4G.js +35 -0
- package/dist/push-bQ6Vxtg8.js +35 -0
- package/dist/{query-BZStoGLM.js → query-_FbybaH-.js} +9 -9
- package/dist/{resource-ClLHSXi6.js → resource-CGIwSd29.js} +17 -177
- package/dist/revenue-provider-ebsRINY8.js +100 -0
- package/dist/{run-CiaWn78U.js → run-DsVZ5snL.js} +2 -2
- package/dist/{scan-DEgX5HxV.js → scan-zKsddO72.js} +1 -1
- package/dist/scope-BvzD-kO4.js +223 -0
- package/dist/selection-CxZoX4NT.js +496 -0
- package/dist/setup-Bxj22rYi.js +189 -0
- package/dist/skills/superwall-framework/SKILL.md +109 -36
- package/dist/skills/superwall-framework/references/cli.md +45 -5
- package/dist/skills/superwall-framework/references/mobile-design.md +60 -181
- package/dist/{skills-DsBAVRTE.js → skills-DPzlnfCK.js} +78 -9
- package/dist/{skills-DjPCmUMU.js → skills-D_R-lEsK.js} +8 -8
- package/dist/{spinner-DFctF_Jw.js → spinner-TWa0hia6.js} +1 -1
- package/dist/{telemetry-EzV7cA7s.js → telemetry-DeA1mvnT.js} +1 -1
- package/dist/{token-r5g876aI.js → token-C0it-Xh7.js} +1 -1
- package/dist/{ui-4gLyfrgl.js → ui-Dy0b-9L8.js} +4 -3
- package/dist/{update-Cz3Q3MFj.js → update-B2fWIc4q.js} +2 -2
- package/dist/{upgrade-BA_4sdnh.js → upgrade-BmzkTKrh.js} +6 -6
- package/package.json +2 -2
- package/dist/dev-B9qmPH1W.js +0 -21
- package/dist/feedback-4LsBpZZx.js +0 -73
- package/dist/publish--TV-j8Zd.js +0 -34
- package/dist/push-CpGetsJF.js +0 -34
- package/dist/skills/superwall-framework/references/responsive.md +0 -162
- /package/dist/{api-output-CEhN-U_N.js → api-output-aJNw7Syy.js} +0 -0
- /package/dist/{params-BxgTuCzr.js → params-l3CrvRtR.js} +0 -0
- /package/dist/{reports-C0xHCLnt.js → reports-CfJqoava.js} +0 -0
- /package/dist/{storekit-Dlpbq5Wv.js → storekit-Cj9Cpjcz.js} +0 -0
package/README.md
CHANGED
|
@@ -26,7 +26,9 @@ package installs it for you, along with the framework and both the
|
|
|
26
26
|
package; everything below is what you get.
|
|
27
27
|
|
|
28
28
|
`superwall login` opens your browser once and every command shares that
|
|
29
|
-
session.
|
|
29
|
+
session. Where it can't open one (a server, or over SSH), it says so: open the
|
|
30
|
+
URL it prints on any device and approve the code there. In CI, log in without
|
|
31
|
+
a browser: `superwall login --api-key <key>`.
|
|
30
32
|
If your account belongs to more than one organization, pick one with
|
|
31
33
|
`superwall orgs use` (you'll otherwise be asked the first time it matters).
|
|
32
34
|
Upgrade any time with `superwall upgrade` - the CLI also tells you when a new
|
|
@@ -190,6 +192,12 @@ device, user and eligibility, and asks you for every purchase, restore,
|
|
|
190
192
|
permission and callback outcome. Product data is read from Superwall, never
|
|
191
193
|
invented, and the same build runs unchanged inside a real SDK webview.
|
|
192
194
|
|
|
195
|
+
### Build
|
|
196
|
+
|
|
197
|
+
`superwall build` writes the same single-file HTML document a push would
|
|
198
|
+
version — `superwall/.superwall/build/<kind>/<id>/[<platform>/]index.html` —
|
|
199
|
+
and stops there, no login needed. `--id`, `--platform`, `--out`, `--json`.
|
|
200
|
+
|
|
193
201
|
### Push, promote, publish
|
|
194
202
|
|
|
195
203
|
Git semantics on purpose: **push saves, promote ships.** Every push builds
|
|
@@ -226,6 +234,26 @@ superwall bootstrap # the whole account tree at a glance
|
|
|
226
234
|
`--project <id>` / `--app <id>` to scope when you have more than one. Run
|
|
227
235
|
`superwall <command> --help` for every action and flag.
|
|
228
236
|
|
|
237
|
+
An app's bundle ID (package name on Android) decides which builds the SDK
|
|
238
|
+
treats as that app; any other build runs in test mode. Read it, and the IDs
|
|
239
|
+
the app's SDK reported in the last 30 days, then save one:
|
|
240
|
+
|
|
241
|
+
```bash
|
|
242
|
+
superwall apps bundle-id --app <id> # what is saved, and what the SDK reported
|
|
243
|
+
superwall apps bundle-id com.acme.app --app <id> # save it
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
When other IDs had production devices that the new one wouldn't cover, it
|
|
247
|
+
says how many would run in test mode and asks first (`--yes` outside a
|
|
248
|
+
terminal). An ID that is already saved is only replaced with `--replace`.
|
|
249
|
+
|
|
250
|
+
`setup apple`, `asc keys create purchase_key` and `asc keys set purchase_key`
|
|
251
|
+
keep the In-App Purchase key and the app on one bundle ID. An app with none
|
|
252
|
+
gets the Apple app's (or the one `--bundle-id` names) saved with the key, both
|
|
253
|
+
or neither, and they say so and how many reported builds would run in test
|
|
254
|
+
mode. An app with a different bundle ID stops before anything is created or
|
|
255
|
+
saved, and points at `apps bundle-id <id> --replace`.
|
|
256
|
+
|
|
229
257
|
## Query your data
|
|
230
258
|
|
|
231
259
|
Run SQL directly against your organization's ClickHouse analytics data:
|
|
@@ -258,12 +286,97 @@ params become query parameters.
|
|
|
258
286
|
## App Store Connect
|
|
259
287
|
|
|
260
288
|
The **entire** App Store Connect API, proxied and signed by Superwall — no
|
|
261
|
-
`.p8` file or JWT to manage locally. Connect
|
|
289
|
+
`.p8` file or JWT to manage locally. Connect an app in one command:
|
|
262
290
|
|
|
263
291
|
```bash
|
|
292
|
+
superwall setup apple
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
It signs you in to Apple, creates the App Store Connect API key and the In-App
|
|
296
|
+
Purchase key the app doesn't have yet, saves them on the app, and points the
|
|
297
|
+
app's App Store Server Notifications at Superwall. Your Apple password goes from
|
|
298
|
+
your computer straight to Apple; Superwall never receives it and it is not
|
|
299
|
+
saved. The Apple Account must be an Admin or the Account Holder. It never
|
|
300
|
+
creates a second key of a kind the app already has, never replaces a server
|
|
301
|
+
notification URL that another server holds (it reports it and exits non-zero),
|
|
302
|
+
and never changes the app's revenue provider.
|
|
303
|
+
|
|
304
|
+
In a terminal it asks for your Apple Account email, your password (masked) and
|
|
305
|
+
the verification code Apple sends. Type `sms` at the code prompt, or pass
|
|
306
|
+
`--sms`, to get the code by text. Pass `--team <id|name>` when the account is
|
|
307
|
+
on several teams, `--bundle-id <id>` to create the Superwall app from an App
|
|
308
|
+
Store Connect app, and `--dry-run` to sign in and check key access without
|
|
309
|
+
changing anything.
|
|
310
|
+
|
|
311
|
+
A coding agent can run it for you if you want it to. You decide that by putting
|
|
312
|
+
the password where the agent's shell can read it, as `SUPERWALL_APPLE_PASSWORD`;
|
|
313
|
+
never paste it into a chat. Without a prompt the command runs in two steps,
|
|
314
|
+
because Apple sends the code after the sign-in starts:
|
|
315
|
+
|
|
316
|
+
```bash
|
|
317
|
+
superwall setup apple --apple-id you@example.com --app <id> --no-interactive # Apple sends you a code
|
|
318
|
+
superwall setup apple --code 123456 --app <id> --no-interactive # same flags, within 10 minutes
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
The first run exits non-zero saying a code is required; give the agent the code
|
|
322
|
+
and it runs the second. Only Apple's pre-verification cookies are kept between
|
|
323
|
+
the two runs, in `~/.superwall/apple-sign-in.json`, for 10 minutes.
|
|
324
|
+
`--apple-password` exists too, but it lands in shell history and the process
|
|
325
|
+
list.
|
|
326
|
+
|
|
327
|
+
Each step is also its own command, so you or an agent can do one thing at a
|
|
328
|
+
time:
|
|
329
|
+
|
|
330
|
+
```bash
|
|
331
|
+
superwall asc keys list --app <id> # which of the two keys the app has
|
|
332
|
+
superwall asc keys import --app <id> # reuse a key your organization already has
|
|
333
|
+
superwall asc keys create api_key --app <id> # sign in to Apple and create just this key
|
|
334
|
+
superwall asc keys create purchase_key --app <id>
|
|
335
|
+
superwall asc notification-url --app <id> # this app's Superwall URL
|
|
336
|
+
superwall asc notification-url check --app <id> # what Apple has, and whose it is
|
|
337
|
+
superwall asc notification-url set --app <id> # set it where Apple has none
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
`asc keys import` saves a key only when Apple confirms it for the app's bundle
|
|
341
|
+
ID. `asc keys create` does nothing when the app already has that key; pass
|
|
342
|
+
`--replace` to create another. `asc keys sources` and `asc keys copy <kind>
|
|
343
|
+
--from <app id>` copy one named key from another of your apps, and `asc keys rm
|
|
344
|
+
<kind> --app <id>` removes one from an app. `superwall asc --help` says what
|
|
345
|
+
each command changes, what it never does, and its exit codes.
|
|
346
|
+
|
|
347
|
+
`asc notification-url check` says for production and sandbox whose URL Apple
|
|
348
|
+
has: this app's, another Superwall app's (named when you can read that app),
|
|
349
|
+
someone else's, or none. `asc notification-url set` never replaces a URL
|
|
350
|
+
another server holds. If RevenueCat or your own server receives Apple's
|
|
351
|
+
notifications today, keep it there and have it forward them to the URL
|
|
352
|
+
`asc notification-url` prints. Both work with a `superwall login` session or
|
|
353
|
+
an API key.
|
|
354
|
+
|
|
355
|
+
Receiving Apple's notifications and choosing which revenue source your
|
|
356
|
+
dashboard counts are separate decisions. The second one is the revenue
|
|
357
|
+
provider:
|
|
358
|
+
|
|
359
|
+
```bash
|
|
360
|
+
superwall revenue-provider --app <id> # what is counted, and what each source sent
|
|
361
|
+
superwall revenue-provider set open_revenue --app <id> # count the store's own events
|
|
362
|
+
superwall revenue-provider set revenue_cat --app <id> # count RevenueCat's events
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
A change asks first in a terminal and needs `--yes` outside one.
|
|
366
|
+
|
|
367
|
+
Already have a key file? Save it on an app, or on your organization for the
|
|
368
|
+
signed proxy:
|
|
369
|
+
|
|
370
|
+
```bash
|
|
371
|
+
superwall asc keys set api_key --app <id> --key-id <id> --issuer <id> --key-file AuthKey.p8
|
|
264
372
|
superwall asc keys set --key-id <id> --issuer <id> --key-file AuthKey.p8
|
|
265
373
|
```
|
|
266
374
|
|
|
375
|
+
Saving an API key on an app also gives the organization a key for that Apple
|
|
376
|
+
team when it has none. `asc keys set --team <team id>` replaces the
|
|
377
|
+
organization's key for a team, and is refused unless Apple confirms the new key
|
|
378
|
+
belongs to the same team.
|
|
379
|
+
|
|
267
380
|
Then it's the raw ASC API with the sharp edges filed off, because the CLI is
|
|
268
381
|
**schema-aware**: it keeps a copy of Apple's own OpenAPI spec (fetched on first
|
|
269
382
|
use, refreshed in the background) and knows every endpoint, field, and enum.
|
|
@@ -371,7 +484,7 @@ packages/cli/
|
|
|
371
484
|
│ │ ├── account/ login, whoami, orgs, doctor, feedback, skills, upgrade
|
|
372
485
|
│ │ ├── resource/ apps, products, entitlements, campaigns, paywalls, bootstrap
|
|
373
486
|
│ │ ├── workflow/ integrate, migrate, review
|
|
374
|
-
│ │ ├── platform/ get/post/patch/delete, query, asc, asc keys
|
|
487
|
+
│ │ ├── platform/ get/post/patch/delete, query, asc, asc keys, asc notification-url, setup apple, revenue-provider
|
|
375
488
|
│ │ └── paywalls/ create, dev, push, promote, publish
|
|
376
489
|
│ ├── core/ api client, auth, project detection, paywall
|
|
377
490
|
│ │ binding + lock, agent runners, telemetry, skills sync
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as loadBundledSkill } from "./skills-
|
|
1
|
+
import { g as Integration } from "./output-C4o2gJ1K.js";
|
|
2
|
+
import { i as loadBundledSkill } from "./skills-DPzlnfCK.js";
|
|
3
3
|
|
|
4
4
|
//#region src/core/agent/actions.ts
|
|
5
5
|
/** Skill reference file per framework, so an agent only sees its own platform's docs. */
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import "./output-
|
|
2
|
-
import "./telemetry-
|
|
3
|
-
import "./update-
|
|
4
|
-
import "./token-
|
|
5
|
-
import { t as defineCommand } from "./command-
|
|
6
|
-
import "./ui-
|
|
1
|
+
import "./output-C4o2gJ1K.js";
|
|
2
|
+
import "./telemetry-DeA1mvnT.js";
|
|
3
|
+
import "./update-B2fWIc4q.js";
|
|
4
|
+
import "./token-C0it-Xh7.js";
|
|
5
|
+
import { t as defineCommand } from "./command-CMIz81Da.js";
|
|
6
|
+
import "./ui-Dy0b-9L8.js";
|
|
7
7
|
import { E as titleCase, T as rowName, b as platformLabel, g as listResource, h as listProjects, m as listOrganizations } from "./resources-Bf9O1JNM.js";
|
|
8
|
-
import { t as parseParams } from "./params-
|
|
9
|
-
import { n as emitJson, t as apiCall } from "./api-output-
|
|
8
|
+
import { t as parseParams } from "./params-l3CrvRtR.js";
|
|
9
|
+
import { n as emitJson, t as apiCall } from "./api-output-aJNw7Syy.js";
|
|
10
10
|
import pc from "picocolors";
|
|
11
11
|
|
|
12
12
|
//#region src/commands/platform/api.ts
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { i as loadSession, r as clearSession } from "./token-
|
|
2
|
-
import { a as superwallApi } from "./command-
|
|
3
|
-
import { n as ui } from "./ui-
|
|
4
|
-
import {
|
|
5
|
-
import { i as SUPPORTED_LABEL, t as scanProject } from "./scan-
|
|
6
|
-
import { r as getHostedStatus } from "./hosted-
|
|
7
|
-
import { t as withSpinner } from "./spinner-
|
|
8
|
-
import { n as resolveAppBinding, r as resolveScopeFromKey, t as platformForIntegration } from "./bind-
|
|
9
|
-
import { t as ACTIONS } from "./actions-
|
|
1
|
+
import { i as loadSession, r as clearSession } from "./token-C0it-Xh7.js";
|
|
2
|
+
import { a as superwallApi } from "./command-CMIz81Da.js";
|
|
3
|
+
import { n as ui } from "./ui-Dy0b-9L8.js";
|
|
4
|
+
import { a as onboardingHooks, n as performLogin, r as BROWSER_UNAVAILABLE } from "./login-Do4wFuLv.js";
|
|
5
|
+
import { i as SUPPORTED_LABEL, t as scanProject } from "./scan-zKsddO72.js";
|
|
6
|
+
import { r as getHostedStatus } from "./hosted-CXe9TrWx.js";
|
|
7
|
+
import { t as withSpinner } from "./spinner-TWa0hia6.js";
|
|
8
|
+
import { n as resolveAppBinding, r as resolveScopeFromKey, t as platformForIntegration } from "./bind-YrJvuRF9.js";
|
|
9
|
+
import { t as ACTIONS } from "./actions-B7ym3oVS.js";
|
|
10
10
|
|
|
11
11
|
//#region src/commands/workflow/integrate/app.ts
|
|
12
12
|
async function performLoginWithUi(app, onProvisioned) {
|
|
@@ -14,8 +14,9 @@ async function performLoginWithUi(app, onProvisioned) {
|
|
|
14
14
|
const hooks = onboardingHooks(app);
|
|
15
15
|
try {
|
|
16
16
|
const session = await performLogin({
|
|
17
|
-
onVerify: ({ url, userCode }) => {
|
|
17
|
+
onVerify: ({ url, userCode, browserOpened }) => {
|
|
18
18
|
ui.info(`Approve this login in your browser · code \`${userCode}\`\n${url}`);
|
|
19
|
+
if (!browserOpened) ui.warn(BROWSER_UNAVAILABLE);
|
|
19
20
|
spin.start("Waiting for you to approve in the browser");
|
|
20
21
|
},
|
|
21
22
|
onStatus: (message) => spin.message(message),
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import "./output-
|
|
2
|
-
import "./telemetry-
|
|
3
|
-
import "./update-
|
|
4
|
-
import "./token-
|
|
5
|
-
import { r as ApiError, t as defineCommand } from "./command-
|
|
6
|
-
import "./ui-
|
|
7
|
-
import "./spinner-
|
|
1
|
+
import "./output-C4o2gJ1K.js";
|
|
2
|
+
import "./telemetry-DeA1mvnT.js";
|
|
3
|
+
import "./update-B2fWIc4q.js";
|
|
4
|
+
import "./token-C0it-Xh7.js";
|
|
5
|
+
import { r as ApiError, t as defineCommand } from "./command-CMIz81Da.js";
|
|
6
|
+
import "./ui-Dy0b-9L8.js";
|
|
7
|
+
import "./spinner-TWa0hia6.js";
|
|
8
8
|
import { h as listProjects } from "./resources-Bf9O1JNM.js";
|
|
9
|
-
import { t as requireOrg } from "./org-
|
|
10
|
-
import { t as parseParams } from "./params-
|
|
11
|
-
import { n as emitJson, t as apiCall } from "./api-output-
|
|
9
|
+
import { t as requireOrg } from "./org-sj7uyvp-.js";
|
|
10
|
+
import { t as parseParams } from "./params-l3CrvRtR.js";
|
|
11
|
+
import { n as emitJson, t as apiCall } from "./api-output-aJNw7Syy.js";
|
|
12
12
|
import { readFileSync } from "node:fs";
|
|
13
13
|
|
|
14
14
|
//#region src/core/api/asa.ts
|