@icebreakers/monorepo-templates 1.3.3 → 1.3.5

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 (30) hide show
  1. package/assets/.github/workflows/ci.yml +1 -1
  2. package/assets/.github/workflows/release.yml +1 -1
  3. package/assets/gitignore +3 -0
  4. package/assets/package.json +11 -11
  5. package/assets/turbo.json +11 -0
  6. package/dist/cli.mjs +1 -1
  7. package/dist/index.d.mts +32 -32
  8. package/dist/index.mjs +1 -1
  9. package/dist/{prepare-D7eJqEqy.mjs → prepare-DlR-vvls.mjs} +16 -1
  10. package/package.json +4 -4
  11. package/templates/cli/package.json +1 -1
  12. package/templates/client/gitignore +1 -0
  13. package/templates/client/package.json +7 -7
  14. package/templates/client/turbo.json +11 -0
  15. package/templates/server/gitignore +1 -0
  16. package/templates/server/package.json +6 -6
  17. package/templates/server/turbo.json +11 -0
  18. package/templates/vitepress/package.json +2 -2
  19. package/templates/vitepress/reference/templates.md +8 -0
  20. package/templates/vitepress/zh/reference/templates.md +8 -0
  21. package/templates/client/worker-configuration.d.ts +0 -15358
  22. package/templates/server/worker-configuration.d.ts +0 -15358
  23. package/templates/vitepress/learn/packages/examples/2.npm-basic-package/package-lock.json +0 -30
  24. package/templates/vitepress/learn/packages/examples/3.npm-basic-package/package-lock.json +0 -1496
  25. package/templates/vitepress/learn/packages/examples/usage-cjs/package-lock.json +0 -36
  26. package/templates/vitepress/learn/packages/examples/usage-esm/package-lock.json +0 -36
  27. package/templates/vitepress/zh/learn/packages/examples/2.npm-basic-package/package-lock.json +0 -30
  28. package/templates/vitepress/zh/learn/packages/examples/3.npm-basic-package/package-lock.json +0 -1496
  29. package/templates/vitepress/zh/learn/packages/examples/usage-cjs/package-lock.json +0 -36
  30. package/templates/vitepress/zh/learn/packages/examples/usage-esm/package-lock.json +0 -36
@@ -36,7 +36,7 @@ jobs:
36
36
  with:
37
37
  fetch-depth: 2
38
38
 
39
- - uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10
39
+ - uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
40
40
 
41
41
  - name: Setup Node.js environment
42
42
  uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
@@ -54,7 +54,7 @@ jobs:
54
54
  with:
55
55
  fetch-depth: 0
56
56
 
57
- - uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10
57
+ - uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
58
58
 
59
59
  - name: Setup Node.js environment
60
60
  uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
package/assets/gitignore CHANGED
@@ -37,3 +37,6 @@ vite.config.ts.timestamp-*.mjs
37
37
  config.ts.timestamp-*.mjs
38
38
  .vite-inspect
39
39
  .playwright-cli
40
+
41
+ # local AI task artifacts
42
+ /.qoder/
@@ -3,7 +3,7 @@
3
3
  "type": "module",
4
4
  "version": "0.0.0",
5
5
  "private": true,
6
- "packageManager": "pnpm@11.25.0",
6
+ "packageManager": "pnpm@12.3.4",
7
7
  "description": "Source workspace for repoctl and Icebreaker's shared development packages",
8
8
  "author": "ice breaker <hi@sonofmagic.top>",
9
9
  "homepage": "https://repoctl.icebreaker.top",
@@ -75,6 +75,7 @@
75
75
  "@eslint/eslintrc": "^3.3.7",
76
76
  "@icebreakers/commitlint-config": "workspace:*",
77
77
  "@icebreakers/eslint-config": "workspace:*",
78
+ "@icebreakers/monorepo": "workspace:*",
78
79
  "@icebreakers/stylelint-config": "workspace:*",
79
80
  "@next/eslint-plugin-next": "^16.3.4",
80
81
  "@prettier/plugin-xml": "^3.4.2",
@@ -84,19 +85,18 @@
84
85
  "@types/lodash": "^4.17.25",
