create-hazejs 0.0.0-stage → 0.1.1

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 (187) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +17 -2
  3. package/bin/create-hazejs.mjs +2 -0
  4. package/dist/index.d.mts +1 -0
  5. package/dist/index.mjs +74 -0
  6. package/dist/scaffold.d.mts +29 -0
  7. package/dist/scaffold.mjs +76 -0
  8. package/package.json +77 -3
  9. package/templates/api/.env +4 -0
  10. package/templates/api/.env.test +1 -0
  11. package/templates/api/README.md +383 -0
  12. package/templates/api/_gitignore +9 -0
  13. package/templates/api/app/controller/AuthController.ts +45 -0
  14. package/templates/api/app/controller/GreetingController.ts +23 -0
  15. package/templates/api/app/controller/UserController.ts +38 -0
  16. package/templates/api/app/event/UserRegistered.ts +6 -0
  17. package/templates/api/app/exception/Handler.ts +13 -0
  18. package/templates/api/app/job/SendWelcomeEmail.ts +19 -0
  19. package/templates/api/app/listener/BroadcastRegistration.ts +7 -0
  20. package/templates/api/app/listener/QueueWelcomeEmail.ts +6 -0
  21. package/templates/api/app/mail/WelcomeMail.ts +17 -0
  22. package/templates/api/app/model/User.ts +11 -0
  23. package/templates/api/app/policy/UserPolicy.ts +14 -0
  24. package/templates/api/app/provider/AppProvider.ts +9 -0
  25. package/templates/api/app/provider/DatabaseProvider.ts +4 -0
  26. package/templates/api/app/response/Formatter.ts +17 -0
  27. package/templates/api/app/service/GreetingService.ts +6 -0
  28. package/templates/api/app/validate/auth.ts +20 -0
  29. package/templates/api/app/validate/greeting.ts +5 -0
  30. package/templates/api/app/validate/user.ts +12 -0
  31. package/templates/api/config/app.ts +7 -0
  32. package/templates/api/config/auth.ts +23 -0
  33. package/templates/api/config/cache.ts +23 -0
  34. package/templates/api/config/cors.ts +11 -0
  35. package/templates/api/config/database.ts +17 -0
  36. package/templates/api/config/filesystem.ts +32 -0
  37. package/templates/api/config/mail.ts +31 -0
  38. package/templates/api/config/middleware.ts +10 -0
  39. package/templates/api/config/queue.ts +21 -0
  40. package/templates/api/config/throttle.ts +12 -0
  41. package/templates/api/config/websocket.ts +12 -0
  42. package/templates/api/database/migrations/0000_create_users.sql +9 -0
  43. package/templates/api/database/migrations/0001_add_user_password.sql +1 -0
  44. package/templates/api/database/migrations/0002_add_user_role.sql +1 -0
  45. package/templates/api/database/migrations/meta/0000_snapshot.json +71 -0
  46. package/templates/api/database/migrations/meta/0001_snapshot.json +78 -0
  47. package/templates/api/database/migrations/meta/0002_snapshot.json +86 -0
  48. package/templates/api/database/migrations/meta/_journal.json +27 -0
  49. package/templates/api/database/schema/users.ts +17 -0
  50. package/templates/api/database/seeders/01-users.ts +15 -0
  51. package/templates/api/haze.config.ts +5 -0
  52. package/templates/api/package.json +38 -0
  53. package/templates/api/route/api.ts +22 -0
  54. package/templates/api/route/ws.ts +18 -0
  55. package/templates/api/schedule/app.ts +11 -0
  56. package/templates/api/tests/auth.test.ts +77 -0
  57. package/templates/api/tests/greeting.test.ts +29 -0
  58. package/templates/api/tests/user.test.ts +58 -0
  59. package/templates/api/tsconfig.json +34 -0
  60. package/templates/api/vitest.config.ts +4 -0
  61. package/templates/react/.env +8 -0
  62. package/templates/react/.env.test +1 -0
  63. package/templates/react/README.md +374 -0
  64. package/templates/react/_gitignore +9 -0
  65. package/templates/react/haze.config.ts +8 -0
  66. package/templates/react/index.html +12 -0
  67. package/templates/react/package.json +46 -0
  68. package/templates/react/server/app/controller/AuthController.ts +45 -0
  69. package/templates/react/server/app/controller/GreetingController.ts +23 -0
  70. package/templates/react/server/app/controller/UserController.ts +38 -0
  71. package/templates/react/server/app/event/UserRegistered.ts +6 -0
  72. package/templates/react/server/app/exception/Handler.ts +13 -0
  73. package/templates/react/server/app/job/SendWelcomeEmail.ts +19 -0
  74. package/templates/react/server/app/listener/BroadcastRegistration.ts +7 -0
  75. package/templates/react/server/app/listener/QueueWelcomeEmail.ts +6 -0
  76. package/templates/react/server/app/mail/WelcomeMail.ts +17 -0
  77. package/templates/react/server/app/model/User.ts +11 -0
  78. package/templates/react/server/app/policy/UserPolicy.ts +14 -0
  79. package/templates/react/server/app/provider/AppProvider.ts +9 -0
  80. package/templates/react/server/app/provider/DatabaseProvider.ts +4 -0
  81. package/templates/react/server/app/provider/SocketProvider.ts +4 -0
  82. package/templates/react/server/app/response/Formatter.ts +17 -0
  83. package/templates/react/server/app/service/GreetingService.ts +6 -0
  84. package/templates/react/server/app/socket/chat.ts +17 -0
  85. package/templates/react/server/app/validate/auth.ts +20 -0
  86. package/templates/react/server/app/validate/greeting.ts +5 -0
  87. package/templates/react/server/app/validate/user.ts +12 -0
  88. package/templates/react/server/config/app.ts +7 -0
  89. package/templates/react/server/config/auth.ts +23 -0
  90. package/templates/react/server/config/cache.ts +23 -0
  91. package/templates/react/server/config/database.ts +17 -0
  92. package/templates/react/server/config/filesystem.ts +32 -0
  93. package/templates/react/server/config/mail.ts +31 -0
  94. package/templates/react/server/config/middleware.ts +11 -0
  95. package/templates/react/server/config/queue.ts +21 -0
  96. package/templates/react/server/config/socketio.ts +13 -0
  97. package/templates/react/server/config/throttle.ts +12 -0
  98. package/templates/react/server/config/websocket.ts +12 -0
  99. package/templates/react/server/database/migrations/0000_create_users.sql +9 -0
  100. package/templates/react/server/database/migrations/0001_add_user_password.sql +1 -0
  101. package/templates/react/server/database/migrations/0002_add_user_role.sql +1 -0
  102. package/templates/react/server/database/migrations/meta/0000_snapshot.json +71 -0
  103. package/templates/react/server/database/migrations/meta/0001_snapshot.json +78 -0
  104. package/templates/react/server/database/migrations/meta/0002_snapshot.json +86 -0
  105. package/templates/react/server/database/migrations/meta/_journal.json +27 -0
  106. package/templates/react/server/database/schema/users.ts +17 -0
  107. package/templates/react/server/database/seeders/01-users.ts +15 -0
  108. package/templates/react/server/route/api.ts +24 -0
  109. package/templates/react/server/route/ws.ts +18 -0
  110. package/templates/react/server/schedule/app.ts +11 -0
  111. package/templates/react/src/App.css +22 -0
  112. package/templates/react/src/App.tsx +72 -0
  113. package/templates/react/src/api.ts +48 -0
  114. package/templates/react/src/main.tsx +9 -0
  115. package/templates/react/src/socket.ts +5 -0
  116. package/templates/react/src/vite-env.d.ts +5 -0
  117. package/templates/react/tests/auth.test.ts +77 -0
  118. package/templates/react/tests/greeting.test.ts +29 -0
  119. package/templates/react/tests/user.test.ts +58 -0
  120. package/templates/react/tsconfig.app.json +22 -0
  121. package/templates/react/tsconfig.json +7 -0
  122. package/templates/react/tsconfig.server.json +34 -0
  123. package/templates/react/vite.config.ts +18 -0
  124. package/templates/react/vitest.config.ts +8 -0
  125. package/templates/vue/.env +8 -0
  126. package/templates/vue/.env.test +1 -0
  127. package/templates/vue/README.md +374 -0
  128. package/templates/vue/_gitignore +9 -0
  129. package/templates/vue/haze.config.ts +8 -0
  130. package/templates/vue/index.html +12 -0
  131. package/templates/vue/package.json +44 -0
  132. package/templates/vue/server/app/controller/AuthController.ts +45 -0
  133. package/templates/vue/server/app/controller/GreetingController.ts +23 -0
  134. package/templates/vue/server/app/controller/UserController.ts +38 -0
  135. package/templates/vue/server/app/event/UserRegistered.ts +6 -0
  136. package/templates/vue/server/app/exception/Handler.ts +13 -0
  137. package/templates/vue/server/app/job/SendWelcomeEmail.ts +19 -0
  138. package/templates/vue/server/app/listener/BroadcastRegistration.ts +7 -0
  139. package/templates/vue/server/app/listener/QueueWelcomeEmail.ts +6 -0
  140. package/templates/vue/server/app/mail/WelcomeMail.ts +17 -0
  141. package/templates/vue/server/app/model/User.ts +11 -0
  142. package/templates/vue/server/app/policy/UserPolicy.ts +14 -0
  143. package/templates/vue/server/app/provider/AppProvider.ts +9 -0
  144. package/templates/vue/server/app/provider/DatabaseProvider.ts +4 -0
  145. package/templates/vue/server/app/provider/SocketProvider.ts +4 -0
  146. package/templates/vue/server/app/response/Formatter.ts +17 -0
  147. package/templates/vue/server/app/service/GreetingService.ts +6 -0
  148. package/templates/vue/server/app/socket/chat.ts +17 -0
  149. package/templates/vue/server/app/validate/auth.ts +20 -0
  150. package/templates/vue/server/app/validate/greeting.ts +5 -0
  151. package/templates/vue/server/app/validate/user.ts +12 -0
  152. package/templates/vue/server/config/app.ts +7 -0
  153. package/templates/vue/server/config/auth.ts +23 -0
  154. package/templates/vue/server/config/cache.ts +23 -0
  155. package/templates/vue/server/config/database.ts +17 -0
  156. package/templates/vue/server/config/filesystem.ts +32 -0
  157. package/templates/vue/server/config/mail.ts +31 -0
  158. package/templates/vue/server/config/middleware.ts +11 -0
  159. package/templates/vue/server/config/queue.ts +21 -0
  160. package/templates/vue/server/config/socketio.ts +13 -0
  161. package/templates/vue/server/config/throttle.ts +12 -0
  162. package/templates/vue/server/config/websocket.ts +12 -0
  163. package/templates/vue/server/database/migrations/0000_create_users.sql +9 -0
  164. package/templates/vue/server/database/migrations/0001_add_user_password.sql +1 -0
  165. package/templates/vue/server/database/migrations/0002_add_user_role.sql +1 -0
  166. package/templates/vue/server/database/migrations/meta/0000_snapshot.json +71 -0
  167. package/templates/vue/server/database/migrations/meta/0001_snapshot.json +78 -0
  168. package/templates/vue/server/database/migrations/meta/0002_snapshot.json +86 -0
  169. package/templates/vue/server/database/migrations/meta/_journal.json +27 -0
  170. package/templates/vue/server/database/schema/users.ts +17 -0
  171. package/templates/vue/server/database/seeders/01-users.ts +15 -0
  172. package/templates/vue/server/route/api.ts +24 -0
  173. package/templates/vue/server/route/ws.ts +18 -0
  174. package/templates/vue/server/schedule/app.ts +11 -0
  175. package/templates/vue/src/App.vue +92 -0
  176. package/templates/vue/src/api.ts +48 -0
  177. package/templates/vue/src/env.d.ts +5 -0
  178. package/templates/vue/src/main.ts +4 -0
  179. package/templates/vue/src/socket.ts +5 -0
  180. package/templates/vue/tests/auth.test.ts +77 -0
  181. package/templates/vue/tests/greeting.test.ts +29 -0
  182. package/templates/vue/tests/user.test.ts +58 -0
  183. package/templates/vue/tsconfig.app.json +22 -0
  184. package/templates/vue/tsconfig.json +7 -0
  185. package/templates/vue/tsconfig.server.json +34 -0
  186. package/templates/vue/vite.config.ts +18 -0
  187. package/templates/vue/vitest.config.ts +8 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026-present hazejs contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,18 @@
