@superwall/cli 2.5.0 → 2.5.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/README.md +7 -0
- package/dist/{apple-Dyr7OFBx.js → apple-BSKxY7Gx.js} +14 -14
- package/dist/{approve-Czs1-JO9.js → approve-DbwsYO4s.js} +15 -11
- package/dist/{assets-BrB9jQPQ.js → assets-CqpFg5mM.js} +3 -3
- package/dist/auth.d.ts +1 -1
- package/dist/auth.js +3 -3
- package/dist/{billing-D5qqIlVb.js → billing-BopwIhR3.js} +3 -3
- package/dist/{bind-B3eEcRyp.js → bind-DOF3o3FR.js} +4 -4
- package/dist/{build-DD9pSwHX.js → build-BF22vVdV.js} +11 -9
- package/dist/{client-AI9H4GGB.js → client-DHlsTaP1.js} +3 -3
- package/dist/{create-ChfgWpiM.js → create-CboPfAlN.js} +31 -31
- package/dist/{create-B4m-IKlr.js → create-CiZzZrru.js} +6 -6
- package/dist/create-DAkNdEzt.js +20 -0
- package/dist/design-lint-CvgcSzVg.js +158 -0
- package/dist/{doctor-XtXW6tKE.js → doctor-BqZGaQE5.js} +6 -6
- package/dist/{drivers-CMEL13gp.js → drivers-DkboeR1c.js} +3 -3
- package/dist/entry.js +20 -20
- package/dist/{environment-BWT2S4qC.js → environment-FR3bcq0D.js} +3 -3
- package/dist/{existing-b0GxFcnc.js → existing-C6TTT6c4.js} +2 -2
- package/dist/{git-D7AVdugb.js → git-DqDPnldI.js} +20 -11
- package/dist/{held-D3PUNky2.js → held-C2IjAyg6.js} +6 -6
- package/dist/held-KVcYIplR.js +17 -0
- package/dist/{install-CVUXsx8c.js → install-DoSYCwLL.js} +21 -15
- package/dist/{integrate-qvKd9pVW.js → integrate-BSqd2wgI.js} +23 -23
- package/dist/login-BiwaQkXS.js +17 -0
- package/dist/{login-PMoXUGqq.js → login-C6FcBQZg.js} +6 -6
- package/dist/{login-COmGHrU5.js → login-dRPPnGr7.js} +1 -1
- package/dist/{lookup-gjcKIZvh.js → lookup-D23dAOz6.js} +3 -3
- package/dist/{migrate-SkkLLdmr.js → migrate-CDdUCTH3.js} +29 -29
- package/dist/{migration-DS44-3Zr.js → migration-r9plM7F6.js} +29 -11
- package/dist/{notification-url-BjQPLf4-.js → notification-url-rdnENCxt.js} +2 -2
- package/dist/{open-DQpm2yVs.js → open-DVdE3HnK.js} +2 -2
- package/dist/{org-C04eAO-j.js → org-DZ41muzA.js} +3 -3
- package/dist/{organization-BOECL3vZ.js → organization-DIODPOwO.js} +4 -4
- package/dist/{orgs-D6Kk96mG.js → orgs-BxlwcvTu.js} +1 -1
- package/dist/{paths-REb-GrbX.js → paths-BaeoxDze.js} +1 -1
- package/dist/{playbook-Du4Oydbf.js → playbook-B-Pdonhg.js} +10 -10
- package/dist/{promote-Dm2_b1WK.js → promote-Ca4URuHY.js} +23 -22
- package/dist/{pull-F6pvO4To.js → pull-CQcTZxW8.js} +8 -8
- package/dist/pull-DRMIxqR8.js +36 -0
- package/dist/{pull-zYAbqo9n.js → pull-_qs90vGA.js} +33 -33
- package/dist/{push-BIFLhAiO.js → push-BlZoIwIj.js} +122 -22
- package/dist/push-Cb4g_l1K.js +30 -0
- package/dist/{push-D_l9KJZN.js → push-DQE48h_M.js} +9 -9
- package/dist/push-DZKsd6Dp.js +22 -0
- package/dist/{registry-DIJB0mJa.js → registry-FNG-uiIt.js} +74 -53
- package/dist/{resolve--GsHj0Q1.js → resolve-DGePiHgL.js} +40 -15
- package/dist/{resources-BaP3p_LY.js → resources-COOEvqqW.js} +2 -2
- package/dist/{run-CgLmD2vR.js → run-Czbb-sHR.js} +43 -20
- package/dist/{run-C5OPwhvS.js → run-DpYDOAw-.js} +2 -2
- package/dist/scan-2WqHGkjU.js +4 -0
- package/dist/{scan-Bj5y0zTZ.js → scan-BZS2FZeU.js} +1 -1
- package/dist/{scope-Bp_zwJOo.js → scope-BJQ-KcQg.js} +5 -5
- package/dist/{scope-CCb_7UvN.js → scope-t_SqFN6W.js} +18 -4
- package/dist/{sdk-TvT0p_nO.js → sdk-CyttTnGf.js} +2 -2
- package/dist/{selection-BltBpyp5.js → selection-CWfI4a0O.js} +1 -1
- package/dist/{series-TAixFBWW.js → series--Wp7TngJ.js} +2 -2
- package/dist/{server-CdVIboQn.js → server-BmmOj7bh.js} +9 -9
- package/dist/server-BqLPwcy9.js +29 -0
- package/dist/session-BHBIGscL.js +6 -0
- package/dist/{session-Ywim-P8M.js → session-BpYpOgaY.js} +1 -1
- package/dist/{session-D3fgXQBt.js → session-DYdxTNZf.js} +7 -7
- package/dist/{setup-zzjtTy8k.js → setup-DW50luOZ.js} +9 -9
- package/dist/skills/superwall-workspaces/SKILL.md +3 -2
- package/dist/skills/superwall-workspaces/references/cli.md +1 -1
- package/dist/{skills-8um2fBPS.js → skills-Bbtq8V_D.js} +8 -8
- package/dist/{skills-2qYaUXGE.js → skills-Cm1j2d1W.js} +4 -4
- package/dist/{source-push-kAep4gPe.js → source-push-B3c-VLfe.js} +43 -26
- package/dist/{spinner-BANVLncC.js → spinner-025_eqCX.js} +3 -3
- package/dist/{starter-CiLrp1cN.js → starter-hcwocv_Z.js} +3 -3
- package/dist/{status-CoYMK7QL.js → status-K1IGp6pe.js} +17 -14
- package/dist/{storage-DzP22xKn.js → storage-CUMgpcVH.js} +1 -1
- package/dist/{storekit-n1x0bWkQ.js → storekit-Cb0TkToV.js} +3 -3
- package/dist/storekit-Dewj_5qg.js +17 -0
- package/dist/{telemetry-CXN6f-ZX.js → telemetry-ekUQuhLJ.js} +1 -1
- package/dist/{token-FmeHywYt.js → token-B2PduqrR.js} +1 -1
- package/dist/tools.d.ts +1 -1
- package/dist/tools.js +29 -9
- package/dist/{try-BWbzgelb.js → try-BUnhITXS.js} +16 -16
- package/dist/{upgrade-Bk5boOgW.js → upgrade-CI7K1UZ-.js} +2 -2
- package/dist/{upgrade-CoWCEnoi.js → upgrade-DfZfDljd.js} +2 -2
- package/package.json +2 -2
- package/dist/create-CJljlkJK.js +0 -20
- package/dist/held-CX7Zf8u-.js +0 -17
- package/dist/login-ClnJi1Ea.js +0 -17
- package/dist/pull-DsdOoG-D.js +0 -36
- package/dist/push-CJVfvFZq.js +0 -29
- package/dist/push-SVzv7fzE.js +0 -22
- package/dist/scan-v_WTE722.js +0 -4
- package/dist/server-CvJVusw3.js +0 -29
- package/dist/session-B8JNXkwN.js +0 -6
- package/dist/storekit-D5eopLM0.js +0 -17
- /package/dist/{download-2Zu2I_Og.js → download-F8OtTJze.js} +0 -0
- /package/dist/{project-CP6hiHra.js → project-DHU5wc3R.js} +0 -0
- /package/dist/{reports-CuhB1_ub.js → reports-BZfxvenS.js} +0 -0
- /package/dist/{storage-BjQCiTuz.d.ts → storage-Bdz5AmqS.d.ts} +0 -0
- /package/dist/{types-JdxmnCko.js → types-CB6O_wjy.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as NewerLockError, l as originKey, o as formatLock, t as TYPES_FILE, u as parseLock } from "./types-
|
|
1
|
+
import { i as NewerLockError, l as originKey, o as formatLock, t as TYPES_FILE, u as parseLock } from "./types-CB6O_wjy.js";
|
|
2
2
|
|
|
3
3
|
//#region src/core/paywalls/source/scope.ts
|
|
4
4
|
const LOCK_FILE = "superwall.lock";
|
|
@@ -24,13 +24,15 @@ function classifyPath(relative, scope) {
|
|
|
24
24
|
if (scope.kind === "workspace") return "own";
|
|
25
25
|
const surface = surfaceOf(relative);
|
|
26
26
|
if (!surface) return "shared";
|
|
27
|
+
if (scope.kind === "project") return "other";
|
|
27
28
|
return surface.kind === scope.kind && surface.id === scope.id ? "own" : "other";
|
|
28
29
|
}
|
|
29
30
|
const isSurfaceRoot = (top, scope) => scope?.kind !== "workspace" && SURFACE_DIRS[top] !== void 0;
|
|
30
31
|
const isOtherSurfaceDir = (top, child, scope) => {
|
|
31
32
|
if (scope.kind === "workspace") return false;
|
|
32
33
|
const kind = SURFACE_DIRS[top];
|
|
33
|
-
|
|
34
|
+
if (kind === void 0) return false;
|
|
35
|
+
return scope.kind === "project" || !(kind === scope.kind && child === scope.id);
|
|
34
36
|
};
|
|
35
37
|
var SourceLockUnreadableError = class extends Error {
|
|
36
38
|
constructor(reason) {
|
|
@@ -48,11 +50,11 @@ const readable = (text) => {
|
|
|
48
50
|
function mergeLockText(theirs, mine, scope, options = {}) {
|
|
49
51
|
const own = readable(mine);
|
|
50
52
|
if (!("lock" in own)) return mine;
|
|
51
|
-
if (theirs === void 0) return formatLock(
|
|
53
|
+
if (theirs === void 0) return formatLock(scoped(own.lock, scope));
|
|
52
54
|
const read = readable(theirs);
|
|
53
55
|
if (!("lock" in read)) {
|
|
54
56
|
if (!options.replaceUnreadable) throw new SourceLockUnreadableError(read.reason);
|
|
55
|
-
return formatLock(
|
|
57
|
+
return formatLock(scoped(own.lock, scope));
|
|
56
58
|
}
|
|
57
59
|
return mergeLocks(read.lock, own.lock, scope);
|
|
58
60
|
}
|
|
@@ -69,6 +71,10 @@ function mergeLocks(other, own, scope) {
|
|
|
69
71
|
paywalls: { ...other.paywalls },
|
|
70
72
|
funnels: { ...other.funnels }
|
|
71
73
|
};
|
|
74
|
+
if (scope.kind === "project") {
|
|
75
|
+
if (other.origins) merged.origins = other.origins;
|
|
76
|
+
return formatLock(merged);
|
|
77
|
+
}
|
|
72
78
|
const target = section(merged);
|
|
73
79
|
const theirEntry = section(other)[scope.id] ?? {};
|
|
74
80
|
const mineEntry = section(own)[scope.id] ?? {};
|
|
@@ -84,6 +90,14 @@ function mergeLocks(other, own, scope) {
|
|
|
84
90
|
return formatLock(merged);
|
|
85
91
|
}
|
|
86
92
|
const withoutSources = ({ sources: _,...lock }) => lock;
|
|
93
|
+
const scoped = (lock, scope) => {
|
|
94
|
+
const { origins: _,...rest } = withoutSources(lock);
|
|
95
|
+
return scope.kind === "project" ? {
|
|
96
|
+
...rest,
|
|
97
|
+
paywalls: {},
|
|
98
|
+
funnels: {}
|
|
99
|
+
} : withoutSources(lock);
|
|
100
|
+
};
|
|
87
101
|
|
|
88
102
|
//#endregion
|
|
89
103
|
export { classifyPath as a, isSurfaceRoot as c, WORKSPACE_FILE as i, mergeLockText as l, LOCK_FILE as n, derivedFilesOf as o, WORKSPACE_DERIVED_FILES as r, isOtherSurfaceDir as s, DERIVED_FILES as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as PUBLIC_REPO, t as PUBLIC_REF } from "./download-
|
|
2
|
-
import { n as VENDORED_SDK } from "./project-
|
|
1
|
+
import { n as PUBLIC_REPO, t as PUBLIC_REF } from "./download-F8OtTJze.js";
|
|
2
|
+
import { n as VENDORED_SDK } from "./project-DHU5wc3R.js";
|
|
3
3
|
import * as fs from "node:fs";
|
|
4
4
|
import * as path from "node:path";
|
|
5
5
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as billingPlanOf } from "./resources-
|
|
1
|
+
import { n as billingPlanOf } from "./resources-COOEvqqW.js";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import { globSync, readFileSync, statSync } from "node:fs";
|
|
4
4
|
import { join, resolve } from "node:path";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as bundleDir, o as readManifest, r as WorkspaceError, t as MANIFEST_FILE } from "./project-
|
|
1
|
+
import { i as bundleDir, o as readManifest, r as WorkspaceError, t as MANIFEST_FILE } from "./project-DHU5wc3R.js";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import { execFile } from "node:child_process";
|
|
4
4
|
import * as fs from "node:fs";
|
|
@@ -15,7 +15,7 @@ const WORKSPACE_HEADER_PREFIX = "x-superwall-workspace-";
|
|
|
15
15
|
const API_HOST = "api.workspace.internal";
|
|
16
16
|
const PLATFORM_HOST = "platform.workspace.internal";
|
|
17
17
|
const BRIDGE_PROTOCOL = "superwall-workspace@1";
|
|
18
|
-
const MOUNT_LOAD_TIMEOUT_MS =
|
|
18
|
+
const MOUNT_LOAD_TIMEOUT_MS = 2e4;
|
|
19
19
|
const WORKSPACE_COMPATIBILITY_DATE = "2026-09-01";
|
|
20
20
|
const METRIC_LIMITS = {
|
|
21
21
|
maxPoints: 5e3,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { x as VERSION } from "./environment-
|
|
2
|
-
import { t as ApiError } from "./client-
|
|
1
|
+
import { x as VERSION } from "./environment-FR3bcq0D.js";
|
|
2
|
+
import { t as ApiError } from "./client-DHlsTaP1.js";
|
|
3
3
|
import { n as ui } from "./ui-D_qf3Gvw.js";
|
|
4
|
-
import { C as pushPaywallVersion, D as versionProducts, p as listApplications, x as promotePaywallVersion } from "./resources-
|
|
4
|
+
import { C as pushPaywallVersion, D as versionProducts, p as listApplications, x as promotePaywallVersion } from "./resources-COOEvqqW.js";
|
|
5
5
|
import { n as openBrowser } from "./browser-Bp3yRKlU.js";
|
|
6
|
-
import { n as requireAssets, r as syncAssets, t as assetBaseUrl } from "./assets-
|
|
7
|
-
import { i as requireProject, o as resolveProjectDirs, u as LAYOUT_HINT, v as frameworkVersion, y as resolveFramework } from "./selection-
|
|
8
|
-
import { f as readLock, n as collectProjectDeclarations, r as writeProjectTypes } from "./types-
|
|
9
|
-
import { c as planTargets,
|
|
10
|
-
import {
|
|
11
|
-
import { a as collectSourceFiles } from "./git-
|
|
6
|
+
import { n as requireAssets, r as syncAssets, t as assetBaseUrl } from "./assets-CqpFg5mM.js";
|
|
7
|
+
import { i as requireProject, o as resolveProjectDirs, u as LAYOUT_HINT, v as frameworkVersion, y as resolveFramework } from "./selection-CWfI4a0O.js";
|
|
8
|
+
import { f as readLock, n as collectProjectDeclarations, r as writeProjectTypes } from "./types-CB6O_wjy.js";
|
|
9
|
+
import { c as planTargets, d as wantedPlatforms, h as resolveApps, n as requireApi, o as writeProjectScaffold } from "./session-DYdxTNZf.js";
|
|
10
|
+
import { a as listApplicationCatalogue, c as projectForApplication, i as warnNotPortable, r as pushSource, s as listProjectProducts, u as resolveBinding } from "./source-push-B3c-VLfe.js";
|
|
11
|
+
import { a as collectSourceFiles } from "./git-DqDPnldI.js";
|
|
12
12
|
import { execFile } from "node:child_process";
|
|
13
13
|
import * as fs from "node:fs";
|
|
14
14
|
import * as path from "node:path";
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import "./token-B2PduqrR.js";
|
|
2
|
+
import "./output-Ggzq5_-t.js";
|
|
3
|
+
import "./environment-FR3bcq0D.js";
|
|
4
|
+
import "./storage-CUMgpcVH.js";
|
|
5
|
+
import "./client-DHlsTaP1.js";
|
|
6
|
+
import "./config-CGcG7GOt.js";
|
|
7
|
+
import "./telemetry-ekUQuhLJ.js";
|
|
8
|
+
import "./spawn-DmmmHIP-.js";
|
|
9
|
+
import "./spinner-025_eqCX.js";
|
|
10
|
+
import "./ui-D_qf3Gvw.js";
|
|
11
|
+
import "./scan-BZS2FZeU.js";
|
|
12
|
+
import "./paths-BaeoxDze.js";
|
|
13
|
+
import "./orgs-BxlwcvTu.js";
|
|
14
|
+
import "./resources-COOEvqqW.js";
|
|
15
|
+
import "./lookup-D23dAOz6.js";
|
|
16
|
+
import "./login-C6FcBQZg.js";
|
|
17
|
+
import "./skills-Cm1j2d1W.js";
|
|
18
|
+
import "./browser-Bp3yRKlU.js";
|
|
19
|
+
import "./assets-CqpFg5mM.js";
|
|
20
|
+
import "./selection-CWfI4a0O.js";
|
|
21
|
+
import "./types-CB6O_wjy.js";
|
|
22
|
+
import "./session-DYdxTNZf.js";
|
|
23
|
+
import "./source-push-B3c-VLfe.js";
|
|
24
|
+
import "./git-DqDPnldI.js";
|
|
25
|
+
import "./scope-t_SqFN6W.js";
|
|
26
|
+
import "./login-dRPPnGr7.js";
|
|
27
|
+
import { t as runStudio } from "./server-BmmOj7bh.js";
|
|
28
|
+
|
|
29
|
+
export { runStudio };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as resolveApiHost, i as removeSession, n as readSession, o as serializeSession, s as sessionOrgName } from "./storage-
|
|
1
|
+
import { a as resolveApiHost, i as removeSession, n as readSession, o as serializeSession, s as sessionOrgName } from "./storage-CUMgpcVH.js";
|
|
2
2
|
|
|
3
3
|
//#region src/core/account/session.ts
|
|
4
4
|
function runWhoami(ctx) {
|
|
@@ -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-FR3bcq0D.js";
|
|
2
|
+
import { n as readSession } from "./storage-CUMgpcVH.js";
|
|
3
|
+
import { r as createSuperwallApi } from "./client-DHlsTaP1.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 { b as writeSources, d as parseSources, f as readLock, m as writeApp } from "./types-
|
|
7
|
-
import { n as performLoginWithUi } from "./login-
|
|
5
|
+
import { k as isRecord, p as listApplications, y as platformLabel } from "./resources-COOEvqqW.js";
|
|
6
|
+
import { b as writeSources, d as parseSources, f as readLock, m as writeApp } from "./types-CB6O_wjy.js";
|
|
7
|
+
import { n as performLoginWithUi } from "./login-dRPPnGr7.js";
|
|
8
8
|
import * as fs from "node:fs";
|
|
9
9
|
import * as path from "node:path";
|
|
10
10
|
|
|
@@ -216,4 +216,4 @@ async function requireApi(interactive, login = performLoginWithUi) {
|
|
|
216
216
|
}
|
|
217
217
|
|
|
218
218
|
//#endregion
|
|
219
|
-
export { projectPackageName as a, planTargets as c,
|
|
219
|
+
export { projectPackageName as a, planTargets as c, wantedPlatforms as d, PLATFORMS as f, resolveApps as h, writeSourceBase as i, surfaceKey as l, requirePlatform as m, requireApi as n, writeProjectScaffold as o, platformFor as p, readSourceBase as r, parsePlatformFlags as s, LoginRequiredError as t, targetLabel as u };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { i as readPackageJson, r as allDeps, t as scanProject } from "./scan-
|
|
2
|
-
import { t as detectExisting } from "./existing-
|
|
3
|
-
import { m as listProjects, p as listApplications, r as createApplication, y as platformLabel } from "./resources-
|
|
4
|
-
import { n as findApplication } from "./lookup-
|
|
5
|
-
import { r as resolveScopeFromKey } from "./bind-
|
|
6
|
-
import { m as writeApp } from "./types-
|
|
7
|
-
import { a as projectPackageName,
|
|
8
|
-
import { t as gitAvailable } from "./git-
|
|
9
|
-
import { r as isSuperwallProject } from "./migration-
|
|
1
|
+
import { i as readPackageJson, r as allDeps, t as scanProject } from "./scan-BZS2FZeU.js";
|
|
2
|
+
import { t as detectExisting } from "./existing-C6TTT6c4.js";
|
|
3
|
+
import { m as listProjects, p as listApplications, r as createApplication, y as platformLabel } from "./resources-COOEvqqW.js";
|
|
4
|
+
import { n as findApplication } from "./lookup-D23dAOz6.js";
|
|
5
|
+
import { r as resolveScopeFromKey } from "./bind-DOF3o3FR.js";
|
|
6
|
+
import { m as writeApp } from "./types-CB6O_wjy.js";
|
|
7
|
+
import { a as projectPackageName, m as requirePlatform, n as requireApi } from "./session-DYdxTNZf.js";
|
|
8
|
+
import { t as gitAvailable } from "./git-DqDPnldI.js";
|
|
9
|
+
import { r as isSuperwallProject } from "./migration-r9plM7F6.js";
|
|
10
10
|
import { execFile } from "node:child_process";
|
|
11
11
|
import * as fs from "node:fs";
|
|
12
12
|
import * as path from "node:path";
|
|
@@ -34,7 +34,8 @@ superwall workspaces push --org <org> # build it; only you see it until an
|
|
|
34
34
|
3. Nothing is saved by either. **`push`** is what saves it: it sends the source over git, and the builder
|
|
35
35
|
makes a version from the commit. `push` waits for the build and shows the builder's message if it fails.
|
|
36
36
|
4. **Only the author can see a pushed version until an admin approves it.** Say so. A staff account gets no copy, so
|
|
37
|
-
nobody can see what it pushes until then, and `push` and `share` say which.
|
|
37
|
+
nobody can see what it pushes until then, and `push` and `share` say which. After approval, the author keeps a
|
|
38
|
+
copy marked "Not installed" until an entrypoint has an install. `share` asks for review,
|
|
38
39
|
an admin runs `approve`, and `install` chooses where it shows. `org.page@1` needs no install.
|
|
39
40
|
5. **A pusher's own copy can include teammates' merged code, and it runs with the pusher's reads.** `push` lists
|
|
40
41
|
those commits and asks first. Without a terminal it stops unless `--accept-merged-commits` is passed. That flag
|
|
@@ -261,7 +262,7 @@ A page with no npm packages can skip all of this: answer HTML from `fetch` and l
|
|
|
261
262
|
{ "id": "home", "slot": "org.page@1", "title": "Projects", "path": "/" }
|
|
262
263
|
```
|
|
263
264
|
|
|
264
|
-
With scopes `["projects:read"]`, and connect within
|
|
265
|
+
With scopes `["projects:read"]`, and connect within 20 seconds of the page being visible or the dashboard shows the load error. The
|
|
265
266
|
context comes from the platform, already authorized for the viewer. Never trust a user's id from the URL
|
|
266
267
|
over it. If you write HTML yourself, escape everything that came from the API or an end user.
|
|
267
268
|
|
|
@@ -85,7 +85,7 @@ both. If yours is newer than the latest published one, it says so and leaves it
|
|
|
85
85
|
|
|
86
86
|
`--org` (on the first push), `-m <note>`, `--overwrite-source`, `--accept-merged-commits`, `--json`. The first push creates the workspace from
|
|
87
87
|
the manifest's name, or reuses the one with that slug. It waits for the build, up to 20 minutes, and a build that
|
|
88
|
-
fails or outlasts that exits 1. `--json` gives `version_id`, `status`, `failure`, `steps` and `url` either way, and `visible_to` (`you`, `its_author`, `nobody` or `everyone`) when it builds. The link it prints opens the
|
|
88
|
+
fails or outlasts that exits 1. `--json` gives `version_id`, `status`, `failure`, `steps` and `url` either way, and `visible_to` (`you`, `its_author`, `nobody` or `everyone`) when it builds. The link it prints is where the workspace opens, in the org's first app when it needs one: its own page for an `org.page@1`, the app's page for an `app.page@1`, Embeds for widgets, tabs, panels and actions, and Charts for metrics. `open <entrypoint> --app <id>` opens one in another app.
|
|
89
89
|
|
|
90
90
|
If a teammate changed the same files, it stops and says to run `pull`. `--overwrite-source` replaces the whole
|
|
91
91
|
source repo with this project, so use it only when you mean to discard what's there.
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import "./token-
|
|
1
|
+
import "./token-B2PduqrR.js";
|
|
2
2
|
import "./output-Ggzq5_-t.js";
|
|
3
|
-
import "./environment-
|
|
4
|
-
import "./storage-
|
|
5
|
-
import "./client-
|
|
3
|
+
import "./environment-FR3bcq0D.js";
|
|
4
|
+
import "./storage-CUMgpcVH.js";
|
|
5
|
+
import "./client-DHlsTaP1.js";
|
|
6
6
|
import "./config-CGcG7GOt.js";
|
|
7
|
-
import "./telemetry-
|
|
7
|
+
import "./telemetry-ekUQuhLJ.js";
|
|
8
8
|
import "./spawn-DmmmHIP-.js";
|
|
9
|
-
import "./spinner-
|
|
9
|
+
import "./spinner-025_eqCX.js";
|
|
10
10
|
import "./ui-D_qf3Gvw.js";
|
|
11
|
-
import "./paths-
|
|
12
|
-
import { a as bundledSkills, c as knownSkills, d as readBundledSkill, f as runSkills, h as updateSkills, i as SUPERWALL_SKILLS_SOURCE, l as normalizeSkillFrontmatter, m as skillsRefFor, n as SKILLS_INSTALL_SOURCE, o as checkSkillsSync, p as skillSummary, r as SKILLS_REF, s as ensureSkillsCurrent, t as PLAYBOOKS, u as normalizeSkillsDir } from "./skills-
|
|
11
|
+
import "./paths-BaeoxDze.js";
|
|
12
|
+
import { a as bundledSkills, c as knownSkills, d as readBundledSkill, f as runSkills, h as updateSkills, i as SUPERWALL_SKILLS_SOURCE, l as normalizeSkillFrontmatter, m as skillsRefFor, n as SKILLS_INSTALL_SOURCE, o as checkSkillsSync, p as skillSummary, r as SKILLS_REF, s as ensureSkillsCurrent, t as PLAYBOOKS, u as normalizeSkillsDir } from "./skills-Cm1j2d1W.js";
|
|
13
13
|
|
|
14
14
|
export { PLAYBOOKS, SKILLS_INSTALL_SOURCE, SKILLS_REF, SUPERWALL_SKILLS_SOURCE, bundledSkills, checkSkillsSync, ensureSkillsCurrent, knownSkills, normalizeSkillFrontmatter, normalizeSkillsDir, readBundledSkill, runSkills, skillSummary, skillsRefFor, updateSkills };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { c as CHANNELS, s as CHANNEL, x as VERSION } from "./environment-
|
|
1
|
+
import { c as CHANNELS, s as CHANNEL, x as VERSION } from "./environment-FR3bcq0D.js";
|
|
2
2
|
import { c as readSkillsSync, g as writeSkillsSync } from "./config-CGcG7GOt.js";
|
|
3
|
-
import { r as track } from "./telemetry-
|
|
3
|
+
import { r as track } from "./telemetry-ekUQuhLJ.js";
|
|
4
4
|
import { r as spawnStream } from "./spawn-DmmmHIP-.js";
|
|
5
|
-
import { n as withSpinner } from "./spinner-
|
|
5
|
+
import { n as withSpinner } from "./spinner-025_eqCX.js";
|
|
6
6
|
import { n as ui } from "./ui-D_qf3Gvw.js";
|
|
7
|
-
import { i as packagedDir, t as AGENT_SKILLS_DIR } from "./paths-
|
|
7
|
+
import { i as packagedDir, t as AGENT_SKILLS_DIR } from "./paths-BaeoxDze.js";
|
|
8
8
|
import { existsSync, mkdtempSync, readFileSync, readdirSync, rmSync, writeFileSync } from "node:fs";
|
|
9
9
|
import { tmpdir } from "node:os";
|
|
10
10
|
import { join } from "node:path";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { n as ApiUnreachableError, t as ApiError } from "./client-
|
|
1
|
+
import { n as ApiUnreachableError, t as ApiError } from "./client-DHlsTaP1.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 readLock, h as writeBinding } from "./types-
|
|
6
|
-
import { i as writeSourceBase, r as readSourceBase } from "./session-
|
|
7
|
-
import { r as pushSourceTree, t as gitAvailable } from "./git-
|
|
3
|
+
import { d as linkSourceCommit, f as listAppPaywalls, o as createHeadlessPaywall, v as mintSourceAccess } from "./resources-COOEvqqW.js";
|
|
4
|
+
import { n as findApplication } from "./lookup-D23dAOz6.js";
|
|
5
|
+
import { f as readLock, h as writeBinding } from "./types-CB6O_wjy.js";
|
|
6
|
+
import { i as writeSourceBase, r as readSourceBase } from "./session-DYdxTNZf.js";
|
|
7
|
+
import { r as pushSourceTree, t as gitAvailable } from "./git-DqDPnldI.js";
|
|
8
8
|
import { setTimeout } from "node:timers/promises";
|
|
9
9
|
import { productVariables } from "@superwall/studio/products";
|
|
10
10
|
|
|
@@ -155,28 +155,35 @@ var GitRequiredError = class extends Error {
|
|
|
155
155
|
async function assertGit(hasGit = gitAvailable) {
|
|
156
156
|
if (!await hasGit()) throw new GitRequiredError();
|
|
157
157
|
}
|
|
158
|
+
async function syncSource(input, message) {
|
|
159
|
+
const access = await mintSourceAccess(input.api, input.paywallId);
|
|
160
|
+
const pushed = await pushSourceTree({
|
|
161
|
+
access,
|
|
162
|
+
base: readSourceBase(input.superwallDir, access.repo),
|
|
163
|
+
overwrite: input.overwrite,
|
|
164
|
+
files: input.files,
|
|
165
|
+
message
|
|
166
|
+
});
|
|
167
|
+
if (pushed.syncedTo) writeSourceBase(input.superwallDir, access.repo, pushed.syncedTo);
|
|
168
|
+
return {
|
|
169
|
+
access,
|
|
170
|
+
pushed
|
|
171
|
+
};
|
|
172
|
+
}
|
|
158
173
|
async function pushSource(input) {
|
|
159
174
|
for (let attempt = 0;; attempt++) {
|
|
160
|
-
const access = await
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
applicationId: input.applicationId,
|
|
172
|
-
snapshotSha: input.snapshotId,
|
|
173
|
-
framework: input.framework,
|
|
174
|
-
cli: input.cli,
|
|
175
|
-
note: input.note,
|
|
176
|
-
external: input.external
|
|
177
|
-
}
|
|
175
|
+
const { access, pushed } = await syncSource(input, {
|
|
176
|
+
kind: input.kind,
|
|
177
|
+
surface: input.surface,
|
|
178
|
+
version: input.version,
|
|
179
|
+
paywallId: input.paywallId,
|
|
180
|
+
applicationId: input.applicationId,
|
|
181
|
+
snapshotSha: input.snapshotId,
|
|
182
|
+
framework: input.framework,
|
|
183
|
+
cli: input.cli,
|
|
184
|
+
note: input.note,
|
|
185
|
+
external: input.external
|
|
178
186
|
});
|
|
179
|
-
if (pushed.syncedTo) writeSourceBase(input.superwallDir, access.repo, pushed.syncedTo);
|
|
180
187
|
try {
|
|
181
188
|
await linkCommit(input, access, pushed.commitSha);
|
|
182
189
|
return pushed;
|
|
@@ -186,6 +193,16 @@ async function pushSource(input) {
|
|
|
186
193
|
}
|
|
187
194
|
}
|
|
188
195
|
}
|
|
196
|
+
async function pushProjectSource(input) {
|
|
197
|
+
const { pushed } = await syncSource(input, {
|
|
198
|
+
kind: "project",
|
|
199
|
+
applicationId: input.applicationId,
|
|
200
|
+
framework: input.framework,
|
|
201
|
+
cli: input.cli,
|
|
202
|
+
note: input.note
|
|
203
|
+
});
|
|
204
|
+
return pushed;
|
|
205
|
+
}
|
|
189
206
|
const LINK_ATTEMPTS = 2;
|
|
190
207
|
const LINK_RETRY_DELAY_MS = 300;
|
|
191
208
|
async function linkCommit(input, access, commitSha) {
|
|
@@ -203,4 +220,4 @@ async function linkCommit(input, access, commitSha) {
|
|
|
203
220
|
const isTransient = (error) => error instanceof ApiUnreachableError || error instanceof ApiError && error.status >= 500;
|
|
204
221
|
|
|
205
222
|
//#endregion
|
|
206
|
-
export {
|
|
223
|
+
export { listApplicationCatalogue as a, projectForApplication as c, warnNotPortable as i, requireProducts as l, pushProjectSource as n, listProjectCatalogue as o, pushSource as r, listProjectProducts as s, assertGit as t, resolveBinding as u };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as NotLoggedInError } from "./token-
|
|
1
|
+
import { r as NotLoggedInError } from "./token-B2PduqrR.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-FR3bcq0D.js";
|
|
4
|
+
import { t as ApiError } from "./client-DHlsTaP1.js";
|
|
5
5
|
import { n as ui, r as useRenderer } from "./ui-D_qf3Gvw.js";
|
|
6
6
|
import pc from "picocolors";
|
|
7
7
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as downloadRepoDir, n as PUBLIC_REPO, r as RepoDownloadError } from "./download-
|
|
2
|
-
import { n as VENDORED_SDK, o as readManifest, r as WorkspaceError, t as MANIFEST_FILE } from "./project-
|
|
3
|
-
import { n as compareVersions, r as vendoredVersion, t as STARTER_DIR } from "./sdk-
|
|
1
|
+
import { i as downloadRepoDir, n as PUBLIC_REPO, r as RepoDownloadError } from "./download-F8OtTJze.js";
|
|
2
|
+
import { n as VENDORED_SDK, o as readManifest, r as WorkspaceError, t as MANIFEST_FILE } from "./project-DHU5wc3R.js";
|
|
3
|
+
import { n as compareVersions, r as vendoredVersion, t as STARTER_DIR } from "./sdk-CyttTnGf.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";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import "./token-
|
|
1
|
+
import "./token-B2PduqrR.js";
|
|
2
2
|
import "./output-Ggzq5_-t.js";
|
|
3
|
-
import "./environment-
|
|
4
|
-
import "./storage-
|
|
5
|
-
import { t as ApiError } from "./client-
|
|
3
|
+
import "./environment-FR3bcq0D.js";
|
|
4
|
+
import "./storage-CUMgpcVH.js";
|
|
5
|
+
import { t as ApiError } from "./client-DHlsTaP1.js";
|
|
6
6
|
import "./config-CGcG7GOt.js";
|
|
7
|
-
import "./orgs-
|
|
8
|
-
import "./types-
|
|
9
|
-
import "./scope-
|
|
10
|
-
import {
|
|
11
|
-
import { r as WorkspaceError } from "./project-
|
|
7
|
+
import "./orgs-BxlwcvTu.js";
|
|
8
|
+
import "./types-CB6O_wjy.js";
|
|
9
|
+
import "./scope-t_SqFN6W.js";
|
|
10
|
+
import { S as listVersions, T as requestDeploy, a as newestFirst, d as visibilityOf, i as latestManifest, l as resolveWorkspace, n as awaitingInstall, o as openLink, s as pickVersion, u as roleCanApprove, v as getBuild, x as listMembers, y as getMe } from "./resolve-DGePiHgL.js";
|
|
11
|
+
import { r as WorkspaceError } from "./project-DHU5wc3R.js";
|
|
12
12
|
|
|
13
13
|
//#region src/core/workspaces/status.ts
|
|
14
14
|
const SHOWN_VERSIONS = 3;
|
|
@@ -45,20 +45,23 @@ async function runWorkspaceStatus(ctx, input) {
|
|
|
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
47
|
const { url } = await openLink(ctx, workspace, latestManifest(versions));
|
|
48
|
+
const live = versions.find((version) => version.id === workspace.active_version_id);
|
|
49
|
+
const notInstalled = workspace.state === "active" && await awaitingInstall(ctx.api, workspace.id, live?.manifest);
|
|
48
50
|
if (ctx.json) {
|
|
49
51
|
ctx.output.data({
|
|
50
52
|
workspace,
|
|
51
53
|
url,
|
|
52
54
|
versions,
|
|
53
|
-
build: build ?? null
|
|
55
|
+
build: build ?? null,
|
|
56
|
+
awaiting_install: notInstalled
|
|
54
57
|
});
|
|
55
58
|
return;
|
|
56
59
|
}
|
|
57
|
-
|
|
60
|
+
const label = notInstalled ? "Approved, but nothing is installed yet, so only its author can see it" : STATE_LABEL[workspace.state];
|
|
61
|
+
ctx.ui.success(`${workspace.name} (\`${workspace.slug}\`, id ${workspace.id}): ${label}`);
|
|
58
62
|
ctx.ui.info(`Open ${url}`);
|
|
59
63
|
const newest = input.all ? versions : versions.slice(0, SHOWN_VERSIONS);
|
|
60
|
-
const
|
|
61
|
-
const shown = active && !newest.includes(active) ? [...newest, active] : newest;
|
|
64
|
+
const shown = live && !newest.includes(live) ? [...newest, live] : newest;
|
|
62
65
|
ctx.ui.list({
|
|
63
66
|
empty: "No versions yet. Run `superwall workspaces push`.",
|
|
64
67
|
items: shown.map((version) => ({
|
|
@@ -120,7 +123,7 @@ async function runWorkspaceShare(ctx, input) {
|
|
|
120
123
|
if (version.id === workspace.active_version_id) throw new WorkspaceError(`Version ${version.id} is already live. Push a new version to ask for review.`);
|
|
121
124
|
const requested = await requestDeploy(ctx.api, workspace.id, version.id);
|
|
122
125
|
const { admin, names } = await approvers(ctx, workspace);
|
|
123
|
-
const { visibleTo, sentence } = await visibilityOf(ctx, workspace.id, version.id);
|
|
126
|
+
const { visibleTo, sentence } = await visibilityOf(ctx, workspace.id, version.id, version.manifest);
|
|
124
127
|
if (ctx.json) {
|
|
125
128
|
ctx.output.data({
|
|
126
129
|
...requested,
|
|
@@ -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-FR3bcq0D.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-025_eqCX.js";
|
|
3
|
+
import { h as listResource } from "./resources-COOEvqqW.js";
|
|
4
|
+
import { a as pickScope } from "./scope-BJQ-KcQg.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-B2PduqrR.js";
|
|
2
|
+
import "./output-Ggzq5_-t.js";
|
|
3
|
+
import "./environment-FR3bcq0D.js";
|
|
4
|
+
import "./storage-CUMgpcVH.js";
|
|
5
|
+
import "./client-DHlsTaP1.js";
|
|
6
|
+
import "./config-CGcG7GOt.js";
|
|
7
|
+
import "./spinner-025_eqCX.js";
|
|
8
|
+
import "./ui-D_qf3Gvw.js";
|
|
9
|
+
import "./orgs-BxlwcvTu.js";
|
|
10
|
+
import "./resources-COOEvqqW.js";
|
|
11
|
+
import "./org-DZ41muzA.js";
|
|
12
|
+
import "./lookup-D23dAOz6.js";
|
|
13
|
+
import "./scope-BJQ-KcQg.js";
|
|
14
|
+
import "./input-MDd67UIp.js";
|
|
15
|
+
import { n as writeStoreKit, t as generateStoreKit } from "./storekit-Cb0TkToV.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-FR3bcq0D.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
|
package/dist/tools.d.ts
CHANGED