vome-core 0.0.52 → 0.0.54
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/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/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 +3 -3
- 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 +20 -20
- package/package.json +1 -1
- 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
|
-
const
|
|
1
|
+
const _0x1997dd=_0x9f5d;(function(_0x1bb541,_0x486187){const _0x5ea5a4=_0x9f5d,_0x90c566=_0x1bb541();while(!![]){try{const _0x382d=parseInt(_0x5ea5a4(0xa2))/0x1*(-parseInt(_0x5ea5a4(0x9e))/0x2)+-parseInt(_0x5ea5a4(0x91))/0x3*(-parseInt(_0x5ea5a4(0x97))/0x4)+parseInt(_0x5ea5a4(0x92))/0x5+-parseInt(_0x5ea5a4(0xae))/0x6+-parseInt(_0x5ea5a4(0x90))/0x7+-parseInt(_0x5ea5a4(0xaa))/0x8+parseInt(_0x5ea5a4(0x9d))/0x9;if(_0x382d===_0x486187)break;else _0x90c566['push'](_0x90c566['shift']());}catch(_0x53d60e){_0x90c566['push'](_0x90c566['shift']());}}}(_0x2a31,0xe2c3b));function _0x9f5d(_0xf9b217,_0xdb13f2){_0xf9b217=_0xf9b217-0x8f;const _0x2a3196=_0x2a31();let _0x9f5dc4=_0x2a3196[_0xf9b217];if(_0x9f5d['LWpqwu']===undefined){var _0x5b8836=function(_0x3897b6){const _0x40ac7a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4818b9='',_0x662f60='';for(let _0x216109=0x0,_0x3e22e3,_0x162ef5,_0x3b93da=0x0;_0x162ef5=_0x3897b6['charAt'](_0x3b93da++);~_0x162ef5&&(_0x3e22e3=_0x216109%0x4?_0x3e22e3*0x40+_0x162ef5:_0x162ef5,_0x216109++%0x4)?_0x4818b9+=String['fromCharCode'](0xff&_0x3e22e3>>(-0x2*_0x216109&0x6)):0x0){_0x162ef5=_0x40ac7a['indexOf'](_0x162ef5);}for(let _0x123797=0x0,_0x44189a=_0x4818b9['length'];_0x123797<_0x44189a;_0x123797++){_0x662f60+='%'+('00'+_0x4818b9['charCodeAt'](_0x123797)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x662f60);};_0x9f5d['QyRqzW']=_0x5b8836,_0x9f5d['uziWWi']={},_0x9f5d['LWpqwu']=!![];}const _0x156ce8=_0x2a3196[0x0],_0x39516f=_0xf9b217+_0x156ce8,_0xe0fbe2=_0x9f5d['uziWWi'][_0x39516f];return!_0xe0fbe2?(_0x9f5dc4=_0x9f5d['QyRqzW'](_0x9f5dc4),_0x9f5d['uziWWi'][_0x39516f]=_0x9f5dc4):_0x9f5dc4=_0xe0fbe2,_0x9f5dc4;}import*as _0x4818b9 from'xlsx';export const IMPORT_SKIP_FIELDS=['id','createTime',_0x1997dd(0xa8),_0x1997dd(0x94),'tenantId'];export function isImportSkipField(_0x662f60){const _0x3f3f28=_0x1997dd;return IMPORT_SKIP_FIELDS[_0x3f3f28(0xa6)](_0x662f60);}export function buildExcelBuffer(_0x216109,_0x3e22e3,_0x162ef5){const _0x13027b=_0x1997dd,_0x3b93da=_0x216109[_0x13027b(0x9c)](_0x23d0eb=>_0x23d0eb['label']||_0x23d0eb[_0x13027b(0xa0)]),_0x123797=_0x3e22e3[_0x13027b(0x9c)](_0x558b17=>_0x216109[_0x13027b(0x9c)](_0xf956f2=>{const _0x2d8fa2=_0x13027b;if(_0x162ef5)return _0x162ef5(_0xf956f2[_0x2d8fa2(0xa0)],_0x558b17);const _0x325297=_0x558b17[_0xf956f2[_0x2d8fa2(0xa0)]];if(_0x325297==null)return'';return String(_0x325297);})),_0x44189a=_0x4818b9[_0x13027b(0x96)][_0x13027b(0x93)]([_0x3b93da,..._0x123797]),_0x2c0638=_0x4818b9[_0x13027b(0x96)][_0x13027b(0xaf)]();return _0x4818b9[_0x13027b(0x96)][_0x13027b(0xab)](_0x2c0638,_0x44189a,_0x13027b(0xa5)),_0x4818b9[_0x13027b(0xa7)](_0x2c0638,{'bookType':_0x13027b(0x9f),'type':'array'});}export function buildImportTemplateBuffer(_0x74f746){return buildExcelBuffer(_0x74f746,[]);}export function parseExcelBuffer(_0x1e3fbb,_0x56a655){const _0x552618=_0x1997dd,_0x306ff7=_0x4818b9[_0x552618(0x98)](_0x1e3fbb,{'type':_0x552618(0xad),'cellDates':!![]}),_0x32eb9b=_0x306ff7[_0x552618(0xa1)][0x0];if(!_0x32eb9b)return[];const _0x2ca921=_0x306ff7['Sheets'][_0x32eb9b];if(!_0x2ca921)return[];const _0x125918=_0x4818b9[_0x552618(0x96)]['sheet_to_json'](_0x2ca921,{'header':0x1,'defval':'','raw':![]});if(!_0x125918[_0x552618(0x95)])return[];const _0x285c13=(_0x125918[0x0]||[])['map'](_0x4bfb90=>String(_0x4bfb90??'')[_0x552618(0x99)]()),_0x1299ea=new Map();if(_0x56a655?.[_0x552618(0x95)])for(const _0x920158 of _0x56a655){_0x1299ea[_0x552618(0xa4)](_0x920158[_0x552618(0xa9)][_0x552618(0x99)](),_0x920158['prop']),_0x1299ea[_0x552618(0xa4)](_0x920158['prop'],_0x920158[_0x552618(0xa0)]);}const _0x7fccc0=_0x285c13[_0x552618(0x9c)](_0x5ecd5e=>{const _0x38d7e9=_0x552618;if(!_0x5ecd5e)return'';return _0x1299ea[_0x38d7e9(0x8f)](_0x5ecd5e)||_0x5ecd5e;}),_0xd8f639=[];for(let _0x40acaa=0x1;_0x40acaa<_0x125918['length'];_0x40acaa++){const _0x4609ad=_0x125918[_0x40acaa]||[],_0x423346={};let _0x74a187=!![];for(let _0x3cc36c=0x0;_0x3cc36c<_0x7fccc0[_0x552618(0x95)];_0x3cc36c++){const _0x53189d=_0x7fccc0[_0x3cc36c];if(!_0x53189d)continue;let _0x52b933=_0x4609ad[_0x3cc36c];if(_0x52b933==null||_0x52b933===''){_0x423346[_0x53189d]=_0x52b933==null?null:'';continue;}_0x74a187=![],typeof _0x52b933===_0x552618(0xac)?_0x423346[_0x53189d]=_0x52b933['trim']():_0x423346[_0x53189d]=_0x52b933;}if(!_0x74a187)_0xd8f639[_0x552618(0x9a)](_0x423346);}return _0xd8f639;}export function excelFilename(_0x5b12e5){const _0x4c61f7=_0x1997dd;return _0x5b12e5['endsWith'](_0x4c61f7(0x9b))?_0x5b12e5:_0x5b12e5+_0x4c61f7(0x9b);}export function excelResponseHeaders(_0x3026ac){const _0x51fb67=_0x1997dd,_0x355204=excelFilename(_0x3026ac);return{'Content-Type':_0x51fb67(0xa3),'Content-Disposition':'attachment;\x20filename*=UTF-8\x27\x27'+encodeURIComponent(_0x355204)};}function _0x2a31(){const _0x3fa55c=['nK94v2jxvq','EgXZEa','ChjVCa','u2HLzxroyw1LCW','mJmZnJLVvuTSsvu','yxbWBgLJyxrPB24VDM5KlM9Wzw54BwXMB3jTyxrZlw9MzMLJzwrVy3vTzw50lNnWCMvHzhnOzwv0BwWUC2HLzxq','C2v0','u2HLzxqX','Aw5JBhvKzxm','D3jPDgu','DxbKyxrLvgLTzq','BgfIzwW','ntm4mJiZmKLot2noAG','yM9VA19HChbLBMrFC2HLzxq','C3rYAw5N','yxjYyxK','ndy2nZiYnM12uM9Lvq','yM9VA19UzxC','z2v0','odeXote2n2Trswz1CW','mtq2nJDgtePnA3a','mZq3ndKZnuzUwwThqW','yw9Hx3rVx3nOzwv0','zgvSzxrLzef0','BgvUz3rO','DxrPBhm','mZu2whvluKjw','CMvHza','DhjPBq','ChvZAa','lNHSC3G','BwfW','mJiZmtqYmtndtwvZt0W'];_0x2a31=function(){return _0x3fa55c;};return _0x2a31();}
|
package/dist/shared/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x4b2d(_0x4a92ce,_0x38a39b){_0x4a92ce=_0x4a92ce-0x18f;var _0x25aab2=_0x25aa();var _0x4b2de0=_0x25aab2[_0x4a92ce];if(_0x4b2d['SGmOpw']===undefined){var _0x1b3d26=function(_0x2ec3d5){var _0x2bf53b='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x323187='',_0x1e9f26='';for(var _0x28660a=0x0,_0x34a60b,_0xe86cd8,_0x3e585c=0x0;_0xe86cd8=_0x2ec3d5['charAt'](_0x3e585c++);~_0xe86cd8&&(_0x34a60b=_0x28660a%0x4?_0x34a60b*0x40+_0xe86cd8:_0xe86cd8,_0x28660a++%0x4)?_0x323187+=String['fromCharCode'](0xff&_0x34a60b>>(-0x2*_0x28660a&0x6)):0x0){_0xe86cd8=_0x2bf53b['indexOf'](_0xe86cd8);}for(var _0x17f2d6=0x0,_0x538469=_0x323187['length'];_0x17f2d6<_0x538469;_0x17f2d6++){_0x1e9f26+='%'+('00'+_0x323187['charCodeAt'](_0x17f2d6)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1e9f26);};_0x4b2d['hmswlh']=_0x1b3d26,_0x4b2d['YzEwkA']={},_0x4b2d['SGmOpw']=!![];}var _0x44b24d=_0x25aab2[0x0],_0x30d0f3=_0x4a92ce+_0x44b24d,_0x3d4d26=_0x4b2d['YzEwkA'][_0x30d0f3];return!_0x3d4d26?(_0x4b2de0=_0x4b2d['hmswlh'](_0x4b2de0),_0x4b2d['YzEwkA'][_0x30d0f3]=_0x4b2de0):_0x4b2de0=_0x3d4d26,_0x4b2de0;}(function(_0xb47faf,_0x29bb36){var _0xf0747=_0x4b2d,_0x28b8eb=_0xb47faf();while(!![]){try{var _0x1ede5e=-parseInt(_0xf0747(0x194))/0x1*(parseInt(_0xf0747(0x198))/0x2)+-parseInt(_0xf0747(0x197))/0x3*(parseInt(_0xf0747(0x196))/0x4)+parseInt(_0xf0747(0x18f))/0x5+-parseInt(_0xf0747(0x193))/0x6+parseInt(_0xf0747(0x190))/0x7+-parseInt(_0xf0747(0x195))/0x8+-parseInt(_0xf0747(0x192))/0x9*(-parseInt(_0xf0747(0x191))/0xa);if(_0x1ede5e===_0x29bb36)break;else _0x28b8eb['push'](_0x28b8eb['shift']());}catch(_0x32d694){_0x28b8eb['push'](_0x28b8eb['shift']());}}}(_0x25aa,0x8c0ca));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';function _0x25aa(){var _0x63521f=['ndC4nZC5mevNtfz5DW','mZCZrMHTwhDV','ndu2otK2og5UDvnuqW','nZaXnJu2AKzYvNzt','m0jzvgHcyW','mJiWmKvLCKLUCq','ntK2nZCWCKjSv09e','mJq2odC1m2zlvKrxCq','mtbsEwXOC1u','mtG1mtiXnJnPBLf4z3u'];_0x25aa=function(){return _0x63521f;};return _0x25aa();}
|
package/dist/shared/tree.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function _0x2bc4(){const _0x2657ba=['nta2otveDxrHCuW','mJu3mhbyC0H0uG','y2HPBgrYzw4','mtmYmJa3ngDyA05lDa','mJKXmJyXnMrNzurlsG','ChvZAa','C2v0','CgfYzw50swq','BgvUz3rO','DMfSDwvZ','yxnJ','nZC1mZK4nhDbtNnQuq','z2v0','AgfZ','mZzNDK1juMm','B3jKzxjoDw0','C29YDa','m0rPEvLPyW','mtqXnZy4mhPJwuPisa','mJu2nJiYq3bvuKLA','mJuZnJjXtxPKqNy','zgvZyW'];_0x2bc4=function(){return _0x2657ba;};return _0x2bc4();}function _0x575e(_0x3f8b4a,_0x472319){_0x3f8b4a=_0x3f8b4a-0x17b;const _0x2bc4b5=_0x2bc4();let _0x575ead=_0x2bc4b5[_0x3f8b4a];if(_0x575e['KBXrsX']===undefined){var _0xed7fbf=function(_0x472ff8){const _0x4da36f='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x256958='',_0x5052e9='';for(let _0x1d64c3=0x0,_0x3fb33e,_0x44e51d,_0x4632cb=0x0;_0x44e51d=_0x472ff8['charAt'](_0x4632cb++);~_0x44e51d&&(_0x3fb33e=_0x1d64c3%0x4?_0x3fb33e*0x40+_0x44e51d:_0x44e51d,_0x1d64c3++%0x4)?_0x256958+=String['fromCharCode'](0xff&_0x3fb33e>>(-0x2*_0x1d64c3&0x6)):0x0){_0x44e51d=_0x4da36f['indexOf'](_0x44e51d);}for(let _0x2775a3=0x0,_0x1ddbfd=_0x256958['length'];_0x2775a3<_0x1ddbfd;_0x2775a3++){_0x5052e9+='%'+('00'+_0x256958['charCodeAt'](_0x2775a3)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5052e9);};_0x575e['DhdtaF']=_0xed7fbf,_0x575e['DqVwrW']={},_0x575e['KBXrsX']=!![];}const _0x528c2d=_0x2bc4b5[0x0],_0x42d851=_0x3f8b4a+_0x528c2d,_0x56197d=_0x575e['DqVwrW'][_0x42d851];return!_0x56197d?(_0x575ead=_0x575e['DhdtaF'](_0x575ead),_0x575e['DqVwrW'][_0x42d851]=_0x575ead):_0x575ead=_0x56197d,_0x575ead;}const _0x220e72=_0x575e;(function(_0x1ff730,_0x2c7948){const _0x50dabb=_0x575e,_0x1b49bb=_0x1ff730();while(!![]){try{const _0x35041d=parseInt(_0x50dabb(0x189))/0x1+-parseInt(_0x50dabb(0x183))/0x2*(parseInt(_0x50dabb(0x181))/0x3)+-parseInt(_0x50dabb(0x182))/0x4+-parseInt(_0x50dabb(0x186))/0x5*(-parseInt(_0x50dabb(0x17e))/0x6)+-parseInt(_0x50dabb(0x18a))/0x7+parseInt(_0x50dabb(0x17b))/0x8+-parseInt(_0x50dabb(0x184))/0x9*(parseInt(_0x50dabb(0x187))/0xa);if(_0x35041d===_0x2c7948)break;else _0x1b49bb['push'](_0x1b49bb['shift']());}catch(_0x47aafb){_0x1b49bb['push'](_0x1b49bb['shift']());}}}(_0x2bc4,0xb2017));export function deepTree(_0x256958,_0x5052e9=_0x220e72(0x190)){const _0x1c6681=_0x220e72,_0x1d64c3=new Map();for(const _0x4632cb of _0x256958){if(_0x4632cb['id']==null)continue;_0x1d64c3[_0x1c6681(0x18c)](_0x4632cb['id'],{..._0x4632cb,'children':[]});}const _0x3fb33e=[];for(const _0x2775a3 of _0x1d64c3[_0x1c6681(0x18f)]()){const _0x1ddbfd=_0x2775a3[_0x1c6681(0x18d)];_0x1ddbfd!=null&&_0x1ddbfd!==''&&_0x1d64c3[_0x1c6681(0x17d)](_0x1ddbfd)?_0x1d64c3[_0x1c6681(0x17c)](_0x1ddbfd)[_0x1c6681(0x188)][_0x1c6681(0x18b)](_0x2775a3):_0x3fb33e['push'](_0x2775a3);}const _0x44e51d=_0x3443f4=>{const _0x2a843b=_0x1c6681;_0x3443f4[_0x2a843b(0x180)]((_0x5557c9,_0x224670)=>{const _0x302a20=_0x2a843b,_0x54ce12=_0x5557c9[_0x302a20(0x17f)]??0x0,_0x2931e3=_0x224670['orderNum']??0x0,_0x3f2cdb=_0x5052e9===_0x302a20(0x185)?_0x2931e3-_0x54ce12:_0x54ce12-_0x2931e3;return _0x3f2cdb||Number(_0x5557c9['id'])-Number(_0x224670['id']);});for(const _0x1c8489 of _0x3443f4)if(_0x1c8489[_0x2a843b(0x188)]?.['length'])_0x44e51d(_0x1c8489[_0x2a843b(0x188)]);};return _0x44e51d(_0x3fb33e),_0x3fb33e;}export function flattenTree(_0x397e59,_0x348ee6,_0x52b852=0x0,_0x153edb=[]){const _0x24b5b9=_0x220e72;for(const _0x5deb17 of _0x397e59){const _0x2cbf7d=_0x5deb17[_0x24b5b9(0x188)]||[];_0x153edb[_0x24b5b9(0x18b)]({..._0x5deb17,'depth':_0x52b852,'hasChildren':_0x2cbf7d[_0x24b5b9(0x18e)]>0x0});if(_0x2cbf7d['length']&&_0x348ee6[_0x24b5b9(0x17d)](_0x5deb17['id']))flattenTree(_0x2cbf7d,_0x348ee6,_0x52b852+0x1,_0x153edb);}return _0x153edb;}
|
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
|
-
export declare function resolveJoinOn(join: QueryJoin, index: number,
|
|
11
|
-
export declare function joinTypeOf(join: QueryJoin): QueryJoinType;
|
|
10
|
+
export declare function resolveJoinOn(join: QueryJoin, index: number, tables: JoinTableMap): import("drizzle-orm").SQL<unknown>;
|
|
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,25 +37,16 @@ export type QueryJoinType = 'join' | 'leftJoin' | 'innerJoin';
|
|
|
33
37
|
/**
|
|
34
38
|
* Join 配置(Drizzle pgTable)。
|
|
35
39
|
* - 主表固定别名 `a`
|
|
36
|
-
* -
|
|
37
|
-
* - `condition`: `"a.skinId = b.id"` 等值;或 `on(tables)` / 旧版 `on(main)`
|
|
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
|
-
condition
|
|
49
|
-
/**
|
|
50
|
-
* 联表 ON:
|
|
51
|
-
* - 新:`(tables) => eq(tables.a.skinId, tables.b.id)`(tables 含 a 与各 alias)
|
|
52
|
-
* - 旧:`(main) => eq(main.skinId, other.id)`(无 alias 时)
|
|
53
|
-
*/
|
|
54
|
-
on?: (mainOrTables: any) => unknown;
|
|
49
|
+
condition: string;
|
|
55
50
|
};
|
|
56
51
|
/** where / extend 上下文 */
|
|
57
52
|
export type QueryOpCtx = {
|
|
@@ -77,8 +72,13 @@ export type QueryOp = {
|
|
|
77
72
|
/** 数字 / 时间区间(与 fieldEq 等并存,勿再在 where 里拆参) */
|
|
78
73
|
fieldRange?: QueryFieldRange[];
|
|
79
74
|
addOrderBy?: Record<string, 'asc' | 'desc'>;
|
|
80
|
-
/**
|
|
81
|
-
|
|
75
|
+
/**
|
|
76
|
+
* 声明式投影(有 join 时建议显式配置)。
|
|
77
|
+
* - `a.*`:主表全部列,结果键 = 驼峰字段名
|
|
78
|
+
* - `b.userName`:结果键 = `userName`(无需 as)
|
|
79
|
+
* - `e.name as roleName`:结果键 = `roleName`
|
|
80
|
+
*/
|
|
81
|
+
select?: string[];
|
|
82
82
|
join?: QueryJoin[];
|
|
83
83
|
where?: QueryWhereFn;
|
|
84
84
|
extend?: QueryExtendFn;
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { BaseService } from "../../client";
|