@superwall/cli 2.6.0-beta.1 → 2.6.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.
Files changed (147) hide show
  1. package/README.md +47 -16
  2. package/dist/{apple-Bmt_iywx.js → apple-D-rfsuDA.js} +17 -19
  3. package/dist/{approve-D2UgqaRx.js → approve-aPc5RoXB.js} +14 -13
  4. package/dist/{assets-B_quADds.js → assets-PyuXe45Y.js} +3 -3
  5. package/dist/auth.d.ts +11 -4
  6. package/dist/auth.js +4 -5
  7. package/dist/base-CAU0hWoI.js +82 -0
  8. package/dist/{billing-ZIETn0j4.js → billing-Dt6L_l9R.js} +3 -3
  9. package/dist/{build-BWjXurjs.js → build-CY5FnMNY.js} +35 -16
  10. package/dist/config-DOp5oChe.js +377 -0
  11. package/dist/{create-C3uklw-U.js → create-BZL5VH4L.js} +41 -41
  12. package/dist/{create-BCIgjRHn.js → create-D6w3UL0m.js} +9 -9
  13. package/dist/create-DM5Y1Pyk.js +18 -0
  14. package/dist/{doctor-D2Q1EZe8.js → doctor-C9FR0qw3.js} +50 -10
  15. package/dist/entry.js +45 -40
  16. package/dist/{environment-BocmdvZ-.js → environment-sE2wZYdg.js} +1 -1
  17. package/dist/{drivers-BQkO5tHs.js → existing--peXpOZj.js} +305 -8
  18. package/dist/framework-DW5fqjh4.js +65 -0
  19. package/dist/{source-BccdO4aL.js → git-Hf9Wc7Hp.js} +34 -92
  20. package/dist/{held-Bykbwy-m.js → held-CUBCOCGP.js} +8 -8
  21. package/dist/held-DVxvPMSG.js +15 -0
  22. package/dist/{install-dXZZ79Oe.js → install-C5d82gZF.js} +15 -17
  23. package/dist/{integrate-DiSjlOjC.js → integrate-D8J_X1bj.js} +33 -38
  24. package/dist/{login-5sWIKDI2.js → login-C6X7JrhM.js} +8 -9
  25. package/dist/{login-Jp6E6d2e.js → login-DXhm9L0F.js} +3 -3
  26. package/dist/login-et319ESO.js +13 -0
  27. package/dist/{lookup-CWzVfPpq.js → lookup-DqmIbUkv.js} +28 -4
  28. package/dist/{migrate-BKiOUsMY.js → migrate-BYF6hKZ2.js} +66 -45
  29. package/dist/{notification-url-BDBxbwZq.js → notification-url-Bo54nkXv.js} +4 -4
  30. package/dist/{open-DNd49kT-.js → open-xdgXUzaF.js} +2 -2
  31. package/dist/{org-Dud1rF9f.js → org-BD8U3D1_.js} +4 -4
  32. package/dist/{organization-7vJA3uy1.js → organization-D-ZlB3qU.js} +4 -4
  33. package/dist/{orgs-Z0H9WOs1.js → orgs-DQQJ3sw_.js} +1 -2
  34. package/dist/{paths-CzTJVpfi.js → paths-CIlyzF2I.js} +1 -1
  35. package/dist/{playbook-DJ__edOW.js → playbook-ecggWGFi.js} +10 -14
  36. package/dist/{products-Cqq59DBQ.js → products-CJq_iXv5.js} +1 -1
  37. package/dist/{promote-DLtPSvmL.js → promote-QVMLGYlU.js} +27 -28
  38. package/dist/{pull-AoUmaiMK.js → pull-CCXhb2a7.js} +72 -26
  39. package/dist/{pull-D-YuT3e0.js → pull-CrdsfsAl.js} +33 -39
  40. package/dist/pull-h71pL3r_.js +30 -0
  41. package/dist/push-BIq6R8Ro.js +29 -0
  42. package/dist/push-D6pJM_vv.js +21 -0
  43. package/dist/{push-BMblzg_6.js → push-DJMGG7zW.js} +23 -12
  44. package/dist/{push-BrzMFd4Z.js → push-DiMDwGfe.js} +15 -8
  45. package/dist/{registry-DDU10_Ix.js → registry-BSnQXft4.js} +1288 -901
  46. package/dist/registry-YwzTfCNc.js +22 -0
  47. package/dist/{resolve-DpOSDDdr.js → resolve-DO7bPota.js} +52 -6
  48. package/dist/{resources-CptT7HD6.js → resources-XwvXA20E.js} +15 -2
  49. package/dist/{run-r3foWfhV.js → run-B-YvxfRc.js} +15 -17
  50. package/dist/scan-B36wkZmI.js +4 -0
  51. package/dist/{scan-nVQO7JLx.js → scan-ViBhmrB7.js} +1 -1
  52. package/dist/{scope-l1qGLsgz.js → scope-BLLUxbrA.js} +24 -18
  53. package/dist/{scope-ehZ7L1nj.js → scope-Cg1AdAfO.js} +33 -3
  54. package/dist/screenshot-file-Dix2Qynm.js +127 -0
  55. package/dist/{sdk-DEfQttek.js → sdk-BFunw4Hc.js} +1 -1
  56. package/dist/{framework-CLmf4swr.js → selection-C07e_GGY.js} +4 -54
  57. package/dist/{series-D2ZpZ8cx.js → series-B8NJK4yS.js} +1 -1
  58. package/dist/{server-DLARhh1k.js → server-CBtHzl9y.js} +40 -18
  59. package/dist/server-CZwSfzKe.js +33 -0
  60. package/dist/{base-ChTi42M0.js → session-BfVx50iA.js} +8 -83
  61. package/dist/{session-Z0BeaJPf.js → session-BlrwAdGN.js} +1 -1
  62. package/dist/session-Cip4j99n.js +5 -0
  63. package/dist/{migration-Z69tLeHC.js → setup-a4B72xJ8.js} +290 -28
  64. package/dist/skills/superwall/SKILL.md +37 -10
  65. package/dist/skills/superwall/references/api.md +66 -21
  66. package/dist/skills/superwall/references/asa.md +109 -64
  67. package/dist/skills/superwall/references/dashboard-links.md +65 -28
  68. package/dist/skills/superwall/references/data-analytics.md +1 -1
  69. package/dist/skills/superwall/workflows/dashboard/setup.md +15 -5
  70. package/dist/skills/superwall/workflows/integrate/flutter.md +9 -7
  71. package/dist/skills/superwall-artifacts/SKILL.md +7 -2
  72. package/dist/skills/superwall-artifacts/references/cli.md +4 -1
  73. package/dist/skills/superwall-framework/SKILL.md +197 -14
  74. package/dist/skills/superwall-framework/references/cli.md +98 -7
  75. package/dist/skills/superwall-framework/references/examples.md +2 -2
  76. package/dist/skills/superwall-framework/references/migrate-from-editor.md +5 -0
  77. package/dist/skills/superwall-framework/references/migrate-from-native.md +5 -0
  78. package/dist/{skills-421SFEyF.js → skills-BB1uIt8t.js} +139 -9
  79. package/dist/{skills-CdKwaTRS.js → skills-SnxFa2in.js} +8 -12
  80. package/dist/source-DQs6iLtC.js +82 -0
  81. package/dist/{source-push-B4s6r9bB.js → source-push-w7miTr6m.js} +38 -14
  82. package/dist/{spinner-DPdBlZe2.js → spinner-BQp7fQvK.js} +7 -5
  83. package/dist/{starter-0OdVPH4l.js → starter-BlJ_InZJ.js} +16 -6
  84. package/dist/{status-Dsc7d3z2.js → status-DxsIw9zq.js} +9 -11
  85. package/dist/{output-Ggzq5_-t.js → storage-BR6imSqm.js} +40 -1
  86. package/dist/storekit-BqyujKQ_.js +203 -0
  87. package/dist/storekit-ELVCMF0X.js +15 -0
  88. package/dist/{bind-ClFjTt0U.js → theme-Ed0gz6hr.js} +29 -6
  89. package/dist/token-CWQ6tdva.js +100 -0
  90. package/dist/tools-skills/animate-onboarding/SKILL.md +1 -1
  91. package/dist/tools-skills/mobile-design/SKILL.md +1 -1
  92. package/dist/tools-skills/onboarding-questions/SKILL.md +1 -1
  93. package/dist/tools-skills/superwall/SKILL.md +43 -17
  94. package/dist/tools-skills/superwall/references/api.md +74 -24
  95. package/dist/tools-skills/superwall/references/asa.md +109 -64
  96. package/dist/tools-skills/superwall/references/dashboard-links.md +65 -28
  97. package/dist/tools-skills/superwall/references/data-analytics.md +1 -1
  98. package/dist/tools-skills/superwall/workflows/dashboard/playbook.md +4 -3
  99. package/dist/tools-skills/superwall/workflows/dashboard/setup.md +21 -8
  100. package/dist/tools-skills/superwall/workflows/integrate/flutter.md +9 -7
  101. package/dist/tools-skills/superwall/workflows/migrate/adapty.md +4 -3
  102. package/dist/tools-skills/superwall/workflows/migrate/playbook.md +2 -2
  103. package/dist/tools-skills/superwall/workflows/migrate/qonversion.md +4 -3
  104. package/dist/tools-skills/superwall/workflows/migrate/revenuecat.md +4 -3
  105. package/dist/tools-skills/superwall-editor/SKILL.md +2 -3
  106. package/dist/tools.d.ts +6 -1
  107. package/dist/tools.js +1290 -747
  108. package/dist/{try-B8FYkTvQ.js → try-C3HW3hPZ.js} +20 -22
  109. package/dist/{lock-DgSx-p8Y.js → types-Dc9U_4kp.js} +86 -80
  110. package/dist/upgrade-Cw9jVt-r.js +348 -0
  111. package/dist/upgrade-DVsonzDF.js +27 -0
  112. package/package.json +11 -3
  113. package/dist/client-CyrYJzBF.js +0 -180
  114. package/dist/config-CGcG7GOt.js +0 -113
  115. package/dist/create-7HDW3DCl.js +0 -20
  116. package/dist/existing-Cl5x6_5u.js +0 -97
  117. package/dist/held-Chw3BtBV.js +0 -17
  118. package/dist/log-C0MDCfA2.js +0 -62
  119. package/dist/login-DZ8Pipf6.js +0 -17
  120. package/dist/pull-C1xm2zqG.js +0 -36
  121. package/dist/push-B42D8fKf.js +0 -22
  122. package/dist/push-Co5jk6Kr.js +0 -30
  123. package/dist/run-c1O2_8pp.js +0 -100
  124. package/dist/scan-D86kLtM7.js +0 -4
  125. package/dist/screenshot-file-XAS0Xy0e.js +0 -16
  126. package/dist/server-BEcsQaPu.js +0 -29
  127. package/dist/session-Csuaw6RU.js +0 -6
  128. package/dist/setup-C6NFy14d.js +0 -217
  129. package/dist/spawn-DmmmHIP-.js +0 -71
  130. package/dist/storage-DT_wxwJ8.js +0 -41
  131. package/dist/storekit-B9M2raxe.js +0 -47
  132. package/dist/storekit-BWZf-fNE.js +0 -17
  133. package/dist/telemetry-ovPiseFm.js +0 -56
  134. package/dist/theme-DUsCh-Vd.js +0 -25
  135. package/dist/token-Bu3FaRkv.js +0 -70
  136. package/dist/upgrade-B7TmvEPP.js +0 -206
  137. package/dist/upgrade-CAHyrWUL.js +0 -7
  138. /package/dist/{browser-Bp3yRKlU.js → browser-BVjaf98V.js} +0 -0
  139. /package/dist/{client-BJQXl62Q.js → client-BwYhzITp.js} +0 -0
  140. /package/dist/{design-lint-CiFc78aM.js → design-lint-mgO-2SGS.js} +0 -0
  141. /package/dist/{devtools-ByZ6XYnn.js → devtools-B6Vp6HMy.js} +0 -0
  142. /package/dist/{input-MDd67UIp.js → input-DOT_2Zvb.js} +0 -0
  143. /package/dist/{project-NoMtbMyl.js → project-BomArwSj.js} +0 -0
  144. /package/dist/{reports-HYVp169R.js → reports-hbxsd3Zo.js} +0 -0
  145. /package/dist/{storage-Bdz5AmqS.d.ts → storage-Bh3wT1Rn.d.ts} +0 -0
  146. /package/dist/{timing-Ca0TXY-A.js → timing-BKEEIBij.js} +0 -0
  147. /package/dist/{ui-D_qf3Gvw.js → ui-hFgji1e8.js} +0 -0
