@ykdz/template 0.0.31 → 0.0.32

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 (57) hide show
  1. package/node_modules/@ykdz/template-builtin-presets/dist/src/foundation.d.ts +8 -1
  2. package/node_modules/@ykdz/template-builtin-presets/dist/src/foundation.js +283 -149
  3. package/node_modules/@ykdz/template-builtin-presets/dist/src/rust-bin/definition.js +66 -9
  4. package/node_modules/@ykdz/template-builtin-presets/dist/src/shared/development-container.d.ts +2 -0
  5. package/node_modules/@ykdz/template-builtin-presets/dist/src/shared/development-container.js +35 -0
  6. package/node_modules/@ykdz/template-builtin-presets/dist/src/shared/typescript.d.ts +13 -0
  7. package/node_modules/@ykdz/template-builtin-presets/dist/src/shared/typescript.js +70 -0
  8. package/node_modules/@ykdz/template-builtin-presets/dist/src/shared/vue.d.ts +2 -1
  9. package/node_modules/@ykdz/template-builtin-presets/dist/src/shared/vue.js +22 -7
  10. package/node_modules/@ykdz/template-builtin-presets/dist/src/ts-cli/definition.js +4 -3
  11. package/node_modules/@ykdz/template-builtin-presets/dist/src/ts-lib/definition.js +4 -3
  12. package/node_modules/@ykdz/template-builtin-presets/dist/src/vike-app/definition.js +81 -11
  13. package/node_modules/@ykdz/template-builtin-presets/dist/src/vue-app/definition.js +3 -2
  14. package/node_modules/@ykdz/template-builtin-presets/dist/src/vue-hono-app/definition.js +21 -10
  15. package/node_modules/@ykdz/template-builtin-presets/package.json +1 -1
  16. package/node_modules/@ykdz/template-builtin-presets/templates/foundation/.github/workflows/check.dynamic.template +2 -2
  17. package/node_modules/@ykdz/template-builtin-presets/templates/foundation/devcontainer.json +3 -3
  18. package/node_modules/@ykdz/template-builtin-presets/templates/foundation/gitignore +1 -0
  19. package/node_modules/@ykdz/template-builtin-presets/templates/foundation/turbo.json +1 -0
  20. package/node_modules/@ykdz/template-builtin-presets/templates/foundation/typescript-config/base.json +15 -0
  21. package/node_modules/@ykdz/template-builtin-presets/templates/foundation/typescript-config/turbo.json +4 -0
  22. package/node_modules/@ykdz/template-builtin-presets/templates/rust-bin/devcontainer/rust.Dockerfile +3 -3
  23. package/node_modules/@ykdz/template-builtin-presets/templates/shared/devcontainer/browser-test.Dockerfile +1 -1
  24. package/node_modules/@ykdz/template-builtin-presets/templates/shared/oxc/tsconfig.config.json +2 -12
  25. package/node_modules/@ykdz/template-builtin-presets/templates/shared/vue/tsconfig.app.json +6 -13
  26. package/node_modules/@ykdz/template-builtin-presets/templates/shared/vue/tsconfig.node.json +2 -12
  27. package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/tsconfig.json +2 -6
  28. package/node_modules/@ykdz/template-builtin-presets/templates/ts-lib/tsconfig.json +3 -3
  29. package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/db/tsconfig.json +2 -11
  30. package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/db-migrations/tsconfig.json +2 -11
  31. package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/devcontainer/docker-client.Dockerfile +3 -0
  32. package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/scripts/check-standalone-deployment.ts +67 -27
  33. package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/tsconfig.app.json +6 -12
  34. package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/tsconfig.node.json +2 -11
  35. package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/tsconfig.test.json +0 -1
  36. package/node_modules/@ykdz/template-builtin-presets/templates/vue-hono-app/api/tsconfig.json +2 -12
  37. package/node_modules/@ykdz/template-core/dist/development-container-tool-layer.d.ts +56 -0
  38. package/node_modules/@ykdz/template-core/dist/development-container-tool-layer.js +361 -0
  39. package/node_modules/@ykdz/template-core/dist/package-contribution.d.ts +12 -1
  40. package/node_modules/@ykdz/template-core/dist/pnpm-workspace.yaml +1 -0
  41. package/node_modules/@ykdz/template-core/dist/project-github.d.ts +1 -9
  42. package/node_modules/@ykdz/template-core/dist/project-github.js +0 -49
  43. package/node_modules/@ykdz/template-core/dist/project-projection.d.ts +9 -0
  44. package/node_modules/@ykdz/template-core/dist/project-projection.js +84 -5
  45. package/node_modules/@ykdz/template-core/dist/renderer.d.ts +1 -0
  46. package/node_modules/@ykdz/template-core/dist/renderer.js +47 -7
  47. package/node_modules/@ykdz/template-core/dist/template-boundary-check.js +21 -0
  48. package/package.json +3 -3
  49. package/node_modules/@ykdz/template-builtin-presets/templates/foundation/rust/.vscode/extensions.json +0 -3
  50. package/node_modules/@ykdz/template-builtin-presets/templates/foundation/rust/.vscode/settings.json +0 -5
  51. package/node_modules/@ykdz/template-builtin-presets/templates/foundation/rust/devcontainer/devcontainer.json +0 -21
  52. package/node_modules/@ykdz/template-builtin-presets/templates/foundation/rust/devcontainer/rust.Dockerfile +0 -18
  53. package/node_modules/@ykdz/template-builtin-presets/templates/foundation/rust/rust-toolchain.toml +0 -3
  54. package/node_modules/@ykdz/template-builtin-presets/templates/rust-bin/devcontainer/devcontainer.json +0 -21
  55. package/node_modules/@ykdz/template-core/dist/devcontainer.d.ts +0 -83
  56. package/node_modules/@ykdz/template-core/dist/devcontainer.js +0 -217
  57. /package/node_modules/@ykdz/template-builtin-presets/templates/{shared → vike-app}/devcontainer/shellcheck.Dockerfile +0 -0
