@superwall/cli 2.6.0-beta.2 → 2.6.0

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 (144) hide show
  1. package/README.md +47 -16
  2. package/dist/{apple-Dc5pOPms.js → apple-D-rfsuDA.js} +17 -19
  3. package/dist/{approve-BSbdmOez.js → approve-aPc5RoXB.js} +9 -11
  4. package/dist/{assets-C_RjojkK.js → assets-PyuXe45Y.js} +3 -3
  5. package/dist/auth.d.ts +11 -4
  6. package/dist/auth.js +4 -5
  7. package/dist/base-CAU0hWoI.js +82 -0
  8. package/dist/{billing-B6HK-F_a.js → billing-Dt6L_l9R.js} +3 -3
  9. package/dist/{build-DK88pTMW.js → build-CY5FnMNY.js} +35 -16
  10. package/dist/{client-x08fpvay.js → config-DOp5oChe.js} +162 -15
  11. package/dist/{create-B6-Dr3GZ.js → create-BZL5VH4L.js} +41 -41
  12. package/dist/{create-kpqEhqkk.js → create-D6w3UL0m.js} +9 -9
  13. package/dist/create-DM5Y1Pyk.js +18 -0
  14. package/dist/{doctor-DYbm8IKQ.js → doctor-C9FR0qw3.js} +50 -10
  15. package/dist/entry.js +45 -40
  16. package/dist/{environment-BFNzLLPN.js → environment-sE2wZYdg.js} +1 -1
  17. package/dist/{drivers-Dyi-y9Jn.js → existing--peXpOZj.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-CUBCOCGP.js} +8 -8
  21. package/dist/held-DVxvPMSG.js +15 -0
  22. package/dist/{install-DsIsif39.js → install-C5d82gZF.js} +15 -17
  23. package/dist/{integrate-B8eA676b.js → integrate-D8J_X1bj.js} +33 -38
  24. package/dist/{login-Blhxi20A.js → login-C6X7JrhM.js} +8 -9
  25. package/dist/{login-BlpfYapG.js → login-DXhm9L0F.js} +3 -3
  26. package/dist/login-et319ESO.js +13 -0
  27. package/dist/{lookup-Dg55W9S7.js → lookup-DqmIbUkv.js} +28 -4
  28. package/dist/{migrate-DoRb9jmA.js → migrate-BYF6hKZ2.js} +66 -45
  29. package/dist/{notification-url-D82msWF5.js → notification-url-Bo54nkXv.js} +4 -4
  30. package/dist/{open-BAqLpTSI.js → open-xdgXUzaF.js} +2 -2
  31. package/dist/{org-C4G7WjTV.js → org-BD8U3D1_.js} +4 -4
  32. package/dist/{organization-CmuQwcKN.js → organization-D-ZlB3qU.js} +4 -4
  33. package/dist/{orgs-1OzwUtpT.js → orgs-DQQJ3sw_.js} +1 -2
  34. package/dist/{paths-gBbqgkS7.js → paths-CIlyzF2I.js} +1 -1
  35. package/dist/{playbook-BKqlv77S.js → playbook-ecggWGFi.js} +10 -14
  36. package/dist/{products-Cqq59DBQ.js → products-CJq_iXv5.js} +1 -1
  37. package/dist/{promote-D0i8A0CO.js → promote-QVMLGYlU.js} +27 -28
  38. package/dist/{pull-DgQ_UmGv.js → pull-CCXhb2a7.js} +72 -26
  39. package/dist/{pull-CiIrJ5ik.js → pull-CrdsfsAl.js} +33 -39
  40. package/dist/pull-h71pL3r_.js +30 -0
  41. package/dist/push-BIq6R8Ro.js +29 -0
  42. package/dist/push-D6pJM_vv.js +21 -0
  43. package/dist/{push-7N4XIVtg.js → push-DJMGG7zW.js} +23 -12
  44. package/dist/{push-BWsXO7FN.js → push-DiMDwGfe.js} +8 -7
  45. package/dist/{registry-aAR_8VOw.js → registry-BSnQXft4.js} +1286 -901
  46. package/dist/registry-YwzTfCNc.js +22 -0
  47. package/dist/{resolve-CcOpO_5s.js → resolve-DO7bPota.js} +4 -4
  48. package/dist/{resources-DNwvf8rg.js → resources-XwvXA20E.js} +15 -2
  49. package/dist/{run-tVYJ3V5j.js → run-B-YvxfRc.js} +15 -17
  50. package/dist/scan-B36wkZmI.js +4 -0
  51. package/dist/{scan-dv0rrY4C.js → scan-ViBhmrB7.js} +1 -1
  52. package/dist/{scope-BXoQo30_.js → scope-BLLUxbrA.js} +24 -18
  53. package/dist/{scope-ehZ7L1nj.js → scope-Cg1AdAfO.js} +33 -3
  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-C07e_GGY.js} +4 -54
  57. package/dist/{series-D2ZpZ8cx.js → series-B8NJK4yS.js} +1 -1
  58. package/dist/{server-CcZGdYjE.js → server-CBtHzl9y.js} +40 -18
  59. package/dist/server-CZwSfzKe.js +33 -0
  60. package/dist/{base-83ZTv6up.js → session-BfVx50iA.js} +8 -83
  61. package/dist/{session-dHBtgSN0.js → session-BlrwAdGN.js} +1 -1
  62. package/dist/session-Cip4j99n.js +5 -0
  63. package/dist/{migration-BUedsREQ.js → setup-a4B72xJ8.js} +290 -28
  64. package/dist/skills/superwall/SKILL.md +37 -10
  65. package/dist/skills/superwall/references/api.md +66 -21
  66. package/dist/skills/superwall/references/asa.md +109 -64
  67. package/dist/skills/superwall/references/dashboard-links.md +65 -28
  68. package/dist/skills/superwall/references/data-analytics.md +1 -1
  69. package/dist/skills/superwall/workflows/dashboard/setup.md +15 -5
  70. package/dist/skills/superwall/workflows/integrate/flutter.md +9 -7
  71. package/dist/skills/superwall-framework/SKILL.md +197 -14
  72. package/dist/skills/superwall-framework/references/cli.md +98 -7
  73. package/dist/skills/superwall-framework/references/examples.md +2 -2
  74. package/dist/skills/superwall-framework/references/migrate-from-editor.md +5 -0
  75. package/dist/skills/superwall-framework/references/migrate-from-native.md +5 -0
  76. package/dist/{skills-Q7xB784d.js → skills-BB1uIt8t.js} +139 -9
  77. package/dist/{skills-Bqz2l_bx.js → skills-SnxFa2in.js} +8 -12
  78. package/dist/source-DQs6iLtC.js +82 -0
  79. package/dist/{source-push-CG948HrX.js → source-push-w7miTr6m.js} +38 -14
  80. package/dist/{spinner-IA6hV8nI.js → spinner-BQp7fQvK.js} +7 -5
  81. package/dist/{starter-BtUUQWhd.js → starter-BlJ_InZJ.js} +2 -2
  82. package/dist/{status-CB_MrFu5.js → status-DxsIw9zq.js} +9 -11
  83. package/dist/{output-Ggzq5_-t.js → storage-BR6imSqm.js} +40 -1
  84. package/dist/storekit-BqyujKQ_.js +203 -0
  85. package/dist/storekit-ELVCMF0X.js +15 -0
  86. package/dist/{bind-DcWIIPgk.js → theme-Ed0gz6hr.js} +29 -6
  87. package/dist/token-CWQ6tdva.js +100 -0
  88. package/dist/tools-skills/animate-onboarding/SKILL.md +1 -1
  89. package/dist/tools-skills/mobile-design/SKILL.md +1 -1
  90. package/dist/tools-skills/onboarding-questions/SKILL.md +1 -1
  91. package/dist/tools-skills/superwall/SKILL.md +43 -17
  92. package/dist/tools-skills/superwall/references/api.md +74 -24
  93. package/dist/tools-skills/superwall/references/asa.md +109 -64
  94. package/dist/tools-skills/superwall/references/dashboard-links.md +65 -28
  95. package/dist/tools-skills/superwall/references/data-analytics.md +1 -1
  96. package/dist/tools-skills/superwall/workflows/dashboard/playbook.md +4 -3
  97. package/dist/tools-skills/superwall/workflows/dashboard/setup.md +21 -8
  98. package/dist/tools-skills/superwall/workflows/integrate/flutter.md +9 -7
  99. package/dist/tools-skills/superwall/workflows/migrate/adapty.md +4 -3
  100. package/dist/tools-skills/superwall/workflows/migrate/playbook.md +2 -2
  101. package/dist/tools-skills/superwall/workflows/migrate/qonversion.md +4 -3
  102. package/dist/tools-skills/superwall/workflows/migrate/revenuecat.md +4 -3
  103. package/dist/tools-skills/superwall-editor/SKILL.md +2 -3
  104. package/dist/tools.d.ts +1 -1
  105. package/dist/tools.js +1230 -745
  106. package/dist/{try-CS3jLyoP.js → try-C3HW3hPZ.js} +17 -19
  107. package/dist/{lock-DgSx-p8Y.js → types-Dc9U_4kp.js} +86 -80
  108. package/dist/upgrade-Cw9jVt-r.js +348 -0
  109. package/dist/upgrade-DVsonzDF.js +27 -0
  110. package/package.json +11 -3
  111. package/dist/config-CGcG7GOt.js +0 -113
  112. package/dist/create-Du8Fx7W5.js +0 -20
  113. package/dist/existing-WQ3pz94o.js +0 -97
  114. package/dist/held-DmOhszHR.js +0 -17
  115. package/dist/log-C0MDCfA2.js +0 -62
  116. package/dist/login-D9jfRO8w.js +0 -17
  117. package/dist/pull-CO5HlqBe.js +0 -36
  118. package/dist/push-BIhGDNpL.js +0 -30
  119. package/dist/push-BgqTddLA.js +0 -22
  120. package/dist/run-B-YoyB-a.js +0 -100
  121. package/dist/scan-BU41gcQY.js +0 -4
  122. package/dist/screenshot-file-XAS0Xy0e.js +0 -16
  123. package/dist/server-BemmM1FV.js +0 -29
  124. package/dist/session-4aITGsF1.js +0 -6
  125. package/dist/setup-m94dpT3t.js +0 -217
  126. package/dist/spawn-DmmmHIP-.js +0 -71
  127. package/dist/storage-pR0Wb0d9.js +0 -41
  128. package/dist/storekit-BMxyYAHj.js +0 -17
  129. package/dist/storekit-CQnwlpKV.js +0 -47
  130. package/dist/telemetry-DU56L7Cy.js +0 -56
  131. package/dist/theme-DUsCh-Vd.js +0 -25
  132. package/dist/token-BbUeExGJ.js +0 -70
  133. package/dist/upgrade-CKn88PZD.js +0 -206
  134. package/dist/upgrade-DfD3-ClG.js +0 -7
  135. /package/dist/{browser-Bp3yRKlU.js → browser-BVjaf98V.js} +0 -0
  136. /package/dist/{client-BJQXl62Q.js → client-BwYhzITp.js} +0 -0
  137. /package/dist/{design-lint-CiFc78aM.js → design-lint-mgO-2SGS.js} +0 -0
  138. /package/dist/{devtools-ByZ6XYnn.js → devtools-B6Vp6HMy.js} +0 -0
  139. /package/dist/{input-MDd67UIp.js → input-DOT_2Zvb.js} +0 -0
  140. /package/dist/{project-NoMtbMyl.js → project-BomArwSj.js} +0 -0
  141. /package/dist/{reports-HYVp169R.js → reports-hbxsd3Zo.js} +0 -0
  142. /package/dist/{storage-Bdz5AmqS.d.ts → storage-Bh3wT1Rn.d.ts} +0 -0
  143. /package/dist/{timing-Ca0TXY-A.js → timing-BKEEIBij.js} +0 -0
  144. /package/dist/{ui-D_qf3Gvw.js → ui-hFgji1e8.js} +0 -0
