@superwall/cli 2.2.1 → 2.3.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 +24 -11
- package/dist/{apple-DaqaI4vD.js → apple-z2qjOzIZ.js} +13 -13
- package/dist/assets-DXXegdDt.js +89 -0
- package/dist/auth.d.ts +1 -1
- package/dist/auth.js +3 -3
- package/dist/{billing-DyKr2kmd.js → billing-B8tOjsnY.js} +3 -3
- package/dist/{bind-BpxebZf4.js → bind-Bx9K6LwP.js} +4 -4
- package/dist/{build-DzbdRThf.js → build-Bu2kkzRe.js} +7 -6
- package/dist/{client-BF9rCULI.js → client-DOgk9gAS.js} +3 -3
- package/dist/{create-D7AZHYGH.js → create-B03MAuPe.js} +6 -6
- package/dist/create-BdZS_T68.js +19 -0
- package/dist/{create-B55V99TD.js → create-DzC_89gq.js} +28 -226
- package/dist/{doctor-B2mPKiaJ.js → doctor-BGZSKY_B.js} +6 -6
- package/dist/{drivers-DOMky8Ug.js → drivers-DqLgQxkC.js} +3 -3
- package/dist/entry.js +19 -19
- package/dist/{environment-DBwo79dy.js → environment-i8BhiBDB.js} +1 -1
- package/dist/{existing-B4VK4BCL.js → existing-BPOG5zLO.js} +2 -2
- package/dist/{held-DjcZPCwn.js → held-C56PYMRH.js} +6 -6
- package/dist/held-DSNUY-NZ.js +16 -0
- package/dist/{integrate-B8oHbvwz.js → integrate-DZ4Qvoch.js} +22 -22
- package/dist/login-Blrkm6oi.js +16 -0
- package/dist/{login-DfhqWY9C.js → login-ONZdK8vN.js} +6 -6
- package/dist/{login-B8hgMLhS.js → login-p9GVEKzD.js} +1 -1
- package/dist/{lookup-r8p6H2ZC.js → lookup-flTi0at0.js} +2 -2
- package/dist/{migrate-DQf2Fosc.js → migrate-DnXpbhL1.js} +25 -22
- package/dist/{open-CrEnSL4v.js → migration-DJ1uNKhk.js} +11 -49
- package/dist/{notification-url-BxPTEmkv.js → notification-url-CCDeS5S-.js} +2 -2
- package/dist/open-QdsZ_N47.js +41 -0
- package/dist/{org-Cc2WGvl1.js → org-BiFPjoHD.js} +2 -2
- package/dist/{paths-BcNbJfpw.js → paths-yRgm5Jpa.js} +1 -1
- package/dist/{playbook-D9J8frkE.js → playbook-B-pRKNa4.js} +10 -10
- package/dist/{promote-C8T7DCFF.js → promote-Djzk4C81.js} +18 -16
- package/dist/pull-BLA9XwHj.js +303 -0
- package/dist/push-BkMgOT6X.js +24 -0
- package/dist/{push-Bzs1l_5C.js → push-gSBxGDik.js} +8 -6
- package/dist/{registry-CpxZbmxp.js → registry-D3xmWk9p.js} +230 -115
- package/dist/{resources-Bo6i7wBi.js → resources-BTnczJCA.js} +21 -7
- package/dist/{run-BUp4r8Kk.js → run-C1SoizcJ.js} +2 -2
- package/dist/{scan-8cxu2fx0.js → scan-Dwk_lT5q.js} +1 -1
- package/dist/scan-Kp-MAutK.js +4 -0
- package/dist/{scope-CPG_wWXL.js → scope-Db7blD-l.js} +5 -4
- package/dist/{selection-CMA4aG4V.js → selection-u2KiKu_d.js} +16 -96
- package/dist/{server-Xb3wp-mx.js → server-Cb2N75JL.js} +9 -7
- package/dist/server-psYghr9K.js +24 -0
- package/dist/{session-eZeXR9xU.js → session-BDLQUJyV.js} +444 -243
- package/dist/session-CehHJWZk.js +6 -0
- package/dist/{session-DOZV1TP6.js → session-CnDJp_HO.js} +1 -1
- package/dist/setup-BLahHpgy.js +216 -0
- package/dist/skills/animate-onboarding/SKILL.md +1 -1
- package/dist/skills/mobile-design/SKILL.md +1 -1
- package/dist/skills/onboarding-questions/SKILL.md +1 -1
- package/dist/skills/superwall/SKILL.md +6 -7
- package/dist/skills/superwall/references/api.md +8 -3
- package/dist/skills/superwall/workflows/dashboard/playbook.md +4 -3
- package/dist/skills/superwall/workflows/dashboard/setup.md +7 -4
- package/dist/skills/superwall/workflows/migrate/adapty.md +4 -3
- package/dist/skills/superwall/workflows/migrate/playbook.md +2 -2
- package/dist/skills/superwall/workflows/migrate/qonversion.md +4 -3
- package/dist/skills/superwall/workflows/migrate/revenuecat.md +4 -3
- package/dist/skills/superwall-editor/SKILL.md +2 -3
- package/dist/skills/superwall-framework/SKILL.md +83 -13
- package/dist/skills/superwall-framework/references/cli.md +92 -21
- package/dist/skills/superwall-framework/references/migrate-from-editor.md +5 -1
- package/dist/{skills-BI19OGlS.js → skills-DDV4zcLR.js} +8 -8
- package/dist/{skills-DDf10ufO.js → skills-zebMTZyr.js} +4 -4
- package/dist/source-push-DxuJuwEf.js +205 -0
- package/dist/{spinner-BClMQGGN.js → spinner-BN3U1CVB.js} +3 -3
- package/dist/{storage-Po9E-CHL.js → storage-VagEaaJC.js} +1 -1
- package/dist/storekit-BcBb2jXB.js +16 -0
- package/dist/{storekit-Cbn9DBLA.js → storekit-CoOf4Rvh.js} +3 -3
- package/dist/{telemetry-s6dag6tb.js → telemetry-CM0BDwCK.js} +1 -1
- package/dist/{token-CPplNMVa.js → token-lUUOkTJA.js} +1 -1
- package/dist/tools.d.ts +1 -1
- package/dist/tools.js +215 -89
- package/dist/{upgrade-1OYm5NQU.js → upgrade-CpTJv_M7.js} +2 -2
- package/dist/{upgrade-ahapZeex.js → upgrade-DZbKb67W.js} +1 -1
- package/package.json +2 -2
- package/dist/create-BYAPuhhf.js +0 -19
- package/dist/held-C9FqvNbn.js +0 -16
- package/dist/login-D-a7oS_8.js +0 -16
- package/dist/push-snV3SrnH.js +0 -22
- package/dist/scan-nUeXs9a1.js +0 -4
- package/dist/server-Boqa8jh_.js +0 -22
- package/dist/session-DtBpdlF-.js +0 -6
- package/dist/storekit-BU6Eq_UO.js +0 -16
- /package/dist/{reports-D_qbl7_u.js → reports-CwwKLUh0.js} +0 -0
- /package/dist/{storage-BbJF7z3l.d.ts → storage-gRyQetN9.d.ts} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as ApiUnreachableError, t as ApiError } from "./client-
|
|
1
|
+
import { n as ApiUnreachableError, t as ApiError } from "./client-DOgk9gAS.js";
|
|
2
2
|
import { o as readOpenedOrgs, p as writeOpenedOrgs } from "./config-BO1Y87kV.js";
|
|
3
3
|
|
|
4
4
|
//#region src/core/api/orgs.ts
|
|
@@ -146,9 +146,10 @@ async function listResource(api, name, scope) {
|
|
|
146
146
|
}
|
|
147
147
|
return api.list(`${RESOURCES[name]}?project_id=${scope.projectId}`);
|
|
148
148
|
}
|
|
149
|
-
function createEntitlement(api, scope, identifier) {
|
|
149
|
+
function createEntitlement(api, scope, identifier, applicationId) {
|
|
150
150
|
return api.post("/v2/entitlements", {
|
|
151
151
|
project_id: scope.projectId,
|
|
152
|
+
...applicationId ? { application_id: applicationId } : {},
|
|
152
153
|
identifier
|
|
153
154
|
});
|
|
154
155
|
}
|
|
@@ -212,6 +213,14 @@ async function listAppPaywalls(api, applicationId, options = {}) {
|
|
|
212
213
|
metadata: parseMetadata(row.metadata)
|
|
213
214
|
}));
|
|
214
215
|
}
|
|
216
|
+
const BILLING_PLAN_TYPES = {
|
|
217
|
+
monthly: "MONTHLY",
|
|
218
|
+
upFront: "UP_FRONT"
|
|
219
|
+
};
|
|
220
|
+
function billingPlanOf(type) {
|
|
221
|
+
if (type === "MONTHLY") return "monthly";
|
|
222
|
+
if (type === "UP_FRONT") return "upFront";
|
|
223
|
+
}
|
|
215
224
|
function parseMetadata(value) {
|
|
216
225
|
const metadata = {};
|
|
217
226
|
if (!isRecord(value)) return metadata;
|
|
@@ -224,10 +233,12 @@ function parseProductRefs(value) {
|
|
|
224
233
|
for (const row of value) {
|
|
225
234
|
if (!isRecord(row)) continue;
|
|
226
235
|
if (typeof row.reference_name !== "string" || typeof row.identifier !== "string") continue;
|
|
236
|
+
const billingPlan = billingPlanOf(row.billing_plan_type);
|
|
227
237
|
refs.push({
|
|
228
238
|
reference: row.reference_name,
|
|
229
239
|
identifier: row.identifier,
|
|
230
|
-
...typeof row.store === "string" ? { store: row.store } : {}
|
|
240
|
+
...typeof row.store === "string" ? { store: row.store } : {},
|
|
241
|
+
...billingPlan === void 0 ? {} : { billingPlan }
|
|
231
242
|
});
|
|
232
243
|
}
|
|
233
244
|
return refs;
|
|
@@ -297,12 +308,15 @@ function resolveStore(identifier, platform, known) {
|
|
|
297
308
|
if (known.includes("stripe")) return "stripe";
|
|
298
309
|
return fallback;
|
|
299
310
|
}
|
|
300
|
-
function versionProducts(products, platform, stores = {}) {
|
|
311
|
+
function versionProducts(products, platform, stores = {}, billingPlans = {}) {
|
|
301
312
|
return Object.entries(products ?? {}).map(([reference, identifier]) => {
|
|
313
|
+
const store = resolveStore(identifier, platform, Object.hasOwn(stores, identifier) ? stores[identifier] ?? [] : []);
|
|
314
|
+
const plan = Object.hasOwn(billingPlans, reference) ? billingPlans[reference] : void 0;
|
|
302
315
|
return {
|
|
303
|
-
store
|
|
316
|
+
store,
|
|
304
317
|
identifier,
|
|
305
|
-
reference_name: reference
|
|
318
|
+
reference_name: reference,
|
|
319
|
+
...store === "app-store" && plan !== void 0 ? { billing_plan_type: BILLING_PLAN_TYPES[plan] } : {}
|
|
306
320
|
};
|
|
307
321
|
});
|
|
308
322
|
}
|
|
@@ -364,4 +378,4 @@ function promotePaywallVersion(api, paywallId, opts = {}) {
|
|
|
364
378
|
}
|
|
365
379
|
|
|
366
380
|
//#endregion
|
|
367
|
-
export {
|
|
381
|
+
export { listField as A, pushPaywallVersion as C, versionProducts as D, titleCase as E, orgIdOf as F, orgProjects as I, organizationOf as L, textField as M, listOrgGroups as N, field as O, listOrganizations as P, rememberOrg as R, pushPaywallAssets as S, rowName as T, livePaywallVersion as _, createEntitlement as a, platformStore as b, createProject as c, linkSourceCommit as d, listAppPaywalls as f, livePaywall as g, listResource as h, createCampaign as i, parseJson as j, isRecord as k, findPaywall as l, listProjects as m, billingPlanOf as n, createHeadlessPaywall as o, listApplications as p, createApplication as r, createProduct as s, RESOURCES as t, isAppScoped as u, mintSourceAccess as v, pushedProducts as w, promotePaywallVersion as x, platformLabel as y };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as DASHBOARD_URL } from "./environment-
|
|
2
|
-
import { i as packagedDir } from "./paths-
|
|
1
|
+
import { c as DASHBOARD_URL } from "./environment-i8BhiBDB.js";
|
|
2
|
+
import { i as packagedDir } from "./paths-yRgm5Jpa.js";
|
|
3
3
|
import { spawn } from "node:child_process";
|
|
4
4
|
import { readFileSync } from "node:fs";
|
|
5
5
|
import { join } from "node:path";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as Integration } from "./environment-
|
|
1
|
+
import { f as Integration } from "./environment-i8BhiBDB.js";
|
|
2
2
|
import { existsSync, readFileSync } from "node:fs";
|
|
3
3
|
import { basename, dirname, join, relative, sep } from "node:path";
|
|
4
4
|
import fg from "fast-glob";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as readDefaultApp, u as writeDefaultApp } from "./config-BO1Y87kV.js";
|
|
2
|
-
import { t as apiCall, u as currentHost } from "./spinner-
|
|
3
|
-
import {
|
|
4
|
-
import { t as chooseOrgOfApps } from "./org-
|
|
5
|
-
import { n as findApplication, r as findProject, t as appNotFound } from "./lookup-
|
|
2
|
+
import { t as apiCall, u as currentHost } from "./spinner-BN3U1CVB.js";
|
|
3
|
+
import { F as orgIdOf, L as organizationOf, N as listOrgGroups, l as findPaywall, m as listProjects, y as platformLabel } from "./resources-BTnczJCA.js";
|
|
4
|
+
import { t as chooseOrgOfApps } from "./org-BiFPjoHD.js";
|
|
5
|
+
import { n as findApplication, r as findProject, t as appNotFound } from "./lookup-flTi0at0.js";
|
|
6
6
|
|
|
7
7
|
//#region src/core/account/scope.ts
|
|
8
8
|
function moveFirst(items, match) {
|
|
@@ -65,6 +65,7 @@ async function pickScope(context, api, appScoped) {
|
|
|
65
65
|
projectName: bound.project.name,
|
|
66
66
|
appName: appScoped ? bound.app.name : void 0,
|
|
67
67
|
appPlatform: appScoped ? bound.app.platform : void 0,
|
|
68
|
+
boundApplicationId: String(bound.app.id),
|
|
68
69
|
projectCount: projects.length,
|
|
69
70
|
appCount: bound.project.applications?.length ?? 0
|
|
70
71
|
};
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as ApiError } from "./client-BF9rCULI.js";
|
|
3
|
-
import { x as pushPaywallAssets } from "./resources-Bo6i7wBi.js";
|
|
1
|
+
import { n as billingPlanOf } from "./resources-BTnczJCA.js";
|
|
4
2
|
import { createRequire } from "node:module";
|
|
5
3
|
import * as fs from "node:fs";
|
|
6
4
|
import { globSync, readFileSync, statSync } from "node:fs";
|
|
@@ -9,89 +7,6 @@ import { join, resolve } from "node:path";
|
|
|
9
7
|
import pc from "picocolors";
|
|
10
8
|
import { pathToFileURL } from "node:url";
|
|
11
9
|
|
|
12
|
-
//#region src/core/paywalls/assets.ts
|
|
13
|
-
const assetBaseUrl = (applicationId) => `${ASSET_HOST()}/${applicationId}`;
|
|
14
|
-
function requireAssets(built) {
|
|
15
|
-
if (!Array.isArray(built.assets)) throw new AssetSyncError("This project's superwall version builds snapshots without hosted assets — update the project's superwall dependency to push.");
|
|
16
|
-
return built.assets;
|
|
17
|
-
}
|
|
18
|
-
var AssetSyncError = class extends Error {};
|
|
19
|
-
const assetName = (asset) => asset.path.split(/[\\/]/).pop() || asset.fileName;
|
|
20
|
-
function uploadFailure(asset, response) {
|
|
21
|
-
const name = assetName(asset);
|
|
22
|
-
if (!response) return new AssetSyncError(`Couldn't upload ${name} — the asset store is unreachable. Check your network, then push again.`);
|
|
23
|
-
if (response.status === 404 || response.status === 403) return new AssetSyncError(`Couldn't upload ${name} — the asset store rejected the upload with HTTP ${response.status}. That upload URL is issued by Superwall and expires, so this usually means the storage endpoint is misconfigured or unreachable rather than anything wrong with the file.`);
|
|
24
|
-
return new AssetSyncError(`Couldn't upload ${name} — the asset store returned HTTP ${response.status}.`);
|
|
25
|
-
}
|
|
26
|
-
const CACHE_CONTROL = "public, max-age=31536000, immutable";
|
|
27
|
-
const UPLOAD_CONCURRENCY = 4;
|
|
28
|
-
const pool = async (items, limit, work) => {
|
|
29
|
-
const queue = [...items];
|
|
30
|
-
const runners = Array.from({ length: Math.min(limit, queue.length) }, async () => {
|
|
31
|
-
for (let item = queue.shift(); item !== void 0; item = queue.shift()) await work(item);
|
|
32
|
-
});
|
|
33
|
-
await Promise.all(runners);
|
|
34
|
-
};
|
|
35
|
-
async function syncAssets(input) {
|
|
36
|
-
const { api, paywallId, assets } = input;
|
|
37
|
-
const put = input.put ?? fetch;
|
|
38
|
-
const read = input.read ?? ((path$1) => fs.readFileSync(path$1));
|
|
39
|
-
const totalBytes = assets.reduce((total, asset) => total + asset.bytes, 0);
|
|
40
|
-
if (assets.length === 0) return {
|
|
41
|
-
assets: [],
|
|
42
|
-
uploaded: 0,
|
|
43
|
-
uploadedBytes: 0,
|
|
44
|
-
totalBytes: 0
|
|
45
|
-
};
|
|
46
|
-
const resolved = await pushPaywallAssets(api, paywallId, assets.map((asset) => ({
|
|
47
|
-
sha256: asset.sha256,
|
|
48
|
-
bytes: asset.bytes,
|
|
49
|
-
mime: asset.mime,
|
|
50
|
-
file_name: asset.fileName
|
|
51
|
-
}))).catch((error) => {
|
|
52
|
-
if (error instanceof ApiError && error.status === 404) throw new AssetSyncError("This Superwall environment does not support hosted assets yet. Keep every asset under 32 kB so the snapshot can inline it, or upgrade the platform.");
|
|
53
|
-
throw error;
|
|
54
|
-
});
|
|
55
|
-
const bySha = new Map(resolved.map((entry) => [entry.sha256, entry]));
|
|
56
|
-
const missing = [];
|
|
57
|
-
const hosted = /* @__PURE__ */ new Map();
|
|
58
|
-
for (const asset of assets) {
|
|
59
|
-
const entry = bySha.get(asset.sha256);
|
|
60
|
-
if (!entry) throw new AssetSyncError(`Superwall did not return a URL for ${assetName(asset)} — asset sync is incomplete.`);
|
|
61
|
-
if (!entry.url.endsWith(`/${asset.fileName}`)) throw new AssetSyncError(`Superwall hosted ${asset.fileName} at ${entry.url}, which does not match the URL baked into the snapshot. Delete superwall.lock and push again to rebind this paywall.`);
|
|
62
|
-
hosted.set(asset.sha256, entry.url);
|
|
63
|
-
if (entry.uploadUrl !== void 0) missing.push(asset);
|
|
64
|
-
}
|
|
65
|
-
let uploadedBytes = 0;
|
|
66
|
-
await pool(missing, UPLOAD_CONCURRENCY, async (asset) => {
|
|
67
|
-
const uploadUrl = bySha.get(asset.sha256)?.uploadUrl;
|
|
68
|
-
if (uploadUrl === void 0) return;
|
|
69
|
-
const body = read(asset.path);
|
|
70
|
-
const send = () => put(uploadUrl, {
|
|
71
|
-
method: "PUT",
|
|
72
|
-
headers: {
|
|
73
|
-
"content-type": asset.mime,
|
|
74
|
-
"cache-control": CACHE_CONTROL
|
|
75
|
-
},
|
|
76
|
-
body: new Uint8Array(body)
|
|
77
|
-
});
|
|
78
|
-
let response = await send().catch(() => void 0);
|
|
79
|
-
if (!response?.ok) response = await send().catch(() => void 0);
|
|
80
|
-
if (!response?.ok) throw uploadFailure(asset, response);
|
|
81
|
-
uploadedBytes += asset.bytes;
|
|
82
|
-
});
|
|
83
|
-
return {
|
|
84
|
-
assets: assets.map((asset) => ({
|
|
85
|
-
url: hosted.get(asset.sha256) ?? "",
|
|
86
|
-
mime_type: asset.mime
|
|
87
|
-
})),
|
|
88
|
-
uploaded: missing.length,
|
|
89
|
-
uploadedBytes,
|
|
90
|
-
totalBytes
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
//#endregion
|
|
95
10
|
//#region src/core/paywalls/project/framework.ts
|
|
96
11
|
var FrameworkNotFoundError = class extends Error {
|
|
97
12
|
constructor(dir) {
|
|
@@ -220,8 +135,8 @@ const readSection = (value) => {
|
|
|
220
135
|
return section;
|
|
221
136
|
};
|
|
222
137
|
const CONFLICT_MARKER = /^(<{7}|={7}|>{7})( |$)/m;
|
|
223
|
-
|
|
224
|
-
|
|
138
|
+
var NewerLockError = class extends Error {};
|
|
139
|
+
function parseLockText(text, file) {
|
|
225
140
|
if (CONFLICT_MARKER.test(text)) throw new Error(`${file} has unresolved merge conflicts — resolve them, then run again.`);
|
|
226
141
|
let parsed;
|
|
227
142
|
try {
|
|
@@ -231,14 +146,12 @@ function parseLockFile(file) {
|
|
|
231
146
|
throw new Error(`${file} isn't valid JSON (${reason}) — fix it or restore it from git.`);
|
|
232
147
|
}
|
|
233
148
|
if (!isRecord(parsed) || typeof parsed.version !== "number") throw new Error(`${file} isn't a Superwall lock file — fix it or restore it from git.`);
|
|
234
|
-
if (parsed.version > 1) throw new
|
|
149
|
+
if (parsed.version > 1) throw new NewerLockError(`${file} was written by a newer Superwall CLI (lock version ${parsed.version}) — run \`superwall upgrade\`.`);
|
|
235
150
|
if (parsed.version !== 1) throw new Error(`${file} has an unknown lock version (${parsed.version}) — fix it or restore it from git.`);
|
|
236
151
|
return parsed;
|
|
237
152
|
}
|
|
238
|
-
function
|
|
239
|
-
const
|
|
240
|
-
if (!fs.existsSync(file)) return emptyLock();
|
|
241
|
-
const parsed = parseLockFile(file);
|
|
153
|
+
function parseLock(text, file) {
|
|
154
|
+
const parsed = parseLockText(text, file);
|
|
242
155
|
const lock = emptyLock();
|
|
243
156
|
if (isRecord(parsed.apps)) {
|
|
244
157
|
for (const [platform, id] of Object.entries(parsed.apps)) if (typeof id === "string") lock.apps[platform] = id;
|
|
@@ -251,6 +164,11 @@ function readLock(superwallDir) {
|
|
|
251
164
|
if (Object.keys(sources).length > 0) lock.sources = sources;
|
|
252
165
|
return lock;
|
|
253
166
|
}
|
|
167
|
+
function readLock(superwallDir) {
|
|
168
|
+
const file = lockPath(superwallDir);
|
|
169
|
+
if (!fs.existsSync(file)) return emptyLock();
|
|
170
|
+
return parseLock(fs.readFileSync(file, "utf8"), file);
|
|
171
|
+
}
|
|
254
172
|
function formatLock(lock) {
|
|
255
173
|
const annotated = {
|
|
256
174
|
"//": EXPLAINER,
|
|
@@ -531,10 +449,12 @@ function requireClean(surfaces) {
|
|
|
531
449
|
"Publishing is immutable — fix these first, then push again."
|
|
532
450
|
].join("\n"));
|
|
533
451
|
}
|
|
534
|
-
function storesDiffer(products, live) {
|
|
452
|
+
function storesDiffer(products, live, comparePlans = true) {
|
|
535
453
|
return products.some((product) => {
|
|
536
454
|
const pushed = live?.find((ref) => ref.reference === product.reference_name && ref.identifier === product.identifier);
|
|
537
|
-
|
|
455
|
+
if (pushed === void 0) return false;
|
|
456
|
+
if (pushed.store !== void 0 && pushed.store !== product.store) return true;
|
|
457
|
+
return comparePlans && pushed.billingPlan !== billingPlanOf(product.billing_plan_type);
|
|
538
458
|
});
|
|
539
459
|
}
|
|
540
460
|
function needsWork(built, pushed, live) {
|
|
@@ -542,4 +462,4 @@ function needsWork(built, pushed, live) {
|
|
|
542
462
|
}
|
|
543
463
|
|
|
544
464
|
//#endregion
|
|
545
|
-
export {
|
|
465
|
+
export { removeBinding as A, formatLock as C, parseLock as D, originKey as E, writeOrigin as F, writeSnapshot as I, writeSources as L, writeBinding as M, writeBindings as N, parseSources as O, writeLock as P, frameworkVersion as R, describeBindings as S, isScreenOrigin as T, weight as _, resolveProjectDir as a, writeProjectTypes as b, storesDiffer as c, kb as d, pendingPromoteWarning as f, transition as g, took as h, requireProject as i, writeApp as j, readLock as k, BIND_VERB as l, resolveNote as m, parseIds as n, resolveProjectDirs as o, pushedLine as p, requireClean as r, selectSurfaces as s, needsWork as t, LAYOUT_HINT as u, TYPES_FILE as v, formatSharedLock as w, NewerLockError as x, collectProjectDeclarations as y, resolveFramework as z };
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { v as VERSION } from "./environment-
|
|
2
|
-
import { t as ApiError } from "./client-
|
|
1
|
+
import { v as VERSION } from "./environment-i8BhiBDB.js";
|
|
2
|
+
import { t as ApiError } from "./client-DOgk9gAS.js";
|
|
3
3
|
import { n as ui } from "./ui-D_qf3Gvw.js";
|
|
4
|
-
import {
|
|
5
|
-
import { o as openBrowser } from "./login-
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
4
|
+
import { C as pushPaywallVersion, D as versionProducts, p as listApplications, x as promotePaywallVersion } from "./resources-BTnczJCA.js";
|
|
5
|
+
import { o as openBrowser } from "./login-ONZdK8vN.js";
|
|
6
|
+
import { n as requireAssets, r as syncAssets, t as assetBaseUrl } from "./assets-DXXegdDt.js";
|
|
7
|
+
import { R as frameworkVersion, b as writeProjectTypes, i as requireProject, k as readLock, o as resolveProjectDirs, u as LAYOUT_HINT, y as collectProjectDeclarations, z as resolveFramework } from "./selection-u2KiKu_d.js";
|
|
8
|
+
import { d as writeProjectScaffold, h as wantedPlatforms, l as collectSourceFiles, n as requireApi, p as planTargets, v as resolveApps } from "./session-BDLQUJyV.js";
|
|
9
|
+
import { i as listApplicationCatalogue, l as resolveBinding, n as pushSource, o as listProjectProducts, r as warnNotPortable, s as projectForApplication } from "./source-push-DxuJuwEf.js";
|
|
8
10
|
import { execFile } from "node:child_process";
|
|
9
11
|
import * as fs from "node:fs";
|
|
10
12
|
import * as path from "node:path";
|
|
@@ -368,7 +370,7 @@ function createStudioActions(framework, project) {
|
|
|
368
370
|
html: built.html,
|
|
369
371
|
surface: surface.id,
|
|
370
372
|
assets: synced.assets,
|
|
371
|
-
products: versionProducts(built.products, target.platform, catalogue.stores),
|
|
373
|
+
products: versionProducts(built.products, target.platform, catalogue.stores, built.billingPlans),
|
|
372
374
|
settings: built.settings
|
|
373
375
|
}));
|
|
374
376
|
await step("source", async () => {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import "./token-lUUOkTJA.js";
|
|
2
|
+
import "./output-Ggzq5_-t.js";
|
|
3
|
+
import "./environment-i8BhiBDB.js";
|
|
4
|
+
import "./storage-VagEaaJC.js";
|
|
5
|
+
import "./client-DOgk9gAS.js";
|
|
6
|
+
import "./config-BO1Y87kV.js";
|
|
7
|
+
import "./telemetry-CM0BDwCK.js";
|
|
8
|
+
import "./spawn-DmmmHIP-.js";
|
|
9
|
+
import "./spinner-BN3U1CVB.js";
|
|
10
|
+
import "./ui-D_qf3Gvw.js";
|
|
11
|
+
import "./scan-Dwk_lT5q.js";
|
|
12
|
+
import "./paths-yRgm5Jpa.js";
|
|
13
|
+
import "./resources-BTnczJCA.js";
|
|
14
|
+
import "./lookup-flTi0at0.js";
|
|
15
|
+
import "./login-ONZdK8vN.js";
|
|
16
|
+
import "./skills-zebMTZyr.js";
|
|
17
|
+
import "./assets-DXXegdDt.js";
|
|
18
|
+
import "./selection-u2KiKu_d.js";
|
|
19
|
+
import "./session-BDLQUJyV.js";
|
|
20
|
+
import "./source-push-DxuJuwEf.js";
|
|
21
|
+
import "./login-p9GVEKzD.js";
|
|
22
|
+
import { t as runStudio } from "./server-Cb2N75JL.js";
|
|
23
|
+
|
|
24
|
+
export { runStudio };
|