@batijs/cli 0.0.108 → 0.0.111

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 (138) hide show
  1. package/dist/boilerplates/@batijs/edgedb/files/$package.json.js +70 -1
  2. package/dist/boilerplates/@batijs/eslint/files/$package.json.js +68 -1
  3. package/dist/boilerplates/@batijs/express/files/$package.json.js +85 -1
  4. package/dist/boilerplates/@batijs/express/files/express-entry.ts +19 -0
  5. package/dist/boilerplates/@batijs/express/types/express-entry.d.ts +1 -0
  6. package/dist/boilerplates/@batijs/h3/files/$package.json.js +86 -1
  7. package/dist/boilerplates/@batijs/h3/files/h3-entry.ts +25 -1
  8. package/dist/boilerplates/@batijs/h3/types/h3-entry.d.ts +1 -0
  9. package/dist/boilerplates/@batijs/hattip/files/$package.json.js +87 -1
  10. package/dist/boilerplates/@batijs/hattip/files/hattip-entry.ts +22 -1
  11. package/dist/boilerplates/@batijs/hattip/types/hattip-entry.d.ts +3 -0
  12. package/dist/boilerplates/@batijs/prettier/files/$package.json.js +64 -1
  13. package/dist/boilerplates/@batijs/prisma/files/$package.json.js +65 -1
  14. package/dist/boilerplates/@batijs/react/files/$package.json.js +162 -2
  15. package/dist/boilerplates/@batijs/react/files/layouts/LayoutDefault.tsx +2 -1
  16. package/dist/boilerplates/@batijs/react/types/components/Link.d.ts +4 -0
  17. package/dist/boilerplates/@batijs/react/types/layouts/HeadDefault.d.ts +1 -0
  18. package/dist/boilerplates/@batijs/react/types/layouts/LayoutDefault.d.ts +6 -0
  19. package/dist/boilerplates/@batijs/react/types/pages/+config.h.d.ts +41 -0
  20. package/dist/boilerplates/@batijs/react/types/pages/_error/+Page.d.ts +4 -0
  21. package/dist/boilerplates/@batijs/react/types/pages/index/+Page.d.ts +1 -0
  22. package/dist/boilerplates/@batijs/react/types/pages/index/Counter.d.ts +1 -0
  23. package/dist/boilerplates/@batijs/react/types/pages/star-wars/@id/+Page.d.ts +4 -0
  24. package/dist/boilerplates/@batijs/react/types/pages/star-wars/@id/+onBeforeRender.d.ts +10 -0
  25. package/dist/boilerplates/@batijs/react/types/pages/star-wars/filterMovieData.d.ts +2 -0
  26. package/dist/boilerplates/@batijs/react/types/pages/star-wars/index/+Page.d.ts +4 -0
  27. package/dist/boilerplates/@batijs/react/types/pages/star-wars/index/+onBeforeRender.d.ts +9 -0
  28. package/dist/boilerplates/@batijs/react/types/pages/star-wars/types.d.ts +12 -0
  29. package/dist/boilerplates/@batijs/react-telefunc/files/pages/todo/+Page.tsx +1 -2
  30. package/dist/boilerplates/@batijs/react-telefunc/files/pages/todo/+onBeforeRender.ts +1 -1
  31. package/dist/boilerplates/@batijs/react-telefunc/files/pages/todo/TodoList.telefunc.ts +1 -1
  32. package/dist/boilerplates/@batijs/react-telefunc/files/pages/todo/TodoList.tsx +1 -2
  33. package/dist/boilerplates/@batijs/react-telefunc/types/pages/todo/+Page.d.ts +4 -0
  34. package/dist/boilerplates/@batijs/react-telefunc/types/pages/todo/+config.h.d.ts +4 -0
  35. package/dist/boilerplates/@batijs/react-telefunc/types/pages/todo/+onBeforeRender.d.ts +7 -0
  36. package/dist/boilerplates/@batijs/react-telefunc/types/pages/todo/TodoList.d.ts +4 -0
  37. package/dist/boilerplates/@batijs/react-telefunc/types/pages/todo/TodoList.telefunc.d.ts +4 -0
  38. package/dist/boilerplates/@batijs/react-trpc/files/pages/todo-trpc/+Page.tsx +25 -0
  39. package/dist/boilerplates/@batijs/react-trpc/files/pages/todo-trpc/+config.h.ts +5 -0
  40. package/dist/boilerplates/@batijs/react-trpc/files/pages/todo-trpc/+onBeforeRender.ts +13 -0
  41. package/dist/boilerplates/@batijs/react-trpc/files/pages/todo-trpc/TodoList.tsx +30 -0
  42. package/dist/boilerplates/@batijs/react-trpc/types/pages/todo-trpc/+Page.d.ts +4 -0
  43. package/dist/boilerplates/@batijs/react-trpc/types/pages/todo-trpc/+config.h.d.ts +4 -0
  44. package/dist/boilerplates/@batijs/react-trpc/types/pages/todo-trpc/+onBeforeRender.d.ts +7 -0
  45. package/dist/boilerplates/@batijs/react-trpc/types/pages/todo-trpc/TodoList.d.ts +4 -0
  46. package/dist/boilerplates/@batijs/shared/files/$index.html.js +10 -6
  47. package/dist/boilerplates/@batijs/shared/types/vite.config.d.ts +2 -0
  48. package/dist/boilerplates/@batijs/shared-db/types/database/todoItems.d.ts +6 -0
  49. package/dist/boilerplates/@batijs/solid/files/$package.json.js +168 -2
  50. package/dist/boilerplates/@batijs/solid/files/layouts/LayoutDefault.tsx +2 -1
  51. package/dist/boilerplates/@batijs/solid/types/components/Link.d.ts +4 -0
  52. package/dist/boilerplates/@batijs/solid/types/layouts/HeadDefault.d.ts +1 -0
  53. package/dist/boilerplates/@batijs/solid/types/layouts/LayoutDefault.d.ts +6 -0
  54. package/dist/boilerplates/@batijs/solid/types/pages/+config.h.d.ts +40 -0
  55. package/dist/boilerplates/@batijs/solid/types/pages/_error/+Page.d.ts +4 -0
  56. package/dist/boilerplates/@batijs/solid/types/pages/index/+Page.d.ts +1 -0
  57. package/dist/boilerplates/@batijs/solid/types/pages/index/Counter.d.ts +2 -0
  58. package/dist/boilerplates/@batijs/solid/types/pages/star-wars/@id/+Page.d.ts +4 -0
  59. package/dist/boilerplates/@batijs/solid/types/pages/star-wars/@id/+onBeforeRender.d.ts +11 -0
  60. package/dist/boilerplates/@batijs/solid/types/pages/star-wars/filterMovieData.d.ts +3 -0
  61. package/dist/boilerplates/@batijs/solid/types/pages/star-wars/index/+Page.d.ts +4 -0
  62. package/dist/boilerplates/@batijs/solid/types/pages/star-wars/index/+onBeforePrerenderStart.d.ts +18 -0
  63. package/dist/boilerplates/@batijs/solid/types/pages/star-wars/index/+onBeforeRender.d.ts +10 -0
  64. package/dist/boilerplates/@batijs/solid/types/pages/star-wars/index/getStarWarsMovies.d.ts +7 -0
  65. package/dist/boilerplates/@batijs/solid/types/pages/star-wars/types.d.ts +12 -0
  66. package/dist/boilerplates/@batijs/solid-telefunc/files/pages/todo/+Page.tsx +1 -1
  67. package/dist/boilerplates/@batijs/solid-telefunc/files/pages/todo/+onBeforeRender.ts +2 -2
  68. package/dist/boilerplates/@batijs/solid-telefunc/files/pages/todo/TodoList.telefunc.ts +2 -2
  69. package/dist/boilerplates/@batijs/solid-telefunc/files/pages/todo/TodoList.tsx +1 -1
  70. package/dist/boilerplates/@batijs/solid-telefunc/types/pages/todo/+Page.d.ts +4 -0
  71. package/dist/boilerplates/@batijs/solid-telefunc/types/pages/todo/+config.h.d.ts +4 -0
  72. package/dist/boilerplates/@batijs/solid-telefunc/types/pages/todo/+onBeforeRender.d.ts +8 -0
  73. package/dist/boilerplates/@batijs/solid-telefunc/types/pages/todo/TodoList.d.ts +4 -0
  74. package/dist/boilerplates/@batijs/solid-telefunc/types/pages/todo/TodoList.telefunc.d.ts +5 -0
  75. package/dist/boilerplates/@batijs/solid-trpc/files/pages/todo-trpc/+Page.tsx +25 -0
  76. package/dist/boilerplates/@batijs/solid-trpc/files/pages/todo-trpc/+config.h.ts +3 -0
  77. package/dist/boilerplates/@batijs/solid-trpc/files/pages/todo-trpc/+onBeforeRender.ts +15 -0
  78. package/dist/boilerplates/@batijs/solid-trpc/files/pages/todo-trpc/TodoList.tsx +28 -0
  79. package/dist/boilerplates/@batijs/solid-trpc/types/pages/todo-trpc/+Page.d.ts +4 -0
  80. package/dist/boilerplates/@batijs/solid-trpc/types/pages/todo-trpc/+config.h.d.ts +4 -0
  81. package/dist/boilerplates/@batijs/solid-trpc/types/pages/todo-trpc/+onBeforeRender.d.ts +8 -0
  82. package/dist/boilerplates/@batijs/solid-trpc/types/pages/todo-trpc/TodoList.d.ts +4 -0
  83. package/dist/boilerplates/@batijs/tailwindcss/files/$package.json.js +87 -2
  84. package/dist/boilerplates/@batijs/tailwindcss/files/tailwind.config.ts +10 -0
  85. package/dist/boilerplates/@batijs/tailwindcss/types/postcss.config.d.ts +7 -0
  86. package/dist/boilerplates/@batijs/tailwindcss/types/tailwind.config.d.ts +11 -0
  87. package/dist/boilerplates/@batijs/telefunc/files/$package.json.js +65 -1
  88. package/dist/boilerplates/@batijs/trpc/files/$package.json.js +100 -0
  89. package/dist/boilerplates/@batijs/trpc/files/$vite.config.ts.js +13 -0
  90. package/dist/boilerplates/@batijs/trpc/files/trpc/client.ts +10 -0
  91. package/dist/boilerplates/@batijs/trpc/files/trpc/server.ts +34 -0
  92. package/dist/boilerplates/@batijs/trpc/files/trpc/vite-plugin.ts +49 -0
  93. package/dist/boilerplates/@batijs/trpc/types/trpc/client.d.ts +38 -0
  94. package/dist/boilerplates/@batijs/trpc/types/trpc/server.d.ts +64 -0
  95. package/dist/boilerplates/@batijs/trpc/types/trpc/vite-plugin.d.ts +12 -0
  96. package/dist/boilerplates/@batijs/vercel/files/$package.json.js +66 -1
  97. package/dist/boilerplates/@batijs/vue/files/$package.json.js +111 -2
  98. package/dist/boilerplates/@batijs/vue/files/layouts/LayoutDefault.vue +5 -1
  99. package/dist/boilerplates/@batijs/vue/types/pages/+config.h.d.ts +43 -0
  100. package/dist/boilerplates/@batijs/vue/types/pages/star-wars/@id/+onBeforeRender.d.ts +11 -0
  101. package/dist/boilerplates/@batijs/vue/types/pages/star-wars/filterMovieData.d.ts +3 -0
  102. package/dist/boilerplates/@batijs/vue/types/pages/star-wars/index/+onBeforeRender.d.ts +10 -0
  103. package/dist/boilerplates/@batijs/vue/types/pages/star-wars/types.d.ts +12 -0
  104. package/dist/boilerplates/@batijs/vue-telefunc/files/components/TodoList.telefunc.ts +2 -2
  105. package/dist/boilerplates/@batijs/vue-telefunc/files/components/TodoList.vue +5 -13
  106. package/dist/boilerplates/@batijs/vue-telefunc/files/pages/todo/+Page.vue +2 -3
  107. package/dist/boilerplates/@batijs/vue-telefunc/files/pages/todo/+onBeforeRender.ts +2 -2
  108. package/dist/boilerplates/@batijs/vue-telefunc/types/components/TodoList.telefunc.d.ts +5 -0
  109. package/dist/boilerplates/@batijs/vue-telefunc/types/pages/todo/+config.h.d.ts +4 -0
  110. package/dist/boilerplates/@batijs/vue-telefunc/types/pages/todo/+onBeforeRender.d.ts +8 -0
  111. package/dist/boilerplates/@batijs/vue-trpc/files/components/TodoListTrpc.vue +29 -0
  112. package/dist/boilerplates/@batijs/vue-trpc/files/pages/todo-trpc/+Page.vue +19 -0
  113. package/dist/boilerplates/@batijs/vue-trpc/files/pages/todo-trpc/+config.h.ts +3 -0
  114. package/dist/boilerplates/@batijs/vue-trpc/files/pages/todo-trpc/+onBeforeRender.ts +15 -0
  115. package/dist/boilerplates/@batijs/vue-trpc/types/pages/todo-trpc/+config.h.d.ts +4 -0
  116. package/dist/boilerplates/@batijs/vue-trpc/types/pages/todo-trpc/+onBeforeRender.d.ts +8 -0
  117. package/dist/boilerplates/boilerplates.json +75 -0
  118. package/dist/{chunk-chunk-HOVHXSZ5.js → chunk-P3F3WO2D.js} +1 -1
  119. package/dist/index.js +12 -5
  120. package/dist/{chunk-prompt-LPA56PA5.js → prompt-QGA753QE.js} +1 -1
  121. package/package.json +5 -5
  122. package/dist/boilerplates/@batijs/edgedb/package-BD3G47NI.js +0 -64
  123. package/dist/boilerplates/@batijs/eslint/package-L5KZG4F3.js +0 -62
  124. package/dist/boilerplates/@batijs/express/package-KV3NAHNP.js +0 -69
  125. package/dist/boilerplates/@batijs/h3/package-TUTMSCQF.js +0 -70
  126. package/dist/boilerplates/@batijs/hattip/package-VKEJY76G.js +0 -69
  127. package/dist/boilerplates/@batijs/prettier/package-MCK4YCPP.js +0 -62
  128. package/dist/boilerplates/@batijs/prisma/package-JDCZNZLS.js +0 -63
  129. package/dist/boilerplates/@batijs/react/package-O2DZQ5DB.js +0 -75
  130. package/dist/boilerplates/@batijs/react-telefunc/files/database/todoItems.ts +0 -9
  131. package/dist/boilerplates/@batijs/solid/package-2AEIPM6V.js +0 -69
  132. package/dist/boilerplates/@batijs/tailwindcss/files/tailwind.config.js +0 -8
  133. package/dist/boilerplates/@batijs/tailwindcss/package-CMMRUVWD.js +0 -65
  134. package/dist/boilerplates/@batijs/telefunc/package-NGJ3M2KO.js +0 -63
  135. package/dist/boilerplates/@batijs/vercel/package-QY45OGDN.js +0 -64
  136. package/dist/boilerplates/@batijs/vue/package-7RHEEZZN.js +0 -72
  137. package/dist/boilerplates/@batijs/vue-telefunc/files/database/todoItems.ts +0 -12
  138. package/dist/boilerplates/@batijs/{solid-telefunc → shared-db}/files/database/todoItems.ts +3 -3
