@superwall/cli 2.6.0-beta.2 → 2.6.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.
Files changed (152) hide show
  1. package/README.md +47 -16
  2. package/dist/{apple-Dc5pOPms.js → apple-BE1GBJFP.js} +17 -19
  3. package/dist/{approve-BSbdmOez.js → approve-yRZmvkCj.js} +9 -11
  4. package/dist/{assets-C_RjojkK.js → assets-DTAgbWw0.js} +3 -3
  5. package/dist/auth.d.ts +11 -4
  6. package/dist/auth.js +4 -5
  7. package/dist/base-zc1wl_9b.js +82 -0
  8. package/dist/{billing-B6HK-F_a.js → billing-C1LV4-BN.js} +3 -3
  9. package/dist/{build-DK88pTMW.js → build-CQd-pf7O.js} +35 -16
  10. package/dist/{client-x08fpvay.js → config-DCqRQTJ4.js} +162 -15
  11. package/dist/create-CSHGZDfB.js +18 -0
  12. package/dist/{create-kpqEhqkk.js → create-Costu6UT.js} +9 -9
  13. package/dist/{create-B6-Dr3GZ.js → create-wlCp83IH.js} +41 -41
  14. package/dist/{doctor-DYbm8IKQ.js → doctor-Bd9ffg51.js} +50 -10
  15. package/dist/entry.js +45 -40
  16. package/dist/{environment-BFNzLLPN.js → environment-Dn7irhZr.js} +1 -1
  17. package/dist/{drivers-Dyi-y9Jn.js → existing-BQMB_2AG.js} +305 -8
  18. package/dist/framework-DW5fqjh4.js +65 -0
  19. package/dist/{source-BccdO4aL.js → git-Hf9Wc7Hp.js} +34 -92
  20. package/dist/{held-sKq3xrsT.js → held-D5wSX2Mf.js} +9 -9
  21. package/dist/held-Dmf5SR3p.js +15 -0
  22. package/dist/{install-DsIsif39.js → install-CxyqfKFe.js} +15 -17
  23. package/dist/{integrate-B8eA676b.js → integrate-MkyDDzI5.js} +33 -38
  24. package/dist/{login-BlpfYapG.js → login-B7IqDafm.js} +3 -3
  25. package/dist/{login-Blhxi20A.js → login-BMHDhxAx.js} +8 -9
  26. package/dist/login-Cp0-BgDZ.js +13 -0
  27. package/dist/{lookup-Dg55W9S7.js → lookup-DkcT4E-5.js} +28 -4
  28. package/dist/{migrate-DoRb9jmA.js → migrate-CdFoZipj.js} +66 -45
  29. package/dist/{notification-url-D82msWF5.js → notification-url-D6KKeXnk.js} +4 -4
  30. package/dist/{open-BAqLpTSI.js → open-COJE6ryI.js} +2 -2
  31. package/dist/{org-C4G7WjTV.js → org-BV8wwxwc.js} +4 -4
  32. package/dist/{organization-CmuQwcKN.js → organization-9R_1PJKk.js} +4 -4
  33. package/dist/{orgs-1OzwUtpT.js → orgs-ltP8H0Nl.js} +1 -2
  34. package/dist/{paths-gBbqgkS7.js → paths-Cb1RfjaX.js} +1 -1
  35. package/dist/{playbook-BKqlv77S.js → playbook-CVGolez9.js} +10 -14
  36. package/dist/{products-Cqq59DBQ.js → products-CJq_iXv5.js} +1 -1
  37. package/dist/{promote-D0i8A0CO.js → promote-B_HnFEbX.js} +27 -28
  38. package/dist/{pull-DgQ_UmGv.js → pull-DF4KYVcP.js} +72 -26
  39. package/dist/pull-JxiMyRwY.js +30 -0
  40. package/dist/{pull-CiIrJ5ik.js → pull-lYRULo4v.js} +33 -39
  41. package/dist/push-B5py7h5y.js +29 -0
  42. package/dist/{push-7N4XIVtg.js → push-BZN1Qpkq.js} +23 -12
  43. package/dist/{push-BWsXO7FN.js → push-BnllH2Rd.js} +8 -7
  44. package/dist/push-DHlUMkbf.js +21 -0
  45. package/dist/registry-BGEYCWyD.js +22 -0
  46. package/dist/{registry-aAR_8VOw.js → registry-CqePfigB.js} +1287 -902
  47. package/dist/{resolve-CcOpO_5s.js → resolve-B4bd3Qjl.js} +4 -4
  48. package/dist/{resources-DNwvf8rg.js → resources-BaURbSpY.js} +15 -2
  49. package/dist/{run-tVYJ3V5j.js → run-Bme4Egyl.js} +15 -17
  50. package/dist/{scan-dv0rrY4C.js → scan-DugxddUU.js} +1 -1
  51. package/dist/scan-J2DILUNE.js +4 -0
  52. package/dist/{scope-ehZ7L1nj.js → scope-Cg1AdAfO.js} +33 -3
  53. package/dist/{scope-BXoQo30_.js → scope-DDYLQeZw.js} +24 -18
  54. package/dist/screenshot-file-Dix2Qynm.js +127 -0
  55. package/dist/{sdk-DEfQttek.js → sdk-BFunw4Hc.js} +1 -1
  56. package/dist/{framework-JFLjmD5Y.js → selection-C439nEhn.js} +4 -54
  57. package/dist/{series-D2ZpZ8cx.js → series-B8NJK4yS.js} +1 -1
  58. package/dist/{server-CcZGdYjE.js → server-C_aMxzvS.js} +40 -18
  59. package/dist/server-Cif9w5lM.js +33 -0
  60. package/dist/{session-dHBtgSN0.js → session-B7frlXXQ.js} +1 -1
  61. package/dist/{base-83ZTv6up.js → session-CfG3gzko.js} +8 -83
  62. package/dist/session-DvaPyOuH.js +5 -0
  63. package/dist/{migration-BUedsREQ.js → setup-DQEasPhx.js} +290 -28
  64. package/dist/skills/index.json +5 -0
  65. package/dist/skills/superwall/SKILL.md +37 -10
  66. package/dist/skills/superwall/references/api.md +66 -21
  67. package/dist/skills/superwall/references/asa.md +109 -64
  68. package/dist/skills/superwall/references/dashboard-links.md +65 -28
  69. package/dist/skills/superwall/references/data-analytics.md +1 -1
  70. package/dist/skills/superwall/workflows/dashboard/setup.md +15 -5
  71. package/dist/skills/superwall/workflows/integrate/flutter.md +9 -7
  72. package/dist/skills/superwall-framework/SKILL.md +248 -36
  73. package/dist/skills/superwall-framework/references/cli.md +98 -7
  74. package/dist/skills/superwall-framework/references/examples.md +2 -2
  75. package/dist/skills/superwall-framework/references/layout.md +30 -2
  76. package/dist/skills/superwall-framework/references/migrate-from-editor.md +5 -0
  77. package/dist/skills/superwall-framework/references/migrate-from-native.md +5 -0
  78. package/dist/skills/teleport/SKILL.md +154 -0
  79. package/dist/skills/teleport/references/experiments.md +328 -0
  80. package/dist/skills/teleport/references/setup.md +157 -0
  81. package/dist/{skills-Q7xB784d.js → skills-DnegE1A6.js} +139 -9
  82. package/dist/{skills-Bqz2l_bx.js → skills-MmF7IyTg.js} +8 -12
  83. package/dist/source-DQs6iLtC.js +82 -0
  84. package/dist/{source-push-CG948HrX.js → source-push-MbJjh4Ki.js} +38 -14
  85. package/dist/{spinner-IA6hV8nI.js → spinner-Dcr-Dqdi.js} +7 -5
  86. package/dist/{starter-BtUUQWhd.js → starter-BlJ_InZJ.js} +2 -2
  87. package/dist/{status-CB_MrFu5.js → status-DHRxg1ZA.js} +9 -11
  88. package/dist/{output-Ggzq5_-t.js → storage-DdIAHolY.js} +40 -1
  89. package/dist/storekit-De998QOt.js +203 -0
  90. package/dist/storekit-iBCWmeKn.js +15 -0
  91. package/dist/{bind-DcWIIPgk.js → theme-BrUrye-c.js} +29 -6
  92. package/dist/token-CKCBQ4I8.js +100 -0
  93. package/dist/tools-skills/animate-onboarding/SKILL.md +1 -1
  94. package/dist/tools-skills/mobile-design/SKILL.md +1 -1
  95. package/dist/tools-skills/onboarding-questions/SKILL.md +1 -1
  96. package/dist/tools-skills/superwall/SKILL.md +43 -17
  97. package/dist/tools-skills/superwall/references/api.md +74 -24
  98. package/dist/tools-skills/superwall/references/asa.md +109 -64
  99. package/dist/tools-skills/superwall/references/dashboard-links.md +65 -28
  100. package/dist/tools-skills/superwall/references/data-analytics.md +1 -1
  101. package/dist/tools-skills/superwall/workflows/dashboard/playbook.md +4 -3
  102. package/dist/tools-skills/superwall/workflows/dashboard/setup.md +21 -8
  103. package/dist/tools-skills/superwall/workflows/integrate/flutter.md +9 -7
  104. package/dist/tools-skills/superwall/workflows/migrate/adapty.md +4 -3
  105. package/dist/tools-skills/superwall/workflows/migrate/playbook.md +2 -2
  106. package/dist/tools-skills/superwall/workflows/migrate/qonversion.md +4 -3
  107. package/dist/tools-skills/superwall/workflows/migrate/revenuecat.md +4 -3
  108. package/dist/tools-skills/superwall-editor/SKILL.md +2 -3
  109. package/dist/tools-skills/teleport/SKILL.md +154 -0
  110. package/dist/tools-skills/teleport/references/experiments.md +328 -0
  111. package/dist/tools-skills/teleport/references/setup.md +157 -0
  112. package/dist/tools.d.ts +1 -1
  113. package/dist/tools.js +1232 -746
  114. package/dist/{try-CS3jLyoP.js → try-C8QQbG0b.js} +17 -19
  115. package/dist/{lock-DgSx-p8Y.js → types-Dc9U_4kp.js} +86 -80
  116. package/dist/upgrade-CYFdpVpi.js +27 -0
  117. package/dist/upgrade-D0thxCA4.js +348 -0
  118. package/package.json +11 -3
  119. package/dist/config-CGcG7GOt.js +0 -113
  120. package/dist/create-Du8Fx7W5.js +0 -20
  121. package/dist/existing-WQ3pz94o.js +0 -97
  122. package/dist/held-DmOhszHR.js +0 -17
  123. package/dist/log-C0MDCfA2.js +0 -62
  124. package/dist/login-D9jfRO8w.js +0 -17
  125. package/dist/pull-CO5HlqBe.js +0 -36
  126. package/dist/push-BIhGDNpL.js +0 -30
  127. package/dist/push-BgqTddLA.js +0 -22
  128. package/dist/run-B-YoyB-a.js +0 -100
  129. package/dist/scan-BU41gcQY.js +0 -4
  130. package/dist/screenshot-file-XAS0Xy0e.js +0 -16
  131. package/dist/server-BemmM1FV.js +0 -29
  132. package/dist/session-4aITGsF1.js +0 -6
  133. package/dist/setup-m94dpT3t.js +0 -217
  134. package/dist/spawn-DmmmHIP-.js +0 -71
  135. package/dist/storage-pR0Wb0d9.js +0 -41
  136. package/dist/storekit-BMxyYAHj.js +0 -17
  137. package/dist/storekit-CQnwlpKV.js +0 -47
  138. package/dist/telemetry-DU56L7Cy.js +0 -56
  139. package/dist/theme-DUsCh-Vd.js +0 -25
  140. package/dist/token-BbUeExGJ.js +0 -70
  141. package/dist/upgrade-CKn88PZD.js +0 -206
  142. package/dist/upgrade-DfD3-ClG.js +0 -7
  143. /package/dist/{browser-Bp3yRKlU.js → browser-BVjaf98V.js} +0 -0
  144. /package/dist/{client-BJQXl62Q.js → client-BwYhzITp.js} +0 -0
  145. /package/dist/{design-lint-CiFc78aM.js → design-lint-mgO-2SGS.js} +0 -0
  146. /package/dist/{devtools-ByZ6XYnn.js → devtools-B6Vp6HMy.js} +0 -0
  147. /package/dist/{input-MDd67UIp.js → input-DOT_2Zvb.js} +0 -0
  148. /package/dist/{project-NoMtbMyl.js → project-BomArwSj.js} +0 -0
  149. /package/dist/{reports-HYVp169R.js → reports-hbxsd3Zo.js} +0 -0
  150. /package/dist/{storage-Bdz5AmqS.d.ts → storage-Bh3wT1Rn.d.ts} +0 -0
  151. /package/dist/{timing-Ca0TXY-A.js → timing-BKEEIBij.js} +0 -0
  152. /package/dist/{ui-D_qf3Gvw.js → ui-hFgji1e8.js} +0 -0
