@kevinmarrec/create-app 0.18.0 → 0.19.0
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/dist/index.mjs +9 -12
- package/package.json +17 -17
- package/template/.docker/mailpit/service.yml +1 -1
- package/template/.docker/metabase/service.yml +1 -1
- package/template/.docker/traefik/service.yml +1 -1
- package/template/.github/workflows/ci.yml +3 -3
- package/template/.node-version +1 -1
- package/template/api/Dockerfile +1 -1
- package/template/api/package.json +11 -11
- package/template/app/Dockerfile +2 -2
- package/template/app/package.json +20 -21
- package/template/app/vite.config.ts +8 -8
- package/template/compose.yml +2 -2
- package/template/package.json +10 -10
package/dist/index.mjs
CHANGED
|
@@ -7,13 +7,11 @@ import { basename, join, resolve } from "pathe";
|
|
|
7
7
|
import { x } from "tinyexec";
|
|
8
8
|
import fs from "node:fs/promises";
|
|
9
9
|
import os from "node:os";
|
|
10
|
-
|
|
11
10
|
//#region package.json
|
|
12
|
-
var version = "0.
|
|
13
|
-
|
|
11
|
+
var version = "0.19.0";
|
|
14
12
|
//#endregion
|
|
15
13
|
//#region src/utils/fs.ts
|
|
16
|
-
const IGNORED_FILES = new Set([".git"]);
|
|
14
|
+
const IGNORED_FILES = new Set([".git", "node_modules"]);
|
|
17
15
|
const ignorePredicate = (filename) => IGNORED_FILES.has(filename);
|
|
18
16
|
async function empty(dir) {
|
|
19
17
|
const entries = await fs.readdir(dir);
|
|
@@ -31,9 +29,9 @@ var fs_default = {
|
|
|
31
29
|
emptyCheck,
|
|
32
30
|
exists
|
|
33
31
|
};
|
|
34
|
-
|
|
35
32
|
//#endregion
|
|
36
33
|
//#region src/utils/template.ts
|
|
34
|
+
const GITHUB_SHORTHAND_RE = /^[^/\s]+\/[^/\s]+$/;
|
|
37
35
|
function resolveTemplate(template) {
|
|
38
36
|
const [repo, ...rest] = template.split("#");
|
|
39
37
|
const subdir = rest.join("#") || void 0;
|
|
@@ -45,7 +43,7 @@ function resolveTemplate(template) {
|
|
|
45
43
|
function resolveTemplateUrl(repo) {
|
|
46
44
|
if (repo.startsWith("https://")) return repo;
|
|
47
45
|
if (repo.startsWith("git@")) return repo;
|
|
48
|
-
if (
|
|
46
|
+
if (GITHUB_SHORTHAND_RE.test(repo)) return `https://github.com/${repo}.git`;
|
|
49
47
|
throw new Error(`Invalid template format: "${repo}"`);
|
|
50
48
|
}
|
|
51
49
|
async function cloneTemplate(url) {
|
|
@@ -67,7 +65,6 @@ async function cloneTemplate(url) {
|
|
|
67
65
|
}
|
|
68
66
|
return tempDir;
|
|
69
67
|
}
|
|
70
|
-
|
|
71
68
|
//#endregion
|
|
72
69
|
//#region src/scaffold.ts
|
|
73
70
|
async function scaffold(root, template) {
|
|
@@ -87,9 +84,11 @@ async function scaffold(root, template) {
|
|
|
87
84
|
force: true
|
|
88
85
|
});
|
|
89
86
|
}
|
|
90
|
-
} else await fs_default.cp(join(import.meta.dirname, "../template"), root, {
|
|
87
|
+
} else await fs_default.cp(join(import.meta.dirname, "../template"), root, {
|
|
88
|
+
recursive: true,
|
|
89
|
+
filter: (src) => !ignorePredicate(basename(src))
|
|
90
|
+
});
|
|
91
91
|
}
|
|
92
|
-
|
|
93
92
|
//#endregion
|
|
94
93
|
//#region src/run.ts
|
|
95
94
|
function maybeCancel(value, options) {
|
|
@@ -181,13 +180,11 @@ async function run() {
|
|
|
181
180
|
await note([targetDir !== cwd && `cd ${c.reset.blue(projectName)}`, `bun run dev`].filter(Boolean).join("\n"), "Next steps");
|
|
182
181
|
await outro(`Problems? ${c.cyan("https://github.com/kevinmarrec/create-app/issues")}`);
|
|
183
182
|
}
|
|
184
|
-
|
|
185
183
|
//#endregion
|
|
186
184
|
//#region src/index.ts
|
|
187
185
|
run().catch((error) => {
|
|
188
186
|
console.error(error);
|
|
189
187
|
process.exitCode = 1;
|
|
190
188
|
});
|
|
191
|
-
|
|
192
189
|
//#endregion
|
|
193
|
-
export {
|
|
190
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kevinmarrec/create-app",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
5
|
-
"packageManager": "bun@1.3.
|
|
4
|
+
"version": "0.19.0",
|
|
5
|
+
"packageManager": "bun@1.3.11",
|
|
6
6
|
"description": "CLI that scaffolds an opinionated Bun & Vue fullstack application.",
|
|
7
7
|
"author": "Kevin Marrec <kevin@marrec.io>",
|
|
8
8
|
"license": "MIT",
|
|
@@ -47,22 +47,22 @@
|
|
|
47
47
|
"@clack/prompts": "^1.1.0",
|
|
48
48
|
"ansis": "^4.2.0",
|
|
49
49
|
"pathe": "^2.0.3",
|
|
50
|
-
"tinyexec": "^1.0.
|
|
50
|
+
"tinyexec": "^1.0.4"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@faker-js/faker": "^10.
|
|
54
|
-
"@kevinmarrec/eslint-config": "^1.
|
|
55
|
-
"@kevinmarrec/stylelint-config": "^1.
|
|
56
|
-
"@kevinmarrec/tsconfig": "^1.
|
|
57
|
-
"@types/bun": "^1.3.
|
|
58
|
-
"@vitest/coverage-v8": "^4.
|
|
59
|
-
"bumpp": "^
|
|
60
|
-
"eslint": "^
|
|
61
|
-
"knip": "^
|
|
62
|
-
"stylelint": "^17.
|
|
63
|
-
"tsdown": "^0.
|
|
64
|
-
"typescript": "^
|
|
65
|
-
"vitest": "^4.
|
|
66
|
-
"vue-tsc": "^3.2.
|
|
53
|
+
"@faker-js/faker": "^10.4.0",
|
|
54
|
+
"@kevinmarrec/eslint-config": "^1.14.0",
|
|
55
|
+
"@kevinmarrec/stylelint-config": "^1.14.0",
|
|
56
|
+
"@kevinmarrec/tsconfig": "^1.14.0",
|
|
57
|
+
"@types/bun": "^1.3.11",
|
|
58
|
+
"@vitest/coverage-v8": "^4.1.2",
|
|
59
|
+
"bumpp": "^11.0.1",
|
|
60
|
+
"eslint": "^10.1.0",
|
|
61
|
+
"knip": "^6.1.0",
|
|
62
|
+
"stylelint": "^17.6.0",
|
|
63
|
+
"tsdown": "^0.21.7",
|
|
64
|
+
"typescript": "^6.0.2",
|
|
65
|
+
"vitest": "^4.1.2",
|
|
66
|
+
"vue-tsc": "^3.2.6"
|
|
67
67
|
}
|
|
68
68
|
}
|
|
@@ -14,7 +14,7 @@ jobs:
|
|
|
14
14
|
runs-on: ubuntu-latest
|
|
15
15
|
steps:
|
|
16
16
|
- name: Setup Bun
|
|
17
|
-
uses: kevinmarrec/workflows/setup-bun@
|
|
17
|
+
uses: kevinmarrec/workflows/setup-bun@acf87d335f08bebc66def9aed5629ee08e459b95 # main
|
|
18
18
|
|
|
19
19
|
- name: Lint
|
|
20
20
|
run: bun run lint
|
|
@@ -32,12 +32,12 @@ jobs:
|
|
|
32
32
|
pull-requests: write
|
|
33
33
|
steps:
|
|
34
34
|
- name: Setup Bun
|
|
35
|
-
uses: kevinmarrec/workflows/setup-bun@
|
|
35
|
+
uses: kevinmarrec/workflows/setup-bun@acf87d335f08bebc66def9aed5629ee08e459b95 # main
|
|
36
36
|
|
|
37
37
|
- name: Build project
|
|
38
38
|
run: bun run build
|
|
39
39
|
|
|
40
40
|
- name: Analyze project build size differences
|
|
41
|
-
uses: kevinmarrec/workflows/filesize-diff@
|
|
41
|
+
uses: kevinmarrec/workflows/filesize-diff@acf87d335f08bebc66def9aed5629ee08e459b95 # main
|
|
42
42
|
with:
|
|
43
43
|
directories: app/dist,api/dist
|
package/template/.node-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
24.14.
|
|
1
|
+
24.14.1
|
package/template/api/Dockerfile
CHANGED
|
@@ -9,20 +9,20 @@
|
|
|
9
9
|
"db:migrate": "bun --bun run drizzle-kit migrate --config src/database/drizzle/config.ts"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@better-auth/drizzle-adapter": "^1.5.
|
|
13
|
-
"@libsql/client": "^0.17.
|
|
14
|
-
"@orpc/server": "^1.13.
|
|
15
|
-
"better-auth": "^1.5.
|
|
16
|
-
"drizzle-orm": "^0.45.
|
|
12
|
+
"@better-auth/drizzle-adapter": "^1.5.6",
|
|
13
|
+
"@libsql/client": "^0.17.2",
|
|
14
|
+
"@orpc/server": "^1.13.13",
|
|
15
|
+
"better-auth": "^1.5.6",
|
|
16
|
+
"drizzle-orm": "^0.45.2",
|
|
17
17
|
"pino": "^10.3.1",
|
|
18
|
-
"valibot": "^1.
|
|
18
|
+
"valibot": "^1.3.1"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@kevinmarrec/tsconfig": "^1.
|
|
22
|
-
"@types/bun": "^1.3.
|
|
23
|
-
"drizzle-kit": "^0.31.
|
|
24
|
-
"pg": "^8.
|
|
21
|
+
"@kevinmarrec/tsconfig": "^1.14.0",
|
|
22
|
+
"@types/bun": "^1.3.11",
|
|
23
|
+
"drizzle-kit": "^0.31.10",
|
|
24
|
+
"pg": "^8.20.0",
|
|
25
25
|
"pino-pretty": "^13.1.3",
|
|
26
|
-
"typescript": "~
|
|
26
|
+
"typescript": "~6.0.2"
|
|
27
27
|
}
|
|
28
28
|
}
|
package/template/app/Dockerfile
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
FROM --platform=$BUILDPLATFORM imbios/bun-node:1.3.
|
|
1
|
+
FROM --platform=$BUILDPLATFORM imbios/bun-node:1.3.11-24.14.0-alpine AS build
|
|
2
2
|
|
|
3
3
|
ARG TARGETARCH
|
|
4
4
|
|
|
@@ -14,7 +14,7 @@ COPY app/ ./app/
|
|
|
14
14
|
|
|
15
15
|
RUN bun -F ./app build
|
|
16
16
|
|
|
17
|
-
FROM nginx:1.29.
|
|
17
|
+
FROM nginx:1.29.7-alpine AS serve
|
|
18
18
|
|
|
19
19
|
COPY --from=build --chown=nonroot:nonroot /build/app/dist/ /usr/share/nginx/html
|
|
20
20
|
|
|
@@ -9,32 +9,31 @@
|
|
|
9
9
|
"preview": "vite preview --open"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@kevinmarrec/vue-i18n": "^1.
|
|
13
|
-
"@orpc/client": "^1.13.
|
|
14
|
-
"@orpc/vue-colada": "^1.13.
|
|
15
|
-
"@pinia/colada": "^0.
|
|
16
|
-
"@unhead/vue": "^2.1.
|
|
12
|
+
"@kevinmarrec/vue-i18n": "^1.5.0",
|
|
13
|
+
"@orpc/client": "^1.13.13",
|
|
14
|
+
"@orpc/vue-colada": "^1.13.13",
|
|
15
|
+
"@pinia/colada": "^1.0.0",
|
|
16
|
+
"@unhead/vue": "^2.1.12",
|
|
17
17
|
"@vueuse/core": "^14.2.1",
|
|
18
|
-
"better-auth": "^1.5.
|
|
18
|
+
"better-auth": "^1.5.6",
|
|
19
19
|
"pinia": "^3.0.4",
|
|
20
|
-
"unocss": "^66.6.
|
|
21
|
-
"vue": "^3.5.
|
|
20
|
+
"unocss": "^66.6.7",
|
|
21
|
+
"vue": "^3.5.31"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@kevinmarrec/tsconfig": "^1.
|
|
25
|
-
"@kevinmarrec/unocss-config": "^1.
|
|
26
|
-
"@kevinmarrec/vite-plugin-dark-mode": "^1.
|
|
24
|
+
"@kevinmarrec/tsconfig": "^1.14.0",
|
|
25
|
+
"@kevinmarrec/unocss-config": "^1.14.0",
|
|
26
|
+
"@kevinmarrec/vite-plugin-dark-mode": "^1.4.0",
|
|
27
27
|
"@modyfi/vite-plugin-yaml": "^1.1.1",
|
|
28
|
-
"@unhead/addons": "^2.1.
|
|
29
|
-
"@vitejs/plugin-vue": "^6.0.
|
|
28
|
+
"@unhead/addons": "^2.1.12",
|
|
29
|
+
"@vitejs/plugin-vue": "^6.0.5",
|
|
30
30
|
"beasties": "^0.4.1",
|
|
31
|
-
"
|
|
32
|
-
"typescript": "~
|
|
33
|
-
"valibot": "^1.
|
|
34
|
-
"vite": "^
|
|
35
|
-
"vite-plugin-valibot-env": "^1.0.
|
|
36
|
-
"vite-plugin-vue-devtools": "^8.
|
|
37
|
-
"vite-ssg": "^28.3.0"
|
|
38
|
-
"vite-tsconfig-paths": "^6.1.1"
|
|
31
|
+
"sonda": "^0.11.1",
|
|
32
|
+
"typescript": "~6.0.2",
|
|
33
|
+
"valibot": "^1.3.1",
|
|
34
|
+
"vite": "^8.0.3",
|
|
35
|
+
"vite-plugin-valibot-env": "^1.0.2",
|
|
36
|
+
"vite-plugin-vue-devtools": "^8.1.1",
|
|
37
|
+
"vite-ssg": "^28.3.0"
|
|
39
38
|
}
|
|
40
39
|
}
|
|
@@ -4,13 +4,12 @@ import darkMode from '@kevinmarrec/vite-plugin-dark-mode'
|
|
|
4
4
|
import yaml from '@modyfi/vite-plugin-yaml'
|
|
5
5
|
import unhead from '@unhead/addons/vite'
|
|
6
6
|
import vue from '@vitejs/plugin-vue'
|
|
7
|
-
import
|
|
7
|
+
import sonda from 'sonda/vite'
|
|
8
8
|
import unocss from 'unocss/vite'
|
|
9
9
|
import * as v from 'valibot'
|
|
10
10
|
import { defineConfig, type PluginOption } from 'vite'
|
|
11
11
|
import valibot from 'vite-plugin-valibot-env'
|
|
12
12
|
import devtools from 'vite-plugin-vue-devtools'
|
|
13
|
-
import tsconfigPaths from 'vite-tsconfig-paths'
|
|
14
13
|
|
|
15
14
|
export const envSchema = v.object({
|
|
16
15
|
VITE_API_URL: v.pipe(v.string(), v.nonEmpty(), v.readonly()),
|
|
@@ -30,7 +29,6 @@ export default defineConfig(({ command, mode }) => {
|
|
|
30
29
|
toggleComboKey: 'alt-s',
|
|
31
30
|
},
|
|
32
31
|
}),
|
|
33
|
-
tsconfigPaths(),
|
|
34
32
|
unhead(),
|
|
35
33
|
unocss(`${import.meta.dirname}/uno.config.ts`),
|
|
36
34
|
valibot(envSchema),
|
|
@@ -43,13 +41,12 @@ export default defineConfig(({ command, mode }) => {
|
|
|
43
41
|
]
|
|
44
42
|
|
|
45
43
|
if (mode === 'analyze') {
|
|
46
|
-
plugins.push(
|
|
44
|
+
plugins.push(sonda({
|
|
47
45
|
filename: 'node_modules/.vite/stats.html',
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
gzipSize: true,
|
|
46
|
+
brotli: true,
|
|
47
|
+
gzip: true,
|
|
51
48
|
open: true,
|
|
52
|
-
|
|
49
|
+
|
|
53
50
|
}))
|
|
54
51
|
}
|
|
55
52
|
|
|
@@ -72,6 +69,9 @@ export default defineConfig(({ command, mode }) => {
|
|
|
72
69
|
},
|
|
73
70
|
},
|
|
74
71
|
plugins,
|
|
72
|
+
resolve: {
|
|
73
|
+
tsconfigPaths: true,
|
|
74
|
+
},
|
|
75
75
|
ssgOptions: {
|
|
76
76
|
script: 'async',
|
|
77
77
|
formatting: 'minify',
|
package/template/compose.yml
CHANGED
|
@@ -16,7 +16,7 @@ services:
|
|
|
16
16
|
|
|
17
17
|
api:
|
|
18
18
|
<<: *common
|
|
19
|
-
image: oven/bun:1.3.
|
|
19
|
+
image: oven/bun:1.3.11-alpine
|
|
20
20
|
container_name: api
|
|
21
21
|
init: true
|
|
22
22
|
depends_on:
|
|
@@ -36,7 +36,7 @@ services:
|
|
|
36
36
|
|
|
37
37
|
app:
|
|
38
38
|
<<: *common
|
|
39
|
-
image: imbios/bun-node:1.3.
|
|
39
|
+
image: imbios/bun-node:1.3.11-24.14.0-alpine
|
|
40
40
|
container_name: app
|
|
41
41
|
init: true
|
|
42
42
|
depends_on:
|
package/template/package.json
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"name": "project",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"private": true,
|
|
5
|
-
"packageManager": "bun@1.3.
|
|
5
|
+
"packageManager": "bun@1.3.11",
|
|
6
6
|
"engines": {
|
|
7
|
-
"node": ">=24.14.
|
|
7
|
+
"node": ">=24.14.1"
|
|
8
8
|
},
|
|
9
9
|
"workspaces": [
|
|
10
10
|
"api",
|
|
@@ -23,13 +23,13 @@
|
|
|
23
23
|
"update": "bunx taze -I -rwi"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@kevinmarrec/eslint-config": "^1.
|
|
27
|
-
"@kevinmarrec/stylelint-config": "^1.
|
|
28
|
-
"@kevinmarrec/tsconfig": "^1.
|
|
29
|
-
"eslint": "^
|
|
30
|
-
"knip": "^
|
|
31
|
-
"stylelint": "^17.
|
|
32
|
-
"typescript": "~
|
|
33
|
-
"vue-tsc": "^3.2.
|
|
26
|
+
"@kevinmarrec/eslint-config": "^1.14.0",
|
|
27
|
+
"@kevinmarrec/stylelint-config": "^1.14.0",
|
|
28
|
+
"@kevinmarrec/tsconfig": "^1.14.0",
|
|
29
|
+
"eslint": "^10.1.0",
|
|
30
|
+
"knip": "^6.1.0",
|
|
31
|
+
"stylelint": "^17.6.0",
|
|
32
|
+
"typescript": "~6.0.2",
|
|
33
|
+
"vue-tsc": "^3.2.6"
|
|
34
34
|
}
|
|
35
35
|
}
|