vome-core 0.0.16 → 0.0.18
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/api/client.js +2 -0
- 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/hooks/useVome.d.ts +3 -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/eps.d.ts +2 -11
- package/dist/admin/lib/eps.js +7 -33
- 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/service/base.d.ts +2 -27
- package/dist/admin/service/base.js +1 -76
- package/dist/admin/service/index.d.ts +10 -16
- package/dist/admin/service/index.js +31 -259
- package/dist/client/base.d.ts +28 -0
- package/dist/client/base.js +77 -0
- package/dist/client/configure.d.ts +9 -0
- package/dist/client/configure.js +10 -0
- package/dist/client/eps.d.ts +12 -0
- package/dist/client/eps.js +42 -0
- package/dist/client/index.d.ts +4 -0
- package/dist/client/index.js +22 -0
- package/dist/client/service.d.ts +31 -0
- package/dist/client/service.js +299 -0
- package/dist/client/vite-plugin-eps.d.ts +42 -0
- package/dist/client/vite-plugin-eps.js +266 -0
- package/dist/index.js +1 -1
- package/dist/server/index.js +1 -1
- package/dist/shared/index.js +1 -1
- package/dist/shared/tree.js +1 -1
- package/package.json +46 -4
- package/typings/admin/comm/eps.d.ts +48 -0
package/dist/shared/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x59f7eb,_0xf723d5){var _0x2ce33c=_0x573a,_0x5ac725=_0x59f7eb();while(!![]){try{var _0x41d7ea=-parseInt(_0x2ce33c(0x9e))/0x1+parseInt(_0x2ce33c(0x9f))/0x2+-parseInt(_0x2ce33c(0x98))/0x3*(parseInt(_0x2ce33c(0x9c))/0x4)+-parseInt(_0x2ce33c(0x99))/0x5+parseInt(_0x2ce33c(0x97))/0x6*(parseInt(_0x2ce33c(0x9a))/0x7)+parseInt(_0x2ce33c(0x9d))/0x8*(parseInt(_0x2ce33c(0x9b))/0x9)+parseInt(_0x2ce33c(0xa0))/0xa;if(_0x41d7ea===_0xf723d5)break;else _0x5ac725['push'](_0x5ac725['shift']());}catch(_0x10d308){_0x5ac725['push'](_0x5ac725['shift']());}}}(_0x13a4,0x86b4e));function _0x13a4(){var _0x203ed0=['mZqZz3PrrK1V','mtq0odK3m0fyy0HAzW','mZaXote0ngnNruLmua','ndbesgPRrMC','nZq0mJC4y2PrC0vK','ndGWmda2zhvxwezo','mZu4nZKYmeL1CM9rrW','otm5nJzqyurbEuK','m3P4EwHjzq','nJaXnZm1rNHerw5p'];_0x13a4=function(){return _0x203ed0;};return _0x13a4();}function _0x573a(_0x20dfa0,_0x3655c9){_0x20dfa0=_0x20dfa0-0x97;var _0x13a4d2=_0x13a4();var _0x573a16=_0x13a4d2[_0x20dfa0];if(_0x573a['LPuaHU']===undefined){var _0x2d67ae=function(_0x2a67c3){var _0x20f8f0='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x2fdfee='',_0xf87eac='';for(var _0x3a0ee1=0x0,_0xf13b1a,_0x2a7d1c,_0x50d835=0x0;_0x2a7d1c=_0x2a67c3['charAt'](_0x50d835++);~_0x2a7d1c&&(_0xf13b1a=_0x3a0ee1%0x4?_0xf13b1a*0x40+_0x2a7d1c:_0x2a7d1c,_0x3a0ee1++%0x4)?_0x2fdfee+=String['fromCharCode'](0xff&_0xf13b1a>>(-0x2*_0x3a0ee1&0x6)):0x0){_0x2a7d1c=_0x20f8f0['indexOf'](_0x2a7d1c);}for(var _0x52780f=0x0,_0x8ba591=_0x2fdfee['length'];_0x52780f<_0x8ba591;_0x52780f++){_0xf87eac+='%'+('00'+_0x2fdfee['charCodeAt'](_0x52780f)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0xf87eac);};_0x573a['RAlqFy']=_0x2d67ae,_0x573a['TqbwFO']={},_0x573a['LPuaHU']=!![];}var _0x1b4982=_0x13a4d2[0x0],_0x31afb8=_0x20dfa0+_0x1b4982,_0x5a7c35=_0x573a['TqbwFO'][_0x31afb8];return!_0x5a7c35?(_0x573a16=_0x573a['RAlqFy'](_0x573a16),_0x573a['TqbwFO'][_0x31afb8]=_0x573a16):_0x573a16=_0x5a7c35,_0x573a16;}export{merge}from'../comm/merge';export{deepTree,flattenTree}from'./tree';export{RES_CODE}from'../routing/base';
|
package/dist/shared/tree.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const _0x2d3177=_0x353b;(function(_0x591699,_0x12ef41){const _0x357a06=_0x353b,_0x26c4b1=_0x591699();while(!![]){try{const _0x3a184b=-parseInt(_0x357a06(0x138))/0x1+-parseInt(_0x357a06(0x13c))/0x2+-parseInt(_0x357a06(0x133))/0x3*(-parseInt(_0x357a06(0x139))/0x4)+-parseInt(_0x357a06(0x137))/0x5+parseInt(_0x357a06(0x141))/0x6*(-parseInt(_0x357a06(0x12f))/0x7)+-parseInt(_0x357a06(0x142))/0x8+parseInt(_0x357a06(0x132))/0x9;if(_0x3a184b===_0x12ef41)break;else _0x26c4b1['push'](_0x26c4b1['shift']());}catch(_0x5cae04){_0x26c4b1['push'](_0x26c4b1['shift']());}}}(_0x5e03,0xcee0e));function _0x353b(_0x15710f,_0xfdb332){_0x15710f=_0x15710f-0x12f;const _0x5e03d9=_0x5e03();let _0x353b2b=_0x5e03d9[_0x15710f];if(_0x353b['evSuzJ']===undefined){var _0x9a16db=function(_0x154ca4){const _0x13c7e7='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x33aa90='',_0x143d2e='';for(let _0x516bc5=0x0,_0x58ce9a,_0x1238c7,_0x2532bd=0x0;_0x1238c7=_0x154ca4['charAt'](_0x2532bd++);~_0x1238c7&&(_0x58ce9a=_0x516bc5%0x4?_0x58ce9a*0x40+_0x1238c7:_0x1238c7,_0x516bc5++%0x4)?_0x33aa90+=String['fromCharCode'](0xff&_0x58ce9a>>(-0x2*_0x516bc5&0x6)):0x0){_0x1238c7=_0x13c7e7['indexOf'](_0x1238c7);}for(let _0x488bbc=0x0,_0x316181=_0x33aa90['length'];_0x488bbc<_0x316181;_0x488bbc++){_0x143d2e+='%'+('00'+_0x33aa90['charCodeAt'](_0x488bbc)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x143d2e);};_0x353b['JwKXKk']=_0x9a16db,_0x353b['ckXNmj']={},_0x353b['evSuzJ']=!![];}const _0x21df95=_0x5e03d9[0x0],_0x449144=_0x15710f+_0x21df95,_0x573b9c=_0x353b['ckXNmj'][_0x449144];return!_0x573b9c?(_0x353b2b=_0x353b['JwKXKk'](_0x353b2b),_0x353b['ckXNmj'][_0x449144]=_0x353b2b):_0x353b2b=_0x573b9c,_0x353b2b;}export function deepTree(_0x33aa90,_0x143d2e=_0x2d3177(0x140)){const _0x3d0424=_0x2d3177,_0x516bc5=new Map();for(const _0x2532bd of _0x33aa90){if(_0x2532bd['id']==null)continue;_0x516bc5[_0x3d0424(0x13f)](_0x2532bd['id'],{..._0x2532bd,'children':[]});}const _0x58ce9a=[];for(const _0x488bbc of _0x516bc5['values']()){const _0x316181=_0x488bbc[_0x3d0424(0x131)];_0x316181!=null&&_0x316181!==''&&_0x516bc5[_0x3d0424(0x134)](_0x316181)?_0x516bc5[_0x3d0424(0x13d)](_0x316181)[_0x3d0424(0x13b)][_0x3d0424(0x130)](_0x488bbc):_0x58ce9a[_0x3d0424(0x130)](_0x488bbc);}const _0x1238c7=_0x4e722d=>{const _0x1be4c8=_0x3d0424;_0x4e722d[_0x1be4c8(0x135)]((_0x2b6dce,_0x4b3b59)=>{const _0x1cea17=_0x1be4c8,_0x392b4e=_0x2b6dce[_0x1cea17(0x13a)]??0x0,_0x51a04f=_0x4b3b59[_0x1cea17(0x13a)]??0x0,_0x1975c2=_0x143d2e===_0x1cea17(0x136)?_0x51a04f-_0x392b4e:_0x392b4e-_0x51a04f;return _0x1975c2||Number(_0x2b6dce['id'])-Number(_0x4b3b59['id']);});for(const _0x37c840 of _0x4e722d)if(_0x37c840[_0x1be4c8(0x13b)]?.['length'])_0x1238c7(_0x37c840[_0x1be4c8(0x13b)]);};return _0x1238c7(_0x58ce9a),_0x58ce9a;}export function flattenTree(_0x2f5d55,_0x157707,_0x355c4b=0x0,_0xef9973=[]){const _0x53f032=_0x2d3177;for(const _0x313e0e of _0x2f5d55){const _0x13090e=_0x313e0e['children']||[];_0xef9973[_0x53f032(0x130)]({..._0x313e0e,'depth':_0x355c4b,'hasChildren':_0x13090e[_0x53f032(0x13e)]>0x0});if(_0x13090e[_0x53f032(0x13e)]&&_0x157707[_0x53f032(0x134)](_0x313e0e['id']))flattenTree(_0x13090e,_0x157707,_0x355c4b+0x1,_0xef9973);}return _0xef9973;}function _0x5e03(){const _0x6151ff=['C2v0','yxnJ','nNDryLnnEq','mta3nZq1odrevfnvzLu','mZe4nJqYmuPctNvMBW','ChvZAa','CgfYzw50swq','mZmXnZy3nZjMwgLcA0O','mtmYD211DhjS','AgfZ','C29YDa','zgvZyW','mty2odC0mhnKBhr6wq','nde4ntuZzejZDNbq','mta1odu2ugD2uuXI','B3jKzxjoDw0','y2HPBgrYzw4','mJG5oda0nLv4yKT0Dq','z2v0','BgvUz3rO'];_0x5e03=function(){return _0x6151ff;};return _0x5e03();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vome-core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.18",
|
|
4
4
|
"description": "Vome framework — shared + Bun/Elysia server + Vue admin",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -27,17 +27,59 @@
|
|
|
27
27
|
"import": "./dist/admin/index.js",
|
|
28
28
|
"default": "./dist/admin/index.js"
|
|
29
29
|
},
|
|
30
|
-
"./admin
|
|
30
|
+
"./admin/service": {
|
|
31
|
+
"types": "./dist/admin/service/index.d.ts",
|
|
32
|
+
"import": "./dist/admin/service/index.js",
|
|
33
|
+
"default": "./dist/admin/service/index.js"
|
|
34
|
+
},
|
|
35
|
+
"./admin/crud": {
|
|
36
|
+
"types": "./dist/admin/crud/index.d.ts",
|
|
37
|
+
"import": "./dist/admin/crud/index.js",
|
|
38
|
+
"default": "./dist/admin/crud/index.js"
|
|
39
|
+
},
|
|
40
|
+
"./admin/router": {
|
|
41
|
+
"types": "./dist/admin/router/index.d.ts",
|
|
42
|
+
"import": "./dist/admin/router/index.js",
|
|
43
|
+
"default": "./dist/admin/router/index.js"
|
|
44
|
+
},
|
|
45
|
+
"./admin/*": {
|
|
46
|
+
"types": "./dist/admin/*.d.ts",
|
|
47
|
+
"import": "./dist/admin/*.js",
|
|
48
|
+
"default": "./dist/admin/*.js"
|
|
49
|
+
},
|
|
31
50
|
"./admin/styles/base.css": "./dist/admin/styles/base.css",
|
|
51
|
+
"./client": {
|
|
52
|
+
"types": "./dist/client/index.d.ts",
|
|
53
|
+
"import": "./dist/client/index.js",
|
|
54
|
+
"default": "./dist/client/index.js"
|
|
55
|
+
},
|
|
56
|
+
"./client/vite-plugin-eps": {
|
|
57
|
+
"types": "./dist/client/vite-plugin-eps.d.ts",
|
|
58
|
+
"import": "./dist/client/vite-plugin-eps.js",
|
|
59
|
+
"default": "./dist/client/vite-plugin-eps.js"
|
|
60
|
+
},
|
|
32
61
|
"./typings/*": "./typings/admin/*"
|
|
33
62
|
},
|
|
63
|
+
"typesVersions": {
|
|
64
|
+
"*": {
|
|
65
|
+
"admin": ["./dist/admin/index.d.ts"],
|
|
66
|
+
"admin/service": ["./dist/admin/service/index.d.ts"],
|
|
67
|
+
"admin/crud": ["./dist/admin/crud/index.d.ts"],
|
|
68
|
+
"admin/router": ["./dist/admin/router/index.d.ts"],
|
|
69
|
+
"admin/*": ["./dist/admin/*.d.ts", "./dist/admin/*/index.d.ts"],
|
|
70
|
+
"client": ["./dist/client/index.d.ts"],
|
|
71
|
+
"client/vite-plugin-eps": ["./dist/client/vite-plugin-eps.d.ts"]
|
|
72
|
+
}
|
|
73
|
+
},
|
|
34
74
|
"scripts": {
|
|
35
75
|
"build:server": "bun build ./src/index.ts ./src/server/index.ts --outdir ./dist --target bun --format esm --external elysia --external reflect-metadata --external drizzle-orm --external drizzle-zod --external @elysiajs/openapi --external @bogeychan/elysia-logger --external pino --external pino-pretty && tsc -p tsconfig.build.json && printf \"%s\\n\" \"export * from './src/index'\" > dist/index.d.ts && mkdir -p dist/server && printf \"%s\\n\" \"export * from '../src/server/index'\" > dist/server/index.d.ts",
|
|
76
|
+
"build:client": "bun scripts/build-client.ts",
|
|
36
77
|
"build:admin": "bun scripts/build-admin.ts",
|
|
37
|
-
"build": "rm -rf dist && bun run build:server && bun run build:admin",
|
|
78
|
+
"build": "rm -rf dist && bun run build:server && bun run build:client && bun run build:admin",
|
|
38
79
|
"obfuscate": "bun scripts/obfuscate.ts",
|
|
39
80
|
"build:obfuscate": "bun run build && bun run obfuscate",
|
|
40
|
-
"prepublishOnly": "bun run build:obfuscate"
|
|
81
|
+
"prepublishOnly": "bun run build:obfuscate",
|
|
82
|
+
"postpublish": "rm -f vome-core-*.tgz"
|
|
41
83
|
},
|
|
42
84
|
"peerDependencies": {
|
|
43
85
|
"elysia": ">=1.0.0",
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/** 前端 EPS 类型 */
|
|
2
|
+
export type EpsApiItem = {
|
|
3
|
+
method: string;
|
|
4
|
+
path: string;
|
|
5
|
+
summary: string;
|
|
6
|
+
prefix: string;
|
|
7
|
+
ignoreToken: boolean;
|
|
8
|
+
ignorePerms: boolean;
|
|
9
|
+
perms: string[];
|
|
10
|
+
};
|
|
11
|
+
export type EpsColumn = {
|
|
12
|
+
propertyName: string;
|
|
13
|
+
type: string;
|
|
14
|
+
comment?: string;
|
|
15
|
+
nullable?: boolean;
|
|
16
|
+
dict?: string | string[];
|
|
17
|
+
};
|
|
18
|
+
export type EpsEntity = {
|
|
19
|
+
module: string;
|
|
20
|
+
side: string;
|
|
21
|
+
prefix: string;
|
|
22
|
+
/** 关联实体/表名(可选);中间列展示用 info.type.name 或 prefix 末段 */
|
|
23
|
+
name?: string;
|
|
24
|
+
info?: {
|
|
25
|
+
type: {
|
|
26
|
+
/** 控制器路径末段,对应文件名(如 dict-info) */
|
|
27
|
+
name: string;
|
|
28
|
+
description: string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
api: EpsApiItem[];
|
|
32
|
+
columns: EpsColumn[];
|
|
33
|
+
pageColumns: EpsColumn[];
|
|
34
|
+
pageQueryOp?: {
|
|
35
|
+
keyWordLikeFields?: unknown[];
|
|
36
|
+
fieldEq?: unknown[];
|
|
37
|
+
fieldLike?: unknown[];
|
|
38
|
+
fieldArray?: unknown[];
|
|
39
|
+
fieldRange?: unknown[];
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
export type EpsModuleMap = Record<string, EpsEntity[]>;
|
|
43
|
+
/** 菜单「自动添加权限」行 */
|
|
44
|
+
export type AutoPermRow = {
|
|
45
|
+
enabled: boolean;
|
|
46
|
+
name: string;
|
|
47
|
+
perm: string;
|
|
48
|
+
};
|