@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,18 @@
|
|
|
1
|
+
import "./token-CKCBQ4I8.js";
|
|
2
|
+
import "./storage-DdIAHolY.js";
|
|
3
|
+
import "./environment-Dn7irhZr.js";
|
|
4
|
+
import "./config-DCqRQTJ4.js";
|
|
5
|
+
import "./held-D5wSX2Mf.js";
|
|
6
|
+
import "./resources-BaURbSpY.js";
|
|
7
|
+
import "./orgs-ltP8H0Nl.js";
|
|
8
|
+
import "./ui-hFgji1e8.js";
|
|
9
|
+
import "./spinner-Dcr-Dqdi.js";
|
|
10
|
+
import "./org-BV8wwxwc.js";
|
|
11
|
+
import "./lookup-DkcT4E-5.js";
|
|
12
|
+
import "./paths-Cb1RfjaX.js";
|
|
13
|
+
import "./scope-DDYLQeZw.js";
|
|
14
|
+
import "./client-BwYhzITp.js";
|
|
15
|
+
import "./timing-BKEEIBij.js";
|
|
16
|
+
import { i as runAscKeysCreate, n as keyAccess, r as keyRole, t as createAndSaveKey } from "./create-Costu6UT.js";
|
|
17
|
+
|
|
18
|
+
export { createAndSaveKey, keyAccess, keyRole, runAscKeysCreate };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { C as appleCredentialsFromEnv, m as ENV_APPLE_PASSWORD, p as ENV_APPLE_ID, x as VERSION } from "./environment-
|
|
3
|
-
import {
|
|
4
|
-
import { i as savedKey, m as KEY_LABEL, n as testModeWarning, o as chooseIosApp, s as resolveApp, t as upsertHeldKey, x as keyKind, y as findIntegrations } from "./held-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { c as replaceAppPurchaseKey, s as replaceAppAscKey } from "./client-
|
|
9
|
-
import { t as timing } from "./timing-
|
|
1
|
+
import { f as formatJson, u as blocks } from "./storage-DdIAHolY.js";
|
|
2
|
+
import { C as appleCredentialsFromEnv, m as ENV_APPLE_PASSWORD, p as ENV_APPLE_ID, x as VERSION } from "./environment-Dn7irhZr.js";
|
|
3
|
+
import { y as ApiError } from "./config-DCqRQTJ4.js";
|
|
4
|
+
import { i as savedKey, m as KEY_LABEL, n as testModeWarning, o as chooseIosApp, s as resolveApp, t as upsertHeldKey, x as keyKind, y as findIntegrations } from "./held-D5wSX2Mf.js";
|
|
5
|
+
import { A as listField, M as textField, O as field, j as parseJson } from "./resources-BaURbSpY.js";
|
|
6
|
+
import { t as apiCall } from "./spinner-Dcr-Dqdi.js";
|
|
7
|
+
import { n as SUPERWALL_HOME } from "./paths-Cb1RfjaX.js";
|
|
8
|
+
import { c as replaceAppPurchaseKey, s as replaceAppAscKey } from "./client-BwYhzITp.js";
|
|
9
|
+
import { t as timing } from "./timing-BKEEIBij.js";
|
|
10
10
|
import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
11
11
|
import { join } from "node:path";
|
|
12
12
|
import { createHash, pbkdf2Sync, randomBytes } from "node:crypto";
|
|
@@ -1,41 +1,36 @@
|
|
|
1
|
-
import "./token-
|
|
2
|
-
import "./
|
|
3
|
-
import "./environment-
|
|
4
|
-
import "./
|
|
5
|
-
import "./
|
|
6
|
-
import "./
|
|
7
|
-
import "./
|
|
8
|
-
import "./
|
|
9
|
-
import "./
|
|
10
|
-
import "./
|
|
11
|
-
import "./
|
|
12
|
-
import "./
|
|
13
|
-
import "./
|
|
14
|
-
import "./
|
|
15
|
-
import "./
|
|
16
|
-
import "./
|
|
17
|
-
import
|
|
18
|
-
import "./
|
|
19
|
-
import "./
|
|
20
|
-
import "./
|
|
21
|
-
import "./
|
|
22
|
-
import "./
|
|
23
|
-
import "./
|
|
24
|
-
import "./
|
|
25
|
-
import "./
|
|
1
|
+
import "./token-CKCBQ4I8.js";
|
|
2
|
+
import "./storage-DdIAHolY.js";
|
|
3
|
+
import "./environment-Dn7irhZr.js";
|
|
4
|
+
import "./config-DCqRQTJ4.js";
|
|
5
|
+
import "./skills-DnegE1A6.js";
|
|
6
|
+
import "./scan-DugxddUU.js";
|
|
7
|
+
import { O as field } from "./resources-BaURbSpY.js";
|
|
8
|
+
import "./orgs-ltP8H0Nl.js";
|
|
9
|
+
import "./ui-hFgji1e8.js";
|
|
10
|
+
import "./spinner-Dcr-Dqdi.js";
|
|
11
|
+
import "./org-BV8wwxwc.js";
|
|
12
|
+
import "./theme-BrUrye-c.js";
|
|
13
|
+
import "./lookup-DkcT4E-5.js";
|
|
14
|
+
import "./types-Dc9U_4kp.js";
|
|
15
|
+
import { n as requireApi, r as projectPackageName, t as LoginRequiredError } from "./session-CfG3gzko.js";
|
|
16
|
+
import "./existing-BQMB_2AG.js";
|
|
17
|
+
import "./paths-Cb1RfjaX.js";
|
|
18
|
+
import { C as starterConfig, E as slugOf, T as writeTemplate, _ as scaffoldFromPaywall, a as devCommand, g as projectDirOf, h as offerMigration, i as detectPackageManager, l as selectWorkspaceInstallNote, n as connectApp, o as initGit, p as migrationFor, r as detectHostApp, s as installDependencies, t as alreadyAProject, u as uniqueSurfaceId, w as writeSurfaceFiles } from "./setup-DQEasPhx.js";
|
|
19
|
+
import "./framework-DW5fqjh4.js";
|
|
20
|
+
import "./login-BMHDhxAx.js";
|
|
21
|
+
import "./browser-BVjaf98V.js";
|
|
22
|
+
import "./login-B7IqDafm.js";
|
|
23
|
+
import "./git-Hf9Wc7Hp.js";
|
|
24
|
+
import "./scope-Cg1AdAfO.js";
|
|
25
|
+
import "./upgrade-D0thxCA4.js";
|
|
26
26
|
import { i as downloadRepoDir, n as PUBLIC_REPO, r as RepoDownloadError, t as PUBLIC_REF } from "./download-DhGd4hOB.js";
|
|
27
|
-
import
|
|
28
|
-
import "./
|
|
29
|
-
import "./
|
|
30
|
-
import "./
|
|
31
|
-
import
|
|
32
|
-
import "./
|
|
33
|
-
import "./
|
|
34
|
-
import { a as devCommand, c as uniqueSurfaceId, i as detectPackageManager, n as connectApp, o as initGit, r as detectHostApp, s as installDependencies, t as alreadyAProject } from "./setup-m94dpT3t.js";
|
|
35
|
-
import "./assets-C_RjojkK.js";
|
|
36
|
-
import "./source-push-CG948HrX.js";
|
|
37
|
-
import "./server-CcZGdYjE.js";
|
|
38
|
-
import { i as startStudio, n as migrationNextSteps, t as askStudio } from "./open-BAqLpTSI.js";
|
|
27
|
+
import "./base-zc1wl_9b.js";
|
|
28
|
+
import "./selection-C439nEhn.js";
|
|
29
|
+
import "./source-DQs6iLtC.js";
|
|
30
|
+
import "./assets-DTAgbWw0.js";
|
|
31
|
+
import "./source-push-MbJjh4Ki.js";
|
|
32
|
+
import "./server-C_aMxzvS.js";
|
|
33
|
+
import { i as startStudio, n as migrationNextSteps, t as askStudio } from "./open-COJE6ryI.js";
|
|
39
34
|
import * as fs from "node:fs";
|
|
40
35
|
import * as path from "node:path";
|
|
41
36
|
import pc from "picocolors";
|
|
@@ -218,18 +213,23 @@ async function runCreate(ctx, options, deps = runtime) {
|
|
|
218
213
|
else ui.warn(`${error instanceof Error ? error.message : String(error)}\nSkipping — the first \`superwall push\` connects you.`);
|
|
219
214
|
}
|
|
220
215
|
const manager = await detectPackageManager(root);
|
|
221
|
-
const
|
|
222
|
-
|
|
216
|
+
const install = options.install ? await installDependencies(ui, target, manager) : {
|
|
217
|
+
installed: false,
|
|
218
|
+
command: `${manager} install`
|
|
219
|
+
};
|
|
220
|
+
if (options.git) await initGit(ui, root);
|
|
223
221
|
const rebuild = await offerRebuild(ctx, options, migration, deps);
|
|
224
222
|
const integrate = detected?.existing.fullyIntegrated ? [] : [{
|
|
225
223
|
label: "superwall integrate",
|
|
226
224
|
children: [{ label: "Set up the SDK in your app" }]
|
|
227
225
|
}];
|
|
228
|
-
const dev = installed ? `cd superwall && ${devCommand(manager)}` : `cd superwall && ${
|
|
226
|
+
const dev = install.installed ? `cd superwall && ${devCommand(manager)}` : `cd superwall && ${install.command} && ${devCommand(manager)}`;
|
|
227
|
+
const note = install.installed || install.command !== `${manager} install` ? void 0 : selectWorkspaceInstallNote(manager, target);
|
|
228
|
+
const devSteps = [{ label: "Open the studio" }, ...note === void 0 ? [] : [{ label: note }]];
|
|
229
229
|
ui.step("Next steps");
|
|
230
230
|
ui.list({ items: from === void 0 ? [{
|
|
231
231
|
label: dev,
|
|
232
|
-
children:
|
|
232
|
+
children: devSteps
|
|
233
233
|
}, ...integrate] : [...migrationNextSteps(rebuild.studio !== void 0, "superwall", from, rebuild.choice).map((label) => ({ label })), ...integrate] });
|
|
234
234
|
if (rebuild.studio !== void 0) await deps.startStudio(target, rebuild.studio.surfaceId);
|
|
235
235
|
}
|
|
@@ -1,13 +1,28 @@
|
|
|
1
|
-
import "./token-
|
|
2
|
-
import "./
|
|
3
|
-
import { S as apiKeyFromEnv } from "./environment-
|
|
4
|
-
import
|
|
5
|
-
import "./
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
1
|
+
import "./token-CKCBQ4I8.js";
|
|
2
|
+
import { n as readSession } from "./storage-DdIAHolY.js";
|
|
3
|
+
import { S as apiKeyFromEnv, x as VERSION } from "./environment-Dn7irhZr.js";
|
|
4
|
+
import "./config-DCqRQTJ4.js";
|
|
5
|
+
import "./skills-DnegE1A6.js";
|
|
6
|
+
import { t as scanProject } from "./scan-DugxddUU.js";
|
|
7
|
+
import "./resources-BaURbSpY.js";
|
|
8
|
+
import "./orgs-ltP8H0Nl.js";
|
|
9
|
+
import { n as ui } from "./ui-hFgji1e8.js";
|
|
10
|
+
import "./spinner-Dcr-Dqdi.js";
|
|
11
|
+
import "./org-BV8wwxwc.js";
|
|
12
|
+
import { n as fg, t as THEME } from "./theme-BrUrye-c.js";
|
|
13
|
+
import "./lookup-DkcT4E-5.js";
|
|
14
|
+
import "./types-Dc9U_4kp.js";
|
|
15
|
+
import "./session-CfG3gzko.js";
|
|
16
|
+
import { l as detectDrivers, t as detectExisting } from "./existing-BQMB_2AG.js";
|
|
17
|
+
import "./paths-Cb1RfjaX.js";
|
|
18
|
+
import "./setup-DQEasPhx.js";
|
|
19
|
+
import "./framework-DW5fqjh4.js";
|
|
20
|
+
import "./login-BMHDhxAx.js";
|
|
21
|
+
import "./browser-BVjaf98V.js";
|
|
22
|
+
import "./login-B7IqDafm.js";
|
|
23
|
+
import "./git-Hf9Wc7Hp.js";
|
|
24
|
+
import "./scope-Cg1AdAfO.js";
|
|
25
|
+
import { m as selectProjectInstall, p as selectCachedLatest, r as isNewerVersion, u as resolveUpdateTag } from "./upgrade-D0thxCA4.js";
|
|
11
26
|
|
|
12
27
|
//#region src/core/support/doctor.ts
|
|
13
28
|
async function runDoctor(ctx, deps = {}) {
|
|
@@ -38,6 +53,7 @@ async function runDoctor(ctx, deps = {}) {
|
|
|
38
53
|
]
|
|
39
54
|
] : [];
|
|
40
55
|
const rows = [
|
|
56
|
+
resolveCliCheck(ctx.installDir),
|
|
41
57
|
[
|
|
42
58
|
drivers.length > 0,
|
|
43
59
|
"Coding agent",
|
|
@@ -78,6 +94,30 @@ async function runDoctor(ctx, deps = {}) {
|
|
|
78
94
|
const failed = rows.filter(([ok]) => !ok).length;
|
|
79
95
|
ui.outro(failed === 0 ? "All checks passed." : `${failed} of ${rows.length} checks need attention.`);
|
|
80
96
|
}
|
|
97
|
+
function resolveCliCheck(installDir) {
|
|
98
|
+
const found = selectProjectInstall(installDir);
|
|
99
|
+
const tag = resolveUpdateTag(found?.version ?? VERSION);
|
|
100
|
+
const project = found && tag !== "latest" ? selectProjectInstall(installDir, tag) : found;
|
|
101
|
+
const version = project ? project.version : VERSION;
|
|
102
|
+
const source = project ? ` from ${project.manifest}` : "";
|
|
103
|
+
const update = project ? project.update : "superwall upgrade";
|
|
104
|
+
if (version === void 0) return [
|
|
105
|
+
false,
|
|
106
|
+
"CLI",
|
|
107
|
+
`unknown version${source} - run \`${update}\``
|
|
108
|
+
];
|
|
109
|
+
const latest = selectCachedLatest(version);
|
|
110
|
+
if (latest === void 0 || !isNewerVersion(latest, version)) return [
|
|
111
|
+
true,
|
|
112
|
+
"CLI",
|
|
113
|
+
`${version}${source}`
|
|
114
|
+
];
|
|
115
|
+
return [
|
|
116
|
+
false,
|
|
117
|
+
"CLI",
|
|
118
|
+
`${version}${source}, ${latest} available - run \`${update}\``
|
|
119
|
+
];
|
|
120
|
+
}
|
|
81
121
|
|
|
82
122
|
//#endregion
|
|
83
123
|
export { runDoctor };
|
package/dist/entry.js
CHANGED
|
@@ -1,34 +1,38 @@
|
|
|
1
1
|
import { n as __require, r as __toESM, t as __commonJS } from "./chunk-DQxbwPpZ.js";
|
|
2
|
-
import "./token-
|
|
3
|
-
import {
|
|
4
|
-
import { T as isNonInteractive, s as CHANNEL, x as VERSION } from "./environment-
|
|
5
|
-
import "./
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import "./
|
|
9
|
-
import
|
|
10
|
-
import "./
|
|
11
|
-
import {
|
|
12
|
-
import { c as onChannel, f as useHost, l as summaryOf, o as examplesOf, r as UsageError, s as flagName } from "./spinner-
|
|
13
|
-
import
|
|
14
|
-
import { t as THEME } from "./theme-
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import "./
|
|
21
|
-
import "./
|
|
22
|
-
import "./
|
|
23
|
-
import "./
|
|
24
|
-
import "./
|
|
25
|
-
import "./
|
|
26
|
-
import "./
|
|
27
|
-
import "./
|
|
28
|
-
import "./
|
|
29
|
-
import "./
|
|
30
|
-
import "./
|
|
31
|
-
import "./
|
|
2
|
+
import "./token-CKCBQ4I8.js";
|
|
3
|
+
import { b as useStores, m as stripAnsi, p as writeJson } from "./storage-DdIAHolY.js";
|
|
4
|
+
import { T as isNonInteractive, s as CHANNEL, x as VERSION } from "./environment-Dn7irhZr.js";
|
|
5
|
+
import { S as superwallApi } from "./config-DCqRQTJ4.js";
|
|
6
|
+
import { O as useAscRefresh } from "./held-D5wSX2Mf.js";
|
|
7
|
+
import { b as maybeShowTelemetryNotice, x as track, y as flushTelemetry } from "./skills-DnegE1A6.js";
|
|
8
|
+
import { t as scanProject } from "./scan-DugxddUU.js";
|
|
9
|
+
import "./resources-BaURbSpY.js";
|
|
10
|
+
import "./orgs-ltP8H0Nl.js";
|
|
11
|
+
import { r as useRenderer, t as silentRenderer } from "./ui-hFgji1e8.js";
|
|
12
|
+
import { c as onChannel, f as useHost, l as summaryOf, o as examplesOf, r as UsageError, s as flagName } from "./spinner-Dcr-Dqdi.js";
|
|
13
|
+
import "./org-BV8wwxwc.js";
|
|
14
|
+
import { t as THEME } from "./theme-BrUrye-c.js";
|
|
15
|
+
import "./lookup-DkcT4E-5.js";
|
|
16
|
+
import "./types-Dc9U_4kp.js";
|
|
17
|
+
import "./session-CfG3gzko.js";
|
|
18
|
+
import { i as wrapReportLine, r as styleMarkdown, t as detectExisting } from "./existing-BQMB_2AG.js";
|
|
19
|
+
import { n as SUPERWALL_HOME, r as expandHome } from "./paths-Cb1RfjaX.js";
|
|
20
|
+
import "./setup-DQEasPhx.js";
|
|
21
|
+
import "./framework-DW5fqjh4.js";
|
|
22
|
+
import "./login-BMHDhxAx.js";
|
|
23
|
+
import "./browser-BVjaf98V.js";
|
|
24
|
+
import "./login-B7IqDafm.js";
|
|
25
|
+
import "./git-Hf9Wc7Hp.js";
|
|
26
|
+
import "./scope-Cg1AdAfO.js";
|
|
27
|
+
import { a as printAutoUpdate, f as selectAutoUpdate, i as maybeNotifyUpdate, n as isGlobalInstall, o as recordAutoUpdate, s as refreshUpdateCheck, t as flushUpdateCheck } from "./upgrade-D0thxCA4.js";
|
|
28
|
+
import { a as exampleLines, i as detailLines, n as listGroups, o as renderPage, r as cmd } from "./registry-CqePfigB.js";
|
|
29
|
+
import "./session-B7frlXXQ.js";
|
|
30
|
+
import "./scope-DDYLQeZw.js";
|
|
31
|
+
import "./client-BwYhzITp.js";
|
|
32
|
+
import "./products-CJq_iXv5.js";
|
|
33
|
+
import "./input-DOT_2Zvb.js";
|
|
34
|
+
import "./timing-BKEEIBij.js";
|
|
35
|
+
import "./notification-url-D6KKeXnk.js";
|
|
32
36
|
import { spawn } from "node:child_process";
|
|
33
37
|
import * as fs from "node:fs";
|
|
34
38
|
import { existsSync, mkdirSync, readFileSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
@@ -36,10 +40,10 @@ import os, { tmpdir } from "node:os";
|
|
|
36
40
|
import * as path from "node:path";
|
|
37
41
|
import { join, resolve } from "node:path";
|
|
38
42
|
import pc from "picocolors";
|
|
39
|
-
import { PassThrough, Stream } from "node:stream";
|
|
40
|
-
import process$1, { cwd, env } from "node:process";
|
|
41
43
|
import ansiEscapes from "ansi-escapes";
|
|
42
44
|
import wrapAnsi from "wrap-ansi";
|
|
45
|
+
import { PassThrough, Stream } from "node:stream";
|
|
46
|
+
import process$1, { cwd, env } from "node:process";
|
|
43
47
|
import tty from "node:tty";
|
|
44
48
|
import { EventEmitter } from "node:events";
|
|
45
49
|
import { Buffer } from "node:buffer";
|
|
@@ -22097,7 +22101,7 @@ var styles_default = styles$2;
|
|
|
22097
22101
|
//#endregion
|
|
22098
22102
|
//#region ../../node_modules/.bun/ink@5.2.1+95f74e15225f916f/node_modules/ink/build/reconciler.js
|
|
22099
22103
|
if (process$1.env["DEV"] === "true") try {
|
|
22100
|
-
await import("./devtools-
|
|
22104
|
+
await import("./devtools-B6Vp6HMy.js");
|
|
22101
22105
|
} catch (error) {
|
|
22102
22106
|
if (error.code === "ERR_MODULE_NOT_FOUND") console.warn(`
|
|
22103
22107
|
The environment variable DEV is set to true, so Ink tried to import \`react-devtools-core\`,
|
|
@@ -27745,15 +27749,15 @@ function startAutoUpdate(version, spawn$1 = spawn, isGlobal = isGlobalInstall) {
|
|
|
27745
27749
|
return false;
|
|
27746
27750
|
}
|
|
27747
27751
|
}
|
|
27748
|
-
function finishTerminal(
|
|
27752
|
+
function finishTerminal(stderr, mode, command, update, start$1 = startAutoUpdate) {
|
|
27749
27753
|
refreshUpdateCheck();
|
|
27750
|
-
if (command === "upgrade") return;
|
|
27754
|
+
if (command === "upgrade" || command === "dev") return;
|
|
27751
27755
|
const version = update ? selectAutoUpdate() : null;
|
|
27752
27756
|
if (version && start$1(version)) {
|
|
27753
|
-
if (mode !== "json") printAutoUpdate(
|
|
27757
|
+
if (mode !== "json") printAutoUpdate(stderr, version);
|
|
27754
27758
|
return;
|
|
27755
27759
|
}
|
|
27756
|
-
|
|
27760
|
+
maybeNotifyUpdate(stderr);
|
|
27757
27761
|
}
|
|
27758
27762
|
const terminalHost = {
|
|
27759
27763
|
api: superwallApi,
|
|
@@ -27770,7 +27774,7 @@ const terminalHost = {
|
|
|
27770
27774
|
starting: (ui, mode) => {
|
|
27771
27775
|
if (mode === "rich") maybeShowTelemetryNotice(ui);
|
|
27772
27776
|
},
|
|
27773
|
-
finishing: (
|
|
27777
|
+
finishing: (_stdout, mode, command, update) => finishTerminal(process.stderr, mode, command, update),
|
|
27774
27778
|
fail: () => {
|
|
27775
27779
|
process.exitCode = 1;
|
|
27776
27780
|
},
|
|
@@ -28019,7 +28023,7 @@ function parseTokens(tokens, flags, strict) {
|
|
|
28019
28023
|
if (error) throw error;
|
|
28020
28024
|
const unknown = /^Unknown arguments?: (.*)$/.exec(message);
|
|
28021
28025
|
if (!unknown?.[1]) throw new UsageError(message);
|
|
28022
|
-
throw new UsageError(`Unknown flag: ${unknown[1].split(", ").map((name) => name.length === 1 ? `-${name}` : `--${name}`).join(", ")}.`);
|
|
28026
|
+
throw new UsageError(`Unknown flag: ${unknown[1].split(", ").map((name) => name.length === 1 ? `-${name}` : `--${kebab(name)}`).join(", ")}.`);
|
|
28023
28027
|
}).parseSync();
|
|
28024
28028
|
const values = {};
|
|
28025
28029
|
for (const [key, value] of Object.entries(argv)) if (key !== "_" && key !== "$0") values[key] = value;
|
|
@@ -28077,7 +28081,8 @@ function resolveLine(tokens, groups) {
|
|
|
28077
28081
|
}
|
|
28078
28082
|
}
|
|
28079
28083
|
function resolveCommand(command, rest, globals) {
|
|
28080
|
-
const
|
|
28084
|
+
const strict = command.kind === "command" || command.strictFlags;
|
|
28085
|
+
const parsed = parseTokens(rest, onChannel(command.flags), strict && !globals.help);
|
|
28081
28086
|
if (globals.help) return {
|
|
28082
28087
|
kind: "help",
|
|
28083
28088
|
command,
|