@@ -26,7 +26,7 @@ superwall products create --identifier <identifier> \
26
26
  --trial-days 7 \ # optional free-trial length
27
27
  --entitlement pro \ # entitlement(s) to grant; repeat --entitlement for more
28
28
  --name "Pro Yearly" \ # optional display name
29
- --project <id> --json
29
+ --app <id> --json # the app the entitlement is on
30
30
  ```
31
31
 
32
32
  Use the **real store product identifiers** (the ones in App Store Connect / Google Play), e.g.
@@ -52,12 +52,16 @@ superwall asc iaps list com.app.bundle --json # one-time / non-renew
52
52
  superwall asc products com.app.bundle --json # everything
53
53
  superwall asc apps --json # list ASC apps if unsure of the id
54
54
 
55
- # create each returned productId, granting your entitlement
56
- superwall products create --identifier com.app.pro.yearly --entitlement pro --project <id> --json
55
+ # create each returned productId with its price, period and trial, granting your entitlement
56
+ superwall products create --identifier com.app.pro.yearly --price 24.99 --period year \
57
+ --trial-days 7 --entitlement pro --app <id> --json
57
58
  ```
58
59
 
59
- Products imported this way carry only the identifier (and reference name); Xcode/StoreKit and
60
- the stores remain the source of truth for pricing.
60
+ Take the price, period and trial from the ASC listing. `--price` is in major units (24.99),
61
+ `--currency` defaults to USD, `--period` is `day`, `week`, `month` or `year`, and
62
+ `--period-count` defaults to 1; leave out `--period` and `--trial-days` for a one-time product.
63
+ A product created without `--price` is left out of the `.storekit` export below, which writes
64
+ what Superwall holds.
61
65
 
