@anncic-api/typeorm 1.2.7 → 1.3.0
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/configuration.js +1 -1
- package/dist/decorator/InjectEntity.js +1 -1
- package/dist/decorator/InjectRepository.js +1 -1
- package/dist/decorator/ProvideEntity.js +1 -1
- package/dist/decorator/ProvideRepository.js +1 -1
- package/dist/decorator/ProvideSearch.js +1 -1
- package/dist/decorator/VirtualColumn.js +1 -1
- package/dist/definition/Repository.js +1 -1
- package/dist/helper/getDataSourceEntity.js +1 -1
- package/dist/index.js +1 -1
- package/dist/interface.js +1 -1
- package/package.json +3 -3
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x1a35c1=a0_0x45bc;(function(_0x1ea5e5,_0x3798af){const _0x130a44=a0_0x45bc,_0x4e67c9=_0x1ea5e5();while(!![]){try{const _0xcfb862=parseInt(_0x130a44(0x1cc))/0x1*(-parseInt(_0x130a44(0x1b9))/0x2)+parseInt(_0x130a44(0x1af))/0x3+-parseInt(_0x130a44(0x1c4))/0x4+parseInt(_0x130a44(0x1b8))/0x5+-parseInt(_0x130a44(0x1be))/0x6+parseInt(_0x130a44(0x1d0))/0x7*(-parseInt(_0x130a44(0x1db))/0x8)+parseInt(_0x130a44(0x1bb))/0x9;if(_0xcfb862===_0x3798af)break;else _0x4e67c9['push'](_0x4e67c9['shift']());}catch(_0x35385b){_0x4e67c9['push'](_0x4e67c9['shift']());}}}(a0_0xbc0c,0xbc20c));var __decorate=this&&this['__decorate']||function(_0x2fc528,_0x1ff339,_0x563425,_0x43a96a){const _0x5af484=a0_0x45bc;var _0x287d6a=arguments[_0x5af484(0x1ab)],_0x14b56d=_0x287d6a<0x3?_0x1ff339:_0x43a96a===null?_0x43a96a=Object[_0x5af484(0x1dd)](_0x1ff339,_0x563425):_0x43a96a,_0x3a60d0;if(typeof Reflect===_0x5af484(0x1da)&&typeof Reflect[_0x5af484(0x1bc)]==='function')_0x14b56d=Reflect['decorate'](_0x2fc528,_0x1ff339,_0x563425,_0x43a96a);else{for(var _0x3fc0a0=_0x2fc528[_0x5af484(0x1ab)]-0x1;_0x3fc0a0>=0x0;_0x3fc0a0--)if(_0x3a60d0=_0x2fc528[_0x3fc0a0])_0x14b56d=(_0x287d6a<0x3?_0x3a60d0(_0x14b56d):_0x287d6a>0x3?_0x3a60d0(_0x1ff339,_0x563425,_0x14b56d):_0x3a60d0(_0x1ff339,_0x563425))||_0x14b56d;}return _0x287d6a>0x3&&_0x14b56d&&Object[_0x5af484(0x1d7)](_0x1ff339,_0x563425,_0x14b56d),_0x14b56d;},__metadata=this&&this['__metadata']||function(_0x2020c6,_0x4cf04f){const _0x2955aa=a0_0x45bc;if(typeof Reflect===_0x2955aa(0x1da)&&typeof Reflect[_0x2955aa(0x1ce)]===_0x2955aa(0x1c3))return Reflect[_0x2955aa(0x1ce)](_0x2020c6,_0x4cf04f);};Object[a0_0x1a35c1(0x1d7)](exports,'__esModule',{'value':!![]}),exports['CustomConfiguration']=void 0x0;function a0_0xbc0c(){const _0x237625=['1506245VcwAHD','612918jncymQ','@midwayjs/core','39661227fSKeLM','decorate','@midwayjs/typeorm','7504428WFjokz','onReady','production','getDataSource','registerPropertyHandler','function','2246412deIMAD','message','handlercache','name','design:type','./definition/Repository','anncic-api-typeorm\x20Error\x20','find','3GNqwpf','middlewareError','metadata','prototype','154637zbUoeY','MidwayConfigService','anncic-api:typeorm','useMiddleware','target','TypeORMError','TypeORMDataSourceManager','defineProperty','body','push','object','480BMNfCP','EntityNotFoundError','getOwnPropertyDescriptor','length','Repository','getClassMetadata','getRepository','359094JfqLzA','REPOSITORY_KEY','MidwayDecoratorService','CustomConfiguration','typeorm','\x20is\x20not\x20ProvideRepository\x20Entify','decorator','ENTIFY_KEY','数据不存在'];a0_0xbc0c=function(){return _0x237625;};return a0_0xbc0c();}function a0_0x45bc(_0x312690,_0xbf927d){const _0xbc0c3=a0_0xbc0c();return a0_0x45bc=function(_0x45bc6c,_0x24d3d6){_0x45bc6c=_0x45bc6c-0x1ab;let _0x5f5c5f=_0xbc0c3[_0x45bc6c];return _0x5f5c5f;},a0_0x45bc(_0x312690,_0xbf927d);}const typeorm_1=require(a0_0x1a35c1(0x1bd)),core_1=require('@midwayjs/core'),core_2=require(a0_0x1a35c1(0x1ba)),typeorm_2=require(a0_0x1a35c1(0x1b3)),Repository_1=require(a0_0x1a35c1(0x1c9)),interface_1=require('./interface'),typeorm=require('@midwayjs/typeorm');let CustomConfiguration=class CustomConfiguration{constructor(){const _0x4d4a70=a0_0x1a35c1;this[_0x4d4a70(0x1c6)]=[];}async[a0_0x1a35c1(0x1bf)](_0x2909ed,_0x492ea2){const _0xbe4195=a0_0x1a35c1,_0x284490=await _0x2909ed['getAsync'](typeorm_1[_0xbe4195(0x1d6)]);this[_0xbe4195(0x1b5)][_0xbe4195(0x1c2)](interface_1[_0xbe4195(0x1b6)],(_0x3b1bc1,{entity:_0x581521,connection:_0x582df7})=>{const _0x1aaca1=_0xbe4195;let _0x4ec3ba=this[_0x1aaca1(0x1c6)][_0x1aaca1(0x1cb)](_0x107723=>_0x107723[_0x1aaca1(0x1d4)]===_0x581521);return!_0x4ec3ba&&(_0x4ec3ba=new Repository_1[(_0x1aaca1(0x1ac))](_0x492ea2,_0x284490[_0x1aaca1(0x1c1)](_0x582df7||_0x284490['getDataSourceNameByModel'](_0x581521))['getRepository'](_0x581521)),this[_0x1aaca1(0x1c6)][_0x1aaca1(0x1d9)](_0x4ec3ba)),_0x4ec3ba;}),this[_0xbe4195(0x1b5)]['registerPropertyHandler'](interface_1[_0xbe4195(0x1b0)],(_0x47cac0,{repository:_0x3556ec,connection:_0xacd2f9})=>{const _0x4f515e=_0xbe4195,{entity:_0x117791}=(0x0,core_1[_0x4f515e(0x1ad)])(interface_1[_0x4f515e(0x1b0)],_0x3556ec)||{};if(!_0x117791)throw new Error(_0x4f515e(0x1ca)+((_0x3556ec===null||_0x3556ec===void 0x0?void 0x0:_0x3556ec[_0x4f515e(0x1c7)])||_0x3556ec)+_0x4f515e(0x1b4));let _0x2d557f=this[_0x4f515e(0x1c6)][_0x4f515e(0x1cb)](_0x5582b8=>_0x5582b8===_0x3556ec);return!_0x2d557f&&(_0x2d557f=new _0x3556ec(_0x492ea2,_0x284490[_0x4f515e(0x1c1)](_0xacd2f9||_0x284490['getDataSourceNameByModel'](_0x117791))[_0x4f515e(0x1ae)](_0x117791)),this[_0x4f515e(0x1c6)]['push'](_0x2d557f)),_0x2d557f;}),_0x492ea2[_0xbe4195(0x1d3)](this[_0xbe4195(0x1cd)](_0x492ea2));}[a0_0x1a35c1(0x1cd)](_0x4edb61){return async(_0x52a137,_0x4932b0)=>{const _0x2ae85e=a0_0x45bc;try{await _0x4932b0();}catch(_0x385cde){if(_0x385cde instanceof typeorm_2[_0x2ae85e(0x1d5)])_0x385cde instanceof typeorm_2[_0x2ae85e(0x1dc)]?_0x52a137['body']={'code':0x194,'msg':_0x2ae85e(0x1b7)}:(_0x52a137[_0x2ae85e(0x1d8)]={'code':0x1f4,'msg':_0x385cde[_0x2ae85e(0x1c5)]},_0x4edb61['getEnv']()!=_0x2ae85e(0x1c0)&&console['warn'](_0x385cde));else throw _0x385cde;}};}};__decorate([(0x0,core_1['Inject'])(),__metadata('design:type',core_2[a0_0x1a35c1(0x1d1)])],CustomConfiguration['prototype'],'config',void 0x0),__decorate([(0x0,core_1['Inject'])(),__metadata(a0_0x1a35c1(0x1c8),core_2[a0_0x1a35c1(0x1b1)])],CustomConfiguration[a0_0x1a35c1(0x1cf)],a0_0x1a35c1(0x1b5),void 0x0),CustomConfiguration=__decorate([(0x0,core_1['Configuration'])({'imports':[typeorm],'conflictCheck':![],'namespace':a0_0x1a35c1(0x1d2)})],CustomConfiguration),exports[a0_0x1a35c1(0x1b2)]=CustomConfiguration;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a1_0x3ba409=a1_0x5200;(function(_0x1253e7,_0x1491ac){const _0xe9e16=a1_0x5200,_0x4ef623=_0x1253e7();while(!![]){try{const _0x1399c4=parseInt(_0xe9e16(0x1a8))/0x1+-parseInt(_0xe9e16(0x19d))/0x2+-parseInt(_0xe9e16(0x1a3))/0x3*(parseInt(_0xe9e16(0x19c))/0x4)+-parseInt(_0xe9e16(0x19e))/0x5*(-parseInt(_0xe9e16(0x1aa))/0x6)+parseInt(_0xe9e16(0x1a4))/0x7+-parseInt(_0xe9e16(0x1a1))/0x8*(parseInt(_0xe9e16(0x1a9))/0x9)+parseInt(_0xe9e16(0x1a6))/0xa*(parseInt(_0xe9e16(0x1a7))/0xb);if(_0x1399c4===_0x1491ac)break;else _0x4ef623['push'](_0x4ef623['shift']());}catch(_0x103da5){_0x4ef623['push'](_0x4ef623['shift']());}}}(a1_0x4004,0x640ca));function a1_0x4004(){const _0x5c8553=['defineProperty','1215jlniUF','2692095IUOhBT','@midwayjs/core','834010QtEHOM','143ChWONt','25001eGbqKr','67923xQzHaB','2794098uAZEyw','default','7400DWdYuC','1042382HXZOEY','5EABzum','InjectEntity','createCustomPropertyDecorator','296bsnPBi'];a1_0x4004=function(){return _0x5c8553;};return a1_0x4004();}Object[a1_0x3ba409(0x1a2)](exports,'__esModule',{'value':!![]}),exports[a1_0x3ba409(0x19f)]=void 0x0;function a1_0x5200(_0x313ba8,_0x486190){const _0x400436=a1_0x4004();return a1_0x5200=function(_0x52000e,_0x252b28){_0x52000e=_0x52000e-0x19c;let _0x3d614f=_0x400436[_0x52000e];return _0x3d614f;},a1_0x5200(_0x313ba8,_0x486190);}const core_1=require(a1_0x3ba409(0x1a5)),interface_1=require('../interface');function InjectEntity(_0x323f47,_0x43a7f3=a1_0x3ba409(0x1ab)){const _0x455368=a1_0x3ba409;return(0x0,core_1[_0x455368(0x1a0)])(interface_1['ENTIFY_KEY'],{'entity':_0x323f47,'connection':_0x43a7f3});}exports[a1_0x3ba409(0x19f)]=InjectEntity;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a2_0x5036ee=a2_0x29bb;(function(_0x261988,_0x58ce86){const _0x34206b=a2_0x29bb,_0x51b073=_0x261988();while(!![]){try{const _0x5ebc13=parseInt(_0x34206b(0x1bf))/0x1+parseInt(_0x34206b(0x1b0))/0x2*(parseInt(_0x34206b(0x1c0))/0x3)+-parseInt(_0x34206b(0x1bd))/0x4+-parseInt(_0x34206b(0x1b1))/0x5+parseInt(_0x34206b(0x1b8))/0x6*(-parseInt(_0x34206b(0x1b2))/0x7)+parseInt(_0x34206b(0x1af))/0x8*(parseInt(_0x34206b(0x1bb))/0x9)+-parseInt(_0x34206b(0x1ba))/0xa*(-parseInt(_0x34206b(0x1b6))/0xb);if(_0x5ebc13===_0x58ce86)break;else _0x51b073['push'](_0x51b073['shift']());}catch(_0x5d10ef){_0x51b073['push'](_0x51b073['shift']());}}}(a2_0x543d,0xf3cf8));function a2_0x29bb(_0x1913f5,_0x3a9b4a){const _0x543dad=a2_0x543d();return a2_0x29bb=function(_0x29bb32,_0x5ba2fe){_0x29bb32=_0x29bb32-0x1af;let _0x2d94db=_0x543dad[_0x29bb32];return _0x2d94db;},a2_0x29bb(_0x1913f5,_0x3a9b4a);}Object[a2_0x5036ee(0x1b9)](exports,a2_0x5036ee(0x1b5),{'value':!![]}),exports['InjectRepository']=void 0x0;const core_1=require(a2_0x5036ee(0x1b4)),interface_1=require(a2_0x5036ee(0x1bc));function InjectRepository(_0x2a6178,_0x2f75ae=a2_0x5036ee(0x1b7)){const _0x49453a=a2_0x5036ee;return(0x0,core_1[_0x49453a(0x1b3)])(interface_1[_0x49453a(0x1be)],{'repository':_0x2a6178,'connection':_0x2f75ae});}function a2_0x543d(){const _0x77d871=['4381212MWApiq','REPOSITORY_KEY','1224728rLrtTT','3582bOrpnk','6836904mPuoHD','2178oTFUlj','3373610agAqfh','22771NwgSfK','createCustomPropertyDecorator','@midwayjs/core','__esModule','165TxBXYj','default','3324kTxvKI','defineProperty','224410WkjPJc','18pxWnwI','../interface'];a2_0x543d=function(){return _0x77d871;};return a2_0x543d();}exports['InjectRepository']=InjectRepository;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a3_0x2d37a5=a3_0x26f2;function a3_0x10b5(){const _0x152c4a=['__esModule','default','ENTIFY_MODULE_SOURCE','6838Mkjvua','5346ZepaFo','1303232KcqTDQ','defineProperty','typeorm','7785aEDnAF','../interface','2285krAVxH','99xGeamq','5710Suxrpa','2586465khAnfi','dataSource','tableName','saveClassMetadata','388127VdMzRu','Entity','push','ENTIFY_MODULE','1196336WbaEua','saveModule','string','name','ProvideEntity'];a3_0x10b5=function(){return _0x152c4a;};return a3_0x10b5();}function a3_0x26f2(_0x1515e1,_0x496d91){const _0x10b571=a3_0x10b5();return a3_0x26f2=function(_0x26f201,_0x227a11){_0x26f201=_0x26f201-0x1b8;let _0xc10f5a=_0x10b571[_0x26f201];return _0xc10f5a;},a3_0x26f2(_0x1515e1,_0x496d91);}(function(_0x3cb146,_0x43ca15){const _0x47e016=a3_0x26f2,_0x423296=_0x3cb146();while(!![]){try{const _0x1f87bd=-parseInt(_0x47e016(0x1c7))/0x1+parseInt(_0x47e016(0x1b9))/0x2*(-parseInt(_0x47e016(0x1c1))/0x3)+parseInt(_0x47e016(0x1cb))/0x4+-parseInt(_0x47e016(0x1c0))/0x5*(-parseInt(_0x47e016(0x1ba))/0x6)+parseInt(_0x47e016(0x1c3))/0x7+parseInt(_0x47e016(0x1bb))/0x8+-parseInt(_0x47e016(0x1be))/0x9*(parseInt(_0x47e016(0x1c2))/0xa);if(_0x1f87bd===_0x43ca15)break;else _0x423296['push'](_0x423296['shift']());}catch(_0x40e6ca){_0x423296['push'](_0x423296['shift']());}}}(a3_0x10b5,0x3b859));Object[a3_0x2d37a5(0x1bc)](exports,a3_0x2d37a5(0x1d0),{'value':!![]}),exports[a3_0x2d37a5(0x1cf)]=void 0x0;const typeorm_1=require(a3_0x2d37a5(0x1bd)),core_1=require('@midwayjs/core'),interface_1=require(a3_0x2d37a5(0x1bf));function ProvideEntity(_0x2a7679,_0x494f63={}){return _0x4e1f6a=>{const _0x44a6cd=a3_0x26f2;_0x494f63[_0x44a6cd(0x1ce)]=_0x2a7679['tableName'];const _0x44cbd5=[];if(!(_0x2a7679===null||_0x2a7679===void 0x0?void 0x0:_0x2a7679[_0x44a6cd(0x1c4)]))_0x44cbd5[_0x44a6cd(0x1c9)]('default');else{if(typeof(_0x2a7679===null||_0x2a7679===void 0x0?void 0x0:_0x2a7679[_0x44a6cd(0x1c4)])==_0x44a6cd(0x1cd))_0x44cbd5['push'](_0x2a7679===null||_0x2a7679===void 0x0?void 0x0:_0x2a7679[_0x44a6cd(0x1c4)]);else{if(Array['isArray'](_0x2a7679===null||_0x2a7679===void 0x0?void 0x0:_0x2a7679[_0x44a6cd(0x1c4)]))for(let _0x213cb9 of _0x2a7679[_0x44a6cd(0x1c4)]||[_0x44a6cd(0x1d1)]){_0x44cbd5['push'](_0x213cb9);}}}(0x0,core_1[_0x44a6cd(0x1cc)])(interface_1[_0x44a6cd(0x1ca)],_0x4e1f6a),(0x0,core_1[_0x44a6cd(0x1c6)])(interface_1[_0x44a6cd(0x1b8)],{'tableName':_0x2a7679[_0x44a6cd(0x1c5)],'dataSource':_0x44cbd5},_0x4e1f6a),(0x0,typeorm_1[_0x44a6cd(0x1c8)])(_0x2a7679[_0x44a6cd(0x1c5)],_0x494f63)(_0x4e1f6a);};}exports[a3_0x2d37a5(0x1cf)]=ProvideEntity;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a4_0x4ca959=a4_0x4781;function a4_0x4781(_0x2c77e2,_0x4a76ec){const _0x4cb6b7=a4_0x4cb6();return a4_0x4781=function(_0x47817c,_0x26a6f7){_0x47817c=_0x47817c-0x172;let _0x2c8b36=_0x4cb6b7[_0x47817c];return _0x2c8b36;},a4_0x4781(_0x2c77e2,_0x4a76ec);}(function(_0x31fc60,_0x16e584){const _0x28d7ee=a4_0x4781,_0x2e862f=_0x31fc60();while(!![]){try{const _0x55a2a2=-parseInt(_0x28d7ee(0x177))/0x1*(-parseInt(_0x28d7ee(0x17e))/0x2)+-parseInt(_0x28d7ee(0x17c))/0x3+-parseInt(_0x28d7ee(0x174))/0x4*(-parseInt(_0x28d7ee(0x175))/0x5)+-parseInt(_0x28d7ee(0x184))/0x6+parseInt(_0x28d7ee(0x181))/0x7+parseInt(_0x28d7ee(0x183))/0x8+-parseInt(_0x28d7ee(0x17b))/0x9;if(_0x55a2a2===_0x16e584)break;else _0x2e862f['push'](_0x2e862f['shift']());}catch(_0x333aba){_0x2e862f['push'](_0x2e862f['shift']());}}}(a4_0x4cb6,0xacbbd));function a4_0x4cb6(){const _0x2fe0d8=['saveClassMetadata','26673435JBqXhM','587115LnnCPK','ProvideRepository','1861106OOvtEw','Scope','__esModule','7315154hsZNrB','../interface','6956616XNmsIR','2285490YnmPnQ','Provide','Request','2805400jxqUwb','10bszSie','@midwayjs/core','1eZjSTY','defineProperty','ScopeEnum'];a4_0x4cb6=function(){return _0x2fe0d8;};return a4_0x4cb6();}Object[a4_0x4ca959(0x178)](exports,a4_0x4ca959(0x180),{'value':!![]}),exports['ProvideRepository']=void 0x0;const core_1=require(a4_0x4ca959(0x176)),interface_1=require(a4_0x4ca959(0x182));function ProvideRepository(_0x1b6272){return _0x163c67=>{const _0x132673=a4_0x4781;(0x0,core_1[_0x132673(0x17f)])(core_1[_0x132673(0x179)][_0x132673(0x173)],{'allowDowngrade':!![]})(_0x163c67),((0x0,core_1[_0x132673(0x172)])()(_0x163c67),(0x0,core_1[_0x132673(0x17a)])(interface_1['REPOSITORY_KEY'],{'entity':_0x1b6272},_0x163c67));};}exports[a4_0x4ca959(0x17d)]=ProvideRepository;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a5_0x43c6fe=a5_0x54c2;(function(_0xb039cf,_0x429e0a){const _0x394c18=a5_0x54c2,_0x213acd=_0xb039cf();while(!![]){try{const _0x4ada36=-parseInt(_0x394c18(0x13b))/0x1+-parseInt(_0x394c18(0x143))/0x2*(parseInt(_0x394c18(0x13a))/0x3)+-parseInt(_0x394c18(0x136))/0x4+parseInt(_0x394c18(0x141))/0x5*(-parseInt(_0x394c18(0x140))/0x6)+parseInt(_0x394c18(0x14b))/0x7*(parseInt(_0x394c18(0x135))/0x8)+-parseInt(_0x394c18(0x13d))/0x9*(parseInt(_0x394c18(0x13e))/0xa)+parseInt(_0x394c18(0x145))/0xb;if(_0x4ada36===_0x429e0a)break;else _0x213acd['push'](_0x213acd['shift']());}catch(_0x52368a){_0x213acd['push'](_0x213acd['shift']());}}}(a5_0x1dcf,0xaac39));function a5_0x54c2(_0x9263d7,_0x7589ec){const _0x1dcf3f=a5_0x1dcf();return a5_0x54c2=function(_0x54c2a6,_0x69190b){_0x54c2a6=_0x54c2a6-0x135;let _0x2f3f74=_0x1dcf3f[_0x54c2a6];return _0x2f3f74;},a5_0x54c2(_0x9263d7,_0x7589ec);}function a5_0x1dcf(){const _0x351d10=['Search','__esModule','36792FreNRB','128RjvFJS','904384VwbqmP','MODEL_SEARCH_KEY','ProvideSearch','Singleton','24669QPTAwD','1385955WvCPXH','Scope','868509MhqDoQ','40YoxJSS','../interface','30504EzlVzg','1130YaHyXR','attachClassMetadata','244FKvbFg','@midwayjs/core','52421578qDBBBU','ScopeEnum','defineProperty','MODEL_KEY'];a5_0x1dcf=function(){return _0x351d10;};return a5_0x1dcf();}Object[a5_0x43c6fe(0x147)](exports,a5_0x43c6fe(0x14a),{'value':!![]}),exports[a5_0x43c6fe(0x149)]=exports[a5_0x43c6fe(0x138)]=void 0x0;const core_1=require(a5_0x43c6fe(0x144)),interface_1=require(a5_0x43c6fe(0x13f));function ProvideSearch(_0x1983ce){return _0x13513f=>{const _0x316638=a5_0x54c2;(0x0,core_1['saveModule'])(interface_1[_0x316638(0x148)],_0x13513f),(0x0,core_1[_0x316638(0x13c)])(core_1[_0x316638(0x146)][_0x316638(0x139)])(_0x13513f),(0x0,core_1[_0x316638(0x142)])(interface_1['MODEL_KEY'],_0x1983ce,_0x13513f);};}exports[a5_0x43c6fe(0x138)]=ProvideSearch;function Search(_0x32e39b,_0x1ad3fe){return(_0x53a096,_0x22c3be,_0x396925)=>{const _0x5941d4=a5_0x54c2;(0x0,core_1['attachClassMetadata'])(interface_1[_0x5941d4(0x137)],{'field':_0x32e39b,'comment':_0x1ad3fe,'target':_0x53a096,'methodName':_0x22c3be,'descriptor':_0x396925},_0x53a096);};}exports[a5_0x43c6fe(0x149)]=Search;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';const a6_0x1cf7a1=a6_0x5173;(function(_0x4e7c54,_0x3aa58c){const _0x13a783=a6_0x5173,_0x57af78=_0x4e7c54();while(!![]){try{const _0x10be8f=-parseInt(_0x13a783(0x1d1))/0x1+-parseInt(_0x13a783(0x1cb))/0x2*(-parseInt(_0x13a783(0x1c4))/0x3)+parseInt(_0x13a783(0x1ca))/0x4*(parseInt(_0x13a783(0x1cd))/0x5)+-parseInt(_0x13a783(0x1d0))/0x6*(-parseInt(_0x13a783(0x1ce))/0x7)+-parseInt(_0x13a783(0x1cf))/0x8*(-parseInt(_0x13a783(0x1c2))/0x9)+parseInt(_0x13a783(0x1c8))/0xa+-parseInt(_0x13a783(0x1c6))/0xb*(parseInt(_0x13a783(0x1d3))/0xc);if(_0x10be8f===_0x3aa58c)break;else _0x57af78['push'](_0x57af78['shift']());}catch(_0x1a04ca){_0x57af78['push'](_0x57af78['shift']());}}}(a6_0x11f6,0x3af1b));function a6_0x5173(_0x13b07f,_0x3278e6){const _0x11f6db=a6_0x11f6();return a6_0x5173=function(_0x517383,_0x5dde63){_0x517383=_0x517383-0x1c2;let _0x5cb6e7=_0x11f6db[_0x517383];return _0x5cb6e7;},a6_0x5173(_0x13b07f,_0x3278e6);}Object['defineProperty'](exports,a6_0x1cf7a1(0x1c9),{'value':!![]}),exports[a6_0x1cf7a1(0x1c7)]=void 0x0;const core_1=require(a6_0x1cf7a1(0x1d2)),interface_1=require('../interface');function a6_0x11f6(){const _0x548914=['VirtualColumn','3538810XSGvlf','__esModule','1016Swtpud','278098AzAEEn','getClassMetadata','8290jFicVX','3321213yvboQL','24bBHgDd','6iCkOHy','328209SSazKD','@midwayjs/core','10368ApqFCo','189801uraSOW','ENTITY_VIRTUAL_COLUMN_KEY','3Mzdhtx','saveClassMetadata','11231UVDopw'];a6_0x11f6=function(){return _0x548914;};return a6_0x11f6();}function VirtualColumn(_0x6321e6,_0x42da39){return(_0xad52b8,_0x648771)=>{const _0x3bdedf=a6_0x5173,_0x30572f=(0x0,core_1[_0x3bdedf(0x1cc)])(interface_1[_0x3bdedf(0x1c3)],_0xad52b8)||{};_0x30572f[_0x648771]={'comment':_0x6321e6,..._0x42da39},(0x0,core_1[_0x3bdedf(0x1c5)])(interface_1[_0x3bdedf(0x1c3)],_0x30572f,_0xad52b8);};}exports[a6_0x1cf7a1(0x1c7)]=VirtualColumn;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a7_0x2939ae=a7_0x4ade;function a7_0x4ade(_0x52f5a9,_0x5441fe){const _0x144fbe=a7_0x144f();return a7_0x4ade=function(_0x4ade02,_0x3ab754){_0x4ade02=_0x4ade02-0x141;let _0x302f12=_0x144fbe[_0x4ade02];return _0x302f12;},a7_0x4ade(_0x52f5a9,_0x5441fe);}(function(_0x23cf4d,_0x362ded){const _0x250b26=a7_0x4ade,_0x3dc1b8=_0x23cf4d();while(!![]){try{const _0x95d6af=-parseInt(_0x250b26(0x142))/0x1+parseInt(_0x250b26(0x172))/0x2+parseInt(_0x250b26(0x146))/0x3+parseInt(_0x250b26(0x143))/0x4*(parseInt(_0x250b26(0x18b))/0x5)+-parseInt(_0x250b26(0x148))/0x6+-parseInt(_0x250b26(0x16c))/0x7+parseInt(_0x250b26(0x173))/0x8*(parseInt(_0x250b26(0x177))/0x9);if(_0x95d6af===_0x362ded)break;else _0x3dc1b8['push'](_0x3dc1b8['shift']());}catch(_0x2108c2){_0x3dc1b8['push'](_0x3dc1b8['shift']());}}}(a7_0x144f,0xd3234));Object['defineProperty'](exports,a7_0x2939ae(0x15a),{'value':!![]}),exports['Repository']=void 0x0;const core_1=require(a7_0x2939ae(0x149)),typeorm_1=require(a7_0x2939ae(0x145)),interface_1=require(a7_0x2939ae(0x164));class Repository extends typeorm_1[a7_0x2939ae(0x151)]{constructor(_0x1b889c,_0x503edf){const _0x139382=a7_0x2939ae;super(_0x503edf[_0x139382(0x144)],_0x503edf[_0x139382(0x16a)],_0x503edf[_0x139382(0x169)]),this[_0x139382(0x180)]=[];for(const _0x436cc6 of(0x0,core_1['getClassMetadata'])(interface_1[_0x139382(0x187)],this['target'])||[]){const _0x4a8f21={'model':_0x436cc6,'searchs':[]};for(const _0x1d0a24 of(0x0,core_1['getClassMetadata'])(interface_1['MODEL_SEARCH_KEY'],_0x436cc6)||[]){_0x4a8f21['searchs'][_0x139382(0x189)](_0x1d0a24);}this['modelSearchs']['push'](_0x4a8f21);}this['app']=_0x1b889c;}async[a7_0x2939ae(0x17b)](_0x599df9,_0x2ac3da,_0x24032b={}){const _0x78383c=a7_0x2939ae;var _0x43339c,_0x26e902,_0x283032,_0x500491,_0x33c134,_0x500a51;const _0x46c80d=this[_0x78383c(0x155)](undefined,_0x24032b===null||_0x24032b===void 0x0?void 0x0:_0x24032b['queryRunner']),_0x37b228=[];for(const _0x7382a6 of this['modelSearchs']){if((_0x7382a6===null||_0x7382a6===void 0x0?void 0x0:_0x7382a6[_0x78383c(0x160)])&&((_0x43339c=_0x7382a6===null||_0x7382a6===void 0x0?void 0x0:_0x7382a6[_0x78383c(0x166)])===null||_0x43339c===void 0x0?void 0x0:_0x43339c['length'])>0x0){const _0x139dc5=await this[_0x78383c(0x15c)]['getApplicationContext']()[_0x78383c(0x18a)](_0x7382a6[_0x78383c(0x160)]);for(const _0x6694e3 of _0x7382a6[_0x78383c(0x166)]){(_0x6694e3===null||_0x6694e3===void 0x0?void 0x0:_0x6694e3['field'])&&(_0x6694e3===null||_0x6694e3===void 0x0?void 0x0:_0x6694e3['methodName'])&&typeof _0x139dc5[_0x6694e3[_0x78383c(0x188)]]==_0x78383c(0x14f)&&(typeof(_0x599df9===null||_0x599df9===void 0x0?void 0x0:_0x599df9[_0x6694e3['field']])!=_0x78383c(0x185)&&!((_0x26e902=_0x599df9===null||_0x599df9===void 0x0?void 0x0:_0x599df9[_0x6694e3['field']])===null||_0x26e902===void 0x0?void 0x0:_0x26e902[_0x78383c(0x16e)](_0x78383c(0x14c)))&&(_0x37b228['indexOf'](_0x6694e3[_0x78383c(0x14a)])==-0x1&&_0x37b228[_0x78383c(0x189)](_0x6694e3['field']),await _0x139dc5[_0x6694e3[_0x78383c(0x188)]][_0x78383c(0x16d)](_0x139dc5)(_0x46c80d,_0x599df9[_0x6694e3[_0x78383c(0x14a)]],_0x599df9,_0x2ac3da,_0x24032b===null||_0x24032b===void 0x0?void 0x0:_0x24032b['queryRunner'])));}}}for(const _0x55cdc4 in _0x599df9){if(typeof _0x599df9[_0x55cdc4]!='undefined'&&_0x37b228[_0x78383c(0x182)](_0x55cdc4)==-0x1){const _0x14cb7d=this[_0x78383c(0x18c)][_0x78383c(0x17d)](_0x55cdc4);if(_0x14cb7d){if((_0x283032=_0x599df9===null||_0x599df9===void 0x0?void 0x0:_0x599df9[_0x55cdc4])===null||_0x283032===void 0x0?void 0x0:_0x283032['hasOwnProperty'](_0x78383c(0x14c))){const _0x3165cb=(_0x500491=_0x599df9[_0x55cdc4])===null||_0x500491===void 0x0?void 0x0:_0x500491['condition'],_0x55a9ed=(_0x33c134=_0x599df9[_0x55cdc4])===null||_0x33c134===void 0x0?void 0x0:_0x33c134['operator'][_0x78383c(0x171)]()['toUpperCase'](),_0x36e38a=_0x78383c(0x159)+_0x55cdc4+'_'+Math[_0x78383c(0x176)](Math[_0x78383c(0x156)]()*0xa)+Math['ceil'](Math[_0x78383c(0x156)]()*0xa)+Math[_0x78383c(0x176)](Math['random']()*0xa)+Math[_0x78383c(0x176)](Math[_0x78383c(0x156)]()*0xa);if(['=','!=','<>','>','>=','<','<=',_0x78383c(0x15e),'NOT\x20LIKE'][_0x78383c(0x182)](_0x55a9ed)!=-0x1)typeof _0x3165cb!=_0x78383c(0x185)&&_0x46c80d[_0x78383c(0x14e)](_0x46c80d[_0x78383c(0x16b)]+'.'+_0x55cdc4+'\x20'+_0x55a9ed+'\x20:'+_0x36e38a,{[_0x36e38a]:_0x3165cb});else{if(['IN',_0x78383c(0x15f)][_0x78383c(0x182)](_0x55a9ed)!=-0x1){if(typeof _0x3165cb!=_0x78383c(0x185)){const _0x58c0bc=Array[_0x78383c(0x17f)](_0x3165cb)?_0x3165cb:typeof _0x3165cb==_0x78383c(0x175)?_0x3165cb[_0x78383c(0x17a)](','):[_0x3165cb];_0x46c80d[_0x78383c(0x14e)](_0x46c80d['alias']+'.'+_0x55cdc4+'\x20'+_0x55a9ed+'(:'+_0x36e38a+')',{[_0x36e38a]:_0x58c0bc});}}else{if([_0x78383c(0x161),_0x78383c(0x179)][_0x78383c(0x182)](_0x55a9ed)!=-0x1)typeof _0x3165cb!='undefined'&&_0x46c80d[_0x78383c(0x14e)](_0x55a9ed+'(:'+_0x36e38a+','+_0x46c80d['alias']+'.'+_0x55cdc4+')',{[_0x36e38a]:_0x3165cb});else{if([_0x78383c(0x157),_0x78383c(0x17e)]['indexOf'](_0x55a9ed)!=-0x1){if(typeof _0x3165cb!=_0x78383c(0x185)){const _0x1bc655=Array[_0x78383c(0x17f)](_0x3165cb)?_0x3165cb:typeof _0x3165cb=='string'?_0x3165cb['split'](','):[_0x3165cb];_0x1bc655[_0x78383c(0x14d)]>0x1&&_0x46c80d[_0x78383c(0x14e)](_0x46c80d['alias']+'.'+_0x55cdc4+'\x20'+_0x55a9ed+'\x20:'+_0x36e38a+_0x78383c(0x170)+_0x36e38a+'_2',{[''+_0x36e38a]:_0x1bc655[0x0],[_0x36e38a+'_2']:_0x1bc655[0x1]});}}else[_0x78383c(0x154),_0x78383c(0x163)][_0x78383c(0x182)](_0x55a9ed)!=-0x1&&_0x46c80d[_0x78383c(0x14e)](_0x55a9ed+'('+_0x46c80d[_0x78383c(0x16b)]+'.'+_0x55cdc4+')');}}}}else{if(_0x37b228['indexOf'](_0x55cdc4)==-0x1){const _0xcdfb=typeof _0x14cb7d['type']=='function'?(_0x500a51=_0x14cb7d===null||_0x14cb7d===void 0x0?void 0x0:_0x14cb7d[_0x78383c(0x141)])===null||_0x500a51===void 0x0?void 0x0:_0x500a51[_0x78383c(0x183)]:_0x14cb7d[_0x78383c(0x141)][_0x78383c(0x153)]();_0xcdfb==_0x78383c(0x181)?_0x46c80d[_0x78383c(0x14e)](_0x46c80d['alias']+'.'+_0x55cdc4+_0x78383c(0x16f)+_0x55cdc4,{[_0x78383c(0x159)+_0x55cdc4]:'%'+_0x599df9[_0x55cdc4]+'%'}):_0x46c80d[_0x78383c(0x14e)](_0x46c80d[_0x78383c(0x16b)]+'.'+_0x55cdc4+_0x78383c(0x15d)+_0x55cdc4,{[_0x78383c(0x159)+_0x55cdc4]:_0x599df9[_0x55cdc4]});}}}}}(_0x2ac3da===null||_0x2ac3da===void 0x0?void 0x0:_0x2ac3da['_size'])&&_0x46c80d[_0x78383c(0x168)](Math[_0x78383c(0x165)](_0x2ac3da['_size']));(_0x2ac3da===null||_0x2ac3da===void 0x0?void 0x0:_0x2ac3da['_page'])&&(_0x2ac3da===null||_0x2ac3da===void 0x0?void 0x0:_0x2ac3da['_size'])&&_0x46c80d[_0x78383c(0x147)]((Math[_0x78383c(0x165)](_0x2ac3da[_0x78383c(0x167)])-0x1)*Math[_0x78383c(0x165)](_0x2ac3da[_0x78383c(0x186)]));if(_0x2ac3da===null||_0x2ac3da===void 0x0?void 0x0:_0x2ac3da[_0x78383c(0x184)]){if(_0x2ac3da[_0x78383c(0x184)][_0x78383c(0x182)]('.')!==-0x1)_0x46c80d[_0x78383c(0x17c)](''+_0x2ac3da[_0x78383c(0x184)],(_0x2ac3da===null||_0x2ac3da===void 0x0?void 0x0:_0x2ac3da[_0x78383c(0x15b)])?'ASC':_0x78383c(0x150));else _0x37b228[_0x78383c(0x182)](_0x2ac3da[_0x78383c(0x184)])==-0x1&&(this['metadata'][_0x78383c(0x17d)](_0x2ac3da[_0x78383c(0x184)])?_0x46c80d['orderBy'](_0x46c80d[_0x78383c(0x16b)]+'.'+_0x2ac3da[_0x78383c(0x184)],(_0x2ac3da===null||_0x2ac3da===void 0x0?void 0x0:_0x2ac3da[_0x78383c(0x15b)])?'ASC':_0x78383c(0x150)):_0x46c80d[_0x78383c(0x17c)](''+_0x2ac3da[_0x78383c(0x184)],(_0x2ac3da===null||_0x2ac3da===void 0x0?void 0x0:_0x2ac3da['_isreverse'])?'ASC':_0x78383c(0x150)));}return typeof(_0x24032b===null||_0x24032b===void 0x0?void 0x0:_0x24032b[_0x78383c(0x14b)])==_0x78383c(0x14f)&&await(_0x24032b===null||_0x24032b===void 0x0?void 0x0:_0x24032b[_0x78383c(0x14b)](_0x46c80d)),_0x46c80d;}async[a7_0x2939ae(0x174)](_0x31b531,..._0x1bc41e){const _0x5eedf0=a7_0x2939ae,_0x1b9747=this[_0x5eedf0(0x178)](_0x31b531,..._0x1bc41e);return await this[_0x5eedf0(0x158)](_0x1b9747);}async[a7_0x2939ae(0x162)](_0x5d6578,..._0x1fbe7d){const _0x54d633=a7_0x2939ae,_0x34cf8c=this[_0x54d633(0x178)](this['create'](_0x5d6578),..._0x1fbe7d);return await this[_0x54d633(0x158)](_0x34cf8c);}async[a7_0x2939ae(0x152)](_0x2ad659,_0x3569f4){const _0x706e75=a7_0x2939ae;return this[_0x706e75(0x16a)][_0x706e75(0x152)](_0x2ad659,_0x3569f4);}}function a7_0x144f(){const _0x2f3105=['abs','searchs','_page','take','queryRunner','manager','alias','2422378WhhmZz','bind','hasOwnProperty','\x20like\x20:_auto_','\x20AND\x20:','trim','3353874EPBJFD','7568EeKCRN','mergeSave','string','ceil','6552JHrRek','merge','NOT\x20FIND\x20IN\x20SET','split','search','orderBy','findColumnWithPropertyName','NOT\x20BETWEEN','isArray','modelSearchs','String','indexOf','name','_order','undefined','_size','MODEL_KEY','methodName','push','getAsync','22510QjrBsG','metadata','type','632209YvNcPK','152jXeBgX','target','typeorm','2185590CuLgzV','skip','8532888RKNXLu','@midwayjs/core','field','excess','operator','length','andWhere','function','DESC','Repository','transaction','toString','ISNULL','createQueryBuilder','random','BETWEEN','save','_auto_','__esModule','_isreverse','app','\x20=\x20:_auto_','LIKE','NOT\x20IN','model','FIND\x20IN\x20SET','createSave','NOT\x20ISNULL','../interface'];a7_0x144f=function(){return _0x2f3105;};return a7_0x144f();}exports[a7_0x2939ae(0x151)]=Repository;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a8_0xb2b590=a8_0x227b;function a8_0x227b(_0x1af136,_0x128403){const _0x394c84=a8_0x394c();return a8_0x227b=function(_0x227bcd,_0x448326){_0x227bcd=_0x227bcd-0x191;let _0xf77dc6=_0x394c84[_0x227bcd];return _0xf77dc6;},a8_0x227b(_0x1af136,_0x128403);}(function(_0x478f16,_0x3bf6c9){const _0x41bcce=a8_0x227b,_0x49d349=_0x478f16();while(!![]){try{const _0x32c8cc=-parseInt(_0x41bcce(0x192))/0x1+-parseInt(_0x41bcce(0x198))/0x2*(parseInt(_0x41bcce(0x19b))/0x3)+-parseInt(_0x41bcce(0x1a2))/0x4+parseInt(_0x41bcce(0x191))/0x5+parseInt(_0x41bcce(0x19e))/0x6+parseInt(_0x41bcce(0x194))/0x7*(-parseInt(_0x41bcce(0x1a1))/0x8)+parseInt(_0x41bcce(0x196))/0x9;if(_0x32c8cc===_0x3bf6c9)break;else _0x49d349['push'](_0x49d349['shift']());}catch(_0x1a7ca3){_0x49d349['push'](_0x49d349['shift']());}}}(a8_0x394c,0x7c40b));Object[a8_0xb2b590(0x195)](exports,'__esModule',{'value':!![]}),exports[a8_0xb2b590(0x197)]=void 0x0;function a8_0x394c(){const _0x3100dd=['533807LzZBgb','ENTIFY_MODULE_SOURCE','424627MbYPhZ','defineProperty','20112795eJTmuG','getDataSourceEntity','16WxytiA','dataSource','find','349971bPyWHU','ENTIFY_MODULE','default','1878324FoBtNT','getClassMetadata','../interface','88MwJXbT','2552120oPDful','3667470QPfGYF'];a8_0x394c=function(){return _0x3100dd;};return a8_0x394c();}const core_1=require('@midwayjs/core'),interface_1=require(a8_0xb2b590(0x1a0));function getDataSourceEntity(_0x6aadf5=a8_0xb2b590(0x19d)){const _0x15eb9f=a8_0xb2b590;var _0x4fa84e;const _0x51ad95=[];for(const _0xe23941 of(0x0,core_1['listModule'])(interface_1[_0x15eb9f(0x19c)])){const _0x5c485e=(0x0,core_1[_0x15eb9f(0x19f)])(interface_1[_0x15eb9f(0x193)],_0xe23941);((_0x4fa84e=_0x5c485e===null||_0x5c485e===void 0x0?void 0x0:_0x5c485e[_0x15eb9f(0x199)])===null||_0x4fa84e===void 0x0?void 0x0:_0x4fa84e[_0x15eb9f(0x19a)](_0x44ab28=>_0x44ab28==_0x6aadf5))&&_0x51ad95['push'](_0xe23941);}return _0x51ad95;}exports[a8_0xb2b590(0x197)]=getDataSourceEntity;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a9_0x2f6d01=a9_0x167a;(function(_0x36d36c,_0x5a944f){var _0x45c483=a9_0x167a,_0x3f9f09=_0x36d36c();while(!![]){try{var _0x1674b6=parseInt(_0x45c483(0x19d))/0x1*(-parseInt(_0x45c483(0x18c))/0x2)+-parseInt(_0x45c483(0x1b3))/0x3*(parseInt(_0x45c483(0x1a0))/0x4)+-parseInt(_0x45c483(0x1ad))/0x5*(parseInt(_0x45c483(0x191))/0x6)+-parseInt(_0x45c483(0x1a8))/0x7+parseInt(_0x45c483(0x193))/0x8+-parseInt(_0x45c483(0x199))/0x9*(parseInt(_0x45c483(0x19e))/0xa)+parseInt(_0x45c483(0x19c))/0xb;if(_0x1674b6===_0x5a944f)break;else _0x3f9f09['push'](_0x3f9f09['shift']());}catch(_0x2a256a){_0x3f9f09['push'](_0x3f9f09['shift']());}}}(a9_0x4135,0xc4007));var __createBinding=this&&this[a9_0x2f6d01(0x1a9)]||(Object[a9_0x2f6d01(0x1a3)]?function(_0x525646,_0x3c94f2,_0x2da2ad,_0x53a47d){var _0x59f05e=a9_0x2f6d01;if(_0x53a47d===undefined)_0x53a47d=_0x2da2ad;var _0x377f50=Object[_0x59f05e(0x18e)](_0x3c94f2,_0x2da2ad);(!_0x377f50||('get'in _0x377f50?!_0x3c94f2[_0x59f05e(0x1a2)]:_0x377f50[_0x59f05e(0x18b)]||_0x377f50[_0x59f05e(0x18d)]))&&(_0x377f50={'enumerable':!![],'get':function(){return _0x3c94f2[_0x2da2ad];}}),Object[_0x59f05e(0x18a)](_0x525646,_0x53a47d,_0x377f50);}:function(_0x3d5a0a,_0x5f3142,_0x345191,_0x3447df){if(_0x3447df===undefined)_0x3447df=_0x345191;_0x3d5a0a[_0x3447df]=_0x5f3142[_0x345191];}),__exportStar=this&&this['__exportStar']||function(_0x4ff54a,_0x3dca5){var _0x4dafe8=a9_0x2f6d01;for(var _0x5dc454 in _0x4ff54a)if(_0x5dc454!==_0x4dafe8(0x1b4)&&!Object[_0x4dafe8(0x1aa)][_0x4dafe8(0x1a6)]['call'](_0x3dca5,_0x5dc454))__createBinding(_0x3dca5,_0x4ff54a,_0x5dc454);};Object[a9_0x2f6d01(0x18a)](exports,a9_0x2f6d01(0x1a2),{'value':!![]}),exports[a9_0x2f6d01(0x19a)]=exports[a9_0x2f6d01(0x1ac)]=exports[a9_0x2f6d01(0x195)]=exports['Provide']=exports[a9_0x2f6d01(0x197)]=exports[a9_0x2f6d01(0x190)]=exports[a9_0x2f6d01(0x1a7)]=exports[a9_0x2f6d01(0x1af)]=exports[a9_0x2f6d01(0x19b)]=exports[a9_0x2f6d01(0x1b2)]=exports['InjectRepository']=exports[a9_0x2f6d01(0x19f)]=exports[a9_0x2f6d01(0x1a5)]=exports[a9_0x2f6d01(0x196)]=void 0x0,__exportStar(require('typeorm'),exports),__exportStar(require(a9_0x2f6d01(0x18f)),exports);var Repository_1=require('./definition/Repository');Object[a9_0x2f6d01(0x18a)](exports,a9_0x2f6d01(0x196),{'enumerable':!![],'get':function(){var _0x18ce47=a9_0x2f6d01;return Repository_1[_0x18ce47(0x196)];}});var VirtualColumn_1=require(a9_0x2f6d01(0x1ae));Object['defineProperty'](exports,'VirtualColumn',{'enumerable':!![],'get':function(){var _0x154f1a=a9_0x2f6d01;return VirtualColumn_1[_0x154f1a(0x1a5)];}});var InjectEntity_1=require(a9_0x2f6d01(0x1b1));Object[a9_0x2f6d01(0x18a)](exports,'InjectEntity',{'enumerable':!![],'get':function(){var _0x2d37e7=a9_0x2f6d01;return InjectEntity_1[_0x2d37e7(0x19f)];}});function a9_0x167a(_0x3ea345,_0x187bbc){var _0x413532=a9_0x4135();return a9_0x167a=function(_0x167a0a,_0x512937){_0x167a0a=_0x167a0a-0x18a;var _0xcc7929=_0x413532[_0x167a0a];return _0xcc7929;},a9_0x167a(_0x3ea345,_0x187bbc);}var InjectRepository_1=require(a9_0x2f6d01(0x1b0));function a9_0x4135(){var _0x4fd025=['./decorator/ProvideRepository','VirtualColumn','hasOwnProperty','Search','10657248IevjQk','__createBinding','prototype','CustomConfiguration','Scope','4330FPnrVM','./decorator/VirtualColumn','ProvideSearch','./decorator/InjectRepository','./decorator/InjectEntity','ProvideEntity','344733cUvyrt','default','defineProperty','writable','179002KUbbFo','configurable','getOwnPropertyDescriptor','./interface','getDataSourceEntity','10872WDukay','Provide','994400zBlRGw','./decorator/ProvideSearch','Inject','Repository','Configuration','./decorator/ProvideEntity','63UAhyDR','ScopeEnum','ProvideRepository','57850331yqlYUS','7UTaaoz','82940VVydfX','InjectEntity','28EUJZEP','InjectRepository','__esModule','create'];a9_0x4135=function(){return _0x4fd025;};return a9_0x4135();}Object[a9_0x2f6d01(0x18a)](exports,a9_0x2f6d01(0x1a1),{'enumerable':!![],'get':function(){var _0x54bb8a=a9_0x2f6d01;return InjectRepository_1[_0x54bb8a(0x1a1)];}});var ProvideEntity_1=require(a9_0x2f6d01(0x198));Object[a9_0x2f6d01(0x18a)](exports,a9_0x2f6d01(0x1b2),{'enumerable':!![],'get':function(){var _0x38ea5c=a9_0x2f6d01;return ProvideEntity_1[_0x38ea5c(0x1b2)];}});var ProvideRepository_1=require(a9_0x2f6d01(0x1a4));Object[a9_0x2f6d01(0x18a)](exports,a9_0x2f6d01(0x19b),{'enumerable':!![],'get':function(){var _0xdd3a46=a9_0x2f6d01;return ProvideRepository_1[_0xdd3a46(0x19b)];}});var ProvideSearch_1=require(a9_0x2f6d01(0x194));Object[a9_0x2f6d01(0x18a)](exports,a9_0x2f6d01(0x1af),{'enumerable':!![],'get':function(){return ProvideSearch_1['ProvideSearch'];}}),Object[a9_0x2f6d01(0x18a)](exports,'Search',{'enumerable':!![],'get':function(){var _0x5e861e=a9_0x2f6d01;return ProvideSearch_1[_0x5e861e(0x1a7)];}});var getDataSourceEntity_1=require('./helper/getDataSourceEntity');Object[a9_0x2f6d01(0x18a)](exports,a9_0x2f6d01(0x190),{'enumerable':!![],'get':function(){var _0x3b6ea0=a9_0x2f6d01;return getDataSourceEntity_1[_0x3b6ea0(0x190)];}});var configuration_1=require('./configuration');Object['defineProperty'](exports,'Configuration',{'enumerable':!![],'get':function(){var _0x45a8da=a9_0x2f6d01;return configuration_1[_0x45a8da(0x1ab)];}});var core_1=require('@midwayjs/core');Object[a9_0x2f6d01(0x18a)](exports,a9_0x2f6d01(0x192),{'enumerable':!![],'get':function(){var _0x4fc6be=a9_0x2f6d01;return core_1[_0x4fc6be(0x192)];}}),Object[a9_0x2f6d01(0x18a)](exports,a9_0x2f6d01(0x195),{'enumerable':!![],'get':function(){var _0xb94a1d=a9_0x2f6d01;return core_1[_0xb94a1d(0x195)];}}),Object[a9_0x2f6d01(0x18a)](exports,a9_0x2f6d01(0x1ac),{'enumerable':!![],'get':function(){var _0x5712aa=a9_0x2f6d01;return core_1[_0x5712aa(0x1ac)];}}),Object[a9_0x2f6d01(0x18a)](exports,'ScopeEnum',{'enumerable':!![],'get':function(){var _0x1a8c64=a9_0x2f6d01;return core_1[_0x1a8c64(0x19a)];}});
|
package/dist/interface.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a10_0x5742b3=a10_0xba23;(function(_0x14988e,_0x70c6ce){const _0x40820d=a10_0xba23,_0x1d3dba=_0x14988e();while(!![]){try{const _0xf7b904=-parseInt(_0x40820d(0x13b))/0x1*(-parseInt(_0x40820d(0x118))/0x2)+parseInt(_0x40820d(0x12a))/0x3+parseInt(_0x40820d(0x134))/0x4*(parseInt(_0x40820d(0x140))/0x5)+-parseInt(_0x40820d(0x119))/0x6*(parseInt(_0x40820d(0x126))/0x7)+-parseInt(_0x40820d(0x123))/0x8*(parseInt(_0x40820d(0x122))/0x9)+parseInt(_0x40820d(0x148))/0xa+parseInt(_0x40820d(0x147))/0xb*(-parseInt(_0x40820d(0x143))/0xc);if(_0xf7b904===_0x70c6ce)break;else _0x1d3dba['push'](_0x1d3dba['shift']());}catch(_0x1c8836){_0x1d3dba['push'](_0x1d3dba['shift']());}}}(a10_0x1649,0x70f5b));Object[a10_0x5742b3(0x127)](exports,'__esModule',{'value':!![]}),exports[a10_0x5742b3(0x117)]=exports[a10_0x5742b3(0x11e)]=exports[a10_0x5742b3(0x142)]=exports[a10_0x5742b3(0x13f)]=exports['REPOSITORY_KEY']=exports[a10_0x5742b3(0x141)]=exports[a10_0x5742b3(0x13c)]=exports[a10_0x5742b3(0x125)]=void 0x0;const core_1=require(a10_0x5742b3(0x137)),typeorm_1=require(a10_0x5742b3(0x12b)),typeorm_2=require('typeorm');function a10_0x1649(){const _0x3a437a=['default','ENTITY_VIRTUAL_COLUMN_KEY','EntityManager','hasOwnProperty','decorator:anncic-api:typeorm:entify:module:source','25173GWcmjD','1112wIoYjU','findOneOrFail','ENTIFY_KEY','7tgoMzH','defineProperty','name','resolve','1578462tJHcED','typeorm','findOneByOrFail','prototype','updateDateColumn','OptimisticLockCanNotBeUsedError','metadata','getManyAndCount','getClassMetadata','decorator:anncic-api:typeorm:repository','2315524sWyWUG','then','lockVersion','@midwayjs/core','decorator:anncic-api:typeorm:entity:virtual:column','SelectQueryBuilder','getMany','1330aikjtz','ENTIFY_MODULE','EntityNotFoundError','OptimisticLockVersionMismatchError','MODEL_KEY','5IjgaYS','ENTIFY_MODULE_SOURCE','MODEL_SEARCH_KEY','12ixVukh','optimistic','decorator:anncic-api:typeorm:entify','reject','9386729YWJViF','2282750rPHflh','getEntityValue','lockMode','expressionMap','SearchPaginate','856YTrFcD','1186470WTdZBH','getRawAndEntities','findOneBy','map'];a10_0x1649=function(){return _0x3a437a;};return a10_0x1649();}exports[a10_0x5742b3(0x125)]=a10_0x5742b3(0x145),exports[a10_0x5742b3(0x13c)]='decorator:anncic-api:typeorm:entify:module',exports[a10_0x5742b3(0x141)]=a10_0x5742b3(0x121),exports['REPOSITORY_KEY']=a10_0x5742b3(0x133),exports['MODEL_KEY']='decorator:anncic-api:typeorm:model',exports['MODEL_SEARCH_KEY']='decorator:anncic-api:typeorm:model:search',exports[a10_0x5742b3(0x11e)]=a10_0x5742b3(0x138);function a10_0xba23(_0x473121,_0x3f99eb){const _0x1649cd=a10_0x1649();return a10_0xba23=function(_0xba23fb,_0x4290af){_0xba23fb=_0xba23fb-0x115;let _0x112d3d=_0x1649cd[_0xba23fb];return _0x112d3d;},a10_0xba23(_0x473121,_0x3f99eb);}class SearchPaginate{}exports[a10_0x5742b3(0x117)]=SearchPaginate,typeorm_2[a10_0x5742b3(0x11f)][a10_0x5742b3(0x12d)][a10_0x5742b3(0x124)]=async function(_0x28987a,_0x19fbef){const _0x1b6d84=a10_0x5742b3;return this['findOne'](_0x28987a,_0x19fbef)[_0x1b6d84(0x135)](_0x1dc442=>{const _0x269b34=_0x1b6d84;if(_0x1dc442===null||_0x1dc442===undefined)return Promise[_0x269b34(0x146)](new typeorm_2[(_0x269b34(0x13d))](_0x28987a,_0x19fbef));return Promise[_0x269b34(0x129)](_0x1dc442);});},typeorm_2['EntityManager'][a10_0x5742b3(0x12d)][a10_0x5742b3(0x12c)]=async function(_0x40ff4d,_0x5ac884){const _0x3d5176=a10_0x5742b3;return this[_0x3d5176(0x11b)](_0x40ff4d,_0x5ac884)[_0x3d5176(0x135)](_0x29277c=>{const _0xeadcd8=_0x3d5176;if(_0x29277c===null||_0x29277c===undefined)return Promise[_0xeadcd8(0x146)](new typeorm_2[(_0xeadcd8(0x13d))](_0x40ff4d,_0x5ac884));return Promise[_0xeadcd8(0x129)](_0x29277c);});},typeorm_1[a10_0x5742b3(0x139)]['prototype'][a10_0x5742b3(0x13a)]=async function(){const _0x5eb713=a10_0x5742b3;if(this[_0x5eb713(0x116)]['lockMode']===_0x5eb713(0x144))throw new typeorm_1[(_0x5eb713(0x12f))]();const {entities:_0xc465ab,raw:_0x3b3cf7}=await this[_0x5eb713(0x11a)]();return _0xc465ab[_0x5eb713(0x11c)]((_0x5a7d3e,_0x176519)=>{const _0x139b89=_0x5eb713;var _0xb79c12;const _0x363a31=(0x0,core_1['getClassMetadata'])(exports[_0x139b89(0x11e)],_0x5a7d3e)||{};for(const _0x260d05 in _0x363a31){_0x3b3cf7[_0x176519]&&_0x3b3cf7[_0x176519][_0x139b89(0x120)](_0x260d05)&&(_0x5a7d3e[_0x260d05]=_0x3b3cf7[_0x176519][_0x260d05]||((_0xb79c12=_0x363a31[_0x260d05])===null||_0xb79c12===void 0x0?void 0x0:_0xb79c12['default'])||'');}return _0x5a7d3e;});},typeorm_1[a10_0x5742b3(0x139)][a10_0x5742b3(0x12d)][a10_0x5742b3(0x131)]=async function(){const _0x2980eb=a10_0x5742b3;return[await this[_0x2980eb(0x13a)](),await this['getCount']()];},typeorm_1[a10_0x5742b3(0x139)][a10_0x5742b3(0x12d)]['getOne']=async function(){const _0x37abf4=a10_0x5742b3;var _0x192f23;const {entities:_0x5acf5b,raw:_0x4eefbe}=await this['getRawAndEntities']();if(_0x5acf5b[0x0]&&this['expressionMap'][_0x37abf4(0x115)]==='optimistic'&&this['expressionMap'][_0x37abf4(0x136)]){const _0x4ae379=this[_0x37abf4(0x116)]['mainAlias'][_0x37abf4(0x130)];if(this[_0x37abf4(0x116)][_0x37abf4(0x136)]instanceof Date){const _0x4a7ce5=_0x4ae379[_0x37abf4(0x12e)][_0x37abf4(0x149)](_0x5acf5b[0x0]);if(_0x4a7ce5['getTime']()!==this[_0x37abf4(0x116)][_0x37abf4(0x136)]['getTime']())throw new typeorm_1[(_0x37abf4(0x13e))](_0x4ae379[_0x37abf4(0x128)],this[_0x37abf4(0x116)]['lockVersion'],_0x4a7ce5);}else{const _0x380cef=_0x4ae379['versionColumn']['getEntityValue'](_0x5acf5b[0x0]);if(_0x380cef!==this[_0x37abf4(0x116)]['lockVersion'])throw new typeorm_1[(_0x37abf4(0x13e))](_0x4ae379[_0x37abf4(0x128)],this['expressionMap']['lockVersion'],_0x380cef);}}if(_0x5acf5b[0x0]&&_0x4eefbe[0x0]){const _0x5eff7e=(0x0,core_1[_0x37abf4(0x132)])(exports[_0x37abf4(0x11e)],_0x5acf5b[0x0]);for(const _0x579cf3 in _0x5eff7e){_0x4eefbe[0x0][_0x37abf4(0x120)](_0x579cf3)&&(_0x5acf5b[0x0][_0x579cf3]=_0x4eefbe[0x0][_0x579cf3]||((_0x192f23=_0x5eff7e[_0x579cf3])===null||_0x192f23===void 0x0?void 0x0:_0x192f23[_0x37abf4(0x11d)])||'');}}return _0x5acf5b[0x0]||null;};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anncic-api/typeorm",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"build": "tsc && javascript-obfuscator ./dist --output ./dist --config obfuscator.json"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@midwayjs/typeorm": "^3.
|
|
17
|
+
"@midwayjs/typeorm": "^3.7.1",
|
|
18
18
|
"typeorm": "^0.3.10"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
@@ -22,5 +22,5 @@
|
|
|
22
22
|
"javascript-obfuscator": "2.19.0",
|
|
23
23
|
"typescript": "^4.7.4"
|
|
24
24
|
},
|
|
25
|
-
"gitHead": "
|
|
25
|
+
"gitHead": "cb0b898b43e3770a81b983f8ff7fb02c5c2e6aa4"
|
|
26
26
|
}
|