@ykdz/template 0.0.24 → 0.0.25
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-presets/dist/src/foundation.d.ts +3 -5
- package/node_modules/@ykdz/template-builtin-presets/dist/src/foundation.js +172 -165
- package/node_modules/@ykdz/template-builtin-presets/dist/src/rust-bin/definition.js +4 -24
- package/node_modules/@ykdz/template-builtin-presets/dist/src/shared/vue.d.ts +0 -3
- package/node_modules/@ykdz/template-builtin-presets/dist/src/shared/vue.js +8 -26
- package/node_modules/@ykdz/template-builtin-presets/dist/src/ts-lib/definition.js +5 -29
- package/node_modules/@ykdz/template-builtin-presets/dist/src/vike-app/definition.js +24 -50
- package/node_modules/@ykdz/template-builtin-presets/dist/src/vue-app/definition.js +2 -4
- package/node_modules/@ykdz/template-builtin-presets/dist/src/vue-hono-app/definition.js +9 -26
- package/node_modules/@ykdz/template-builtin-presets/package.json +2 -1
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/pnpm-workspace.dynamic.txt +1 -5
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/pnpm-workspace.yaml +1 -2
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/scripts/check-boundaries.ts +12 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/scripts/run-root-owned-task.ts +69 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/tsconfig.json +6 -1
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/turbo.json +15 -8
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/db/turbo.json +1 -1
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/db-migrations/turbo.json +2 -2
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/Dockerfile +3 -4
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/scripts/check-standalone-deployment.ts +1 -1
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/turbo.json +3 -3
- package/node_modules/@ykdz/template-builtin-presets/templates/vue-app/turbo.json +3 -3
- package/node_modules/@ykdz/template-builtin-presets/templates/vue-hono-app/api/turbo.json +1 -1
- package/node_modules/@ykdz/template-builtin-presets/templates/vue-hono-app/web/playwright.config.ts +1 -1
- package/node_modules/@ykdz/template-builtin-presets/templates/vue-hono-app/web/turbo.json +2 -2
- package/node_modules/@ykdz/template-core/dist/dependency-catalog.d.ts +0 -1
- package/node_modules/@ykdz/template-core/dist/dependency-catalog.js +2 -8
- package/node_modules/@ykdz/template-core/dist/module-graph.d.ts +39 -37
- package/node_modules/@ykdz/template-core/dist/module-graph.js +84 -142
- package/node_modules/@ykdz/template-core/dist/package-contribution.d.ts +3 -5
- package/node_modules/@ykdz/template-core/dist/package-contribution.js +7 -7
- package/node_modules/@ykdz/template-core/dist/pnpm-workspace.yaml +0 -2
- package/node_modules/@ykdz/template-core/dist/project-github.d.ts +11 -3
- package/node_modules/@ykdz/template-core/dist/project-github.js +30 -35
- package/node_modules/@ykdz/template-core/dist/project-linking-v2.d.ts +1 -1
- package/package.json +1 -1
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/.pnpmfile.cts +0 -14
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { fileURLToPath } from "node:url";
|
|
2
|
-
import { playwrightBrowserAssetsEnvironmentNeed, shellCheckEnvironmentNeed, } from "@ykdz/template-core/module-graph";
|
|
2
|
+
import { dockerEngineEnvironmentNeed, playwrightBrowserAssetsEnvironmentNeed, shellCheckEnvironmentNeed, } from "@ykdz/template-core/module-graph";
|
|
3
3
|
import { vueTypecheckRunnerSourceOperation } from "../shared/vue.js";
|
|
4
4
|
import { templateSources } from "../template-sources.js";
|
|
5
5
|
function definitions(context) {
|
|
@@ -34,57 +34,39 @@ function foundation() {
|
|
|
34
34
|
workspacePackageGlobs: ["apps/*", "packages/*"],
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
function checks(packagePath, options = {}) {
|
|
38
|
-
const owner = { kind: "package-boundary", path: packagePath };
|
|
39
|
-
return [
|
|
40
|
-
{ kind: "typescript-typecheck", owner },
|
|
41
|
-
{ kind: "oxc-lint", owner },
|
|
42
|
-
{ kind: "oxc-format-check", owner },
|
|
43
|
-
{ kind: "build", owner },
|
|
44
|
-
...((options.unit ?? true) ? [{ kind: "unit-test", owner }] : []),
|
|
45
|
-
...(options.browser ? [{ kind: "e2e-test", owner }] : []),
|
|
46
|
-
];
|
|
47
|
-
}
|
|
48
|
-
function fixes(packagePath) {
|
|
49
|
-
const owner = { kind: "package-boundary", path: packagePath };
|
|
50
|
-
return [
|
|
51
|
-
{ kind: "oxc-format-write", owner },
|
|
52
|
-
{ kind: "oxc-lint-fix", owner },
|
|
53
|
-
];
|
|
54
|
-
}
|
|
55
37
|
function webScripts() {
|
|
56
38
|
const prepareDatabase = "DATABASE_FILE=../../apps/web/data/app.sqlite pnpm --dir ../../packages/db-migrations run db:prepare:dev";
|
|
57
39
|
return {
|
|
58
|
-
|
|
59
|
-
|
|
40
|
+
build: "vike build",
|
|
41
|
+
deployment: "node scripts/check-standalone-deployment.ts",
|
|
60
42
|
dev: `${prepareDatabase} && vike dev`,
|
|
61
|
-
"format:check
|
|
62
|
-
"format:write
|
|
63
|
-
|
|
64
|
-
"lint:fix
|
|
43
|
+
"format:check": "oxfmt --list-different --config ../../oxfmt.config.ts .",
|
|
44
|
+
"format:write": "oxfmt --write --config ../../oxfmt.config.ts .",
|
|
45
|
+
lint: "shellcheck scripts/container-entrypoint.sh && oxlint --quiet --format=unix --type-aware --config ../../oxlint.config.ts .",
|
|
46
|
+
"lint:fix": "oxlint --type-aware --format=unix --config ../../oxlint.config.ts . --fix",
|
|
65
47
|
preview: `${prepareDatabase} && vike preview`,
|
|
66
48
|
start: "node ./dist/server/index.mjs",
|
|
67
|
-
|
|
68
|
-
"test:e2e
|
|
69
|
-
|
|
49
|
+
test: "vitest run --reporter=agent --silent=passed-only --passWithNoTests",
|
|
50
|
+
"test:e2e": "node scripts/run-playwright.ts",
|
|
51
|
+
typecheck: "node scripts/run-vue-tsc.ts --build --noEmit --pretty false",
|
|
70
52
|
};
|
|
71
53
|
}
|
|
72
54
|
function databaseScripts() {
|
|
73
55
|
return {
|
|
74
|
-
|
|
56
|
+
build: "tsc -p tsconfig.json --noEmit",
|
|
75
57
|
"db:seed:example": "node scripts/seed-example.ts",
|
|
76
|
-
"format:check
|
|
77
|
-
"format:write
|
|
78
|
-
|
|
79
|
-
"lint:fix
|
|
80
|
-
|
|
81
|
-
|
|
58
|
+
"format:check": "oxfmt --list-different --config ../../oxfmt.config.ts .",
|
|
59
|
+
"format:write": "oxfmt --write --config ../../oxfmt.config.ts .",
|
|
60
|
+
lint: "oxlint --quiet --format=unix --config ../../oxlint.config.ts .",
|
|
61
|
+
"lint:fix": "oxlint --format=unix --config ../../oxlint.config.ts . --fix",
|
|
62
|
+
test: 'DATABASE_FILE="$(pwd)/node_modules/.tmp/test.sqlite" pnpm --dir ../db-migrations run db:prepare:test && DATABASE_FILE="$(pwd)/node_modules/.tmp/test.sqlite" vitest run --reporter=agent --silent=passed-only; status=$?; rm -f ./node_modules/.tmp/test.sqlite; exit $status',
|
|
63
|
+
typecheck: "tsc -p tsconfig.json --noEmit --pretty false",
|
|
82
64
|
};
|
|
83
65
|
}
|
|
84
66
|
function migrationScripts(databasePackageName) {
|
|
85
67
|
const withDatabasePackage = (command) => `DATABASE_PACKAGE_NAME=${databasePackageName} ${command}`;
|
|
86
68
|
return {
|
|
87
|
-
|
|
69
|
+
build: "tsc -p tsconfig.json --noEmit",
|
|
88
70
|
"db:generate": withDatabasePackage("drizzle-kit generate"),
|
|
89
71
|
"db:migrate": withDatabasePackage("drizzle-kit migrate"),
|
|
90
72
|
"db:prepare:deploy": "pnpm run db:migrate",
|
|
@@ -92,11 +74,11 @@ function migrationScripts(databasePackageName) {
|
|
|
92
74
|
"db:prepare:test": `DATABASE_PACKAGE_NAME=${databasePackageName} node scripts/prepare-database.ts test`,
|
|
93
75
|
"db:push": withDatabasePackage("mkdir -p data node_modules/.tmp && drizzle-kit push"),
|
|
94
76
|
"db:studio": withDatabasePackage("drizzle-kit studio"),
|
|
95
|
-
"format:check
|
|
96
|
-
"format:write
|
|
97
|
-
|
|
98
|
-
"lint:fix
|
|
99
|
-
|
|
77
|
+
"format:check": "oxfmt --list-different --config ../../oxfmt.config.ts .",
|
|
78
|
+
"format:write": "oxfmt --write --config ../../oxfmt.config.ts .",
|
|
79
|
+
lint: "oxlint --quiet --format=unix --config ../../oxlint.config.ts .",
|
|
80
|
+
"lint:fix": "oxlint --format=unix --config ../../oxlint.config.ts . --fix",
|
|
81
|
+
typecheck: "tsc -p tsconfig.json --noEmit --pretty false",
|
|
100
82
|
};
|
|
101
83
|
}
|
|
102
84
|
function copyOperations(packagePath, sourceFiles) {
|
|
@@ -256,13 +238,11 @@ function webContribution(context) {
|
|
|
256
238
|
packageManager: context.toolchain.packageManagerPin,
|
|
257
239
|
},
|
|
258
240
|
operations,
|
|
259
|
-
checks: checks(web.path, { browser: true }),
|
|
260
|
-
fixes: fixes(web.path),
|
|
261
241
|
environmentNeeds: [
|
|
262
242
|
playwrightBrowserAssetsEnvironmentNeed({ browser: "chromium", owner }),
|
|
263
243
|
shellCheckEnvironmentNeed(owner),
|
|
264
244
|
],
|
|
265
|
-
|
|
245
|
+
deploymentEnvironmentNeeds: [dockerEngineEnvironmentNeed()],
|
|
266
246
|
foundation: foundation(),
|
|
267
247
|
};
|
|
268
248
|
}
|
|
@@ -322,8 +302,6 @@ function databaseContribution(context) {
|
|
|
322
302
|
{ kind: "writeJson", to: `${db.path}/package.json`, value: {} },
|
|
323
303
|
...copyOperations(db.path, sourceFiles),
|
|
324
304
|
],
|
|
325
|
-
checks: checks(db.path),
|
|
326
|
-
fixes: fixes(db.path),
|
|
327
305
|
environmentNeeds: [],
|
|
328
306
|
foundation: foundation(),
|
|
329
307
|
};
|
|
@@ -367,10 +345,6 @@ function migrationsContribution(context) {
|
|
|
367
345
|
},
|
|
368
346
|
...copyOperations(migrations.path, sourceFiles),
|
|
369
347
|
],
|
|
370
|
-
// This package has no test:run manifest script, so the durable
|
|
371
|
-
// contribution reconstruction must not invent a unit-test check for it.
|
|
372
|
-
checks: checks(migrations.path, { unit: false }),
|
|
373
|
-
fixes: fixes(migrations.path),
|
|
374
348
|
environmentNeeds: [],
|
|
375
349
|
foundation: foundation(),
|
|
376
350
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { sharedVueSourceOperations,
|
|
1
|
+
import { sharedVueSourceOperations, vueApplicationEnvironmentNeeds, vueApplicationExposure, vueApplicationManifest, vueApplicationScripts, } from "../shared/vue.js";
|
|
2
2
|
import { templateSources } from "../template-sources.js";
|
|
3
3
|
function packageScripts() {
|
|
4
4
|
return {
|
|
5
5
|
...vueApplicationScripts(),
|
|
6
|
-
|
|
6
|
+
typecheck: "node scripts/run-vue-tsc.ts --build --noEmit --pretty false",
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
9
|
function appContribution(options) {
|
|
@@ -43,8 +43,6 @@ function appContribution(options) {
|
|
|
43
43
|
scripts: packageScripts(),
|
|
44
44
|
}),
|
|
45
45
|
operations,
|
|
46
|
-
checks: vueApplicationChecks(definition.path),
|
|
47
|
-
fixes: vueApplicationFixes(definition.path),
|
|
48
46
|
environmentNeeds: vueApplicationEnvironmentNeeds(definition.path),
|
|
49
47
|
foundation: {
|
|
50
48
|
toolchains: {},
|
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
import {} from "
|
|
2
|
-
import { sharedVueSourceOperations, vueApplicationChecks, vueApplicationEnvironmentNeeds, vueApplicationExposure, vueApplicationFixes, vueApplicationManifest, vueApplicationScripts, } from "../shared/vue.js";
|
|
1
|
+
import { sharedVueSourceOperations, vueApplicationEnvironmentNeeds, vueApplicationExposure, vueApplicationManifest, vueApplicationScripts, } from "../shared/vue.js";
|
|
3
2
|
import { templateSources } from "../template-sources.js";
|
|
4
3
|
function apiScripts() {
|
|
5
4
|
return {
|
|
6
|
-
|
|
5
|
+
build: "tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json",
|
|
7
6
|
dev: "node --watch src/server.ts",
|
|
8
|
-
"format:check
|
|
9
|
-
"format:write
|
|
10
|
-
|
|
11
|
-
"lint:fix
|
|
7
|
+
"format:check": "oxfmt --list-different --config ../../oxfmt.config.ts .",
|
|
8
|
+
"format:write": "oxfmt --write --config ../../oxfmt.config.ts .",
|
|
9
|
+
lint: "oxlint --quiet --format=unix --config ../../oxlint.config.ts .",
|
|
10
|
+
"lint:fix": "oxlint --format=unix --config ../../oxlint.config.ts . --fix",
|
|
12
11
|
start: "node dist/server.js",
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
test: "vitest run --reporter=agent --silent=passed-only",
|
|
13
|
+
typecheck: "tsc -p tsconfig.json --noEmit --pretty false",
|
|
15
14
|
};
|
|
16
15
|
}
|
|
17
16
|
function webScripts() {
|
|
18
17
|
return {
|
|
19
18
|
...vueApplicationScripts(),
|
|
20
|
-
|
|
19
|
+
typecheck: "node scripts/run-vue-tsc.ts --build --pretty false",
|
|
21
20
|
};
|
|
22
21
|
}
|
|
23
22
|
function packageFoundation() {
|
|
@@ -43,18 +42,6 @@ function apiContribution(context) {
|
|
|
43
42
|
},
|
|
44
43
|
imports: { "#/*": { default: "./dist/*.js", types: "./src/*.ts" } },
|
|
45
44
|
};
|
|
46
|
-
const owner = { kind: "package-boundary", path: definition.path };
|
|
47
|
-
const checks = [
|
|
48
|
-
{ kind: "typescript-typecheck", owner },
|
|
49
|
-
{ kind: "oxc-lint", owner },
|
|
50
|
-
{ kind: "oxc-format-check", owner },
|
|
51
|
-
{ kind: "build", owner },
|
|
52
|
-
{ kind: "unit-test", owner },
|
|
53
|
-
];
|
|
54
|
-
const fixes = [
|
|
55
|
-
{ kind: "oxc-format-write", owner },
|
|
56
|
-
{ kind: "oxc-lint-fix", owner },
|
|
57
|
-
];
|
|
58
45
|
const sourceFiles = [
|
|
59
46
|
"turbo.json",
|
|
60
47
|
"vitest.config.ts",
|
|
@@ -97,8 +84,6 @@ function apiContribution(context) {
|
|
|
97
84
|
engines: { node: context.toolchain.nodeLtsMajor },
|
|
98
85
|
},
|
|
99
86
|
operations,
|
|
100
|
-
checks,
|
|
101
|
-
fixes,
|
|
102
87
|
environmentNeeds: [],
|
|
103
88
|
foundation: packageFoundation(),
|
|
104
89
|
};
|
|
@@ -141,8 +126,6 @@ function webContribution(context) {
|
|
|
141
126
|
scripts: webScripts(),
|
|
142
127
|
}),
|
|
143
128
|
operations,
|
|
144
|
-
checks: vueApplicationChecks(definition.path),
|
|
145
|
-
fixes: vueApplicationFixes(definition.path),
|
|
146
129
|
environmentNeeds: vueApplicationEnvironmentNeeds(definition.path),
|
|
147
130
|
foundation: packageFoundation(),
|
|
148
131
|
};
|
|
@@ -19,12 +19,13 @@
|
|
|
19
19
|
},
|
|
20
20
|
"scripts": {
|
|
21
21
|
"build": "rm -rf dist && tsc -p tsconfig.build.json",
|
|
22
|
-
"check:templates": "
|
|
22
|
+
"check:templates": "node src/check-template-source.ts && node src/check-registry-contract.ts && node src/check-publication-source.ts",
|
|
23
23
|
"check:templates:boundary": "node src/check-template-boundary.ts",
|
|
24
24
|
"format:check": "oxfmt --list-different --config ../../oxfmt.config.ts .",
|
|
25
25
|
"format:write": "oxfmt --write --config ../../oxfmt.config.ts .",
|
|
26
26
|
"lint": "oxlint --quiet --format=unix --config ../../oxlint.config.ts --ignore-pattern dist --ignore-pattern templates .",
|
|
27
27
|
"lint:fix": "oxlint --format=unix --config ../../oxlint.config.ts --ignore-pattern dist --ignore-pattern templates . --fix",
|
|
28
|
+
"test": "vitest run --config vitest.config.ts --reporter=agent --silent=passed-only",
|
|
28
29
|
"typecheck": "tsc -p tsconfig.json --noEmit --pretty false"
|
|
29
30
|
},
|
|
30
31
|
"dependencies": {
|
package/node_modules/@ykdz/template-builtin-presets/templates/foundation/pnpm-workspace.dynamic.txt
CHANGED
|
@@ -8,14 +8,10 @@ dedupeInjectedDeps: false
|
|
|
8
8
|
|
|
9
9
|
syncInjectedDepsAfterScripts:
|
|
10
10
|
- build
|
|
11
|
-
- build:run
|
|
12
11
|
|
|
13
12
|
minimumReleaseAge: 1440
|
|
14
13
|
minimumReleaseAgeStrict: true
|
|
15
|
-
|
|
16
|
-
overrides:
|
|
17
|
-
{{DEPENDENCY_OVERRIDES}}
|
|
18
|
-
|
|
14
|
+
{{DEPENDENCY_OVERRIDES_SECTION}}
|
|
19
15
|
allowBuilds:
|
|
20
16
|
esbuild: true
|
|
21
17
|
|
package/node_modules/@ykdz/template-builtin-presets/templates/foundation/pnpm-workspace.yaml
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
packages:
|
|
2
|
+
- apps/*
|
|
2
3
|
- packages/*
|
|
3
4
|
|
|
4
5
|
nodeLinker: isolated
|
|
@@ -8,13 +9,11 @@ dedupeInjectedDeps: false
|
|
|
8
9
|
|
|
9
10
|
syncInjectedDepsAfterScripts:
|
|
10
11
|
- build
|
|
11
|
-
- build:run
|
|
12
12
|
|
|
13
13
|
minimumReleaseAge: 1440
|
|
14
14
|
minimumReleaseAgeStrict: true
|
|
15
15
|
|
|
16
16
|
overrides:
|
|
17
|
-
"valibot>typescript": "-"
|
|
18
17
|
|
|
19
18
|
allowBuilds:
|
|
20
19
|
esbuild: true
|
package/node_modules/@ykdz/template-builtin-presets/templates/foundation/scripts/check-boundaries.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { spawnSync } from "node:child_process";
|
|
2
|
+
|
|
3
|
+
const result = spawnSync(
|
|
4
|
+
"pnpm",
|
|
5
|
+
["exec", "turbo", "boundaries", "--no-color"],
|
|
6
|
+
{
|
|
7
|
+
stdio: "inherit",
|
|
8
|
+
},
|
|
9
|
+
);
|
|
10
|
+
|
|
11
|
+
if (result.error !== undefined) throw result.error;
|
|
12
|
+
process.exit(result.status ?? 1);
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { spawnSync } from "node:child_process";
|
|
2
|
+
import { existsSync } from "node:fs";
|
|
3
|
+
|
|
4
|
+
const rootOwnedFormatInputs = [
|
|
5
|
+
"package.json",
|
|
6
|
+
"pnpm-workspace.yaml",
|
|
7
|
+
"pnpm-lock.yaml",
|
|
8
|
+
"turbo.json",
|
|
9
|
+
"tsconfig.json",
|
|
10
|
+
"tsconfig.config.json",
|
|
11
|
+
"oxfmt.config.ts",
|
|
12
|
+
"oxlint.config.ts",
|
|
13
|
+
".gitignore",
|
|
14
|
+
"TODO.md",
|
|
15
|
+
"rust-toolchain.toml",
|
|
16
|
+
".vscode",
|
|
17
|
+
".github",
|
|
18
|
+
".devcontainer",
|
|
19
|
+
"scripts",
|
|
20
|
+
] as const;
|
|
21
|
+
|
|
22
|
+
const rootOwnedLintInputs = [
|
|
23
|
+
"oxfmt.config.ts",
|
|
24
|
+
"oxlint.config.ts",
|
|
25
|
+
"scripts",
|
|
26
|
+
] as const;
|
|
27
|
+
|
|
28
|
+
function existing(inputs: readonly string[]): string[] {
|
|
29
|
+
return inputs.filter((input) => existsSync(input));
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const task = process.argv[2];
|
|
33
|
+
const command =
|
|
34
|
+
task === "format:check"
|
|
35
|
+
? ["exec", "oxfmt", "--list-different", "--config", "oxfmt.config.ts"]
|
|
36
|
+
: task === "format:write"
|
|
37
|
+
? ["exec", "oxfmt", "--write", "--config", "oxfmt.config.ts"]
|
|
38
|
+
: task === "lint"
|
|
39
|
+
? [
|
|
40
|
+
"exec",
|
|
41
|
+
"oxlint",
|
|
42
|
+
"--quiet",
|
|
43
|
+
"--format=unix",
|
|
44
|
+
"--config",
|
|
45
|
+
"oxlint.config.ts",
|
|
46
|
+
]
|
|
47
|
+
: task === "lint:fix"
|
|
48
|
+
? [
|
|
49
|
+
"exec",
|
|
50
|
+
"oxlint",
|
|
51
|
+
"--format=unix",
|
|
52
|
+
"--config",
|
|
53
|
+
"oxlint.config.ts",
|
|
54
|
+
"--fix",
|
|
55
|
+
]
|
|
56
|
+
: undefined;
|
|
57
|
+
|
|
58
|
+
if (command === undefined) {
|
|
59
|
+
throw new Error(`Unknown root-owned task: ${task ?? "(missing)"}`);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const inputs = existing(
|
|
63
|
+
task === "format:check" || task === "format:write"
|
|
64
|
+
? rootOwnedFormatInputs
|
|
65
|
+
: rootOwnedLintInputs,
|
|
66
|
+
);
|
|
67
|
+
const result = spawnSync("pnpm", [...command, ...inputs], { stdio: "inherit" });
|
|
68
|
+
if (result.error) throw result.error;
|
|
69
|
+
process.exitCode = result.status ?? 1;
|
|
@@ -6,13 +6,20 @@
|
|
|
6
6
|
}
|
|
7
7
|
},
|
|
8
8
|
"tasks": {
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"format:
|
|
16
|
-
"lint
|
|
9
|
+
"//#boundaries": { "cache": false },
|
|
10
|
+
"//#format:check": { "outputs": [] },
|
|
11
|
+
"//#lint": { "outputs": [] },
|
|
12
|
+
"//#format:write": { "dependsOn": ["//#lint:fix"], "cache": false },
|
|
13
|
+
"//#lint:fix": { "cache": false },
|
|
14
|
+
"//#typecheck": { "outputs": [] },
|
|
15
|
+
"format:check": { "outputs": [] },
|
|
16
|
+
"lint": { "outputs": [] },
|
|
17
|
+
"typecheck": { "dependsOn": ["^typecheck"], "outputs": [] },
|
|
18
|
+
"build": { "dependsOn": ["^build"] },
|
|
19
|
+
"test": { "dependsOn": ["build"], "outputs": [] },
|
|
20
|
+
"test:e2e": { "dependsOn": ["build"], "cache": false },
|
|
21
|
+
"deployment": { "cache": false },
|
|
22
|
+
"format:write": { "dependsOn": ["lint:fix"], "cache": false },
|
|
23
|
+
"lint:fix": { "cache": false }
|
|
17
24
|
}
|
|
18
25
|
}
|
|
@@ -18,7 +18,7 @@ RUN install -d -m 0755 "$COREPACK_HOME" "$PNPM_HOME" \
|
|
|
18
18
|
&& chmod -R a+rX "$COREPACK_HOME" "$PNPM_HOME"
|
|
19
19
|
|
|
20
20
|
FROM base AS pruner
|
|
21
|
-
COPY pnpm-lock.yaml pnpm-workspace.yaml
|
|
21
|
+
COPY pnpm-lock.yaml pnpm-workspace.yaml ./
|
|
22
22
|
RUN pnpm fetch
|
|
23
23
|
COPY package.json turbo.json ./
|
|
24
24
|
COPY apps/web/package.json apps/web/package.json
|
|
@@ -31,13 +31,12 @@ RUN pnpm exec turbo prune {{WEB_PACKAGE_NAME}} {{DB_MIGRATIONS_PACKAGE_NAME}} --
|
|
|
31
31
|
FROM base AS build
|
|
32
32
|
COPY --from=pruner /repo/out/json/pnpm-lock.yaml ./pnpm-lock.yaml
|
|
33
33
|
COPY --from=pruner /repo/out/json/pnpm-workspace.yaml ./pnpm-workspace.yaml
|
|
34
|
-
COPY --from=pruner /repo/.pnpmfile.cts ./.pnpmfile.cts
|
|
35
34
|
RUN pnpm fetch
|
|
36
35
|
COPY --from=pruner /repo/out/json/ ./
|
|
37
36
|
RUN pnpm install --offline --frozen-lockfile
|
|
38
37
|
COPY --from=pruner /repo/out/full/ ./
|
|
39
|
-
RUN pnpm --filter ./packages/db run build
|
|
40
|
-
RUN pnpm --filter ./apps/web run build
|
|
38
|
+
RUN pnpm --filter ./packages/db run build
|
|
39
|
+
RUN pnpm --filter ./apps/web run build
|
|
41
40
|
RUN pnpm --filter ./apps/web deploy --prod /runtime-deploy
|
|
42
41
|
RUN pnpm --filter ./packages/db-migrations deploy --prod /migration-deploy
|
|
43
42
|
|
|
@@ -286,7 +286,7 @@ if (row.count !== 0) throw new Error(\`Fresh deployment must contain zero TODOs,
|
|
|
286
286
|
}
|
|
287
287
|
|
|
288
288
|
async function runPlaywright(baseUrl: string): Promise<void> {
|
|
289
|
-
await runCommand("pnpm", ["--dir", "apps/web", "run", "test:e2e
|
|
289
|
+
await runCommand("pnpm", ["--dir", "apps/web", "run", "test:e2e"], {
|
|
290
290
|
cwd: repositoryRoot,
|
|
291
291
|
env: {
|
|
292
292
|
...process.env,
|
package/node_modules/@ykdz/template-builtin-presets/templates/vue-hono-app/web/playwright.config.ts
CHANGED
|
@@ -24,7 +24,7 @@ export default defineConfig({
|
|
|
24
24
|
},
|
|
25
25
|
webServer: [
|
|
26
26
|
{
|
|
27
|
-
command: `pnpm --dir ../api run build
|
|
27
|
+
command: `pnpm --dir ../api run build && PORT=${apiPort} pnpm --dir ../api run start`,
|
|
28
28
|
url: apiHealthUrl,
|
|
29
29
|
reuseExistingServer: false,
|
|
30
30
|
},
|
|
@@ -12,7 +12,6 @@ export type GeneratedDependencyCatalogOptions = {
|
|
|
12
12
|
};
|
|
13
13
|
readonly minimumReleaseAgeExclude?: readonly string[];
|
|
14
14
|
readonly overrides?: Readonly<Record<string, string>>;
|
|
15
|
-
readonly pnpmfile?: string;
|
|
16
15
|
};
|
|
17
16
|
export type GeneratedPackageManifestDependencies = {
|
|
18
17
|
readonly dependencies?: Record<string, string>;
|
|
@@ -218,15 +218,12 @@ export function renderGeneratedPnpmWorkspaceYaml(options) {
|
|
|
218
218
|
]
|
|
219
219
|
: []),
|
|
220
220
|
`nodeLinker: ${dependencyLinker}`,
|
|
221
|
-
...(options.pnpmfile === undefined
|
|
222
|
-
? []
|
|
223
|
-
: [`pnpmfile: ${options.pnpmfile}`]),
|
|
224
221
|
"autoInstallPeers: false",
|
|
225
222
|
"resolvePeersFromWorkspaceRoot: false",
|
|
226
223
|
"injectWorkspacePackages: true",
|
|
227
224
|
"dedupeInjectedDeps: false",
|
|
228
225
|
"syncInjectedDepsAfterScripts:",
|
|
229
|
-
" - build
|
|
226
|
+
" - build",
|
|
230
227
|
"minimumReleaseAge: 1440",
|
|
231
228
|
"minimumReleaseAgeStrict: true",
|
|
232
229
|
"",
|
|
@@ -241,10 +238,7 @@ export function renderGeneratedPnpmWorkspaceYaml(options) {
|
|
|
241
238
|
.toSorted(([left], [right]) => left.localeCompare(right))
|
|
242
239
|
.map(([dependency, allowed]) => ` ${dependency}: ${allowed}`), "");
|
|
243
240
|
}
|
|
244
|
-
const overrides = {
|
|
245
|
-
"valibot>typescript": "-",
|
|
246
|
-
...options.overrides,
|
|
247
|
-
};
|
|
241
|
+
const overrides = options.overrides ?? {};
|
|
248
242
|
if (Object.keys(overrides).length > 0) {
|
|
249
243
|
lines.push("overrides:", ...Object.entries(overrides)
|
|
250
244
|
.toSorted(([left], [right]) => left.localeCompare(right))
|