vome-core 0.1.14 → 0.1.16
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/dist/admin/config/plugin-dev.js +1 -1
- package/dist/admin/crud/config.js +1 -1
- package/dist/admin/crud/confirm.js +1 -1
- package/dist/admin/crud/dict.js +1 -1
- package/dist/admin/crud/index.js +1 -1
- package/dist/admin/crud/key.js +1 -1
- package/dist/admin/crud/mitt.js +1 -1
- package/dist/admin/crud/plugins.js +1 -1
- package/dist/admin/crud/span.js +1 -1
- package/dist/admin/crud/style.js +1 -1
- package/dist/admin/crud/validate.js +1 -1
- package/dist/admin/directives/perm.js +1 -1
- package/dist/admin/hooks/useUpload.js +1 -1
- package/dist/admin/lib/browser.js +1 -1
- package/dist/admin/lib/cn.js +1 -1
- package/dist/admin/lib/dialog-float.js +1 -1
- package/dist/admin/lib/export-excel.js +1 -1
- package/dist/admin/lib/import-excel.js +1 -1
- package/dist/admin/lib/json.js +1 -1
- package/dist/admin/lib/menu.js +1 -1
- package/dist/admin/lib/tree.js +1 -1
- package/dist/admin/lib/upload.js +1 -1
- package/dist/admin/lib/video-frame.js +1 -1
- package/dist/agent/index.d.ts +3 -1
- package/dist/client/vite-resolve.d.ts +1 -1
- package/dist/client/vite-resolve.js +1 -1
- package/dist/config/index.d.ts +10 -1
- package/dist/index.d.ts +13 -1
- package/dist/index.js +1 -1
- package/dist/server/index.d.ts +17 -1
- package/dist/server/index.js +1 -1
- package/dist/shared/excel.js +1 -1
- package/dist/shared/index.js +1 -1
- package/dist/shared/locale-json.js +1 -1
- package/dist/shared/tree.js +1 -1
- package/package.json +7 -5
- package/typings/comm/crud.ts +29 -0
- package/typings/comm/page.ts +18 -0
- package/typings/comm/scan.ts +6 -0
- package/typings/common.ts +4 -0
- package/typings/context/data.ts +10 -0
- package/typings/ext/market-seat.ts +42 -0
- package/typings/ext/market.ts +55 -0
- package/typings/ext/module.ts +64 -0
- package/typings/ext/plugin.ts +38 -0
- package/typings/ioc/metadata.ts +34 -0
- package/typings/logger/config.ts +6 -0
- package/typings/routing/crud.ts +162 -0
- package/typings/routing/eps.ts +72 -0
- package/typings/routing/meta.ts +63 -0
- package/typings/routing/register.ts +21 -0
- package/typings/routing/scan-context.ts +7 -0
- package/dist/ai.d.ts +0 -1
- package/dist/src/admin/config/plugin-dev.d.ts +0 -52
- package/dist/src/agent/index.d.ts +0 -3
- package/dist/src/config/index.d.ts +0 -10
- package/dist/src/index.d.ts +0 -12
- package/dist/src/server/index.d.ts +0 -17
- package/dist/src/shared/excel.d.ts +0 -23
- package/dist/src/shared/tree.d.ts +0 -18
- package/src/shared/excel.d.ts +0 -23
- package/src/shared/excel.ts +0 -123
- package/src/shared/index.ts +0 -30
- package/src/shared/locale-json.ts +0 -79
- package/src/shared/tree.d.ts +0 -18
- package/src/shared/tree.ts +0 -50
- /package/dist/{src/agent → agent}/constants.d.ts +0 -0
- /package/dist/{src/agent → agent}/protocol.d.ts +0 -0
- /package/dist/{src/agent → agent}/types.d.ts +0 -0
- /package/dist/{src/ai → ai}/adapters/anthropic-gemini.d.ts +0 -0
- /package/dist/{src/ai → ai}/adapters/auth-headers.d.ts +0 -0
- /package/dist/{src/ai → ai}/adapters/index.d.ts +0 -0
- /package/dist/{src/ai → ai}/adapters/openai-compatible.d.ts +0 -0
- /package/dist/{src/ai → ai}/call-log-helpers.d.ts +0 -0
- /package/dist/{src/ai → ai}/index.d.ts +0 -0
- /package/dist/{src/ai → ai}/normalize.d.ts +0 -0
- /package/dist/{src/ai → ai}/sse.d.ts +0 -0
- /package/dist/{src/ai → ai}/transport.d.ts +0 -0
- /package/dist/{src/ai → ai}/types.d.ts +0 -0
- /package/dist/{src/auth → auth}/define-macro.d.ts +0 -0
- /package/dist/{src/auth → auth}/index.d.ts +0 -0
- /package/dist/{src/comm → comm}/daily-log.d.ts +0 -0
- /package/dist/{src/comm → comm}/env.d.ts +0 -0
- /package/dist/{src/comm → comm}/format-time.d.ts +0 -0
- /package/dist/{src/comm → comm}/merge.d.ts +0 -0
- /package/dist/{src/comm → comm}/scan.d.ts +0 -0
- /package/dist/{src/comm → comm}/startBanner.d.ts +0 -0
- /package/dist/{src/core → core}/app.d.ts +0 -0
- /package/dist/{src/core → core}/config.d.ts +0 -0
- /package/dist/{src/core → core}/context/index.d.ts +0 -0
- /package/dist/{src/core → core}/host-infra.d.ts +0 -0
- /package/dist/{src/core → core}/index.d.ts +0 -0
- /package/dist/{src/core → core}/plugins/async-context.d.ts +0 -0
- /package/dist/{src/core → core}/plugins/error.d.ts +0 -0
- /package/dist/{src/core → core}/plugins/logging.d.ts +0 -0
- /package/dist/{src/core → core}/plugins/openapi.d.ts +0 -0
- /package/dist/{src/core → core}/vome-config.d.ts +0 -0
- /package/dist/{src/ext → ext}/base-plugin.d.ts +0 -0
- /package/dist/{src/ext → ext}/host-identity.d.ts +0 -0
- /package/dist/{src/ext → ext}/index.d.ts +0 -0
- /package/dist/{src/ext → ext}/load-plugin.d.ts +0 -0
- /package/dist/{src/ext → ext}/market-crypto.d.ts +0 -0
- /package/dist/{src/ext → ext}/market-package.d.ts +0 -0
- /package/dist/{src/ext → ext}/market-runtime.d.ts +0 -0
- /package/dist/{src/ext → ext}/market-seat.d.ts +0 -0
- /package/dist/{src/ext → ext}/micro-apps.d.ts +0 -0
- /package/dist/{src/ext → ext}/module-gateway.d.ts +0 -0
- /package/dist/{src/ext → ext}/module-install-gate.d.ts +0 -0
- /package/dist/{src/ext → ext}/module-install.d.ts +0 -0
- /package/dist/{src/ext → ext}/module-registry.d.ts +0 -0
- /package/dist/{src/ext → ext}/path.d.ts +0 -0
- /package/dist/{src/ioc → ioc}/container.d.ts +0 -0
- /package/dist/{src/ioc → ioc}/decorators.d.ts +0 -0
- /package/dist/{src/ioc → ioc}/host.d.ts +0 -0
- /package/dist/{src/ioc → ioc}/index.d.ts +0 -0
- /package/dist/{src/ioc → ioc}/metadata.d.ts +0 -0
- /package/dist/{src/ioc → ioc}/scope.d.ts +0 -0
- /package/dist/{src/logger → logger}/bootstrap.d.ts +0 -0
- /package/dist/{src/logger → logger}/exception.d.ts +0 -0
- /package/dist/{src/logger → logger}/index.d.ts +0 -0
- /package/dist/{src/logger → logger}/logger.d.ts +0 -0
- /package/dist/{src/logger → logger}/pino.d.ts +0 -0
- /package/dist/{src/orm → orm}/base-columns.d.ts +0 -0
- /package/dist/{src/orm → orm}/column-comments.d.ts +0 -0
- /package/dist/{src/orm → orm}/crud-config.d.ts +0 -0
- /package/dist/{src/orm → orm}/crud-register.d.ts +0 -0
- /package/dist/{src/orm → orm}/data-scope.d.ts +0 -0
- /package/dist/{src/orm → orm}/db-store.d.ts +0 -0
- /package/dist/{src/orm → orm}/declarative-select.d.ts +0 -0
- /package/dist/{src/orm → orm}/entity-schema.d.ts +0 -0
- /package/dist/{src/orm → orm}/field-ref.d.ts +0 -0
- /package/dist/{src/orm → orm}/import-excel.d.ts +0 -0
- /package/dist/{src/orm → orm}/index.d.ts +0 -0
- /package/dist/{src/orm → orm}/join-tables.d.ts +0 -0
- /package/dist/{src/orm → orm}/query-builder.d.ts +0 -0
- /package/dist/{src/orm → orm}/query-op.d.ts +0 -0
- /package/dist/{src/orm → orm}/repository.d.ts +0 -0
- /package/dist/{src/orm → orm}/service.d.ts +0 -0
- /package/dist/{src/orm → orm}/tenant.d.ts +0 -0
- /package/dist/{src/routing → routing}/base.d.ts +0 -0
- /package/dist/{src/routing → routing}/context.d.ts +0 -0
- /package/dist/{src/routing → routing}/crud-summary.d.ts +0 -0
- /package/dist/{src/routing → routing}/decorators.d.ts +0 -0
- /package/dist/{src/routing → routing}/eps.d.ts +0 -0
- /package/dist/{src/routing → routing}/index.d.ts +0 -0
- /package/dist/{src/routing → routing}/metadata.d.ts +0 -0
- /package/dist/{src/routing → routing}/openapi-tags.d.ts +0 -0
- /package/dist/{src/routing → routing}/path-utils.d.ts +0 -0
- /package/dist/{src/routing → routing}/perm.d.ts +0 -0
- /package/dist/{src/routing → routing}/public-routes.d.ts +0 -0
- /package/dist/{src/routing → routing}/register.d.ts +0 -0
- /package/dist/{src/shared → shared}/index.d.ts +0 -0
- /package/dist/{src/shared → shared}/locale-json.d.ts +0 -0
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import type { ClassToken } from '../ioc/metadata'
|
|
2
|
+
|
|
3
|
+
/** 快速 CRUD 接口名(含回收站) */
|
|
4
|
+
export type CrudApi =
|
|
5
|
+
| 'add'
|
|
6
|
+
| 'delete'
|
|
7
|
+
| 'update'
|
|
8
|
+
| 'info'
|
|
9
|
+
| 'list'
|
|
10
|
+
| 'page'
|
|
11
|
+
| 'restore'
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* 字段引用(fieldEq / fieldLike / fieldArray / keyWordLikeFields)。
|
|
15
|
+
* - 裸名 `status` → `a.status`,请求参数名 = `status`
|
|
16
|
+
* - `b.providerId` → 参数名 = `providerId`
|
|
17
|
+
* - `e.id as roleId` → 筛 `e.id`,参数名 = `roleId`(短名冲突用 as,不用 requestParam)
|
|
18
|
+
*/
|
|
19
|
+
export type QueryFieldRef =
|
|
20
|
+
| string
|
|
21
|
+
| {
|
|
22
|
+
/** 如 `status` / `b.providerId` / `e.id as roleId` */
|
|
23
|
+
column: string
|
|
24
|
+
/** 筛选项展示名;缺省用实体 columnComments / EPS comment */
|
|
25
|
+
label?: string
|
|
26
|
+
/** 业务字典 type.key;筛选项用其拉 options */
|
|
27
|
+
dict?: string
|
|
28
|
+
/** 有 dict 时默认 true(下拉多选);false 为单选 */
|
|
29
|
+
multiple?: boolean
|
|
30
|
+
/** true:后端仍按本字段筛选,admin 不自动构建筛控件 */
|
|
31
|
+
none?: boolean
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/** 区间筛选精度 / 数字类型(告诉 admin 用什么控件) */
|
|
35
|
+
export type FieldRangeType =
|
|
36
|
+
| 'int'
|
|
37
|
+
| 'float'
|
|
38
|
+
| 'year'
|
|
39
|
+
| 'month'
|
|
40
|
+
| 'day'
|
|
41
|
+
| 'hour'
|
|
42
|
+
| 'minute'
|
|
43
|
+
| 'second'
|
|
44
|
+
|
|
45
|
+
/** 价格 / 时间等区间;min/max 为请求体参数名 */
|
|
46
|
+
export type QueryFieldRange = {
|
|
47
|
+
column: string
|
|
48
|
+
min: string
|
|
49
|
+
max: string
|
|
50
|
+
type: FieldRangeType
|
|
51
|
+
/** 覆盖实体注释,用于搜索 label / placeholder 前缀 */
|
|
52
|
+
label?: string
|
|
53
|
+
/** true:后端支持区间,admin 不自动出控件 */
|
|
54
|
+
none?: boolean
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/** join 类型 */
|
|
58
|
+
export type QueryJoinType = 'join' | 'leftJoin' | 'innerJoin'
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Join 配置(Drizzle pgTable)。
|
|
62
|
+
* - 主表固定别名 `a`
|
|
63
|
+
* - 联表必须显式:`entity` + `alias` + `type` + `condition`
|
|
64
|
+
*/
|
|
65
|
+
export type QueryJoin = {
|
|
66
|
+
/** Drizzle pgTable */
|
|
67
|
+
entity: unknown
|
|
68
|
+
/** 联表别名,如 b / c / f;不可为 a */
|
|
69
|
+
alias: string
|
|
70
|
+
type: QueryJoinType
|
|
71
|
+
/** 等值条件,如 `a.skinId = b.id` */
|
|
72
|
+
condition: string
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/** where / extend 上下文 */
|
|
76
|
+
export type QueryOpCtx = {
|
|
77
|
+
body: Record<string, unknown>
|
|
78
|
+
request: Request
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/** where 返回:单条 SQL,或列表(undefined/false/null 自动丢弃) */
|
|
82
|
+
export type QueryWhereResult =
|
|
83
|
+
| unknown
|
|
84
|
+
| Array<unknown | undefined | false | null>
|
|
85
|
+
|
|
86
|
+
export type QueryWhereFn = (
|
|
87
|
+
ctx: QueryOpCtx,
|
|
88
|
+
) => QueryWhereResult | Promise<QueryWhereResult>
|
|
89
|
+
|
|
90
|
+
/** extend 可改的查询句柄 */
|
|
91
|
+
export type QueryExtendQb = {
|
|
92
|
+
andWhere: (condition: unknown) => void
|
|
93
|
+
orderBy: (...orders: unknown[]) => void
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export type QueryExtendFn = (
|
|
97
|
+
qb: QueryExtendQb,
|
|
98
|
+
ctx: QueryOpCtx,
|
|
99
|
+
) => void | Promise<void>
|
|
100
|
+
|
|
101
|
+
/** page / list 查询配置 */
|
|
102
|
+
export type QueryOp = {
|
|
103
|
+
keyWordLikeFields?: string[]
|
|
104
|
+
fieldEq?: QueryFieldRef[]
|
|
105
|
+
fieldLike?: QueryFieldRef[]
|
|
106
|
+
/** PG 数组列包含查询(body 单值或数组);admin 筛选用输入框 */
|
|
107
|
+
fieldArray?: QueryFieldRef[]
|
|
108
|
+
/** 数字 / 时间区间(与 fieldEq 等并存,勿再在 where 里拆参) */
|
|
109
|
+
fieldRange?: QueryFieldRange[]
|
|
110
|
+
addOrderBy?: Record<string, 'asc' | 'desc'>
|
|
111
|
+
/**
|
|
112
|
+
* 声明式投影(有 join 时建议显式配置)。
|
|
113
|
+
* - `a.*`:主表全部列,结果键 = 驼峰字段名
|
|
114
|
+
* - `b.userName`:结果键 = `userName`(无需 as)
|
|
115
|
+
* - `e.name as roleName`:结果键 = `roleName`
|
|
116
|
+
*/
|
|
117
|
+
select?: string[]
|
|
118
|
+
join?: QueryJoin[]
|
|
119
|
+
where?: QueryWhereFn
|
|
120
|
+
extend?: QueryExtendFn
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export type InsertParamFn = (ctx: {
|
|
124
|
+
body?: unknown
|
|
125
|
+
request?: Request
|
|
126
|
+
}) => Record<string, unknown> | Promise<Record<string, unknown>>
|
|
127
|
+
|
|
128
|
+
/** 写操作前钩子(add / update / delete / restore) */
|
|
129
|
+
export type CrudBeforeFn = (ctx: {
|
|
130
|
+
body: Record<string, unknown>
|
|
131
|
+
request: Request
|
|
132
|
+
api: string
|
|
133
|
+
}) => void | Promise<void>
|
|
134
|
+
|
|
135
|
+
/** 控制器 / 路由中间件(Elysia onBeforeHandle) */
|
|
136
|
+
export type RouteMiddleware = (
|
|
137
|
+
ctx: Record<string, unknown>,
|
|
138
|
+
) => unknown | Promise<unknown>
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* @Controller 快速 CRUD 选项(Drizzle 适配)
|
|
142
|
+
*/
|
|
143
|
+
export type ControllerCrudOptions = {
|
|
144
|
+
api?: CrudApi[]
|
|
145
|
+
/** Drizzle pgTable,宿主挂载 Repository */
|
|
146
|
+
entity?: unknown
|
|
147
|
+
/** 业务 Service 类(须 @Provide,建议 extends BaseService) */
|
|
148
|
+
service?: ClassToken
|
|
149
|
+
/** 把 Service 方法挂成 POST /methodName */
|
|
150
|
+
serviceApis?: string[]
|
|
151
|
+
/** 写操作前改 body(add/update/delete/restore) */
|
|
152
|
+
before?: CrudBeforeFn
|
|
153
|
+
pageQueryOp?: QueryOp
|
|
154
|
+
listQueryOp?: QueryOp
|
|
155
|
+
insertParam?: InsertParamFn
|
|
156
|
+
infoIgnoreProperty?: string[]
|
|
157
|
+
/**
|
|
158
|
+
* 导入 upsert 唯一键(字段名数组)。
|
|
159
|
+
* 未配置时自动取实体 uniqueIndex / unique 约束。
|
|
160
|
+
*/
|
|
161
|
+
importUniqueKeys?: string[]
|
|
162
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { QueryFieldRange, QueryFieldRef } from './crud'
|
|
2
|
+
import type { ControllerSide } from './meta'
|
|
3
|
+
|
|
4
|
+
/** EPS:单条 API */
|
|
5
|
+
export type EpsApiItem = {
|
|
6
|
+
method: string
|
|
7
|
+
path: string
|
|
8
|
+
summary: string
|
|
9
|
+
dts: Record<string, unknown>
|
|
10
|
+
tag: string
|
|
11
|
+
prefix: string
|
|
12
|
+
ignoreToken: boolean
|
|
13
|
+
/** 强化:登录但免权限码 */
|
|
14
|
+
ignorePerms: boolean
|
|
15
|
+
/** 强化:推导/显式权限码 */
|
|
16
|
+
perms: string[]
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** EPS:字段列 */
|
|
20
|
+
export type EpsColumn = {
|
|
21
|
+
propertyName: string
|
|
22
|
+
type: string
|
|
23
|
+
length?: string
|
|
24
|
+
comment?: string
|
|
25
|
+
nullable?: boolean
|
|
26
|
+
defaultValue?: unknown
|
|
27
|
+
source?: string
|
|
28
|
+
dict?: string | string[]
|
|
29
|
+
/** 物理表名(i18n_pack),供 field.{table}.{prop} 翻译 */
|
|
30
|
+
table?: string
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** EPS:单个控制器/实体描述 */
|
|
34
|
+
export type EpsEntity = {
|
|
35
|
+
module: string
|
|
36
|
+
/** 强化:admin | app */
|
|
37
|
+
side: ControllerSide
|
|
38
|
+
prefix: string
|
|
39
|
+
name?: string
|
|
40
|
+
info: { type: { name: string; description: string } }
|
|
41
|
+
api: EpsApiItem[]
|
|
42
|
+
columns: EpsColumn[]
|
|
43
|
+
pageQueryOp: {
|
|
44
|
+
keyWordLikeFields: string[]
|
|
45
|
+
fieldEq: Array<string | QueryFieldRef>
|
|
46
|
+
fieldLike: Array<string | QueryFieldRef>
|
|
47
|
+
fieldArray: Array<string | QueryFieldRef>
|
|
48
|
+
fieldRange: QueryFieldRange[]
|
|
49
|
+
}
|
|
50
|
+
pageColumns: EpsColumn[]
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/** EPS:按模块分组 */
|
|
54
|
+
export type EpsModuleMap = Record<string, EpsEntity[]>
|
|
55
|
+
|
|
56
|
+
/** EPS 开放接口完整载荷(实体 + 全部字典扁平数据) */
|
|
57
|
+
export type EpsDictFlatRow = {
|
|
58
|
+
id: number
|
|
59
|
+
name: string
|
|
60
|
+
typeId: number
|
|
61
|
+
parentId?: number | null
|
|
62
|
+
orderNum?: number
|
|
63
|
+
value?: unknown
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export type EpsPayload = {
|
|
67
|
+
/** 服务端 vome.eps;写入打包 eps.json,生产仅 true 时前端可再请求 */
|
|
68
|
+
eps?: boolean
|
|
69
|
+
modules: EpsModuleMap
|
|
70
|
+
/** 字典类型 key → 扁平条目(前端组树后当本地缓存) */
|
|
71
|
+
dict: Record<string, EpsDictFlatRow[]>
|
|
72
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { ControllerCrudOptions, RouteMiddleware } from './crud'
|
|
2
|
+
|
|
3
|
+
export type ControllerSide = 'admin' | 'app'
|
|
4
|
+
|
|
5
|
+
/** @Controller() 装饰器选项 */
|
|
6
|
+
export type ControllerOptions = {
|
|
7
|
+
/** 路由前缀,如 `/auth`;也可用字符串参数简写 */
|
|
8
|
+
prefix?: string
|
|
9
|
+
side?: ControllerSide
|
|
10
|
+
module?: string
|
|
11
|
+
/** EPS / OpenAPI 描述 */
|
|
12
|
+
description?: string
|
|
13
|
+
/** 控制器级中间件 */
|
|
14
|
+
middleware?: RouteMiddleware | RouteMiddleware[]
|
|
15
|
+
} & ControllerCrudOptions
|
|
16
|
+
|
|
17
|
+
export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH'
|
|
18
|
+
|
|
19
|
+
export type RouteParamSource = 'body' | 'query' | 'params'
|
|
20
|
+
|
|
21
|
+
/** handler 参数装饰器元数据(@Body / @Query / @Param) */
|
|
22
|
+
export type RouteParamMeta = {
|
|
23
|
+
index: number
|
|
24
|
+
source: RouteParamSource
|
|
25
|
+
schema?: unknown
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/** 路由元数据 */
|
|
29
|
+
export type ControllerRouteMeta = {
|
|
30
|
+
method: HttpMethod
|
|
31
|
+
path: string
|
|
32
|
+
handler: string
|
|
33
|
+
body?: unknown
|
|
34
|
+
query?: unknown
|
|
35
|
+
routeParams?: unknown
|
|
36
|
+
params?: RouteParamMeta[]
|
|
37
|
+
public?: boolean
|
|
38
|
+
summary?: string
|
|
39
|
+
/** 单路由中间件 */
|
|
40
|
+
middleware?: RouteMiddleware[]
|
|
41
|
+
/** 权限码(任一即可);未设且非 IgnorePerms 时由路由自动推导 */
|
|
42
|
+
perms?: string[]
|
|
43
|
+
/** 跳过权限码校验(仍可要求登录) */
|
|
44
|
+
ignorePerms?: boolean
|
|
45
|
+
/** 框架自动 CRUD 路由 */
|
|
46
|
+
autoCrud?: boolean
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** 控制器元数据 */
|
|
50
|
+
export type ControllerMeta = {
|
|
51
|
+
token: new (...args: unknown[]) => unknown
|
|
52
|
+
module: string
|
|
53
|
+
side: ControllerSide
|
|
54
|
+
prefix: string
|
|
55
|
+
/** OpenAPI / EPS 描述 */
|
|
56
|
+
description?: string
|
|
57
|
+
file?: string
|
|
58
|
+
routes: ControllerRouteMeta[]
|
|
59
|
+
/** 控制器级中间件(该 plugin 下全部路由) */
|
|
60
|
+
middleware?: RouteMiddleware[]
|
|
61
|
+
/** 快速 CRUD 配置 */
|
|
62
|
+
crud?: ControllerCrudOptions
|
|
63
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { AnyElysia } from 'elysia'
|
|
2
|
+
import type { ControllerMeta } from './meta'
|
|
3
|
+
|
|
4
|
+
export type CrudRouteOptionsInput = {
|
|
5
|
+
public?: boolean
|
|
6
|
+
/** CRUD / serviceApi 名,用于自动权限码 */
|
|
7
|
+
action?: string
|
|
8
|
+
/** OpenAPI 备注(侧栏:`action 备注`) */
|
|
9
|
+
summary?: string
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/** 宿主挂载快速 CRUD 路由(Drizzle / BaseService) */
|
|
13
|
+
export type CrudRegistrar = (
|
|
14
|
+
plugin: AnyElysia,
|
|
15
|
+
meta: ControllerMeta,
|
|
16
|
+
ctx: {
|
|
17
|
+
controller: object
|
|
18
|
+
/** 给自动路由挂 adminAuth + 权限码 */
|
|
19
|
+
routeOptions: (opts?: boolean | CrudRouteOptionsInput) => Record<string, unknown> | undefined
|
|
20
|
+
},
|
|
21
|
+
) => AnyElysia
|
package/dist/ai.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './src/ai/index'
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/** docsUrl → 官网后端 origin(主机前加 service.) */
|
|
2
|
-
export declare function serviceUrlFromDocs(docsUrl: string): string;
|
|
3
|
-
/** 席位 API 根(occupy / heartbeat / release) */
|
|
4
|
-
export declare function seatApiBaseFromDocs(docsUrl: string): string;
|
|
5
|
-
/** 联网安装签发 license */
|
|
6
|
-
export declare function licenseIssueUrlFromDocs(docsUrl: string): string;
|
|
7
|
-
export declare const pluginDev: {
|
|
8
|
-
readonly docsUrl: "https://vomekj.com";
|
|
9
|
-
/** 官网后端(由 docsUrl 派生) */
|
|
10
|
-
readonly serviceUrl: string;
|
|
11
|
-
readonly uploadUrl: "https://vomekj.com/plugins/upload";
|
|
12
|
-
/** 组织镜像:clone / 浏览优先 Gitee */
|
|
13
|
-
readonly mirrors: {
|
|
14
|
-
readonly prefer: "gitee";
|
|
15
|
-
readonly giteeOrg: "https://gitee.com/vomekj";
|
|
16
|
-
readonly githubOrg: "https://github.com/vomekj";
|
|
17
|
-
};
|
|
18
|
-
readonly scaffolds: {
|
|
19
|
-
readonly full: {
|
|
20
|
-
readonly key: "full";
|
|
21
|
-
readonly title: "前端 + 后端";
|
|
22
|
-
readonly desc: "完整业务模块脚手架(.vome:含 server 与 web),本地开发打包后发布。";
|
|
23
|
-
readonly repo: "vome-plugin-full";
|
|
24
|
-
readonly repoUrl: string;
|
|
25
|
-
readonly githubRepoUrl: string;
|
|
26
|
-
readonly downloadUrl: string;
|
|
27
|
-
readonly githubDownloadUrl: string;
|
|
28
|
-
};
|
|
29
|
-
readonly backend: {
|
|
30
|
-
readonly key: "backend";
|
|
31
|
-
readonly title: "纯后端";
|
|
32
|
-
readonly desc: "钩子 / 服务端插件脚手架(.vome:仅 server),适合上传、短信、支付等能力扩展。";
|
|
33
|
-
readonly repo: "vome-plugin-service";
|
|
34
|
-
readonly repoUrl: string;
|
|
35
|
-
readonly githubRepoUrl: string;
|
|
36
|
-
readonly downloadUrl: string;
|
|
37
|
-
readonly githubDownloadUrl: string;
|
|
38
|
-
};
|
|
39
|
-
readonly frontend: {
|
|
40
|
-
readonly key: "frontend";
|
|
41
|
-
readonly title: "纯前端";
|
|
42
|
-
readonly desc: "后台微应用脚手架(.vome:含 web/),以 wujie 挂载独立前端页面。";
|
|
43
|
-
readonly repo: "vome-plugin-front";
|
|
44
|
-
readonly repoUrl: string;
|
|
45
|
-
readonly githubRepoUrl: string;
|
|
46
|
-
readonly downloadUrl: string;
|
|
47
|
-
readonly githubDownloadUrl: string;
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
export type PluginDevConfig = typeof pluginDev;
|
|
52
|
-
export type PluginScaffoldKey = keyof typeof pluginDev.scaffolds;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* vome-core/config — 轻量配置引导(不触发 VomeConfig 加载)
|
|
3
|
-
*
|
|
4
|
-
* 宿主须在 import `vome-core/server` 之前:
|
|
5
|
-
* import { provideHostConfig, merge, getEnv } from 'vome-core/config'
|
|
6
|
-
* provideHostConfig(merge(defaultConfig, envConfig))
|
|
7
|
-
*/
|
|
8
|
-
export { provideHostConfig, hasHostConfig } from '../core/config';
|
|
9
|
-
export { merge } from '../comm/merge';
|
|
10
|
-
export { getEnv } from '../comm/env';
|
package/dist/src/index.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @vome-core — 同构入口(前后端共用类型与纯工具)
|
|
3
|
-
*
|
|
4
|
-
* 服务端框架:`@vome-core/server`
|
|
5
|
-
* 管理端框架:`@vome-core/admin`
|
|
6
|
-
*/
|
|
7
|
-
export { merge, deepTree, flattenTree, RES_CODE } from './shared';
|
|
8
|
-
export { flattenLocale, unflattenLocale, hashLocaleJson, extractJsonObject, } from './shared';
|
|
9
|
-
export type { Loose, PageQuery, PagePagination, PageResult, ResCode, ApiSuccess, ApiFail, ApiResult, } from './shared';
|
|
10
|
-
export * from './agent';
|
|
11
|
-
/** 与 package.json version 同步 */
|
|
12
|
-
export declare const version: string;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* vome-core/server — Bun + Elysia 服务端框架入口
|
|
3
|
-
*
|
|
4
|
-
* 导入时初始化 `VomeConfig`(优先宿主 `provideHostConfig`;dev 可回退读盘)。
|
|
5
|
-
* 宿主须先 `import './config/provide'`,再 `import 'reflect-metadata'` / `./lib/host`。
|
|
6
|
-
* 开启 `experimentalDecorators` + `emitDecoratorMetadata`。
|
|
7
|
-
*/
|
|
8
|
-
export { App, appendInjectMeta, BaseController, Body, CommException, Context, Controller, Delete, Eps, isEpsEnabled, Get, getEnv, Inject, Ioc, isCommException, listControllers, clearControllers, isPublicHttpRoute, listProviders, Logger, Param, Patch, Post, Provide, Public, Perms, IgnorePerms, Put, Query, RES_CODE, scanFiles, ScopeEnum, Use, vome, VomeConfig, registerHost, getHostBindings, DbStore, baseColumns, BASE_COLUMN_COMMENTS, entitySchemas, columnComments, getColumnComments, listColumnCommentTables, syncColumnCommentsToPg, Repository, getRepository, InjectRepository, BaseService, q, attachCrudRoutes, isTenantEnabled, noTenant, normalizeHost, resolveTenantScope, tableHasDepartmentId, resolveDataScope, applyDataScopeWhere, applyRowScopes, noDataScope, BasePlugin, loadPluginClass, loadPluginClassFromPath, loadModuleHandlers, loadModuleHandlersFromPath, readPluginScript, resolvePluginServerPath, pDataPath, pPluginPath, pModulesPath, pModulePath, pLicensesPath, pLicensePath, ModuleRegistry, microApps, createModuleGateway, defineAuthMacro, DEFAULT_MARKET_PUBLIC_KEY_B64, newMarketId, newInstallNonce, stableStringify, resolveMarketPublicKey, resolveMarketPrivateKey, ed25519Sign, ed25519Verify, generateMarketKeyPair, pricingFromPrice, buildMarketSigPayload, signMarketSigPayload, verifyMarketSigPayload, issueLicenseFile, parseLicenseFile, verifyLicenseFile, hashZipEntries, readZipManifest, readMarketSig, sealVomeBuffer, verifySealedVome, MARKET_LIC_ENTRY, readZipMarketLicense, attachMarketLicense, assertModuleInstallAllowed, assertModuleDirAllowed, peekMarketPackage, installModuleFromZip, uninstallModuleFiles, isSeatEnforced, isMarketSigEnforced, DEFAULT_SEAT_API_BASE, DEFAULT_LICENSE_ISSUE_URL, fetchOfficialSignedLicense, deriveHostIdentity, getHostIdentity, MARKET_SEAT_DEFAULTS, ensureSiteId, syncModuleSeat, syncAllModuleSeats, getModuleSeatStatus, listModuleSeatStatuses, isModuleSeatBlocked, assertModuleSeatActive, formatSeatDisplay, startMarketSeatHeartbeat, stopMarketSeatHeartbeat, bootstrapInstalledModules, } from '../core';
|
|
9
|
-
export type { HostIdentity, HostBindings, HostLifecycle, HostSocket, HostMiddleware } from '../core';
|
|
10
|
-
export { setControllerScanContext, parseModuleFromPath, } from '../routing/context';
|
|
11
|
-
export { buildExcelBuffer, buildImportTemplateBuffer, parseExcelBuffer, excelFilename, excelResponseHeaders, IMPORT_SKIP_FIELDS, isImportSkipField, } from '../shared/excel';
|
|
12
|
-
export type { ExcelColumn, ExcelFormatCell } from '../shared/excel';
|
|
13
|
-
export { flattenLocale, unflattenLocale, hashLocaleJson, extractJsonObject, } from '../shared/locale-json';
|
|
14
|
-
export * from '../ai';
|
|
15
|
-
export type { ApiFail, ApiResult, ApiSuccess, ClassToken, ContextData, ControllerCrudOptions, ControllerMeta, ControllerRouteMeta, ControllerSide, CrudApi, CrudBeforeFn, CrudRegistrar, CrudUpsertMode, CrudModifyType, CrudWriteOptions, CrudTrashQueryOptions, CrudDeleteOptions, PageQuery, PagePagination, PageResult, PluginManifest, PluginInfo, PluginPayload, PluginCheckResult, ModuleRouteDef, ModuleMenuDef, ModuleManifest, ModuleHandlerCtx, ModuleHandler, ModuleInstalled, MarketPricing, MarketSigPayload, MarketLicensePayload, MarketLicenseFile, InstallGateKind, InstallGateResult, AssertModuleInstallOptions, InstallModuleOptions, InstallModuleResult, MarketSeatStatus, MarketSeatTicketPayload, MarketSeatTicket, EpsApiItem, EpsColumn, EpsEntity, EpsModuleMap, HttpMethod, InjectionToken, InjectMeta, InsertParamFn, ProvideOptions, QueryExtendFn, QueryExtendQb, QueryFieldRef, QueryJoin, QueryJoinType, QueryOp, QueryOpCtx, QueryWhereFn, QueryWhereResult, ResCode, RouteMiddleware, RouteParamMeta, RouteParamSource, ScanOptions, } from '../core';
|
|
16
|
-
/** 与 package.json version 同步 */
|
|
17
|
-
export declare const version: string;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export type ExcelColumn = {
|
|
2
|
-
prop: string;
|
|
3
|
-
label: string;
|
|
4
|
-
};
|
|
5
|
-
export type ExcelFormatCell = (prop: string, row: Record<string, unknown>) => string;
|
|
6
|
-
/** 导入模板排除的自动字段(实体公共列) */
|
|
7
|
-
export declare const IMPORT_SKIP_FIELDS: readonly ["id", "createTime", "updateTime", "deletedAt", "tenantId"];
|
|
8
|
-
export declare function isImportSkipField(name: string): boolean;
|
|
9
|
-
/** 二维表 → xlsx 二进制 */
|
|
10
|
-
export declare function buildExcelBuffer(columns: ExcelColumn[], rows: Record<string, unknown>[], formatCell?: ExcelFormatCell): Uint8Array;
|
|
11
|
-
/** 仅表头的导入模板 */
|
|
12
|
-
export declare function buildImportTemplateBuffer(columns: ExcelColumn[]): Uint8Array;
|
|
13
|
-
/**
|
|
14
|
-
* 解析 xlsx:首行表头 → 行对象。
|
|
15
|
-
* 表头可为字段名或中文 label(通过 columns 反查 prop)。
|
|
16
|
-
*/
|
|
17
|
-
export declare function parseExcelBuffer(data: ArrayBuffer | Uint8Array, columns?: ExcelColumn[]): Record<string, unknown>[];
|
|
18
|
-
export declare function excelFilename(name: string): string;
|
|
19
|
-
/** Service 下载响应头 */
|
|
20
|
-
export declare function excelResponseHeaders(filename: string): {
|
|
21
|
-
'Content-Type': string;
|
|
22
|
-
'Content-Disposition': string;
|
|
23
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/** 扁平列表 → 树(parentId) */
|
|
2
|
-
export declare function deepTree<T extends {
|
|
3
|
-
id?: number | string;
|
|
4
|
-
parentId?: number | string | null;
|
|
5
|
-
children?: T[];
|
|
6
|
-
orderNum?: number;
|
|
7
|
-
}>(list: T[], sort?: 'asc' | 'desc'): T[];
|
|
8
|
-
/** 树 → 扁平(带 depth / hasChildren),按 expanded 展开 */
|
|
9
|
-
export declare function flattenTree<T extends {
|
|
10
|
-
id: number | string;
|
|
11
|
-
children?: T[];
|
|
12
|
-
}>(nodes: T[], expanded: Set<string | number>, depth?: number, out?: Array<T & {
|
|
13
|
-
depth: number;
|
|
14
|
-
hasChildren: boolean;
|
|
15
|
-
}>): Array<T & {
|
|
16
|
-
depth: number;
|
|
17
|
-
hasChildren: boolean;
|
|
18
|
-
}>;
|
package/src/shared/excel.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export type ExcelColumn = {
|
|
2
|
-
prop: string;
|
|
3
|
-
label: string;
|
|
4
|
-
};
|
|
5
|
-
export type ExcelFormatCell = (prop: string, row: Record<string, unknown>) => string;
|
|
6
|
-
/** 导入模板排除的自动字段(实体公共列) */
|
|
7
|
-
export declare const IMPORT_SKIP_FIELDS: readonly ["id", "createTime", "updateTime", "deletedAt", "tenantId"];
|
|
8
|
-
export declare function isImportSkipField(name: string): boolean;
|
|
9
|
-
/** 二维表 → xlsx 二进制 */
|
|
10
|
-
export declare function buildExcelBuffer(columns: ExcelColumn[], rows: Record<string, unknown>[], formatCell?: ExcelFormatCell): Uint8Array;
|
|
11
|
-
/** 仅表头的导入模板 */
|
|
12
|
-
export declare function buildImportTemplateBuffer(columns: ExcelColumn[]): Uint8Array;
|
|
13
|
-
/**
|
|
14
|
-
* 解析 xlsx:首行表头 → 行对象。
|
|
15
|
-
* 表头可为字段名或中文 label(通过 columns 反查 prop)。
|
|
16
|
-
*/
|
|
17
|
-
export declare function parseExcelBuffer(data: ArrayBuffer | Uint8Array, columns?: ExcelColumn[]): Record<string, unknown>[];
|
|
18
|
-
export declare function excelFilename(name: string): string;
|
|
19
|
-
/** Service 下载响应头 */
|
|
20
|
-
export declare function excelResponseHeaders(filename: string): {
|
|
21
|
-
'Content-Type': string;
|
|
22
|
-
'Content-Disposition': string;
|
|
23
|
-
};
|
package/src/shared/excel.ts
DELETED
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import * as XLSX from 'xlsx'
|
|
2
|
-
|
|
3
|
-
export type ExcelColumn = {
|
|
4
|
-
prop: string
|
|
5
|
-
label: string
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export type ExcelFormatCell = (
|
|
9
|
-
prop: string,
|
|
10
|
-
row: Record<string, unknown>,
|
|
11
|
-
) => string
|
|
12
|
-
|
|
13
|
-
/** 导入模板排除的自动字段(实体公共列) */
|
|
14
|
-
export const IMPORT_SKIP_FIELDS = [
|
|
15
|
-
'id',
|
|
16
|
-
'createTime',
|
|
17
|
-
'updateTime',
|
|
18
|
-
'deletedAt',
|
|
19
|
-
'tenantId',
|
|
20
|
-
] as const
|
|
21
|
-
|
|
22
|
-
export function isImportSkipField(name: string) {
|
|
23
|
-
return (IMPORT_SKIP_FIELDS as readonly string[]).includes(name)
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/** 二维表 → xlsx 二进制 */
|
|
27
|
-
export function buildExcelBuffer(
|
|
28
|
-
columns: ExcelColumn[],
|
|
29
|
-
rows: Record<string, unknown>[],
|
|
30
|
-
formatCell?: ExcelFormatCell,
|
|
31
|
-
): Uint8Array {
|
|
32
|
-
const headers = columns.map((c) => c.label || c.prop)
|
|
33
|
-
const body = rows.map((row) =>
|
|
34
|
-
columns.map((col) => {
|
|
35
|
-
if (formatCell) return formatCell(col.prop, row)
|
|
36
|
-
const val = row[col.prop]
|
|
37
|
-
if (val == null) return ''
|
|
38
|
-
return String(val)
|
|
39
|
-
}),
|
|
40
|
-
)
|
|
41
|
-
const sheet = XLSX.utils.aoa_to_sheet([headers, ...body])
|
|
42
|
-
const book = XLSX.utils.book_new()
|
|
43
|
-
XLSX.utils.book_append_sheet(book, sheet, 'Sheet1')
|
|
44
|
-
return XLSX.write(book, { bookType: 'xlsx', type: 'array' }) as Uint8Array
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/** 仅表头的导入模板 */
|
|
48
|
-
export function buildImportTemplateBuffer(columns: ExcelColumn[]): Uint8Array {
|
|
49
|
-
return buildExcelBuffer(columns, [])
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* 解析 xlsx:首行表头 → 行对象。
|
|
54
|
-
* 表头可为字段名或中文 label(通过 columns 反查 prop)。
|
|
55
|
-
*/
|
|
56
|
-
export function parseExcelBuffer(
|
|
57
|
-
data: ArrayBuffer | Uint8Array,
|
|
58
|
-
columns?: ExcelColumn[],
|
|
59
|
-
): Record<string, unknown>[] {
|
|
60
|
-
const book = XLSX.read(data, { type: 'array', cellDates: true })
|
|
61
|
-
const name = book.SheetNames[0]
|
|
62
|
-
if (!name) return []
|
|
63
|
-
const sheet = book.Sheets[name]
|
|
64
|
-
if (!sheet) return []
|
|
65
|
-
const aoa = XLSX.utils.sheet_to_json(sheet, {
|
|
66
|
-
header: 1,
|
|
67
|
-
defval: '',
|
|
68
|
-
raw: false,
|
|
69
|
-
}) as unknown[][]
|
|
70
|
-
if (!aoa.length) return []
|
|
71
|
-
|
|
72
|
-
const headerRow = (aoa[0] || []).map((h) => String(h ?? '').trim())
|
|
73
|
-
const labelToProp = new Map<string, string>()
|
|
74
|
-
if (columns?.length) {
|
|
75
|
-
for (const c of columns) {
|
|
76
|
-
labelToProp.set(c.label.trim(), c.prop)
|
|
77
|
-
labelToProp.set(c.prop, c.prop)
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
const props = headerRow.map((h) => {
|
|
82
|
-
if (!h) return ''
|
|
83
|
-
return labelToProp.get(h) || h
|
|
84
|
-
})
|
|
85
|
-
|
|
86
|
-
const rows: Record<string, unknown>[] = []
|
|
87
|
-
for (let i = 1; i < aoa.length; i++) {
|
|
88
|
-
const line = aoa[i] || []
|
|
89
|
-
const row: Record<string, unknown> = {}
|
|
90
|
-
let empty = true
|
|
91
|
-
for (let c = 0; c < props.length; c++) {
|
|
92
|
-
const prop = props[c]
|
|
93
|
-
if (!prop) continue
|
|
94
|
-
let val: unknown = line[c]
|
|
95
|
-
if (val == null || val === '') {
|
|
96
|
-
row[prop] = val == null ? null : ''
|
|
97
|
-
continue
|
|
98
|
-
}
|
|
99
|
-
empty = false
|
|
100
|
-
if (typeof val === 'string') {
|
|
101
|
-
row[prop] = val.trim()
|
|
102
|
-
} else {
|
|
103
|
-
row[prop] = val
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
if (!empty) rows.push(row)
|
|
107
|
-
}
|
|
108
|
-
return rows
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
export function excelFilename(name: string) {
|
|
112
|
-
return name.endsWith('.xlsx') ? name : `${name}.xlsx`
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
/** Service 下载响应头 */
|
|
116
|
-
export function excelResponseHeaders(filename: string) {
|
|
117
|
-
const file = excelFilename(filename)
|
|
118
|
-
return {
|
|
119
|
-
'Content-Type':
|
|
120
|
-
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
|
121
|
-
'Content-Disposition': `attachment; filename*=UTF-8''${encodeURIComponent(file)}`,
|
|
122
|
-
}
|
|
123
|
-
}
|
package/src/shared/index.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 同构共享:前后端均可引用(无 Bun / Elysia / Vue 依赖)
|
|
3
|
-
*/
|
|
4
|
-
export { merge } from '../comm/merge'
|
|
5
|
-
export { deepTree, flattenTree } from './tree'
|
|
6
|
-
export type { Loose } from '../../typings/common'
|
|
7
|
-
export type { PageQuery, PagePagination, PageResult } from '../../typings/comm/page'
|
|
8
|
-
export {
|
|
9
|
-
RES_CODE,
|
|
10
|
-
type ResCode,
|
|
11
|
-
type ApiSuccess,
|
|
12
|
-
type ApiFail,
|
|
13
|
-
type ApiResult,
|
|
14
|
-
} from '../routing/base'
|
|
15
|
-
export {
|
|
16
|
-
buildExcelBuffer,
|
|
17
|
-
buildImportTemplateBuffer,
|
|
18
|
-
parseExcelBuffer,
|
|
19
|
-
excelFilename,
|
|
20
|
-
excelResponseHeaders,
|
|
21
|
-
IMPORT_SKIP_FIELDS,
|
|
22
|
-
isImportSkipField,
|
|
23
|
-
} from './excel'
|
|
24
|
-
export type { ExcelColumn, ExcelFormatCell } from './excel'
|
|
25
|
-
export {
|
|
26
|
-
flattenLocale,
|
|
27
|
-
unflattenLocale,
|
|
28
|
-
hashLocaleJson,
|
|
29
|
-
extractJsonObject,
|
|
30
|
-
} from './locale-json'
|