@ykdz/template 0.0.3 → 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 (84) hide show
  1. package/README.md +1 -1
  2. package/dist/src/cli.d.ts +0 -1
  3. package/dist/src/cli.js +14 -2
  4. package/dist/src/declarations.d.ts +2 -3
  5. package/dist/src/declarations.js +46 -36
  6. package/dist/src/dependency-catalog.d.ts +9 -1
  7. package/dist/src/dependency-catalog.js +69 -0
  8. package/dist/src/devcontainer.d.ts +49 -9
  9. package/dist/src/devcontainer.js +192 -14
  10. package/dist/src/editor-customization.d.ts +0 -1
  11. package/dist/src/editor-customization.js +54 -47
  12. package/dist/src/generation-context.d.ts +0 -1
  13. package/dist/src/generation-context.js +4 -1
  14. package/dist/src/module-graph.d.ts +8 -5
  15. package/dist/src/module-graph.js +10 -0
  16. package/dist/src/next-step-instructions.d.ts +0 -1
  17. package/dist/src/next-step-instructions.js +35 -0
  18. package/dist/src/package-addition.d.ts +1 -1
  19. package/dist/src/package-addition.js +170 -15
  20. package/dist/src/preset-projection.d.ts +1 -1
  21. package/dist/src/project-github.d.ts +3 -2
  22. package/dist/src/project-github.js +24 -6
  23. package/dist/src/renderer.d.ts +16 -2
  24. package/dist/src/renderer.js +95 -12
  25. package/dist/src/runtime-paths.d.ts +0 -1
  26. package/dist/src/template-boundary-check.d.ts +34 -0
  27. package/dist/src/template-boundary-check.js +448 -0
  28. package/dist/src/toolchain-resolution.d.ts +0 -1
  29. package/dist/templates/hono-api/projection.d.ts +2 -3
  30. package/dist/templates/hono-api/projection.js +230 -69
  31. package/dist/templates/projection-plans.d.ts +0 -1
  32. package/dist/templates/registry.d.ts +0 -1
  33. package/dist/templates/registry.js +2 -2
  34. package/dist/templates/rust-bin/projection.d.ts +2 -3
  35. package/dist/templates/rust-bin/projection.js +161 -53
  36. package/dist/templates/ts-lib/projection.d.ts +2 -3
  37. package/dist/templates/ts-lib/projection.js +215 -64
  38. package/dist/templates/vue-app/projection.d.ts +2 -3
  39. package/dist/templates/vue-app/projection.js +246 -83
  40. package/dist/templates/vue-hono-app/projection.d.ts +0 -1
  41. package/dist/templates/vue-hono-app/projection.js +191 -87
  42. package/package.json +10 -5
  43. package/pnpm-workspace.yaml +1 -0
  44. package/templates/hono-api/.github/dependabot.yml +13 -0
  45. package/templates/rust-bin/.github/dependabot.yml +18 -1
  46. package/templates/rust-bin/rust-toolchain.toml +3 -0
  47. package/templates/rust-bin/rustfmt.toml +2 -0
  48. package/templates/shared/devcontainer/browser-test.Dockerfile +2 -0
  49. package/templates/shared/devcontainer/node-pnpm.Dockerfile +6 -0
  50. package/templates/shared/devcontainer/rust.Dockerfile +16 -0
  51. package/templates/shared/editor-customization/capabilities.json +56 -0
  52. package/templates/ts-lib/.github/dependabot.yml +13 -0
  53. package/templates/ts-lib/src/index.ts +5 -1
  54. package/templates/vue-app/.github/dependabot.yml +13 -0
  55. package/templates/vue-app/.github/workflows/check.yml +1 -1
  56. package/templates/vue-hono-app/.github/dependabot.yml +13 -0
  57. package/dist/src/cli.d.ts.map +0 -1
  58. package/dist/src/declarations.d.ts.map +0 -1
  59. package/dist/src/dependency-catalog.d.ts.map +0 -1
  60. package/dist/src/devcontainer.d.ts.map +0 -1
  61. package/dist/src/editor-customization.d.ts.map +0 -1
  62. package/dist/src/generation-context.d.ts.map +0 -1
  63. package/dist/src/module-graph.d.ts.map +0 -1
  64. package/dist/src/next-step-instructions.d.ts.map +0 -1
  65. package/dist/src/package-addition.d.ts.map +0 -1
  66. package/dist/src/preset-projection.d.ts.map +0 -1
  67. package/dist/src/project-github.d.ts.map +0 -1
  68. package/dist/src/renderer.d.ts.map +0 -1
  69. package/dist/src/runtime-paths.d.ts.map +0 -1
  70. package/dist/src/toolchain-resolution.d.ts.map +0 -1
  71. package/dist/templates/hono-api/projection.d.ts.map +0 -1
  72. package/dist/templates/projection-plans.d.ts.map +0 -1
  73. package/dist/templates/registry.d.ts.map +0 -1
  74. package/dist/templates/rust-bin/projection.d.ts.map +0 -1
  75. package/dist/templates/ts-lib/projection.d.ts.map +0 -1
  76. package/dist/templates/vue-app/projection.d.ts.map +0 -1
  77. package/dist/templates/vue-hono-app/projection.d.ts.map +0 -1
  78. package/templates/hono-api/projection.ts +0 -453
  79. package/templates/projection-plans.ts +0 -135
  80. package/templates/registry.ts +0 -59
  81. package/templates/rust-bin/projection.ts +0 -346
  82. package/templates/ts-lib/projection.ts +0 -454
  83. package/templates/vue-app/projection.ts +0 -687
  84. package/templates/vue-hono-app/projection.ts +0 -669
