@ykdz/template 0.0.18 → 0.0.20

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 (77) hide show
  1. package/dist/cli.js +61 -24
  2. package/node_modules/@ykdz/template-builtin-source/dist/templates/registry.js +0 -2
  3. package/node_modules/@ykdz/template-builtin-source/dist/templates/vike-app/projection.js +13 -2
  4. package/node_modules/@ykdz/template-builtin-source/dist/templates/vue-app/projection.js +5 -73
  5. package/node_modules/@ykdz/template-builtin-source/dist/templates/vue-hono-app/projection.js +3 -2
  6. package/node_modules/@ykdz/template-builtin-source/package.json +36 -3
  7. package/node_modules/@ykdz/template-builtin-source/templates/preset-source.json +69 -282
  8. package/node_modules/@ykdz/template-builtin-source/templates/rust-bin/src/main.rs +5 -2
  9. package/node_modules/@ykdz/template-builtin-source/templates/rust-bin/turbo.json +2 -1
  10. package/node_modules/@ykdz/template-builtin-source/templates/ts-lib/turbo.json +2 -1
  11. package/node_modules/@ykdz/template-builtin-source/templates/vike-app/{drizzle.config.ts → db/drizzle.config.ts} +2 -2
  12. package/node_modules/@ykdz/template-builtin-source/templates/vike-app/{database → db/src}/db.ts +1 -1
  13. package/node_modules/@ykdz/template-builtin-source/templates/vike-app/db/src/index.ts +1 -0
  14. package/node_modules/@ykdz/template-builtin-source/templates/vike-app/{database → db/src}/queries/todos.ts +4 -8
  15. package/node_modules/@ykdz/template-builtin-source/templates/vike-app/{test → db/test}/todos.test.ts +2 -2
  16. package/node_modules/@ykdz/template-builtin-source/templates/{hono-api → vike-app/db}/turbo.json +2 -1
  17. package/node_modules/@ykdz/template-builtin-source/templates/vike-app/{pages → web/pages}/index/+Page.telefunc.ts +3 -1
  18. package/node_modules/@ykdz/template-builtin-source/templates/vike-app/{pages → web/pages}/index/+Page.vue +1 -2
  19. package/node_modules/@ykdz/template-builtin-source/templates/vike-app/web/playwright.config.ts +43 -0
  20. package/node_modules/@ykdz/template-builtin-source/templates/vike-app/web/scripts/run-playwright.ts +62 -0
  21. package/node_modules/@ykdz/template-builtin-source/templates/vike-app/{server → web/server}/app.ts +1 -1
  22. package/node_modules/@ykdz/template-builtin-source/templates/vike-app/{test → web/test}/e2e/app.spec.ts +1 -1
  23. package/node_modules/@ykdz/template-builtin-source/templates/vike-app/web/turbo.json +12 -0
  24. package/node_modules/@ykdz/template-builtin-source/templates/vike-app/{types → web/types}/global.d.ts +1 -1
  25. package/node_modules/@ykdz/template-builtin-source/templates/vike-app/{vite.config.ts → web/vite.config.ts} +1 -0
  26. package/node_modules/@ykdz/template-builtin-source/templates/vue-app/playwright.config.ts +16 -3
  27. package/node_modules/@ykdz/template-builtin-source/templates/vue-app/scripts/run-playwright.ts +38 -1
  28. package/node_modules/@ykdz/template-builtin-source/templates/vue-app/turbo.json +1 -0
  29. package/node_modules/@ykdz/template-builtin-source/templates/vue-hono-app/api/turbo.json +1 -0
  30. package/node_modules/@ykdz/template-builtin-source/templates/vue-hono-app/web/playwright.config.ts +7 -9
  31. package/node_modules/@ykdz/template-builtin-source/templates/vue-hono-app/web/scripts/run-playwright.ts +79 -1
  32. package/node_modules/@ykdz/template-builtin-source/templates/vue-hono-app/web/src/App.vue +4 -5
  33. package/node_modules/@ykdz/template-builtin-source/templates/vue-hono-app/web/src/api.ts +9 -3
  34. package/node_modules/@ykdz/template-builtin-source/templates/vue-hono-app/web/test/e2e/app.spec.ts +1 -1
  35. package/node_modules/@ykdz/template-builtin-source/templates/vue-hono-app/web/turbo.json +1 -0
  36. package/node_modules/@ykdz/template-core/dist/Cargo.lock +16 -0
  37. package/node_modules/@ykdz/template-core/dist/Cargo.toml +12 -0
  38. package/node_modules/@ykdz/template-core/dist/dependency-catalog.d.ts +8 -0
  39. package/node_modules/@ykdz/template-core/dist/dependency-catalog.js +63 -2
  40. package/node_modules/@ykdz/template-core/dist/generated-scenarios.d.ts +1 -1
  41. package/node_modules/@ykdz/template-core/dist/generated-scenarios.js +104 -26
  42. package/node_modules/@ykdz/template-core/dist/next-step-instructions.d.ts +8 -0
  43. package/node_modules/@ykdz/template-core/dist/next-step-instructions.js +65 -0
  44. package/node_modules/@ykdz/template-core/dist/package-addition.js +5 -9
  45. package/node_modules/@ykdz/template-core/dist/package-linking.d.ts +24 -0
  46. package/node_modules/@ykdz/template-core/dist/package-linking.js +35 -0
  47. package/node_modules/@ykdz/template-core/dist/preset-source.d.ts +2 -2
  48. package/node_modules/@ykdz/template-core/dist/projection-capabilities.js +225 -139
  49. package/node_modules/@ykdz/template-core/dist/template-boundary-check.js +46 -10
  50. package/node_modules/@ykdz/template-core/package.json +5 -1
  51. package/node_modules/@ykdz/template-shared/dist/index.d.ts +3 -152
  52. package/node_modules/@ykdz/template-shared/dist/index.js +49 -305
  53. package/node_modules/@ykdz/template-shared/package.json +4 -0
  54. package/package.json +2 -2
  55. package/node_modules/@ykdz/template-builtin-source/dist/templates/hono-api/projection.d.ts +0 -6
  56. package/node_modules/@ykdz/template-builtin-source/dist/templates/hono-api/projection.js +0 -213
  57. package/node_modules/@ykdz/template-builtin-source/templates/hono-api/.github/dependabot.yml +0 -23
  58. package/node_modules/@ykdz/template-builtin-source/templates/hono-api/.github/workflows/check.yml +0 -19
  59. package/node_modules/@ykdz/template-builtin-source/templates/hono-api/src/app.ts +0 -5
  60. package/node_modules/@ykdz/template-builtin-source/templates/hono-api/src/server.ts +0 -15
  61. package/node_modules/@ykdz/template-builtin-source/templates/hono-api/test/app.test.ts +0 -10
  62. package/node_modules/@ykdz/template-builtin-source/templates/hono-api/vitest.config.ts +0 -15
  63. package/node_modules/@ykdz/template-builtin-source/templates/vike-app/playwright.config.ts +0 -23
  64. package/node_modules/@ykdz/template-builtin-source/templates/vue-app/playwright.package-addition.config.ts +0 -22
  65. /package/node_modules/@ykdz/template-builtin-source/templates/vike-app/{database → db/src}/schema.ts +0 -0
  66. /package/node_modules/@ykdz/template-builtin-source/templates/vike-app/{+server.ts → web/+server.ts} +0 -0
  67. /package/node_modules/@ykdz/template-builtin-source/templates/vike-app/{.env.example → web/.env.example} +0 -0
  68. /package/node_modules/@ykdz/template-builtin-source/templates/vike-app/{assets → web/assets}/logo.svg +0 -0
  69. /package/node_modules/@ykdz/template-builtin-source/templates/vike-app/{components → web/components}/CounterButton.vue +0 -0
  70. /package/node_modules/@ykdz/template-builtin-source/templates/vike-app/{components → web/components}/PageShell.vue +0 -0
  71. /package/node_modules/@ykdz/template-builtin-source/templates/vike-app/{pages → web/pages}/+Head.vue +0 -0
  72. /package/node_modules/@ykdz/template-builtin-source/templates/vike-app/{pages → web/pages}/+Layout.vue +0 -0
  73. /package/node_modules/@ykdz/template-builtin-source/templates/vike-app/{pages → web/pages}/+config.ts +0 -0
  74. /package/node_modules/@ykdz/template-builtin-source/templates/vike-app/{pages → web/pages}/tailwind.css +0 -0
  75. /package/node_modules/@ykdz/template-builtin-source/templates/vike-app/{server → web/server}/api.ts +0 -0
  76. /package/node_modules/@ykdz/template-builtin-source/templates/vike-app/{types → web/types}/env.d.ts +0 -0
  77. /package/node_modules/@ykdz/template-builtin-source/templates/vike-app/{vitest.config.ts → web/vitest.config.ts} +0 -0