1
- # Temporary Holding Version
1
+ # create-hazejs
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Create a new hazejs project.
4
+
5
+ ## Usage
6
+
7
+ ```bash
8
+ pnpm create hazejs my-app # interactive
9
+ pnpm create hazejs my-app -t api # backend-only API
10
+ pnpm create hazejs my-app -t vue # Vue 3 full-stack
11
+ pnpm create hazejs my-app -t react # React 19 full-stack
12
+ ```
13
+
14
+ Part of [hazejs](https://github.com/penna-org/haze) — see the main README for documentation.
15
+
16
+ ## License
17
+
18
+ [MIT](./LICENSE)
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import '../dist/index.mjs'
@@ -0,0 +1 @@
1
+ export {}
package/dist/index.mjs ADDED
@@ -0,0 +1,74 @@
1
+ import { TEMPLATES, scaffold } from "./scaffold.mjs";
2
+ import { relative } from "node:path";
3
+ import process from "node:process";
4
+ import { defineCommand, runMain } from "citty";
5
+ import { consola } from "consola";
6
+ import { colors } from "consola/utils";
7
+ // src/index.ts
8
+ const main = defineCommand({
9
+ meta: {
10
+ name: "create-hazejs",
11
+ description: "创建 hazejs 项目"
12
+ },
13
+ args: {
14
+ dir: {
15
+ type: "positional",
16
+ description: "项目目录",
17
+ required: false
18
+ },
19
+ template: {
20
+ type: "string",
21
+ alias: "t",
22
+ description: `模板:${Object.keys(TEMPLATES).join(" | ")}`
23
+ },
24
+ force: {
25
+ type: "boolean",
26
+ description: "目标目录非空时覆盖",
27
+ default: false
28
+ }
29
+ },
30
+ async run({ args }) {
31
+ const interactive = process.stdin.isTTY && !process.env.CI;
32
+ let dir = args.dir;
33
+ if (!dir && interactive) dir = await consola.prompt("项目名称", {
34
+ type: "text",
35
+ placeholder: "my-app",
36
+ cancel: "reject"
37
+ });
38
+ if (!dir) throw new Error("请指定项目目录,例如:create-hazejs my-app");
39
+ let template = args.template;
40
+ if (!template && interactive) template = await consola.prompt("选择模板", {
41
+ type: "select",
42
+ options: Object.entries(TEMPLATES).map(([value, hint]) => ({
43
+ value,
44
+ label: value,
45
+ hint
46
+ })),
47
+ cancel: "reject"
48
+ });
49
+ template ??= "api";
50
+ const result = scaffold({
51
+ dir,
52
+ template,
53
+ force: args.force
54
+ });
55
+ const pm = detectPackageManager();
56
+ const cd = relative(process.cwd(), result.root) || ".";
57
+ consola.success(`已创建 ${colors.cyan(result.name)}(${template} 模板,${result.files.length} 个文件)`);
58
+ consola.log(`
59
+ 下一步:
60
+
61
+ ${cd === "." ? "" : `cd ${cd}\n `}${pm} install
62
+ ${pm === "npm" ? "npm run" : pm} dev
63
+ `);
64
+ }
65
+ });
66
+ function detectPackageManager() {
67
+ const agent = process.env.npm_config_user_agent ?? "";
68
+ if (agent.startsWith("pnpm")) return "pnpm";
69
+ if (agent.startsWith("yarn")) return "yarn";
70
+ if (agent.startsWith("bun")) return "bun";
71
+ return "npm";
72
+ }
73
+ runMain(main);
74
+ export {};
@@ -0,0 +1,29 @@
1
+ export declare const TEMPLATES: {
2
+ readonly api: "纯后端 API 服务";
3
+ readonly vue: "Vue 3 全栈(同仓库、同端口、一次构建)";
4
+ readonly react: "React 19 全栈(同仓库、同端口、一次构建)";
5
+ };
6
+ export type TemplateName = keyof typeof TEMPLATES;
7
+ export interface ScaffoldOptions {
8
+ /** 目标目录 */
9
+ dir: string;
10
+ template: TemplateName;
11
+ /** 项目名(package.json name),默认取目录名 */
12
+ name?: string;
13
+ /** 框架包的版本范围,默认使用 create-hazejs 自身的版本 */
14
+ version?: string;
15
+ /** 目标目录非空时清空 */
16
+ force?: boolean;
17
+ /**
18
+ * 生成 pnpm-workspace.yaml(声明依赖安装脚本的处理,pnpm 11 未声明时安装会报错)。
19
+ * 默认只在目标目录不位于已有 pnpm workspace 中时生成,避免嵌套 workspace
20
+ */
21
+ pnpmWorkspace?: boolean;
22
+ }
23
+ export interface ScaffoldResult {
24
+ root: string;
25
+ name: string;
26
+ files: string[];
27
+ }
28
+ export declare function scaffold(options: ScaffoldOptions): ScaffoldResult;
29
+ export declare function toPackageName(input: string): string;
@@ -0,0 +1,76 @@
1
+ import { basename, dirname, join, relative, resolve } from "node:path";
2
+ import { Buffer } from "node:buffer";
3
+ import { cpSync, existsSync, readFileSync, readdirSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
4
+ import { fileURLToPath } from "node:url";
5
+ // src/scaffold.ts
6
+ const TEMPLATES = {
7
+ api: "纯后端 API 服务",
8
+ vue: "Vue 3 全栈(同仓库、同端口、一次构建)",
9
+ react: "React 19 全栈(同仓库、同端口、一次构建)"
10
+ };
11
+ const templatesDir = fileURLToPath(new URL("../templates", import.meta.url));
12
+ /** npm 发布时会丢弃 .gitignore,模板中以 _gitignore 存放 */
13
+ const RENAMES = { _gitignore: ".gitignore" };
14
+ /**
15
+ * pnpm 11 要求显式声明是否运行依赖的安装脚本,未声明时 install / run 会报错。
16
+ * esbuild(drizzle-kit、tsx 引入)的二进制来自平台可选依赖,不需要运行安装脚本
17
+ */
18
+ const PNPM_WORKSPACE = `# pnpm 11:依赖的安装脚本需要显式允许或忽略(新增需要构建的依赖时在此声明)
19
+ allowBuilds:
20
+ esbuild: false
21
+ `;
22
+ function scaffold(options) {
23
+ const root = resolve(options.dir);
24
+ const source = join(templatesDir, options.template);
25
+ if (!existsSync(source)) throw new Error(`Unknown template "${options.template}". Available: ${Object.keys(TEMPLATES).join(", ")}`);
26
+ if (existsSync(root) && readdirSync(root).length) {
27
+ if (!options.force) throw new Error(`Target directory ${root} is not empty. Use --force to overwrite.`);
28
+ rmSync(root, {
29
+ recursive: true,
30
+ force: true
31
+ });
32
+ }
33
+ const name = toPackageName(options.name ?? basename(root));
34
+ const variables = {
35
+ name,
36
+ version: options.version ?? `^${ownVersion()}`,
37
+ appKey: Buffer.from(crypto.getRandomValues(/* @__PURE__ */ new Uint8Array(32))).toString("base64url")
38
+ };
39
+ cpSync(source, root, { recursive: true });
40
+ const files = walk(root);
41
+ for (const file of files) {
42
+ const content = readFileSync(file, "utf8");
43
+ const replaced = content.replace(/\{\{(\w+)\}\}/g, (match, key) => variables[key] ?? match);
44
+ if (replaced !== content) writeFileSync(file, replaced);
45
+ }
46
+ for (const file of files) {
47
+ const target = RENAMES[basename(file)];
48
+ if (target) renameSync(file, join(file, "..", target));
49
+ }
50
+ if (options.pnpmWorkspace ?? !findPnpmWorkspace(dirname(root))) writeFileSync(join(root, "pnpm-workspace.yaml"), PNPM_WORKSPACE);
51
+ return {
52
+ root,
53
+ name,
54
+ files: walk(root).map((file) => relative(root, file)).sort()
55
+ };
56
+ }
57
+ /** 向上查找所在的 pnpm workspace 根目录 */
58
+ function findPnpmWorkspace(from) {
59
+ for (let dir = from;; dir = dirname(dir)) {
60
+ if (existsSync(join(dir, "pnpm-workspace.yaml"))) return dir;
61
+ if (dirname(dir) === dir) return void 0;
62
+ }
63
+ }
64
+ function toPackageName(input) {
65
+ return input.trim().toLowerCase().replace(/\s+/g, "-").replace(/^[._]+/, "").replace(/[^a-z0-9\-~]+/g, "-") || "hazejs-app";
66
+ }
67
+ function walk(dir) {
68
+ return readdirSync(dir).flatMap((entry) => {
69
+ const path = join(dir, entry);
70
+ return statSync(path).isDirectory() ? walk(path) : [path];
71
+ });
72
+ }
73
+ function ownVersion() {
74
+ return JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8")).version;
75
+ }
76
+ export { TEMPLATES, scaffold, toPackageName };
package/package.json CHANGED
@@ -1,6 +1,80 @@
1
1
  {
2
2
  "name": "create-hazejs",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "type": "module",
4
+ "version": "0.1.1",
5
+ "description": "Create a hazejs project (API, Vue or React full-stack)",
6
+ "license": "MIT",
7
+ "homepage": "https://github.com/penna-org/haze/tree/main/packages/create#readme",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/penna-org/haze.git",
11
+ "directory": "packages/create"
12
+ },
13
+ "bugs": {
14
+ "url": "https://github.com/penna-org/haze/issues"
15
+ },
16
+ "keywords": [
17
+ "hazejs",
18
+ "haze",
19
+ "nodejs",
20
+ "typescript",
21
+ "create",
22
+ "scaffold",
23
+ "template",
24
+ "starter"
25
+ ],
26
+ "exports": {
27
+ ".": {
28
+ "types": "./dist/scaffold.d.mts",
29
+ "default": "./dist/scaffold.mjs"
30
+ },
31
+ "./package.json": "./package.json"
32
+ },
33
+ "bin": {
34
+ "create-hazejs": "./bin/create-hazejs.mjs"
35
+ },
36
+ "files": [
37
+ "bin",
38
+ "dist",
39
+ "templates"
40
+ ],
41
+ "engines": {
42
+ "node": ">=22.12.0"
43
+ },
44
+ "dependencies": {
45
+ "citty": "^0.2.2",
46
+ "consola": "^3.4.2"
47
+ },
48
+ "devDependencies": {
49
+ "@libsql/client": "^0.18.0",
50
+ "@types/react": "^19.3.0",
51
+ "@types/react-dom": "^19.3.0",
52
+ "@vitejs/plugin-react": "^6.1.2",
53
+ "@vitejs/plugin-vue": "^6.0.10",
54
+ "bullmq": "^6.5.0",
55
+ "deno": "^2.9.6",
56
+ "drizzle-kit": "^0.31.11",
57
+ "drizzle-orm": "^0.45.4",
58
+ "ioredis": "^6.0.0",
59
+ "miniflare": "^4.20260730.0",
60
+ "react": "^19.3.1",
61
+ "react-dom": "^19.3.1",
62
+ "socket.io": "^4.8.4",
63
+ "socket.io-client": "^4.8.4",
64
+ "typescript": "~6.0.3",
65
+ "valibot": "^1.1.0",
66
+ "vite": "^8.3.5",
67
+ "vitest": "^5.0.5",
68
+ "vue": "^3.5.44",
69
+ "vue-tsc": "^3.3.13",
70
+ "@hazejs/cli": "0.1.1",
71
+ "@hazejs/core": "0.1.1",
72
+ "@hazejs/orm": "0.1.1",
73
+ "@hazejs/socket.io": "0.1.1",
74
+ "@hazejs/testing": "0.1.1",
75
+ "@hazejs/vite": "0.1.1"
76
+ },
77
+ "scripts": {
78
+ "build": "tsdown"
79
+ }
6
80
  }
@@ -0,0 +1,4 @@
1
+ APP_NAME={{name}}
2
+ DATABASE_URL=file:./data/app.db
3
+ # 应用密钥(签名 Cookie、加密 Session、JWT),泄露后用 haze key:generate --force 更换
4
+ APP_KEY={{appKey}}
@@ -0,0 +1 @@
1
+ DATABASE_URL=:memory: