@batijs/cli 0.0.213 → 0.0.214

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.
@@ -18,7 +18,7 @@ nodeApp.use(
18
18
  }),
19
19
  );
20
20
 
21
- nodeApp.mount("/", app.fetch);
21
+ nodeApp.route("/", app);
22
22
 
23
23
  const port = envs.PORT ? parseInt(envs.PORT, 10) : 3000;
24
24
 
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <h1>Star Wars Movies</h1>
3
3
  <ol>
4
- <li v-for="item in movies" :key="item.id">
4
+ <li v-for="item in movies.data" :key="item.id">
5
5
  <a :href="'/star-wars/' + item.id">{{ item.title }}</a> ({{ item.release_date }})
6
6
  </li>
7
7
  </ol>
@@ -11,7 +11,7 @@ export const data = async () => {
11
11
  // We remove data we don't need because the data is passed to the client; we should
12
12
  // minimize what is sent over the network.
13
13
  const movies = minimize(moviesData);
14
- return movies;
14
+ return { data: movies };
15
15
  };
16
16
 
17
17
  function minimize(movies: MovieDetails[]): Movie[] {
@@ -2,6 +2,6 @@ import type { PageContext } from "vike/types";
2
2
  import type { Data } from "./+data.js";
3
3
 
4
4
  export function title(pageContext: PageContext<Data>) {
5
- const movies = pageContext.data;
5
+ const movies = pageContext.data.data;
6
6
  return `${movies.length} Star Wars Movies`;
7
7
  }
@@ -1,3 +1,5 @@
1
1
  import type { Movie } from "../types.js";
2
2
  export type Data = Awaited<ReturnType<typeof data>>;
3
- export declare const data: () => Promise<Movie[]>;
3
+ export declare const data: () => Promise<{
4
+ data: Movie[];
5
+ }>;
package/dist/index.js CHANGED
@@ -1559,7 +1559,7 @@ var import_which_pm_runs = __toESM(require_which_pm_runs(), 1);
1559
1559
  // package.json
1560
1560
  var package_default = {
1561
1561
  name: "@batijs/cli",
1562
- version: "0.0.213",
1562
+ version: "0.0.214",
1563
1563
  type: "module",
1564
1564
  scripts: {
1565
1565
  "check-types": "tsc --noEmit",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@batijs/cli",
3
- "version": "0.0.213",
3
+ "version": "0.0.214",
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",
@@ -21,12 +21,12 @@
21
21
  "typescript": "^5.5.2",
22
22
  "vite": "^5.3.2",
23
23
  "which-pm-runs": "^1.1.0",
24
- "@batijs/build": "0.0.213",
25
- "@batijs/compile": "0.0.213"
24
+ "@batijs/compile": "0.0.214",
25
+ "@batijs/build": "0.0.214"
26
26
  },
27
27
  "dependencies": {
28
- "@batijs/core": "0.0.213",
29
- "@batijs/features": "0.0.213"
28
+ "@batijs/core": "0.0.214",
29
+ "@batijs/features": "0.0.214"
30
30
  },
31
31
  "bin": "./dist/index.js",
32
32
  "exports": {