@ykdz/template 0.0.9 → 0.0.11

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 (51) hide show
  1. package/dist/cli.js +2 -2
  2. package/node_modules/@ykdz/template-builtin-source/dist/src/index.d.ts +4 -4
  3. package/node_modules/@ykdz/template-builtin-source/dist/src/index.js +12 -5
  4. package/node_modules/@ykdz/template-builtin-source/dist/templates/hono-api/projection.d.ts +1 -1
  5. package/node_modules/@ykdz/template-builtin-source/dist/templates/hono-api/projection.js +1 -1
  6. package/node_modules/@ykdz/template-builtin-source/dist/templates/projection-plans.js +9 -6
  7. package/node_modules/@ykdz/template-builtin-source/dist/templates/rust-bin/projection.d.ts +1 -1
  8. package/node_modules/@ykdz/template-builtin-source/dist/templates/rust-bin/projection.js +1 -1
  9. package/node_modules/@ykdz/template-builtin-source/dist/templates/ts-lib/projection.d.ts +1 -1
  10. package/node_modules/@ykdz/template-builtin-source/dist/templates/ts-lib/projection.js +1 -1
  11. package/node_modules/@ykdz/template-builtin-source/dist/templates/vue-app/projection.d.ts +1 -1
  12. package/node_modules/@ykdz/template-builtin-source/dist/templates/vue-app/projection.js +9 -4
  13. package/node_modules/@ykdz/template-builtin-source/dist/templates/vue-hono-app/projection.d.ts +1 -1
  14. package/node_modules/@ykdz/template-builtin-source/dist/templates/vue-hono-app/projection.js +7 -7
  15. package/node_modules/@ykdz/template-builtin-source/package.json +4 -3
  16. package/node_modules/@ykdz/template-builtin-source/templates/preset-source.json +39 -11
  17. package/node_modules/@ykdz/template-builtin-source/templates/vue-app/scripts/run-playwright.ts +25 -0
  18. package/node_modules/@ykdz/template-builtin-source/templates/vue-app/src/App.vue +18 -4
  19. package/node_modules/@ykdz/template-builtin-source/templates/vue-hono-app/web/scripts/run-playwright.ts +25 -0
  20. package/node_modules/@ykdz/template-builtin-source/templates/vue-hono-app/web/src/App.vue +18 -4
  21. package/node_modules/@ykdz/template-core/dist/declarations.d.ts +2 -203
  22. package/node_modules/@ykdz/template-core/dist/declarations.js +1 -303
  23. package/node_modules/@ykdz/template-core/dist/devcontainer.d.ts +17 -0
  24. package/node_modules/@ykdz/template-core/dist/devcontainer.js +22 -21
  25. package/node_modules/@ykdz/template-core/dist/editor-customization.d.ts +10 -1
  26. package/node_modules/@ykdz/template-core/dist/editor-customization.js +36 -26
  27. package/node_modules/@ykdz/template-core/dist/generated-scenarios.d.ts +5 -0
  28. package/node_modules/@ykdz/template-core/dist/generated-scenarios.js +42 -24
  29. package/node_modules/@ykdz/template-core/dist/generation-context.d.ts +1 -1
  30. package/node_modules/@ykdz/template-core/dist/module-graph.d.ts +19 -1
  31. package/node_modules/@ykdz/template-core/dist/module-graph.js +42 -3
  32. package/node_modules/@ykdz/template-core/dist/next-step-instructions.d.ts +2 -0
  33. package/node_modules/@ykdz/template-core/dist/next-step-instructions.js +11 -22
  34. package/node_modules/@ykdz/template-core/dist/package-addition-support.d.ts +2 -1
  35. package/node_modules/@ykdz/template-core/dist/package-addition-support.js +2 -4
  36. package/node_modules/@ykdz/template-core/dist/package-addition.js +4 -3
  37. package/node_modules/@ykdz/template-core/dist/package-linking.d.ts +2 -6
  38. package/node_modules/@ykdz/template-core/dist/package-linking.js +1 -1
  39. package/node_modules/@ykdz/template-core/dist/pnpm-workspace.yaml +3 -5
  40. package/node_modules/@ykdz/template-core/dist/preset-projection.d.ts +1 -2
  41. package/node_modules/@ykdz/template-core/dist/preset-source.d.ts +4 -418
  42. package/node_modules/@ykdz/template-core/dist/preset-source.js +81 -726
  43. package/node_modules/@ykdz/template-core/dist/project-github.js +2 -6
  44. package/node_modules/@ykdz/template-core/dist/projection-capabilities.d.ts +5 -53
  45. package/node_modules/@ykdz/template-core/dist/projection-capabilities.js +108 -507
  46. package/node_modules/@ykdz/template-core/dist/toolchain-resolution.js +1 -1
  47. package/node_modules/@ykdz/template-core/package.json +4 -3
  48. package/node_modules/@ykdz/template-shared/dist/index.d.ts +794 -0
  49. package/node_modules/@ykdz/template-shared/dist/index.js +1637 -0
  50. package/node_modules/@ykdz/template-shared/package.json +32 -0
  51. package/package.json +9 -6
