@posthog/wizard 2.66.0 → 2.67.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.
- package/dist/{add-mcp-server-to-clients-DWDEuDUR.js → add-mcp-server-to-clients-DHTRbyJX.js} +25 -25
- package/dist/{add-mcp-server-to-clients-DWDEuDUR.js.map → add-mcp-server-to-clients-DHTRbyJX.js.map} +1 -1
- package/dist/{agent-interface-D3MNaDp3.js → agent-interface-tM_b0l__.js} +130 -41
- package/dist/agent-interface-tM_b0l__.js.map +1 -0
- package/dist/{agent-prompt-loader-D8Bajo-L.js → agent-prompt-loader-BSMh5bfD.js} +5 -5
- package/dist/{agent-prompt-loader-D8Bajo-L.js.map → agent-prompt-loader-BSMh5bfD.js.map} +1 -1
- package/dist/{agent-runner-DEeMqJxy.js → agent-runner-DD65OMkB.js} +67 -36
- package/dist/agent-runner-DD65OMkB.js.map +1 -0
- package/dist/analytics-B4Igh5nv.js +2 -0
- package/dist/{analytics-D8JNuPAT.js → analytics-CtIYzkK4.js} +2 -2
- package/dist/{analytics-D8JNuPAT.js.map → analytics-CtIYzkK4.js.map} +1 -1
- package/dist/{api-CemGgyBv.js → api-BJft9v6K.js} +3 -3
- package/dist/{api-CemGgyBv.js.map → api-BJft9v6K.js.map} +1 -1
- package/dist/bin.js +200 -85
- package/dist/bin.js.map +1 -1
- package/dist/{bounded-fs-C6OjqZst.js → bounded-fs-BWqoFQvQ.js} +3 -3
- package/dist/{bounded-fs-C6OjqZst.js.map → bounded-fs-BWqoFQvQ.js.map} +1 -1
- package/dist/{ci-install-DIB2n4Ju.js → ci-install-BXGnVI7T.js} +18 -9
- package/dist/ci-install-BXGnVI7T.js.map +1 -0
- package/dist/{debug-BKqv-yfT.js → debug-BsHD83Vy.js} +4 -4
- package/dist/debug-BsHD83Vy.js.map +1 -0
- package/dist/{debug-H-GTKvvU.js → debug-mO3yg4Z7.js} +1 -1
- package/dist/{defaults-BHhXrX9F.js → defaults-DI642M3n.js} +1 -1
- package/dist/{defaults-BHhXrX9F.js.map → defaults-DI642M3n.js.map} +1 -1
- package/dist/{env-api-key-CzHDwfV2.js → env-api-key-DS0ghlcO.js} +2 -2
- package/dist/{env-api-key-CzHDwfV2.js.map → env-api-key-DS0ghlcO.js.map} +1 -1
- package/dist/{environment-Cl-fIQku.js → environment-C7CKGIOE.js} +4 -4
- package/dist/{environment-Cl-fIQku.js.map → environment-C7CKGIOE.js.map} +1 -1
- package/dist/errors-BHervYGs.js +156 -0
- package/dist/errors-BHervYGs.js.map +1 -0
- package/dist/{file-watcher-Cr-4tA-e.js → file-watcher-D1bdo9mq.js} +2 -2
- package/dist/{file-watcher-Cr-4tA-e.js.map → file-watcher-D1bdo9mq.js.map} +1 -1
- package/dist/{headless-ui-DT3Db1bk.js → headless-ui-6QuByWZ_.js} +2 -2
- package/dist/{headless-ui-DT3Db1bk.js.map → headless-ui-6QuByWZ_.js.map} +1 -1
- package/dist/{interactive-D3LdFxZG.js → interactive-DUpW84WU.js} +2 -2
- package/dist/{interactive-D3LdFxZG.js.map → interactive-DUpW84WU.js.map} +1 -1
- package/dist/{local-dev-BN6NKQ0B.js → local-dev-DPZiIPCK.js} +1 -1
- package/dist/{local-dev-BN6NKQ0B.js.map → local-dev-DPZiIPCK.js.map} +1 -1
- package/dist/{mcp-BjckYQmP.js → mcp-CHo9h-WV.js} +2 -2
- package/dist/{mcp-BjckYQmP.js.map → mcp-CHo9h-WV.js.map} +1 -1
- package/dist/{mcp-prompt-streaming--sRErHKv.js → mcp-prompt-streaming-CHRPxxd0.js} +4 -4
- package/dist/{mcp-prompt-streaming--sRErHKv.js.map → mcp-prompt-streaming-CHRPxxd0.js.map} +1 -1
- package/dist/{non-interactive-CNoYoEZp.js → non-interactive-Cr-chffe.js} +7 -2
- package/dist/non-interactive-Cr-chffe.js.map +1 -0
- package/dist/{orchestrator-tools-8bGyDDhn.js → orchestrator-tools-Tx18_TMb.js} +3 -3
- package/dist/{orchestrator-tools-8bGyDDhn.js.map → orchestrator-tools-Tx18_TMb.js.map} +1 -1
- package/dist/{package-json-D0DCWpe5.js → package-json-GEU2VZlS.js} +1 -1
- package/dist/{package-json-D0DCWpe5.js.map → package-json-GEU2VZlS.js.map} +1 -1
- package/dist/{package-manager-BQDHm7ER.js → package-manager-CLfc31yf.js} +4 -4
- package/dist/package-manager-CLfc31yf.js.map +1 -0
- package/dist/{pi-W-4RUPFY.js → pi-RlnYUHdb.js} +12 -11
- package/dist/{pi-W-4RUPFY.js.map → pi-RlnYUHdb.js.map} +1 -1
- package/dist/{playground-uHHgZChe.js → playground-DQ633rje.js} +7 -7
- package/dist/{playground-uHHgZChe.js.map → playground-DQ633rje.js.map} +1 -1
- package/dist/{posthog-ChzdlmCs.js → posthog-DSn9bIZc.js} +2 -2
- package/dist/{posthog-ChzdlmCs.js.map → posthog-DSn9bIZc.js.map} +1 -1
- package/dist/{posthog-integration-LxEBGkoe.js → posthog-integration-DFfBRGOC.js} +21 -17
- package/dist/{posthog-integration-LxEBGkoe.js.map → posthog-integration-DFfBRGOC.js.map} +1 -1
- package/dist/{provisioning-BHTl91OZ.js → provisioning-Cvy_vQHV.js} +3 -3
- package/dist/{provisioning-BHTl91OZ.js.map → provisioning-Cvy_vQHV.js.map} +1 -1
- package/dist/{queue-tools-DABh1Ssc.js → queue-tools-BC9HxOV6.js} +3 -3
- package/dist/{queue-tools-DABh1Ssc.js.map → queue-tools-BC9HxOV6.js.map} +1 -1
- package/dist/{registry-CxNpCNAj.js → registry-DCAElOyj.js} +81 -81
- package/dist/{registry-CxNpCNAj.js.map → registry-DCAElOyj.js.map} +1 -1
- package/dist/{security-B4jU_-7q.js → security-CuSX3XVo.js} +21 -9
- package/dist/security-CuSX3XVo.js.map +1 -0
- package/dist/{setup-utils-aWZEdfwh.js → setup-utils-D1tv0v_R.js} +13 -13
- package/dist/{setup-utils-aWZEdfwh.js.map → setup-utils-D1tv0v_R.js.map} +1 -1
- package/dist/{start-tui-BQH4mQIZ.js → start-tui-B5YfmqNr.js} +33 -23
- package/dist/start-tui-B5YfmqNr.js.map +1 -0
- package/dist/{steps-5HAqjUvn.js → steps-CLaSMwfR.js} +7 -7
- package/dist/{steps-5HAqjUvn.js.map → steps-CLaSMwfR.js.map} +1 -1
- package/dist/{store-P_7zUfbj.js → store-DzEgsAPN.js} +5 -5
- package/dist/{store-P_7zUfbj.js.map → store-DzEgsAPN.js.map} +1 -1
- package/dist/{subagent-uGPDXPfS.js → subagent-BUV6aD7p.js} +2 -2
- package/dist/{subagent-uGPDXPfS.js.map → subagent-BUV6aD7p.js.map} +1 -1
- package/dist/{task-oh8OAnvR.js → task-GnWId75q.js} +13 -12
- package/dist/{task-oh8OAnvR.js.map → task-GnWId75q.js.map} +1 -1
- package/dist/{task-stream-jUARpyB5.js → task-stream-DSzvwJrD.js} +16 -9
- package/dist/task-stream-DSzvwJrD.js.map +1 -0
- package/dist/{tasks-2mu3lAvm.js → tasks-BO0W8ocx.js} +2 -2
- package/dist/{tasks-2mu3lAvm.js.map → tasks-BO0W8ocx.js.map} +1 -1
- package/dist/{telemetry-BllPiBKw.js → telemetry-Vi9dWddJ.js} +3 -3
- package/dist/{telemetry-BllPiBKw.js.map → telemetry-Vi9dWddJ.js.map} +1 -1
- package/dist/{terminal-aWQrDy8s.js → terminal-B5wZK7aS.js} +13 -13
- package/dist/{terminal-aWQrDy8s.js.map → terminal-B5wZK7aS.js.map} +1 -1
- package/dist/{tools-u8TaJFqa.js → tools-C9cNluqc.js} +6 -6
- package/dist/{tools-u8TaJFqa.js.map → tools-C9cNluqc.js.map} +1 -1
- package/dist/{wizard-abort-pFFH7dcx.js → wizard-abort-BsNbguJt.js} +1 -1
- package/dist/wizard-abort-CGv3lVxw.js +71 -0
- package/dist/wizard-abort-CGv3lVxw.js.map +1 -0
- package/dist/{wizard-session-DTyLMPsX.js → wizard-session-Cex1BiXs.js} +2 -2
- package/dist/wizard-session-Cex1BiXs.js.map +1 -0
- package/dist/{wizard-session-Cw7-_OcZ.js → wizard-session-DHbUcjI7.js} +1 -1
- package/dist/yara-hooks-C3Vm2Gow.js +2 -0
- package/dist/{yara-hooks-BXDBIOBq.js → yara-hooks-DZIVzhA6.js} +57 -8
- package/dist/yara-hooks-DZIVzhA6.js.map +1 -0
- package/package.json +1 -1
- package/dist/agent-interface-D3MNaDp3.js.map +0 -1
- package/dist/agent-runner-DEeMqJxy.js.map +0 -1
- package/dist/analytics-DN3Kzf7H.js +0 -2
- package/dist/ci-install-DIB2n4Ju.js.map +0 -1
- package/dist/debug-BKqv-yfT.js.map +0 -1
- package/dist/non-interactive-CNoYoEZp.js.map +0 -1
- package/dist/package-manager-BQDHm7ER.js.map +0 -1
- package/dist/security-B4jU_-7q.js.map +0 -1
- package/dist/start-tui-BQH4mQIZ.js.map +0 -1
- package/dist/task-stream-jUARpyB5.js.map +0 -1
- package/dist/wizard-abort-D9jiMkZA.js +0 -49
- package/dist/wizard-abort-D9jiMkZA.js.map +0 -1
- package/dist/wizard-session-DTyLMPsX.js.map +0 -1
- package/dist/yara-hooks-BXDBIOBq.js.map +0 -1
- package/dist/yara-hooks-i2jOabhI.js +0 -2
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B_-DWIq7.js";
|
|
2
|
-
import { f as getUI } from "./debug-
|
|
3
|
-
import { i as readProjectFile, n as boundedGlob } from "./bounded-fs-
|
|
4
|
-
import { a as createVersionBucket, i as tryGetPackageJson, l as detectAllPackageManagers } from "./setup-utils-
|
|
5
|
-
import { n as getInstalledPackageVersion, r as hasDeclaredDependency, t as getDeclaredVersion } from "./package-json-
|
|
6
|
-
import { a as detectNodePackageManagers, c as gradlePackageManager, d as swiftPackageManager, f as detectPackageManager$1, h as getPythonVersionBucket, i as detectJavaPackageManagers, l as mixPackageManager, m as getPythonVersion, n as cargoPackageManager, o as detectPythonPackageManagers, p as getPackageManagerName$1, r as composerPackageManager, s as goModulesPackageManager, t as bundlerPackageManager, u as pubPackageManager } from "./package-manager-
|
|
2
|
+
import { f as getUI } from "./debug-BsHD83Vy.js";
|
|
3
|
+
import { i as readProjectFile, n as boundedGlob } from "./bounded-fs-BWqoFQvQ.js";
|
|
4
|
+
import { a as createVersionBucket, i as tryGetPackageJson, l as detectAllPackageManagers } from "./setup-utils-D1tv0v_R.js";
|
|
5
|
+
import { n as getInstalledPackageVersion, r as hasDeclaredDependency, t as getDeclaredVersion } from "./package-json-GEU2VZlS.js";
|
|
6
|
+
import { a as detectNodePackageManagers, c as gradlePackageManager, d as swiftPackageManager, f as detectPackageManager$1, h as getPythonVersionBucket, i as detectJavaPackageManagers, l as mixPackageManager, m as getPythonVersion, n as cargoPackageManager, o as detectPythonPackageManagers, p as getPackageManagerName$1, r as composerPackageManager, s as goModulesPackageManager, t as bundlerPackageManager, u as pubPackageManager } from "./package-manager-CLfc31yf.js";
|
|
7
7
|
import * as semver from "semver";
|
|
8
8
|
import { major, minVersion } from "semver";
|
|
9
9
|
import path from "path";
|
|
10
|
-
import * as path$
|
|
10
|
+
import * as path$2 from "node:path";
|
|
11
11
|
import * as fs$1 from "node:fs";
|
|
12
12
|
import fg from "fast-glob";
|
|
13
13
|
import fs from "fs/promises";
|
|
@@ -233,7 +233,7 @@ async function hasCreateBrowserRouter({ installDir }) {
|
|
|
233
233
|
extraIgnore: EXTRA_IGNORE$11,
|
|
234
234
|
limit: SOURCE_PROBE_LIMIT$5
|
|
235
235
|
});
|
|
236
|
-
for (const file of sourceFiles) if (readProjectFile(path$
|
|
236
|
+
for (const file of sourceFiles) if (readProjectFile(path$2.join(installDir, file))?.includes("createBrowserRouter")) return true;
|
|
237
237
|
return false;
|
|
238
238
|
}
|
|
239
239
|
async function hasDeclarativeRouter({ installDir }) {
|
|
@@ -243,7 +243,7 @@ async function hasDeclarativeRouter({ installDir }) {
|
|
|
243
243
|
limit: SOURCE_PROBE_LIMIT$5
|
|
244
244
|
});
|
|
245
245
|
for (const file of sourceFiles) {
|
|
246
|
-
const content = readProjectFile(path$
|
|
246
|
+
const content = readProjectFile(path$2.join(installDir, file));
|
|
247
247
|
if (!content) continue;
|
|
248
248
|
if (content.includes("<BrowserRouter") || content.includes("BrowserRouter") && (content.includes("from \"react-router-dom\"") || content.includes("from 'react-router-dom'"))) return true;
|
|
249
249
|
}
|
|
@@ -365,7 +365,7 @@ async function hasFileBasedRouting({ installDir }) {
|
|
|
365
365
|
limit: 1
|
|
366
366
|
})).length > 0) return true;
|
|
367
367
|
try {
|
|
368
|
-
const packageJsonPath = path$
|
|
368
|
+
const packageJsonPath = path$2.join(installDir, "package.json");
|
|
369
369
|
const content = fs$1.readFileSync(packageJsonPath, "utf-8");
|
|
370
370
|
const packageJson = JSON.parse(content);
|
|
371
371
|
if (hasDeclaredDependency("@tanstack/router-plugin", packageJson) || hasDeclaredDependency("@tanstack/router-vite-plugin", packageJson)) return true;
|
|
@@ -375,7 +375,7 @@ async function hasFileBasedRouting({ installDir }) {
|
|
|
375
375
|
extraIgnore: EXTRA_IGNORE$10,
|
|
376
376
|
limit: SOURCE_PROBE_LIMIT$4
|
|
377
377
|
});
|
|
378
|
-
for (const file of sourceFiles) if (readProjectFile(path$
|
|
378
|
+
for (const file of sourceFiles) if (readProjectFile(path$2.join(installDir, file))?.includes("createFileRoute")) return true;
|
|
379
379
|
return false;
|
|
380
380
|
}
|
|
381
381
|
async function hasCodeBasedRouting({ installDir }) {
|
|
@@ -387,7 +387,7 @@ async function hasCodeBasedRouting({ installDir }) {
|
|
|
387
387
|
let hasCreateRoute = false;
|
|
388
388
|
let hasCreateFileRoute = false;
|
|
389
389
|
for (const file of sourceFiles) {
|
|
390
|
-
const content = readProjectFile(path$
|
|
390
|
+
const content = readProjectFile(path$2.join(installDir, file));
|
|
391
391
|
if (!content) continue;
|
|
392
392
|
if (content.includes("createRoute(")) hasCreateRoute = true;
|
|
393
393
|
if (content.includes("createFileRoute")) hasCreateFileRoute = true;
|
|
@@ -819,7 +819,7 @@ async function getDjangoVersion(options) {
|
|
|
819
819
|
extraIgnore: EXTRA_IGNORE$8
|
|
820
820
|
});
|
|
821
821
|
for (const reqFile of requirementsFiles) {
|
|
822
|
-
const content = readProjectFile(path$
|
|
822
|
+
const content = readProjectFile(path$2.join(installDir, reqFile));
|
|
823
823
|
if (!content) continue;
|
|
824
824
|
const requirementsMatch = content.match(/[Dd]jango[=<>~!]+([0-9]+\.[0-9]+(?:\.[0-9]+)?)/);
|
|
825
825
|
if (requirementsMatch) return requirementsMatch[1];
|
|
@@ -839,12 +839,12 @@ async function hasDRF({ installDir }) {
|
|
|
839
839
|
cwd: installDir,
|
|
840
840
|
extraIgnore: EXTRA_IGNORE$8
|
|
841
841
|
});
|
|
842
|
-
for (const reqFile of requirementsFiles) if (readProjectFile(path$
|
|
842
|
+
for (const reqFile of requirementsFiles) if (readProjectFile(path$2.join(installDir, reqFile))?.includes("djangorestframework")) return true;
|
|
843
843
|
const settingsFiles = await boundedGlob("**/settings.py", {
|
|
844
844
|
cwd: installDir,
|
|
845
845
|
extraIgnore: EXTRA_IGNORE$8
|
|
846
846
|
});
|
|
847
|
-
for (const settingsFile of settingsFiles) if (readProjectFile(path$
|
|
847
|
+
for (const settingsFile of settingsFiles) if (readProjectFile(path$2.join(installDir, settingsFile))?.includes("rest_framework")) return true;
|
|
848
848
|
return false;
|
|
849
849
|
}
|
|
850
850
|
/**
|
|
@@ -859,7 +859,7 @@ async function hasWagtail({ installDir }) {
|
|
|
859
859
|
cwd: installDir,
|
|
860
860
|
extraIgnore: EXTRA_IGNORE$8
|
|
861
861
|
});
|
|
862
|
-
for (const reqFile of requirementsFiles) if (readProjectFile(path$
|
|
862
|
+
for (const reqFile of requirementsFiles) if (readProjectFile(path$2.join(installDir, reqFile))?.includes("wagtail")) return true;
|
|
863
863
|
return false;
|
|
864
864
|
}
|
|
865
865
|
/**
|
|
@@ -874,7 +874,7 @@ async function hasChannels({ installDir }) {
|
|
|
874
874
|
cwd: installDir,
|
|
875
875
|
extraIgnore: EXTRA_IGNORE$8
|
|
876
876
|
});
|
|
877
|
-
for (const reqFile of requirementsFiles) if (readProjectFile(path$
|
|
877
|
+
for (const reqFile of requirementsFiles) if (readProjectFile(path$2.join(installDir, reqFile))?.includes("channels")) return true;
|
|
878
878
|
return false;
|
|
879
879
|
}
|
|
880
880
|
/**
|
|
@@ -927,7 +927,7 @@ async function findDjangoSettingsFile(options) {
|
|
|
927
927
|
return;
|
|
928
928
|
}
|
|
929
929
|
if (settingsFiles.length === 1) return settingsFiles[0];
|
|
930
|
-
for (const settingsFile of settingsFiles) if (readProjectFile(path$
|
|
930
|
+
for (const settingsFile of settingsFiles) if (readProjectFile(path$2.join(installDir, settingsFile))?.includes("ROOT_URLCONF")) return settingsFile;
|
|
931
931
|
return settingsFiles[0];
|
|
932
932
|
}
|
|
933
933
|
//#endregion
|
|
@@ -961,7 +961,7 @@ const DJANGO_AGENT_CONFIG = {
|
|
|
961
961
|
extraIgnore: EXTRA_IGNORE$7
|
|
962
962
|
});
|
|
963
963
|
if (managePyMatches.length > 0) for (const match of managePyMatches) {
|
|
964
|
-
const content = readProjectFile(path$
|
|
964
|
+
const content = readProjectFile(path$2.join(installDir, match));
|
|
965
965
|
if (!content) continue;
|
|
966
966
|
if (content.includes("from django") || content.includes("import django") || content.includes("DJANGO_SETTINGS_MODULE") || /execute_from_command_line/.test(content)) return true;
|
|
967
967
|
}
|
|
@@ -974,7 +974,7 @@ const DJANGO_AGENT_CONFIG = {
|
|
|
974
974
|
extraIgnore: EXTRA_IGNORE$7
|
|
975
975
|
});
|
|
976
976
|
for (const reqFile of requirementsFiles) {
|
|
977
|
-
const content = readProjectFile(path$
|
|
977
|
+
const content = readProjectFile(path$2.join(installDir, reqFile));
|
|
978
978
|
if (!content) continue;
|
|
979
979
|
if (/^django([>=~!<\s]|$)/im.test(content) || /["']django["']/i.test(content)) return true;
|
|
980
980
|
}
|
|
@@ -1053,7 +1053,7 @@ async function getFlaskVersion(options) {
|
|
|
1053
1053
|
extraIgnore: EXTRA_IGNORE$6
|
|
1054
1054
|
});
|
|
1055
1055
|
for (const reqFile of requirementsFiles) {
|
|
1056
|
-
const content = readProjectFile(path$
|
|
1056
|
+
const content = readProjectFile(path$2.join(installDir, reqFile));
|
|
1057
1057
|
if (!content) continue;
|
|
1058
1058
|
const requirementsMatch = content.match(/[Ff]lask[=<>~!]+([0-9]+\.[0-9]+(?:\.[0-9]+)?)/);
|
|
1059
1059
|
if (requirementsMatch) return requirementsMatch[1];
|
|
@@ -1074,7 +1074,7 @@ async function hasFlaskRESTful({ installDir }) {
|
|
|
1074
1074
|
extraIgnore: EXTRA_IGNORE$6
|
|
1075
1075
|
});
|
|
1076
1076
|
for (const reqFile of requirementsFiles) {
|
|
1077
|
-
const content = readProjectFile(path$
|
|
1077
|
+
const content = readProjectFile(path$2.join(installDir, reqFile));
|
|
1078
1078
|
if (!content) continue;
|
|
1079
1079
|
if (content.includes("flask-restful") || content.includes("Flask-RESTful")) return true;
|
|
1080
1080
|
}
|
|
@@ -1084,7 +1084,7 @@ async function hasFlaskRESTful({ installDir }) {
|
|
|
1084
1084
|
limit: SOURCE_PROBE_LIMIT$3
|
|
1085
1085
|
});
|
|
1086
1086
|
for (const pyFile of pyFiles) {
|
|
1087
|
-
const content = readProjectFile(path$
|
|
1087
|
+
const content = readProjectFile(path$2.join(installDir, pyFile));
|
|
1088
1088
|
if (!content) continue;
|
|
1089
1089
|
if (content.includes("from flask_restful import") || content.includes("import flask_restful")) return true;
|
|
1090
1090
|
}
|
|
@@ -1103,7 +1103,7 @@ async function hasFlaskRESTX({ installDir }) {
|
|
|
1103
1103
|
extraIgnore: EXTRA_IGNORE$6
|
|
1104
1104
|
});
|
|
1105
1105
|
for (const reqFile of requirementsFiles) {
|
|
1106
|
-
const content = readProjectFile(path$
|
|
1106
|
+
const content = readProjectFile(path$2.join(installDir, reqFile));
|
|
1107
1107
|
if (!content) continue;
|
|
1108
1108
|
if (content.includes("flask-restx") || content.includes("Flask-RESTX")) return true;
|
|
1109
1109
|
}
|
|
@@ -1113,7 +1113,7 @@ async function hasFlaskRESTX({ installDir }) {
|
|
|
1113
1113
|
limit: SOURCE_PROBE_LIMIT$3
|
|
1114
1114
|
});
|
|
1115
1115
|
for (const pyFile of pyFiles) {
|
|
1116
|
-
const content = readProjectFile(path$
|
|
1116
|
+
const content = readProjectFile(path$2.join(installDir, pyFile));
|
|
1117
1117
|
if (!content) continue;
|
|
1118
1118
|
if (content.includes("from flask_restx import") || content.includes("import flask_restx")) return true;
|
|
1119
1119
|
}
|
|
@@ -1132,7 +1132,7 @@ async function hasFlaskSmorest({ installDir }) {
|
|
|
1132
1132
|
extraIgnore: EXTRA_IGNORE$6
|
|
1133
1133
|
});
|
|
1134
1134
|
for (const reqFile of requirementsFiles) {
|
|
1135
|
-
const content = readProjectFile(path$
|
|
1135
|
+
const content = readProjectFile(path$2.join(installDir, reqFile));
|
|
1136
1136
|
if (!content) continue;
|
|
1137
1137
|
if (content.includes("flask-smorest")) return true;
|
|
1138
1138
|
}
|
|
@@ -1142,7 +1142,7 @@ async function hasFlaskSmorest({ installDir }) {
|
|
|
1142
1142
|
limit: SOURCE_PROBE_LIMIT$3
|
|
1143
1143
|
});
|
|
1144
1144
|
for (const pyFile of pyFiles) {
|
|
1145
|
-
const content = readProjectFile(path$
|
|
1145
|
+
const content = readProjectFile(path$2.join(installDir, pyFile));
|
|
1146
1146
|
if (!content) continue;
|
|
1147
1147
|
if (content.includes("from flask_smorest import") || content.includes("import flask_smorest")) return true;
|
|
1148
1148
|
}
|
|
@@ -1158,7 +1158,7 @@ async function hasBlueprints({ installDir }) {
|
|
|
1158
1158
|
limit: SOURCE_PROBE_LIMIT$3
|
|
1159
1159
|
});
|
|
1160
1160
|
for (const pyFile of pyFiles) {
|
|
1161
|
-
const content = readProjectFile(path$
|
|
1161
|
+
const content = readProjectFile(path$2.join(installDir, pyFile));
|
|
1162
1162
|
if (!content) continue;
|
|
1163
1163
|
if (content.includes("Blueprint(") || content.includes("register_blueprint(") || content.includes("from flask import Blueprint")) return true;
|
|
1164
1164
|
}
|
|
@@ -1217,7 +1217,7 @@ async function findFlaskAppFile(options) {
|
|
|
1217
1217
|
extraIgnore: EXTRA_IGNORE$6
|
|
1218
1218
|
});
|
|
1219
1219
|
for (const appFile of appFiles) {
|
|
1220
|
-
const content = readProjectFile(path$
|
|
1220
|
+
const content = readProjectFile(path$2.join(installDir, appFile));
|
|
1221
1221
|
if (!content) continue;
|
|
1222
1222
|
if (content.includes("Flask(__name__)") || content.includes("Flask(") || content.includes("def create_app(")) return appFile;
|
|
1223
1223
|
}
|
|
@@ -1227,7 +1227,7 @@ async function findFlaskAppFile(options) {
|
|
|
1227
1227
|
limit: SOURCE_PROBE_LIMIT$3
|
|
1228
1228
|
});
|
|
1229
1229
|
for (const pyFile of allPyFiles) {
|
|
1230
|
-
const content = readProjectFile(path$
|
|
1230
|
+
const content = readProjectFile(path$2.join(installDir, pyFile));
|
|
1231
1231
|
if (!content) continue;
|
|
1232
1232
|
if (content.includes("Flask(__name__)") || content.includes("def create_app(")) return pyFile;
|
|
1233
1233
|
}
|
|
@@ -1269,7 +1269,7 @@ const FLASK_AGENT_CONFIG = {
|
|
|
1269
1269
|
extraIgnore: EXTRA_IGNORE$5
|
|
1270
1270
|
});
|
|
1271
1271
|
for (const reqFile of requirementsFiles) {
|
|
1272
|
-
const content = readProjectFile(path$
|
|
1272
|
+
const content = readProjectFile(path$2.join(installDir, reqFile));
|
|
1273
1273
|
if (!content) continue;
|
|
1274
1274
|
if (/^flask([<>=~!]|$|\s)/im.test(content) || /["']flask["']/i.test(content)) return true;
|
|
1275
1275
|
}
|
|
@@ -1283,7 +1283,7 @@ const FLASK_AGENT_CONFIG = {
|
|
|
1283
1283
|
extraIgnore: EXTRA_IGNORE$5
|
|
1284
1284
|
});
|
|
1285
1285
|
for (const pyFile of pyFiles) {
|
|
1286
|
-
const content = readProjectFile(path$
|
|
1286
|
+
const content = readProjectFile(path$2.join(installDir, pyFile));
|
|
1287
1287
|
if (!content) continue;
|
|
1288
1288
|
if (content.includes("from flask import") || content.includes("import flask") || /Flask\s*\(/.test(content)) return true;
|
|
1289
1289
|
}
|
|
@@ -1373,7 +1373,7 @@ async function getFastAPIVersion(options) {
|
|
|
1373
1373
|
extraIgnore: EXTRA_IGNORE$4
|
|
1374
1374
|
});
|
|
1375
1375
|
for (const reqFile of requirementsFiles) {
|
|
1376
|
-
const content = readProjectFile(path$
|
|
1376
|
+
const content = readProjectFile(path$2.join(installDir, reqFile));
|
|
1377
1377
|
if (!content) continue;
|
|
1378
1378
|
const requirementsMatch = content.match(/[Ff]ast[Aa][Pp][Ii][=<>~!]+([0-9]+\.[0-9]+(?:\.[0-9]+)?)/);
|
|
1379
1379
|
if (requirementsMatch) return requirementsMatch[1];
|
|
@@ -1391,7 +1391,7 @@ async function hasAPIRouter({ installDir }) {
|
|
|
1391
1391
|
limit: SOURCE_PROBE_LIMIT$2
|
|
1392
1392
|
});
|
|
1393
1393
|
for (const pyFile of pyFiles) {
|
|
1394
|
-
const content = readProjectFile(path$
|
|
1394
|
+
const content = readProjectFile(path$2.join(installDir, pyFile));
|
|
1395
1395
|
if (!content) continue;
|
|
1396
1396
|
if (content.includes("APIRouter(") || content.includes("include_router(") || content.includes("from fastapi import APIRouter")) return true;
|
|
1397
1397
|
}
|
|
@@ -1407,7 +1407,7 @@ async function hasTemplates({ installDir }) {
|
|
|
1407
1407
|
limit: SOURCE_PROBE_LIMIT$2
|
|
1408
1408
|
});
|
|
1409
1409
|
for (const pyFile of pyFiles) {
|
|
1410
|
-
const content = readProjectFile(path$
|
|
1410
|
+
const content = readProjectFile(path$2.join(installDir, pyFile));
|
|
1411
1411
|
if (!content) continue;
|
|
1412
1412
|
if (content.includes("Jinja2Templates") || content.includes("from fastapi.templating import")) return true;
|
|
1413
1413
|
}
|
|
@@ -1459,7 +1459,7 @@ async function findFastAPIAppFile(options) {
|
|
|
1459
1459
|
extraIgnore: EXTRA_IGNORE$4
|
|
1460
1460
|
});
|
|
1461
1461
|
for (const appFile of appFiles) {
|
|
1462
|
-
const content = readProjectFile(path$
|
|
1462
|
+
const content = readProjectFile(path$2.join(installDir, appFile));
|
|
1463
1463
|
if (!content) continue;
|
|
1464
1464
|
if (content.includes("FastAPI(") || content.includes("from fastapi import FastAPI")) return appFile;
|
|
1465
1465
|
}
|
|
@@ -1468,7 +1468,7 @@ async function findFastAPIAppFile(options) {
|
|
|
1468
1468
|
extraIgnore: EXTRA_IGNORE$4,
|
|
1469
1469
|
limit: SOURCE_PROBE_LIMIT$2
|
|
1470
1470
|
});
|
|
1471
|
-
for (const pyFile of allPyFiles) if (readProjectFile(path$
|
|
1471
|
+
for (const pyFile of allPyFiles) if (readProjectFile(path$2.join(installDir, pyFile))?.includes("FastAPI(")) return pyFile;
|
|
1472
1472
|
if (appFiles.length > 0) return appFiles[0];
|
|
1473
1473
|
}
|
|
1474
1474
|
//#endregion
|
|
@@ -1509,7 +1509,7 @@ const FASTAPI_AGENT_CONFIG = {
|
|
|
1509
1509
|
extraIgnore: EXTRA_IGNORE$3
|
|
1510
1510
|
});
|
|
1511
1511
|
for (const reqFile of requirementsFiles) {
|
|
1512
|
-
const content = readProjectFile(path$
|
|
1512
|
+
const content = readProjectFile(path$2.join(installDir, reqFile));
|
|
1513
1513
|
if (!content) continue;
|
|
1514
1514
|
if (/^fastapi([<>=~!]|$|\s)/im.test(content) || /["']fastapi["']/i.test(content)) return true;
|
|
1515
1515
|
}
|
|
@@ -1523,7 +1523,7 @@ const FASTAPI_AGENT_CONFIG = {
|
|
|
1523
1523
|
extraIgnore: EXTRA_IGNORE$3
|
|
1524
1524
|
});
|
|
1525
1525
|
for (const pyFile of pyFiles) {
|
|
1526
|
-
const content = readProjectFile(path$
|
|
1526
|
+
const content = readProjectFile(path$2.join(installDir, pyFile));
|
|
1527
1527
|
if (!content) continue;
|
|
1528
1528
|
if (content.includes("from fastapi import") || content.includes("import fastapi") || /FastAPI\s*\(/.test(content)) return true;
|
|
1529
1529
|
}
|
|
@@ -1596,7 +1596,7 @@ const getLaravelVersionBucket = createVersionBucket();
|
|
|
1596
1596
|
*/
|
|
1597
1597
|
function getComposerJson(options) {
|
|
1598
1598
|
const { installDir } = options;
|
|
1599
|
-
const composerPath = path$
|
|
1599
|
+
const composerPath = path$2.join(installDir, "composer.json");
|
|
1600
1600
|
try {
|
|
1601
1601
|
const content = fs$1.readFileSync(composerPath, "utf-8");
|
|
1602
1602
|
return JSON.parse(content);
|
|
@@ -1633,7 +1633,7 @@ async function hasLaravelCodePattern(pattern, options, filePatterns = ["**/*.php
|
|
|
1633
1633
|
});
|
|
1634
1634
|
const searchPattern = typeof pattern === "string" ? new RegExp(pattern) : pattern;
|
|
1635
1635
|
for (const phpFile of phpFiles) {
|
|
1636
|
-
const content = readProjectFile(path$
|
|
1636
|
+
const content = readProjectFile(path$2.join(installDir, phpFile));
|
|
1637
1637
|
if (!content) continue;
|
|
1638
1638
|
if (searchPattern.test(content)) return true;
|
|
1639
1639
|
}
|
|
@@ -1688,7 +1688,7 @@ async function getLaravelProjectType(options) {
|
|
|
1688
1688
|
*/
|
|
1689
1689
|
async function findLaravelServiceProvider(options) {
|
|
1690
1690
|
const { installDir } = options;
|
|
1691
|
-
const appServiceProvider = path$
|
|
1691
|
+
const appServiceProvider = path$2.join(installDir, "app/Providers/AppServiceProvider.php");
|
|
1692
1692
|
if (fs$1.existsSync(appServiceProvider)) return "app/Providers/AppServiceProvider.php";
|
|
1693
1693
|
return (await boundedGlob(["**/app/Providers/*ServiceProvider.php"], {
|
|
1694
1694
|
cwd: installDir,
|
|
@@ -1701,9 +1701,9 @@ async function findLaravelServiceProvider(options) {
|
|
|
1701
1701
|
*/
|
|
1702
1702
|
function findLaravelBootstrapFile(options) {
|
|
1703
1703
|
const { installDir } = options;
|
|
1704
|
-
const bootstrapApp = path$
|
|
1704
|
+
const bootstrapApp = path$2.join(installDir, "bootstrap/app.php");
|
|
1705
1705
|
if (fs$1.existsSync(bootstrapApp)) return "bootstrap/app.php";
|
|
1706
|
-
const httpKernel = path$
|
|
1706
|
+
const httpKernel = path$2.join(installDir, "app/Http/Kernel.php");
|
|
1707
1707
|
if (fs$1.existsSync(httpKernel)) return "app/Http/Kernel.php";
|
|
1708
1708
|
}
|
|
1709
1709
|
/**
|
|
@@ -1748,12 +1748,12 @@ const LARAVEL_AGENT_CONFIG = {
|
|
|
1748
1748
|
getInstalledVersion: (options) => Promise.resolve(getLaravelVersion(options)),
|
|
1749
1749
|
detect: async (options) => {
|
|
1750
1750
|
const { installDir } = options;
|
|
1751
|
-
const artisanPath = path$
|
|
1751
|
+
const artisanPath = path$2.join(installDir, "artisan");
|
|
1752
1752
|
if (fs$1.existsSync(artisanPath)) try {
|
|
1753
1753
|
const content = fs$1.readFileSync(artisanPath, "utf-8");
|
|
1754
1754
|
if (content.includes("Laravel") || content.includes("Artisan")) return true;
|
|
1755
1755
|
} catch {}
|
|
1756
|
-
const composerPath = path$
|
|
1756
|
+
const composerPath = path$2.join(installDir, "composer.json");
|
|
1757
1757
|
if (fs$1.existsSync(composerPath)) try {
|
|
1758
1758
|
const content = fs$1.readFileSync(composerPath, "utf-8");
|
|
1759
1759
|
const composer = JSON.parse(content);
|
|
@@ -1871,7 +1871,7 @@ const FLUTTER_PLATFORM_DIRS = [
|
|
|
1871
1871
|
"windows"
|
|
1872
1872
|
];
|
|
1873
1873
|
function readPubspec(installDir) {
|
|
1874
|
-
const pubspecPath = path$
|
|
1874
|
+
const pubspecPath = path$2.join(installDir, "pubspec.yaml");
|
|
1875
1875
|
if (!fs$1.existsSync(pubspecPath)) return void 0;
|
|
1876
1876
|
return fs$1.readFileSync(pubspecPath, "utf-8");
|
|
1877
1877
|
}
|
|
@@ -1881,7 +1881,7 @@ const FLUTTER_AGENT_CONFIG = {
|
|
|
1881
1881
|
integration: "flutter",
|
|
1882
1882
|
docsUrl: "https://posthog.com/docs/libraries/flutter",
|
|
1883
1883
|
gatherContext: (options) => {
|
|
1884
|
-
const platforms = FLUTTER_PLATFORM_DIRS.filter((dir) => fs$1.existsSync(path$
|
|
1884
|
+
const platforms = FLUTTER_PLATFORM_DIRS.filter((dir) => fs$1.existsSync(path$2.join(options.installDir, dir)));
|
|
1885
1885
|
return Promise.resolve({ platforms });
|
|
1886
1886
|
}
|
|
1887
1887
|
},
|
|
@@ -1943,8 +1943,8 @@ function getSwiftProjectTypeName(projectType) {
|
|
|
1943
1943
|
}
|
|
1944
1944
|
async function detectSwiftProjectType(options) {
|
|
1945
1945
|
const { installDir } = options;
|
|
1946
|
-
const hasPackageSwift = fs$1.existsSync(path$
|
|
1947
|
-
const hasXcodeGenSpec = fs$1.existsSync(path$
|
|
1946
|
+
const hasPackageSwift = fs$1.existsSync(path$2.join(installDir, "Package.swift"));
|
|
1947
|
+
const hasXcodeGenSpec = fs$1.existsSync(path$2.join(installDir, "project.yml"));
|
|
1948
1948
|
const xcodeProjects = await fg("*.{xcodeproj,xcworkspace}", {
|
|
1949
1949
|
cwd: installDir,
|
|
1950
1950
|
onlyDirectories: true
|
|
@@ -1958,7 +1958,7 @@ async function detectSwiftProjectType(options) {
|
|
|
1958
1958
|
let hasSwiftUI = false;
|
|
1959
1959
|
let hasUIKit = false;
|
|
1960
1960
|
for (const file of swiftFiles) {
|
|
1961
|
-
const content = readProjectFile(path$
|
|
1961
|
+
const content = readProjectFile(path$2.join(installDir, file));
|
|
1962
1962
|
if (!content) continue;
|
|
1963
1963
|
if (content.includes("import SwiftUI")) hasSwiftUI = true;
|
|
1964
1964
|
if (content.includes("import UIKit")) hasUIKit = true;
|
|
@@ -1989,7 +1989,7 @@ const SWIFT_AGENT_CONFIG = {
|
|
|
1989
1989
|
cwd: installDir,
|
|
1990
1990
|
onlyDirectories: true
|
|
1991
1991
|
});
|
|
1992
|
-
const hasXcodeGenSpec = fs$1.existsSync(path$
|
|
1992
|
+
const hasXcodeGenSpec = fs$1.existsSync(path$2.join(installDir, "project.yml"));
|
|
1993
1993
|
if (xcodeProjects.length > 0 || hasXcodeGenSpec) {
|
|
1994
1994
|
if ((await boundedGlob("**/*.swift", {
|
|
1995
1995
|
cwd: installDir,
|
|
@@ -1997,7 +1997,7 @@ const SWIFT_AGENT_CONFIG = {
|
|
|
1997
1997
|
limit: 1
|
|
1998
1998
|
})).length > 0) return true;
|
|
1999
1999
|
}
|
|
2000
|
-
const packageSwiftPath = path$
|
|
2000
|
+
const packageSwiftPath = path$2.join(installDir, "Package.swift");
|
|
2001
2001
|
if (fs$1.existsSync(packageSwiftPath)) return true;
|
|
2002
2002
|
return false;
|
|
2003
2003
|
},
|
|
@@ -2056,7 +2056,7 @@ const KMP_AGENT_CONFIG = {
|
|
|
2056
2056
|
const { installDir } = options;
|
|
2057
2057
|
const buildFiles = await boundedGlob(["**/build.gradle", "**/build.gradle.kts"], { cwd: installDir });
|
|
2058
2058
|
for (const file of buildFiles) {
|
|
2059
|
-
const content = readProjectFile(path$
|
|
2059
|
+
const content = readProjectFile(path$2.join(installDir, file));
|
|
2060
2060
|
if (!content) continue;
|
|
2061
2061
|
if (content.includes("kotlin(\"multiplatform\")") || content.includes("org.jetbrains.kotlin.multiplatform") || content.includes("kotlin-multiplatform")) return true;
|
|
2062
2062
|
}
|
|
@@ -2112,7 +2112,7 @@ async function getMinSdkVersion(options) {
|
|
|
2112
2112
|
const { installDir } = options;
|
|
2113
2113
|
const buildFiles = await boundedGlob(["**/build.gradle", "**/build.gradle.kts"], { cwd: installDir });
|
|
2114
2114
|
for (const file of buildFiles) {
|
|
2115
|
-
const content = readProjectFile(path$
|
|
2115
|
+
const content = readProjectFile(path$2.join(installDir, file));
|
|
2116
2116
|
if (!content) continue;
|
|
2117
2117
|
const match = content.match(/minSdk(?:Version)?\s*=?\s*(\d+)/);
|
|
2118
2118
|
if (match) return match[1];
|
|
@@ -2129,7 +2129,7 @@ function getKotlinVersion(options) {
|
|
|
2129
2129
|
"build.gradle.kts",
|
|
2130
2130
|
"gradle/libs.versions.toml"
|
|
2131
2131
|
]) {
|
|
2132
|
-
const filePath = path$
|
|
2132
|
+
const filePath = path$2.join(installDir, name);
|
|
2133
2133
|
if (!fs$1.existsSync(filePath)) continue;
|
|
2134
2134
|
const content = fs$1.readFileSync(filePath, "utf-8");
|
|
2135
2135
|
const match = content.match(/kotlin[_-]?[Vv]ersion\s*=\s*["']([^"']+)["']/);
|
|
@@ -2161,9 +2161,9 @@ const ANDROID_AGENT_CONFIG = {
|
|
|
2161
2161
|
detectPackageManager: gradlePackageManager,
|
|
2162
2162
|
detect: async (options) => {
|
|
2163
2163
|
const { installDir } = options;
|
|
2164
|
-
if (fs$1.existsSync(path$
|
|
2164
|
+
if (fs$1.existsSync(path$2.join(installDir, "pubspec.yaml"))) return false;
|
|
2165
2165
|
for (const name of ["build.gradle", "build.gradle.kts"]) {
|
|
2166
|
-
const buildGradlePath = path$
|
|
2166
|
+
const buildGradlePath = path$2.join(installDir, name);
|
|
2167
2167
|
if (fs$1.existsSync(buildGradlePath)) {
|
|
2168
2168
|
const content = fs$1.readFileSync(buildGradlePath, "utf-8");
|
|
2169
2169
|
if (content.includes("com.android.application") || content.includes("com.android.library") || content.includes("com.android.tools.build:gradle")) return true;
|
|
@@ -2233,7 +2233,7 @@ const getRailsVersionBucket = createVersionBucket();
|
|
|
2233
2233
|
*/
|
|
2234
2234
|
function readGemfile(options) {
|
|
2235
2235
|
const { installDir } = options;
|
|
2236
|
-
const gemfilePath = path$
|
|
2236
|
+
const gemfilePath = path$2.join(installDir, "Gemfile");
|
|
2237
2237
|
try {
|
|
2238
2238
|
return fs$1.readFileSync(gemfilePath, "utf-8");
|
|
2239
2239
|
} catch {
|
|
@@ -2268,7 +2268,7 @@ function getRailsVersion(options) {
|
|
|
2268
2268
|
*/
|
|
2269
2269
|
function getRailsProjectType(options) {
|
|
2270
2270
|
const { installDir } = options;
|
|
2271
|
-
const appConfigPath = path$
|
|
2271
|
+
const appConfigPath = path$2.join(installDir, "config/application.rb");
|
|
2272
2272
|
if (fs$1.existsSync(appConfigPath)) try {
|
|
2273
2273
|
if (fs$1.readFileSync(appConfigPath, "utf-8").includes("config.api_only = true")) {
|
|
2274
2274
|
getUI().setDetectedFramework("Rails API-only");
|
|
@@ -2292,7 +2292,7 @@ function getRailsProjectTypeName(projectType) {
|
|
|
2292
2292
|
*/
|
|
2293
2293
|
function findInitializersDir(options) {
|
|
2294
2294
|
const { installDir } = options;
|
|
2295
|
-
const initializersDir = path$
|
|
2295
|
+
const initializersDir = path$2.join(installDir, "config/initializers");
|
|
2296
2296
|
if (fs$1.existsSync(initializersDir)) return "config/initializers";
|
|
2297
2297
|
}
|
|
2298
2298
|
/**
|
|
@@ -2300,9 +2300,9 @@ function findInitializersDir(options) {
|
|
|
2300
2300
|
*/
|
|
2301
2301
|
async function isRailsProject(options) {
|
|
2302
2302
|
const { installDir } = options;
|
|
2303
|
-
const binRailsPath = path$
|
|
2303
|
+
const binRailsPath = path$2.join(installDir, "bin/rails");
|
|
2304
2304
|
if (fs$1.existsSync(binRailsPath)) return true;
|
|
2305
|
-
const appConfigPath = path$
|
|
2305
|
+
const appConfigPath = path$2.join(installDir, "config/application.rb");
|
|
2306
2306
|
if (fs$1.existsSync(appConfigPath)) try {
|
|
2307
2307
|
const content = fs$1.readFileSync(appConfigPath, "utf-8");
|
|
2308
2308
|
if (content.includes("Rails::Application") || content.includes("require \"rails\"") || content.includes("require 'rails'")) return true;
|
|
@@ -2384,7 +2384,7 @@ const RAILS_AGENT_CONFIG = {
|
|
|
2384
2384
|
//#endregion
|
|
2385
2385
|
//#region src/frameworks/elixir/elixir-wizard-agent.ts
|
|
2386
2386
|
function readMixExs(installDir) {
|
|
2387
|
-
const mixExsPath = path$
|
|
2387
|
+
const mixExsPath = path$2.join(installDir, "mix.exs");
|
|
2388
2388
|
if (!fs$1.existsSync(mixExsPath)) return;
|
|
2389
2389
|
return fs$1.readFileSync(mixExsPath, "utf-8");
|
|
2390
2390
|
}
|
|
@@ -2451,7 +2451,7 @@ const ELIXIR_AGENT_CONFIG = {
|
|
|
2451
2451
|
//#endregion
|
|
2452
2452
|
//#region src/frameworks/go/go-wizard-agent.ts
|
|
2453
2453
|
function readGoMod(installDir) {
|
|
2454
|
-
const goModPath = path$
|
|
2454
|
+
const goModPath = path$2.join(installDir, "go.mod");
|
|
2455
2455
|
if (!fs$1.existsSync(goModPath)) return;
|
|
2456
2456
|
return fs$1.readFileSync(goModPath, "utf-8");
|
|
2457
2457
|
}
|
|
@@ -2534,10 +2534,10 @@ const KMP_GRADLE_MARKERS = [
|
|
|
2534
2534
|
"kotlin-multiplatform"
|
|
2535
2535
|
];
|
|
2536
2536
|
function readRootGradleFiles(installDir) {
|
|
2537
|
-
return GRADLE_FILES.map((name) => path$
|
|
2537
|
+
return GRADLE_FILES.map((name) => path$2.join(installDir, name)).filter((p) => fs$1.existsSync(p)).map((p) => fs$1.readFileSync(p, "utf-8"));
|
|
2538
2538
|
}
|
|
2539
2539
|
function getBuildTool(installDir) {
|
|
2540
|
-
if (fs$1.existsSync(path$
|
|
2540
|
+
if (fs$1.existsSync(path$2.join(installDir, "pom.xml"))) return "maven";
|
|
2541
2541
|
if (readRootGradleFiles(installDir).length > 0) return "gradle";
|
|
2542
2542
|
}
|
|
2543
2543
|
const JAVA_AGENT_CONFIG = {
|
|
@@ -2557,8 +2557,8 @@ const JAVA_AGENT_CONFIG = {
|
|
|
2557
2557
|
getVersion: () => void 0,
|
|
2558
2558
|
detect: async (options) => {
|
|
2559
2559
|
const { installDir } = options;
|
|
2560
|
-
if (fs$1.existsSync(path$
|
|
2561
|
-
if (fs$1.existsSync(path$
|
|
2560
|
+
if (fs$1.existsSync(path$2.join(installDir, "pubspec.yaml"))) return false;
|
|
2561
|
+
if (fs$1.existsSync(path$2.join(installDir, "pom.xml"))) return true;
|
|
2562
2562
|
const gradleContents = readRootGradleFiles(installDir);
|
|
2563
2563
|
if (gradleContents.length === 0) return false;
|
|
2564
2564
|
const combined = gradleContents.join("\n");
|
|
@@ -2615,7 +2615,7 @@ const JAVA_AGENT_CONFIG = {
|
|
|
2615
2615
|
//#endregion
|
|
2616
2616
|
//#region src/frameworks/rust/rust-wizard-agent.ts
|
|
2617
2617
|
function readCargoToml(installDir) {
|
|
2618
|
-
const cargoTomlPath = path$
|
|
2618
|
+
const cargoTomlPath = path$2.join(installDir, "Cargo.toml");
|
|
2619
2619
|
if (!fs$1.existsSync(cargoTomlPath)) return;
|
|
2620
2620
|
return fs$1.readFileSync(cargoTomlPath, "utf-8");
|
|
2621
2621
|
}
|
|
@@ -2726,13 +2726,13 @@ const PYTHON_AGENT_CONFIG = {
|
|
|
2726
2726
|
]
|
|
2727
2727
|
});
|
|
2728
2728
|
for (const match of managePyMatches) try {
|
|
2729
|
-
const content = fs$1.readFileSync(path$
|
|
2729
|
+
const content = fs$1.readFileSync(path$2.join(installDir, match), "utf-8");
|
|
2730
2730
|
if (content.includes("django") || content.includes("DJANGO_SETTINGS_MODULE")) return false;
|
|
2731
2731
|
} catch {
|
|
2732
2732
|
continue;
|
|
2733
2733
|
}
|
|
2734
2734
|
for (const configFile of pythonConfigFiles) try {
|
|
2735
|
-
const content = fs$1.readFileSync(path$
|
|
2735
|
+
const content = fs$1.readFileSync(path$2.join(installDir, configFile), "utf-8");
|
|
2736
2736
|
if (/^flask([<>=~!]|$|\s)/im.test(content) || /["']flask["']/i.test(content)) return false;
|
|
2737
2737
|
} catch {
|
|
2738
2738
|
continue;
|
|
@@ -2753,7 +2753,7 @@ const PYTHON_AGENT_CONFIG = {
|
|
|
2753
2753
|
]
|
|
2754
2754
|
});
|
|
2755
2755
|
for (const pyFile of pyFiles) try {
|
|
2756
|
-
const content = fs$1.readFileSync(path$
|
|
2756
|
+
const content = fs$1.readFileSync(path$2.join(installDir, pyFile), "utf-8");
|
|
2757
2757
|
if (content.includes("from flask import") || content.includes("import flask") || /Flask\s*\(/.test(content)) return false;
|
|
2758
2758
|
} catch {
|
|
2759
2759
|
continue;
|
|
@@ -2816,7 +2816,7 @@ const getRubyVersionBucket = createVersionBucket();
|
|
|
2816
2816
|
*/
|
|
2817
2817
|
function detectPackageManager(options) {
|
|
2818
2818
|
const { installDir } = options;
|
|
2819
|
-
const gemfilePath = path$
|
|
2819
|
+
const gemfilePath = path$2.join(installDir, "Gemfile");
|
|
2820
2820
|
if (fs$1.existsSync(gemfilePath)) return "bundler";
|
|
2821
2821
|
return "manual";
|
|
2822
2822
|
}
|
|
@@ -2834,12 +2834,12 @@ function getPackageManagerName(packageManager) {
|
|
|
2834
2834
|
*/
|
|
2835
2835
|
function getRubyVersion(options) {
|
|
2836
2836
|
const { installDir } = options;
|
|
2837
|
-
const rubyVersionPath = path$
|
|
2837
|
+
const rubyVersionPath = path$2.join(installDir, ".ruby-version");
|
|
2838
2838
|
try {
|
|
2839
2839
|
const version = fs$1.readFileSync(rubyVersionPath, "utf-8").trim().replace(/^ruby-/, "");
|
|
2840
2840
|
if (/^[0-9]+\.[0-9]+/.test(version)) return version;
|
|
2841
2841
|
} catch {}
|
|
2842
|
-
const gemfilePath = path$
|
|
2842
|
+
const gemfilePath = path$2.join(installDir, "Gemfile");
|
|
2843
2843
|
try {
|
|
2844
2844
|
const match = fs$1.readFileSync(gemfilePath, "utf-8").match(/ruby\s+['"]([0-9]+\.[0-9]+(?:\.[0-9]+)?)['"]/);
|
|
2845
2845
|
if (match) return match[1];
|
|
@@ -2850,7 +2850,7 @@ function getRubyVersion(options) {
|
|
|
2850
2850
|
*/
|
|
2851
2851
|
async function isRubyProject(options) {
|
|
2852
2852
|
const { installDir } = options;
|
|
2853
|
-
const gemfilePath = path$
|
|
2853
|
+
const gemfilePath = path$2.join(installDir, "Gemfile");
|
|
2854
2854
|
if (fs$1.existsSync(gemfilePath)) {
|
|
2855
2855
|
try {
|
|
2856
2856
|
const content = fs$1.readFileSync(gemfilePath, "utf-8");
|
|
@@ -2858,7 +2858,7 @@ async function isRubyProject(options) {
|
|
|
2858
2858
|
} catch {}
|
|
2859
2859
|
return true;
|
|
2860
2860
|
}
|
|
2861
|
-
const rubyVersionPath = path$
|
|
2861
|
+
const rubyVersionPath = path$2.join(installDir, ".ruby-version");
|
|
2862
2862
|
if (fs$1.existsSync(rubyVersionPath)) return true;
|
|
2863
2863
|
if ((await boundedGlob("*.gemspec", {
|
|
2864
2864
|
cwd: installDir,
|
|
@@ -3054,7 +3054,7 @@ function detectJsPackageManager(options) {
|
|
|
3054
3054
|
*/
|
|
3055
3055
|
function detectBundler(options) {
|
|
3056
3056
|
try {
|
|
3057
|
-
const content = fs$1.readFileSync(path$
|
|
3057
|
+
const content = fs$1.readFileSync(path$2.join(options.installDir, "package.json"), "utf-8");
|
|
3058
3058
|
const pkg = JSON.parse(content);
|
|
3059
3059
|
const allDeps = {
|
|
3060
3060
|
...pkg.dependencies,
|
|
@@ -3090,7 +3090,7 @@ const JAVASCRIPT_WEB_AGENT_CONFIG = {
|
|
|
3090
3090
|
docsUrl: "https://posthog.com/docs/libraries/js",
|
|
3091
3091
|
gatherContext: (options) => {
|
|
3092
3092
|
const packageManagerName = detectJsPackageManager(options);
|
|
3093
|
-
const hasTypeScript = fs$1.existsSync(path$
|
|
3093
|
+
const hasTypeScript = fs$1.existsSync(path$2.join(options.installDir, "tsconfig.json"));
|
|
3094
3094
|
const hasBundler = detectBundler(options);
|
|
3095
3095
|
return Promise.resolve({
|
|
3096
3096
|
packageManagerName,
|
|
@@ -3119,7 +3119,7 @@ const JAVASCRIPT_WEB_AGENT_CONFIG = {
|
|
|
3119
3119
|
"bun.lockb",
|
|
3120
3120
|
"bun.lock",
|
|
3121
3121
|
"deno.lock"
|
|
3122
|
-
].some((lockfile) => fs$1.existsSync(path$
|
|
3122
|
+
].some((lockfile) => fs$1.existsSync(path$2.join(installDir, lockfile))) && (hasIndexHtmlFlag || hasBundler)) return true;
|
|
3123
3123
|
return false;
|
|
3124
3124
|
}
|
|
3125
3125
|
},
|
|
@@ -3204,4 +3204,4 @@ const FRAMEWORK_REGISTRY = {
|
|
|
3204
3204
|
//#endregion
|
|
3205
3205
|
export { SPINNER_MESSAGE as i, registry_exports as n, DEFAULT_PACKAGE_INSTALLATION as r, FRAMEWORK_REGISTRY as t };
|
|
3206
3206
|
|
|
3207
|
-
//# sourceMappingURL=registry-
|
|
3207
|
+
//# sourceMappingURL=registry-DCAElOyj.js.map
|