@ykdz/template 0.0.22 → 0.0.23

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 (27) hide show
  1. package/node_modules/@ykdz/template-builtin-source/package.json +1 -1
  2. package/node_modules/@ykdz/template-builtin-source/templates/preset-source.json +7 -0
  3. package/node_modules/@ykdz/template-builtin-source/templates/vike-app/.github/workflows/check.yml +2 -8
  4. package/node_modules/@ykdz/template-builtin-source/templates/vike-app/web/Dockerfile +45 -9
  5. package/node_modules/@ykdz/template-builtin-source/templates/vike-app/web/pages/index/+Page.telefunc.ts +1 -2
  6. package/node_modules/@ykdz/template-builtin-source/templates/vike-app/web/playwright.config.ts +45 -9
  7. package/node_modules/@ykdz/template-builtin-source/templates/vike-app/web/scripts/check-standalone-deployment.ts +449 -0
  8. package/node_modules/@ykdz/template-builtin-source/templates/vike-app/web/scripts/container-entrypoint.sh +52 -0
  9. package/node_modules/@ykdz/template-builtin-source/templates/vike-app/web/scripts/prepare-database.sh +6 -0
  10. package/node_modules/@ykdz/template-builtin-source/templates/vike-app/web/scripts/run-playwright.ts +95 -25
  11. package/node_modules/@ykdz/template-builtin-source/templates/vike-app/web/server/app.ts +1 -1
  12. package/node_modules/@ykdz/template-core/dist/dependency-catalog.js +13 -0
  13. package/node_modules/@ykdz/template-core/dist/generated-scenarios.d.ts +3 -2
  14. package/node_modules/@ykdz/template-core/dist/generated-scenarios.js +99 -13
  15. package/node_modules/@ykdz/template-core/dist/module-graph.d.ts +12 -0
  16. package/node_modules/@ykdz/template-core/dist/module-graph.js +18 -0
  17. package/node_modules/@ykdz/template-core/dist/pnpm-workspace.yaml +7 -4
  18. package/node_modules/@ykdz/template-core/dist/preset-projection.d.ts +1 -2
  19. package/node_modules/@ykdz/template-core/dist/project-github.d.ts +0 -8
  20. package/node_modules/@ykdz/template-core/dist/project-github.js +11 -4
  21. package/node_modules/@ykdz/template-core/dist/projection-capabilities.js +15 -13
  22. package/node_modules/@ykdz/template-core/dist/renderer.js +1 -1
  23. package/node_modules/@ykdz/template-core/dist/template-boundary-check.js +1 -1
  24. package/node_modules/@ykdz/template-core/package.json +2 -1
  25. package/node_modules/@ykdz/template-shared/dist/index.d.ts +6 -6
  26. package/node_modules/@ykdz/template-shared/package.json +1 -0
  27. package/package.json +5 -4