62
66
  ### Generate a local `.storekit` file (for Xcode testing without sandbox)
63
67
 
@@ -65,17 +69,26 @@ the stores remain the source of truth for pricing.
65
69
  superwall products storekit --project <id> --out Superwall.storekit --json
66
70
  ```
67
71
 
68
- Seeds product identifiers into a StoreKit configuration file; Xcode refines pricing/types on import.
72
+ Writes each App Store product with its Superwall price, read in its currency's minor units
73
+ (399 USD is 3.99). Auto-renewable subscriptions go in one `Subscriptions` group with their
74
+ period, and their free or paid trial as the introductory offer; one-time products are written
75
+ as NonConsumable. Products of another store (Play, Stripe, custom), with no price, or with no
76
+ identifier are left out and named in a warning. Price one with
77
+ `superwall products update <id> --price '{"amount":<minor units>,"currency":"USD"}'`, where
78
+ `<id>` is its Superwall product id, then export again.
69
79
 
70
80
  ## Entitlements
71
81
 
72
82
  ```bash
73
83
  superwall entitlements list --project <id> --json
74
- superwall entitlements create --identifier pro --project <id> --json
84
+ superwall entitlements create --identifier pro --app <id> --json
75
85
  ```
76
86
 
77
87
  Default to a single coarse `pro` entitlement. Add more only for genuine tiers (e.g. `pro`,
78
- `team`). Products grant entitlements via `--entitlement` at create time.
88
+ `team`). Products grant entitlements via `--entitlement` (id or identifier) at create time.
89
+ Pass the same `--app <id>` to the entitlement and the product: a native product only grants
90
+ entitlements on its own app. CLI 2.2.1 and older take only the numeric id from
91
+ `superwall entitlements list --json`; run `superwall upgrade` once a newer CLI is out.
79
92
 
80
93
  ## Campaigns + placements
81
94
 
@@ -104,15 +104,17 @@ plugins { id 'com.android.application' version '8.4.1' apply false }
104
104
  distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
105
105
  ```