@@ -1,12 +1,15 @@
1
- import { x as VERSION } from "./environment-BFNzLLPN.js";
2
- import { n as ui } from "./ui-D_qf3Gvw.js";
3
- import { f as listAppPaywalls, v as mintSourceAccess } from "./resources-DNwvf8rg.js";
4
- import { n as findApplication, t as appNotFound } from "./lookup-Dg55W9S7.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-83ZTv6up.js";
7
- import { n as resolveFramework, o as requireProject, s as resolveProjectDir } from "./framework-JFLjmD5Y.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-m94dpT3t.js";
1
+ import { x as VERSION } from "./environment-Dn7irhZr.js";
2
+ import { f as listAppPaywalls, v as mintSourceAccess } from "./resources-BaURbSpY.js";
3
+ import { n as ui } from "./ui-hFgji1e8.js";
4
+ import { n as findApplication, t as appNotFound } from "./lookup-DkcT4E-5.js";
5
+ import { _ as writeLock, f as readLock, i as NewerLockError, l as originKey, n as collectProjectDeclarations, r as writeProjectTypes, t as TYPES_FILE, u as parseLock } from "./types-Dc9U_4kp.js";
6
+ import { a as PLATFORMS, c as requirePlatform, n as requireApi } from "./session-CfG3gzko.js";
7
+ import { a as devCommand, i as detectPackageManager, l as selectWorkspaceInstallNote } from "./setup-DQEasPhx.js";
8
+ import { i as resolveFramework } from "./framework-DW5fqjh4.js";
9
+ import { i as statIfPresent, n as pullSourceTree } from "./git-Hf9Wc7Hp.js";
10
+ import { n as writeSourceBase, r as parsePlatformFlags, t as readSourceBase } from "./base-zc1wl_9b.js";
11
+ import { a as resolveProjectDir, i as requireProject } from "./selection-C439nEhn.js";
12
+ import { t as collectSourceFiles } from "./source-DQs6iLtC.js";
10
13
  import * as fs from "node:fs";