@@ -1,113 +0,0 @@
1
- import { l as readJson, r as formatJson, u as state } from "./output-Ggzq5_-t.js";
2
-
3
- //#region src/core/state/config.ts
4
- const FILE = "config.json";
5
- function read() {
6
- return readJson(state(), FILE) ?? {};
7
- }
8
- function write(config) {
9
- state().write(FILE, `${formatJson(config)}\n`);
10
- }
11
- function readDefaultApp(projectId) {
12
- return read().defaultApp?.[projectId];
13
- }
14
- function writeDefaultApp(projectId, applicationId) {
15
- const config = read();
16
- config.defaultApp = {
17
- ...config.defaultApp ?? {},
18
- [projectId]: applicationId
19
- };
20
- write(config);
21
- }
22
- function readOpenedOrgs() {
23
- return read().openedOrgs ?? [];
24
- }
25
- function writeOpenedOrgs(ids) {
26
- const config = read();
27
- const next = [...new Set(ids)];
28
- if (next.join() === (config.openedOrgs ?? []).join()) return;
29
- config.openedOrgs = next;
30
- write(config);
31
- }
32
- function readSkillsSync() {
33
- return read().skillsSync;
34
- }
35
- function writeSkillsSync(sync) {
36
- const config = read();
37
- config.skillsSync = sync;
38
- write(config);
39
- }
40
- function readAnonymousId() {
41
- const config = read();
42
- if (config.telemetry?.anonymousId) return config.telemetry.anonymousId;
43
- const anonymousId = crypto.randomUUID();
44
- config.telemetry = {
45
- ...config.telemetry,
46
- anonymousId
47
- };
48
- write(config);
49
- return anonymousId;
50
- }
51
- function readOnboardedOrg() {
52
- return read().onboarded?.org;
53
- }
54
- function writeOnboardedOrg(org) {
55
- const config = read();
56
- config.onboarded = {
57
- ...config.onboarded,
58
- org
59
- };
60
- write(config);
61
- }
62
- function readOnboardedApp(appPath) {
63
- return read().onboarded?.apps?.[appPath];
64
- }
65
- function writeOnboardedApp(appPath, app) {
66
- const config = read();
67
- config.onboarded = {
68
- ...config.onboarded,
69
- apps: {
70
- ...config.onboarded?.apps,
71
- [appPath]: app
72
- }
73
- };
74
- write(config);
75
- }
76
- function readUpdateCheck() {
77
- return read().updateCheck;
78
- }
79
- function writeUpdateCheck(check) {
80
- const config = read();
81
- config.updateCheck = check;
82
- write(config);
83
- }
84
- function readAutoUpdate() {
85
- return read().autoUpdate;
86
- }
87
- function writeAutoUpdate(update) {
88
- const config = read();
89
- config.autoUpdate = update;
90
- write(config);
91
- }
92
- function readOnboardingIdempotencyKey() {
93
- const config = read();
94
- if (config.onboardingIdempotencyKey) return config.onboardingIdempotencyKey;
95
- const key = crypto.randomUUID();
96
- config.onboardingIdempotencyKey = key;
97
- write(config);
98
- return key;
99
- }
100
- function telemetryNoticeShown() {
101
- return Boolean(read().telemetry?.noticeShown);
102
- }
103
- function writeTelemetryNoticeShown() {
104
- const config = read();
105
- config.telemetry = {
106
- ...config.telemetry,
107
- noticeShown: true
108
- };
109
- write(config);
110
- }
111
-
112
- //#endregion
113
- export { writeTelemetryNoticeShown as _, readOnboardedOrg as a, readSkillsSync as c, writeAutoUpdate as d, writeDefaultApp as f, writeSkillsSync as g, writeOpenedOrgs as h, readOnboardedApp as i, readUpdateCheck as l, writeOnboardedOrg as m, readAutoUpdate as n, readOnboardingIdempotencyKey as o, writeOnboardedApp as p, readDefaultApp as r, readOpenedOrgs as s, readAnonymousId as t, telemetryNoticeShown as u, writeUpdateCheck as v };
@@ -1,20 +0,0 @@
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 "./held-sKq3xrsT.js";
7
- import "./config-CGcG7GOt.js";
8
- import "./spinner-IA6hV8nI.js";
9
- import "./ui-D_qf3Gvw.js";
10
- import "./paths-gBbqgkS7.js";
11
- import "./orgs-1OzwUtpT.js";
12
- import "./resources-DNwvf8rg.js";
13
- import "./org-C4G7WjTV.js";
14
- import "./lookup-Dg55W9S7.js";
15
- import "./scope-BXoQo30_.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-kpqEhqkk.js";
19
-
20
- export { createAndSaveKey, keyAccess, keyRole, runAscKeysCreate };
@@ -1,97 +0,0 @@
1
- import { h as Integration } from "./environment-BFNzLLPN.js";
2
- import { i as readPackageJson, r as allDeps } from "./scan-dv0rrY4C.js";
3
- import { readFileSync } from "node:fs";
4
- import fg from "fast-glob";
5
-
6
- //#region src/core/codebase/existing.ts
7
- const JS_SDK_PACKAGES = {
8
- [Integration.expo]: ["expo-superwall"],
9
- [Integration.reactNative]: ["@superwall/react-native-superwall", "react-native-superwall"],
10
- [Integration.web]: ["@superwall/web", "superwall-js"]
11
- };
12
- const PK_RE = /pk_[A-Za-z0-9._-]{6,}/;
13
- const CONFIGURE_RE = /Superwall\.(shared\.)?configure|configureSuperwall|SuperwallProvider|\.configure\(\s*apiKey/;
14
- const SDK_REF_RE = /Superwall-iOS|SuperwallKit|superwallkit_flutter|expo-superwall|superwall/i;
15
- const SOURCE_GLOBS = [
16
- "**/*.{swift,ts,tsx,js,jsx,kt,dart}",
17
- "**/.env*",
18
- "**/*.xcconfig"
19
- ];
20
- const IGNORE = [
21
- "**/node_modules/**",
22
- "**/.git/**",
23
- "**/Pods/**",
24
- "**/build/**",
25
- "**/.build/**",
26
- "**/DerivedData/**",
27
- "**/dist/**",
28
- "**/.next/**"
29
- ];
30
- const MAX_FILES = 600;
31
- function sdkInstalledFor(app) {
32
- const jsPkgs = JS_SDK_PACKAGES[app.integration];
33
- if (jsPkgs) {
34
- const deps = allDeps(readPackageJson(app.path));
35
- if (jsPkgs.some((p) => p in deps)) return true;
36
- }
37
- const manifests = fg.sync([
38
- "**/Package.resolved",
39
- "**/project.pbxproj",
40
- "**/Podfile",
41
- "**/pubspec.yaml",
42
- "**/pubspec.lock",
43
- "**/build.gradle",
44
- "**/build.gradle.kts",
45
- "**/libs.versions.toml"
46
- ], {
47
- cwd: app.path,
48
- ignore: IGNORE,
49
- absolute: true,
50
- deep: 5
51
- });
52
- for (const f of manifests) {
53
- let content;
54
- try {
55
- content = readFileSync(f, "utf8");
56
- } catch {
57
- continue;
58
- }
59
- if (SDK_REF_RE.test(content)) return true;
60
- }
61
- return false;
62
- }
63
- function detectExisting(app) {
64
- const sdkInstalled = sdkInstalledFor(app);
65
- let configureFound = false;
66
- let apiKey;
67
- const files = fg.sync(SOURCE_GLOBS, {
68
- cwd: app.path,
69
- ignore: IGNORE,
70
- absolute: true,
71
- deep: 6,
72
- dot: true
73
- });
74
- for (const f of files.slice(0, MAX_FILES)) {
75
- let content;
76
- try {
77
- content = readFileSync(f, "utf8");
78
- } catch {
79
- continue;
80
- }
81
- if (!configureFound && CONFIGURE_RE.test(content)) configureFound = true;
82
- if (!apiKey) {
83
- const m = content.match(PK_RE);
84
- if (m) apiKey = m[0];
85
- }
86
- if (configureFound && apiKey) break;
87
- }
88
- return {
89
- sdkInstalled,
90
- configureFound,
91
- apiKey,
92
- fullyIntegrated: sdkInstalled && configureFound
93
- };
94
- }
95
-
96
- //#endregion
97
- export { detectExisting as t };
@@ -1,17 +0,0 @@
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 { t as upsertHeldKey } from "./held-sKq3xrsT.js";
7
- import "./config-CGcG7GOt.js";
8
- import "./spinner-IA6hV8nI.js";
9
- import "./ui-D_qf3Gvw.js";
10
- import "./orgs-1OzwUtpT.js";
11
- import "./resources-DNwvf8rg.js";
12
- import "./org-C4G7WjTV.js";
13
- import "./lookup-Dg55W9S7.js";
14
- import "./scope-BXoQo30_.js";
15
- import "./client-BJQXl62Q.js";
16
-
17
- export { upsertHeldKey };
@@ -1,62 +0,0 @@
1
- import { n as fg, t as THEME } from "./theme-DUsCh-Vd.js";
2
- import { pathToFileURL } from "node:url";
3
- import pc from "picocolors";
4
- import { link } from "ansi-escapes";
5
- import wrapAnsi from "wrap-ansi";
6
-
7
- //#region src/ui/log.ts
8
- function brand(text) {
9
- return fg(THEME.primary, text);
10
- }
11
- function stripReport(raw) {
12
- const lines = raw.replace(/\r/g, "").split("\n").filter((l) => !/^\s*\[STATUS\]/i.test(l));
13
- while (lines[0]?.trim() === "") lines.shift();
14
- while (lines.at(-1)?.trim() === "") lines.pop();
15
- return lines.join("\n");
16
- }
17
- function styleMarkdown(text) {
18
- return text.split("\n").map((line) => styleMarkdownLine(line)).join("\n");
19
- }
20
- function styleMarkdownLine(line, opts = {}) {
21
- const heading = line.match(/^\s*(#{1,6})\s+(.*)$/)?.[2];
22
- if (heading !== void 0) return brand(pc.bold(styleInline(heading, opts.hyperlinks ?? false)));
23
- return styleInline(line, opts.hyperlinks ?? false);
24
- }
25
- function wrapReportLine(line, columns) {
26
- const prefix = line.match(/^(\s*(?:(?:[-*+])|(?:\d+[.)]))\s+)/)?.[1] ?? "";
27
- const content = prefix ? line.slice(prefix.length) : line;
28
- const width = Math.max(12, columns - prefix.length);
29
- return wrapAnsi(styleMarkdownLine(content, { hyperlinks: true }), width, {
30
- hard: true,
31
- trim: false
32
- }).split("\n").map((part, index) => `${index === 0 ? prefix : " ".repeat(prefix.length)}${part}`);
33
- }
34
- function styleInline(line, hyperlinks) {
35
- const re = /\[([^\]]+)]\(([^)]+)\)|\*\*(.+?)\*\*|`([^`]+)`|(https?:\/\/[^\s]+)/g;
36
- let out = "";
37
- let last = 0;
38
- let match;
39
- while (match = re.exec(line)) {
40
- out += line.slice(last, match.index);
41
- if (match[1] != null && match[2] != null) {
42
- const label = match[1];
43
- const target = match[2];
44
- out += hyperlinks ? link(brand(pc.underline(label)), terminalLinkTarget(target)) : `${label} (${target})`;
45
- } else if (match[3] != null) out += pc.bold(match[3]);
46
- else if (match[4] != null) out += brand(match[4]);
47
- else if (match[5] != null) out += hyperlinks ? link(brand(pc.underline(match[5])), match[5]) : match[5];
48
- last = re.lastIndex;
49
- }
50
- out += line.slice(last);
51
- return out;
52
- }
53
- function terminalLinkTarget(target) {
54
- const local = target.match(/^(\/.*?)(?::(\d+))?$/);
55
- const file = local?.[1];
56
- if (file === void 0) return target;
57
- const url = pathToFileURL(file).href;
58
- return local?.[2] ? `${url}#L${local[2]}` : url;
59
- }
60
-
61
- //#endregion
62
- export { styleMarkdown as n, wrapReportLine as r, stripReport as t };
@@ -1,17 +0,0 @@
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 "./scan-dv0rrY4C.js";
12
- import "./paths-gBbqgkS7.js";
13
- import { i as startLogin, n as pollLogin, r as runLogin, t as performLogin } from "./login-Blhxi20A.js";
14
- import "./skills-Q7xB784d.js";
15
- import "./browser-Bp3yRKlU.js";
16
-
17
- export { performLogin, pollLogin, runLogin, startLogin };
@@ -1,36 +0,0 @@
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 "./lock-DgSx-p8Y.js";
25
- import "./scope-ehZ7L1nj.js";
26
- import "./base-83ZTv6up.js";
27
- import "./framework-JFLjmD5Y.js";
28
- import "./run-B-YoyB-a.js";
29
- import "./drivers-Dyi-y9Jn.js";
30
- import "./migration-BUedsREQ.js";
31
- import "./login-BlpfYapG.js";
32
- import "./source-BccdO4aL.js";
33
- import "./setup-m94dpT3t.js";
34
- import { a as cloneInto, c as pullInto, i as boundPaywall, l as runPull, n as applyPulledChanges, o as cloneTarget, r as appsToPull, s as mergePulledLock, t as PullPathError } from "./pull-DgQ_UmGv.js";
35
-
36
- export { PullPathError, applyPulledChanges, appsToPull, boundPaywall, cloneInto, cloneTarget, mergePulledLock, pullInto, runPull };
@@ -1,30 +0,0 @@
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 "./scan-dv0rrY4C.js";
12
- import "./paths-gBbqgkS7.js";
13
- import "./orgs-1OzwUtpT.js";
14
- import "./resources-DNwvf8rg.js";
15
- import "./lookup-Dg55W9S7.js";
16
- import "./login-Blhxi20A.js";
17
- import "./skills-Q7xB784d.js";
18
- import "./browser-Bp3yRKlU.js";
19
- import "./lock-DgSx-p8Y.js";
20
- import "./scope-ehZ7L1nj.js";
21
- import "./base-83ZTv6up.js";
22
- import "./framework-JFLjmD5Y.js";
23
- import "./login-BlpfYapG.js";
24
- import "./source-BccdO4aL.js";
25
- import "./assets-C_RjojkK.js";
26
- import "./design-lint-CiFc78aM.js";
27
- import "./source-push-CG948HrX.js";
28
- import { i as timed, n as runPush, r as runPushPipeline, t as group } from "./push-7N4XIVtg.js";
29
-
30
- export { group, runPush, runPushPipeline, timed };
@@ -1,22 +0,0 @@
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 "./spinner-IA6hV8nI.js";
8
- import "./ui-D_qf3Gvw.js";
9
- import "./orgs-1OzwUtpT.js";
10
- import "./resources-DNwvf8rg.js";
11
- import "./lookup-Dg55W9S7.js";
12
- import "./resolve-CcOpO_5s.js";
13
- import "./project-NoMtbMyl.js";
14
- import "./lock-DgSx-p8Y.js";
15
- import "./scope-ehZ7L1nj.js";
16
- import "./organization-CmuQwcKN.js";
17
- import "./download-DhGd4hOB.js";
18
- import "./sdk-DEfQttek.js";
19
- import "./source-BccdO4aL.js";
20
- import { a as toSourceAccess, i as slugOfName, n as namesOf, o as waitForBuild, r as runArtifactPush, t as IncomingCommitsRefused } from "./push-BWsXO7FN.js";
21
-
22
- export { IncomingCommitsRefused, namesOf, runArtifactPush, slugOfName, toSourceAccess, waitForBuild };
@@ -1,100 +0,0 @@
1
- import { d as DASHBOARD_URL } from "./environment-BFNzLLPN.js";
2
- import { i as packagedDir } from "./paths-gBbqgkS7.js";
3
- import { spawn } from "node:child_process";
4
- import { readFileSync } from "node:fs";
5
- import { join } from "node:path";
6
-
7
- //#region src/ui/clipboard.ts
8
- async function copyToClipboard(text) {
9
- const cmd = resolveClipboardCommand();
10
- return new Promise((resolve$1) => {
11
- try {
12
- const child = spawn(cmd.command, cmd.args, { stdio: [
13
- "pipe",
14
- "ignore",
15
- "ignore"
16
- ] });
17
- child.on("error", () => resolve$1(false));
18
- child.on("close", (code) => resolve$1(code === 0));
19
- child.stdin.on("error", () => resolve$1(false));
20
- child.stdin.write(text);
21
- child.stdin.end();
22
- } catch {
23
- resolve$1(false);
24
- }
25
- });
26
- }
27
- function resolveClipboardCommand() {
28
- switch (process.platform) {
29
- case "darwin": return {
30
- command: "pbcopy",
31
- args: []
32
- };
33
- case "win32": return {
34
- command: "clip",
35
- args: []
36
- };
37
- default: return {
38
- command: "xclip",
39
- args: ["-selection", "clipboard"]
40
- };
41
- }
42
- }
43
-
44
- //#endregion
45
- //#region src/core/workflows/agent/prompt.ts
46
- const cache = /* @__PURE__ */ new Map();
47
- function readPrompt(rel, vars = {}) {
48
- let raw = cache.get(rel);
49
- if (raw === void 0) {
50
- raw = readFileSync(join(packagedDir("prompts"), rel), "utf8");
51
- cache.set(rel, raw);
52
- }
53
- return raw.replace(/\{\{#(\w+)\}\}([\s\S]*?)\{\{\/\1\}\}/g, (_m, key, body) => vars[key] ? body : "").replace(/\{\{(\w+)\}\}/g, (_m, key) => {
54
- const value = vars[key];
55
- if (value === void 0) throw new Error(`Missing prompt variable "${key}" in ${rel}`);
56
- return value;
57
- }).replace(/\n{3,}/g, "\n\n").trim();
58
- }
59
- function readCommandments() {
60
- return readPrompt("commandments.xml");
61
- }
62
- function buildActionPrompt(action, ctx) {
63
- return `${readPrompt("context.xml", {
64
- platform: `${ctx.app.framework.name}${ctx.app.details ? ` (${ctx.app.details})` : ""}`,
65
- app_dir: ctx.app.path,
66
- api_key: ctx.apiKey || "(not provided)",
67
- sdk_installed: ctx.existing.sdkInstalled ? "yes" : "no",
68
- configure_present: ctx.existing.configureFound ? "yes" : "no",
69
- docs_url: ctx.app.framework.docsUrl,
70
- dashboard_url: DASHBOARD_URL
71
- })}\n\n${readPrompt(`actions/${action.id}.xml`, action.vars(ctx))}`;
72
- }
73
- function buildCopyPrompt(action, ctx) {
74
- return buildActionPrompt(action, ctx).split("\n").filter((line) => !line.includes("[STATUS]")).join("\n").trimEnd();
75
- }
76
-
77
- //#endregion
78
- //#region src/core/workflows/agent/run.ts
79
- async function runAction(opts) {
80
- return runWithDriverFallback([opts.driver, ...opts.fallbackDrivers ?? []], {
81
- prompt: buildActionPrompt(opts.action, opts.ctx),
82
- cwd: opts.ctx.app.path,
83
- systemAppend: readCommandments(),
84
- capabilities: opts.action.capabilities,
85
- onEvent: opts.onEvent,
86
- signal: opts.signal
87
- });
88
- }
89
- async function runWithDriverFallback(drivers, options) {
90
- if (drivers.length === 0) throw new Error("No agent driver available.");
91
- let result = { ok: false };
92
- for (const driver of drivers) {
93
- result = await driver.run(options);
94
- if (result.ok || result.failureReason !== "usage-limit") return result;
95
- }
96
- return result;
97
- }
98
-
99
- //#endregion
100
- export { copyToClipboard as a, readPrompt as i, runWithDriverFallback as n, buildCopyPrompt as r, runAction as t };
@@ -1,4 +0,0 @@
1
- import "./environment-BFNzLLPN.js";
2
- import { t as scanProject } from "./scan-dv0rrY4C.js";
3
-
4
- export { scanProject };
@@ -1,16 +0,0 @@
1
- import { readFileSync } from "node:fs";
2
- import { basename } from "node:path";
3
- import { createHash } from "node:crypto";
4
-
5
- //#region src/core/app-store-connect/resources/screenshot-file.ts
6
- function readScreenshotFile(path) {
7
- const bytes = new Uint8Array(readFileSync(path));
8
- return {
9
- name: basename(path),
10
- bytes,
11
- checksum: createHash("md5").update(bytes).digest("hex")
12
- };
13
- }
14
-
15
- //#endregion
16
- export { readScreenshotFile };
@@ -1,29 +0,0 @@
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 "./scan-dv0rrY4C.js";
12
- import "./paths-gBbqgkS7.js";
13
- import "./orgs-1OzwUtpT.js";
14
- import "./resources-DNwvf8rg.js";
15
- import "./lookup-Dg55W9S7.js";
16
- import "./login-Blhxi20A.js";
17
- import "./skills-Q7xB784d.js";
18
- import "./browser-Bp3yRKlU.js";
19
- import "./lock-DgSx-p8Y.js";
20
- import "./scope-ehZ7L1nj.js";
21
- import "./base-83ZTv6up.js";
22
- import "./framework-JFLjmD5Y.js";
23
- import "./login-BlpfYapG.js";
24
- import "./source-BccdO4aL.js";
25
- import "./assets-C_RjojkK.js";
26
- import "./source-push-CG948HrX.js";
27
- import { t as runStudio } from "./server-CcZGdYjE.js";
28
-
29
- export { runStudio };
@@ -1,6 +0,0 @@
1
- import "./output-Ggzq5_-t.js";
2
- import "./environment-BFNzLLPN.js";
3
- import "./storage-pR0Wb0d9.js";
4
- import { n as runWhoami, t as runLogout } from "./session-dHBtgSN0.js";
5
-
6
- export { runLogout, runWhoami };