@superwall/cli 1.6.2 → 2.0.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 +281 -34
- package/dist/apple-CkKlHBZ9.js +195 -0
- package/dist/auth.d.ts +4 -19
- package/dist/auth.js +4 -2
- package/dist/{actions-H7f6knyY.js → billing-XCZU_T46.js} +98 -28
- package/dist/{bind-BIzaGq8K.js → bind-drne__Ys.js} +38 -33
- package/dist/{build-B7BS1rF2.js → build-Gpdq5QXP.js} +20 -26
- package/dist/client-BZ1UbpXz.js +66 -0
- package/dist/client-DP6Rc0t_.js +176 -0
- package/dist/config-BO1Y87kV.js +105 -0
- package/dist/create-BBrtgUgS.js +969 -0
- package/dist/{create-CwnnNqv4.js → create-Cwc3SRWJ.js} +194 -168
- package/dist/create-Yvf2gStM.js +19 -0
- package/dist/doctor-C9ldpPFC.js +83 -0
- package/dist/{drivers-6RMOPIdn.js → drivers-DNrx4LWA.js} +185 -172
- package/dist/entry.d.ts +0 -5
- package/dist/entry.js +28083 -801
- package/dist/environment-DF1qKlny.js +58 -0
- package/dist/{existing-DHpPn1y6.js → existing-78LWSsqS.js} +12 -6
- package/dist/held-Cy8Wl4D1.js +1112 -0
- package/dist/held-Ddw1XSsr.js +16 -0
- package/dist/input-vi0bou04.js +42 -0
- package/dist/{integrate-BR2LR-EK.js → integrate-DcJhpXy8.js} +277 -253
- package/dist/kinds-GFXB3sYu.js +11 -0
- package/dist/log-NVhVe_oe.js +62 -0
- package/dist/login-B2TsCE2H.js +53 -0
- package/dist/login-BoBe8Psl.js +16 -0
- package/dist/{login-Bhxgqwtm.js → login-D0lh3_JI.js} +144 -66
- package/dist/lookup-D-nmmAbw.js +71 -0
- package/dist/migrate-Cfec564E.js +274 -0
- package/dist/notification-url-YDbq6FMA.js +100 -0
- package/dist/{open-studio-BnVD6tJ9.js → open-Ba2vBl1_.js} +34 -43
- package/dist/org-D0g_q3mv.js +35 -0
- package/dist/output-Ggzq5_-t.js +122 -0
- package/dist/paths-DxSLdpOI.js +29 -0
- package/dist/playbook-DIeb7hne.js +53 -0
- package/dist/{asc-products-Dvcyef3_.js → products-DH_fK9tY.js} +6 -39
- package/dist/promote-COD4fYdz.js +91 -0
- package/dist/push-CncywhkQ.js +482 -0
- package/dist/push-CtD4FZQV.js +22 -0
- package/dist/registry-DSrosOYs.js +10228 -0
- package/dist/{reports-DqMs9xNR.js → reports-DdPq4blM.js} +7 -6
- package/dist/{resources-Bf9O1JNM.js → resources-Dqr01Dep.js} +150 -55
- package/dist/{run-D-NbZLpj.js → run-C9qg_QlC.js} +16 -22
- package/dist/scan-Cv5uOwVY.js +4 -0
- package/dist/{scan-BmAW413l.js → scan-DLrsrFS9.js} +48 -37
- package/dist/scope-V336uz8j.js +198 -0
- package/dist/screenshot-file-0UETadF8.js +16 -0
- package/dist/{selection-BGi6GyxC.js → selection-Rdw-ZUoG.js} +94 -51
- package/dist/send-BxD9yf6F.js +150 -0
- package/dist/{dev-CgGAb5Al.js → server-D0tGG8C4.js} +82 -87
- package/dist/server-z1LH94R_.js +22 -0
- package/dist/session-1AV_Bs_d.js +6 -0
- package/dist/session-CFAmMhem.js +40 -0
- package/dist/session-D_nEWKXT.js +768 -0
- package/dist/skills/animate-onboarding/SKILL.md +467 -0
- package/dist/skills/animate-onboarding/references/engine.md +494 -0
- package/dist/skills/animate-onboarding/references/framework/Question.tsx +71 -0
- package/dist/skills/animate-onboarding/references/framework/README.md +40 -0
- package/dist/skills/animate-onboarding/references/framework/answers.ts +19 -0
- package/dist/skills/animate-onboarding/references/framework/flow.ts +80 -0
- package/dist/skills/animate-onboarding/references/framework/handoffs.ts +869 -0
- package/dist/skills/animate-onboarding/references/framework/layout.tsx +113 -0
- package/dist/skills/animate-onboarding/references/framework/motion.css +559 -0
- package/dist/skills/animate-onboarding/references/framework/useStoryRouter.ts +48 -0
- package/dist/skills/animate-onboarding/references/handoffs.md +375 -0
- package/dist/skills/animate-onboarding/references/imageReady.ts +92 -0
- package/dist/skills/animate-onboarding/references/morphFrame.ts +356 -0
- package/dist/skills/animate-onboarding/references/performance.md +41 -0
- package/dist/skills/animate-onboarding/references/web-runtime/README.md +17 -0
- package/dist/skills/animate-onboarding/references/web-runtime/handoffs.ts +858 -0
- package/dist/skills/animate-onboarding/references/web-runtime/story-motion.css +301 -0
- package/dist/skills/index.json +37 -0
- package/dist/skills/mobile-design/SKILL.md +447 -0
- package/dist/skills/mobile-design/references/responsive.md +162 -0
- package/dist/skills/onboarding-questions/SKILL.md +231 -0
- package/dist/skills/onboarding-questions/references/arpu-questions.md +139 -0
- package/dist/skills/onboarding-questions/references/craft.md +142 -0
- package/dist/skills/onboarding-questions/references/example-reflective.md +117 -0
- package/dist/skills/superwall/SKILL.md +82 -9
- package/dist/skills/superwall/references/api.md +153 -37
- package/dist/skills/superwall/references/apple-setup.md +316 -0
- package/dist/skills/superwall/references/asc.md +74 -38
- package/dist/skills/superwall/references/data-analytics.md +55 -21
- package/dist/skills/superwall/workflows/dashboard/playbook.md +3 -3
- package/dist/skills/superwall/workflows/dashboard/setup.md +8 -8
- package/dist/skills/superwall/workflows/migrate/adapty.md +6 -6
- package/dist/skills/superwall/workflows/migrate/playbook.md +4 -4
- package/dist/skills/superwall/workflows/migrate/qonversion.md +5 -5
- package/dist/skills/superwall/workflows/migrate/revenuecat.md +6 -6
- package/dist/skills/superwall/workflows/placements/android.md +2 -2
- package/dist/skills/superwall/workflows/placements/expo.md +2 -2
- package/dist/skills/superwall/workflows/placements/flutter.md +2 -2
- package/dist/skills/superwall/workflows/placements/ios.md +2 -2
- package/dist/skills/superwall/workflows/placements/playbook.md +2 -2
- package/dist/skills/superwall/workflows/placements/react-native.md +2 -2
- package/dist/skills/superwall/workflows/placements/strategy.md +2 -2
- package/dist/skills/superwall/workflows/review/playbook.md +1 -1
- package/dist/skills/superwall-editor/SKILL.md +61 -0
- package/dist/skills/superwall-editor/references/cli.md +135 -0
- package/dist/skills/superwall-editor/references/design.md +51 -0
- package/dist/skills/superwall-editor/references/native-elements.md +171 -0
- package/dist/skills/superwall-editor/references/workflow.md +65 -0
- package/dist/skills/superwall-editor/scripts/sw-editor.sh +662 -0
- package/dist/skills/superwall-framework/SKILL.md +78 -28
- package/dist/skills/superwall-framework/references/cli.md +58 -28
- package/dist/skills/superwall-framework/references/examples.md +4 -3
- package/dist/skills/superwall-framework/references/layout.md +30 -8
- package/dist/skills/superwall-framework/references/migrate-from-editor.md +1 -1
- package/dist/skills/superwall-framework/references/onboarding-state.md +245 -0
- package/dist/skills/wwdc/SKILL.md +22 -0
- package/dist/skills/wwdc/references/docs.md +52 -0
- package/dist/skills/wwdc/scripts/wwdc.sh +266 -0
- package/dist/{skills-AxAf7bDB.js → skills-BvFOa4y6.js} +99 -122
- package/dist/skills-DMG4bpKk.js +14 -0
- package/dist/{spawn-DSoTXy_j.js → spawn-DmmmHIP-.js} +14 -12
- package/dist/spinner-CneRK5rk.js +294 -0
- package/dist/storage-DYvmIOHa.d.ts +16 -0
- package/dist/storage-s2Dnz-yl.js +31 -0
- package/dist/storekit-DafAnGkM.js +16 -0
- package/dist/storekit-yY_kS2iR.js +47 -0
- package/dist/telemetry-DtG92m5O.js +56 -0
- package/dist/theme-DUsCh-Vd.js +25 -0
- package/dist/timing-BVxPrYq3.js +5 -0
- package/dist/{token-BGAVPSQc.js → token-DzRh7dI1.js} +6 -38
- package/dist/tools.d.ts +96 -0
- package/dist/tools.js +11178 -0
- package/dist/ui-D_qf3Gvw.js +53 -0
- package/dist/upgrade-Bt4Ouw1y.js +117 -0
- package/dist/upgrade-Cqy5orjb.js +7 -0
- package/package.json +10 -5
- package/dist/api-Dv3LyZ5m.js +0 -151
- package/dist/api-output-aJNw7Syy.js +0 -20
- package/dist/app-mJC5NDtW.js +0 -189
- package/dist/asa-D6H7Pjae.js +0 -1194
- package/dist/asc-xCin0akG.js +0 -539
- package/dist/auth-ZlLL-Gko.js +0 -139
- package/dist/billing-C8kBge_S.js +0 -80
- package/dist/command-3fGYyC8r.js +0 -301
- package/dist/dev-Dx99K183.js +0 -22
- package/dist/doctor-CyUvut31.js +0 -88
- package/dist/feedback-RKyGuQ8_.js +0 -152
- package/dist/hosted-BeGVAntr.js +0 -32
- package/dist/migrate-C-4ISELN.js +0 -284
- package/dist/org-CQduIOic.js +0 -40
- package/dist/output-C-4UKMot.js +0 -136
- package/dist/params-l3CrvRtR.js +0 -51
- package/dist/pipeline-CHX0Syre.js +0 -977
- package/dist/print-skill-BiZLdCKv.js +0 -74
- package/dist/promote-Pgpz-3xl.js +0 -88
- package/dist/publish-BPeuc3lq.js +0 -35
- package/dist/push-DcSQ4odB.js +0 -35
- package/dist/query-CWLaZkdm.js +0 -53
- package/dist/resource-jwASPCrw.js +0 -483
- package/dist/skills-FK5aDuNV.js +0 -64
- package/dist/spinner-DFctF_Jw.js +0 -18
- package/dist/storekit-CC4gnTI6.js +0 -29
- package/dist/telemetry-Ch9cCTI-.js +0 -169
- package/dist/ui-4gLyfrgl.js +0 -27737
- package/dist/update-DIXbL-H9.js +0 -59
- package/dist/upgrade-De7JMI1g.js +0 -72
- /package/dist/{devtools-8EgLo86w.js → devtools-ByZ6XYnn.js} +0 -0
package/dist/update-DIXbL-H9.js
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { y as VERSION } from "./output-C-4UKMot.js";
|
|
2
|
-
import { d as getUpdateCheck, g as setUpdateCheck } from "./telemetry-Ch9cCTI-.js";
|
|
3
|
-
import pc from "picocolors";
|
|
4
|
-
|
|
5
|
-
//#region src/core/update.ts
|
|
6
|
-
const CHECK_INTERVAL_MS = 1440 * 60 * 1e3;
|
|
7
|
-
const REGISTRY_URL = "https://registry.npmjs.org/superwall/latest";
|
|
8
|
-
const pending = [];
|
|
9
|
-
function isNewerVersion(latest, current) {
|
|
10
|
-
const l = latest.split(".").map((n) => parseInt(n, 10));
|
|
11
|
-
const c = current.split(".").map((n) => parseInt(n, 10));
|
|
12
|
-
for (let i = 0; i < 3; i++) {
|
|
13
|
-
const a = l[i] ?? 0;
|
|
14
|
-
const b = c[i] ?? 0;
|
|
15
|
-
if (Number.isNaN(a) || Number.isNaN(b)) return false;
|
|
16
|
-
if (a !== b) return a > b;
|
|
17
|
-
}
|
|
18
|
-
return false;
|
|
19
|
-
}
|
|
20
|
-
async function fetchLatestVersion() {
|
|
21
|
-
try {
|
|
22
|
-
const res = await fetch(REGISTRY_URL, {
|
|
23
|
-
headers: { accept: "application/json" },
|
|
24
|
-
signal: AbortSignal.timeout(5e3)
|
|
25
|
-
});
|
|
26
|
-
if (!res.ok) return null;
|
|
27
|
-
const { version } = await res.json();
|
|
28
|
-
return version ?? null;
|
|
29
|
-
} catch {
|
|
30
|
-
return null;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
function availableUpdate() {
|
|
34
|
-
const cached = getUpdateCheck();
|
|
35
|
-
return cached?.latest && isNewerVersion(cached.latest, VERSION) ? cached.latest : null;
|
|
36
|
-
}
|
|
37
|
-
function refreshUpdateCheck() {
|
|
38
|
-
if (process.env.NODE_TEST_CONTEXT) return;
|
|
39
|
-
const cached = getUpdateCheck();
|
|
40
|
-
if ((cached?.checkedAt ? Date.now() - Date.parse(cached.checkedAt) : Infinity) < CHECK_INTERVAL_MS) return;
|
|
41
|
-
pending.push(fetchLatestVersion().then((version) => {
|
|
42
|
-
if (version) setUpdateCheck({
|
|
43
|
-
latest: version,
|
|
44
|
-
checkedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
45
|
-
});
|
|
46
|
-
}));
|
|
47
|
-
}
|
|
48
|
-
async function flushUpdateCheck(capMs = 2e3) {
|
|
49
|
-
if (pending.length === 0) return;
|
|
50
|
-
await Promise.race([Promise.allSettled(pending), new Promise((done) => setTimeout(done, capMs).unref())]);
|
|
51
|
-
}
|
|
52
|
-
function maybeNotifyUpdate(stream) {
|
|
53
|
-
const latest = availableUpdate();
|
|
54
|
-
if (!latest) return;
|
|
55
|
-
stream.write(`${pc.dim(`Update available ${VERSION} → ${latest} · run \`superwall upgrade\``)}\n`);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
//#endregion
|
|
59
|
-
export { refreshUpdateCheck as a, maybeNotifyUpdate as i, flushUpdateCheck as n, isNewerVersion as r, fetchLatestVersion as t };
|
package/dist/upgrade-De7JMI1g.js
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { y as VERSION } from "./output-C-4UKMot.js";
|
|
2
|
-
import { g as setUpdateCheck } from "./telemetry-Ch9cCTI-.js";
|
|
3
|
-
import { r as isNewerVersion, t as fetchLatestVersion } from "./update-DIXbL-H9.js";
|
|
4
|
-
import "./token-BGAVPSQc.js";
|
|
5
|
-
import { t as defineCommand } from "./command-3fGYyC8r.js";
|
|
6
|
-
import "./ui-4gLyfrgl.js";
|
|
7
|
-
import { r as spawnStream } from "./spawn-DSoTXy_j.js";
|
|
8
|
-
|
|
9
|
-
//#region src/commands/account/upgrade.ts
|
|
10
|
-
const runUpgrade = defineCommand({
|
|
11
|
-
name: "upgrade",
|
|
12
|
-
output: "both",
|
|
13
|
-
async run(ctx) {
|
|
14
|
-
const { ui } = ctx;
|
|
15
|
-
if (process.argv[1]?.includes("_npx")) {
|
|
16
|
-
if (ctx.json) return ctx.output.data({
|
|
17
|
-
upgraded: false,
|
|
18
|
-
via: "npx"
|
|
19
|
-
});
|
|
20
|
-
ui.info("You're running via npx, which always fetches the latest published version - nothing to upgrade.");
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
ui.intro("Superwall upgrade");
|
|
24
|
-
const spin = ui.spinner();
|
|
25
|
-
spin.start("Checking the latest version");
|
|
26
|
-
const latest = await fetchLatestVersion();
|
|
27
|
-
if (!latest) {
|
|
28
|
-
spin.stop("Check failed");
|
|
29
|
-
throw new Error("Couldn't reach the npm registry - try again.");
|
|
30
|
-
}
|
|
31
|
-
if (!isNewerVersion(latest, VERSION)) {
|
|
32
|
-
spin.stop(`You're on the latest version (\`${VERSION}\`)`);
|
|
33
|
-
if (ctx.json) return ctx.output.data({
|
|
34
|
-
upgraded: false,
|
|
35
|
-
version: VERSION
|
|
36
|
-
});
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
spin.message(`Upgrading \`${VERSION}\` → \`${latest}\``);
|
|
40
|
-
const errors = [];
|
|
41
|
-
const { code } = await spawnStream({
|
|
42
|
-
bin: "npm",
|
|
43
|
-
args: [
|
|
44
|
-
"install",
|
|
45
|
-
"--global",
|
|
46
|
-
`superwall@${latest}`
|
|
47
|
-
],
|
|
48
|
-
cwd: process.cwd(),
|
|
49
|
-
onStdoutLine: () => {},
|
|
50
|
-
onStderrLine: (line) => errors.push(line)
|
|
51
|
-
});
|
|
52
|
-
if (code !== 0) {
|
|
53
|
-
spin.stop("Upgrade failed");
|
|
54
|
-
const detail = errors.slice(-3).join(" ").trim();
|
|
55
|
-
throw new Error(`npm couldn't upgrade the package${detail ? ` (${detail.slice(0, 200)})` : ""}. Try: npm install --global superwall@latest`);
|
|
56
|
-
}
|
|
57
|
-
setUpdateCheck({
|
|
58
|
-
latest,
|
|
59
|
-
checkedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
60
|
-
});
|
|
61
|
-
spin.stop(`Upgraded \`${VERSION}\` → \`${latest}\``);
|
|
62
|
-
if (ctx.json) return ctx.output.data({
|
|
63
|
-
upgraded: true,
|
|
64
|
-
from: VERSION,
|
|
65
|
-
to: latest
|
|
66
|
-
});
|
|
67
|
-
ui.outro("You're on the latest version.");
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
//#endregion
|
|
72
|
-
export { runUpgrade };
|
|
File without changes
|