@ykdz/template 0.0.4 → 0.0.6
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.
- package/dist/src/cli.js +79 -34
- package/dist/src/declarations.d.ts +36 -0
- package/dist/src/declarations.js +31 -2
- package/dist/src/generated-scenarios.d.ts +62 -0
- package/dist/src/generated-scenarios.js +361 -0
- package/dist/src/module-graph.d.ts +1 -1
- package/dist/src/module-graph.js +10 -2
- package/dist/src/package-addition-support.d.ts +5 -0
- package/dist/src/package-addition-support.js +4 -0
- package/dist/src/package-addition.d.ts +1 -0
- package/dist/src/package-addition.js +409 -69
- package/dist/src/package-linking.d.ts +55 -0
- package/dist/src/package-linking.js +116 -0
- package/dist/src/preset-projection.d.ts +4 -1
- package/dist/src/preset-source.d.ts +430 -0
- package/dist/src/preset-source.js +940 -0
- package/dist/src/projection-capabilities.d.ts +67 -0
- package/dist/src/projection-capabilities.js +2207 -0
- package/dist/src/renderer.js +20 -1
- package/dist/src/template-boundary-check.d.ts +7 -3
- package/dist/src/template-boundary-check.js +104 -10
- package/package.json +3 -2
- package/templates/hono-api/src/server.ts +1 -1
- package/templates/hono-api/test/app.test.ts +1 -1
- package/templates/preset-source.json +499 -0
- package/templates/ts-lib/src/index.ts +2 -2
- package/templates/ts-lib/src/name-schema.ts +3 -0
- package/templates/vue-app/playwright.package-addition.config.ts +22 -0
- package/templates/vue-app/src/App.vue +1 -1
- package/templates/vue-app/test/app.test.ts +1 -1
- package/templates/vue-hono-app/web/src/App.vue +2 -2
- package/templates/vue-hono-app/web/test/app.test.ts +1 -1
- package/dist/templates/hono-api/projection.d.ts +0 -6
- package/dist/templates/hono-api/projection.js +0 -538
- package/dist/templates/projection-plans.d.ts +0 -7
- package/dist/templates/projection-plans.js +0 -94
- package/dist/templates/registry.d.ts +0 -7
- package/dist/templates/registry.js +0 -42
- package/dist/templates/rust-bin/projection.d.ts +0 -9
- package/dist/templates/rust-bin/projection.js +0 -390
- package/dist/templates/ts-lib/projection.d.ts +0 -6
- package/dist/templates/ts-lib/projection.js +0 -523
- package/dist/templates/vue-app/projection.d.ts +0 -6
- package/dist/templates/vue-app/projection.js +0 -757
- package/dist/templates/vue-hono-app/projection.d.ts +0 -8
- package/dist/templates/vue-hono-app/projection.js +0 -693
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { ProjectBlueprint, ValidationIssue, ValidationResult } from "./declarations.js";
|
|
2
|
+
import type { GenerationContext } from "./generation-context.js";
|
|
3
|
+
import type { PresetBlueprintOptions, PresetPackageAdditionOptions, PresetPackageAdditionPlan, PresetProjectionPlan } from "./preset-projection.js";
|
|
4
|
+
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
|
+
export type WorkspaceNodePackageDeclaration = {
|
|
15
|
+
readonly kind: WorkspaceNodePackageKind;
|
|
16
|
+
readonly path: "apps/api" | "apps/web";
|
|
17
|
+
readonly sourceFiles: readonly string[];
|
|
18
|
+
};
|
|
19
|
+
export type WorkspaceNodePackagesCapabilityDeclaration = {
|
|
20
|
+
readonly kind: "workspace-node-packages";
|
|
21
|
+
readonly workspacePackageGlob: "apps/*";
|
|
22
|
+
readonly packages: readonly WorkspaceNodePackageDeclaration[];
|
|
23
|
+
readonly packageLinks?: readonly {
|
|
24
|
+
readonly consumerPackagePath: "apps/web";
|
|
25
|
+
readonly providerPackagePath: "apps/api";
|
|
26
|
+
}[];
|
|
27
|
+
};
|
|
28
|
+
export type RustBinaryWorkspaceCapabilityDeclaration = {
|
|
29
|
+
readonly kind: "rust-binary-workspace";
|
|
30
|
+
readonly workspacePackageGlob: "packages/*";
|
|
31
|
+
readonly sourceFiles: readonly string[];
|
|
32
|
+
};
|
|
33
|
+
export type StrictTypescriptRootCapabilityDeclaration = {
|
|
34
|
+
readonly kind: "strict-typescript-root";
|
|
35
|
+
};
|
|
36
|
+
export type OxcFormatLintCapabilityDeclaration = {
|
|
37
|
+
readonly kind: "oxc-format-lint";
|
|
38
|
+
};
|
|
39
|
+
export type NodePnpmDevcontainerCapabilityDeclaration = {
|
|
40
|
+
readonly kind: "node-pnpm-devcontainer";
|
|
41
|
+
};
|
|
42
|
+
export type GithubMaintenanceCapabilityDeclaration = {
|
|
43
|
+
readonly kind: "github-maintenance";
|
|
44
|
+
};
|
|
45
|
+
export type ProjectionCapabilityDeclaration = WorkspaceLibraryPackageCapabilityDeclaration | WorkspaceNodePackagesCapabilityDeclaration | RustBinaryWorkspaceCapabilityDeclaration | StrictTypescriptRootCapabilityDeclaration | OxcFormatLintCapabilityDeclaration | NodePnpmDevcontainerCapabilityDeclaration | GithubMaintenanceCapabilityDeclaration;
|
|
46
|
+
export type PresetProjectionDeclaration = {
|
|
47
|
+
readonly capabilities: readonly ProjectionCapabilityDeclaration[];
|
|
48
|
+
};
|
|
49
|
+
export declare function validateProjectionCapabilities(input: unknown): ValidationResult<PresetProjectionDeclaration>;
|
|
50
|
+
export declare function projectionCapabilityIssues(presets: readonly PresetSourceManifestPreset[]): ValidationIssue[];
|
|
51
|
+
export declare function normalizePresetProjectionDeclaration(declaration: PresetProjectionDeclaration): PresetProjectionDeclaration;
|
|
52
|
+
export declare function interpretPresetProjectionDeclaration(options: {
|
|
53
|
+
readonly preset: PresetSourceManifestPreset;
|
|
54
|
+
readonly declaration: PresetProjectionDeclaration;
|
|
55
|
+
readonly context: GenerationContext;
|
|
56
|
+
}): PresetProjectionPlan;
|
|
57
|
+
export declare function blueprintForPresetSourcePreset(preset: PresetSourceManifestPreset, options?: PresetBlueprintOptions): ProjectBlueprint;
|
|
58
|
+
export declare function projectPresetSourcePreset(options: {
|
|
59
|
+
readonly preset: PresetSourceManifestPreset;
|
|
60
|
+
readonly context: GenerationContext;
|
|
61
|
+
}): PresetProjectionPlan;
|
|
62
|
+
export declare function planPresetSourcePackageAddition(options: {
|
|
63
|
+
readonly preset: PresetSourceManifestPreset;
|
|
64
|
+
readonly addition: PresetPackageAdditionOptions;
|
|
65
|
+
}): Promise<PresetPackageAdditionPlan>;
|
|
66
|
+
export declare function defaultPackagePathForPresetSourcePackageAddition(preset: PresetSourceManifestPreset, packageLeafName: string): string;
|
|
67
|
+
export declare function loadBuiltInPresetProjectionDeclaration(presetName: string): PresetProjectionDeclaration;
|