@ykdz/template 0.0.1 → 0.0.2
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/cli.js +66 -89
- package/dist/declarations.js +1 -1
- package/dist/devcontainer.d.ts +17 -0
- package/dist/devcontainer.d.ts.map +1 -0
- package/dist/devcontainer.js +23 -0
- package/dist/generation-context.d.ts +24 -0
- package/dist/generation-context.d.ts.map +1 -0
- package/dist/generation-context.js +12 -0
- package/dist/hono-api.d.ts +1 -0
- package/dist/hono-api.d.ts.map +1 -1
- package/dist/hono-api.js +55 -53
- package/dist/module-graph.d.ts +45 -0
- package/dist/module-graph.d.ts.map +1 -0
- package/dist/module-graph.js +187 -0
- package/dist/next-step-instructions.d.ts +22 -0
- package/dist/next-step-instructions.d.ts.map +1 -0
- package/dist/next-step-instructions.js +99 -0
- package/dist/project-github.d.ts +36 -0
- package/dist/project-github.d.ts.map +1 -0
- package/dist/project-github.js +96 -0
- package/dist/renderer.d.ts.map +1 -1
- package/dist/renderer.js +0 -3
- package/dist/rust-bin.d.ts +7 -1
- package/dist/rust-bin.d.ts.map +1 -1
- package/dist/rust-bin.js +70 -36
- package/dist/toolchain-resolution.d.ts +35 -0
- package/dist/toolchain-resolution.d.ts.map +1 -0
- package/dist/toolchain-resolution.js +192 -0
- package/dist/ts-lib.d.ts +7 -1
- package/dist/ts-lib.d.ts.map +1 -1
- package/dist/ts-lib.js +87 -54
- package/dist/vue-app.d.ts +1 -0
- package/dist/vue-app.d.ts.map +1 -1
- package/dist/vue-app.js +70 -68
- package/dist/vue-hono-app.d.ts +3 -0
- package/dist/vue-hono-app.d.ts.map +1 -1
- package/dist/vue-hono-app.js +111 -107
- package/package.json +2 -1
- package/templates/rust-bin/.github/dependabot.yml +4 -0
- package/templates/rust-bin/.github/workflows/check.yml +6 -1
- package/dist/post-commands.d.ts +0 -40
- package/dist/post-commands.d.ts.map +0 -1
- package/dist/post-commands.js +0 -154
package/dist/vue-app.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
import { fileURLToPath } from "node:url";
|
|
3
|
+
import { nodePnpmDevcontainer } from "./devcontainer.js";
|
|
4
|
+
import { planNodeChecks, planNodeFixes, renderFixCommand, renderRootCheckCommand, } from "./module-graph.js";
|
|
5
|
+
import { projectPresetDependabotConfig, projectPresetGithubCheckWorkflow } from "./project-github.js";
|
|
3
6
|
import { renderNewProject } from "./renderer.js";
|
|
4
7
|
const features = [
|
|
5
8
|
"pnpm-catalog",
|
|
@@ -9,40 +12,43 @@ const features = [
|
|
|
9
12
|
"fix-command",
|
|
10
13
|
"devcontainer",
|
|
11
14
|
"github-actions",
|
|
12
|
-
"dependabot"
|
|
15
|
+
"dependabot",
|
|
13
16
|
];
|
|
14
17
|
const generatedBy = {
|
|
15
18
|
packageName: "@ykdz/template",
|
|
16
19
|
version: "0.0.0",
|
|
17
|
-
command: "template init --preset vue-app"
|
|
20
|
+
command: "template init --preset vue-app",
|
|
18
21
|
};
|
|
19
22
|
function projectNameFromDir(targetDir) {
|
|
20
23
|
return path.basename(path.resolve(targetDir));
|
|
21
24
|
}
|
|
25
|
+
export function projectVueAppPackageScripts() {
|
|
26
|
+
return {
|
|
27
|
+
build: "vite build",
|
|
28
|
+
check: renderRootCheckCommand(planNodeChecks("vue-app")),
|
|
29
|
+
dev: "vite",
|
|
30
|
+
fix: renderFixCommand(planNodeFixes("vue-app")),
|
|
31
|
+
"format:check": "oxfmt --check .",
|
|
32
|
+
"format:write": "oxfmt --write .",
|
|
33
|
+
lint: "oxlint . --deny-warnings",
|
|
34
|
+
"lint:fix": "oxlint . --fix --deny-warnings",
|
|
35
|
+
preview: "vite preview",
|
|
36
|
+
test: "vitest run",
|
|
37
|
+
"test:e2e": "pnpm run build && playwright test",
|
|
38
|
+
typecheck: "vue-tsc --build --noEmit",
|
|
39
|
+
};
|
|
40
|
+
}
|
|
22
41
|
function packageJson(projectName) {
|
|
23
42
|
return {
|
|
24
43
|
name: projectName,
|
|
25
44
|
version: "0.0.0",
|
|
26
45
|
private: true,
|
|
27
46
|
type: "module",
|
|
28
|
-
scripts:
|
|
29
|
-
build: "vite build",
|
|
30
|
-
check: "pnpm run format:check && pnpm run lint && pnpm run typecheck && pnpm run build && pnpm run test && pnpm run test:e2e",
|
|
31
|
-
dev: "vite",
|
|
32
|
-
fix: "pnpm run format:write && pnpm run lint:fix",
|
|
33
|
-
"format:check": "oxfmt --check .",
|
|
34
|
-
"format:write": "oxfmt --write .",
|
|
35
|
-
lint: "oxlint . --deny-warnings",
|
|
36
|
-
"lint:fix": "oxlint . --fix --deny-warnings",
|
|
37
|
-
preview: "vite preview",
|
|
38
|
-
test: "vitest run",
|
|
39
|
-
"test:e2e": "pnpm run build && playwright test",
|
|
40
|
-
typecheck: "vue-tsc --build --noEmit"
|
|
41
|
-
},
|
|
47
|
+
scripts: projectVueAppPackageScripts(),
|
|
42
48
|
dependencies: {
|
|
43
49
|
"@vueuse/core": "catalog:",
|
|
44
50
|
pinia: "catalog:",
|
|
45
|
-
vue: "catalog:"
|
|
51
|
+
vue: "catalog:",
|
|
46
52
|
},
|
|
47
53
|
devDependencies: {
|
|
48
54
|
"@playwright/test": "catalog:",
|
|
@@ -57,12 +63,12 @@ function packageJson(projectName) {
|
|
|
57
63
|
typescript: "catalog:",
|
|
58
64
|
vite: "catalog:",
|
|
59
65
|
vitest: "catalog:",
|
|
60
|
-
"vue-tsc": "catalog:"
|
|
66
|
+
"vue-tsc": "catalog:",
|
|
61
67
|
},
|
|
62
68
|
engines: {
|
|
63
|
-
node: "22"
|
|
69
|
+
node: "22",
|
|
64
70
|
},
|
|
65
|
-
packageManager: "pnpm@10.0.0"
|
|
71
|
+
packageManager: "pnpm@10.0.0",
|
|
66
72
|
};
|
|
67
73
|
}
|
|
68
74
|
function operationsForVueApp(projectName) {
|
|
@@ -70,7 +76,7 @@ function operationsForVueApp(projectName) {
|
|
|
70
76
|
{
|
|
71
77
|
kind: "writeJson",
|
|
72
78
|
to: "package.json",
|
|
73
|
-
value: packageJson(projectName)
|
|
79
|
+
value: packageJson(projectName),
|
|
74
80
|
},
|
|
75
81
|
{
|
|
76
82
|
kind: "writeText",
|
|
@@ -99,8 +105,8 @@ function operationsForVueApp(projectName) {
|
|
|
99
105
|
" vitest: ^4.1.9",
|
|
100
106
|
" vue: ^3.5.26",
|
|
101
107
|
" vue-tsc: ^3.1.8",
|
|
102
|
-
""
|
|
103
|
-
].join("\n")
|
|
108
|
+
"",
|
|
109
|
+
].join("\n"),
|
|
104
110
|
},
|
|
105
111
|
{
|
|
106
112
|
kind: "writeJson",
|
|
@@ -110,9 +116,9 @@ function operationsForVueApp(projectName) {
|
|
|
110
116
|
references: [
|
|
111
117
|
{ path: "./tsconfig.app.json" },
|
|
112
118
|
{ path: "./tsconfig.test.json" },
|
|
113
|
-
{ path: "./tsconfig.node.json" }
|
|
114
|
-
]
|
|
115
|
-
}
|
|
119
|
+
{ path: "./tsconfig.node.json" },
|
|
120
|
+
],
|
|
121
|
+
},
|
|
116
122
|
},
|
|
117
123
|
{
|
|
118
124
|
kind: "writeJson",
|
|
@@ -126,16 +132,16 @@ function operationsForVueApp(projectName) {
|
|
|
126
132
|
moduleResolution: "Bundler",
|
|
127
133
|
noEmitOnError: true,
|
|
128
134
|
paths: {
|
|
129
|
-
"@/*": ["./src/*"]
|
|
135
|
+
"@/*": ["./src/*"],
|
|
130
136
|
},
|
|
131
137
|
skipLibCheck: false,
|
|
132
138
|
strict: true,
|
|
133
139
|
target: "ES2022",
|
|
134
140
|
tsBuildInfoFile: "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
|
135
|
-
types: ["web-bluetooth"]
|
|
141
|
+
types: ["web-bluetooth"],
|
|
136
142
|
},
|
|
137
|
-
include: ["env.d.ts", "src/**/*.ts", "src/**/*.vue"]
|
|
138
|
-
}
|
|
143
|
+
include: ["env.d.ts", "src/**/*.ts", "src/**/*.vue"],
|
|
144
|
+
},
|
|
139
145
|
},
|
|
140
146
|
{
|
|
141
147
|
kind: "writeJson",
|
|
@@ -145,10 +151,10 @@ function operationsForVueApp(projectName) {
|
|
|
145
151
|
compilerOptions: {
|
|
146
152
|
lib: ["ESNext", "DOM", "DOM.Iterable"],
|
|
147
153
|
tsBuildInfoFile: "./node_modules/.tmp/tsconfig.test.tsbuildinfo",
|
|
148
|
-
types: ["node", "vitest/globals", "web-bluetooth"]
|
|
154
|
+
types: ["node", "vitest/globals", "web-bluetooth"],
|
|
149
155
|
},
|
|
150
|
-
include: ["env.d.ts", "src/**/*.ts", "src/**/*.vue", "test/**/*.ts"]
|
|
151
|
-
}
|
|
156
|
+
include: ["env.d.ts", "src/**/*.ts", "src/**/*.vue", "test/**/*.ts"],
|
|
157
|
+
},
|
|
152
158
|
},
|
|
153
159
|
{
|
|
154
160
|
kind: "writeJson",
|
|
@@ -164,82 +170,82 @@ function operationsForVueApp(projectName) {
|
|
|
164
170
|
strict: true,
|
|
165
171
|
target: "ES2022",
|
|
166
172
|
tsBuildInfoFile: "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
|
|
167
|
-
types: ["node"]
|
|
173
|
+
types: ["node"],
|
|
168
174
|
},
|
|
169
|
-
include: ["playwright.config.ts", "vite.config.ts", "vitest.config.ts"]
|
|
170
|
-
}
|
|
175
|
+
include: ["playwright.config.ts", "vite.config.ts", "vitest.config.ts"],
|
|
176
|
+
},
|
|
171
177
|
},
|
|
172
178
|
{
|
|
173
179
|
kind: "copyFile",
|
|
174
180
|
sourceRoot: "sharedOxc",
|
|
175
181
|
from: "vue/oxlint.config.ts",
|
|
176
|
-
to: "oxlint.config.ts"
|
|
182
|
+
to: "oxlint.config.ts",
|
|
177
183
|
},
|
|
178
184
|
{
|
|
179
185
|
kind: "copyFile",
|
|
180
186
|
sourceRoot: "sharedOxc",
|
|
181
187
|
from: "oxfmt.config.ts",
|
|
182
|
-
to: "oxfmt.config.ts"
|
|
188
|
+
to: "oxfmt.config.ts",
|
|
183
189
|
},
|
|
184
190
|
{
|
|
185
191
|
kind: "writeText",
|
|
186
192
|
to: ".gitignore",
|
|
187
|
-
text: ["node_modules", "dist", "playwright-report", "test-results", ".env", ""].join("\n")
|
|
193
|
+
text: ["node_modules", "dist", "playwright-report", "test-results", ".env", ""].join("\n"),
|
|
188
194
|
},
|
|
189
195
|
{
|
|
190
196
|
kind: "copyFile",
|
|
191
197
|
from: "env.d.ts",
|
|
192
|
-
to: "env.d.ts"
|
|
198
|
+
to: "env.d.ts",
|
|
193
199
|
},
|
|
194
200
|
{
|
|
195
201
|
kind: "copyFile",
|
|
196
202
|
from: "index.html",
|
|
197
|
-
to: "index.html"
|
|
203
|
+
to: "index.html",
|
|
198
204
|
},
|
|
199
205
|
{
|
|
200
206
|
kind: "copyFile",
|
|
201
207
|
from: "playwright.config.ts",
|
|
202
|
-
to: "playwright.config.ts"
|
|
208
|
+
to: "playwright.config.ts",
|
|
203
209
|
},
|
|
204
210
|
{
|
|
205
211
|
kind: "copyFile",
|
|
206
212
|
from: "vite.config.ts",
|
|
207
|
-
to: "vite.config.ts"
|
|
213
|
+
to: "vite.config.ts",
|
|
208
214
|
},
|
|
209
215
|
{
|
|
210
216
|
kind: "copyFile",
|
|
211
217
|
from: "vitest.config.ts",
|
|
212
|
-
to: "vitest.config.ts"
|
|
218
|
+
to: "vitest.config.ts",
|
|
213
219
|
},
|
|
214
220
|
{
|
|
215
221
|
kind: "copyFile",
|
|
216
222
|
from: "src/App.vue",
|
|
217
|
-
to: "src/App.vue"
|
|
223
|
+
to: "src/App.vue",
|
|
218
224
|
},
|
|
219
225
|
{
|
|
220
226
|
kind: "copyFile",
|
|
221
227
|
from: "src/main.ts",
|
|
222
|
-
to: "src/main.ts"
|
|
228
|
+
to: "src/main.ts",
|
|
223
229
|
},
|
|
224
230
|
{
|
|
225
231
|
kind: "copyFile",
|
|
226
232
|
from: "src/style.css",
|
|
227
|
-
to: "src/style.css"
|
|
233
|
+
to: "src/style.css",
|
|
228
234
|
},
|
|
229
235
|
{
|
|
230
236
|
kind: "copyFile",
|
|
231
237
|
from: "src/stores/counter.ts",
|
|
232
|
-
to: "src/stores/counter.ts"
|
|
238
|
+
to: "src/stores/counter.ts",
|
|
233
239
|
},
|
|
234
240
|
{
|
|
235
241
|
kind: "copyFile",
|
|
236
242
|
from: "test/app.test.ts",
|
|
237
|
-
to: "test/app.test.ts"
|
|
243
|
+
to: "test/app.test.ts",
|
|
238
244
|
},
|
|
239
245
|
{
|
|
240
246
|
kind: "copyFile",
|
|
241
247
|
from: "test/e2e/app.spec.ts",
|
|
242
|
-
to: "test/e2e/app.spec.ts"
|
|
248
|
+
to: "test/e2e/app.spec.ts",
|
|
243
249
|
},
|
|
244
250
|
{
|
|
245
251
|
kind: "writeJson",
|
|
@@ -249,38 +255,34 @@ function operationsForVueApp(projectName) {
|
|
|
249
255
|
preset: "vue-app",
|
|
250
256
|
packageManager: "pnpm",
|
|
251
257
|
projectKind: "single-package",
|
|
252
|
-
features
|
|
253
|
-
}
|
|
258
|
+
features,
|
|
259
|
+
},
|
|
254
260
|
},
|
|
255
261
|
{
|
|
256
262
|
kind: "writeJson",
|
|
257
263
|
to: ".project-kit/generated-by.json",
|
|
258
|
-
value: generatedBy
|
|
264
|
+
value: generatedBy,
|
|
259
265
|
},
|
|
260
266
|
{
|
|
261
267
|
kind: "writeJson",
|
|
262
268
|
to: ".devcontainer/devcontainer.json",
|
|
263
|
-
value: {
|
|
269
|
+
value: nodePnpmDevcontainer({
|
|
264
270
|
name: `${projectName} Vue development`,
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
extensions: ["Vue.volar", "oxc.oxc-vscode"]
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
}
|
|
271
|
+
nodeVersion: "22",
|
|
272
|
+
packageManagerPin: "pnpm@10.0.0",
|
|
273
|
+
extensions: ["Vue.volar", "oxc.oxc-vscode"],
|
|
274
|
+
}),
|
|
273
275
|
},
|
|
274
276
|
{
|
|
275
|
-
kind: "
|
|
276
|
-
from: ".github/workflows/check.yml",
|
|
277
|
+
kind: "writeText",
|
|
277
278
|
to: ".github/workflows/check.yml",
|
|
279
|
+
text: projectPresetGithubCheckWorkflow("vue-app"),
|
|
278
280
|
},
|
|
279
281
|
{
|
|
280
|
-
kind: "
|
|
281
|
-
from: ".github/dependabot.yml",
|
|
282
|
+
kind: "writeText",
|
|
282
283
|
to: ".github/dependabot.yml",
|
|
283
|
-
|
|
284
|
+
text: projectPresetDependabotConfig("vue-app"),
|
|
285
|
+
},
|
|
284
286
|
];
|
|
285
287
|
}
|
|
286
288
|
function templateSourceRoot() {
|
|
@@ -294,6 +296,6 @@ export async function initVueAppProject(targetDir) {
|
|
|
294
296
|
sourceRoot: templateSourceRoot(),
|
|
295
297
|
sourceRoots: { sharedOxc: sharedOxcSourceRoot() },
|
|
296
298
|
targetRoot: targetDir,
|
|
297
|
-
operations: operationsForVueApp(projectNameFromDir(targetDir))
|
|
299
|
+
operations: operationsForVueApp(projectNameFromDir(targetDir)),
|
|
298
300
|
});
|
|
299
301
|
}
|
package/dist/vue-hono-app.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
export declare function projectVueHonoRootPackageScripts(): Record<string, string>;
|
|
2
|
+
export declare function projectVueHonoApiPackageScripts(): Record<string, string>;
|
|
3
|
+
export declare function projectVueHonoWebPackageScripts(): Record<string, string>;
|
|
1
4
|
export declare function initVueHonoAppProject(targetDir: string, options?: {
|
|
2
5
|
scope?: string;
|
|
3
6
|
}): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vue-hono-app.d.ts","sourceRoot":"","sources":["../src/vue-hono-app.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"vue-hono-app.d.ts","sourceRoot":"","sources":["../src/vue-hono-app.ts"],"names":[],"mappings":"AAqCA,wBAAgB,gCAAgC,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAMzE;AAED,wBAAgB,+BAA+B,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAcxE;AAED,wBAAgB,+BAA+B,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAexE;AA4XD,wBAAsB,qBAAqB,CACzC,SAAS,EAAE,MAAM,EACjB,OAAO,GAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAO,GAC/B,OAAO,CAAC,IAAI,CAAC,CASf"}
|