vome-core 0.0.32 → 0.0.34
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/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/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/index.d.ts +2 -2
- package/dist/src/ext/load-plugin.d.ts +13 -11
- package/dist/src/ext/module-registry.d.ts +2 -6
- package/dist/src/server/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/shared/excel.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x2580ab=_0x738a;(function(_0x10e79e,_0x1918dc){const _0x4152d1=_0x738a,_0x401728=_0x10e79e();while(!![]){try{const _0x426316=parseInt(_0x4152d1(0x16a))/0x1*(-parseInt(_0x4152d1(0x15b))/0x2)+-parseInt(_0x4152d1(0x15d))/0x3*(-parseInt(_0x4152d1(0x16f))/0x4)+parseInt(_0x4152d1(0x176))/0x5+-parseInt(_0x4152d1(0x175))/0x6+parseInt(_0x4152d1(0x164))/0x7*(parseInt(_0x4152d1(0x16e))/0x8)+parseInt(_0x4152d1(0x163))/0x9+-parseInt(_0x4152d1(0x178))/0xa;if(_0x426316===_0x1918dc)break;else _0x401728['push'](_0x401728['shift']());}catch(_0x1afeae){_0x401728['push'](_0x401728['shift']());}}}(_0x2e07,0x3b46c));function _0x738a(_0x4b2b97,_0xbad2dc){_0x4b2b97=_0x4b2b97-0x157;const _0x2e07c9=_0x2e07();let _0x738a26=_0x2e07c9[_0x4b2b97];if(_0x738a['CCVoVz']===undefined){var _0x4afb7d=function(_0x5dd606){const _0xe81e1b='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3c3301='',_0x384274='';for(let _0x5c06a8=0x0,_0x593087,_0x53ee20,_0x27c54e=0x0;_0x53ee20=_0x5dd606['charAt'](_0x27c54e++);~_0x53ee20&&(_0x593087=_0x5c06a8%0x4?_0x593087*0x40+_0x53ee20:_0x53ee20,_0x5c06a8++%0x4)?_0x3c3301+=String['fromCharCode'](0xff&_0x593087>>(-0x2*_0x5c06a8&0x6)):0x0){_0x53ee20=_0xe81e1b['indexOf'](_0x53ee20);}for(let _0x4cab63=0x0,_0x5d7ebf=_0x3c3301['length'];_0x4cab63<_0x5d7ebf;_0x4cab63++){_0x384274+='%'+('00'+_0x3c3301['charCodeAt'](_0x4cab63)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x384274);};_0x738a['DhOEaG']=_0x4afb7d,_0x738a['fOvAuC']={},_0x738a['CCVoVz']=!![];}const _0xa82e83=_0x2e07c9[0x0],_0x4d47c9=_0x4b2b97+_0xa82e83,_0x2c6384=_0x738a['fOvAuC'][_0x4d47c9];return!_0x2c6384?(_0x738a26=_0x738a['DhOEaG'](_0x738a26),_0x738a['fOvAuC'][_0x4d47c9]=_0x738a26):_0x738a26=_0x2c6384,_0x738a26;}function _0x2e07(){const _0x310e94=['ntnhyunlwhy','ChjVCa','yxjYyxK','BwfW','mJrmvgHdBxG','ntaZoduYqK1wDhbx','BgvUz3rO','C3rYAw5N','CMvHza','DxrPBhm','EgXZEa','mJqXmJy1ngPhsLrlvG','mtK5nJiYmgzJAxbryq','u2HLzxrZ','mZK0mZCWAvLnCKnJ','u2HLzxroyw1LCW','z2v0','DgvUyw50swq','DhjPBq','C2HLzxrFDg9FANnVBG','mte0ntbxu2rAzLK','D3jPDgu','m1vyDfDjqW','yw9Hx3rVx3nOzwv0','C2v0','lNHSC3G','zgvSzxrLzef0','zw5KC1DPDgG','ntKZnZiXAK1ht0nf','oti1mZC5ywPvzgvl','BgfIzwW','yxbWBgLJyxrPB24VDM5KlM9Wzw54BwXMB3jTyxrZlw9MzMLJzwrVy3vTzw50lNnWCMvHzhnOzwv0BwWUC2HLzxq','y3jLyxrLvgLTzq','yM9VA19UzxC','yM9VA19HChbLBMrFC2HLzxq'];_0x2e07=function(){return _0x310e94;};return _0x2e07();}import*as _0x3c3301 from'xlsx';export const IMPORT_SKIP_FIELDS=['id',_0x2580ab(0x167),'updateTime',_0x2580ab(0x161),_0x2580ab(0x158)];export function isImportSkipField(_0x384274){return IMPORT_SKIP_FIELDS['includes'](_0x384274);}export function buildExcelBuffer(_0x5c06a8,_0x593087,_0x53ee20){const _0x304685=_0x2580ab,_0x27c54e=_0x5c06a8['map'](_0x2fd4aa=>_0x2fd4aa[_0x304685(0x165)]||_0x2fd4aa['prop']),_0x4cab63=_0x593087[_0x304685(0x16d)](_0x3b7155=>_0x5c06a8[_0x304685(0x16d)](_0x4bfa26=>{const _0x220d5f=_0x304685;if(_0x53ee20)return _0x53ee20(_0x4bfa26[_0x220d5f(0x16b)],_0x3b7155);const _0x1709ac=_0x3b7155[_0x4bfa26[_0x220d5f(0x16b)]];if(_0x1709ac==null)return'';return String(_0x1709ac);})),_0x5d7ebf=_0x3c3301['utils'][_0x304685(0x15e)]([_0x27c54e,..._0x4cab63]),_0x4f5158=_0x3c3301[_0x304685(0x173)][_0x304685(0x168)]();return _0x3c3301[_0x304685(0x173)][_0x304685(0x169)](_0x4f5158,_0x5d7ebf,'Sheet1'),_0x3c3301[_0x304685(0x15c)](_0x4f5158,{'bookType':_0x304685(0x174),'type':_0x304685(0x16c)});}export function buildImportTemplateBuffer(_0xe0fa4f){return buildExcelBuffer(_0xe0fa4f,[]);}export function parseExcelBuffer(_0x1125fa,_0x31809b){const _0x5ac980=_0x2580ab,_0x41fcfc=_0x3c3301[_0x5ac980(0x172)](_0x1125fa,{'type':_0x5ac980(0x16c),'cellDates':!![]}),_0x142fc6=_0x41fcfc[_0x5ac980(0x179)][0x0];if(!_0x142fc6)return[];const _0x3dfb57=_0x41fcfc[_0x5ac980(0x177)][_0x142fc6];if(!_0x3dfb57)return[];const _0x572d3e=_0x3c3301[_0x5ac980(0x173)][_0x5ac980(0x15a)](_0x3dfb57,{'header':0x1,'defval':'','raw':![]});if(!_0x572d3e[_0x5ac980(0x170)])return[];const _0x578c6a=(_0x572d3e[0x0]||[])[_0x5ac980(0x16d)](_0x1f4f24=>String(_0x1f4f24??'')[_0x5ac980(0x159)]()),_0x4887e2=new Map();if(_0x31809b?.[_0x5ac980(0x170)])for(const _0x120f7c of _0x31809b){_0x4887e2['set'](_0x120f7c['label']['trim'](),_0x120f7c[_0x5ac980(0x16b)]),_0x4887e2[_0x5ac980(0x15f)](_0x120f7c['prop'],_0x120f7c[_0x5ac980(0x16b)]);}const _0x4bd155=_0x578c6a[_0x5ac980(0x16d)](_0x7b2d8c=>{const _0x73bc17=_0x5ac980;if(!_0x7b2d8c)return'';return _0x4887e2[_0x73bc17(0x157)](_0x7b2d8c)||_0x7b2d8c;}),_0x1ed88e=[];for(let _0x639f65=0x1;_0x639f65<_0x572d3e[_0x5ac980(0x170)];_0x639f65++){const _0x553c7b=_0x572d3e[_0x639f65]||[],_0x22e813={};let _0x26d495=!![];for(let _0x1e0b0d=0x0;_0x1e0b0d<_0x4bd155[_0x5ac980(0x170)];_0x1e0b0d++){const _0x38553c=_0x4bd155[_0x1e0b0d];if(!_0x38553c)continue;let _0x30a55b=_0x553c7b[_0x1e0b0d];if(_0x30a55b==null||_0x30a55b===''){_0x22e813[_0x38553c]=_0x30a55b==null?null:'';continue;}_0x26d495=![],typeof _0x30a55b===_0x5ac980(0x171)?_0x22e813[_0x38553c]=_0x30a55b['trim']():_0x22e813[_0x38553c]=_0x30a55b;}if(!_0x26d495)_0x1ed88e['push'](_0x22e813);}return _0x1ed88e;}export function excelFilename(_0x2b8ff9){const _0x45b492=_0x2580ab;return _0x2b8ff9[_0x45b492(0x162)](_0x45b492(0x160))?_0x2b8ff9:_0x2b8ff9+_0x45b492(0x160);}export function excelResponseHeaders(_0x5a13fa){const _0x1de235=_0x2580ab,_0xa6f663=excelFilename(_0x5a13fa);return{'Content-Type':_0x1de235(0x166),'Content-Disposition':'attachment;\x20filename*=UTF-8\x27\x27'+encodeURIComponent(_0xa6f663)};}
|
package/dist/shared/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
(function(_0x32eff8,_0xebe8f0){var _0x19a404=_0x347c,_0x29b99a=_0x32eff8();while(!![]){try{var _0x363b65=parseInt(_0x19a404(0x16d))/0x1*(-parseInt(_0x19a404(0x16c))/0x2)+-parseInt(_0x19a404(0x16f))/0x3+-parseInt(_0x19a404(0x170))/0x4*(parseInt(_0x19a404(0x171))/0x5)+-parseInt(_0x19a404(0x168))/0x6+-parseInt(_0x19a404(0x16b))/0x7*(parseInt(_0x19a404(0x167))/0x8)+-parseInt(_0x19a404(0x172))/0x9*(-parseInt(_0x19a404(0x16a))/0xa)+parseInt(_0x19a404(0x169))/0xb*(parseInt(_0x19a404(0x16e))/0xc);if(_0x363b65===_0xebe8f0)break;else _0x29b99a['push'](_0x29b99a['shift']());}catch(_0x2e0872){_0x29b99a['push'](_0x29b99a['shift']());}}}(_0x4dca,0x72fe3));export{merge}from'../comm/merge';function _0x347c(_0x27dd60,_0x5ee019){_0x27dd60=_0x27dd60-0x167;var _0x4dca9a=_0x4dca();var _0x347caa=_0x4dca9a[_0x27dd60];if(_0x347c['TclzTT']===undefined){var _0x73aee7=function(_0x232d38){var _0xfff510='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x2751c3='',_0x22457b='';for(var _0x1d0b89=0x0,_0x2404ea,_0x2408a1,_0x136e77=0x0;_0x2408a1=_0x232d38['charAt'](_0x136e77++);~_0x2408a1&&(_0x2404ea=_0x1d0b89%0x4?_0x2404ea*0x40+_0x2408a1:_0x2408a1,_0x1d0b89++%0x4)?_0x2751c3+=String['fromCharCode'](0xff&_0x2404ea>>(-0x2*_0x1d0b89&0x6)):0x0){_0x2408a1=_0xfff510['indexOf'](_0x2408a1);}for(var _0x304c87=0x0,_0x3e0187=_0x2751c3['length'];_0x304c87<_0x3e0187;_0x304c87++){_0x22457b+='%'+('00'+_0x2751c3['charCodeAt'](_0x304c87)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x22457b);};_0x347c['WtGQEr']=_0x73aee7,_0x347c['wpWsYf']={},_0x347c['TclzTT']=!![];}var _0x42763b=_0x4dca9a[0x0],_0x50d508=_0x27dd60+_0x42763b,_0x4e8964=_0x347c['wpWsYf'][_0x50d508];return!_0x4e8964?(_0x347caa=_0x347c['WtGQEr'](_0x347caa),_0x347c['wpWsYf'][_0x50d508]=_0x347caa):_0x347caa=_0x4e8964,_0x347caa;}export{deepTree,flattenTree}from'./tree';function _0x4dca(){var _0x690fde=['ofDeB1nfta','mtm4mtyYnNjWtLHRwq','mJmYmJy1nZDut3b4AMW','mtbHCfzQz2u','mZKWodaZmergv2LywG','nJz6yK51sMm','odaZm3LmwhviBG','mtjvy0jMrLu','mteWnta1menSEhfTBG','ngvnvw9sCa','mte1mJC4nvvps1zbqG','mta4ntq5q0zLyu5v'];_0x4dca=function(){return _0x690fde;};return _0x4dca();}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
|
-
|
|
1
|
+
function _0x5854(_0x1cf7a4,_0xa9025f){_0x1cf7a4=_0x1cf7a4-0x1d9;const _0x2a4614=_0x2a46();let _0x585407=_0x2a4614[_0x1cf7a4];if(_0x5854['yimkte']===undefined){var _0x24db19=function(_0x1ea7e3){const _0x5dfa7e='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x47fa8e='',_0x924dfc='';for(let _0x4e38bf=0x0,_0x814efd,_0x23bf24,_0x185701=0x0;_0x23bf24=_0x1ea7e3['charAt'](_0x185701++);~_0x23bf24&&(_0x814efd=_0x4e38bf%0x4?_0x814efd*0x40+_0x23bf24:_0x23bf24,_0x4e38bf++%0x4)?_0x47fa8e+=String['fromCharCode'](0xff&_0x814efd>>(-0x2*_0x4e38bf&0x6)):0x0){_0x23bf24=_0x5dfa7e['indexOf'](_0x23bf24);}for(let _0x2f2a20=0x0,_0x1711cd=_0x47fa8e['length'];_0x2f2a20<_0x1711cd;_0x2f2a20++){_0x924dfc+='%'+('00'+_0x47fa8e['charCodeAt'](_0x2f2a20)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x924dfc);};_0x5854['JltHoc']=_0x24db19,_0x5854['ZtbEwU']={},_0x5854['yimkte']=!![];}const _0x1f140c=_0x2a4614[0x0],_0x4e510e=_0x1cf7a4+_0x1f140c,_0x54d28f=_0x5854['ZtbEwU'][_0x4e510e];return!_0x54d28f?(_0x585407=_0x5854['JltHoc'](_0x585407),_0x5854['ZtbEwU'][_0x4e510e]=_0x585407):_0x585407=_0x54d28f,_0x585407;}const _0x4490eb=_0x5854;(function(_0x337934,_0x22e9ad){const _0x923642=_0x5854,_0x294fb6=_0x337934();while(!![]){try{const _0x24dbfb=-parseInt(_0x923642(0x1ee))/0x1*(-parseInt(_0x923642(0x1ea))/0x2)+-parseInt(_0x923642(0x1df))/0x3*(-parseInt(_0x923642(0x1e3))/0x4)+-parseInt(_0x923642(0x1e5))/0x5*(parseInt(_0x923642(0x1ed))/0x6)+parseInt(_0x923642(0x1e2))/0x7*(-parseInt(_0x923642(0x1dc))/0x8)+-parseInt(_0x923642(0x1e4))/0x9+-parseInt(_0x923642(0x1e7))/0xa+parseInt(_0x923642(0x1e8))/0xb*(parseInt(_0x923642(0x1e6))/0xc);if(_0x24dbfb===_0x22e9ad)break;else _0x294fb6['push'](_0x294fb6['shift']());}catch(_0x30e222){_0x294fb6['push'](_0x294fb6['shift']());}}}(_0x2a46,0x8ed01));function _0x2a46(){const _0x6d4c28=['DMfSDwvZ','ntaWmtuXDKXwC2rz','ChvZAa','AgfZ','mti0mdrwBvjjDve','oejyzvHgvq','oti0ndqZmvb0ywPgqG','nZa3mZbVv1Dsu0m','mty4q2n0whPL','mtG3mZaWmerHzNvwsq','mtqZmJK0ohzkvMnUrq','B3jKzxjoDw0','mZu3mNjoCwHYyq','zgvZyW','BgvUz3rO','odrxzNP5EKe','ndG5A2T5qMjl','yxnJ','z2v0','y2HPBgrYzw4','CgfYzw50swq','ndy2neXXuxDnCa','C29YDa'];_0x2a46=function(){return _0x6d4c28;};return _0x2a46();}export function deepTree(_0x47fa8e,_0x924dfc=_0x4490eb(0x1ef)){const _0x5dd84d=_0x4490eb,_0x4e38bf=new Map();for(const _0x185701 of _0x47fa8e){if(_0x185701['id']==null)continue;_0x4e38bf['set'](_0x185701['id'],{..._0x185701,'children':[]});}const _0x814efd=[];for(const _0x2f2a20 of _0x4e38bf[_0x5dd84d(0x1de)]()){const _0x1711cd=_0x2f2a20[_0x5dd84d(0x1db)];_0x1711cd!=null&&_0x1711cd!==''&&_0x4e38bf[_0x5dd84d(0x1e1)](_0x1711cd)?_0x4e38bf[_0x5dd84d(0x1d9)](_0x1711cd)['children'][_0x5dd84d(0x1e0)](_0x2f2a20):_0x814efd['push'](_0x2f2a20);}const _0x23bf24=_0x318c3a=>{const _0x31e18f=_0x5dd84d;_0x318c3a[_0x31e18f(0x1dd)]((_0x254fca,_0x5a77dd)=>{const _0x1f15c1=_0x31e18f,_0x3a3ee1=_0x254fca[_0x1f15c1(0x1e9)]??0x0,_0x11c299=_0x5a77dd[_0x1f15c1(0x1e9)]??0x0,_0x421b47=_0x924dfc===_0x1f15c1(0x1eb)?_0x11c299-_0x3a3ee1:_0x3a3ee1-_0x11c299;return _0x421b47||Number(_0x254fca['id'])-Number(_0x5a77dd['id']);});for(const _0x239de1 of _0x318c3a)if(_0x239de1['children']?.[_0x31e18f(0x1ec)])_0x23bf24(_0x239de1[_0x31e18f(0x1da)]);};return _0x23bf24(_0x814efd),_0x814efd;}export function flattenTree(_0x1eb4f2,_0x1584c4,_0xce45cc=0x0,_0x1fbbf7=[]){const _0x3cd133=_0x4490eb;for(const _0x39bb9a of _0x1eb4f2){const _0x3258f3=_0x39bb9a[_0x3cd133(0x1da)]||[];_0x1fbbf7[_0x3cd133(0x1e0)]({..._0x39bb9a,'depth':_0xce45cc,'hasChildren':_0x3258f3['length']>0x0});if(_0x3258f3[_0x3cd133(0x1ec)]&&_0x1584c4[_0x3cd133(0x1e1)](_0x39bb9a['id']))flattenTree(_0x3258f3,_0x1584c4,_0xce45cc+0x1,_0x1fbbf7);}return _0x1fbbf7;}
|
package/dist/src/core/index.d.ts
CHANGED
|
@@ -15,6 +15,6 @@ export { Eps, isEpsEnabled, BaseController, RES_CODE, Controller, Get, Post, Put
|
|
|
15
15
|
export type { ApiFail, ApiResult, ApiSuccess, ControllerCrudOptions, ControllerMeta, ControllerRouteMeta, ControllerSide, CrudApi, CrudBeforeFn, CrudRegistrar, EpsApiItem, EpsColumn, EpsEntity, EpsModuleMap, HttpMethod, InsertParamFn, QueryExtendFn, QueryExtendQb, QueryFieldRef, QueryJoin, QueryJoinType, QueryOp, QueryOpCtx, QueryWhereFn, QueryWhereResult, ResCode, RouteMiddleware, RouteParamMeta, RouteParamSource, } from '../routing';
|
|
16
16
|
export { DbStore, baseColumns, BASE_COLUMN_COMMENTS, entitySchemas, columnComments, getColumnComments, syncColumnCommentsToPg, readCrudConfig, resolveSoftDelete, resolveUpsert, Repository, getRepository, InjectRepository, BaseService, q, compactWhere, needsAdvancedQuery, buildQueryOp, queryWithOp, attachCrudRoutes, isTenantEnabled, noTenant, normalizeHost, resolveTenantScope, tableHasDepartmentId, resolveDataScope, applyDataScopeWhere, applyRowScopes, noDataScope, } from '../orm';
|
|
17
17
|
export type { CrudUpsertMode, CrudModifyType, CrudWriteOptions, CrudTrashQueryOptions, CrudDeleteOptions, PageQuery, PagePagination, PageResult, } from '../orm';
|
|
18
|
-
export { BasePlugin, loadPluginClass, loadPluginClassFromPath, readPluginScript, resolvePluginServerPath, pDataPath, pPluginPath, pModulesPath, pModulePath, ModuleRegistry,
|
|
18
|
+
export { BasePlugin, loadPluginClass, loadPluginClassFromPath, loadModuleHandlers, loadModuleHandlersFromPath, readPluginScript, resolvePluginServerPath, pDataPath, pPluginPath, pModulesPath, pModulePath, ModuleRegistry, microApps, createModuleGateway, } from '../ext';
|
|
19
19
|
export type { PluginManifest, PluginInfo, PluginPayload, PluginCheckResult, ModuleRouteDef, ModuleMenuDef, ModuleManifest, ModuleHandlerCtx, ModuleHandler, ModuleInstalled, } from '../ext';
|
|
20
20
|
export { defineAuthMacro } from '../auth';
|
package/dist/src/ext/index.d.ts
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
* - microApps / createModuleGateway:静态与网关
|
|
7
7
|
*/
|
|
8
8
|
export { BasePlugin } from './base-plugin';
|
|
9
|
-
export { loadPluginClass, loadPluginClassFromPath, readPluginScript, resolvePluginServerPath, } from './load-plugin';
|
|
9
|
+
export { loadPluginClass, loadPluginClassFromPath, loadModuleHandlers, loadModuleHandlersFromPath, readPluginScript, resolvePluginServerPath, } from './load-plugin';
|
|
10
10
|
export { pDataPath, pPluginPath, pModulesPath, pModulePath, } from './path';
|
|
11
|
-
export { ModuleRegistry,
|
|
11
|
+
export { ModuleRegistry, } from './module-registry';
|
|
12
12
|
export { microApps } from './micro-apps';
|
|
13
13
|
export { createModuleGateway } from './module-gateway';
|
|
14
14
|
export type { PluginManifest, PluginInfo, PluginPayload, PluginCheckResult, } from '../../typings/ext/plugin';
|
|
@@ -1,26 +1,28 @@
|
|
|
1
1
|
import type { PluginInfo } from '../../typings/ext/plugin';
|
|
2
|
+
import type { ModuleHandler } from '../../typings/ext/module';
|
|
2
3
|
type PluginCtor = new () => {
|
|
3
4
|
init: (info: PluginInfo, ctx?: unknown, app?: unknown, services?: Record<string, unknown>) => Promise<void>;
|
|
4
5
|
};
|
|
5
6
|
/** 混淆后 `vome-plugin-runtime` 可能进字符串数组,字面量替换失效;运行时拦截 require */
|
|
6
7
|
export declare function pluginRequire(id: string): any;
|
|
7
|
-
/** 剥 ESM、替换 CJS external
|
|
8
|
+
/** 剥 ESM、替换 CJS external(仅字符串内容 / 遗留 JSON 插件需要) */
|
|
8
9
|
export declare function normalizePluginScript(content: string): string;
|
|
9
10
|
/**
|
|
10
|
-
*
|
|
11
|
-
* footer 决定导出(Plugin ctor 或 handlers)。
|
|
12
|
-
*
|
|
13
|
-
* BasePlugin 经 globalThis 注入(Bun 下覆盖 Module.require 不可靠);
|
|
14
|
-
* 规范化脚本里的 require('vome-plugin-runtime') 已替换为 ({ BasePlugin })。
|
|
11
|
+
* 从落盘 server/index.js 原生 require(安装 / 热启主路径)。
|
|
15
12
|
*/
|
|
16
|
-
export declare function
|
|
13
|
+
export declare function loadPluginClassFromPath(filePath: string): PluginCtor;
|
|
17
14
|
/**
|
|
18
|
-
*
|
|
19
|
-
*
|
|
15
|
+
* 字符串内容加载(遗留 plugin JSON)。
|
|
16
|
+
* 仅内存 _compile,禁止写临时文件再 require(会触发 bun --watch 死循环)。
|
|
20
17
|
*/
|
|
21
18
|
export declare function loadPluginClass(content: string): PluginCtor;
|
|
22
|
-
/**
|
|
23
|
-
export declare function
|
|
19
|
+
/** 从落盘文件取出 handlers(有 routes 时用) */
|
|
20
|
+
export declare function loadModuleHandlersFromPath(filePath: string, required?: boolean): Record<string, ModuleHandler>;
|
|
21
|
+
/**
|
|
22
|
+
* 解析 server/index.js 字符串中的 handlers(遗留路径)。
|
|
23
|
+
* 内存编译,不落盘。
|
|
24
|
+
*/
|
|
25
|
+
export declare function loadModuleHandlers(content: string, required?: boolean): Record<string, ModuleHandler>;
|
|
24
26
|
/** modules/{key}/server/index.js(若存在) */
|
|
25
27
|
export declare function resolvePluginServerPath(keyName: string): string | undefined;
|
|
26
28
|
/** 优先 modules/{key}/server/index.js,回退旧 plugin/{key} JSON */
|
|
@@ -4,11 +4,8 @@ type LoadedModule = {
|
|
|
4
4
|
handlers: Record<string, ModuleHandler>;
|
|
5
5
|
routes: ModuleRouteDef[];
|
|
6
6
|
};
|
|
7
|
-
/**
|
|
8
|
-
|
|
9
|
-
* 有 routes 时必须有 handlers;仅钩子时可无 handlers
|
|
10
|
-
*/
|
|
11
|
-
export declare function loadModuleHandlers(content: string, required?: boolean): Record<string, ModuleHandler>;
|
|
7
|
+
/** @deprecated 使用 loadModuleHandlersFromPath;保留 re-export 兼容 */
|
|
8
|
+
export { loadModuleHandlers } from './load-plugin';
|
|
12
9
|
export declare const ModuleRegistry: {
|
|
13
10
|
get(key: string): LoadedModule | undefined;
|
|
14
11
|
list(): {
|
|
@@ -42,4 +39,3 @@ export declare const ModuleRegistry: {
|
|
|
42
39
|
/** 扫描 modules/ 下已安装目录并 load */
|
|
43
40
|
bootstrap(): void;
|
|
44
41
|
};
|
|
45
|
-
export {};
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* 导入时加载宿主 `src/config`;扫描 / IoC / 路由注册在 `App.start()` 中执行。
|
|
5
5
|
* 宿主须:`import 'reflect-metadata'`,并开启 `experimentalDecorators` + `emitDecoratorMetadata`。
|
|
6
6
|
*/
|
|
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, readPluginScript, resolvePluginServerPath, pDataPath, pPluginPath, pModulesPath, pModulePath, ModuleRegistry,
|
|
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
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, ProviderToken, QueryExtendFn, QueryExtendQb, QueryFieldRef, QueryJoin, QueryJoinType, QueryOp, QueryOpCtx, QueryWhereFn, QueryWhereResult, ResCode, RouteMiddleware, RouteParamMeta, RouteParamSource, ScanOptions, } from '../core';
|