@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,39 +1,39 @@
|
|
|
1
|
-
import "./token-
|
|
1
|
+
import "./token-Bu3FaRkv.js";
|
|
2
2
|
import { t as blocks } from "./output-Ggzq5_-t.js";
|
|
3
|
-
import { d as DASHBOARD_URL, x as VERSION } from "./environment-
|
|
4
|
-
import { n as readSession, s as sessionOrgName } from "./storage-
|
|
5
|
-
import "./client-
|
|
3
|
+
import { d as DASHBOARD_URL, x as VERSION } from "./environment-BocmdvZ-.js";
|
|
4
|
+
import { n as readSession, s as sessionOrgName } from "./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 { n as ui } from "./ui-D_qf3Gvw.js";
|
|
11
11
|
import "./theme-DUsCh-Vd.js";
|
|
12
12
|
import { t as stripReport } from "./log-C0MDCfA2.js";
|
|
13
|
-
import { t as scanProject } from "./scan-
|
|
14
|
-
import { t as detectExisting } from "./existing-
|
|
15
|
-
import "./paths-
|
|
16
|
-
import "./orgs-
|
|
17
|
-
import "./resources-
|
|
18
|
-
import "./lookup-
|
|
19
|
-
import "./login-
|
|
20
|
-
import "./skills-
|
|
13
|
+
import { t as scanProject } from "./scan-nVQO7JLx.js";
|
|
14
|
+
import { t as detectExisting } from "./existing-Cl5x6_5u.js";
|
|
15
|
+
import "./paths-CzTJVpfi.js";
|
|
16
|
+
import "./orgs-Z0H9WOs1.js";
|
|
17
|
+
import "./resources-CptT7HD6.js";
|
|
18
|
+
import "./lookup-CWzVfPpq.js";
|
|
19
|
+
import "./login-5sWIKDI2.js";
|
|
20
|
+
import "./skills-421SFEyF.js";
|
|
21
21
|
import "./browser-Bp3yRKlU.js";
|
|
22
|
-
import "./
|
|
23
|
-
import "./
|
|
24
|
-
import "./
|
|
25
|
-
import
|
|
26
|
-
import "./
|
|
27
|
-
import "./
|
|
28
|
-
import "./
|
|
29
|
-
import { n as performLoginWithUi } from "./login-
|
|
30
|
-
import
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
-
import "./server-
|
|
34
|
-
import { i as startStudio, n as migrationNextSteps, r as screenNextSteps, t as askStudio } from "./open-
|
|
35
|
-
import { r as actionById, t as detectBilling } from "./billing-
|
|
36
|
-
import { n as writeReport } from "./reports-
|
|
22
|
+
import "./lock-DgSx-p8Y.js";
|
|
23
|
+
import "./scope-ehZ7L1nj.js";
|
|
24
|
+
import { i as requireApi } from "./base-ChTi42M0.js";
|
|
25
|
+
import "./framework-CLmf4swr.js";
|
|
26
|
+
import { t as runAction } from "./run-c1O2_8pp.js";
|
|
27
|
+
import { t as detectDrivers } from "./drivers-BQkO5tHs.js";
|
|
28
|
+
import { a as migrationSource, c as scaffoldFromPaywall, d as findScreenCandidates, f as placementOfName, i as migrationFor, l as scaffoldFromScreen, n as hasOriginal, o as offerMigration, p as screenNameOf, s as projectDirOf, t as buildMigrationCopyPrompt, u as screenMigrationFor } from "./migration-Z69tLeHC.js";
|
|
29
|
+
import { n as performLoginWithUi } from "./login-Jp6E6d2e.js";
|
|
30
|
+
import "./source-BccdO4aL.js";
|
|
31
|
+
import "./assets-B_quADds.js";
|
|
32
|
+
import "./source-push-B4s6r9bB.js";
|
|
33
|
+
import "./server-DLARhh1k.js";
|
|
34
|
+
import { i as startStudio, n as migrationNextSteps, r as screenNextSteps, t as askStudio } from "./open-DNd49kT-.js";
|
|
35
|
+
import { r as actionById, t as detectBilling } from "./billing-ZIETn0j4.js";
|
|
36
|
+
import { n as writeReport } from "./reports-HYVp169R.js";
|
|
37
37
|
import { execFile } from "node:child_process";
|
|
38
38
|
import * as fs from "node:fs";
|
|
39
39
|
import * as os$1 from "node:os";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { d as DASHBOARD_URL } from "./environment-
|
|
2
|
-
import { t as ApiError } from "./client-
|
|
1
|
+
import { d as DASHBOARD_URL } from "./environment-BocmdvZ-.js";
|
|
2
|
+
import { t as ApiError } from "./client-CyrYJzBF.js";
|
|
3
3
|
import { t as stripReport } from "./log-C0MDCfA2.js";
|
|
4
|
-
import { i as readPackageJson, r as allDeps } from "./scan-
|
|
5
|
-
import { l as findPaywall, p as listApplications } from "./resources-
|
|
6
|
-
import { d as readBundledSkill } from "./skills-
|
|
7
|
-
import {
|
|
8
|
-
import { a as projectPackageName } from "./
|
|
9
|
-
import { a as copyToClipboard, i as readPrompt, n as runWithDriverFallback } from "./run-
|
|
10
|
-
import { t as detectDrivers } from "./drivers-
|
|
4
|
+
import { i as readPackageJson, r as allDeps } from "./scan-nVQO7JLx.js";
|
|
5
|
+
import { l as findPaywall, p as listApplications } from "./resources-CptT7HD6.js";
|
|
6
|
+
import { d as readBundledSkill } from "./skills-421SFEyF.js";
|
|
7
|
+
import { a as isScreenOrigin, d as writeApp, h as writeOrigin, l as readLock } from "./lock-DgSx-p8Y.js";
|
|
8
|
+
import { a as projectPackageName } from "./base-ChTi42M0.js";
|
|
9
|
+
import { a as copyToClipboard, i as readPrompt, n as runWithDriverFallback } from "./run-c1O2_8pp.js";
|
|
10
|
+
import { t as detectDrivers } from "./drivers-BQkO5tHs.js";
|
|
11
11
|
import * as fs from "node:fs";
|
|
12
12
|
import * as path from "node:path";
|
|
13
13
|
import fg from "fast-glob";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as updateServerNotifications, r as chooseKeyApp } from "./held-
|
|
2
|
-
import { t as apiCall } from "./spinner-
|
|
1
|
+
import { D as updateServerNotifications, r as chooseKeyApp } from "./held-Bykbwy-m.js";
|
|
2
|
+
import { t as apiCall } from "./spinner-DPdBlZe2.js";
|
|
3
3
|
import { i as findAppNotificationUrl } from "./client-BJQXl62Q.js";
|
|
4
4
|
import { t as timing } from "./timing-Ca0TXY-A.js";
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as isNonInteractive } from "./environment-
|
|
2
|
-
import { t as runStudio } from "./server-
|
|
1
|
+
import { T as isNonInteractive } from "./environment-BocmdvZ-.js";
|
|
2
|
+
import { t as runStudio } from "./server-DLARhh1k.js";
|
|
3
3
|
|
|
4
4
|
//#region src/core/paywalls/studio/open.ts
|
|
5
5
|
async function askStudio(ui, interactive, surfaceId, original = true) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { n as withSpinner } from "./spinner-
|
|
1
|
+
import { n as withSpinner } from "./spinner-DPdBlZe2.js";
|
|
2
2
|
import { n as ui } from "./ui-D_qf3Gvw.js";
|
|
3
|
-
import { n as listOrganizations, t as listOrgGroups } from "./orgs-
|
|
4
|
-
import { E as titleCase, T as rowName } from "./resources-
|
|
3
|
+
import { n as listOrganizations, t as listOrgGroups } from "./orgs-Z0H9WOs1.js";
|
|
4
|
+
import { E as titleCase, T as rowName } from "./resources-CptT7HD6.js";
|
|
5
5
|
|
|
6
6
|
//#region src/core/account/org.ts
|
|
7
7
|
async function orgForNewProject(api, interactive) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as apiCall } from "./spinner-
|
|
2
|
-
import { a as orgProjects, i as orgIdOf, n as listOrganizations } from "./orgs-
|
|
3
|
-
import { n as findApplication, t as appNotFound } from "./lookup-
|
|
4
|
-
import {
|
|
1
|
+
import { t as apiCall } from "./spinner-DPdBlZe2.js";
|
|
2
|
+
import { a as orgProjects, i as orgIdOf, n as listOrganizations } from "./orgs-Z0H9WOs1.js";
|
|
3
|
+
import { n as findApplication, t as appNotFound } from "./lookup-CWzVfPpq.js";
|
|
4
|
+
import { t as ArtifactError } from "./project-NoMtbMyl.js";
|
|
5
5
|
|
|
6
|
-
//#region src/core/
|
|
6
|
+
//#region src/core/artifacts/organization.ts
|
|
7
7
|
async function resolveAppScope(api, app, org) {
|
|
8
8
|
if (/^\d+$/.test(app) && org !== void 0) return {
|
|
9
9
|
organizationId: org,
|
|
@@ -12,7 +12,7 @@ async function resolveAppScope(api, app, org) {
|
|
|
12
12
|
const found = await findApplication(api, app, org === void 0 ? void 0 : await orgProjects(api, org));
|
|
13
13
|
if (!found) throw appNotFound(app);
|
|
14
14
|
const home = orgIdOf(found.project);
|
|
15
|
-
if (org !== void 0 && home !== org) throw new
|
|
15
|
+
if (org !== void 0 && home !== org) throw new ArtifactError(`App ${app} is in organization ${home ?? "unknown"}, not ${org}.`);
|
|
16
16
|
return {
|
|
17
17
|
organizationId: org ?? home,
|
|
18
18
|
applicationId: String(found.app.id)
|
|
@@ -23,7 +23,7 @@ async function resolveOrganization(ctx, org) {
|
|
|
23
23
|
const organizations = await apiCall(ctx, "Loading your organizations", () => listOrganizations(ctx.api));
|
|
24
24
|
const [only] = organizations;
|
|
25
25
|
if (only !== void 0 && organizations.length === 1) return String(only.id);
|
|
26
|
-
if (!ctx.interactive || organizations.length === 0) throw new
|
|
26
|
+
if (!ctx.interactive || organizations.length === 0) throw new ArtifactError("Say which organization with --org <id>.");
|
|
27
27
|
const picked = await ctx.ui.select({
|
|
28
28
|
message: "Which organization?",
|
|
29
29
|
options: organizations.map((organization) => ({
|
|
@@ -31,7 +31,7 @@ async function resolveOrganization(ctx, org) {
|
|
|
31
31
|
label: String(organization.name ?? organization.id)
|
|
32
32
|
}))
|
|
33
33
|
});
|
|
34
|
-
if (picked === null) throw new
|
|
34
|
+
if (picked === null) throw new ArtifactError("No organization picked.");
|
|
35
35
|
return picked;
|
|
36
36
|
}
|
|
37
37
|
|
|
@@ -1,17 +1,17 @@
|
|
|
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 { i as updateTelemetryTags, r as track } from "./telemetry-
|
|
7
|
+
import { i as updateTelemetryTags, r as track } from "./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
|
-
import { t as scanProject } from "./scan-
|
|
12
|
-
import "./paths-
|
|
13
|
-
import { d as readBundledSkill } from "./skills-
|
|
14
|
-
import { n as FRAMEWORK_REF, t as detectBilling } from "./billing-
|
|
11
|
+
import { t as scanProject } from "./scan-nVQO7JLx.js";
|
|
12
|
+
import "./paths-CzTJVpfi.js";
|
|
13
|
+
import { d as readBundledSkill } from "./skills-421SFEyF.js";
|
|
14
|
+
import { n as FRAMEWORK_REF, t as detectBilling } from "./billing-ZIETn0j4.js";
|
|
15
15
|
|
|
16
16
|
//#region src/core/workflows/playbook.ts
|
|
17
17
|
async function printPlaybook(installDir, playbook) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as fs from "node:fs";
|
|
2
2
|
import * as path from "node:path";
|
|
3
3
|
|
|
4
|
-
//#region src/core/
|
|
5
|
-
var
|
|
4
|
+
//#region src/core/artifacts/project.ts
|
|
5
|
+
var ArtifactError = class extends Error {};
|
|
6
6
|
const MANIFEST_FILE = "superwall.json";
|
|
7
|
-
const VENDORED_SDK = path.join("vendor", "
|
|
7
|
+
const VENDORED_SDK = path.join("vendor", "artifact-sdk");
|
|
8
8
|
function isManifest(value) {
|
|
9
9
|
if (typeof value !== "object" || value === null) return false;
|
|
10
10
|
const { name, scopes, entrypoints } = value;
|
|
@@ -16,15 +16,15 @@ function readManifest(root) {
|
|
|
16
16
|
try {
|
|
17
17
|
text = fs.readFileSync(file, "utf8");
|
|
18
18
|
} catch {
|
|
19
|
-
throw new
|
|
19
|
+
throw new ArtifactError(`No ${MANIFEST_FILE} in ${root}. Run this inside an artifact, or start one with \`superwall artifacts create\`.`);
|
|
20
20
|
}
|
|
21
21
|
let parsed;
|
|
22
22
|
try {
|
|
23
23
|
parsed = JSON.parse(text);
|
|
24
24
|
} catch (error) {
|
|
25
|
-
throw new
|
|
25
|
+
throw new ArtifactError(`${MANIFEST_FILE} is not valid JSON: ${error.message}`);
|
|
26
26
|
}
|
|
27
|
-
if (!isManifest(parsed)) throw new
|
|
27
|
+
if (!isManifest(parsed)) throw new ArtifactError(`${MANIFEST_FILE} needs a name, scopes and entrypoints.`);
|
|
28
28
|
return parsed;
|
|
29
29
|
}
|
|
30
30
|
function readProject(dir) {
|
|
@@ -37,11 +37,11 @@ function readProject(dir) {
|
|
|
37
37
|
function findEntrypoint(manifest, id) {
|
|
38
38
|
const entrypoint = manifest.entrypoints.find((candidate) => candidate.id === id);
|
|
39
39
|
if (entrypoint) return entrypoint;
|
|
40
|
-
throw new
|
|
40
|
+
throw new ArtifactError(`No entrypoint named \`${id}\` in ${MANIFEST_FILE}. It has: ${manifest.entrypoints.map((candidate) => candidate.id).join(", ") || "none"}.`);
|
|
41
41
|
}
|
|
42
42
|
function bundleDir(root) {
|
|
43
|
-
return path.join(root, ".superwall", "
|
|
43
|
+
return path.join(root, ".superwall", "artifact");
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
//#endregion
|
|
47
|
-
export { findEntrypoint as a, bundleDir as i,
|
|
47
|
+
export { findEntrypoint as a, bundleDir as i, MANIFEST_FILE as n, readManifest as o, VENDORED_SDK as r, readProject as s, ArtifactError as t };
|
|
@@ -1,31 +1,31 @@
|
|
|
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 { t as ApiError } from "./client-
|
|
3
|
+
import { x as VERSION } from "./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 "./telemetry-
|
|
7
|
+
import "./telemetry-ovPiseFm.js";
|
|
8
8
|
import "./spawn-DmmmHIP-.js";
|
|
9
|
-
import "./spinner-
|
|
9
|
+
import "./spinner-DPdBlZe2.js";
|
|
10
10
|
import { n as ui } from "./ui-D_qf3Gvw.js";
|
|
11
|
-
import "./scan-
|
|
12
|
-
import "./paths-
|
|
13
|
-
import "./orgs-
|
|
14
|
-
import { _ as livePaywallVersion, x as promotePaywallVersion } from "./resources-
|
|
15
|
-
import "./lookup-
|
|
16
|
-
import "./login-
|
|
17
|
-
import "./skills-
|
|
11
|
+
import "./scan-nVQO7JLx.js";
|
|
12
|
+
import "./paths-CzTJVpfi.js";
|
|
13
|
+
import "./orgs-Z0H9WOs1.js";
|
|
14
|
+
import { _ as livePaywallVersion, x as promotePaywallVersion } from "./resources-CptT7HD6.js";
|
|
15
|
+
import "./lookup-CWzVfPpq.js";
|
|
16
|
+
import "./login-5sWIKDI2.js";
|
|
17
|
+
import "./skills-421SFEyF.js";
|
|
18
18
|
import "./browser-Bp3yRKlU.js";
|
|
19
|
-
import "./
|
|
20
|
-
import
|
|
21
|
-
import "./
|
|
22
|
-
import {
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import "./
|
|
27
|
-
import "./
|
|
28
|
-
import "./
|
|
19
|
+
import { l as readLock, y as collectProjectDeclarations } from "./lock-DgSx-p8Y.js";
|
|
20
|
+
import "./scope-ehZ7L1nj.js";
|
|
21
|
+
import { c as planTargets, d as wantedPlatforms, h as resolveApps, i as requireApi, s as parsePlatformFlags, u as targetLabel } from "./base-ChTi42M0.js";
|
|
22
|
+
import { l as selectSurfaces, n as resolveFramework, s as resolveProjectDir, v as transition } from "./framework-CLmf4swr.js";
|
|
23
|
+
import "./login-Jp6E6d2e.js";
|
|
24
|
+
import "./source-BccdO4aL.js";
|
|
25
|
+
import "./assets-B_quADds.js";
|
|
26
|
+
import "./design-lint-CiFc78aM.js";
|
|
27
|
+
import { u as resolveBinding } from "./source-push-B4s6r9bB.js";
|
|
28
|
+
import { a as pickApplicationOption, i as timed, o as pickAdoptOption, t as group } from "./push-BMblzg_6.js";
|
|
29
29
|
import pc from "picocolors";
|
|
30
30
|
|
|
31
31
|
//#region src/core/paywalls/promote.ts
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { x as VERSION } from "./environment-
|
|
1
|
+
import { x as VERSION } from "./environment-BocmdvZ-.js";
|
|
2
2
|
import { n as ui } from "./ui-D_qf3Gvw.js";
|
|
3
|
-
import { f as listAppPaywalls, v as mintSourceAccess } from "./resources-
|
|
4
|
-
import { n as findApplication, t as appNotFound } from "./lookup-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { a as
|
|
9
|
-
import { a as devCommand, i as detectPackageManager } from "./setup-
|
|
3
|
+
import { f as listAppPaywalls, v as mintSourceAccess } from "./resources-CptT7HD6.js";
|
|
4
|
+
import { n as findApplication, t as appNotFound } from "./lookup-CWzVfPpq.js";
|
|
5
|
+
import { b as writeProjectTypes, l as readLock, m as writeLock, s as parseLock, t as NewerLockError, v as TYPES_FILE, y as collectProjectDeclarations } from "./lock-DgSx-p8Y.js";
|
|
6
|
+
import { f as PLATFORMS, i as requireApi, m as requirePlatform, n as writeSourceBase, s as parsePlatformFlags, t as readSourceBase } from "./base-ChTi42M0.js";
|
|
7
|
+
import { n as resolveFramework, o as requireProject, s as resolveProjectDir } from "./framework-CLmf4swr.js";
|
|
8
|
+
import { a as statIfPresent, r as pullSourceTree, t as collectSourceFiles } from "./source-BccdO4aL.js";
|
|
9
|
+
import { a as devCommand, i as detectPackageManager } from "./setup-C6NFy14d.js";
|
|
10
10
|
import * as fs from "node:fs";
|
|
11
11
|
import * as path from "node:path";
|
|
12
12
|
import pc from "picocolors";
|
|
@@ -0,0 +1,36 @@
|
|
|
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 "./telemetry-ovPiseFm.js";
|
|
8
|
+
import "./spawn-DmmmHIP-.js";
|
|
9
|
+
import "./spinner-DPdBlZe2.js";
|
|
10
|
+
import "./ui-D_qf3Gvw.js";
|
|
11
|
+
import "./theme-DUsCh-Vd.js";
|
|
12
|
+
import "./log-C0MDCfA2.js";
|
|
13
|
+
import "./scan-nVQO7JLx.js";
|
|
14
|
+
import "./existing-Cl5x6_5u.js";
|
|
15
|
+
import "./paths-CzTJVpfi.js";
|
|
16
|
+
import "./orgs-Z0H9WOs1.js";
|
|
17
|
+
import "./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
|
+
import "./browser-Bp3yRKlU.js";
|
|
24
|
+
import "./lock-DgSx-p8Y.js";
|
|
25
|
+
import "./scope-ehZ7L1nj.js";
|
|
26
|
+
import "./base-ChTi42M0.js";
|
|
27
|
+
import "./framework-CLmf4swr.js";
|
|
28
|
+
import "./run-c1O2_8pp.js";
|
|
29
|
+
import "./drivers-BQkO5tHs.js";
|
|
30
|
+
import "./migration-Z69tLeHC.js";
|
|
31
|
+
import "./login-Jp6E6d2e.js";
|
|
32
|
+
import "./source-BccdO4aL.js";
|
|
33
|
+
import "./setup-C6NFy14d.js";
|
|
34
|
+
import { a as cloneInto, c as pullInto, i as boundPaywall, l as runPull, n as applyPulledChanges, o as cloneTarget, r as appsToPull, s as mergePulledLock, t as PullPathError } from "./pull-AoUmaiMK.js";
|
|
35
|
+
|
|
36
|
+
export { PullPathError, applyPulledChanges, appsToPull, boundPaywall, cloneInto, cloneTarget, mergePulledLock, pullInto, runPull };
|
|
@@ -0,0 +1,106 @@
|
|
|
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 "./telemetry-ovPiseFm.js";
|
|
8
|
+
import "./spawn-DmmmHIP-.js";
|
|
9
|
+
import "./spinner-DPdBlZe2.js";
|
|
10
|
+
import "./ui-D_qf3Gvw.js";
|
|
11
|
+
import "./theme-DUsCh-Vd.js";
|
|
12
|
+
import "./log-C0MDCfA2.js";
|
|
13
|
+
import "./scan-nVQO7JLx.js";
|
|
14
|
+
import "./existing-Cl5x6_5u.js";
|
|
15
|
+
import "./paths-CzTJVpfi.js";
|
|
16
|
+
import "./orgs-Z0H9WOs1.js";
|
|
17
|
+
import "./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
|
+
import "./browser-Bp3yRKlU.js";
|
|
24
|
+
import { c as projectRoot, f as readBinding, l as resolveArtifact, m as writeBinding, p as readSourceFile, w as mintSourceAccess } from "./resolve-DpOSDDdr.js";
|
|
25
|
+
import { t as ArtifactError } from "./project-NoMtbMyl.js";
|
|
26
|
+
import "./lock-DgSx-p8Y.js";
|
|
27
|
+
import { t as ARTIFACT_DERIVED_FILES } from "./scope-ehZ7L1nj.js";
|
|
28
|
+
import "./organization-7vJA3uy1.js";
|
|
29
|
+
import "./download-DhGd4hOB.js";
|
|
30
|
+
import "./sdk-DEfQttek.js";
|
|
31
|
+
import "./base-ChTi42M0.js";
|
|
32
|
+
import "./framework-CLmf4swr.js";
|
|
33
|
+
import "./run-c1O2_8pp.js";
|
|
34
|
+
import "./drivers-BQkO5tHs.js";
|
|
35
|
+
import "./migration-Z69tLeHC.js";
|
|
36
|
+
import "./login-Jp6E6d2e.js";
|
|
37
|
+
import { r as pullSourceTree, t as collectSourceFiles } from "./source-BccdO4aL.js";
|
|
38
|
+
import "./setup-C6NFy14d.js";
|
|
39
|
+
import { n as applyPulledChanges } from "./pull-AoUmaiMK.js";
|
|
40
|
+
import { a as toSourceAccess } from "./push-BrzMFd4Z.js";
|
|
41
|
+
import * as fs from "node:fs";
|
|
42
|
+
import * as path from "node:path";
|
|
43
|
+
|
|
44
|
+
//#region src/core/artifacts/pull.ts
|
|
45
|
+
const NOT_PUSHED = "Its source repo is empty: nobody has pushed yet. Run `superwall artifacts push` first.";
|
|
46
|
+
function report(ctx, slug, head, written, skipped) {
|
|
47
|
+
if (ctx.json) {
|
|
48
|
+
ctx.output.data({
|
|
49
|
+
slug,
|
|
50
|
+
head,
|
|
51
|
+
written,
|
|
52
|
+
skipped
|
|
53
|
+
});
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
ctx.ui.success(written.length === 0 ? "Already up to date." : `Pulled ${written.length} ${written.length === 1 ? "file" : "files"} of \`${slug}\`.`);
|
|
57
|
+
if (written.length > 0) ctx.ui.list({ items: written.map((label) => ({ label })) });
|
|
58
|
+
if (skipped.length > 0) ctx.ui.warn(`Not pulled, because a file of yours that git doesn't track is in the way: ${skipped.join(", ")}. Move it, then pull again.`);
|
|
59
|
+
}
|
|
60
|
+
function assertCloneTarget(root) {
|
|
61
|
+
if (!fs.existsSync(root)) return;
|
|
62
|
+
if (fs.readdirSync(root).length > 0) throw new ArtifactError(`${root} already has files and isn't linked to this artifact. Pick an empty directory.`);
|
|
63
|
+
}
|
|
64
|
+
async function runArtifactPull(ctx, input) {
|
|
65
|
+
const root = projectRoot(input.dir);
|
|
66
|
+
const linked = readBinding(root);
|
|
67
|
+
const artifact = await resolveArtifact(ctx, input);
|
|
68
|
+
if (linked && linked.artifactId !== String(artifact.id)) throw new ArtifactError(`This project is linked to artifact ${linked.artifactId}, not ${artifact.id}. Pull into an empty directory instead.`);
|
|
69
|
+
if (!linked) assertCloneTarget(root);
|
|
70
|
+
fs.mkdirSync(root, { recursive: true });
|
|
71
|
+
const collected = linked ? await collectSourceFiles(root, readSourceFile) : {
|
|
72
|
+
ok: true,
|
|
73
|
+
files: []
|
|
74
|
+
};
|
|
75
|
+
if (!collected.ok) throw new ArtifactError(collected.reason);
|
|
76
|
+
const pulled = await pullSourceTree({
|
|
77
|
+
access: toSourceAccess(await mintSourceAccess(ctx.api, artifact.id)),
|
|
78
|
+
files: collected.files,
|
|
79
|
+
base: linked?.syncedCommit,
|
|
80
|
+
theirs: input.theirs,
|
|
81
|
+
derived: ARTIFACT_DERIVED_FILES
|
|
82
|
+
});
|
|
83
|
+
if (pulled.status === "empty") throw new ArtifactError(NOT_PUSHED);
|
|
84
|
+
const { written, skipped } = applyPulledChanges(root, pulled.changes, new Set(collected.files.map((file) => file.path)));
|
|
85
|
+
writeBinding(root, {
|
|
86
|
+
artifactId: String(artifact.id),
|
|
87
|
+
organizationId: String(artifact.organization_id),
|
|
88
|
+
slug: artifact.slug,
|
|
89
|
+
...skipped.length > 0 ? {
|
|
90
|
+
syncedCommit: linked?.syncedCommit,
|
|
91
|
+
reviewedCommit: linked?.reviewedCommit
|
|
92
|
+
} : {
|
|
93
|
+
syncedCommit: pulled.head,
|
|
94
|
+
reviewedCommit: pulled.head
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
report(ctx, artifact.slug, pulled.head, written, skipped);
|
|
98
|
+
if (linked && written.length > 0 && !ctx.json) ctx.ui.info("Read what came in before you push: your own copy runs all of it with your reads.");
|
|
99
|
+
if (!linked && !ctx.json) {
|
|
100
|
+
const where = path.relative(process.cwd(), root) || ".";
|
|
101
|
+
ctx.ui.info(`Next: cd ${where} && npm install && superwall artifacts dev`);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
//#endregion
|
|
106
|
+
export { runArtifactPull };
|
|
@@ -0,0 +1,22 @@
|
|
|
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 "./lookup-CWzVfPpq.js";
|
|
12
|
+
import "./resolve-DpOSDDdr.js";
|
|
13
|
+
import "./project-NoMtbMyl.js";
|
|
14
|
+
import "./lock-DgSx-p8Y.js";
|
|
15
|
+
import "./scope-ehZ7L1nj.js";
|
|
16
|
+
import "./organization-7vJA3uy1.js";
|
|
17
|
+
import "./download-DhGd4hOB.js";
|
|
18
|
+
import "./sdk-DEfQttek.js";
|
|
19
|
+
import "./source-BccdO4aL.js";
|
|
20
|
+
import { a as toSourceAccess, i as slugOfName, n as namesOf, o as waitForBuild, r as runArtifactPush, t as IncomingCommitsRefused } from "./push-BrzMFd4Z.js";
|
|
21
|
+
|
|
22
|
+
export { IncomingCommitsRefused, namesOf, runArtifactPush, slugOfName, toSourceAccess, waitForBuild };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { x as VERSION } from "./environment-
|
|
1
|
+
import { x as VERSION } from "./environment-BocmdvZ-.js";
|
|
2
2
|
import { n as ui } from "./ui-D_qf3Gvw.js";
|
|
3
|
-
import { C as pushPaywallVersion, D as versionProducts, b as platformStore, g as livePaywall, w as pushedProducts, x as promotePaywallVersion, y as platformLabel } from "./resources-
|
|
4
|
-
import { n as
|
|
5
|
-
import {
|
|
6
|
-
import { n as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
3
|
+
import { C as pushPaywallVersion, D as versionProducts, b as platformStore, g as livePaywall, w as pushedProducts, x as promotePaywallVersion, y as platformLabel } from "./resources-CptT7HD6.js";
|
|
4
|
+
import { b as writeProjectTypes, g as writeSnapshot, l as readLock, n as describeBindings, p as writeBindings, u as removeBinding, y as collectProjectDeclarations } from "./lock-DgSx-p8Y.js";
|
|
5
|
+
import { c as planTargets, d as wantedPlatforms, h as resolveApps, i as requireApi, l as surfaceKey, o as writeProjectScaffold, p as platformFor, s as parsePlatformFlags, u as targetLabel } from "./base-ChTi42M0.js";
|
|
6
|
+
import { _ as took, a as requireClean, d as BIND_VERB, g as resolveNote, h as pushedLine, l as selectSurfaces, m as pendingPromoteWarning, n as resolveFramework, o as requireProject, p as kb, r as needsWork, s as resolveProjectDir, t as frameworkVersion, u as storesDiffer, v as transition, y as weight } from "./framework-CLmf4swr.js";
|
|
7
|
+
import { t as collectSourceFiles } from "./source-BccdO4aL.js";
|
|
8
|
+
import { n as requireAssets, r as syncAssets, t as assetBaseUrl } from "./assets-B_quADds.js";
|
|
9
|
+
import { n as lintDesignTokens, t as formatTokenFinding } from "./design-lint-CiFc78aM.js";
|
|
10
|
+
import { c as projectForApplication, i as warnNotPortable, l as requireProducts, n as pushProjectSource, o as listProjectCatalogue, r as pushSource, t as assertGit, u as resolveBinding } from "./source-push-B4s6r9bB.js";
|
|
11
11
|
import { cpus } from "node:os";
|
|
12
12
|
import pc from "picocolors";
|
|
13
13
|
|