@ykdz/template 0.0.6 → 0.0.8

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 (118) hide show
  1. package/dist/{src/cli.js → cli.js} +101 -44
  2. package/node_modules/@ykdz/template-builtin-source/dist/src/index.d.ts +22 -0
  3. package/node_modules/@ykdz/template-builtin-source/dist/src/index.js +92 -0
  4. package/node_modules/@ykdz/template-builtin-source/dist/templates/hono-api/projection.d.ts +6 -0
  5. package/node_modules/@ykdz/template-builtin-source/dist/templates/hono-api/projection.js +230 -0
  6. package/node_modules/@ykdz/template-builtin-source/dist/templates/projection-plans.d.ts +7 -0
  7. package/node_modules/@ykdz/template-builtin-source/dist/templates/projection-plans.js +94 -0
  8. package/node_modules/@ykdz/template-builtin-source/dist/templates/registry.d.ts +2 -0
  9. package/node_modules/@ykdz/template-builtin-source/dist/templates/registry.js +15 -0
  10. package/node_modules/@ykdz/template-builtin-source/dist/templates/rust-bin/projection.d.ts +9 -0
  11. package/node_modules/@ykdz/template-builtin-source/dist/templates/rust-bin/projection.js +103 -0
  12. package/node_modules/@ykdz/template-builtin-source/dist/templates/ts-lib/projection.d.ts +6 -0
  13. package/node_modules/@ykdz/template-builtin-source/dist/templates/ts-lib/projection.js +214 -0
  14. package/node_modules/@ykdz/template-builtin-source/dist/templates/vue-app/projection.d.ts +6 -0
  15. package/node_modules/@ykdz/template-builtin-source/dist/templates/vue-app/projection.js +353 -0
  16. package/node_modules/@ykdz/template-builtin-source/dist/templates/vue-hono-app/projection.d.ts +8 -0
  17. package/node_modules/@ykdz/template-builtin-source/dist/templates/vue-hono-app/projection.js +203 -0
  18. package/node_modules/@ykdz/template-builtin-source/package.json +46 -0
  19. package/{templates → node_modules/@ykdz/template-builtin-source/templates}/shared/oxc/node/oxlint.config.ts +3 -0
  20. package/{templates → node_modules/@ykdz/template-builtin-source/templates}/shared/oxc/vue/oxlint.config.ts +3 -0
  21. package/{dist/src → node_modules/@ykdz/template-core/dist}/declarations.d.ts +7 -4
  22. package/{dist/src → node_modules/@ykdz/template-core/dist}/declarations.js +11 -13
  23. package/{dist/src → node_modules/@ykdz/template-core/dist}/dependency-catalog.js +2 -0
  24. package/{dist/src → node_modules/@ykdz/template-core/dist}/editor-customization.js +3 -1
  25. package/{dist/src → node_modules/@ykdz/template-core/dist}/generated-scenarios.d.ts +2 -0
  26. package/{dist/src → node_modules/@ykdz/template-core/dist}/generated-scenarios.js +16 -5
  27. package/node_modules/@ykdz/template-core/dist/package-addition.d.ts +12 -0
  28. package/{dist/src → node_modules/@ykdz/template-core/dist}/package-addition.js +11 -10
  29. package/{pnpm-workspace.yaml → node_modules/@ykdz/template-core/dist/pnpm-workspace.yaml} +3 -1
  30. package/{dist/src → node_modules/@ykdz/template-core/dist}/preset-source.d.ts +1 -3
  31. package/{dist/src → node_modules/@ykdz/template-core/dist}/preset-source.js +13 -29
  32. package/{dist/src → node_modules/@ykdz/template-core/dist}/projection-capabilities.d.ts +10 -2
  33. package/{dist/src → node_modules/@ykdz/template-core/dist}/projection-capabilities.js +22 -49
  34. package/{dist/src → node_modules/@ykdz/template-core/dist}/renderer.js +12 -4
  35. package/{dist/src → node_modules/@ykdz/template-core/dist}/runtime-paths.js +2 -0
  36. package/{dist/src → node_modules/@ykdz/template-core/dist}/toolchain-resolution.js +1 -1
  37. package/node_modules/@ykdz/template-core/package.json +27 -0
  38. package/package.json +14 -34
  39. package/README.md +0 -35
  40. package/dist/src/package-addition.d.ts +0 -8
  41. /package/dist/{src/cli.d.ts → cli.d.ts} +0 -0
  42. /package/{templates → node_modules/@ykdz/template-builtin-source/templates}/hono-api/.github/dependabot.yml +0 -0
  43. /package/{templates → node_modules/@ykdz/template-builtin-source/templates}/hono-api/.github/workflows/check.yml +0 -0
  44. /package/{templates → node_modules/@ykdz/template-builtin-source/templates}/hono-api/src/app.ts +0 -0
  45. /package/{templates → node_modules/@ykdz/template-builtin-source/templates}/hono-api/src/server.ts +0 -0
  46. /package/{templates → node_modules/@ykdz/template-builtin-source/templates}/hono-api/test/app.test.ts +0 -0
  47. /package/{templates → node_modules/@ykdz/template-builtin-source/templates}/hono-api/vitest.config.ts +0 -0
  48. /package/{templates → node_modules/@ykdz/template-builtin-source/templates}/preset-source.json +0 -0
  49. /package/{templates → node_modules/@ykdz/template-builtin-source/templates}/rust-bin/.github/dependabot.yml +0 -0
  50. /package/{templates → node_modules/@ykdz/template-builtin-source/templates}/rust-bin/.github/workflows/check.yml +0 -0
  51. /package/{templates → node_modules/@ykdz/template-builtin-source/templates}/rust-bin/rust-toolchain.toml +0 -0
  52. /package/{templates → node_modules/@ykdz/template-builtin-source/templates}/rust-bin/rustfmt.toml +0 -0
  53. /package/{templates → node_modules/@ykdz/template-builtin-source/templates}/rust-bin/src/main.rs +0 -0
  54. /package/{templates → node_modules/@ykdz/template-builtin-source/templates}/shared/devcontainer/browser-test.Dockerfile +0 -0
  55. /package/{templates → node_modules/@ykdz/template-builtin-source/templates}/shared/devcontainer/node-pnpm.Dockerfile +0 -0
  56. /package/{templates → node_modules/@ykdz/template-builtin-source/templates}/shared/devcontainer/rust.Dockerfile +0 -0
  57. /package/{templates → node_modules/@ykdz/template-builtin-source/templates}/shared/editor-customization/capabilities.json +0 -0
  58. /package/{templates → node_modules/@ykdz/template-builtin-source/templates}/shared/oxc/oxfmt.config.ts +0 -0
  59. /package/{templates → node_modules/@ykdz/template-builtin-source/templates}/ts-lib/.github/dependabot.yml +0 -0
  60. /package/{templates → node_modules/@ykdz/template-builtin-source/templates}/ts-lib/.github/workflows/check.yml +0 -0
  61. /package/{templates → node_modules/@ykdz/template-builtin-source/templates}/ts-lib/src/index.ts +0 -0
  62. /package/{templates → node_modules/@ykdz/template-builtin-source/templates}/ts-lib/src/name-schema.ts +0 -0
  63. /package/{templates → node_modules/@ykdz/template-builtin-source/templates}/vue-app/.github/dependabot.yml +0 -0
  64. /package/{templates → node_modules/@ykdz/template-builtin-source/templates}/vue-app/.github/workflows/check.yml +0 -0
  65. /package/{templates → node_modules/@ykdz/template-builtin-source/templates}/vue-app/env.d.ts +0 -0
  66. /package/{templates → node_modules/@ykdz/template-builtin-source/templates}/vue-app/index.html +0 -0
  67. /package/{templates → node_modules/@ykdz/template-builtin-source/templates}/vue-app/playwright.config.ts +0 -0
  68. /package/{templates → node_modules/@ykdz/template-builtin-source/templates}/vue-app/playwright.package-addition.config.ts +0 -0
  69. /package/{templates → node_modules/@ykdz/template-builtin-source/templates}/vue-app/src/App.vue +0 -0
  70. /package/{templates → node_modules/@ykdz/template-builtin-source/templates}/vue-app/src/main.ts +0 -0
  71. /package/{templates → node_modules/@ykdz/template-builtin-source/templates}/vue-app/src/stores/counter.ts +0 -0
  72. /package/{templates → node_modules/@ykdz/template-builtin-source/templates}/vue-app/src/style.css +0 -0
  73. /package/{templates → node_modules/@ykdz/template-builtin-source/templates}/vue-app/test/app.test.ts +0 -0
  74. /package/{templates → node_modules/@ykdz/template-builtin-source/templates}/vue-app/test/e2e/app.spec.ts +0 -0
  75. /package/{templates → node_modules/@ykdz/template-builtin-source/templates}/vue-app/vite.config.ts +0 -0
  76. /package/{templates → node_modules/@ykdz/template-builtin-source/templates}/vue-app/vitest.config.ts +0 -0
  77. /package/{templates → node_modules/@ykdz/template-builtin-source/templates}/vue-hono-app/.github/dependabot.yml +0 -0
  78. /package/{templates → node_modules/@ykdz/template-builtin-source/templates}/vue-hono-app/.github/workflows/check.yml +0 -0
  79. /package/{templates → node_modules/@ykdz/template-builtin-source/templates}/vue-hono-app/api/src/index.ts +0 -0
  80. /package/{templates → node_modules/@ykdz/template-builtin-source/templates}/vue-hono-app/api/src/runtime.ts +0 -0
  81. /package/{templates → node_modules/@ykdz/template-builtin-source/templates}/vue-hono-app/api/src/server.ts +0 -0
  82. /package/{templates → node_modules/@ykdz/template-builtin-source/templates}/vue-hono-app/api/test/app.test.ts +0 -0
  83. /package/{templates → node_modules/@ykdz/template-builtin-source/templates}/vue-hono-app/api/vitest.config.ts +0 -0
  84. /package/{templates → node_modules/@ykdz/template-builtin-source/templates}/vue-hono-app/web/env.d.ts +0 -0
  85. /package/{templates → node_modules/@ykdz/template-builtin-source/templates}/vue-hono-app/web/index.html +0 -0
  86. /package/{templates → node_modules/@ykdz/template-builtin-source/templates}/vue-hono-app/web/playwright.config.ts +0 -0
  87. /package/{templates → node_modules/@ykdz/template-builtin-source/templates}/vue-hono-app/web/src/App.vue +0 -0
  88. /package/{templates → node_modules/@ykdz/template-builtin-source/templates}/vue-hono-app/web/src/api.ts +0 -0
  89. /package/{templates → node_modules/@ykdz/template-builtin-source/templates}/vue-hono-app/web/src/main.ts +0 -0
  90. /package/{templates → node_modules/@ykdz/template-builtin-source/templates}/vue-hono-app/web/src/stores/counter.ts +0 -0
  91. /package/{templates → node_modules/@ykdz/template-builtin-source/templates}/vue-hono-app/web/src/style.css +0 -0
  92. /package/{templates → node_modules/@ykdz/template-builtin-source/templates}/vue-hono-app/web/test/app.test.ts +0 -0
  93. /package/{templates → node_modules/@ykdz/template-builtin-source/templates}/vue-hono-app/web/test/e2e/app.spec.ts +0 -0
  94. /package/{templates → node_modules/@ykdz/template-builtin-source/templates}/vue-hono-app/web/vite.config.ts +0 -0
  95. /package/{templates → node_modules/@ykdz/template-builtin-source/templates}/vue-hono-app/web/vitest.config.ts +0 -0
  96. /package/{dist/src → node_modules/@ykdz/template-core/dist}/dependency-catalog.d.ts +0 -0
  97. /package/{dist/src → node_modules/@ykdz/template-core/dist}/devcontainer.d.ts +0 -0
  98. /package/{dist/src → node_modules/@ykdz/template-core/dist}/devcontainer.js +0 -0
  99. /package/{dist/src → node_modules/@ykdz/template-core/dist}/editor-customization.d.ts +0 -0
  100. /package/{dist/src → node_modules/@ykdz/template-core/dist}/generation-context.d.ts +0 -0
  101. /package/{dist/src → node_modules/@ykdz/template-core/dist}/generation-context.js +0 -0
  102. /package/{dist/src → node_modules/@ykdz/template-core/dist}/module-graph.d.ts +0 -0
  103. /package/{dist/src → node_modules/@ykdz/template-core/dist}/module-graph.js +0 -0
  104. /package/{dist/src → node_modules/@ykdz/template-core/dist}/next-step-instructions.d.ts +0 -0
  105. /package/{dist/src → node_modules/@ykdz/template-core/dist}/next-step-instructions.js +0 -0
  106. /package/{dist/src → node_modules/@ykdz/template-core/dist}/package-addition-support.d.ts +0 -0
  107. /package/{dist/src → node_modules/@ykdz/template-core/dist}/package-addition-support.js +0 -0
  108. /package/{dist/src → node_modules/@ykdz/template-core/dist}/package-linking.d.ts +0 -0
  109. /package/{dist/src → node_modules/@ykdz/template-core/dist}/package-linking.js +0 -0
  110. /package/{dist/src → node_modules/@ykdz/template-core/dist}/preset-projection.d.ts +0 -0
  111. /package/{dist/src → node_modules/@ykdz/template-core/dist}/preset-projection.js +0 -0
  112. /package/{dist/src → node_modules/@ykdz/template-core/dist}/project-github.d.ts +0 -0
  113. /package/{dist/src → node_modules/@ykdz/template-core/dist}/project-github.js +0 -0
  114. /package/{dist/src → node_modules/@ykdz/template-core/dist}/renderer.d.ts +0 -0
  115. /package/{dist/src → node_modules/@ykdz/template-core/dist}/runtime-paths.d.ts +0 -0
  116. /package/{dist/src → node_modules/@ykdz/template-core/dist}/template-boundary-check.d.ts +0 -0
  117. /package/{dist/src → node_modules/@ykdz/template-core/dist}/template-boundary-check.js +0 -0
  118. /package/{dist/src → node_modules/@ykdz/template-core/dist}/toolchain-resolution.d.ts +0 -0
