@batijs/cli 0.0.176 → 0.0.178

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 (92) hide show
  1. package/dist/boilerplates/@batijs/auth0/files/$.env.js +19 -0
  2. package/dist/boilerplates/@batijs/auth0/files/$README.md.js +43 -0
  3. package/dist/boilerplates/@batijs/auth0/files/vike.d.ts +11 -0
  4. package/dist/boilerplates/@batijs/compiled/files/$package.json.js +1 -1
  5. package/dist/boilerplates/@batijs/edgedb/files/$package.json.js +1 -1
  6. package/dist/boilerplates/@batijs/eslint/files/$package.json.js +1 -1
  7. package/dist/boilerplates/@batijs/express/files/$package.json.js +7 -3
  8. package/dist/boilerplates/@batijs/express/files/express-entry.ts +33 -11
  9. package/dist/boilerplates/@batijs/express/files/vike.d.ts +10 -0
  10. package/dist/boilerplates/@batijs/express/types/express-entry.d.ts +1 -1
  11. package/dist/boilerplates/@batijs/firebase-auth/files/$package.json.js +1 -7
  12. package/dist/boilerplates/@batijs/firebase-auth/files/firebase/$service-account.json.js +20 -0
  13. package/dist/boilerplates/@batijs/firebase-auth/files/libs/firebaseAdmin.ts +6 -6
  14. package/dist/boilerplates/@batijs/firebase-auth/files/libs/firebaseUI.ts +26 -26
  15. package/dist/boilerplates/@batijs/firebase-auth/files/pages/+firebaseApp.ts +2 -1
  16. package/dist/boilerplates/@batijs/firebase-auth/files/pages/login/+guard.ts +5 -5
  17. package/dist/boilerplates/@batijs/firebase-auth/files/{types.ts → vike.d.ts} +0 -9
  18. package/dist/boilerplates/@batijs/firebase-auth/types/pages/login/+guard.d.ts +1 -1
  19. package/dist/boilerplates/@batijs/h3/files/$package.json.js +11 -3
  20. package/dist/boilerplates/@batijs/h3/files/h3-entry.ts +37 -16
  21. package/dist/boilerplates/@batijs/h3/files/vike.d.ts +22 -0
  22. package/dist/boilerplates/@batijs/h3/types/h3-entry.d.ts +1 -6
  23. package/dist/boilerplates/@batijs/hattip/files/$package.json.js +1 -1
  24. package/dist/boilerplates/@batijs/prettier/files/$package.json.js +1 -1
  25. package/dist/boilerplates/@batijs/prisma/files/$package.json.js +1 -1
  26. package/dist/boilerplates/@batijs/react/files/$package.json.js +2 -2
  27. package/dist/boilerplates/@batijs/react/files/layouts/LayoutDefault.tsx +1 -1
  28. package/dist/boilerplates/@batijs/react/files/pages/+config.ts +3 -3
  29. package/dist/boilerplates/@batijs/react/files/pages/_error/+Page.tsx +1 -1
  30. package/dist/boilerplates/@batijs/react/files/pages/index/+Page.tsx +1 -1
  31. package/dist/boilerplates/@batijs/react/files/pages/star-wars/@id/+Page.tsx +1 -1
  32. package/dist/boilerplates/@batijs/react/files/pages/star-wars/@id/+data.ts +1 -1
  33. package/dist/boilerplates/@batijs/react/files/pages/star-wars/@id/+title.ts +1 -1
  34. package/dist/boilerplates/@batijs/react/files/pages/star-wars/index/+Page.tsx +1 -1
  35. package/dist/boilerplates/@batijs/react/files/pages/star-wars/index/+data.ts +1 -1
  36. package/dist/boilerplates/@batijs/react/files/pages/star-wars/index/+title.ts +1 -1
  37. package/dist/boilerplates/@batijs/react/types/pages/+config.d.ts +3 -3
  38. package/dist/boilerplates/@batijs/react/types/pages/star-wars/@id/+data.d.ts +1 -1
  39. package/dist/boilerplates/@batijs/react/types/pages/star-wars/@id/+title.d.ts +1 -1
  40. package/dist/boilerplates/@batijs/react/types/pages/star-wars/index/+data.d.ts +1 -1
  41. package/dist/boilerplates/@batijs/react/types/pages/star-wars/index/+title.d.ts +1 -1
  42. package/dist/boilerplates/@batijs/react-firebase-auth/files/pages/login/+Page.tsx +44 -44
  43. package/dist/boilerplates/@batijs/react-telefunc/files/pages/todo/+Page.tsx +2 -2
  44. package/dist/boilerplates/@batijs/react-telefunc/types/pages/todo/TodoList.d.ts +1 -1
  45. package/dist/boilerplates/@batijs/react-trpc/files/pages/todo-trpc/+Page.tsx +2 -2
  46. package/dist/boilerplates/@batijs/shared/files/tsconfig.json +2 -2
  47. package/dist/boilerplates/@batijs/solid/files/$package.json.js +3 -3
  48. package/dist/boilerplates/@batijs/solid/files/components/Link.tsx +1 -1
  49. package/dist/boilerplates/@batijs/solid/files/layouts/LayoutDefault.tsx +1 -1
  50. package/dist/boilerplates/@batijs/solid/files/pages/+config.ts +3 -3
  51. package/dist/boilerplates/@batijs/solid/files/pages/index/+Page.tsx +1 -1
  52. package/dist/boilerplates/@batijs/solid/files/pages/star-wars/@id/+Page.tsx +1 -1
  53. package/dist/boilerplates/@batijs/solid/files/pages/star-wars/@id/+data.ts +1 -1
  54. package/dist/boilerplates/@batijs/solid/files/pages/star-wars/@id/+title.ts +1 -1
  55. package/dist/boilerplates/@batijs/solid/files/pages/star-wars/index/+Page.tsx +1 -1
  56. package/dist/boilerplates/@batijs/solid/files/pages/star-wars/index/+data.ts +1 -1
  57. package/dist/boilerplates/@batijs/solid/files/pages/star-wars/index/+title.ts +1 -1
  58. package/dist/boilerplates/@batijs/solid/types/pages/+config.d.ts +2 -2
  59. package/dist/boilerplates/@batijs/solid/types/pages/star-wars/@id/+data.d.ts +1 -1
  60. package/dist/boilerplates/@batijs/solid/types/pages/star-wars/@id/+title.d.ts +1 -1
  61. package/dist/boilerplates/@batijs/solid/types/pages/star-wars/index/+data.d.ts +1 -1
  62. package/dist/boilerplates/@batijs/solid/types/pages/star-wars/index/+title.d.ts +1 -1
  63. package/dist/boilerplates/@batijs/solid-firebase-auth/files/pages/login/+Page.tsx +43 -43
  64. package/dist/boilerplates/@batijs/solid-telefunc/files/pages/todo/+Page.tsx +1 -1
  65. package/dist/boilerplates/@batijs/solid-trpc/files/pages/todo-trpc/+Page.tsx +1 -1
  66. package/dist/boilerplates/@batijs/tailwindcss/files/$package.json.js +7 -2
  67. package/dist/boilerplates/@batijs/tailwindcss/files/postcss.config.js +1 -1
  68. package/dist/boilerplates/@batijs/telefunc/files/$package.json.js +1 -1
  69. package/dist/boilerplates/@batijs/trpc/files/$package.json.js +1 -1
  70. package/dist/boilerplates/@batijs/trpc/files/trpc/client.ts +1 -1
  71. package/dist/boilerplates/@batijs/trpc/files/trpc/vite-plugin.ts +1 -1
  72. package/dist/boilerplates/@batijs/vercel/files/$package.json.js +1 -1
  73. package/dist/boilerplates/@batijs/vue/files/$package.json.js +4 -4
  74. package/dist/boilerplates/@batijs/vue/files/pages/+config.ts +1 -1
  75. package/dist/boilerplates/@batijs/vue/files/pages/index/+Page.vue +5 -11
  76. package/dist/boilerplates/@batijs/vue/files/pages/star-wars/@id/+Page.vue +1 -1
  77. package/dist/boilerplates/@batijs/vue/files/pages/star-wars/@id/+data.ts +1 -1
  78. package/dist/boilerplates/@batijs/vue/files/pages/star-wars/@id/+title.ts +1 -1
  79. package/dist/boilerplates/@batijs/vue/files/pages/star-wars/index/+Page.vue +1 -1
  80. package/dist/boilerplates/@batijs/vue/files/pages/star-wars/index/+data.ts +1 -1
  81. package/dist/boilerplates/@batijs/vue/files/pages/star-wars/index/+title.ts +1 -1
  82. package/dist/boilerplates/@batijs/vue/types/pages/star-wars/@id/+data.d.ts +1 -1
  83. package/dist/boilerplates/@batijs/vue/types/pages/star-wars/@id/+title.d.ts +1 -1
  84. package/dist/boilerplates/@batijs/vue/types/pages/star-wars/index/+data.d.ts +1 -1
  85. package/dist/boilerplates/@batijs/vue/types/pages/star-wars/index/+title.d.ts +1 -1
  86. package/dist/boilerplates/@batijs/vue-telefunc/files/pages/todo/+Page.vue +1 -1
  87. package/dist/boilerplates/@batijs/vue-trpc/files/pages/todo-trpc/+Page.vue +1 -1
  88. package/dist/boilerplates/boilerplates.json +11 -0
  89. package/dist/index.js +257 -217
  90. package/package.json +5 -5
  91. package/dist/boilerplates/@batijs/firebase-auth/files/firebase/service-account-example.json +0 -13
  92. package/dist/boilerplates/@batijs/firebase-auth/types/types.d.ts +0 -18
