@batijs/cli 0.0.152 → 0.0.154

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 (34) hide show
  1. package/dist/boilerplates/@batijs/compiled/files/$package.json.js +2 -2
  2. package/dist/boilerplates/@batijs/edgedb/files/$README.md.js +24 -0
  3. package/dist/boilerplates/@batijs/edgedb/files/$package.json.js +2 -2
  4. package/dist/boilerplates/@batijs/eslint/files/$package.json.js +2 -2
  5. package/dist/boilerplates/@batijs/express/files/$package.json.js +2 -2
  6. package/dist/boilerplates/@batijs/h3/files/$package.json.js +3 -3
  7. package/dist/boilerplates/@batijs/hattip/files/$package.json.js +2 -2
  8. package/dist/boilerplates/@batijs/prettier/files/$package.json.js +1 -1
  9. package/dist/boilerplates/@batijs/prisma/files/$README.md.js +19 -0
  10. package/dist/boilerplates/@batijs/prisma/files/$package.json.js +3 -3
  11. package/dist/boilerplates/@batijs/react/files/$README.md.js +37 -0
  12. package/dist/boilerplates/@batijs/react/files/$package.json.js +3 -3
  13. package/dist/boilerplates/@batijs/react/files/pages/+config.h.ts +1 -1
  14. package/dist/boilerplates/@batijs/react/types/pages/+config.h.d.ts +1 -1
  15. package/dist/boilerplates/@batijs/shared/files/$README.md.js +12 -0
  16. package/dist/boilerplates/@batijs/solid/files/$README.md.js +37 -0
  17. package/dist/boilerplates/@batijs/solid/files/$package.json.js +2 -2
  18. package/dist/boilerplates/@batijs/solid/files/pages/+config.h.ts +1 -1
  19. package/dist/boilerplates/@batijs/solid/types/pages/+config.h.d.ts +2 -48
  20. package/dist/boilerplates/@batijs/tailwindcss/files/$package.json.js +2 -2
  21. package/dist/boilerplates/@batijs/telefunc/files/$package.json.js +1 -1
  22. package/dist/boilerplates/@batijs/trpc/files/$package.json.js +1 -1
  23. package/dist/boilerplates/@batijs/vercel/files/$package.json.js +3 -3
  24. package/dist/boilerplates/@batijs/vue/files/$README.md.js +37 -0
  25. package/dist/boilerplates/@batijs/vue/files/$package.json.js +4 -4
  26. package/dist/boilerplates/@batijs/vue/files/pages/+config.h.ts +1 -1
  27. package/dist/boilerplates/@batijs/vue/files/pages/+onCreateApp.ts +1 -1
  28. package/dist/boilerplates/@batijs/vue/types/pages/+config.h.d.ts +2 -78
  29. package/dist/boilerplates/@batijs/vue/types/pages/+onCreateApp.d.ts +1 -1
  30. package/dist/boilerplates/boilerplates.json +2 -4
  31. package/dist/index.js +15 -12
  32. package/package.json +8 -8
  33. package/dist/boilerplates/@batijs/edgedb/hooks/cli.js +0 -138
  34. package/dist/boilerplates/@batijs/prisma/hooks/cli.js +0 -137