@@ -0,0 +1,10 @@
1
+ import type { Movie } from "../types";
2
+ export default onBeforeRender;
3
+ declare function onBeforeRender(): Promise<{
4
+ pageContext: {
5
+ pageProps: {
6
+ movies: Movie[];
7
+ };
8
+ title: string;
9
+ };
10
+ }>;
@@ -0,0 +1,12 @@
1
+ export type Movie = {
2
+ id: string;
3
+ title: string;
4
+ release_date: string;
5
+ };
6
+ export type MovieDetails = {
7
+ id: string;
8
+ title: string;
9
+ release_date: string;
10
+ director: string;
11
+ producer: string;
12
+ };
@@ -1,6 +1,6 @@
1
- export { onNewTodo };
1
+ import { todoItems, type TodoItem } from "@batijs/shared-db/database/todoItems";
2
2
 
3
- import { type TodoItem, todoItems } from "../database/todoItems";
3
+ export { onNewTodo };
4
4
 
5
5
  async function onNewTodo({ text }: TodoItem) {
6
6
  todoItems.push({ text });
@@ -1,20 +1,12 @@
1
1
  <template>
2
2
  <ul>
3
- <li
4
- v-for="item in todoItems"
5
- :key="item.text"
6
- >
3
+ <li v-for="item in todoItems" :key="item.text">
7
4
  {{ item.text }}
8
5
  </li>
9
6
  <li>
10
7
  <form @submit.prevent="submitDraft()">
11
- <input
12
- v-model="draft"
13
- type="text"
14
- >{{ " " }}
15
- <button type="submit">
16
- Add to-do
17
- </button>
8
+ <input v-model="draft" type="text" />{{ " " }}
9
+ <button type="submit">Add to-do</button>
18
10
  </form>
19
11
  </li>
20
12
  </ul>
@@ -24,9 +16,9 @@
24
16
  import { ref, useAttrs } from "vue";
25
17
  import { onNewTodo } from "./TodoList.telefunc.js";
26
18
 
27
- const { todoItemsInitial } = useAttrs();
19
+ const attrs = useAttrs();
28
20
 
29
- const todoItems = ref(todoItemsInitial);
21
+ const todoItems = ref(attrs["todo-items-initial"]);
30
22
  const draft = ref("");
31
23
 
32
24
  const submitDraft = async () => {
@@ -2,7 +2,6 @@
2
2
  <div>
3
3
  <h1>To-do List</h1>
4
4
  <TodoList :todo-items-initial="todoItemsInitial" />
5
- <Counter />
6
5
  </div>
7
6
  </template>
8
7
 
@@ -13,8 +12,8 @@ const { todoItemsInitial } = useAttrs();
13
12
  </script>
14
13
 
15
14
  <script lang="ts">
16
- import Counter from "../../components/Counter.vue";
17
15
  import TodoList from "../../components/TodoList.vue";
18
- const components = { Counter, TodoList };
16
+
17
+ const components = { TodoList };
19
18
  export default { components };
20
19
  </script>
@@ -1,8 +1,8 @@
1
+ import { todoItems } from "@batijs/shared-db/database/todoItems";
2
+
1
3
  // https://vike.dev/onBeforeRender
2
4
  export default onBeforeRender;
3
5
 
4
- import { todoItems } from "../../database/todoItems";
5
-
6
6
  function onBeforeRender() {
7
7
  const todoItemsInitial = todoItems;
8
8
  return {
@@ -0,0 +1,5 @@
1
+ import { type TodoItem } from "@batijs/shared-db/database/todoItems";
2
+ export { onNewTodo };
3
+ declare function onNewTodo({ text }: TodoItem): Promise<{
4
+ todoItems: TodoItem[];
5
+ }>;
@@ -0,0 +1,4 @@
1
+ declare const _default: {
2
+ prerender: boolean;
3
+ };
4
+ export default _default;
@@ -0,0 +1,8 @@
1
+ export default onBeforeRender;
2
+ declare function onBeforeRender(): {
3
+ pageContext: {
4
+ pageProps: {
5
+ todoItemsInitial: import("@batijs/shared-db/database/todoItems").TodoItem[];
6
+ };
7
+ };
8
+ };
@@ -0,0 +1,29 @@
1
+ <template>
2
+ <ul>
3
+ <li v-for="item in todoItems" :key="item.text">
4
+ {{ item.text }}
5
+ </li>
6
+ <li>
7
+ <form @submit.prevent="submitDraft()">
8
+ <input v-model="draft" type="text" />{{ " " }}
9
+ <button type="submit">Add to-do</button>
10
+ </form>
11
+ </li>
12
+ </ul>
13
+ </template>
14
+
15
+ <script lang="ts" setup>
16
+ import { trpc } from "@batijs/trpc/trpc/client";
17
+ import { ref, useAttrs } from "vue";
18
+
19
+ const attrs = useAttrs();
20
+
21
+ const todoItems = ref(attrs["todo-items-initial"]);
22
+ const draft = ref("");
23
+
24
+ const submitDraft = async () => {
25
+ const result = await trpc.onNewTodo.mutate(draft.value);
26
+ draft.value = "";
27
+ todoItems.value = result.todoItems;
28
+ };
29
+ </script>
@@ -0,0 +1,19 @@
1
+ <template>
2
+ <div>
3
+ <h1>To-do List</h1>
4
+ <TodoList :todo-items-initial="todoItemsInitial" />
5
+ </div>
6
+ </template>
7
+
8
+ <script lang="ts" setup>
9
+ import { useAttrs } from "vue";
10
+
11
+ const { todoItemsInitial } = useAttrs();
12
+ </script>
13
+
14
+ <script lang="ts">
15
+ import TodoList from "../../components/TodoListTrpc.vue";
16
+
17
+ const components = { TodoList };
18
+ export default { components };
19
+ </script>
@@ -0,0 +1,3 @@
1
+ export default {
2
+ prerender: false,
3
+ };
@@ -0,0 +1,15 @@
1
+ import { todoItems } from "@batijs/shared-db/database/todoItems";
2
+
3
+ // https://vike.dev/onBeforeRender
4
+ export default onBeforeRender;
5
+
6
+ function onBeforeRender() {
7
+ const todoItemsInitial = todoItems;
8
+ return {
9
+ pageContext: {
10
+ pageProps: {
11
+ todoItemsInitial,
12
+ },
13
+ },
14
+ };
15
+ }
@@ -0,0 +1,4 @@
1
+ declare const _default: {
2
+ prerender: boolean;
3
+ };
4
+ export default _default;
@@ -0,0 +1,8 @@
1
+ export default onBeforeRender;
2
+ declare function onBeforeRender(): {
3
+ pageContext: {
4
+ pageProps: {
5
+ todoItemsInitial: import("@batijs/shared-db/database/todoItems").TodoItem[];
6
+ };
7
+ };
8
+ };
@@ -105,6 +105,22 @@
105
105
  "files"
106
106
  ]
107
107
  },
108
+ {
109
+ "config": {
110
+ "if": {
111
+ "flag": {
112
+ "$all": [
113
+ "react",
114
+ "trpc"
115
+ ]
116
+ }
117
+ }
118
+ },
119
+ "folder": "@batijs/react-trpc",
120
+ "subfolders": [
121
+ "files"
122
+ ]
123
+ },
108
124
  {
109
125
  "config": {
110
126
  "enforce": "pre"
@@ -114,6 +130,22 @@
114
130
  "files"
115
131
  ]
116
132
  },
133
+ {
134
+ "config": {
135
+ "if": {
136
+ "flag": {
137
+ "$in": [
138
+ "trpc",
139
+ "telefunc"
140
+ ]
141
+ }
142
+ }
143
+ },
144
+ "folder": "@batijs/shared-db",
145
+ "subfolders": [
146
+ "files"
147
+ ]
148
+ },
117
149
  {
118
150
  "config": {
119
151
  "if": {
@@ -141,6 +173,22 @@
141
173
  "files"
142
174
  ]
143
175
  },
176
+ {
177
+ "config": {
178
+ "if": {
179
+ "flag": {
180
+ "$all": [
181
+ "solid",
182
+ "trpc"
183
+ ]
184
+ }
185
+ }
186
+ },
187
+ "folder": "@batijs/solid-trpc",
188
+ "subfolders": [
189
+ "files"
190
+ ]
191
+ },
144
192
  {
145
193
  "config": {
146
194
  "if": {
@@ -163,6 +211,17 @@
163
211
  "files"
164
212
  ]
165
213
  },
214
+ {
215
+ "config": {
216
+ "if": {
217
+ "flag": "trpc"
218
+ }
219
+ },
220
+ "folder": "@batijs/trpc",
221
+ "subfolders": [
222
+ "files"
223
+ ]
224
+ },
166
225
  {
167
226
  "config": {
168
227
  "if": {
@@ -200,5 +259,21 @@
200
259
  "subfolders": [
201
260
  "files"
202
261
  ]
262
+ },
263
+ {
264
+ "config": {
265
+ "if": {
266
+ "flag": {
267
+ "$all": [
268
+ "vue",
269
+ "trpc"
270
+ ]
271
+ }
272
+ }
273
+ },
274
+ "folder": "@batijs/vue-trpc",
275
+ "subfolders": [
276
+ "files"
277
+ ]
203
278
  }
204
279
  ]
@@ -1037,7 +1037,7 @@ function createConsola2(options = {}) {
1037
1037
  defaults: { level },
1038
1038
  stdout: process.stdout,
1039
1039
  stderr: process.stderr,
1040
- prompt: (...args) => import("./chunk-prompt-LPA56PA5.js").then((m) => m.prompt(...args)),
1040
+ prompt: (...args) => import("./prompt-QGA753QE.js").then((m) => m.prompt(...args)),
1041
1041
  reporters: options.reporters || [
1042
1042
  options.fancy ?? !(isCI2 || isTest) ? new FancyReporter() : new BasicReporter()
1043
1043
  ],
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  colors,
4
4
  consola
5
- } from "./chunk-chunk-HOVHXSZ5.js";
5
+ } from "./chunk-P3F3WO2D.js";
6
6
 
7
7
  // ../../node_modules/.pnpm/citty@0.1.4/node_modules/citty/dist/index.mjs
8
8
  function toArray(val) {
@@ -556,7 +556,7 @@ Please report this issue to https://github.com/magne4000/bati`
556
556
  transformAndWriteQ.add(async () => {
557
557
  const code = await readFile(p, { encoding: "utf-8" });
558
558
  const fileContent = await transformAndFormat(code, meta, {
559
- filepath: p
559
+ filepath: path.relative(source, p)
560
560
  });
561
561
  if (fileContent) {
562
562
  await safeWriteFile(target, fileContent);
@@ -573,7 +573,7 @@ Please report this issue to https://github.com/magne4000/bati`
573
573
  // package.json
574
574
  var package_default = {
575
575
  name: "@batijs/cli",
576
- version: "0.0.108",
576
+ version: "0.0.111",
577
577
  type: "module",
578
578
  scripts: {
579
579
  "check-types": "tsc --noEmit",
@@ -588,7 +588,7 @@ var package_default = {
588
588
  license: "MIT",
589
589
  devDependencies: {
590
590
  "@batijs/build": "workspace:*",
591
- "@batijs/tsup": "workspace:*",
591
+ "@batijs/compile": "workspace:*",
592
592
  "@types/node": "^16.18.40",
593
593
  "@types/which": "^3.0.1",
594
594
  citty: "^0.1.4",
@@ -1711,7 +1711,14 @@ async function run() {
1711
1711
  await checkArguments(args);
1712
1712
  const sources = [];
1713
1713
  const hooks = [];
1714
- const flags = Object.entries(args).filter(([, val]) => val === true).map(([key]) => key);
1714
+ const flags = Object.entries(args).filter(([, val]) => val === true).map(([key]) => {
1715
+ const flag = [key];
1716
+ const dependsOn = features.find((f) => f.flag === key)?.dependsOn;
1717
+ if (dependsOn) {
1718
+ flag.push(...dependsOn);
1719
+ }
1720
+ return flag;
1721
+ }).flat(1);
1715
1722
  checkRules(flags);
1716
1723
  boilerplates.sort((b1, b2) => {
1717
1724
  if (b1.config.enforce === "pre")
@@ -3,7 +3,7 @@ import {
3
3
  colors,
4
4
  getDefaultExportFromCjs,
5
5
  isUnicodeSupported
6
- } from "./chunk-chunk-HOVHXSZ5.js";
6
+ } from "./chunk-P3F3WO2D.js";
7
7
 
8
8
  // ../../node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/chunks/prompt.mjs
9
9
  import { stdin, stdout } from "process";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@batijs/cli",
3
- "version": "0.0.108",
3
+ "version": "0.0.111",
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",
@@ -19,12 +19,12 @@
19
19
  "tsup": "^7.2.0",
20
20
  "typescript": "^5.2.2",
21
21
  "vite": "^4.5.0",
22
- "@batijs/build": "0.0.108",
23
- "@batijs/tsup": "0.0.108"
22
+ "@batijs/build": "0.0.111",
23
+ "@batijs/compile": "0.0.111"
24
24
  },
25
25
  "dependencies": {
26
- "@batijs/core": "0.0.108",
27
- "@batijs/features": "0.0.108"
26
+ "@batijs/core": "0.0.111",
27
+ "@batijs/features": "0.0.111"
28
28
  },
29
29
  "bin": "./dist/index.js",
30
30
  "exports": {
@@ -1,64 +0,0 @@
1
- // package.json
2
- var name = "@batijs/edgedb";
3
- var private2 = true;
4
- var version = "0.0.92";
5
- var description = "";
6
- var type = "module";
7
- var scripts = {
8
- "check-types": "tsc --noEmit",
9
- build: "tsup"
10
- };
11
- var keywords = [];
12
- var author = "";
13
- var license = "MIT";
14
- var devDependencies = {
15
- "@batijs/tsup": "workspace:*",
16
- "@edgedb/generate": "^0.3.4",
17
- "@prisma/client": "^5.5.2",
18
- "@types/node": "^16.18.40",
19
- colorette: "^2.0.20",
20
- edgedb: "^1.3.7",
21
- tsup: "^7.2.0"
22
- };
23
- var dependencies = {
24
- "@batijs/core": "workspace:*"
25
- };
26
- var files = [
27
- "dist/"
28
- ];
29
- var bati = {
30
- if: {
31
- flag: "edgedb"
32
- }
33
- };
34
- var package_default = {
35
- name,
36
- private: private2,
37
- version,
38
- description,
39
- type,
40
- scripts,
41
- keywords,
42
- author,
43
- license,
44
- devDependencies,
45
- dependencies,
46
- files,
47
- bati
48
- };
49
- export {
50
- author,
51
- bati,
52
- package_default as default,
53
- dependencies,
54
- description,
55
- devDependencies,
56
- files,
57
- keywords,
58
- license,
59
- name,
60
- private2 as private,
61
- scripts,
62
- type,
63
- version
64
- };
@@ -1,62 +0,0 @@
1
- // package.json
2
- var name = "@batijs/eslint";
3
- var private2 = true;
4
- var version = "0.0.92";
5
- var description = "";
6
- var type = "module";
7
- var keywords = [];
8
- var author = "";
9
- var license = "MIT";
10
- var scripts = {
11
- "check-types": "tsc --noEmit",
12
- build: "tsup"
13
- };
14
- var devDependencies = {
15
- "@batijs/tsup": "workspace:^",
16
- "@typescript-eslint/eslint-plugin": "^6.9.0",
17
- "@typescript-eslint/parser": "^6.9.0",
18
- eslint: "^8.52.0",
19
- tsup: "^7.2.0"
20
- };
21
- var dependencies = {
22
- "@batijs/core": "workspace:*"
23
- };
24
- var files = [
25
- "dist/"
26
- ];
27
- var bati = {
28
- if: {
29
- flag: "eslint"
30
- }
31
- };
32
- var package_default = {
33
- name,
34
- private: private2,
35
- version,
36
- description,
37
- type,
38
- keywords,
39
- author,
40
- license,
41
- scripts,
42
- devDependencies,
43
- dependencies,
44
- files,
45
- bati
46
- };
47
- export {
48
- author,
49
- bati,
50
- package_default as default,
51
- dependencies,
52
- description,
53
- devDependencies,
54
- files,
55
- keywords,
56
- license,
57
- name,
58
- private2 as private,
59
- scripts,
60
- type,
61
- version
62
- };
@@ -1,69 +0,0 @@
1
- // package.json
2
- var name = "@batijs/express";
3
- var private2 = true;
4
- var version = "0.0.92";
5
- var description = "";
6
- var type = "module";
7
- var scripts = {
8
- "check-types": "tsc --noEmit",
9
- build: "tsup"
10
- };
11
- var keywords = [];
12
- var author = "";
13
- var license = "MIT";
14
- var devDependencies = {
15
- "@auth/core": "^0.18.0",
16
- "@batijs/tsup": "workspace:*",
17
- "@hattip/adapter-node": "^0.0.35",
18
- "@types/express": "^4.17.20",
19
- "@types/node": "^16.18.40",
20
- esno: "^0.17.0",
21
- express: "^4.18.2",
22
- telefunc: "^0.1.62",
23
- tsup: "^7.2.0",
24
- vike: "^0.4.144",
25
- "vike-authjs": "^0.1.1",
26
- vite: "^4.5.0"
27
- };
28
- var dependencies = {
29
- "@batijs/core": "workspace:*"
30
- };
31
- var files = [
32
- "dist/"
33
- ];
34
- var bati = {
35
- if: {
36
- flag: "express"
37
- }
38
- };
39
- var package_default = {
40
- name,
41
- private: private2,
42
- version,
43
- description,
44
- type,
45
- scripts,
46
- keywords,
47
- author,
48
- license,
49
- devDependencies,
50
- dependencies,
51
- files,
52
- bati
53
- };
54
- export {
55
- author,
56
- bati,
57
- package_default as default,
58
- dependencies,
59
- description,
60
- devDependencies,
61
- files,
62
- keywords,
63
- license,
64
- name,
65
- private2 as private,
66
- scripts,
67
- type,
68
- version
69
- };
@@ -1,70 +0,0 @@
1
- // package.json
2
- var name = "@batijs/h3";
3
- var private2 = true;
4
- var version = "0.0.92";
5
- var description = "";
6
- var type = "module";
7
- var scripts = {
8
- "check-types": "tsc --noEmit",
9
- build: "tsup"
10
- };
11
- var keywords = [];
12
- var author = "";
13
- var license = "MIT";
14
- var devDependencies = {
15
- "@auth/core": "^0.18.0",
16
- "@batijs/tsup": "workspace:*",
17
- "@hattip/polyfills": "^0.0.35",
18
- "@types/node": "^16.18.40",
19
- "@types/serve-static": "^1.15.4",
20
- esno: "^0.17.0",
21
- h3: "^1.8.2",
22
- "serve-static": "^1.15.0",
23
- telefunc: "^0.1.62",
24
- tsup: "^7.2.0",
25
- vike: "^0.4.144",
26
- "vike-authjs": "^0.1.1",
27
- vite: "^4.5.0"
28
- };
29
- var dependencies = {
30
- "@batijs/core": "workspace:*"
31
- };
32
- var files = [
33
- "dist/"
34
- ];
35
- var bati = {
36
- if: {
37
- flag: "h3"
38
- }
39
- };
40
- var package_default = {
41
- name,
42
- private: private2,
43
- version,
44
- description,
45
- type,
46
- scripts,
47
- keywords,
48
- author,
49
- license,
50
- devDependencies,
51
- dependencies,
52
- files,
53
- bati
54
- };
55
- export {
56
- author,
57
- bati,
58
- package_default as default,
59
- dependencies,
60
- description,
61
- devDependencies,
62
- files,
63
- keywords,
64
- license,
65
- name,
66
- private2 as private,
67
- scripts,
68
- type,
69
- version
70
- };