@superwall/cli 2.0.0 → 2.1.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 +3 -2
- package/dist/{apple-CkKlHBZ9.js → apple-BHbX0jbn.js} +13 -13
- package/dist/auth.d.ts +1 -1
- package/dist/auth.js +3 -3
- package/dist/{billing-XCZU_T46.js → billing-4zhIBFRQ.js} +3 -3
- package/dist/{bind-drne__Ys.js → bind-CHLHmxgA.js} +4 -4
- package/dist/{build-Gpdq5QXP.js → build-5PQeSnNN.js} +6 -6
- package/dist/{client-DP6Rc0t_.js → client-BIvOmWPC.js} +7 -3
- package/dist/{create-BBrtgUgS.js → create-BSNIFsnN.js} +6 -6
- package/dist/{create-Cwc3SRWJ.js → create-VK-pNfN7.js} +23 -23
- package/dist/create-oj3zXvHZ.js +19 -0
- package/dist/{doctor-C9ldpPFC.js → doctor-9JS96QkX.js} +6 -6
- package/dist/{drivers-DNrx4LWA.js → drivers-BamBJ10Y.js} +3 -3
- package/dist/entry.js +20 -21
- package/dist/{environment-DF1qKlny.js → environment-eV7LEnSN.js} +15 -2
- package/dist/{existing-78LWSsqS.js → existing-C8dSYHGk.js} +2 -2
- package/dist/{held-Cy8Wl4D1.js → held-BMisHn8F.js} +6 -6
- package/dist/held-DeJW2gUk.js +16 -0
- package/dist/{integrate-DcJhpXy8.js → integrate-VWtTNPCr.js} +22 -22
- package/dist/login-2JHCG6c1.js +16 -0
- package/dist/{login-D0lh3_JI.js → login-BimbukE5.js} +5 -5
- package/dist/{login-B2TsCE2H.js → login-BmwG14LC.js} +1 -1
- package/dist/{lookup-D-nmmAbw.js → lookup-k9EeOiZr.js} +2 -2
- package/dist/{migrate-Cfec564E.js → migrate-C86h6jeF.js} +22 -22
- package/dist/{notification-url-YDbq6FMA.js → notification-url-BVaTgWZ5.js} +2 -2
- package/dist/{open-Ba2vBl1_.js → open-0tDCQOXC.js} +10 -10
- package/dist/{org-D0g_q3mv.js → org-DUwdrKPV.js} +2 -2
- package/dist/{paths-DxSLdpOI.js → paths-BCbjCLP5.js} +1 -1
- package/dist/{playbook-DIeb7hne.js → playbook-oov9yV0q.js} +10 -10
- package/dist/{promote-COD4fYdz.js → promote-DPGPamkE.js} +16 -16
- package/dist/push-Chp21y3a.js +22 -0
- package/dist/{push-CncywhkQ.js → push-Cz4lJ8Qd.js} +27 -14
- package/dist/{registry-DSrosOYs.js → registry-CTczUigi.js} +525 -179
- package/dist/{resources-Dqr01Dep.js → resources-B1qKDVXd.js} +18 -6
- package/dist/{run-C9qg_QlC.js → run-DTPsVmFw.js} +2 -2
- package/dist/scan-B1SkkUi7.js +4 -0
- package/dist/{scan-DLrsrFS9.js → scan-Bb48xZqB.js} +1 -1
- package/dist/{scope-V336uz8j.js → scope-B6UYGuwn.js} +4 -4
- package/dist/{selection-Rdw-ZUoG.js → selection-BbNk9r1q.js} +10 -4
- package/dist/server-CwrZ-I1r.js +22 -0
- package/dist/{server-D0tGG8C4.js → server-EYBMKAG1.js} +10 -8
- package/dist/{session-D_nEWKXT.js → session-Crg9X-FI.js} +41 -13
- package/dist/session-DItGa4z0.js +6 -0
- package/dist/{session-CFAmMhem.js → session-xG9E8J2N.js} +1 -1
- package/dist/skills/superwall-framework/SKILL.md +43 -7
- package/dist/skills/superwall-framework/references/cli.md +1 -0
- package/dist/skills/superwall-framework/references/examples.md +1 -0
- package/dist/skills/superwall-framework/references/layout.md +34 -1
- package/dist/skills/superwall-framework/references/migrate-from-editor.md +16 -3
- package/dist/{skills-BvFOa4y6.js → skills-BdMKE2uO.js} +5 -4
- package/dist/{skills-DMG4bpKk.js → skills-Dg3k6TRC.js} +8 -8
- package/dist/{spinner-CneRK5rk.js → spinner-Ba3XhlMb.js} +3 -3
- package/dist/{storage-s2Dnz-yl.js → storage-DIkYajce.js} +1 -1
- package/dist/{storekit-yY_kS2iR.js → storekit-C2UzIIMs.js} +3 -3
- package/dist/storekit-DHNxDDpA.js +16 -0
- package/dist/{telemetry-DtG92m5O.js → telemetry-CVP8O6Y3.js} +1 -1
- package/dist/{token-DzRh7dI1.js → token-IWv2httm.js} +1 -1
- package/dist/tools-skills/animate-onboarding/SKILL.md +467 -0
- package/dist/tools-skills/animate-onboarding/references/engine.md +494 -0
- package/dist/tools-skills/animate-onboarding/references/framework/Question.tsx +71 -0
- package/dist/tools-skills/animate-onboarding/references/framework/README.md +40 -0
- package/dist/tools-skills/animate-onboarding/references/framework/answers.ts +19 -0
- package/dist/tools-skills/animate-onboarding/references/framework/flow.ts +80 -0
- package/dist/tools-skills/animate-onboarding/references/framework/handoffs.ts +869 -0
- package/dist/tools-skills/animate-onboarding/references/framework/layout.tsx +113 -0
- package/dist/tools-skills/animate-onboarding/references/framework/motion.css +559 -0
- package/dist/tools-skills/animate-onboarding/references/framework/useStoryRouter.ts +48 -0
- package/dist/tools-skills/animate-onboarding/references/handoffs.md +375 -0
- package/dist/tools-skills/animate-onboarding/references/imageReady.ts +92 -0
- package/dist/tools-skills/animate-onboarding/references/morphFrame.ts +356 -0
- package/dist/tools-skills/animate-onboarding/references/performance.md +41 -0
- package/dist/tools-skills/animate-onboarding/references/web-runtime/README.md +17 -0
- package/dist/tools-skills/animate-onboarding/references/web-runtime/handoffs.ts +858 -0
- package/dist/tools-skills/animate-onboarding/references/web-runtime/story-motion.css +301 -0
- package/dist/tools-skills/mobile-design/SKILL.md +447 -0
- package/dist/tools-skills/mobile-design/references/responsive.md +162 -0
- package/dist/tools-skills/onboarding-questions/SKILL.md +231 -0
- package/dist/tools-skills/onboarding-questions/references/arpu-questions.md +139 -0
- package/dist/tools-skills/onboarding-questions/references/craft.md +142 -0
- package/dist/tools-skills/onboarding-questions/references/example-reflective.md +117 -0
- package/dist/tools-skills/superwall/SKILL.md +263 -0
- package/dist/tools-skills/superwall/references/api.md +303 -0
- package/dist/tools-skills/superwall/references/asa.md +166 -0
- package/dist/tools-skills/superwall/references/asc.md +95 -0
- package/dist/tools-skills/superwall/references/dashboard-links.md +57 -0
- package/dist/tools-skills/superwall/references/data-analytics.md +896 -0
- package/dist/tools-skills/superwall/references/docs.md +51 -0
- package/dist/tools-skills/superwall/references/sdk-integration.md +104 -0
- package/dist/tools-skills/superwall/references/sdk-source.md +18 -0
- package/dist/tools-skills/superwall/workflows/dashboard/playbook.md +76 -0
- package/dist/tools-skills/superwall/workflows/dashboard/setup.md +100 -0
- package/dist/tools-skills/superwall/workflows/integrate/android.md +292 -0
- package/dist/tools-skills/superwall/workflows/integrate/expo.md +272 -0
- package/dist/tools-skills/superwall/workflows/integrate/flutter.md +285 -0
- package/dist/tools-skills/superwall/workflows/integrate/ios.md +314 -0
- package/dist/tools-skills/superwall/workflows/integrate/playbook.md +83 -0
- package/dist/tools-skills/superwall/workflows/integrate/react-native.md +246 -0
- package/dist/tools-skills/superwall/workflows/migrate/adapty.md +229 -0
- package/dist/tools-skills/superwall/workflows/migrate/playbook.md +78 -0
- package/dist/tools-skills/superwall/workflows/migrate/qonversion.md +227 -0
- package/dist/tools-skills/superwall/workflows/migrate/revenuecat.md +414 -0
- package/dist/tools-skills/superwall/workflows/placements/android.md +175 -0
- package/dist/tools-skills/superwall/workflows/placements/expo.md +161 -0
- package/dist/tools-skills/superwall/workflows/placements/flutter.md +139 -0
- package/dist/tools-skills/superwall/workflows/placements/ios.md +165 -0
- package/dist/tools-skills/superwall/workflows/placements/playbook.md +69 -0
- package/dist/tools-skills/superwall/workflows/placements/react-native.md +145 -0
- package/dist/tools-skills/superwall/workflows/placements/strategy.md +222 -0
- package/dist/tools-skills/superwall/workflows/review/android.md +120 -0
- package/dist/tools-skills/superwall/workflows/review/expo.md +100 -0
- package/dist/tools-skills/superwall/workflows/review/flutter.md +99 -0
- package/dist/tools-skills/superwall/workflows/review/ios.md +108 -0
- package/dist/tools-skills/superwall/workflows/review/playbook.md +70 -0
- package/dist/tools-skills/superwall/workflows/review/react-native.md +100 -0
- package/dist/tools-skills/superwall-editor/SKILL.md +113 -0
- package/dist/tools-skills/superwall-editor/references/cli.md +135 -0
- package/dist/tools-skills/superwall-editor/references/design.md +51 -0
- package/dist/tools-skills/superwall-editor/references/native-elements.md +171 -0
- package/dist/tools-skills/superwall-editor/references/workflow.md +65 -0
- package/dist/tools-skills/superwall-editor/scripts/sw-editor.sh +662 -0
- package/dist/tools-skills/wwdc/SKILL.md +22 -0
- package/dist/tools-skills/wwdc/references/docs.md +52 -0
- package/dist/tools-skills/wwdc/scripts/wwdc.sh +266 -0
- package/dist/tools.d.ts +4 -2
- package/dist/tools.js +561 -161
- package/dist/{upgrade-Bt4Ouw1y.js → upgrade-1t3aQUxh.js} +1 -1
- package/dist/{upgrade-Cqy5orjb.js → upgrade-DLf0LJDh.js} +2 -2
- package/package.json +2 -2
- package/dist/create-Yvf2gStM.js +0 -19
- package/dist/held-Ddw1XSsr.js +0 -16
- package/dist/kinds-GFXB3sYu.js +0 -11
- package/dist/login-BoBe8Psl.js +0 -16
- package/dist/push-CtD4FZQV.js +0 -22
- package/dist/scan-Cv5uOwVY.js +0 -4
- package/dist/send-BxD9yf6F.js +0 -150
- package/dist/server-z1LH94R_.js +0 -22
- package/dist/session-1AV_Bs_d.js +0 -6
- package/dist/storekit-DafAnGkM.js +0 -16
- /package/dist/{devtools-ByZ6XYnn.js → devtools-pBl_vt03.js} +0 -0
- /package/dist/{reports-DdPq4blM.js → reports-D_qbl7_u.js} +0 -0
- /package/dist/{screenshot-file-0UETadF8.js → screenshot-file-tVBfUEIi.js} +0 -0
- /package/dist/{storage-DYvmIOHa.d.ts → storage-CerJ5KLP.d.ts} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { m as RUNNING_VIA_NPX, v as VERSION } from "./environment-eV7LEnSN.js";
|
|
2
2
|
import { c as readUpdateCheck, g as writeUpdateCheck } from "./config-BO1Y87kV.js";
|
|
3
3
|
import { r as spawnStream } from "./spawn-DmmmHIP-.js";
|
|
4
4
|
import pc from "picocolors";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./output-Ggzq5_-t.js";
|
|
2
|
-
import "./environment-
|
|
2
|
+
import "./environment-eV7LEnSN.js";
|
|
3
3
|
import "./config-BO1Y87kV.js";
|
|
4
4
|
import "./spawn-DmmmHIP-.js";
|
|
5
|
-
import { a as runUpgrade, i as refreshUpdateCheck, n as isNewerVersion, r as maybeNotifyUpdate, t as flushUpdateCheck } from "./upgrade-
|
|
5
|
+
import { a as runUpgrade, i as refreshUpdateCheck, n as isNewerVersion, r as maybeNotifyUpdate, t as flushUpdateCheck } from "./upgrade-1t3aQUxh.js";
|
|
6
6
|
|
|
7
7
|
export { flushUpdateCheck, isNewerVersion, maybeNotifyUpdate, refreshUpdateCheck, runUpgrade };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superwall/cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"description": "The official CLI for managing Superwall from your terminal or coding agent.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
66
|
"@anthropic-ai/claude-agent-sdk": "0.3.201",
|
|
67
|
-
"@superwall/studio": "2.
|
|
67
|
+
"@superwall/studio": "2.1.1",
|
|
68
68
|
"ansi-escapes": "^7.3.0",
|
|
69
69
|
"fast-glob": "^3.3.3",
|
|
70
70
|
"ink": "^5.2.1",
|
package/dist/create-Yvf2gStM.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import "./token-DzRh7dI1.js";
|
|
2
|
-
import "./output-Ggzq5_-t.js";
|
|
3
|
-
import "./environment-DF1qKlny.js";
|
|
4
|
-
import "./storage-s2Dnz-yl.js";
|
|
5
|
-
import "./client-DP6Rc0t_.js";
|
|
6
|
-
import "./held-Cy8Wl4D1.js";
|
|
7
|
-
import "./config-BO1Y87kV.js";
|
|
8
|
-
import "./spinner-CneRK5rk.js";
|
|
9
|
-
import "./ui-D_qf3Gvw.js";
|
|
10
|
-
import "./paths-DxSLdpOI.js";
|
|
11
|
-
import "./resources-Dqr01Dep.js";
|
|
12
|
-
import "./org-D0g_q3mv.js";
|
|
13
|
-
import "./lookup-D-nmmAbw.js";
|
|
14
|
-
import "./scope-V336uz8j.js";
|
|
15
|
-
import "./client-BZ1UbpXz.js";
|
|
16
|
-
import "./timing-BVxPrYq3.js";
|
|
17
|
-
import { i as runAscKeysCreate, n as keyAccess, r as keyRole, t as createAndSaveKey } from "./create-BBrtgUgS.js";
|
|
18
|
-
|
|
19
|
-
export { createAndSaveKey, keyAccess, keyRole, runAscKeysCreate };
|
package/dist/held-Ddw1XSsr.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import "./token-DzRh7dI1.js";
|
|
2
|
-
import "./output-Ggzq5_-t.js";
|
|
3
|
-
import "./environment-DF1qKlny.js";
|
|
4
|
-
import "./storage-s2Dnz-yl.js";
|
|
5
|
-
import "./client-DP6Rc0t_.js";
|
|
6
|
-
import { t as upsertHeldKey } from "./held-Cy8Wl4D1.js";
|
|
7
|
-
import "./config-BO1Y87kV.js";
|
|
8
|
-
import "./spinner-CneRK5rk.js";
|
|
9
|
-
import "./ui-D_qf3Gvw.js";
|
|
10
|
-
import "./resources-Dqr01Dep.js";
|
|
11
|
-
import "./org-D0g_q3mv.js";
|
|
12
|
-
import "./lookup-D-nmmAbw.js";
|
|
13
|
-
import "./scope-V336uz8j.js";
|
|
14
|
-
import "./client-BZ1UbpXz.js";
|
|
15
|
-
|
|
16
|
-
export { upsertHeldKey };
|
package/dist/kinds-GFXB3sYu.js
DELETED
package/dist/login-BoBe8Psl.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import "./token-DzRh7dI1.js";
|
|
2
|
-
import "./output-Ggzq5_-t.js";
|
|
3
|
-
import "./environment-DF1qKlny.js";
|
|
4
|
-
import "./storage-s2Dnz-yl.js";
|
|
5
|
-
import "./client-DP6Rc0t_.js";
|
|
6
|
-
import "./config-BO1Y87kV.js";
|
|
7
|
-
import "./telemetry-DtG92m5O.js";
|
|
8
|
-
import "./spawn-DmmmHIP-.js";
|
|
9
|
-
import "./spinner-CneRK5rk.js";
|
|
10
|
-
import "./ui-D_qf3Gvw.js";
|
|
11
|
-
import "./scan-DLrsrFS9.js";
|
|
12
|
-
import "./paths-DxSLdpOI.js";
|
|
13
|
-
import { n as runLogin, t as performLogin } from "./login-D0lh3_JI.js";
|
|
14
|
-
import "./skills-BvFOa4y6.js";
|
|
15
|
-
|
|
16
|
-
export { performLogin, runLogin };
|
package/dist/push-CtD4FZQV.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import "./token-DzRh7dI1.js";
|
|
2
|
-
import "./output-Ggzq5_-t.js";
|
|
3
|
-
import "./environment-DF1qKlny.js";
|
|
4
|
-
import "./storage-s2Dnz-yl.js";
|
|
5
|
-
import "./client-DP6Rc0t_.js";
|
|
6
|
-
import "./config-BO1Y87kV.js";
|
|
7
|
-
import "./telemetry-DtG92m5O.js";
|
|
8
|
-
import "./spawn-DmmmHIP-.js";
|
|
9
|
-
import "./spinner-CneRK5rk.js";
|
|
10
|
-
import "./ui-D_qf3Gvw.js";
|
|
11
|
-
import "./scan-DLrsrFS9.js";
|
|
12
|
-
import "./paths-DxSLdpOI.js";
|
|
13
|
-
import "./resources-Dqr01Dep.js";
|
|
14
|
-
import "./lookup-D-nmmAbw.js";
|
|
15
|
-
import "./login-D0lh3_JI.js";
|
|
16
|
-
import "./skills-BvFOa4y6.js";
|
|
17
|
-
import "./selection-Rdw-ZUoG.js";
|
|
18
|
-
import "./session-D_nEWKXT.js";
|
|
19
|
-
import { i as timed, n as runPush, r as runPushPipeline, t as group } from "./push-CncywhkQ.js";
|
|
20
|
-
import "./login-B2TsCE2H.js";
|
|
21
|
-
|
|
22
|
-
export { group, runPush, runPushPipeline, timed };
|
package/dist/scan-Cv5uOwVY.js
DELETED
package/dist/send-BxD9yf6F.js
DELETED
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
import "./token-DzRh7dI1.js";
|
|
2
|
-
import "./output-Ggzq5_-t.js";
|
|
3
|
-
import { _ as VERSION, g as TELEMETRY_KEY, h as TELEMETRY_HOST } from "./environment-DF1qKlny.js";
|
|
4
|
-
import { t as readSession } from "./storage-s2Dnz-yl.js";
|
|
5
|
-
import "./client-DP6Rc0t_.js";
|
|
6
|
-
import { r as readOnboardedApp, t as readAnonymousId } from "./config-BO1Y87kV.js";
|
|
7
|
-
import { M as orgIdOf } from "./resources-Dqr01Dep.js";
|
|
8
|
-
import { n as findApplication } from "./lookup-D-nmmAbw.js";
|
|
9
|
-
import { t as FEEDBACK_KINDS } from "./kinds-GFXB3sYu.js";
|
|
10
|
-
import { readFileSync } from "node:fs";
|
|
11
|
-
import { basename } from "node:path";
|
|
12
|
-
import { arch, release } from "node:os";
|
|
13
|
-
|
|
14
|
-
//#region src/core/support/feedback/send.ts
|
|
15
|
-
const MAX_FILES = 5;
|
|
16
|
-
const MAX_FILE_CHARS = 2e4;
|
|
17
|
-
function parseContext(pairs) {
|
|
18
|
-
const out = {};
|
|
19
|
-
for (const pair of pairs) {
|
|
20
|
-
const at = pair.indexOf("=");
|
|
21
|
-
if (at < 1) throw new Error(`--context expects key=value, got "${pair}"`);
|
|
22
|
-
out[pair.slice(0, at).trim()] = pair.slice(at + 1).trim();
|
|
23
|
-
}
|
|
24
|
-
return out;
|
|
25
|
-
}
|
|
26
|
-
function linkedApp(cwd = process.cwd()) {
|
|
27
|
-
const app = readOnboardedApp(cwd);
|
|
28
|
-
return {
|
|
29
|
-
projectId: app?.projectId,
|
|
30
|
-
applicationId: app?.applicationId
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
const AGENT_ENV = [
|
|
34
|
-
["CLAUDECODE", "claude-code"],
|
|
35
|
-
["CODEX_SANDBOX", "codex"],
|
|
36
|
-
["CURSOR_AGENT", "cursor"],
|
|
37
|
-
["GEMINI_CLI", "gemini-cli"]
|
|
38
|
-
];
|
|
39
|
-
function detectAgent(env = process.env) {
|
|
40
|
-
return AGENT_ENV.find(([key]) => env[key])?.[1];
|
|
41
|
-
}
|
|
42
|
-
function readAttachments(paths) {
|
|
43
|
-
if (paths.length > MAX_FILES) throw new Error(`Attach at most ${MAX_FILES} files.`);
|
|
44
|
-
return paths.map((path) => {
|
|
45
|
-
const raw = readFileSync(path === "-" ? 0 : path, "utf8");
|
|
46
|
-
const truncated = raw.length > MAX_FILE_CHARS;
|
|
47
|
-
return {
|
|
48
|
-
name: path === "-" ? "stdin" : basename(path),
|
|
49
|
-
content: truncated ? raw.slice(-MAX_FILE_CHARS) : raw,
|
|
50
|
-
truncated
|
|
51
|
-
};
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
function buildFeedbackEvent(feedback, via, distinctId, session) {
|
|
55
|
-
return {
|
|
56
|
-
api_key: TELEMETRY_KEY(),
|
|
57
|
-
event: "feedback submitted",
|
|
58
|
-
distinct_id: distinctId,
|
|
59
|
-
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
60
|
-
properties: {
|
|
61
|
-
$process_person_profile: false,
|
|
62
|
-
title: feedback.title ?? null,
|
|
63
|
-
message: feedback.message,
|
|
64
|
-
kind: feedback.kind,
|
|
65
|
-
command: feedback.command ?? null,
|
|
66
|
-
project_id: feedback.projectId ?? null,
|
|
67
|
-
application_id: feedback.applicationId ?? null,
|
|
68
|
-
organization_id: feedback.organizationId ?? null,
|
|
69
|
-
context: feedback.context,
|
|
70
|
-
attachments: feedback.attachments,
|
|
71
|
-
via,
|
|
72
|
-
agent: feedback.agent ?? null,
|
|
73
|
-
cli_version: VERSION,
|
|
74
|
-
platform: process.platform,
|
|
75
|
-
os_release: release(),
|
|
76
|
-
arch: arch(),
|
|
77
|
-
node_version: process.version,
|
|
78
|
-
ci: process.env.CI === "true",
|
|
79
|
-
email: session?.userEmail ?? null,
|
|
80
|
-
org_name: session?.orgName ?? null,
|
|
81
|
-
auth_method: session?.authMethod ?? null
|
|
82
|
-
}
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
async function submitFeedback(feedback, via) {
|
|
86
|
-
const payload = buildFeedbackEvent(feedback, via, readAnonymousId(), readSession());
|
|
87
|
-
try {
|
|
88
|
-
return (await fetch(`${TELEMETRY_HOST()}/capture/`, {
|
|
89
|
-
method: "POST",
|
|
90
|
-
headers: { "content-type": "application/json" },
|
|
91
|
-
body: JSON.stringify(payload),
|
|
92
|
-
signal: AbortSignal.timeout(8e3)
|
|
93
|
-
})).ok;
|
|
94
|
-
} catch {
|
|
95
|
-
return false;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
const ORG_LOOKUP_MS = 3e3;
|
|
99
|
-
async function organizationOfApp(api, applicationId) {
|
|
100
|
-
if (!api || !applicationId) return void 0;
|
|
101
|
-
const lookup = findApplication(api, applicationId).then((found) => found ? orgIdOf(found.project) : void 0).catch(() => void 0);
|
|
102
|
-
const timeout = new Promise((resolve$1) => {
|
|
103
|
-
setTimeout(() => resolve$1(void 0), ORG_LOOKUP_MS).unref();
|
|
104
|
-
});
|
|
105
|
-
return Promise.race([lookup, timeout]);
|
|
106
|
-
}
|
|
107
|
-
async function runFeedback(ctx, { args, flags }) {
|
|
108
|
-
const { ui, json, interactive } = ctx;
|
|
109
|
-
let message = args.message;
|
|
110
|
-
if (!message && interactive) {
|
|
111
|
-
ui.intro("Superwall feedback");
|
|
112
|
-
const answer = await ui.text({
|
|
113
|
-
message: "What's your feedback on Superwall?",
|
|
114
|
-
placeholder: "What worked, what didn't, what's missing...",
|
|
115
|
-
validate: (v) => v?.trim() ? void 0 : "Required"
|
|
116
|
-
});
|
|
117
|
-
if (answer === null) return void ui.warn("Cancelled.");
|
|
118
|
-
message = answer.trim();
|
|
119
|
-
}
|
|
120
|
-
if (!message) throw new Error("Usage: superwall feedback \"<message>\" [--title ...] [--kind bug] [--file log.txt]");
|
|
121
|
-
const kind = FEEDBACK_KINDS.find((candidate) => candidate === flags.kind);
|
|
122
|
-
if (!kind) throw new Error(`--kind must be one of: ${FEEDBACK_KINDS.join(", ")}`);
|
|
123
|
-
const agent = flags.agent ?? detectAgent();
|
|
124
|
-
const attachments = readAttachments(flags.file.filter(Boolean));
|
|
125
|
-
const context = parseContext(flags.context);
|
|
126
|
-
const linked = linkedApp();
|
|
127
|
-
const applicationId = flags.app ?? linked.applicationId;
|
|
128
|
-
const via = agent || !interactive ? "agent" : "human";
|
|
129
|
-
const spin = interactive ? ui.spinner() : null;
|
|
130
|
-
spin?.start("Sending your feedback");
|
|
131
|
-
const ok = await submitFeedback({
|
|
132
|
-
title: flags.title,
|
|
133
|
-
message,
|
|
134
|
-
kind,
|
|
135
|
-
command: flags.command,
|
|
136
|
-
agent,
|
|
137
|
-
projectId: flags.project ?? linked.projectId,
|
|
138
|
-
applicationId,
|
|
139
|
-
organizationId: await organizationOfApp(ctx.api, applicationId),
|
|
140
|
-
context,
|
|
141
|
-
attachments
|
|
142
|
-
}, via);
|
|
143
|
-
spin?.stop(ok ? "Sent" : "Failed to send");
|
|
144
|
-
if (json) return ctx.output.data({ submitted: ok });
|
|
145
|
-
if (!ok) throw new Error("Couldn't send your feedback - check your connection and try again.");
|
|
146
|
-
ui.success("Thank you! We've received your feedback and will read through it. Really appreciate you helping us make Superwall better.");
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
//#endregion
|
|
150
|
-
export { MAX_FILES, MAX_FILE_CHARS, buildFeedbackEvent, detectAgent, organizationOfApp, parseContext, readAttachments, runFeedback };
|
package/dist/server-z1LH94R_.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import "./token-DzRh7dI1.js";
|
|
2
|
-
import "./output-Ggzq5_-t.js";
|
|
3
|
-
import "./environment-DF1qKlny.js";
|
|
4
|
-
import "./storage-s2Dnz-yl.js";
|
|
5
|
-
import "./client-DP6Rc0t_.js";
|
|
6
|
-
import "./config-BO1Y87kV.js";
|
|
7
|
-
import "./telemetry-DtG92m5O.js";
|
|
8
|
-
import "./spawn-DmmmHIP-.js";
|
|
9
|
-
import "./spinner-CneRK5rk.js";
|
|
10
|
-
import "./ui-D_qf3Gvw.js";
|
|
11
|
-
import "./scan-DLrsrFS9.js";
|
|
12
|
-
import "./paths-DxSLdpOI.js";
|
|
13
|
-
import "./resources-Dqr01Dep.js";
|
|
14
|
-
import "./lookup-D-nmmAbw.js";
|
|
15
|
-
import "./login-D0lh3_JI.js";
|
|
16
|
-
import "./skills-BvFOa4y6.js";
|
|
17
|
-
import "./selection-Rdw-ZUoG.js";
|
|
18
|
-
import "./session-D_nEWKXT.js";
|
|
19
|
-
import "./login-B2TsCE2H.js";
|
|
20
|
-
import { t as runStudio } from "./server-D0tGG8C4.js";
|
|
21
|
-
|
|
22
|
-
export { runStudio };
|
package/dist/session-1AV_Bs_d.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import "./token-DzRh7dI1.js";
|
|
2
|
-
import "./output-Ggzq5_-t.js";
|
|
3
|
-
import "./environment-DF1qKlny.js";
|
|
4
|
-
import "./storage-s2Dnz-yl.js";
|
|
5
|
-
import "./client-DP6Rc0t_.js";
|
|
6
|
-
import "./config-BO1Y87kV.js";
|
|
7
|
-
import "./spinner-CneRK5rk.js";
|
|
8
|
-
import "./ui-D_qf3Gvw.js";
|
|
9
|
-
import "./resources-Dqr01Dep.js";
|
|
10
|
-
import "./org-D0g_q3mv.js";
|
|
11
|
-
import "./lookup-D-nmmAbw.js";
|
|
12
|
-
import "./scope-V336uz8j.js";
|
|
13
|
-
import "./input-vi0bou04.js";
|
|
14
|
-
import { n as writeStoreKit, t as generateStoreKit } from "./storekit-yY_kS2iR.js";
|
|
15
|
-
|
|
16
|
-
export { generateStoreKit, writeStoreKit };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|