@superwall/cli 2.1.1 → 2.2.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 +12 -1
- package/dist/{apple-BHbX0jbn.js → apple-DaqaI4vD.js} +13 -13
- package/dist/auth.d.ts +1 -1
- package/dist/auth.js +3 -3
- package/dist/{billing-4zhIBFRQ.js → billing-DyKr2kmd.js} +3 -3
- package/dist/{bind-CHLHmxgA.js → bind-BpxebZf4.js} +4 -4
- package/dist/{build-5PQeSnNN.js → build-DzbdRThf.js} +6 -6
- package/dist/{client-BIvOmWPC.js → client-BF9rCULI.js} +3 -3
- package/dist/{create-VK-pNfN7.js → create-B55V99TD.js} +22 -22
- package/dist/create-BYAPuhhf.js +19 -0
- package/dist/{create-BSNIFsnN.js → create-D7AZHYGH.js} +6 -6
- package/dist/{doctor-9JS96QkX.js → doctor-B2mPKiaJ.js} +6 -6
- package/dist/{drivers-BamBJ10Y.js → drivers-DOMky8Ug.js} +3 -3
- package/dist/entry.js +19 -19
- package/dist/{environment-eV7LEnSN.js → environment-DBwo79dy.js} +1 -1
- package/dist/{existing-C8dSYHGk.js → existing-B4VK4BCL.js} +2 -2
- package/dist/held-C9FqvNbn.js +16 -0
- package/dist/{held-BMisHn8F.js → held-DjcZPCwn.js} +6 -6
- package/dist/{integrate-VWtTNPCr.js → integrate-B8oHbvwz.js} +21 -21
- package/dist/{login-BmwG14LC.js → login-B8hgMLhS.js} +1 -1
- package/dist/login-D-a7oS_8.js +16 -0
- package/dist/{login-BimbukE5.js → login-DfhqWY9C.js} +256 -33
- package/dist/{lookup-k9EeOiZr.js → lookup-r8p6H2ZC.js} +2 -2
- package/dist/{migrate-C86h6jeF.js → migrate-DQf2Fosc.js} +21 -21
- package/dist/{notification-url-BVaTgWZ5.js → notification-url-BxPTEmkv.js} +2 -2
- package/dist/{open-0tDCQOXC.js → open-CrEnSL4v.js} +21 -17
- package/dist/{org-DUwdrKPV.js → org-Cc2WGvl1.js} +2 -2
- package/dist/{paths-BCbjCLP5.js → paths-BcNbJfpw.js} +1 -1
- package/dist/{playbook-oov9yV0q.js → playbook-D9J8frkE.js} +10 -10
- package/dist/{promote-DPGPamkE.js → promote-C8T7DCFF.js} +16 -16
- package/dist/{push-Cz4lJ8Qd.js → push-Bzs1l_5C.js} +4 -4
- package/dist/push-snV3SrnH.js +22 -0
- package/dist/{registry-CTczUigi.js → registry-CpxZbmxp.js} +83 -63
- package/dist/{resources-B1qKDVXd.js → resources-Bo6i7wBi.js} +1 -1
- package/dist/{run-DTPsVmFw.js → run-BUp4r8Kk.js} +2 -2
- package/dist/{scan-Bb48xZqB.js → scan-8cxu2fx0.js} +1 -1
- package/dist/scan-nUeXs9a1.js +4 -0
- package/dist/{scope-B6UYGuwn.js → scope-CPG_wWXL.js} +4 -4
- package/dist/{selection-BbNk9r1q.js → selection-CMA4aG4V.js} +3 -3
- package/dist/server-Boqa8jh_.js +22 -0
- package/dist/{server-EYBMKAG1.js → server-Xb3wp-mx.js} +66 -16
- package/dist/{session-xG9E8J2N.js → session-DOZV1TP6.js} +1 -1
- package/dist/session-DtBpdlF-.js +6 -0
- package/dist/{session-Crg9X-FI.js → session-eZeXR9xU.js} +9 -8
- package/dist/skills/animate-onboarding/SKILL.md +1 -1
- package/dist/skills/index.json +18 -18
- package/dist/skills/mobile-design/SKILL.md +1 -1
- package/dist/skills/onboarding-questions/SKILL.md +1 -1
- package/dist/skills/superwall/SKILL.md +102 -17
- package/dist/skills/superwall/references/api.md +13 -2
- package/dist/skills/superwall/references/data-analytics.md +7 -8
- package/dist/skills/superwall/workflows/dashboard/playbook.md +2 -1
- package/dist/skills/superwall/workflows/dashboard/setup.md +3 -1
- package/dist/skills/superwall/workflows/integrate/playbook.md +4 -2
- package/dist/skills/superwall/workflows/migrate/adapty.md +3 -3
- package/dist/skills/superwall/workflows/migrate/playbook.md +2 -1
- package/dist/skills/superwall/workflows/migrate/qonversion.md +3 -3
- package/dist/skills/superwall/workflows/migrate/revenuecat.md +4 -4
- package/dist/skills/superwall-editor/SKILL.md +53 -1
- package/dist/skills/superwall-framework/SKILL.md +10 -5
- package/dist/skills/superwall-framework/references/migrate-from-editor.md +3 -2
- package/dist/skills/superwall-framework/references/mobile-design.md +1 -1
- package/dist/{skills-Dg3k6TRC.js → skills-BI19OGlS.js} +8 -8
- package/dist/{skills-BdMKE2uO.js → skills-DDf10ufO.js} +4 -4
- package/dist/{spinner-Ba3XhlMb.js → spinner-BClMQGGN.js} +3 -3
- package/dist/{storage-CerJ5KLP.d.ts → storage-BbJF7z3l.d.ts} +1 -0
- package/dist/{storage-DIkYajce.js → storage-Po9E-CHL.js} +12 -2
- package/dist/storekit-BU6Eq_UO.js +16 -0
- package/dist/{storekit-C2UzIIMs.js → storekit-Cbn9DBLA.js} +3 -3
- package/dist/{telemetry-CVP8O6Y3.js → telemetry-s6dag6tb.js} +1 -1
- package/dist/{token-IWv2httm.js → token-CPplNMVa.js} +1 -1
- 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 +80 -8
- package/dist/tools-skills/superwall/references/api.md +116 -24
- package/dist/tools-skills/superwall/references/apple-setup.md +316 -0
- package/dist/tools-skills/superwall/references/asc.md +74 -38
- package/dist/tools-skills/superwall/references/data-analytics.md +62 -29
- package/dist/tools-skills/superwall/workflows/dashboard/playbook.md +3 -3
- package/dist/tools-skills/superwall/workflows/dashboard/setup.md +8 -8
- package/dist/tools-skills/superwall/workflows/migrate/adapty.md +6 -6
- package/dist/tools-skills/superwall/workflows/migrate/playbook.md +4 -4
- package/dist/tools-skills/superwall/workflows/migrate/qonversion.md +5 -5
- package/dist/tools-skills/superwall/workflows/migrate/revenuecat.md +6 -6
- package/dist/tools-skills/superwall/workflows/placements/android.md +2 -2
- package/dist/tools-skills/superwall/workflows/placements/expo.md +2 -2
- package/dist/tools-skills/superwall/workflows/placements/flutter.md +2 -2
- package/dist/tools-skills/superwall/workflows/placements/ios.md +2 -2
- package/dist/tools-skills/superwall/workflows/placements/playbook.md +2 -2
- package/dist/tools-skills/superwall/workflows/placements/react-native.md +2 -2
- package/dist/tools-skills/superwall/workflows/placements/strategy.md +2 -2
- package/dist/tools-skills/superwall/workflows/review/playbook.md +1 -1
- package/dist/tools-skills/superwall-editor/SKILL.md +2 -2
- package/dist/tools.d.ts +8 -8
- package/dist/tools.js +21 -24
- package/dist/{upgrade-DLf0LJDh.js → upgrade-1OYm5NQU.js} +2 -2
- package/dist/{upgrade-1t3aQUxh.js → upgrade-ahapZeex.js} +1 -1
- package/package.json +2 -2
- package/dist/create-oj3zXvHZ.js +0 -19
- package/dist/held-DeJW2gUk.js +0 -16
- package/dist/login-2JHCG6c1.js +0 -16
- package/dist/push-Chp21y3a.js +0 -22
- package/dist/scan-B1SkkUi7.js +0 -4
- package/dist/server-CwrZ-I1r.js +0 -22
- package/dist/session-DItGa4z0.js +0 -6
- package/dist/storekit-DHNxDDpA.js +0 -16
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { f as Integration, i as AUTH_HOST, p as OAUTH_SCOPE, s as CLI_CLIENT_ID, t as API_HOST } from "./environment-
|
|
2
|
-
import {
|
|
1
|
+
import { f as Integration, i as AUTH_HOST, p as OAUTH_SCOPE, s as CLI_CLIENT_ID, t as API_HOST } from "./environment-DBwo79dy.js";
|
|
2
|
+
import { c as writePendingLogin, l as writeSession, o as serializeSession, r as removePendingLogin, t as readPendingLogin } from "./storage-Po9E-CHL.js";
|
|
3
3
|
import { a as readOnboardingIdempotencyKey, d as writeOnboardedApp, f as writeOnboardedOrg, i as readOnboardedOrg } from "./config-BO1Y87kV.js";
|
|
4
|
-
import { r as track } from "./telemetry-
|
|
4
|
+
import { r as track } from "./telemetry-s6dag6tb.js";
|
|
5
|
+
import { r as UsageError } from "./spinner-BClMQGGN.js";
|
|
5
6
|
import { n as ui } from "./ui-D_qf3Gvw.js";
|
|
6
|
-
import { t as scanProject } from "./scan-
|
|
7
|
-
import { s as ensureSkillsCurrent } from "./skills-
|
|
7
|
+
import { t as scanProject } from "./scan-8cxu2fx0.js";
|
|
8
|
+
import { s as ensureSkillsCurrent } from "./skills-DDf10ufO.js";
|
|
8
9
|
import { spawn } from "node:child_process";
|
|
9
10
|
import { setTimeout } from "node:timers/promises";
|
|
10
11
|
|
|
@@ -65,7 +66,8 @@ function hasDisplay(env, platform) {
|
|
|
65
66
|
}
|
|
66
67
|
function openBrowser(url, deps = {}) {
|
|
67
68
|
const platform = deps.platform ?? process.platform;
|
|
68
|
-
|
|
69
|
+
const env = deps.env ?? process.env;
|
|
70
|
+
if (env.BROWSER === "none" || !hasDisplay(env, platform)) return Promise.resolve(false);
|
|
69
71
|
const cmd = platform === "darwin" ? "open" : platform === "win32" ? "cmd" : "xdg-open";
|
|
70
72
|
const args = platform === "win32" ? [
|
|
71
73
|
"/c",
|
|
@@ -91,22 +93,116 @@ function openBrowser(url, deps = {}) {
|
|
|
91
93
|
//#endregion
|
|
92
94
|
//#region src/core/account/login.ts
|
|
93
95
|
const DEVICE_GRANT = "urn:ietf:params:oauth:grant-type:device_code";
|
|
94
|
-
async function
|
|
96
|
+
async function createPendingLogin(opts) {
|
|
95
97
|
const issuer = opts.issuer ?? AUTH_HOST();
|
|
96
|
-
const apiHost = opts.apiHost ?? API_HOST();
|
|
97
98
|
const clientId = opts.clientId ?? CLI_CLIENT_ID();
|
|
98
99
|
const disc = await discover(issuer);
|
|
99
100
|
if (!disc.device_authorization_endpoint) throw new Error("auth.superwall.com does not advertise a device-authorization endpoint.");
|
|
100
101
|
const dev = await startDeviceAuth(disc.device_authorization_endpoint, clientId);
|
|
101
102
|
const url = dev.verification_uri_complete ?? dev.verification_uri;
|
|
102
103
|
const browserOpened = await (opts.openBrowser ?? openBrowser)(url);
|
|
104
|
+
const now = Date.now();
|
|
105
|
+
return {
|
|
106
|
+
browserOpened,
|
|
107
|
+
pending: {
|
|
108
|
+
apiHost: opts.apiHost ?? API_HOST(),
|
|
109
|
+
clientId,
|
|
110
|
+
tokenEndpoint: disc.token_endpoint,
|
|
111
|
+
deviceCode: dev.device_code,
|
|
112
|
+
userCode: dev.user_code,
|
|
113
|
+
url,
|
|
114
|
+
interval: dev.interval ?? 5,
|
|
115
|
+
expiresAt: now + (dev.expires_in ?? 600) * 1e3,
|
|
116
|
+
lastPolledAt: now,
|
|
117
|
+
...opts.orgName ? { orgName: opts.orgName } : {},
|
|
118
|
+
...opts.app ? { app: opts.app } : {}
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
async function performLogin(opts = {}) {
|
|
123
|
+
const { pending, browserOpened } = await createPendingLogin(opts);
|
|
103
124
|
opts.onVerify?.({
|
|
104
|
-
url,
|
|
105
|
-
userCode:
|
|
125
|
+
url: pending.url,
|
|
126
|
+
userCode: pending.userCode,
|
|
106
127
|
browserOpened
|
|
107
128
|
});
|
|
108
|
-
const
|
|
109
|
-
|
|
129
|
+
const tokens = await pollForToken(pending, pending.expiresAt, opts.onStatus);
|
|
130
|
+
if (!tokens) throw new Error("Login timed out.");
|
|
131
|
+
const finished = await finishLogin(pending, tokens, opts);
|
|
132
|
+
if ("needsOrganization" in finished) throw new Error("Your account has no organization yet - run `superwall login` interactively to create one.");
|
|
133
|
+
return finished.session;
|
|
134
|
+
}
|
|
135
|
+
async function startLogin(opts = {}) {
|
|
136
|
+
const started = await createPendingLogin(opts);
|
|
137
|
+
writePendingLogin(started.pending);
|
|
138
|
+
return started;
|
|
139
|
+
}
|
|
140
|
+
async function pollLogin(opts) {
|
|
141
|
+
const pending = readPendingLogin();
|
|
142
|
+
if (!pending) throw new Error("No login in progress. Run `superwall login` first.");
|
|
143
|
+
if (opts.orgName) pending.orgName = opts.orgName;
|
|
144
|
+
if (opts.app) pending.app = opts.app;
|
|
145
|
+
const tokens = await resolvePollTokens(pending, opts);
|
|
146
|
+
if (!tokens) {
|
|
147
|
+
writePendingLogin(pending);
|
|
148
|
+
return {
|
|
149
|
+
status: "pending",
|
|
150
|
+
pending
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
pending.tokens = tokens;
|
|
154
|
+
writePendingLogin(pending);
|
|
155
|
+
const finished = await finishLogin(pending, tokens, {
|
|
156
|
+
...opts,
|
|
157
|
+
orgName: pending.orgName,
|
|
158
|
+
app: pending.app
|
|
159
|
+
});
|
|
160
|
+
if ("session" in finished) {
|
|
161
|
+
removePendingLogin();
|
|
162
|
+
return {
|
|
163
|
+
status: "logged_in",
|
|
164
|
+
session: finished.session
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
return {
|
|
168
|
+
status: "needs_organization",
|
|
169
|
+
pending
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
async function resolvePollTokens(pending, opts) {
|
|
173
|
+
const held = pending.tokens;
|
|
174
|
+
if (held) {
|
|
175
|
+
if (!held.refreshToken) return held;
|
|
176
|
+
const fresh = await refreshAccessToken(pending.tokenEndpoint, pending.clientId, held.refreshToken);
|
|
177
|
+
return fresh ? {
|
|
178
|
+
...held,
|
|
179
|
+
...fresh,
|
|
180
|
+
expiresIn: fresh.expiresIn
|
|
181
|
+
} : held;
|
|
182
|
+
}
|
|
183
|
+
if (Date.now() >= pending.expiresAt) {
|
|
184
|
+
removePendingLogin();
|
|
185
|
+
throw new Error("The login request expired. Run `superwall login` again for a new code.");
|
|
186
|
+
}
|
|
187
|
+
try {
|
|
188
|
+
return await pollForToken(pending, Math.min(pending.expiresAt, Date.now() + opts.timeoutMs), opts.onStatus);
|
|
189
|
+
} catch (error) {
|
|
190
|
+
removePendingLogin();
|
|
191
|
+
throw error;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
async function resolveOnboardSetup(opts) {
|
|
195
|
+
if (opts.onOnboard) return opts.onOnboard();
|
|
196
|
+
if (opts.orgName) return {
|
|
197
|
+
orgName: opts.orgName,
|
|
198
|
+
...opts.app ? { app: opts.app } : {}
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
async function finishLogin(pending, tokens, opts) {
|
|
202
|
+
const { apiHost, clientId, tokenEndpoint } = pending;
|
|
203
|
+
const { idToken } = tokens;
|
|
204
|
+
let { refreshToken, expiresIn } = tokens;
|
|
205
|
+
let apiToken = tokens.accessToken;
|
|
110
206
|
if (idToken) await findJson(`${apiHost}/v2/me`, idToken).catch(() => null);
|
|
111
207
|
const me = await findJson(`${apiHost}/v2/me`, apiToken).catch(() => null);
|
|
112
208
|
let hasOrg = false;
|
|
@@ -117,8 +213,8 @@ async function performLogin(opts = {}) {
|
|
|
117
213
|
}
|
|
118
214
|
let createdNewOrg = false;
|
|
119
215
|
if (!hasOrg && !readOnboardedOrg()) {
|
|
120
|
-
|
|
121
|
-
|
|
216
|
+
const setup = await resolveOnboardSetup(opts);
|
|
217
|
+
if (setup === void 0) return { needsOrganization: true };
|
|
122
218
|
if (!setup) throw new Error("Cancelled.");
|
|
123
219
|
opts.onStatus?.("Creating your account…");
|
|
124
220
|
let org;
|
|
@@ -138,8 +234,12 @@ async function performLogin(opts = {}) {
|
|
|
138
234
|
}
|
|
139
235
|
if (createdNewOrg && refreshToken) {
|
|
140
236
|
opts.onStatus?.("Activating your organization…");
|
|
141
|
-
const fresh = await refreshAccessToken(
|
|
142
|
-
if (fresh)
|
|
237
|
+
const fresh = await refreshAccessToken(tokenEndpoint, clientId, refreshToken);
|
|
238
|
+
if (fresh) {
|
|
239
|
+
apiToken = fresh.accessToken;
|
|
240
|
+
refreshToken = fresh.refreshToken;
|
|
241
|
+
expiresIn = fresh.expiresIn;
|
|
242
|
+
}
|
|
143
243
|
}
|
|
144
244
|
const session = {
|
|
145
245
|
authMethod: "oauth",
|
|
@@ -149,11 +249,11 @@ async function performLogin(opts = {}) {
|
|
|
149
249
|
accessToken: apiToken,
|
|
150
250
|
refreshToken,
|
|
151
251
|
accessTokenExpiresAt: expiresIn ? Date.now() + expiresIn * 1e3 : void 0,
|
|
152
|
-
tokenEndpoint
|
|
252
|
+
tokenEndpoint,
|
|
153
253
|
oauthClientId: clientId
|
|
154
254
|
};
|
|
155
255
|
writeSession(session);
|
|
156
|
-
return session;
|
|
256
|
+
return { session };
|
|
157
257
|
}
|
|
158
258
|
async function loginWithApiKey(apiKey, apiHost = API_HOST()) {
|
|
159
259
|
const key = apiKey.trim();
|
|
@@ -198,18 +298,18 @@ async function startDeviceAuth(endpoint, clientId) {
|
|
|
198
298
|
}
|
|
199
299
|
return await r.json();
|
|
200
300
|
}
|
|
201
|
-
async function pollForToken(
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
const r = await fetch(tokenEndpoint, {
|
|
301
|
+
async function pollForToken(pending, deadline, onStatus) {
|
|
302
|
+
let wait = Math.max(0, pending.lastPolledAt + pending.interval * 1e3 - Date.now());
|
|
303
|
+
while (Date.now() + wait < deadline) {
|
|
304
|
+
await setTimeout(wait);
|
|
305
|
+
pending.lastPolledAt = Date.now();
|
|
306
|
+
const r = await fetch(pending.tokenEndpoint, {
|
|
207
307
|
method: "POST",
|
|
208
308
|
headers: { "content-type": "application/x-www-form-urlencoded" },
|
|
209
309
|
body: new URLSearchParams({
|
|
210
310
|
grant_type: DEVICE_GRANT,
|
|
211
|
-
device_code:
|
|
212
|
-
client_id: clientId
|
|
311
|
+
device_code: pending.deviceCode,
|
|
312
|
+
client_id: pending.clientId
|
|
213
313
|
})
|
|
214
314
|
});
|
|
215
315
|
const d = await r.json().catch(() => ({}));
|
|
@@ -222,16 +322,17 @@ async function pollForToken(tokenEndpoint, clientId, dev, onStatus) {
|
|
|
222
322
|
switch (d.error) {
|
|
223
323
|
case "authorization_pending":
|
|
224
324
|
onStatus?.("Waiting for you to approve in the browser…");
|
|
225
|
-
|
|
325
|
+
break;
|
|
226
326
|
case "slow_down":
|
|
227
|
-
interval += 5;
|
|
228
|
-
|
|
327
|
+
pending.interval += 5;
|
|
328
|
+
break;
|
|
229
329
|
case "expired_token": throw new Error("The login request expired - run `superwall login` again.");
|
|
230
330
|
case "access_denied": throw new Error("Login was denied.");
|
|
231
331
|
default: throw new Error(d.error_description || d.error || "Token polling failed.");
|
|
232
332
|
}
|
|
333
|
+
wait = pending.interval * 1e3;
|
|
233
334
|
}
|
|
234
|
-
|
|
335
|
+
return null;
|
|
235
336
|
}
|
|
236
337
|
async function createOrganization(apiHost, token, name) {
|
|
237
338
|
const created = await postJson(`${apiHost}/v2/me/organizations`, token, { name });
|
|
@@ -271,7 +372,13 @@ async function refreshAccessToken(tokenEndpoint, clientId, refreshToken) {
|
|
|
271
372
|
})
|
|
272
373
|
});
|
|
273
374
|
if (!r.ok) return null;
|
|
274
|
-
|
|
375
|
+
const d = await r.json();
|
|
376
|
+
if (!d.access_token) return null;
|
|
377
|
+
return {
|
|
378
|
+
accessToken: d.access_token,
|
|
379
|
+
refreshToken: d.refresh_token ?? refreshToken,
|
|
380
|
+
...d.expires_in === void 0 ? {} : { expiresIn: d.expires_in }
|
|
381
|
+
};
|
|
275
382
|
} catch {
|
|
276
383
|
return null;
|
|
277
384
|
}
|
|
@@ -300,6 +407,120 @@ async function postJson(url, accessToken, body) {
|
|
|
300
407
|
}
|
|
301
408
|
return r.json();
|
|
302
409
|
}
|
|
410
|
+
const POLL_HINT = "superwall login --poll";
|
|
411
|
+
const POLL_TIMEOUT_SECONDS = 60;
|
|
412
|
+
function isPlatform(value) {
|
|
413
|
+
return value === "ios" || value === "android" || value === "web";
|
|
414
|
+
}
|
|
415
|
+
function resolveAgentLogin(flags) {
|
|
416
|
+
const orgName = flags.orgName?.trim() || void 0;
|
|
417
|
+
const appName = flags.appName?.trim() || void 0;
|
|
418
|
+
const base = {
|
|
419
|
+
orgName,
|
|
420
|
+
issuer: flags.host,
|
|
421
|
+
clientId: flags.clientId
|
|
422
|
+
};
|
|
423
|
+
if (!appName) {
|
|
424
|
+
if (flags.platform || flags.bundleId) throw new UsageError("--platform and --bundle-id need --app-name.");
|
|
425
|
+
return base;
|
|
426
|
+
}
|
|
427
|
+
if (!orgName) throw new UsageError("--app-name needs --org-name.");
|
|
428
|
+
if (!flags.platform || !isPlatform(flags.platform)) throw new UsageError("--app-name needs --platform ios, android or web.");
|
|
429
|
+
const bundleId = flags.bundleId?.trim() || void 0;
|
|
430
|
+
return {
|
|
431
|
+
...base,
|
|
432
|
+
app: {
|
|
433
|
+
name: appName,
|
|
434
|
+
platform: flags.platform,
|
|
435
|
+
...bundleId ? { bundleId } : {}
|
|
436
|
+
}
|
|
437
|
+
};
|
|
438
|
+
}
|
|
439
|
+
const formatExpiry = (pending) => new Date(pending.expiresAt).toISOString();
|
|
440
|
+
async function runAgentLoginStart(ctx, agent, openBrowser$1) {
|
|
441
|
+
const { pending, browserOpened } = await startLogin({
|
|
442
|
+
...agent,
|
|
443
|
+
...openBrowser$1 ? { openBrowser: openBrowser$1 } : {}
|
|
444
|
+
});
|
|
445
|
+
track("login started", { method: "oauth_poll" });
|
|
446
|
+
if (ctx.json) return ctx.output.data({
|
|
447
|
+
status: "pending",
|
|
448
|
+
verification_url: pending.url,
|
|
449
|
+
user_code: pending.userCode,
|
|
450
|
+
expires_at: formatExpiry(pending),
|
|
451
|
+
browser_opened: browserOpened,
|
|
452
|
+
next: POLL_HINT
|
|
453
|
+
});
|
|
454
|
+
ctx.ui.info(`Approve this login in your browser · code \`${pending.userCode}\`\n${pending.url}`);
|
|
455
|
+
if (!browserOpened) ctx.ui.warn(BROWSER_UNAVAILABLE);
|
|
456
|
+
ctx.ui.outro(`Once it's approved, run \`${POLL_HINT}\` to finish. The code expires at ${formatExpiry(pending)}.`);
|
|
457
|
+
}
|
|
458
|
+
async function runAgentLoginPoll(ctx, agent, timeoutSeconds) {
|
|
459
|
+
const { ui: ui$1 } = ctx;
|
|
460
|
+
const seconds = timeoutSeconds !== void 0 && timeoutSeconds >= 0 ? timeoutSeconds : POLL_TIMEOUT_SECONDS;
|
|
461
|
+
const hooks = onboardingHooks((await scanProject(ctx.installDir).catch(() => null))?.apps[0]);
|
|
462
|
+
const spin = ui$1.spinner();
|
|
463
|
+
spin.start("Waiting for you to approve in the browser");
|
|
464
|
+
let result;
|
|
465
|
+
try {
|
|
466
|
+
result = await pollLogin({
|
|
467
|
+
...agent,
|
|
468
|
+
timeoutMs: seconds * 1e3,
|
|
469
|
+
onStatus: (m) => spin.message(m),
|
|
470
|
+
onProvisioned: hooks.onProvisioned
|
|
471
|
+
});
|
|
472
|
+
} catch (e) {
|
|
473
|
+
spin.stop("Login failed");
|
|
474
|
+
track("login finished", {
|
|
475
|
+
status: "error",
|
|
476
|
+
method: "oauth_poll"
|
|
477
|
+
});
|
|
478
|
+
throw e;
|
|
479
|
+
}
|
|
480
|
+
if (result.status === "logged_in") {
|
|
481
|
+
spin.stop(`Logged in as \`${result.session.userEmail ?? "you"}\``);
|
|
482
|
+
track("login finished", {
|
|
483
|
+
status: "success",
|
|
484
|
+
method: "oauth_poll"
|
|
485
|
+
});
|
|
486
|
+
const provisioned = hooks.provisioned();
|
|
487
|
+
if (ctx.json) return ctx.output.data({
|
|
488
|
+
status: "logged_in",
|
|
489
|
+
...serializeSession(result.session),
|
|
490
|
+
...provisioned?.publicApiKey ? { app: {
|
|
491
|
+
public_api_key: provisioned.publicApiKey,
|
|
492
|
+
application_id: provisioned.applicationId ?? null,
|
|
493
|
+
project_id: provisioned.projectId ?? null
|
|
494
|
+
} } : {}
|
|
495
|
+
});
|
|
496
|
+
await ensureSkillsCurrent(false, "login").catch(() => {});
|
|
497
|
+
ui$1.outro(provisioned?.publicApiKey ? "Your app is ready - run `superwall integrate` to set up the SDK." : "You're all set - run `superwall integrate` to set up your app.");
|
|
498
|
+
return;
|
|
499
|
+
}
|
|
500
|
+
ctx.fail();
|
|
501
|
+
if (result.status === "needs_organization") {
|
|
502
|
+
spin.stop("Approved");
|
|
503
|
+
const next = `${POLL_HINT} --org-name "<name>"`;
|
|
504
|
+
const message = `This account has no organization yet. Run \`${next}\` to create one, with --app-name and --platform to create its first app too.`;
|
|
505
|
+
if (ctx.json) return ctx.output.data({
|
|
506
|
+
status: "needs_organization",
|
|
507
|
+
message,
|
|
508
|
+
next
|
|
509
|
+
});
|
|
510
|
+
ui$1.warn(message);
|
|
511
|
+
return;
|
|
512
|
+
}
|
|
513
|
+
const { pending } = result;
|
|
514
|
+
spin.stop("Not approved yet");
|
|
515
|
+
if (ctx.json) return ctx.output.data({
|
|
516
|
+
status: "pending",
|
|
517
|
+
verification_url: pending.url,
|
|
518
|
+
user_code: pending.userCode,
|
|
519
|
+
expires_at: formatExpiry(pending),
|
|
520
|
+
next: POLL_HINT
|
|
521
|
+
});
|
|
522
|
+
ui$1.info(`Still waiting for approval · code \`${pending.userCode}\`\n${pending.url}\nRun \`${POLL_HINT}\` again. The code expires at ${formatExpiry(pending)}.`);
|
|
523
|
+
}
|
|
303
524
|
async function runLogin(ctx, { flags, openBrowser: openBrowser$1 }) {
|
|
304
525
|
const { ui: ui$1 } = ctx;
|
|
305
526
|
ui$1.intro("Superwall login");
|
|
@@ -327,7 +548,9 @@ async function runLogin(ctx, { flags, openBrowser: openBrowser$1 }) {
|
|
|
327
548
|
}
|
|
328
549
|
return;
|
|
329
550
|
}
|
|
330
|
-
|
|
551
|
+
const agent = resolveAgentLogin(flags);
|
|
552
|
+
if (flags.poll) return runAgentLoginPoll(ctx, agent, flags.timeout);
|
|
553
|
+
if (!ctx.interactive) return runAgentLoginStart(ctx, agent, openBrowser$1);
|
|
331
554
|
const hooks = onboardingHooks((await scanProject(ctx.installDir).catch(() => null))?.apps[0]);
|
|
332
555
|
const spin = ui$1.spinner();
|
|
333
556
|
try {
|
|
@@ -366,4 +589,4 @@ async function runLogin(ctx, { flags, openBrowser: openBrowser$1 }) {
|
|
|
366
589
|
}
|
|
367
590
|
|
|
368
591
|
//#endregion
|
|
369
|
-
export {
|
|
592
|
+
export { BROWSER_UNAVAILABLE as a, startLogin as i, pollLogin as n, openBrowser as o, runLogin as r, onboardingHooks as s, performLogin as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as ApiError } from "./client-
|
|
2
|
-
import { F as orgProjects, L as rememberOrg, p as listProjects } from "./resources-
|
|
1
|
+
import { t as ApiError } from "./client-BF9rCULI.js";
|
|
2
|
+
import { F as orgProjects, L as rememberOrg, p as listProjects } from "./resources-Bo6i7wBi.js";
|
|
3
3
|
|
|
4
4
|
//#region src/core/api/lookup.ts
|
|
5
5
|
const DASHBOARD_PATH = /^\/(\d+)(?:\/(\d+))?(?:\/|$)/;
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import "./token-
|
|
1
|
+
import "./token-CPplNMVa.js";
|
|
2
2
|
import { t as blocks } from "./output-Ggzq5_-t.js";
|
|
3
|
-
import { c as DASHBOARD_URL, v as VERSION } from "./environment-
|
|
4
|
-
import {
|
|
5
|
-
import "./client-
|
|
3
|
+
import { c as DASHBOARD_URL, v as VERSION } from "./environment-DBwo79dy.js";
|
|
4
|
+
import { n as readSession, s as sessionOrgName } from "./storage-Po9E-CHL.js";
|
|
5
|
+
import "./client-BF9rCULI.js";
|
|
6
6
|
import "./config-BO1Y87kV.js";
|
|
7
|
-
import "./telemetry-
|
|
7
|
+
import "./telemetry-s6dag6tb.js";
|
|
8
8
|
import "./spawn-DmmmHIP-.js";
|
|
9
|
-
import "./spinner-
|
|
9
|
+
import "./spinner-BClMQGGN.js";
|
|
10
10
|
import { n as ui } from "./ui-D_qf3Gvw.js";
|
|
11
11
|
import "./theme-DUsCh-Vd.js";
|
|
12
12
|
import { t as stripReport } from "./log-NVhVe_oe.js";
|
|
13
|
-
import { t as scanProject } from "./scan-
|
|
14
|
-
import { t as detectExisting } from "./existing-
|
|
15
|
-
import "./paths-
|
|
16
|
-
import "./resources-
|
|
17
|
-
import "./lookup-
|
|
18
|
-
import "./login-
|
|
19
|
-
import "./skills-
|
|
20
|
-
import "./selection-
|
|
21
|
-
import { n as requireApi } from "./session-
|
|
22
|
-
import { n as performLoginWithUi } from "./login-
|
|
23
|
-
import { t as runAction } from "./run-
|
|
24
|
-
import { t as detectDrivers } from "./drivers-
|
|
25
|
-
import { _ as screenNameOf, a as buildMigrationCopyPrompt, c as migrationFor, d as projectDirOf, f as scaffoldFromPaywall, g as placementOfName, h as findScreenCandidates, i as startStudio, l as migrationSource, m as screenMigrationFor, n as migrationNextSteps, o as hasOriginal, p as scaffoldFromScreen, r as screenNextSteps, t as askStudio, u as offerMigration } from "./open-
|
|
26
|
-
import "./server-
|
|
27
|
-
import { r as actionById, t as detectBilling } from "./billing-
|
|
13
|
+
import { t as scanProject } from "./scan-8cxu2fx0.js";
|
|
14
|
+
import { t as detectExisting } from "./existing-B4VK4BCL.js";
|
|
15
|
+
import "./paths-BcNbJfpw.js";
|
|
16
|
+
import "./resources-Bo6i7wBi.js";
|
|
17
|
+
import "./lookup-r8p6H2ZC.js";
|
|
18
|
+
import "./login-DfhqWY9C.js";
|
|
19
|
+
import "./skills-DDf10ufO.js";
|
|
20
|
+
import "./selection-CMA4aG4V.js";
|
|
21
|
+
import { n as requireApi } from "./session-eZeXR9xU.js";
|
|
22
|
+
import { n as performLoginWithUi } from "./login-B8hgMLhS.js";
|
|
23
|
+
import { t as runAction } from "./run-BUp4r8Kk.js";
|
|
24
|
+
import { t as detectDrivers } from "./drivers-DOMky8Ug.js";
|
|
25
|
+
import { _ as screenNameOf, a as buildMigrationCopyPrompt, c as migrationFor, d as projectDirOf, f as scaffoldFromPaywall, g as placementOfName, h as findScreenCandidates, i as startStudio, l as migrationSource, m as screenMigrationFor, n as migrationNextSteps, o as hasOriginal, p as scaffoldFromScreen, r as screenNextSteps, t as askStudio, u as offerMigration } from "./open-CrEnSL4v.js";
|
|
26
|
+
import "./server-Xb3wp-mx.js";
|
|
27
|
+
import { r as actionById, t as detectBilling } from "./billing-DyKr2kmd.js";
|
|
28
28
|
import { n as writeReport } from "./reports-D_qbl7_u.js";
|
|
29
29
|
import { execFile } from "node:child_process";
|
|
30
30
|
import * as fs from "node:fs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as updateServerNotifications, r as chooseKeyApp } from "./held-
|
|
2
|
-
import { t as apiCall } from "./spinner-
|
|
1
|
+
import { D as updateServerNotifications, r as chooseKeyApp } from "./held-DjcZPCwn.js";
|
|
2
|
+
import { t as apiCall } from "./spinner-BClMQGGN.js";
|
|
3
3
|
import { i as findAppNotificationUrl } from "./client-BZ1UbpXz.js";
|
|
4
4
|
import { t as timing } from "./timing-BVxPrYq3.js";
|
|
5
5
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { S as isNonInteractive, c as DASHBOARD_URL } from "./environment-
|
|
2
|
-
import { t as ApiError } from "./client-
|
|
1
|
+
import { S as isNonInteractive, c as DASHBOARD_URL } from "./environment-DBwo79dy.js";
|
|
2
|
+
import { t as ApiError } from "./client-BF9rCULI.js";
|
|
3
3
|
import { t as stripReport } from "./log-NVhVe_oe.js";
|
|
4
|
-
import { i as readPackageJson, r as allDeps } from "./scan-
|
|
5
|
-
import { c as findPaywall, f as listApplications } from "./resources-
|
|
6
|
-
import { d as readBundledSkill } from "./skills-
|
|
7
|
-
import { E as writeApp, S as isScreenOrigin, k as writeOrigin, w as readLock } from "./selection-
|
|
8
|
-
import { c as projectPackageName } from "./session-
|
|
9
|
-
import { a as copyToClipboard, i as readPrompt, n as runWithDriverFallback } from "./run-
|
|
10
|
-
import { t as detectDrivers } from "./drivers-
|
|
11
|
-
import { t as runStudio } from "./server-
|
|
4
|
+
import { i as readPackageJson, r as allDeps } from "./scan-8cxu2fx0.js";
|
|
5
|
+
import { c as findPaywall, f as listApplications } from "./resources-Bo6i7wBi.js";
|
|
6
|
+
import { d as readBundledSkill } from "./skills-DDf10ufO.js";
|
|
7
|
+
import { E as writeApp, S as isScreenOrigin, k as writeOrigin, w as readLock } from "./selection-CMA4aG4V.js";
|
|
8
|
+
import { c as projectPackageName } from "./session-eZeXR9xU.js";
|
|
9
|
+
import { a as copyToClipboard, i as readPrompt, n as runWithDriverFallback } from "./run-BUp4r8Kk.js";
|
|
10
|
+
import { t as detectDrivers } from "./drivers-DOMky8Ug.js";
|
|
11
|
+
import { t as runStudio } from "./server-Xb3wp-mx.js";
|
|
12
12
|
import * as fs from "node:fs";
|
|
13
13
|
import * as path from "node:path";
|
|
14
14
|
import fg from "fast-glob";
|
|
@@ -106,6 +106,7 @@ function parseOriginDocument(html) {
|
|
|
106
106
|
const cache = enabled(paywall.onDeviceCache);
|
|
107
107
|
if (cache !== void 0) settings.onDeviceCacheEnabled = cache;
|
|
108
108
|
if (typeof paywall.webCheckoutDestination === "string") settings.webCheckoutDestination = paywall.webCheckoutDestination;
|
|
109
|
+
if (paywall.prepaidCards === "BLOCKED") settings.prepaidCards = "block";
|
|
109
110
|
}
|
|
110
111
|
const locales = ofType("paywall_language").map((record) => typeof record.id === "string" ? record.id.split(":")[1] : void 0).filter((locale) => typeof locale === "string" && locale !== "").sort();
|
|
111
112
|
const nodeCounts = {};
|
|
@@ -179,7 +180,8 @@ function originOf(detail, document) {
|
|
|
179
180
|
scrollEnabled: document?.settings.scrollEnabled ?? true,
|
|
180
181
|
gameControllerEnabled: document?.settings.gameControllerEnabled ?? false,
|
|
181
182
|
onDeviceCacheEnabled: document?.settings.onDeviceCacheEnabled ?? true,
|
|
182
|
-
...document?.settings.webCheckoutDestination === void 0 ? {} : { webCheckoutDestination: document.settings.webCheckoutDestination }
|
|
183
|
+
...document?.settings.webCheckoutDestination === void 0 ? {} : { webCheckoutDestination: document.settings.webCheckoutDestination },
|
|
184
|
+
...document?.settings.prepaidCards === void 0 ? {} : { prepaidCards: document.settings.prepaidCards }
|
|
183
185
|
},
|
|
184
186
|
background: document?.background,
|
|
185
187
|
locales: document?.locales ?? [],
|
|
@@ -203,10 +205,15 @@ const presentationSource = (presentation) => {
|
|
|
203
205
|
}
|
|
204
206
|
return `{ style: ${literal$1(presentation.style)} }`;
|
|
205
207
|
};
|
|
208
|
+
const checkoutModeOf = (destination) => {
|
|
209
|
+
if (destination === "PAYWALL_APPLE_PAY") return "applePay";
|
|
210
|
+
if (destination === "PAYWALL_EMBEDDED") return "sheet";
|
|
211
|
+
};
|
|
206
212
|
const checkoutSource = (origin) => {
|
|
207
213
|
if (origin.platform !== "web") return void 0;
|
|
208
|
-
|
|
209
|
-
if (origin.settings.
|
|
214
|
+
const mode = checkoutModeOf(origin.settings.webCheckoutDestination);
|
|
215
|
+
if (origin.settings.prepaidCards === "block") return `{ mode: ${literal$1(mode ?? "external")}, prepaidCards: "block" }`;
|
|
216
|
+
return mode === void 0 ? void 0 : literal$1(mode);
|
|
210
217
|
};
|
|
211
218
|
function originConfigSource(origin) {
|
|
212
219
|
const lines = [` name: ${literal$1(origin.name)},`];
|
|
@@ -340,12 +347,9 @@ layout and inset system, mobile design, the CLI, and where the docs are.
|
|
|
340
347
|
\`superwall login\` installs it; otherwise:
|
|
341
348
|
|
|
342
349
|
\`\`\`bash
|
|
343
|
-
npx skills add
|
|
350
|
+
npx skills add superwall/skills --skill superwall-framework --global --yes --agent claude-code universal --full-depth
|
|
344
351
|
\`\`\`
|
|
345
352
|
|
|
346
|
-
The framework is on the \`next\` channel: its commands exist only while
|
|
347
|
-
\`SUPERWALL_CHANNEL=next\` is set in the environment.
|
|
348
|
-
|
|
349
353
|
Docs: \`curl -sL https://superwall.com/docs/framework/llms.txt\`
|
|
350
354
|
`;
|
|
351
355
|
const TSCONFIG = "{\n \"compilerOptions\": {\n \"target\": \"ES2022\",\n \"lib\": [\"ES2023\", \"DOM\", \"DOM.Iterable\"],\n \"module\": \"ESNext\",\n \"moduleResolution\": \"bundler\",\n \"jsx\": \"react-jsx\",\n \"strict\": true,\n \"isolatedModules\": true,\n \"resolveJsonModule\": true,\n \"skipLibCheck\": true,\n \"noUnusedLocals\": true,\n \"noUnusedParameters\": true,\n \"noFallthroughCasesInSwitch\": true,\n \"noEmit\": true,\n \"paths\": {\n \"@/*\": [\"./*\"]\n }\n },\n \"include\": [\".\"]\n}\n";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as withSpinner } from "./spinner-
|
|
1
|
+
import { n as withSpinner } from "./spinner-BClMQGGN.js";
|
|
2
2
|
import { n as ui } from "./ui-D_qf3Gvw.js";
|
|
3
|
-
import { M as listOrgGroups, N as listOrganizations, T as titleCase, w as rowName } from "./resources-
|
|
3
|
+
import { M as listOrgGroups, N as listOrganizations, T as titleCase, w as rowName } from "./resources-Bo6i7wBi.js";
|
|
4
4
|
|
|
5
5
|
//#region src/core/account/org.ts
|
|
6
6
|
async function orgForNewProject(api, interactive) {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import "./token-
|
|
1
|
+
import "./token-CPplNMVa.js";
|
|
2
2
|
import "./output-Ggzq5_-t.js";
|
|
3
|
-
import "./environment-
|
|
4
|
-
import "./storage-
|
|
5
|
-
import "./client-
|
|
3
|
+
import "./environment-DBwo79dy.js";
|
|
4
|
+
import "./storage-Po9E-CHL.js";
|
|
5
|
+
import "./client-BF9rCULI.js";
|
|
6
6
|
import "./config-BO1Y87kV.js";
|
|
7
|
-
import { i as updateTelemetryTags, r as track } from "./telemetry-
|
|
7
|
+
import { i as updateTelemetryTags, r as track } from "./telemetry-s6dag6tb.js";
|
|
8
8
|
import "./spawn-DmmmHIP-.js";
|
|
9
|
-
import "./spinner-
|
|
9
|
+
import "./spinner-BClMQGGN.js";
|
|
10
10
|
import "./ui-D_qf3Gvw.js";
|
|
11
|
-
import { t as scanProject } from "./scan-
|
|
12
|
-
import "./paths-
|
|
13
|
-
import { d as readBundledSkill } from "./skills-
|
|
14
|
-
import { n as FRAMEWORK_REF, t as detectBilling } from "./billing-
|
|
11
|
+
import { t as scanProject } from "./scan-8cxu2fx0.js";
|
|
12
|
+
import "./paths-BcNbJfpw.js";
|
|
13
|
+
import { d as readBundledSkill } from "./skills-DDf10ufO.js";
|
|
14
|
+
import { n as FRAMEWORK_REF, t as detectBilling } from "./billing-DyKr2kmd.js";
|
|
15
15
|
|
|
16
16
|
//#region src/core/workflows/playbook.ts
|
|
17
17
|
async function printPlaybook(installDir, playbook) {
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import "./token-
|
|
1
|
+
import "./token-CPplNMVa.js";
|
|
2
2
|
import "./output-Ggzq5_-t.js";
|
|
3
|
-
import { v as VERSION } from "./environment-
|
|
4
|
-
import "./storage-
|
|
5
|
-
import { t as ApiError } from "./client-
|
|
3
|
+
import { v as VERSION } from "./environment-DBwo79dy.js";
|
|
4
|
+
import "./storage-Po9E-CHL.js";
|
|
5
|
+
import { t as ApiError } from "./client-BF9rCULI.js";
|
|
6
6
|
import "./config-BO1Y87kV.js";
|
|
7
|
-
import "./telemetry-
|
|
7
|
+
import "./telemetry-s6dag6tb.js";
|
|
8
8
|
import "./spawn-DmmmHIP-.js";
|
|
9
|
-
import "./spinner-
|
|
9
|
+
import "./spinner-BClMQGGN.js";
|
|
10
10
|
import { n as ui } from "./ui-D_qf3Gvw.js";
|
|
11
|
-
import "./scan-
|
|
12
|
-
import "./paths-
|
|
13
|
-
import { b as promotePaywallVersion, g as livePaywallVersion } from "./resources-
|
|
14
|
-
import "./lookup-
|
|
15
|
-
import "./login-
|
|
16
|
-
import "./skills-
|
|
17
|
-
import { N as resolveFramework, a as resolveProjectDir, g as transition, s as selectSurfaces, v as collectProjectDeclarations, w as readLock } from "./selection-
|
|
18
|
-
import { _ as targetLabel, g as planTargets, h as parsePlatformFlags, n as requireApi, v as wantedPlatforms, x as resolveApps, y as resolveBinding } from "./session-
|
|
19
|
-
import { a as pickApplicationOption, i as timed, o as pickAdoptOption, t as group } from "./push-
|
|
20
|
-
import "./login-
|
|
11
|
+
import "./scan-8cxu2fx0.js";
|
|
12
|
+
import "./paths-BcNbJfpw.js";
|
|
13
|
+
import { b as promotePaywallVersion, g as livePaywallVersion } from "./resources-Bo6i7wBi.js";
|
|
14
|
+
import "./lookup-r8p6H2ZC.js";
|
|
15
|
+
import "./login-DfhqWY9C.js";
|
|
16
|
+
import "./skills-DDf10ufO.js";
|
|
17
|
+
import { N as resolveFramework, a as resolveProjectDir, g as transition, s as selectSurfaces, v as collectProjectDeclarations, w as readLock } from "./selection-CMA4aG4V.js";
|
|
18
|
+
import { _ as targetLabel, g as planTargets, h as parsePlatformFlags, n as requireApi, v as wantedPlatforms, x as resolveApps, y as resolveBinding } from "./session-eZeXR9xU.js";
|
|
19
|
+
import { a as pickApplicationOption, i as timed, o as pickAdoptOption, t as group } from "./push-Bzs1l_5C.js";
|
|
20
|
+
import "./login-B8hgMLhS.js";
|
|
21
21
|
import pc from "picocolors";
|
|
22
22
|
|
|
23
23
|
//#region src/core/paywalls/promote.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { v as VERSION } from "./environment-
|
|
1
|
+
import { v as VERSION } from "./environment-DBwo79dy.js";
|
|
2
2
|
import { n as ui } from "./ui-D_qf3Gvw.js";
|
|
3
|
-
import { C as pushedProducts, E as versionProducts, S as pushPaywallVersion, b as promotePaywallVersion, h as livePaywall, v as platformLabel, y as platformStore } from "./resources-
|
|
4
|
-
import { A as writeSnapshot, F as requireAssets, I as syncAssets, M as frameworkVersion, N as resolveFramework, O as writeBindings, P as assetBaseUrl, T as removeBinding, _ as weight, a as resolveProjectDir, b as describeBindings, c as storesDiffer, d as kb, f as pendingPromoteWarning, g as transition, h as took, i as requireProject, l as BIND_VERB, m as resolveNote, p as pushedLine, r as requireClean, s as selectSurfaces, t as needsWork, v as collectProjectDeclarations, w as readLock, y as writeProjectTypes } from "./selection-
|
|
5
|
-
import { _ as targetLabel, d as listProjectCatalogue, g as planTargets, h as parsePlatformFlags, i as pushSource, l as writeProjectScaffold, m as requireProducts, n as requireApi, o as collectSourceFiles, p as projectForApplication, r as assertGit, s as warnNotPortable, v as wantedPlatforms, x as resolveApps, y as resolveBinding } from "./session-
|
|
3
|
+
import { C as pushedProducts, E as versionProducts, S as pushPaywallVersion, b as promotePaywallVersion, h as livePaywall, v as platformLabel, y as platformStore } from "./resources-Bo6i7wBi.js";
|
|
4
|
+
import { A as writeSnapshot, F as requireAssets, I as syncAssets, M as frameworkVersion, N as resolveFramework, O as writeBindings, P as assetBaseUrl, T as removeBinding, _ as weight, a as resolveProjectDir, b as describeBindings, c as storesDiffer, d as kb, f as pendingPromoteWarning, g as transition, h as took, i as requireProject, l as BIND_VERB, m as resolveNote, p as pushedLine, r as requireClean, s as selectSurfaces, t as needsWork, v as collectProjectDeclarations, w as readLock, y as writeProjectTypes } from "./selection-CMA4aG4V.js";
|
|
5
|
+
import { _ as targetLabel, d as listProjectCatalogue, g as planTargets, h as parsePlatformFlags, i as pushSource, l as writeProjectScaffold, m as requireProducts, n as requireApi, o as collectSourceFiles, p as projectForApplication, r as assertGit, s as warnNotPortable, v as wantedPlatforms, x as resolveApps, y as resolveBinding } from "./session-eZeXR9xU.js";
|
|
6
6
|
import pc from "picocolors";
|
|
7
7
|
import { cpus } from "node:os";
|
|
8
8
|
|