@superwall/cli 2.5.1 → 2.6.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{apple-BSKxY7Gx.js → apple-Bmt_iywx.js} +14 -14
- package/dist/{approve-DbwsYO4s.js → approve-D2UgqaRx.js} +27 -27
- package/dist/{assets-CqpFg5mM.js → assets-B_quADds.js} +3 -3
- package/dist/auth.js +3 -3
- package/dist/{session-DYdxTNZf.js → base-ChTi42M0.js} +35 -35
- package/dist/{billing-BopwIhR3.js → billing-ZIETn0j4.js} +3 -3
- package/dist/{bind-DOF3o3FR.js → bind-ClFjTt0U.js} +4 -4
- package/dist/{build-BF22vVdV.js → build-BWjXurjs.js} +10 -10
- package/dist/{client-DHlsTaP1.js → client-CyrYJzBF.js} +3 -3
- package/dist/create-7HDW3DCl.js +20 -0
- package/dist/{create-CiZzZrru.js → create-BCIgjRHn.js} +6 -6
- package/dist/{create-CboPfAlN.js → create-C3uklw-U.js} +31 -31
- package/dist/{doctor-BqZGaQE5.js → doctor-D2Q1EZe8.js} +6 -6
- package/dist/{drivers-DkboeR1c.js → drivers-BQkO5tHs.js} +3 -3
- package/dist/entry.js +20 -20
- package/dist/{environment-FR3bcq0D.js → environment-BocmdvZ-.js} +1 -1
- package/dist/{existing-C6TTT6c4.js → existing-Cl5x6_5u.js} +2 -2
- package/dist/{selection-CWfI4a0O.js → framework-CLmf4swr.js} +50 -50
- package/dist/{held-C2IjAyg6.js → held-Bykbwy-m.js} +6 -6
- package/dist/held-Chw3BtBV.js +17 -0
- package/dist/{install-DoSYCwLL.js → install-dXZZ79Oe.js} +37 -37
- package/dist/{integrate-BSqd2wgI.js → integrate-DiSjlOjC.js} +23 -23
- package/dist/{types-CB6O_wjy.js → lock-DgSx-p8Y.js} +79 -79
- package/dist/{login-C6FcBQZg.js → login-5sWIKDI2.js} +6 -6
- package/dist/login-DZ8Pipf6.js +17 -0
- package/dist/{login-dRPPnGr7.js → login-Jp6E6d2e.js} +1 -1
- package/dist/{lookup-D23dAOz6.js → lookup-CWzVfPpq.js} +3 -3
- package/dist/{migrate-CDdUCTH3.js → migrate-BKiOUsMY.js} +29 -29
- package/dist/{migration-r9plM7F6.js → migration-Z69tLeHC.js} +9 -9
- package/dist/{notification-url-rdnENCxt.js → notification-url-BDBxbwZq.js} +2 -2
- package/dist/{open-DVdE3HnK.js → open-DNd49kT-.js} +2 -2
- package/dist/{org-DZ41muzA.js → org-Dud1rF9f.js} +3 -3
- package/dist/{organization-DIODPOwO.js → organization-7vJA3uy1.js} +8 -8
- package/dist/{orgs-BxlwcvTu.js → orgs-Z0H9WOs1.js} +1 -1
- package/dist/{paths-BaeoxDze.js → paths-CzTJVpfi.js} +1 -1
- package/dist/{playbook-B-Pdonhg.js → playbook-DJ__edOW.js} +10 -10
- package/dist/{project-DHU5wc3R.js → project-NoMtbMyl.js} +9 -9
- package/dist/{promote-Ca4URuHY.js → promote-DLtPSvmL.js} +23 -23
- package/dist/{pull-CQcTZxW8.js → pull-AoUmaiMK.js} +8 -8
- package/dist/pull-C1xm2zqG.js +36 -0
- package/dist/pull-D-YuT3e0.js +106 -0
- package/dist/push-B42D8fKf.js +22 -0
- package/dist/{push-BlZoIwIj.js → push-BMblzg_6.js} +9 -9
- package/dist/{push-DQE48h_M.js → push-BrzMFd4Z.js} +46 -46
- package/dist/push-Co5jk6Kr.js +30 -0
- package/dist/{registry-FNG-uiIt.js → registry-DDU10_Ix.js} +152 -152
- package/dist/resolve-DpOSDDdr.js +196 -0
- package/dist/{resources-COOEvqqW.js → resources-CptT7HD6.js} +2 -2
- package/dist/{run-DpYDOAw-.js → run-c1O2_8pp.js} +2 -2
- package/dist/{run-Czbb-sHR.js → run-r3foWfhV.js} +65 -65
- package/dist/scan-D86kLtM7.js +4 -0
- package/dist/{scan-BZS2FZeU.js → scan-nVQO7JLx.js} +1 -1
- package/dist/{scope-t_SqFN6W.js → scope-ehZ7L1nj.js} +8 -8
- package/dist/{scope-BJQ-KcQg.js → scope-l1qGLsgz.js} +5 -5
- package/dist/{sdk-CyttTnGf.js → sdk-DEfQttek.js} +7 -7
- package/dist/{series--Wp7TngJ.js → series-D2ZpZ8cx.js} +95 -62
- package/dist/server-BEcsQaPu.js +29 -0
- package/dist/{server-BmmOj7bh.js → server-DLARhh1k.js} +9 -9
- package/dist/session-Csuaw6RU.js +6 -0
- package/dist/{session-BpYpOgaY.js → session-Z0BeaJPf.js} +1 -1
- package/dist/{setup-DW50luOZ.js → setup-C6NFy14d.js} +9 -9
- package/dist/skills/index.json +2 -2
- package/dist/skills/{superwall-workspaces → superwall-artifacts}/SKILL.md +38 -29
- package/dist/skills/{superwall-workspaces → superwall-artifacts}/references/cli.md +31 -28
- package/dist/skills/{superwall-workspaces → superwall-artifacts}/references/slots.md +9 -9
- package/dist/{skills-Cm1j2d1W.js → skills-421SFEyF.js} +4 -4
- package/dist/{skills-Bbtq8V_D.js → skills-CdKwaTRS.js} +8 -8
- package/dist/{git-DqDPnldI.js → source-BccdO4aL.js} +95 -95
- package/dist/{source-push-B3c-VLfe.js → source-push-B4s6r9bB.js} +6 -6
- package/dist/{spinner-025_eqCX.js → spinner-DPdBlZe2.js} +3 -3
- package/dist/{starter-hcwocv_Z.js → starter-0OdVPH4l.js} +27 -27
- package/dist/{status-K1IGp6pe.js → status-Dsc7d3z2.js} +39 -39
- package/dist/{storage-CUMgpcVH.js → storage-DT_wxwJ8.js} +1 -1
- package/dist/{storekit-Cb0TkToV.js → storekit-B9M2raxe.js} +3 -3
- package/dist/storekit-BWZf-fNE.js +17 -0
- package/dist/{telemetry-ekUQuhLJ.js → telemetry-ovPiseFm.js} +1 -1
- package/dist/{token-B2PduqrR.js → token-Bu3FaRkv.js} +1 -1
- package/dist/tools.js +123 -123
- package/dist/{try-BUnhITXS.js → try-B8FYkTvQ.js} +29 -29
- package/dist/{upgrade-CI7K1UZ-.js → upgrade-B7TmvEPP.js} +2 -2
- package/dist/{upgrade-DfZfDljd.js → upgrade-CAHyrWUL.js} +2 -2
- package/package.json +2 -2
- package/dist/create-DAkNdEzt.js +0 -20
- package/dist/held-KVcYIplR.js +0 -17
- package/dist/login-BiwaQkXS.js +0 -17
- package/dist/pull-DRMIxqR8.js +0 -36
- package/dist/pull-_qs90vGA.js +0 -106
- package/dist/push-Cb4g_l1K.js +0 -30
- package/dist/push-DZKsd6Dp.js +0 -22
- package/dist/resolve-DGePiHgL.js +0 -196
- package/dist/scan-2WqHGkjU.js +0 -4
- package/dist/server-BqLPwcy9.js +0 -29
- package/dist/session-BHBIGscL.js +0 -6
- package/dist/storekit-Dewj_5qg.js +0 -17
- /package/dist/{design-lint-CvgcSzVg.js → design-lint-CiFc78aM.js} +0 -0
- /package/dist/{download-F8OtTJze.js → download-DhGd4hOB.js} +0 -0
- /package/dist/{reports-BZfxvenS.js → reports-HYVp169R.js} +0 -0
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import "./token-
|
|
1
|
+
import "./token-Bu3FaRkv.js";
|
|
2
2
|
import { t as blocks } from "./output-Ggzq5_-t.js";
|
|
3
|
-
import "./environment-
|
|
4
|
-
import "./storage-
|
|
5
|
-
import { t as ApiError } from "./client-
|
|
6
|
-
import { E as updateBundleId, a as chooseAppIntent, g as RefusedByApi, i as savedKey, m as KEY_LABEL, n as testModeWarning, p as KEY_KINDS, s as resolveApp, y as findIntegrations } from "./held-
|
|
3
|
+
import "./environment-BocmdvZ-.js";
|
|
4
|
+
import "./storage-DT_wxwJ8.js";
|
|
5
|
+
import { t as ApiError } from "./client-CyrYJzBF.js";
|
|
6
|
+
import { E as updateBundleId, a as chooseAppIntent, g as RefusedByApi, i as savedKey, m as KEY_LABEL, n as testModeWarning, p as KEY_KINDS, s as resolveApp, y as findIntegrations } from "./held-Bykbwy-m.js";
|
|
7
7
|
import "./config-CGcG7GOt.js";
|
|
8
|
-
import { t as apiCall } from "./spinner-
|
|
8
|
+
import { t as apiCall } from "./spinner-DPdBlZe2.js";
|
|
9
9
|
import "./ui-D_qf3Gvw.js";
|
|
10
|
-
import "./paths-
|
|
11
|
-
import "./orgs-
|
|
12
|
-
import "./resources-
|
|
13
|
-
import "./org-
|
|
14
|
-
import "./lookup-
|
|
15
|
-
import "./scope-
|
|
10
|
+
import "./paths-CzTJVpfi.js";
|
|
11
|
+
import "./orgs-Z0H9WOs1.js";
|
|
12
|
+
import "./resources-CptT7HD6.js";
|
|
13
|
+
import "./org-Dud1rF9f.js";
|
|
14
|
+
import "./lookup-CWzVfPpq.js";
|
|
15
|
+
import "./scope-l1qGLsgz.js";
|
|
16
16
|
import "./client-BJQXl62Q.js";
|
|
17
17
|
import "./timing-Ca0TXY-A.js";
|
|
18
|
-
import { n as ensureNotificationUrl, r as environmentLines, t as describeNotificationUrl } from "./notification-url-
|
|
19
|
-
import { a as chooseTeam, n as keyAccess, o as signIn, r as keyRole, s as appleDeps, t as createAndSaveKey } from "./create-
|
|
18
|
+
import { n as ensureNotificationUrl, r as environmentLines, t as describeNotificationUrl } from "./notification-url-BDBxbwZq.js";
|
|
19
|
+
import { a as chooseTeam, n as keyAccess, o as signIn, r as keyRole, s as appleDeps, t as createAndSaveKey } from "./create-BCIgjRHn.js";
|
|
20
20
|
|
|
21
21
|
//#region src/core/app-store-connect/setup/apple.ts
|
|
22
22
|
const STEPS = [
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import "./token-
|
|
1
|
+
import "./token-Bu3FaRkv.js";
|
|
2
2
|
import "./output-Ggzq5_-t.js";
|
|
3
|
-
import "./environment-
|
|
4
|
-
import "./storage-
|
|
5
|
-
import { t as ApiError } from "./client-
|
|
3
|
+
import "./environment-BocmdvZ-.js";
|
|
4
|
+
import "./storage-DT_wxwJ8.js";
|
|
5
|
+
import { t as ApiError } from "./client-CyrYJzBF.js";
|
|
6
6
|
import "./config-CGcG7GOt.js";
|
|
7
|
-
import "./orgs-
|
|
8
|
-
import "./
|
|
9
|
-
import "./
|
|
10
|
-
import
|
|
11
|
-
import
|
|
7
|
+
import "./orgs-Z0H9WOs1.js";
|
|
8
|
+
import { h as approveVersion, l as resolveArtifact, n as awaitingInstall, s as pickVersion, u as roleCanApprove } from "./resolve-DpOSDDdr.js";
|
|
9
|
+
import { t as ArtifactError } from "./project-NoMtbMyl.js";
|
|
10
|
+
import "./lock-DgSx-p8Y.js";
|
|
11
|
+
import "./scope-ehZ7L1nj.js";
|
|
12
12
|
|
|
13
|
-
//#region src/core/
|
|
13
|
+
//#region src/core/artifacts/approve.ts
|
|
14
14
|
const SECTIONS = [
|
|
15
15
|
["scopes", "Scopes"],
|
|
16
16
|
["backgroundScopes", "Background scopes"],
|
|
@@ -93,14 +93,14 @@ const diffLines = (diff) => diff.flatMap(({ title, added, removed }) => [
|
|
|
93
93
|
]);
|
|
94
94
|
function commitLine(message) {
|
|
95
95
|
const [subject = "", note] = message.split(/\n\n+/);
|
|
96
|
-
return subject.startsWith("push
|
|
96
|
+
return subject.startsWith("push artifact/") && note && !note.startsWith("Superwall-") ? note : subject;
|
|
97
97
|
}
|
|
98
|
-
const ONLY_ADMINS = "Only organization owners and admins can approve
|
|
99
|
-
async function
|
|
100
|
-
const
|
|
101
|
-
const { version, versions } = await pickVersion(ctx,
|
|
102
|
-
if (version.build_status !== "SUCCEEDED" || version.manifest === null) throw new
|
|
103
|
-
if (version.id ===
|
|
98
|
+
const ONLY_ADMINS = "Only organization owners and admins can approve artifact versions. Ask one of them to review this version.";
|
|
99
|
+
async function runArtifactApprove(ctx, input) {
|
|
100
|
+
const artifact = await resolveArtifact(ctx, input);
|
|
101
|
+
const { version, versions } = await pickVersion(ctx, artifact, input.version, (candidate) => candidate.build_status === "SUCCEEDED" && candidate.id !== artifact.active_version_id);
|
|
102
|
+
if (version.build_status !== "SUCCEEDED" || version.manifest === null) throw new ArtifactError(`Version ${version.id} is ${version.build_status.toLowerCase()}. Only a built version can be approved.`);
|
|
103
|
+
if (version.id === artifact.active_version_id && version.grant !== null) {
|
|
104
104
|
if (ctx.json) ctx.output.data({
|
|
105
105
|
approved: false,
|
|
106
106
|
reason: "already_active",
|
|
@@ -109,11 +109,11 @@ async function runWorkspaceApprove(ctx, input) {
|
|
|
109
109
|
else ctx.ui.info(`Version ${version.id} is already live.`);
|
|
110
110
|
return;
|
|
111
111
|
}
|
|
112
|
-
const active = versions.find((candidate) => candidate.id ===
|
|
112
|
+
const active = versions.find((candidate) => candidate.id === artifact.active_version_id);
|
|
113
113
|
const proposed = sideOf(version, false);
|
|
114
114
|
const diff = diffSides(sideOf(active, true), proposed);
|
|
115
115
|
const details = {
|
|
116
|
-
|
|
116
|
+
artifact_id: artifact.id,
|
|
117
117
|
version_id: version.id,
|
|
118
118
|
commit_sha: version.commit_sha,
|
|
119
119
|
active_version_id: active?.id ?? null,
|
|
@@ -123,7 +123,7 @@ async function runWorkspaceApprove(ctx, input) {
|
|
|
123
123
|
diff
|
|
124
124
|
};
|
|
125
125
|
if (!ctx.json) ctx.ui.report([
|
|
126
|
-
`${
|
|
126
|
+
`${artifact.name}, version ${version.id} (${version.commit_sha.slice(0, 12)})`,
|
|
127
127
|
...version.commit_message ? [commitLine(version.commit_message)] : [],
|
|
128
128
|
"",
|
|
129
129
|
"What it can do:",
|
|
@@ -141,9 +141,9 @@ async function runWorkspaceApprove(ctx, input) {
|
|
|
141
141
|
else ctx.ui.error(message);
|
|
142
142
|
ctx.fail();
|
|
143
143
|
};
|
|
144
|
-
if (!await roleCanApprove(ctx,
|
|
144
|
+
if (!await roleCanApprove(ctx, artifact)) {
|
|
145
145
|
refuse("needs_admin", ONLY_ADMINS);
|
|
146
|
-
if (!ctx.json) ctx.ui.info("To ask for review, run `superwall
|
|
146
|
+
if (!ctx.json) ctx.ui.info("To ask for review, run `superwall artifacts share`.");
|
|
147
147
|
return;
|
|
148
148
|
}
|
|
149
149
|
const changes = diff.length > 0;
|
|
@@ -162,13 +162,13 @@ async function runWorkspaceApprove(ctx, input) {
|
|
|
162
162
|
return;
|
|
163
163
|
}
|
|
164
164
|
if (!accepted) {
|
|
165
|
-
refuse("needs_accept_changes", "Nothing was approved, because this changes what the
|
|
165
|
+
refuse("needs_accept_changes", "Nothing was approved, because this changes what the artifact can do. Read the changes above, then pass --accept-changes too.");
|
|
166
166
|
return;
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
169
|
let approved;
|
|
170
170
|
try {
|
|
171
|
-
approved = await approveVersion(ctx.api,
|
|
171
|
+
approved = await approveVersion(ctx.api, artifact.id, version.id);
|
|
172
172
|
} catch (error) {
|
|
173
173
|
if (!(error instanceof ApiError) || error.status !== 403) throw error;
|
|
174
174
|
refuse("forbidden", error.message);
|
|
@@ -182,9 +182,9 @@ async function runWorkspaceApprove(ctx, input) {
|
|
|
182
182
|
});
|
|
183
183
|
return;
|
|
184
184
|
}
|
|
185
|
-
ctx.ui.success(await awaitingInstall(ctx.api,
|
|
186
|
-
ctx.ui.info(`Choose where it shows with \`superwall
|
|
185
|
+
ctx.ui.success(await awaitingInstall(ctx.api, artifact.id, version.manifest) ? `Approved version ${version.id}. Nothing is installed yet, so only its author can see it until you choose where it shows.` : `Approved version ${version.id}. It's live for everyone it's installed for.`);
|
|
186
|
+
ctx.ui.info(`Choose where it shows with \`superwall artifacts install <entrypoint> --artifact ${artifact.id}\`.`);
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
//#endregion
|
|
190
|
-
export { diffSides,
|
|
190
|
+
export { diffSides, runArtifactApprove, sideOf };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as ASSET_HOST } from "./environment-
|
|
2
|
-
import { t as ApiError } from "./client-
|
|
3
|
-
import { S as pushPaywallAssets } from "./resources-
|
|
1
|
+
import { r as ASSET_HOST } from "./environment-BocmdvZ-.js";
|
|
2
|
+
import { t as ApiError } from "./client-CyrYJzBF.js";
|
|
3
|
+
import { S as pushPaywallAssets } from "./resources-CptT7HD6.js";
|
|
4
4
|
import * as fs from "node:fs";
|
|
5
5
|
|
|
6
6
|
//#region src/core/paywalls/assets.ts
|
package/dist/auth.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as resolveAuthToken, r as NotLoggedInError, t as getOAuthAccessToken } from "./token-
|
|
1
|
+
import { n as resolveAuthToken, r as NotLoggedInError, t as getOAuthAccessToken } from "./token-Bu3FaRkv.js";
|
|
2
2
|
import "./output-Ggzq5_-t.js";
|
|
3
|
-
import "./environment-
|
|
4
|
-
import "./storage-
|
|
3
|
+
import "./environment-BocmdvZ-.js";
|
|
4
|
+
import "./storage-DT_wxwJ8.js";
|
|
5
5
|
|
|
6
6
|
export { NotLoggedInError, getOAuthAccessToken, resolveAuthToken };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { S as apiKeyFromEnv, f as ENV_API_KEY, t as API_HOST } from "./environment-
|
|
2
|
-
import { n as readSession } from "./storage-
|
|
3
|
-
import { r as createSuperwallApi } from "./client-
|
|
1
|
+
import { S as apiKeyFromEnv, f as ENV_API_KEY, t as API_HOST } from "./environment-BocmdvZ-.js";
|
|
2
|
+
import { n as readSession } from "./storage-DT_wxwJ8.js";
|
|
3
|
+
import { r as createSuperwallApi } from "./client-CyrYJzBF.js";
|
|
4
4
|
import { n as ui } from "./ui-D_qf3Gvw.js";
|
|
5
|
-
import { k as isRecord, p as listApplications, y as platformLabel } from "./resources-
|
|
6
|
-
import {
|
|
7
|
-
import { n as performLoginWithUi } from "./login-
|
|
5
|
+
import { k as isRecord, p as listApplications, y as platformLabel } from "./resources-CptT7HD6.js";
|
|
6
|
+
import { _ as writeSources, c as parseSources, d as writeApp, l as readLock } from "./lock-DgSx-p8Y.js";
|
|
7
|
+
import { n as performLoginWithUi } from "./login-Jp6E6d2e.js";
|
|
8
8
|
import * as fs from "node:fs";
|
|
9
9
|
import * as path from "node:path";
|
|
10
10
|
|
|
@@ -159,34 +159,6 @@ function writeProjectScaffold(options) {
|
|
|
159
159
|
writeIfAbsent(path.join(options.superwallDir, ".gitignore"), GITIGNORE);
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
-
//#endregion
|
|
163
|
-
//#region src/core/paywalls/source/base.ts
|
|
164
|
-
const LEGACY_FILE = path.join(".superwall", "source.json");
|
|
165
|
-
function readLegacyBases(superwallDir) {
|
|
166
|
-
const file = path.join(superwallDir, LEGACY_FILE);
|
|
167
|
-
if (!fs.existsSync(file)) return {};
|
|
168
|
-
let parsed;
|
|
169
|
-
try {
|
|
170
|
-
parsed = JSON.parse(fs.readFileSync(file, "utf8"));
|
|
171
|
-
} catch (error) {
|
|
172
|
-
const reason = error instanceof Error ? error.message : String(error);
|
|
173
|
-
throw new Error(`Can't read ${file} (${reason}) — fix or delete it, then push again.`);
|
|
174
|
-
}
|
|
175
|
-
if (!isRecord(parsed) || !isRecord(parsed.repos)) throw new Error(`${file} isn't a source sync record — fix or delete it, then push again.`);
|
|
176
|
-
return parseSources(parsed.repos);
|
|
177
|
-
}
|
|
178
|
-
function readSourceBase(superwallDir, repo) {
|
|
179
|
-
return readLock(superwallDir).sources?.[repo] ?? readLegacyBases(superwallDir)[repo];
|
|
180
|
-
}
|
|
181
|
-
function writeSourceBase(superwallDir, repo, commitSha) {
|
|
182
|
-
writeSources(superwallDir, {
|
|
183
|
-
...readLegacyBases(superwallDir),
|
|
184
|
-
...readLock(superwallDir).sources,
|
|
185
|
-
[repo]: commitSha
|
|
186
|
-
});
|
|
187
|
-
fs.rmSync(path.join(superwallDir, LEGACY_FILE), { force: true });
|
|
188
|
-
}
|
|
189
|
-
|
|
190
162
|
//#endregion
|
|
191
163
|
//#region src/core/paywalls/project/session.ts
|
|
192
164
|
var LoginRequiredError = class extends Error {
|
|
@@ -216,4 +188,32 @@ async function requireApi(interactive, login = performLoginWithUi) {
|
|
|
216
188
|
}
|
|
217
189
|
|
|
218
190
|
//#endregion
|
|
219
|
-
|
|
191
|
+
//#region src/core/paywalls/source/base.ts
|
|
192
|
+
const LEGACY_FILE = path.join(".superwall", "source.json");
|
|
193
|
+
function readLegacyBases(superwallDir) {
|
|
194
|
+
const file = path.join(superwallDir, LEGACY_FILE);
|
|
195
|
+
if (!fs.existsSync(file)) return {};
|
|
196
|
+
let parsed;
|
|
197
|
+
try {
|
|
198
|
+
parsed = JSON.parse(fs.readFileSync(file, "utf8"));
|
|
199
|
+
} catch (error) {
|
|
200
|
+
const reason = error instanceof Error ? error.message : String(error);
|
|
201
|
+
throw new Error(`Can't read ${file} (${reason}) — fix or delete it, then push again.`);
|
|
202
|
+
}
|
|
203
|
+
if (!isRecord(parsed) || !isRecord(parsed.repos)) throw new Error(`${file} isn't a source sync record — fix or delete it, then push again.`);
|
|
204
|
+
return parseSources(parsed.repos);
|
|
205
|
+
}
|
|
206
|
+
function readSourceBase(superwallDir, repo) {
|
|
207
|
+
return readLock(superwallDir).sources?.[repo] ?? readLegacyBases(superwallDir)[repo];
|
|
208
|
+
}
|
|
209
|
+
function writeSourceBase(superwallDir, repo, commitSha) {
|
|
210
|
+
writeSources(superwallDir, {
|
|
211
|
+
...readLegacyBases(superwallDir),
|
|
212
|
+
...readLock(superwallDir).sources,
|
|
213
|
+
[repo]: commitSha
|
|
214
|
+
});
|
|
215
|
+
fs.rmSync(path.join(superwallDir, LEGACY_FILE), { force: true });
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
//#endregion
|
|
219
|
+
export { projectPackageName as a, planTargets as c, wantedPlatforms as d, PLATFORMS as f, resolveApps as h, requireApi as i, surfaceKey as l, requirePlatform as m, writeSourceBase as n, writeProjectScaffold as o, platformFor as p, LoginRequiredError as r, parsePlatformFlags as s, readSourceBase as t, targetLabel as u };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { h as Integration } from "./environment-
|
|
2
|
-
import { i as readPackageJson, r as allDeps } from "./scan-
|
|
3
|
-
import { d as readBundledSkill } from "./skills-
|
|
1
|
+
import { h as Integration } from "./environment-BocmdvZ-.js";
|
|
2
|
+
import { i as readPackageJson, r as allDeps } from "./scan-nVQO7JLx.js";
|
|
3
|
+
import { d as readBundledSkill } from "./skills-421SFEyF.js";
|
|
4
4
|
import { readFileSync } from "node:fs";
|
|
5
5
|
import fg from "fast-glob";
|
|
6
6
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { h as Integration } from "./environment-
|
|
2
|
-
import { n as withSpinner } from "./spinner-
|
|
1
|
+
import { h as Integration } from "./environment-BocmdvZ-.js";
|
|
2
|
+
import { n as withSpinner } from "./spinner-DPdBlZe2.js";
|
|
3
3
|
import { n as ui } from "./ui-D_qf3Gvw.js";
|
|
4
|
-
import { c as createProject, m as listProjects, r as createApplication, y as platformLabel } from "./resources-
|
|
5
|
-
import { n as orgForNewProject } from "./org-
|
|
4
|
+
import { c as createProject, m as listProjects, r as createApplication, y as platformLabel } from "./resources-CptT7HD6.js";
|
|
5
|
+
import { n as orgForNewProject } from "./org-Dud1rF9f.js";
|
|
6
6
|
|
|
7
7
|
//#region src/core/account/bind.ts
|
|
8
8
|
const NEW = "__new__";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import "./token-
|
|
1
|
+
import "./token-Bu3FaRkv.js";
|
|
2
2
|
import "./output-Ggzq5_-t.js";
|
|
3
|
-
import { x as VERSION } from "./environment-
|
|
4
|
-
import "./storage-
|
|
5
|
-
import "./client-
|
|
3
|
+
import { x as VERSION } from "./environment-BocmdvZ-.js";
|
|
4
|
+
import "./storage-DT_wxwJ8.js";
|
|
5
|
+
import "./client-CyrYJzBF.js";
|
|
6
6
|
import "./config-CGcG7GOt.js";
|
|
7
7
|
import { n as ui } from "./ui-D_qf3Gvw.js";
|
|
8
|
-
import "./orgs-
|
|
9
|
-
import "./resources-
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
8
|
+
import "./orgs-Z0H9WOs1.js";
|
|
9
|
+
import "./resources-CptT7HD6.js";
|
|
10
|
+
import { b as writeProjectTypes, l as readLock, y as collectProjectDeclarations } from "./lock-DgSx-p8Y.js";
|
|
11
|
+
import { _ as took, i as parseIds, l as selectSurfaces, n as resolveFramework, o as requireProject, p as kb, s as resolveProjectDir } from "./framework-CLmf4swr.js";
|
|
12
|
+
import { t as assetBaseUrl } from "./assets-B_quADds.js";
|
|
13
|
+
import { n as lintDesignTokens, t as formatTokenFinding } from "./design-lint-CiFc78aM.js";
|
|
14
14
|
import * as fs from "node:fs";
|
|
15
15
|
import * as path from "node:path";
|
|
16
16
|
import pc from "picocolors";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as resolveAuthToken, r as NotLoggedInError } from "./token-
|
|
2
|
-
import { b as USER_AGENT } from "./environment-
|
|
3
|
-
import { a as resolveApiHost, n as readSession } from "./storage-
|
|
1
|
+
import { n as resolveAuthToken, r as NotLoggedInError } from "./token-Bu3FaRkv.js";
|
|
2
|
+
import { b as USER_AGENT } from "./environment-BocmdvZ-.js";
|
|
3
|
+
import { a as resolveApiHost, n as readSession } from "./storage-DT_wxwJ8.js";
|
|
4
4
|
|
|
5
5
|
//#region src/core/api/client.ts
|
|
6
6
|
const BODY_SNIPPET = 200;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import "./token-Bu3FaRkv.js";
|
|
2
|
+
import "./output-Ggzq5_-t.js";
|
|
3
|
+
import "./environment-BocmdvZ-.js";
|
|
4
|
+
import "./storage-DT_wxwJ8.js";
|
|
5
|
+
import "./client-CyrYJzBF.js";
|
|
6
|
+
import "./held-Bykbwy-m.js";
|
|
7
|
+
import "./config-CGcG7GOt.js";
|
|
8
|
+
import "./spinner-DPdBlZe2.js";
|
|
9
|
+
import "./ui-D_qf3Gvw.js";
|
|
10
|
+
import "./paths-CzTJVpfi.js";
|
|
11
|
+
import "./orgs-Z0H9WOs1.js";
|
|
12
|
+
import "./resources-CptT7HD6.js";
|
|
13
|
+
import "./org-Dud1rF9f.js";
|
|
14
|
+
import "./lookup-CWzVfPpq.js";
|
|
15
|
+
import "./scope-l1qGLsgz.js";
|
|
16
|
+
import "./client-BJQXl62Q.js";
|
|
17
|
+
import "./timing-Ca0TXY-A.js";
|
|
18
|
+
import { i as runAscKeysCreate, n as keyAccess, r as keyRole, t as createAndSaveKey } from "./create-BCIgjRHn.js";
|
|
19
|
+
|
|
20
|
+
export { createAndSaveKey, keyAccess, keyRole, runAscKeysCreate };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { r as formatJson, t as blocks } from "./output-Ggzq5_-t.js";
|
|
2
|
-
import { C as appleCredentialsFromEnv, m as ENV_APPLE_PASSWORD, p as ENV_APPLE_ID, x as VERSION } from "./environment-
|
|
3
|
-
import { t as ApiError } from "./client-
|
|
4
|
-
import { i as savedKey, m as KEY_LABEL, n as testModeWarning, o as chooseIosApp, s as resolveApp, t as upsertHeldKey, x as keyKind, y as findIntegrations } from "./held-
|
|
5
|
-
import { t as apiCall } from "./spinner-
|
|
6
|
-
import { n as SUPERWALL_HOME } from "./paths-
|
|
7
|
-
import { A as listField, M as textField, O as field, j as parseJson } from "./resources-
|
|
2
|
+
import { C as appleCredentialsFromEnv, m as ENV_APPLE_PASSWORD, p as ENV_APPLE_ID, x as VERSION } from "./environment-BocmdvZ-.js";
|
|
3
|
+
import { t as ApiError } from "./client-CyrYJzBF.js";
|
|
4
|
+
import { i as savedKey, m as KEY_LABEL, n as testModeWarning, o as chooseIosApp, s as resolveApp, t as upsertHeldKey, x as keyKind, y as findIntegrations } from "./held-Bykbwy-m.js";
|
|
5
|
+
import { t as apiCall } from "./spinner-DPdBlZe2.js";
|
|
6
|
+
import { n as SUPERWALL_HOME } from "./paths-CzTJVpfi.js";
|
|
7
|
+
import { A as listField, M as textField, O as field, j as parseJson } from "./resources-CptT7HD6.js";
|
|
8
8
|
import { c as replaceAppPurchaseKey, s as replaceAppAscKey } from "./client-BJQXl62Q.js";
|
|
9
9
|
import { t as timing } from "./timing-Ca0TXY-A.js";
|
|
10
10
|
import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import "./token-
|
|
1
|
+
import "./token-Bu3FaRkv.js";
|
|
2
2
|
import "./output-Ggzq5_-t.js";
|
|
3
|
-
import "./environment-
|
|
4
|
-
import "./storage-
|
|
5
|
-
import "./client-
|
|
3
|
+
import "./environment-BocmdvZ-.js";
|
|
4
|
+
import "./storage-DT_wxwJ8.js";
|
|
5
|
+
import "./client-CyrYJzBF.js";
|
|
6
6
|
import "./config-CGcG7GOt.js";
|
|
7
|
-
import "./telemetry-
|
|
7
|
+
import "./telemetry-ovPiseFm.js";
|
|
8
8
|
import "./spawn-DmmmHIP-.js";
|
|
9
|
-
import "./spinner-
|
|
9
|
+
import "./spinner-DPdBlZe2.js";
|
|
10
10
|
import "./ui-D_qf3Gvw.js";
|
|
11
11
|
import "./theme-DUsCh-Vd.js";
|
|
12
12
|
import "./log-C0MDCfA2.js";
|
|
13
|
-
import "./scan-
|
|
14
|
-
import "./existing-
|
|
15
|
-
import "./paths-
|
|
16
|
-
import "./orgs-
|
|
17
|
-
import { O as field } from "./resources-
|
|
18
|
-
import "./org-
|
|
19
|
-
import "./lookup-
|
|
20
|
-
import "./bind-
|
|
21
|
-
import "./login-
|
|
22
|
-
import "./skills-
|
|
13
|
+
import "./scan-nVQO7JLx.js";
|
|
14
|
+
import "./existing-Cl5x6_5u.js";
|
|
15
|
+
import "./paths-CzTJVpfi.js";
|
|
16
|
+
import "./orgs-Z0H9WOs1.js";
|
|
17
|
+
import { O as field } from "./resources-CptT7HD6.js";
|
|
18
|
+
import "./org-Dud1rF9f.js";
|
|
19
|
+
import "./lookup-CWzVfPpq.js";
|
|
20
|
+
import "./bind-ClFjTt0U.js";
|
|
21
|
+
import "./login-5sWIKDI2.js";
|
|
22
|
+
import "./skills-421SFEyF.js";
|
|
23
23
|
import "./browser-Bp3yRKlU.js";
|
|
24
|
-
import "./
|
|
25
|
-
import "./
|
|
26
|
-
import "./
|
|
27
|
-
import { a as projectPackageName,
|
|
28
|
-
import "./
|
|
29
|
-
import "./
|
|
30
|
-
import "./
|
|
31
|
-
import "./
|
|
32
|
-
import "./
|
|
33
|
-
import "./
|
|
34
|
-
import {
|
|
35
|
-
import "./
|
|
36
|
-
import
|
|
37
|
-
import
|
|
38
|
-
import {
|
|
24
|
+
import "./lock-DgSx-p8Y.js";
|
|
25
|
+
import "./scope-ehZ7L1nj.js";
|
|
26
|
+
import { i as downloadRepoDir, n as PUBLIC_REPO, r as RepoDownloadError, t as PUBLIC_REF } from "./download-DhGd4hOB.js";
|
|
27
|
+
import { a as projectPackageName, i as requireApi, r as LoginRequiredError } from "./base-ChTi42M0.js";
|
|
28
|
+
import "./framework-CLmf4swr.js";
|
|
29
|
+
import "./run-c1O2_8pp.js";
|
|
30
|
+
import "./drivers-BQkO5tHs.js";
|
|
31
|
+
import { _ as slugOf, c as scaffoldFromPaywall, g as writeTemplate, h as writeSurfaceFiles, i as migrationFor, m as starterConfig, o as offerMigration, s as projectDirOf } from "./migration-Z69tLeHC.js";
|
|
32
|
+
import "./login-Jp6E6d2e.js";
|
|
33
|
+
import "./source-BccdO4aL.js";
|
|
34
|
+
import { a as devCommand, c as uniqueSurfaceId, i as detectPackageManager, n as connectApp, o as initGit, r as detectHostApp, s as installDependencies, t as alreadyAProject } from "./setup-C6NFy14d.js";
|
|
35
|
+
import "./assets-B_quADds.js";
|
|
36
|
+
import "./source-push-B4s6r9bB.js";
|
|
37
|
+
import "./server-DLARhh1k.js";
|
|
38
|
+
import { i as startStudio, n as migrationNextSteps, t as askStudio } from "./open-DNd49kT-.js";
|
|
39
39
|
import * as fs from "node:fs";
|
|
40
40
|
import * as path from "node:path";
|
|
41
41
|
import pc from "picocolors";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import "./token-
|
|
1
|
+
import "./token-Bu3FaRkv.js";
|
|
2
2
|
import "./output-Ggzq5_-t.js";
|
|
3
|
-
import { S as apiKeyFromEnv } from "./environment-
|
|
4
|
-
import { n as readSession } from "./storage-
|
|
3
|
+
import { S as apiKeyFromEnv } from "./environment-BocmdvZ-.js";
|
|
4
|
+
import { n as readSession } from "./storage-DT_wxwJ8.js";
|
|
5
5
|
import "./spawn-DmmmHIP-.js";
|
|
6
6
|
import { n as ui } from "./ui-D_qf3Gvw.js";
|
|
7
7
|
import { n as fg, t as THEME } from "./theme-DUsCh-Vd.js";
|
|
8
|
-
import { t as scanProject } from "./scan-
|
|
9
|
-
import { t as detectExisting } from "./existing-
|
|
10
|
-
import { t as detectDrivers } from "./drivers-
|
|
8
|
+
import { t as scanProject } from "./scan-nVQO7JLx.js";
|
|
9
|
+
import { t as detectExisting } from "./existing-Cl5x6_5u.js";
|
|
10
|
+
import { t as detectDrivers } from "./drivers-BQkO5tHs.js";
|
|
11
11
|
|
|
12
12
|
//#region src/core/support/doctor.ts
|
|
13
13
|
async function runDoctor(ctx, deps = {}) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as getOAuthAccessToken } from "./token-
|
|
2
|
-
import { t as API_HOST, x as VERSION } from "./environment-
|
|
3
|
-
import { n as readSession } from "./storage-
|
|
1
|
+
import { t as getOAuthAccessToken } from "./token-Bu3FaRkv.js";
|
|
2
|
+
import { t as API_HOST, x as VERSION } from "./environment-BocmdvZ-.js";
|
|
3
|
+
import { n as readSession } from "./storage-DT_wxwJ8.js";
|
|
4
4
|
import { n as readVersion, r as spawnStream, t as onPath } from "./spawn-DmmmHIP-.js";
|
|
5
5
|
import { tmpdir } from "node:os";
|
|
6
6
|
import { basename, join } from "node:path";
|
package/dist/entry.js
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
import { n as __require, r as __toESM, t as __commonJS } from "./chunk-DQxbwPpZ.js";
|
|
2
|
-
import "./token-
|
|
2
|
+
import "./token-Bu3FaRkv.js";
|
|
3
3
|
import { a as stripAnsi, d as useStores, i as writeJson } from "./output-Ggzq5_-t.js";
|
|
4
|
-
import { T as isNonInteractive, s as CHANNEL, x as VERSION } from "./environment-
|
|
5
|
-
import "./storage-
|
|
6
|
-
import { i as superwallApi } from "./client-
|
|
7
|
-
import { O as useAscRefresh } from "./held-
|
|
4
|
+
import { T as isNonInteractive, s as CHANNEL, x as VERSION } from "./environment-BocmdvZ-.js";
|
|
5
|
+
import "./storage-DT_wxwJ8.js";
|
|
6
|
+
import { i as superwallApi } from "./client-CyrYJzBF.js";
|
|
7
|
+
import { O as useAscRefresh } from "./held-Bykbwy-m.js";
|
|
8
8
|
import "./config-CGcG7GOt.js";
|
|
9
|
-
import { n as maybeShowTelemetryNotice, r as track, t as flushTelemetry } from "./telemetry-
|
|
9
|
+
import { n as maybeShowTelemetryNotice, r as track, t as flushTelemetry } from "./telemetry-ovPiseFm.js";
|
|
10
10
|
import "./spawn-DmmmHIP-.js";
|
|
11
|
-
import { a as printAutoUpdate, i as maybeNotifyUpdate, l as selectAutoUpdate, n as isGlobalInstall, o as recordAutoUpdate, s as refreshUpdateCheck, t as flushUpdateCheck } from "./upgrade-
|
|
12
|
-
import { c as onChannel, f as useHost, l as summaryOf, o as examplesOf, r as UsageError, s as flagName } from "./spinner-
|
|
11
|
+
import { a as printAutoUpdate, i as maybeNotifyUpdate, l as selectAutoUpdate, n as isGlobalInstall, o as recordAutoUpdate, s as refreshUpdateCheck, t as flushUpdateCheck } from "./upgrade-B7TmvEPP.js";
|
|
12
|
+
import { c as onChannel, f as useHost, l as summaryOf, o as examplesOf, r as UsageError, s as flagName } from "./spinner-DPdBlZe2.js";
|
|
13
13
|
import { r as useRenderer, t as silentRenderer } from "./ui-D_qf3Gvw.js";
|
|
14
14
|
import { t as THEME } from "./theme-DUsCh-Vd.js";
|
|
15
15
|
import { n as styleMarkdown, r as wrapReportLine } from "./log-C0MDCfA2.js";
|
|
16
|
-
import { t as scanProject } from "./scan-
|
|
17
|
-
import { t as detectExisting } from "./existing-
|
|
18
|
-
import { n as SUPERWALL_HOME, r as expandHome } from "./paths-
|
|
19
|
-
import { a as renderPage, i as exampleLines, n as cmd, r as detailLines, t as listGroups } from "./registry-
|
|
20
|
-
import "./session-
|
|
21
|
-
import "./orgs-
|
|
22
|
-
import "./resources-
|
|
23
|
-
import "./org-
|
|
24
|
-
import "./lookup-
|
|
25
|
-
import "./scope-
|
|
16
|
+
import { t as scanProject } from "./scan-nVQO7JLx.js";
|
|
17
|
+
import { t as detectExisting } from "./existing-Cl5x6_5u.js";
|
|
18
|
+
import { n as SUPERWALL_HOME, r as expandHome } from "./paths-CzTJVpfi.js";
|
|
19
|
+
import { a as renderPage, i as exampleLines, n as cmd, r as detailLines, t as listGroups } from "./registry-DDU10_Ix.js";
|
|
20
|
+
import "./session-Z0BeaJPf.js";
|
|
21
|
+
import "./orgs-Z0H9WOs1.js";
|
|
22
|
+
import "./resources-CptT7HD6.js";
|
|
23
|
+
import "./org-Dud1rF9f.js";
|
|
24
|
+
import "./lookup-CWzVfPpq.js";
|
|
25
|
+
import "./scope-l1qGLsgz.js";
|
|
26
26
|
import "./client-BJQXl62Q.js";
|
|
27
27
|
import "./products-Cqq59DBQ.js";
|
|
28
28
|
import "./input-MDd67UIp.js";
|
|
29
29
|
import "./timing-Ca0TXY-A.js";
|
|
30
|
-
import "./notification-url-
|
|
31
|
-
import "./bind-
|
|
30
|
+
import "./notification-url-BDBxbwZq.js";
|
|
31
|
+
import "./bind-ClFjTt0U.js";
|
|
32
32
|
import { spawn } from "node:child_process";
|
|
33
33
|
import * as fs from "node:fs";
|
|
34
34
|
import { existsSync, mkdirSync, readFileSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { h as Integration } from "./environment-
|
|
2
|
-
import { i as readPackageJson, r as allDeps } from "./scan-
|
|
1
|
+
import { h as Integration } from "./environment-BocmdvZ-.js";
|
|
2
|
+
import { i as readPackageJson, r as allDeps } from "./scan-nVQO7JLx.js";
|
|
3
3
|
import { readFileSync } from "node:fs";
|
|
4
4
|
import fg from "fast-glob";
|
|
5
5
|
|