11
14
  import * as path from "node:path";
12
15
  import pc from "picocolors";
@@ -30,26 +33,56 @@ function boundPaywall(lock, platforms) {
30
33
  if (binding) return binding.paywallId;
31
34
  }
32
35
  }
33
- const mergeSection = (local, remote) => {
34
- const merged = {};
35
- for (const id of new Set([...Object.keys(remote), ...Object.keys(local)])) {
36
+ const sameBinding = (a, b) => a?.paywallId === b?.paywallId && a?.snapshot === b?.snapshot;
37
+ function chooseBinding(own, other, synced, threeWay) {
38
+ if (own?.sourcePending !== void 0) return own;
39
+ if (threeWay) {
40
+ if (sameBinding(other, synced)) return own;
41
+ if (sameBinding(own, synced)) return other;
42
+ }
43
+ if (!other) return own;
44
+ return own && own.paywallId !== other.paywallId ? own : other;
45
+ }
46
+ const mergeSection = (local, remote, base) => {
47
+ const chosen = [...Object.keys(local), ...Object.keys(remote).filter((id) => !(id in local))].map((id) => {
36
48
  const mine = local[id] ?? {};
37
49
  const theirs = remote[id] ?? {};
38
- const bindings = {};
39
- for (const platform of new Set([...Object.keys(theirs), ...Object.keys(mine)])) {
40
- const own = mine[platform];
41
- const other = theirs[platform];
42
- const chosen = !other || own && (own.sourcePending !== void 0 || own.paywallId !== other.paywallId) ? own : other;
43
- if (chosen) bindings[platform] = chosen;
50
+ return {
51
+ id,
52
+ picks: [...new Set([...Object.keys(theirs), ...Object.keys(mine)])].map((platform) => ({
53
+ platform,
54
+ own: mine[platform],
55
+ binding: chooseBinding(mine[platform], theirs[platform], base?.[id]?.[platform], base !== void 0)
56
+ }))
57
+ };
58
+ });
59
+ const picks = chosen.flatMap(({ picks: picks$1 }) => picks$1);
60
+ const key = (platform, binding) => JSON.stringify([platform, binding.paywallId]);
61
+ for (let changed = true; changed;) {
62
+ changed = false;
63
+ const users = /* @__PURE__ */ new Map();
64
+ for (const { platform, binding } of picks) if (binding) users.set(key(platform, binding), (users.get(key(platform, binding)) ?? 0) + 1);
65
+ for (const pick of picks) {
66
+ if (!pick.binding || pick.binding === pick.own) continue;
67
+ if ((users.get(key(pick.platform, pick.binding)) ?? 0) < 2) continue;
68
+ pick.binding = pick.own;
69
+ changed = true;
44
70
  }
45
- merged[id] = bindings;
71
+ }
72
+ const merged = {};
73
+ for (const { id, picks: picks$1 } of chosen) {
74
+ const bindings = {};
75
+ for (const { platform, binding } of picks$1) if (binding) bindings[platform] = binding;
76
+ const emptyHere = id in local && Object.keys(local[id] ?? {}).length === 0;
77
+ if (Object.keys(bindings).length > 0 || emptyHere) merged[id] = bindings;
46
78
  }
47
79
  return merged;
48
80
  };
49
81
  function sharedPlatforms(local, remote, platforms) {
82
+ const pulled = platforms === void 0 ? void 0 : new Set(platforms.map((platform) => local.apps[platform]).filter((app) => app !== void 0));
50
83
  const shared = /* @__PURE__ */ new Set();
51
84
  for (const [platform, applicationId] of Object.entries(remote.apps)) {
52
- if (platforms !== void 0 && !platforms.includes(platform)) continue;
85
+ if (!(platforms === void 0 || platforms.includes(platform)) && !pulled?.has(local.apps[platform] ?? "")) continue;
53
86
  const mine = local.apps[platform];
54
87
  if (mine !== void 0 && mine !== applicationId) continue;
55
88
  shared.add(platform);
@@ -64,7 +97,15 @@ const onlyPlatforms = (section, allowed) => {
64
97
  }
65
98
  return kept;
66
99
  };
67
- function mergePulledLock(local, remoteText, platforms) {
100
+ function syncedLock(text) {
101
+ if (text === void 0) return void 0;
102
+ try {
103
+ return parseLock(text, "The superwall.lock at the last sync");
104
+ } catch {
105
+ return;
106
+ }
107
+ }
108
+ function mergePulledLock(local, remoteText, platforms, baseText) {
68
109
  if (remoteText === void 0) return local;
69
110
  let remote;
70
111
  try {
@@ -75,17 +116,20 @@ function mergePulledLock(local, remoteText, platforms) {
75
116
  return local;
76
117
  }
77
118
  const allowed = sharedPlatforms(local, remote, platforms);
119
+ const apps = Object.fromEntries(Object.entries(remote.apps).filter(([platform]) => allowed.has(platform)));
120
+ const base = syncedLock(baseText);
78
121
  const merged = {
79
122
  version: 1,
80
123
  apps: {
81
- ...Object.fromEntries(Object.entries(remote.apps).filter(([platform]) => allowed.has(platform))),
124
+ ...apps,
82
125
  ...local.apps
83
126
  },
84
- paywalls: mergeSection(local.paywalls, onlyPlatforms(remote.paywalls, allowed)),
85
- funnels: mergeSection(local.funnels, onlyPlatforms(remote.funnels, allowed))
127
+ paywalls: mergeSection(local.paywalls, onlyPlatforms(remote.paywalls, allowed), base && onlyPlatforms(base.paywalls, allowed)),
128
+ funnels: mergeSection(local.funnels, onlyPlatforms(remote.funnels, allowed), base && onlyPlatforms(base.funnels, allowed))
86
129
  };
130
+ const kept = new Set([...Object.keys(merged.paywalls).map((id) => originKey("paywall", id)), ...Object.keys(merged.funnels).map((id) => originKey("funnel", id))]);
87
131
  const origins = {
88
- ...remote.origins,
132
+ ...Object.fromEntries(Object.entries(remote.origins ?? {}).filter(([key]) => kept.has(key))),
89
133
  ...local.origins
90
134
  };
91
135
  if (Object.keys(origins).length > 0) merged.origins = origins;
@@ -189,7 +233,7 @@ async function pullInto(superwallDir, access, theirs, platforms) {
189
233
  theirs
190
234
  });
191
235
  if (pulled.status === "empty") return void 0;
192
- const lock = mergePulledLock(readLock(superwallDir), pulled.lock, platforms);
236
+ const lock = mergePulledLock(readLock(superwallDir), pulled.lock, platforms, pulled.baseLock);
193
237
  const applied = applyPulledChanges(superwallDir, pulled.changes, new Set(files.map((file) => file.path)));
194
238
  writeLock(superwallDir, lock);
195
239
  writeSourceBase(superwallDir, access.repo, pulled.head);
@@ -243,6 +287,8 @@ async function runClone(appRef, root, flags, api) {
243
287
  const manager = await detectPackageManager(superwallDir);
244
288
  const where = path.relative(process.cwd(), superwallDir) || ".";
245
289
  ui.info([`${pc.bold(`${platform} app ${applicationId}`)} pulled ${written.length} ${written.length === 1 ? "file" : "files"} into ${where}`, ...describeChanges(written)].join("\n"));
290
+ const note = selectWorkspaceInstallNote(manager, superwallDir);
291
+ if (note !== void 0) ui.info(note);
246
292
  ui.outro(`Next: cd ${where} && ${manager} install && ${devCommand(manager)}`);
247
293
  }
248
294
  async function runPull(ctx, { args, flags }) {
@@ -0,0 +1,30 @@
1
+ import "./token-CKCBQ4I8.js";
2
+ import "./storage-DdIAHolY.js";
3
+ import "./environment-Dn7irhZr.js";
4
+ import "./config-DCqRQTJ4.js";
5
+ import "./skills-DnegE1A6.js";
6
+ import "./scan-DugxddUU.js";
7
+ import "./resources-BaURbSpY.js";
8
+ import "./orgs-ltP8H0Nl.js";
9
+ import "./ui-hFgji1e8.js";
10
+ import "./spinner-Dcr-Dqdi.js";
11
+ import "./org-BV8wwxwc.js";
12
+ import "./theme-BrUrye-c.js";
13
+ import "./lookup-DkcT4E-5.js";
14
+ import "./types-Dc9U_4kp.js";
15
+ import "./session-CfG3gzko.js";
16
+ import "./existing-BQMB_2AG.js";
17
+ import "./paths-Cb1RfjaX.js";
18
+ import "./setup-DQEasPhx.js";
19
+ import "./framework-DW5fqjh4.js";
20
+ import "./login-BMHDhxAx.js";
21
+ import "./browser-BVjaf98V.js";
22
+ import "./login-B7IqDafm.js";
23
+ import "./git-Hf9Wc7Hp.js";
24
+ import "./scope-Cg1AdAfO.js";
25
+ import "./base-zc1wl_9b.js";
26
+ import "./selection-C439nEhn.js";
27
+ import "./source-DQs6iLtC.js";
28
+ 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-DF4KYVcP.js";
29
+
30
+ export { PullPathError, applyPulledChanges, appsToPull, boundPaywall, cloneInto, cloneTarget, mergePulledLock, pullInto, runPull };
@@ -1,43 +1,37 @@
1
- import "./token-BbUeExGJ.js";
2
- import "./output-Ggzq5_-t.js";
3
- import "./environment-BFNzLLPN.js";
4
- import "./storage-pR0Wb0d9.js";
5
- import "./client-x08fpvay.js";
6
- import "./config-CGcG7GOt.js";
7
- import "./telemetry-DU56L7Cy.js";
8
- import "./spawn-DmmmHIP-.js";
9
- import "./spinner-IA6hV8nI.js";
10
- import "./ui-D_qf3Gvw.js";
11
- import "./theme-DUsCh-Vd.js";
12
- import "./log-C0MDCfA2.js";
13
- import "./scan-dv0rrY4C.js";
14
- import "./existing-WQ3pz94o.js";
15
- import "./paths-gBbqgkS7.js";
16
- import "./orgs-1OzwUtpT.js";
17
- import "./resources-DNwvf8rg.js";
18
- import "./org-C4G7WjTV.js";
19
- import "./lookup-Dg55W9S7.js";
20
- import "./bind-DcWIIPgk.js";
21
- import "./login-Blhxi20A.js";
22
- import "./skills-Q7xB784d.js";
23
- import "./browser-Bp3yRKlU.js";
24
- import { E as mintSourceAccess, d as resolveArtifact, g as writeBinding, h as readSourceFile, m as readBinding, u as projectRoot } from "./resolve-CcOpO_5s.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-CmuQwcKN.js";
1
+ import "./token-CKCBQ4I8.js";
2
+ import "./storage-DdIAHolY.js";
3
+ import "./environment-Dn7irhZr.js";
4
+ import "./config-DCqRQTJ4.js";
5
+ import "./skills-DnegE1A6.js";
6
+ import "./scan-DugxddUU.js";
7
+ import "./resources-BaURbSpY.js";
8
+ import "./orgs-ltP8H0Nl.js";
9
+ import "./ui-hFgji1e8.js";
10
+ import "./spinner-Dcr-Dqdi.js";
11
+ import "./org-BV8wwxwc.js";
12
+ import "./theme-BrUrye-c.js";
13
+ import "./lookup-DkcT4E-5.js";
14
+ import "./types-Dc9U_4kp.js";
15
+ import "./session-CfG3gzko.js";
16
+ import "./existing-BQMB_2AG.js";
17
+ import "./paths-Cb1RfjaX.js";
18
+ import "./setup-DQEasPhx.js";
19
+ import "./framework-DW5fqjh4.js";
20
+ import "./login-BMHDhxAx.js";
21
+ import "./browser-BVjaf98V.js";
22
+ import "./login-B7IqDafm.js";
23
+ import { n as pullSourceTree } from "./git-Hf9Wc7Hp.js";
24
+ import { t as ARTIFACT_DERIVED_FILES } from "./scope-Cg1AdAfO.js";
25
+ import { E as mintSourceAccess, d as resolveArtifact, g as writeBinding, h as readSourceFile, m as readBinding, u as projectRoot } from "./resolve-B4bd3Qjl.js";
26
+ import { t as ArtifactError } from "./project-BomArwSj.js";
27
+ import "./organization-9R_1PJKk.js";
29
28
  import "./download-DhGd4hOB.js";
30
- import "./sdk-DEfQttek.js";
31
- import "./base-83ZTv6up.js";
32
- import "./framework-JFLjmD5Y.js";
33
- import "./run-B-YoyB-a.js";
34
- import "./drivers-Dyi-y9Jn.js";
35
- import "./migration-BUedsREQ.js";
36
- import "./login-BlpfYapG.js";
37
- import { r as pullSourceTree, t as collectSourceFiles } from "./source-BccdO4aL.js";
38
- import "./setup-m94dpT3t.js";
39
- import { n as applyPulledChanges } from "./pull-DgQ_UmGv.js";
40
- import { a as toSourceAccess } from "./push-BWsXO7FN.js";
29
+ import "./sdk-BFunw4Hc.js";
30
+ import "./base-zc1wl_9b.js";
31
+ import "./selection-C439nEhn.js";
32
+ import { t as collectSourceFiles } from "./source-DQs6iLtC.js";
33
+ import { n as applyPulledChanges } from "./pull-DF4KYVcP.js";
34
+ import { a as toSourceAccess } from "./push-BnllH2Rd.js";
41
35
  import * as fs from "node:fs";
42
36
  import * as path from "node:path";
43
37
 
@@ -0,0 +1,29 @@
1
+ import "./token-CKCBQ4I8.js";
2
+ import "./storage-DdIAHolY.js";
3
+ import "./environment-Dn7irhZr.js";
4
+ import "./config-DCqRQTJ4.js";
5
+ import "./skills-DnegE1A6.js";
6
+ import "./scan-DugxddUU.js";
7
+ import "./resources-BaURbSpY.js";
8
+ import "./orgs-ltP8H0Nl.js";
9
+ import "./ui-hFgji1e8.js";
10
+ import "./spinner-Dcr-Dqdi.js";
11
+ import "./lookup-DkcT4E-5.js";
12
+ import "./types-Dc9U_4kp.js";
13
+ import "./session-CfG3gzko.js";
14
+ import "./paths-Cb1RfjaX.js";
15
+ import "./framework-DW5fqjh4.js";
16
+ import "./login-BMHDhxAx.js";
17
+ import "./browser-BVjaf98V.js";
18
+ import "./login-B7IqDafm.js";
19
+ import "./git-Hf9Wc7Hp.js";
20
+ import "./scope-Cg1AdAfO.js";
21
+ import "./base-zc1wl_9b.js";
22
+ import "./selection-C439nEhn.js";
23
+ import "./source-DQs6iLtC.js";
24
+ import "./assets-DTAgbWw0.js";
25
+ import "./design-lint-mgO-2SGS.js";
26
+ import "./source-push-MbJjh4Ki.js";
27
+ import { i as timed, n as runPush, r as runPushPipeline, t as group } from "./push-BZN1Qpkq.js";
28
+
29
+ export { group, runPush, runPushPipeline, timed };
@@ -1,13 +1,15 @@
1
- import { x as VERSION } from "./environment-BFNzLLPN.js";
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-DNwvf8rg.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-83ZTv6up.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-JFLjmD5Y.js";
7
- import { t as collectSourceFiles } from "./source-BccdO4aL.js";
8
- import { n as requireAssets, r as syncAssets, t as assetBaseUrl } from "./assets-C_RjojkK.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-CG948HrX.js";
1
+ import { x as VERSION } from "./environment-Dn7irhZr.js";
2
+ import { C as pushPaywallVersion, D as versionProducts, b as platformStore, g as livePaywall, w as pushedProducts, x as promotePaywallVersion, y as platformLabel } from "./resources-BaURbSpY.js";
3
+ import { n as ui } from "./ui-hFgji1e8.js";
4
+ import { a as describeBindings, f as readLock, g as writeBindings, n as collectProjectDeclarations, p as removeBinding, r as writeProjectTypes, y as writeSnapshot } from "./types-Dc9U_4kp.js";
5
+ import { i as writeProjectScaffold, l as resolveApps, n as requireApi, s as platformFor } from "./session-CfG3gzko.js";
6
+ import { i as resolveFramework, n as frameworkVersion } from "./framework-DW5fqjh4.js";
7
+ import { a as surfaceKey, i as planTargets, o as targetLabel, r as parsePlatformFlags, s as wantedPlatforms } from "./base-zc1wl_9b.js";
8
+ import { _ as weight, a as resolveProjectDir, c as storesDiffer, d as kb, f as pendingPromoteWarning, g as transition, h as took, i as requireProject, l as BIND_VERB, m as resolveNote, p as pushedLine, r as requireClean, s as selectSurfaces, t as needsWork } from "./selection-C439nEhn.js";
9
+ import { t as collectSourceFiles } from "./source-DQs6iLtC.js";
10
+ import { n as requireAssets, r as syncAssets, t as assetBaseUrl } from "./assets-DTAgbWw0.js";
11
+ import { n as lintDesignTokens, t as formatTokenFinding } from "./design-lint-mgO-2SGS.js";
12
+ 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-MbJjh4Ki.js";
11
13
  import { cpus } from "node:os";
12
14
  import pc from "picocolors";
13
15
 
@@ -395,6 +397,12 @@ async function pushVersion(context, input, lines, note) {
395
397
  const { target, bind, build } = input;
396
398
  const assets = requireAssets(build);
397
399
  lines.push(assets.length > 0 ? `Built ${pc.dim(`${kb(build.bytes)} html + ${weight(build.assetBytes ?? 0)} assets`)}` : `Built ${pc.dim(`${kb(build.bytes)} · ${build.snapshotId.slice(0, 8)}`)}`);
400
+ const teleportPages = build.teleportPages ?? [];
401
+ if (teleportPages.length > 0) {
402
+ const bytes = teleportPages.reduce((total, page) => total + Buffer.byteLength(page.html), 0);
403
+ lines.push(`Teleport pages ${pc.dim(`${teleportPages.length} pre-rendered (${kb(bytes)})`)}`);
404
+ }
405
+ for (const warning of build.warnings ?? []) lines.push(pc.yellow(warning));
398
406
  note("Syncing assets");
399
407
  const synced = await timed(() => syncAssets({
400
408
  api: context.api,
@@ -415,7 +423,9 @@ async function pushVersion(context, input, lines, note) {
415
423
  assets: synced.value.assets,
416
424
  products,
417
425
  settings: build.settings,
418
- locales: build.locales
426
+ locales: build.locales,
427
+ frameworkVersion: input.frameworkVersion,
428
+ teleportPages
419
429
  }));
420
430
  lines.push(`${pushedLine({
421
431
  version: push.value.version,
@@ -490,7 +500,8 @@ async function runPushPipeline(context, options) {
490
500
  build,
491
501
  stores,
492
502
  wasLive,
493
- promoting: options.promote
503
+ promoting: options.promote,
504
+ frameworkVersion: installed
494
505
  }, lines, note);
495
506
  writeSnapshot(project.superwallDir, surface.kind, surface.id, target.platform, {
496
507
  snapshot: build.snapshotId,
@@ -1,10 +1,11 @@
1
- import { x as VERSION } from "./environment-BFNzLLPN.js";
2
- import { n as ApiUnreachableError, t as ApiError } from "./client-x08fpvay.js";
3
- import { E as mintSourceAccess, S as listArtifacts, b as getBuild, c as openLink, g as writeBinding, h as readSourceFile, i as installHints, k as startBuild, m as readBinding, p as visibilityOf, s as notInstalledOf, v as createArtifact, x as getMe } from "./resolve-CcOpO_5s.js";
4
- import { s as readProject, t as ArtifactError } from "./project-NoMtbMyl.js";
5
- import { n as resolveOrganization } from "./organization-CmuQwcKN.js";
6
- import { i as warnIfSdkBehind, r as vendoredVersion } from "./sdk-DEfQttek.js";
7
- import { i as pushSourceTree, n as gitAvailable, t as collectSourceFiles } from "./source-BccdO4aL.js";
1
+ import { x as VERSION } from "./environment-Dn7irhZr.js";
2
+ import { b as ApiUnreachableError, y as ApiError } from "./config-DCqRQTJ4.js";
3
+ import { r as pushSourceTree, t as gitAvailable } from "./git-Hf9Wc7Hp.js";
4
+ import { E as mintSourceAccess, S as listArtifacts, b as getBuild, c as openLink, g as writeBinding, h as readSourceFile, i as installHints, k as startBuild, m as readBinding, p as visibilityOf, s as notInstalledOf, v as createArtifact, x as getMe } from "./resolve-B4bd3Qjl.js";
5
+ import { s as readProject, t as ArtifactError } from "./project-BomArwSj.js";
6
+ import { n as resolveOrganization } from "./organization-9R_1PJKk.js";
7
+ import { i as warnIfSdkBehind, r as vendoredVersion } from "./sdk-BFunw4Hc.js";
8
+ import { t as collectSourceFiles } from "./source-DQs6iLtC.js";
8
9
  import { setTimeout } from "node:timers/promises";
9
10
 
10
11
  //#region src/core/artifacts/push.ts
@@ -0,0 +1,21 @@
1
+ import "./token-CKCBQ4I8.js";
2
+ import "./storage-DdIAHolY.js";
3
+ import "./environment-Dn7irhZr.js";
4
+ import "./config-DCqRQTJ4.js";
5
+ import "./resources-BaURbSpY.js";
6
+ import "./orgs-ltP8H0Nl.js";
7
+ import "./ui-hFgji1e8.js";
8
+ import "./spinner-Dcr-Dqdi.js";
9
+ import "./lookup-DkcT4E-5.js";
10
+ import "./types-Dc9U_4kp.js";
11
+ import "./git-Hf9Wc7Hp.js";
12
+ import "./scope-Cg1AdAfO.js";
13
+ import "./resolve-B4bd3Qjl.js";
14
+ import "./project-BomArwSj.js";
15
+ import "./organization-9R_1PJKk.js";
16
+ import "./download-DhGd4hOB.js";
17
+ import "./sdk-BFunw4Hc.js";
18
+ import "./source-DQs6iLtC.js";
19
+ import { a as toSourceAccess, i as slugOfName, n as namesOf, o as waitForBuild, r as runArtifactPush, t as IncomingCommitsRefused } from "./push-BnllH2Rd.js";
20
+
21
+ export { IncomingCommitsRefused, namesOf, runArtifactPush, slugOfName, toSourceAccess, waitForBuild };
@@ -0,0 +1,22 @@
1
+ import "./token-CKCBQ4I8.js";
2
+ import "./storage-DdIAHolY.js";
3
+ import "./environment-Dn7irhZr.js";
4
+ import "./config-DCqRQTJ4.js";
5
+ import "./held-D5wSX2Mf.js";
6
+ import "./resources-BaURbSpY.js";
7
+ import "./orgs-ltP8H0Nl.js";
8
+ import "./ui-hFgji1e8.js";
9
+ import "./spinner-Dcr-Dqdi.js";
10
+ import "./org-BV8wwxwc.js";
11
+ import "./theme-BrUrye-c.js";
12
+ import "./lookup-DkcT4E-5.js";
13
+ import { n as listGroups, t as GROUPS } from "./registry-CqePfigB.js";
14
+ import "./session-B7frlXXQ.js";
15
+ import "./scope-DDYLQeZw.js";
16
+ import "./client-BwYhzITp.js";
17
+ import "./products-CJq_iXv5.js";
18
+ import "./input-DOT_2Zvb.js";
19
+ import "./timing-BKEEIBij.js";
20
+ import "./notification-url-D6KKeXnk.js";
21
+
22
+ export { GROUPS, listGroups };