export 返回 { sheet 名: 行数组 },import 收同样的形状 —— 一份负载对应一个 xlsx
工作簿。默认仍是单张表(以 moduleKey 命名),模块重写 export/import 就能自定义
多 sheet(如商品/商店/销售规则一次搬完),不必再把多张表压扁成 __t/__data 两列
塞进一个 sheet。
import 取同名 sheet、没有就退回第一张:手工在 Excel 里建的表叫 Sheet1,老版本
前端发的是裸数组,两种都不该白导。
61 lines
1.6 KiB
JSON
61 lines
1.6 KiB
JSON
{
|
|
"name": "shrimp-server",
|
|
"version": "0.9.0",
|
|
"description": "Shrimp 框架后端 — 声明式字段驱动的 Node.js 管理后台框架(Express + Mongoose + JWT)",
|
|
"main": "dist/main/index.js",
|
|
"types": "dist/main/index.d.ts",
|
|
"exports": {
|
|
".": {
|
|
"types": "./dist/main/index.d.ts",
|
|
"default": "./dist/main/index.js"
|
|
},
|
|
"./package.json": "./package.json"
|
|
},
|
|
"files": [
|
|
"dist",
|
|
"src",
|
|
"README.md"
|
|
],
|
|
"scripts": {
|
|
"build": "tsc -p tsconfig.build.json",
|
|
"postbuild": "node scripts/check-admin-contract.mjs",
|
|
"prepare": "tsc -p tsconfig.build.json",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest",
|
|
"typecheck": "tsc --noEmit"
|
|
},
|
|
"peerDependencies": {
|
|
"bcrypt": "^5 || ^6",
|
|
"express": "^5",
|
|
"jsonwebtoken": "^8 || ^9",
|
|
"mongoose": "^6 || ^7 || ^8"
|
|
},
|
|
"peerDependenciesMeta": {
|
|
"express": {
|
|
"optional": true
|
|
},
|
|
"mongoose": {
|
|
"optional": true
|
|
},
|
|
"jsonwebtoken": {
|
|
"optional": true
|
|
},
|
|
"bcrypt": {
|
|
"optional": true
|
|
}
|
|
},
|
|
"devDependencies": {
|
|
"@types/bcrypt": "^5.0.0",
|
|
"@types/express": "^5.0.0",
|
|
"@types/jsonwebtoken": "^9.0.0",
|
|
"@types/node": "^20.0.0",
|
|
"bcrypt": "^5.1.1",
|
|
"express": "^5.1.0",
|
|
"jsonwebtoken": "^9.0.2",
|
|
"mongoose": "^8.0.0",
|
|
"tsx": "^4.7.0",
|
|
"typescript": "^5.3.0",
|
|
"vitest": "^1.4.0"
|
|
}
|
|
}
|