@superwall/cli 1.1.0 → 1.2.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 +212 -19
- package/dist/{actions-MB-eBY64.js → actions-DYQTxMXS.js} +2 -2
- package/dist/{api-BF7-toqM.js → api-B2Zsf08U.js} +3 -3
- package/dist/{app-K6j9Es7h.js → app-rYAP19Jo.js} +6 -6
- package/dist/asa-DlM6dlPD.js +1194 -0
- package/dist/{asc-CArSwo5D.js → asc-D6qBCfuj.js} +4 -4
- package/dist/{auth-CY2cO_NF.js → auth-BEnVvJlK.js} +6 -6
- package/dist/{billing-DWyfEQ6l.js → billing-DO-gNWvW.js} +1 -1
- package/dist/{bind-hslFhcTR.js → bind-KZhPLTdC.js} +1 -1
- package/dist/{command-Kwx4ekbo.js → command-B12qooZb.js} +17 -13
- package/dist/{create-Bbi8BOO1.js → create-BTEvRC1X.js} +12 -12
- package/dist/{dev-D0lQDCQI.js → dev-CwfCGm36.js} +12 -12
- package/dist/{doctor-ByeRdMcl.js → doctor-DIxs8i8A.js} +7 -7
- package/dist/{drivers-DVAZgone.js → drivers-D6Ka26e2.js} +2 -2
- package/dist/entry.js +221 -25
- package/dist/{existing-CcJrIIAU.js → existing-CECenoHS.js} +2 -2
- package/dist/{feedback-Z0Wk7VC5.js → feedback-CV2coV73.js} +3 -3
- package/dist/{git-3OX9u3xE.js → git-CCJwXufi.js} +3 -3
- package/dist/{hosted-CHwaUqLd.js → hosted-BCwzTTEw.js} +1 -1
- package/dist/{integrate-DqOAqK7J.js → integrate-Bhq0wkU0.js} +16 -16
- package/dist/{login-Dr8UN_Gx.js → login-D5TjqsXJ.js} +1 -1
- package/dist/{migrate-D92bJTg6.js → migrate-Cz7VqQNj.js} +14 -14
- package/dist/{pipeline-CHHIg6BU.js → pipeline-ChRDxU9b.js} +4 -78
- package/dist/{print-skill-BnZAk7dV.js → print-skill-BPePCjy4.js} +5 -5
- package/dist/{promote-CRe9170G.js → promote-C54bfsg3.js} +12 -12
- package/dist/{publish-DsODvrOD.js → publish-NUNSIKri.js} +12 -12
- package/dist/{push-BDkZUC0v.js → push-BjEpY9-h.js} +12 -12
- package/dist/{query-DIllrSnk.js → query-CXjrBFow.js} +3 -3
- package/dist/{resource-CdP1MDla.js → resource-CM2bIB5v.js} +7 -7
- package/dist/{run-cGGBUMs5.js → run-CAIDPbwe.js} +2 -2
- package/dist/{scan-BQexuUPO.js → scan-BrikLKx5.js} +1 -1
- package/dist/{skills-xrfXt9u0.js → skills-BwXcAVIf.js} +1 -1
- package/dist/{skills-DhuUs28u.js → skills-_TULXe09.js} +4 -4
- package/dist/{telemetry-CcfrtXdf.js → telemetry-CpIXSAbQ.js} +1 -1
- package/dist/{update-BiVeR024.js → update-BdcpwRu_.js} +1 -1
- package/dist/{upgrade-DYWspApv.js → upgrade-BNPbzr5V.js} +3 -3
- package/package.json +2 -1
- /package/dist/{asc-products-YQ6Oc6YO.js → asc-products-C6MvSy8H.js} +0 -0
- /package/dist/{storekit-Ddvs4Ynw.js → storekit-DPonXSwe.js} +0 -0
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import "./telemetry-
|
|
1
|
+
import "./telemetry-CpIXSAbQ.js";
|
|
2
2
|
import "./json-C3hPIMkI.js";
|
|
3
|
-
import "./update-
|
|
3
|
+
import "./update-BdcpwRu_.js";
|
|
4
4
|
import "./token-DHRH8cxi.js";
|
|
5
|
-
import { t as defineCommand } from "./command-
|
|
5
|
+
import { t as defineCommand } from "./command-B12qooZb.js";
|
|
6
6
|
import "./ui-C4ncRJqd.js";
|
|
7
7
|
import "./spinner-gOxIMz-V.js";
|
|
8
8
|
import { C as rowName } from "./resources-CVrWwA1K.js";
|
|
9
9
|
import { t as requireOrg } from "./org-B2gy9Pmu.js";
|
|
10
10
|
import { t as parseParams } from "./params-Bvq0iqQK.js";
|
|
11
11
|
import { n as emitJson, t as apiCall } from "./api-output-B5hh0q4V.js";
|
|
12
|
-
import { a as ascProxy, c as listAscConfigs, i as listAscApps, n as fetchUnimportedAscProducts, o as createAscConfig, r as findAscAppId, s as deleteAscConfig, t as ascTypeDisplay } from "./asc-products-
|
|
12
|
+
import { a as ascProxy, c as listAscConfigs, i as listAscApps, n as fetchUnimportedAscProducts, o as createAscConfig, r as findAscAppId, s as deleteAscConfig, t as ascTypeDisplay } from "./asc-products-C6MvSy8H.js";
|
|
13
13
|
import { existsSync, mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
14
14
|
import { homedir } from "node:os";
|
|
15
15
|
import { dirname, join } from "node:path";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { i as track, y as API_HOST } from "./telemetry-
|
|
1
|
+
import { i as track, y as API_HOST } from "./telemetry-CpIXSAbQ.js";
|
|
2
2
|
import "./json-C3hPIMkI.js";
|
|
3
|
-
import "./update-
|
|
3
|
+
import "./update-BdcpwRu_.js";
|
|
4
4
|
import { i as loadSession, r as clearSession } from "./token-DHRH8cxi.js";
|
|
5
|
-
import { t as defineCommand } from "./command-
|
|
5
|
+
import { t as defineCommand } from "./command-B12qooZb.js";
|
|
6
6
|
import "./ui-C4ncRJqd.js";
|
|
7
|
-
import { n as ensureSkillsCurrent } from "./skills-
|
|
7
|
+
import { n as ensureSkillsCurrent } from "./skills-BwXcAVIf.js";
|
|
8
8
|
import "./spawn-DSoTXy_j.js";
|
|
9
|
-
import { n as performLogin, r as onboardingHooks, t as loginWithApiKey } from "./login-
|
|
10
|
-
import { t as scanProject } from "./scan-
|
|
9
|
+
import { n as performLogin, r as onboardingHooks, t as loginWithApiKey } from "./login-D5TjqsXJ.js";
|
|
10
|
+
import { t as scanProject } from "./scan-BrikLKx5.js";
|
|
11
11
|
|
|
12
12
|
//#region src/commands/account/auth.ts
|
|
13
13
|
const runLogin = defineCommand({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as Integration } from "./telemetry-
|
|
1
|
+
import { T as Integration } from "./telemetry-CpIXSAbQ.js";
|
|
2
2
|
import { n as ui } from "./ui-C4ncRJqd.js";
|
|
3
3
|
import { m as listProjects, n as createApplication, s as createProject, y as platformLabel } from "./resources-CVrWwA1K.js";
|
|
4
4
|
import { t as requireOrg } from "./org-B2gy9Pmu.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as track, n as maybeShowTelemetryNotice, o as isNonInteractive, y as API_HOST } from "./telemetry-
|
|
2
|
-
import { a as refreshUpdateCheck, c as writeJson, i as maybeNotifyUpdate, s as createCommandOutput } from "./update-
|
|
1
|
+
import { i as track, n as maybeShowTelemetryNotice, o as isNonInteractive, y as API_HOST } from "./telemetry-CpIXSAbQ.js";
|
|
2
|
+
import { a as refreshUpdateCheck, c as writeJson, i as maybeNotifyUpdate, s as createCommandOutput } from "./update-BdcpwRu_.js";
|
|
3
3
|
import { a as saveSession, i as loadSession, n as resolveAuthToken, o as NotLoggedInError } from "./token-DHRH8cxi.js";
|
|
4
4
|
import { t as selectRenderer } from "./ui-C4ncRJqd.js";
|
|
5
5
|
import pc from "picocolors";
|
|
@@ -94,17 +94,18 @@ var SuperwallApi = class SuperwallApi {
|
|
|
94
94
|
base() {
|
|
95
95
|
return this.host;
|
|
96
96
|
}
|
|
97
|
-
async request(method, path, body) {
|
|
97
|
+
async request(method, path, body, options = {}) {
|
|
98
98
|
const { token, session } = await resolveAuthToken(this.session);
|
|
99
99
|
this.session = session;
|
|
100
100
|
const res = await this.fetch(`${this.base()}${path}`, {
|
|
101
101
|
method,
|
|
102
102
|
headers: {
|
|
103
|
+
...options.headers,
|
|
103
104
|
authorization: `Bearer ${token}`,
|
|
104
105
|
accept: "application/json",
|
|
105
|
-
...body ? { "content-type": "application/json" } : {}
|
|
106
|
+
...body !== void 0 ? { "content-type": "application/json" } : {}
|
|
106
107
|
},
|
|
107
|
-
...body ? { body: JSON.stringify(body) } : {}
|
|
108
|
+
...body !== void 0 ? { body: JSON.stringify(body) } : {}
|
|
108
109
|
});
|
|
109
110
|
if (!res.ok) {
|
|
110
111
|
const text = await res.text().catch(() => "");
|
|
@@ -120,17 +121,20 @@ var SuperwallApi = class SuperwallApi {
|
|
|
120
121
|
throw new ApiUnreachableError(this.base(), error);
|
|
121
122
|
}
|
|
122
123
|
}
|
|
123
|
-
get(path) {
|
|
124
|
-
return this.request("GET", path);
|
|
124
|
+
get(path, options) {
|
|
125
|
+
return this.request("GET", path, void 0, options);
|
|
125
126
|
}
|
|
126
|
-
post(path, body) {
|
|
127
|
-
return this.request("POST", path, body);
|
|
127
|
+
post(path, body, options) {
|
|
128
|
+
return this.request("POST", path, body, options);
|
|
128
129
|
}
|
|
129
|
-
|
|
130
|
-
return this.request("
|
|
130
|
+
put(path, body, options) {
|
|
131
|
+
return this.request("PUT", path, body, options);
|
|
131
132
|
}
|
|
132
|
-
|
|
133
|
-
return this.request("
|
|
133
|
+
patch(path, body, options) {
|
|
134
|
+
return this.request("PATCH", path, body, options);
|
|
135
|
+
}
|
|
136
|
+
del(path, options) {
|
|
137
|
+
return this.request("DELETE", path, void 0, options);
|
|
134
138
|
}
|
|
135
139
|
async postText(path, body) {
|
|
136
140
|
const { token, session } = await resolveAuthToken(this.session);
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import "./telemetry-
|
|
1
|
+
import "./telemetry-CpIXSAbQ.js";
|
|
2
2
|
import "./json-C3hPIMkI.js";
|
|
3
|
-
import "./update-
|
|
3
|
+
import "./update-BdcpwRu_.js";
|
|
4
4
|
import "./token-DHRH8cxi.js";
|
|
5
|
-
import { t as defineCommand } from "./command-
|
|
5
|
+
import { t as defineCommand } from "./command-B12qooZb.js";
|
|
6
6
|
import "./ui-C4ncRJqd.js";
|
|
7
|
-
import "./skills-
|
|
7
|
+
import "./skills-BwXcAVIf.js";
|
|
8
8
|
import "./spawn-DSoTXy_j.js";
|
|
9
|
-
import "./login-
|
|
10
|
-
import { n as allDeps, r as readPackageJson, t as scanProject } from "./scan-
|
|
11
|
-
import "./hosted-
|
|
12
|
-
import { t as detectExisting } from "./existing-
|
|
9
|
+
import "./login-D5TjqsXJ.js";
|
|
10
|
+
import { n as allDeps, r as readPackageJson, t as scanProject } from "./scan-BrikLKx5.js";
|
|
11
|
+
import "./hosted-BCwzTTEw.js";
|
|
12
|
+
import { t as detectExisting } from "./existing-CECenoHS.js";
|
|
13
13
|
import "./spinner-gOxIMz-V.js";
|
|
14
14
|
import { f as listApplications, m as listProjects, n as createApplication, y as platformLabel } from "./resources-CVrWwA1K.js";
|
|
15
15
|
import "./org-B2gy9Pmu.js";
|
|
16
|
-
import { r as resolveScopeFromKey } from "./bind-
|
|
17
|
-
import { a as projectPackageName, i as requireApi, l as requirePlatform, m as writeApp, r as LoginRequiredError, t as gitAvailable } from "./git-
|
|
18
|
-
import "./actions-
|
|
19
|
-
import "./app-
|
|
16
|
+
import { r as resolveScopeFromKey } from "./bind-KZhPLTdC.js";
|
|
17
|
+
import { a as projectPackageName, i as requireApi, l as requirePlatform, m as writeApp, r as LoginRequiredError, t as gitAvailable } from "./git-CCJwXufi.js";
|
|
18
|
+
import "./actions-DYQTxMXS.js";
|
|
19
|
+
import "./app-rYAP19Jo.js";
|
|
20
20
|
import pc from "picocolors";
|
|
21
21
|
import { promisify } from "node:util";
|
|
22
22
|
import * as fs from "node:fs";
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { k as VERSION } from "./telemetry-
|
|
1
|
+
import { k as VERSION } from "./telemetry-CpIXSAbQ.js";
|
|
2
2
|
import "./json-C3hPIMkI.js";
|
|
3
|
-
import "./update-
|
|
3
|
+
import "./update-BdcpwRu_.js";
|
|
4
4
|
import "./token-DHRH8cxi.js";
|
|
5
|
-
import { t as defineCommand } from "./command-
|
|
5
|
+
import { t as defineCommand } from "./command-B12qooZb.js";
|
|
6
6
|
import { n as ui } from "./ui-C4ncRJqd.js";
|
|
7
|
-
import "./skills-
|
|
7
|
+
import "./skills-BwXcAVIf.js";
|
|
8
8
|
import "./spawn-DSoTXy_j.js";
|
|
9
|
-
import "./login-
|
|
10
|
-
import "./scan-
|
|
11
|
-
import "./hosted-
|
|
9
|
+
import "./login-D5TjqsXJ.js";
|
|
10
|
+
import "./scan-BrikLKx5.js";
|
|
11
|
+
import "./hosted-BCwzTTEw.js";
|
|
12
12
|
import "./spinner-gOxIMz-V.js";
|
|
13
13
|
import { S as pushPaywallVersion, T as versionProducts, b as promotePaywallVersion, f as listApplications } from "./resources-CVrWwA1K.js";
|
|
14
14
|
import "./org-B2gy9Pmu.js";
|
|
15
|
-
import "./bind-
|
|
16
|
-
import { f as readLock, i as requireApi, o as writeProjectScaffold, u as resolveApps } from "./git-
|
|
17
|
-
import "./actions-
|
|
18
|
-
import "./app-
|
|
19
|
-
import { C as syncAssets, D as writeProjectTypes, E as collectProjectDeclarations, S as requireAssets, T as loadFramework, _ as planTargets, a as requireProject, b as resolveBinding, d as pushSource, f as collectSourceFiles, h as projectForApplication, i as projectDirs, m as fetchProducts, p as warnNotPortable, r as projectDir, t as LAYOUT_HINT, w as frameworkVersion, x as assetBaseUrl, y as wantedPlatforms } from "./pipeline-
|
|
15
|
+
import "./bind-KZhPLTdC.js";
|
|
16
|
+
import { f as readLock, i as requireApi, o as writeProjectScaffold, u as resolveApps } from "./git-CCJwXufi.js";
|
|
17
|
+
import "./actions-DYQTxMXS.js";
|
|
18
|
+
import "./app-rYAP19Jo.js";
|
|
19
|
+
import { C as syncAssets, D as writeProjectTypes, E as collectProjectDeclarations, S as requireAssets, T as loadFramework, _ as planTargets, a as requireProject, b as resolveBinding, d as pushSource, f as collectSourceFiles, h as projectForApplication, i as projectDirs, m as fetchProducts, p as warnNotPortable, r as projectDir, t as LAYOUT_HINT, w as frameworkVersion, x as assetBaseUrl, y as wantedPlatforms } from "./pipeline-ChRDxU9b.js";
|
|
20
20
|
import pc from "picocolors";
|
|
21
21
|
import * as fs from "node:fs";
|
|
22
22
|
import * as path from "node:path";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { a as apiKeyFromEnv } from "./telemetry-
|
|
1
|
+
import { a as apiKeyFromEnv } from "./telemetry-CpIXSAbQ.js";
|
|
2
2
|
import "./json-C3hPIMkI.js";
|
|
3
|
-
import "./update-
|
|
3
|
+
import "./update-BdcpwRu_.js";
|
|
4
4
|
import { i as loadSession } from "./token-DHRH8cxi.js";
|
|
5
|
-
import { t as defineCommand } from "./command-
|
|
5
|
+
import { t as defineCommand } from "./command-B12qooZb.js";
|
|
6
6
|
import { a as fg, i as THEME, n as ui } from "./ui-C4ncRJqd.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-BrikLKx5.js";
|
|
9
|
+
import { t as detectDrivers } from "./drivers-D6Ka26e2.js";
|
|
10
|
+
import "./hosted-BCwzTTEw.js";
|
|
11
|
+
import { t as detectExisting } from "./existing-CECenoHS.js";
|
|
12
12
|
|
|
13
13
|
//#region src/commands/account/doctor.ts
|
|
14
14
|
const runDoctor = defineCommand({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { k as VERSION } from "./telemetry-
|
|
1
|
+
import { k as VERSION } from "./telemetry-CpIXSAbQ.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-
|
|
3
|
+
import { n as getHostedAuthToken, r as getHostedStatus, t as getHostedAnthropicBaseUrl } from "./hosted-BCwzTTEw.js";
|
|
4
4
|
import { tmpdir } from "node:os";
|
|
5
5
|
import { basename, join } from "node:path";
|
|
6
6
|
import { readFile, rm } from "node:fs/promises";
|
package/dist/entry.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { k as VERSION, t as flushTelemetry, w as ENV_API_KEY } from "./telemetry-
|
|
1
|
+
import { k as VERSION, t as flushTelemetry, w as ENV_API_KEY } from "./telemetry-CpIXSAbQ.js";
|
|
2
2
|
import "./json-C3hPIMkI.js";
|
|
3
|
-
import { c as writeJson, n as flushUpdateCheck } from "./update-
|
|
3
|
+
import { c as writeJson, n as flushUpdateCheck } from "./update-BdcpwRu_.js";
|
|
4
4
|
import yargs from "yargs";
|
|
5
5
|
import { hideBin } from "yargs/helpers";
|
|
6
6
|
import pc from "picocolors";
|
|
@@ -80,6 +80,11 @@ function printHelp() {
|
|
|
80
80
|
row("asc docs", "Exact ASC request schema, from Apple's spec (path or search)"),
|
|
81
81
|
row("asc keys", "Manage App Store Connect API keys (list, set, rm)"),
|
|
82
82
|
"",
|
|
83
|
+
head("Apple Search Ads commands"),
|
|
84
|
+
row("asa", "The Apple Ads API via Superwall's proxy (campaigns, keywords, reports, ...)"),
|
|
85
|
+
row("asa docs", "Every endpoint, with Apple's own schema (group, group action, or search)"),
|
|
86
|
+
row("asa keys", "Which apps have Apple Search Ads connected"),
|
|
87
|
+
"",
|
|
83
88
|
head("Other commands"),
|
|
84
89
|
row("login, logout, whoami", "Authenticate the CLI"),
|
|
85
90
|
row("skills", "Install or update the Superwall agent skills"),
|
|
@@ -128,8 +133,8 @@ async function run() {
|
|
|
128
133
|
hidden: true
|
|
129
134
|
}
|
|
130
135
|
}), (argv) => {
|
|
131
|
-
if (argv.skill) return import("./print-skill-
|
|
132
|
-
return import("./integrate-
|
|
136
|
+
if (argv.skill) return import("./print-skill-BPePCjy4.js").then((m) => m.runPrintSkill("integrate")(argv));
|
|
137
|
+
return import("./integrate-Bhq0wkU0.js").then((m) => m.runIntegrate(argv));
|
|
133
138
|
}).command("review", "Review an existing Superwall setup end to end", (y) => y.options({
|
|
134
139
|
...installDirOption,
|
|
135
140
|
...dryRunOption,
|
|
@@ -140,8 +145,8 @@ async function run() {
|
|
|
140
145
|
}
|
|
141
146
|
}), (argv) => {
|
|
142
147
|
const id = argv.fix ? "review-fix" : "review";
|
|
143
|
-
if (argv.skill) return import("./print-skill-
|
|
144
|
-
return import("./integrate-
|
|
148
|
+
if (argv.skill) return import("./print-skill-BPePCjy4.js").then((m) => m.runPrintSkill(id)(argv));
|
|
149
|
+
return import("./integrate-Bhq0wkU0.js").then((m) => m.runActionCommand(id)(argv));
|
|
145
150
|
}).command("migrate", "Migrate from RevenueCat / Adapty / Qonversion to Superwall", (y) => y.options({
|
|
146
151
|
...installDirOption,
|
|
147
152
|
"dry-run": {
|
|
@@ -150,8 +155,8 @@ async function run() {
|
|
|
150
155
|
},
|
|
151
156
|
...skillOption
|
|
152
157
|
}), (argv) => {
|
|
153
|
-
if (argv.skill) return import("./print-skill-
|
|
154
|
-
return import("./migrate-
|
|
158
|
+
if (argv.skill) return import("./print-skill-BPePCjy4.js").then((m) => m.runPrintSkill("migrate")(argv));
|
|
159
|
+
return import("./migrate-Cz7VqQNj.js").then((m) => m.runMigrate(argv));
|
|
155
160
|
}).command("login", "Log in to Superwall (opens your browser)", (y) => y.options({
|
|
156
161
|
"api-key": {
|
|
157
162
|
type: "string",
|
|
@@ -168,11 +173,11 @@ async function run() {
|
|
|
168
173
|
hidden: true
|
|
169
174
|
}
|
|
170
175
|
}), (argv) => {
|
|
171
|
-
return import("./auth-
|
|
176
|
+
return import("./auth-BEnVvJlK.js").then((m) => m.runLogin(argv));
|
|
172
177
|
}).command("logout", "Log out of Superwall", (y) => y, (argv) => {
|
|
173
|
-
return import("./auth-
|
|
178
|
+
return import("./auth-BEnVvJlK.js").then((m) => m.runLogout(argv));
|
|
174
179
|
}).command("whoami", "Show the logged-in Superwall account", (y) => y, (argv) => {
|
|
175
|
-
return import("./auth-
|
|
180
|
+
return import("./auth-BEnVvJlK.js").then((m) => m.runWhoami(argv));
|
|
176
181
|
}).command("skills", "Install or update the Superwall agent skills for your coding agent", (y) => y.options({
|
|
177
182
|
skill: {
|
|
178
183
|
type: "array",
|
|
@@ -193,16 +198,16 @@ async function run() {
|
|
|
193
198
|
hidden: true
|
|
194
199
|
}
|
|
195
200
|
}), (argv) => {
|
|
196
|
-
return import("./skills-
|
|
201
|
+
return import("./skills-_TULXe09.js").then((m) => m.runSkills(argv));
|
|
197
202
|
}).command("doctor", "Check the health of your Superwall integration", (y) => y.options({ ...installDirOption }), (argv) => {
|
|
198
|
-
return import("./doctor-
|
|
203
|
+
return import("./doctor-DIxs8i8A.js").then((m) => m.runDoctor(argv));
|
|
199
204
|
}).command("upgrade", "Update the CLI to the latest version", (y) => y, (argv) => {
|
|
200
|
-
return import("./upgrade-
|
|
205
|
+
return import("./upgrade-BNPbzr5V.js").then((m) => m.runUpgrade(argv));
|
|
201
206
|
}).command("feedback [message]", "Send feedback about the CLI to the Superwall team", (y) => y.positional("message", {
|
|
202
207
|
type: "string",
|
|
203
208
|
describe: "Your feedback (omit to be prompted)"
|
|
204
209
|
}).example("$0 feedback \"migrate crashed on Expo\"", "Send feedback").example("$0 feedback \"...\" --json", "For agents / automation"), (argv) => {
|
|
205
|
-
return import("./feedback-
|
|
210
|
+
return import("./feedback-CV2coV73.js").then((m) => m.runFeedback(argv));
|
|
206
211
|
}).command("query [sql]", "Run SQL against your ClickHouse analytics data", (y) => y.positional("sql", {
|
|
207
212
|
type: "string",
|
|
208
213
|
describe: "SQL query (or pass it with --file / stdin)"
|
|
@@ -210,7 +215,7 @@ async function run() {
|
|
|
210
215
|
type: "string",
|
|
211
216
|
describe: "Read SQL from a .sql file"
|
|
212
217
|
} }).example("$0 query \"SHOW TABLES FROM sw\"", "Run an inline query").example("$0 query --file report.sql --json", "Run a saved query"), (argv) => {
|
|
213
|
-
return import("./query-
|
|
218
|
+
return import("./query-CXjrBFow.js").then((m) => m.runQuery(argv));
|
|
214
219
|
}).command("asc <target> [value] [value2]", "Call the App Store Connect API through Superwall's signed proxy (no .p8 / JWT needed)", (y) => y.positional("target", {
|
|
215
220
|
type: "string",
|
|
216
221
|
describe: "get|post|patch|delete, a raw path (/v1/...), or: apps | products | subscriptions | iaps | docs | keys"
|
|
@@ -258,7 +263,198 @@ async function run() {
|
|
|
258
263
|
hidden: true
|
|
259
264
|
}
|
|
260
265
|
}), (argv) => {
|
|
261
|
-
return import("./asc-
|
|
266
|
+
return import("./asc-D6qBCfuj.js").then((m) => m.runAsc(argv));
|
|
267
|
+
}).command("asa <target> [action] [value]", "Call the Apple Search Ads API through Superwall's proxy (no key or token handling)", (y) => y.positional("target", {
|
|
268
|
+
type: "string",
|
|
269
|
+
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"
|
|
270
|
+
}).positional("action", {
|
|
271
|
+
type: "string",
|
|
272
|
+
describe: "list | get | find | create | update | delete | ... (see asa docs <resource>), or the path for a verb"
|
|
273
|
+
}).positional("value", {
|
|
274
|
+
type: "string",
|
|
275
|
+
describe: "Id (comma-separated for bulk), search query, or App Store app id"
|
|
276
|
+
}).options({
|
|
277
|
+
app: {
|
|
278
|
+
type: "string",
|
|
279
|
+
describe: "Superwall app id or name (if several have Apple Search Ads connected)"
|
|
280
|
+
},
|
|
281
|
+
"org-id": {
|
|
282
|
+
type: "string",
|
|
283
|
+
describe: "Apple Search Ads org id (X-AP-Context), if the API user spans several"
|
|
284
|
+
},
|
|
285
|
+
campaign: {
|
|
286
|
+
type: "string",
|
|
287
|
+
describe: "Campaign id"
|
|
288
|
+
},
|
|
289
|
+
adgroup: {
|
|
290
|
+
type: "string",
|
|
291
|
+
describe: "Ad group id"
|
|
292
|
+
},
|
|
293
|
+
"adam-id": {
|
|
294
|
+
type: "string",
|
|
295
|
+
describe: "App Store app id (adamId)"
|
|
296
|
+
},
|
|
297
|
+
d: {
|
|
298
|
+
type: "array",
|
|
299
|
+
describe: "Body field, Stripe-style: -d key=value (string) or key:=value (number/bool/json); nesting via key[sub]. Query params on get/delete"
|
|
300
|
+
},
|
|
301
|
+
body: {
|
|
302
|
+
type: "string",
|
|
303
|
+
describe: "Request body as JSON: inline, @file, or @- for stdin"
|
|
304
|
+
},
|
|
305
|
+
selector: {
|
|
306
|
+
type: "string",
|
|
307
|
+
describe: "Apple selector as JSON (find, reports): inline, @file, or @-"
|
|
308
|
+
},
|
|
309
|
+
field: {
|
|
310
|
+
type: "string",
|
|
311
|
+
describe: "Selector shorthand: field name (with --op and --values)"
|
|
312
|
+
},
|
|
313
|
+
op: {
|
|
314
|
+
type: "string",
|
|
315
|
+
describe: "Selector shorthand: EQUALS, IN, CONTAINS, STARTSWITH, ..."
|
|
316
|
+
},
|
|
317
|
+
values: {
|
|
318
|
+
type: "string",
|
|
319
|
+
describe: "Selector shorthand: comma-separated values"
|
|
320
|
+
},
|
|
321
|
+
"order-by": {
|
|
322
|
+
type: "string",
|
|
323
|
+
describe: "Selector sort: field[:asc|desc]"
|
|
324
|
+
},
|
|
325
|
+
fields: {
|
|
326
|
+
type: "string",
|
|
327
|
+
describe: "Comma-separated fields to return (partial fetch)"
|
|
328
|
+
},
|
|
329
|
+
limit: {
|
|
330
|
+
type: "number",
|
|
331
|
+
describe: "Page size"
|
|
332
|
+
},
|
|
333
|
+
offset: {
|
|
334
|
+
type: "number",
|
|
335
|
+
describe: "Page offset"
|
|
336
|
+
},
|
|
337
|
+
all: {
|
|
338
|
+
type: "boolean",
|
|
339
|
+
describe: "Walk every page"
|
|
340
|
+
},
|
|
341
|
+
currency: {
|
|
342
|
+
type: "string",
|
|
343
|
+
describe: "Currency for money flags (defaults to the account's)"
|
|
344
|
+
},
|
|
345
|
+
name: { type: "string" },
|
|
346
|
+
status: {
|
|
347
|
+
type: "string",
|
|
348
|
+
describe: "ENABLED, PAUSED (keywords: ACTIVE, PAUSED)"
|
|
349
|
+
},
|
|
350
|
+
countries: {
|
|
351
|
+
type: "string",
|
|
352
|
+
describe: "Comma-separated country codes"
|
|
353
|
+
},
|
|
354
|
+
budget: {
|
|
355
|
+
type: "string",
|
|
356
|
+
describe: "Lifetime budget amount"
|
|
357
|
+
},
|
|
358
|
+
"daily-budget": {
|
|
359
|
+
type: "string",
|
|
360
|
+
describe: "Daily budget amount"
|
|
361
|
+
},
|
|
362
|
+
"supply-sources": {
|
|
363
|
+
type: "string",
|
|
364
|
+
describe: "Comma-separated supply sources"
|
|
365
|
+
},
|
|
366
|
+
"ad-channel-type": {
|
|
367
|
+
type: "string",
|
|
368
|
+
describe: "SEARCH or DISPLAY"
|
|
369
|
+
},
|
|
370
|
+
"billing-event": {
|
|
371
|
+
type: "string",
|
|
372
|
+
describe: "TAPS or IMPRESSIONS"
|
|
373
|
+
},
|
|
374
|
+
"default-bid": {
|
|
375
|
+
type: "string",
|
|
376
|
+
describe: "Ad group default bid"
|
|
377
|
+
},
|
|
378
|
+
"cpa-goal": {
|
|
379
|
+
type: "string",
|
|
380
|
+
describe: "Ad group CPA goal"
|
|
381
|
+
},
|
|
382
|
+
"search-match": {
|
|
383
|
+
type: "boolean",
|
|
384
|
+
describe: "Ad group Search Match"
|
|
385
|
+
},
|
|
386
|
+
text: {
|
|
387
|
+
type: "string",
|
|
388
|
+
describe: "Keyword text"
|
|
389
|
+
},
|
|
390
|
+
"match-type": {
|
|
391
|
+
type: "string",
|
|
392
|
+
describe: "BROAD or EXACT"
|
|
393
|
+
},
|
|
394
|
+
bid: {
|
|
395
|
+
type: "string",
|
|
396
|
+
describe: "Keyword bid amount"
|
|
397
|
+
},
|
|
398
|
+
"creative-id": { type: "string" },
|
|
399
|
+
type: {
|
|
400
|
+
type: "string",
|
|
401
|
+
describe: "Creative type"
|
|
402
|
+
},
|
|
403
|
+
"product-page-id": { type: "string" },
|
|
404
|
+
start: {
|
|
405
|
+
type: "string",
|
|
406
|
+
describe: "Start date (YYYY-MM-DD)"
|
|
407
|
+
},
|
|
408
|
+
end: {
|
|
409
|
+
type: "string",
|
|
410
|
+
describe: "End date (YYYY-MM-DD)"
|
|
411
|
+
},
|
|
412
|
+
granularity: {
|
|
413
|
+
type: "string",
|
|
414
|
+
describe: "HOURLY, DAILY, WEEKLY, or MONTHLY"
|
|
415
|
+
},
|
|
416
|
+
"group-by": {
|
|
417
|
+
type: "string",
|
|
418
|
+
describe: "Report dimension (e.g. countryOrRegion)"
|
|
419
|
+
},
|
|
420
|
+
"time-zone": {
|
|
421
|
+
type: "string",
|
|
422
|
+
describe: "Report time zone: UTC or ORTZ"
|
|
423
|
+
},
|
|
424
|
+
dimensions: {
|
|
425
|
+
type: "string",
|
|
426
|
+
describe: "Impression share dimensions"
|
|
427
|
+
},
|
|
428
|
+
metrics: {
|
|
429
|
+
type: "string",
|
|
430
|
+
describe: "Impression share metrics"
|
|
431
|
+
},
|
|
432
|
+
owned: {
|
|
433
|
+
type: "boolean",
|
|
434
|
+
describe: "apps search: only apps this org owns"
|
|
435
|
+
},
|
|
436
|
+
country: {
|
|
437
|
+
type: "string",
|
|
438
|
+
describe: "geo search: country code"
|
|
439
|
+
},
|
|
440
|
+
entity: {
|
|
441
|
+
type: "string",
|
|
442
|
+
describe: "geo: Country, AdminArea, or Locality"
|
|
443
|
+
},
|
|
444
|
+
"adgroup-level": {
|
|
445
|
+
type: "boolean",
|
|
446
|
+
describe: "negative-keywords find: search ad group negatives"
|
|
447
|
+
},
|
|
448
|
+
states: {
|
|
449
|
+
type: "string",
|
|
450
|
+
describe: "product-pages list: comma-separated states"
|
|
451
|
+
},
|
|
452
|
+
"device-classes": { type: "string" },
|
|
453
|
+
"language-codes": { type: "string" },
|
|
454
|
+
expand: { type: "boolean" },
|
|
455
|
+
"include-deleted-assets": { type: "boolean" }
|
|
456
|
+
}), (argv) => {
|
|
457
|
+
return import("./asa-DlM6dlPD.js").then((m) => m.runAsa(argv));
|
|
262
458
|
});
|
|
263
459
|
const RESOURCE_HELP = {
|
|
264
460
|
orgs: "Your Superwall organizations (list, use <id|name>)",
|
|
@@ -333,10 +529,10 @@ async function run() {
|
|
|
333
529
|
describe: "Plan without writing"
|
|
334
530
|
}
|
|
335
531
|
}), (argv) => {
|
|
336
|
-
return import("./resource-
|
|
532
|
+
return import("./resource-CM2bIB5v.js").then((m) => m.runResource(resource)(argv));
|
|
337
533
|
});
|
|
338
534
|
cli = cli.command("bootstrap", "Complete account tree: orgs, projects, apps, campaigns, placements, and products", (y) => y, (argv) => {
|
|
339
|
-
return import("./api-
|
|
535
|
+
return import("./api-B2Zsf08U.js").then((m) => m.runBootstrap(argv));
|
|
340
536
|
});
|
|
341
537
|
for (const verb of API_VERBS) cli = cli.command(`${verb} <path>`, `Make ${verb.toUpperCase()} requests to the Superwall API`, (y) => y.positional("path", {
|
|
342
538
|
type: "string",
|
|
@@ -345,7 +541,7 @@ async function run() {
|
|
|
345
541
|
type: "array",
|
|
346
542
|
describe: "Param, Stripe-style: -d key=value (string) or key:=value (number/bool/json); nesting via key[sub]"
|
|
347
543
|
} }), (argv) => {
|
|
348
|
-
return import("./api-
|
|
544
|
+
return import("./api-B2Zsf08U.js").then((m) => m.runApi(verb)(argv));
|
|
349
545
|
});
|
|
350
546
|
cli = cli.command("create [dir]", "Set up paywalls in your app - creates a superwall/ directory inside it", (y) => y.positional("dir", {
|
|
351
547
|
type: "string",
|
|
@@ -371,7 +567,7 @@ async function run() {
|
|
|
371
567
|
describe: "Connect a Superwall app when possible (--no-connect to skip)"
|
|
372
568
|
}
|
|
373
569
|
}).example("$0 create", "Set up superwall/ in the current app").example("$0 create --example with-rive", "Start from an example"), (argv) => {
|
|
374
|
-
return import("./create-
|
|
570
|
+
return import("./create-BTEvRC1X.js").then((m) => m.runCreate(argv));
|
|
375
571
|
}).command("dev [dir..]", "Host the studio: browse and preview your paywalls and funnels", (y) => y.positional("dir", {
|
|
376
572
|
type: "string",
|
|
377
573
|
array: true,
|
|
@@ -389,7 +585,7 @@ async function run() {
|
|
|
389
585
|
describe: "Host to bind"
|
|
390
586
|
}
|
|
391
587
|
}), (argv) => {
|
|
392
|
-
return import("./dev-
|
|
588
|
+
return import("./dev-CwfCGm36.js").then((m) => m.runDev(argv));
|
|
393
589
|
}).command("push [dir]", "Build and push your paywalls as immutable versions (production untouched)", (y) => y.positional("dir", {
|
|
394
590
|
type: "string",
|
|
395
591
|
describe: "Project directory (default: cwd)"
|
|
@@ -415,7 +611,7 @@ async function run() {
|
|
|
415
611
|
describe: "Publish note recorded in the source commit (only lands when this publish creates a new source commit — unchanged source reuses the existing commit)"
|
|
416
612
|
}
|
|
417
613
|
}), (argv) => {
|
|
418
|
-
return import("./push-
|
|
614
|
+
return import("./push-BjEpY9-h.js").then((m) => m.runPush(argv));
|
|
419
615
|
}).command("promote [dir]", "Point production at a pushed version (the latest by default)", (y) => y.version(false).positional("dir", {
|
|
420
616
|
type: "string",
|
|
421
617
|
describe: "Project directory (default: cwd)"
|
|
@@ -436,7 +632,7 @@ async function run() {
|
|
|
436
632
|
describe: "Pushed version number to promote (requires a single --id)"
|
|
437
633
|
}
|
|
438
634
|
}), (argv) => {
|
|
439
|
-
return import("./promote-
|
|
635
|
+
return import("./promote-C54bfsg3.js").then((m) => m.runPromote(argv));
|
|
440
636
|
}).command("publish [dir]", "Push and promote in one step - build, version, and ship to production", (y) => y.positional("dir", {
|
|
441
637
|
type: "string",
|
|
442
638
|
describe: "Project directory (default: cwd)"
|
|
@@ -462,7 +658,7 @@ async function run() {
|
|
|
462
658
|
describe: "Publish note recorded in the source commit (only lands when this publish creates a new source commit — unchanged source reuses the existing commit)"
|
|
463
659
|
}
|
|
464
660
|
}), (argv) => {
|
|
465
|
-
return import("./publish-
|
|
661
|
+
return import("./publish-NUNSIKri.js").then((m) => m.runPublish(argv));
|
|
466
662
|
});
|
|
467
663
|
await cli.command("$0", false, (y) => y, () => printHelp()).version(VERSION).alias("v", "version").help().alias("h", "help").recommendCommands().showHelpOnFail(false).fail((msg, err) => {
|
|
468
664
|
if (err) throw err;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as Integration } from "./telemetry-
|
|
2
|
-
import { n as allDeps, r as readPackageJson } from "./scan-
|
|
1
|
+
import { T as Integration } from "./telemetry-CpIXSAbQ.js";
|
|
2
|
+
import { n as allDeps, r as readPackageJson } from "./scan-BrikLKx5.js";
|
|
3
3
|
import { readFileSync } from "node:fs";
|
|
4
4
|
import fg from "fast-glob";
|
|
5
5
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { D as TELEMETRY_HOST, O as TELEMETRY_KEY, k as VERSION, s as getAnonymousId } from "./telemetry-
|
|
1
|
+
import { D as TELEMETRY_HOST, O as TELEMETRY_KEY, k as VERSION, s as getAnonymousId } from "./telemetry-CpIXSAbQ.js";
|
|
2
2
|
import "./json-C3hPIMkI.js";
|
|
3
|
-
import "./update-
|
|
3
|
+
import "./update-BdcpwRu_.js";
|
|
4
4
|
import { i as loadSession } from "./token-DHRH8cxi.js";
|
|
5
|
-
import { t as defineCommand } from "./command-
|
|
5
|
+
import { t as defineCommand } from "./command-B12qooZb.js";
|
|
6
6
|
import "./ui-C4ncRJqd.js";
|
|
7
7
|
|
|
8
8
|
//#region src/core/feedback.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a as apiKeyFromEnv, w as ENV_API_KEY, y as API_HOST } from "./telemetry-
|
|
1
|
+
import { a as apiKeyFromEnv, w as ENV_API_KEY, y as API_HOST } from "./telemetry-CpIXSAbQ.js";
|
|
2
2
|
import { i as loadSession } from "./token-DHRH8cxi.js";
|
|
3
|
-
import { r as SuperwallApi } from "./command-
|
|
3
|
+
import { r as SuperwallApi } from "./command-B12qooZb.js";
|
|
4
4
|
import { n as ui } from "./ui-C4ncRJqd.js";
|
|
5
5
|
import { f as listApplications, y as platformLabel } from "./resources-CVrWwA1K.js";
|
|
6
|
-
import { r as performLoginWithUi } from "./app-
|
|
6
|
+
import { r as performLoginWithUi } from "./app-rYAP19Jo.js";
|
|
7
7
|
import { promisify } from "node:util";
|
|
8
8
|
import * as fs from "node:fs";
|
|
9
9
|
import * as os$1 from "node:os";
|