@@ -2,6 +2,8 @@ import { existsSync } from "node:fs";
2
2
  import path from "node:path";
3
3
  export function packageTemplateRoot(moduleDir, ...segments) {
4
4
  const candidates = [
5
+ path.join(moduleDir, "..", "..", "builtin-source", "templates", ...segments),
6
+ path.join(moduleDir, "..", "..", "template-builtin-source", "templates", ...segments),
5
7
  path.join(moduleDir, "..", "..", "templates", ...segments),
6
8
  path.join(moduleDir, "..", "templates", ...segments),
7
9
  path.join(moduleDir, "..", "..", "..", "templates", ...segments),
@@ -53,7 +53,7 @@ async function contractPhase(phase, operation) {
53
53
  }
54
54
  catch (error) {
55
55
  const message = error instanceof Error ? error.message : String(error);
56
- throw new Error(`Online toolchain resolution contract failed during ${phase}: ${message}`, error instanceof Error ? { cause: error } : undefined);
56
+ throw new Error(`Online toolchain resolution contract failed during ${phase}: ${message}`, { cause: error });
57
57
  }
58
58
  }
59
59
  function fallbackResult(diagnostics) {
@@ -0,0 +1,27 @@
1
+ {
2
+ "name": "@ykdz/template-core",
3
+ "version": "0.0.8",
4
+ "private": true,
5
+ "files": [
6
+ "dist"
7
+ ],
8
+ "type": "module",
9
+ "exports": {
10
+ "./*": {
11
+ "types": "./dist/*.d.ts",
12
+ "default": "./dist/*.js"
13
+ }
14
+ },
15
+ "scripts": {
16
+ "build": "rm -rf dist && tsc -p tsconfig.build.json && cp ../../pnpm-workspace.yaml dist/pnpm-workspace.yaml",
17
+ "typecheck": "tsc -p tsconfig.json --noEmit"
18
+ },
19
+ "dependencies": {
20
+ "typescript": "catalog:",
21
+ "valibot": "catalog:"
22
+ },
23
+ "devDependencies": {
24
+ "@types/node": "catalog:",
25
+ "execa": "catalog:"
26
+ }
27
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ykdz/template",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "private": false,
5
5
  "description": "Project template generator for YKDZ starter projects.",
6
6
  "keywords": [
@@ -18,17 +18,13 @@
18
18
  "url": "git+https://github.com/YKDZ/template.git"
19
19
  },
20
20
  "bin": {
21
- "template": "dist/src/cli.js"
21
+ "template": "dist/cli.js"
22
22
  },
23
23
  "files": [
24
24
  "dist",
25
- "pnpm-workspace.yaml",
26
- "templates",
27
- "!templates/registry.ts",
28
- "!templates/projection-plans.ts",
29
- "!templates/*/projection.ts",
30
- "!templates/shared/oxc/tsconfig.json",
31
- "!templates/**/node_modules"
25
+ "node_modules/@ykdz/template-core",
26
+ "node_modules/@ykdz/template-builtin-source",
27
+ "!**/node_modules/**/node_modules"
32
28
  ],
33
29
  "type": "module",
34
30
  "publishConfig": {
@@ -36,38 +32,22 @@
36
32
  },
37
33
  "dependencies": {
38
34
  "typescript": "^6.0.3",
39
- "valibot": "^1.4.2"
35
+ "valibot": "^1.4.2",
36
+ "@ykdz/template-builtin-source": "0.0.8",
37
+ "@ykdz/template-core": "0.0.8"
40
38
  },
41
39
  "devDependencies": {
42
- "@types/node": "^24.0.0",
43
- "execa": "^9.6.1",
44
- "oxfmt": "^0.57.0",
45
- "oxlint": "^1.72.0",
46
- "oxlint-tsgolint": "^0.24.0",
47
- "tsx": "^4.22.4",
48
- "vitest": "^4.1.9",
49
- "yaml": "^2.9.0"
40
+ "@types/node": "^24.0.0"
50
41
  },
42
+ "bundledDependencies": [
43
+ "@ykdz/template-builtin-source",
44
+ "@ykdz/template-core"
45
+ ],
51
46
  "engines": {
52
47
  "node": ">=24.0.0"
53
48
  },
54
49
  "scripts": {
55
50
  "build": "rm -rf dist && tsc -p tsconfig.build.json",
56
- "check": "pnpm run check:format && pnpm run typecheck && pnpm run test && pnpm run check:generated && pnpm run check:templates",
57
- "check:format": "oxfmt --check --config templates/shared/oxc/oxfmt.config.ts --ignore-path .oxfmtignore .",
58
- "check:fixtures": "tsx scripts/check-fixtures.ts",
59
- "check:generated": "tsx scripts/check-generated.ts",
60
- "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",
61
- "check:toolchain:online": "tsx scripts/check-online-toolchain-resolution-contract.ts",
62
- "check:templates:boundary": "tsx scripts/check-template-boundary.ts",
63
- "check:templates:github-yaml": "tsx scripts/check-template-github-yaml.ts",
64
- "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",
65
- "check:templates:shared-oxc:format": "oxfmt --check templates/shared/oxc",
66
- "check:templates:shared-oxc:lint": "oxlint templates/shared/oxc --deny-warnings",
67
- "check:templates:shared-oxc:typecheck": "tsc -p templates/shared/oxc/tsconfig.json --noEmit",
68
- "check:templates:static-source": "rustfmt --check templates/rust-bin/src/main.rs",
69
- "fix": "pnpm run build",
70
- "typecheck": "tsc -p tsconfig.json --noEmit",
71
- "test": "vitest run"
51
+ "typecheck": "tsc -p tsconfig.json --noEmit"
72
52
  }
73
53
  }
package/README.md DELETED
@@ -1,35 +0,0 @@
1
- # @ykdz/template
2
-
3
- Project template generator for YKDZ starter projects.
4
-
5
- ## Usage
6
-
7
- ```sh
8
- pnpm dlx @ykdz/template init my-project --preset ts-lib --yes
9
- ```
10
-
11
- Available commands:
12
-
13
- ```sh
14
- template init <dir> --preset <name> --yes
15
- template add package --preset <name> --name <name> [--path <package-path>]
16
- template presets
17
- template schema preset
18
- template schema blueprint
19
- template preset validate <path>
20
- template blueprint validate <path>
21
- ```
22
-
23
- Supported presets are `ts-lib`, `hono-api`, `vue-app`, `vue-hono-app`, and
24
- `rust-bin`.
25
-
26
- ## Publishing
27
-
28
- This package is intended to publish through npm Trusted Publishing from the
29
- GitHub Actions release workflow. Maintainers should complete
30
- [the Trusted Publishing checklist](docs/npm-trusted-publishing.md) before the
31
- first public release.
32
-
33
- ## License
34
-
35
- MIT
@@ -1,8 +0,0 @@
1
- export type AddPackageOptions = {
2
- cwd: string;
3
- preset: string;
4
- name: string;
5
- path?: string;
6
- linkFrom?: readonly string[];
7
- };
8
- export declare function addPackage(options: AddPackageOptions): Promise<void>;
File without changes