@batijs/cli 0.0.287 → 0.0.289

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 (84) hide show
  1. package/dist/boilerplates/@batijs/auth0/files/$.env.js +5 -5
  2. package/dist/boilerplates/@batijs/auth0/files/$README.md.js +5 -5
  3. package/dist/boilerplates/@batijs/authjs/files/$package.json.js +4 -7
  4. package/dist/boilerplates/@batijs/aws/files/$README.md.js +7 -6
  5. package/dist/boilerplates/@batijs/aws/files/$package.json.js +19 -46
  6. package/dist/boilerplates/@batijs/aws/files/$tsconfig.json.js +3 -3
  7. package/dist/boilerplates/@batijs/aws/files/tests/aws_handler.spec.ts +1 -1
  8. package/dist/boilerplates/@batijs/biome/files/$package.json.js +10 -18
  9. package/dist/boilerplates/@batijs/cloudflare/files/$package.json.js +21 -42
  10. package/dist/boilerplates/@batijs/cloudflare/files/$tsconfig.json.js +3 -3
  11. package/dist/boilerplates/@batijs/cloudflare/files/$vite.config.ts.js +5 -5
  12. package/dist/boilerplates/@batijs/compiled/files/$package.json.js +4 -8
  13. package/dist/boilerplates/@batijs/compiled/files/$vite.config.ts.js +5 -5
  14. package/dist/boilerplates/@batijs/d1/files/$README.md.js +5 -5
  15. package/dist/boilerplates/@batijs/d1/files/$package.json.js +5 -8
  16. package/dist/boilerplates/@batijs/d1/files/$tsconfig.json.js +3 -3
  17. package/dist/boilerplates/@batijs/d1/files/$wrangler.toml.js +1 -1
  18. package/dist/boilerplates/@batijs/d1-sqlite/files/$package.json.js +91 -5
  19. package/dist/boilerplates/@batijs/drizzle/files/$.env.js +3 -3
  20. package/dist/boilerplates/@batijs/drizzle/files/$README.md.js +5 -5
  21. package/dist/boilerplates/@batijs/drizzle/files/$package.json.js +14 -19
  22. package/dist/boilerplates/@batijs/edgedb/files/$README.md.js +5 -5
  23. package/dist/boilerplates/@batijs/edgedb/files/$package.json.js +11 -11
  24. package/dist/boilerplates/@batijs/eslint/files/$package.json.js +10 -37
  25. package/dist/boilerplates/@batijs/express/files/$package.json.js +15 -33
  26. package/dist/boilerplates/@batijs/fastify/files/$package.json.js +15 -33
  27. package/dist/boilerplates/@batijs/firebase-auth/files/$.env.js +3 -3
  28. package/dist/boilerplates/@batijs/firebase-auth/files/$README.md.js +5 -5
  29. package/dist/boilerplates/@batijs/firebase-auth/files/$package.json.js +4 -8
  30. package/dist/boilerplates/@batijs/google-analytics/files/$.env.js +3 -3
  31. package/dist/boilerplates/@batijs/h3/files/$package.json.js +15 -36
  32. package/dist/boilerplates/@batijs/hattip/files/$package.json.js +12 -49
  33. package/dist/boilerplates/@batijs/hono/files/$package.json.js +16 -39
  34. package/dist/boilerplates/@batijs/hono/files/$vite.config.ts.js +5 -5
  35. package/dist/boilerplates/@batijs/lucia-auth/files/$.env.js +4 -4
  36. package/dist/boilerplates/@batijs/lucia-auth/files/$README.md.js +5 -5
  37. package/dist/boilerplates/@batijs/lucia-auth/files/$package.json.js +4 -22
  38. package/dist/boilerplates/@batijs/mantine/files/$README.md.js +5 -5
  39. package/dist/boilerplates/@batijs/mantine/files/$package.json.js +5 -9
  40. package/dist/boilerplates/@batijs/prettier/files/$package.json.js +4 -7
  41. package/dist/boilerplates/@batijs/prisma/files/$.env.js +3 -3
  42. package/dist/boilerplates/@batijs/prisma/files/$README.md.js +5 -5
  43. package/dist/boilerplates/@batijs/prisma/files/$package.json.js +12 -12
  44. package/dist/boilerplates/@batijs/react/files/$README.md.js +6 -5
  45. package/dist/boilerplates/@batijs/react/files/$package.json.js +6 -10
  46. package/dist/boilerplates/@batijs/react/files/$tsconfig.json.js +3 -3
  47. package/dist/boilerplates/@batijs/react/files/$vite.config.ts.js +5 -5
  48. package/dist/boilerplates/@batijs/react-sentry/files/$package.json.js +5 -8
  49. package/dist/boilerplates/@batijs/sentry/files/$.env.js +4 -4
  50. package/dist/boilerplates/@batijs/sentry/files/$README.md.js +5 -5
  51. package/dist/boilerplates/@batijs/sentry/files/$package.json.js +4 -7
  52. package/dist/boilerplates/@batijs/sentry/files/$vite.config.ts.js +7 -7
  53. package/dist/boilerplates/@batijs/sentry/files/pages/$+client.ts.js +9 -9
  54. package/dist/boilerplates/@batijs/shadcn-ui/files/$README.md.js +5 -5
  55. package/dist/boilerplates/@batijs/shadcn-ui/files/$package.json.js +16 -24
  56. package/dist/boilerplates/@batijs/shadcn-ui/files/$tsconfig.json.js +3 -3
  57. package/dist/boilerplates/@batijs/shadcn-ui/files/$vite.config.ts.js +5 -5
  58. package/dist/boilerplates/@batijs/shared/files/$README.md.js +33 -11
  59. package/dist/boilerplates/@batijs/shared-server/files/$package.json.js +4 -7
  60. package/dist/boilerplates/@batijs/solid/files/$README.md.js +5 -5
  61. package/dist/boilerplates/@batijs/solid/files/$package.json.js +6 -10
  62. package/dist/boilerplates/@batijs/solid/files/$tsconfig.json.js +3 -3
  63. package/dist/boilerplates/@batijs/solid/files/$vite.config.ts.js +5 -5
  64. package/dist/boilerplates/@batijs/solid-sentry/files/$package.json.js +5 -8
  65. package/dist/boilerplates/@batijs/sqlite/files/$.env.js +3 -3
  66. package/dist/boilerplates/@batijs/sqlite/files/$README.md.js +5 -5
  67. package/dist/boilerplates/@batijs/sqlite/files/$package.json.js +7 -9
  68. package/dist/boilerplates/@batijs/tailwindcss/files/$package.json.js +5 -13
  69. package/dist/boilerplates/@batijs/telefunc/files/$package.json.js +4 -7
  70. package/dist/boilerplates/@batijs/telefunc/files/$vite.config.ts.js +5 -5
  71. package/dist/boilerplates/@batijs/trpc/files/$package.json.js +4 -7
  72. package/dist/boilerplates/@batijs/ts-rest/files/$package.json.js +4 -9
  73. package/dist/boilerplates/@batijs/vercel/files/$package.json.js +4 -7
  74. package/dist/boilerplates/@batijs/vercel/files/$tsconfig.json.js +3 -3
  75. package/dist/boilerplates/@batijs/vercel/files/$vite.config.ts.js +5 -5
  76. package/dist/boilerplates/@batijs/vue/files/$README.md.js +5 -5
  77. package/dist/boilerplates/@batijs/vue/files/$package.json.js +13 -22
  78. package/dist/boilerplates/@batijs/vue/files/$tsconfig.json.js +3 -3
  79. package/dist/boilerplates/@batijs/vue/files/$vite.config.ts.js +6 -6
  80. package/dist/boilerplates/@batijs/vue-sentry/files/$package.json.js +4 -7
  81. package/dist/{chunk-ZPMGCQ2D.js → chunk-TUL4TJRN.js} +118739 -115559
  82. package/dist/index.js +99 -20
  83. package/package.json +6 -6
  84. package/dist/boilerplates/@batijs/shared-no-db/files/$package.json.js +0 -94
