@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,6 +1,6 @@
|
|
|
1
1
|
import { n as ui } from "./ui-D_qf3Gvw.js";
|
|
2
|
-
import {
|
|
3
|
-
import { a as classifyPath, c as isSurfaceRoot,
|
|
2
|
+
import { i as formatSharedLock, v as TYPES_FILE } from "./lock-DgSx-p8Y.js";
|
|
3
|
+
import { a as classifyPath, c as isSurfaceRoot, i as LOCK_FILE$1, l as mergeLockText, o as derivedFilesOf, r as DERIVED_FILES, s as isOtherSurfaceDir } from "./scope-ehZ7L1nj.js";
|
|
4
4
|
import { execFile } from "node:child_process";
|
|
5
5
|
import * as fs from "node:fs";
|
|
6
6
|
import * as os$1 from "node:os";
|
|
@@ -8,96 +8,20 @@ import * as path from "node:path";
|
|
|
8
8
|
import { promisify } from "node:util";
|
|
9
9
|
import fg from "fast-glob";
|
|
10
10
|
|
|
11
|
-
//#region src/core/paywalls/source/source.ts
|
|
12
|
-
const HARD_EXCLUDES = [
|
|
13
|
-
".superwall/**",
|
|
14
|
-
"**/node_modules/**",
|
|
15
|
-
".git/**",
|
|
16
|
-
"**/.env*",
|
|
17
|
-
"**/.DS_Store",
|
|
18
|
-
"**/.npmrc",
|
|
19
|
-
"**/.netrc",
|
|
20
|
-
"**/*.pem",
|
|
21
|
-
"**/*.p8",
|
|
22
|
-
"**/*.p12",
|
|
23
|
-
"**/*.key",
|
|
24
|
-
"**/*.keystore",
|
|
25
|
-
"**/*.jks",
|
|
26
|
-
"**/google-services.json",
|
|
27
|
-
"**/GoogleService-Info.plist"
|
|
28
|
-
];
|
|
29
|
-
const LOCK_FILE$1 = "superwall.lock";
|
|
30
|
-
const SOURCE_LIMIT_BYTES = 250 * 1024 * 1024;
|
|
31
|
-
const LARGEST_SHOWN = 3;
|
|
32
|
-
const megabytes = (bytes) => `${(bytes / 1024 / 1024).toFixed(1)} MB`;
|
|
33
|
-
function gitignoreExcludes(superwallDir) {
|
|
34
|
-
let text;
|
|
35
|
-
try {
|
|
36
|
-
text = fs.readFileSync(path.join(superwallDir, ".gitignore"), "utf8");
|
|
37
|
-
} catch {
|
|
38
|
-
return [];
|
|
39
|
-
}
|
|
40
|
-
const excludes = [];
|
|
41
|
-
for (const raw of text.split("\n")) {
|
|
42
|
-
const line = raw.trim();
|
|
43
|
-
if (line === "" || line.startsWith("#") || line.startsWith("!")) continue;
|
|
44
|
-
const anchored = line.startsWith("/");
|
|
45
|
-
const body = (anchored ? line.slice(1) : line).replace(/\/+$/, "");
|
|
46
|
-
if (body === "") continue;
|
|
47
|
-
const base = anchored || body.includes("/") ? body : `**/${body}`;
|
|
48
|
-
excludes.push(base, `${base}/**`);
|
|
49
|
-
}
|
|
50
|
-
return excludes;
|
|
51
|
-
}
|
|
52
|
-
const readFramework = (superwallDir, relative$1) => relative$1 === LOCK_FILE$1 ? Buffer.from(formatSharedLock(superwallDir)) : fs.readFileSync(path.join(superwallDir, relative$1));
|
|
53
|
-
async function collectSourceFiles(superwallDir, read = readFramework) {
|
|
54
|
-
const entries = await fg("**/*", {
|
|
55
|
-
cwd: superwallDir,
|
|
56
|
-
dot: true,
|
|
57
|
-
onlyFiles: true,
|
|
58
|
-
followSymbolicLinks: false,
|
|
59
|
-
ignore: [...HARD_EXCLUDES, ...gitignoreExcludes(superwallDir)]
|
|
60
|
-
});
|
|
61
|
-
if (entries.length === 0) return {
|
|
62
|
-
ok: false,
|
|
63
|
-
reason: `No source files found in ${superwallDir}.`
|
|
64
|
-
};
|
|
65
|
-
const sizes = entries.map((relative$1) => ({
|
|
66
|
-
path: relative$1,
|
|
67
|
-
bytes: fs.statSync(path.join(superwallDir, relative$1)).size
|
|
68
|
-
}));
|
|
69
|
-
const total = sizes.reduce((sum, entry) => sum + entry.bytes, 0);
|
|
70
|
-
if (total > SOURCE_LIMIT_BYTES) {
|
|
71
|
-
const largest = sizes.sort((a, b) => b.bytes - a.bytes).slice(0, LARGEST_SHOWN).map((entry) => `${entry.path} (${megabytes(entry.bytes)})`).join(", ");
|
|
72
|
-
return {
|
|
73
|
-
ok: false,
|
|
74
|
-
reason: `The source in ${superwallDir} is ${megabytes(total)}, over the ${SOURCE_LIMIT_BYTES / 1024 / 1024} MB limit. Largest: ${largest}. Add what doesn't belong to .gitignore, then push again.`
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
return {
|
|
78
|
-
ok: true,
|
|
79
|
-
files: entries.sort().map((relative$1) => ({
|
|
80
|
-
path: relative$1,
|
|
81
|
-
content: read(superwallDir, relative$1)
|
|
82
|
-
}))
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
//#endregion
|
|
87
11
|
//#region src/core/paywalls/source/commit.ts
|
|
88
12
|
const noteBody = (note) => {
|
|
89
13
|
const text = note?.replace(/\r\n?/g, "\n").trim();
|
|
90
14
|
return text ? `\n${text}\n` : "";
|
|
91
15
|
};
|
|
92
|
-
const
|
|
93
|
-
const surface = `
|
|
94
|
-
const trailers = [`Superwall-
|
|
95
|
-
if (input.sdk) trailers.push(`Superwall-
|
|
16
|
+
const artifactCommitMessage = (input) => {
|
|
17
|
+
const surface = `artifact/${input.surface}`;
|
|
18
|
+
const trailers = [`Superwall-Artifact: ${input.artifactId}`, `Superwall-Surface: ${surface}`];
|
|
19
|
+
if (input.sdk) trailers.push(`Superwall-Artifact-Sdk: ${input.sdk}`);
|
|
96
20
|
if (input.cli) trailers.push(`Superwall-Cli: ${input.cli}`);
|
|
97
21
|
return `push ${surface}\n${noteBody(input.note)}\n${trailers.join("\n")}\n`;
|
|
98
22
|
};
|
|
99
23
|
const buildCommitMessage = (input) => {
|
|
100
|
-
if (input.kind === "
|
|
24
|
+
if (input.kind === "artifact") return artifactCommitMessage(input);
|
|
101
25
|
if (input.kind === "project") {
|
|
102
26
|
const trailers$1 = [`Superwall-Application: ${input.applicationId}`, `Superwall-Framework: ${input.framework}`];
|
|
103
27
|
if (input.cli) trailers$1.push(`Superwall-Cli: ${input.cli}`);
|
|
@@ -235,12 +159,12 @@ function materializeSourceTree(dir, files, scope, options = {}) {
|
|
|
235
159
|
for (const file of files) {
|
|
236
160
|
if (classifyPath(file.path, scope) === "other") continue;
|
|
237
161
|
if (file.content.byteLength > LARGE_FILE_BYTES) large.push(file.path);
|
|
238
|
-
if (file.path === LOCK_FILE && scope.kind !== "
|
|
162
|
+
if (file.path === LOCK_FILE$1 && scope.kind !== "artifact") write(file.path, mergeLockText(theirs.get(LOCK_FILE$1)?.toString("utf8"), file.content.toString("utf8"), scope, { replaceUnreadable: options.overwrite }));
|
|
239
163
|
else write(file.path, file.content);
|
|
240
164
|
theirs.delete(file.path);
|
|
241
165
|
}
|
|
242
166
|
for (const [derived, content] of theirs) write(derived, content);
|
|
243
|
-
if (large.length > 0) ui.warn(`Committing ${large.length > 1 ? `${large.length} files` : large[0]} over 50 MB — every future clone of this ${scope.kind === "
|
|
167
|
+
if (large.length > 0) ui.warn(`Committing ${large.length > 1 ? `${large.length} files` : large[0]} over 50 MB — every future clone of this ${scope.kind === "artifact" ? "artifact's" : "app's"} source repo pays for it.`);
|
|
244
168
|
}
|
|
245
169
|
const SHOWN_FILES = 5;
|
|
246
170
|
const listFiles = (files) => {
|
|
@@ -251,13 +175,13 @@ const listFiles = (files) => {
|
|
|
251
175
|
const replaced = (kind) => kind === "project" ? "the project's shared files" : "this paywall's source";
|
|
252
176
|
var SourceConflictError = class extends Error {
|
|
253
177
|
constructor(files, kind = "paywall") {
|
|
254
|
-
super(kind === "
|
|
178
|
+
super(kind === "artifact" ? `Someone else pushed changes to ${listFiles(files)} since this project last synced. Run \`superwall artifacts pull\` to bring their changes into this project, then push again, or rerun with --overwrite-source to replace this artifact's source with yours.` : `Someone else published changes to ${listFiles(files)} since this project last synced. Run \`superwall pull\` to bring their changes into this project, then publish again — or rerun with --overwrite-source to replace ${replaced(kind)} with yours.`);
|
|
255
179
|
this.files = files;
|
|
256
180
|
}
|
|
257
181
|
};
|
|
258
182
|
var SourceDivergedError = class extends Error {
|
|
259
183
|
constructor(files, kind = "paywall") {
|
|
260
|
-
super(kind === "
|
|
184
|
+
super(kind === "artifact" ? `The source repo differs from this project in ${listFiles(files)}, and this project records no sync point to merge from. Run \`superwall artifacts pull\` to merge the source repo into this project, then push again, or rerun with --overwrite-source to replace this artifact's source with yours.` : `The source repo differs from this project in ${listFiles(files)}, and superwall.lock records no sync point to merge from. Run \`superwall pull\` to merge the source repo into this project, then publish again — or rerun with --overwrite-source to replace ${replaced(kind)} with yours.`);
|
|
261
185
|
this.files = files;
|
|
262
186
|
}
|
|
263
187
|
};
|
|
@@ -342,7 +266,7 @@ async function pushSourceTree(input) {
|
|
|
342
266
|
const local = onRemote ? await snapshotLocal(run$1, dir, input.files, scope, head, committing) : void 0;
|
|
343
267
|
const unsynced = onRemote && scope.kind === "project";
|
|
344
268
|
materializeSourceTree(dir, input.files, scope, {
|
|
345
|
-
onRemote: onRemote && scope.kind !== "
|
|
269
|
+
onRemote: onRemote && scope.kind !== "artifact",
|
|
346
270
|
overwrite: input.overwrite
|
|
347
271
|
});
|
|
348
272
|
await run$1(["add", "-A"]);
|
|
@@ -575,12 +499,12 @@ async function mergeUpstream(upstream, messageFile, { run: run$1, committing, di
|
|
|
575
499
|
}
|
|
576
500
|
if (!merging) return;
|
|
577
501
|
const show = (ref, file) => run$1(["show", `${ref}:${file}`]).then((text) => text, () => void 0);
|
|
578
|
-
if (scope.kind !== "
|
|
579
|
-
const theirsLock = await show(upstream, LOCK_FILE);
|
|
580
|
-
const mineLock = await show(own, LOCK_FILE);
|
|
581
|
-
await settle(run$1, dir, LOCK_FILE, mineLock === void 0 ? theirsLock : mergeLockText(theirsLock, mineLock, scope));
|
|
502
|
+
if (scope.kind !== "artifact") {
|
|
503
|
+
const theirsLock = await show(upstream, LOCK_FILE$1);
|
|
504
|
+
const mineLock = await show(own, LOCK_FILE$1);
|
|
505
|
+
await settle(run$1, dir, LOCK_FILE$1, mineLock === void 0 ? theirsLock : mergeLockText(theirsLock, mineLock, scope));
|
|
582
506
|
}
|
|
583
|
-
for (const file of derived) if (file !== LOCK_FILE) await settle(run$1, dir, file, await show(own, file));
|
|
507
|
+
for (const file of derived) if (file !== LOCK_FILE$1) await settle(run$1, dir, file, await show(own, file));
|
|
584
508
|
await run$1([
|
|
585
509
|
"commit",
|
|
586
510
|
"--quiet",
|
|
@@ -741,7 +665,7 @@ async function pullSourceTree(input) {
|
|
|
741
665
|
status: "pulled",
|
|
742
666
|
head,
|
|
743
667
|
changes,
|
|
744
|
-
lock: await shown(LOCK_FILE),
|
|
668
|
+
lock: await shown(LOCK_FILE$1),
|
|
745
669
|
types: await shown(TYPES_FILE)
|
|
746
670
|
};
|
|
747
671
|
} finally {
|
|
@@ -766,4 +690,80 @@ function replaceTree(dir, files) {
|
|
|
766
690
|
const isRejected = (error) => error instanceof GitError && /rejected|non-fast-forward|fetch first|stale info|failed to push some refs/i.test(error.message);
|
|
767
691
|
|
|
768
692
|
//#endregion
|
|
769
|
-
|
|
693
|
+
//#region src/core/paywalls/source/source.ts
|
|
694
|
+
const HARD_EXCLUDES = [
|
|
695
|
+
".superwall/**",
|
|
696
|
+
"**/node_modules/**",
|
|
697
|
+
".git/**",
|
|
698
|
+
"**/.env*",
|
|
699
|
+
"**/.DS_Store",
|
|
700
|
+
"**/.npmrc",
|
|
701
|
+
"**/.netrc",
|
|
702
|
+
"**/*.pem",
|
|
703
|
+
"**/*.p8",
|
|
704
|
+
"**/*.p12",
|
|
705
|
+
"**/*.key",
|
|
706
|
+
"**/*.keystore",
|
|
707
|
+
"**/*.jks",
|
|
708
|
+
"**/google-services.json",
|
|
709
|
+
"**/GoogleService-Info.plist"
|
|
710
|
+
];
|
|
711
|
+
const LOCK_FILE = "superwall.lock";
|
|
712
|
+
const SOURCE_LIMIT_BYTES = 250 * 1024 * 1024;
|
|
713
|
+
const LARGEST_SHOWN = 3;
|
|
714
|
+
const megabytes = (bytes) => `${(bytes / 1024 / 1024).toFixed(1)} MB`;
|
|
715
|
+
function gitignoreExcludes(superwallDir) {
|
|
716
|
+
let text;
|
|
717
|
+
try {
|
|
718
|
+
text = fs.readFileSync(path.join(superwallDir, ".gitignore"), "utf8");
|
|
719
|
+
} catch {
|
|
720
|
+
return [];
|
|
721
|
+
}
|
|
722
|
+
const excludes = [];
|
|
723
|
+
for (const raw of text.split("\n")) {
|
|
724
|
+
const line = raw.trim();
|
|
725
|
+
if (line === "" || line.startsWith("#") || line.startsWith("!")) continue;
|
|
726
|
+
const anchored = line.startsWith("/");
|
|
727
|
+
const body = (anchored ? line.slice(1) : line).replace(/\/+$/, "");
|
|
728
|
+
if (body === "") continue;
|
|
729
|
+
const base = anchored || body.includes("/") ? body : `**/${body}`;
|
|
730
|
+
excludes.push(base, `${base}/**`);
|
|
731
|
+
}
|
|
732
|
+
return excludes;
|
|
733
|
+
}
|
|
734
|
+
const readFramework = (superwallDir, relative$1) => relative$1 === LOCK_FILE ? Buffer.from(formatSharedLock(superwallDir)) : fs.readFileSync(path.join(superwallDir, relative$1));
|
|
735
|
+
async function collectSourceFiles(superwallDir, read = readFramework) {
|
|
736
|
+
const entries = await fg("**/*", {
|
|
737
|
+
cwd: superwallDir,
|
|
738
|
+
dot: true,
|
|
739
|
+
onlyFiles: true,
|
|
740
|
+
followSymbolicLinks: false,
|
|
741
|
+
ignore: [...HARD_EXCLUDES, ...gitignoreExcludes(superwallDir)]
|
|
742
|
+
});
|
|
743
|
+
if (entries.length === 0) return {
|
|
744
|
+
ok: false,
|
|
745
|
+
reason: `No source files found in ${superwallDir}.`
|
|
746
|
+
};
|
|
747
|
+
const sizes = entries.map((relative$1) => ({
|
|
748
|
+
path: relative$1,
|
|
749
|
+
bytes: fs.statSync(path.join(superwallDir, relative$1)).size
|
|
750
|
+
}));
|
|
751
|
+
const total = sizes.reduce((sum, entry) => sum + entry.bytes, 0);
|
|
752
|
+
if (total > SOURCE_LIMIT_BYTES) {
|
|
753
|
+
const largest = sizes.sort((a, b) => b.bytes - a.bytes).slice(0, LARGEST_SHOWN).map((entry) => `${entry.path} (${megabytes(entry.bytes)})`).join(", ");
|
|
754
|
+
return {
|
|
755
|
+
ok: false,
|
|
756
|
+
reason: `The source in ${superwallDir} is ${megabytes(total)}, over the ${SOURCE_LIMIT_BYTES / 1024 / 1024} MB limit. Largest: ${largest}. Add what doesn't belong to .gitignore, then push again.`
|
|
757
|
+
};
|
|
758
|
+
}
|
|
759
|
+
return {
|
|
760
|
+
ok: true,
|
|
761
|
+
files: entries.sort().map((relative$1) => ({
|
|
762
|
+
path: relative$1,
|
|
763
|
+
content: read(superwallDir, relative$1)
|
|
764
|
+
}))
|
|
765
|
+
};
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
//#endregion
|
|
769
|
+
export { statIfPresent as a, pushSourceTree as i, gitAvailable as n, pullSourceTree as r, collectSourceFiles as t };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { n as ApiUnreachableError, t as ApiError } from "./client-
|
|
1
|
+
import { n as ApiUnreachableError, t as ApiError } from "./client-CyrYJzBF.js";
|
|
2
2
|
import { n as ui } from "./ui-D_qf3Gvw.js";
|
|
3
|
-
import { d as linkSourceCommit, f as listAppPaywalls, o as createHeadlessPaywall, v as mintSourceAccess } from "./resources-
|
|
4
|
-
import { n as findApplication } from "./lookup-
|
|
5
|
-
import { f as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
3
|
+
import { d as linkSourceCommit, f as listAppPaywalls, o as createHeadlessPaywall, v as mintSourceAccess } from "./resources-CptT7HD6.js";
|
|
4
|
+
import { n as findApplication } from "./lookup-CWzVfPpq.js";
|
|
5
|
+
import { f as writeBinding, l as readLock } from "./lock-DgSx-p8Y.js";
|
|
6
|
+
import { n as writeSourceBase, t as readSourceBase } from "./base-ChTi42M0.js";
|
|
7
|
+
import { i as pushSourceTree, n as gitAvailable } from "./source-BccdO4aL.js";
|
|
8
8
|
import { setTimeout } from "node:timers/promises";
|
|
9
9
|
import { productVariables } from "@superwall/studio/products";
|
|
10
10
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as NotLoggedInError } from "./token-
|
|
1
|
+
import { r as NotLoggedInError } from "./token-Bu3FaRkv.js";
|
|
2
2
|
import { i as writeJson, n as createCommandOutput } from "./output-Ggzq5_-t.js";
|
|
3
|
-
import { s as CHANNEL } from "./environment-
|
|
4
|
-
import { t as ApiError } from "./client-
|
|
3
|
+
import { s as CHANNEL } from "./environment-BocmdvZ-.js";
|
|
4
|
+
import { t as ApiError } from "./client-CyrYJzBF.js";
|
|
5
5
|
import { n as ui, r as useRenderer } from "./ui-D_qf3Gvw.js";
|
|
6
6
|
import pc from "picocolors";
|
|
7
7
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { n as compareVersions, r as vendoredVersion, t as STARTER_DIR } from "./sdk-
|
|
1
|
+
import { n as MANIFEST_FILE, o as readManifest, r as VENDORED_SDK, t as ArtifactError } from "./project-NoMtbMyl.js";
|
|
2
|
+
import { i as downloadRepoDir, n as PUBLIC_REPO, r as RepoDownloadError } from "./download-DhGd4hOB.js";
|
|
3
|
+
import { n as compareVersions, r as vendoredVersion, t as STARTER_DIR } from "./sdk-DEfQttek.js";
|
|
4
4
|
import { execFile } from "node:child_process";
|
|
5
5
|
import * as fs from "node:fs";
|
|
6
6
|
import * as os$1 from "node:os";
|
|
7
7
|
import * as path from "node:path";
|
|
8
8
|
import { promisify } from "node:util";
|
|
9
9
|
|
|
10
|
-
//#region src/core/
|
|
10
|
+
//#region src/core/artifacts/starter.ts
|
|
11
11
|
const run = promisify(execFile);
|
|
12
12
|
const npmInstall = async (root) => {
|
|
13
13
|
await run("npm", [
|
|
@@ -20,7 +20,7 @@ const npmInstall = async (root) => {
|
|
|
20
20
|
timeout: 3e5
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
|
-
const packageNameOf = (dir) => path.basename(dir).toLowerCase().replace(/[^a-z0-9-]+/g, "-").replace(/^-+|-+$/g, "") || "my-
|
|
23
|
+
const packageNameOf = (dir) => path.basename(dir).toLowerCase().replace(/[^a-z0-9-]+/g, "-").replace(/^-+|-+$/g, "") || "my-artifact";
|
|
24
24
|
const titleOf = (name) => {
|
|
25
25
|
const words = name.split("-").join(" ");
|
|
26
26
|
return words.charAt(0).toUpperCase() + words.slice(1);
|
|
@@ -43,14 +43,14 @@ function adoptStarter(target, name) {
|
|
|
43
43
|
for (const entrypoint of value.entrypoints ?? []) if (entrypoint.slot === "org.page@1") entrypoint.title = titleOf(name);
|
|
44
44
|
});
|
|
45
45
|
const wrangler = path.join(target, "wrangler.jsonc");
|
|
46
|
-
fs.writeFileSync(wrangler, fs.readFileSync(wrangler, "utf8").replace("superwall-
|
|
46
|
+
fs.writeFileSync(wrangler, fs.readFileSync(wrangler, "utf8").replace("superwall-artifact-starter", name));
|
|
47
47
|
}
|
|
48
|
-
async function
|
|
49
|
-
const target = path.resolve(input.dir ?? "my-
|
|
48
|
+
async function runArtifactCreate(ctx, input, runtime = {}) {
|
|
49
|
+
const target = path.resolve(input.dir ?? "my-artifact");
|
|
50
50
|
const existed = fs.existsSync(target);
|
|
51
|
-
if (existed && !fs.statSync(target).isDirectory()) throw new
|
|
52
|
-
if (existed && fs.readdirSync(target).length > 0) throw new
|
|
53
|
-
ctx.ui.intro("New
|
|
51
|
+
if (existed && !fs.statSync(target).isDirectory()) throw new ArtifactError(`${target} is a file. Pick an empty directory.`);
|
|
52
|
+
if (existed && fs.readdirSync(target).length > 0) throw new ArtifactError(`${target} already has files in it. Pick an empty directory.`);
|
|
53
|
+
ctx.ui.intro("New artifact");
|
|
54
54
|
const spin = ctx.ui.spinner();
|
|
55
55
|
spin.start(`Downloading the starter from github.com/${PUBLIC_REPO}`);
|
|
56
56
|
try {
|
|
@@ -84,14 +84,14 @@ async function runWorkspaceCreate(ctx, input, runtime = {}) {
|
|
|
84
84
|
const next = [
|
|
85
85
|
`cd ${path.relative(process.cwd(), target) || "."}`,
|
|
86
86
|
...installed ? [] : ["npm install"],
|
|
87
|
-
"superwall
|
|
87
|
+
"superwall artifacts dev"
|
|
88
88
|
];
|
|
89
89
|
ctx.ui.note(next.join("\n"), "Next");
|
|
90
90
|
}
|
|
91
91
|
async function downloadSdk(fetchImpl) {
|
|
92
|
-
const stage = fs.mkdtempSync(path.join(os$1.tmpdir(), "superwall-
|
|
92
|
+
const stage = fs.mkdtempSync(path.join(os$1.tmpdir(), "superwall-artifact-sdk-"));
|
|
93
93
|
try {
|
|
94
|
-
await downloadRepoDir(`${STARTER_DIR}/vendor/
|
|
94
|
+
await downloadRepoDir(`${STARTER_DIR}/vendor/artifact-sdk`, stage, `No artifact SDK at ${STARTER_DIR} in github.com/${PUBLIC_REPO}. Update the CLI with \`superwall upgrade\`.`, fetchImpl);
|
|
95
95
|
return {
|
|
96
96
|
stage,
|
|
97
97
|
version: readStageVersion(stage)
|
|
@@ -107,7 +107,7 @@ async function downloadSdk(fetchImpl) {
|
|
|
107
107
|
function replaceDirectory(stage, target, rename = fs.renameSync) {
|
|
108
108
|
const parent = path.dirname(target);
|
|
109
109
|
fs.mkdirSync(parent, { recursive: true });
|
|
110
|
-
const incoming = fs.mkdtempSync(path.join(parent, ".
|
|
110
|
+
const incoming = fs.mkdtempSync(path.join(parent, ".artifact-sdk-new-"));
|
|
111
111
|
const outgoing = `${incoming}-old`;
|
|
112
112
|
fs.cpSync(stage, incoming, { recursive: true });
|
|
113
113
|
const hadTarget = fs.existsSync(target);
|
|
@@ -130,39 +130,39 @@ function replaceDirectory(stage, target, rename = fs.renameSync) {
|
|
|
130
130
|
function pointPackageAtSdk(file) {
|
|
131
131
|
const text = fs.readFileSync(file, "utf8");
|
|
132
132
|
const parsed = JSON.parse(text);
|
|
133
|
-
if (parsed.dependencies?.["@superwall/
|
|
133
|
+
if (parsed.dependencies?.["@superwall/artifact-sdk"] === "file:vendor/artifact-sdk") return;
|
|
134
134
|
parsed.dependencies = {
|
|
135
135
|
...parsed.dependencies,
|
|
136
|
-
"@superwall/
|
|
136
|
+
"@superwall/artifact-sdk": "file:vendor/artifact-sdk"
|
|
137
137
|
};
|
|
138
138
|
const indent = /^([ \t]+)"/m.exec(text)?.[1] ?? " ";
|
|
139
139
|
fs.writeFileSync(file, `${JSON.stringify(parsed, null, indent)}${text.endsWith("\n") ? "\n" : ""}`);
|
|
140
140
|
}
|
|
141
141
|
function readStageVersion(stage) {
|
|
142
142
|
const { version } = JSON.parse(fs.readFileSync(path.join(stage, "package.json"), "utf8"));
|
|
143
|
-
if (typeof version !== "string") throw new RepoDownloadError("The downloaded
|
|
143
|
+
if (typeof version !== "string") throw new RepoDownloadError("The downloaded artifact SDK has no version.");
|
|
144
144
|
return version;
|
|
145
145
|
}
|
|
146
|
-
async function
|
|
146
|
+
async function runArtifactUpdate(ctx, input, runtime = {}) {
|
|
147
147
|
const root = path.resolve(input.dir ?? process.cwd());
|
|
148
148
|
readManifest(root);
|
|
149
149
|
const packageFile = path.join(root, "package.json");
|
|
150
|
-
if (!fs.existsSync(packageFile)) throw new
|
|
150
|
+
if (!fs.existsSync(packageFile)) throw new ArtifactError(`No package.json in ${root}, so nothing was changed. An artifact needs one to depend on the SDK.`);
|
|
151
151
|
const before = vendoredVersion(root);
|
|
152
152
|
const spin = ctx.ui.spinner();
|
|
153
|
-
spin.start("Downloading the
|
|
153
|
+
spin.start("Downloading the artifact SDK");
|
|
154
154
|
let downloaded;
|
|
155
155
|
try {
|
|
156
156
|
downloaded = await downloadSdk(runtime.fetch ?? fetch);
|
|
157
157
|
} catch (error) {
|
|
158
|
-
spin.stop("The
|
|
158
|
+
spin.stop("The artifact SDK didn't download");
|
|
159
159
|
throw error;
|
|
160
160
|
}
|
|
161
161
|
const { stage, version } = downloaded;
|
|
162
162
|
try {
|
|
163
163
|
if (before !== void 0 && compareVersions(before, version) > 0 && !input.force) {
|
|
164
164
|
spin.stop(`Yours is newer than the latest published one, ${version}`);
|
|
165
|
-
ctx.ui.warn(`Left
|
|
165
|
+
ctx.ui.warn(`Left artifact SDK ${before} alone. Pass --force to replace it with ${version}.`);
|
|
166
166
|
return;
|
|
167
167
|
}
|
|
168
168
|
replaceDirectory(stage, path.join(root, VENDORED_SDK), runtime.rename);
|
|
@@ -172,19 +172,19 @@ async function runWorkspaceUpdate(ctx, input, runtime = {}) {
|
|
|
172
172
|
force: true
|
|
173
173
|
});
|
|
174
174
|
}
|
|
175
|
-
spin.stop(before === version ? `Already on the latest
|
|
175
|
+
spin.stop(before === version ? `Already on the latest artifact SDK, ${version}` : `Artifact SDK ${version}`);
|
|
176
176
|
pointPackageAtSdk(packageFile);
|
|
177
177
|
if (!input.install) {
|
|
178
|
-
ctx.ui.info("Run `npm install` to update package-lock.json, then commit vendor/
|
|
178
|
+
ctx.ui.info("Run `npm install` to update package-lock.json, then commit vendor/artifact-sdk and the lockfile.");
|
|
179
179
|
return;
|
|
180
180
|
}
|
|
181
181
|
try {
|
|
182
182
|
await (runtime.install ?? npmInstall)(root);
|
|
183
|
-
ctx.ui.success("Updated package-lock.json. Commit vendor/
|
|
183
|
+
ctx.ui.success("Updated package-lock.json. Commit vendor/artifact-sdk and the lockfile.");
|
|
184
184
|
} catch {
|
|
185
185
|
ctx.ui.warn("`npm install` failed. Run it yourself to update package-lock.json.");
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
//#endregion
|
|
190
|
-
export {
|
|
190
|
+
export { runArtifactCreate, runArtifactUpdate };
|
|
@@ -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 { C as listVersions, S as listMembers, T as requestDeploy, a as newestFirst, d as visibilityOf, i as latestManifest, l as resolveArtifact, n as awaitingInstall, o as openLink, s as pickVersion, u as roleCanApprove, v as getBuild, y as getMe } 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/status.ts
|
|
14
14
|
const SHOWN_VERSIONS = 3;
|
|
15
15
|
const STATE_LABEL = {
|
|
16
16
|
active: "Live",
|
|
@@ -28,7 +28,7 @@ const versionMeta = (version, activeId, authorId) => [
|
|
|
28
28
|
const isUnfinished = (version) => version.build_status === "PENDING" || version.build_status === "BUILDING";
|
|
29
29
|
async function settle(ctx, version) {
|
|
30
30
|
try {
|
|
31
|
-
return await getBuild(ctx.api, version.
|
|
31
|
+
return await getBuild(ctx.api, version.artifact_id, version.id);
|
|
32
32
|
} catch (error) {
|
|
33
33
|
if (error instanceof ApiError && [
|
|
34
34
|
403,
|
|
@@ -38,18 +38,18 @@ async function settle(ctx, version) {
|
|
|
38
38
|
throw error;
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
async function
|
|
42
|
-
const
|
|
43
|
-
let versions = newestFirst(await listVersions(ctx.api,
|
|
41
|
+
async function runArtifactStatus(ctx, input) {
|
|
42
|
+
const artifact = await resolveArtifact(ctx, input);
|
|
43
|
+
let versions = newestFirst(await listVersions(ctx.api, artifact.id));
|
|
44
44
|
const [latest] = versions;
|
|
45
45
|
const build = latest && isUnfinished(latest) ? await settle(ctx, latest) : void 0;
|
|
46
46
|
if (build) versions = versions.map((version) => version.id === build.version.id ? build.version : version);
|
|
47
|
-
const { url } = await openLink(ctx,
|
|
48
|
-
const live = versions.find((version) => version.id ===
|
|
49
|
-
const notInstalled =
|
|
47
|
+
const { url } = await openLink(ctx, artifact, latestManifest(versions));
|
|
48
|
+
const live = versions.find((version) => version.id === artifact.active_version_id);
|
|
49
|
+
const notInstalled = artifact.state === "active" && await awaitingInstall(ctx.api, artifact.id, live?.manifest);
|
|
50
50
|
if (ctx.json) {
|
|
51
51
|
ctx.output.data({
|
|
52
|
-
|
|
52
|
+
artifact,
|
|
53
53
|
url,
|
|
54
54
|
versions,
|
|
55
55
|
build: build ?? null,
|
|
@@ -57,28 +57,28 @@ async function runWorkspaceStatus(ctx, input) {
|
|
|
57
57
|
});
|
|
58
58
|
return;
|
|
59
59
|
}
|
|
60
|
-
const label = notInstalled ? "Approved, but nothing is installed yet, so only its author can see it" : STATE_LABEL[
|
|
61
|
-
ctx.ui.success(`${
|
|
60
|
+
const label = notInstalled ? "Approved, but nothing is installed yet, so only its author can see it" : STATE_LABEL[artifact.state];
|
|
61
|
+
ctx.ui.success(`${artifact.name} (\`${artifact.slug}\`, id ${artifact.id}): ${label}`);
|
|
62
62
|
ctx.ui.info(`Open ${url}`);
|
|
63
63
|
const newest = input.all ? versions : versions.slice(0, SHOWN_VERSIONS);
|
|
64
64
|
const shown = live && !newest.includes(live) ? [...newest, live] : newest;
|
|
65
65
|
ctx.ui.list({
|
|
66
|
-
empty: "No versions yet. Run `superwall
|
|
66
|
+
empty: "No versions yet. Run `superwall artifacts push`.",
|
|
67
67
|
items: shown.map((version) => ({
|
|
68
68
|
label: `Version ${version.id}`,
|
|
69
|
-
meta: versionMeta(version,
|
|
69
|
+
meta: versionMeta(version, artifact.active_version_id, artifact.author_version_id)
|
|
70
70
|
}))
|
|
71
71
|
});
|
|
72
72
|
const hidden = versions.length - shown.length;
|
|
73
73
|
if (hidden > 0) ctx.ui.info(`And ${hidden} older ${hidden === 1 ? "version" : "versions"}. See them all with --all.`);
|
|
74
74
|
if (build?.step) ctx.ui.info(`Version ${build.version_id} is at ${build.step}.`);
|
|
75
75
|
const failed = versions.find((version) => version.build_status === "FAILED" && version.id === latest?.id);
|
|
76
|
-
if (failed) ctx.ui.warn(`Version ${failed.id} didn't build: ${failed.build_error ?? "see `superwall
|
|
76
|
+
if (failed) ctx.ui.warn(`Version ${failed.id} didn't build: ${failed.build_error ?? "see `superwall artifacts logs`."}`);
|
|
77
77
|
}
|
|
78
|
-
async function
|
|
79
|
-
const
|
|
80
|
-
const { version } = await pickVersion(ctx,
|
|
81
|
-
const build = await getBuild(ctx.api,
|
|
78
|
+
async function runArtifactLogs(ctx, input) {
|
|
79
|
+
const artifact = await resolveArtifact(ctx, input);
|
|
80
|
+
const { version } = await pickVersion(ctx, artifact, input.version);
|
|
81
|
+
const build = await getBuild(ctx.api, artifact.id, version.id);
|
|
82
82
|
if (ctx.json) {
|
|
83
83
|
ctx.output.data({
|
|
84
84
|
version_id: build.version_id,
|
|
@@ -103,10 +103,10 @@ async function runWorkspaceLogs(ctx, input) {
|
|
|
103
103
|
}
|
|
104
104
|
const NAMES_SHOWN = 5;
|
|
105
105
|
const canApprove = (member) => member.status === "active" && (member.role === "OWNER" || member.role === "ADMIN") && member.project_access_mode !== "RESTRICTED";
|
|
106
|
-
async function approvers(ctx,
|
|
107
|
-
const [members, me] = await Promise.all([listMembers(ctx.api,
|
|
106
|
+
async function approvers(ctx, artifact) {
|
|
107
|
+
const [members, me] = await Promise.all([listMembers(ctx.api, artifact.organization_id).catch(() => []), getMe(ctx.api).catch(() => void 0)]);
|
|
108
108
|
const mine = me?.email ? members.find((member) => member.email === me.email) : void 0;
|
|
109
|
-
const admin = mine ? canApprove(mine) : await roleCanApprove(ctx,
|
|
109
|
+
const admin = mine ? canApprove(mine) : await roleCanApprove(ctx, artifact);
|
|
110
110
|
const names = members.filter(canApprove).map((member) => member.name || member.email).filter((name) => Boolean(name));
|
|
111
111
|
return {
|
|
112
112
|
admin,
|
|
@@ -117,13 +117,13 @@ function askLine(names) {
|
|
|
117
117
|
if (names.length === 0) return "Ask an organization owner or admin to approve it.";
|
|
118
118
|
return `Ask one of the people who can approve it: ${names.slice(0, NAMES_SHOWN).join(", ")}${names.length > NAMES_SHOWN ? ` or ${names.length - NAMES_SHOWN} more` : ""}.`;
|
|
119
119
|
}
|
|
120
|
-
async function
|
|
121
|
-
const
|
|
122
|
-
const { version } = await pickVersion(ctx,
|
|
123
|
-
if (version.id ===
|
|
124
|
-
const requested = await requestDeploy(ctx.api,
|
|
125
|
-
const { admin, names } = await approvers(ctx,
|
|
126
|
-
const { visibleTo, sentence } = await visibilityOf(ctx,
|
|
120
|
+
async function runArtifactShare(ctx, input) {
|
|
121
|
+
const artifact = await resolveArtifact(ctx, input);
|
|
122
|
+
const { version } = await pickVersion(ctx, artifact, input.version, (candidate) => candidate.build_status === "SUCCEEDED");
|
|
123
|
+
if (version.id === artifact.active_version_id) throw new ArtifactError(`Version ${version.id} is already live. Push a new version to ask for review.`);
|
|
124
|
+
const requested = await requestDeploy(ctx.api, artifact.id, version.id);
|
|
125
|
+
const { admin, names } = await approvers(ctx, artifact);
|
|
126
|
+
const { visibleTo, sentence } = await visibilityOf(ctx, artifact.id, version.id, version.manifest);
|
|
127
127
|
if (ctx.json) {
|
|
128
128
|
ctx.output.data({
|
|
129
129
|
...requested,
|
|
@@ -135,8 +135,8 @@ async function runWorkspaceShare(ctx, input) {
|
|
|
135
135
|
}
|
|
136
136
|
ctx.ui.success(`Version ${version.id} is marked for review. ${sentence}`);
|
|
137
137
|
if (!admin) ctx.ui.info(`Nobody is told automatically. ${askLine(names)}`);
|
|
138
|
-
ctx.ui.info(`An admin approves it with \`superwall
|
|
138
|
+
ctx.ui.info(`An admin approves it with \`superwall artifacts approve ${version.id} --artifact ${artifact.id}\`.`);
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
//#endregion
|
|
142
|
-
export {
|
|
142
|
+
export { runArtifactLogs, runArtifactShare, runArtifactStatus };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { l as readJson, r as formatJson, u as state } from "./output-Ggzq5_-t.js";
|
|
2
|
-
import { n as API_HOST_OVERRIDE, t as API_HOST } from "./environment-
|
|
2
|
+
import { n as API_HOST_OVERRIDE, t as API_HOST } from "./environment-BocmdvZ-.js";
|
|
3
3
|
|
|
4
4
|
//#region src/core/account/storage.ts
|
|
5
5
|
const sessionOrgName = (session) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as formatJson } from "./output-Ggzq5_-t.js";
|
|
2
|
-
import { t as apiCall } from "./spinner-
|
|
3
|
-
import { h as listResource } from "./resources-
|
|
4
|
-
import { a as pickScope } from "./scope-
|
|
2
|
+
import { t as apiCall } from "./spinner-DPdBlZe2.js";
|
|
3
|
+
import { h as listResource } from "./resources-CptT7HD6.js";
|
|
4
|
+
import { a as pickScope } from "./scope-l1qGLsgz.js";
|
|
5
5
|
import { r as textOf } from "./input-MDd67UIp.js";
|
|
6
6
|
import { writeFileSync } from "node:fs";
|
|
7
7
|
|
|
@@ -0,0 +1,17 @@
|
|
|
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 "./config-CGcG7GOt.js";
|
|
7
|
+
import "./spinner-DPdBlZe2.js";
|
|
8
|
+
import "./ui-D_qf3Gvw.js";
|
|
9
|
+
import "./orgs-Z0H9WOs1.js";
|
|
10
|
+
import "./resources-CptT7HD6.js";
|
|
11
|
+
import "./org-Dud1rF9f.js";
|
|
12
|
+
import "./lookup-CWzVfPpq.js";
|
|
13
|
+
import "./scope-l1qGLsgz.js";
|
|
14
|
+
import "./input-MDd67UIp.js";
|
|
15
|
+
import { n as writeStoreKit, t as generateStoreKit } from "./storekit-B9M2raxe.js";
|
|
16
|
+
|
|
17
|
+
export { generateStoreKit, writeStoreKit };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as isNonInteractive, v as TELEMETRY_HOST, x as VERSION, y as TELEMETRY_KEY } from "./environment-
|
|
1
|
+
import { T as isNonInteractive, v as TELEMETRY_HOST, x as VERSION, y as TELEMETRY_KEY } from "./environment-BocmdvZ-.js";
|
|
2
2
|
import { _ as writeTelemetryNoticeShown, t as readAnonymousId, u as telemetryNoticeShown } from "./config-CGcG7GOt.js";
|
|
3
3
|
|
|
4
4
|
//#region src/core/support/telemetry.ts
|