@@ -1,4 +1,4 @@
1
- import {} from "./module-graph.js";
1
+ import { renderPlaywrightBrowserInstallCommand, } from "./module-graph.js";
2
2
  const defaultCiCapability = {
3
3
  workflowName: "Check",
4
4
  jobName: "check",
@@ -74,9 +74,5 @@ function defaultDependabotDirectory(ecosystem) {
74
74
  return ecosystem === "docker" ? "/.devcontainer" : "/";
75
75
  }
76
76
  function renderCiEnvironmentNeedCommand(need) {
77
- if (need.kind === "playwright-browser-assets" &&
78
- need.owner.path === "apps/web") {
79
- return `pnpm --filter ./apps/web exec playwright install --with-deps ${need.browser}`;
80
- }
81
- return `pnpm exec playwright install --with-deps ${need.browser}`;
77
+ return renderPlaywrightBrowserInstallCommand(need, { withDeps: true });
82
78
  }
@@ -1,63 +1,16 @@
1
- import type { ProjectBlueprint, ValidationIssue, ValidationResult } from "./declarations.js";
1
+ import type { GithubMaintenanceCapabilityDeclaration, NodePnpmDevcontainerCapabilityDeclaration, ProjectBlueprint, ProjectionCapabilityDeclaration, ProjectionCapabilityKind, OxcFormatLintCapabilityDeclaration, PresetProjectionDeclaration, RustBinaryWorkspaceCapabilityDeclaration, StrictTypescriptRootCapabilityDeclaration, WorkspaceLibraryPackageCapabilityDeclaration, WorkspaceNodePackageDeclaration, WorkspaceNodePackageKind, WorkspaceNodePackagesCapabilityDeclaration, WorkspaceNodePackagePath } from "@ykdz/template-shared";
2
+ import { normalizePresetProjectionDeclaration, projectionCapabilityIssues, validatePresetProjectionDeclaration as validateProjectionCapabilities } from "@ykdz/template-shared";
2
3
  import type { GenerationContext } from "./generation-context.js";
3
4
  import type { PresetBlueprintOptions, PresetPackageAdditionOptions, PresetPackageAdditionPlan, PresetProjectionPlan } from "./preset-projection.js";
4
5
  import type { PresetSourceManifestPreset } from "./preset-source.js";
5
- export type ProjectionCapabilityKind = "workspace-library-package" | "workspace-node-packages" | "rust-binary-workspace" | "strict-typescript-root" | "oxc-format-lint" | "node-pnpm-devcontainer" | "github-maintenance";
6
- export type WorkspaceLibraryPackageCapabilityDeclaration = {
7
- readonly kind: "workspace-library-package";
8
- readonly workspacePackageGlob: "packages/*";
9
- readonly packageRole: "shared-library";
10
- readonly packageSourcePreset: "ts-lib";
11
- readonly sourceFiles: readonly string[];
12
- };
13
- export type WorkspaceNodePackageKind = "hono-api" | "vue-app";
14
- type WorkspaceNodePackagePath = "apps/api" | "apps/web";
15
- export type WorkspaceNodePackageDeclaration = {
16
- readonly kind: WorkspaceNodePackageKind;
17
- readonly path: WorkspaceNodePackagePath;
18
- readonly sourceFiles: readonly string[];
19
- };
20
- export type WorkspaceNodePackagesCapabilityDeclaration = {
21
- readonly kind: "workspace-node-packages";
22
- readonly workspacePackageGlob: "apps/*";
23
- readonly packages: readonly WorkspaceNodePackageDeclaration[];
24
- readonly packageLinks?: readonly {
25
- readonly consumerPackagePath: "apps/web";
26
- readonly providerPackagePath: "apps/api";
27
- }[];
28
- };
29
- export type RustBinaryWorkspaceCapabilityDeclaration = {
30
- readonly kind: "rust-binary-workspace";
31
- readonly workspacePackageGlob: "packages/*";
32
- readonly sourceFiles: readonly string[];
33
- };
34
- export type StrictTypescriptRootCapabilityDeclaration = {
35
- readonly kind: "strict-typescript-root";
36
- };
37
- export type OxcFormatLintCapabilityDeclaration = {
38
- readonly kind: "oxc-format-lint";
39
- };
40
- export type NodePnpmDevcontainerCapabilityDeclaration = {
41
- readonly kind: "node-pnpm-devcontainer";
42
- };
43
- export type GithubMaintenanceCapabilityDeclaration = {
44
- readonly kind: "github-maintenance";
45
- };
46
- export type ProjectionCapabilityDeclaration = WorkspaceLibraryPackageCapabilityDeclaration | WorkspaceNodePackagesCapabilityDeclaration | RustBinaryWorkspaceCapabilityDeclaration | StrictTypescriptRootCapabilityDeclaration | OxcFormatLintCapabilityDeclaration | NodePnpmDevcontainerCapabilityDeclaration | GithubMaintenanceCapabilityDeclaration;
47
- export type PresetProjectionDeclaration = {
48
- readonly capabilities: readonly ProjectionCapabilityDeclaration[];
49
- };
6
+ export { normalizePresetProjectionDeclaration, projectionCapabilityIssues, validateProjectionCapabilities, };
7
+ export type { GithubMaintenanceCapabilityDeclaration, NodePnpmDevcontainerCapabilityDeclaration, OxcFormatLintCapabilityDeclaration, PresetProjectionDeclaration, ProjectionCapabilityDeclaration, ProjectionCapabilityKind, RustBinaryWorkspaceCapabilityDeclaration, StrictTypescriptRootCapabilityDeclaration, WorkspaceLibraryPackageCapabilityDeclaration, WorkspaceNodePackageDeclaration, WorkspaceNodePackageKind, WorkspaceNodePackagesCapabilityDeclaration, WorkspaceNodePackagePath, };
50
8
  export type ProjectionSourcePreset = "hono-api" | "rust-bin" | "ts-lib" | "vue-app" | "vue-hono-app";
51
9
  export type PresetProjectionSourceRoots = {
52
10
  readonly preset: (sourcePreset: ProjectionSourcePreset) => string;
53
11
  readonly sharedOxc: () => string;
54
- readonly sharedDevcontainer: () => string;
12
+ readonly sharedResource: (resourceId: string) => string | undefined;
55
13
  };
56
- export declare function validateProjectionCapabilities(input: unknown): ValidationResult<PresetProjectionDeclaration>;
57
- export declare function projectionCapabilityIssues(presets: readonly {
58
- readonly projection?: unknown;
59
- }[]): ValidationIssue[];
60
- export declare function normalizePresetProjectionDeclaration(declaration: unknown): PresetProjectionDeclaration;
61
14
  export declare function interpretPresetProjectionDeclaration(options: {
62
15
  readonly preset: PresetSourceManifestPreset;
63
16
  readonly declaration: PresetProjectionDeclaration;
@@ -76,4 +29,3 @@ export declare function planPresetSourcePackageAddition(options: {
76
29
  readonly sourceRoots: PresetProjectionSourceRoots;
77
30
  }): Promise<PresetPackageAdditionPlan>;
78
31
  export declare function defaultPackagePathForPresetSourcePackageAddition(preset: PresetSourceManifestPreset, packageLeafName: string, sourceRoots: PresetProjectionSourceRoots): string;
79
- export {};