@superwall/cli 2.6.0-beta.2 → 2.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +47 -16
- package/dist/{apple-Dc5pOPms.js → apple-BE1GBJFP.js} +17 -19
- package/dist/{approve-BSbdmOez.js → approve-yRZmvkCj.js} +9 -11
- package/dist/{assets-C_RjojkK.js → assets-DTAgbWw0.js} +3 -3
- package/dist/auth.d.ts +11 -4
- package/dist/auth.js +4 -5
- package/dist/base-zc1wl_9b.js +82 -0
- package/dist/{billing-B6HK-F_a.js → billing-C1LV4-BN.js} +3 -3
- package/dist/{build-DK88pTMW.js → build-CQd-pf7O.js} +35 -16
- package/dist/{client-x08fpvay.js → config-DCqRQTJ4.js} +162 -15
- package/dist/create-CSHGZDfB.js +18 -0
- package/dist/{create-kpqEhqkk.js → create-Costu6UT.js} +9 -9
- package/dist/{create-B6-Dr3GZ.js → create-wlCp83IH.js} +41 -41
- package/dist/{doctor-DYbm8IKQ.js → doctor-Bd9ffg51.js} +50 -10
- package/dist/entry.js +45 -40
- package/dist/{environment-BFNzLLPN.js → environment-Dn7irhZr.js} +1 -1
- package/dist/{drivers-Dyi-y9Jn.js → existing-BQMB_2AG.js} +305 -8
- package/dist/framework-DW5fqjh4.js +65 -0
- package/dist/{source-BccdO4aL.js → git-Hf9Wc7Hp.js} +34 -92
- package/dist/{held-sKq3xrsT.js → held-D5wSX2Mf.js} +9 -9
- package/dist/held-Dmf5SR3p.js +15 -0
- package/dist/{install-DsIsif39.js → install-CxyqfKFe.js} +15 -17
- package/dist/{integrate-B8eA676b.js → integrate-MkyDDzI5.js} +33 -38
- package/dist/{login-BlpfYapG.js → login-B7IqDafm.js} +3 -3
- package/dist/{login-Blhxi20A.js → login-BMHDhxAx.js} +8 -9
- package/dist/login-Cp0-BgDZ.js +13 -0
- package/dist/{lookup-Dg55W9S7.js → lookup-DkcT4E-5.js} +28 -4
- package/dist/{migrate-DoRb9jmA.js → migrate-CdFoZipj.js} +66 -45
- package/dist/{notification-url-D82msWF5.js → notification-url-D6KKeXnk.js} +4 -4
- package/dist/{open-BAqLpTSI.js → open-COJE6ryI.js} +2 -2
- package/dist/{org-C4G7WjTV.js → org-BV8wwxwc.js} +4 -4
- package/dist/{organization-CmuQwcKN.js → organization-9R_1PJKk.js} +4 -4
- package/dist/{orgs-1OzwUtpT.js → orgs-ltP8H0Nl.js} +1 -2
- package/dist/{paths-gBbqgkS7.js → paths-Cb1RfjaX.js} +1 -1
- package/dist/{playbook-BKqlv77S.js → playbook-CVGolez9.js} +10 -14
- package/dist/{products-Cqq59DBQ.js → products-CJq_iXv5.js} +1 -1
- package/dist/{promote-D0i8A0CO.js → promote-B_HnFEbX.js} +27 -28
- package/dist/{pull-DgQ_UmGv.js → pull-DF4KYVcP.js} +72 -26
- package/dist/pull-JxiMyRwY.js +30 -0
- package/dist/{pull-CiIrJ5ik.js → pull-lYRULo4v.js} +33 -39
- package/dist/push-B5py7h5y.js +29 -0
- package/dist/{push-7N4XIVtg.js → push-BZN1Qpkq.js} +23 -12
- package/dist/{push-BWsXO7FN.js → push-BnllH2Rd.js} +8 -7
- package/dist/push-DHlUMkbf.js +21 -0
- package/dist/registry-BGEYCWyD.js +22 -0
- package/dist/{registry-aAR_8VOw.js → registry-CqePfigB.js} +1287 -902
- package/dist/{resolve-CcOpO_5s.js → resolve-B4bd3Qjl.js} +4 -4
- package/dist/{resources-DNwvf8rg.js → resources-BaURbSpY.js} +15 -2
- package/dist/{run-tVYJ3V5j.js → run-Bme4Egyl.js} +15 -17
- package/dist/{scan-dv0rrY4C.js → scan-DugxddUU.js} +1 -1
- package/dist/scan-J2DILUNE.js +4 -0
- package/dist/{scope-ehZ7L1nj.js → scope-Cg1AdAfO.js} +33 -3
- package/dist/{scope-BXoQo30_.js → scope-DDYLQeZw.js} +24 -18
- package/dist/screenshot-file-Dix2Qynm.js +127 -0
- package/dist/{sdk-DEfQttek.js → sdk-BFunw4Hc.js} +1 -1
- package/dist/{framework-JFLjmD5Y.js → selection-C439nEhn.js} +4 -54
- package/dist/{series-D2ZpZ8cx.js → series-B8NJK4yS.js} +1 -1
- package/dist/{server-CcZGdYjE.js → server-C_aMxzvS.js} +40 -18
- package/dist/server-Cif9w5lM.js +33 -0
- package/dist/{session-dHBtgSN0.js → session-B7frlXXQ.js} +1 -1
- package/dist/{base-83ZTv6up.js → session-CfG3gzko.js} +8 -83
- package/dist/session-DvaPyOuH.js +5 -0
- package/dist/{migration-BUedsREQ.js → setup-DQEasPhx.js} +290 -28
- package/dist/skills/index.json +5 -0
- package/dist/skills/superwall/SKILL.md +37 -10
- package/dist/skills/superwall/references/api.md +66 -21
- package/dist/skills/superwall/references/asa.md +109 -64
- package/dist/skills/superwall/references/dashboard-links.md +65 -28
- package/dist/skills/superwall/references/data-analytics.md +1 -1
- package/dist/skills/superwall/workflows/dashboard/setup.md +15 -5
- package/dist/skills/superwall/workflows/integrate/flutter.md +9 -7
- package/dist/skills/superwall-framework/SKILL.md +248 -36
- package/dist/skills/superwall-framework/references/cli.md +98 -7
- package/dist/skills/superwall-framework/references/examples.md +2 -2
- package/dist/skills/superwall-framework/references/layout.md +30 -2
- package/dist/skills/superwall-framework/references/migrate-from-editor.md +5 -0
- package/dist/skills/superwall-framework/references/migrate-from-native.md +5 -0
- package/dist/skills/teleport/SKILL.md +154 -0
- package/dist/skills/teleport/references/experiments.md +328 -0
- package/dist/skills/teleport/references/setup.md +157 -0
- package/dist/{skills-Q7xB784d.js → skills-DnegE1A6.js} +139 -9
- package/dist/{skills-Bqz2l_bx.js → skills-MmF7IyTg.js} +8 -12
- package/dist/source-DQs6iLtC.js +82 -0
- package/dist/{source-push-CG948HrX.js → source-push-MbJjh4Ki.js} +38 -14
- package/dist/{spinner-IA6hV8nI.js → spinner-Dcr-Dqdi.js} +7 -5
- package/dist/{starter-BtUUQWhd.js → starter-BlJ_InZJ.js} +2 -2
- package/dist/{status-CB_MrFu5.js → status-DHRxg1ZA.js} +9 -11
- package/dist/{output-Ggzq5_-t.js → storage-DdIAHolY.js} +40 -1
- package/dist/storekit-De998QOt.js +203 -0
- package/dist/storekit-iBCWmeKn.js +15 -0
- package/dist/{bind-DcWIIPgk.js → theme-BrUrye-c.js} +29 -6
- package/dist/token-CKCBQ4I8.js +100 -0
- package/dist/tools-skills/animate-onboarding/SKILL.md +1 -1
- package/dist/tools-skills/mobile-design/SKILL.md +1 -1
- package/dist/tools-skills/onboarding-questions/SKILL.md +1 -1
- package/dist/tools-skills/superwall/SKILL.md +43 -17
- package/dist/tools-skills/superwall/references/api.md +74 -24
- package/dist/tools-skills/superwall/references/asa.md +109 -64
- package/dist/tools-skills/superwall/references/dashboard-links.md +65 -28
- package/dist/tools-skills/superwall/references/data-analytics.md +1 -1
- package/dist/tools-skills/superwall/workflows/dashboard/playbook.md +4 -3
- package/dist/tools-skills/superwall/workflows/dashboard/setup.md +21 -8
- package/dist/tools-skills/superwall/workflows/integrate/flutter.md +9 -7
- package/dist/tools-skills/superwall/workflows/migrate/adapty.md +4 -3
- package/dist/tools-skills/superwall/workflows/migrate/playbook.md +2 -2
- package/dist/tools-skills/superwall/workflows/migrate/qonversion.md +4 -3
- package/dist/tools-skills/superwall/workflows/migrate/revenuecat.md +4 -3
- package/dist/tools-skills/superwall-editor/SKILL.md +2 -3
- package/dist/tools-skills/teleport/SKILL.md +154 -0
- package/dist/tools-skills/teleport/references/experiments.md +328 -0
- package/dist/tools-skills/teleport/references/setup.md +157 -0
- package/dist/tools.d.ts +1 -1
- package/dist/tools.js +1232 -746
- package/dist/{try-CS3jLyoP.js → try-C8QQbG0b.js} +17 -19
- package/dist/{lock-DgSx-p8Y.js → types-Dc9U_4kp.js} +86 -80
- package/dist/upgrade-CYFdpVpi.js +27 -0
- package/dist/upgrade-D0thxCA4.js +348 -0
- package/package.json +11 -3
- package/dist/config-CGcG7GOt.js +0 -113
- package/dist/create-Du8Fx7W5.js +0 -20
- package/dist/existing-WQ3pz94o.js +0 -97
- package/dist/held-DmOhszHR.js +0 -17
- package/dist/log-C0MDCfA2.js +0 -62
- package/dist/login-D9jfRO8w.js +0 -17
- package/dist/pull-CO5HlqBe.js +0 -36
- package/dist/push-BIhGDNpL.js +0 -30
- package/dist/push-BgqTddLA.js +0 -22
- package/dist/run-B-YoyB-a.js +0 -100
- package/dist/scan-BU41gcQY.js +0 -4
- package/dist/screenshot-file-XAS0Xy0e.js +0 -16
- package/dist/server-BemmM1FV.js +0 -29
- package/dist/session-4aITGsF1.js +0 -6
- package/dist/setup-m94dpT3t.js +0 -217
- package/dist/spawn-DmmmHIP-.js +0 -71
- package/dist/storage-pR0Wb0d9.js +0 -41
- package/dist/storekit-BMxyYAHj.js +0 -17
- package/dist/storekit-CQnwlpKV.js +0 -47
- package/dist/telemetry-DU56L7Cy.js +0 -56
- package/dist/theme-DUsCh-Vd.js +0 -25
- package/dist/token-BbUeExGJ.js +0 -70
- package/dist/upgrade-CKn88PZD.js +0 -206
- package/dist/upgrade-DfD3-ClG.js +0 -7
- /package/dist/{browser-Bp3yRKlU.js → browser-BVjaf98V.js} +0 -0
- /package/dist/{client-BJQXl62Q.js → client-BwYhzITp.js} +0 -0
- /package/dist/{design-lint-CiFc78aM.js → design-lint-mgO-2SGS.js} +0 -0
- /package/dist/{devtools-ByZ6XYnn.js → devtools-B6Vp6HMy.js} +0 -0
- /package/dist/{input-MDd67UIp.js → input-DOT_2Zvb.js} +0 -0
- /package/dist/{project-NoMtbMyl.js → project-BomArwSj.js} +0 -0
- /package/dist/{reports-HYVp169R.js → reports-hbxsd3Zo.js} +0 -0
- /package/dist/{storage-Bdz5AmqS.d.ts → storage-Bh3wT1Rn.d.ts} +0 -0
- /package/dist/{timing-Ca0TXY-A.js → timing-BKEEIBij.js} +0 -0
- /package/dist/{ui-D_qf3Gvw.js → ui-hFgji1e8.js} +0 -0
package/dist/config-CGcG7GOt.js
DELETED
|
@@ -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 };
|
package/dist/create-Du8Fx7W5.js
DELETED
|
@@ -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 };
|
package/dist/held-DmOhszHR.js
DELETED
|
@@ -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 };
|
package/dist/log-C0MDCfA2.js
DELETED
|
@@ -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 };
|
package/dist/login-D9jfRO8w.js
DELETED
|
@@ -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 };
|
package/dist/pull-CO5HlqBe.js
DELETED
|
@@ -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 };
|
package/dist/push-BIhGDNpL.js
DELETED
|
@@ -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 };
|
package/dist/push-BgqTddLA.js
DELETED
|
@@ -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 };
|
package/dist/run-B-YoyB-a.js
DELETED
|
@@ -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 };
|
package/dist/scan-BU41gcQY.js
DELETED
|
@@ -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 };
|
package/dist/server-BemmM1FV.js
DELETED
|
@@ -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 };
|