@batijs/cli 0.0.177 → 0.0.180

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 (77) hide show
  1. package/dist/boilerplates/@batijs/compiled/files/$package.json.js +2 -2
  2. package/dist/boilerplates/@batijs/edgedb/files/$package.json.js +3 -3
  3. package/dist/boilerplates/@batijs/eslint/files/$package.json.js +3 -3
  4. package/dist/boilerplates/@batijs/express/files/$package.json.js +6 -6
  5. package/dist/boilerplates/@batijs/firebase-auth/files/$package.json.js +4 -4
  6. package/dist/boilerplates/@batijs/firebase-auth/files/libs/firebaseAdmin.ts +6 -6
  7. package/dist/boilerplates/@batijs/firebase-auth/files/libs/firebaseUI.ts +26 -26
  8. package/dist/boilerplates/@batijs/firebase-auth/files/pages/login/+guard.ts +5 -5
  9. package/dist/boilerplates/@batijs/firebase-auth/types/pages/login/+guard.d.ts +1 -1
  10. package/dist/boilerplates/@batijs/h3/files/$package.json.js +6 -6
  11. package/dist/boilerplates/@batijs/hattip/files/$package.json.js +5 -5
  12. package/dist/boilerplates/@batijs/prettier/files/$package.json.js +1 -1
  13. package/dist/boilerplates/@batijs/prisma/files/$package.json.js +1 -1
  14. package/dist/boilerplates/@batijs/react/files/$package.json.js +6 -6
  15. package/dist/boilerplates/@batijs/react/files/layouts/LayoutDefault.tsx +1 -1
  16. package/dist/boilerplates/@batijs/react/files/pages/+config.ts +2 -2
  17. package/dist/boilerplates/@batijs/react/files/pages/_error/+Page.tsx +1 -1
  18. package/dist/boilerplates/@batijs/react/files/pages/index/+Page.tsx +1 -1
  19. package/dist/boilerplates/@batijs/react/files/pages/star-wars/@id/+Page.tsx +1 -1
  20. package/dist/boilerplates/@batijs/react/files/pages/star-wars/@id/+data.ts +1 -1
  21. package/dist/boilerplates/@batijs/react/files/pages/star-wars/@id/+title.ts +1 -1
  22. package/dist/boilerplates/@batijs/react/files/pages/star-wars/index/+Page.tsx +1 -1
  23. package/dist/boilerplates/@batijs/react/files/pages/star-wars/index/+data.ts +1 -1
  24. package/dist/boilerplates/@batijs/react/files/pages/star-wars/index/+title.ts +1 -1
  25. package/dist/boilerplates/@batijs/react/types/pages/+config.d.ts +13 -3
  26. package/dist/boilerplates/@batijs/react/types/pages/star-wars/@id/+data.d.ts +1 -1
  27. package/dist/boilerplates/@batijs/react/types/pages/star-wars/@id/+title.d.ts +1 -1
  28. package/dist/boilerplates/@batijs/react/types/pages/star-wars/index/+data.d.ts +1 -1
  29. package/dist/boilerplates/@batijs/react/types/pages/star-wars/index/+title.d.ts +1 -1
  30. package/dist/boilerplates/@batijs/react-firebase-auth/files/pages/login/+Page.tsx +44 -44
  31. package/dist/boilerplates/@batijs/react-telefunc/files/pages/todo/+Page.tsx +2 -2
  32. package/dist/boilerplates/@batijs/react-telefunc/types/pages/todo/TodoList.d.ts +1 -1
  33. package/dist/boilerplates/@batijs/react-trpc/files/pages/todo-trpc/+Page.tsx +2 -2
  34. package/dist/boilerplates/@batijs/shared/files/package.json +2 -2
  35. package/dist/boilerplates/@batijs/shared/files/tsconfig.json +2 -2
  36. package/dist/boilerplates/@batijs/solid/files/$package.json.js +5 -5
  37. package/dist/boilerplates/@batijs/solid/files/components/Link.tsx +1 -1
  38. package/dist/boilerplates/@batijs/solid/files/layouts/LayoutDefault.tsx +1 -1
  39. package/dist/boilerplates/@batijs/solid/files/pages/+config.ts +2 -2
  40. package/dist/boilerplates/@batijs/solid/files/pages/index/+Page.tsx +1 -1
  41. package/dist/boilerplates/@batijs/solid/files/pages/star-wars/@id/+Page.tsx +1 -1
  42. package/dist/boilerplates/@batijs/solid/files/pages/star-wars/@id/+data.ts +1 -1
  43. package/dist/boilerplates/@batijs/solid/files/pages/star-wars/@id/+title.ts +1 -1
  44. package/dist/boilerplates/@batijs/solid/files/pages/star-wars/index/+Page.tsx +1 -1
  45. package/dist/boilerplates/@batijs/solid/files/pages/star-wars/index/+data.ts +1 -1
  46. package/dist/boilerplates/@batijs/solid/files/pages/star-wars/index/+title.ts +1 -1
  47. package/dist/boilerplates/@batijs/solid/types/pages/+config.d.ts +2 -2
  48. package/dist/boilerplates/@batijs/solid/types/pages/star-wars/@id/+data.d.ts +1 -1
  49. package/dist/boilerplates/@batijs/solid/types/pages/star-wars/@id/+title.d.ts +1 -1
  50. package/dist/boilerplates/@batijs/solid/types/pages/star-wars/index/+data.d.ts +1 -1
  51. package/dist/boilerplates/@batijs/solid/types/pages/star-wars/index/+title.d.ts +1 -1
  52. package/dist/boilerplates/@batijs/solid-firebase-auth/files/pages/login/+Page.tsx +43 -43
  53. package/dist/boilerplates/@batijs/solid-telefunc/files/pages/todo/+Page.tsx +1 -1
  54. package/dist/boilerplates/@batijs/solid-trpc/files/pages/todo-trpc/+Page.tsx +1 -1
  55. package/dist/boilerplates/@batijs/tailwindcss/files/$package.json.js +10 -5
  56. package/dist/boilerplates/@batijs/tailwindcss/files/postcss.config.js +1 -1
  57. package/dist/boilerplates/@batijs/telefunc/files/$package.json.js +4 -4
  58. package/dist/boilerplates/@batijs/trpc/files/$package.json.js +2 -2
  59. package/dist/boilerplates/@batijs/trpc/files/trpc/client.ts +1 -1
  60. package/dist/boilerplates/@batijs/trpc/files/trpc/vite-plugin.ts +1 -1
  61. package/dist/boilerplates/@batijs/vercel/files/$package.json.js +3 -3
  62. package/dist/boilerplates/@batijs/vue/files/$package.json.js +10 -10
  63. package/dist/boilerplates/@batijs/vue/files/pages/index/+Page.vue +5 -11
  64. package/dist/boilerplates/@batijs/vue/files/pages/star-wars/@id/+Page.vue +1 -1
  65. package/dist/boilerplates/@batijs/vue/files/pages/star-wars/@id/+data.ts +1 -1
  66. package/dist/boilerplates/@batijs/vue/files/pages/star-wars/@id/+title.ts +1 -1
  67. package/dist/boilerplates/@batijs/vue/files/pages/star-wars/index/+Page.vue +1 -1
  68. package/dist/boilerplates/@batijs/vue/files/pages/star-wars/index/+data.ts +1 -1
  69. package/dist/boilerplates/@batijs/vue/files/pages/star-wars/index/+title.ts +1 -1
  70. package/dist/boilerplates/@batijs/vue/types/pages/star-wars/@id/+data.d.ts +1 -1
  71. package/dist/boilerplates/@batijs/vue/types/pages/star-wars/@id/+title.d.ts +1 -1
  72. package/dist/boilerplates/@batijs/vue/types/pages/star-wars/index/+data.d.ts +1 -1
  73. package/dist/boilerplates/@batijs/vue/types/pages/star-wars/index/+title.d.ts +1 -1
  74. package/dist/boilerplates/@batijs/vue-telefunc/files/pages/todo/+Page.vue +1 -1
  75. package/dist/boilerplates/@batijs/vue-trpc/files/pages/todo-trpc/+Page.vue +1 -1
  76. package/dist/index.js +257 -257
  77. package/package.json +7 -7