@@ -1,13 +1,11 @@
1
1
  import { existsSync } from "node:fs";
2
2
  import path from "node:path";
3
3
  import { fileURLToPath } from "node:url";
4
- import { renderGeneratedPnpmWorkspaceYaml } from "../../src/dependency-catalog.js";
5
- import { nodePnpmDevcontainer } from "../../src/devcontainer.js";
4
+ import { collectGeneratedManifestCatalogReferences, renderGeneratedPnpmWorkspaceYaml, } from "../../src/dependency-catalog.js";
5
+ import { browserTestToolLayer, checkedDockerfileFirstNodePnpmDevcontainer, nodePnpmToolLayer, } from "../../src/devcontainer.js";
6
6
  import { editorCustomizationForCapabilities } from "../../src/editor-customization.js";
7
7
  import { renderFixCommand, renderRootCheckCommand, } from "../../src/module-graph.js";
8
- import { projectCheckWorkflow, projectDependabotConfig, } from "../../src/project-github.js";
9
8
  import { renderNewProject } from "../../src/renderer.js";
10
- import { planNodeChecks, planNodeFixes } from "../projection-plans.js";
11
9
  const generatedBy = {
12
10
  packageName: "@ykdz/template",
13
11
  version: "0.0.0",
@@ -32,9 +30,97 @@ export const vueHonoAppPresetMetadata = {
32
30
  ],
33
31
  };
34
32
  const dependencyMaintenancePolicy = {
35
- ecosystems: ["npm", "github-actions"],
33
+ ecosystems: ["npm", "github-actions", "docker"],
36
34
  interval: "weekly",
37
35
  };
