@ykdz/template 0.0.2 → 0.0.4

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 (95) hide show
  1. package/README.md +1 -1
  2. package/dist/src/cli.d.ts +2 -0
  3. package/dist/{cli.js → src/cli.js} +91 -58
  4. package/dist/{declarations.d.ts → src/declarations.d.ts} +3 -5
  5. package/dist/{declarations.js → src/declarations.js} +48 -145
  6. package/dist/src/dependency-catalog.d.ts +18 -0
  7. package/dist/src/dependency-catalog.js +132 -0
  8. package/dist/src/devcontainer.d.ts +58 -0
  9. package/dist/src/devcontainer.js +202 -0
  10. package/dist/src/editor-customization.d.ts +12 -0
  11. package/dist/src/editor-customization.js +108 -0
  12. package/dist/{generation-context.d.ts → src/generation-context.d.ts} +2 -3
  13. package/dist/{generation-context.js → src/generation-context.js} +4 -1
  14. package/dist/src/module-graph.d.ts +34 -0
  15. package/dist/src/module-graph.js +58 -0
  16. package/dist/{next-step-instructions.d.ts → src/next-step-instructions.d.ts} +2 -4
  17. package/dist/{next-step-instructions.js → src/next-step-instructions.js} +49 -24
  18. package/dist/{package-addition.d.ts → src/package-addition.d.ts} +1 -1
  19. package/dist/src/package-addition.js +343 -0
  20. package/dist/src/preset-projection.d.ts +66 -0
  21. package/dist/src/preset-projection.js +7 -0
  22. package/dist/{project-github.d.ts → src/project-github.d.ts} +3 -9
  23. package/dist/{project-github.js → src/project-github.js} +27 -42
  24. package/dist/{renderer.d.ts → src/renderer.d.ts} +16 -2
  25. package/dist/{renderer.js → src/renderer.js} +95 -12
  26. package/dist/src/runtime-paths.d.ts +1 -0
  27. package/dist/src/runtime-paths.js +11 -0
  28. package/dist/src/template-boundary-check.d.ts +34 -0
  29. package/dist/src/template-boundary-check.js +448 -0
  30. package/dist/{toolchain-resolution.d.ts → src/toolchain-resolution.d.ts} +0 -1
  31. package/dist/{toolchain-resolution.js → src/toolchain-resolution.js} +1 -1
  32. package/dist/templates/hono-api/projection.d.ts +6 -0
  33. package/dist/templates/hono-api/projection.js +538 -0
  34. package/dist/templates/projection-plans.d.ts +7 -0
  35. package/dist/templates/projection-plans.js +94 -0
  36. package/dist/templates/registry.d.ts +7 -0
  37. package/dist/templates/registry.js +42 -0
  38. package/dist/templates/rust-bin/projection.d.ts +9 -0
  39. package/dist/templates/rust-bin/projection.js +390 -0
  40. package/dist/templates/ts-lib/projection.d.ts +6 -0
  41. package/dist/templates/ts-lib/projection.js +523 -0
  42. package/dist/templates/vue-app/projection.d.ts +6 -0
  43. package/dist/templates/vue-app/projection.js +757 -0
  44. package/dist/templates/vue-hono-app/projection.d.ts +8 -0
  45. package/dist/templates/vue-hono-app/projection.js +693 -0
  46. package/package.json +38 -28
  47. package/pnpm-workspace.yaml +35 -0
  48. package/templates/hono-api/.github/dependabot.yml +13 -0
  49. package/templates/rust-bin/.github/dependabot.yml +18 -1
  50. package/templates/rust-bin/rust-toolchain.toml +3 -0
  51. package/templates/rust-bin/rustfmt.toml +2 -0
  52. package/templates/shared/devcontainer/browser-test.Dockerfile +2 -0
  53. package/templates/shared/devcontainer/node-pnpm.Dockerfile +6 -0
  54. package/templates/shared/devcontainer/rust.Dockerfile +16 -0
  55. package/templates/shared/editor-customization/capabilities.json +56 -0
  56. package/templates/ts-lib/.github/dependabot.yml +13 -0
  57. package/templates/ts-lib/src/index.ts +5 -1
  58. package/templates/vue-app/.github/dependabot.yml +13 -0
  59. package/templates/vue-app/.github/workflows/check.yml +1 -1
  60. package/templates/vue-app/test/e2e/app.spec.ts +4 -1
  61. package/templates/vue-hono-app/.github/dependabot.yml +13 -0
  62. package/templates/vue-hono-app/web/test/e2e/app.spec.ts +4 -1
  63. package/dist/cli.d.ts +0 -3
  64. package/dist/cli.d.ts.map +0 -1
  65. package/dist/declarations.d.ts.map +0 -1
  66. package/dist/devcontainer.d.ts +0 -17
  67. package/dist/devcontainer.d.ts.map +0 -1
  68. package/dist/devcontainer.js +0 -23
  69. package/dist/generation-context.d.ts.map +0 -1
  70. package/dist/hono-api.d.ts +0 -3
  71. package/dist/hono-api.d.ts.map +0 -1
  72. package/dist/hono-api.js +0 -210
  73. package/dist/module-graph.d.ts +0 -45
  74. package/dist/module-graph.d.ts.map +0 -1
  75. package/dist/module-graph.js +0 -187
  76. package/dist/next-step-instructions.d.ts.map +0 -1
  77. package/dist/package-addition.d.ts.map +0 -1
  78. package/dist/package-addition.js +0 -560
  79. package/dist/project-github.d.ts.map +0 -1
  80. package/dist/renderer.d.ts.map +0 -1
  81. package/dist/rust-bin.d.ts +0 -8
  82. package/dist/rust-bin.d.ts.map +0 -1
  83. package/dist/rust-bin.js +0 -208
  84. package/dist/toolchain-resolution.d.ts.map +0 -1
  85. package/dist/ts-lib.d.ts +0 -8
  86. package/dist/ts-lib.d.ts.map +0 -1
  87. package/dist/ts-lib.js +0 -214
  88. package/dist/vue-app.d.ts +0 -3
  89. package/dist/vue-app.d.ts.map +0 -1
  90. package/dist/vue-app.js +0 -301
  91. package/dist/vue-hono-app.d.ts +0 -7
  92. package/dist/vue-hono-app.d.ts.map +0 -1
  93. package/dist/vue-hono-app.js +0 -440
  94. package/templates/shared/oxc/package.json +0 -18
  95. package/templates/shared/oxc/tsconfig.json +0 -11
