@superwall/cli 1.7.0 → 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 +192 -52
- package/dist/{setup-Bxj22rYi.js → apple-CkKlHBZ9.js} +82 -76
- package/dist/auth.d.ts +4 -19
- package/dist/auth.js +4 -2
- package/dist/{actions-B7ym3oVS.js → billing-XCZU_T46.js} +98 -28
- package/dist/{bind-YrJvuRF9.js → bind-drne__Ys.js} +38 -33
- package/dist/{build-DLoCW5Ri.js → build-Gpdq5QXP.js} +20 -26
- package/dist/{asc-Bf7zBbyS.js → client-BZ1UbpXz.js} +16 -15
- package/dist/client-DP6Rc0t_.js +176 -0
- package/dist/config-BO1Y87kV.js +105 -0
- package/dist/{notification-url-DuKF2659.js → create-BBrtgUgS.js} +235 -539
- package/dist/{create-pkANt1Gs.js → create-Cwc3SRWJ.js} +194 -168
- package/dist/create-Yvf2gStM.js +19 -0
- package/dist/doctor-C9ldpPFC.js +83 -0
- package/dist/{drivers-Qx9LxmRN.js → drivers-DNrx4LWA.js} +185 -172
- package/dist/entry.d.ts +0 -5
- package/dist/entry.js +28073 -1134
- package/dist/environment-DF1qKlny.js +58 -0
- package/dist/{existing-AVEfZu2A.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-brmhPG-S.js → integrate-DcJhpXy8.js} +277 -254
- 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-Do4wFuLv.js → login-D0lh3_JI.js} +118 -55
- 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-DOw-6ydc.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-9JXtDxI4.js → products-DH_fK9tY.js} +6 -6
- 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-CfJqoava.js → reports-DdPq4blM.js} +7 -6
- package/dist/{resources-Bf9O1JNM.js → resources-Dqr01Dep.js} +150 -55
- package/dist/{run-DsVZ5snL.js → run-C9qg_QlC.js} +16 -22
- package/dist/scan-Cv5uOwVY.js +4 -0
- package/dist/{scan-zKsddO72.js → scan-DLrsrFS9.js} +48 -37
- package/dist/scope-V336uz8j.js +198 -0
- package/dist/screenshot-file-0UETadF8.js +16 -0
- package/dist/{selection-CxZoX4NT.js → selection-Rdw-ZUoG.js} +94 -51
- package/dist/send-BxD9yf6F.js +150 -0
- package/dist/{dev-DmB3XqaJ.js → server-D0tGG8C4.js} +82 -92
- 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-DPzlnfCK.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-C0it-Xh7.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-CZzirVMj.js +0 -151
- package/dist/api-output-aJNw7Syy.js +0 -20
- package/dist/app-DH6U8yuI.js +0 -190
- package/dist/asa-C-sQzPPn.js +0 -1194
- package/dist/asc-1ZBJ6DwS.js +0 -778
- package/dist/auth-YRhlV3DE.js +0 -140
- package/dist/billing-CCYHdApx.js +0 -80
- package/dist/bundle-id-CKxl_026.js +0 -121
- package/dist/command-CMIz81Da.js +0 -301
- package/dist/dev-DZy6pOnB.js +0 -22
- package/dist/doctor-H-hf-Yww.js +0 -88
- package/dist/feedback-CKf-rpBW.js +0 -152
- package/dist/hosted-CXe9TrWx.js +0 -32
- package/dist/migrate-C9ERDR6y.js +0 -284
- package/dist/org-sj7uyvp-.js +0 -40
- package/dist/output-C4o2gJ1K.js +0 -146
- package/dist/params-l3CrvRtR.js +0 -51
- package/dist/pipeline-BqzqZhX1.js +0 -977
- package/dist/print-skill-ZojRSybs.js +0 -74
- package/dist/promote-BG8X4Nv_.js +0 -88
- package/dist/publish-sxLh-G4G.js +0 -35
- package/dist/push-bQ6Vxtg8.js +0 -35
- package/dist/query-_FbybaH-.js +0 -53
- package/dist/resource-CGIwSd29.js +0 -323
- package/dist/revenue-provider-ebsRINY8.js +0 -100
- package/dist/scope-BvzD-kO4.js +0 -223
- package/dist/skills-D_R-lEsK.js +0 -64
- package/dist/spinner-TWa0hia6.js +0 -18
- package/dist/storekit-Cj9Cpjcz.js +0 -29
- package/dist/telemetry-DeA1mvnT.js +0 -169
- package/dist/ui-Dy0b-9L8.js +0 -27738
- package/dist/update-B2fWIc4q.js +0 -59
- package/dist/upgrade-BmzkTKrh.js +0 -72
- /package/dist/{devtools-8EgLo86w.js → devtools-ByZ6XYnn.js} +0 -0
package/dist/output-C4o2gJ1K.js
DELETED
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
import { join } from "node:path";
|
|
2
|
-
import { homedir } from "node:os";
|
|
3
|
-
import { stripVTControlCharacters } from "node:util";
|
|
4
|
-
|
|
5
|
-
//#region package.json
|
|
6
|
-
var version = "1.7.0";
|
|
7
|
-
|
|
8
|
-
//#endregion
|
|
9
|
-
//#region src/environment.ts
|
|
10
|
-
const VERSION = version;
|
|
11
|
-
const DASHBOARD_URL = "https://superwall.com/dashboard";
|
|
12
|
-
const ENV_API_KEY = "SUPERWALL_API_KEY";
|
|
13
|
-
const CHANNELS = {
|
|
14
|
-
latest: { skillsRef: "main" },
|
|
15
|
-
next: { skillsRef: "next" }
|
|
16
|
-
};
|
|
17
|
-
const isChannel = (value) => value !== void 0 && value in CHANNELS;
|
|
18
|
-
const CHANNEL = () => {
|
|
19
|
-
const value = process.env.SUPERWALL_CHANNEL?.trim();
|
|
20
|
-
return isChannel(value) ? value : "latest";
|
|
21
|
-
};
|
|
22
|
-
const AGENT_SKILLS_DIR = () => process.env.SUPERWALL_AGENT_SKILLS_DIR ?? join(homedir(), ".agents", "skills");
|
|
23
|
-
const SUPERWALL_HOME = () => {
|
|
24
|
-
const value = process.env.SUPERWALL_HOME;
|
|
25
|
-
return value && value.trim() !== "" ? value.trim() : void 0;
|
|
26
|
-
};
|
|
27
|
-
const host = (name, fallback) => {
|
|
28
|
-
const value = process.env[name];
|
|
29
|
-
return value && value.trim() !== "" ? value.trim() : fallback;
|
|
30
|
-
};
|
|
31
|
-
const AUTH_HOST = () => host("SUPERWALL_AUTH_HOST", "https://auth.superwall.com");
|
|
32
|
-
const ASSET_HOST = () => host("SUPERWALL_ASSET_HOST", "https://user-content.superwalleditor.com/user-content/hl");
|
|
33
|
-
const API_HOST = () => host("SUPERWALL_API_HOST", "https://api.superwall.com");
|
|
34
|
-
const CLI_CLIENT_ID = () => host("SUPERWALL_CLI_CLIENT_ID", "client_01KWEWM154D2T28NZAS02B8MWT");
|
|
35
|
-
const OAUTH_SCOPE = "openid profile email offline_access";
|
|
36
|
-
const TELEMETRY_HOST = () => host("SUPERWALL_TELEMETRY_HOST", "https://us.i.posthog.com");
|
|
37
|
-
const TELEMETRY_KEY = () => host("SUPERWALL_TELEMETRY_KEY", "phc_obWpK8cuSfhNkZUKmDByATHp928RHPRD5DoMEDreAHS6");
|
|
38
|
-
let Integration = /* @__PURE__ */ function(Integration$1) {
|
|
39
|
-
Integration$1["swift"] = "swift";
|
|
40
|
-
Integration$1["android"] = "android";
|
|
41
|
-
Integration$1["expo"] = "expo";
|
|
42
|
-
Integration$1["reactNative"] = "react-native";
|
|
43
|
-
Integration$1["flutter"] = "flutter";
|
|
44
|
-
Integration$1["web"] = "web";
|
|
45
|
-
return Integration$1;
|
|
46
|
-
}({});
|
|
47
|
-
function apiKeyFromEnv() {
|
|
48
|
-
const v = process.env[ENV_API_KEY];
|
|
49
|
-
return v && v.trim() ? v.trim() : void 0;
|
|
50
|
-
}
|
|
51
|
-
const ENV_APPLE_ID = "SUPERWALL_APPLE_ID";
|
|
52
|
-
const ENV_APPLE_PASSWORD = "SUPERWALL_APPLE_PASSWORD";
|
|
53
|
-
function appleCredentialsFromEnv() {
|
|
54
|
-
const appleId = process.env[ENV_APPLE_ID]?.trim();
|
|
55
|
-
const password = process.env[ENV_APPLE_PASSWORD];
|
|
56
|
-
return {
|
|
57
|
-
...appleId ? { appleId } : {},
|
|
58
|
-
...password ? { password } : {}
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
function isNonInteractive() {
|
|
62
|
-
return !process.stdout.isTTY || !process.stdin.isTTY || process.env.CI === "true";
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
//#endregion
|
|
66
|
-
//#region src/output.ts
|
|
67
|
-
function formatJson(value) {
|
|
68
|
-
return JSON.stringify(value, null, 2);
|
|
69
|
-
}
|
|
70
|
-
const blocks = {
|
|
71
|
-
intro: (text) => ({
|
|
72
|
-
kind: "intro",
|
|
73
|
-
text
|
|
74
|
-
}),
|
|
75
|
-
step: (text) => ({
|
|
76
|
-
kind: "step",
|
|
77
|
-
text
|
|
78
|
-
}),
|
|
79
|
-
info: (text) => ({
|
|
80
|
-
kind: "info",
|
|
81
|
-
text
|
|
82
|
-
}),
|
|
83
|
-
success: (text) => ({
|
|
84
|
-
kind: "success",
|
|
85
|
-
text
|
|
86
|
-
}),
|
|
87
|
-
warning: (text) => ({
|
|
88
|
-
kind: "warning",
|
|
89
|
-
text
|
|
90
|
-
}),
|
|
91
|
-
report: (text) => ({
|
|
92
|
-
kind: "report",
|
|
93
|
-
text
|
|
94
|
-
}),
|
|
95
|
-
list: (value) => ({
|
|
96
|
-
kind: "list",
|
|
97
|
-
value
|
|
98
|
-
}),
|
|
99
|
-
nextSteps: (items) => ({
|
|
100
|
-
kind: "nextSteps",
|
|
101
|
-
items
|
|
102
|
-
}),
|
|
103
|
-
outro: (text) => ({
|
|
104
|
-
kind: "outro",
|
|
105
|
-
text
|
|
106
|
-
})
|
|
107
|
-
};
|
|
108
|
-
function writeJson(stream, value) {
|
|
109
|
-
stream.write(`${formatJson(value)}\n`);
|
|
110
|
-
}
|
|
111
|
-
function createCommandOutput(mode, renderer, streams = { stdout: process.stdout }) {
|
|
112
|
-
return {
|
|
113
|
-
mode,
|
|
114
|
-
data(value) {
|
|
115
|
-
if (mode === "json") writeJson(streams.stdout, value);
|
|
116
|
-
else renderer.report(formatJson(value));
|
|
117
|
-
},
|
|
118
|
-
text(value) {
|
|
119
|
-
if (mode === "json") throw new Error("This command must return structured JSON in --json mode.");
|
|
120
|
-
const text = value.replace(/\n$/, "");
|
|
121
|
-
renderer.report(mode === "text" ? stripVTControlCharacters(text) : text);
|
|
122
|
-
},
|
|
123
|
-
render(...blocks$1) {
|
|
124
|
-
if (mode === "json") return;
|
|
125
|
-
for (const block of blocks$1) renderBlock(renderer, block);
|
|
126
|
-
}
|
|
127
|
-
};
|
|
128
|
-
}
|
|
129
|
-
function renderBlock(renderer, block) {
|
|
130
|
-
switch (block.kind) {
|
|
131
|
-
case "intro": return renderer.intro(block.text);
|
|
132
|
-
case "step": return renderer.step(block.text);
|
|
133
|
-
case "info": return renderer.info(block.text);
|
|
134
|
-
case "success": return renderer.success(block.text);
|
|
135
|
-
case "warning": return renderer.warn(block.text);
|
|
136
|
-
case "report": return renderer.report(block.text);
|
|
137
|
-
case "list": return renderer.list(block.value);
|
|
138
|
-
case "nextSteps":
|
|
139
|
-
if (block.items.length) renderer.note(block.items.map((item, index) => `${index + 1}. ${item}`).join("\n"), "Next steps");
|
|
140
|
-
return;
|
|
141
|
-
case "outro": return renderer.outro(block.text);
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
//#endregion
|
|
146
|
-
export { appleCredentialsFromEnv as C, apiKeyFromEnv as S, OAUTH_SCOPE as _, AGENT_SKILLS_DIR as a, TELEMETRY_KEY as b, AUTH_HOST as c, CLI_CLIENT_ID as d, DASHBOARD_URL as f, Integration as g, ENV_APPLE_PASSWORD as h, writeJson as i, CHANNEL as l, ENV_APPLE_ID as m, createCommandOutput as n, API_HOST as o, ENV_API_KEY as p, formatJson as r, ASSET_HOST as s, blocks as t, CHANNELS as u, SUPERWALL_HOME as v, isNonInteractive as w, VERSION as x, TELEMETRY_HOST as y };
|
package/dist/params-l3CrvRtR.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
//#region src/commands/platform/params.ts
|
|
2
|
-
function parseParams(pairs) {
|
|
3
|
-
const root = {};
|
|
4
|
-
for (const pair of pairs ?? []) {
|
|
5
|
-
const eq = pair.indexOf("=");
|
|
6
|
-
if (eq < 0) throw new Error(`Invalid -d "${pair}" - expected key=value (or key:=jsonValue).`);
|
|
7
|
-
const typed = pair[eq - 1] === ":";
|
|
8
|
-
const key = pair.slice(0, typed ? eq - 1 : eq);
|
|
9
|
-
const raw = pair.slice(eq + 1);
|
|
10
|
-
const value = typed ? parseTyped(raw, pair) : raw;
|
|
11
|
-
setPath(root, splitKey(key), value);
|
|
12
|
-
}
|
|
13
|
-
return root;
|
|
14
|
-
}
|
|
15
|
-
function parseTyped(raw, pair) {
|
|
16
|
-
try {
|
|
17
|
-
return JSON.parse(raw);
|
|
18
|
-
} catch {
|
|
19
|
-
throw new Error(`Invalid -d "${pair}" - value after := must be JSON (number, true/false, null, "quoted", [...], {...}).`);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
function splitKey(key) {
|
|
23
|
-
return key.replace(/\]/g, "").split("[").filter((p) => p !== "");
|
|
24
|
-
}
|
|
25
|
-
function setPath(root, parts, value) {
|
|
26
|
-
let cur = root;
|
|
27
|
-
for (let i = 0; i < parts.length; i++) {
|
|
28
|
-
const key = parts[i];
|
|
29
|
-
if (i === parts.length - 1) {
|
|
30
|
-
assign(cur, key, value);
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
const nextIsIndex = /^\d+$/.test(parts[i + 1]);
|
|
34
|
-
let next = get(cur, key);
|
|
35
|
-
if (next === void 0) {
|
|
36
|
-
next = nextIsIndex ? [] : {};
|
|
37
|
-
assign(cur, key, next);
|
|
38
|
-
}
|
|
39
|
-
cur = next;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
function get(container, key) {
|
|
43
|
-
return Array.isArray(container) ? container[Number(key)] : container[key];
|
|
44
|
-
}
|
|
45
|
-
function assign(container, key, value) {
|
|
46
|
-
if (Array.isArray(container)) container[Number(key)] = value;
|
|
47
|
-
else container[key] = value;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
//#endregion
|
|
51
|
-
export { parseParams as t };
|