@@ -6,7 +6,7 @@ import {
6
6
  type NodeHTTPResponse,
7
7
  } from "@trpc/server/adapters/node-http";
8
8
  import type { PluginOption } from "vite";
9
- import { appRouter } from "./server";
9
+ import { appRouter } from "./server.js";
10
10
 
11
11
  type TrpcPluginOptions<
12
12
  TRouter extends AnyRouter,
@@ -67,7 +67,7 @@ var require_package = __commonJS({
67
67
  import { addDependency, loadAsJson } from "@batijs/core";
68
68
  async function getPackageJson(props) {
69
69
  const packageJson = await loadAsJson(props);
70
- return addDependency(packageJson, await Promise.resolve().then(() => __toESM(require_package(), 1)), {
70
+ return addDependency(packageJson, await Promise.resolve().then(() => __toESM(require_package(), 1)).then((x) => x.default), {
71
71
  dependencies: ["vite-plugin-vercel", "@vite-plugin-vercel/vike"]
72
72
  });
73
73
  }
@@ -52,7 +52,7 @@ var require_package = __commonJS({
52
52
  typescript: "^5.4.5",
53
53
  "unplugin-vue-markdown": "^0.26.1",
54
54
  vike: "^0.4.168",
55
- "vike-vue": "^0.6.3",
55
+ "vike-vue": "^0.6.4",
56
56
  vite: "^5.2.8",
57
57
  vue: "^3.4.21",
58
58
  "vue-gtag": "^2.0.1"
@@ -143,16 +143,16 @@ async function getPackageJson(props) {
143
143
  precedence: 20
144
144
  }
145
145
  });
146
- addDependency(packageJson, await Promise.resolve().then(() => __toESM(require_package(), 1)), {
146
+ addDependency(packageJson, await Promise.resolve().then(() => __toESM(require_package(), 1)).then((x) => x.default), {
147
147
  devDependencies: ["eslint-plugin-vue"]
148
148
  });
149
149
  }
150
150
  if (props.meta.BATI.has("google-analytics")) {
151
- addDependency(packageJson, await Promise.resolve().then(() => __toESM(require_package(), 1)), {
151
+ addDependency(packageJson, await Promise.resolve().then(() => __toESM(require_package(), 1)).then((x) => x.default), {
152
152
  dependencies: ["vue-gtag"]
153
153
  });
154
154
  }
155
- return addDependency(packageJson, await Promise.resolve().then(() => __toESM(require_package(), 1)), {
155
+ return addDependency(packageJson, await Promise.resolve().then(() => __toESM(require_package(), 1)).then((x) => x.default), {
156
156
  devDependencies: ["vite"],
157
157
  dependencies: [
158
158
  "@vitejs/plugin-vue",
@@ -8,7 +8,7 @@ export default {
8
8
  Layout,
9
9
  Head,
10
10
  // <title>
11
- /*{ @if (it.BATI.has("firebase-auth")) }*/
11
+ /*{ @if (it.BATI.has("auth0") || it.BATI.has("firebase-auth")) }*/
12
12
  passToClient: ["user"],
13
13
  /*{ /if }*/
14
14
  title: "My Vike App",
@@ -1,24 +1,18 @@
1
1
  <template>
2
2
  <!-- BATI.has("tailwindcss") -->
3
- <h1 class="font-bold text-3xl pb-4">
4
- My Vike app
5
- </h1>
3
+ <h1 class="font-bold text-3xl pb-4">My Vike app</h1>
6
4
  <!-- !BATI.has("tailwindcss") -->
7
- <h1>
8
- My Vike app
9
- </h1>
5
+ <h1>My Vike app</h1>
10
6
  This page is:
11
7
  <ul>
12
8
  <li>Rendered to HTML.</li>
13
- <li>
14
- Interactive. <Counter />
15
- </li>
9
+ <li>Interactive. <Counter /></li>
16
10
  </ul>
17
11
  </template>
18
12
 
19
13
  <script lang="ts">
20
14
  import Counter from "../../components/Counter.vue";
21
15
 
22
- const components = { Counter }
23
- export default { components }
16
+ const components = { Counter };
17
+ export default { components };
24
18
  </script>
@@ -9,7 +9,7 @@
9
9
 
10
10
  <script lang="ts" setup>
11
11
  import { useData } from "vike-vue/useData";
12
- import type { Data } from "./+data";
12
+ import type { Data } from "./+data.js";
13
13
 
14
14
  const movie = useData<Data>();
15
15
  </script>
@@ -2,7 +2,7 @@
2
2
 
3
3
  import fetch from "cross-fetch";
4
4
  import type { PageContextServer } from "vike/types";
5
- import type { MovieDetails } from "../types";
5
+ import type { MovieDetails } from "../types.js";
6
6
 
7
7
  export type Data = Awaited<ReturnType<typeof data>>;
8
8
 
@@ -1,5 +1,5 @@
1
1
  import type { PageContext } from "vike/types";
2
- import type { Data } from "./+data";
2
+ import type { Data } from "./+data.js";
3
3
 
4
4
  export function title(pageContext: PageContext<Data>) {
5
5
  const movie = pageContext.data;
@@ -10,7 +10,7 @@
10
10
 
11
11
  <script lang="ts" setup>
12
12
  import { useData } from "vike-vue/useData";
13
- import type { Data } from "./+data";
13
+ import type { Data } from "./+data.js";
14
14
 
15
15
  const movies = useData<Data>();
16
16
  </script>
@@ -1,7 +1,7 @@
1
1
  // https://vike.dev/data
2
2
 
3
3
  import fetch from "cross-fetch";
4
- import type { Movie, MovieDetails } from "../types";
4
+ import type { Movie, MovieDetails } from "../types.js";
5
5
 
6
6
  export type Data = Awaited<ReturnType<typeof data>>;
7
7
 
@@ -1,5 +1,5 @@
1
1
  import type { PageContext } from "vike/types";
2
- import type { Data } from "./+data";
2
+ import type { Data } from "./+data.js";
3
3
 
4
4
  export function title(pageContext: PageContext<Data>) {
5
5
  const movies = pageContext.data;
@@ -1,4 +1,4 @@
1
1
  import type { PageContextServer } from "vike/types";
2
- import type { MovieDetails } from "../types";
2
+ import type { MovieDetails } from "../types.js";
3
3
  export type Data = Awaited<ReturnType<typeof data>>;
4
4
  export declare const data: (pageContext: PageContextServer) => Promise<MovieDetails>;
@@ -1,3 +1,3 @@
1
1
  import type { PageContext } from "vike/types";
2
- import type { Data } from "./+data";
2
+ import type { Data } from "./+data.js";
3
3
  export declare function title(pageContext: PageContext<Data>): string;
@@ -1,3 +1,3 @@
1
- import type { Movie } from "../types";
1
+ import type { Movie } from "../types.js";
2
2
  export type Data = Awaited<ReturnType<typeof data>>;
3
3
  export declare const data: () => Promise<Movie[]>;
@@ -1,3 +1,3 @@
1
1
  import type { PageContext } from "vike/types";
2
- import type { Data } from "./+data";
2
+ import type { Data } from "./+data.js";
3
3
  export declare function title(pageContext: PageContext<Data>): string;
@@ -7,7 +7,7 @@
7
7
 
8
8
  <script lang="ts" setup>
9
9
  import { useData } from "vike-vue/useData";
10
- import type { Data } from "./+data";
10
+ import type { Data } from "./+data.js";
11
11
 
12
12
  const todoItemsInitial = useData<Data>();
13
13
  </script>
@@ -7,7 +7,7 @@
7
7
 
8
8
  <script lang="ts" setup>
9
9
  import { useData } from "vike-vue/useData";
10
- import type { Data } from "./+data";
10
+ import type { Data } from "./+data.js";
11
11
 
12
12
  const todoItemsInitial = useData<Data>();
13
13
  </script>
@@ -1,4 +1,15 @@
1
1
  [
2
+ {
3
+ "config": {
4
+ "if": {
5
+ "flag": "auth0"
6
+ }
7
+ },
8
+ "folder": "@batijs/auth0",
9
+ "subfolders": [
10
+ "files"
11
+ ]
12
+ },
2
13
  {
3
14
  "config": {
4
15
  "if": {