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.
Files changed (29) hide show
  1. package/README.md +4 -4
  2. package/dist/{add-handler-ztNjzoMN.mjs → add-handler-z4NCxoq6.mjs} +9 -8
  3. package/dist/addons-setup-COE1e1db.mjs +7 -0
  4. package/dist/{addons-setup-LaAj43NP.mjs → addons-setup-DKtiNexf.mjs} +1 -1
  5. package/dist/{analytics-DVltG11u.mjs → analytics-BD8hZvIj.mjs} +1 -1
  6. package/dist/{bts-config-DQVWvPDs.mjs → bts-config-Bwd6GB7B.mjs} +59 -0
  7. package/dist/cli.mjs +2 -2
  8. package/dist/command-exists-DtX9ldL8.mjs +15 -0
  9. package/dist/{config-processing-D9-F2Us9.mjs → config-processing-B-RT_mVE.mjs} +32 -3
  10. package/dist/{doctor-a4ca3SMd.mjs → doctor-LmNs-hDr.mjs} +4 -3
  11. package/dist/{file-formatter-gvmrpd-g.mjs → file-formatter-DxF56-mO.mjs} +550 -24
  12. package/dist/{gen-CCClL7Ve.mjs → gen-CQfQU0uZ.mjs} +1 -1
  13. package/dist/{generated-checks-BV9jol5h.mjs → generated-checks-BUcI5VM2.mjs} +55 -22
  14. package/dist/index.d.mts +741 -211
  15. package/dist/index.mjs +30 -9
  16. package/dist/{install-dependencies-RoUyaE8o.mjs → install-dependencies-CJiUklm3.mjs} +132 -23
  17. package/dist/{mcp-492OkjcS.mjs → mcp-BBammItk.mjs} +5 -5
  18. package/dist/mcp-entry.mjs +76 -236
  19. package/dist/{registry-DSf2CEaU.mjs → registry-D0JfLCoH.mjs} +1 -1
  20. package/dist/{run-T6g1jkfy.mjs → run-BAIeghcU.mjs} +1948 -318
  21. package/dist/run-CAl4L4uU.mjs +16 -0
  22. package/dist/scaffold-manifest-CQwvyttq.mjs +4 -0
  23. package/dist/{scaffold-manifest-Dyi0voqE.mjs → scaffold-manifest-Dr3Anmlf.mjs} +34 -5
  24. package/dist/{update-DJ8CI5KW.mjs → update-CnrBdWrh.mjs} +182 -25
  25. package/package.json +24 -7
  26. package/dist/addons-setup-DnLjAzTw.mjs +0 -7
  27. package/dist/run-CD8f7PHh.mjs +0 -15
  28. package/dist/scaffold-manifest-DGRyepdb.mjs +0 -4
  29. /package/dist/{update-deps-aD-iQw4U.mjs → update-deps-G3FgqBlW.mjs} +0 -0
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { r as readBtsConfig } from "./bts-config-DQVWvPDs.mjs";
2
+ import { r as readBtsConfig } from "./bts-config-Bwd6GB7B.mjs";
3
3
  import { log } from "@clack/prompts";
4
4
  import pc from "picocolors";
5
5
  import fs from "fs-extra";
@@ -1,35 +1,30 @@
1
1
  #!/usr/bin/env node
2
- import { f as getPrimaryGraphPart } from "./bts-config-DQVWvPDs.mjs";
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
- await runCommand(cwd, "uv", ["sync"]);
60
- await runCommand(cwd, "uv", [
61
- "run",
62
- "ruff",
63
- "check",
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 { commandExists as n, runGeneratedChecks as t };
124
+ export { runGeneratedChecks as t };