package/dist/vue-app.js DELETED
@@ -1,301 +0,0 @@
1
- import path from "node:path";
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";
6
- import { renderNewProject } from "./renderer.js";
7
- const features = [
8
- "pnpm-catalog",
9
- "oxc-format-lint",
10
- "strict-typescript",
11
- "root-check",
12
- "fix-command",
13
- "devcontainer",
14
- "github-actions",
15
- "dependabot",
16
- ];
17
- const generatedBy = {
18
- packageName: "@ykdz/template",
19
- version: "0.0.0",
20
- command: "template init --preset vue-app",
21
- };
22
- function projectNameFromDir(targetDir) {
23
- return path.basename(path.resolve(targetDir));
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
- }
41
- function packageJson(projectName) {
42
- return {
43
- name: projectName,
44
- version: "0.0.0",
45
- private: true,
46
- type: "module",
47
- scripts: projectVueAppPackageScripts(),
48
- dependencies: {
49
- "@vueuse/core": "catalog:",
50
- pinia: "catalog:",
51
- vue: "catalog:",
52
- },
53
- devDependencies: {
54
- "@playwright/test": "catalog:",
55
- "@tailwindcss/vite": "catalog:",
56
- "@types/node": "catalog:",
57
- "@types/web-bluetooth": "catalog:",
58
- "@vitejs/plugin-vue": "catalog:",
59
- "@vue/tsconfig": "catalog:",
60
- oxfmt: "catalog:",
61
- oxlint: "catalog:",
62
- tailwindcss: "catalog:",
63
- typescript: "catalog:",
64
- vite: "catalog:",
65
- vitest: "catalog:",
66
- "vue-tsc": "catalog:",
67
- },
68
- engines: {
69
- node: "22",
70
- },
71
- packageManager: "pnpm@10.0.0",
72
- };
73
- }
74
- function operationsForVueApp(projectName) {
75
- return [
76
- {
77
- kind: "writeJson",
78
- to: "package.json",
79
- value: packageJson(projectName),
80
- },
81
- {
82
- kind: "writeText",
83
- to: "pnpm-workspace.yaml",
84
- text: [
85
- "packages:",
86
- " - .",
87
- "",
88
- "allowBuilds:",
89
- " esbuild: true",
90
- "",
91
- "catalog:",
92
- ' "@playwright/test": ^1.57.0',
93
- ' "@tailwindcss/vite": ^4.1.18',
94
- ' "@types/node": ^24.0.0',
95
- ' "@types/web-bluetooth": ^0.0.21',
96
- ' "@vitejs/plugin-vue": ^6.0.2',
97
- ' "@vue/tsconfig": ^0.8.1',
98
- ' "@vueuse/core": ^14.1.0',
99
- " oxfmt: ^0.56.0",
100
- " oxlint: ^1.71.0",
101
- " pinia: ^3.0.4",
102
- " tailwindcss: ^4.1.18",
103
- " typescript: ^5.8.0",
104
- " vite: ^7.3.0",
105
- " vitest: ^4.1.9",
106
- " vue: ^3.5.26",
107
- " vue-tsc: ^3.1.8",
108
- "",
109
- ].join("\n"),
110
- },
111
- {
112
- kind: "writeJson",
113
- to: "tsconfig.json",
114
- value: {
115
- files: [],
116
- references: [
117
- { path: "./tsconfig.app.json" },
118
- { path: "./tsconfig.test.json" },
119
- { path: "./tsconfig.node.json" },
120
- ],
121
- },
122
- },
123
- {
124
- kind: "writeJson",
125
- to: "tsconfig.app.json",
126
- value: {
127
- extends: "@vue/tsconfig/tsconfig.dom.json",
128
- compilerOptions: {
129
- baseUrl: ".",
130
- composite: true,
131
- module: "ESNext",
132
- moduleResolution: "Bundler",
133
- noEmitOnError: true,
134
- paths: {
135
- "@/*": ["./src/*"],
136
- },
137
- skipLibCheck: false,
138
- strict: true,
139
- target: "ES2022",
140
- tsBuildInfoFile: "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
141
- types: ["web-bluetooth"],
142
- },
143
- include: ["env.d.ts", "src/**/*.ts", "src/**/*.vue"],
144
- },
145
- },
146
- {
147
- kind: "writeJson",
148
- to: "tsconfig.test.json",
149
- value: {
150
- extends: "./tsconfig.app.json",
151
- compilerOptions: {
152
- lib: ["ESNext", "DOM", "DOM.Iterable"],
153
- tsBuildInfoFile: "./node_modules/.tmp/tsconfig.test.tsbuildinfo",
154
- types: ["node", "vitest/globals", "web-bluetooth"],
155
- },
156
- include: ["env.d.ts", "src/**/*.ts", "src/**/*.vue", "test/**/*.ts"],
157
- },
158
- },
159
- {
160
- kind: "writeJson",
161
- to: "tsconfig.node.json",
162
- value: {
163
- compilerOptions: {
164
- composite: true,
165
- module: "ESNext",
166
- moduleResolution: "Bundler",
167
- noEmitOnError: true,
168
- lib: ["ESNext", "DOM", "DOM.Iterable"],
169
- skipLibCheck: false,
170
- strict: true,
171
- target: "ES2022",
172
- tsBuildInfoFile: "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
173
- types: ["node"],
174
- },
175
- include: ["playwright.config.ts", "vite.config.ts", "vitest.config.ts"],
176
- },
177
- },
178
- {
179
- kind: "copyFile",
180
- sourceRoot: "sharedOxc",
181
- from: "vue/oxlint.config.ts",
182
- to: "oxlint.config.ts",
183
- },
184
- {
185
- kind: "copyFile",
186
- sourceRoot: "sharedOxc",
187
- from: "oxfmt.config.ts",
188
- to: "oxfmt.config.ts",
189
- },
190
- {
191
- kind: "writeText",
192
- to: ".gitignore",
193
- text: ["node_modules", "dist", "playwright-report", "test-results", ".env", ""].join("\n"),
194
- },
195
- {
196
- kind: "copyFile",
197
- from: "env.d.ts",
198
- to: "env.d.ts",
199
- },
200
- {
201
- kind: "copyFile",
202
- from: "index.html",
203
- to: "index.html",
204
- },
205
- {
206
- kind: "copyFile",
207
- from: "playwright.config.ts",
208
- to: "playwright.config.ts",
209
- },
210
- {
211
- kind: "copyFile",
212
- from: "vite.config.ts",
213
- to: "vite.config.ts",
214
- },
215
- {
216
- kind: "copyFile",
217
- from: "vitest.config.ts",
218
- to: "vitest.config.ts",
219
- },
220
- {
221
- kind: "copyFile",
222
- from: "src/App.vue",
223
- to: "src/App.vue",
224
- },
225
- {
226
- kind: "copyFile",
227
- from: "src/main.ts",
228
- to: "src/main.ts",
229
- },
230
- {
231
- kind: "copyFile",
232
- from: "src/style.css",
233
- to: "src/style.css",
234
- },
235
- {
236
- kind: "copyFile",
237
- from: "src/stores/counter.ts",
238
- to: "src/stores/counter.ts",
239
- },
240
- {
241
- kind: "copyFile",
242
- from: "test/app.test.ts",
243
- to: "test/app.test.ts",
244
- },
245
- {
246
- kind: "copyFile",
247
- from: "test/e2e/app.spec.ts",
248
- to: "test/e2e/app.spec.ts",
249
- },
250
- {
251
- kind: "writeJson",
252
- to: ".project-kit/blueprint.json",
253
- value: {
254
- schemaVersion: 1,
255
- preset: "vue-app",
256
- packageManager: "pnpm",
257
- projectKind: "single-package",
258
- features,
259
- },
260
- },
261
- {
262
- kind: "writeJson",
263
- to: ".project-kit/generated-by.json",
264
- value: generatedBy,
265
- },
266
- {
267
- kind: "writeJson",
268
- to: ".devcontainer/devcontainer.json",
269
- value: nodePnpmDevcontainer({
270
- name: `${projectName} Vue development`,
271
- nodeVersion: "22",
272
- packageManagerPin: "pnpm@10.0.0",
273
- extensions: ["Vue.volar", "oxc.oxc-vscode"],
274
- }),
275
- },
276
- {
277
- kind: "writeText",
278
- to: ".github/workflows/check.yml",
279
- text: projectPresetGithubCheckWorkflow("vue-app"),
280
- },
281
- {
282
- kind: "writeText",
283
- to: ".github/dependabot.yml",
284
- text: projectPresetDependabotConfig("vue-app"),
285
- },
286
- ];
287
- }
288
- function templateSourceRoot() {
289
- return path.join(path.dirname(fileURLToPath(import.meta.url)), "..", "templates", "vue-app");
290
- }
291
- function sharedOxcSourceRoot() {
292
- return path.join(path.dirname(fileURLToPath(import.meta.url)), "..", "templates", "shared", "oxc");
293
- }
294
- export async function initVueAppProject(targetDir) {
295
- await renderNewProject({
296
- sourceRoot: templateSourceRoot(),
297
- sourceRoots: { sharedOxc: sharedOxcSourceRoot() },
298
- targetRoot: targetDir,
299
- operations: operationsForVueApp(projectNameFromDir(targetDir)),
300
- });
301
- }
@@ -1,7 +0,0 @@
1
- export declare function projectVueHonoRootPackageScripts(): Record<string, string>;
2
- export declare function projectVueHonoApiPackageScripts(): Record<string, string>;
3
- export declare function projectVueHonoWebPackageScripts(): Record<string, string>;
4
- export declare function initVueHonoAppProject(targetDir: string, options?: {
5
- scope?: string;
6
- }): Promise<void>;
7
- //# sourceMappingURL=vue-hono-app.d.ts.map
@@ -1 +0,0 @@
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"}