@batijs/cli 0.0.107 → 0.0.110
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.
- package/README.md +29 -0
- package/dist/boilerplates/@batijs/edgedb/files/$package.json.js +70 -1
- package/dist/boilerplates/@batijs/eslint/files/$package.json.js +68 -1
- package/dist/boilerplates/@batijs/express/files/$package.json.js +85 -1
- package/dist/boilerplates/@batijs/express/files/express-entry.ts +19 -0
- package/dist/boilerplates/@batijs/express/types/express-entry.d.ts +1 -0
- package/dist/boilerplates/@batijs/h3/files/$package.json.js +86 -1
- package/dist/boilerplates/@batijs/h3/files/h3-entry.ts +25 -1
- package/dist/boilerplates/@batijs/h3/types/h3-entry.d.ts +1 -0
- package/dist/boilerplates/@batijs/hattip/files/$package.json.js +87 -1
- package/dist/boilerplates/@batijs/hattip/files/hattip-entry.ts +22 -1
- package/dist/boilerplates/@batijs/hattip/types/hattip-entry.d.ts +3 -0
- package/dist/boilerplates/@batijs/prettier/files/$package.json.js +64 -1
- package/dist/boilerplates/@batijs/prisma/files/$package.json.js +65 -1
- package/dist/boilerplates/@batijs/react/files/$package.json.js +162 -2
- package/dist/boilerplates/@batijs/react/files/layouts/LayoutDefault.tsx +2 -1
- package/dist/boilerplates/@batijs/react/types/components/Link.d.ts +4 -0
- package/dist/boilerplates/@batijs/react/types/layouts/HeadDefault.d.ts +1 -0
- package/dist/boilerplates/@batijs/react/types/layouts/LayoutDefault.d.ts +6 -0
- package/dist/boilerplates/@batijs/react/types/pages/+config.h.d.ts +41 -0
- package/dist/boilerplates/@batijs/react/types/pages/_error/+Page.d.ts +4 -0
- package/dist/boilerplates/@batijs/react/types/pages/index/+Page.d.ts +1 -0
- package/dist/boilerplates/@batijs/react/types/pages/index/Counter.d.ts +1 -0
- package/dist/boilerplates/@batijs/react/types/pages/star-wars/@id/+Page.d.ts +4 -0
- package/dist/boilerplates/@batijs/react/types/pages/star-wars/@id/+onBeforeRender.d.ts +10 -0
- package/dist/boilerplates/@batijs/react/types/pages/star-wars/filterMovieData.d.ts +2 -0
- package/dist/boilerplates/@batijs/react/types/pages/star-wars/index/+Page.d.ts +4 -0
- package/dist/boilerplates/@batijs/react/types/pages/star-wars/index/+onBeforeRender.d.ts +9 -0
- package/dist/boilerplates/@batijs/react/types/pages/star-wars/types.d.ts +12 -0
- package/dist/boilerplates/@batijs/react-telefunc/files/pages/todo/+Page.tsx +1 -2
- package/dist/boilerplates/@batijs/react-telefunc/files/pages/todo/+onBeforeRender.ts +1 -1
- package/dist/boilerplates/@batijs/react-telefunc/files/pages/todo/TodoList.telefunc.ts +1 -1
- package/dist/boilerplates/@batijs/react-telefunc/files/pages/todo/TodoList.tsx +1 -2
- package/dist/boilerplates/@batijs/react-telefunc/types/pages/todo/+Page.d.ts +4 -0
- package/dist/boilerplates/@batijs/react-telefunc/types/pages/todo/+config.h.d.ts +4 -0
- package/dist/boilerplates/@batijs/react-telefunc/types/pages/todo/+onBeforeRender.d.ts +7 -0
- package/dist/boilerplates/@batijs/react-telefunc/types/pages/todo/TodoList.d.ts +4 -0
- package/dist/boilerplates/@batijs/react-telefunc/types/pages/todo/TodoList.telefunc.d.ts +4 -0
- package/dist/boilerplates/@batijs/react-trpc/files/pages/todo-trpc/+Page.tsx +25 -0
- package/dist/boilerplates/@batijs/react-trpc/files/pages/todo-trpc/+config.h.ts +5 -0
- package/dist/boilerplates/@batijs/react-trpc/files/pages/todo-trpc/+onBeforeRender.ts +13 -0
- package/dist/boilerplates/@batijs/react-trpc/files/pages/todo-trpc/TodoList.tsx +30 -0
- package/dist/boilerplates/@batijs/react-trpc/types/pages/todo-trpc/+Page.d.ts +4 -0
- package/dist/boilerplates/@batijs/react-trpc/types/pages/todo-trpc/+config.h.d.ts +4 -0
- package/dist/boilerplates/@batijs/react-trpc/types/pages/todo-trpc/+onBeforeRender.d.ts +7 -0
- package/dist/boilerplates/@batijs/react-trpc/types/pages/todo-trpc/TodoList.d.ts +4 -0
- package/dist/boilerplates/@batijs/shared/files/$index.html.js +2 -6
- package/dist/boilerplates/@batijs/shared/types/vite.config.d.ts +2 -0
- package/dist/boilerplates/@batijs/shared-db/types/database/todoItems.d.ts +6 -0
- package/dist/boilerplates/@batijs/solid/files/$package.json.js +168 -2
- package/dist/boilerplates/@batijs/solid/files/layouts/LayoutDefault.tsx +2 -1
- package/dist/boilerplates/@batijs/solid/types/components/Link.d.ts +4 -0
- package/dist/boilerplates/@batijs/solid/types/layouts/HeadDefault.d.ts +1 -0
- package/dist/boilerplates/@batijs/solid/types/layouts/LayoutDefault.d.ts +6 -0
- package/dist/boilerplates/@batijs/solid/types/pages/+config.h.d.ts +40 -0
- package/dist/boilerplates/@batijs/solid/types/pages/_error/+Page.d.ts +4 -0
- package/dist/boilerplates/@batijs/solid/types/pages/index/+Page.d.ts +1 -0
- package/dist/boilerplates/@batijs/solid/types/pages/index/Counter.d.ts +2 -0
- package/dist/boilerplates/@batijs/solid/types/pages/star-wars/@id/+Page.d.ts +4 -0
- package/dist/boilerplates/@batijs/solid/types/pages/star-wars/@id/+onBeforeRender.d.ts +11 -0
- package/dist/boilerplates/@batijs/solid/types/pages/star-wars/filterMovieData.d.ts +3 -0
- package/dist/boilerplates/@batijs/solid/types/pages/star-wars/index/+Page.d.ts +4 -0
- package/dist/boilerplates/@batijs/solid/types/pages/star-wars/index/+onBeforePrerenderStart.d.ts +18 -0
- package/dist/boilerplates/@batijs/solid/types/pages/star-wars/index/+onBeforeRender.d.ts +10 -0
- package/dist/boilerplates/@batijs/solid/types/pages/star-wars/index/getStarWarsMovies.d.ts +7 -0
- package/dist/boilerplates/@batijs/solid/types/pages/star-wars/types.d.ts +12 -0
- package/dist/boilerplates/@batijs/solid-telefunc/files/pages/todo/+Page.tsx +1 -1
- package/dist/boilerplates/@batijs/solid-telefunc/files/pages/todo/+onBeforeRender.ts +2 -2
- package/dist/boilerplates/@batijs/solid-telefunc/files/pages/todo/TodoList.telefunc.ts +2 -2
- package/dist/boilerplates/@batijs/solid-telefunc/files/pages/todo/TodoList.tsx +1 -1
- package/dist/boilerplates/@batijs/solid-telefunc/types/pages/todo/+Page.d.ts +4 -0
- package/dist/boilerplates/@batijs/solid-telefunc/types/pages/todo/+config.h.d.ts +4 -0
- package/dist/boilerplates/@batijs/solid-telefunc/types/pages/todo/+onBeforeRender.d.ts +8 -0
- package/dist/boilerplates/@batijs/solid-telefunc/types/pages/todo/TodoList.d.ts +4 -0
- package/dist/boilerplates/@batijs/solid-telefunc/types/pages/todo/TodoList.telefunc.d.ts +5 -0
- package/dist/boilerplates/@batijs/solid-trpc/files/pages/todo-trpc/+Page.tsx +25 -0
- package/dist/boilerplates/@batijs/solid-trpc/files/pages/todo-trpc/+config.h.ts +3 -0
- package/dist/boilerplates/@batijs/solid-trpc/files/pages/todo-trpc/+onBeforeRender.ts +15 -0
- package/dist/boilerplates/@batijs/solid-trpc/files/pages/todo-trpc/TodoList.tsx +28 -0
- package/dist/boilerplates/@batijs/solid-trpc/types/pages/todo-trpc/+Page.d.ts +4 -0
- package/dist/boilerplates/@batijs/solid-trpc/types/pages/todo-trpc/+config.h.d.ts +4 -0
- package/dist/boilerplates/@batijs/solid-trpc/types/pages/todo-trpc/+onBeforeRender.d.ts +8 -0
- package/dist/boilerplates/@batijs/solid-trpc/types/pages/todo-trpc/TodoList.d.ts +4 -0
- package/dist/boilerplates/@batijs/tailwindcss/files/$package.json.js +85 -1
- package/dist/boilerplates/@batijs/tailwindcss/types/postcss.config.d.ts +7 -0
- package/dist/boilerplates/@batijs/tailwindcss/types/tailwind.config.d.ts +2 -0
- package/dist/boilerplates/@batijs/telefunc/files/$package.json.js +65 -1
- package/dist/boilerplates/@batijs/trpc/files/$package.json.js +100 -0
- package/dist/boilerplates/@batijs/trpc/files/$vite.config.ts.js +13 -0
- package/dist/boilerplates/@batijs/trpc/files/trpc/client.ts +10 -0
- package/dist/boilerplates/@batijs/trpc/files/trpc/server.ts +34 -0
- package/dist/boilerplates/@batijs/trpc/files/trpc/vite-plugin.ts +49 -0
- package/dist/boilerplates/@batijs/trpc/types/trpc/client.d.ts +38 -0
- package/dist/boilerplates/@batijs/trpc/types/trpc/server.d.ts +64 -0
- package/dist/boilerplates/@batijs/trpc/types/trpc/vite-plugin.d.ts +12 -0
- package/dist/boilerplates/@batijs/vercel/files/$package.json.js +66 -1
- package/dist/boilerplates/@batijs/vue/files/$package.json.js +111 -2
- package/dist/boilerplates/@batijs/vue/files/layouts/LayoutDefault.vue +5 -1
- package/dist/boilerplates/@batijs/vue/types/pages/+config.h.d.ts +43 -0
- package/dist/boilerplates/@batijs/vue/types/pages/star-wars/@id/+onBeforeRender.d.ts +11 -0
- package/dist/boilerplates/@batijs/vue/types/pages/star-wars/filterMovieData.d.ts +3 -0
- package/dist/boilerplates/@batijs/vue/types/pages/star-wars/index/+onBeforeRender.d.ts +10 -0
- package/dist/boilerplates/@batijs/vue/types/pages/star-wars/types.d.ts +12 -0
- package/dist/boilerplates/@batijs/vue-telefunc/files/components/TodoList.telefunc.ts +2 -2
- package/dist/boilerplates/@batijs/vue-telefunc/files/components/TodoList.vue +5 -13
- package/dist/boilerplates/@batijs/vue-telefunc/files/pages/todo/+Page.vue +2 -3
- package/dist/boilerplates/@batijs/vue-telefunc/files/pages/todo/+onBeforeRender.ts +2 -2
- package/dist/boilerplates/@batijs/vue-telefunc/types/components/TodoList.telefunc.d.ts +5 -0
- package/dist/boilerplates/@batijs/vue-telefunc/types/pages/todo/+config.h.d.ts +4 -0
- package/dist/boilerplates/@batijs/vue-telefunc/types/pages/todo/+onBeforeRender.d.ts +8 -0
- package/dist/boilerplates/@batijs/vue-trpc/files/components/TodoListTrpc.vue +29 -0
- package/dist/boilerplates/@batijs/vue-trpc/files/pages/todo-trpc/+Page.vue +19 -0
- package/dist/boilerplates/@batijs/vue-trpc/files/pages/todo-trpc/+config.h.ts +3 -0
- package/dist/boilerplates/@batijs/vue-trpc/files/pages/todo-trpc/+onBeforeRender.ts +15 -0
- package/dist/boilerplates/@batijs/vue-trpc/types/pages/todo-trpc/+config.h.d.ts +4 -0
- package/dist/boilerplates/@batijs/vue-trpc/types/pages/todo-trpc/+onBeforeRender.d.ts +8 -0
- package/dist/boilerplates/boilerplates.json +75 -0
- package/dist/{chunk-chunk-HOVHXSZ5.js → chunk-P3F3WO2D.js} +1 -1
- package/dist/index.js +4 -4
- package/dist/{chunk-prompt-LPA56PA5.js → prompt-QGA753QE.js} +1 -1
- package/package.json +5 -5
- package/dist/boilerplates/@batijs/edgedb/package-BD3G47NI.js +0 -64
- package/dist/boilerplates/@batijs/eslint/package-L5KZG4F3.js +0 -62
- package/dist/boilerplates/@batijs/express/package-KV3NAHNP.js +0 -69
- package/dist/boilerplates/@batijs/h3/package-TUTMSCQF.js +0 -70
- package/dist/boilerplates/@batijs/hattip/package-VKEJY76G.js +0 -69
- package/dist/boilerplates/@batijs/prettier/package-MCK4YCPP.js +0 -62
- package/dist/boilerplates/@batijs/prisma/package-JDCZNZLS.js +0 -63
- package/dist/boilerplates/@batijs/react/package-O2DZQ5DB.js +0 -75
- package/dist/boilerplates/@batijs/react-telefunc/files/database/todoItems.ts +0 -9
- package/dist/boilerplates/@batijs/solid/package-2AEIPM6V.js +0 -69
- package/dist/boilerplates/@batijs/tailwindcss/package-CMMRUVWD.js +0 -65
- package/dist/boilerplates/@batijs/telefunc/package-NGJ3M2KO.js +0 -63
- package/dist/boilerplates/@batijs/vercel/package-QY45OGDN.js +0 -64
- package/dist/boilerplates/@batijs/vue/package-7RHEEZZN.js +0 -72
- package/dist/boilerplates/@batijs/vue-telefunc/files/database/todoItems.ts +0 -12
- package/dist/boilerplates/@batijs/{solid-telefunc → shared-db}/files/database/todoItems.ts +3 -3
|
@@ -1,3 +1,112 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
8
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
19
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
20
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
21
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
22
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
23
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
24
|
+
mod
|
|
25
|
+
));
|
|
26
|
+
|
|
27
|
+
// package.json
|
|
28
|
+
var require_package = __commonJS({
|
|
29
|
+
"package.json"(exports, module) {
|
|
30
|
+
module.exports = {
|
|
31
|
+
name: "@batijs/vue",
|
|
32
|
+
private: true,
|
|
33
|
+
version: "0.0.92",
|
|
34
|
+
description: "",
|
|
35
|
+
type: "module",
|
|
36
|
+
scripts: {
|
|
37
|
+
"check-types": "tsc --noEmit",
|
|
38
|
+
build: "bati-compile-boilerplate"
|
|
39
|
+
},
|
|
40
|
+
keywords: [],
|
|
41
|
+
author: "",
|
|
42
|
+
license: "MIT",
|
|
43
|
+
devDependencies: {
|
|
44
|
+
"@batijs/compile": "workspace:*",
|
|
45
|
+
"@types/node": "^16.18.40",
|
|
46
|
+
"@vitejs/plugin-vue": "^4.4.0",
|
|
47
|
+
"@vue/compiler-sfc": "^3.3.7",
|
|
48
|
+
"@vue/server-renderer": "^3.3.7",
|
|
49
|
+
"cross-fetch": "^4.0.0",
|
|
50
|
+
"eslint-plugin-vue": "^9.18.1",
|
|
51
|
+
tailwindcss: "^3.3.5",
|
|
52
|
+
typescript: "^5.2.2",
|
|
53
|
+
"unplugin-vue-markdown": "^0.24.3",
|
|
54
|
+
vike: "^0.4.144",
|
|
55
|
+
"vike-vue": "^0.4.0",
|
|
56
|
+
vite: "^4.5.0",
|
|
57
|
+
vue: "^3.3.7"
|
|
58
|
+
},
|
|
59
|
+
dependencies: {
|
|
60
|
+
"@batijs/core": "workspace:*"
|
|
61
|
+
},
|
|
62
|
+
files: [
|
|
63
|
+
"dist/"
|
|
64
|
+
],
|
|
65
|
+
bati: {
|
|
66
|
+
if: {
|
|
67
|
+
flag: "vue"
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
exports: {
|
|
71
|
+
"./pages/+config.h": {
|
|
72
|
+
types: "./dist/types/pages/+config.h.d.ts"
|
|
73
|
+
},
|
|
74
|
+
"./pages/star-wars/types": {
|
|
75
|
+
types: "./dist/types/pages/star-wars/types.d.ts"
|
|
76
|
+
},
|
|
77
|
+
"./pages/star-wars/filterMovieData": {
|
|
78
|
+
types: "./dist/types/pages/star-wars/filterMovieData.d.ts"
|
|
79
|
+
},
|
|
80
|
+
"./pages/star-wars/@id/+onBeforeRender": {
|
|
81
|
+
types: "./dist/types/pages/star-wars/@id/+onBeforeRender.d.ts"
|
|
82
|
+
},
|
|
83
|
+
"./pages/star-wars/index/+onBeforeRender": {
|
|
84
|
+
types: "./dist/types/pages/star-wars/index/+onBeforeRender.d.ts"
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
typesVersions: {
|
|
88
|
+
"*": {
|
|
89
|
+
"pages/+config.h": [
|
|
90
|
+
"./dist/types/pages/+config.h.d.ts"
|
|
91
|
+
],
|
|
92
|
+
"pages/star-wars/types": [
|
|
93
|
+
"./dist/types/pages/star-wars/types.d.ts"
|
|
94
|
+
],
|
|
95
|
+
"pages/star-wars/filterMovieData": [
|
|
96
|
+
"./dist/types/pages/star-wars/filterMovieData.d.ts"
|
|
97
|
+
],
|
|
98
|
+
"pages/star-wars/@id/+onBeforeRender": [
|
|
99
|
+
"./dist/types/pages/star-wars/@id/+onBeforeRender.d.ts"
|
|
100
|
+
],
|
|
101
|
+
"pages/star-wars/index/+onBeforeRender": [
|
|
102
|
+
"./dist/types/pages/star-wars/index/+onBeforeRender.d.ts"
|
|
103
|
+
]
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
|
|
1
110
|
// files/$package.json.ts
|
|
2
111
|
import { addDependency, loadAsJson, setScripts } from "@batijs/core";
|
|
3
112
|
async function getPackageJson(props) {
|
|
@@ -9,11 +118,11 @@ async function getPackageJson(props) {
|
|
|
9
118
|
precedence: 20
|
|
10
119
|
}
|
|
11
120
|
});
|
|
12
|
-
addDependency(packageJson, await
|
|
121
|
+
addDependency(packageJson, await Promise.resolve().then(() => __toESM(require_package(), 1)), {
|
|
13
122
|
devDependencies: ["eslint-plugin-vue"]
|
|
14
123
|
});
|
|
15
124
|
}
|
|
16
|
-
return addDependency(packageJson, await
|
|
125
|
+
return addDependency(packageJson, await Promise.resolve().then(() => __toESM(require_package(), 1)), {
|
|
17
126
|
devDependencies: ["vite"],
|
|
18
127
|
dependencies: [
|
|
19
128
|
"@vitejs/plugin-vue",
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import Layout from "../layouts/LayoutDefault.vue";
|
|
2
|
+
declare const _default: {
|
|
3
|
+
Layout: typeof Layout;
|
|
4
|
+
Head: typeof Layout;
|
|
5
|
+
title: string;
|
|
6
|
+
description: string;
|
|
7
|
+
favicon: string;
|
|
8
|
+
extends: {
|
|
9
|
+
onRenderHtml: "import:vike-vue/renderer/onRenderHtml";
|
|
10
|
+
onRenderClient: "import:vike-vue/renderer/onRenderClient";
|
|
11
|
+
passToClient: string[];
|
|
12
|
+
clientRouting: true;
|
|
13
|
+
hydrationCanBeAborted: true;
|
|
14
|
+
meta: {
|
|
15
|
+
Head: {
|
|
16
|
+
env: "server-only";
|
|
17
|
+
};
|
|
18
|
+
Layout: {
|
|
19
|
+
env: "server-and-client";
|
|
20
|
+
};
|
|
21
|
+
title: {
|
|
22
|
+
env: "server-and-client";
|
|
23
|
+
};
|
|
24
|
+
description: {
|
|
25
|
+
env: "server-only";
|
|
26
|
+
};
|
|
27
|
+
favicon: {
|
|
28
|
+
env: "server-only";
|
|
29
|
+
};
|
|
30
|
+
lang: {
|
|
31
|
+
env: "server-only";
|
|
32
|
+
};
|
|
33
|
+
ssr: {
|
|
34
|
+
env: "config-only";
|
|
35
|
+
effect: import("vike/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/configDefinitionsBuiltIn").ConfigEffect;
|
|
36
|
+
};
|
|
37
|
+
vuePlugins: {
|
|
38
|
+
env: "server-and-client";
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export default onBeforeRender;
|
|
2
|
+
import type { PageContextBuiltInServer } from "vike/types";
|
|
3
|
+
import type { MovieDetails } from "../types";
|
|
4
|
+
declare function onBeforeRender(pageContext: PageContextBuiltInServer): Promise<{
|
|
5
|
+
pageContext: {
|
|
6
|
+
pageProps: {
|
|
7
|
+
movie: MovieDetails;
|
|
8
|
+
};
|
|
9
|
+
title: string;
|
|
10
|
+
};
|
|
11
|
+
}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { todoItems, type TodoItem } from "@batijs/shared-db/database/todoItems";
|
|
2
2
|
|
|
3
|
-
|
|
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
|
-
|
|
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
|
|
19
|
+
const attrs = useAttrs();
|
|
28
20
|
|
|
29
|
-
const todoItems = ref(
|
|
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
|
-
|
|
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,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,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
|
+
}
|
|
@@ -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("./
|
|
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-
|
|
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.
|
|
576
|
+
version: "0.0.110",
|
|
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/
|
|
591
|
+
"@batijs/compile": "workspace:*",
|
|
592
592
|
"@types/node": "^16.18.40",
|
|
593
593
|
"@types/which": "^3.0.1",
|
|
594
594
|
citty: "^0.1.4",
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
colors,
|
|
4
4
|
getDefaultExportFromCjs,
|
|
5
5
|
isUnicodeSupported
|
|
6
|
-
} from "./chunk-
|
|
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.
|
|
3
|
+
"version": "0.0.110",
|
|
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/
|
|
23
|
-
"@batijs/
|
|
22
|
+
"@batijs/build": "0.0.110",
|
|
23
|
+
"@batijs/compile": "0.0.110"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@batijs/core": "0.0.
|
|
27
|
-
"@batijs/features": "0.0.
|
|
26
|
+
"@batijs/core": "0.0.110",
|
|
27
|
+
"@batijs/features": "0.0.110"
|
|
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
|
-
};
|