@ykdz/template 0.0.2 → 0.0.4
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/README.md +1 -1
- package/dist/src/cli.d.ts +2 -0
- package/dist/{cli.js → src/cli.js} +91 -58
- package/dist/{declarations.d.ts → src/declarations.d.ts} +3 -5
- package/dist/{declarations.js → src/declarations.js} +48 -145
- package/dist/src/dependency-catalog.d.ts +18 -0
- package/dist/src/dependency-catalog.js +132 -0
- package/dist/src/devcontainer.d.ts +58 -0
- package/dist/src/devcontainer.js +202 -0
- package/dist/src/editor-customization.d.ts +12 -0
- package/dist/src/editor-customization.js +108 -0
- package/dist/{generation-context.d.ts → src/generation-context.d.ts} +2 -3
- package/dist/{generation-context.js → src/generation-context.js} +4 -1
- package/dist/src/module-graph.d.ts +34 -0
- package/dist/src/module-graph.js +58 -0
- package/dist/{next-step-instructions.d.ts → src/next-step-instructions.d.ts} +2 -4
- package/dist/{next-step-instructions.js → src/next-step-instructions.js} +49 -24
- package/dist/{package-addition.d.ts → src/package-addition.d.ts} +1 -1
- package/dist/src/package-addition.js +343 -0
- package/dist/src/preset-projection.d.ts +66 -0
- package/dist/src/preset-projection.js +7 -0
- package/dist/{project-github.d.ts → src/project-github.d.ts} +3 -9
- package/dist/{project-github.js → src/project-github.js} +27 -42
- package/dist/{renderer.d.ts → src/renderer.d.ts} +16 -2
- package/dist/{renderer.js → src/renderer.js} +95 -12
- package/dist/src/runtime-paths.d.ts +1 -0
- package/dist/src/runtime-paths.js +11 -0
- package/dist/src/template-boundary-check.d.ts +34 -0
- package/dist/src/template-boundary-check.js +448 -0
- package/dist/{toolchain-resolution.d.ts → src/toolchain-resolution.d.ts} +0 -1
- package/dist/{toolchain-resolution.js → src/toolchain-resolution.js} +1 -1
- package/dist/templates/hono-api/projection.d.ts +6 -0
- package/dist/templates/hono-api/projection.js +538 -0
- package/dist/templates/projection-plans.d.ts +7 -0
- package/dist/templates/projection-plans.js +94 -0
- package/dist/templates/registry.d.ts +7 -0
- package/dist/templates/registry.js +42 -0
- package/dist/templates/rust-bin/projection.d.ts +9 -0
- package/dist/templates/rust-bin/projection.js +390 -0
- package/dist/templates/ts-lib/projection.d.ts +6 -0
- package/dist/templates/ts-lib/projection.js +523 -0
- package/dist/templates/vue-app/projection.d.ts +6 -0
- package/dist/templates/vue-app/projection.js +757 -0
- package/dist/templates/vue-hono-app/projection.d.ts +8 -0
- package/dist/templates/vue-hono-app/projection.js +693 -0
- package/package.json +38 -28
- package/pnpm-workspace.yaml +35 -0
- package/templates/hono-api/.github/dependabot.yml +13 -0
- package/templates/rust-bin/.github/dependabot.yml +18 -1
- package/templates/rust-bin/rust-toolchain.toml +3 -0
- package/templates/rust-bin/rustfmt.toml +2 -0
- package/templates/shared/devcontainer/browser-test.Dockerfile +2 -0
- package/templates/shared/devcontainer/node-pnpm.Dockerfile +6 -0
- package/templates/shared/devcontainer/rust.Dockerfile +16 -0
- package/templates/shared/editor-customization/capabilities.json +56 -0
- package/templates/ts-lib/.github/dependabot.yml +13 -0
- package/templates/ts-lib/src/index.ts +5 -1
- package/templates/vue-app/.github/dependabot.yml +13 -0
- package/templates/vue-app/.github/workflows/check.yml +1 -1
- package/templates/vue-app/test/e2e/app.spec.ts +4 -1
- package/templates/vue-hono-app/.github/dependabot.yml +13 -0
- package/templates/vue-hono-app/web/test/e2e/app.spec.ts +4 -1
- package/dist/cli.d.ts +0 -3
- package/dist/cli.d.ts.map +0 -1
- package/dist/declarations.d.ts.map +0 -1
- package/dist/devcontainer.d.ts +0 -17
- package/dist/devcontainer.d.ts.map +0 -1
- package/dist/devcontainer.js +0 -23
- package/dist/generation-context.d.ts.map +0 -1
- package/dist/hono-api.d.ts +0 -3
- package/dist/hono-api.d.ts.map +0 -1
- package/dist/hono-api.js +0 -210
- package/dist/module-graph.d.ts +0 -45
- package/dist/module-graph.d.ts.map +0 -1
- package/dist/module-graph.js +0 -187
- package/dist/next-step-instructions.d.ts.map +0 -1
- package/dist/package-addition.d.ts.map +0 -1
- package/dist/package-addition.js +0 -560
- package/dist/project-github.d.ts.map +0 -1
- package/dist/renderer.d.ts.map +0 -1
- package/dist/rust-bin.d.ts +0 -8
- package/dist/rust-bin.d.ts.map +0 -1
- package/dist/rust-bin.js +0 -208
- package/dist/toolchain-resolution.d.ts.map +0 -1
- package/dist/ts-lib.d.ts +0 -8
- package/dist/ts-lib.d.ts.map +0 -1
- package/dist/ts-lib.js +0 -214
- package/dist/vue-app.d.ts +0 -3
- package/dist/vue-app.d.ts.map +0 -1
- package/dist/vue-app.js +0 -301
- package/dist/vue-hono-app.d.ts +0 -7
- package/dist/vue-hono-app.d.ts.map +0 -1
- package/dist/vue-hono-app.js +0 -440
- package/templates/shared/oxc/package.json +0 -18
- package/templates/shared/oxc/tsconfig.json +0 -11
package/dist/hono-api.js
DELETED
|
@@ -1,210 +0,0 @@
|
|
|
1
|
-
import path from "node:path";
|
|
2
|
-
import { fileURLToPath } from "node:url";
|
|
3
|
-
import { nodePnpmDevcontainer } from "./devcontainer.js";
|
|
4
|
-
import { planNodeChecks, planNodeFixes, renderFixCommand, renderRootCheckCommand, } from "./module-graph.js";
|
|
5
|
-
import { projectPresetDependabotConfig, projectPresetGithubCheckWorkflow } from "./project-github.js";
|
|
6
|
-
import { renderNewProject } from "./renderer.js";
|
|
7
|
-
const features = [
|
|
8
|
-
"pnpm-catalog",
|
|
9
|
-
"oxc-format-lint",
|
|
10
|
-
"strict-typescript",
|
|
11
|
-
"root-check",
|
|
12
|
-
"fix-command",
|
|
13
|
-
"devcontainer",
|
|
14
|
-
"github-actions",
|
|
15
|
-
"dependabot",
|
|
16
|
-
];
|
|
17
|
-
const generatedBy = {
|
|
18
|
-
packageName: "@ykdz/template",
|
|
19
|
-
version: "0.0.0",
|
|
20
|
-
command: "template init --preset hono-api",
|
|
21
|
-
};
|
|
22
|
-
function projectNameFromDir(targetDir) {
|
|
23
|
-
return path.basename(path.resolve(targetDir));
|
|
24
|
-
}
|
|
25
|
-
export function projectHonoApiPackageScripts() {
|
|
26
|
-
return {
|
|
27
|
-
build: "tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json",
|
|
28
|
-
check: renderRootCheckCommand(planNodeChecks("hono-api")),
|
|
29
|
-
fix: renderFixCommand(planNodeFixes("hono-api")),
|
|
30
|
-
"format:check": "oxfmt --check .",
|
|
31
|
-
"format:write": "oxfmt --write .",
|
|
32
|
-
lint: "oxlint . --deny-warnings",
|
|
33
|
-
"lint:fix": "oxlint . --fix --deny-warnings",
|
|
34
|
-
start: "node dist/server.js",
|
|
35
|
-
test: "vitest run",
|
|
36
|
-
typecheck: "tsc -p tsconfig.json --noEmit",
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
function packageJson(projectName) {
|
|
40
|
-
return {
|
|
41
|
-
name: projectName,
|
|
42
|
-
version: "0.0.0",
|
|
43
|
-
private: true,
|
|
44
|
-
type: "module",
|
|
45
|
-
scripts: projectHonoApiPackageScripts(),
|
|
46
|
-
dependencies: {
|
|
47
|
-
"@hono/node-server": "catalog:",
|
|
48
|
-
hono: "catalog:",
|
|
49
|
-
},
|
|
50
|
-
devDependencies: {
|
|
51
|
-
"@types/node": "catalog:",
|
|
52
|
-
oxfmt: "catalog:",
|
|
53
|
-
oxlint: "catalog:",
|
|
54
|
-
"tsc-alias": "catalog:",
|
|
55
|
-
typescript: "catalog:",
|
|
56
|
-
vitest: "catalog:",
|
|
57
|
-
},
|
|
58
|
-
engines: {
|
|
59
|
-
node: "22",
|
|
60
|
-
},
|
|
61
|
-
packageManager: "pnpm@10.0.0",
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
function operationsForHonoApi(projectName) {
|
|
65
|
-
return [
|
|
66
|
-
{
|
|
67
|
-
kind: "writeJson",
|
|
68
|
-
to: "package.json",
|
|
69
|
-
value: packageJson(projectName),
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
kind: "writeText",
|
|
73
|
-
to: "pnpm-workspace.yaml",
|
|
74
|
-
text: [
|
|
75
|
-
"packages:",
|
|
76
|
-
" - .",
|
|
77
|
-
"",
|
|
78
|
-
"catalog:",
|
|
79
|
-
' "@hono/node-server": ^2.0.6',
|
|
80
|
-
' "@types/node": ^24.0.0',
|
|
81
|
-
" hono: ^4.12.27",
|
|
82
|
-
" oxfmt: ^0.56.0",
|
|
83
|
-
" oxlint: ^1.71.0",
|
|
84
|
-
" tsc-alias: ^1.8.17",
|
|
85
|
-
" typescript: ^5.8.0",
|
|
86
|
-
" vitest: ^4.1.9",
|
|
87
|
-
"",
|
|
88
|
-
].join("\n"),
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
kind: "writeJson",
|
|
92
|
-
to: "tsconfig.json",
|
|
93
|
-
value: {
|
|
94
|
-
compilerOptions: {
|
|
95
|
-
module: "NodeNext",
|
|
96
|
-
moduleResolution: "NodeNext",
|
|
97
|
-
noEmitOnError: true,
|
|
98
|
-
paths: {
|
|
99
|
-
"@/*": ["./src/*"],
|
|
100
|
-
},
|
|
101
|
-
skipLibCheck: false,
|
|
102
|
-
strict: true,
|
|
103
|
-
target: "ES2022",
|
|
104
|
-
types: ["node", "vitest/globals"],
|
|
105
|
-
},
|
|
106
|
-
include: ["src/**/*.ts", "test/**/*.ts", "vitest.config.ts"],
|
|
107
|
-
},
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
kind: "writeJson",
|
|
111
|
-
to: "tsconfig.build.json",
|
|
112
|
-
value: {
|
|
113
|
-
extends: "./tsconfig.json",
|
|
114
|
-
compilerOptions: {
|
|
115
|
-
outDir: "dist",
|
|
116
|
-
rootDir: "src",
|
|
117
|
-
types: ["node"],
|
|
118
|
-
},
|
|
119
|
-
include: ["src/**/*.ts"],
|
|
120
|
-
},
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
kind: "copyFile",
|
|
124
|
-
sourceRoot: "sharedOxc",
|
|
125
|
-
from: "node/oxlint.config.ts",
|
|
126
|
-
to: "oxlint.config.ts",
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
kind: "copyFile",
|
|
130
|
-
sourceRoot: "sharedOxc",
|
|
131
|
-
from: "oxfmt.config.ts",
|
|
132
|
-
to: "oxfmt.config.ts",
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
kind: "writeText",
|
|
136
|
-
to: ".gitignore",
|
|
137
|
-
text: ["node_modules", "dist", ".env", ""].join("\n"),
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
kind: "copyFile",
|
|
141
|
-
from: "src/app.ts",
|
|
142
|
-
to: "src/app.ts",
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
kind: "copyFile",
|
|
146
|
-
from: "src/server.ts",
|
|
147
|
-
to: "src/server.ts",
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
kind: "copyFile",
|
|
151
|
-
from: "test/app.test.ts",
|
|
152
|
-
to: "test/app.test.ts",
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
kind: "copyFile",
|
|
156
|
-
from: "vitest.config.ts",
|
|
157
|
-
to: "vitest.config.ts",
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
kind: "writeJson",
|
|
161
|
-
to: ".project-kit/blueprint.json",
|
|
162
|
-
value: {
|
|
163
|
-
schemaVersion: 1,
|
|
164
|
-
preset: "hono-api",
|
|
165
|
-
packageManager: "pnpm",
|
|
166
|
-
projectKind: "single-package",
|
|
167
|
-
features,
|
|
168
|
-
},
|
|
169
|
-
},
|
|
170
|
-
{
|
|
171
|
-
kind: "writeJson",
|
|
172
|
-
to: ".project-kit/generated-by.json",
|
|
173
|
-
value: generatedBy,
|
|
174
|
-
},
|
|
175
|
-
{
|
|
176
|
-
kind: "writeJson",
|
|
177
|
-
to: ".devcontainer/devcontainer.json",
|
|
178
|
-
value: nodePnpmDevcontainer({
|
|
179
|
-
name: `${projectName} API development`,
|
|
180
|
-
nodeVersion: "22",
|
|
181
|
-
packageManagerPin: "pnpm@10.0.0",
|
|
182
|
-
extensions: ["oxc.oxc-vscode"],
|
|
183
|
-
}),
|
|
184
|
-
},
|
|
185
|
-
{
|
|
186
|
-
kind: "writeText",
|
|
187
|
-
to: ".github/workflows/check.yml",
|
|
188
|
-
text: projectPresetGithubCheckWorkflow("hono-api"),
|
|
189
|
-
},
|
|
190
|
-
{
|
|
191
|
-
kind: "writeText",
|
|
192
|
-
to: ".github/dependabot.yml",
|
|
193
|
-
text: projectPresetDependabotConfig("hono-api"),
|
|
194
|
-
},
|
|
195
|
-
];
|
|
196
|
-
}
|
|
197
|
-
function templateSourceRoot() {
|
|
198
|
-
return path.join(path.dirname(fileURLToPath(import.meta.url)), "..", "templates", "hono-api");
|
|
199
|
-
}
|
|
200
|
-
function sharedOxcSourceRoot() {
|
|
201
|
-
return path.join(path.dirname(fileURLToPath(import.meta.url)), "..", "templates", "shared", "oxc");
|
|
202
|
-
}
|
|
203
|
-
export async function initHonoApiProject(targetDir) {
|
|
204
|
-
await renderNewProject({
|
|
205
|
-
sourceRoot: templateSourceRoot(),
|
|
206
|
-
sourceRoots: { sharedOxc: sharedOxcSourceRoot() },
|
|
207
|
-
targetRoot: targetDir,
|
|
208
|
-
operations: operationsForHonoApi(projectNameFromDir(targetDir)),
|
|
209
|
-
});
|
|
210
|
-
}
|
package/dist/module-graph.d.ts
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import type { PresetName } from "./declarations.js";
|
|
2
|
-
export type PackageBoundaryOwner = {
|
|
3
|
-
readonly kind: "package-boundary";
|
|
4
|
-
readonly path: "." | "apps/api" | "apps/web";
|
|
5
|
-
};
|
|
6
|
-
export type ComponentOwner = PackageBoundaryOwner;
|
|
7
|
-
export type CheckComponentKind = "typescript-typecheck" | "oxc-lint" | "oxc-format-check" | "build" | "unit-test" | "e2e-test" | "turbo-check" | "rustfmt-check" | "cargo-clippy" | "cargo-test";
|
|
8
|
-
export type FixComponentKind = "oxc-format-write" | "oxc-lint-fix" | "turbo-fix" | "rustfmt-write";
|
|
9
|
-
export type CheckEnvironmentNeed = {
|
|
10
|
-
readonly kind: "playwright-browser-assets";
|
|
11
|
-
readonly browser: "chromium";
|
|
12
|
-
readonly owner: ComponentOwner;
|
|
13
|
-
};
|
|
14
|
-
export type CheckComponent = {
|
|
15
|
-
readonly kind: CheckComponentKind;
|
|
16
|
-
readonly owner: ComponentOwner;
|
|
17
|
-
};
|
|
18
|
-
export type FixComponent = {
|
|
19
|
-
readonly kind: FixComponentKind;
|
|
20
|
-
readonly owner: ComponentOwner;
|
|
21
|
-
};
|
|
22
|
-
export type CheckPlan = {
|
|
23
|
-
readonly components: CheckComponent[];
|
|
24
|
-
readonly environmentNeeds: CheckEnvironmentNeed[];
|
|
25
|
-
};
|
|
26
|
-
export type FixPlan = {
|
|
27
|
-
readonly components: FixComponent[];
|
|
28
|
-
};
|
|
29
|
-
export type NodeCheckPlanTarget = "ts-lib" | "hono-api" | "vue-app" | "vue-hono-root" | "vue-hono-api" | "vue-hono-web";
|
|
30
|
-
export type NodeFixPlanTarget = "ts-lib" | "hono-api" | "vue-app" | "vue-hono-root" | "vue-hono-api" | "vue-hono-web";
|
|
31
|
-
export declare function selectNodeCheckComponents(target: NodeCheckPlanTarget): CheckComponent[];
|
|
32
|
-
export declare function selectNodeFixComponents(target: NodeFixPlanTarget): FixComponent[];
|
|
33
|
-
export declare function selectTsLibCheckComponents(): CheckComponent[];
|
|
34
|
-
export declare function selectTsLibFixComponents(): FixComponent[];
|
|
35
|
-
export declare function planNodeChecks(target: NodeCheckPlanTarget): CheckPlan;
|
|
36
|
-
export declare function planNodeFixes(target: NodeFixPlanTarget): FixPlan;
|
|
37
|
-
export declare function planRustBinChecks(): CheckPlan;
|
|
38
|
-
export declare function planRustBinFixes(): FixPlan;
|
|
39
|
-
export declare function planPresetChecks(preset: PresetName): CheckPlan | undefined;
|
|
40
|
-
export declare function planTsLibChecks(): CheckPlan;
|
|
41
|
-
export declare function planTsLibFixes(): FixPlan;
|
|
42
|
-
export declare function renderRootCheckCommand(plan: CheckPlan): string;
|
|
43
|
-
export declare function renderFixCommand(plan: FixPlan): string;
|
|
44
|
-
export declare function renderPlaywrightBrowserInstallCommand(need: CheckEnvironmentNeed): string;
|
|
45
|
-
//# sourceMappingURL=module-graph.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"module-graph.d.ts","sourceRoot":"","sources":["../src/module-graph.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC;IAClC,QAAQ,CAAC,IAAI,EAAE,GAAG,GAAG,UAAU,GAAG,UAAU,CAAC;CAC9C,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,oBAAoB,CAAC;AAElD,MAAM,MAAM,kBAAkB,GAC1B,sBAAsB,GACtB,UAAU,GACV,kBAAkB,GAClB,OAAO,GACP,WAAW,GACX,UAAU,GACV,aAAa,GACb,eAAe,GACf,cAAc,GACd,YAAY,CAAC;AAEjB,MAAM,MAAM,gBAAgB,GACxB,kBAAkB,GAClB,cAAc,GACd,WAAW,GACX,eAAe,CAAC;AAEpB,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,CAAC,IAAI,EAAE,2BAA2B,CAAC;IAC3C,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAC;IAC7B,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC;IAClC,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;IAChC,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,QAAQ,CAAC,UAAU,EAAE,cAAc,EAAE,CAAC;IACtC,QAAQ,CAAC,gBAAgB,EAAE,oBAAoB,EAAE,CAAC;CACnD,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG;IACpB,QAAQ,CAAC,UAAU,EAAE,YAAY,EAAE,CAAC;CACrC,CAAC;AAsBF,MAAM,MAAM,mBAAmB,GAC3B,QAAQ,GACR,UAAU,GACV,SAAS,GACT,eAAe,GACf,cAAc,GACd,cAAc,CAAC;AAEnB,MAAM,MAAM,iBAAiB,GACzB,QAAQ,GACR,UAAU,GACV,SAAS,GACT,eAAe,GACf,cAAc,GACd,cAAc,CAAC;AAsCnB,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,mBAAmB,GAAG,cAAc,EAAE,CAevF;AAED,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,iBAAiB,GAAG,YAAY,EAAE,CAajF;AAgBD,wBAAgB,0BAA0B,IAAI,cAAc,EAAE,CAE7D;AAED,wBAAgB,wBAAwB,IAAI,YAAY,EAAE,CAEzD;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,mBAAmB,GAAG,SAAS,CAKrE;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAEhE;AAED,wBAAgB,iBAAiB,IAAI,SAAS,CAS7C;AAED,wBAAgB,gBAAgB,IAAI,OAAO,CAI1C;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,UAAU,GAAG,SAAS,GAAG,SAAS,CAa1E;AAED,wBAAgB,eAAe,IAAI,SAAS,CAE3C;AAED,wBAAgB,cAAc,IAAI,OAAO,CAExC;AAwCD,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,CAE9D;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CAEtD;AAED,wBAAgB,qCAAqC,CAAC,IAAI,EAAE,oBAAoB,GAAG,MAAM,CAMxF"}
|
package/dist/module-graph.js
DELETED
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
const tsLibPackageBoundary = {
|
|
2
|
-
kind: "package-boundary",
|
|
3
|
-
path: ".",
|
|
4
|
-
};
|
|
5
|
-
const apiPackageBoundary = {
|
|
6
|
-
kind: "package-boundary",
|
|
7
|
-
path: "apps/api",
|
|
8
|
-
};
|
|
9
|
-
const webPackageBoundary = {
|
|
10
|
-
kind: "package-boundary",
|
|
11
|
-
path: "apps/web",
|
|
12
|
-
};
|
|
13
|
-
const rustPackageBoundary = {
|
|
14
|
-
kind: "package-boundary",
|
|
15
|
-
path: ".",
|
|
16
|
-
};
|
|
17
|
-
function nodeLibraryCheckComponents(owner) {
|
|
18
|
-
return [
|
|
19
|
-
{ kind: "typescript-typecheck", owner },
|
|
20
|
-
{ kind: "oxc-lint", owner },
|
|
21
|
-
{ kind: "oxc-format-check", owner },
|
|
22
|
-
];
|
|
23
|
-
}
|
|
24
|
-
function honoApiCheckComponents(owner) {
|
|
25
|
-
return [
|
|
26
|
-
{ kind: "oxc-format-check", owner },
|
|
27
|
-
{ kind: "oxc-lint", owner },
|
|
28
|
-
{ kind: "typescript-typecheck", owner },
|
|
29
|
-
{ kind: "build", owner },
|
|
30
|
-
{ kind: "unit-test", owner },
|
|
31
|
-
];
|
|
32
|
-
}
|
|
33
|
-
function vueAppCheckComponents(owner) {
|
|
34
|
-
return [
|
|
35
|
-
{ kind: "oxc-format-check", owner },
|
|
36
|
-
{ kind: "oxc-lint", owner },
|
|
37
|
-
{ kind: "typescript-typecheck", owner },
|
|
38
|
-
{ kind: "build", owner },
|
|
39
|
-
{ kind: "unit-test", owner },
|
|
40
|
-
{ kind: "e2e-test", owner },
|
|
41
|
-
];
|
|
42
|
-
}
|
|
43
|
-
function nodeFixComponents(owner) {
|
|
44
|
-
return [
|
|
45
|
-
{ kind: "oxc-format-write", owner },
|
|
46
|
-
{ kind: "oxc-lint-fix", owner },
|
|
47
|
-
];
|
|
48
|
-
}
|
|
49
|
-
export function selectNodeCheckComponents(target) {
|
|
50
|
-
switch (target) {
|
|
51
|
-
case "ts-lib":
|
|
52
|
-
return nodeLibraryCheckComponents(tsLibPackageBoundary);
|
|
53
|
-
case "hono-api":
|
|
54
|
-
return honoApiCheckComponents(tsLibPackageBoundary);
|
|
55
|
-
case "vue-app":
|
|
56
|
-
return vueAppCheckComponents(tsLibPackageBoundary);
|
|
57
|
-
case "vue-hono-root":
|
|
58
|
-
return [{ kind: "turbo-check", owner: tsLibPackageBoundary }];
|
|
59
|
-
case "vue-hono-api":
|
|
60
|
-
return honoApiCheckComponents(apiPackageBoundary);
|
|
61
|
-
case "vue-hono-web":
|
|
62
|
-
return vueAppCheckComponents(webPackageBoundary);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
export function selectNodeFixComponents(target) {
|
|
66
|
-
switch (target) {
|
|
67
|
-
case "ts-lib":
|
|
68
|
-
case "hono-api":
|
|
69
|
-
case "vue-app":
|
|
70
|
-
return nodeFixComponents(tsLibPackageBoundary);
|
|
71
|
-
case "vue-hono-root":
|
|
72
|
-
return [{ kind: "turbo-fix", owner: tsLibPackageBoundary }];
|
|
73
|
-
case "vue-hono-api":
|
|
74
|
-
return nodeFixComponents(apiPackageBoundary);
|
|
75
|
-
case "vue-hono-web":
|
|
76
|
-
return nodeFixComponents(webPackageBoundary);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
function checkEnvironmentNeeds(target) {
|
|
80
|
-
if (target === "vue-app") {
|
|
81
|
-
return [
|
|
82
|
-
{ kind: "playwright-browser-assets", browser: "chromium", owner: tsLibPackageBoundary },
|
|
83
|
-
];
|
|
84
|
-
}
|
|
85
|
-
if (target === "vue-hono-root" || target === "vue-hono-web") {
|
|
86
|
-
return [{ kind: "playwright-browser-assets", browser: "chromium", owner: webPackageBoundary }];
|
|
87
|
-
}
|
|
88
|
-
return [];
|
|
89
|
-
}
|
|
90
|
-
export function selectTsLibCheckComponents() {
|
|
91
|
-
return selectNodeCheckComponents("ts-lib");
|
|
92
|
-
}
|
|
93
|
-
export function selectTsLibFixComponents() {
|
|
94
|
-
return selectNodeFixComponents("ts-lib");
|
|
95
|
-
}
|
|
96
|
-
export function planNodeChecks(target) {
|
|
97
|
-
return {
|
|
98
|
-
components: selectNodeCheckComponents(target),
|
|
99
|
-
environmentNeeds: checkEnvironmentNeeds(target),
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
export function planNodeFixes(target) {
|
|
103
|
-
return { components: selectNodeFixComponents(target) };
|
|
104
|
-
}
|
|
105
|
-
export function planRustBinChecks() {
|
|
106
|
-
return {
|
|
107
|
-
components: [
|
|
108
|
-
{ kind: "rustfmt-check", owner: rustPackageBoundary },
|
|
109
|
-
{ kind: "cargo-clippy", owner: rustPackageBoundary },
|
|
110
|
-
{ kind: "cargo-test", owner: rustPackageBoundary },
|
|
111
|
-
],
|
|
112
|
-
environmentNeeds: [],
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
|
-
export function planRustBinFixes() {
|
|
116
|
-
return {
|
|
117
|
-
components: [{ kind: "rustfmt-write", owner: rustPackageBoundary }],
|
|
118
|
-
};
|
|
119
|
-
}
|
|
120
|
-
export function planPresetChecks(preset) {
|
|
121
|
-
switch (preset) {
|
|
122
|
-
case "ts-lib":
|
|
123
|
-
case "hono-api":
|
|
124
|
-
case "vue-app":
|
|
125
|
-
return planNodeChecks(preset);
|
|
126
|
-
case "vue-hono-app":
|
|
127
|
-
return planNodeChecks("vue-hono-root");
|
|
128
|
-
case "rust-bin":
|
|
129
|
-
return planRustBinChecks();
|
|
130
|
-
default:
|
|
131
|
-
return undefined;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
export function planTsLibChecks() {
|
|
135
|
-
return planNodeChecks("ts-lib");
|
|
136
|
-
}
|
|
137
|
-
export function planTsLibFixes() {
|
|
138
|
-
return planNodeFixes("ts-lib");
|
|
139
|
-
}
|
|
140
|
-
function renderCheckComponentCommand(component) {
|
|
141
|
-
switch (component.kind) {
|
|
142
|
-
case "typescript-typecheck":
|
|
143
|
-
return "pnpm run typecheck";
|
|
144
|
-
case "oxc-lint":
|
|
145
|
-
return "pnpm run lint";
|
|
146
|
-
case "oxc-format-check":
|
|
147
|
-
return "pnpm run format:check";
|
|
148
|
-
case "build":
|
|
149
|
-
return "pnpm run build";
|
|
150
|
-
case "unit-test":
|
|
151
|
-
return "pnpm run test";
|
|
152
|
-
case "e2e-test":
|
|
153
|
-
return "pnpm run test:e2e";
|
|
154
|
-
case "turbo-check":
|
|
155
|
-
return "turbo run check";
|
|
156
|
-
case "rustfmt-check":
|
|
157
|
-
return "cargo fmt --all -- --check";
|
|
158
|
-
case "cargo-clippy":
|
|
159
|
-
return "cargo clippy --workspace --all-targets -- -D warnings";
|
|
160
|
-
case "cargo-test":
|
|
161
|
-
return "cargo test --workspace";
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
function renderFixComponentCommand(component) {
|
|
165
|
-
switch (component.kind) {
|
|
166
|
-
case "oxc-format-write":
|
|
167
|
-
return "pnpm run format:write";
|
|
168
|
-
case "oxc-lint-fix":
|
|
169
|
-
return "pnpm run lint:fix";
|
|
170
|
-
case "turbo-fix":
|
|
171
|
-
return "turbo run fix";
|
|
172
|
-
case "rustfmt-write":
|
|
173
|
-
return "cargo fmt --all";
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
export function renderRootCheckCommand(plan) {
|
|
177
|
-
return plan.components.map(renderCheckComponentCommand).join(" && ");
|
|
178
|
-
}
|
|
179
|
-
export function renderFixCommand(plan) {
|
|
180
|
-
return plan.components.map(renderFixComponentCommand).join(" && ");
|
|
181
|
-
}
|
|
182
|
-
export function renderPlaywrightBrowserInstallCommand(need) {
|
|
183
|
-
if (need.owner.path === "apps/web") {
|
|
184
|
-
return `pnpm --filter ./apps/web exec playwright install ${need.browser}`;
|
|
185
|
-
}
|
|
186
|
-
return `pnpm exec playwright install ${need.browser}`;
|
|
187
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"next-step-instructions.d.ts","sourceRoot":"","sources":["../src/next-step-instructions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGpD,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,YAAY,GAAG,SAAS,CAAC;IACxC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,iBAAiB,EAAE,OAAO,CAAC;CACrC,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACpC,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,SAAS,mBAAmB,EAAE,CAAC;CAChD,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG;IAC5C,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B,CAAC;AA0FF,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,+BAA+B,GACvC,uBAAuB,CAsBzB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"package-addition.d.ts","sourceRoot":"","sources":["../src/package-addition.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,iBAAiB,GAAG;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAqnBF,wBAAsB,UAAU,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CA2C1E"}
|