package/dist/index.js CHANGED
@@ -4,13 +4,13 @@ import {
4
4
  consola
5
5
  } from "./chunk-FWD3UPBV.js";
6
6
  import {
7
- OWr,
8
- Tps,
9
- ULe,
7
+ M8e,
8
+ YGr,
9
+ ags,
10
10
  export_which,
11
- jtt,
12
- qrs
13
- } from "./chunk-ZPMGCQ2D.js";
11
+ lnt,
12
+ tas
13
+ } from "./chunk-TUL4TJRN.js";
14
14
  import "./chunk-LU7IBQI7.js";
15
15
 
16
16
  // index.ts
@@ -34,8 +34,8 @@ async function mergeDts({
34
34
  filepath,
35
35
  meta
36
36
  }) {
37
- const previousAst = ULe(previousContent);
38
- const currentAst = ULe(fileContent);
37
+ const previousAst = M8e(previousContent);
38
+ const currentAst = M8e(fileContent);
39
39
  for (const imp of previousAst.imports.$items) {
40
40
  currentAst.imports[imp.local] = imp;
41
41
  }
@@ -52,7 +52,7 @@ async function mergeDts({
52
52
  currentAst.$ast.body.splice(index, 0, node);
53
53
  }
54
54
  }
55
- const res = await qrs(currentAst.generate().code, meta, {
55
+ const res = await tas(currentAst.generate().code, meta, {
56
56
  filepath
57
57
  });
58
58
  return res.code;
@@ -63,7 +63,7 @@ async function executeOperationFile(op, {
63
63
  }) {
64
64
  const code = await readFile(op.sourceAbsolute, { encoding: "utf-8" });
65
65
  const filepath = relative(op.source, op.sourceAbsolute);
66
- const result = await qrs(code, meta, {
66
+ const result = await tas(code, meta, {
67
67
  filepath
68
68
  });
69
69
  let fileContent = result.code;
@@ -83,6 +83,12 @@ async function executeOperationFile(op, {
83
83
  var isWin = process.platform === "win32";
84
84
  async function transformFileAfterExec(filepath, fileContent) {
85
85
  if (fileContent === void 0 || fileContent === null) return null;
86
+ if (typeof fileContent == "object" && typeof fileContent.finalize === "function") {
87
+ fileContent = fileContent.finalize();
88
+ if (typeof fileContent !== "string") {
89
+ throw new Error("finalize() must return a string");
90
+ }
91
+ }
86
92
  const parsed = parse(filepath);
87
93
  const toTest = [parsed.base, parsed.ext, parsed.name].filter(Boolean);
88
94
  for (const ext of toTest) {
@@ -91,7 +97,7 @@ async function transformFileAfterExec(filepath, fileContent) {
91
97
  case ".js":
92
98
  case ".tsx":
93
99
  case ".jsx":
94
- return jtt(fileContent, {
100
+ return lnt(fileContent, {
95
101
  filepath
96
102
  });
97
103
  case ".env":
@@ -107,6 +113,7 @@ async function transformFileAfterExec(filepath, fileContent) {
107
113
  case ".toml":
108
114
  return fileContent;
109
115
  case ".json":
116
+ if (typeof fileContent === "string") return fileContent;
110
117
  return JSON.stringify(fileContent, null, 2);
111
118
  case ".yml":
112
119
  case ".yaml":
@@ -302,8 +309,6 @@ async function* walk(dir) {
302
309
  }
303
310
  async function main(options, meta) {
304
311
  const sources = Array.isArray(options.source) ? options.source : [options.source];
305
- const allImports = /* @__PURE__ */ new Map();
306
- const filesContainingIncludeIfImported = /* @__PURE__ */ new Set();
307
312
  function updateAllImports(target, imports, includeIfImported) {
308
313
  const rf = new RelationFile(target, includeIfImported);
309
314
  if (!imports) return;
@@ -986,6 +991,80 @@ var flags = features.map((f) => f.flag);
986
991
  var cliFlags = features.filter((f) => !f.invisibleCli).map((f) => f.flag);
987
992
 
988
993
  // ../features/dist/index.js
994
+ var categories = [
995
+ {
996
+ label: "Frontend Framework",
997
+ group: "Frontend",
998
+ description: `Flexible, robust, community-driven, and fast Vite-based frontend framework.`,
999
+ required: true
1000
+ },
1001
+ {
1002
+ label: "UI Framework",
1003
+ group: "Frontend",
1004
+ description: `It\u2019s recommended to choose a frontend lib to kickstart a new Vike project,
1005
+ as they each come with a wide range of integrations. You can at any time eject and take control over integration code
1006
+ so that it doesn\u2019t get in your way.`,
1007
+ required: true
1008
+ },
1009
+ {
1010
+ label: "CSS",
1011
+ group: "Frontend",
1012
+ description: `These CSS libraries are deeply integrated with UI frameworks.
1013
+ They showcase their respective recommended usage and how they integrate with Vite and Vike.`
1014
+ },
1015
+ {
1016
+ label: "UI Component Libraries",
1017
+ group: "Frontend",
1018
+ description: `These UI Component Libraries are deeply integrated with UI frameworks.
1019
+ They showcase their respective recommended usage and how they integrate with Vite and Vike.`
1020
+ },
1021
+ {
1022
+ label: "Auth",
1023
+ group: "Data",
1024
+ description: `Ready to use self-hosted or cloud-based Auth solutions.
1025
+ Requires to also select a Server of your choosing.`
1026
+ },
1027
+ {
1028
+ label: "Data fetching",
1029
+ group: "Data",
1030
+ description: `Data fetching libraries to help you interact with your backend.
1031
+ Selecting one of those usually requires you to also choose a Server.`
1032
+ },
1033
+ {
1034
+ label: "Server",
1035
+ group: "Data",
1036
+ description: `Mostly required by other integrations such as Auth or RPC,
1037
+ it's recommended to only install a Server if you really need to, as Vike doesn't require one to operate.`
1038
+ },
1039
+ {
1040
+ label: "Database",
1041
+ group: "Data",
1042
+ description: `Helping you get started with a database solution.`
1043
+ },
1044
+ {
1045
+ label: "Hosting",
1046
+ group: "Deployment",
1047
+ description: `Quickly host your Vike project with a Serverless or VPS (coming soon) solution.`
1048
+ },
1049
+ {
1050
+ label: "Linter",
1051
+ multiple: true,
1052
+ group: "Utilities",
1053
+ description: `Well known linting and formatting tools, pre-configured to match their recommended usage,
1054
+ tailored for Vike.`
1055
+ },
1056
+ {
1057
+ label: "Analytics",
1058
+ group: "Utilities",
1059
+ description: `Keep track of your website traffic with these ready-to-get-started Analytics solutions.`
1060
+ },
1061
+ {
1062
+ label: "Error tracking",
1063
+ group: "Utilities",
1064
+ description: `Coming soon: Error Tracking solution for frontend and backend`
1065
+ }
1066
+ ];
1067
+ var categoryLabelOrder = categories.map((category) => category.label);
989
1068
  var BatiSet = class extends Set {
990
1069
  #servers;
991
1070
  // eslint-disable-next-line no-unused-private-class-members
@@ -2463,7 +2542,7 @@ var createDefaultQueryTester = function(query, options) {
2463
2542
  // package.json
2464
2543
  var package_default = {
2465
2544
  name: "@batijs/cli",
2466
- version: "0.0.287",
2545
+ version: "0.0.289",
2467
2546
  type: "module",
2468
2547
  scripts: {
2469
2548
  "check-types": "tsc --noEmit",
@@ -2489,7 +2568,7 @@ var package_default = {
2489
2568
  sift: "^17.1.3",
2490
2569
  tsup: "^8.3.0",
2491
2570
  typescript: "^5.6.2",
2492
- "unplugin-purge-polyfills": "^0.0.6",
2571
+ "unplugin-purge-polyfills": "^0.0.7",
2493
2572
  vite: "^5.4.7"
2494
2573
  },
2495
2574
  dependencies: {
@@ -2567,7 +2646,7 @@ Choose one of them, or simply remove selected Server`
2567
2646
  var __filename = fileURLToPath(import.meta.url);
2568
2647
  var __dirname = dirname(__filename);
2569
2648
  var isWin2 = process.platform === "win32";
2570
- var pm = Tps();
2649
+ var pm = ags();
2571
2650
  function boilerplatesDir() {
2572
2651
  if (existsSync2(join(__dirname, "boilerplates", "boilerplates.json"))) {
2573
2652
  return join(__dirname, "boilerplates");
@@ -2601,10 +2680,10 @@ function findDescription(key) {
2601
2680
  }
2602
2681
  }
2603
2682
  function printOK(dist, flags2) {
2604
- const arrow0 = OWr("\u2192", blueBright);
2605
- const book0 = OWr("\u{1F4DA}", blueBright);
2606
- const list3 = OWr("-", void 0, 3);
2607
- const cmd3 = OWr("$", gray, 3);
2683
+ const arrow0 = YGr("\u2192", blueBright);
2684
+ const book0 = YGr("\u{1F4DA}", blueBright);
2685
+ const list3 = YGr("-", void 0, 3);
2686
+ const cmd3 = YGr("$", gray, 3);
2608
2687
  console.log(bold(`${green("\u2713")} Project created at ${cyan(dist)} with:`));
2609
2688
  console.log(list3(green("Vike")));
2610
2689
  for (const key of flags2) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@batijs/cli",
3
- "version": "0.0.287",
3
+ "version": "0.0.289",
4
4
  "type": "module",
5
5
  "keywords": [],
6
6
  "description": "Next-gen scaffolder. Get started with fully-functional apps, and choose any tool you want",
@@ -18,14 +18,14 @@
18
18
  "sift": "^17.1.3",
19
19
  "tsup": "^8.3.0",
20
20
  "typescript": "^5.6.2",
21
- "unplugin-purge-polyfills": "^0.0.6",
21
+ "unplugin-purge-polyfills": "^0.0.7",
22
22
  "vite": "^5.4.7",
23
- "@batijs/compile": "0.0.287",
24
- "@batijs/build": "0.0.287"
23
+ "@batijs/build": "0.0.289",
24
+ "@batijs/compile": "0.0.289"
25
25
  },
26
26
  "dependencies": {
27
- "@batijs/core": "0.0.287",
28
- "@batijs/features": "0.0.287"
27
+ "@batijs/core": "0.0.289",
28
+ "@batijs/features": "0.0.289"
29
29
  },
30
30
  "bin": "./dist/index.js",
31
31
  "exports": {
@@ -1,94 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- g7s,
4
- mLs
5
- } from "../../../../chunk-ZPMGCQ2D.js";
6
- import "../../../../chunk-LU7IBQI7.js";
7
-
8
- // ../../boilerplates/shared-no-db/dist/files/$package.json.js
9
- var __create = Object.create;
10
- var __defProp = Object.defineProperty;
11
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
12
- var __getOwnPropNames = Object.getOwnPropertyNames;
13
- var __getProtoOf = Object.getPrototypeOf;
14
- var __hasOwnProp = Object.prototype.hasOwnProperty;
15
- var __commonJS = (cb, mod) => function __require() {
16
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
17
- };
18
- var __copyProps = (to, from, except, desc) => {
19
- if (from && typeof from === "object" || typeof from === "function") {
20
- for (let key of __getOwnPropNames(from))
21
- if (!__hasOwnProp.call(to, key) && key !== except)
22
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
23
- }
24
- return to;
25
- };
26
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
27
- // If the importer is in node compatibility mode or this is not an ESM
28
- // file that has been converted to a CommonJS file using a Babel-
29
- // compatible transform (i.e. "__esModule" has not been set), then set
30
- // "default" to the CommonJS "module.exports" for node compatibility.
31
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
32
- mod
33
- ));
34
- var require_package = __commonJS({
35
- "package.json"(exports, module) {
36
- module.exports = {
37
- name: "@batijs/shared-no-db",
38
- private: true,
39
- version: "0.0.1",
40
- description: "",
41
- type: "module",
42
- scripts: {
43
- "check-types": "tsc --noEmit",
44
- build: "bati-compile-boilerplate"
45
- },
46
- keywords: [],
47
- author: "",
48
- license: "MIT",
49
- devDependencies: {
50
- "@batijs/compile": "workspace:*",
51
- "@types/node": "^18.19.14"
52
- },
53
- dependencies: {
54
- "@batijs/core": "workspace:*"
55
- },
56
- files: [
57
- "dist/"
58
- ],
59
- bati: {
60
- if: {
61
- flag: {
62
- $not: {
63
- $in: [
64
- "drizzle",
65
- "sqlite"
66
- ]
67
- }
68
- }
69
- }
70
- },
71
- exports: {
72
- "./database/todoItems": {
73
- types: "./dist/types/database/todoItems.d.ts"
74
- }
75
- },
76
- typesVersions: {
77
- "*": {
78
- "database/todoItems": [
79
- "./dist/types/database/todoItems.d.ts"
80
- ]
81
- }
82
- }
83
- };
84
- }
85
- });
86
- async function getPackageJson(props) {
87
- const packageJson = await mLs(props);
88
- return g7s(packageJson, await Promise.resolve().then(() => __toESM(require_package(), 1)).then((x) => x.default), {
89
- dependencies: []
90
- });
91
- }
92
- export {
93
- getPackageJson as default
94
- };