@@ -12,8 +12,8 @@
12
12
  "author": "",
13
13
  "devDependencies": {
14
14
  "typescript": "^5.4.5",
15
- "vike": "^0.4.168",
16
- "vite": "^5.2.8"
15
+ "vike": "^0.4.171",
16
+ "vite": "^5.2.10"
17
17
  },
18
18
  "dependencies": {}
19
19
  }
@@ -10,8 +10,8 @@
10
10
  "sourceMap": true,
11
11
  "module": "ESNext",
12
12
  "noEmit": true,
13
- "moduleResolution": "node",
14
- "target": "ES2020",
13
+ "moduleResolution": "Bundler",
14
+ "target": "ES2021",
15
15
  "lib": ["DOM", "DOM.Iterable", "ESNext"],
16
16
  "types": ["vite/client"]
17
17
  },
@@ -48,9 +48,9 @@ var require_package = __commonJS({
48
48
  "solid-js": "^1.8.16",
49
49
  tailwindcss: "^3.4.3",
50
50
  typescript: "^5.4.5",
51
- vike: "^0.4.168",
52
- "vike-solid": "^0.4.3",
53
- vite: "^5.2.8",
51
+ vike: "^0.4.171",
52
+ "vike-solid": "^0.4.5",
53
+ vite: "^5.2.10",
54
54
  "vite-plugin-solid": "^2.10.2"
55
55
  },
56
56
  dependencies: {
@@ -175,11 +175,11 @@ import { addDependency, loadAsJson } from "@batijs/core";
175
175
  async function getPackageJson(props) {
176
176
  const packageJson = await loadAsJson(props);
177
177
  if (props.meta.BATI.has("eslint")) {
178
- addDependency(packageJson, await Promise.resolve().then(() => __toESM(require_package(), 1)), {
178
+ addDependency(packageJson, await Promise.resolve().then(() => __toESM(require_package(), 1)).then((x) => x.default), {
179
179
  devDependencies: ["eslint-plugin-solid"]
180
180
  });
181
181
  }
182
- return addDependency(packageJson, await Promise.resolve().then(() => __toESM(require_package(), 1)), {
182
+ return addDependency(packageJson, await Promise.resolve().then(() => __toESM(require_package(), 1)).then((x) => x.default), {
183
183
  devDependencies: ["vite"],
184
184
  dependencies: ["cross-fetch", "solid-js", "vike-solid", "vike"]
185
185
  });
@@ -4,7 +4,7 @@ import { usePageContext } from "vike-solid/usePageContext";
4
4
  export function Link(props: { href: string; children: string }) {
5
5
  const pageContext = usePageContext();
6
6
  const isActive = createMemo(() =>
7
- props.href === "/" ? pageContext.urlPathname === props.href : pageContext.urlPathname.startsWith(props.href)
7
+ props.href === "/" ? pageContext.urlPathname === props.href : pageContext.urlPathname.startsWith(props.href),
8
8
  );
9
9
  return (
10
10
  <a href={props.href} class={isActive() ? "is-active" : undefined}>
@@ -3,7 +3,7 @@ import "./style.css";
3
3
  import "./tailwind.css";
4
4
  import type { JSX } from "solid-js";
5
5
  import logoUrl from "../assets/logo.svg";
6
- import { Link } from "../components/Link";
6
+ import { Link } from "../components/Link.js";
7
7
 
8
8
  export default function LayoutDefault(props: { children?: JSX.Element }) {
9
9
  return (
@@ -1,7 +1,7 @@
1
1
  import vikeSolid from "vike-solid/config";
2
2
  import type { Config } from "vike/types";
3
- import Head from "../layouts/HeadDefault";
4
- import Layout from "../layouts/LayoutDefault";
3
+ import Head from "../layouts/HeadDefault.js";
4
+ import Layout from "../layouts/LayoutDefault.js";
5
5
 
6
6
  // Default config (can be overridden by pages)
7
7
  export default {
@@ -1,4 +1,4 @@
1
- import { Counter } from "./Counter";
1
+ import { Counter } from "./Counter.js";
2
2
 
3
3
  export default function Page() {
4
4
  return (
@@ -1,5 +1,5 @@
1
1
  import { useData } from "vike-solid/useData";
2
- import type { Data } from "./+data";
2
+ import type { Data } from "./+data.js";
3
3
 
4
4
  export default function Page() {
5
5
  const movie = useData<Data>();
@@ -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;
@@ -1,6 +1,6 @@
1
1
  import { For } from "solid-js";
2
2
  import { useData } from "vike-solid/useData";
3
- import type { Data } from "./+data";
3
+ import type { Data } from "./+data.js";
4
4
 
5
5
  export default function Page() {
6
6
  const movies = useData<Data>();
@@ -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,6 +1,6 @@
1
1
  import vikeSolid from "vike-solid/config";
2
- import Head from "../layouts/HeadDefault";
3
- import Layout from "../layouts/LayoutDefault";
2
+ import Head from "../layouts/HeadDefault.js";
3
+ import Layout from "../layouts/LayoutDefault.js";
4
4
  declare const _default: {
5
5
  Layout: typeof Layout;
6
6
  Head: typeof Head;
@@ -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;
@@ -1,52 +1,52 @@
1
- import "firebaseui/dist/firebaseui.css"
2
- import { createEffect, createSignal } from "solid-js"
3
- import { startFirebaseUI } from "@batijs/firebase-auth/libs/firebaseUI"
4
- import * as firebaseui from "firebaseui"
5
- import { getAuth, type UserCredential } from 'firebase/auth'
6
- import { reload } from "vike/client/router"
1
+ import "firebaseui/dist/firebaseui.css";
2
+ import { startFirebaseUI } from "@batijs/firebase-auth/libs/firebaseUI";
3
+ import { getAuth, type UserCredential } from "firebase/auth";
4
+ import * as firebaseui from "firebaseui";
5
+ import { createEffect, createSignal } from "solid-js";
6
+ import { reload } from "vike/client/router";
7
7
 
8
- export default Page
8
+ export default Page;
9
9
 
10
10
  function Page() {
11
- const [error, setError] = createSignal("")
11
+ const [error, setError] = createSignal("");
12
12
 
13
- async function sessionLogin(authResult: UserCredential) {
14
- const idToken = await authResult.user.getIdToken() || ""
15
- try {
16
- const response = await fetch("/api/sessionLogin", {
17
- method: "POST",
18
- body: JSON.stringify({ idToken }),
19
- headers: {
20
- "Content-Type": "application/json",
21
- },
22
- })
23
- if (response.ok) {
24
- await reload()
25
- } else {
26
- setError(response.statusText)
27
- }
28
- await getAuth().signOut()
29
- } catch (err) {
30
- console.log('error :', err)
31
- }
13
+ async function sessionLogin(authResult: UserCredential) {
14
+ const idToken = (await authResult.user.getIdToken()) || "";
15
+ try {
16
+ const response = await fetch("/api/sessionLogin", {
17
+ method: "POST",
18
+ body: JSON.stringify({ idToken }),
19
+ headers: {
20
+ "Content-Type": "application/json",
21
+ },
22
+ });
23
+ if (response.ok) {
24
+ await reload();
25
+ } else {
26
+ setError(response.statusText);
27
+ }
28
+ await getAuth().signOut();
29
+ } catch (err) {
30
+ console.log("error :", err);
32
31
  }
32
+ }
33
33
 
34
- createEffect(() => {
35
- const ui = firebaseui.auth.AuthUI.getInstance() || new firebaseui.auth.AuthUI(getAuth())
36
- if (!error()) {
37
- startFirebaseUI(ui, sessionLogin)
38
- }
39
- })
34
+ createEffect(() => {
35
+ const ui = firebaseui.auth.AuthUI.getInstance() || new firebaseui.auth.AuthUI(getAuth());
36
+ if (!error()) {
37
+ startFirebaseUI(ui, sessionLogin);
38
+ }
39
+ });
40
40
 
41
- return (
41
+ return (
42
+ <>
43
+ <div id="firebaseui-auth-container" />
44
+ {error() && (
42
45
  <>
43
- <div id="firebaseui-auth-container" />
44
- {error() && (
45
- <>
46
- <div style={{ color: "red" }}>There is an error occured : {error()}</div>
47
- <button onClick={() => setError("")}>Try Again</button>
48
- </>
49
- )}
46
+ <div style={{ color: "red" }}>There is an error occured : {error()}</div>
47
+ <button onClick={() => setError("")}>Try Again</button>
50
48
  </>
51
- )
52
- }
49
+ )}
50
+ </>
51
+ );
52
+ }
@@ -1,6 +1,6 @@
1
1
  import type { TodoItem } from "@batijs/shared-db/database/todoItems";
2
2
  import { createSignal } from "solid-js";
3
- import { TodoList } from "./TodoList";
3
+ import { TodoList } from "./TodoList.js";
4
4
 
5
5
  export default function Page(props: { initialTodoItems: TodoItem[] }) {
6
6
  return (
@@ -1,6 +1,6 @@
1
1
  import type { TodoItem } from "@batijs/shared-db/database/todoItems";
2
2
  import { createSignal } from "solid-js";
3
- import { TodoList } from "./TodoList";
3
+ import { TodoList } from "./TodoList.js";
4
4
 
5
5
  export default function Page(props: { initialTodoItems: TodoItem[] }) {
6
6
  return (
@@ -44,11 +44,11 @@ var require_package = __commonJS({
44
44
  "@batijs/compile": "workspace:*",
45
45
  "@types/node": "^18.19.14",
46
46
  autoprefixer: "^10.4.19",
47
- daisyui: "^4.10.1",
47
+ daisyui: "^4.10.2",
48
48
  postcss: "^8.4.38",
49
49
  tailwindcss: "^3.4.3",
50
- vike: "^0.4.168",
51
- vite: "^5.2.8"
50
+ vike: "^0.4.171",
51
+ vite: "^5.2.10"
52
52
  },
53
53
  dependencies: {
54
54
  "@batijs/core": "workspace:*"
@@ -87,8 +87,13 @@ var require_package = __commonJS({
87
87
  import { addDependency, loadAsJson } from "@batijs/core";
88
88
  async function getPackageJson(props) {
89
89
  const packageJson = await loadAsJson(props);
90
- return addDependency(packageJson, await Promise.resolve().then(() => __toESM(require_package(), 1)), {
91
- devDependencies: ["tailwindcss", "postcss", "autoprefixer", ...props.meta.BATI.has("daisyui") ? ["daisyui"] : []]
90
+ return addDependency(packageJson, await Promise.resolve().then(() => __toESM(require_package(), 1)).then((x) => x.default), {
91
+ devDependencies: [
92
+ "tailwindcss",
93
+ "postcss",
94
+ "autoprefixer",
95
+ ...props.meta.BATI.has("daisyui") ? ["daisyui"] : []
96
+ ]
92
97
  });
93
98
  }
94
99
  export {
@@ -3,4 +3,4 @@ export default {
3
3
  tailwindcss: {},
4
4
  autoprefixer: {},
5
5
  },
6
- }
6
+ };
@@ -43,9 +43,9 @@ var require_package = __commonJS({
43
43
  devDependencies: {
44
44
  "@batijs/compile": "workspace:*",
45
45
  "@types/node": "^18.19.14",
46
- telefunc: "^0.1.71",
47
- vike: "^0.4.168",
48
- vite: "^5.2.8"
46
+ telefunc: "^0.1.72",
47
+ vike: "^0.4.171",
48
+ vite: "^5.2.10"
49
49
  },
50
50
  dependencies: {
51
51
  "@batijs/core": "workspace:*"
@@ -66,7 +66,7 @@ var require_package = __commonJS({
66
66
  import { addDependency, loadAsJson } from "@batijs/core";
67
67
  async function getPackageJson(props) {
68
68
  const packageJson = await loadAsJson(props);
69
- return addDependency(packageJson, await Promise.resolve().then(() => __toESM(require_package(), 1)), {
69
+ return addDependency(packageJson, await Promise.resolve().then(() => __toESM(require_package(), 1)).then((x) => x.default), {
70
70
  dependencies: ["telefunc"]
71
71
  });
72
72
  }
@@ -46,7 +46,7 @@ var require_package = __commonJS({
46
46
  "@trpc/client": "^10.45.2",
47
47
  "@trpc/server": "^10.45.2",
48
48
  "@types/node": "^18.19.14",
49
- vite: "^5.2.8"
49
+ vite: "^5.2.10"
50
50
  },
51
51
  dependencies: {
52
52
  "@batijs/core": "workspace:*"
@@ -91,7 +91,7 @@ var require_package = __commonJS({
91
91
  import { addDependency, loadAsJson } from "@batijs/core";
92
92
  async function getPackageJson(props) {
93
93
  const packageJson = await loadAsJson(props);
94
- return addDependency(packageJson, await Promise.resolve().then(() => __toESM(require_package(), 1)), {
94
+ return addDependency(packageJson, await Promise.resolve().then(() => __toESM(require_package(), 1)).then((x) => x.default), {
95
95
  dependencies: ["@trpc/server", "@trpc/client"]
96
96
  });
97
97
  }
@@ -1,5 +1,5 @@
1
1
  import { createTRPCProxyClient, httpBatchLink } from "@trpc/client";
2
- import type { AppRouter } from "./server";
2
+ import type { AppRouter } from "./server.js";
3
3
 
4
4
  export const trpc = createTRPCProxyClient<AppRouter>({
5
5
  links: [
@@ -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,
@@ -44,8 +44,8 @@ var require_package = __commonJS({
44
44
  "@batijs/compile": "workspace:*",
45
45
  "@types/node": "^18.19.14",
46
46
  "@vite-plugin-vercel/vike": "^5.0.3",
47
- vike: "^0.4.168",
48
- vite: "^5.2.8",
47
+ vike: "^0.4.171",
48
+ vite: "^5.2.10",
49
49
  "vite-plugin-vercel": "^5.0.5"
50
50
  },
51
51
  dependencies: {
@@ -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
  }
@@ -44,17 +44,17 @@ var require_package = __commonJS({
44
44
  "@batijs/compile": "workspace:*",
45
45
  "@types/node": "^18.19.14",
46
46
  "@vitejs/plugin-vue": "^5.0.4",
47
- "@vue/compiler-sfc": "^3.4.21",
48
- "@vue/server-renderer": "^3.4.21",
47
+ "@vue/compiler-sfc": "^3.4.23",
48
+ "@vue/server-renderer": "^3.4.23",
49
49
  "cross-fetch": "^4.0.0",
50
50
  "eslint-plugin-vue": "^9.25.0",
51
51
  tailwindcss: "^3.4.3",
52
52
  typescript: "^5.4.5",
53
- "unplugin-vue-markdown": "^0.26.1",
54
- vike: "^0.4.168",
55
- "vike-vue": "^0.6.3",
56
- vite: "^5.2.8",
57
- vue: "^3.4.21",
53
+ "unplugin-vue-markdown": "^0.26.2",
54
+ vike: "^0.4.171",
55
+ "vike-vue": "^0.6.5",
56
+ vite: "^5.2.10",
57
+ vue: "^3.4.23",
58
58
  "vue-gtag": "^2.0.1"
59
59
  },
60
60
  dependencies: {
@@ -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",
@@ -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>