106
106
 
107
- > **Important:** Register Superwall's activities in the `<application>` tag of
108
- > `android/app/src/main/AndroidManifest.xml`, or Android builds/paywalls fail:
107
+ > **Important:** Do not declare `SuperwallPaywallActivity` in the app's
108
+ > `AndroidManifest.xml`. The `superwallkit_flutter` plugin's manifest already
109
+ > declares it, and a second declaration with a different theme fails the
110
+ > manifest merge (`Attribute activity#...SuperwallPaywallActivity@theme ... is
111
+ > also present at [:superwallkit_flutter]`). If the app already has one, remove
112
+ > it, or keep it only with `tools:replace="android:theme"`.
113
+
114
+ Optionally, add the debug activities inside the `<application>` tag of
115
+ `android/app/src/main/AndroidManifest.xml`:
109
116
 
110
117
  ```xml
111
- <activity
112
- android:name="com.superwall.sdk.paywall.view.SuperwallPaywallActivity"
113
- android:theme="@style/Theme.MaterialComponents.DayNight.NoActionBar"
114
- android:configChanges="orientation|screenSize|keyboardHidden">
115
- </activity>
116
118
  <activity android:name="com.superwall.sdk.debug.DebugViewActivity" />
117
119
  <activity android:name="com.superwall.sdk.debug.localizations.SWLocalizationActivity" />
118
120
  <activity android:name="com.superwall.sdk.debug.SWConsoleActivity" />
@@ -119,13 +119,14 @@ Produce: product ids, access-level ids (→ entitlements), and one row per `getP
119
119
  ## 4. Dashboard-side re-creation (CLI)
