@batijs/cli 0.0.198 → 0.0.199

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.
@@ -0,0 +1,17 @@
1
+ // files/$.eslintrc.json.ts
2
+ import { loadAsJson } from "@batijs/core";
3
+ async function getEslintConfig(props) {
4
+ if (!props.meta.BATI.has("eslint")) return;
5
+ const eslintConfig = await loadAsJson(props);
6
+ eslintConfig.rules ??= {};
7
+ eslintConfig.rules["react/no-unknown-property"] = [
8
+ "error",
9
+ {
10
+ ignore: ["css"]
11
+ }
12
+ ];
13
+ return eslintConfig;
14
+ }
15
+ export {
16
+ getEslintConfig as default
17
+ };
@@ -4,11 +4,11 @@ import { useData } from "vike-react/useData";
4
4
  import { TodoList } from "./TodoList.js";
5
5
 
6
6
  export default function Page() {
7
- const todoItemsInitial = useData<Data>();
7
+ const data = useData<Data>();
8
8
  return (
9
9
  <>
10
10
  <h1>To-do List</h1>
11
- <TodoList initialTodoItems={todoItemsInitial} />
11
+ <TodoList initialTodoItems={data.todo} />
12
12
  </>
13
13
  );
14
14
  }
@@ -3,13 +3,17 @@ import { db } from "@batijs/drizzle/database/db";
3
3
  import { todoTable } from "@batijs/drizzle/database/schema";
4
4
  import { lowDb } from "@batijs/shared-no-db/database/todoItems";
5
5
 
6
- export type Data = { text: string }[];
6
+ export type Data = {
7
+ todo: { text: string }[];
8
+ };
7
9
 
8
10
  export default async function data(): Promise<Data> {
9
11
  if (BATI.has("drizzle")) {
10
- return db.select().from(todoTable).all();
12
+ const todo = db.select().from(todoTable).all();
13
+
14
+ return { todo };
11
15
  } else {
12
16
  lowDb.read();
13
- return lowDb.data.todo;
17
+ return lowDb.data;
14
18
  }
15
19
  }
@@ -1,4 +1,6 @@
1
1
  export type Data = {
2
- text: string;
3
- }[];
2
+ todo: {
3
+ text: string;
4
+ }[];
5
+ };
4
6
  export default function data(): Promise<Data>;
@@ -3,11 +3,11 @@ import { useData } from "vike-solid/useData";
3
3
  import { TodoList } from "./TodoList.js";
4
4
 
5
5
  export default function Page() {
6
- const initialTodoItems = useData<Data>();
6
+ const data = useData<Data>();
7
7
  return (
8
8
  <>
9
9
  <h1>To-do List</h1>
10
- <TodoList initialTodoItems={initialTodoItems} />
10
+ <TodoList initialTodoItems={data.todo} />
11
11
  </>
12
12
  );
13
13
  }
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div>
3
3
  <h1>To-do List</h1>
4
- <TodoList :initial-todo-items="initialTodoItems" />
4
+ <TodoList :initial-todo-items="data.todo" />
5
5
  </div>
6
6
  </template>
7
7
 
@@ -10,5 +10,5 @@ import type { Data } from "@batijs/shared-todo/pages/todo/+data";
10
10
  import { useData } from "vike-vue/useData";
11
11
  import TodoList from "./TodoList.vue";
12
12
 
13
- const initialTodoItems = useData<Data>();
13
+ const data = useData<Data>();
14
14
  </script>
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.198",
1562
+ version: "0.0.199",
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.198",
3
+ "version": "0.0.199",
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.4.5",
22
22
  "vite": "^5.2.12",
23
23
  "which-pm-runs": "^1.1.0",
24
- "@batijs/compile": "0.0.198",
25
- "@batijs/build": "0.0.198"
24
+ "@batijs/compile": "0.0.199",
25
+ "@batijs/build": "0.0.199"
26
26
  },
27
27
  "dependencies": {
28
- "@batijs/core": "0.0.198",
29
- "@batijs/features": "0.0.198"
28
+ "@batijs/core": "0.0.199",
29
+ "@batijs/features": "0.0.199"
30
30
  },
31
31
  "bin": "./dist/index.js",
32
32
  "exports": {