@superwall/cli 1.1.1 → 1.3.0-beta.3

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 (52) hide show
  1. package/README.md +37 -4
  2. package/dist/{actions-I5gVO5jN.js → actions-DvHycH3X.js} +2 -2
  3. package/dist/{api-emImQnVy.js → api-B50i89j0.js} +9 -9
  4. package/dist/{api-output-B5hh0q4V.js → api-output-D9ggXQIr.js} +1 -1
  5. package/dist/{app-DE9lxNNV.js → app-FiC9SQVp.js} +11 -11
  6. package/dist/asa-B5hrBL3t.js +1194 -0
  7. package/dist/{asc-DYc_Yo9e.js → asc-CRtRYv17.js} +13 -13
  8. package/dist/{auth-Bir_Un8l.js → auth-CYognaF4.js} +10 -10
  9. package/dist/auth.js +2 -2
  10. package/dist/{billing-CW0diI2X.js → billing-CSOUhWso.js} +1 -1
  11. package/dist/{bind-DO11eXrR.js → bind-BbzBenoP.js} +4 -4
  12. package/dist/{command-CmJMNVVz.js → command-B7Te31wp.js} +96 -101
  13. package/dist/{create-CwDgWW16.js → create--Q8nPgoa.js} +18 -18
  14. package/dist/{dev-OnmMOsgK.js → dev-Dr6gXH-o.js} +37 -19
  15. package/dist/{doctor-CpYkDfdC.js → doctor-Cf0qNjbq.js} +10 -10
  16. package/dist/{drivers-Cweb9bWA.js → drivers-ItOmKzrw.js} +2 -2
  17. package/dist/entry.js +531 -279
  18. package/dist/{existing-p-hX-Nxc.js → existing-B-e22WOr.js} +2 -2
  19. package/dist/{feedback-CV4JnRuk.js → feedback-C3UtAxye.js} +9 -9
  20. package/dist/{git-BrTxQ7ui.js → git-2wRxiwOc.js} +10 -10
  21. package/dist/{hosted-CbNJSJAC.js → hosted-vk05ZF6w.js} +3 -3
  22. package/dist/{integrate-DOLvHr1D.js → integrate-Cv8r_i2l.js} +30 -29
  23. package/dist/{login-B7fSpJKc.js → login-DOES7Kup.js} +8 -7
  24. package/dist/{migrate-Bn5btm_H.js → migrate-C7R29RPH.js} +20 -20
  25. package/dist/{org-B2gy9Pmu.js → org-Cg25bcsj.js} +3 -3
  26. package/dist/output-D2Ax_hHL.js +123 -0
  27. package/dist/{params-Bvq0iqQK.js → params-B1zeElGa.js} +1 -2
  28. package/dist/{pipeline-COr4sB6U.js → pipeline-BVeUA6Ig.js} +106 -173
  29. package/dist/{print-skill-D0j2D6tw.js → print-skill-D-R81bno.js} +7 -7
  30. package/dist/{promote-UmKZySRx.js → promote-CV_Lsmqd.js} +18 -18
  31. package/dist/publish-CSnNvHHi.js +35 -0
  32. package/dist/push-sjnRI6iL.js +35 -0
  33. package/dist/{query-CbGfXmKu.js → query-CdcWSinl.js} +10 -10
  34. package/dist/{resource-m6yz1jwE.js → resource-PVg0uzSK.js} +14 -14
  35. package/dist/{resources-CVrWwA1K.js → resources-s64mBHaC.js} +1 -0
  36. package/dist/{run-BTLaOoKK.js → run-XIkrFIgw.js} +2 -2
  37. package/dist/{scan-BfoeYW1v.js → scan-Dk0ZlCY6.js} +2 -2
  38. package/dist/{skills-HlIKA9xR.js → skills-B-mR2CqM.js} +4 -3
  39. package/dist/{skills-C4Yzl64N.js → skills-CoEIW0mE.js} +8 -8
  40. package/dist/{spinner-gOxIMz-V.js → spinner-B9dT3DBY.js} +1 -1
  41. package/dist/{telemetry-CLi7mjDP.js → telemetry-yJs7t0rt.js} +6 -41
  42. package/dist/{token-DHRH8cxi.js → token-GcbyH6G8.js} +2 -2
  43. package/dist/{ui-C4ncRJqd.js → ui-Lqt_zFOr.js} +5 -1
  44. package/dist/update-B4hoLAN-.js +59 -0
  45. package/dist/{upgrade-Cbh-7q_o.js → upgrade-ByCYDXgb.js} +6 -6
  46. package/package.json +4 -3
  47. package/dist/json-C3hPIMkI.js +0 -7
  48. package/dist/publish-BVnG2UOU.js +0 -35
  49. package/dist/push-hHtVTZ1m.js +0 -35
  50. package/dist/update-CxP4fmMe.js +0 -137
  51. /package/dist/{asc-products-YQ6Oc6YO.js → asc-products-C6MvSy8H.js} +0 -0
  52. /package/dist/{storekit-Ddvs4Ynw.js → storekit-DPonXSwe.js} +0 -0