85
86
  "@types/lodash-es": "^4.17.12",
86
87
  "@types/micromatch": "^4.0.10",
87
- "@icebreakers/monorepo": "workspace:*",
88
- "@types/node": "^26.4.1",
88
+ "@types/node": "^26.5.0",
89
89
  "@types/semver": "^7.8.0",
90
90
  "@types/set-value": "^4.0.3",
91
- "@typescript-eslint/types": "^8.69.0",
92
- "@unocss/eslint-plugin": "66.9.2",
91
+ "@typescript-eslint/types": "^8.70.0",
92
+ "@unocss/eslint-plugin": "66.10.0",
93
93
  "@vitest/coverage-v8": "~5.0.0",
94
94
  "astro-eslint-parser": "^3.1.0",
95
95
  "ci-info": "^4.4.0",
96
96
  "cross-env": "^10.1.0",
97
97
  "defu": "^6.1.7",
98
98
  "es-toolkit": "^1.52.0",
99
- "eslint": "^10.9.1",
99
+ "eslint": "^10.10.0",
100
100
  "eslint-plugin-astro": "^3.1.0",
101
101
  "eslint-plugin-mdx": "3.8.1",
102
102
  "eslint-plugin-svelte": "^3.23.0",
@@ -106,29 +106,29 @@
106
106
  "get-value": "^4.1.0",
107
107
  "husky": "^9.1.7",
108
108
  "jiti": "^2.7.0",
109
- "lint-staged": "^17.4.1",
109
+ "lint-staged": "^17.5.0",
110
110
  "lodash": "^4.18.1",
111
111
  "lodash-es": "^4.18.1",
112
112
  "micromatch": "^4.0.8",
113
113
  "only-allow": "^1.2.2",
114
114
  "pathe": "^2.0.3",
115
- "pkg-types": "^2.3.2",
115
+ "pkg-types": "^2.3.3",
116
116
  "prettier": "^3.9.6",
117
117
  "prettier-plugin-astro": "^0.14.1",
118
118
  "repoctl": "workspace:*",
119
119
  "rimraf": "^6.1.3",
120
120
  "set-value": "^4.1.0",
121
- "stylelint": "^17.14.1",
121
+ "stylelint": "^17.15.0",
122
122
  "svelte": "^5.57.0",
123
123
  "svelte-eslint-parser": "^1.8.1",
124
124
  "tailwindcss": "^4.3.3",
125
125
  "tsd": "^0.33.0",
126
- "tsdown": "0.22.14",
126
+ "tsdown": "0.23.0",
127
127
  "tslib": "^2.8.1",
128
+ "tsup": "^8.5.1",
128
129
  "tsx": "^4.23.13",
129
130
  "turbo": "^2.10.12",
130
131
  "type-fest": "^5.9.0",
131
- "tsup": "^8.5.1",
132
132
  "typescript": "^6.0.3",
133
133
  "unbuild": "^3.6.1",
134
134
  "vitest": "~5.0.0",