package/dist/cli.js CHANGED
@@ -4,8 +4,8 @@ import path from "node:path";
4
4
  import { createInterface } from "node:readline/promises";
5
5
  import { builtInPresetProjectionSourceRoots, builtInPresets, findBuiltInPresetSourceManifestPreset, loadBuiltInPresetSourceManifest, projectBuiltInPresetSourcePreset, } from "@ykdz/template-builtin-source";
6
6
  import { assembleGenerationContext, } from "@ykdz/template-core/generation-context";
7
+ import { formatNextStepInstructionsForCli, generatedFollowUpDocumentOperation, planNextStepInstructions, } from "@ykdz/template-core/next-step-instructions";
7
8
  import { addPackage } from "@ykdz/template-core/package-addition";
8
- import { planNextStepInstructionsForProjection, } from "@ykdz/template-core/preset-projection";
9
9
  import { validateBuiltInPresetSourceManifest, validatePresetSourceManifest, } from "@ykdz/template-core/preset-source";
10
10
  import { blueprintForPresetSourcePreset } from "@ykdz/template-core/projection-capabilities";
11
11
  import { renderNewProject } from "@ykdz/template-core/renderer";
@@ -35,6 +35,7 @@ function usage() {
35
35
  " --yes Accept defaults for non-interactive generation",
36
36
  " --dry-run Print the planned generation without writing files",
37
37
  " --json Print machine-readable output",
38
+ " --no-todo Do not write the generated follow-up TODO.md document",
38
39
  "",
39
40
  "Add package options:",
40
41
  " --preset <name> Package preset to add",
@@ -87,6 +88,7 @@ function parseInitOptions(args) {
87
88
  let yes = false;
88
89
  let dryRun = false;
89
90
  let json = false;
91
+ let todo = true;
90
92
  let scope;
91
93
  for (let index = 2; index < args.length; index += 1) {
92
94
  const arg = args[index];
@@ -102,6 +104,10 @@ function parseInitOptions(args) {
102
104
  json = true;
103
105
  continue;
104
106
  }
107
+ if (arg === "--no-todo") {
108
+ todo = false;
109
+ continue;
110
+ }
105
111
  if (arg === "--scope") {
106
112
  const value = args[index + 1];
107
113
  if (!value) {
@@ -125,7 +131,7 @@ function parseInitOptions(args) {
125
131
  if (!dir) {
126
132
  throw new Error("init requires a target directory");
127
133
  }
128
- return { dir, preset, yes, dryRun, json, scope };
134
+ return { dir, preset, yes, dryRun, json, todo, scope };
129
135
  }
130
136
  function normalizeNpmScope(value) {
131
137
  if (value !== value.trim() || /\s/.test(value)) {
@@ -188,19 +194,36 @@ function formatBlueprintSummary(targetDir, blueprint) {
188
194
  ...blueprint.features.map((feature) => ` - ${feature}`),
189
195
  ].join("\n");
190
196
  }
191
- function formatProjectionNextSteps(targetDir, projectionPlan) {
192
- const steps = planNextStepInstructionsForProjection({
197
+ function planProjectionNextSteps(targetDir, projectionPlan) {
198
+ return planNextStepInstructions({
193
199
  targetDir,
194
- plan: projectionPlan,
200
+ projectionPlan,
195
201
  });
196
- return [
197
- "Next Step Instructions:",
198
- "",
199
- ...steps.flatMap((step, index) => [
200
- ` ${index + 1}. ${step.label}`,
201
- ` ${step.display}`,
202
- ]),
203
- ].join("\n");
202
+ }
203
+ function followUpDocumentPlan(options) {
204
+ return options.todo ? { enabled: true, path: "TODO.md" } : { enabled: false };
205
+ }
206
+ function displayPathFromCwd(filePath) {
207
+ const absolutePath = path.resolve(filePath);
208
+ const relativePath = path.relative(process.cwd(), absolutePath);
209
+ if (relativePath &&
210
+ !relativePath.startsWith("..") &&
211
+ !path.isAbsolute(relativePath)) {
212
+ return relativePath;
213
+ }
214
+ return absolutePath;
215
+ }
216
+ function followUpDocumentDisplayPath(options) {
217
+ return displayPathFromCwd(path.join(options.dir, "TODO.md"));
218
+ }
219
+ function formatFollowUpDocumentReport(options) {
220
+ const rows = [
221
+ ["Enabled", options.todo ? "yes" : "no"],
222
+ ];
223
+ if (options.todo) {
224
+ rows.push(["Path", followUpDocumentDisplayPath(options)]);
225
+ }
226
+ return ["Generated Follow-Up Document:", "", ...formatFieldRows(rows)].join("\n");
204
227
  }
205
228
  function toolchainReport(toolchain) {
206
229
  return {
@@ -256,11 +279,15 @@ async function generateInitProject(options, generationContext) {
256
279
  preset,
257
280
  context: generationContext,
258
281
  });
282
+ const nextStepPlan = planProjectionNextSteps(options.dir, plan);
283
+ const operations = options.todo
284
+ ? [...plan.operations, generatedFollowUpDocumentOperation(nextStepPlan)]
285
+ : [...plan.operations];
259
286
  await renderNewProject({
260
287
  sourceRoot: plan.sourceRoot,
261
288
  sourceRoots: plan.sourceRoots,
262
289
  targetRoot: options.dir,
263
- operations: [...plan.operations],
290
+ operations,
264
291
  });
265
292
  }
266
293
  function printInitComplete(options, blueprint, generationContext) {
@@ -271,10 +298,9 @@ function printInitComplete(options, blueprint, generationContext) {
271
298
  if (!projectionPlan) {
272
299
  throw new Error(`Missing Preset Projection plan: ${blueprint.preset}`);
273
300
  }
274
- const nextSteps = planNextStepInstructionsForProjection({
275
- targetDir: options.dir,
276
- plan: projectionPlan,
277
- });
301
+ const nextStepPlan = planProjectionNextSteps(options.dir, projectionPlan);
302
+ const nextSteps = nextStepPlan.steps;
303
+ const followUpDocument = followUpDocumentPlan(options);
278
304
  if (options.json) {
279
305
  printJson({
280
306
  command: "init",
@@ -285,6 +311,7 @@ function printInitComplete(options, blueprint, generationContext) {
285
311
  ? { toolchain: toolchainReport(generationContext.toolchain) }
286
312
  : {}),
287
313
  nextSteps,
314
+ followUpDocument,
288
315
  });
289
316
  return;
290
317
  }
@@ -301,7 +328,12 @@ function printInitComplete(options, blueprint, generationContext) {
301
328
  console.log(formatToolchainReport(generationContext.toolchain));
302
329
  }
303
330
  console.log("");
304
- console.log(formatProjectionNextSteps(options.dir, projectionPlan));
331
+ if (options.todo) {
332
+ console.log(`Follow-up checklist written to ${followUpDocumentDisplayPath(options)}`);
333
+ }
334
+ else {
335
+ console.log(formatNextStepInstructionsForCli(nextStepPlan));
336
+ }
305
337
  }
306
338
  function isInteractiveTerminal() {
307
339
  return process.stdin.isTTY && process.stdout.isTTY;
@@ -467,10 +499,9 @@ async function main(args) {
467
499
  if (!projectionPlan) {
468
500
  throw new Error(`Missing Preset Projection plan: ${blueprint.preset}`);
469
501
  }
470
- const nextSteps = planNextStepInstructionsForProjection({
471
- targetDir: options.dir,
472
- plan: projectionPlan,
473
- });
502
+ const nextStepPlan = planProjectionNextSteps(options.dir, projectionPlan);
503
+ const nextSteps = nextStepPlan.steps;
504
+ const followUpDocument = followUpDocumentPlan(options);
474
505
  if (options.json) {
475
506
  printJson({
476
507
  command: "init",
@@ -481,6 +512,7 @@ async function main(args) {
481
512
  ? { toolchain: toolchainReport(generationContext.toolchain) }
482
513
  : {}),
483
514
  nextSteps,
515
+ followUpDocument,
484
516
  });
485
517
  return;
486
518
  }
@@ -490,7 +522,12 @@ async function main(args) {
490
522
  console.log(formatToolchainReport(generationContext.toolchain));
491
523
  }
492
524
  console.log("");
493
- console.log(formatProjectionNextSteps(options.dir, projectionPlan));
525
+ if (options.todo) {
526
+ console.log(formatFollowUpDocumentReport(options));
527
+ }
528
+ else {
529
+ console.log(formatNextStepInstructionsForCli(nextStepPlan));
530
+ }
494
531
  return;
495
532
  }
496
533
  if (!options.yes && (options.json || !isInteractiveTerminal())) {
@@ -1,4 +1,3 @@
1
- import { honoApiPresetProjection } from "./hono-api/projection.js";
2
1
  import { rustBinPresetProjection } from "./rust-bin/projection.js";
3
2
  import { tsLibPresetProjection } from "./ts-lib/projection.js";
4
3
  import { vikeAppPresetProjection } from "./vike-app/projection.js";
@@ -6,7 +5,6 @@ import { vueAppPresetProjection } from "./vue-app/projection.js";
6
5
  import { vueHonoAppPresetProjection } from "./vue-hono-app/projection.js";
7
6
  const testOnlyPresetProjections = [
8
7
  tsLibPresetProjection,
9
- honoApiPresetProjection,
10
8
  vueAppPresetProjection,
11
9
  vikeAppPresetProjection,
12
10
  vueHonoAppPresetProjection,
@@ -5,7 +5,7 @@ import { PackageAdditionSupport, } from "@ykdz/template-shared";
5
5
  export const vikeAppPresetMetadata = {
6
6
  name: "vike-app",
7
7
  title: "Vike app",
8
- description: "Single-package Vike, Hono, Telefunc, Drizzle, and Vue application.",
8
+ description: "Vike, Hono, Telefunc, Drizzle, and Vue workspace with a separate database package.",
9
9
  generation: "supported",
10
10
  supportedPackageManagers: ["pnpm"],
11
11
  supportedProjectKinds: ["multi-package"],
@@ -27,6 +27,9 @@ function projectNameFromDir(targetDir) {
27
27
  function scopedPackageName(packageScope) {
28
28
  return `@${packageScope}/web`;
29
29
  }
30
+ function scopedDbPackageName(packageScope) {
31
+ return `@${packageScope}/db`;
32
+ }
30
33
  export function vikeAppBlueprint(options = { targetDir: process.cwd() }) {
31
34
  const projectName = projectNameFromDir(options.targetDir);
32
35
  return {
@@ -35,7 +38,15 @@ export function vikeAppBlueprint(options = { targetDir: process.cwd() }) {
35
38
  packageManager: "pnpm",
36
39
  projectKind: "multi-package",
37
40
  features: [...vikeAppPresetMetadata.features],
38
- packages: [{ name: scopedPackageName(projectName), path: "apps/web" }],
41
+ packages: [
42
+ { name: scopedPackageName(projectName), path: "apps/web" },
43
+ {
44
+ name: scopedDbPackageName(projectName),
45
+ path: "packages/db",
46
+ role: "shared-library",
47
+ sourcePreset: "ts-lib",
48
+ },
49
+ ],
39
50
  };
40
51
  }
41
52
  export const vikeAppPresetProjection = {
@@ -1,5 +1,4 @@
1
1
  import { existsSync } from "node:fs";
2
- import { readFile } from "node:fs/promises";
3
2
  import path from "node:path";
4
3
  import { fileURLToPath } from "node:url";
5
4
  import { builtInPresetProjectionSourceRoots, loadBuiltInPresetProjectionDeclaration, } from "@ykdz/template-builtin-source";
@@ -59,66 +58,6 @@ export function projectVueAppPackageScripts() {
59
58
  "typecheck:run": "vue-tsc --build --noEmit --pretty false",
60
59
  };
61
60
  }
62
- function isNodeError(error) {
63
- return error instanceof Error && "code" in error;
64
- }
65
- function localPortsFromText(text) {
66
- return [
67
- ...text.matchAll(/port:\s*(\d+)/g),
68
- ...text.matchAll(/--port\s+(\d+)/g),
69
- ...text.matchAll(/https?:\/\/(?:localhost|127\.0\.0\.1):(\d+)/g),
70
- ].map((match) => Number(match[1]));
71
- }
72
- async function usedPlaywrightPorts(root, blueprint) {
73
- const ports = new Set();
74
- for (const projectPackage of blueprint.packages ?? []) {
75
- try {
76
- const configText = await readFile(path.join(root, projectPackage.path, "playwright.config.ts"), "utf8");
77
- for (const port of localPortsFromText(configText)) {
78
- ports.add(port);
79
- }
80
- }
81
- catch (error) {
82
- if (!isNodeError(error) || error.code !== "ENOENT") {
83
- throw error;
84
- }
85
- }
86
- }
87
- return ports;
88
- }
89
- async function nextVuePreviewPort(root, blueprint) {
90
- const usedPorts = await usedPlaywrightPorts(root, blueprint);
91
- let port = 4173;
92
- while (usedPorts.has(port)) {
93
- port += 1;
94
- }
95
- return port;
96
- }
97
- function vueAppPlaywrightConfig(previewPort) {
98
- return `import { defineConfig, devices } from "@playwright/test";
99
-
100
- const previewUrl = "http://127.0.0.1:${previewPort}";
101
-
102
- export default defineConfig({
103
- testDir: "./test/e2e",
104
- use: {
105
- baseURL: previewUrl,
106
- trace: "on-first-retry"
107
- },
108
- webServer: {
109
- command: "pnpm run preview --host 127.0.0.1 --port ${previewPort}",
110
- reuseExistingServer: !process.env.CI,
111
- url: previewUrl
112
- },
113
- projects: [
114
- {
115
- name: "chromium",
116
- use: { ...devices["Desktop Chrome"] }
117
- }
118
- ]
119
- });
120
- `;
121
- }
122
61
  function packageAdditionOperations(packagePath, packageNameValue, nodeVersion) {
123
62
  return [
124
63
  {
@@ -184,8 +123,8 @@ function packageAdditionOperations(packagePath, packageNameValue, nodeVersion) {
184
123
  exactOptionalPropertyTypes: true,
185
124
  forceConsistentCasingInFileNames: true,
186
125
  isolatedModules: true,
187
- module: "ESNext",
188
- moduleResolution: "Bundler",
126
+ module: "esnext",
127
+ moduleResolution: "bundler",
189
128
  noEmitOnError: true,
190
129
  noFallthroughCasesInSwitch: true,
191
130
  noImplicitOverride: true,
@@ -225,8 +164,8 @@ function packageAdditionOperations(packagePath, packageNameValue, nodeVersion) {
225
164
  exactOptionalPropertyTypes: true,
226
165
  forceConsistentCasingInFileNames: true,
227
166
  isolatedModules: true,
228
- module: "ESNext",
229
- moduleResolution: "Bundler",
167
+ module: "esnext",
168
+ moduleResolution: "bundler",
230
169
  noEmitOnError: true,
231
170
  lib: ["ESNext", "DOM", "DOM.Iterable"],
232
171
  noFallthroughCasesInSwitch: true,
@@ -289,9 +228,8 @@ function packageAdditionOperations(packagePath, packageNameValue, nodeVersion) {
289
228
  },
290
229
  ];
291
230
  }
292
- async function packageAdditionPlan({ root, blueprint, packageName: packageNameValue, packagePath, nodeVersion, }) {
231
+ async function packageAdditionPlan({ packageName: packageNameValue, packagePath, nodeVersion, }) {
293
232
  const [workspaceCollection] = packagePath.split("/");
294
- const previewPort = await nextVuePreviewPort(root, blueprint);
295
233
  return {
296
234
  packagePath,
297
235
  workspacePackageGlob: `${workspaceCollection}/*`,
@@ -300,12 +238,6 @@ async function packageAdditionPlan({ root, blueprint, packageName: packageNameVa
300
238
  sourceRoot: templateSourceRoot(),
301
239
  sourceRoots: { sharedOxc: sharedOxcSourceRoot() },
302
240
  operations: packageAdditionOperations(packagePath, packageNameValue, nodeVersion),
303
- textFiles: [
304
- {
305
- path: `${packagePath}/playwright.config.ts`,
306
- text: vueAppPlaywrightConfig(previewPort),
307
- },
308
- ],
309
241
  };
310
242
  }
311
243
  function templateSourceRoot() {
@@ -7,7 +7,7 @@ import { PackageAdditionSupport, } from "@ykdz/template-shared";
7
7
  export const vueHonoAppPresetMetadata = {
8
8
  name: "vue-hono-app",
9
9
  title: "Vue Hono app",
10
- description: "Full-stack Vue and Hono workspace with Hono RPC typing.",
10
+ description: "Full-stack Vue and Hono workspace with separated app package boundaries.",
11
11
  generation: "supported",
12
12
  supportedPackageManagers: ["pnpm"],
13
13
  supportedProjectKinds: ["multi-package"],
@@ -87,7 +87,8 @@ export function vueHonoAppBlueprint(options) {
87
87
  }
88
88
  export function projectVueHonoRootPackageScripts() {
89
89
  return {
90
- check: renderRootCheckCommand(planVueHonoRootChecks()),
90
+ check: `pnpm run check:boundaries && ${renderRootCheckCommand(planVueHonoRootChecks())}`,
91
+ "check:boundaries": "turbo boundaries --no-color",
91
92
  "check:run": 'node -e ""',
92
93
  dev: "turbo run dev --parallel",
93
94
  fix: renderFixCommand(planVueHonoRootFixes()),
@@ -9,24 +9,41 @@
9
9
  "!templates/registry.ts",
10
10
  "!templates/projection-plans.ts",
11
11
  "!templates/*/projection.ts",
12
+ "!templates/*/behavior.test.ts",
12
13
  "!templates/shared/oxc/tsconfig.json",
13
14
  "!templates/**/node_modules"
14
15
  ],
15
16
  "type": "module",
16
17
  "exports": {
17
18
  ".": {
19
+ "source": {
20
+ "types": "./src/index.ts",
21
+ "default": "./src/index.ts"
22
+ },
18
23
  "types": "./dist/src/index.d.ts",
19
24
  "default": "./dist/src/index.js"
20
25
  },
21
26
  "./registry": {
27
+ "source": {
28
+ "types": "./templates/registry.ts",
29
+ "default": "./templates/registry.ts"
30
+ },
22
31
  "types": "./dist/templates/registry.d.ts",
23
32
  "default": "./dist/templates/registry.js"
24
33
  },
25
34
  "./projection-plans": {
35
+ "source": {
36
+ "types": "./templates/projection-plans.ts",
37
+ "default": "./templates/projection-plans.ts"
38
+ },
26
39
  "types": "./dist/templates/projection-plans.d.ts",
27
40
  "default": "./dist/templates/projection-plans.js"
28
41
  },
29
42
  "./templates/*": {
43
+ "source": {
44
+ "types": "./templates/*.ts",
45
+ "default": "./templates/*.ts"
46
+ },
30
47
  "types": "./dist/templates/*.d.ts",
31
48
  "default": "./dist/templates/*.js"
32
49
  }
@@ -41,8 +58,8 @@
41
58
  "check:templates:static-source": "rustup run stable rustfmt --check templates/rust-bin/src/main.rs",
42
59
  "format:check": "oxfmt --list-different --config ../../oxfmt.config.ts .",
43
60
  "format:write": "oxfmt --write --config ../../oxfmt.config.ts .",
44
- "lint": "oxlint --quiet --format=unix --config ../../oxlint.config.ts src templates/projection-plans.ts templates/registry.ts templates/*/projection.ts",
45
- "lint:fix": "oxlint --format=unix --config ../../oxlint.config.ts src templates/projection-plans.ts templates/registry.ts templates/*/projection.ts --fix",
61
+ "lint": "oxlint --quiet --format=unix --config ../../oxlint.config.ts src templates/projection-plans.ts templates/registry.ts templates/*/projection.ts templates/*/behavior.test.ts",
62
+ "lint:fix": "oxlint --format=unix --config ../../oxlint.config.ts src templates/projection-plans.ts templates/registry.ts templates/*/projection.ts templates/*/behavior.test.ts --fix",
46
63
  "typecheck": "tsc -p tsconfig.json --noEmit --pretty false"
47
64
  },
48
65
  "dependencies": {
@@ -52,9 +69,25 @@
52
69
  "valibot": "catalog:"
53
70
  },
54
71
  "devDependencies": {
72
+ "@hono/node-server": "catalog:",
73
+ "@playwright/test": "catalog:",
74
+ "@tailwindcss/vite": "catalog:",
55
75
  "@types/node": "catalog:",
76
+ "@vikejs/hono": "catalog:",
77
+ "@vitejs/plugin-vue": "catalog:",
78
+ "drizzle-kit": "catalog:",
79
+ "drizzle-orm": "catalog:",
80
+ "hono": "catalog:",
56
81
  "oxfmt": "catalog:",
57
82
  "oxlint": "catalog:",
58
- "oxlint-tsgolint": "catalog:"
83
+ "oxlint-tsgolint": "catalog:",
84
+ "pinia": "catalog:",
85
+ "telefunc": "catalog:",
86
+ "vike": "catalog:",
87
+ "vike-vue": "catalog:",
88
+ "vite": "catalog:",
89
+ "vitest": "catalog:",
90
+ "vue": "catalog:",
91
+ "yaml": "catalog:"
59
92
  }
60
93
  }