@superwall/cli 1.1.1 → 1.3.0-beta.3
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 +37 -4
- package/dist/{actions-I5gVO5jN.js → actions-DvHycH3X.js} +2 -2
- package/dist/{api-emImQnVy.js → api-B50i89j0.js} +9 -9
- package/dist/{api-output-B5hh0q4V.js → api-output-D9ggXQIr.js} +1 -1
- package/dist/{app-DE9lxNNV.js → app-FiC9SQVp.js} +11 -11
- package/dist/asa-B5hrBL3t.js +1194 -0
- package/dist/{asc-DYc_Yo9e.js → asc-CRtRYv17.js} +13 -13
- package/dist/{auth-Bir_Un8l.js → auth-CYognaF4.js} +10 -10
- package/dist/auth.js +2 -2
- package/dist/{billing-CW0diI2X.js → billing-CSOUhWso.js} +1 -1
- package/dist/{bind-DO11eXrR.js → bind-BbzBenoP.js} +4 -4
- package/dist/{command-CmJMNVVz.js → command-B7Te31wp.js} +96 -101
- package/dist/{create-CwDgWW16.js → create--Q8nPgoa.js} +18 -18
- package/dist/{dev-OnmMOsgK.js → dev-Dr6gXH-o.js} +37 -19
- package/dist/{doctor-CpYkDfdC.js → doctor-Cf0qNjbq.js} +10 -10
- package/dist/{drivers-Cweb9bWA.js → drivers-ItOmKzrw.js} +2 -2
- package/dist/entry.js +531 -279
- package/dist/{existing-p-hX-Nxc.js → existing-B-e22WOr.js} +2 -2
- package/dist/{feedback-CV4JnRuk.js → feedback-C3UtAxye.js} +9 -9
- package/dist/{git-BrTxQ7ui.js → git-2wRxiwOc.js} +10 -10
- package/dist/{hosted-CbNJSJAC.js → hosted-vk05ZF6w.js} +3 -3
- package/dist/{integrate-DOLvHr1D.js → integrate-Cv8r_i2l.js} +30 -29
- package/dist/{login-B7fSpJKc.js → login-DOES7Kup.js} +8 -7
- package/dist/{migrate-Bn5btm_H.js → migrate-C7R29RPH.js} +20 -20
- package/dist/{org-B2gy9Pmu.js → org-Cg25bcsj.js} +3 -3
- package/dist/output-D2Ax_hHL.js +123 -0
- package/dist/{params-Bvq0iqQK.js → params-B1zeElGa.js} +1 -2
- package/dist/{pipeline-COr4sB6U.js → pipeline-BVeUA6Ig.js} +106 -173
- package/dist/{print-skill-D0j2D6tw.js → print-skill-D-R81bno.js} +7 -7
- package/dist/{promote-UmKZySRx.js → promote-CV_Lsmqd.js} +18 -18
- package/dist/publish-CSnNvHHi.js +35 -0
- package/dist/push-sjnRI6iL.js +35 -0
- package/dist/{query-CbGfXmKu.js → query-CdcWSinl.js} +10 -10
- package/dist/{resource-m6yz1jwE.js → resource-PVg0uzSK.js} +14 -14
- package/dist/{resources-CVrWwA1K.js → resources-s64mBHaC.js} +1 -0
- package/dist/{run-BTLaOoKK.js → run-XIkrFIgw.js} +2 -2
- package/dist/{scan-BfoeYW1v.js → scan-Dk0ZlCY6.js} +2 -2
- package/dist/{skills-HlIKA9xR.js → skills-B-mR2CqM.js} +4 -3
- package/dist/{skills-C4Yzl64N.js → skills-CoEIW0mE.js} +8 -8
- package/dist/{spinner-gOxIMz-V.js → spinner-B9dT3DBY.js} +1 -1
- package/dist/{telemetry-CLi7mjDP.js → telemetry-yJs7t0rt.js} +6 -41
- package/dist/{token-DHRH8cxi.js → token-GcbyH6G8.js} +2 -2
- package/dist/{ui-C4ncRJqd.js → ui-Lqt_zFOr.js} +5 -1
- package/dist/update-B4hoLAN-.js +59 -0
- package/dist/{upgrade-Cbh-7q_o.js → upgrade-ByCYDXgb.js} +6 -6
- package/package.json +4 -3
- package/dist/json-C3hPIMkI.js +0 -7
- package/dist/publish-BVnG2UOU.js +0 -35
- package/dist/push-hHtVTZ1m.js +0 -35
- package/dist/update-CxP4fmMe.js +0 -137
- /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 "./
|
|
2
|
-
import "./
|
|
3
|
-
import "./update-
|
|
4
|
-
import "./token-
|
|
5
|
-
import { t as defineCommand } from "./command-
|
|
6
|
-
import "./ui-
|
|
7
|
-
import "./spinner-
|
|
8
|
-
import { C as rowName } from "./resources-
|
|
9
|
-
import { t as requireOrg } from "./org-
|
|
10
|
-
import { t as parseParams } from "./params-
|
|
11
|
-
import { n as emitJson, t as apiCall } from "./api-output-
|
|
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-
|
|
1
|
+
import { p as SUPERWALL_HOME } from "./output-D2Ax_hHL.js";
|
|
2
|
+
import "./telemetry-yJs7t0rt.js";
|
|
3
|
+
import "./update-B4hoLAN-.js";
|
|
4
|
+
import "./token-GcbyH6G8.js";
|
|
5
|
+
import { t as defineCommand } from "./command-B7Te31wp.js";
|
|
6
|
+
import "./ui-Lqt_zFOr.js";
|
|
7
|
+
import "./spinner-B9dT3DBY.js";
|
|
8
|
+
import { C as rowName } from "./resources-s64mBHaC.js";
|
|
9
|
+
import { t as requireOrg } from "./org-Cg25bcsj.js";
|
|
10
|
+
import { t as parseParams } from "./params-B1zeElGa.js";
|
|
11
|
+
import { n as emitJson, t as apiCall } from "./api-output-D9ggXQIr.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-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";
|
|
@@ -20,7 +20,7 @@ import { inflateRawSync } from "node:zlib";
|
|
|
20
20
|
const SPEC_URL = "https://developer.apple.com/sample-code/app-store-connect/app-store-connect-openapi-specification.zip";
|
|
21
21
|
const REFRESH_TTL_MS = 10080 * 60 * 1e3;
|
|
22
22
|
function cachePath() {
|
|
23
|
-
return process.env.SUPERWALL_ASC_INDEX_PATH ?? join(homedir(), ".superwall", "asc-index.json");
|
|
23
|
+
return process.env.SUPERWALL_ASC_INDEX_PATH ?? join(SUPERWALL_HOME() ?? join(homedir(), ".superwall"), "asc-index.json");
|
|
24
24
|
}
|
|
25
25
|
let mem;
|
|
26
26
|
function readCachedIndex() {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./
|
|
3
|
-
import "./update-
|
|
4
|
-
import { i as loadSession, r as clearSession } from "./token-
|
|
5
|
-
import { t as defineCommand } from "./command-
|
|
6
|
-
import "./ui-
|
|
7
|
-
import { n as ensureSkillsCurrent } from "./skills-
|
|
1
|
+
import { a as API_HOST } from "./output-D2Ax_hHL.js";
|
|
2
|
+
import { i as track } from "./telemetry-yJs7t0rt.js";
|
|
3
|
+
import "./update-B4hoLAN-.js";
|
|
4
|
+
import { i as loadSession, r as clearSession } from "./token-GcbyH6G8.js";
|
|
5
|
+
import { t as defineCommand } from "./command-B7Te31wp.js";
|
|
6
|
+
import "./ui-Lqt_zFOr.js";
|
|
7
|
+
import { n as ensureSkillsCurrent } from "./skills-B-mR2CqM.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-DOES7Kup.js";
|
|
10
|
+
import { t as scanProject } from "./scan-Dk0ZlCY6.js";
|
|
11
11
|
|
|
12
12
|
//#region src/commands/account/auth.ts
|
|
13
13
|
const runLogin = defineCommand({
|
|
@@ -119,7 +119,7 @@ const runWhoami = defineCommand({
|
|
|
119
119
|
}
|
|
120
120
|
});
|
|
121
121
|
function effectiveHost(session) {
|
|
122
|
-
return process.env.SUPERWALL_API_HOST ?? session.host ?? API_HOST;
|
|
122
|
+
return process.env.SUPERWALL_API_HOST ?? session.host ?? API_HOST();
|
|
123
123
|
}
|
|
124
124
|
function sessionOutput(session) {
|
|
125
125
|
return {
|
package/dist/auth.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import { n as resolveAuthToken, o as NotLoggedInError, t as getOAuthAccessToken } from "./token-
|
|
1
|
+
import "./output-D2Ax_hHL.js";
|
|
2
|
+
import { n as resolveAuthToken, o as NotLoggedInError, t as getOAuthAccessToken } from "./token-GcbyH6G8.js";
|
|
3
3
|
|
|
4
4
|
export { NotLoggedInError, getOAuthAccessToken, resolveAuthToken };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as ui } from "./ui-
|
|
3
|
-
import { m as listProjects, n as createApplication, s as createProject, y as platformLabel } from "./resources-
|
|
4
|
-
import { t as requireOrg } from "./org-
|
|
1
|
+
import { d as Integration } from "./output-D2Ax_hHL.js";
|
|
2
|
+
import { n as ui } from "./ui-Lqt_zFOr.js";
|
|
3
|
+
import { m as listProjects, n as createApplication, s as createProject, y as platformLabel } from "./resources-s64mBHaC.js";
|
|
4
|
+
import { t as requireOrg } from "./org-Cg25bcsj.js";
|
|
5
5
|
|
|
6
6
|
//#region src/core/account/bind.ts
|
|
7
7
|
const NEW = "__new__";
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { a as
|
|
4
|
-
import {
|
|
1
|
+
import { a as API_HOST, i as writeJson, n as createCommandOutput, v as isNonInteractive } from "./output-D2Ax_hHL.js";
|
|
2
|
+
import { i as track, n as maybeShowTelemetryNotice } from "./telemetry-yJs7t0rt.js";
|
|
3
|
+
import { a as refreshUpdateCheck, i as maybeNotifyUpdate } from "./update-B4hoLAN-.js";
|
|
4
|
+
import { a as saveSession, i as loadSession, n as resolveAuthToken, o as NotLoggedInError } from "./token-GcbyH6G8.js";
|
|
5
|
+
import { r as useRenderer, t as selectRenderer } from "./ui-Lqt_zFOr.js";
|
|
5
6
|
import pc from "picocolors";
|
|
6
7
|
import { resolve } from "node:path";
|
|
7
8
|
|
|
@@ -57,54 +58,33 @@ var ApiUnreachableError = class extends Error {
|
|
|
57
58
|
this.cause = cause;
|
|
58
59
|
}
|
|
59
60
|
};
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
return
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
get userEmail() {
|
|
81
|
-
return this.session.userEmail;
|
|
82
|
-
}
|
|
83
|
-
setOrg(org) {
|
|
84
|
-
this.session = {
|
|
85
|
-
...this.session,
|
|
86
|
-
orgId: org.id,
|
|
87
|
-
orgName: org.name
|
|
88
|
-
};
|
|
89
|
-
saveSession(this.session);
|
|
90
|
-
}
|
|
91
|
-
get host() {
|
|
92
|
-
return process.env.SUPERWALL_API_HOST ?? this.session.host ?? API_HOST;
|
|
93
|
-
}
|
|
94
|
-
base() {
|
|
95
|
-
return this.host;
|
|
96
|
-
}
|
|
97
|
-
async request(method, path, body) {
|
|
98
|
-
const { token, session } = await resolveAuthToken(this.session);
|
|
99
|
-
this.session = session;
|
|
100
|
-
const res = await this.fetch(`${this.base()}${path}`, {
|
|
61
|
+
const PAGE_LIMIT = 50;
|
|
62
|
+
const createSuperwallApi = (initial) => {
|
|
63
|
+
let session = initial;
|
|
64
|
+
const host = () => process.env.SUPERWALL_API_HOST ?? session.host ?? API_HOST();
|
|
65
|
+
const send = async (url, init) => {
|
|
66
|
+
try {
|
|
67
|
+
return await fetch(url, init);
|
|
68
|
+
} catch (error) {
|
|
69
|
+
throw new ApiUnreachableError(host(), error);
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
const authorized = async () => {
|
|
73
|
+
const resolved = await resolveAuthToken(session);
|
|
74
|
+
session = resolved.session;
|
|
75
|
+
return resolved.token;
|
|
76
|
+
};
|
|
77
|
+
const request = async (method, path, body, options = {}) => {
|
|
78
|
+
const token = await authorized();
|
|
79
|
+
const res = await send(`${host()}${path}`, {
|
|
101
80
|
method,
|
|
102
81
|
headers: {
|
|
82
|
+
...options.headers,
|
|
103
83
|
authorization: `Bearer ${token}`,
|
|
104
84
|
accept: "application/json",
|
|
105
|
-
...body ? { "content-type": "application/json" } : {}
|
|
85
|
+
...body !== void 0 ? { "content-type": "application/json" } : {}
|
|
106
86
|
},
|
|
107
|
-
...body ? { body: JSON.stringify(body) } : {}
|
|
87
|
+
...body !== void 0 ? { body: JSON.stringify(body) } : {}
|
|
108
88
|
});
|
|
109
89
|
if (!res.ok) {
|
|
110
90
|
const text = await res.text().catch(() => "");
|
|
@@ -112,58 +92,73 @@ var SuperwallApi = class SuperwallApi {
|
|
|
112
92
|
}
|
|
113
93
|
if (res.status === 204) return void 0;
|
|
114
94
|
return await res.json();
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
after
|
|
95
|
+
};
|
|
96
|
+
const api = {
|
|
97
|
+
get org() {
|
|
98
|
+
const override = process.env.SUPERWALL_ORG_ID;
|
|
99
|
+
return {
|
|
100
|
+
id: override ?? session.orgId,
|
|
101
|
+
name: override ? void 0 : session.orgName,
|
|
102
|
+
count: session.orgCount ?? 1
|
|
103
|
+
};
|
|
104
|
+
},
|
|
105
|
+
get userEmail() {
|
|
106
|
+
return session.userEmail;
|
|
107
|
+
},
|
|
108
|
+
get host() {
|
|
109
|
+
return host();
|
|
110
|
+
},
|
|
111
|
+
setOrg(org) {
|
|
112
|
+
session = {
|
|
113
|
+
...session,
|
|
114
|
+
orgId: org.id,
|
|
115
|
+
orgName: org.name
|
|
116
|
+
};
|
|
117
|
+
saveSession(session);
|
|
118
|
+
},
|
|
119
|
+
get: (path, options) => request("GET", path, void 0, options),
|
|
120
|
+
post: (path, body, options) => request("POST", path, body, options),
|
|
121
|
+
put: (path, body, options) => request("PUT", path, body, options),
|
|
122
|
+
patch: (path, body, options) => request("PATCH", path, body, options),
|
|
123
|
+
del: (path, options) => request("DELETE", path, void 0, options),
|
|
124
|
+
async postText(path, body) {
|
|
125
|
+
const token = await authorized();
|
|
126
|
+
const res = await send(`${host()}${path}`, {
|
|
127
|
+
method: "POST",
|
|
128
|
+
headers: {
|
|
129
|
+
authorization: `Bearer ${token}`,
|
|
130
|
+
accept: "text/plain",
|
|
131
|
+
"content-type": "text/plain; charset=utf-8"
|
|
132
|
+
},
|
|
133
|
+
body
|
|
134
|
+
});
|
|
135
|
+
if (!res.ok) {
|
|
136
|
+
const text = await res.text().catch(() => "");
|
|
137
|
+
throw new ApiError(`POST ${path}`, res.status, text);
|
|
138
|
+
}
|
|
139
|
+
return res.text();
|
|
140
|
+
},
|
|
141
|
+
async list(path) {
|
|
142
|
+
const out = [];
|
|
143
|
+
let after;
|
|
144
|
+
for (let page = 0; page < PAGE_LIMIT; page++) {
|
|
145
|
+
const url = `${path}${path.includes("?") ? "&" : "?"}limit=100${after ? `&starting_after=${after}` : ""}`;
|
|
146
|
+
const batch = await api.get(url);
|
|
147
|
+
out.push(...batch.data);
|
|
148
|
+
if (!batch.has_more || batch.data.length === 0) break;
|
|
149
|
+
const last = batch.data[batch.data.length - 1];
|
|
150
|
+
if (last?.id == null) break;
|
|
151
|
+
after = String(last.id);
|
|
152
|
+
}
|
|
153
|
+
return out;
|
|
164
154
|
}
|
|
165
|
-
|
|
166
|
-
|
|
155
|
+
};
|
|
156
|
+
return api;
|
|
157
|
+
};
|
|
158
|
+
const superwallApi = () => {
|
|
159
|
+
const session = loadSession();
|
|
160
|
+
if (!session) throw new NotLoggedInError();
|
|
161
|
+
return createSuperwallApi(session);
|
|
167
162
|
};
|
|
168
163
|
|
|
169
164
|
//#endregion
|
|
@@ -180,7 +175,7 @@ async function executeCommand(definition, argv, runtime = {}) {
|
|
|
180
175
|
const outputMode = json ? "json" : environmentNonInteractive ? "text" : "rich";
|
|
181
176
|
const interactive = definition.interaction !== "none" && !json && !explicitNonInteractive && !environmentNonInteractive;
|
|
182
177
|
const installDir = resolve(argv.installDir ?? process.cwd());
|
|
183
|
-
const ui = runtime.renderer
|
|
178
|
+
const ui = runtime.renderer ? useRenderer(runtime.renderer(outputMode)) : selectRenderer({ mode: outputMode });
|
|
184
179
|
const stdout = runtime.stdout ?? process.stdout;
|
|
185
180
|
const output = createCommandOutput(outputMode, ui, { stdout });
|
|
186
181
|
if (json && definition.output !== "json" && definition.output !== "both") {
|
|
@@ -199,7 +194,7 @@ async function executeCommand(definition, argv, runtime = {}) {
|
|
|
199
194
|
track("workflow started", { workflow: definition.name });
|
|
200
195
|
}
|
|
201
196
|
try {
|
|
202
|
-
const api = resolveApi(definition.auth ?? "none", runtime.api ??
|
|
197
|
+
const api = resolveApi(definition.auth ?? "none", runtime.api ?? superwallApi);
|
|
203
198
|
const context = {
|
|
204
199
|
argv,
|
|
205
200
|
ui,
|
|
@@ -280,4 +275,4 @@ function normalizeError(error) {
|
|
|
280
275
|
}
|
|
281
276
|
|
|
282
277
|
//#endregion
|
|
283
|
-
export { ApiError as n,
|
|
278
|
+
export { superwallApi as i, ApiError as n, createSuperwallApi as r, defineCommand as t };
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import "./
|
|
3
|
-
import "./update-
|
|
4
|
-
import "./token-
|
|
5
|
-
import { t as defineCommand } from "./command-
|
|
6
|
-
import "./ui-
|
|
7
|
-
import "./skills-
|
|
1
|
+
import "./output-D2Ax_hHL.js";
|
|
2
|
+
import "./telemetry-yJs7t0rt.js";
|
|
3
|
+
import "./update-B4hoLAN-.js";
|
|
4
|
+
import "./token-GcbyH6G8.js";
|
|
5
|
+
import { t as defineCommand } from "./command-B7Te31wp.js";
|
|
6
|
+
import "./ui-Lqt_zFOr.js";
|
|
7
|
+
import "./skills-B-mR2CqM.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-
|
|
13
|
-
import "./spinner-
|
|
14
|
-
import { f as listApplications, m as listProjects, n as createApplication, y as platformLabel } from "./resources-
|
|
15
|
-
import "./org-
|
|
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-
|
|
9
|
+
import "./login-DOES7Kup.js";
|
|
10
|
+
import { n as allDeps, r as readPackageJson, t as scanProject } from "./scan-Dk0ZlCY6.js";
|
|
11
|
+
import "./hosted-vk05ZF6w.js";
|
|
12
|
+
import { t as detectExisting } from "./existing-B-e22WOr.js";
|
|
13
|
+
import "./spinner-B9dT3DBY.js";
|
|
14
|
+
import { f as listApplications, m as listProjects, n as createApplication, y as platformLabel } from "./resources-s64mBHaC.js";
|
|
15
|
+
import "./org-Cg25bcsj.js";
|
|
16
|
+
import { r as resolveScopeFromKey } from "./bind-BbzBenoP.js";
|
|
17
|
+
import { a as projectPackageName, i as requireApi, l as requirePlatform, m as writeApp, r as LoginRequiredError, t as gitAvailable } from "./git-2wRxiwOc.js";
|
|
18
|
+
import "./actions-DvHycH3X.js";
|
|
19
|
+
import "./app-FiC9SQVp.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 {
|
|
2
|
-
import "./
|
|
3
|
-
import "./update-
|
|
4
|
-
import "./token-
|
|
5
|
-
import { t as defineCommand } from "./command-
|
|
6
|
-
import { n as ui } from "./ui-
|
|
7
|
-
import "./skills-
|
|
1
|
+
import { g as VERSION } from "./output-D2Ax_hHL.js";
|
|
2
|
+
import "./telemetry-yJs7t0rt.js";
|
|
3
|
+
import "./update-B4hoLAN-.js";
|
|
4
|
+
import "./token-GcbyH6G8.js";
|
|
5
|
+
import { t as defineCommand } from "./command-B7Te31wp.js";
|
|
6
|
+
import { n as ui } from "./ui-Lqt_zFOr.js";
|
|
7
|
+
import "./skills-B-mR2CqM.js";
|
|
8
8
|
import "./spawn-DSoTXy_j.js";
|
|
9
|
-
import "./login-
|
|
10
|
-
import "./scan-
|
|
11
|
-
import "./hosted-
|
|
12
|
-
import "./spinner-
|
|
13
|
-
import { S as pushPaywallVersion, T as versionProducts, b as promotePaywallVersion, f as listApplications } from "./resources-
|
|
14
|
-
import "./org-
|
|
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
|
|
9
|
+
import "./login-DOES7Kup.js";
|
|
10
|
+
import "./scan-Dk0ZlCY6.js";
|
|
11
|
+
import "./hosted-vk05ZF6w.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-BbzBenoP.js";
|
|
16
|
+
import { f as readLock, i as requireApi, o as writeProjectScaffold, u as resolveApps } from "./git-2wRxiwOc.js";
|
|
17
|
+
import "./actions-DvHycH3X.js";
|
|
18
|
+
import "./app-FiC9SQVp.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-BVeUA6Ig.js";
|
|
20
20
|
import pc from "picocolors";
|
|
21
21
|
import * as fs from "node:fs";
|
|
22
22
|
import * as path from "node:path";
|
|
@@ -132,11 +132,29 @@ const detectLocalScheme = async (roots) => {
|
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
134
|
};
|
|
135
|
+
const APP_MARKERS = [
|
|
136
|
+
"package.json",
|
|
137
|
+
"app.json",
|
|
138
|
+
"app.config.json",
|
|
139
|
+
"Podfile",
|
|
140
|
+
"ios",
|
|
141
|
+
"android",
|
|
142
|
+
".git"
|
|
143
|
+
];
|
|
144
|
+
const looksLikeAppRoot = (dir) => {
|
|
145
|
+
if (APP_MARKERS.some((marker) => fs.existsSync(path.join(dir, marker)))) return true;
|
|
146
|
+
try {
|
|
147
|
+
return fs.readdirSync(dir).some((entry) => entry.endsWith(".xcodeproj") || entry.endsWith(".xcworkspace"));
|
|
148
|
+
} catch {
|
|
149
|
+
return false;
|
|
150
|
+
}
|
|
151
|
+
};
|
|
135
152
|
const schemeSearchRoots = (project) => {
|
|
136
153
|
const root = path.resolve(project.root);
|
|
137
154
|
const superwallDir = path.resolve(project.superwallDir);
|
|
138
155
|
const roots = [root];
|
|
139
|
-
|
|
156
|
+
const parent = path.dirname(root);
|
|
157
|
+
if (root === superwallDir && parent !== root && looksLikeAppRoot(parent)) roots.push(parent);
|
|
140
158
|
return roots;
|
|
141
159
|
};
|
|
142
160
|
const appScheme = async (roots, remote) => {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./
|
|
3
|
-
import "./update-
|
|
4
|
-
import { i as loadSession } from "./token-
|
|
5
|
-
import { t as defineCommand } from "./command-
|
|
6
|
-
import { a as
|
|
1
|
+
import { _ as apiKeyFromEnv } from "./output-D2Ax_hHL.js";
|
|
2
|
+
import "./telemetry-yJs7t0rt.js";
|
|
3
|
+
import "./update-B4hoLAN-.js";
|
|
4
|
+
import { i as loadSession } from "./token-GcbyH6G8.js";
|
|
5
|
+
import { t as defineCommand } from "./command-B7Te31wp.js";
|
|
6
|
+
import { a as THEME, n as ui, o as fg } from "./ui-Lqt_zFOr.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-Dk0ZlCY6.js";
|
|
9
|
+
import { t as detectDrivers } from "./drivers-ItOmKzrw.js";
|
|
10
|
+
import "./hosted-vk05ZF6w.js";
|
|
11
|
+
import { t as detectExisting } from "./existing-B-e22WOr.js";
|
|
12
12
|
|
|
13
13
|
//#region src/commands/account/doctor.ts
|
|
14
14
|
const runDoctor = defineCommand({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { g as VERSION } from "./output-D2Ax_hHL.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-vk05ZF6w.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";
|