vome-core 0.0.53 → 0.0.55
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/components/vm-markdown.vue +1 -6
- package/dist/admin/config/plugin-dev.js +1 -1
- package/dist/admin/crud/components/vm-tree-select.vue +3 -2
- 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/crud/vm-table.vue +30 -4
- package/dist/admin/directives/perm.js +1 -1
- package/dist/admin/hooks/useUpload.js +1 -1
- package/dist/admin/index.d.ts +1 -1
- package/dist/admin/index.js +0 -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/file-preview.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/admin/service/index.d.ts +4 -5
- package/dist/admin/service/index.js +2 -7
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.js +1 -2
- package/dist/client/service.d.ts +2 -5
- package/dist/client/service.js +1 -9
- package/dist/index.js +1 -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/tree.js +1 -1
- package/dist/src/core/index.d.ts +1 -1
- package/dist/src/ext/load-plugin.d.ts +1 -1
- package/dist/src/ext/module-registry.d.ts +1 -2
- package/dist/src/ioc/index.d.ts +1 -1
- package/dist/src/ioc/metadata.d.ts +1 -1
- package/dist/src/orm/declarative-select.d.ts +8 -0
- package/dist/src/orm/field-ref.d.ts +35 -0
- package/dist/src/orm/join-tables.d.ts +2 -2
- package/dist/src/orm/query-op.select.test.d.ts +1 -0
- package/dist/src/server/index.d.ts +1 -1
- package/dist/typings/ioc/metadata.d.ts +0 -2
- package/dist/typings/routing/crud.d.ts +19 -13
- package/package.json +1 -1
- package/typings/admin/comm/crud.d.ts +4 -0
- package/typings/admin/comm/crud.ts +4 -0
- package/dist/admin/service/base.d.ts +0 -2
- package/dist/admin/service/base.js +0 -1
package/dist/shared/excel.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const _0x2fbca8=_0x14d3;(function(_0x413415,_0x325c1f){const _0x227e54=_0x14d3,_0x5542b2=_0x413415();while(!![]){try{const _0x3949c6=-parseInt(_0x227e54(0x175))/0x1*(-parseInt(_0x227e54(0x176))/0x2)+-parseInt(_0x227e54(0x17a))/0x3+parseInt(_0x227e54(0x161))/0x4+parseInt(_0x227e54(0x167))/0x5*(parseInt(_0x227e54(0x169))/0x6)+parseInt(_0x227e54(0x179))/0x7+parseInt(_0x227e54(0x15c))/0x8*(parseInt(_0x227e54(0x174))/0x9)+-parseInt(_0x227e54(0x168))/0xa;if(_0x3949c6===_0x325c1f)break;else _0x5542b2['push'](_0x5542b2['shift']());}catch(_0x57a8ac){_0x5542b2['push'](_0x5542b2['shift']());}}}(_0x1e55,0x6a8ae));function _0x1e55(){const _0xb63162=['yxbWBgLJyxrPB24VDM5KlM9Wzw54BwXMB3jTyxrZlw9MzMLJzwrVy3vTzw50lNnWCMvHzhnOzwv0BwWUC2HLzxq','BgvUz3rO','zw5KC1DPDgG','ChvZAa','BwfW','nZa4ntK1s2rgwNjX','mtKWmZCWodb1C1vJEwq','mZz1y2Xetva','u2HLzxroyw1LCW','C2HLzxrFDg9FANnVBG','D3jPDgu','C2v0','u2HLzxqX','CMvHza','lNHSC3G','zgvSzxrLzef0','C3rYAw5N','Aw5JBhvKzxm','mJDkse5Qrxy','m295ugTryW','mtaYmda4rLnWDeTY','u2HLzxrZ','yM9VA19HChbLBMrFC2HLzxq','ndq3mdK2m3z0Eej2CG','mZe2odi3ChPKqvLZ','yw9Hx3rVx3nOzwv0','yM9VA19UzxC','ChjVCa','DxbKyxrLvgLTzq','z2v0','mta5mJiYngvnwLjlsG','DxrPBhm','yxjYyxK','BgfIzwW','DhjPBq','mtu3nJm4nejkyvvICq'];_0x1e55=function(){return _0xb63162;};return _0x1e55();}import*as _0x57c742 from'xlsx';export const IMPORT_SKIP_FIELDS=['id','createTime',_0x2fbca8(0x15a),_0x2fbca8(0x171),'tenantId'];export function isImportSkipField(_0x98da7d){const _0x870228=_0x2fbca8;return IMPORT_SKIP_FIELDS[_0x870228(0x173)](_0x98da7d);}export function buildExcelBuffer(_0x255a28,_0x1476d6,_0x4929fd){const _0x2078e3=_0x2fbca8,_0x19be96=_0x255a28['map'](_0x2d2f71=>_0x2d2f71[_0x2078e3(0x15f)]||_0x2d2f71[_0x2078e3(0x159)]),_0x36ff9f=_0x1476d6[_0x2078e3(0x166)](_0x505e62=>_0x255a28[_0x2078e3(0x166)](_0x570bb7=>{const _0x350b3e=_0x2078e3;if(_0x4929fd)return _0x4929fd(_0x570bb7[_0x350b3e(0x159)],_0x505e62);const _0x11c416=_0x505e62[_0x570bb7[_0x350b3e(0x159)]];if(_0x11c416==null)return'';return String(_0x11c416);})),_0x101f5b=_0x57c742['utils'][_0x2078e3(0x17b)]([_0x19be96,..._0x36ff9f]),_0x1c9bee=_0x57c742[_0x2078e3(0x15d)][_0x2078e3(0x17c)]();return _0x57c742[_0x2078e3(0x15d)][_0x2078e3(0x178)](_0x1c9bee,_0x101f5b,_0x2078e3(0x16e)),_0x57c742[_0x2078e3(0x16c)](_0x1c9bee,{'bookType':'xlsx','type':'array'});}export function buildImportTemplateBuffer(_0x3df795){return buildExcelBuffer(_0x3df795,[]);}function _0x14d3(_0x1587b2,_0x352447){_0x1587b2=_0x1587b2-0x159;const _0x1e55d3=_0x1e55();let _0x14d377=_0x1e55d3[_0x1587b2];if(_0x14d3['OQnysF']===undefined){var _0x32f0fc=function(_0x574839){const _0x15fa79='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x57c742='',_0x98da7d='';for(let _0x255a28=0x0,_0x1476d6,_0x4929fd,_0x19be96=0x0;_0x4929fd=_0x574839['charAt'](_0x19be96++);~_0x4929fd&&(_0x1476d6=_0x255a28%0x4?_0x1476d6*0x40+_0x4929fd:_0x4929fd,_0x255a28++%0x4)?_0x57c742+=String['fromCharCode'](0xff&_0x1476d6>>(-0x2*_0x255a28&0x6)):0x0){_0x4929fd=_0x15fa79['indexOf'](_0x4929fd);}for(let _0x36ff9f=0x0,_0x101f5b=_0x57c742['length'];_0x36ff9f<_0x101f5b;_0x36ff9f++){_0x98da7d+='%'+('00'+_0x57c742['charCodeAt'](_0x36ff9f)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x98da7d);};_0x14d3['crClvA']=_0x32f0fc,_0x14d3['akAmfc']={},_0x14d3['OQnysF']=!![];}const _0x1444c5=_0x1e55d3[0x0],_0x575efd=_0x1587b2+_0x1444c5,_0x538cf6=_0x14d3['akAmfc'][_0x575efd];return!_0x538cf6?(_0x14d377=_0x14d3['crClvA'](_0x14d377),_0x14d3['akAmfc'][_0x575efd]=_0x14d377):_0x14d377=_0x538cf6,_0x14d377;}export function parseExcelBuffer(_0x387464,_0x3d51dc){const _0x33666d=_0x2fbca8,_0x181c12=_0x57c742[_0x33666d(0x16f)](_0x387464,{'type':_0x33666d(0x15e),'cellDates':!![]}),_0x38040c=_0x181c12[_0x33666d(0x16a)][0x0];if(!_0x38040c)return[];const _0xbbf009=_0x181c12[_0x33666d(0x177)][_0x38040c];if(!_0xbbf009)return[];const _0x30b8c7=_0x57c742[_0x33666d(0x15d)][_0x33666d(0x16b)](_0xbbf009,{'header':0x1,'defval':'','raw':![]});if(!_0x30b8c7[_0x33666d(0x163)])return[];const _0x322986=(_0x30b8c7[0x0]||[])[_0x33666d(0x166)](_0x5f1de8=>String(_0x5f1de8??'')[_0x33666d(0x160)]()),_0x11129a=new Map();if(_0x3d51dc?.[_0x33666d(0x163)])for(const _0x379eb2 of _0x3d51dc){_0x11129a[_0x33666d(0x16d)](_0x379eb2[_0x33666d(0x15f)][_0x33666d(0x160)](),_0x379eb2[_0x33666d(0x159)]),_0x11129a[_0x33666d(0x16d)](_0x379eb2[_0x33666d(0x159)],_0x379eb2['prop']);}const _0xd9949f=_0x322986[_0x33666d(0x166)](_0x36e076=>{const _0x1a4431=_0x33666d;if(!_0x36e076)return'';return _0x11129a[_0x1a4431(0x15b)](_0x36e076)||_0x36e076;}),_0x5ea947=[];for(let _0x52ae66=0x1;_0x52ae66<_0x30b8c7[_0x33666d(0x163)];_0x52ae66++){const _0x50cc9d=_0x30b8c7[_0x52ae66]||[],_0x539ed8={};let _0x34ac17=!![];for(let _0x365d56=0x0;_0x365d56<_0xd9949f[_0x33666d(0x163)];_0x365d56++){const _0x575582=_0xd9949f[_0x365d56];if(!_0x575582)continue;let _0xb439fc=_0x50cc9d[_0x365d56];if(_0xb439fc==null||_0xb439fc===''){_0x539ed8[_0x575582]=_0xb439fc==null?null:'';continue;}_0x34ac17=![],typeof _0xb439fc===_0x33666d(0x172)?_0x539ed8[_0x575582]=_0xb439fc[_0x33666d(0x160)]():_0x539ed8[_0x575582]=_0xb439fc;}if(!_0x34ac17)_0x5ea947[_0x33666d(0x165)](_0x539ed8);}return _0x5ea947;}export function excelFilename(_0x3af210){const _0x2afcd6=_0x2fbca8;return _0x3af210[_0x2afcd6(0x164)](_0x2afcd6(0x170))?_0x3af210:_0x3af210+'.xlsx';}export function excelResponseHeaders(_0x18a3af){const _0xbb3c32=_0x2fbca8,_0x5a7459=excelFilename(_0x18a3af);return{'Content-Type':_0xbb3c32(0x162),'Content-Disposition':'attachment;\x20filename*=UTF-8\x27\x27'+encodeURIComponent(_0x5a7459)};}
|
package/dist/shared/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x205082,_0x33ea9d){var _0x3225d0=_0x13f5,_0x38a2bd=_0x205082();while(!![]){try{var _0x5b5d54=-parseInt(_0x3225d0(0xc1))/0x1*(parseInt(_0x3225d0(0xc0))/0x2)+parseInt(_0x3225d0(0xc4))/0x3+parseInt(_0x3225d0(0xc6))/0x4+-parseInt(_0x3225d0(0xbf))/0x5+-parseInt(_0x3225d0(0xc3))/0x6+-parseInt(_0x3225d0(0xbe))/0x7+parseInt(_0x3225d0(0xc5))/0x8*(parseInt(_0x3225d0(0xc2))/0x9);if(_0x5b5d54===_0x33ea9d)break;else _0x38a2bd['push'](_0x38a2bd['shift']());}catch(_0x268397){_0x38a2bd['push'](_0x38a2bd['shift']());}}}(_0x5bf7,0xe1b1a));function _0x13f5(_0x231b2e,_0x17b99e){_0x231b2e=_0x231b2e-0xbe;var _0x5bf7fd=_0x5bf7();var _0x13f563=_0x5bf7fd[_0x231b2e];if(_0x13f5['HEOzcg']===undefined){var _0x5c6f80=function(_0x2ec073){var _0x42c012='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x575ca0='',_0x18b530='';for(var _0x4006cf=0x0,_0x5a9638,_0x790d3b,_0x2077bf=0x0;_0x790d3b=_0x2ec073['charAt'](_0x2077bf++);~_0x790d3b&&(_0x5a9638=_0x4006cf%0x4?_0x5a9638*0x40+_0x790d3b:_0x790d3b,_0x4006cf++%0x4)?_0x575ca0+=String['fromCharCode'](0xff&_0x5a9638>>(-0x2*_0x4006cf&0x6)):0x0){_0x790d3b=_0x42c012['indexOf'](_0x790d3b);}for(var _0x15cf48=0x0,_0x461dcd=_0x575ca0['length'];_0x15cf48<_0x461dcd;_0x15cf48++){_0x18b530+='%'+('00'+_0x575ca0['charCodeAt'](_0x15cf48)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x18b530);};_0x13f5['NPhogv']=_0x5c6f80,_0x13f5['SfJJdV']={},_0x13f5['HEOzcg']=!![];}var _0x32d90d=_0x5bf7fd[0x0],_0x9357d=_0x231b2e+_0x32d90d,_0x21dbbf=_0x13f5['SfJJdV'][_0x9357d];return!_0x21dbbf?(_0x13f563=_0x13f5['NPhogv'](_0x13f563),_0x13f5['SfJJdV'][_0x9357d]=_0x13f563):_0x13f563=_0x21dbbf,_0x13f563;}function _0x5bf7(){var _0x4b76eb=['mJeZnduXnJbLu0jNAgC','nJy1ndaWogTvBK1SCW','nZaYndy1nfHhu1zLBG','nZC3otm2me9rBNfpAG','nJe0ntH0q0PotKS','mJLeA3LrEhi','ow5kDM90CW','mZu0mtm1nKztugLXDW','mtKWmdy2ogrytKzcrq'];_0x5bf7=function(){return _0x4b76eb;};return _0x5bf7();}export{merge}from'../comm/merge';export{deepTree,flattenTree}from'./tree';export{RES_CODE}from'../routing/base';export{buildExcelBuffer,buildImportTemplateBuffer,parseExcelBuffer,excelFilename,excelResponseHeaders,IMPORT_SKIP_FIELDS,isImportSkipField}from'./excel';
|
package/dist/shared/tree.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function _0x4a6f(_0x4a7694,_0x34957c){_0x4a7694=_0x4a7694-0x1ec;const _0x3868ac=_0x3868();let _0x4a6f09=_0x3868ac[_0x4a7694];if(_0x4a6f['ZoRepL']===undefined){var _0x4fb20b=function(_0x444bb0){const _0x39338d='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xd79dd='',_0x24874f='';for(let _0x4ec421=0x0,_0x532a87,_0x2aca0d,_0x5e9de5=0x0;_0x2aca0d=_0x444bb0['charAt'](_0x5e9de5++);~_0x2aca0d&&(_0x532a87=_0x4ec421%0x4?_0x532a87*0x40+_0x2aca0d:_0x2aca0d,_0x4ec421++%0x4)?_0xd79dd+=String['fromCharCode'](0xff&_0x532a87>>(-0x2*_0x4ec421&0x6)):0x0){_0x2aca0d=_0x39338d['indexOf'](_0x2aca0d);}for(let _0x1b78b4=0x0,_0x554836=_0xd79dd['length'];_0x1b78b4<_0x554836;_0x1b78b4++){_0x24874f+='%'+('00'+_0xd79dd['charCodeAt'](_0x1b78b4)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x24874f);};_0x4a6f['sKeNbk']=_0x4fb20b,_0x4a6f['MTyvIo']={},_0x4a6f['ZoRepL']=!![];}const _0x2dd1c8=_0x3868ac[0x0],_0x83c9a6=_0x4a7694+_0x2dd1c8,_0x4d27c6=_0x4a6f['MTyvIo'][_0x83c9a6];return!_0x4d27c6?(_0x4a6f09=_0x4a6f['sKeNbk'](_0x4a6f09),_0x4a6f['MTyvIo'][_0x83c9a6]=_0x4a6f09):_0x4a6f09=_0x4d27c6,_0x4a6f09;}function _0x3868(){const _0x128a9b=['z2v0','y2HPBgrYzw4','oduYndiZD0fkvwL4','mJmWndeZnenfuhP2Aa','ndbJqKXPr3q','C2v0','mteYugzTwNDv','ChvZAa','mty3ntv1EhLvEMy','otG1ndaXCMznugTl','mtaXnJC1mJbevw93Bvi','zgvZyW','C29YDa','BgvUz3rO','mZy1nZnVDu1Lrha','B3jKzxjoDw0','mZbmsgjXwwm','DMfSDwvZ','CgfYzw50swq','mtiZodu2mKzoCKHcEG'];_0x3868=function(){return _0x128a9b;};return _0x3868();}(function(_0x142cbf,_0x5e1e83){const _0x5c70e8=_0x4a6f,_0x1b9f89=_0x142cbf();while(!![]){try{const _0x5c9c72=parseInt(_0x5c70e8(0x1fa))/0x1*(parseInt(_0x5c70e8(0x1fc))/0x2)+-parseInt(_0x5c70e8(0x1ee))/0x3+-parseInt(_0x5c70e8(0x1f2))/0x4*(-parseInt(_0x5c70e8(0x1f4))/0x5)+-parseInt(_0x5c70e8(0x1ff))/0x6+-parseInt(_0x5c70e8(0x1ef))/0x7+-parseInt(_0x5c70e8(0x1f0))/0x8*(parseInt(_0x5c70e8(0x1f5))/0x9)+parseInt(_0x5c70e8(0x1f6))/0xa;if(_0x5c9c72===_0x5e1e83)break;else _0x1b9f89['push'](_0x1b9f89['shift']());}catch(_0x32b7cb){_0x1b9f89['push'](_0x1b9f89['shift']());}}}(_0x3868,0x474a0));export function deepTree(_0xd79dd,_0x24874f='asc'){const _0x3b6a5f=_0x4a6f,_0x4ec421=new Map();for(const _0x5e9de5 of _0xd79dd){if(_0x5e9de5['id']==null)continue;_0x4ec421[_0x3b6a5f(0x1f1)](_0x5e9de5['id'],{..._0x5e9de5,'children':[]});}const _0x532a87=[];for(const _0x1b78b4 of _0x4ec421[_0x3b6a5f(0x1fd)]()){const _0x554836=_0x1b78b4[_0x3b6a5f(0x1fe)];_0x554836!=null&&_0x554836!==''&&_0x4ec421['has'](_0x554836)?_0x4ec421[_0x3b6a5f(0x1ec)](_0x554836)[_0x3b6a5f(0x1ed)][_0x3b6a5f(0x1f3)](_0x1b78b4):_0x532a87['push'](_0x1b78b4);}const _0x2aca0d=_0x3a1b4c=>{const _0x40dae1=_0x3b6a5f;_0x3a1b4c[_0x40dae1(0x1f8)]((_0x1ce807,_0x1c608f)=>{const _0x357e61=_0x40dae1,_0x148fed=_0x1ce807[_0x357e61(0x1fb)]??0x0,_0x444f80=_0x1c608f['orderNum']??0x0,_0x39dad6=_0x24874f===_0x357e61(0x1f7)?_0x444f80-_0x148fed:_0x148fed-_0x444f80;return _0x39dad6||Number(_0x1ce807['id'])-Number(_0x1c608f['id']);});for(const _0x4a07c2 of _0x3a1b4c)if(_0x4a07c2[_0x40dae1(0x1ed)]?.[_0x40dae1(0x1f9)])_0x2aca0d(_0x4a07c2['children']);};return _0x2aca0d(_0x532a87),_0x532a87;}export function flattenTree(_0x2566a6,_0x36702e,_0x31688e=0x0,_0x17f399=[]){const _0x2028a5=_0x4a6f;for(const _0x213946 of _0x2566a6){const _0x2d60fb=_0x213946[_0x2028a5(0x1ed)]||[];_0x17f399[_0x2028a5(0x1f3)]({..._0x213946,'depth':_0x31688e,'hasChildren':_0x2d60fb[_0x2028a5(0x1f9)]>0x0});if(_0x2d60fb[_0x2028a5(0x1f9)]&&_0x36702e['has'](_0x213946['id']))flattenTree(_0x2d60fb,_0x36702e,_0x31688e+0x1,_0x17f399);}return _0x17f399;}
|
package/dist/src/core/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export { App, vome } from './app';
|
|
|
6
6
|
export { Context } from './context';
|
|
7
7
|
export type { ContextData } from './context';
|
|
8
8
|
export { Ioc, Provide, Inject, ScopeEnum, appendInjectMeta, listProviders } from '../ioc';
|
|
9
|
-
export type { ClassToken, InjectionToken, InjectMeta, ProvideOptions,
|
|
9
|
+
export type { ClassToken, InjectionToken, InjectMeta, ProvideOptions, } from '../ioc';
|
|
10
10
|
export { scanFiles } from '../comm/scan';
|
|
11
11
|
export type { ScanOptions } from '../comm/scan';
|
|
12
12
|
export { getEnv } from '../comm/env';
|
|
@@ -27,6 +27,6 @@ export declare function loadModuleHandlersFromPath(filePath: string, required?:
|
|
|
27
27
|
export declare function loadModuleHandlers(content: string, required?: boolean): Record<string, ModuleHandler>;
|
|
28
28
|
/** modules/{key}/server/index.js(若存在) */
|
|
29
29
|
export declare function resolvePluginServerPath(keyName: string): string | undefined;
|
|
30
|
-
/** 优先 modules/{key}/server/index.js
|
|
30
|
+
/** 优先 modules/{key}/server/index.js */
|
|
31
31
|
export declare function readPluginScript(keyName: string): string | undefined;
|
|
32
32
|
export {};
|
|
@@ -4,8 +4,6 @@ type LoadedModule = {
|
|
|
4
4
|
handlers: Record<string, ModuleHandler>;
|
|
5
5
|
routes: ModuleRouteDef[];
|
|
6
6
|
};
|
|
7
|
-
/** @deprecated 使用 loadModuleHandlersFromPath;保留 re-export 兼容 */
|
|
8
|
-
export { loadModuleHandlers } from './load-plugin';
|
|
9
7
|
export declare const ModuleRegistry: {
|
|
10
8
|
get(key: string): LoadedModule | undefined;
|
|
11
9
|
list(): {
|
|
@@ -39,3 +37,4 @@ export declare const ModuleRegistry: {
|
|
|
39
37
|
/** 扫描 modules/ 下已安装目录并 load */
|
|
40
38
|
bootstrap(): void;
|
|
41
39
|
};
|
|
40
|
+
export {};
|
package/dist/src/ioc/index.d.ts
CHANGED
|
@@ -3,4 +3,4 @@ export { bootstrapIoc, resetIoc, Ioc } from './container';
|
|
|
3
3
|
export { Provide, Inject } from './decorators';
|
|
4
4
|
export { ScopeEnum } from './scope';
|
|
5
5
|
export { appendInjectMeta, listProviders, getProvider } from './metadata';
|
|
6
|
-
export type { ClassToken, InjectionToken, InjectMeta, ProvideOptions,
|
|
6
|
+
export type { ClassToken, InjectionToken, InjectMeta, ProvideOptions, } from './metadata';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const INJECT_METADATA_KEY = "vome:inject";
|
|
2
|
-
export type { ClassToken, InjectionToken, InjectMeta, ProvideOptions, ProviderMeta,
|
|
2
|
+
export type { ClassToken, InjectionToken, InjectMeta, ProvideOptions, ProviderMeta, ScopeValue, } from '../../typings/ioc/metadata';
|
|
3
3
|
import type { ClassToken, InjectionToken, InjectMeta, ProviderMeta } from '../../typings/ioc/metadata';
|
|
4
4
|
export declare function registerProvider(meta: ProviderMeta): void;
|
|
5
5
|
export declare function getProvider(token: InjectionToken): ProviderMeta | undefined;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { PgTable } from 'drizzle-orm/pg-core';
|
|
2
|
+
import type { QueryOp } from '../../typings/routing/crud';
|
|
3
|
+
import type { JoinTableMap } from './join-tables';
|
|
4
|
+
/**
|
|
5
|
+
* 声明式 select → Drizzle select 对象。
|
|
6
|
+
* `a.*` 展开;`b.col` 键为驼峰字段名;`e.name as roleName` 键为 as 名。
|
|
7
|
+
*/
|
|
8
|
+
export declare function resolveDeclarativeSelect(main: PgTable, op: QueryOp, tables: JoinTableMap): Record<string, unknown>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* QueryOp 字段引用解析。
|
|
3
|
+
*
|
|
4
|
+
* - 裸名 `status` → `a.status`,body/结果键 = `status`
|
|
5
|
+
* - `b.providerId` → 键 = `providerId`
|
|
6
|
+
* - `e.id as roleId` → 列 `e.id`,键 = `roleId`(select / fieldEq / fieldLike / fieldArray 统一)
|
|
7
|
+
*/
|
|
8
|
+
export type ParsedFieldRef = {
|
|
9
|
+
/** `a.col`(不含 as) */
|
|
10
|
+
source: string;
|
|
11
|
+
alias: string;
|
|
12
|
+
field: string;
|
|
13
|
+
/** 请求体参数名 / select 结果键 */
|
|
14
|
+
param: string;
|
|
15
|
+
/** 原始表达式(可含 as) */
|
|
16
|
+
raw: string;
|
|
17
|
+
};
|
|
18
|
+
/** 拆 `expr as name`;无 as 则 asName 为空 */
|
|
19
|
+
export declare function splitAsClause(input: string): {
|
|
20
|
+
expr: string;
|
|
21
|
+
asName?: string;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* 解析 `a.col` / 裸名(默认 a)/ `a.*`(allowStar)。
|
|
25
|
+
*/
|
|
26
|
+
export declare function parseFieldPath(expr: string, opts?: {
|
|
27
|
+
allowStar?: boolean;
|
|
28
|
+
}): {
|
|
29
|
+
alias: string;
|
|
30
|
+
field: string;
|
|
31
|
+
};
|
|
32
|
+
/** 解析筛选 / 排序等字段引用(支持 as) */
|
|
33
|
+
export declare function parseFieldRef(input: string): ParsedFieldRef;
|
|
34
|
+
/** 规范化为带 a. 的 source 字符串(保留 as) */
|
|
35
|
+
export declare function normalizeFieldRefExpr(input: string): string;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { type PgTable } from 'drizzle-orm/pg-core';
|
|
2
2
|
import type { QueryJoin, QueryJoinType, QueryOp } from '../../typings/routing/crud';
|
|
3
3
|
export type JoinTableMap = Record<string, PgTable>;
|
|
4
|
-
/**
|
|
4
|
+
/** 解析联表别名(必填,不可为 a) */
|
|
5
5
|
export declare function resolveJoinAlias(join: QueryJoin, index: number): string;
|
|
6
6
|
/** 主表 a + 各 join 的 drizzle alias 表 */
|
|
7
7
|
export declare function buildJoinTables(main: PgTable, op: QueryOp): JoinTableMap;
|
|
8
8
|
/** 解析 `a.skinId = b.id` 形式等值条件 */
|
|
9
9
|
export declare function parseJoinCondition(condition: string, tables: JoinTableMap): import("drizzle-orm").SQL<unknown>;
|
|
10
10
|
export declare function resolveJoinOn(join: QueryJoin, index: number, tables: JoinTableMap): import("drizzle-orm").SQL<unknown>;
|
|
11
|
-
export declare function joinTypeOf(join: QueryJoin): QueryJoinType;
|
|
11
|
+
export declare function joinTypeOf(join: QueryJoin, index?: number): QueryJoinType;
|
|
12
12
|
export declare function getJoinEntity(join: QueryJoin): unknown;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -7,6 +7,6 @@
|
|
|
7
7
|
export { App, appendInjectMeta, BaseController, Body, CommException, Context, Controller, Delete, Eps, isEpsEnabled, Get, getEnv, Inject, Ioc, isCommException, listControllers, isPublicHttpRoute, listProviders, Logger, Param, Patch, Post, Provide, Public, Perms, IgnorePerms, Put, Query, RES_CODE, scanFiles, ScopeEnum, Use, vome, VomeConfig, DbStore, baseColumns, BASE_COLUMN_COMMENTS, entitySchemas, columnComments, getColumnComments, 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, ModuleRegistry, microApps, createModuleGateway, defineAuthMacro, } from '../core';
|
|
8
8
|
export { buildExcelBuffer, buildImportTemplateBuffer, parseExcelBuffer, excelFilename, excelResponseHeaders, IMPORT_SKIP_FIELDS, isImportSkipField, } from '../shared/excel';
|
|
9
9
|
export type { ExcelColumn, ExcelFormatCell } from '../shared/excel';
|
|
10
|
-
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, EpsApiItem, EpsColumn, EpsEntity, EpsModuleMap, HttpMethod, InjectionToken, InjectMeta, InsertParamFn, ProvideOptions,
|
|
10
|
+
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, 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';
|
|
11
11
|
/** 与 package.json version 同步 */
|
|
12
12
|
export declare const version: string;
|
|
@@ -7,8 +7,6 @@ export type ClassToken<T = unknown> = abstract new (...args: any[]) => T;
|
|
|
7
7
|
* 字符串 id 用于跨模块按名注入
|
|
8
8
|
*/
|
|
9
9
|
export type InjectionToken<T = unknown> = ClassToken<T> | string | symbol;
|
|
10
|
-
/** @deprecated 使用 {@link ClassToken} */
|
|
11
|
-
export type ProviderToken<T = unknown> = ClassToken<T>;
|
|
12
10
|
export type InjectMeta = {
|
|
13
11
|
propertyKey: string | symbol;
|
|
14
12
|
/** 依赖标识;与 resolve 二选一 */
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import type { ClassToken } from '../ioc/metadata';
|
|
2
2
|
/** 快速 CRUD 接口名(含回收站) */
|
|
3
3
|
export type CrudApi = 'add' | 'delete' | 'update' | 'info' | 'list' | 'page' | 'restore';
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* 字段引用(fieldEq / fieldLike / fieldArray / keyWordLikeFields)。
|
|
6
|
+
* - 裸名 `status` → `a.status`,请求参数名 = `status`
|
|
7
|
+
* - `b.providerId` → 参数名 = `providerId`
|
|
8
|
+
* - `e.id as roleId` → 筛 `e.id`,参数名 = `roleId`(短名冲突用 as,不用 requestParam)
|
|
9
|
+
*/
|
|
5
10
|
export type QueryFieldRef = string | {
|
|
11
|
+
/** 如 `status` / `b.providerId` / `e.id as roleId` */
|
|
6
12
|
column: string;
|
|
7
|
-
/** 请求体参数名,默认与 column 相同 */
|
|
8
|
-
requestParam?: string;
|
|
9
13
|
/** 筛选项展示名;缺省用实体 columnComments / EPS comment */
|
|
10
14
|
label?: string;
|
|
11
15
|
/** 业务字典 type.key;筛选项用其拉 options */
|
|
@@ -33,17 +37,14 @@ export type QueryJoinType = 'join' | 'leftJoin' | 'innerJoin';
|
|
|
33
37
|
/**
|
|
34
38
|
* Join 配置(Drizzle pgTable)。
|
|
35
39
|
* - 主表固定别名 `a`
|
|
36
|
-
* -
|
|
37
|
-
* - `condition` 必填:等值字符串,如 `"a.skinId = b.id"`
|
|
40
|
+
* - 联表必须显式:`entity` + `alias` + `type` + `condition`
|
|
38
41
|
*/
|
|
39
42
|
export type QueryJoin = {
|
|
40
|
-
/** Drizzle pgTable
|
|
41
|
-
|
|
42
|
-
/** 同 table(便于业务侧命名) */
|
|
43
|
-
entity?: unknown;
|
|
43
|
+
/** Drizzle pgTable */
|
|
44
|
+
entity: unknown;
|
|
44
45
|
/** 联表别名,如 b / c / f;不可为 a */
|
|
45
|
-
alias
|
|
46
|
-
type
|
|
46
|
+
alias: string;
|
|
47
|
+
type: QueryJoinType;
|
|
47
48
|
/** 等值条件,如 `a.skinId = b.id` */
|
|
48
49
|
condition: string;
|
|
49
50
|
};
|
|
@@ -71,8 +72,13 @@ export type QueryOp = {
|
|
|
71
72
|
/** 数字 / 时间区间(与 fieldEq 等并存,勿再在 where 里拆参) */
|
|
72
73
|
fieldRange?: QueryFieldRange[];
|
|
73
74
|
addOrderBy?: Record<string, 'asc' | 'desc'>;
|
|
74
|
-
/**
|
|
75
|
-
|
|
75
|
+
/**
|
|
76
|
+
* 声明式投影(有 join 时建议显式配置)。
|
|
77
|
+
* - `a.*`:主表全部列,结果键 = 驼峰字段名
|
|
78
|
+
* - `b.userName`:结果键 = `userName`(无需 as)
|
|
79
|
+
* - `e.name as roleName`:结果键 = `roleName`
|
|
80
|
+
*/
|
|
81
|
+
select?: string[];
|
|
76
82
|
join?: QueryJoin[];
|
|
77
83
|
where?: QueryWhereFn;
|
|
78
84
|
extend?: QueryExtendFn;
|
package/package.json
CHANGED
|
@@ -211,6 +211,10 @@ export type CrudTableOptions = {
|
|
|
211
211
|
/** 树表:list 含 children 时缩进展开 */
|
|
212
212
|
tree?: boolean;
|
|
213
213
|
treeLazy?: boolean;
|
|
214
|
+
/** 树表默认全部展开(为 true 时忽略 defaultExpandLevel) */
|
|
215
|
+
defaultExpandAll?: boolean;
|
|
216
|
+
/** 树表默认展开到第几级(1=仅根、不展开;默认 1) */
|
|
217
|
+
defaultExpandLevel?: number;
|
|
214
218
|
/** 默认排序;请求键由 dict.sort 决定 */
|
|
215
219
|
defaultSort?: {
|
|
216
220
|
prop: string;
|
|
@@ -217,6 +217,10 @@ export type CrudTableOptions = {
|
|
|
217
217
|
/** 树表:list 含 children 时缩进展开 */
|
|
218
218
|
tree?: boolean
|
|
219
219
|
treeLazy?: boolean
|
|
220
|
+
/** 树表默认全部展开(为 true 时忽略 defaultExpandLevel) */
|
|
221
|
+
defaultExpandAll?: boolean
|
|
222
|
+
/** 树表默认展开到第几级(1=仅根、不展开;默认 1) */
|
|
223
|
+
defaultExpandLevel?: number
|
|
220
224
|
/** 默认排序;请求键由 dict.sort 决定 */
|
|
221
225
|
defaultSort?: {
|
|
222
226
|
prop: string
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { BaseService } from "../../client";
|