@@ -42,9 +42,9 @@ var require_package = __commonJS({
42
42
  license: "MIT",
43
43
  devDependencies: {
44
44
  "@batijs/compile": "workspace:*",
45
- "@types/node": "^18.19.3",
45
+ "@types/node": "^18.19.14",
46
46
  vite: "^5.0.12",
47
- "vite-plugin-compiled-react": "^1.1.1"
47
+ "vite-plugin-compiled-react": "^1.1.3"
48
48
  },
49
49
  dependencies: {
50
50
  "@batijs/core": "workspace:*",
@@ -0,0 +1,24 @@
1
+ // files/$README.md.ts
2
+ import { loadReadme } from "@batijs/core";
3
+ async function getReadme(props) {
4
+ const content = await loadReadme(props);
5
+ const todo = `
6
+ ## *EdgeDB*
7
+ ### Setup
8
+ If [EdgeDB CLI](https://www.edgedb.com/docs/cli/index) is not yet installed, execute the following command:
9
+ \`\`\`sh
10
+ curl --proto '=https' --tlsv1.2 -sSf https://sh.edgedb.com | sh
11
+ \`\`\`
12
+
13
+ Once the CLI is installed, you can initialize a project:
14
+ \`\`\`sh
15
+ edgedb project init
16
+ \`\`\`
17
+
18
+ Then follow instructions at <https://www.edgedb.com/docs/intro/quickstart#set-up-your-schema>`;
19
+ content.addTodo(todo);
20
+ return content.finalize();
21
+ }
22
+ export {
23
+ getReadme as default
24
+ };
@@ -43,8 +43,8 @@ var require_package = __commonJS({
43
43
  devDependencies: {
44
44
  "@batijs/compile": "workspace:*",
45
45
  "@edgedb/generate": "^0.4.1",
46
- "@prisma/client": "^5.8.1",
47
- "@types/node": "^18.19.3",
46
+ "@prisma/client": "^5.9.1",
47
+ "@types/node": "^18.19.14",
48
48
  colorette: "^2.0.20",
49
49
  edgedb: "^1.4.1"
50
50
  },
@@ -42,8 +42,8 @@ var require_package = __commonJS({
42
42
  },
43
43
  devDependencies: {
44
44
  "@batijs/compile": "workspace:^",
45
- "@typescript-eslint/eslint-plugin": "^6.19.1",
46
- "@typescript-eslint/parser": "^6.19.1",
45
+ "@typescript-eslint/eslint-plugin": "^6.20.0",
46
+ "@typescript-eslint/parser": "^6.20.0",
47
47
  eslint: "^8.56.0"
48
48
  },
49
49
  dependencies: {
@@ -41,13 +41,13 @@ var require_package = __commonJS({
41
41
  author: "",
42
42
  license: "MIT",
43
43
  devDependencies: {
44
- "@auth/core": "^0.22.0",
44
+ "@auth/core": "^0.25.0",
45
45
  "@batijs/compile": "workspace:*",
46
46
  "@batijs/trpc": "workspace:*",
47
47
  "@hattip/adapter-node": "^0.0.41",
48
48
  "@trpc/server": "^10.45.0",
49
49
  "@types/express": "^4.17.21",
50
- "@types/node": "^18.19.3",
50
+ "@types/node": "^18.19.14",
51
51
  express: "^4.18.2",
52
52
  telefunc: "^0.1.70",
53
53
  tsx: "^4.7.0",
@@ -41,14 +41,14 @@ var require_package = __commonJS({
41
41
  author: "",
42
42
  license: "MIT",
43
43
  devDependencies: {
44
- "@auth/core": "^0.22.0",
44
+ "@auth/core": "^0.25.0",
45
45
  "@batijs/compile": "workspace:*",
46
46
  "@batijs/trpc": "workspace:^",
47
47
  "@hattip/polyfills": "^0.0.41",
48
48
  "@trpc/server": "^10.45.0",
49
- "@types/node": "^18.19.3",
49
+ "@types/node": "^18.19.14",
50
50
  "@types/serve-static": "^1.15.5",
51
- h3: "~1.9.0",
51
+ h3: "~1.10.1",
52
52
  "serve-static": "^1.15.0",
53
53
  telefunc: "^0.1.70",
54
54
  tsx: "^4.7.0",
@@ -41,7 +41,7 @@ var require_package = __commonJS({
41
41
  author: "",
42
42
  license: "MIT",
43
43
  devDependencies: {
44
- "@auth/core": "^0.22.0",
44
+ "@auth/core": "^0.25.0",
45
45
  "@batijs/compile": "workspace:*",
46
46
  "@batijs/trpc": "workspace:^",
47
47
  "@hattip/adapter-node": "^0.0.41",
@@ -49,7 +49,7 @@ var require_package = __commonJS({
49
49
  "@hattip/router": "^0.0.41",
50
50
  "@hattip/vite": "^0.0.41",
51
51
  "@trpc/server": "^10.45.0",
52
- "@types/node": "^18.19.3",
52
+ "@types/node": "^18.19.14",
53
53
  hattip: "^0.0.33",
54
54
  telefunc: "^0.1.70",
55
55
  vike: "^0.4.160",
@@ -42,7 +42,7 @@ var require_package = __commonJS({
42
42
  license: "MIT",
43
43
  devDependencies: {
44
44
  "@batijs/compile": "workspace:*",
45
- "@types/node": "^18.19.3",
45
+ "@types/node": "^18.19.14",
46
46
  "eslint-config-prettier": "^9.1.0",
47
47
  prettier: "^3.2.4"
48
48
  },
@@ -0,0 +1,19 @@
1
+ // files/$README.md.ts
2
+ import { loadReadme } from "@batijs/core";
3
+ async function getReadme(props) {
4
+ const content = await loadReadme(props);
5
+ const todo = `
6
+ ## *Prisma*
7
+ ### Setup
8
+ Run the following command once:
9
+ \`\`\`sh
10
+ pnpx prisma init
11
+ \`\`\`
12
+
13
+ then follow instructions at <https://www.prisma.io/docs/getting-started/quickstart#2-model-your-data-in-the-prisma-schema>`;
14
+ content.addTodo(todo);
15
+ return content.finalize();
16
+ }
17
+ export {
18
+ getReadme as default
19
+ };
@@ -42,10 +42,10 @@ var require_package = __commonJS({
42
42
  license: "MIT",
43
43
  devDependencies: {
44
44
  "@batijs/compile": "workspace:*",
45
- "@prisma/client": "^5.8.1",
46
- "@types/node": "^18.19.3",
45
+ "@prisma/client": "^5.9.1",
46
+ "@types/node": "^18.19.14",
47
47
  colorette: "^2.0.20",
48
- prisma: "^5.8.1"
48
+ prisma: "^5.9.1"
49
49
  },
50
50
  dependencies: {
51
51
  "@batijs/core": "workspace:*"
@@ -0,0 +1,37 @@
1
+ // files/$README.md.ts
2
+ import { loadReadme } from "@batijs/core";
3
+ async function getReadme(props) {
4
+ const content = await loadReadme(props);
5
+ const about = `
6
+ This app is ready to start. It's powered by [Vike](https://vike.dev) and [React](https://react.dev/learn).
7
+
8
+ ### \`/pages/+config.h.ts\`
9
+ Such files are [the interface](https://vike.dev/config) between Vike and your code. It defines:
10
+ - A default [\`<Layout>\` component](https://vike.dev/Layout) (that wraps your [\`<Page>\` components](https://vike.dev/Page)).
11
+ - A default [\`title\`](https://vike.dev/head).
12
+ - Default [\`<head>\` tags](https://vike.dev/head).
13
+
14
+ ### Routing
15
+ [Vike's built-in router](https://vike.dev/routing) lets you choose between:
16
+ - [Filesystem Routing](https://vike.dev/filesystem-routing) (the URL of a page is determined based on where its \`+Page.jsx\` file is located on the filesystem)
17
+ - [Route Strings](https://vike.dev/route-string)
18
+ - [Route Functions](https://vike.dev/route-function)
19
+
20
+ ### \`/pages/_error/+Page.jsx\`
21
+ The [error page](https://vike.dev/error-page) which is rendered when errors occur.
22
+
23
+ ### \`/pages/+onPageTransitionStart.ts\` and \`/pages/+onPageTransitionEnd.ts\`
24
+ The [\`onPageTransitionStart()\` hook](https://vike.dev/onPageTransitionStart), together with [\`onPageTransitionEnd()\`](https://vike.dev/onPageTransitionEnd), enables you to implement page transition animations.
25
+
26
+ ### SSR
27
+ SSR is enabled by default. You can [disable it](https://vike.dev/ssr) for all your pages or only for some pages.
28
+
29
+ ### HTML Streaming
30
+ You can enable/disable [HTML streaming](https://vike.dev/streaming) for all your pages, or only for some pages while still using it for others.
31
+ `;
32
+ content.addAbout(about);
33
+ return content.finalize();
34
+ }
35
+ export {
36
+ getReadme as default
37
+ };
@@ -41,12 +41,12 @@ var require_package = __commonJS({
41
41
  author: "",
42
42
  license: "MIT",
43
43
  devDependencies: {
44
- "@babel/core": "^7.23.7",
44
+ "@babel/core": "^7.23.9",
45
45
  "@babel/plugin-syntax-flow": "^7.23.3",
46
46
  "@babel/plugin-transform-react-jsx": "^7.23.4",
47
47
  "@batijs/compile": "workspace:*",
48
- "@types/node": "^18.19.3",
49
- "@types/react": "^18.2.48",
48
+ "@types/node": "^18.19.14",
49
+ "@types/react": "^18.2.51",
50
50
  "@types/react-dom": "^18.2.18",
51
51
  "@vitejs/plugin-react": "^4.2.1",
52
52
  "cross-fetch": "^4.0.0",
@@ -1,4 +1,4 @@
1
- import vikeReact from "vike-react";
1
+ import vikeReact from "vike-react/config";
2
2
  import type { Config } from "vike/types";
3
3
  import Head from "../layouts/HeadDefault";
4
4
  import Layout from "../layouts/LayoutDefault";
@@ -1,4 +1,4 @@
1
- import vikeReact from "vike-react";
1
+ import vikeReact from "vike-react/config";
2
2
  import Head from "../layouts/HeadDefault";
3
3
  import Layout from "../layouts/LayoutDefault";
4
4
  declare const _default: {
@@ -0,0 +1,12 @@
1
+ // files/$README.md.ts
2
+ import { loadReadme } from "@batijs/core";
3
+ async function getReadme(props) {
4
+ const content = await loadReadme(props);
5
+ const flags = Array.from(props.meta.BATI).map((f) => `--${f}`).join(" ");
6
+ const intro = `This app has been created with [Bati](https://batijs.github.io) using the following flags: \`${flags}\``;
7
+ content.addIntro(intro);
8
+ return content.finalize();
9
+ }
10
+ export {
11
+ getReadme as default
12
+ };
@@ -0,0 +1,37 @@
1
+ // files/$README.md.ts
2
+ import { loadReadme } from "@batijs/core";
3
+ async function getReadme(props) {
4
+ const content = await loadReadme(props);
5
+ const about = `
6
+ This app is ready to start. It's powered by [Vike](https://vike.dev) and [SolidJS](https://www.solidjs.com/guides/getting-started).
7
+
8
+ ### \`/pages/+config.h.ts\`
9
+ Such files are [the interface](https://vike.dev/config) between Vike and your code. It defines:
10
+ - A default [\`<Layout>\` component](https://vike.dev/Layout) (that wraps your [\`<Page>\` components](https://vike.dev/Page)).
11
+ - A default [\`title\`](https://vike.dev/head).
12
+ - Default [\`<head>\` tags](https://vike.dev/head).
13
+
14
+ ### Routing
15
+ [Vike's built-in router](https://vike.dev/routing) lets you choose between:
16
+ - [Filesystem Routing](https://vike.dev/filesystem-routing) (the URL of a page is determined based on where its \`+Page.jsx\` file is located on the filesystem)
17
+ - [Route Strings](https://vike.dev/route-string)
18
+ - [Route Functions](https://vike.dev/route-function)
19
+
20
+ ### \`/pages/_error/+Page.jsx\`
21
+ The [error page](https://vike.dev/error-page) which is rendered when errors occur.
22
+
23
+ ### \`/pages/+onPageTransitionStart.ts\` and \`/pages/+onPageTransitionEnd.ts\`
24
+ The [\`onPageTransitionStart()\` hook](https://vike.dev/onPageTransitionStart), together with [\`onPageTransitionEnd()\`](https://vike.dev/onPageTransitionEnd), enables you to implement page transition animations.
25
+
26
+ ### SSR
27
+ SSR is enabled by default. You can [disable it](https://vike.dev/ssr) for all your pages or only for some pages.
28
+
29
+ ### HTML Streaming
30
+ You can enable/disable [HTML streaming](https://vike.dev/streaming) for all your pages, or only for some pages while still using it for others.
31
+ `;
32
+ content.addAbout(about);
33
+ return content.finalize();
34
+ }
35
+ export {
36
+ getReadme as default
37
+ };
@@ -42,14 +42,14 @@ var require_package = __commonJS({
42
42
  license: "MIT",
43
43
  devDependencies: {
44
44
  "@batijs/compile": "workspace:*",
45
- "@types/node": "^18.19.3",
45
+ "@types/node": "^18.19.14",
46
46
  "cross-fetch": "^4.0.0",
47
47
  "eslint-plugin-solid": "^0.13.1",
48
48
  "solid-js": "^1.8.12",
49
49
  tailwindcss: "^3.4.1",
50
50
  typescript: "^5.3.3",
51
51
  vike: "^0.4.160",
52
- "vike-solid": "^0.3.0",
52
+ "vike-solid": "^0.3.1",
53
53
  vite: "^5.0.12",
54
54
  "vite-plugin-solid": "^2.9.1"
55
55
  },
@@ -1,4 +1,4 @@
1
- import vikeSolid from "vike-solid";
1
+ import vikeSolid from "vike-solid/config";
2
2
  import type { Config } from "vike/types";
3
3
  import Head from "../layouts/HeadDefault";
4
4
  import Layout from "../layouts/LayoutDefault";
@@ -1,56 +1,10 @@
1
+ import vikeSolid from "vike-solid/config";
1
2
  import Head from "../layouts/HeadDefault";
2
3
  import Layout from "../layouts/LayoutDefault";
3
4
  declare const _default: {
4
5
  Layout: typeof Layout;
5
6
  Head: typeof Head;
6
7
  title: string;
7
- extends: {
8
- onRenderHtml: "import:vike-solid/renderer/onRenderHtml:onRenderHtml";
9
- onRenderClient: "import:vike-solid/renderer/onRenderClient:onRenderClient";
10
- clientRouting: true;
11
- hydrationCanBeAborted: true;
12
- meta: {
13
- Head: {
14
- env: {
15
- server: true;
16
- };
17
- };
18
- Layout: {
19
- env: {
20
- server: true;
21
- client: true;
22
- };
23
- };
24
- title: {
25
- env: {
26
- server: true;
27
- client: true;
28
- };
29
- };
30
- favicon: {
31
- env: {
32
- server: true;
33
- client: true;
34
- };
35
- };
36
- lang: {
37
- env: {
38
- server: true;
39
- client: true;
40
- };
41
- };
42
- ssr: {
43
- env: {
44
- config: true;
45
- };
46
- effect: import("vike/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/configDefinitionsBuiltIn").ConfigEffect;
47
- };
48
- stream: {
49
- env: {
50
- server: true;
51
- };
52
- };
53
- };
54
- };
8
+ extends: typeof vikeSolid;
55
9
  };
56
10
  export default _default;
@@ -42,9 +42,9 @@ var require_package = __commonJS({
42
42
  license: "MIT",
43
43
  devDependencies: {
44
44
  "@batijs/compile": "workspace:*",
45
- "@types/node": "^18.19.3",
45
+ "@types/node": "^18.19.14",
46
46
  autoprefixer: "^10.4.17",
47
- daisyui: "^4.6.0",
47
+ daisyui: "^4.6.1",
48
48
  postcss: "^8.4.33",
49
49
  tailwindcss: "^3.4.1",
50
50
  vike: "^0.4.160",
@@ -42,7 +42,7 @@ var require_package = __commonJS({
42
42
  license: "MIT",
43
43
  devDependencies: {
44
44
  "@batijs/compile": "workspace:*",
45
- "@types/node": "^18.19.3",
45
+ "@types/node": "^18.19.14",
46
46
  telefunc: "^0.1.70",
47
47
  vike: "^0.4.160",
48
48
  vite: "^5.0.12"
@@ -45,7 +45,7 @@ var require_package = __commonJS({
45
45
  "@batijs/shared-db": "workspace:*",
46
46
  "@trpc/client": "^10.45.0",
47
47
  "@trpc/server": "^10.45.0",
48
- "@types/node": "^18.19.3",
48
+ "@types/node": "^18.19.14",
49
49
  vite: "^5.0.12"
50
50
  },
51
51
  dependencies: {
@@ -42,11 +42,11 @@ var require_package = __commonJS({
42
42
  license: "MIT",
43
43
  devDependencies: {
44
44
  "@batijs/compile": "workspace:*",
45
- "@types/node": "^18.19.3",
46
- "@vite-plugin-vercel/vike": "^3.0.1",
45
+ "@types/node": "^18.19.14",
46
+ "@vite-plugin-vercel/vike": "^4.0.0",
47
47
  vike: "^0.4.160",
48
48
  vite: "^5.0.12",
49
- "vite-plugin-vercel": "^3.0.1"
49
+ "vite-plugin-vercel": "^4.0.0"
50
50
  },
51
51
  dependencies: {
52
52
  "@batijs/core": "workspace:*"
@@ -0,0 +1,37 @@
1
+ // files/$README.md.ts
2
+ import { loadReadme } from "@batijs/core";
3
+ async function getReadme(props) {
4
+ const content = await loadReadme(props);
5
+ const about = `
6
+ This app is ready to start. It's powered by [Vike](https://vike.dev) and [Vue](https://vuejs.org/guide/quick-start.html).
7
+
8
+ ### \`/pages/+config.h.ts\`
9
+ Such files are [the interface](https://vike.dev/config) between Vike and your code. It defines:
10
+ - A default [\`<Layout>\` component](https://vike.dev/Layout) (that wraps your [\`<Page>\` components](https://vike.dev/Page)).
11
+ - A default [\`title\`](https://vike.dev/head).
12
+ - Default [\`<head>\` tags](https://vike.dev/head).
13
+
14
+ ### Routing
15
+ [Vike's built-in router](https://vike.dev/routing) lets you choose between:
16
+ - [Filesystem Routing](https://vike.dev/filesystem-routing) (the URL of a page is determined based on where its \`+Page.vue\` file is located on the filesystem)
17
+ - [Route Strings](https://vike.dev/route-string)
18
+ - [Route Functions](https://vike.dev/route-function)
19
+
20
+ ### \`/pages/_error/+Page.vue\`
21
+ The [error page](https://vike.dev/error-page) which is rendered when errors occur.
22
+
23
+ ### \`/pages/+onPageTransitionStart.ts\` and \`/pages/+onPageTransitionEnd.ts\`
24
+ The [\`onPageTransitionStart()\` hook](https://vike.dev/onPageTransitionStart), together with [\`onPageTransitionEnd()\`](https://vike.dev/onPageTransitionEnd), enables you to implement page transition animations.
25
+
26
+ ### SSR
27
+ SSR is enabled by default. You can [disable it](https://vike.dev/ssr) for all your pages or only for some pages.
28
+
29
+ ### HTML Streaming
30
+ You can enable/disable [HTML streaming](https://vike.dev/streaming) for all your pages, or only for some pages while still using it for others.
31
+ `;
32
+ content.addAbout(about);
33
+ return content.finalize();
34
+ }
35
+ export {
36
+ getReadme as default
37
+ };
@@ -42,17 +42,17 @@ var require_package = __commonJS({
42
42
  license: "MIT",
43
43
  devDependencies: {
44
44
  "@batijs/compile": "workspace:*",
45
- "@types/node": "^18.19.3",
45
+ "@types/node": "^18.19.14",
46
46
  "@vitejs/plugin-vue": "^5.0.3",
47
47
  "@vue/compiler-sfc": "^3.4.15",
48
48
  "@vue/server-renderer": "^3.4.15",
49
49
  "cross-fetch": "^4.0.0",
50
- "eslint-plugin-vue": "^9.20.1",
50
+ "eslint-plugin-vue": "^9.21.1",
51
51
  tailwindcss: "^3.4.1",
52
52
  typescript: "^5.3.3",
53
- "unplugin-vue-markdown": "^0.25.2",
53
+ "unplugin-vue-markdown": "^0.26.0",
54
54
  vike: "^0.4.160",
55
- "vike-vue": "^0.6.0",
55
+ "vike-vue": "^0.6.1",
56
56
  vite: "^5.0.12",
57
57
  vue: "^3.4.15",
58
58
  "vue-gtag": "^2.0.1"
@@ -1,4 +1,4 @@
1
- import vikeVue from "vike-vue";
1
+ import vikeVue from "vike-vue/config";
2
2
  import type { Config } from "vike/types";
3
3
  import Head from "../layouts/HeadDefault.vue";
4
4
  import Layout from "../layouts/LayoutDefault.vue";
@@ -1,4 +1,4 @@
1
- import type { OnCreateAppSync } from "vike-vue";
1
+ import type { OnCreateAppSync } from "vike-vue/types";
2
2
  import VueGtag from "vue-gtag";
3
3
 
4
4
  // BATI.has("google-analytics")
@@ -1,85 +1,9 @@
1
+ import vikeVue from "vike-vue/config";
1
2
  import Head from "../layouts/HeadDefault.vue";
2
3
  declare const _default: {
3
4
  Layout: typeof Head;
4
5
  Head: typeof Head;
5
6
  title: string;
6
- extends: {
7
- onRenderHtml: "import:vike-vue/renderer/onRenderHtml:onRenderHtml";
8
- onRenderClient: "import:vike-vue/renderer/onRenderClient:onRenderClient";
9
- passToClient: string[];
10
- clientRouting: true;
11
- hydrationCanBeAborted: true;
12
- meta: {
13
- Head: {
14
- env: {
15
- server: true;
16
- };
17
- };
18
- Layout: {
19
- env: {
20
- server: true;
21
- client: true;
22
- };
23
- };
24
- title: {
25
- env: {
26
- server: true;
27
- client: true;
28
- };
29
- };
30
- favicon: {
31
- env: {
32
- server: true;
33
- client: true;
34
- };
35
- };
36
- lang: {
37
- env: {
38
- server: true;
39
- client: true;
40
- };
41
- };
42
- ssr: {
43
- env: {
44
- config: true;
45
- };
46
- effect: import("vike/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/configDefinitionsBuiltIn").ConfigEffect;
47
- };
48
- stream: {
49
- env: {
50
- server: true;
51
- };
52
- };
53
- vuePlugins: {
54
- env: {
55
- server: true;
56
- client: true;
57
- };
58
- };
59
- onCreateApp: {
60
- env: {
61
- server: true;
62
- client: true;
63
- };
64
- };
65
- onCreateAppPinia: {
66
- env: {
67
- server: true;
68
- client: true;
69
- };
70
- };
71
- onAfterRenderSSRApp: {
72
- env: {
73
- server: true;
74
- };
75
- };
76
- onBeforeMountApp: {
77
- env: {
78
- server: false;
79
- client: true;
80
- };
81
- };
82
- };
83
- };
7
+ extends: typeof vikeVue;
84
8
  };
85
9
  export default _default;
@@ -1,2 +1,2 @@
1
- import type { OnCreateAppSync } from "vike-vue";
1
+ import type { OnCreateAppSync } from "vike-vue/types";
2
2
  export declare const onCreateApp: OnCreateAppSync;
@@ -18,8 +18,7 @@
18
18
  },
19
19
  "folder": "@batijs/edgedb",
20
20
  "subfolders": [
21
- "files",
22
- "hooks"
21
+ "files"
23
22
  ]
24
23
  },
25
24
  {
@@ -96,8 +95,7 @@
96
95
  },
97
96
  "folder": "@batijs/prisma",
98
97
  "subfolders": [
99
- "files",
100
- "hooks"
98
+ "files"
101
99
  ]
102
100
  },
103
101
  {
package/dist/index.js CHANGED
@@ -515,6 +515,7 @@ function transformFileAfterExec(filepath, fileContent) {
515
515
  case ".env.production":
516
516
  case ".env.production.local":
517
517
  case ".html":
518
+ case ".md":
518
519
  return fileContent;
519
520
  case ".json":
520
521
  return JSON.stringify(fileContent, null, 2);
@@ -584,13 +585,13 @@ Please report this issue to https://github.com/magne4000/bati`
584
585
  // package.json
585
586
  var package_default = {
586
587
  name: "@batijs/cli",
587
- version: "0.0.152",
588
+ version: "0.0.154",
588
589
  type: "module",
589
590
  scripts: {
590
591
  "check-types": "tsc --noEmit",
591
592
  prerelease: "rimraf ./dist",
592
- prepublishOnly: "pnpm run build",
593
- build: "rimraf ./dist && tsup"
593
+ prepublishOnly: "pnpm run build-cli",
594
+ "build-cli": "rimraf ./dist && tsup"
594
595
  },
595
596
  keywords: [],
596
597
  description: "Next-gen scaffolder. Get started with fully-functional apps, and choose any tool you want",
@@ -600,11 +601,11 @@ var package_default = {
600
601
  devDependencies: {
601
602
  "@batijs/build": "workspace:*",
602
603
  "@batijs/compile": "workspace:*",
603
- "@types/node": "^18.19.3",
604
+ "@types/node": "^18.19.14",
604
605
  "@types/which": "^3.0.3",
605
606
  citty: "^0.1.5",
606
607
  colorette: "^2.0.20",
607
- esbuild: "^0.19.12",
608
+ esbuild: "^0.20.0",
608
609
  execa: "^8.0.1",
609
610
  rimraf: "^5.0.5",
610
611
  sift: "^17.0.1",
@@ -1590,6 +1591,7 @@ function findDescription(key) {
1590
1591
  }
1591
1592
  function printOK(dist, flags) {
1592
1593
  const arrow0 = withIcon("\u2192", blueBright);
1594
+ const book0 = withIcon("\u{1F4DA}", blueBright);
1593
1595
  const list3 = withIcon("-", void 0, 3);
1594
1596
  const cmd3 = withIcon("$", gray, 3);
1595
1597
  console.log(bold(`${green("\u2713")} Project created at ${cyan(dist)} with:`));
@@ -1600,10 +1602,11 @@ function printOK(dist, flags) {
1600
1602
  continue;
1601
1603
  console.log(list3(green(feature.label)));
1602
1604
  }
1603
- console.log("\n" + bold(arrow0("Next steps:")));
1605
+ console.log("\n" + bold(arrow0("Ready to start you app:")));
1604
1606
  console.log(cmd3(`cd ${dist}`));
1605
1607
  console.log(cmd3("pnpm install"));
1606
1608
  console.log(cmd3("pnpm run dev"));
1609
+ console.log("\n" + bold(book0("Be sure to check the ") + cyan("README.md") + " file for remaining steps and documentation."));
1607
1610
  }
1608
1611
  var defaultDef = {
1609
1612
  project: {
@@ -1693,11 +1696,11 @@ async function retrieveHooks(hooks) {
1693
1696
  const parsed = parse(file);
1694
1697
  const importFile = isWin2 ? "file://" + file : file;
1695
1698
  switch (parsed.name) {
1696
- case "cli":
1697
- if (!map.has("cli")) {
1698
- map.set("cli", []);
1699
+ case "after":
1700
+ if (!map.has("after")) {
1701
+ map.set("after", []);
1699
1702
  }
1700
- map.get("cli").push((await import(importFile)).default);
1703
+ map.get("after").push((await import(importFile)).default);
1701
1704
  break;
1702
1705
  default:
1703
1706
  throw new Error(`Unsupported hook ${parsed.name}`);
@@ -1772,8 +1775,8 @@ async function run() {
1772
1775
  meta
1773
1776
  );
1774
1777
  printOK(args.project, flags);
1775
- for (const oncli of hooksMap.get("cli") ?? []) {
1776
- await oncli(meta);
1778
+ for (const onafter of hooksMap.get("after") ?? []) {
1779
+ await onafter(meta);
1777
1780
  }
1778
1781
  }
1779
1782
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@batijs/cli",
3
- "version": "0.0.152",
3
+ "version": "0.0.154",
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",
@@ -8,23 +8,23 @@
8
8
  "repository": "https://github.com/batijs/bati",
9
9
  "license": "MIT",
10
10
  "devDependencies": {
11
- "@types/node": "^18.19.3",
11
+ "@types/node": "^18.19.14",
12
12
  "@types/which": "^3.0.3",
13
13
  "citty": "^0.1.5",
14
14
  "colorette": "^2.0.20",
15
- "esbuild": "^0.19.12",
15
+ "esbuild": "^0.20.0",
16
16
  "execa": "^8.0.1",
17
17
  "rimraf": "^5.0.5",
18
18
  "sift": "^17.0.1",
19
19
  "tsup": "^8.0.1",
20
20
  "typescript": "^5.3.3",
21
21
  "vite": "^5.0.12",
22
- "@batijs/compile": "0.0.152",
23
- "@batijs/build": "0.0.152"
22
+ "@batijs/build": "0.0.154",
23
+ "@batijs/compile": "0.0.154"
24
24
  },
25
25
  "dependencies": {
26
- "@batijs/features": "0.0.152",
27
- "@batijs/core": "0.0.152"
26
+ "@batijs/core": "0.0.154",
27
+ "@batijs/features": "0.0.154"
28
28
  },
29
29
  "bin": "./dist/index.js",
30
30
  "exports": {
@@ -36,6 +36,6 @@
36
36
  "scripts": {
37
37
  "check-types": "tsc --noEmit",
38
38
  "prerelease": "rimraf ./dist",
39
- "build": "rimraf ./dist && tsup"
39
+ "build-cli": "rimraf ./dist && tsup"
40
40
  }
41
41
  }
@@ -1,138 +0,0 @@
1
- // hooks/cli.ts
2
- import { which, withIcon } from "@batijs/core";
3
-
4
- // ../../node_modules/.pnpm/colorette@2.0.20/node_modules/colorette/index.js
5
- import * as tty from "tty";
6
- var {
7
- env = {},
8
- argv = [],
9
- platform = ""
10
- } = typeof process === "undefined" ? {} : process;
11
- var isDisabled = "NO_COLOR" in env || argv.includes("--no-color");
12
- var isForced = "FORCE_COLOR" in env || argv.includes("--color");
13
- var isWindows = platform === "win32";
14
- var isDumbTerminal = env.TERM === "dumb";
15
- var isCompatibleTerminal = tty && tty.isatty && tty.isatty(1) && env.TERM && !isDumbTerminal;
16
- var isCI = "CI" in env && ("GITHUB_ACTIONS" in env || "GITLAB_CI" in env || "CIRCLECI" in env);
17
- var isColorSupported = !isDisabled && (isForced || isWindows && !isDumbTerminal || isCompatibleTerminal || isCI);
18
- var replaceClose = (index, string, close, replace, head = string.substring(0, index) + replace, tail = string.substring(index + close.length), next = tail.indexOf(close)) => head + (next < 0 ? tail : replaceClose(next, tail, close, replace));
19
- var clearBleed = (index, string, open, close, replace) => index < 0 ? open + string + close : open + replaceClose(index, string, close, replace) + close;
20
- var filterEmpty = (open, close, replace = open, at = open.length + 1) => (string) => string || !(string === "" || string === void 0) ? clearBleed(
21
- ("" + string).indexOf(close, at),
22
- string,
23
- open,
24
- close,
25
- replace
26
- ) : "";
27
- var init = (open, close, replace) => filterEmpty(`\x1B[${open}m`, `\x1B[${close}m`, replace);
28
- var colors = {
29
- reset: init(0, 0),
30
- bold: init(1, 22, "\x1B[22m\x1B[1m"),
31
- dim: init(2, 22, "\x1B[22m\x1B[2m"),
32
- italic: init(3, 23),
33
- underline: init(4, 24),
34
- inverse: init(7, 27),
35
- hidden: init(8, 28),
36
- strikethrough: init(9, 29),
37
- black: init(30, 39),
38
- red: init(31, 39),
39
- green: init(32, 39),
40
- yellow: init(33, 39),
41
- blue: init(34, 39),
42
- magenta: init(35, 39),
43
- cyan: init(36, 39),
44
- white: init(37, 39),
45
- gray: init(90, 39),
46
- bgBlack: init(40, 49),
47
- bgRed: init(41, 49),
48
- bgGreen: init(42, 49),
49
- bgYellow: init(43, 49),
50
- bgBlue: init(44, 49),
51
- bgMagenta: init(45, 49),
52
- bgCyan: init(46, 49),
53
- bgWhite: init(47, 49),
54
- blackBright: init(90, 39),
55
- redBright: init(91, 39),
56
- greenBright: init(92, 39),
57
- yellowBright: init(93, 39),
58
- blueBright: init(94, 39),
59
- magentaBright: init(95, 39),
60
- cyanBright: init(96, 39),
61
- whiteBright: init(97, 39),
62
- bgBlackBright: init(100, 49),
63
- bgRedBright: init(101, 49),
64
- bgGreenBright: init(102, 49),
65
- bgYellowBright: init(103, 49),
66
- bgBlueBright: init(104, 49),
67
- bgMagentaBright: init(105, 49),
68
- bgCyanBright: init(106, 49),
69
- bgWhiteBright: init(107, 49)
70
- };
71
- var createColors = ({ useColor = isColorSupported } = {}) => useColor ? colors : Object.keys(colors).reduce(
72
- (colors2, key) => ({ ...colors2, [key]: String }),
73
- {}
74
- );
75
- var {
76
- reset,
77
- bold,
78
- dim,
79
- italic,
80
- underline,
81
- inverse,
82
- hidden,
83
- strikethrough,
84
- black,
85
- red,
86
- green,
87
- yellow,
88
- blue,
89
- magenta,
90
- cyan,
91
- white,
92
- gray,
93
- bgBlack,
94
- bgRed,
95
- bgGreen,
96
- bgYellow,
97
- bgBlue,
98
- bgMagenta,
99
- bgCyan,
100
- bgWhite,
101
- blackBright,
102
- redBright,
103
- greenBright,
104
- yellowBright,
105
- blueBright,
106
- magentaBright,
107
- cyanBright,
108
- whiteBright,
109
- bgBlackBright,
110
- bgRedBright,
111
- bgGreenBright,
112
- bgYellowBright,
113
- bgBlueBright,
114
- bgMagentaBright,
115
- bgCyanBright,
116
- bgWhiteBright
117
- } = createColors();
118
-
119
- // hooks/cli.ts
120
- function oncli() {
121
- const found = which.sync("edgedb", { nothrow: true });
122
- const arrow0 = withIcon("\u2192", blueBright);
123
- const dot1 = withIcon("\u2022", blueBright, 1);
124
- const cmd3 = withIcon("$", gray, 3);
125
- console.log("\n" + bold(arrow0(`Next steps: ${underline("EdgeDB")}`)));
126
- if (found === null) {
127
- console.log(dim(dot1(`${yellowBright("edgedb")} command not found`)));
128
- console.log(cmd3("curl https://sh.edgedb.com --proto '=https' -sSf1 | sh"));
129
- } else {
130
- console.log(dim(dot1(`${greenBright("edgedb")} command found at ${cyanBright(found)}`)));
131
- }
132
- console.log(dim(dot1(`initialize a project`)));
133
- console.log(cmd3("edgedb project init"));
134
- console.log(dim(dot1("then follow instructions at https://www.edgedb.com/docs/intro/quickstart#set-up-your-schema")));
135
- }
136
- export {
137
- oncli as default
138
- };
@@ -1,137 +0,0 @@
1
- // hooks/cli.ts
2
- import { withIcon } from "@batijs/core";
3
-
4
- // ../../node_modules/.pnpm/colorette@2.0.20/node_modules/colorette/index.js
5
- import * as tty from "tty";
6
- var {
7
- env = {},
8
- argv = [],
9
- platform = ""
10
- } = typeof process === "undefined" ? {} : process;
11
- var isDisabled = "NO_COLOR" in env || argv.includes("--no-color");
12
- var isForced = "FORCE_COLOR" in env || argv.includes("--color");
13
- var isWindows = platform === "win32";
14
- var isDumbTerminal = env.TERM === "dumb";
15
- var isCompatibleTerminal = tty && tty.isatty && tty.isatty(1) && env.TERM && !isDumbTerminal;
16
- var isCI = "CI" in env && ("GITHUB_ACTIONS" in env || "GITLAB_CI" in env || "CIRCLECI" in env);
17
- var isColorSupported = !isDisabled && (isForced || isWindows && !isDumbTerminal || isCompatibleTerminal || isCI);
18
- var replaceClose = (index, string, close, replace, head = string.substring(0, index) + replace, tail = string.substring(index + close.length), next = tail.indexOf(close)) => head + (next < 0 ? tail : replaceClose(next, tail, close, replace));
19
- var clearBleed = (index, string, open, close, replace) => index < 0 ? open + string + close : open + replaceClose(index, string, close, replace) + close;
20
- var filterEmpty = (open, close, replace = open, at = open.length + 1) => (string) => string || !(string === "" || string === void 0) ? clearBleed(
21
- ("" + string).indexOf(close, at),
22
- string,
23
- open,
24
- close,
25
- replace
26
- ) : "";
27
- var init = (open, close, replace) => filterEmpty(`\x1B[${open}m`, `\x1B[${close}m`, replace);
28
- var colors = {
29
- reset: init(0, 0),
30
- bold: init(1, 22, "\x1B[22m\x1B[1m"),
31
- dim: init(2, 22, "\x1B[22m\x1B[2m"),
32
- italic: init(3, 23),
33
- underline: init(4, 24),
34
- inverse: init(7, 27),
35
- hidden: init(8, 28),
36
- strikethrough: init(9, 29),
37
- black: init(30, 39),
38
- red: init(31, 39),
39
- green: init(32, 39),
40
- yellow: init(33, 39),
41
- blue: init(34, 39),
42
- magenta: init(35, 39),
43
- cyan: init(36, 39),
44
- white: init(37, 39),
45
- gray: init(90, 39),
46
- bgBlack: init(40, 49),
47
- bgRed: init(41, 49),
48
- bgGreen: init(42, 49),
49
- bgYellow: init(43, 49),
50
- bgBlue: init(44, 49),
51
- bgMagenta: init(45, 49),
52
- bgCyan: init(46, 49),
53
- bgWhite: init(47, 49),
54
- blackBright: init(90, 39),
55
- redBright: init(91, 39),
56
- greenBright: init(92, 39),
57
- yellowBright: init(93, 39),
58
- blueBright: init(94, 39),
59
- magentaBright: init(95, 39),
60
- cyanBright: init(96, 39),
61
- whiteBright: init(97, 39),
62
- bgBlackBright: init(100, 49),
63
- bgRedBright: init(101, 49),
64
- bgGreenBright: init(102, 49),
65
- bgYellowBright: init(103, 49),
66
- bgBlueBright: init(104, 49),
67
- bgMagentaBright: init(105, 49),
68
- bgCyanBright: init(106, 49),
69
- bgWhiteBright: init(107, 49)
70
- };
71
- var createColors = ({ useColor = isColorSupported } = {}) => useColor ? colors : Object.keys(colors).reduce(
72
- (colors2, key) => ({ ...colors2, [key]: String }),
73
- {}
74
- );
75
- var {
76
- reset,
77
- bold,
78
- dim,
79
- italic,
80
- underline,
81
- inverse,
82
- hidden,
83
- strikethrough,
84
- black,
85
- red,
86
- green,
87
- yellow,
88
- blue,
89
- magenta,
90
- cyan,
91
- white,
92
- gray,
93
- bgBlack,
94
- bgRed,
95
- bgGreen,
96
- bgYellow,
97
- bgBlue,
98
- bgMagenta,
99
- bgCyan,
100
- bgWhite,
101
- blackBright,
102
- redBright,
103
- greenBright,
104
- yellowBright,
105
- blueBright,
106
- magentaBright,
107
- cyanBright,
108
- whiteBright,
109
- bgBlackBright,
110
- bgRedBright,
111
- bgGreenBright,
112
- bgYellowBright,
113
- bgBlueBright,
114
- bgMagentaBright,
115
- bgCyanBright,
116
- bgWhiteBright
117
- } = createColors();
118
-
119
- // hooks/cli.ts
120
- function oncli() {
121
- const arrow0 = withIcon("\u2192", blueBright);
122
- const dot1 = withIcon("\u2022", blueBright, 1);
123
- const cmd3 = withIcon("$", gray, 3);
124
- console.log("\n" + bold(arrow0(`Next steps: ${underline("Prisma")}`)));
125
- console.log(dim(dot1(`setup Prisma`)));
126
- console.log(cmd3("pnpx prisma init"));
127
- console.log(
128
- dim(
129
- dot1(
130
- "then follow instructions at https://www.prisma.io/docs/getting-started/quickstart#2-model-your-data-in-the-prisma-schema"
131
- )
132
- )
133
- );
134
- }
135
- export {
136
- oncli as default
137
- };