36
+ const rootBoundary = {
37
+ kind: "workspace-orchestration",
38
+ path: ".",
39
+ };
40
+ const apiPackageBoundary = {
41
+ kind: "package-boundary",
42
+ path: ".",
43
+ };
44
+ const webPackageBoundary = {
45
+ kind: "package-boundary",
46
+ path: ".",
47
+ };
48
+ const workspacePackageBoundary = {
49
+ kind: "package-boundary",
50
+ path: "apps/*",
51
+ };
52
+ const webWorkspaceBoundary = {
53
+ kind: "package-boundary",
54
+ path: "apps/web",
55
+ };
56
+ function honoApiCheckComponents(owner) {
57
+ return [
58
+ { kind: "oxc-format-check", owner },
59
+ { kind: "oxc-lint", owner },
60
+ { kind: "typescript-typecheck", owner },
61
+ { kind: "build", owner },
62
+ { kind: "unit-test", owner },
63
+ ];
64
+ }
65
+ function vueWebCheckComponents(owner) {
66
+ return [
67
+ { kind: "oxc-format-check", owner },
68
+ { kind: "oxc-lint", owner },
69
+ { kind: "typescript-typecheck", owner },
70
+ { kind: "build", owner },
71
+ { kind: "unit-test", owner },
72
+ { kind: "e2e-test", owner },
73
+ ];
74
+ }
75
+ function nodeFixComponents(owner) {
76
+ return [
77
+ { kind: "oxc-format-write", owner },
78
+ { kind: "oxc-lint-fix", owner },
79
+ ];
80
+ }
81
+ function planVueHonoRootChecks() {
82
+ return {
83
+ components: [
84
+ { kind: "oxc-format-check", owner: rootBoundary },
85
+ { kind: "oxc-lint", owner: rootBoundary },
86
+ { kind: "typescript-typecheck", owner: rootBoundary },
87
+ { kind: "turbo-package-check", owner: workspacePackageBoundary },
88
+ ],
89
+ environmentNeeds: [
90
+ {
91
+ kind: "playwright-browser-assets",
92
+ browser: "chromium",
93
+ owner: webWorkspaceBoundary,
94
+ },
95
+ ],
96
+ };
97
+ }
98
+ function planVueHonoRootFixes() {
99
+ return {
100
+ components: [
101
+ { kind: "oxc-format-write", owner: rootBoundary },
102
+ { kind: "oxc-lint-fix", owner: rootBoundary },
103
+ { kind: "turbo-package-fix", owner: workspacePackageBoundary },
104
+ ],
105
+ };
106
+ }
107
+ function planVueHonoApiChecks() {
108
+ return {
109
+ components: [...honoApiCheckComponents(apiPackageBoundary)],
110
+ environmentNeeds: [],
111
+ };
112
+ }
113
+ function planVueHonoWebChecks() {
114
+ return {
115
+ components: [...vueWebCheckComponents(webPackageBoundary)],
116
+ environmentNeeds: [],
117
+ };
118
+ }
119
+ function planVueHonoPackageFixes(owner) {
120
+ return {
121
+ components: [...nodeFixComponents(owner)],
122
+ };
123
+ }
38
124
  function projectNameFromDir(targetDir) {
39
125
  return path.basename(path.resolve(targetDir));
40
126
  }
@@ -60,21 +146,26 @@ export function vueHonoAppBlueprint(options) {
60
146
  }
61
147
  export function projectVueHonoRootPackageScripts() {
62
148
  return {
63
- check: renderRootCheckCommand(planNodeChecks("vue-hono-root")),
149
+ check: renderRootCheckCommand(planVueHonoRootChecks()),
64
150
  dev: "turbo run dev --parallel",
65
- fix: renderFixCommand(planNodeFixes("vue-hono-root")),
151
+ fix: renderFixCommand(planVueHonoRootFixes()),
152
+ "format:check": "oxfmt --check --config oxfmt.config.ts oxlint.config.ts oxfmt.config.ts",
153
+ "format:write": "oxfmt --write --config oxfmt.config.ts oxlint.config.ts oxfmt.config.ts",
154
+ lint: "oxlint --config oxlint.config.ts oxlint.config.ts oxfmt.config.ts --deny-warnings",
155
+ "lint:fix": "oxlint --config oxlint.config.ts oxlint.config.ts oxfmt.config.ts --fix --deny-warnings",
156
+ typecheck: "tsc -p tsconfig.config.json --noEmit",
66
157
  };
67
158
  }