@@ -1,8 +1,8 @@
1
- import { b as ASSET_HOST, k as VERSION } from "./telemetry-CLi7mjDP.js";
2
- import { n as ApiError } from "./command-CmJMNVVz.js";
3
- import { n as ui } from "./ui-C4ncRJqd.js";
4
- import { S as pushPaywallVersion, T as versionProducts, a as createHeadlessPaywall, b as promotePaywallVersion, d as listAppPaywalls, g as livePaywall, m as listProjects, u as linkSourceCommit, v as mintSourceAccess, x as pushPaywallAssets, y as platformLabel } from "./resources-CVrWwA1K.js";
5
- import { _ as writeSnapshot, c as platformFor, d as describeBindings, f as readLock, g as writeBindings, h as writeBinding, n as pushSourceTree, o as writeProjectScaffold, p as removeBinding, s as describePlatforms, t as gitAvailable, u as resolveApps } from "./git-BrTxQ7ui.js";
1
+ import { g as VERSION, o as ASSET_HOST } from "./output-D2Ax_hHL.js";
2
+ import { n as ApiError } from "./command-B7Te31wp.js";
3
+ import { n as ui } from "./ui-Lqt_zFOr.js";
4
+ import { S as pushPaywallVersion, T as versionProducts, a as createHeadlessPaywall, b as promotePaywallVersion, d as listAppPaywalls, g as livePaywall, m as listProjects, u as linkSourceCommit, v as mintSourceAccess, x as pushPaywallAssets, y as platformLabel } from "./resources-s64mBHaC.js";
5
+ import { _ as writeSnapshot, c as platformFor, d as describeBindings, f as readLock, g as writeBindings, h as writeBinding, n as pushSourceTree, o as writeProjectScaffold, p as removeBinding, s as describePlatforms, t as gitAvailable, u as resolveApps } from "./git-2wRxiwOc.js";
6
6
  import { createRequire } from "node:module";
7
7
  import pc from "picocolors";
8
8
  import * as fs from "node:fs";
@@ -12,6 +12,7 @@ import * as path from "node:path";
12
12
  import { join, resolve } from "node:path";
13
13
  import { pathToFileURL } from "node:url";
14
14
  import fg from "fast-glob";
15
+ import { productVariables } from "@superwall/studio/products";
15
16
 
16
17
  //#region src/core/paywalls/project/types.ts
17
18
  const TYPES_FILE = "superwall.d.ts";
