@superwall/cli 1.4.0 → 1.6.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 +21 -5
- package/dist/{actions-EfP8phmb.js → actions-Dt35nIi8.js} +3 -2
- package/dist/{api-CEwXCCoC.js → api-BOR-uXZe.js} +9 -9
- package/dist/{app-D8mEVlQo.js → app-BU27SLPX.js} +9 -9
- package/dist/{asa-BFWehnTA.js → asa-2ykGnjaV.js} +11 -11
- package/dist/{asc-DJqQmtmR.js → asc-r3xmFT0L.js} +14 -14
- package/dist/{auth-CT2DWX8r.js → auth-BWZfguI8.js} +9 -9
- package/dist/auth.js +2 -2
- package/dist/{billing-BzEnVPD2.js → billing-BsQgXXYh.js} +1 -1
- package/dist/{bind-BZxVyt9P.js → bind-BSTAinn6.js} +5 -4
- package/dist/{command-DP96_gmP.js → command-DMoMn7uc.js} +39 -16
- package/dist/{create-Q8TqqjZt.js → create-CSo6XjSm.js} +118 -91
- package/dist/dev-B0MF6z3L.js +21 -0
- package/dist/{dev-DlCcwFu5.js → dev-CuXa3J4Z.js} +29 -24
- package/dist/{doctor-CJsjHpCZ.js → doctor-DXJaDqsx.js} +10 -10
- package/dist/{drivers-UT36AnOw.js → drivers-Cr252DOJ.js} +3 -3
- package/dist/entry.js +84 -50
- package/dist/{existing-Cak1WxWB.js → existing-Ckx_g7Be.js} +6 -3
- package/dist/{feedback-DDRzoqPx.js → feedback-Dt5yebMS.js} +6 -6
- package/dist/{hosted-CEH78QVn.js → hosted-Cjekn8oJ.js} +2 -2
- package/dist/{integrate-D8jyhDzk.js → integrate-DVqhvPVq.js} +25 -66
- package/dist/{login-kneYhhk0.js → login-Bjj8QvIN.js} +6 -6
- package/dist/migrate-qmvOtp3l.js +283 -0
- package/dist/open-studio-CpHqjovS.js +1299 -0
- package/dist/{org-Cg25bcsj.js → org-CV8c849b.js} +3 -3
- package/dist/{output-csAtR6kJ.js → output-CiELrN8w.js} +15 -2
- package/dist/{pipeline-DAeI9tHs.js → pipeline-DSCHL9KA.js} +482 -9
- package/dist/{print-skill-BHVPP9cX.js → print-skill-CaHRJ8xW.js} +7 -7
- package/dist/{promote-Boek5K2d.js → promote-UMTh8Q33.js} +17 -18
- package/dist/publish-DWX8S9yZ.js +34 -0
- package/dist/push-Dox4_5Dq.js +34 -0
- package/dist/{query-B8G6T8Ba.js → query-CnSsDZ7Q.js} +10 -10
- package/dist/reports-C0xHCLnt.js +27 -0
- package/dist/{resource-DjsWVka-.js → resource-5bgyyL9B.js} +15 -15
- package/dist/{resources-s64mBHaC.js → resources-Bf9O1JNM.js} +28 -2
- package/dist/{run-BtcQJCP8.js → run-BVeZWbXx.js} +39 -22
- package/dist/{scan-DJixvuHn.js → scan-CAObNRgc.js} +44 -4
- package/dist/skills/superwall/SKILL.md +146 -0
- package/dist/skills/superwall/references/api.md +275 -0
- package/dist/skills/superwall/references/asa.md +160 -0
- package/dist/skills/superwall/references/asc.md +96 -0
- package/dist/skills/superwall/references/dashboard-links.md +57 -0
- package/dist/skills/superwall/references/data-analytics.md +893 -0
- package/dist/skills/superwall/references/docs.md +51 -0
- package/dist/skills/superwall/references/sdk-integration.md +105 -0
- package/dist/skills/superwall/references/sdk-source.md +18 -0
- package/{skills/superwall-dashboard/SKILL.md → dist/skills/superwall/workflows/dashboard/playbook.md} +3 -9
- package/{skills/superwall-dashboard/references → dist/skills/superwall/workflows/dashboard}/setup.md +1 -3
- package/dist/skills/superwall/workflows/integrate/android.md +292 -0
- package/{skills/superwall-integrate/SKILL.md → dist/skills/superwall/workflows/integrate/playbook.md} +16 -11
- package/{skills/superwall-migrate/references → dist/skills/superwall/workflows/migrate}/adapty.md +4 -4
- package/{skills/superwall-migrate/SKILL.md → dist/skills/superwall/workflows/migrate/playbook.md} +4 -10
- package/{skills/superwall-migrate/references → dist/skills/superwall/workflows/migrate}/qonversion.md +4 -4
- package/{skills/superwall-migrate/references → dist/skills/superwall/workflows/migrate}/revenuecat.md +4 -4
- package/dist/skills/superwall/workflows/placements/android.md +175 -0
- package/{skills/superwall-placements/references → dist/skills/superwall/workflows/placements}/expo.md +1 -1
- package/{skills/superwall-placements/references → dist/skills/superwall/workflows/placements}/flutter.md +1 -1
- package/{skills/superwall-placements/references → dist/skills/superwall/workflows/placements}/ios.md +1 -1
- package/{skills/superwall-placements/SKILL.md → dist/skills/superwall/workflows/placements/playbook.md} +6 -10
- package/{skills/superwall-placements/references → dist/skills/superwall/workflows/placements}/react-native.md +2 -2
- package/{skills/superwall-placements/references → dist/skills/superwall/workflows/placements}/strategy.md +4 -3
- package/dist/skills/superwall/workflows/review/android.md +120 -0
- package/{skills/superwall-review/references → dist/skills/superwall/workflows/review}/expo.md +1 -1
- package/{skills/superwall-review/references → dist/skills/superwall/workflows/review}/flutter.md +1 -1
- package/{skills/superwall-review/references → dist/skills/superwall/workflows/review}/ios.md +1 -1
- package/{skills/superwall-review/SKILL.md → dist/skills/superwall/workflows/review/playbook.md} +2 -7
- package/{skills/superwall-review/references → dist/skills/superwall/workflows/review}/react-native.md +1 -1
- package/dist/skills/superwall-framework/SKILL.md +253 -0
- package/dist/skills/superwall-framework/references/cli.md +340 -0
- package/dist/skills/superwall-framework/references/examples.md +123 -0
- package/dist/skills/superwall-framework/references/layout.md +295 -0
- package/dist/skills/superwall-framework/references/migrate-from-editor.md +208 -0
- package/dist/skills/superwall-framework/references/migrate-from-native.md +193 -0
- package/dist/skills/superwall-framework/references/mobile-design.md +371 -0
- package/dist/skills/superwall-framework/references/native/android.md +83 -0
- package/dist/skills/superwall-framework/references/native/flutter.md +65 -0
- package/dist/skills/superwall-framework/references/native/ios.md +77 -0
- package/dist/skills/superwall-framework/references/native/react-native.md +67 -0
- package/dist/skills/superwall-framework/references/responsive.md +162 -0
- package/dist/{skills-CRG1xk0G.js → skills-Cu41i-Az.js} +12 -12
- package/dist/{skills-CODut1Hn.js → skills-grTDuHlc.js} +134 -36
- package/dist/{spinner-B9dT3DBY.js → spinner-DFctF_Jw.js} +1 -1
- package/dist/{telemetry-BtkMdT-5.js → telemetry-BuCbmoux.js} +3 -3
- package/dist/{token-hM7V1KMG.js → token-mju3Q-vc.js} +3 -3
- package/dist/{ui-Lqt_zFOr.js → ui-4gLyfrgl.js} +76 -46
- package/dist/{update-CeylIjx5.js → update-DnGfpCD7.js} +2 -2
- package/dist/{upgrade-DRqUfCBT.js → upgrade-PMoj3yqJ.js} +6 -6
- package/package.json +8 -7
- package/prompts/actions/paywall-migrate.xml +24 -0
- package/prompts/actions/screen-migrate.xml +26 -0
- package/dist/git-ZwA3Mx8m.js +0 -433
- package/dist/migrate-D_x1oyTk.js +0 -114
- package/dist/publish-C-zEUnO9.js +0 -35
- package/dist/push-DUDQG-EO.js +0 -35
- package/skills/README.md +0 -118
- /package/dist/{api-output-D9ggXQIr.js → api-output-CEhN-U_N.js} +0 -0
- /package/dist/{asc-products-C6MvSy8H.js → asc-products-1e1DoGeL.js} +0 -0
- /package/dist/{params-B1zeElGa.js → params-BxgTuCzr.js} +0 -0
- /package/{skills/superwall-integrate/references → dist/skills/superwall/workflows/integrate}/expo.md +0 -0
- /package/{skills/superwall-integrate/references → dist/skills/superwall/workflows/integrate}/flutter.md +0 -0
- /package/{skills/superwall-integrate/references → dist/skills/superwall/workflows/integrate}/ios.md +0 -0
- /package/{skills/superwall-integrate/references → dist/skills/superwall/workflows/integrate}/react-native.md +0 -0
- /package/dist/{storekit-DPonXSwe.js → storekit-Dlpbq5Wv.js} +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import "./output-CiELrN8w.js";
|
|
2
|
+
import "./telemetry-BuCbmoux.js";
|
|
3
|
+
import "./update-DnGfpCD7.js";
|
|
4
|
+
import "./token-mju3Q-vc.js";
|
|
5
|
+
import "./command-DMoMn7uc.js";
|
|
6
|
+
import "./ui-4gLyfrgl.js";
|
|
7
|
+
import "./skills-grTDuHlc.js";
|
|
8
|
+
import "./spawn-DSoTXy_j.js";
|
|
9
|
+
import "./login-Bjj8QvIN.js";
|
|
10
|
+
import "./scan-CAObNRgc.js";
|
|
11
|
+
import "./hosted-Cjekn8oJ.js";
|
|
12
|
+
import "./spinner-DFctF_Jw.js";
|
|
13
|
+
import "./resources-Bf9O1JNM.js";
|
|
14
|
+
import "./org-CV8c849b.js";
|
|
15
|
+
import "./bind-BSTAinn6.js";
|
|
16
|
+
import "./pipeline-DSCHL9KA.js";
|
|
17
|
+
import "./actions-Dt35nIi8.js";
|
|
18
|
+
import "./app-BU27SLPX.js";
|
|
19
|
+
import { t as runDev } from "./dev-CuXa3J4Z.js";
|
|
20
|
+
|
|
21
|
+
export { runDev };
|
|
@@ -1,25 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./
|
|
3
|
-
import "./
|
|
4
|
-
import "./
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import "./skills-CODut1Hn.js";
|
|
8
|
-
import "./spawn-DSoTXy_j.js";
|
|
9
|
-
import "./login-kneYhhk0.js";
|
|
10
|
-
import "./scan-DJixvuHn.js";
|
|
11
|
-
import "./hosted-CEH78QVn.js";
|
|
12
|
-
import "./spinner-B9dT3DBY.js";
|
|
13
|
-
import { S as pushPaywallVersion, T as versionProducts, b as promotePaywallVersion, f as listApplications } from "./resources-s64mBHaC.js";
|
|
14
|
-
import "./org-Cg25bcsj.js";
|
|
15
|
-
import "./bind-BZxVyt9P.js";
|
|
16
|
-
import { f as readLock, i as requireApi, o as writeProjectScaffold, u as resolveApps } from "./git-ZwA3Mx8m.js";
|
|
17
|
-
import "./actions-EfP8phmb.js";
|
|
18
|
-
import "./app-D8mEVlQo.js";
|
|
19
|
-
import { C as syncAssets, D as writeProjectTypes, E as collectProjectDeclarations, S as requireAssets, T as loadFramework, _ as planTargets, a as projectDir, b as resolveBinding, d as pushSource, f as collectSourceFiles, h as projectForApplication, l as LAYOUT_HINT, m as fetchProducts, o as projectDirs, p as warnNotPortable, s as requireProject, w as frameworkVersion, x as assetBaseUrl, y as wantedPlatforms } from "./pipeline-DAeI9tHs.js";
|
|
1
|
+
import { y as VERSION } from "./output-CiELrN8w.js";
|
|
2
|
+
import { r as ApiError, t as defineCommand } from "./command-DMoMn7uc.js";
|
|
3
|
+
import { n as ui } from "./ui-4gLyfrgl.js";
|
|
4
|
+
import { r as openBrowser } from "./login-Bjj8QvIN.js";
|
|
5
|
+
import { D as versionProducts, S as promotePaywallVersion, p as listApplications, w as pushPaywallVersion } from "./resources-Bf9O1JNM.js";
|
|
6
|
+
import { A as requireApi, C as requireAssets, D as collectProjectDeclarations, E as loadFramework, I as readLock, M as writeProjectScaffold, O as writeProjectTypes, P as resolveApps, S as assetBaseUrl, T as frameworkVersion, a as projectDir, b as wantedPlatforms, d as pushSource, g as projectForApplication, h as fetchProducts, l as LAYOUT_HINT, m as warnNotPortable, o as projectDirs, p as collectSourceFiles, s as requireProject, v as planTargets, w as syncAssets, x as resolveBinding } from "./pipeline-DSCHL9KA.js";
|
|
20
7
|
import pc from "picocolors";
|
|
21
|
-
import * as fs from "node:fs";
|
|
22
8
|
import * as path from "node:path";
|
|
9
|
+
import * as fs from "node:fs";
|
|
23
10
|
import fg from "fast-glob";
|
|
24
11
|
import { renderUnicodeCompact } from "uqr";
|
|
25
12
|
|
|
@@ -373,7 +360,8 @@ function createStudioActions(framework, project) {
|
|
|
373
360
|
if (error instanceof ApiError && error.status === 400) return void 0;
|
|
374
361
|
throw error;
|
|
375
362
|
});
|
|
376
|
-
|
|
363
|
+
if (session?.status !== "ready") return void 0;
|
|
364
|
+
return session.apple_review_image?.url ?? session.pages?.[0]?.url;
|
|
377
365
|
},
|
|
378
366
|
async status(surface) {
|
|
379
367
|
try {
|
|
@@ -381,10 +369,26 @@ function createStudioActions(framework, project) {
|
|
|
381
369
|
const bindings = (surface.kind === "paywall" ? lock.paywalls : lock.funnels)[surface.id];
|
|
382
370
|
const bound = bindings === void 0 ? void 0 : Object.values(bindings)[0];
|
|
383
371
|
if (!bound) return {};
|
|
384
|
-
const
|
|
372
|
+
const client = await ensureApi();
|
|
373
|
+
const id = encodeURIComponent(bound.paywallId);
|
|
374
|
+
const paywall = await client.get(`/v2/paywalls/${id}`);
|
|
375
|
+
const live = typeof paywall.paywall_url === "string" && typeof paywall.version === "number" ? [{
|
|
376
|
+
version: paywall.version,
|
|
377
|
+
url: paywall.paywall_url,
|
|
378
|
+
live: true
|
|
379
|
+
}] : [];
|
|
380
|
+
const listed = await client.get(`/v2/paywalls/${id}/versions`).then((response) => ({ versions: (response.data ?? []).map((entry) => ({
|
|
381
|
+
version: entry.version,
|
|
382
|
+
url: entry.url,
|
|
383
|
+
live: entry.live === true,
|
|
384
|
+
pushedAt: entry.created_at
|
|
385
|
+
})) }), (error) => ({
|
|
386
|
+
versions: live,
|
|
387
|
+
unreachable: reason(error)
|
|
388
|
+
}));
|
|
385
389
|
return {
|
|
386
390
|
paywallId: bound.paywallId,
|
|
387
|
-
|
|
391
|
+
...listed,
|
|
388
392
|
active: paywall.status === "active",
|
|
389
393
|
updatedAt: paywall.updated_at,
|
|
390
394
|
identifier: paywall.identifier
|
|
@@ -438,6 +442,7 @@ const runDev = defineCommand({
|
|
|
438
442
|
return [...many ? [pc.bold(slug(one.root))] : [], ...one.surfaces.map((surface) => `${many ? " " : ""}${surface.kind}/${pc.bold(surface.id)} ` + pc.dim(`${url}${prefix}${surface.kind}/${surface.id}`))];
|
|
439
443
|
});
|
|
440
444
|
ui.step([`Studio ${pc.green(url)}`, ...rows].join("\n"));
|
|
445
|
+
if (typeof context.argv.open === "string" && context.argv.open !== "") openBrowser(`${url}${context.argv.open.replace(/^\//, "")}`);
|
|
441
446
|
const network = server.resolvedUrls?.network[0];
|
|
442
447
|
if (network) {
|
|
443
448
|
const deviceUrl = `${network}device`;
|
|
@@ -469,4 +474,4 @@ const runDev = defineCommand({
|
|
|
469
474
|
});
|
|
470
475
|
|
|
471
476
|
//#endregion
|
|
472
|
-
export { runDev };
|
|
477
|
+
export { runDev as t };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./telemetry-
|
|
3
|
-
import "./update-
|
|
4
|
-
import { i as loadSession } from "./token-
|
|
5
|
-
import { t as defineCommand } from "./command-
|
|
6
|
-
import { a as THEME, n as ui, o as fg } from "./ui-
|
|
1
|
+
import { b as apiKeyFromEnv } from "./output-CiELrN8w.js";
|
|
2
|
+
import "./telemetry-BuCbmoux.js";
|
|
3
|
+
import "./update-DnGfpCD7.js";
|
|
4
|
+
import { i as loadSession } from "./token-mju3Q-vc.js";
|
|
5
|
+
import { t as defineCommand } from "./command-DMoMn7uc.js";
|
|
6
|
+
import { a as THEME, n as ui, o as fg } from "./ui-4gLyfrgl.js";
|
|
7
7
|
import "./spawn-DSoTXy_j.js";
|
|
8
|
-
import { t as scanProject } from "./scan-
|
|
9
|
-
import { t as detectDrivers } from "./drivers-
|
|
10
|
-
import "./hosted-
|
|
11
|
-
import { t as detectExisting } from "./existing-
|
|
8
|
+
import { t as scanProject } from "./scan-CAObNRgc.js";
|
|
9
|
+
import { t as detectDrivers } from "./drivers-Cr252DOJ.js";
|
|
10
|
+
import "./hosted-Cjekn8oJ.js";
|
|
11
|
+
import { t as detectExisting } from "./existing-Ckx_g7Be.js";
|
|
12
12
|
|
|
13
13
|
//#region src/commands/account/doctor.ts
|
|
14
14
|
const runDoctor = defineCommand({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { y as VERSION } from "./output-CiELrN8w.js";
|
|
2
2
|
import { n as readVersion, r as spawnStream, t as onPath } from "./spawn-DSoTXy_j.js";
|
|
3
|
-
import { n as getHostedAuthToken, r as getHostedStatus, t as getHostedAnthropicBaseUrl } from "./hosted-
|
|
4
|
-
import { tmpdir } from "node:os";
|
|
3
|
+
import { n as getHostedAuthToken, r as getHostedStatus, t as getHostedAnthropicBaseUrl } from "./hosted-Cjekn8oJ.js";
|
|
5
4
|
import { basename, join } from "node:path";
|
|
5
|
+
import { tmpdir } from "node:os";
|
|
6
6
|
import { readFile, rm } from "node:fs/promises";
|
|
7
7
|
import { query } from "@anthropic-ai/claude-agent-sdk";
|
|
8
8
|
|
package/dist/entry.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as flushTelemetry } from "./telemetry-
|
|
3
|
-
import { n as flushUpdateCheck } from "./update-
|
|
1
|
+
import { i as writeJson, l as CHANNEL, p as ENV_API_KEY, y as VERSION } from "./output-CiELrN8w.js";
|
|
2
|
+
import { t as flushTelemetry } from "./telemetry-BuCbmoux.js";
|
|
3
|
+
import { n as flushUpdateCheck } from "./update-DnGfpCD7.js";
|
|
4
4
|
import yargs from "yargs";
|
|
5
5
|
import { hideBin } from "yargs/helpers";
|
|
6
6
|
import pc from "picocolors";
|
|
@@ -56,11 +56,11 @@ const registerAccountCommands = (cli) => cli.command("login", "Log in to Superwa
|
|
|
56
56
|
hidden: true
|
|
57
57
|
}
|
|
58
58
|
}), (argv) => {
|
|
59
|
-
return import("./auth-
|
|
59
|
+
return import("./auth-BWZfguI8.js").then((m) => m.runLogin(argv));
|
|
60
60
|
}).command("logout", "Log out of Superwall", (y) => y, (argv) => {
|
|
61
|
-
return import("./auth-
|
|
61
|
+
return import("./auth-BWZfguI8.js").then((m) => m.runLogout(argv));
|
|
62
62
|
}).command("whoami", "Show the logged-in Superwall account", (y) => y, (argv) => {
|
|
63
|
-
return import("./auth-
|
|
63
|
+
return import("./auth-BWZfguI8.js").then((m) => m.runWhoami(argv));
|
|
64
64
|
}).command("skills", "Install or update the Superwall agent skills for your coding agent", (y) => y.options({
|
|
65
65
|
skill: {
|
|
66
66
|
type: "array",
|
|
@@ -81,16 +81,16 @@ const registerAccountCommands = (cli) => cli.command("login", "Log in to Superwa
|
|
|
81
81
|
hidden: true
|
|
82
82
|
}
|
|
83
83
|
}), (argv) => {
|
|
84
|
-
return import("./skills-
|
|
84
|
+
return import("./skills-Cu41i-Az.js").then((m) => m.runSkills(argv));
|
|
85
85
|
}).command("doctor", "Check the health of your Superwall integration", (y) => y.options({ ...installDirOption }), (argv) => {
|
|
86
|
-
return import("./doctor-
|
|
86
|
+
return import("./doctor-DXJaDqsx.js").then((m) => m.runDoctor(argv));
|
|
87
87
|
}).command("upgrade", "Update the CLI to the latest version", (y) => y, (argv) => {
|
|
88
|
-
return import("./upgrade-
|
|
88
|
+
return import("./upgrade-PMoj3yqJ.js").then((m) => m.runUpgrade(argv));
|
|
89
89
|
}).command("feedback [message]", "Send feedback about the CLI to the Superwall team", (y) => y.positional("message", {
|
|
90
90
|
type: "string",
|
|
91
91
|
describe: "Your feedback (omit to be prompted)"
|
|
92
92
|
}).example("$0 feedback \"migrate crashed on Expo\"", "Send feedback").example("$0 feedback \"...\" --json", "For agents / automation"), (argv) => {
|
|
93
|
-
return import("./feedback-
|
|
93
|
+
return import("./feedback-Dt5yebMS.js").then((m) => m.runFeedback(argv));
|
|
94
94
|
});
|
|
95
95
|
|
|
96
96
|
//#endregion
|
|
@@ -99,8 +99,9 @@ function printHelp() {
|
|
|
99
99
|
const pad = (cmd) => ` ${cmd.padEnd(30)}`;
|
|
100
100
|
const row = (cmd, desc) => `${pad(cmd)}${desc}`;
|
|
101
101
|
const head = (title) => pc.bold(`${title}:`);
|
|
102
|
+
const next = CHANNEL() === "next";
|
|
102
103
|
process.stdout.write([
|
|
103
|
-
`${pc.bold("Superwall CLI")} ${pc.dim(`v${VERSION}`)}`,
|
|
104
|
+
`${pc.bold("Superwall CLI")} ${pc.dim(`v${VERSION}`)}${next ? pc.dim(" · next channel") : ""}`,
|
|
104
105
|
"",
|
|
105
106
|
pc.bold("Usage:"),
|
|
106
107
|
" superwall [command]",
|
|
@@ -108,18 +109,21 @@ function printHelp() {
|
|
|
108
109
|
head("Workflow commands"),
|
|
109
110
|
row("integrate", "Set up Superwall in your app (agent-driven)"),
|
|
110
111
|
row("migrate", "Migrate from RevenueCat / Adapty / Qonversion"),
|
|
112
|
+
...next ? [row("migrate <paywall-id>", "Rebuild a dashboard paywall as code with your agent"), row("migrate --screen <path>", "Rebuild a native screen as a Superwall surface")] : [],
|
|
111
113
|
row("review [--fix]", "Audit an existing Superwall setup; --fix repairs issues"),
|
|
112
114
|
pc.dim(" Each takes --skill to print the playbook instead of running."),
|
|
113
115
|
"",
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
116
|
+
...next ? [
|
|
117
|
+
head("Paywalls & funnels"),
|
|
118
|
+
row("create [dir]", "Set up paywalls in your app - creates superwall/ inside it"),
|
|
119
|
+
row("dev [dir..]", "Host the studio: browse and preview your paywalls and funnels"),
|
|
120
|
+
row("push [dir]", "Build and push your paywalls and funnels as immutable versions"),
|
|
121
|
+
row("promote [dir]", "Point production at a pushed version"),
|
|
122
|
+
row("publish [dir]", "Push and promote in one step"),
|
|
123
|
+
pc.dim(" push and publish take -m <note> to record why, in the source commit."),
|
|
124
|
+
pc.dim(" All three take --platform <p> when the project pushes to several platforms."),
|
|
125
|
+
""
|
|
126
|
+
] : [],
|
|
123
127
|
head("Resource commands"),
|
|
124
128
|
row("bootstrap", "Complete account tree: projects, apps, campaigns, and products"),
|
|
125
129
|
row("apps", "Projects and platform apps (list, create, use)"),
|
|
@@ -171,6 +175,14 @@ const registerPaywallCommands = (cli) => cli.command("create [dir]", "Set up pay
|
|
|
171
175
|
type: "string",
|
|
172
176
|
describe: "Start from a public example by name, e.g. --example with-rive"
|
|
173
177
|
},
|
|
178
|
+
from: {
|
|
179
|
+
type: "string",
|
|
180
|
+
describe: "Rebuild an existing dashboard paywall as code: scaffold its config.ts (products, presentation, settings) and a migration brief from the paywall id"
|
|
181
|
+
},
|
|
182
|
+
app: {
|
|
183
|
+
type: "string",
|
|
184
|
+
describe: "Connect this Superwall app by id instead of detecting or asking"
|
|
185
|
+
},
|
|
174
186
|
yes: {
|
|
175
187
|
type: "boolean",
|
|
176
188
|
alias: "y",
|
|
@@ -186,8 +198,8 @@ const registerPaywallCommands = (cli) => cli.command("create [dir]", "Set up pay
|
|
|
186
198
|
default: true,
|
|
187
199
|
describe: "Connect a Superwall app when possible (--no-connect to skip)"
|
|
188
200
|
}
|
|
189
|
-
}).example("$0 create", "Set up superwall/ in the current app").example("$0 create --example with-rive", "Start from an example"), (argv) => {
|
|
190
|
-
return import("./create-
|
|
201
|
+
}).example("$0 create", "Set up superwall/ in the current app").example("$0 create --example with-rive", "Start from an example").example("$0 create --from 65920", "Rebuild dashboard paywall 65920 as code").example("$0 create --app 52518", "Connect a specific Superwall app"), (argv) => {
|
|
202
|
+
return import("./create-CSo6XjSm.js").then((m) => m.runCreate(argv));
|
|
191
203
|
}).command("dev [dir..]", "Host the studio: browse and preview your paywalls and funnels", (y) => y.positional("dir", {
|
|
192
204
|
type: "string",
|
|
193
205
|
array: true,
|
|
@@ -203,9 +215,14 @@ const registerPaywallCommands = (cli) => cli.command("create [dir]", "Set up pay
|
|
|
203
215
|
type: "string",
|
|
204
216
|
default: "0.0.0.0",
|
|
205
217
|
describe: "Host to bind"
|
|
218
|
+
},
|
|
219
|
+
open: {
|
|
220
|
+
type: "string",
|
|
221
|
+
hidden: true,
|
|
222
|
+
describe: "Open the browser at this studio path once the server is up"
|
|
206
223
|
}
|
|
207
224
|
}), (argv) => {
|
|
208
|
-
return import("./dev-
|
|
225
|
+
return import("./dev-B0MF6z3L.js").then((m) => m.runDev(argv));
|
|
209
226
|
}).command("push [dir]", "Build and push your paywalls as immutable versions (production untouched)", (y) => y.positional("dir", {
|
|
210
227
|
type: "string",
|
|
211
228
|
describe: "Project directory (default: cwd)"
|
|
@@ -218,7 +235,7 @@ const registerPaywallCommands = (cli) => cli.command("create [dir]", "Set up pay
|
|
|
218
235
|
platform: {
|
|
219
236
|
type: "array",
|
|
220
237
|
string: true,
|
|
221
|
-
describe: "Limit to these platforms (repeatable, or comma-separated) - ios, android, web
|
|
238
|
+
describe: "Limit to these platforms (repeatable, or comma-separated) - ios, android, web"
|
|
222
239
|
},
|
|
223
240
|
rename: {
|
|
224
241
|
type: "array",
|
|
@@ -231,7 +248,7 @@ const registerPaywallCommands = (cli) => cli.command("create [dir]", "Set up pay
|
|
|
231
248
|
describe: "Publish note recorded in the source commit (only lands when this publish creates a new source commit — unchanged source reuses the existing commit)"
|
|
232
249
|
}
|
|
233
250
|
}), (argv) => {
|
|
234
|
-
return import("./push-
|
|
251
|
+
return import("./push-Dox4_5Dq.js").then((m) => m.runPush(argv));
|
|
235
252
|
}).command("promote [dir]", "Point production at a pushed version (the latest by default)", (y) => y.version(false).positional("dir", {
|
|
236
253
|
type: "string",
|
|
237
254
|
describe: "Project directory (default: cwd)"
|
|
@@ -244,7 +261,7 @@ const registerPaywallCommands = (cli) => cli.command("create [dir]", "Set up pay
|
|
|
244
261
|
platform: {
|
|
245
262
|
type: "array",
|
|
246
263
|
string: true,
|
|
247
|
-
describe: "Limit to these platforms (repeatable, or comma-separated) - ios, android, web
|
|
264
|
+
describe: "Limit to these platforms (repeatable, or comma-separated) - ios, android, web"
|
|
248
265
|
},
|
|
249
266
|
version: {
|
|
250
267
|
type: "number",
|
|
@@ -252,7 +269,7 @@ const registerPaywallCommands = (cli) => cli.command("create [dir]", "Set up pay
|
|
|
252
269
|
describe: "Pushed version number to promote (requires a single --id)"
|
|
253
270
|
}
|
|
254
271
|
}), (argv) => {
|
|
255
|
-
return import("./promote-
|
|
272
|
+
return import("./promote-UMTh8Q33.js").then((m) => m.runPromote(argv));
|
|
256
273
|
}).command("publish [dir]", "Push and promote in one step - build, version, and ship to production", (y) => y.positional("dir", {
|
|
257
274
|
type: "string",
|
|
258
275
|
describe: "Project directory (default: cwd)"
|
|
@@ -265,7 +282,7 @@ const registerPaywallCommands = (cli) => cli.command("create [dir]", "Set up pay
|
|
|
265
282
|
platform: {
|
|
266
283
|
type: "array",
|
|
267
284
|
string: true,
|
|
268
|
-
describe: "Limit to these platforms (repeatable, or comma-separated) - ios, android, web
|
|
285
|
+
describe: "Limit to these platforms (repeatable, or comma-separated) - ios, android, web"
|
|
269
286
|
},
|
|
270
287
|
rename: {
|
|
271
288
|
type: "array",
|
|
@@ -278,7 +295,7 @@ const registerPaywallCommands = (cli) => cli.command("create [dir]", "Set up pay
|
|
|
278
295
|
describe: "Publish note recorded in the source commit (only lands when this publish creates a new source commit — unchanged source reuses the existing commit)"
|
|
279
296
|
}
|
|
280
297
|
}), (argv) => {
|
|
281
|
-
return import("./publish-
|
|
298
|
+
return import("./publish-DWX8S9yZ.js").then((m) => m.runPublish(argv));
|
|
282
299
|
});
|
|
283
300
|
|
|
284
301
|
//#endregion
|
|
@@ -290,7 +307,7 @@ const registerPlatformCommands = (cli) => cli.command("query [sql]", "Run SQL ag
|
|
|
290
307
|
type: "string",
|
|
291
308
|
describe: "Read SQL from a .sql file"
|
|
292
309
|
} }).example("$0 query \"SHOW TABLES FROM sw\"", "Run an inline query").example("$0 query --file report.sql --json", "Run a saved query"), (argv) => {
|
|
293
|
-
return import("./query-
|
|
310
|
+
return import("./query-CnSsDZ7Q.js").then((m) => m.runQuery(argv));
|
|
294
311
|
}).command("asc <target> [value] [value2]", "Call the App Store Connect API through Superwall's signed proxy (no .p8 / JWT needed)", (y) => y.positional("target", {
|
|
295
312
|
type: "string",
|
|
296
313
|
describe: "get|post|patch|delete, a raw path (/v1/...), or: apps | products | subscriptions | iaps | docs | keys"
|
|
@@ -340,7 +357,7 @@ const registerPlatformCommands = (cli) => cli.command("query [sql]", "Run SQL ag
|
|
|
340
357
|
describe: "Plan without writing"
|
|
341
358
|
}
|
|
342
359
|
}), (argv) => {
|
|
343
|
-
return import("./asc-
|
|
360
|
+
return import("./asc-r3xmFT0L.js").then((m) => m.runAsc(argv));
|
|
344
361
|
}).command("asa <target> [action] [value]", "Call the Apple Search Ads API through Superwall's proxy (no key or token handling)", (y) => y.positional("target", {
|
|
345
362
|
type: "string",
|
|
346
363
|
describe: "A resource (campaigns, adgroups, keywords, negative-keywords, ads, creatives, product-pages, ad-rejections, reports, impression-share, apps, geo, budget-orders, acls, me), get|post|put|delete, a raw path (/campaigns), docs, or keys"
|
|
@@ -552,7 +569,7 @@ const registerPlatformCommands = (cli) => cli.command("query [sql]", "Run SQL ag
|
|
|
552
569
|
describe: "product-pages: include deleted assets"
|
|
553
570
|
}
|
|
554
571
|
}), (argv) => {
|
|
555
|
-
return import("./asa-
|
|
572
|
+
return import("./asa-2ykGnjaV.js").then((m) => m.runAsa(argv));
|
|
556
573
|
});
|
|
557
574
|
|
|
558
575
|
//#endregion
|
|
@@ -632,10 +649,10 @@ const registerResourceCommands = (input) => {
|
|
|
632
649
|
describe: "Plan without writing"
|
|
633
650
|
}
|
|
634
651
|
}), (argv) => {
|
|
635
|
-
return import("./resource-
|
|
652
|
+
return import("./resource-5bgyyL9B.js").then((m) => m.runResource(resource)(argv));
|
|
636
653
|
});
|
|
637
654
|
cli = cli.command("bootstrap", "Complete account tree: orgs, projects, apps, campaigns, placements, and products", (y) => y, (argv) => {
|
|
638
|
-
return import("./api-
|
|
655
|
+
return import("./api-BOR-uXZe.js").then((m) => m.runBootstrap(argv));
|
|
639
656
|
});
|
|
640
657
|
for (const verb of API_VERBS) cli = cli.command(`${verb} <path>`, `Make ${verb.toUpperCase()} requests to the Superwall API`, (y) => y.positional("path", {
|
|
641
658
|
type: "string",
|
|
@@ -644,13 +661,23 @@ const registerResourceCommands = (input) => {
|
|
|
644
661
|
type: "array",
|
|
645
662
|
describe: "Param, Stripe-style: -d key=value (string) or key:=value (number/bool/json); nesting via key[sub]"
|
|
646
663
|
} }), (argv) => {
|
|
647
|
-
return import("./api-
|
|
664
|
+
return import("./api-BOR-uXZe.js").then((m) => m.runApi(verb)(argv));
|
|
648
665
|
});
|
|
649
666
|
return cli;
|
|
650
667
|
};
|
|
651
668
|
|
|
652
669
|
//#endregion
|
|
653
670
|
//#region src/cli/workflow.ts
|
|
671
|
+
const migrateNextOptions = {
|
|
672
|
+
screen: {
|
|
673
|
+
type: "string",
|
|
674
|
+
describe: "A SwiftUI, UIKit, Kotlin (Compose or Views), React Native or Flutter file to rebuild as a Superwall screen (no path: pick from likely candidates)"
|
|
675
|
+
},
|
|
676
|
+
screenshot: {
|
|
677
|
+
type: "string",
|
|
678
|
+
describe: "A screenshot of the native screen, shown as Compare › Original in the studio"
|
|
679
|
+
}
|
|
680
|
+
};
|
|
654
681
|
const registerWorkflowCommands = (cli) => cli.command("integrate", "Set up the SDK, placements, and dashboard in your app", (y) => y.options({
|
|
655
682
|
...installDirOption,
|
|
656
683
|
...apiKeyOption,
|
|
@@ -667,8 +694,8 @@ const registerWorkflowCommands = (cli) => cli.command("integrate", "Set up the S
|
|
|
667
694
|
hidden: true
|
|
668
695
|
}
|
|
669
696
|
}), (argv) => {
|
|
670
|
-
if (argv.skill) return import("./print-skill-
|
|
671
|
-
return import("./integrate-
|
|
697
|
+
if (argv.skill) return import("./print-skill-CaHRJ8xW.js").then((m) => m.runPrintSkill("integrate")(argv));
|
|
698
|
+
return import("./integrate-DVqhvPVq.js").then((m) => m.runIntegrate(argv));
|
|
672
699
|
}).command("review", "Review an existing Superwall setup end to end", (y) => y.options({
|
|
673
700
|
...installDirOption,
|
|
674
701
|
...dryRunOption,
|
|
@@ -679,18 +706,25 @@ const registerWorkflowCommands = (cli) => cli.command("integrate", "Set up the S
|
|
|
679
706
|
}
|
|
680
707
|
}), (argv) => {
|
|
681
708
|
const id = argv.fix ? "review-fix" : "review";
|
|
682
|
-
if (argv.skill) return import("./print-skill-
|
|
683
|
-
return import("./integrate-
|
|
684
|
-
}).command("migrate", "Migrate from RevenueCat / Adapty / Qonversion
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
709
|
+
if (argv.skill) return import("./print-skill-CaHRJ8xW.js").then((m) => m.runPrintSkill(id)(argv));
|
|
710
|
+
return import("./integrate-DVqhvPVq.js").then((m) => m.runActionCommand(id)(argv));
|
|
711
|
+
}).command(CHANNEL() === "next" ? "migrate [paywall]" : "migrate", CHANNEL() === "next" ? "Migrate from RevenueCat / Adapty / Qonversion, or rebuild a dashboard paywall or a native screen as code" : "Migrate from RevenueCat / Adapty / Qonversion", (y) => {
|
|
712
|
+
const base = y.options({
|
|
713
|
+
...installDirOption,
|
|
714
|
+
"dry-run": {
|
|
715
|
+
type: "boolean",
|
|
716
|
+
describe: "Plan without changes"
|
|
717
|
+
},
|
|
718
|
+
...skillOption
|
|
719
|
+
}).example("$0 migrate", "Move this app off RevenueCat / Adapty / Qonversion");
|
|
720
|
+
if (CHANNEL() !== "next") return base;
|
|
721
|
+
return base.positional("paywall", {
|
|
722
|
+
type: "string",
|
|
723
|
+
describe: "A dashboard paywall id: scaffold it as code (if not already) and rebuild its pages with your agent, or copy the prompt"
|
|
724
|
+
}).options(migrateNextOptions).example("$0 migrate 65920", "Rebuild dashboard paywall 65920 as code").example("$0 migrate --screen App/UpdateRequiredView.swift", "Rebuild a native screen as a Superwall surface");
|
|
725
|
+
}, (argv) => {
|
|
726
|
+
if (argv.skill && argv.paywall === void 0 && argv.screen === void 0) return import("./print-skill-CaHRJ8xW.js").then((m) => m.runPrintSkill("migrate")(argv));
|
|
727
|
+
return import("./migrate-qmvOtp3l.js").then((m) => m.runMigrate(argv));
|
|
694
728
|
});
|
|
695
729
|
|
|
696
730
|
//#endregion
|
|
@@ -715,7 +749,7 @@ async function run() {
|
|
|
715
749
|
cli = registerAccountCommands(cli);
|
|
716
750
|
cli = registerPlatformCommands(cli);
|
|
717
751
|
cli = registerResourceCommands(cli);
|
|
718
|
-
cli = registerPaywallCommands(cli);
|
|
752
|
+
if (CHANNEL() === "next") cli = registerPaywallCommands(cli);
|
|
719
753
|
await cli.command("$0", false, (y) => y, () => printHelp()).version(VERSION).alias("v", "version").help().alias("h", "help").recommendCommands().showHelpOnFail(false).fail((msg, err) => {
|
|
720
754
|
if (err) throw err;
|
|
721
755
|
const friendly = msg.replace(/^Unknown arguments?:/, "Unknown command:").replace(/^Not enough non-option arguments.*$/, "Missing a required argument.");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as allDeps, r as readPackageJson } from "./scan-
|
|
1
|
+
import { m as Integration } from "./output-CiELrN8w.js";
|
|
2
|
+
import { n as allDeps, r as readPackageJson } from "./scan-CAObNRgc.js";
|
|
3
3
|
import { readFileSync } from "node:fs";
|
|
4
4
|
import fg from "fast-glob";
|
|
5
5
|
|
|
@@ -39,7 +39,10 @@ function sdkInstalledFor(app) {
|
|
|
39
39
|
"**/project.pbxproj",
|
|
40
40
|
"**/Podfile",
|
|
41
41
|
"**/pubspec.yaml",
|
|
42
|
-
"**/pubspec.lock"
|
|
42
|
+
"**/pubspec.lock",
|
|
43
|
+
"**/build.gradle",
|
|
44
|
+
"**/build.gradle.kts",
|
|
45
|
+
"**/libs.versions.toml"
|
|
43
46
|
], {
|
|
44
47
|
cwd: app.path,
|
|
45
48
|
ignore: IGNORE,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as getAnonymousId } from "./telemetry-
|
|
3
|
-
import "./update-
|
|
4
|
-
import { i as loadSession } from "./token-
|
|
5
|
-
import { t as defineCommand } from "./command-
|
|
6
|
-
import "./ui-
|
|
1
|
+
import { _ as TELEMETRY_HOST, v as TELEMETRY_KEY, y as VERSION } from "./output-CiELrN8w.js";
|
|
2
|
+
import { a as getAnonymousId } from "./telemetry-BuCbmoux.js";
|
|
3
|
+
import "./update-DnGfpCD7.js";
|
|
4
|
+
import { i as loadSession } from "./token-mju3Q-vc.js";
|
|
5
|
+
import { t as defineCommand } from "./command-DMoMn7uc.js";
|
|
6
|
+
import "./ui-4gLyfrgl.js";
|
|
7
7
|
|
|
8
8
|
//#region src/core/feedback.ts
|
|
9
9
|
function buildFeedbackEvent(message, via, distinctId, session) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as loadSession, t as getOAuthAccessToken } from "./token-
|
|
1
|
+
import { o as API_HOST } from "./output-CiELrN8w.js";
|
|
2
|
+
import { i as loadSession, t as getOAuthAccessToken } from "./token-mju3Q-vc.js";
|
|
3
3
|
|
|
4
4
|
//#region src/core/agent/hosted.ts
|
|
5
5
|
const STATUS_PATH = "/v2/cli-agent/status";
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { r as setTelemetryTags, s as getOnboardedApp } from "./telemetry-
|
|
3
|
-
import "./update-
|
|
4
|
-
import { i as loadSession } from "./token-
|
|
5
|
-
import {
|
|
6
|
-
import { i as stripReport, n as ui } from "./ui-
|
|
7
|
-
import { n as ensureSkillsCurrent } from "./skills-
|
|
1
|
+
import { b as apiKeyFromEnv, f as DASHBOARD_URL, r as formatJson, t as blocks, y as VERSION } from "./output-CiELrN8w.js";
|
|
2
|
+
import { r as setTelemetryTags, s as getOnboardedApp } from "./telemetry-BuCbmoux.js";
|
|
3
|
+
import "./update-DnGfpCD7.js";
|
|
4
|
+
import { i as loadSession } from "./token-mju3Q-vc.js";
|
|
5
|
+
import { a as superwallApi, t as defineCommand } from "./command-DMoMn7uc.js";
|
|
6
|
+
import { i as stripReport, n as ui } from "./ui-4gLyfrgl.js";
|
|
7
|
+
import { n as ensureSkillsCurrent } from "./skills-grTDuHlc.js";
|
|
8
8
|
import "./spawn-DSoTXy_j.js";
|
|
9
|
-
import "./login-
|
|
10
|
-
import { i as SUPPORTED_LABEL, t as scanProject } from "./scan-
|
|
11
|
-
import { t as detectDrivers } from "./drivers-
|
|
12
|
-
import "./hosted-
|
|
13
|
-
import { t as detectExisting } from "./existing-
|
|
14
|
-
import { t as withSpinner } from "./spinner-
|
|
15
|
-
import {
|
|
16
|
-
import "./org-
|
|
17
|
-
import { n as resolveAppBinding, r as resolveScopeFromKey, t as platformForIntegration } from "./bind-
|
|
18
|
-
import { r as actionById } from "./actions-
|
|
19
|
-
import { a as recoverUnmatchedScope, i as pickApp, n as ensureAgentDriverReady, o as stage, r as performLoginWithUi, t as chooseAction } from "./app-
|
|
20
|
-
import {
|
|
21
|
-
import { t as
|
|
22
|
-
import {
|
|
23
|
-
import { t as
|
|
24
|
-
import {
|
|
25
|
-
import { homedir } from "node:os";
|
|
9
|
+
import "./login-Bjj8QvIN.js";
|
|
10
|
+
import { i as SUPPORTED_LABEL, t as scanProject } from "./scan-CAObNRgc.js";
|
|
11
|
+
import { t as detectDrivers } from "./drivers-Cr252DOJ.js";
|
|
12
|
+
import "./hosted-Cjekn8oJ.js";
|
|
13
|
+
import { t as detectExisting } from "./existing-Ckx_g7Be.js";
|
|
14
|
+
import { t as withSpinner } from "./spinner-DFctF_Jw.js";
|
|
15
|
+
import { T as rowName, b as platformLabel, g as listResource, o as createProduct, p as listApplications } from "./resources-Bf9O1JNM.js";
|
|
16
|
+
import "./org-CV8c849b.js";
|
|
17
|
+
import { n as resolveAppBinding, r as resolveScopeFromKey, t as platformForIntegration } from "./bind-BSTAinn6.js";
|
|
18
|
+
import { r as actionById } from "./actions-Dt35nIi8.js";
|
|
19
|
+
import { a as recoverUnmatchedScope, i as pickApp, n as ensureAgentDriverReady, o as stage, r as performLoginWithUi, t as chooseAction } from "./app-BU27SLPX.js";
|
|
20
|
+
import { a as copyToClipboard, r as buildCopyPrompt, t as runAction } from "./run-BVeZWbXx.js";
|
|
21
|
+
import { c as listAscConfigs, i as listAscApps, n as fetchUnimportedAscProducts, o as createAscConfig, r as findAscAppId, t as ascTypeDisplay } from "./asc-products-1e1DoGeL.js";
|
|
22
|
+
import { t as generateStoreKit } from "./storekit-Dlpbq5Wv.js";
|
|
23
|
+
import { n as saveReport, t as loadReport } from "./reports-C0xHCLnt.js";
|
|
24
|
+
import { t as detectBilling } from "./billing-BsQgXXYh.js";
|
|
26
25
|
import { basename, join } from "node:path";
|
|
27
|
-
import {
|
|
26
|
+
import { homedir } from "node:os";
|
|
27
|
+
import { readFileSync, writeFileSync } from "node:fs";
|
|
28
28
|
import fg from "fast-glob";
|
|
29
29
|
|
|
30
30
|
//#region src/core/account/index.ts
|
|
@@ -406,45 +406,6 @@ async function runFallback(installDir) {
|
|
|
406
406
|
ui.outro("Re-run `superwall integrate` after installing an agent.");
|
|
407
407
|
}
|
|
408
408
|
|
|
409
|
-
//#endregion
|
|
410
|
-
//#region src/clipboard.ts
|
|
411
|
-
async function copyToClipboard(text) {
|
|
412
|
-
const cmd = clipboardCommand();
|
|
413
|
-
if (!cmd) return false;
|
|
414
|
-
return new Promise((resolve$1) => {
|
|
415
|
-
try {
|
|
416
|
-
const child = spawn(cmd.command, cmd.args, { stdio: [
|
|
417
|
-
"pipe",
|
|
418
|
-
"ignore",
|
|
419
|
-
"ignore"
|
|
420
|
-
] });
|
|
421
|
-
child.on("error", () => resolve$1(false));
|
|
422
|
-
child.on("close", (code) => resolve$1(code === 0));
|
|
423
|
-
child.stdin.on("error", () => resolve$1(false));
|
|
424
|
-
child.stdin.write(text);
|
|
425
|
-
child.stdin.end();
|
|
426
|
-
} catch {
|
|
427
|
-
resolve$1(false);
|
|
428
|
-
}
|
|
429
|
-
});
|
|
430
|
-
}
|
|
431
|
-
function clipboardCommand() {
|
|
432
|
-
switch (process.platform) {
|
|
433
|
-
case "darwin": return {
|
|
434
|
-
command: "pbcopy",
|
|
435
|
-
args: []
|
|
436
|
-
};
|
|
437
|
-
case "win32": return {
|
|
438
|
-
command: "clip",
|
|
439
|
-
args: []
|
|
440
|
-
};
|
|
441
|
-
default: return {
|
|
442
|
-
command: "xclip",
|
|
443
|
-
args: ["-selection", "clipboard"]
|
|
444
|
-
};
|
|
445
|
-
}
|
|
446
|
-
}
|
|
447
|
-
|
|
448
409
|
//#endregion
|
|
449
410
|
//#region src/commands/workflow/integrate/agent.ts
|
|
450
411
|
async function copyIntegrationPrompt(context) {
|
|
@@ -552,14 +513,12 @@ function campaignSummary(campaigns) {
|
|
|
552
513
|
const runIntegrate = defineCommand({
|
|
553
514
|
name: "integrate",
|
|
554
515
|
auth: "optional",
|
|
555
|
-
telemetry: "workflow",
|
|
556
516
|
run: runPipeline
|
|
557
517
|
});
|
|
558
518
|
function runActionCommand(action) {
|
|
559
519
|
return defineCommand({
|
|
560
520
|
name: action,
|
|
561
521
|
auth: "optional",
|
|
562
|
-
telemetry: "workflow",
|
|
563
522
|
run: (ctx) => runFlow(ctx, action)
|
|
564
523
|
});
|
|
565
524
|
}
|