68
159
  export function projectVueHonoApiPackageScripts() {
69
160
  return {
70
161
  build: "tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json",
71
- check: renderRootCheckCommand(planNodeChecks("vue-hono-api")),
162
+ check: renderRootCheckCommand(planVueHonoApiChecks()),
72
163
  dev: "tsx watch src/server.ts",
73
- fix: renderFixCommand(planNodeFixes("vue-hono-api")),
74
- "format:check": "oxfmt --check .",
75
- "format:write": "oxfmt --write .",
76
- lint: "oxlint . --deny-warnings",
77
- "lint:fix": "oxlint . --fix --deny-warnings",
164
+ fix: renderFixCommand(planVueHonoPackageFixes(apiPackageBoundary)),
165
+ "format:check": "oxfmt --check --config ../../oxfmt.config.ts .",
166
+ "format:write": "oxfmt --write --config ../../oxfmt.config.ts .",
167
+ lint: "oxlint --config ../../oxlint.config.ts . --deny-warnings",
168
+ "lint:fix": "oxlint --config ../../oxlint.config.ts . --fix --deny-warnings",
78
169
  start: "node dist/server.js",
79
170
  test: "vitest run",
80
171
  typecheck: "tsc -p tsconfig.json --noEmit",
@@ -83,13 +174,13 @@ export function projectVueHonoApiPackageScripts() {
83
174
  export function projectVueHonoWebPackageScripts() {
84
175
  return {
85
176
  build: "vite build",
86
- check: renderRootCheckCommand(planNodeChecks("vue-hono-web")),
177
+ check: renderRootCheckCommand(planVueHonoWebChecks()),
87
178
  dev: "vite",
88
- fix: renderFixCommand(planNodeFixes("vue-hono-web")),
89
- "format:check": "oxfmt --check .",
90
- "format:write": "oxfmt --write .",
91
- lint: "oxlint . --deny-warnings",
92
- "lint:fix": "oxlint . --fix --deny-warnings",
179
+ fix: renderFixCommand(planVueHonoPackageFixes(webPackageBoundary)),
180
+ "format:check": "oxfmt --check --config ../../oxfmt.config.ts .",
181
+ "format:write": "oxfmt --write --config ../../oxfmt.config.ts .",
182
+ lint: "oxlint --config ../../oxlint.config.ts . --deny-warnings",
183
+ "lint:fix": "oxlint --config ../../oxlint.config.ts . --fix --deny-warnings",
93
184
  preview: "vite preview",
94
185
  test: "vitest run",
95
186
  "test:e2e": "pnpm run build && playwright test",
@@ -104,7 +195,10 @@ function rootPackageJson(context, packageScripts) {
104
195
  type: "module",
105
196
  scripts: packageScripts,
106
197
  devDependencies: {
198
+ oxfmt: "catalog:",
199
+ oxlint: "catalog:",
107
200
  turbo: "catalog:",
201
+ typescript: "catalog:",
108
202
  },
109
203
  engines: {
110
204
  node: context.toolchain.nodeLtsMajor.value,
@@ -196,43 +290,41 @@ function operationsForVueHonoApp(context, packageScripts, checkPlan) {
196
290
  const packageScope = packageScopeFromBlueprint(context);
197
291
  const apiName = packageName(packageScope, "api");
198
292
  const webName = packageName(packageScope, "web");
199
- const editorCustomization = editorCustomizationForCapabilities(["oxc-format-lint", "vue", "tailwind", "vitest"], {
200
- oxcConfigPaths: "nested",
293
+ const editorCustomization = editorCustomizationForCapabilities([
294
+ "oxc-format-lint",
295
+ "vue",
296
+ "tailwind",
297
+ "vitest",
298
+ ]);
299
+ const developmentContainer = checkedDockerfileFirstNodePnpmDevcontainer({
300
+ name: context.projectName.value,
301
+ layer: nodePnpmToolLayer({
302
+ nodeVersion: context.toolchain.nodeLtsMajor.value,
303
+ packageManagerPin: context.toolchain.packageManagerPin.value,
304
+ }),
305
+ additionalLayers: [browserTestToolLayer()],
306
+ extensions: editorCustomization.extensions,
307
+ settings: editorCustomization.settings,
201
308
  });
309
+ const rootManifest = rootPackageJson(context, packageScripts);
310
+ const apiManifest = apiPackageJson(context, packageScope);
311
+ const webManifest = webPackageJson(context, packageScope);
202
312
  return [
203
313
  {
204
314
  kind: "writeJson",
205
315
  to: "package.json",
206
- value: rootPackageJson(context, packageScripts),
316
+ value: rootManifest,
207
317
  },
208
318
  {
209
319
  kind: "writeText",
210
320
  to: "pnpm-workspace.yaml",
211
321
  text: renderGeneratedPnpmWorkspaceYaml({
212
322
  packages: ["apps/*"],
213
- dependencies: [
214
- "@hono/node-server",
215
- "@playwright/test",
216
- "@tailwindcss/vite",
217
- "@types/node",
218
- "@types/web-bluetooth",
219
- "@vitejs/plugin-vue",
220
- "@vue/tsconfig",
221
- "@vueuse/core",
222
- "hono",
223
- "oxfmt",
224
- "oxlint",
225
- "pinia",
226
- "tailwindcss",
227
- "tsc-alias",
228
- "tsx",
229
- "turbo",
230
- "typescript",
231
- "vite",
232
- "vitest",
233
- "vue",
234
- "vue-tsc",
235
- ],
323
+ dependencies: collectGeneratedManifestCatalogReferences([
324
+ rootManifest,
325
+ apiManifest,
326
+ webManifest,
327
+ ]),
236
328
  allowBuilds: {
237
329
  esbuild: true,
238
330
  },
@@ -275,24 +367,48 @@ function operationsForVueHonoApp(context, packageScripts, checkPlan) {
275
367
  },
276
368
  {
277
369
  kind: "writeJson",
278
- to: ".project-kit/blueprint.json",
370
+ to: "tsconfig.config.json",
371
+ value: {
372
+ compilerOptions: {
373
+ module: "NodeNext",
374
+ moduleResolution: "NodeNext",
375
+ noEmitOnError: true,
376
+ skipLibCheck: false,
377
+ strict: true,
378
+ target: "ES2022",
379
+ },
380
+ include: ["oxlint.config.ts", "oxfmt.config.ts"],
381
+ },
382
+ },
383
+ {
384
+ kind: "copyFile",
385
+ sourceRoot: "sharedOxc",
386
+ from: "vue/oxlint.config.ts",
387
+ to: "oxlint.config.ts",
388
+ },
389
+ {
390
+ kind: "copyFile",
391
+ sourceRoot: "sharedOxc",
392
+ from: "oxfmt.config.ts",
393
+ to: "oxfmt.config.ts",
394
+ },
395
+ {
396
+ kind: "writeJson",
397
+ to: ".template/blueprint.json",
279
398
  value: context.blueprint,
280
399
  },
281
400
  {
282
401
  kind: "writeJson",
283
- to: ".project-kit/generated-by.json",
402
+ to: ".template/generated-by.json",
284
403
  value: generationRecord(context),
285
404
  },
286
405
  {
287
406
  kind: "writeJson",
288
407
  to: ".devcontainer/devcontainer.json",
289
- value: nodePnpmDevcontainer({
290
- name: `${context.projectName.value} full-stack development`,
291
- nodeVersion: context.toolchain.nodeLtsMajor.value,
292
- packageManagerPin: context.toolchain.packageManagerPin.value,
293
- extensions: editorCustomization.extensions,
294
- settings: editorCustomization.settings,
295
- }),
408
+ value: developmentContainer.devcontainer,
409
+ },
410
+ {
411
+ ...developmentContainer.dockerfileOperation,
296
412
  },
297
413
  {
298
414
  kind: "writeJson",
@@ -316,23 +432,25 @@ function operationsForVueHonoApp(context, packageScripts, checkPlan) {
316
432
  "playwright-report",
317
433
  "test-results",
318
434
  ".env",
435
+ ".template/",
436
+ ".pnpm-store/",
319
437
  "",
320
438
  ].join("\n"),
321
439
  },
322
440
  {
323
- kind: "writeText",
441
+ kind: "copyFile",
442
+ from: ".github/workflows/check.yml",
324
443
  to: ".github/workflows/check.yml",
325
- text: projectCheckWorkflow({ checkPlan }),
326
444
  },
327
445
  {
328
- kind: "writeText",
446
+ kind: "copyFile",
447
+ from: ".github/dependabot.yml",
329
448
  to: ".github/dependabot.yml",
330
- text: projectDependabotConfig(dependencyMaintenancePolicy),
331
449
  },
332
450
  {
333
451
  kind: "writeJson",
334
452
  to: "apps/api/package.json",
335
- value: apiPackageJson(context, packageScope),
453
+ value: apiManifest,
336
454
  },
337
455
  {
338
456
  kind: "writeJson",
@@ -369,18 +487,6 @@ function operationsForVueHonoApp(context, packageScripts, checkPlan) {
369
487
  include: ["src/**/*.ts"],
370
488
  },
371
489
  },
372
- {
373
- kind: "copyFile",
374
- sourceRoot: "sharedOxc",
375
- from: "node/oxlint.config.ts",
376
- to: "apps/api/oxlint.config.ts",
377
- },
378
- {
379
- kind: "copyFile",
380
- sourceRoot: "sharedOxc",
381
- from: "oxfmt.config.ts",
382
- to: "apps/api/oxfmt.config.ts",
383
- },
384
490
  { kind: "copyFile", from: "api/src/index.ts", to: "apps/api/src/index.ts" },
385
491
  {
386
492
  kind: "copyFile",
@@ -405,7 +511,7 @@ function operationsForVueHonoApp(context, packageScripts, checkPlan) {
405
511
  {
406
512
  kind: "writeJson",
407
513
  to: "apps/web/package.json",
408
- value: webPackageJson(context, packageScope),
514
+ value: webManifest,
409
515
  },
410
516
  {
411
517
  kind: "writeJson",
@@ -477,18 +583,6 @@ function operationsForVueHonoApp(context, packageScripts, checkPlan) {
477
583
  include: ["playwright.config.ts", "vite.config.ts", "vitest.config.ts"],
478
584
  },
479
585
  },
480
- {
481
- kind: "copyFile",
482
- sourceRoot: "sharedOxc",
483
- from: "vue/oxlint.config.ts",
484
- to: "apps/web/oxlint.config.ts",
485
- },
486
- {
487
- kind: "copyFile",
488
- sourceRoot: "sharedOxc",
489
- from: "oxfmt.config.ts",
490
- to: "apps/web/oxfmt.config.ts",
491
- },
492
586
  { kind: "copyFile", from: "web/env.d.ts", to: "apps/web/env.d.ts" },
493
587
  { kind: "copyFile", from: "web/index.html", to: "apps/web/index.html" },
494
588
  {
@@ -554,16 +648,26 @@ function sharedOxcSourceRoot() {
554
648
  ? publishedSharedRoot
555
649
  : path.join(projectionDir, "..", "shared", "oxc");
556
650
  }
651
+ function sharedDevcontainerSourceRoot() {
652
+ const projectionDir = path.dirname(fileURLToPath(import.meta.url));
653
+ const publishedSharedRoot = path.join(projectionDir, "..", "..", "..", "templates", "shared", "devcontainer");
654
+ return existsSync(path.join(publishedSharedRoot, "node-pnpm.Dockerfile"))
655
+ ? publishedSharedRoot
656
+ : path.join(projectionDir, "..", "shared", "devcontainer");
657
+ }
557
658
  export const vueHonoAppPresetProjection = {
558
659
  metadata: vueHonoAppPresetMetadata,
559
660
  blueprint: vueHonoAppBlueprint,
560
661
  project(context) {
561
- const checkPlan = planNodeChecks("vue-hono-root");
562
- const fixPlan = planNodeFixes("vue-hono-root");
662
+ const checkPlan = planVueHonoRootChecks();
663
+ const fixPlan = planVueHonoRootFixes();
563
664
  const packageScripts = projectVueHonoRootPackageScripts();
564
665
  return {
565
666
  sourceRoot: templateSourceRoot(),
566
- sourceRoots: { sharedOxc: sharedOxcSourceRoot() },
667
+ sourceRoots: {
668
+ sharedDevcontainer: sharedDevcontainerSourceRoot(),
669
+ sharedOxc: sharedOxcSourceRoot(),
670
+ },
567
671
  operations: operationsForVueHonoApp(context, packageScripts, checkPlan),
568
672
  checkPlan,
569
673
  fixPlan,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ykdz/template",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "private": false,
5
5
  "description": "Project template generator for YKDZ starter projects.",
6
6
  "keywords": [
@@ -24,6 +24,9 @@
24
24
  "dist",
25
25
  "pnpm-workspace.yaml",
26
26
  "templates",
27
+ "!templates/registry.ts",
28
+ "!templates/projection-plans.ts",
29
+ "!templates/*/projection.ts",
27
30
  "!templates/shared/oxc/tsconfig.json",
28
31
  "!templates/**/node_modules"
29
32
  ],
@@ -49,17 +52,19 @@
49
52
  "node": ">=24.0.0"
50
53
  },
51
54
  "scripts": {
52
- "build": "tsc -p tsconfig.build.json",
53
- "check": "pnpm run typecheck && pnpm run test && pnpm run check:templates && pnpm run check:fixtures",
55
+ "build": "rm -rf dist && tsc -p tsconfig.build.json",
56
+ "check": "pnpm run check:format && pnpm run typecheck && pnpm run test && pnpm run check:templates && pnpm run check:fixtures",
57
+ "check:format": "oxfmt --check --config templates/shared/oxc/oxfmt.config.ts --ignore-path .oxfmtignore .",
54
58
  "check:fixtures": "tsx scripts/check-fixtures.ts",
55
- "check:templates": "pnpm run check:templates:shared-oxc && pnpm run check:templates:github-yaml && pnpm run check:templates:static-source",
59
+ "check:templates": "pnpm run check:templates:shared-oxc && pnpm run check:templates:github-yaml && pnpm run check:templates:boundary && pnpm run check:templates:static-source",
56
60
  "check:toolchain:online": "tsx scripts/check-online-toolchain-resolution-contract.ts",
61
+ "check:templates:boundary": "tsx scripts/check-template-boundary.ts",
57
62
  "check:templates:github-yaml": "tsx scripts/check-template-github-yaml.ts",
58
63
  "check:templates:shared-oxc": "pnpm run check:templates:shared-oxc:format && pnpm run check:templates:shared-oxc:lint && pnpm run check:templates:shared-oxc:typecheck",
59
64
  "check:templates:shared-oxc:format": "oxfmt --check templates/shared/oxc",
60
65
  "check:templates:shared-oxc:lint": "oxlint templates/shared/oxc --deny-warnings",
61
66
  "check:templates:shared-oxc:typecheck": "tsc -p templates/shared/oxc/tsconfig.json --noEmit",
62
- "check:templates:static-source": "oxfmt --check --config templates/shared/oxc/oxfmt.config.ts templates && rustfmt --check templates/rust-bin/src/main.rs",
67
+ "check:templates:static-source": "rustfmt --check templates/rust-bin/src/main.rs",
63
68
  "fix": "pnpm run build",
64
69
  "typecheck": "tsc -p tsconfig.json --noEmit",
65
70
  "test": "vitest run"
@@ -19,6 +19,7 @@ catalog:
19
19
  tsx: ^4.22.4
20
20
  turbo: ^2.10.2
21
21
  typescript: ^6.0.3
22
+ valibot: ^1.4.2
22
23
  vite: ^8.1.2
23
24
  vitest: ^4.1.9
24
25
  vue: ^3.5.39
@@ -1,10 +1,23 @@
1
1
  version: 2
2
+
2
3
  updates:
3
4
  - package-ecosystem: npm
4
5
  directory: /
5
6
  schedule:
6
7
  interval: weekly
8
+ ignore:
9
+ - dependency-name: "@types/node"
10
+ update-types:
11
+ - version-update:semver-major
7
12
  - package-ecosystem: github-actions
8
13
  directory: /
9
14
  schedule:
10
15
  interval: weekly
16
+ - package-ecosystem: docker
17
+ directory: /.devcontainer
18
+ schedule:
19
+ interval: weekly
20
+ ignore:
21
+ - dependency-name: mcr.microsoft.com/devcontainers/typescript-node
22
+ update-types:
23
+ - version-update:semver-major
@@ -1,14 +1,31 @@
1
1
  version: 2
2
+
2
3
  updates:
3
4
  - package-ecosystem: npm
4
5
  directory: /
5
6
  schedule:
6
7
  interval: weekly
8
+ ignore:
9
+ - dependency-name: "@types/node"
10
+ update-types:
11
+ - version-update:semver-major
7
12
  - package-ecosystem: cargo
8
- directory: /
13
+ directory: "{{CARGO_PACKAGE_DIRECTORY}}"
9
14
  schedule:
10
15
  interval: weekly
11
16
  - package-ecosystem: github-actions
12
17
  directory: /
13
18
  schedule:
14
19
  interval: weekly
20
+ - package-ecosystem: docker
21
+ directory: /.devcontainer
22
+ schedule:
23
+ interval: weekly
24
+ ignore:
25
+ - dependency-name: mcr.microsoft.com/devcontainers/typescript-node
26
+ update-types:
27
+ - version-update:semver-major
28
+ - package-ecosystem: rust-toolchain
29
+ directory: /
30
+ schedule:
31
+ interval: weekly
@@ -0,0 +1,3 @@
1
+ [toolchain]
2
+ channel = "{{RUST_TOOLCHAIN}}"
3
+ components = ["rustfmt", "clippy"]
@@ -0,0 +1,2 @@
1
+ edition = "2024"
2
+ max_width = 100
@@ -0,0 +1,2 @@
1
+ ARG PLAYWRIGHT_CLI_PACKAGE
2
+ RUN npx --yes --package "${PLAYWRIGHT_CLI_PACKAGE}" playwright install-deps chromium
@@ -0,0 +1,6 @@
1
+ ARG NODE_VERSION
2
+ FROM node:${NODE_VERSION}-bookworm-slim
3
+
4
+ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
5
+ ARG PACKAGE_MANAGER_PIN
6
+ RUN corepack enable && corepack prepare ${PACKAGE_MANAGER_PIN} --activate
@@ -0,0 +1,16 @@
1
+ ARG RUST_TOOLCHAIN
2
+ ENV RUSTUP_HOME=/usr/local/rustup
3
+ ENV CARGO_HOME=/usr/local/cargo
4
+ ENV PATH="/usr/local/cargo/bin:${PATH}"
5
+
6
+ RUN apt-get update && apt-get install -y --no-install-recommends \
7
+ ca-certificates \
8
+ curl \
9
+ gcc \
10
+ libc6-dev \
11
+ && rm -rf /var/lib/apt/lists/*
12
+ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \
13
+ sh -s -- -y --profile minimal --default-toolchain none \
14
+ && rustup toolchain install ${RUST_TOOLCHAIN} --profile minimal --component rustfmt --component clippy \
15
+ && rustup default ${RUST_TOOLCHAIN} \
16
+ && chmod -R a+w ${RUSTUP_HOME} ${CARGO_HOME}
@@ -0,0 +1,56 @@
1
+ {
2
+ "capabilities": {
3
+ "oxc-format-lint": {
4
+ "extensions": ["oxc.oxc-vscode"],
5
+ "settings": {
6
+ "editor.codeActionsOnSave": {
7
+ "source.format.oxc": "always",
8
+ "source.fixAll.oxc": "always"
9
+ },
10
+ "editor.defaultFormatter": "oxc.oxc-vscode",
11
+ "editor.formatOnPaste": true,
12
+ "editor.formatOnSave": true,
13
+ "editor.formatOnSaveMode": "file",
14
+ "oxc.enable": true,
15
+ "[javascript]": {
16
+ "editor.defaultFormatter": "oxc.oxc-vscode"
17
+ },
18
+ "[json]": {
19
+ "editor.defaultFormatter": "oxc.oxc-vscode"
20
+ },
21
+ "[markdown]": {
22
+ "editor.defaultFormatter": "oxc.oxc-vscode"
23
+ },
24
+ "[typescript]": {
25
+ "editor.defaultFormatter": "oxc.oxc-vscode"
26
+ }
27
+ }
28
+ },
29
+ "vue": {
30
+ "extensions": ["Vue.volar"],
31
+ "settings": {}
32
+ },
33
+ "tailwind": {
34
+ "extensions": ["bradlc.vscode-tailwindcss"],
35
+ "settings": {}
36
+ },
37
+ "rust-tooling": {
38
+ "extensions": ["rust-lang.rust-analyzer", "tamasfe.even-better-toml"],
39
+ "settings": {
40
+ "rust-analyzer.cargo.features": "all",
41
+ "rust-analyzer.check.command": "clippy",
42
+ "rust-analyzer.procMacro.enable": true,
43
+ "[rust]": {
44
+ "editor.defaultFormatter": "rust-lang.rust-analyzer"
45
+ },
46
+ "[toml]": {
47
+ "editor.defaultFormatter": "tamasfe.even-better-toml"
48
+ }
49
+ }
50
+ },
51
+ "vitest": {
52
+ "extensions": ["vitest.explorer"],
53
+ "settings": {}
54
+ }
55
+ }
56
+ }
@@ -1,10 +1,23 @@
1
1
  version: 2
2
+
2
3
  updates:
3
4
  - package-ecosystem: npm
4
5
  directory: /
5
6
  schedule:
6
7
  interval: weekly
8
+ ignore:
9
+ - dependency-name: "@types/node"
10
+ update-types:
11
+ - version-update:semver-major
7
12
  - package-ecosystem: github-actions
8
13
  directory: /
9
14
  schedule:
10
15
  interval: weekly
16
+ - package-ecosystem: docker
17
+ directory: /.devcontainer
18
+ schedule:
19
+ interval: weekly
20
+ ignore:
21
+ - dependency-name: mcr.microsoft.com/devcontainers/typescript-node
22
+ update-types:
23
+ - version-update:semver-major
@@ -1,7 +1,11 @@
1
+ import * as v from "valibot";
2
+
1
3
  export type Greeting = {
2
4
  message: string;
3
5
  };
4
6
 
7
+ const nameSchema = v.pipe(v.string(), v.trim(), v.minLength(1));
8
+
5
9
  export function greet(name: string): Greeting {
6
- return { message: `Hello, ${name}` };
10
+ return { message: `Hello, ${v.parse(nameSchema, name)}` };
7
11
  }