Files
fullstack-starter/package.json
T
imbytecat 5174cff3c5 refactor(cli): _serve-nitro 改用 #nitro subpath import
src/cli/_serve-nitro.mjs 原本用 ../../.output/server/index.mjs 跨边界导入 nitro 构建产物,与 #package / #drizzle/* 同属 "src/ 跳出根目录" 场景。统一改为 #nitro。

新增 package.json#imports:
  "#nitro": "./.output/server/index.mjs"

端到端验证(compose + Postgres 18):
- 编译二进制内嵌 nitro serve() 入口 ✓
- ./server migrate:embedded SQL 应用成功 ✓
- ./server 运行:/health、/api/spec.json (title/version)、RPC create+list 全 OK ✓
- Stack trace 印证 #nitro 由 Bun 正确解析到 .output/server/index.mjs ✓
- biome/typecheck/test/build/compile 全绿
2026-04-25 15:23:05 +08:00

70 lines
2.4 KiB
JSON

{
"name": "fullstack-starter",
"version": "1.0.0",
"private": true,
"type": "module",
"imports": {
"#package": "./package.json",
"#nitro": "./.output/server/index.mjs",
"#drizzle/*.sql": "./drizzle/*.sql"
},
"scripts": {
"build": "bunx --bun vite build",
"cli": "bun bin.ts",
"compile": "bun compile.ts",
"compile:darwin": "bun run compile:darwin:arm64 && bun run compile:darwin:x64",
"compile:darwin:arm64": "bun compile.ts --target bun-darwin-arm64",
"compile:darwin:x64": "bun compile.ts --target bun-darwin-x64",
"compile:linux": "bun run compile:linux:x64 && bun run compile:linux:arm64",
"compile:linux:arm64": "bun compile.ts --target bun-linux-arm64",
"compile:linux:x64": "bun compile.ts --target bun-linux-x64",
"compile:windows": "bun run compile:windows:x64",
"compile:windows:x64": "bun compile.ts --target bun-windows-x64",
"db:embed": "bun embed-migrations.ts",
"db:generate": "drizzle-kit generate && bun embed-migrations.ts",
"db:migrate": "drizzle-kit migrate",
"db:push": "drizzle-kit push",
"db:studio": "drizzle-kit studio",
"dev": "bunx --bun vite dev",
"fix": "biome check --write",
"test": "bun test",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@orpc/client": "^1.14.0",
"@orpc/contract": "^1.14.0",
"@orpc/openapi": "^1.14.0",
"@orpc/server": "^1.14.0",
"@orpc/tanstack-query": "^1.14.0",
"@orpc/zod": "^1.14.0",
"@t3-oss/env-core": "^0.13.11",
"@tanstack/react-query": "^5.100.1",
"@tanstack/react-router": "^1.168.24",
"@tanstack/react-router-ssr-query": "^1.166.11",
"@tanstack/react-start": "^1.167.48",
"citty": "^0.2.2",
"drizzle-orm": "0.45.2",
"drizzle-zod": "^0.8.3",
"postgres": "^3.4.9",
"react": "^19.2.5",
"react-dom": "^19.2.5",
"uuid": "^14.0.0",
"zod": "^4.3.6"
},
"devDependencies": {
"@biomejs/biome": "^2.4.13",
"@tailwindcss/vite": "^4.2.4",
"@tanstack/devtools-vite": "^0.6.0",
"@tanstack/react-devtools": "^0.10.2",
"@tanstack/react-query-devtools": "^5.100.1",
"@tanstack/react-router-devtools": "^1.166.13",
"@types/bun": "^1.3.13",
"@vitejs/plugin-react": "^6.0.1",
"drizzle-kit": "0.31.10",
"nitro": "npm:nitro-nightly@3.0.1-20260424-182106-f8cf6ccc",
"tailwindcss": "^4.2.4",
"typescript": "^6.0.3",
"vite": "^8.0.10"
}
}