@@ -144,7 +145,7 @@ async function loadFramework(cwd) {
144
145
 
145
146
  //#endregion
146
147
  //#region src/core/paywalls/assets.ts
147
- const assetBaseUrl = (applicationId) => `${ASSET_HOST}/${applicationId}`;
148
+ const assetBaseUrl = (applicationId) => `${ASSET_HOST()}/${applicationId}`;
148
149
  function requireAssets(built) {
149
150
  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.");
150
151
  return built.assets;
@@ -328,81 +329,6 @@ function planTargets(input) {
328
329
 
329
330
  //#endregion
330
331
  //#region src/core/paywalls/products.ts
331
- const SYMBOLS = {
332
- USD: "$",
333
- CAD: "$",
334
- AUD: "$",
335
- NZD: "$",
336
- EUR: "€",
337
- GBP: "£",
338
- JPY: "¥",
339
- CNY: "¥",
340
- INR: "₹",
341
- KRW: "₩",
342
- BRL: "R$",
343
- MXN: "$",
344
- CHF: "CHF",
345
- SEK: "kr",
346
- NOK: "kr",
347
- DKK: "kr",
348
- PLN: "zł",
349
- TRY: "₺",
350
- RUB: "₽",
351
- ZAR: "R"
352
- };
353
- const MINOR = 100;
354
- const PER_YEAR = {
355
- day: 365,
356
- week: 52,
357
- month: 12,
358
- year: 1
359
- };
360
- const symbolFor = (currency) => SYMBOLS[currency.toUpperCase()] ?? "";
361
- const money = (amount, currency) => {
362
- try {
363
- return new Intl.NumberFormat("en-US", {
364
- style: "currency",
365
- currency
366
- }).format(amount);
367
- } catch {
368
- return `${symbolFor(currency)}${amount.toFixed(2)}`;
369
- }
370
- };
371
- const PERIODLY = {
372
- day: "daily",
373
- week: "weekly",
374
- month: "monthly",
375
- year: "yearly"
376
- };
377
- const productVariables = (product) => {
378
- const variables = {};
379
- if (product.identifier) variables.identifier = product.identifier;
380
- const price = product.price;
381
- if (!price || typeof price.amount !== "number" || !price.currency) return variables;
382
- const currency = price.currency.toUpperCase();
383
- const value = price.amount / MINOR;
384
- variables.price = money(value, currency);
385
- variables.rawPrice = value;
386
- variables.currencyCode = currency;
387
- variables.currencySymbol = symbolFor(currency);
388
- const period = product.subscription?.period;
389
- if (!period) return variables;
390
- const count = product.subscription?.period_count ?? 1;
391
- variables.period = period;
392
- variables.periodly = PERIODLY[period] ?? `${period}ly`;
393
- variables[`period${period.charAt(0).toUpperCase()}${period.slice(1)}s`] = count;
394
- const perYear = (PER_YEAR[period] ?? 1) / count;
395
- variables.yearlyPrice = money(value * perYear, currency);
396
- variables.monthlyPrice = money(value * perYear / 12, currency);
397
- variables.weeklyPrice = money(value * perYear / 52, currency);
398
- variables.dailyPrice = money(value * perYear / 365, currency);
399
- const trialDays = product.subscription?.trial_period_days;
400
- if (typeof trialDays === "number" && trialDays > 0) {
401
- variables.trialPeriodDays = trialDays;
402
- variables.trialPeriodText = `${trialDays}-day`;
403
- }
404
- return variables;
405
- };
406
332
  async function fetchProducts(api, projectId) {
407
333
  const rows = await api.list(`/v2/products?project_id=${encodeURIComponent(projectId)}`);
408
334
  const catalogue = {};
@@ -635,66 +561,7 @@ async function resolveRenames(input) {
635
561
  }
636
562
 
637
563
  //#endregion
638
- //#region src/commands/paywalls/pick-app.ts
639
- async function pickApplicationOption(apps, platform) {
640
- const picked = await ui.select({
641
- message: platform ? `Which ${platformLabel(platform)} app do these paywalls push to? The choice is saved under apps in superwall.lock.` : "Which app do these paywalls belong to?",
642
- options: apps.map((app) => ({
643
- value: String(app.id),
644
- label: app.name ?? app.bundle_id ?? String(app.id),
645
- hint: platformLabel(app.platform)
646
- }))
647
- });
648
- if (!picked) return null;
649
- return apps.find((app) => String(app.id) === picked) ?? null;
650
- }
651
-
652
- //#endregion
653
- //#region src/commands/paywalls/pick-rename.ts
654
- const CREATE = "__create__";
655
- async function pickRenameOption(input) {
656
- const picked = await ui.select({
657
- message: `\`${input.newcomer.id}\` is not in superwall.lock. Is it a new ${input.newcomer.kind}, or renamed?`,
658
- options: [...input.orphans.map((orphan) => ({
659
- value: orphan.id,
660
- label: `Renamed from ${orphan.id}`,
661
- hint: describeBindings(orphan.bindings)
662
- })), {
663
- value: CREATE,
664
- label: `Create a new ${input.newcomer.kind}`
665
- }]
666
- });
667
- if (picked === null) throw new RenameError("Cancelled — superwall.lock is unchanged and nothing was pushed.");
668
- return picked === CREATE ? { kind: "create" } : {
669
- kind: "rename",
670
- orphanId: picked
671
- };
672
- }
673
-
674
- //#endregion
675
- //#region src/commands/paywalls/pick-stale.ts
676
- const REMOVE = "__remove__";
677
- const KEEP = "__keep__";
678
- async function pickStaleOption(orphan) {
679
- const picked = await ui.select({
680
- message: `\`${orphan.id}\` is bound to ${describeBindings(orphan.bindings)} but no longer exists on disk. Removing only forgets it locally — the paywall stays on Superwall, keeps its campaigns, and keeps serving devices.`,
681
- options: [{
682
- value: REMOVE,
683
- label: "Remove the binding",
684
- hint: "restoring the directory re-binds it on the next push"
685
- }, {
686
- value: KEEP,
687
- label: "Keep it",
688
- hint: "superwall.lock is left as it is"
689
- }],
690
- initialValue: REMOVE
691
- });
692
- if (picked === null) throw new RenameError("Cancelled — superwall.lock is unchanged and nothing was pushed.");
693
- return picked === REMOVE ? "remove" : "keep";
694
- }
695
-
696
- //#endregion
697
- //#region src/commands/paywalls/pipeline.ts
564
+ //#region src/commands/paywalls/pipeline/report.ts
698
565
  const kb = (bytes) => `${(bytes / 1024).toFixed(1)} kB`;
699
566
  const weight = (bytes) => bytes >= 1024 * 1024 ? `${(bytes / 1024 / 1024).toFixed(1)} MB` : kb(bytes);
700
567
  const SHORT_SHA = 7;
@@ -717,6 +584,39 @@ const BIND_VERB = {
717
584
  renamed: "Rebound after rename to"
718
585
  };
719
586
  const LAYOUT_HINT = "expected superwall/{paywalls,funnels}/<id>/ with config.ts and app/index.tsx";
587
+ const NOTE_LIMIT = 2e3;
588
+ const PENDING_NAMES = 10;
589
+ function pendingPromoteWarning(pending, multi = false) {
590
+ if (pending.length === 0) return void 0;
591
+ const entries = pending.map((entry) => typeof entry === "string" ? { id: entry } : entry);
592
+ const ids = [...new Set(entries.map((entry) => entry.id))];
593
+ const platforms = new Set(entries.flatMap((entry) => entry.platform ? [entry.platform] : []));
594
+ const platformFlag = multi && platforms.size === 1 ? ` --platform ${[...platforms][0]}` : "";
595
+ const command = `superwall promote --id ${ids.join(",")}${platformFlag}`;
596
+ const labels = entries.map((entry) => multi && entry.platform ? `${entry.id} · ${entry.platform}` : entry.id);
597
+ if (labels.length === 1) return `${labels[0]} is pushed but not live — run \`${command}\` to publish it.`;
598
+ const shown = labels.slice(0, PENDING_NAMES).map((label) => ` ${label}`);
599
+ const rest = labels.length - shown.length;
600
+ return [
601
+ `These ${labels.length} paywalls are pushed but not live:`,
602
+ ...shown,
603
+ ...rest > 0 ? [` …and ${rest} more`] : [],
604
+ "",
605
+ ` ${command}`
606
+ ].join("\n");
607
+ }
608
+ function resolveNote(message) {
609
+ if (typeof message !== "string") return void 0;
610
+ if (message.length > NOTE_LIMIT) throw new Error(`Publish note is ${message.length} characters (limit ${NOTE_LIMIT}).`);
611
+ return message;
612
+ }
613
+ const took = (since) => {
614
+ const seconds = (Date.now() - since) / 1e3;
615
+ return pc.dim(seconds < 10 ? `(${seconds.toFixed(1)}s)` : `(${Math.round(seconds)}s)`);
616
+ };
617
+
618
+ //#endregion
619
+ //#region src/commands/paywalls/pipeline/selection.ts
720
620
  function projectDir(context) {
721
621
  const [first] = projectDirs(context);
722
622
  return first ?? process.cwd();
@@ -775,6 +675,68 @@ function requireClean(surfaces) {
775
675
  function needsWork(built, pushed, live) {
776
676
  return built !== pushed && built !== live;
777
677
  }
678
+
679
+ //#endregion
680
+ //#region src/commands/paywalls/pick-app.ts
681
+ async function pickApplicationOption(apps, platform) {
682
+ const picked = await ui.select({
683
+ message: platform ? `Which ${platformLabel(platform)} app do these paywalls push to? The choice is saved under apps in superwall.lock.` : "Which app do these paywalls belong to?",
684
+ options: apps.map((app) => ({
685
+ value: String(app.id),
686
+ label: app.name ?? app.bundle_id ?? String(app.id),
687
+ hint: platformLabel(app.platform)
688
+ }))
689
+ });
690
+ if (!picked) return null;
691
+ return apps.find((app) => String(app.id) === picked) ?? null;
692
+ }
693
+
694
+ //#endregion
695
+ //#region src/commands/paywalls/pick-rename.ts
696
+ const CREATE = "__create__";
697
+ async function pickRenameOption(input) {
698
+ const picked = await ui.select({
699
+ message: `\`${input.newcomer.id}\` is not in superwall.lock. Is it a new ${input.newcomer.kind}, or renamed?`,
700
+ options: [...input.orphans.map((orphan) => ({
701
+ value: orphan.id,
702
+ label: `Renamed from ${orphan.id}`,
703
+ hint: describeBindings(orphan.bindings)
704
+ })), {
705
+ value: CREATE,
706
+ label: `Create a new ${input.newcomer.kind}`
707
+ }]
708
+ });
709
+ if (picked === null) throw new RenameError("Cancelled — superwall.lock is unchanged and nothing was pushed.");
710
+ return picked === CREATE ? { kind: "create" } : {
711
+ kind: "rename",
712
+ orphanId: picked
713
+ };
714
+ }
715
+
716
+ //#endregion
717
+ //#region src/commands/paywalls/pick-stale.ts
718
+ const REMOVE = "__remove__";
719
+ const KEEP = "__keep__";
720
+ async function pickStaleOption(orphan) {
721
+ const picked = await ui.select({
722
+ message: `\`${orphan.id}\` is bound to ${describeBindings(orphan.bindings)} but no longer exists on disk. Removing only forgets it locally — the paywall stays on Superwall, keeps its campaigns, and keeps serving devices.`,
723
+ options: [{
724
+ value: REMOVE,
725
+ label: "Remove the binding",
726
+ hint: "restoring the directory re-binds it on the next push"
727
+ }, {
728
+ value: KEEP,
729
+ label: "Keep it",
730
+ hint: "superwall.lock is left as it is"
731
+ }],
732
+ initialValue: REMOVE
733
+ });
734
+ if (picked === null) throw new RenameError("Cancelled — superwall.lock is unchanged and nothing was pushed.");
735
+ return picked === REMOVE ? "remove" : "keep";
736
+ }
737
+
738
+ //#endregion
739
+ //#region src/commands/paywalls/pipeline/index.ts
778
740
  async function pooled(items, limit, work) {
779
741
  const results = new Array(items.length);
780
742
  let cursor = 0;
@@ -789,36 +751,6 @@ async function pooled(items, limit, work) {
789
751
  await Promise.all(runners);
790
752
  return results;
791
753
  }
792
- const NOTE_LIMIT = 2e3;
793
- const PENDING_NAMES = 10;
794
- function pendingPromoteWarning(pending, multi = false) {
795
- if (pending.length === 0) return void 0;
796
- const entries = pending.map((entry) => typeof entry === "string" ? { id: entry } : entry);
797
- const ids = [...new Set(entries.map((entry) => entry.id))];
798
- const platforms = new Set(entries.flatMap((entry) => entry.platform ? [entry.platform] : []));
799
- const platformFlag = multi && platforms.size === 1 ? ` --platform ${[...platforms][0]}` : "";
800
- const command = `superwall promote --id ${ids.join(",")}${platformFlag}`;
801
- const labels = entries.map((entry) => multi && entry.platform ? `${entry.id} · ${entry.platform}` : entry.id);
802
- if (labels.length === 1) return `${labels[0]} is pushed but not live — run \`${command}\` to publish it.`;
803
- const shown = labels.slice(0, PENDING_NAMES).map((label) => ` ${label}`);
804
- const rest = labels.length - shown.length;
805
- return [
806
- `These ${labels.length} paywalls are pushed but not live:`,
807
- ...shown,
808
- ...rest > 0 ? [` …and ${rest} more`] : [],
809
- "",
810
- ` ${command}`
811
- ].join("\n");
812
- }
813
- function resolveNote(message) {
814
- if (typeof message !== "string") return void 0;
815
- if (message.length > NOTE_LIMIT) throw new Error(`Publish note is ${message.length} characters (limit ${NOTE_LIMIT}).`);
816
- return message;
817
- }
818
- const took = (since) => {
819
- const seconds = (Date.now() - since) / 1e3;
820
- return pc.dim(seconds < 10 ? `(${seconds.toFixed(1)}s)` : `(${Math.round(seconds)}s)`);
821
- };
822
754
  async function timed(work) {
823
755
  const at = Date.now();
824
756
  return {
@@ -1004,7 +936,8 @@ async function runPushPipeline(context, options) {
1004
936
  surface: surface.id,
1005
937
  assets: synced.value.assets,
1006
938
  products: versionProducts(build.products, target.platform),
1007
- settings: build.settings
939
+ settings: build.settings,
940
+ locales: build.locales
1008
941
  }));
1009
942
  version = push.value.version;
1010
943
  writeSnapshot(project.superwallDir, surface.kind, surface.id, target.platform, build.snapshotId);
@@ -1053,4 +986,4 @@ async function runPushPipeline(context, options) {
1053
986
  }
1054
987
 
1055
988
  //#endregion
1056
- export { syncAssets as C, writeProjectTypes as D, collectProjectDeclarations as E, requireAssets as S, loadFramework as T, planTargets as _, requireProject as a, resolveBinding as b, timed as c, pushSource as d, collectSourceFiles as f, parsePlatformFlags as g, projectForApplication as h, projectDirs as i, transition as l, fetchProducts as m, group as n, runPushPipeline as o, warnNotPortable as p, projectDir as r, selectSurfaces as s, LAYOUT_HINT as t, pickApplicationOption as u, targetLabel as v, frameworkVersion as w, assetBaseUrl as x, wantedPlatforms as y };
989
+ export { syncAssets as C, writeProjectTypes as D, collectProjectDeclarations as E, requireAssets as S, loadFramework as T, planTargets as _, projectDir as a, resolveBinding as b, selectSurfaces as c, pushSource as d, collectSourceFiles as f, parsePlatformFlags as g, projectForApplication as h, pickApplicationOption as i, LAYOUT_HINT as l, fetchProducts as m, runPushPipeline as n, projectDirs as o, warnNotPortable as p, timed as r, requireProject as s, group as t, transition as u, targetLabel as v, frameworkVersion as w, assetBaseUrl as x, wantedPlatforms as y };
@@ -1,11 +1,11 @@
1
- import { i as track, r as setTelemetryTags } from "./telemetry-CLi7mjDP.js";
2
- import "./json-C3hPIMkI.js";
3
- import "./ui-C4ncRJqd.js";
4
- import { i as loadBundledSkill } from "./skills-HlIKA9xR.js";
1
+ import "./output-D2Ax_hHL.js";
2
+ import { i as track, r as setTelemetryTags } from "./telemetry-yJs7t0rt.js";
3
+ import "./ui-Lqt_zFOr.js";
4
+ import { i as loadBundledSkill } from "./skills-B-mR2CqM.js";
5
5
  import "./spawn-DSoTXy_j.js";
6
- import { t as scanProject } from "./scan-BfoeYW1v.js";
7
- import { n as FRAMEWORK_REF } from "./actions-I5gVO5jN.js";
8
- import { t as detectBilling } from "./billing-CW0diI2X.js";
6
+ import { t as scanProject } from "./scan-Dk0ZlCY6.js";
7
+ import { n as FRAMEWORK_REF } from "./actions-DvHycH3X.js";
8
+ import { t as detectBilling } from "./billing-CSOUhWso.js";
9
9
  import { resolve } from "node:path";
10
10
 
11
11
  //#region src/commands/workflow/print-skill.ts
@@ -1,22 +1,22 @@
1
- import { k as VERSION } from "./telemetry-CLi7mjDP.js";
2
- import "./json-C3hPIMkI.js";
3
- import "./update-CxP4fmMe.js";
4
- import "./token-DHRH8cxi.js";
5
- import { n as ApiError, t as defineCommand } from "./command-CmJMNVVz.js";
6
- import { n as ui } from "./ui-C4ncRJqd.js";
7
- import "./skills-HlIKA9xR.js";
1
+ import { g as VERSION } from "./output-D2Ax_hHL.js";
2
+ import "./telemetry-yJs7t0rt.js";
3
+ import "./update-B4hoLAN-.js";
4
+ import "./token-GcbyH6G8.js";
5
+ import { n as ApiError, t as defineCommand } from "./command-B7Te31wp.js";
6
+ import { n as ui } from "./ui-Lqt_zFOr.js";
7
+ import "./skills-B-mR2CqM.js";
8
8
  import "./spawn-DSoTXy_j.js";
9
- import "./login-B7fSpJKc.js";
10
- import "./scan-BfoeYW1v.js";
11
- import "./hosted-CbNJSJAC.js";
12
- import "./spinner-gOxIMz-V.js";
13
- import { _ as livePaywallVersion, b as promotePaywallVersion } from "./resources-CVrWwA1K.js";
14
- import "./org-B2gy9Pmu.js";
15
- import "./bind-DO11eXrR.js";
16
- import { i as requireApi, u as resolveApps } from "./git-BrTxQ7ui.js";
17
- import "./actions-I5gVO5jN.js";
18
- import "./app-DE9lxNNV.js";
19
- import { E as collectProjectDeclarations, T as loadFramework, _ as planTargets, b as resolveBinding, c as timed, g as parsePlatformFlags, l as transition, n as group, r as projectDir, s as selectSurfaces, u as pickApplicationOption, v as targetLabel, y as wantedPlatforms } from "./pipeline-COr4sB6U.js";
9
+ import "./login-DOES7Kup.js";
10
+ import "./scan-Dk0ZlCY6.js";
11
+ import "./hosted-vk05ZF6w.js";
12
+ import "./spinner-B9dT3DBY.js";
13
+ import { _ as livePaywallVersion, b as promotePaywallVersion } from "./resources-s64mBHaC.js";
14
+ import "./org-Cg25bcsj.js";
15
+ import "./bind-BbzBenoP.js";
16
+ import { i as requireApi, u as resolveApps } from "./git-2wRxiwOc.js";
17
+ import "./actions-DvHycH3X.js";
18
+ import "./app-FiC9SQVp.js";
19
+ import { E as collectProjectDeclarations, T as loadFramework, _ as planTargets, a as projectDir, b as resolveBinding, c as selectSurfaces, g as parsePlatformFlags, i as pickApplicationOption, r as timed, t as group, u as transition, v as targetLabel, y as wantedPlatforms } from "./pipeline-BVeUA6Ig.js";
20
20
  import pc from "picocolors";
21
21
 
22
22
  //#region src/commands/paywalls/promote.ts
@@ -0,0 +1,35 @@
1
+ import "./output-D2Ax_hHL.js";
2
+ import "./telemetry-yJs7t0rt.js";
3
+ import "./update-B4hoLAN-.js";
4
+ import "./token-GcbyH6G8.js";
5
+ import { t as defineCommand } from "./command-B7Te31wp.js";
6
+ import "./ui-Lqt_zFOr.js";
7
+ import "./skills-B-mR2CqM.js";
8
+ import "./spawn-DSoTXy_j.js";
9
+ import "./login-DOES7Kup.js";
10
+ import "./scan-Dk0ZlCY6.js";
11
+ import "./hosted-vk05ZF6w.js";
12
+ import "./spinner-B9dT3DBY.js";
13
+ import "./resources-s64mBHaC.js";
14
+ import "./org-Cg25bcsj.js";
15
+ import "./bind-BbzBenoP.js";
16
+ import { i as requireApi } from "./git-2wRxiwOc.js";
17
+ import "./actions-DvHycH3X.js";
18
+ import "./app-FiC9SQVp.js";
19
+ import { n as runPushPipeline } from "./pipeline-BVeUA6Ig.js";
20
+
21
+ //#region src/commands/paywalls/publish.ts
22
+ const runPublish = defineCommand({
23
+ name: "publish",
24
+ output: "human",
25
+ async run(context) {
26
+ const api = await requireApi(context.interactive);
27
+ await runPushPipeline({
28
+ ...context,
29
+ api
30
+ }, { promote: true });
31
+ }
32
+ });
33
+
34
+ //#endregion
35
+ export { runPublish };
@@ -0,0 +1,35 @@
1
+ import "./output-D2Ax_hHL.js";
2
+ import "./telemetry-yJs7t0rt.js";
3
+ import "./update-B4hoLAN-.js";
4
+ import "./token-GcbyH6G8.js";
5
+ import { t as defineCommand } from "./command-B7Te31wp.js";
6
+ import "./ui-Lqt_zFOr.js";
7
+ import "./skills-B-mR2CqM.js";
8
+ import "./spawn-DSoTXy_j.js";
9
+ import "./login-DOES7Kup.js";
10
+ import "./scan-Dk0ZlCY6.js";
11
+ import "./hosted-vk05ZF6w.js";
12
+ import "./spinner-B9dT3DBY.js";
13
+ import "./resources-s64mBHaC.js";
14
+ import "./org-Cg25bcsj.js";
15
+ import "./bind-BbzBenoP.js";
16
+ import { i as requireApi } from "./git-2wRxiwOc.js";
17
+ import "./actions-DvHycH3X.js";
18
+ import "./app-FiC9SQVp.js";
19
+ import { n as runPushPipeline } from "./pipeline-BVeUA6Ig.js";
20
+
21
+ //#region src/commands/paywalls/push.ts
22
+ const runPush = defineCommand({
23
+ name: "push",
24
+ output: "human",
25
+ async run(context) {
26
+ const api = await requireApi(context.interactive);
27
+ await runPushPipeline({
28
+ ...context,
29
+ api
30
+ }, { promote: false });
31
+ }
32
+ });
33
+
34
+ //#endregion
35
+ export { runPush };
@@ -1,13 +1,13 @@
1
- import "./telemetry-CLi7mjDP.js";
2
- import "./json-C3hPIMkI.js";
3
- import "./update-CxP4fmMe.js";
4
- import "./token-DHRH8cxi.js";
5
- import { t as defineCommand } from "./command-CmJMNVVz.js";
6
- import "./ui-C4ncRJqd.js";
7
- import "./spinner-gOxIMz-V.js";
8
- import "./resources-CVrWwA1K.js";
9
- import { t as requireOrg } from "./org-B2gy9Pmu.js";
10
- import { t as apiCall } from "./api-output-B5hh0q4V.js";
1
+ import "./output-D2Ax_hHL.js";
2
+ import "./telemetry-yJs7t0rt.js";
3
+ import "./update-B4hoLAN-.js";
4
+ import "./token-GcbyH6G8.js";
5
+ import { t as defineCommand } from "./command-B7Te31wp.js";
6
+ import "./ui-Lqt_zFOr.js";
7
+ import "./spinner-B9dT3DBY.js";
8
+ import "./resources-s64mBHaC.js";
9
+ import { t as requireOrg } from "./org-Cg25bcsj.js";
10
+ import { t as apiCall } from "./api-output-D9ggXQIr.js";
11
11
  import { readFileSync } from "node:fs";
12
12
 
13
13
  //#region src/commands/platform/query.ts
@@ -1,17 +1,17 @@
1
- import { c as getDefaultApp, m as setDefaultApp } from "./telemetry-CLi7mjDP.js";
2
- import { t as formatJson } from "./json-C3hPIMkI.js";
3
- import { o as blocks } from "./update-CxP4fmMe.js";
4
- import "./token-DHRH8cxi.js";
5
- import { n as ApiError, t as defineCommand } from "./command-CmJMNVVz.js";
6
- import "./ui-C4ncRJqd.js";
7
- import { t as scanProject } from "./scan-BfoeYW1v.js";
8
- import { t as detectExisting } from "./existing-p-hX-Nxc.js";
9
- import "./spinner-gOxIMz-V.js";
10
- import { C as rowName, c as getPaywallApplicationId, h as listResource, i as createEntitlement, l as isAppScoped, m as listProjects, n as createApplication, o as createProduct, p as listOrganizations, r as createCampaign, s as createProject, t as addPlacement, w as titleCase, y as platformLabel } from "./resources-CVrWwA1K.js";
11
- import { t as requireOrg } from "./org-B2gy9Pmu.js";
12
- import { t as platformForIntegration } from "./bind-DO11eXrR.js";
13
- import { t as apiCall } from "./api-output-B5hh0q4V.js";
14
- import { t as generateStoreKit } from "./storekit-Ddvs4Ynw.js";
1
+ import { r as formatJson, t as blocks } from "./output-D2Ax_hHL.js";
2
+ import { f as setDefaultApp, o as getDefaultApp } from "./telemetry-yJs7t0rt.js";
3
+ import "./update-B4hoLAN-.js";
4
+ import "./token-GcbyH6G8.js";
5
+ import { n as ApiError, t as defineCommand } from "./command-B7Te31wp.js";
6
+ import "./ui-Lqt_zFOr.js";
7
+ import { t as scanProject } from "./scan-Dk0ZlCY6.js";
8
+ import { t as detectExisting } from "./existing-B-e22WOr.js";
9
+ import "./spinner-B9dT3DBY.js";
10
+ import { C as rowName, c as getPaywallApplicationId, h as listResource, i as createEntitlement, l as isAppScoped, m as listProjects, n as createApplication, o as createProduct, p as listOrganizations, r as createCampaign, s as createProject, t as addPlacement, w as titleCase, y as platformLabel } from "./resources-s64mBHaC.js";
11
+ import { t as requireOrg } from "./org-Cg25bcsj.js";
12
+ import { t as platformForIntegration } from "./bind-BbzBenoP.js";
13
+ import { t as apiCall } from "./api-output-D9ggXQIr.js";
14
+ import { t as generateStoreKit } from "./storekit-DPonXSwe.js";
15
15
  import * as fs from "node:fs";
16
16
  import { writeFileSync } from "node:fs";
17
17
  import * as path from "node:path";
@@ -179,6 +179,7 @@ function pushPaywallVersion(api, paywallId, opts) {
179
179
  ...opts.surface ? { surface: opts.surface } : {},
180
180
  ...opts.assets && opts.assets.length > 0 ? { assets: opts.assets } : {},
181
181
  ...opts.products && opts.products.length > 0 ? { products: opts.products } : {},
182
+ ...opts.locales && opts.locales.length > 0 ? { locales: opts.locales } : {},
182
183
  ...opts.settings ?? {}
183
184
  });
184
185
  }
@@ -1,5 +1,5 @@
1
- import { C as DASHBOARD_URL } from "./telemetry-CLi7mjDP.js";
2
- import { s as packagedDir } from "./skills-HlIKA9xR.js";
1
+ import { l as DASHBOARD_URL } from "./output-D2Ax_hHL.js";
2
+ import { s as packagedDir } from "./skills-B-mR2CqM.js";
3
3
  import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
4
4
  import { join } from "node:path";
5
5
 
@@ -1,4 +1,4 @@
1
- import { T as Integration } from "./telemetry-CLi7mjDP.js";
1
+ import { d as Integration } from "./output-D2Ax_hHL.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";
@@ -45,7 +45,7 @@ const supportedNames = Object.values(frameworkByIntegration).filter((f) => f.sup
45
45
  const SUPPORTED_LABEL = supportedNames.length > 1 ? `${supportedNames.slice(0, -1).join(", ")}, or ${supportedNames.at(-1)}` : supportedNames[0] ?? "";
46
46
 
47
47
  //#endregion
48
- //#region src/util/fs.ts
48
+ //#region src/core/project/package.ts
49
49
  function readPackageJson(dir) {
50
50
  try {
51
51
  return JSON.parse(readFileSync(join(dir, "package.json"), "utf8"));
@@ -1,11 +1,12 @@
1
- import { _ as setSkillsSync, f as getSkillsSync, i as track, k as VERSION } from "./telemetry-CLi7mjDP.js";
2
- import { n as ui } from "./ui-C4ncRJqd.js";
1
+ import { g as VERSION } from "./output-D2Ax_hHL.js";
2
+ import { h as setSkillsSync, i as track, u as getSkillsSync } from "./telemetry-yJs7t0rt.js";
3
+ import { n as ui } from "./ui-Lqt_zFOr.js";
3
4
  import { r as spawnStream } from "./spawn-DSoTXy_j.js";
4
5
  import { existsSync, readFileSync } from "node:fs";
5
6
  import { dirname, join } from "node:path";
6
7
  import { fileURLToPath } from "node:url";
7
8
 
8
- //#region src/util/assets.ts
9
+ //#region src/packaged.ts
9
10
  const moduleDir = dirname(fileURLToPath(import.meta.url));
10
11
  let root;
11
12
  /** The package root: nearest ancestor with a package.json (repo in dev, install dir in prod). */
@@ -1,12 +1,12 @@
1
- import "./telemetry-CLi7mjDP.js";
2
- import "./json-C3hPIMkI.js";
3
- import "./update-CxP4fmMe.js";
4
- import "./token-DHRH8cxi.js";
5
- import { t as defineCommand } from "./command-CmJMNVVz.js";
6
- import { n as ui } from "./ui-C4ncRJqd.js";
7
- import { a as skillsOutOfDate, o as syncSkills, r as fetchPublicSkills, t as SUPERWALL_SKILLS_SOURCE } from "./skills-HlIKA9xR.js";
1
+ import "./output-D2Ax_hHL.js";
2
+ import "./telemetry-yJs7t0rt.js";
3
+ import "./update-B4hoLAN-.js";
4
+ import "./token-GcbyH6G8.js";
5
+ import { t as defineCommand } from "./command-B7Te31wp.js";
6
+ import { n as ui } from "./ui-Lqt_zFOr.js";
7
+ import { a as skillsOutOfDate, o as syncSkills, r as fetchPublicSkills, t as SUPERWALL_SKILLS_SOURCE } from "./skills-B-mR2CqM.js";
8
8
  import "./spawn-DSoTXy_j.js";
9
- import { t as withSpinner } from "./spinner-gOxIMz-V.js";
9
+ import { t as withSpinner } from "./spinner-B9dT3DBY.js";
10
10
 
11
11
  //#region src/commands/account/skills.ts
12
12
  const runSkills = defineCommand({
@@ -1,4 +1,4 @@
1
- import { n as ui } from "./ui-C4ncRJqd.js";
1
+ import { n as ui } from "./ui-Lqt_zFOr.js";
2
2
 
3
3
  //#region src/ui/spinner.ts
4
4
  async function withSpinner(label, work) {