package/assets/turbo.json CHANGED
@@ -1,5 +1,8 @@
1
1
  {
2
2
  "$schema": "https://turborepo.com/schema.json",
3
+ "globalDependencies": [
4
+ "pnpm-lock.yaml"
5
+ ],
3
6
  "tasks": {
4
7
  "build": {
5
8
  "dependsOn": [
@@ -8,6 +11,10 @@
8
11
  "inputs": [
9
12
  "src/**",
10
13
  "lib/**",
14
+ "worker/**",
15
+ "wrangler.{json,jsonc,toml}",
16
+ ".dev.vars*",
17
+ ".env*",
11
18
  "package.json",
12
19
  "tsconfig*.json",
13
20
  "*.config.{js,ts,mjs,mts}"
@@ -72,6 +79,10 @@
72
79
  "inputs": [
73
80
  "src/**",
74
81
  "lib/**",
82
+ "worker/**",
83
+ "wrangler.{json,jsonc,toml}",
84
+ ".dev.vars*",
85
+ ".env*",
75
86
  "test/**",
76
87
  "package.json",
77
88
  "tsconfig*.json"
package/dist/cli.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as prepareAssets } from "./prepare-D7eJqEqy.mjs";
1
+ import { t as prepareAssets } from "./prepare-DlR-vvls.mjs";
2
2
  import process from "node:process";
3
3
  //#region src/cli.ts
4
4
  async function main() {
package/dist/index.d.mts CHANGED
@@ -24,20 +24,20 @@ interface SuggestTemplateKeyOptions extends GetTemplateChoicesOptions {
24
24
  }
25
25
  //#endregion
26
26
  //#region src/paths.d.ts
27
- declare const packageDir: string;
28
- declare const templatesDir: string;
29
- declare const assetsDir: string;
30
- declare const skeletonDir: string;
27
+ export declare const packageDir: string;
28
+ export declare const templatesDir: string;
29
+ export declare const assetsDir: string;
30
+ export declare const skeletonDir: string;
31
31
  //#endregion
32
32
  //#region src/prepare.d.ts
33
33
  interface PrepareAssetsOptions {
34
34
  overwriteExisting?: boolean;
35
35
  silent?: boolean;
36
36
  }
37
- declare function prepareAssets(options?: PrepareAssetsOptions): Promise<void>;
37
+ export declare function prepareAssets(options?: PrepareAssetsOptions): Promise<void>;
38
38
  //#endregion
39
39
  //#region src/runtime-assets.d.ts
40
- declare function ensureTemplateAssetsPrepared(): Promise<void>;
40
+ export declare function ensureTemplateAssetsPrepared(): Promise<void>;
41
41
  //#endregion
42
42
  //#region src/scaffold.d.ts
43
43
  type TargetMode = 'prepare' | 'ensure' | 'skip';
@@ -58,48 +58,48 @@ interface ScaffoldWorkspaceOptions {
58
58
  targetMode?: TargetMode;
59
59
  force?: boolean;
60
60
  }
61
- declare function scaffoldTemplate(options: ScaffoldTemplateOptions): Promise<void>;
62
- declare function scaffoldWorkspace(options: ScaffoldWorkspaceOptions): Promise<void>;
61
+ export declare function scaffoldTemplate(options: ScaffoldTemplateOptions): Promise<void>;
62
+ export declare function scaffoldWorkspace(options: ScaffoldWorkspaceOptions): Promise<void>;
63
63
  //#endregion
64
64
  //#region src/utils/command.d.ts
65
65
  interface RunCommandOptions {
66
66
  cwd?: string;
67
67
  stdio?: 'inherit' | 'pipe';
68
68
  }
69
- declare function runCommand(command: string, args: string[], options?: RunCommandOptions): Promise<{
69
+ export declare function runCommand(command: string, args: string[], options?: RunCommandOptions): Promise<{
70
70
  exitCode: number | null;
71
71
  }>;
72
- declare function execaCommand(command: string, options?: RunCommandOptions): Promise<{
72
+ export declare function execaCommand(command: string, options?: RunCommandOptions): Promise<{
73
73
  exitCode: number | null;
74
74
  }>;
75
75
  //#endregion
76
76
  //#region src/utils/gitignore.d.ts
77
- declare function toPublishGitignorePath(input: string): string;
78
- declare function toWorkspaceGitignorePath(input: string): string;
79
- declare function isGitignoreFile(name: string): boolean;
77
+ export declare function toPublishGitignorePath(input: string): string;
78
+ export declare function toWorkspaceGitignorePath(input: string): string;
79
+ export declare function isGitignoreFile(name: string): boolean;
80
80
  //#endregion
81
81
  //#region src/utils/template-filter.d.ts
82
- declare function shouldSkipTemplatePath(rootDir: string, targetPath: string): boolean;
83
- declare function createTemplateCopyFilter(rootDir: string): (src: string) => boolean;
82
+ export declare function shouldSkipTemplatePath(rootDir: string, targetPath: string): boolean;
83
+ export declare function createTemplateCopyFilter(rootDir: string): (src: string) => boolean;
84
84
  //#endregion
85
85
  //#region src/templates.d.ts
86
- declare const templateCategories: readonly ["app", "docs", "library", "service", "tool"];
87
- declare function isTemplateCategory(value: string): value is TemplateCategory;
88
- declare function getTemplateChoices(options?: GetTemplateChoicesOptions): TemplateChoice[];
89
- declare function getTemplateKeys(options?: GetTemplateChoicesOptions): string[];
90
- declare function getTemplateChoice(key: string): TemplateChoice | undefined;
91
- declare function isTemplateKey(key: string): boolean;
92
- declare function getTemplateDefinition(key: string): TemplateDefinition | undefined;
93
- declare function getTemplateSource(key: string): string | undefined;
94
- declare function getTemplateTarget(key: string): string | undefined;
95
- declare function suggestTemplateKey(key: string, options?: SuggestTemplateKeyOptions): string | undefined;
86
+ export declare const templateCategories: readonly ["app", "docs", "library", "service", "tool"];
87
+ export declare function isTemplateCategory(value: string): value is TemplateCategory;
88
+ export declare function getTemplateChoices(options?: GetTemplateChoicesOptions): TemplateChoice[];
89
+ export declare function getTemplateKeys(options?: GetTemplateChoicesOptions): string[];
90
+ export declare function getTemplateChoice(key: string): TemplateChoice | undefined;
91
+ export declare function isTemplateKey(key: string): boolean;
92
+ export declare function getTemplateDefinition(key: string): TemplateDefinition | undefined;
93
+ export declare function getTemplateSource(key: string): string | undefined;
94
+ export declare function getTemplateTarget(key: string): string | undefined;
95
+ export declare function suggestTemplateKey(key: string, options?: SuggestTemplateKeyOptions): string | undefined;
96
96
  //#endregion
97
97
  //#region src/index.d.ts
98
- declare const templateChoices: TemplateChoice[];
99
- declare const assetTargets: string[];
100
- declare const getAssetTargets: (core?: boolean) => string[];
101
- declare const templateSourceMap: Record<string, string>;
102
- declare const templateTargetMap: Record<string, string>;
103
- declare const templateMap: Record<string, string>;
98
+ export declare const templateChoices: TemplateChoice[];
99
+ export declare const assetTargets: string[];
100
+ export declare const getAssetTargets: (core?: boolean) => string[];
101
+ export declare const templateSourceMap: Record<string, string>;
102
+ export declare const templateTargetMap: Record<string, string>;
103
+ export declare const templateMap: Record<string, string>;
104
104
  //#endregion
105
- export { Command, type GetTemplateChoicesOptions, type SuggestTemplateKeyOptions, type TemplateCategory, type TemplateChoice, type TemplateDefinition, assetTargets, assetsDir, checkbox, createTemplateCopyFilter, ensureTemplateAssetsPrepared, execaCommand, getAssetTargets, getTemplateChoice, getTemplateChoices, getTemplateDefinition, getTemplateKeys, getTemplateSource, getTemplateTarget, input, isGitignoreFile, isTemplateCategory, isTemplateKey, packageDir, prepareAssets, program, runCommand, scaffoldTemplate, scaffoldWorkspace, select, shouldSkipTemplatePath, skeletonDir, suggestTemplateKey, templateCategories, templateChoices, templateMap, templateSourceMap, templateTargetMap, templatesDir, toPublishGitignorePath, toWorkspaceGitignorePath };
105
+ export { Command, type GetTemplateChoicesOptions, type SuggestTemplateKeyOptions, type TemplateCategory, type TemplateChoice, type TemplateDefinition, checkbox, input, program, select };
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { a as toPublishGitignorePath, c as assetsDir, d as templatesDir, f as assetTargets$1, i as isGitignoreFile, l as packageDir, n as createTemplateCopyFilter, o as toWorkspaceGitignorePath, p as getAssetTargets$1, r as shouldSkipTemplatePath, s as templateChoices$1, t as prepareAssets, u as skeletonDir } from "./prepare-D7eJqEqy.mjs";
1
+ import { a as toPublishGitignorePath, c as assetsDir, d as templatesDir, f as assetTargets$1, i as isGitignoreFile, l as packageDir, n as createTemplateCopyFilter, o as toWorkspaceGitignorePath, p as getAssetTargets$1, r as shouldSkipTemplatePath, s as templateChoices$1, t as prepareAssets, u as skeletonDir } from "./prepare-DlR-vvls.mjs";
2
2
  import path from "node:path";
3
3
  import fs, { access, open, rm } from "node:fs/promises";
4
4
  import exec from "nanoexec";
@@ -144,7 +144,8 @@ const skipDirs = /* @__PURE__ */ new Set([
144
144
  const skipFiles = /* @__PURE__ */ new Set([
145
145
  ".DS_Store",
146
146
  "CHANGELOG.md",
147
- "route-map.d.ts"
147
+ "route-map.d.ts",
148
+ "worker-configuration.d.ts"
148
149
  ]);
149
150
  function shouldSkipTemplatePath(rootDir, targetPath) {
150
151
  const basename = path.basename(targetPath);
@@ -310,6 +311,19 @@ async function removeSourceRepoReleaseToolingBuildStep() {
310
311
  const nextContent = removeSourceRepoReleaseToolingBuildStepContent(content);
311
312
  if (nextContent !== content) await fs.writeFile(releaseWorkflowPath, nextContent, "utf8");
312
313
  }
314
+ async function removeSourceRepoWorkerTypeChecks() {
315
+ const workflowPath = path$1.join(assetsDir, ".github/workflows/ci.yml");
316
+ if (await pathExists(workflowPath)) {
317
+ const workflow = await fs.readFile(workflowPath, "utf8");
318
+ await fs.writeFile(workflowPath, workflow.replace(/\r?\n\s+- name: Check Worker type generation from packaged templates\r?\n\s+run: pnpm test:worker-types\r?\n/g, "\n"));
319
+ }
320
+ const manifestPath = path$1.join(assetsDir, "package.json");
321
+ if (await pathExists(manifestPath)) {
322
+ const manifest = JSON.parse(await fs.readFile(manifestPath, "utf8"));
323
+ delete manifest.scripts?.["test:worker-types"];
324
+ await fs.writeFile(manifestPath, `${JSON.stringify(manifest, null, 2)}\n`);
325
+ }
326
+ }
313
327
  async function copyTemplates(repoRoot, overwriteExisting) {
314
328
  for (const template of templateChoices) {
315
329
  const from = path$1.join(repoRoot, "templates", template.source);
@@ -331,6 +345,7 @@ async function prepareAssets(options = {}) {
331
345
  await removePublishedReleaseState();
332
346
  await writePublishedToolingConfigs();
333
347
  await removeSourceRepoReleaseToolingBuildStep();
348
+ await removeSourceRepoWorkerTypeChecks();
334
349
  await copyTemplates(repoRoot, overwriteExisting);
335
350
  }
336
351
  //#endregion
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@icebreakers/monorepo-templates",
3
3
  "type": "module",
4
- "version": "1.3.3",
4
+ "version": "1.3.5",
5
5
  "description": "Built-in project templates and managed workspace assets for repoctl",
6
6
  "author": "ice breaker <hi@sonofmagic.top>",
7
7
  "license": "MIT",
@@ -45,9 +45,9 @@
45
45
  "node": ">=18.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@inquirer/checkbox": "^5.2.4",
49
- "@inquirer/input": "^5.1.5",
50
- "@inquirer/select": "^5.2.4",
48
+ "@inquirer/checkbox": "^5.2.5",
49
+ "@inquirer/input": "^5.1.6",
50
+ "@inquirer/select": "^5.2.5",
51
51
  "commander": "^15.0.0",
52
52
  "nanoexec": "^1.1.0",
53
53
  "yaml": "^2.9.0"
@@ -36,7 +36,7 @@
36
36
  "consola": "^3.4.2"
37
37
  },
38
38
  "devDependencies": {
39
- "tsdown": "0.22.14"
39
+ "tsdown": "0.23.0"
40
40
  },
41
41
  "publishConfig": {
42
42
  "bin": {
@@ -25,3 +25,4 @@ dist-ssr
25
25
  src/route-map.d.ts
26
26
  .wrangler
27
27
  .dev.vars*
28
+ worker-configuration.d.ts
@@ -20,22 +20,22 @@
20
20
  "template"
21
21
  ],
22
22
  "scripts": {
23
- "dev": "vite --host",
24
- "build": "vue-tsc -b && vite build",
23
+ "dev": "pnpm cf-typegen && vite --host",
24
+ "build": "pnpm cf-typegen && vue-tsc -b && vite build",
25
25
  "lint": "eslint .",
26
26
  "lint:fix": "eslint . --fix",
27
27
  "preview": "vite preview",
28
28
  "deploy": "wrangler deploy",
29
29
  "cf-typegen": "wrangler types",
30
30
  "cf-typegen:check": "wrangler types --check",
31
- "typecheck": "pnpm cf-typegen:check && vue-tsc -b"
31
+ "typecheck": "pnpm cf-typegen && vue-tsc -b"
32
32
  },
33
33
  "dependencies": {
34
34
  "@faker-js/faker": "^10.6.0",
35
35
  "@tanstack/vue-query": "^5.102.8",
36
36
  "@tanstack/vue-query-devtools": "^6.1.48",
37
37
  "@tanstack/vue-table": "^9.2.4",
38
- "@tanstack/vue-virtual": "^3.13.36",
38
+ "@tanstack/vue-virtual": "^3.13.37",
39
39
  "@trpc/client": "^11.18.0",
40
40
  "clsx": "^2.1.1",
41
41
  "pinia": "^4.0.3",
@@ -46,7 +46,7 @@
46
46
  "vue-router": "^5.3.1"
47
47
  },
48
48
  "devDependencies": {
49
- "@cloudflare/vite-plugin": "^1.54.3",
49
+ "@cloudflare/vite-plugin": "^1.54.5",
50
50
  "@hono/node-server": "^2.1.1",
51
51
  "@hono/trpc-server": "^0.4.2",
52
52
  "@tailwindcss/vite": "^4.3.3",
@@ -55,14 +55,14 @@
55
55
  "@vitejs/plugin-vue-jsx": "^5.1.6",
56
56
  "@vue/tsconfig": "^0.9.1",
57
57
  "consola": "^3.4.2",
58
- "hono": "^4.13.5",
58
+ "hono": "^4.13.7",
59
59
  "tailwindcss": "^4.3.3",
60
60
  "typescript": "~6.0.3",
61
61
  "vite": "^8.2.2",
62
62
  "vite-plugin-vue-devtools": "^8.2.1",
63
63
  "vite-tsconfig-paths": "^6.1.1",
64
64
  "vue-tsc": "3.3.11",
65
- "wrangler": "^4.128.0",
65
+ "wrangler": "^4.129.1",
66
66
  "zod": "^4.5.4"
67
67
  }
68
68
  }
@@ -0,0 +1,11 @@
1
+ {
2
+ "extends": ["//"],
3
+ "tasks": {
4
+ "build": {
5
+ "outputs": ["dist/**", "worker-configuration.d.ts"]
6
+ },
7
+ "typecheck": {
8
+ "outputs": ["worker-configuration.d.ts"]
9
+ }
10
+ }
11
+ }
@@ -1 +1,2 @@
1
1
  .wrangler
2
+ worker-configuration.d.ts
@@ -31,8 +31,8 @@
31
31
  "dist"
32
32
  ],
33
33
  "scripts": {
34
- "dev": "wrangler dev",
35
- "build": "tsdown",
34
+ "dev": "pnpm cf-typegen && wrangler dev",
35
+ "build": "pnpm cf-typegen && tsdown",
36
36
  "build:watch": "tsdown --watch --sourcemap",
37
37
  "node:build:watch": "pnpm build:watch",
38
38
  "node:build": "pnpm build",
@@ -46,7 +46,7 @@
46
46
  "deploy": "wrangler deploy",
47
47
  "cf-typegen": "wrangler types",
48
48
  "cf-typegen:check": "wrangler types --check",
49
- "typecheck": "pnpm cf-typegen:check && tsc -p tsconfig.json && tsc -p tsconfig.worker.json"
49
+ "typecheck": "pnpm cf-typegen && tsc -p tsconfig.json && tsc -p tsconfig.worker.json"
50
50
  },
51
51
  "publishConfig": {
52
52
  "exports": {
@@ -63,9 +63,9 @@
63
63
  "devDependencies": {
64
64
  "@hono/node-server": "^2.1.1",
65
65
  "consola": "^3.4.2",
66
- "hono": "^4.13.5",
67
- "tsdown": "0.22.14",
68
- "wrangler": "^4.128.0",
66
+ "hono": "^4.13.7",
67
+ "tsdown": "0.23.0",
68
+ "wrangler": "^4.129.1",
69
69
  "zod": "^4.5.4"
70
70
  }
71
71
  }
@@ -0,0 +1,11 @@
1
+ {
2
+ "extends": ["//"],
3
+ "tasks": {
4
+ "build": {
5
+ "outputs": ["dist/**", "worker-configuration.d.ts"]
6
+ },
7
+ "typecheck": {
8
+ "outputs": ["worker-configuration.d.ts"]
9
+ }
10
+ }
11
+ }
@@ -38,7 +38,7 @@
38
38
  "devDependencies": {
39
39
  "@braintree/sanitize-url": "^7.1.2",
40
40
  "@tailwindcss/vite": "^4.3.3",
41
- "cytoscape": "^3.34.2",
41
+ "cytoscape": "^3.34.3",
42
42
  "cytoscape-cose-bilkent": "^4.1.0",
43
43
  "dayjs": "^1.11.23",
44
44
  "debug": "^4.4.3",
@@ -49,6 +49,6 @@
49
49
  "vitepress-plugin-llms": "^1.13.5",
50
50
  "vitepress-plugin-mermaid": "^2.0.17",
51
51
  "vue-tsc": "^3.3.11",
52
- "wrangler": "^4.128.0"
52
+ "wrangler": "^4.129.1"
53
53
  }
54
54
  }
@@ -74,6 +74,14 @@ Check first:
74
74
  - `dev`, `build`, and `typecheck` scripts are part of root tasks.
75
75
  - CI needs integration or E2E tests.
76
76
 
77
+ ### Cloudflare Worker types
78
+
79
+ The `vue-hono` and `hono-server` templates generate `worker-configuration.d.ts` from the installed Wrangler version and `wrangler.jsonc` before `dev`, `build`, and `typecheck`. This generated file is ignored by Git and excluded from published templates. Dependency updates do not require committing regenerated declarations.
80
+
81
+ Run `pnpm cf-typegen` in the app workspace to refresh editor types after changing bindings or compatibility settings. `pnpm cf-typegen:check` is a read-only diagnostic: it reports missing or outdated declarations. Build and typecheck regenerate them automatically and still fail on invalid configuration or TypeScript errors.
82
+
83
+ For existing projects, update these scripts and the Turbo inputs/outputs, then remove `worker-configuration.d.ts` from the Git index with `git rm --cached worker-configuration.d.ts` and add it to `.gitignore`.
84
+
77
85
  ### Create a docs site
78
86
 
79
87
  ```bash
@@ -76,6 +76,14 @@ repo new api --template hono-server
76
76
  - `dev`、`build`、`typecheck` 脚本是否接入根任务。
77
77
  - 是否需要在 CI 里加入 E2E 或集成测试。
78
78
 
79
+ ### Cloudflare Worker 类型
80
+
81
+ `vue-hono` 和 `hono-server` 模板会在 `dev`、`build`、`typecheck` 前,根据已安装的 Wrangler 版本和 `wrangler.jsonc` 自动生成 `worker-configuration.d.ts`。该文件由 Git 忽略,也不会打入发布的模板包;依赖升级无需再提交重新生成的声明。
82
+
83
+ 修改 binding 或兼容性配置后,可在应用工作区运行 `pnpm cf-typegen` 刷新编辑器类型。`pnpm cf-typegen:check` 保留为只读诊断命令,文件缺失或过期时会报错。构建和类型检查会自动重新生成,配置错误和真实 TypeScript 错误仍会阻止通过。
84
+
85
+ 已有项目需同步这些脚本和 Turbo 的输入、输出配置,再执行 `git rm --cached worker-configuration.d.ts` 移除 Git 跟踪,并将文件加入 `.gitignore`。
86
+
79
87
  ### 要创建文档站
80
88
 
81
89
  ```bash