create-better-fullstack 2.1.8 → 2.3.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/README.md +4 -4
- package/dist/{add-handler-ztNjzoMN.mjs → add-handler-z4NCxoq6.mjs} +9 -8
- package/dist/addons-setup-COE1e1db.mjs +7 -0
- package/dist/{addons-setup-LaAj43NP.mjs → addons-setup-DKtiNexf.mjs} +1 -1
- package/dist/{analytics-DVltG11u.mjs → analytics-BD8hZvIj.mjs} +1 -1
- package/dist/{bts-config-DQVWvPDs.mjs → bts-config-Bwd6GB7B.mjs} +59 -0
- package/dist/cli.mjs +2 -2
- package/dist/command-exists-DtX9ldL8.mjs +15 -0
- package/dist/{config-processing-D9-F2Us9.mjs → config-processing-B-RT_mVE.mjs} +32 -3
- package/dist/{doctor-a4ca3SMd.mjs → doctor-LmNs-hDr.mjs} +4 -3
- package/dist/{file-formatter-gvmrpd-g.mjs → file-formatter-DxF56-mO.mjs} +550 -24
- package/dist/{gen-CCClL7Ve.mjs → gen-CQfQU0uZ.mjs} +1 -1
- package/dist/{generated-checks-BV9jol5h.mjs → generated-checks-BUcI5VM2.mjs} +55 -22
- package/dist/index.d.mts +741 -211
- package/dist/index.mjs +30 -9
- package/dist/{install-dependencies-RoUyaE8o.mjs → install-dependencies-CJiUklm3.mjs} +132 -23
- package/dist/{mcp-492OkjcS.mjs → mcp-BBammItk.mjs} +5 -5
- package/dist/mcp-entry.mjs +76 -236
- package/dist/{registry-DSf2CEaU.mjs → registry-D0JfLCoH.mjs} +1 -1
- package/dist/{run-T6g1jkfy.mjs → run-BAIeghcU.mjs} +1948 -318
- package/dist/run-CAl4L4uU.mjs +16 -0
- package/dist/scaffold-manifest-CQwvyttq.mjs +4 -0
- package/dist/{scaffold-manifest-Dyi0voqE.mjs → scaffold-manifest-Dr3Anmlf.mjs} +34 -5
- package/dist/{update-DJ8CI5KW.mjs → update-CnrBdWrh.mjs} +182 -25
- package/package.json +24 -7
- package/dist/addons-setup-DnLjAzTw.mjs +0 -7
- package/dist/run-CD8f7PHh.mjs +0 -15
- package/dist/scaffold-manifest-DGRyepdb.mjs +0 -4
- /package/dist/{update-deps-aD-iQw4U.mjs → update-deps-G3FgqBlW.mjs} +0 -0
|
@@ -1,35 +1,30 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { f as getPrimaryGraphPart } from "./bts-config-
|
|
2
|
+
import { b as types_exports, f as getPrimaryGraphPart } from "./bts-config-Bwd6GB7B.mjs";
|
|
3
|
+
import { t as commandExists } from "./command-exists-DtX9ldL8.mjs";
|
|
3
4
|
import { log, spinner } from "@clack/prompts";
|
|
4
5
|
import pc from "picocolors";
|
|
5
6
|
import path from "node:path";
|
|
6
7
|
import { $ } from "execa";
|
|
7
8
|
|
|
8
|
-
//#region src/utils/command-exists.ts
|
|
9
|
-
async function commandExists(command) {
|
|
10
|
-
try {
|
|
11
|
-
if (process.platform === "win32") return (await $({ reject: false })`where ${command}`).exitCode === 0;
|
|
12
|
-
return (await $({ reject: false })`which ${command}`).exitCode === 0;
|
|
13
|
-
} catch {
|
|
14
|
-
return false;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
//#endregion
|
|
19
9
|
//#region src/utils/generated-checks.ts
|
|
20
10
|
function getGraphTarget(config) {
|
|
21
11
|
const backend = getPrimaryGraphPart(config, "backend");
|
|
22
12
|
if (!backend || backend.ecosystem === "typescript" || backend.ecosystem === "react-native" || backend.ecosystem === "universal") return null;
|
|
13
|
+
const projected = backend.ecosystem === "python" ? (0, types_exports.stackGraphToLegacyProjectConfigForEcosystem)(config, "python") : config;
|
|
23
14
|
return {
|
|
24
15
|
ecosystem: backend.ecosystem,
|
|
25
|
-
projectDir: path.join(config.projectDir, backend.targetPath ?? "apps/server")
|
|
16
|
+
projectDir: path.join(config.projectDir, backend.targetPath ?? "apps/server"),
|
|
17
|
+
pythonPackageManager: projected.pythonPackageManager,
|
|
18
|
+
pythonQuality: projected.pythonQuality
|
|
26
19
|
};
|
|
27
20
|
}
|
|
28
21
|
function getSingleEcosystemTarget(config) {
|
|
29
22
|
if (config.ecosystem === "typescript" || config.ecosystem === "react-native" || config.ecosystem === "java") return null;
|
|
30
23
|
return {
|
|
31
24
|
ecosystem: config.ecosystem,
|
|
32
|
-
projectDir: config.projectDir
|
|
25
|
+
projectDir: config.projectDir,
|
|
26
|
+
pythonPackageManager: config.pythonPackageManager,
|
|
27
|
+
pythonQuality: config.pythonQuality
|
|
33
28
|
};
|
|
34
29
|
}
|
|
35
30
|
async function runCommand(cwd, command, args) {
|
|
@@ -39,6 +34,19 @@ async function runCommand(cwd, command, args) {
|
|
|
39
34
|
stderr: "inherit"
|
|
40
35
|
})`${command} ${args}`;
|
|
41
36
|
}
|
|
37
|
+
function venvBin(tool) {
|
|
38
|
+
return process.platform === "win32" ? `.venv\\Scripts\\${tool}` : `.venv/bin/${tool}`;
|
|
39
|
+
}
|
|
40
|
+
async function runPythonQualityCheck(cwd, runner, quality) {
|
|
41
|
+
const run = (tool, args) => runner === "venv" ? runCommand(cwd, venvBin(tool), args) : runCommand(cwd, runner, [
|
|
42
|
+
"run",
|
|
43
|
+
tool,
|
|
44
|
+
...args
|
|
45
|
+
]);
|
|
46
|
+
if (quality === "ruff") await run("ruff", ["check", "."]);
|
|
47
|
+
else if (quality === "mypy") await run("mypy", []);
|
|
48
|
+
else if (quality === "pyright") await run("pyright", []);
|
|
49
|
+
}
|
|
42
50
|
async function verifyTarget(target) {
|
|
43
51
|
const s = spinner();
|
|
44
52
|
const cwd = target.projectDir;
|
|
@@ -56,13 +64,38 @@ async function verifyTarget(target) {
|
|
|
56
64
|
return;
|
|
57
65
|
case "python":
|
|
58
66
|
s.start("Verifying generated Python server...");
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
67
|
+
if (target.pythonPackageManager === "poetry") {
|
|
68
|
+
await runCommand(cwd, "poetry", [
|
|
69
|
+
"install",
|
|
70
|
+
"--extras",
|
|
71
|
+
"dev"
|
|
72
|
+
]);
|
|
73
|
+
await runPythonQualityCheck(cwd, "poetry", target.pythonQuality);
|
|
74
|
+
} else if (target.pythonPackageManager === "none") {
|
|
75
|
+
await runCommand(cwd, await commandExists("python") ? "python" : "python3", [
|
|
76
|
+
"-m",
|
|
77
|
+
"venv",
|
|
78
|
+
".venv"
|
|
79
|
+
]);
|
|
80
|
+
await runCommand(cwd, venvBin("pip"), [
|
|
81
|
+
"install",
|
|
82
|
+
"-e",
|
|
83
|
+
".[dev]"
|
|
84
|
+
]);
|
|
85
|
+
await runCommand(cwd, venvBin("python"), [
|
|
86
|
+
"-m",
|
|
87
|
+
"compileall",
|
|
88
|
+
"src"
|
|
89
|
+
]);
|
|
90
|
+
await runPythonQualityCheck(cwd, "venv", target.pythonQuality);
|
|
91
|
+
} else {
|
|
92
|
+
await runCommand(cwd, "uv", [
|
|
93
|
+
"sync",
|
|
94
|
+
"--extra",
|
|
95
|
+
"dev"
|
|
96
|
+
]);
|
|
97
|
+
await runPythonQualityCheck(cwd, "uv", target.pythonQuality);
|
|
98
|
+
}
|
|
66
99
|
s.stop("Generated Python server checks passed");
|
|
67
100
|
return;
|
|
68
101
|
case "elixir":
|
|
@@ -88,4 +121,4 @@ async function runGeneratedChecks(config) {
|
|
|
88
121
|
}
|
|
89
122
|
|
|
90
123
|
//#endregion
|
|
91
|
-
export {
|
|
124
|
+
export { runGeneratedChecks as t };
|