@superwall/cli 2.5.0 → 2.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/dist/{apple-Dyr7OFBx.js → apple-BSKxY7Gx.js} +14 -14
- package/dist/{approve-Czs1-JO9.js → approve-DbwsYO4s.js} +15 -11
- package/dist/{assets-BrB9jQPQ.js → assets-CqpFg5mM.js} +3 -3
- package/dist/auth.d.ts +1 -1
- package/dist/auth.js +3 -3
- package/dist/{billing-D5qqIlVb.js → billing-BopwIhR3.js} +3 -3
- package/dist/{bind-B3eEcRyp.js → bind-DOF3o3FR.js} +4 -4
- package/dist/{build-DD9pSwHX.js → build-BF22vVdV.js} +11 -9
- package/dist/{client-AI9H4GGB.js → client-DHlsTaP1.js} +3 -3
- package/dist/{create-ChfgWpiM.js → create-CboPfAlN.js} +31 -31
- package/dist/{create-B4m-IKlr.js → create-CiZzZrru.js} +6 -6
- package/dist/create-DAkNdEzt.js +20 -0
- package/dist/design-lint-CvgcSzVg.js +158 -0
- package/dist/{doctor-XtXW6tKE.js → doctor-BqZGaQE5.js} +6 -6
- package/dist/{drivers-CMEL13gp.js → drivers-DkboeR1c.js} +3 -3
- package/dist/entry.js +20 -20
- package/dist/{environment-BWT2S4qC.js → environment-FR3bcq0D.js} +3 -3
- package/dist/{existing-b0GxFcnc.js → existing-C6TTT6c4.js} +2 -2
- package/dist/{git-D7AVdugb.js → git-DqDPnldI.js} +20 -11
- package/dist/{held-D3PUNky2.js → held-C2IjAyg6.js} +6 -6
- package/dist/held-KVcYIplR.js +17 -0
- package/dist/{install-CVUXsx8c.js → install-DoSYCwLL.js} +21 -15
- package/dist/{integrate-qvKd9pVW.js → integrate-BSqd2wgI.js} +23 -23
- package/dist/login-BiwaQkXS.js +17 -0
- package/dist/{login-PMoXUGqq.js → login-C6FcBQZg.js} +6 -6
- package/dist/{login-COmGHrU5.js → login-dRPPnGr7.js} +1 -1
- package/dist/{lookup-gjcKIZvh.js → lookup-D23dAOz6.js} +3 -3
- package/dist/{migrate-SkkLLdmr.js → migrate-CDdUCTH3.js} +29 -29
- package/dist/{migration-DS44-3Zr.js → migration-r9plM7F6.js} +29 -11
- package/dist/{notification-url-BjQPLf4-.js → notification-url-rdnENCxt.js} +2 -2
- package/dist/{open-DQpm2yVs.js → open-DVdE3HnK.js} +2 -2
- package/dist/{org-C04eAO-j.js → org-DZ41muzA.js} +3 -3
- package/dist/{organization-BOECL3vZ.js → organization-DIODPOwO.js} +4 -4
- package/dist/{orgs-D6Kk96mG.js → orgs-BxlwcvTu.js} +1 -1
- package/dist/{paths-REb-GrbX.js → paths-BaeoxDze.js} +1 -1
- package/dist/{playbook-Du4Oydbf.js → playbook-B-Pdonhg.js} +10 -10
- package/dist/{promote-Dm2_b1WK.js → promote-Ca4URuHY.js} +23 -22
- package/dist/{pull-F6pvO4To.js → pull-CQcTZxW8.js} +8 -8
- package/dist/pull-DRMIxqR8.js +36 -0
- package/dist/{pull-zYAbqo9n.js → pull-_qs90vGA.js} +33 -33
- package/dist/{push-BIFLhAiO.js → push-BlZoIwIj.js} +122 -22
- package/dist/push-Cb4g_l1K.js +30 -0
- package/dist/{push-D_l9KJZN.js → push-DQE48h_M.js} +9 -9
- package/dist/push-DZKsd6Dp.js +22 -0
- package/dist/{registry-DIJB0mJa.js → registry-FNG-uiIt.js} +74 -53
- package/dist/{resolve--GsHj0Q1.js → resolve-DGePiHgL.js} +40 -15
- package/dist/{resources-BaP3p_LY.js → resources-COOEvqqW.js} +2 -2
- package/dist/{run-CgLmD2vR.js → run-Czbb-sHR.js} +43 -20
- package/dist/{run-C5OPwhvS.js → run-DpYDOAw-.js} +2 -2
- package/dist/scan-2WqHGkjU.js +4 -0
- package/dist/{scan-Bj5y0zTZ.js → scan-BZS2FZeU.js} +1 -1
- package/dist/{scope-Bp_zwJOo.js → scope-BJQ-KcQg.js} +5 -5
- package/dist/{scope-CCb_7UvN.js → scope-t_SqFN6W.js} +18 -4
- package/dist/{sdk-TvT0p_nO.js → sdk-CyttTnGf.js} +2 -2
- package/dist/{selection-BltBpyp5.js → selection-CWfI4a0O.js} +1 -1
- package/dist/{series-TAixFBWW.js → series--Wp7TngJ.js} +2 -2
- package/dist/{server-CdVIboQn.js → server-BmmOj7bh.js} +9 -9
- package/dist/server-BqLPwcy9.js +29 -0
- package/dist/session-BHBIGscL.js +6 -0
- package/dist/{session-Ywim-P8M.js → session-BpYpOgaY.js} +1 -1
- package/dist/{session-D3fgXQBt.js → session-DYdxTNZf.js} +7 -7
- package/dist/{setup-zzjtTy8k.js → setup-DW50luOZ.js} +9 -9
- package/dist/skills/superwall-workspaces/SKILL.md +3 -2
- package/dist/skills/superwall-workspaces/references/cli.md +1 -1
- package/dist/{skills-8um2fBPS.js → skills-Bbtq8V_D.js} +8 -8
- package/dist/{skills-2qYaUXGE.js → skills-Cm1j2d1W.js} +4 -4
- package/dist/{source-push-kAep4gPe.js → source-push-B3c-VLfe.js} +43 -26
- package/dist/{spinner-BANVLncC.js → spinner-025_eqCX.js} +3 -3
- package/dist/{starter-CiLrp1cN.js → starter-hcwocv_Z.js} +3 -3
- package/dist/{status-CoYMK7QL.js → status-K1IGp6pe.js} +17 -14
- package/dist/{storage-DzP22xKn.js → storage-CUMgpcVH.js} +1 -1
- package/dist/{storekit-n1x0bWkQ.js → storekit-Cb0TkToV.js} +3 -3
- package/dist/storekit-Dewj_5qg.js +17 -0
- package/dist/{telemetry-CXN6f-ZX.js → telemetry-ekUQuhLJ.js} +1 -1
- package/dist/{token-FmeHywYt.js → token-B2PduqrR.js} +1 -1
- package/dist/tools.d.ts +1 -1
- package/dist/tools.js +29 -9
- package/dist/{try-BWbzgelb.js → try-BUnhITXS.js} +16 -16
- package/dist/{upgrade-Bk5boOgW.js → upgrade-CI7K1UZ-.js} +2 -2
- package/dist/{upgrade-CoWCEnoi.js → upgrade-DfZfDljd.js} +2 -2
- package/package.json +2 -2
- package/dist/create-CJljlkJK.js +0 -20
- package/dist/held-CX7Zf8u-.js +0 -17
- package/dist/login-ClnJi1Ea.js +0 -17
- package/dist/pull-DsdOoG-D.js +0 -36
- package/dist/push-CJVfvFZq.js +0 -29
- package/dist/push-SVzv7fzE.js +0 -22
- package/dist/scan-v_WTE722.js +0 -4
- package/dist/server-CvJVusw3.js +0 -29
- package/dist/session-B8JNXkwN.js +0 -6
- package/dist/storekit-D5eopLM0.js +0 -17
- /package/dist/{download-2Zu2I_Og.js → download-F8OtTJze.js} +0 -0
- /package/dist/{project-CP6hiHra.js → project-DHU5wc3R.js} +0 -0
- /package/dist/{reports-CuhB1_ub.js → reports-BZfxvenS.js} +0 -0
- /package/dist/{storage-BjQCiTuz.d.ts → storage-Bdz5AmqS.d.ts} +0 -0
- /package/dist/{types-JdxmnCko.js → types-CB6O_wjy.js} +0 -0
package/README.md
CHANGED
|
@@ -239,6 +239,13 @@ landed stays pending, so `promote` still won't ship it. With no project,
|
|
|
239
239
|
`superwall pull --app <id> [dir]` creates `superwall/` from the app's source,
|
|
240
240
|
so you can work on an app's paywalls without its codebase or GitHub.
|
|
241
241
|
|
|
242
|
+
A change to the shared design system (`DESIGN.md`, `design/`, `components/`)
|
|
243
|
+
reaches every paywall that imports it. `publish --existing --source` ships it:
|
|
244
|
+
`--existing` rebuilds only the paywalls already on Superwall and never creates
|
|
245
|
+
one, and `--source` pushes the project source to every app, also those whose
|
|
246
|
+
paywalls built the same. Push and build warn when a paywall hard-codes a value
|
|
247
|
+
that `design/tokens.css` already holds, naming the token to use instead.
|
|
248
|
+
|
|
242
249
|
The full reference — assets, localization, trials, transitions, web
|
|
243
250
|
checkout, troubleshooting — lives at
|
|
244
251
|
[superwall.com/docs/framework](https://superwall.com/docs/framework).
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import "./token-
|
|
1
|
+
import "./token-B2PduqrR.js";
|
|
2
2
|
import { t as blocks } from "./output-Ggzq5_-t.js";
|
|
3
|
-
import "./environment-
|
|
4
|
-
import "./storage-
|
|
5
|
-
import { t as ApiError } from "./client-
|
|
6
|
-
import { E as updateBundleId, a as chooseAppIntent, g as RefusedByApi, i as savedKey, m as KEY_LABEL, n as testModeWarning, p as KEY_KINDS, s as resolveApp, y as findIntegrations } from "./held-
|
|
3
|
+
import "./environment-FR3bcq0D.js";
|
|
4
|
+
import "./storage-CUMgpcVH.js";
|
|
5
|
+
import { t as ApiError } from "./client-DHlsTaP1.js";
|
|
6
|
+
import { E as updateBundleId, a as chooseAppIntent, g as RefusedByApi, i as savedKey, m as KEY_LABEL, n as testModeWarning, p as KEY_KINDS, s as resolveApp, y as findIntegrations } from "./held-C2IjAyg6.js";
|
|
7
7
|
import "./config-CGcG7GOt.js";
|
|
8
|
-
import { t as apiCall } from "./spinner-
|
|
8
|
+
import { t as apiCall } from "./spinner-025_eqCX.js";
|
|
9
9
|
import "./ui-D_qf3Gvw.js";
|
|
10
|
-
import "./paths-
|
|
11
|
-
import "./orgs-
|
|
12
|
-
import "./resources-
|
|
13
|
-
import "./org-
|
|
14
|
-
import "./lookup-
|
|
15
|
-
import "./scope-
|
|
10
|
+
import "./paths-BaeoxDze.js";
|
|
11
|
+
import "./orgs-BxlwcvTu.js";
|
|
12
|
+
import "./resources-COOEvqqW.js";
|
|
13
|
+
import "./org-DZ41muzA.js";
|
|
14
|
+
import "./lookup-D23dAOz6.js";
|
|
15
|
+
import "./scope-BJQ-KcQg.js";
|
|
16
16
|
import "./client-BJQXl62Q.js";
|
|
17
17
|
import "./timing-Ca0TXY-A.js";
|
|
18
|
-
import { n as ensureNotificationUrl, r as environmentLines, t as describeNotificationUrl } from "./notification-url-
|
|
19
|
-
import { a as chooseTeam, n as keyAccess, o as signIn, r as keyRole, s as appleDeps, t as createAndSaveKey } from "./create-
|
|
18
|
+
import { n as ensureNotificationUrl, r as environmentLines, t as describeNotificationUrl } from "./notification-url-rdnENCxt.js";
|
|
19
|
+
import { a as chooseTeam, n as keyAccess, o as signIn, r as keyRole, s as appleDeps, t as createAndSaveKey } from "./create-CiZzZrru.js";
|
|
20
20
|
|
|
21
21
|
//#region src/core/app-store-connect/setup/apple.ts
|
|
22
22
|
const STEPS = [
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import "./token-
|
|
1
|
+
import "./token-B2PduqrR.js";
|
|
2
2
|
import "./output-Ggzq5_-t.js";
|
|
3
|
-
import "./environment-
|
|
4
|
-
import "./storage-
|
|
5
|
-
import { t as ApiError } from "./client-
|
|
3
|
+
import "./environment-FR3bcq0D.js";
|
|
4
|
+
import "./storage-CUMgpcVH.js";
|
|
5
|
+
import { t as ApiError } from "./client-DHlsTaP1.js";
|
|
6
6
|
import "./config-CGcG7GOt.js";
|
|
7
|
-
import "./orgs-
|
|
8
|
-
import "./types-
|
|
9
|
-
import "./scope-
|
|
10
|
-
import {
|
|
11
|
-
import { r as WorkspaceError } from "./project-
|
|
7
|
+
import "./orgs-BxlwcvTu.js";
|
|
8
|
+
import "./types-CB6O_wjy.js";
|
|
9
|
+
import "./scope-t_SqFN6W.js";
|
|
10
|
+
import { h as approveVersion, l as resolveWorkspace, n as awaitingInstall, s as pickVersion, u as roleCanApprove } from "./resolve-DGePiHgL.js";
|
|
11
|
+
import { r as WorkspaceError } from "./project-DHU5wc3R.js";
|
|
12
12
|
|
|
13
13
|
//#region src/core/workspaces/approve.ts
|
|
14
14
|
const SECTIONS = [
|
|
@@ -91,6 +91,10 @@ const diffLines = (diff) => diff.flatMap(({ title, added, removed }) => [
|
|
|
91
91
|
...added.map((item) => ` + ${item}`),
|
|
92
92
|
...removed.map((item) => ` - ${item}`)
|
|
93
93
|
]);
|
|
94
|
+
function commitLine(message) {
|
|
95
|
+
const [subject = "", note] = message.split(/\n\n+/);
|
|
96
|
+
return subject.startsWith("push workspace/") && note && !note.startsWith("Superwall-") ? note : subject;
|
|
97
|
+
}
|
|
94
98
|
const ONLY_ADMINS = "Only organization owners and admins can approve workspace versions. Ask one of them to review this version.";
|
|
95
99
|
async function runWorkspaceApprove(ctx, input) {
|
|
96
100
|
const workspace = await resolveWorkspace(ctx, input);
|
|
@@ -120,7 +124,7 @@ async function runWorkspaceApprove(ctx, input) {
|
|
|
120
124
|
};
|
|
121
125
|
if (!ctx.json) ctx.ui.report([
|
|
122
126
|
`${workspace.name}, version ${version.id} (${version.commit_sha.slice(0, 12)})`,
|
|
123
|
-
...version.commit_message ? [version.commit_message
|
|
127
|
+
...version.commit_message ? [commitLine(version.commit_message)] : [],
|
|
124
128
|
"",
|
|
125
129
|
"What it can do:",
|
|
126
130
|
...manifestLines(proposed),
|
|
@@ -178,7 +182,7 @@ async function runWorkspaceApprove(ctx, input) {
|
|
|
178
182
|
});
|
|
179
183
|
return;
|
|
180
184
|
}
|
|
181
|
-
ctx.ui.success(`Approved version ${version.id}. It's live for everyone it's installed for.`);
|
|
185
|
+
ctx.ui.success(await awaitingInstall(ctx.api, workspace.id, version.manifest) ? `Approved version ${version.id}. Nothing is installed yet, so only its author can see it until you choose where it shows.` : `Approved version ${version.id}. It's live for everyone it's installed for.`);
|
|
182
186
|
ctx.ui.info(`Choose where it shows with \`superwall workspaces install <entrypoint> --workspace ${workspace.id}\`.`);
|
|
183
187
|
}
|
|
184
188
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as ASSET_HOST } from "./environment-
|
|
2
|
-
import { t as ApiError } from "./client-
|
|
3
|
-
import { S as pushPaywallAssets } from "./resources-
|
|
1
|
+
import { r as ASSET_HOST } from "./environment-FR3bcq0D.js";
|
|
2
|
+
import { t as ApiError } from "./client-DHlsTaP1.js";
|
|
3
|
+
import { S as pushPaywallAssets } from "./resources-COOEvqqW.js";
|
|
4
4
|
import * as fs from "node:fs";
|
|
5
5
|
|
|
6
6
|
//#region src/core/paywalls/assets.ts
|
package/dist/auth.d.ts
CHANGED
package/dist/auth.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as resolveAuthToken, r as NotLoggedInError, t as getOAuthAccessToken } from "./token-
|
|
1
|
+
import { n as resolveAuthToken, r as NotLoggedInError, t as getOAuthAccessToken } from "./token-B2PduqrR.js";
|
|
2
2
|
import "./output-Ggzq5_-t.js";
|
|
3
|
-
import "./environment-
|
|
4
|
-
import "./storage-
|
|
3
|
+
import "./environment-FR3bcq0D.js";
|
|
4
|
+
import "./storage-CUMgpcVH.js";
|
|
5
5
|
|
|
6
6
|
export { NotLoggedInError, getOAuthAccessToken, resolveAuthToken };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { h as Integration } from "./environment-
|
|
2
|
-
import { i as readPackageJson, r as allDeps } from "./scan-
|
|
3
|
-
import { d as readBundledSkill } from "./skills-
|
|
1
|
+
import { h as Integration } from "./environment-FR3bcq0D.js";
|
|
2
|
+
import { i as readPackageJson, r as allDeps } from "./scan-BZS2FZeU.js";
|
|
3
|
+
import { d as readBundledSkill } from "./skills-Cm1j2d1W.js";
|
|
4
4
|
import { readFileSync } from "node:fs";
|
|
5
5
|
import fg from "fast-glob";
|
|
6
6
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { h as Integration } from "./environment-
|
|
2
|
-
import { n as withSpinner } from "./spinner-
|
|
1
|
+
import { h as Integration } from "./environment-FR3bcq0D.js";
|
|
2
|
+
import { n as withSpinner } from "./spinner-025_eqCX.js";
|
|
3
3
|
import { n as ui } from "./ui-D_qf3Gvw.js";
|
|
4
|
-
import { c as createProject, m as listProjects, r as createApplication, y as platformLabel } from "./resources-
|
|
5
|
-
import { n as orgForNewProject } from "./org-
|
|
4
|
+
import { c as createProject, m as listProjects, r as createApplication, y as platformLabel } from "./resources-COOEvqqW.js";
|
|
5
|
+
import { n as orgForNewProject } from "./org-DZ41muzA.js";
|
|
6
6
|
|
|
7
7
|
//#region src/core/account/bind.ts
|
|
8
8
|
const NEW = "__new__";
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import "./token-
|
|
1
|
+
import "./token-B2PduqrR.js";
|
|
2
2
|
import "./output-Ggzq5_-t.js";
|
|
3
|
-
import { x as VERSION } from "./environment-
|
|
4
|
-
import "./storage-
|
|
5
|
-
import "./client-
|
|
3
|
+
import { x as VERSION } from "./environment-FR3bcq0D.js";
|
|
4
|
+
import "./storage-CUMgpcVH.js";
|
|
5
|
+
import "./client-DHlsTaP1.js";
|
|
6
6
|
import "./config-CGcG7GOt.js";
|
|
7
7
|
import { n as ui } from "./ui-D_qf3Gvw.js";
|
|
8
|
-
import "./orgs-
|
|
9
|
-
import "./resources-
|
|
10
|
-
import { t as assetBaseUrl } from "./assets-
|
|
11
|
-
import { a as resolveProjectDir, d as kb, h as took, i as requireProject, n as parseIds, s as selectSurfaces, y as resolveFramework } from "./selection-
|
|
12
|
-
import {
|
|
8
|
+
import "./orgs-BxlwcvTu.js";
|
|
9
|
+
import "./resources-COOEvqqW.js";
|
|
10
|
+
import { t as assetBaseUrl } from "./assets-CqpFg5mM.js";
|
|
11
|
+
import { a as resolveProjectDir, d as kb, h as took, i as requireProject, n as parseIds, s as selectSurfaces, y as resolveFramework } from "./selection-CWfI4a0O.js";
|
|
12
|
+
import { n as lintDesignTokens, t as formatTokenFinding } from "./design-lint-CvgcSzVg.js";
|
|
13
|
+
import { f as readLock, n as collectProjectDeclarations, r as writeProjectTypes } from "./types-CB6O_wjy.js";
|
|
13
14
|
import * as fs from "node:fs";
|
|
14
15
|
import * as path from "node:path";
|
|
15
16
|
import pc from "picocolors";
|
|
@@ -49,6 +50,7 @@ async function runBuildPipeline(context, options = {}) {
|
|
|
49
50
|
text: `Superwall ${pc.dim(`v${VERSION}`)}`
|
|
50
51
|
});
|
|
51
52
|
for (const surface of surfaces) for (const problem of surface.diagnostics ?? []) ui.warn(problem);
|
|
53
|
+
for (const finding of lintDesignTokens(project, surfaces)) ui.warn(formatTokenFinding(finding));
|
|
52
54
|
const outcomes = [];
|
|
53
55
|
const at = Date.now();
|
|
54
56
|
for (const surface of surfaces) for (const platform of platforms) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as resolveAuthToken, r as NotLoggedInError } from "./token-
|
|
2
|
-
import { b as USER_AGENT } from "./environment-
|
|
3
|
-
import { a as resolveApiHost, n as readSession } from "./storage-
|
|
1
|
+
import { n as resolveAuthToken, r as NotLoggedInError } from "./token-B2PduqrR.js";
|
|
2
|
+
import { b as USER_AGENT } from "./environment-FR3bcq0D.js";
|
|
3
|
+
import { a as resolveApiHost, n as readSession } from "./storage-CUMgpcVH.js";
|
|
4
4
|
|
|
5
5
|
//#region src/core/api/client.ts
|
|
6
6
|
const BODY_SNIPPET = 200;
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import "./token-
|
|
1
|
+
import "./token-B2PduqrR.js";
|
|
2
2
|
import "./output-Ggzq5_-t.js";
|
|
3
|
-
import "./environment-
|
|
4
|
-
import "./storage-
|
|
5
|
-
import "./client-
|
|
3
|
+
import "./environment-FR3bcq0D.js";
|
|
4
|
+
import "./storage-CUMgpcVH.js";
|
|
5
|
+
import "./client-DHlsTaP1.js";
|
|
6
6
|
import "./config-CGcG7GOt.js";
|
|
7
|
-
import "./telemetry-
|
|
7
|
+
import "./telemetry-ekUQuhLJ.js";
|
|
8
8
|
import "./spawn-DmmmHIP-.js";
|
|
9
|
-
import "./spinner-
|
|
9
|
+
import "./spinner-025_eqCX.js";
|
|
10
10
|
import "./ui-D_qf3Gvw.js";
|
|
11
11
|
import "./theme-DUsCh-Vd.js";
|
|
12
12
|
import "./log-C0MDCfA2.js";
|
|
13
|
-
import "./scan-
|
|
14
|
-
import "./existing-
|
|
15
|
-
import "./paths-
|
|
16
|
-
import "./orgs-
|
|
17
|
-
import { O as field } from "./resources-
|
|
18
|
-
import "./org-
|
|
19
|
-
import "./lookup-
|
|
20
|
-
import "./bind-
|
|
21
|
-
import "./login-
|
|
22
|
-
import "./skills-
|
|
13
|
+
import "./scan-BZS2FZeU.js";
|
|
14
|
+
import "./existing-C6TTT6c4.js";
|
|
15
|
+
import "./paths-BaeoxDze.js";
|
|
16
|
+
import "./orgs-BxlwcvTu.js";
|
|
17
|
+
import { O as field } from "./resources-COOEvqqW.js";
|
|
18
|
+
import "./org-DZ41muzA.js";
|
|
19
|
+
import "./lookup-D23dAOz6.js";
|
|
20
|
+
import "./bind-DOF3o3FR.js";
|
|
21
|
+
import "./login-C6FcBQZg.js";
|
|
22
|
+
import "./skills-Cm1j2d1W.js";
|
|
23
23
|
import "./browser-Bp3yRKlU.js";
|
|
24
|
-
import "./assets-
|
|
25
|
-
import "./selection-
|
|
26
|
-
import "./types-
|
|
27
|
-
import { a as projectPackageName, n as requireApi, t as LoginRequiredError } from "./session-
|
|
28
|
-
import "./source-push-
|
|
29
|
-
import "./git-
|
|
30
|
-
import "./scope-
|
|
31
|
-
import "./login-
|
|
32
|
-
import "./run-
|
|
33
|
-
import "./drivers-
|
|
34
|
-
import { _ as slugOf, c as scaffoldFromPaywall, g as writeTemplate, h as writeSurfaceFiles, i as migrationFor, m as starterConfig, o as offerMigration, s as projectDirOf } from "./migration-
|
|
35
|
-
import "./server-
|
|
36
|
-
import { i as startStudio, n as migrationNextSteps, t as askStudio } from "./open-
|
|
37
|
-
import { i as downloadRepoDir, n as PUBLIC_REPO, r as RepoDownloadError, t as PUBLIC_REF } from "./download-
|
|
38
|
-
import { a as devCommand, c as uniqueSurfaceId, i as detectPackageManager, n as connectApp, o as initGit, r as detectHostApp, s as installDependencies, t as alreadyAProject } from "./setup-
|
|
24
|
+
import "./assets-CqpFg5mM.js";
|
|
25
|
+
import "./selection-CWfI4a0O.js";
|
|
26
|
+
import "./types-CB6O_wjy.js";
|
|
27
|
+
import { a as projectPackageName, n as requireApi, t as LoginRequiredError } from "./session-DYdxTNZf.js";
|
|
28
|
+
import "./source-push-B3c-VLfe.js";
|
|
29
|
+
import "./git-DqDPnldI.js";
|
|
30
|
+
import "./scope-t_SqFN6W.js";
|
|
31
|
+
import "./login-dRPPnGr7.js";
|
|
32
|
+
import "./run-DpYDOAw-.js";
|
|
33
|
+
import "./drivers-DkboeR1c.js";
|
|
34
|
+
import { _ as slugOf, c as scaffoldFromPaywall, g as writeTemplate, h as writeSurfaceFiles, i as migrationFor, m as starterConfig, o as offerMigration, s as projectDirOf } from "./migration-r9plM7F6.js";
|
|
35
|
+
import "./server-BmmOj7bh.js";
|
|
36
|
+
import { i as startStudio, n as migrationNextSteps, t as askStudio } from "./open-DVdE3HnK.js";
|
|
37
|
+
import { i as downloadRepoDir, n as PUBLIC_REPO, r as RepoDownloadError, t as PUBLIC_REF } from "./download-F8OtTJze.js";
|
|
38
|
+
import { a as devCommand, c as uniqueSurfaceId, i as detectPackageManager, n as connectApp, o as initGit, r as detectHostApp, s as installDependencies, t as alreadyAProject } from "./setup-DW50luOZ.js";
|
|
39
39
|
import * as fs from "node:fs";
|
|
40
40
|
import * as path from "node:path";
|
|
41
41
|
import pc from "picocolors";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { r as formatJson, t as blocks } from "./output-Ggzq5_-t.js";
|
|
2
|
-
import { C as appleCredentialsFromEnv, m as ENV_APPLE_PASSWORD, p as ENV_APPLE_ID, x as VERSION } from "./environment-
|
|
3
|
-
import { t as ApiError } from "./client-
|
|
4
|
-
import { i as savedKey, m as KEY_LABEL, n as testModeWarning, o as chooseIosApp, s as resolveApp, t as upsertHeldKey, x as keyKind, y as findIntegrations } from "./held-
|
|
5
|
-
import { t as apiCall } from "./spinner-
|
|
6
|
-
import { n as SUPERWALL_HOME } from "./paths-
|
|
7
|
-
import { A as listField, M as textField, O as field, j as parseJson } from "./resources-
|
|
2
|
+
import { C as appleCredentialsFromEnv, m as ENV_APPLE_PASSWORD, p as ENV_APPLE_ID, x as VERSION } from "./environment-FR3bcq0D.js";
|
|
3
|
+
import { t as ApiError } from "./client-DHlsTaP1.js";
|
|
4
|
+
import { i as savedKey, m as KEY_LABEL, n as testModeWarning, o as chooseIosApp, s as resolveApp, t as upsertHeldKey, x as keyKind, y as findIntegrations } from "./held-C2IjAyg6.js";
|
|
5
|
+
import { t as apiCall } from "./spinner-025_eqCX.js";
|
|
6
|
+
import { n as SUPERWALL_HOME } from "./paths-BaeoxDze.js";
|
|
7
|
+
import { A as listField, M as textField, O as field, j as parseJson } from "./resources-COOEvqqW.js";
|
|
8
8
|
import { c as replaceAppPurchaseKey, s as replaceAppAscKey } from "./client-BJQXl62Q.js";
|
|
9
9
|
import { t as timing } from "./timing-Ca0TXY-A.js";
|
|
10
10
|
import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import "./token-B2PduqrR.js";
|
|
2
|
+
import "./output-Ggzq5_-t.js";
|
|
3
|
+
import "./environment-FR3bcq0D.js";
|
|
4
|
+
import "./storage-CUMgpcVH.js";
|
|
5
|
+
import "./client-DHlsTaP1.js";
|
|
6
|
+
import "./held-C2IjAyg6.js";
|
|
7
|
+
import "./config-CGcG7GOt.js";
|
|
8
|
+
import "./spinner-025_eqCX.js";
|
|
9
|
+
import "./ui-D_qf3Gvw.js";
|
|
10
|
+
import "./paths-BaeoxDze.js";
|
|
11
|
+
import "./orgs-BxlwcvTu.js";
|
|
12
|
+
import "./resources-COOEvqqW.js";
|
|
13
|
+
import "./org-DZ41muzA.js";
|
|
14
|
+
import "./lookup-D23dAOz6.js";
|
|
15
|
+
import "./scope-BJQ-KcQg.js";
|
|
16
|
+
import "./client-BJQXl62Q.js";
|
|
17
|
+
import "./timing-Ca0TXY-A.js";
|
|
18
|
+
import { i as runAscKeysCreate, n as keyAccess, r as keyRole, t as createAndSaveKey } from "./create-CiZzZrru.js";
|
|
19
|
+
|
|
20
|
+
export { createAndSaveKey, keyAccess, keyRole, runAscKeysCreate };
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import * as fs from "node:fs";
|
|
2
|
+
import * as path from "node:path";
|
|
3
|
+
|
|
4
|
+
//#region src/core/paywalls/project/design-lint.ts
|
|
5
|
+
const TOKENS_FILE = path.join("design", "tokens.css");
|
|
6
|
+
const SCANNED = /\.(css|tsx|ts|jsx|js)$/;
|
|
7
|
+
const SKIPPED_DIRS = new Set([
|
|
8
|
+
"node_modules",
|
|
9
|
+
".superwall",
|
|
10
|
+
"dist",
|
|
11
|
+
"public",
|
|
12
|
+
"assets"
|
|
13
|
+
]);
|
|
14
|
+
const COLOR = /#[0-9a-fA-F]{3,8}\b|rgba?\([^)]*\)|hsla?\([^)]*\)/g;
|
|
15
|
+
const LENGTH = /(?<![\w.#-])-?\d*\.?\d+(?:px|rem|em)\b/g;
|
|
16
|
+
const NUMBER = /(?<![\w.#%-])\d*\.?\d+(?![\w.%(])/g;
|
|
17
|
+
const PAINTS = /color|background|border|outline|fill|stroke|shadow|caret|accent|decoration|column-rule/;
|
|
18
|
+
const URL_VALUE = /url\([^)]*\)/gi;
|
|
19
|
+
const DECLARATION = /(?<![\w-])["']?([a-zA-Z][\w-]*)["']?\s*:\s*((?:[^;{},]|,(?!\s*["']?[a-zA-Z][\w-]*["']?\s*:))+)/g;
|
|
20
|
+
const PREFIXES = {
|
|
21
|
+
text: "--text-",
|
|
22
|
+
leading: "--leading-",
|
|
23
|
+
tracking: "--tracking-",
|
|
24
|
+
weight: "--weight-",
|
|
25
|
+
radius: "--radius",
|
|
26
|
+
space: "--space-"
|
|
27
|
+
};
|
|
28
|
+
const kebab = (name) => name.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`);
|
|
29
|
+
function categoryOf(property) {
|
|
30
|
+
if (property === "font-size") return "text";
|
|
31
|
+
if (property === "line-height") return "leading";
|
|
32
|
+
if (property === "letter-spacing") return "tracking";
|
|
33
|
+
if (property === "font-weight") return "weight";
|
|
34
|
+
if (property.includes("radius")) return "radius";
|
|
35
|
+
if (/^(padding|margin|gap|row-gap|column-gap)(-|$)/.test(property)) return "space";
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
function normalizeColor(literal) {
|
|
39
|
+
const value = literal.toLowerCase().trim().replace(/\s+/g, " ").replace(/\s*([(),/])\s*/g, "$1");
|
|
40
|
+
if (!value.startsWith("#")) return value;
|
|
41
|
+
const hex = value.slice(1);
|
|
42
|
+
const long = hex.length <= 4 ? [...hex].map((digit) => digit + digit).join("") : hex;
|
|
43
|
+
return `#${long.length === 8 && long.endsWith("ff") ? long.slice(0, 6) : long}`;
|
|
44
|
+
}
|
|
45
|
+
function normalizeLength(literal) {
|
|
46
|
+
const unit = literal.match(/(px|rem|em)$/)?.[1];
|
|
47
|
+
const amount = Number.parseFloat(literal);
|
|
48
|
+
if (unit === "rem") return `${amount * 16}px`;
|
|
49
|
+
return `${amount}${unit ?? ""}`;
|
|
50
|
+
}
|
|
51
|
+
function tokenLiteral(value) {
|
|
52
|
+
const trimmed = value.trim();
|
|
53
|
+
if (/^(#[0-9a-fA-F]{3,8}|rgba?\([^)]*\)|hsla?\([^)]*\))$/.test(trimmed)) return {
|
|
54
|
+
kind: "color",
|
|
55
|
+
value: normalizeColor(trimmed)
|
|
56
|
+
};
|
|
57
|
+
if (/^-?\d*\.?\d+(px|rem|em)$/.test(trimmed)) return {
|
|
58
|
+
kind: "length",
|
|
59
|
+
value: normalizeLength(trimmed)
|
|
60
|
+
};
|
|
61
|
+
if (/^\d*\.?\d+$/.test(trimmed)) return {
|
|
62
|
+
kind: "number",
|
|
63
|
+
value: String(Number(trimmed))
|
|
64
|
+
};
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
function readTokens(css) {
|
|
68
|
+
const index = {
|
|
69
|
+
colors: /* @__PURE__ */ new Map(),
|
|
70
|
+
values: /* @__PURE__ */ new Map()
|
|
71
|
+
};
|
|
72
|
+
for (const match of css.replace(/\/\*[\s\S]*?\*\//g, "").matchAll(/(--[\w-]+)\s*:\s*([^;}]+)/g)) {
|
|
73
|
+
const [, name, raw] = match;
|
|
74
|
+
if (!name || raw === void 0) continue;
|
|
75
|
+
const literal = tokenLiteral(raw);
|
|
76
|
+
if (!literal) continue;
|
|
77
|
+
const map = literal.kind === "color" ? index.colors : index.values;
|
|
78
|
+
const key = literal.kind === "color" ? literal.value : `${literal.kind}:${literal.value}`;
|
|
79
|
+
map.set(key, (map.get(key) ?? /* @__PURE__ */ new Set()).add(name));
|
|
80
|
+
}
|
|
81
|
+
return index;
|
|
82
|
+
}
|
|
83
|
+
function lintValue(index, property, value) {
|
|
84
|
+
const findings = [];
|
|
85
|
+
const painted = PAINTS.test(property) ? value.replace(URL_VALUE, " ") : "";
|
|
86
|
+
for (const [literal] of painted.matchAll(COLOR)) {
|
|
87
|
+
const tokens = index.colors.get(normalizeColor(literal));
|
|
88
|
+
if (tokens) findings.push({
|
|
89
|
+
literal,
|
|
90
|
+
tokens: [...tokens].sort()
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
const category = categoryOf(property);
|
|
94
|
+
if (!category) return findings;
|
|
95
|
+
const prefix = PREFIXES[category];
|
|
96
|
+
const unitless = category === "weight" || category === "leading";
|
|
97
|
+
const literals = [...value.replace(COLOR, " ").matchAll(LENGTH)].map(([literal]) => ({
|
|
98
|
+
literal,
|
|
99
|
+
key: `length:${normalizeLength(literal)}`
|
|
100
|
+
}));
|
|
101
|
+
if (unitless) for (const [literal] of value.replace(COLOR, " ").replace(LENGTH, " ").matchAll(NUMBER)) literals.push({
|
|
102
|
+
literal,
|
|
103
|
+
key: `number:${Number(literal)}`
|
|
104
|
+
});
|
|
105
|
+
for (const { literal, key } of literals) {
|
|
106
|
+
if (Number.parseFloat(literal) === 0) continue;
|
|
107
|
+
const tokens = [...index.values.get(key) ?? []].filter((name) => name.startsWith(prefix)).sort();
|
|
108
|
+
if (tokens.length > 0) findings.push({
|
|
109
|
+
literal,
|
|
110
|
+
tokens
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
return findings;
|
|
114
|
+
}
|
|
115
|
+
function lintSource(index, text) {
|
|
116
|
+
const findings = [];
|
|
117
|
+
const lines = text.replace(/\/\*[\s\S]*?\*\//g, (comment) => comment.replace(/[^\n]/g, " ")).split("\n");
|
|
118
|
+
for (const [index_, line] of lines.entries()) {
|
|
119
|
+
if (/^\s*\/\//.test(line)) continue;
|
|
120
|
+
for (const [, rawProperty, rawValue] of line.matchAll(DECLARATION)) {
|
|
121
|
+
if (!rawProperty || rawValue === void 0) continue;
|
|
122
|
+
for (const finding of lintValue(index, kebab(rawProperty), rawValue.replace(/["'`]/g, " "))) findings.push({
|
|
123
|
+
line: index_ + 1,
|
|
124
|
+
...finding
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
return findings;
|
|
129
|
+
}
|
|
130
|
+
function walk(dir, into) {
|
|
131
|
+
const entries = fs.readdirSync(dir, { withFileTypes: true });
|
|
132
|
+
for (const entry of entries) {
|
|
133
|
+
const full = path.join(dir, entry.name);
|
|
134
|
+
if (entry.isDirectory()) {
|
|
135
|
+
if (!SKIPPED_DIRS.has(entry.name)) walk(full, into);
|
|
136
|
+
} else if (SCANNED.test(entry.name)) into.push(full);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
function lintDesignTokens(project, surfaces) {
|
|
140
|
+
const tokensFile = path.join(project.superwallDir, TOKENS_FILE);
|
|
141
|
+
if (!fs.existsSync(tokensFile)) return [];
|
|
142
|
+
const index = readTokens(fs.readFileSync(tokensFile, "utf8"));
|
|
143
|
+
if (index.colors.size === 0 && index.values.size === 0) return [];
|
|
144
|
+
const files = [];
|
|
145
|
+
for (const dir of [...surfaces.map((surface) => surface.dir), path.join(project.superwallDir, "components")]) if (fs.existsSync(dir)) walk(dir, files);
|
|
146
|
+
const configFiles = new Set(surfaces.map((surface) => surface.configFile));
|
|
147
|
+
return [...new Set(files)].filter((file) => !configFiles.has(file)).flatMap((file) => lintSource(index, fs.readFileSync(file, "utf8")).map((finding) => ({
|
|
148
|
+
file: path.relative(project.superwallDir, file),
|
|
149
|
+
...finding
|
|
150
|
+
})));
|
|
151
|
+
}
|
|
152
|
+
function formatTokenFinding(finding) {
|
|
153
|
+
const tokens = finding.tokens.map((token) => `var(${token})`).join(" or ");
|
|
154
|
+
return `${finding.file}:${finding.line} hard-codes ${finding.literal}, which the design system holds as ${tokens}. Use the token so a design-system change reaches it.`;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
//#endregion
|
|
158
|
+
export { lintDesignTokens as n, formatTokenFinding as t };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import "./token-
|
|
1
|
+
import "./token-B2PduqrR.js";
|
|
2
2
|
import "./output-Ggzq5_-t.js";
|
|
3
|
-
import { S as apiKeyFromEnv } from "./environment-
|
|
4
|
-
import { n as readSession } from "./storage-
|
|
3
|
+
import { S as apiKeyFromEnv } from "./environment-FR3bcq0D.js";
|
|
4
|
+
import { n as readSession } from "./storage-CUMgpcVH.js";
|
|
5
5
|
import "./spawn-DmmmHIP-.js";
|
|
6
6
|
import { n as ui } from "./ui-D_qf3Gvw.js";
|
|
7
7
|
import { n as fg, t as THEME } from "./theme-DUsCh-Vd.js";
|
|
8
|
-
import { t as scanProject } from "./scan-
|
|
9
|
-
import { t as detectExisting } from "./existing-
|
|
10
|
-
import { t as detectDrivers } from "./drivers-
|
|
8
|
+
import { t as scanProject } from "./scan-BZS2FZeU.js";
|
|
9
|
+
import { t as detectExisting } from "./existing-C6TTT6c4.js";
|
|
10
|
+
import { t as detectDrivers } from "./drivers-DkboeR1c.js";
|
|
11
11
|
|
|
12
12
|
//#region src/core/support/doctor.ts
|
|
13
13
|
async function runDoctor(ctx, deps = {}) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as getOAuthAccessToken } from "./token-
|
|
2
|
-
import { t as API_HOST, x as VERSION } from "./environment-
|
|
3
|
-
import { n as readSession } from "./storage-
|
|
1
|
+
import { t as getOAuthAccessToken } from "./token-B2PduqrR.js";
|
|
2
|
+
import { t as API_HOST, x as VERSION } from "./environment-FR3bcq0D.js";
|
|
3
|
+
import { n as readSession } from "./storage-CUMgpcVH.js";
|
|
4
4
|
import { n as readVersion, r as spawnStream, t as onPath } from "./spawn-DmmmHIP-.js";
|
|
5
5
|
import { tmpdir } from "node:os";
|
|
6
6
|
import { basename, join } from "node:path";
|
package/dist/entry.js
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
import { n as __require, r as __toESM, t as __commonJS } from "./chunk-DQxbwPpZ.js";
|
|
2
|
-
import "./token-
|
|
2
|
+
import "./token-B2PduqrR.js";
|
|
3
3
|
import { a as stripAnsi, d as useStores, i as writeJson } from "./output-Ggzq5_-t.js";
|
|
4
|
-
import { T as isNonInteractive, s as CHANNEL, x as VERSION } from "./environment-
|
|
5
|
-
import "./storage-
|
|
6
|
-
import { i as superwallApi } from "./client-
|
|
7
|
-
import { O as useAscRefresh } from "./held-
|
|
4
|
+
import { T as isNonInteractive, s as CHANNEL, x as VERSION } from "./environment-FR3bcq0D.js";
|
|
5
|
+
import "./storage-CUMgpcVH.js";
|
|
6
|
+
import { i as superwallApi } from "./client-DHlsTaP1.js";
|
|
7
|
+
import { O as useAscRefresh } from "./held-C2IjAyg6.js";
|
|
8
8
|
import "./config-CGcG7GOt.js";
|
|
9
|
-
import { n as maybeShowTelemetryNotice, r as track, t as flushTelemetry } from "./telemetry-
|
|
9
|
+
import { n as maybeShowTelemetryNotice, r as track, t as flushTelemetry } from "./telemetry-ekUQuhLJ.js";
|
|
10
10
|
import "./spawn-DmmmHIP-.js";
|
|
11
|
-
import { a as printAutoUpdate, i as maybeNotifyUpdate, l as selectAutoUpdate, n as isGlobalInstall, o as recordAutoUpdate, s as refreshUpdateCheck, t as flushUpdateCheck } from "./upgrade-
|
|
12
|
-
import { c as onChannel, f as useHost, l as summaryOf, o as examplesOf, r as UsageError, s as flagName } from "./spinner-
|
|
11
|
+
import { a as printAutoUpdate, i as maybeNotifyUpdate, l as selectAutoUpdate, n as isGlobalInstall, o as recordAutoUpdate, s as refreshUpdateCheck, t as flushUpdateCheck } from "./upgrade-CI7K1UZ-.js";
|
|
12
|
+
import { c as onChannel, f as useHost, l as summaryOf, o as examplesOf, r as UsageError, s as flagName } from "./spinner-025_eqCX.js";
|
|
13
13
|
import { r as useRenderer, t as silentRenderer } from "./ui-D_qf3Gvw.js";
|
|
14
14
|
import { t as THEME } from "./theme-DUsCh-Vd.js";
|
|
15
15
|
import { n as styleMarkdown, r as wrapReportLine } from "./log-C0MDCfA2.js";
|
|
16
|
-
import { t as scanProject } from "./scan-
|
|
17
|
-
import { t as detectExisting } from "./existing-
|
|
18
|
-
import { n as SUPERWALL_HOME, r as expandHome } from "./paths-
|
|
19
|
-
import { a as renderPage, i as exampleLines, n as cmd, r as detailLines, t as listGroups } from "./registry-
|
|
20
|
-
import "./session-
|
|
21
|
-
import "./orgs-
|
|
22
|
-
import "./resources-
|
|
23
|
-
import "./org-
|
|
24
|
-
import "./lookup-
|
|
25
|
-
import "./scope-
|
|
16
|
+
import { t as scanProject } from "./scan-BZS2FZeU.js";
|
|
17
|
+
import { t as detectExisting } from "./existing-C6TTT6c4.js";
|
|
18
|
+
import { n as SUPERWALL_HOME, r as expandHome } from "./paths-BaeoxDze.js";
|
|
19
|
+
import { a as renderPage, i as exampleLines, n as cmd, r as detailLines, t as listGroups } from "./registry-FNG-uiIt.js";
|
|
20
|
+
import "./session-BpYpOgaY.js";
|
|
21
|
+
import "./orgs-BxlwcvTu.js";
|
|
22
|
+
import "./resources-COOEvqqW.js";
|
|
23
|
+
import "./org-DZ41muzA.js";
|
|
24
|
+
import "./lookup-D23dAOz6.js";
|
|
25
|
+
import "./scope-BJQ-KcQg.js";
|
|
26
26
|
import "./client-BJQXl62Q.js";
|
|
27
27
|
import "./products-Cqq59DBQ.js";
|
|
28
28
|
import "./input-MDd67UIp.js";
|
|
29
29
|
import "./timing-Ca0TXY-A.js";
|
|
30
|
-
import "./notification-url-
|
|
31
|
-
import "./bind-
|
|
30
|
+
import "./notification-url-rdnENCxt.js";
|
|
31
|
+
import "./bind-DOF3o3FR.js";
|
|
32
32
|
import { spawn } from "node:child_process";
|
|
33
33
|
import * as fs from "node:fs";
|
|
34
34
|
import { existsSync, mkdirSync, readFileSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region package.json
|
|
2
|
-
var version = "2.5.
|
|
2
|
+
var version = "2.5.1";
|
|
3
3
|
|
|
4
4
|
//#endregion
|
|
5
5
|
//#region src/environment.ts
|
|
@@ -40,7 +40,7 @@ const ENV_APPLE_ID = "SUPERWALL_APPLE_ID";
|
|
|
40
40
|
const ENV_APPLE_PASSWORD = "SUPERWALL_APPLE_PASSWORD";
|
|
41
41
|
function appleCredentialsFromEnv() {
|
|
42
42
|
const appleId = resolveEnv(ENV_APPLE_ID);
|
|
43
|
-
const password = process
|
|
43
|
+
const password = globalThis.process?.env[ENV_APPLE_PASSWORD];
|
|
44
44
|
return {
|
|
45
45
|
...appleId ? { appleId } : {},
|
|
46
46
|
...password ? { password } : {}
|
|
@@ -60,7 +60,7 @@ const USER_AGENT = () => {
|
|
|
60
60
|
return agent ? `superwall-cli/${VERSION} (${agent})` : `superwall-cli/${VERSION}`;
|
|
61
61
|
};
|
|
62
62
|
function resolveEnv(name) {
|
|
63
|
-
const value = process
|
|
63
|
+
const value = globalThis.process?.env[name]?.trim();
|
|
64
64
|
return value === "" ? void 0 : value;
|
|
65
65
|
}
|
|
66
66
|
function isNonInteractive() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { h as Integration } from "./environment-
|
|
2
|
-
import { i as readPackageJson, r as allDeps } from "./scan-
|
|
1
|
+
import { h as Integration } from "./environment-FR3bcq0D.js";
|
|
2
|
+
import { i as readPackageJson, r as allDeps } from "./scan-BZS2FZeU.js";
|
|
3
3
|
import { readFileSync } from "node:fs";
|
|
4
4
|
import fg from "fast-glob";
|
|
5
5
|
|