@@ -18,11 +18,10 @@ function packageScripts() {
18
18
  test: "cargo test --workspace",
19
19
  };
20
20
  }
21
- function rustContribution(context) {
22
- const cargoName = cargoPackageName(context.projectName);
21
+ function rustContribution(options) {
23
22
  const definition = {
24
- name: `@${context.scope}/${cargoName}-native`,
25
- path: `packages/${cargoName}`,
23
+ name: `@${options.context.scope}/${options.packageLeafName}`,
24
+ path: options.packagePath,
26
25
  role: "native-package",
27
26
  };
28
27
  const operations = [
@@ -32,14 +31,14 @@ function rustContribution(context) {
32
31
  source: templateSources.rustBin,
33
32
  from: "Cargo.toml",
34
33
  to: `${definition.path}/Cargo.toml`,
35
- replacements: { CARGO_PACKAGE_NAME: cargoName },
34
+ replacements: { CARGO_PACKAGE_NAME: options.packageLeafName },
36
35
  },
37
36
  {
38
37
  kind: "writeTextTemplate",
39
38
  source: templateSources.rustBin,
40
39
  from: "Cargo.lock",
41
40
  to: `${definition.path}/Cargo.lock`,
42
- replacements: { CARGO_PACKAGE_NAME: cargoName },
41
+ replacements: { CARGO_PACKAGE_NAME: options.packageLeafName },
43
42
  },
44
43
  {
45
44
  kind: "copyFile",
@@ -68,7 +67,7 @@ function rustContribution(context) {
68
67
  version: "0.0.0",
69
68
  private: true,
70
69
  scripts: packageScripts(),
71
- engines: { node: context.toolchain.nodeLtsMajor },
70
+ engines: { node: options.context.toolchain.nodeLtsMajor },
72
71
  },
73
72
  operations,
74
73
  environmentNeeds: [
@@ -93,6 +92,44 @@ function rustContribution(context) {
93
92
  directories: { cargo: `/${definition.path}` },
94
93
  interval: "weekly",
95
94
  },
95
+ developmentContainerToolLayers: [
96
+ {
97
+ identity: "rust",
98
+ dockerfile: {
99
+ source: templateSources.rustBin,
100
+ from: "devcontainer/rust.Dockerfile",
101
+ },
102
+ requires: ["node-pnpm"],
103
+ buildArguments: [{ name: "RUST_TOOLCHAIN", value: "stable" }],
104
+ mounts: [
105
+ {
106
+ identity: "cargo-registry",
107
+ type: "volume",
108
+ source: "${devcontainerId}-cargo-registry",
109
+ target: "/usr/local/cargo/registry",
110
+ },
111
+ {
112
+ identity: "cargo-git",
113
+ type: "volume",
114
+ source: "${devcontainerId}-cargo-git",
115
+ target: "/usr/local/cargo/git",
116
+ },
117
+ ],
118
+ probes: [
119
+ { identity: "cargo", command: "cargo", args: ["--version"] },
120
+ { identity: "rustc", command: "rustc", args: ["--version"] },
121
+ ],
122
+ },
123
+ ],
124
+ templateFiles: [
125
+ {
126
+ identity: "rust-toolchain",
127
+ source: templateSources.rustBin,
128
+ from: "rust-toolchain.toml",
129
+ to: "rust-toolchain.toml",
130
+ replacements: { RUST_TOOLCHAIN: "stable" },
131
+ },
132
+ ],
96
133
  },
97
134
  };
98
135
  }
@@ -105,10 +142,30 @@ export const rustBinDefinition = {
105
142
  source: templateSources.rustBin,
106
143
  plannerSourceFile: fileURLToPath(import.meta.url),
107
144
  blueprint(context) {
145
+ const packageLeafName = cargoPackageName(context.projectName);
108
146
  return {
109
147
  schemaVersion: 2,
110
- packages: [rustContribution(context).definition],
148
+ packages: [
149
+ rustContribution({
150
+ context,
151
+ packageLeafName,
152
+ packagePath: `packages/${packageLeafName}`,
153
+ }).definition,
154
+ ],
111
155
  };
112
156
  },
113
- planInitialization: rustContribution,
157
+ planInitialization(context) {
158
+ const packageLeafName = cargoPackageName(context.projectName);
159
+ return rustContribution({
160
+ context,
161
+ packageLeafName,
162
+ packagePath: `packages/${packageLeafName}`,
163
+ });
164
+ },
165
+ defaultPackagePath({ packageLeafName }) {
166
+ return `packages/${packageLeafName}`;
167
+ },
168
+ planPackageAddition({ context, packageLeafName, packagePath }) {
169
+ return rustContribution({ context, packageLeafName, packagePath });
170
+ },
114
171
  };
@@ -0,0 +1,2 @@
1
+ import type { DevelopmentContainerToolLayer } from "#template-core/development-container-tool-layer";
2
+ export declare function browserTestDevelopmentContainerToolLayer(): DevelopmentContainerToolLayer;
@@ -0,0 +1,35 @@
1
+ import { loadTemplateDependencyCatalog } from "#template-core/dependency-catalog";
2
+ import { templateSources } from "../template-sources.js";
3
+ export function browserTestDevelopmentContainerToolLayer() {
4
+ const playwrightTestVersion = loadTemplateDependencyCatalog()["@playwright/test"];
5
+ if (playwrightTestVersion === undefined) {
6
+ throw new Error("Template Dependency Catalog is missing dependency: @playwright/test");
7
+ }
8
+ return {
9
+ identity: "browser-test",
10
+ dockerfile: {
11
+ source: templateSources.sharedDevcontainer,
12
+ from: "browser-test.Dockerfile",
13
+ },
14
+ requires: ["node-pnpm"],
15
+ buildArguments: [
16
+ {
17
+ name: "PLAYWRIGHT_CLI_PACKAGE",
18
+ value: `@playwright/test@${playwrightTestVersion}`,
19
+ },
20
+ ],
21
+ probes: [
22
+ {
23
+ identity: "playwright",
24
+ command: "npx",
25
+ args: [
26
+ "--yes",
27
+ "--package",
28
+ `@playwright/test@${playwrightTestVersion}`,
29
+ "playwright",
30
+ "--version",
31
+ ],
32
+ },
33
+ ],
34
+ };
35
+ }
@@ -0,0 +1,13 @@
1
+ import type { PackageContribution } from "#template-core/package-contribution";
2
+ import type { GenerationContext } from "#template-core/preset-definition";
3
+ import type { PackageDefinition } from "#template-core/project-blueprint-v2";
4
+ import type { RenderOperation, TemplateSourceHandle } from "#template-core/renderer";
5
+ export declare function typescriptConfigPackageName(context: GenerationContext): string;
6
+ export declare function typescriptConfigPackageDefinition(context: GenerationContext): PackageDefinition;
7
+ export declare function typescriptConfigSourceOperation(options: {
8
+ readonly context: GenerationContext;
9
+ readonly source: TemplateSourceHandle;
10
+ readonly from: string;
11
+ readonly to: string;
12
+ }): RenderOperation;
13
+ export declare function typescriptConfigContribution(context: GenerationContext): PackageContribution;
@@ -0,0 +1,70 @@
1
+ import { templateSources } from "../template-sources.js";
2
+ export function typescriptConfigPackageName(context) {
3
+ return `@${context.scope}/typescript-config`;
4
+ }
5
+ export function typescriptConfigPackageDefinition(context) {
6
+ return {
7
+ name: typescriptConfigPackageName(context),
8
+ path: "packages/typescript-config",
9
+ role: "shared-library",
10
+ };
11
+ }
12
+ export function typescriptConfigSourceOperation(options) {
13
+ return {
14
+ kind: "writeTextTemplate",
15
+ source: options.source,
16
+ from: options.from,
17
+ to: options.to,
18
+ replacements: {
19
+ TYPESCRIPT_CONFIG_PACKAGE: typescriptConfigPackageName(options.context),
20
+ },
21
+ };
22
+ }
23
+ export function typescriptConfigContribution(context) {
24
+ const definition = typescriptConfigPackageDefinition(context);
25
+ return {
26
+ definition,
27
+ exposure: { exports: {}, imports: {} },
28
+ manifest: {
29
+ name: definition.name,
30
+ version: "0.0.0",
31
+ private: true,
32
+ files: ["base.json"],
33
+ scripts: {
34
+ "format:check": "oxfmt --list-different --config ../../oxfmt.config.ts .",
35
+ "format:write": "oxfmt --write --config ../../oxfmt.config.ts .",
36
+ },
37
+ devDependencies: { oxfmt: "catalog:" },
38
+ engines: { node: context.toolchain.nodeLtsMajor },
39
+ },
40
+ operations: [
41
+ {
42
+ kind: "writeJson",
43
+ to: `${definition.path}/package.json`,
44
+ value: {},
45
+ multilineArrays: ["files"],
46
+ },
47
+ {
48
+ kind: "copyFile",
49
+ source: templateSources.foundation,
50
+ from: "typescript-config/base.json",
51
+ to: `${definition.path}/base.json`,
52
+ },
53
+ {
54
+ kind: "copyFile",
55
+ source: templateSources.foundation,
56
+ from: "typescript-config/turbo.json",
57
+ to: `${definition.path}/turbo.json`,
58
+ },
59
+ ],
60
+ environmentNeeds: [],
61
+ foundation: {
62
+ toolchains: {},
63
+ editorCapabilities: ["oxc-format-lint"],
64
+ dependencyMaintenance: {
65
+ ecosystems: ["npm", "github-actions", "docker"],
66
+ interval: "weekly",
67
+ },
68
+ },
69
+ };
70
+ }
@@ -22,10 +22,11 @@ export declare const vueApplicationExposure: {
22
22
  };
23
23
  };
24
24
  export declare function vueApplicationScripts(): Record<string, string>;
25
- export declare function sharedVueSourceOperations(packagePath: string): readonly RenderOperation[];
25
+ export declare function sharedVueSourceOperations(context: GenerationContext, packagePath: string): readonly RenderOperation[];
26
26
  /** Vike shares Vue's compiler runner, but owns its distinct Vike source tree. */
27
27
  export declare function vueTypecheckRunnerSourceOperation(packagePath: string): RenderOperation;
28
28
  export declare function vueApplicationEnvironmentNeeds(packagePath: string): import("@ykdz/template-core/module-graph").PlaywrightBrowserAssetsEnvironmentNeed[];
29
+ export declare function vueApplicationDevelopmentContainerToolLayers(): import("@ykdz/template-core/development-container-tool-layer").DevelopmentContainerToolLayer[];
29
30
  export declare function vueApplicationManifest(options: {
30
31
  readonly context: GenerationContext;
31
32
  readonly definition: PackageDefinition;
@@ -1,5 +1,7 @@
1
1
  import { playwrightBrowserAssetsEnvironmentNeed } from "#template-core/module-graph";
2
2
  import { templateSources } from "../template-sources.js";
3
+ import { browserTestDevelopmentContainerToolLayer } from "./development-container.js";
4
+ import { typescriptConfigSourceOperation } from "./typescript.js";
3
5
  /** Vue's tooling peers need these repository policy overrides, never Core defaults. */
4
6
  export const vuePnpmDependencyOverrides = {
5
7
  "pinia>typescript": "-",
@@ -33,13 +35,23 @@ export function vueApplicationScripts() {
33
35
  "test:e2e": "node --conditions=source scripts/run-playwright.ts",
34
36
  };
35
37
  }
36
- export function sharedVueSourceOperations(packagePath) {
37
- return sharedVueSourceFiles.map((from) => ({
38
- kind: "copyFile",
39
- source: templateSources.vue,
40
- from,
41
- to: `${packagePath}/${from.replace("typescript/", "scripts/")}`,
42
- }));
38
+ export function sharedVueSourceOperations(context, packagePath) {
39
+ return sharedVueSourceFiles.map((from) => {
40
+ const to = `${packagePath}/${from.replace("typescript/", "scripts/")}`;
41
+ return from === "tsconfig.app.json" || from === "tsconfig.node.json"
42
+ ? typescriptConfigSourceOperation({
43
+ context,
44
+ source: templateSources.vue,
45
+ from,
46
+ to,
47
+ })
48
+ : {
49
+ kind: "copyFile",
50
+ source: templateSources.vue,
51
+ from,
52
+ to,
53
+ };
54
+ });
43
55
  }
44
56
  /** Vike shares Vue's compiler runner, but owns its distinct Vike source tree. */
45
57
  export function vueTypecheckRunnerSourceOperation(packagePath) {
@@ -58,6 +70,9 @@ export function vueApplicationEnvironmentNeeds(packagePath) {
58
70
  }),
59
71
  ];
60
72
  }
73
+ export function vueApplicationDevelopmentContainerToolLayers() {
74
+ return [browserTestDevelopmentContainerToolLayer()];
75
+ }
61
76
  export function vueApplicationManifest(options) {
62
77
  return {
63
78
  name: options.definition.name,
@@ -1,4 +1,5 @@
1
1
  import { fileURLToPath } from "node:url";
2
+ import { typescriptConfigSourceOperation } from "../shared/typescript.js";
2
3
  import { templateSources } from "../template-sources.js";
3
4
  function packageScripts() {
4
5
  return {
@@ -43,12 +44,12 @@ function cliContribution(options) {
43
44
  value: {},
44
45
  multilineArrays: ["files"],
45
46
  },
46
- {
47
- kind: "copyFile",
47
+ typescriptConfigSourceOperation({
48
+ context: options.context,
48
49
  source: templateSources.tsCli,
49
50
  from: "tsconfig.json",
50
51
  to: `${definition.path}/tsconfig.json`,
51
- },
52
+ }),
52
53
  {
53
54
  kind: "copyFile",
54
55
  source: templateSources.tsCli,
@@ -1,4 +1,5 @@
1
1
  import { fileURLToPath } from "node:url";
2
+ import { typescriptConfigSourceOperation } from "../shared/typescript.js";
2
3
  import { templateSources } from "../template-sources.js";
3
4
  function packageScripts() {
4
5
  return {
@@ -34,12 +35,12 @@ function libraryContribution(options) {
34
35
  };
35
36
  const operations = [
36
37
  { kind: "writeJson", to: `${definition.path}/package.json`, value: {} },
37
- {
38
- kind: "copyFile",
38
+ typescriptConfigSourceOperation({
39
+ context: options.context,
39
40
  source: templateSources.tsLib,
40
41
  from: "tsconfig.json",
41
42
  to: `${definition.path}/tsconfig.json`,
42
- },
43
+ }),
43
44
  {
44
45
  kind: "copyFile",
45
46
  source: templateSources.tsLib,
@@ -1,5 +1,7 @@
1
1
  import { fileURLToPath } from "node:url";
2
2
  import { dockerEngineEnvironmentNeed, playwrightBrowserAssetsEnvironmentNeed, shellCheckEnvironmentNeed, } from "#template-core/module-graph";
3
+ import { browserTestDevelopmentContainerToolLayer } from "../shared/development-container.js";
4
+ import { typescriptConfigSourceOperation } from "../shared/typescript.js";
3
5
  import { vueTypecheckRunnerSourceOperation } from "../shared/vue.js";
4
6
  import { templateSources } from "../template-sources.js";
5
7
  function definitions(context) {
@@ -34,6 +36,51 @@ function foundation() {
34
36
  workspacePackageGlobs: ["apps/*", "packages/*"],
35
37
  };
36
38
  }
39
+ function shellCheckDevelopmentContainerToolLayer() {
40
+ return {
41
+ identity: "shellcheck",
42
+ dockerfile: {
43
+ source: templateSources.vikeApp,
44
+ from: "devcontainer/shellcheck.Dockerfile",
45
+ },
46
+ requires: ["node-pnpm"],
47
+ probes: [
48
+ { identity: "shellcheck", command: "shellcheck", args: ["--version"] },
49
+ ],
50
+ };
51
+ }
52
+ function dockerClientDevelopmentContainerToolLayer() {
53
+ return {
54
+ identity: "docker-client",
55
+ dockerfile: {
56
+ source: templateSources.vikeApp,
57
+ from: "devcontainer/docker-client.Dockerfile",
58
+ },
59
+ requires: ["node-pnpm"],
60
+ mounts: [
61
+ {
62
+ identity: "docker-socket",
63
+ type: "bind",
64
+ source: "/var/run/docker.sock",
65
+ target: "/var/run/docker.sock",
66
+ },
67
+ ],
68
+ probes: [
69
+ {
70
+ identity: "docker-cli",
71
+ command: "docker",
72
+ args: ["--version"],
73
+ failureMessage: "Docker CLI is unavailable; rebuild the Development Container to install the Docker Client Tool Layer.",
74
+ },
75
+ {
76
+ identity: "docker-daemon",
77
+ command: "docker",
78
+ args: ["version"],
79
+ failureMessage: "Docker daemon is inaccessible through /var/run/docker.sock; verify the host daemon is running and the standard socket is accessible.",
80
+ },
81
+ ],
82
+ };
83
+ }
37
84
  function webScripts() {
38
85
  const prepareDatabase = "DATABASE_FILE=../../apps/web/data/app.sqlite pnpm --dir ../../packages/db-migrations run db:prepare:dev";
39
86
  return {
@@ -81,13 +128,29 @@ function migrationScripts(databasePackageName) {
81
128
  typecheck: "tsc -p tsconfig.json --noEmit --pretty false",
82
129
  };
83
130
  }
84
- function copyOperations(packagePath, sourceFiles) {
85
- return sourceFiles.map((from) => ({
86
- kind: "copyFile",
87
- source: templateSources.vikeApp,
88
- from,
89
- to: `${packagePath}/${from.replace(/^(?:web|db|db-migrations)\//, "")}`,
90
- }));
131
+ function copyOperations(context, packagePath, sourceFiles) {
132
+ const policyConfigs = new Set([
133
+ "web/tsconfig.app.json",
134
+ "web/tsconfig.node.json",
135
+ "db/tsconfig.json",
136
+ "db-migrations/tsconfig.json",
137
+ ]);
138
+ return sourceFiles.map((from) => {
139
+ const to = `${packagePath}/${from.replace(/^(?:web|db|db-migrations)\//, "")}`;
140
+ return policyConfigs.has(from)
141
+ ? typescriptConfigSourceOperation({
142
+ context,
143
+ source: templateSources.vikeApp,
144
+ from,
145
+ to,
146
+ })
147
+ : {
148
+ kind: "copyFile",
149
+ source: templateSources.vikeApp,
150
+ from,
151
+ to,
152
+ };
153
+ });
91
154
  }
92
155
  function webContribution(context) {
93
156
  const { web, db } = definitions(context);
@@ -125,7 +188,7 @@ function webContribution(context) {
125
188
  value: {},
126
189
  multilineArrays: ["files"],
127
190
  },
128
- ...copyOperations(web.path, sourceFiles),
191
+ ...copyOperations(context, web.path, sourceFiles),
129
192
  {
130
193
  kind: "writeTextTemplate",
131
194
  source: templateSources.vikeApp,
@@ -253,7 +316,14 @@ function webContribution(context) {
253
316
  shellCheckEnvironmentNeed(owner),
254
317
  ],
255
318
  deploymentEnvironmentNeeds: [dockerEngineEnvironmentNeed()],
256
- foundation: foundation(),
319
+ foundation: {
320
+ ...foundation(),
321
+ developmentContainerToolLayers: [
322
+ browserTestDevelopmentContainerToolLayer(),
323
+ shellCheckDevelopmentContainerToolLayer(),
324
+ dockerClientDevelopmentContainerToolLayer(),
325
+ ],
326
+ },
257
327
  };
258
328
  }
259
329
  function databaseContribution(context) {
@@ -311,7 +381,7 @@ function databaseContribution(context) {
311
381
  },
312
382
  operations: [
313
383
  { kind: "writeJson", to: `${db.path}/package.json`, value: {} },
314
- ...copyOperations(db.path, sourceFiles),
384
+ ...copyOperations(context, db.path, sourceFiles),
315
385
  ],
316
386
  environmentNeeds: [],
317
387
  foundation: foundation(),
@@ -355,7 +425,7 @@ function migrationsContribution(context) {
355
425
  value: {},
356
426
  multilineArrays: ["files"],
357
427
  },
358
- ...copyOperations(migrations.path, sourceFiles),
428
+ ...copyOperations(context, migrations.path, sourceFiles),
359
429
  ],
360
430
  environmentNeeds: [],
361
431
  foundation: foundation(),
@@ -1,4 +1,4 @@
1
- import { sharedVueSourceOperations, vueApplicationEnvironmentNeeds, vueApplicationExposure, vueApplicationManifest, vueApplicationScripts, } from "../shared/vue.js";
1
+ import { sharedVueSourceOperations, vueApplicationDevelopmentContainerToolLayers, vueApplicationEnvironmentNeeds, vueApplicationExposure, vueApplicationManifest, vueApplicationScripts, } from "../shared/vue.js";
2
2
  import { templateSources } from "../template-sources.js";
3
3
  function packageScripts() {
4
4
  return {
@@ -32,7 +32,7 @@ function appContribution(options) {
32
32
  from,
33
33
  to: `${definition.path}/${from.replace("typescript/", "scripts/")}`,
34
34
  })),
35
- ...sharedVueSourceOperations(definition.path),
35
+ ...sharedVueSourceOperations(options.context, definition.path),
36
36
  ];
37
37
  return {
38
38
  definition,
@@ -52,6 +52,7 @@ function appContribution(options) {
52
52
  interval: "weekly",
53
53
  },
54
54
  workspacePackageGlobs: [`${options.packagePath.split("/")[0]}/*`],
55
+ developmentContainerToolLayers: vueApplicationDevelopmentContainerToolLayers(),
55
56
  },
56
57
  };
57
58
  }
@@ -1,4 +1,5 @@
1
- import { sharedVueSourceOperations, vueApplicationEnvironmentNeeds, vueApplicationExposure, vueApplicationManifest, vueApplicationScripts, } from "../shared/vue.js";
1
+ import { typescriptConfigSourceOperation } from "../shared/typescript.js";
2
+ import { sharedVueSourceOperations, vueApplicationDevelopmentContainerToolLayers, vueApplicationEnvironmentNeeds, vueApplicationExposure, vueApplicationManifest, vueApplicationScripts, } from "../shared/vue.js";
2
3
  import { templateSources } from "../template-sources.js";
3
4
  function apiScripts() {
4
5
  return {
@@ -16,7 +17,7 @@ function apiScripts() {
16
17
  function webScripts() {
17
18
  return {
18
19
  ...vueApplicationScripts(),
19
- typecheck: "node --conditions=source scripts/run-vue-tsc.ts --build --pretty false",
20
+ typecheck: "node --conditions=source scripts/run-vue-tsc.ts --build --noEmit --pretty false",
20
21
  };
21
22
  }
22
23
  function packageFoundation() {
@@ -60,12 +61,19 @@ function apiContribution(context) {
60
61
  ];
61
62
  const operations = [
62
63
  { kind: "writeJson", to: `${definition.path}/package.json`, value: {} },
63
- ...sourceFiles.map((from) => ({
64
- kind: "copyFile",
65
- source: templateSources.vueHonoApp,
66
- from: `api/${from}`,
67
- to: `${definition.path}/${from}`,
68
- })),
64
+ ...sourceFiles.map((from) => from === "tsconfig.json"
65
+ ? typescriptConfigSourceOperation({
66
+ context,
67
+ source: templateSources.vueHonoApp,
68
+ from: `api/${from}`,
69
+ to: `${definition.path}/${from}`,
70
+ })
71
+ : {
72
+ kind: "copyFile",
73
+ source: templateSources.vueHonoApp,
74
+ from: `api/${from}`,
75
+ to: `${definition.path}/${from}`,
76
+ }),
69
77
  ];
70
78
  return {
71
79
  definition,
@@ -120,7 +128,7 @@ function webContribution(context) {
120
128
  from: `web/${from}`,
121
129
  to: `${definition.path}/${from}`,
122
130
  })),
123
- ...sharedVueSourceOperations(definition.path),
131
+ ...sharedVueSourceOperations(context, definition.path),
124
132
  ];
125
133
  return {
126
134
  definition,
@@ -132,7 +140,10 @@ function webContribution(context) {
132
140
  }),
133
141
  operations,
134
142
  environmentNeeds: vueApplicationEnvironmentNeeds(definition.path),
135
- foundation: packageFoundation(),
143
+ foundation: {
144
+ ...packageFoundation(),
145
+ developmentContainerToolLayers: vueApplicationDevelopmentContainerToolLayers(),
146
+ },
136
147
  };
137
148
  }
138
149
  export const vueHonoAppDefinition = {
@@ -33,7 +33,7 @@
33
33
  "format:write": "oxfmt --write --config ../../oxfmt.config.ts .",
34
34
  "lint": "oxlint --quiet --format=unix --config ../../oxlint.config.ts --ignore-pattern dist --ignore-pattern templates .",
35
35
  "lint:fix": "oxlint --format=unix --config ../../oxlint.config.ts --ignore-pattern dist --ignore-pattern templates . --fix",
36
- "test": "vitest run --config vitest.config.ts --reporter=agent --silent=passed-only",
36
+ "test": "vitest run --config vitest.config.ts --reporter=agent --silent=passed-only --maxWorkers=1",
37
37
  "typecheck": "tsc -p tsconfig.json --noEmit --pretty false"
38
38
  },
39
39
  "dependencies": {
@@ -14,6 +14,6 @@ jobs:
14
14
  - uses: actions/setup-node@v7
15
15
  with:
16
16
  node-version-file: package.json
17
- - run: corepack enable{{RUST_CI_PREPARATION}}{{DEPLOYMENT_DOCKER_PREPARATION}}
18
- - run: pnpm install{{CHECK_ENVIRONMENT_PREPARATION}}
17
+ - run: corepack enable{{DEPLOYMENT_DOCKER_PREPARATION}}
18
+ - run: pnpm install
19
19
  - run: pnpm run check{{ROOT_CHECK_CONDITION}}{{DEPLOYMENT_CHECK}}
@@ -4,13 +4,13 @@
4
4
  "dockerfile": "Dockerfile",
5
5
  "args": {
6
6
  "NODE_VERSION": "{{NODE_LTS_MAJOR}}",
7
- "PACKAGE_MANAGER_PIN": "{{PACKAGE_MANAGER_PIN}}",
8
- "PLAYWRIGHT_CLI_PACKAGE": "{{PLAYWRIGHT_CLI_PACKAGE}}"
7
+ "PACKAGE_MANAGER_PIN": "{{PACKAGE_MANAGER_PIN}}"
9
8
  }
10
9
  },
11
10
  "customizations": {
12
11
  "vscode": {
13
12
  "extensions": ["oxc.oxc-vscode"]
14
13
  }
15
- }
14
+ },
15
+ "mounts": []
16
16
  }
@@ -1,6 +1,7 @@
1
1
  node_modules/
2
2
  .pnpm-store/
3
3
  dist/
4
+ target/
4
5
  .turbo/
5
6
  coverage/
6
7
  .env
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "boundaries": { "tags": {} },
3
+ "globalPassThroughEnv": ["CARGO_HOME", "RUSTUP_HOME", "RUSTUP_TOOLCHAIN"],
3
4
  "tasks": {
4
5
  "//#boundaries": { "cache": false },
5
6
  "//#format:check": { "outputs": [] },
@@ -0,0 +1,15 @@
1
+ {
2
+ "compilerOptions": {
3
+ "exactOptionalPropertyTypes": true,
4
+ "forceConsistentCasingInFileNames": true,
5
+ "isolatedModules": true,
6
+ "noEmitOnError": true,
7
+ "noFallthroughCasesInSwitch": true,
8
+ "noImplicitOverride": true,
9
+ "noImplicitReturns": true,
10
+ "noUncheckedIndexedAccess": true,
11
+ "skipLibCheck": false,
12
+ "strict": true,
13
+ "verbatimModuleSyntax": true
14
+ }
15
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "extends": ["//"],
3
+ "tags": ["library"]
4
+ }