120
120
 
121
121
  ```bash
122
- superwall entitlements create --identifier premium --project <projectId> --json
123
- superwall products create --identifier com.app.premium_monthly --name "Premium Monthly" --project <projectId> --json
124
- superwall products create --identifier com.app.premium_yearly --name "Premium Yearly" --project <projectId> --json
122
+ superwall entitlements create --identifier premium --app <appId> --json
123
+ superwall products create --identifier com.app.premium_monthly --name "Premium Monthly" --entitlement premium --app <appId> --json
124
+ superwall products create --identifier com.app.premium_yearly --name "Premium Yearly" --entitlement premium --app <appId> --json
125
125
  superwall campaigns create --description "Main paywall" --placement main --project <projectId> --app <appId> --json
126
126
  superwall campaigns placements create <campaignId> --event-name onboarding --project <projectId> --app <appId> --json
127
127
  ```
128
128
 
129
+ 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`.
129
130
  Product ids MUST equal existing App Store / Play SKUs (import from ASC via `superwall asc keys create --help`).
130
131
  Verify with the same explicit ids: `superwall entitlements list --project <projectId> --json`,
131
132
  `superwall products list --project <projectId> --json`, and `superwall campaigns list --project <projectId> --app <appId> --json`.
@@ -69,9 +69,9 @@ Agents always use `--json` and explicit scope:
69
69
  superwall whoami --json
70
70
  superwall apps list --json
71
71
  superwall entitlements list --project <projectId> --json
72
- superwall entitlements create --identifier <id> --project <projectId> --json
72
+ superwall entitlements create --identifier <id> --app <appId> --json
73
73
  superwall products list --project <projectId> --json
74
- superwall products create --identifier <storeId> --project <projectId> --json
74
+ superwall products create --identifier <storeId> --entitlement <id> --app <appId> --json
75
75
  superwall campaigns list --project <projectId> --app <appId> --json
76
76
  superwall campaigns create --description "<description>" --placement <placement> --project <projectId> --app <appId> --json
77
77
  superwall campaigns placements create <campaignId> --event-name <placement> --project <projectId> --app <appId> --json
@@ -116,12 +116,13 @@ Produce: product ids, entitlement/permission ids (→ entitlements), and one row
116
116
  ## 4. Dashboard-side re-creation (CLI)
117
117
 
118
118
  ```bash