@@ -4,7 +4,7 @@ import { normalizePresetProjectionDeclaration, projectionCapabilityIssues, valid
4
4
  import { collectGeneratedManifestCatalogDependencies, collectGeneratedManifestCatalogReferences, renderCargoLockForPackage, renderGeneratedPnpmWorkspaceYaml, renderCargoDependencyTomlEntries, } from "./dependency-catalog.js";
5
5
  import { browserTestToolLayer, checkedDockerfileFirstNodePnpmDevcontainer, dockerfileFirstRustPnpmDevcontainer, nodePnpmToolLayer, rustToolLayer, } from "./devcontainer.js";
6
6
  import { editorCustomizationForCapabilities, loadEditorCustomizationDeclarations, } from "./editor-customization.js";
7
- import { playwrightBrowserAssetsEnvironmentNeed, renderCheckLeafCommand, renderFixCommand, renderFixLeafCommand, renderRootCheckCommand, renderTurboRunCommand, } from "./module-graph.js";
7
+ import { playwrightBrowserAssetsEnvironmentNeed, renderDeploymentCheckCommand, renderCheckLeafCommand, renderFixCommand, renderFixLeafCommand, renderRootCheckCommand, renderTurboRunCommand, } from "./module-graph.js";
8
8
  import { packageManifestExposureFields, packageTurboConfig, planPackageLinks, } from "./package-linking.js";
9
9
  export { normalizePresetProjectionDeclaration, projectionCapabilityIssues, validateProjectionCapabilities, };
10
10
  const strictTypescriptRootBoundary = {
@@ -79,16 +79,10 @@ const capabilityInterpreters = {
79
79
  state.operationFactories.push(workspaceNodePackagesOperations);
80
80
  if (hasVikePackage(capability)) {
81
81
  state.dependencyMaintenanceExtraDirectories.docker = ["/apps/web"];
82
- state.ciDockerImageBuild = {
83
- dockerfile: "apps/web/Dockerfile",
84
- targets: [
85
- { name: "runtime", tag: "vike-app:check" },
86
- {
87
- name: "database-preparation",
88
- tag: "vike-app-db-prepare:check",
89
- },
90
- ],
91
- };
82
+ state.deploymentCheckComponents.push({
83
+ kind: "deployment-image",
84
+ owner: { kind: "package-boundary", path: "apps/web" },
85
+ });
92
86
  }
93
87
  if (capability.packages.length > 1) {
94
88
  state.rootScriptFragments.dev = "turbo run dev --parallel";
@@ -290,6 +284,9 @@ export function interpretPresetProjectionDeclaration(options) {
290
284
  const checkPlan = {
291
285
  components: state.rootCheckComponents,
292
286
  environmentNeeds: state.rootCheckEnvironmentNeeds,
287
+ ...(state.deploymentCheckComponents.length === 0
288
+ ? {}
289
+ : { deploymentChecks: state.deploymentCheckComponents }),
293
290
  };
294
291
  const fixPlan = {
295
292
  components: state.rootFixComponents,
@@ -322,7 +319,6 @@ export function interpretPresetProjectionDeclaration(options) {
322
319
  })),
323
320
  checkPlan,
324
321
  fixPlan,
325
- ciDockerImageBuild: state.ciDockerImageBuild,
326
322
  dependencyMaintenancePolicy,
327
323
  packageScripts,
328
324
  capabilities: completePlanCapabilityFlags(state.flags),
@@ -398,6 +394,7 @@ function createProjectionCompositionState(sourceRoots) {
398
394
  sourceRoots: {},
399
395
  rootCheckComponents: [],
400
396
  rootCheckEnvironmentNeeds: [],
397
+ deploymentCheckComponents: [],
401
398
  packageCheckComponents: [],
402
399
  rootFixComponents: [],
403
400
  packageFixComponents: [],
@@ -408,7 +405,6 @@ function createProjectionCompositionState(sourceRoots) {
408
405
  packageDevDependencies: new Set(),
409
406
  dependencyMaintenanceEcosystems: [],
410
407
  dependencyMaintenanceExtraDirectories: {},
411
- ciDockerImageBuild: undefined,
412
408
  editorCustomizationCapabilities: [],
413
409
  operationFactories: [],
414
410
  flags: {},
@@ -769,6 +765,9 @@ function projectRootPackageScripts(checkPlan, fixPlan, fragments) {
769
765
  const directFragments = directScriptFragments(fragments);
770
766
  return {
771
767
  check: `pnpm run check:boundaries && ${renderRootCheckCommand(checkPlan)}`,
768
+ ...(checkPlan.deploymentChecks === undefined
769
+ ? {}
770
+ : { "check:deployment": renderDeploymentCheckCommand(checkPlan) }),
772
771
  fix: renderFixCommand(fixPlan),
773
772
  ...rootTaskEntrypoints(checkPlan, fixPlan),
774
773
  ...directFragments,
@@ -1074,7 +1073,9 @@ function vikePackageJson(context, packageName, scripts, packageLinkDependencies
1074
1073
  dependencies: {
1075
1074
  ...packageLinkDependencies,
1076
1075
  "@vikejs/hono": "catalog:",
1076
+ "drizzle-orm": "catalog:",
1077
1077
  hono: "catalog:",
1078
+ srvx: "catalog:",
1078
1079
  telefunc: "catalog:",
1079
1080
  vike: "catalog:",
1080
1081
  "vike-vue": "catalog:",
@@ -1593,6 +1594,7 @@ function nodePackageScripts(nodePackage, workspace) {
1593
1594
  const dbCommand = "DATABASE_FILE=../../apps/web/data/app.sqlite pnpm --dir ../../packages/db run db:prepare:dev";
1594
1595
  return {
1595
1596
  "build:run": "vike build",
1597
+ "check:deployment": "node --experimental-strip-types scripts/check-standalone-deployment.ts",
1596
1598
  dev: `${dbCommand} && vike dev`,
1597
1599
  "format:check:run": "oxfmt --list-different --config ../../oxfmt.config.ts .",
1598
1600
  "format:write:run": "oxfmt --write --config ../../oxfmt.config.ts .",
@@ -296,7 +296,7 @@ function parseAnchorComment(commentText) {
296
296
  return multiline?.[1];
297
297
  }
298
298
  async function findTypeScriptAnchorRanges(sourceText) {
299
- const ts = await import("typescript");
299
+ const ts = await import("@typescript/typescript6");
300
300
  const sourceFile = ts.createSourceFile("template-anchor.ts", sourceText, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);
301
301
  const anchors = [];
302
302
  const seenRanges = new Set();
@@ -1,6 +1,6 @@
1
1
  import { readFile } from "node:fs/promises";
2
2
  import path from "node:path";
3
- import ts from "typescript";
3
+ import ts from "@typescript/typescript6";
4
4
  const inlineOperationKinds = new Set([
5
5
  "writeText",
6
6
  "writeJson",
@@ -25,12 +25,13 @@
25
25
  "typecheck": "tsc -p tsconfig.json --noEmit --pretty false"
26
26
  },
27
27
  "dependencies": {
28
+ "@typescript/typescript6": "catalog:",
28
29
  "@ykdz/template-shared": "workspace:*",
29
- "typescript": "catalog:",
30
30
  "valibot": "catalog:"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@types/node": "catalog:",
34
+ "@typescript/native": "catalog:",
34
35
  "execa": "catalog:",
35
36
  "oxfmt": "catalog:",
36
37
  "oxlint": "catalog:",
@@ -142,7 +142,7 @@ export declare const featureNameValues: readonly ["pnpm-catalog", "oxc-format-li
142
142
  export declare const packageManagerJsonSchemaEnum: readonly ["pnpm"];
143
143
  export declare const presetGenerationJsonSchemaEnum: readonly ["supported", "future"];
144
144
  export declare const featureNameJsonSchemaEnum: readonly ["pnpm-catalog", "oxc-format-lint", "strict-typescript", "root-check", "fix-command", "devcontainer", "github-actions", "dependabot", "rustfmt-clippy", "cargo-test", "native-binary-release"];
145
- export declare const projectionCapabilityKinds: ("oxc-format-lint" | "workspace-library-package" | "workspace-node-packages" | "rust-binary-workspace" | "strict-typescript-root" | "node-pnpm-devcontainer" | "github-maintenance")[];
145
+ export declare const projectionCapabilityKinds: ("github-maintenance" | "node-pnpm-devcontainer" | "oxc-format-lint" | "rust-binary-workspace" | "strict-typescript-root" | "workspace-library-package" | "workspace-node-packages")[];
146
146
  export declare const packageLeafNamePattern = "^[a-z0-9][a-z0-9-]*$";
147
147
  export declare const presetSourceManifestJsonSchema: {
148
148
  readonly $schema: "https://json-schema.org/draft/2020-12/schema";
@@ -451,7 +451,7 @@ export declare const presetSourceManifestSchema: v.StrictObjectSchema<{
451
451
  readonly description: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
452
452
  readonly generation: v.PicklistSchema<readonly ["supported", "future"], undefined>;
453
453
  readonly supportedPackageManagers: v.ArraySchema<v.PicklistSchema<readonly ["pnpm"], undefined>, undefined>;
454
- readonly supportedProjectKinds: v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<readonly ["single-package", "multi-package"], undefined>, undefined>, v.MinLengthAction<("single-package" | "multi-package")[], 1, undefined>]>;
454
+ readonly supportedProjectKinds: v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<readonly ["single-package", "multi-package"], undefined>, undefined>, v.MinLengthAction<("multi-package" | "single-package")[], 1, undefined>]>;
455
455
  readonly packageAdditionSupport: v.PicklistSchema<readonly ["supported", "unsupported"], undefined>;
456
456
  readonly features: v.ArraySchema<v.PicklistSchema<readonly ["pnpm-catalog", "oxc-format-lint", "strict-typescript", "root-check", "fix-command", "devcontainer", "github-actions", "dependabot", "rustfmt-clippy", "cargo-test", "native-binary-release"], undefined>, undefined>;
457
457
  readonly dependencyCatalog: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>, readonly []>;
@@ -469,11 +469,11 @@ export declare const presetSourceManifestSchema: v.StrictObjectSchema<{
469
469
  name: string;
470
470
  title: string;
471
471
  description: string;
472
- generation: "supported" | "future";
472
+ generation: "future" | "supported";
473
473
  supportedPackageManagers: "pnpm"[];
474
- supportedProjectKinds: ("single-package" | "multi-package")[];
474
+ supportedProjectKinds: ("multi-package" | "single-package")[];
475
475
  packageAdditionSupport: "supported" | "unsupported";
476
- features: ("pnpm-catalog" | "oxc-format-lint" | "strict-typescript" | "root-check" | "fix-command" | "devcontainer" | "github-actions" | "dependabot" | "rustfmt-clippy" | "cargo-test" | "native-binary-release")[];
476
+ features: ("cargo-test" | "dependabot" | "devcontainer" | "fix-command" | "github-actions" | "native-binary-release" | "oxc-format-lint" | "pnpm-catalog" | "root-check" | "rustfmt-clippy" | "strict-typescript")[];
477
477
  dependencyCatalog: string[];
478
478
  projection?: {
479
479
  capabilities: ({
@@ -614,7 +614,7 @@ export declare const presetFileSchema: v.StrictObjectSchema<{
614
614
  readonly title: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
615
615
  readonly description: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
616
616
  readonly supportedPackageManagers: v.ArraySchema<v.PicklistSchema<readonly ["pnpm"], undefined>, undefined>;
617
- readonly supportedProjectKinds: v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<readonly ["single-package", "multi-package"], undefined>, undefined>, v.MinLengthAction<("single-package" | "multi-package")[], 1, undefined>]>;
617
+ readonly supportedProjectKinds: v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<readonly ["single-package", "multi-package"], undefined>, undefined>, v.MinLengthAction<("multi-package" | "single-package")[], 1, undefined>]>;
618
618
  readonly features: v.ArraySchema<v.PicklistSchema<readonly ["pnpm-catalog", "oxc-format-lint", "strict-typescript", "root-check", "fix-command", "devcontainer", "github-actions", "dependabot", "rustfmt-clippy", "cargo-test", "native-binary-release"], undefined>, undefined>;
619
619
  }, undefined>;
620
620
  export declare const projectBlueprintSchema: v.StrictObjectSchema<{
@@ -29,6 +29,7 @@
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/node": "catalog:",
32
+ "@typescript/native": "catalog:",
32
33
  "oxfmt": "catalog:",
33
34
  "oxlint": "catalog:",
34
35
  "oxlint-tsgolint": "catalog:"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ykdz/template",
3
- "version": "0.0.22",
3
+ "version": "0.0.23",
4
4
  "private": false,
5
5
  "description": "Project template generator for YKDZ starter projects.",
6
6
  "keywords": [
@@ -32,16 +32,17 @@
32
32
  "access": "public"
33
33
  },
34
34
  "dependencies": {
35
- "typescript": "^6.0.3",
35
+ "@typescript/typescript6": "^6.0.2",
36
36
  "valibot": "^1.4.2",
37
37
  "@ykdz/template-core": "0.0.0",
38
38
  "@ykdz/template-builtin-source": "0.0.0",
39
39
  "@ykdz/template-shared": "0.0.0"
40
40
  },
41
41
  "devDependencies": {
42
- "@types/node": "^24.0.0",
42
+ "@types/node": "^24.13.3",
43
+ "@typescript/native": "npm:typescript@^7.0.2",
43
44
  "oxfmt": "^0.58.0",
44
- "oxlint": "^1.72.0",
45
+ "oxlint": "^1.73.0",
45
46
  "oxlint-tsgolint": "^0.24.0"
46
47
  },
47
48
  "bundleDependencies": [