@ykdz/template 0.0.12 → 0.0.14
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/node_modules/@ykdz/template-builtin-source/dist/templates/hono-api/projection.js +7 -34
- package/node_modules/@ykdz/template-builtin-source/dist/templates/registry.js +2 -0
- package/node_modules/@ykdz/template-builtin-source/dist/templates/rust-bin/projection.js +5 -3
- package/node_modules/@ykdz/template-builtin-source/dist/templates/ts-lib/projection.js +5 -32
- package/node_modules/@ykdz/template-builtin-source/dist/templates/vike-app/projection.d.ts +5 -0
- package/node_modules/@ykdz/template-builtin-source/dist/templates/vike-app/projection.js +57 -0
- package/node_modules/@ykdz/template-builtin-source/dist/templates/vue-app/projection.js +8 -36
- package/node_modules/@ykdz/template-builtin-source/dist/templates/vue-hono-app/projection.js +27 -74
- package/node_modules/@ykdz/template-builtin-source/templates/hono-api/turbo.json +8 -0
- package/node_modules/@ykdz/template-builtin-source/templates/preset-source.json +192 -4
- package/node_modules/@ykdz/template-builtin-source/templates/rust-bin/turbo.json +3 -0
- package/node_modules/@ykdz/template-builtin-source/templates/ts-lib/turbo.json +3 -0
- package/node_modules/@ykdz/template-builtin-source/templates/vike-app/+server.ts +12 -0
- package/node_modules/@ykdz/template-builtin-source/templates/vike-app/.env.example +1 -0
- package/node_modules/@ykdz/template-builtin-source/templates/vike-app/.github/dependabot.yml +23 -0
- package/node_modules/@ykdz/template-builtin-source/templates/vike-app/.github/workflows/check.yml +20 -0
- package/node_modules/@ykdz/template-builtin-source/templates/vike-app/assets/logo.svg +1 -0
- package/node_modules/@ykdz/template-builtin-source/templates/vike-app/components/CounterButton.vue +21 -0
- package/node_modules/@ykdz/template-builtin-source/templates/vike-app/components/PageShell.vue +17 -0
- package/node_modules/@ykdz/template-builtin-source/templates/vike-app/database/db.ts +14 -0
- package/node_modules/@ykdz/template-builtin-source/templates/vike-app/database/queries/todos.ts +32 -0
- package/node_modules/@ykdz/template-builtin-source/templates/vike-app/database/schema.ts +14 -0
- package/node_modules/@ykdz/template-builtin-source/templates/vike-app/drizzle.config.ts +10 -0
- package/node_modules/@ykdz/template-builtin-source/templates/vike-app/env.d.ts +6 -0
- package/node_modules/@ykdz/template-builtin-source/templates/vike-app/global.d.ts +9 -0
- package/node_modules/@ykdz/template-builtin-source/templates/vike-app/pages/+Head.vue +8 -0
- package/node_modules/@ykdz/template-builtin-source/templates/vike-app/pages/+Layout.vue +9 -0
- package/node_modules/@ykdz/template-builtin-source/templates/vike-app/pages/+config.ts +10 -0
- package/node_modules/@ykdz/template-builtin-source/templates/vike-app/pages/index/+Page.telefunc.ts +13 -0
- package/node_modules/@ykdz/template-builtin-source/templates/vike-app/pages/index/+Page.vue +89 -0
- package/node_modules/@ykdz/template-builtin-source/templates/vike-app/pages/tailwind.css +7 -0
- package/node_modules/@ykdz/template-builtin-source/templates/vike-app/playwright.config.ts +22 -0
- package/node_modules/@ykdz/template-builtin-source/templates/vike-app/server/api.ts +5 -0
- package/node_modules/@ykdz/template-builtin-source/templates/vike-app/server/app.ts +25 -0
- package/node_modules/@ykdz/template-builtin-source/templates/vike-app/test/e2e/app.spec.ts +10 -0
- package/node_modules/@ykdz/template-builtin-source/templates/vike-app/test/todos.test.ts +20 -0
- package/node_modules/@ykdz/template-builtin-source/templates/vike-app/vite.config.ts +12 -0
- package/node_modules/@ykdz/template-builtin-source/templates/vike-app/vitest.config.ts +8 -0
- package/node_modules/@ykdz/template-builtin-source/templates/vue-app/turbo.json +11 -0
- package/node_modules/@ykdz/template-builtin-source/templates/vue-hono-app/api/turbo.json +8 -0
- package/node_modules/@ykdz/template-builtin-source/templates/vue-hono-app/web/playwright.config.ts +1 -1
- package/node_modules/@ykdz/template-builtin-source/templates/vue-hono-app/web/src/api.ts +1 -4
- package/node_modules/@ykdz/template-builtin-source/templates/vue-hono-app/web/turbo.json +11 -0
- package/node_modules/@ykdz/template-core/dist/module-graph.d.ts +4 -0
- package/node_modules/@ykdz/template-core/dist/module-graph.js +64 -4
- package/node_modules/@ykdz/template-core/dist/package-addition.js +23 -34
- package/node_modules/@ykdz/template-core/dist/package-linking.js +14 -8
- package/node_modules/@ykdz/template-core/dist/pnpm-workspace.yaml +6 -0
- package/node_modules/@ykdz/template-core/dist/projection-capabilities.d.ts +1 -1
- package/node_modules/@ykdz/template-core/dist/projection-capabilities.js +355 -104
- package/node_modules/@ykdz/template-shared/dist/index.d.ts +9 -9
- package/node_modules/@ykdz/template-shared/dist/index.js +29 -11
- package/package.json +3 -3
|
@@ -2,7 +2,6 @@ import { existsSync } from "node:fs";
|
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
4
|
import { builtInPresetProjectionSourceRoots, loadBuiltInPresetProjectionDeclaration, } from "@ykdz/template-builtin-source";
|
|
5
|
-
import { renderFixCommand, renderRootCheckCommand, } from "@ykdz/template-core/module-graph";
|
|
6
5
|
import { packageManifestExposureFields, planPackageLinks, } from "@ykdz/template-core/package-linking";
|
|
7
6
|
import { interpretPresetProjectionDeclaration } from "@ykdz/template-core/projection-capabilities";
|
|
8
7
|
import { renderNewProject, } from "@ykdz/template-core/renderer";
|
|
@@ -26,30 +25,6 @@ export const honoApiPresetMetadata = {
|
|
|
26
25
|
"dependabot",
|
|
27
26
|
],
|
|
28
27
|
};
|
|
29
|
-
const apiPackageBoundary = {
|
|
30
|
-
kind: "package-boundary",
|
|
31
|
-
path: ".",
|
|
32
|
-
};
|
|
33
|
-
function planHonoApiPackageChecks() {
|
|
34
|
-
return {
|
|
35
|
-
components: [
|
|
36
|
-
{ kind: "oxc-format-check", owner: apiPackageBoundary },
|
|
37
|
-
{ kind: "oxc-lint", owner: apiPackageBoundary },
|
|
38
|
-
{ kind: "typescript-typecheck", owner: apiPackageBoundary },
|
|
39
|
-
{ kind: "build", owner: apiPackageBoundary },
|
|
40
|
-
{ kind: "unit-test", owner: apiPackageBoundary },
|
|
41
|
-
],
|
|
42
|
-
environmentNeeds: [],
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
function planHonoApiPackageFixes() {
|
|
46
|
-
return {
|
|
47
|
-
components: [
|
|
48
|
-
{ kind: "oxc-format-write", owner: apiPackageBoundary },
|
|
49
|
-
{ kind: "oxc-lint-fix", owner: apiPackageBoundary },
|
|
50
|
-
],
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
28
|
function projectNameFromDir(targetDir) {
|
|
54
29
|
return path.basename(path.resolve(targetDir));
|
|
55
30
|
}
|
|
@@ -72,16 +47,14 @@ export function honoApiBlueprint(options = { targetDir: process.cwd() }) {
|
|
|
72
47
|
}
|
|
73
48
|
export function projectHonoApiPackageScripts() {
|
|
74
49
|
return {
|
|
75
|
-
build: "tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json",
|
|
76
|
-
check:
|
|
77
|
-
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
lint: "oxlint --config ../../oxlint.config.ts .",
|
|
81
|
-
"lint:fix": "oxlint --config ../../oxlint.config.ts . --fix",
|
|
50
|
+
"build:run": "tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json",
|
|
51
|
+
"format:check:run": "oxfmt --check --config ../../oxfmt.config.ts .",
|
|
52
|
+
"format:write:run": "oxfmt --write --config ../../oxfmt.config.ts .",
|
|
53
|
+
"lint:run": "oxlint --config ../../oxlint.config.ts .",
|
|
54
|
+
"lint:fix:run": "oxlint --config ../../oxlint.config.ts . --fix",
|
|
82
55
|
start: "node dist/server.js",
|
|
83
|
-
test: "vitest run",
|
|
84
|
-
typecheck: "tsc -p tsconfig.json --noEmit",
|
|
56
|
+
"test:run": "vitest run",
|
|
57
|
+
"typecheck:run": "tsc -p tsconfig.json --noEmit",
|
|
85
58
|
};
|
|
86
59
|
}
|
|
87
60
|
function packageAdditionOperations(packagePath, packageNameValue, nodeVersion) {
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { honoApiPresetProjection } from "./hono-api/projection.js";
|
|
2
2
|
import { rustBinPresetProjection } from "./rust-bin/projection.js";
|
|
3
3
|
import { tsLibPresetProjection } from "./ts-lib/projection.js";
|
|
4
|
+
import { vikeAppPresetProjection } from "./vike-app/projection.js";
|
|
4
5
|
import { vueAppPresetProjection } from "./vue-app/projection.js";
|
|
5
6
|
import { vueHonoAppPresetProjection } from "./vue-hono-app/projection.js";
|
|
6
7
|
const testOnlyPresetProjections = [
|
|
7
8
|
tsLibPresetProjection,
|
|
8
9
|
honoApiPresetProjection,
|
|
9
10
|
vueAppPresetProjection,
|
|
11
|
+
vikeAppPresetProjection,
|
|
10
12
|
vueHonoAppPresetProjection,
|
|
11
13
|
rustBinPresetProjection,
|
|
12
14
|
];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
import { builtInPresetProjectionSourceRoots, loadBuiltInPresetProjectionDeclaration, } from "@ykdz/template-builtin-source";
|
|
3
|
-
import {
|
|
3
|
+
import {} from "@ykdz/template-core/module-graph";
|
|
4
4
|
import { interpretPresetProjectionDeclaration } from "@ykdz/template-core/projection-capabilities";
|
|
5
5
|
import { renderNewProject } from "@ykdz/template-core/renderer";
|
|
6
6
|
import { PackageAdditionSupport, } from "@ykdz/template-shared";
|
|
@@ -77,8 +77,10 @@ export function rustBinBlueprint(options = { targetDir: process.cwd() }) {
|
|
|
77
77
|
}
|
|
78
78
|
export function projectRustBinPackageScripts() {
|
|
79
79
|
return {
|
|
80
|
-
check:
|
|
81
|
-
|
|
80
|
+
"format:check:run": "cargo fmt --all -- --check",
|
|
81
|
+
"format:write:run": "cargo fmt --all",
|
|
82
|
+
"lint:run": "cargo clippy --workspace --all-targets -- -D warnings",
|
|
83
|
+
"test:run": "cargo test --workspace",
|
|
82
84
|
};
|
|
83
85
|
}
|
|
84
86
|
export const rustBinPresetProjection = {
|
|
@@ -2,7 +2,6 @@ import { existsSync } from "node:fs";
|
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
4
|
import { builtInPresetProjectionSourceRoots, loadBuiltInPresetProjectionDeclaration, } from "@ykdz/template-builtin-source";
|
|
5
|
-
import { renderFixCommand, renderRootCheckCommand, } from "@ykdz/template-core/module-graph";
|
|
6
5
|
import { packageManifestExposureFields, planPackageLinks, } from "@ykdz/template-core/package-linking";
|
|
7
6
|
import { interpretPresetProjectionDeclaration } from "@ykdz/template-core/projection-capabilities";
|
|
8
7
|
import { renderNewProject, } from "@ykdz/template-core/renderer";
|
|
@@ -26,28 +25,6 @@ export const tsLibPresetMetadata = {
|
|
|
26
25
|
"dependabot",
|
|
27
26
|
],
|
|
28
27
|
};
|
|
29
|
-
const tsLibPackageBoundary = {
|
|
30
|
-
kind: "package-boundary",
|
|
31
|
-
path: ".",
|
|
32
|
-
};
|
|
33
|
-
function planTsLibPackageChecks() {
|
|
34
|
-
return {
|
|
35
|
-
components: [
|
|
36
|
-
{ kind: "typescript-typecheck", owner: tsLibPackageBoundary },
|
|
37
|
-
{ kind: "oxc-lint", owner: tsLibPackageBoundary },
|
|
38
|
-
{ kind: "oxc-format-check", owner: tsLibPackageBoundary },
|
|
39
|
-
],
|
|
40
|
-
environmentNeeds: [],
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
function planTsLibPackageFixes() {
|
|
44
|
-
return {
|
|
45
|
-
components: [
|
|
46
|
-
{ kind: "oxc-format-write", owner: tsLibPackageBoundary },
|
|
47
|
-
{ kind: "oxc-lint-fix", owner: tsLibPackageBoundary },
|
|
48
|
-
],
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
28
|
function projectNameFromDir(targetDir) {
|
|
52
29
|
return path.basename(path.resolve(targetDir));
|
|
53
30
|
}
|
|
@@ -75,16 +52,12 @@ export function tsLibBlueprint(options = { targetDir: process.cwd() }) {
|
|
|
75
52
|
};
|
|
76
53
|
}
|
|
77
54
|
export function projectTsLibPackageScripts() {
|
|
78
|
-
const checkPlan = planTsLibPackageChecks();
|
|
79
|
-
const fixPlan = planTsLibPackageFixes();
|
|
80
55
|
return {
|
|
81
|
-
check:
|
|
82
|
-
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
|
|
86
|
-
"lint:fix": "oxlint --config ../../oxlint.config.ts . --fix",
|
|
87
|
-
typecheck: "tsc -p tsconfig.json --noEmit",
|
|
56
|
+
"format:check:run": "oxfmt --check --config ../../oxfmt.config.ts .",
|
|
57
|
+
"format:write:run": "oxfmt --write --config ../../oxfmt.config.ts .",
|
|
58
|
+
"lint:run": "oxlint --config ../../oxlint.config.ts .",
|
|
59
|
+
"lint:fix:run": "oxlint --config ../../oxlint.config.ts . --fix",
|
|
60
|
+
"typecheck:run": "tsc -p tsconfig.json --noEmit",
|
|
88
61
|
};
|
|
89
62
|
}
|
|
90
63
|
function packageAdditionOperations(packagePath, packageNameValue, nodeVersion) {
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { PresetBlueprintOptions, PresetProjection } from "@ykdz/template-core/preset-projection";
|
|
2
|
+
import { type BuiltInPreset, type ProjectBlueprint } from "@ykdz/template-shared";
|
|
3
|
+
export declare const vikeAppPresetMetadata: BuiltInPreset;
|
|
4
|
+
export declare function vikeAppBlueprint(options?: PresetBlueprintOptions): ProjectBlueprint;
|
|
5
|
+
export declare const vikeAppPresetProjection: PresetProjection;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { builtInPresetProjectionSourceRoots, loadBuiltInPresetProjectionDeclaration, } from "@ykdz/template-builtin-source";
|
|
2
|
+
import { interpretPresetProjectionDeclaration } from "@ykdz/template-core/projection-capabilities";
|
|
3
|
+
import { renderNewProject } from "@ykdz/template-core/renderer";
|
|
4
|
+
import { PackageAdditionSupport, } from "@ykdz/template-shared";
|
|
5
|
+
export const vikeAppPresetMetadata = {
|
|
6
|
+
name: "vike-app",
|
|
7
|
+
title: "Vike app",
|
|
8
|
+
description: "Single-package Vike, Hono, Telefunc, Drizzle, and Vue application.",
|
|
9
|
+
generation: "supported",
|
|
10
|
+
supportedPackageManagers: ["pnpm"],
|
|
11
|
+
supportedProjectKinds: ["multi-package"],
|
|
12
|
+
packageAdditionSupport: PackageAdditionSupport.Unsupported,
|
|
13
|
+
features: [
|
|
14
|
+
"pnpm-catalog",
|
|
15
|
+
"oxc-format-lint",
|
|
16
|
+
"strict-typescript",
|
|
17
|
+
"root-check",
|
|
18
|
+
"fix-command",
|
|
19
|
+
"devcontainer",
|
|
20
|
+
"github-actions",
|
|
21
|
+
"dependabot",
|
|
22
|
+
],
|
|
23
|
+
};
|
|
24
|
+
function projectNameFromDir(targetDir) {
|
|
25
|
+
return targetDir.split(/[\\/]/).filter(Boolean).at(-1) ?? "vike-app";
|
|
26
|
+
}
|
|
27
|
+
export function vikeAppBlueprint(options = { targetDir: process.cwd() }) {
|
|
28
|
+
const projectName = projectNameFromDir(options.targetDir);
|
|
29
|
+
return {
|
|
30
|
+
schemaVersion: 1,
|
|
31
|
+
preset: "vike-app",
|
|
32
|
+
packageManager: "pnpm",
|
|
33
|
+
projectKind: "multi-package",
|
|
34
|
+
features: [...vikeAppPresetMetadata.features],
|
|
35
|
+
packages: [{ name: projectName, path: "." }],
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
export const vikeAppPresetProjection = {
|
|
39
|
+
metadata: vikeAppPresetMetadata,
|
|
40
|
+
blueprint: vikeAppBlueprint,
|
|
41
|
+
project(context) {
|
|
42
|
+
return interpretPresetProjectionDeclaration({
|
|
43
|
+
preset: vikeAppPresetMetadata,
|
|
44
|
+
declaration: loadBuiltInPresetProjectionDeclaration("vike-app"),
|
|
45
|
+
context,
|
|
46
|
+
sourceRoots: builtInPresetProjectionSourceRoots(),
|
|
47
|
+
});
|
|
48
|
+
},
|
|
49
|
+
async render({ targetDir, plan }) {
|
|
50
|
+
await renderNewProject({
|
|
51
|
+
sourceRoot: plan.sourceRoot,
|
|
52
|
+
sourceRoots: plan.sourceRoots,
|
|
53
|
+
targetRoot: targetDir,
|
|
54
|
+
operations: [...plan.operations],
|
|
55
|
+
});
|
|
56
|
+
},
|
|
57
|
+
};
|
|
@@ -3,7 +3,6 @@ import { readFile } from "node:fs/promises";
|
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
5
|
import { builtInPresetProjectionSourceRoots, loadBuiltInPresetProjectionDeclaration, } from "@ykdz/template-builtin-source";
|
|
6
|
-
import { renderFixCommand, renderRootCheckCommand, } from "@ykdz/template-core/module-graph";
|
|
7
6
|
import { interpretPresetProjectionDeclaration } from "@ykdz/template-core/projection-capabilities";
|
|
8
7
|
import { renderNewProject, } from "@ykdz/template-core/renderer";
|
|
9
8
|
import { PackageAdditionSupport, } from "@ykdz/template-shared";
|
|
@@ -26,31 +25,6 @@ export const vueAppPresetMetadata = {
|
|
|
26
25
|
"dependabot",
|
|
27
26
|
],
|
|
28
27
|
};
|
|
29
|
-
const webPackageBoundary = {
|
|
30
|
-
kind: "package-boundary",
|
|
31
|
-
path: ".",
|
|
32
|
-
};
|
|
33
|
-
function planVueAppPackageChecks() {
|
|
34
|
-
return {
|
|
35
|
-
components: [
|
|
36
|
-
{ kind: "oxc-format-check", owner: webPackageBoundary },
|
|
37
|
-
{ kind: "oxc-lint", owner: webPackageBoundary },
|
|
38
|
-
{ kind: "typescript-typecheck", owner: webPackageBoundary },
|
|
39
|
-
{ kind: "build", owner: webPackageBoundary },
|
|
40
|
-
{ kind: "unit-test", owner: webPackageBoundary },
|
|
41
|
-
{ kind: "e2e-test", owner: webPackageBoundary },
|
|
42
|
-
],
|
|
43
|
-
environmentNeeds: [],
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
function planVueAppPackageFixes() {
|
|
47
|
-
return {
|
|
48
|
-
components: [
|
|
49
|
-
{ kind: "oxc-format-write", owner: webPackageBoundary },
|
|
50
|
-
{ kind: "oxc-lint-fix", owner: webPackageBoundary },
|
|
51
|
-
],
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
28
|
function projectNameFromDir(targetDir) {
|
|
55
29
|
return path.basename(path.resolve(targetDir));
|
|
56
30
|
}
|
|
@@ -73,18 +47,16 @@ export function vueAppBlueprint(options = { targetDir: process.cwd() }) {
|
|
|
73
47
|
}
|
|
74
48
|
export function projectVueAppPackageScripts() {
|
|
75
49
|
return {
|
|
76
|
-
build: "vite build",
|
|
77
|
-
check: renderRootCheckCommand(planVueAppPackageChecks()),
|
|
50
|
+
"build:run": "vite build",
|
|
78
51
|
dev: "vite",
|
|
79
|
-
|
|
80
|
-
"format:
|
|
81
|
-
"
|
|
82
|
-
lint: "oxlint --config ../../oxlint.config.ts .",
|
|
83
|
-
"lint:fix": "oxlint --config ../../oxlint.config.ts . --fix",
|
|
52
|
+
"format:check:run": "oxfmt --check --config ../../oxfmt.config.ts .",
|
|
53
|
+
"format:write:run": "oxfmt --write --config ../../oxfmt.config.ts .",
|
|
54
|
+
"lint:run": "oxlint --config ../../oxlint.config.ts .",
|
|
55
|
+
"lint:fix:run": "oxlint --config ../../oxlint.config.ts . --fix",
|
|
84
56
|
preview: "vite preview",
|
|
85
|
-
test: "vitest run",
|
|
86
|
-
"test:e2e": "
|
|
87
|
-
typecheck: "vue-tsc --build --noEmit",
|
|
57
|
+
"test:run": "vitest run",
|
|
58
|
+
"test:e2e:run": "node --experimental-strip-types scripts/run-playwright.ts",
|
|
59
|
+
"typecheck:run": "vue-tsc --build --noEmit",
|
|
88
60
|
};
|
|
89
61
|
}
|
|
90
62
|
function isNodeError(error) {
|
package/node_modules/@ykdz/template-builtin-source/dist/templates/vue-hono-app/projection.js
CHANGED
|
@@ -27,14 +27,6 @@ const rootBoundary = {
|
|
|
27
27
|
kind: "workspace-orchestration",
|
|
28
28
|
path: ".",
|
|
29
29
|
};
|
|
30
|
-
const apiPackageBoundary = {
|
|
31
|
-
kind: "package-boundary",
|
|
32
|
-
path: ".",
|
|
33
|
-
};
|
|
34
|
-
const webPackageBoundary = {
|
|
35
|
-
kind: "package-boundary",
|
|
36
|
-
path: ".",
|
|
37
|
-
};
|
|
38
30
|
const workspacePackageBoundary = {
|
|
39
31
|
kind: "package-boundary",
|
|
40
32
|
path: "apps/*",
|
|
@@ -43,31 +35,6 @@ const webWorkspaceBoundary = {
|
|
|
43
35
|
kind: "package-boundary",
|
|
44
36
|
path: "apps/web",
|
|
45
37
|
};
|
|
46
|
-
function honoApiCheckComponents(owner) {
|
|
47
|
-
return [
|
|
48
|
-
{ kind: "oxc-format-check", owner },
|
|
49
|
-
{ kind: "oxc-lint", owner },
|
|
50
|
-
{ kind: "typescript-typecheck", owner },
|
|
51
|
-
{ kind: "build", owner },
|
|
52
|
-
{ kind: "unit-test", owner },
|
|
53
|
-
];
|
|
54
|
-
}
|
|
55
|
-
function vueWebCheckComponents(owner) {
|
|
56
|
-
return [
|
|
57
|
-
{ kind: "oxc-format-check", owner },
|
|
58
|
-
{ kind: "oxc-lint", owner },
|
|
59
|
-
{ kind: "typescript-typecheck", owner },
|
|
60
|
-
{ kind: "build", owner },
|
|
61
|
-
{ kind: "unit-test", owner },
|
|
62
|
-
{ kind: "e2e-test", owner },
|
|
63
|
-
];
|
|
64
|
-
}
|
|
65
|
-
function nodeFixComponents(owner) {
|
|
66
|
-
return [
|
|
67
|
-
{ kind: "oxc-format-write", owner },
|
|
68
|
-
{ kind: "oxc-lint-fix", owner },
|
|
69
|
-
];
|
|
70
|
-
}
|
|
71
38
|
function planVueHonoRootChecks() {
|
|
72
39
|
return {
|
|
73
40
|
components: [
|
|
@@ -95,23 +62,6 @@ function planVueHonoRootFixes() {
|
|
|
95
62
|
],
|
|
96
63
|
};
|
|
97
64
|
}
|
|
98
|
-
function planVueHonoApiChecks() {
|
|
99
|
-
return {
|
|
100
|
-
components: [...honoApiCheckComponents(apiPackageBoundary)],
|
|
101
|
-
environmentNeeds: [],
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
function planVueHonoWebChecks() {
|
|
105
|
-
return {
|
|
106
|
-
components: [...vueWebCheckComponents(webPackageBoundary)],
|
|
107
|
-
environmentNeeds: [],
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
function planVueHonoPackageFixes(owner) {
|
|
111
|
-
return {
|
|
112
|
-
components: [...nodeFixComponents(owner)],
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
65
|
function projectNameFromDir(targetDir) {
|
|
116
66
|
return path.basename(path.resolve(targetDir));
|
|
117
67
|
}
|
|
@@ -138,44 +88,47 @@ export function vueHonoAppBlueprint(options) {
|
|
|
138
88
|
export function projectVueHonoRootPackageScripts() {
|
|
139
89
|
return {
|
|
140
90
|
check: renderRootCheckCommand(planVueHonoRootChecks()),
|
|
91
|
+
"check:run": 'node -e ""',
|
|
141
92
|
dev: "turbo run dev --parallel",
|
|
142
93
|
fix: renderFixCommand(planVueHonoRootFixes()),
|
|
143
|
-
"
|
|
144
|
-
"format:
|
|
145
|
-
|
|
146
|
-
"
|
|
147
|
-
|
|
94
|
+
"fix:run": 'node -e ""',
|
|
95
|
+
"format:check": "turbo run format:check:run",
|
|
96
|
+
"format:check:run": "oxfmt --check oxlint.config.ts oxfmt.config.ts",
|
|
97
|
+
"format:write": "turbo run format:write:run",
|
|
98
|
+
"format:write:run": "oxfmt --write oxlint.config.ts oxfmt.config.ts",
|
|
99
|
+
lint: "turbo run lint:run",
|
|
100
|
+
"lint:fix": "turbo run lint:fix:run",
|
|
101
|
+
"lint:fix:run": "oxlint oxlint.config.ts oxfmt.config.ts --fix",
|
|
102
|
+
"lint:run": "oxlint oxlint.config.ts oxfmt.config.ts",
|
|
103
|
+
typecheck: "turbo run typecheck:run",
|
|
104
|
+
"typecheck:run": "tsc -p tsconfig.config.json --noEmit",
|
|
148
105
|
};
|
|
149
106
|
}
|
|
150
107
|
export function projectVueHonoApiPackageScripts() {
|
|
151
108
|
return {
|
|
152
|
-
build: "tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json",
|
|
153
|
-
check: renderRootCheckCommand(planVueHonoApiChecks()),
|
|
109
|
+
"build:run": "tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json",
|
|
154
110
|
dev: "tsx watch src/server.ts",
|
|
155
|
-
|
|
156
|
-
"format:
|
|
157
|
-
"
|
|
158
|
-
lint: "oxlint --config ../../oxlint.config.ts .",
|
|
159
|
-
"lint:fix": "oxlint --config ../../oxlint.config.ts . --fix",
|
|
111
|
+
"format:check:run": "oxfmt --check --config ../../oxfmt.config.ts .",
|
|
112
|
+
"format:write:run": "oxfmt --write --config ../../oxfmt.config.ts .",
|
|
113
|
+
"lint:run": "oxlint --config ../../oxlint.config.ts .",
|
|
114
|
+
"lint:fix:run": "oxlint --config ../../oxlint.config.ts . --fix",
|
|
160
115
|
start: "node dist/server.js",
|
|
161
|
-
test: "vitest run",
|
|
162
|
-
typecheck: "tsc -p tsconfig.json --noEmit",
|
|
116
|
+
"test:run": "vitest run",
|
|
117
|
+
"typecheck:run": "tsc -p tsconfig.json --noEmit",
|
|
163
118
|
};
|
|
164
119
|
}
|
|
165
120
|
export function projectVueHonoWebPackageScripts() {
|
|
166
121
|
return {
|
|
167
|
-
build: "vite build",
|
|
168
|
-
check: renderRootCheckCommand(planVueHonoWebChecks()),
|
|
122
|
+
"build:run": "vite build",
|
|
169
123
|
dev: "vite",
|
|
170
|
-
|
|
171
|
-
"format:
|
|
172
|
-
"
|
|
173
|
-
lint: "oxlint --config ../../oxlint.config.ts .",
|
|
174
|
-
"lint:fix": "oxlint --config ../../oxlint.config.ts . --fix",
|
|
124
|
+
"format:check:run": "oxfmt --check --config ../../oxfmt.config.ts .",
|
|
125
|
+
"format:write:run": "oxfmt --write --config ../../oxfmt.config.ts .",
|
|
126
|
+
"lint:run": "oxlint --config ../../oxlint.config.ts .",
|
|
127
|
+
"lint:fix:run": "oxlint --config ../../oxlint.config.ts . --fix",
|
|
175
128
|
preview: "vite preview",
|
|
176
|
-
test: "vitest run",
|
|
177
|
-
"test:e2e": "
|
|
178
|
-
typecheck: "vue-tsc --build",
|
|
129
|
+
"test:run": "vitest run",
|
|
130
|
+
"test:e2e:run": "node --experimental-strip-types scripts/run-playwright.ts",
|
|
131
|
+
"typecheck:run": "vue-tsc --build",
|
|
179
132
|
};
|
|
180
133
|
}
|
|
181
134
|
export const vueHonoAppPresetProjection = {
|