119
- superwall entitlements create --identifier premium --project <projectId> --json
120
- superwall products create --identifier com.app.premium_monthly --name "Premium Monthly" --project <projectId> --json
121
- superwall products create --identifier com.app.premium_yearly --name "Premium Yearly" --project <projectId> --json
119
+ superwall entitlements create --identifier premium --app <appId> --json
120
+ superwall products create --identifier com.app.premium_monthly --name "Premium Monthly" --entitlement premium --app <appId> --json
121
+ superwall products create --identifier com.app.premium_yearly --name "Premium Yearly" --entitlement premium --app <appId> --json
122
122
  superwall campaigns create --description "Main paywall" --placement paywall_main --project <projectId> --app <appId> --json
123
123
  ```
124
124
 
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`.
125
126
  Product ids MUST equal existing App Store / Play SKUs (import from ASC via `superwall asc keys create --help`).
126
127
  Verify with the same explicit ids: `superwall entitlements list --project <projectId> --json`,
127
128
  `superwall products list --project <projectId> --json`, and `superwall campaigns list --project <projectId> --app <appId> --json`.
@@ -203,11 +203,12 @@ call the migration complete with dashboard work silently skipped.
203
203
  For each entitlement and product found, use the project/app ids from the account gate:
204
204
 
205
205
  ```bash
206
- superwall entitlements create --identifier pro --project <projectId> --json
207
- superwall products create --identifier com.app.pro_monthly --name "Pro Monthly" --project <projectId> --json
208
- superwall products create --identifier com.app.pro_yearly --name "Pro Yearly" --project <projectId> --json
206
+ superwall entitlements create --identifier pro --app <appId> --json
207
+ superwall products create --identifier com.app.pro_monthly --name "Pro Monthly" --entitlement pro --app <appId> --json
208
+ superwall products create --identifier com.app.pro_yearly --name "Pro Yearly" --entitlement pro --app <appId> --json
209
209
  ```
210
210
 
211
+ 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`.
211
212
  Product ids MUST equal the existing App Store / Play SKUs (import via ASC connection instead of
212
213
  manual create when possible - `superwall asc keys create --help`). Then one campaign with
213
214
  a placement per call site:
@@ -18,9 +18,8 @@ description: LEGACY — drives the browser (visual) paywall editor over a pairin
18
18
  > npx skills add https://github.com/superwall/skills --skill superwall-framework --global --yes --agent claude-code universal --full-depth
19
19
  > ```
20
20
  >
21
- > The framework is in public beta: for now the CLI has its commands only
22
- > while `SUPERWALL_CHANNEL=next` is set (an `Unknown command: create` means
23
- > it is missing; ask the user to set it in their shell rc and relaunch).
21
+ > The framework is in public beta and the CLI has its commands by default
22
+ > (an `Unknown command: create` means an older CLI: ask the user to run `superwall upgrade`).
24
23
  >
25
24
  > **An editor paywall moves over in one command:**
26
25
  >
package/dist/tools.d.ts CHANGED
@@ -1,9 +1,14 @@
1
- import "./storage-Bdz5AmqS.js";
1
+ import "./storage-Bh3wT1Rn.js";
2
2
 
3
3
  //#region src/core/api/client.d.ts
4
4
 
5
5
  interface RequestOptions {
6
6
  headers?: Record<string, string>;
7
+ /**
8
+ * Sending this request twice does what sending it once does. A connection that drops mid-request is
9
+ * then retried, three attempts in all, since nobody can tell whether the API got it.
10
+ */
11
+ idempotent?: boolean;
7
12
  }
8
13
  type SuperwallApi = {
9
14
  readonly org: {