@anncic-api/typeorm 1.4.4 → 1.4.6
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.d.ts +2 -1
- package/dist/decorator/ProvideSearch.js +1 -1
- package/dist/decorator/VirtualColumn.js +1 -1
- package/dist/definition/Repository.d.ts +1 -0
- package/dist/definition/Repository.js +1 -1
- package/dist/helper/getDataSourceEntity.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/interface.d.ts +2 -0
- package/dist/interface.js +1 -1
- package/package.json +2 -2
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x460be0=a0_0x36c9;(function(_0x391a96,_0x5090c1){const _0x25451f=a0_0x36c9,_0x5ed93b=_0x391a96();while(!![]){try{const _0x1abbd0=parseInt(_0x25451f(0x1a6))/0x1*(-parseInt(_0x25451f(0x191))/0x2)+-parseInt(_0x25451f(0x18d))/0x3*(-parseInt(_0x25451f(0x1b1))/0x4)+-parseInt(_0x25451f(0x18a))/0x5*(parseInt(_0x25451f(0x1aa))/0x6)+-parseInt(_0x25451f(0x18b))/0x7+parseInt(_0x25451f(0x19e))/0x8+parseInt(_0x25451f(0x1a8))/0x9+-parseInt(_0x25451f(0x1b0))/0xa*(parseInt(_0x25451f(0x1af))/0xb);if(_0x1abbd0===_0x5090c1)break;else _0x5ed93b['push'](_0x5ed93b['shift']());}catch(_0x1faec4){_0x5ed93b['push'](_0x5ed93b['shift']());}}}(a0_0x5978,0x7eb07));function a0_0x5978(){const _0x23e297=['REPOSITORY_KEY','object','warn','find','7343976NTAqMZ','name','middlewareError','length','config','push','target','EntityNotFoundError','1HGBcYd','typeorm\x20Error\x20','3189069xagEkS','registerPropertyHandler','60ZmUezJ','typeorm','@midwayjs/typeorm','Inject','decorate','315062OtyYWJ','80aXkBZM','486064SHGFSs','getAsync','decorator','CustomConfiguration','__esModule','onReady','getClassMetadata','handlercache','MidwayConfigService','prototype','@midwayjs/core','useMiddleware','body','Configuration','getDataSourceNameByModel','248065whOPVu','2248624wxvAbx','defineProperty','21iNRobK','__metadata','MidwayDecoratorService','Repository','1115066rxKbuP','function','metadata','__decorate','getEnv','message','TypeORMError','getDataSource','./definition/Repository'];a0_0x5978=function(){return _0x23e297;};return a0_0x5978();}var __decorate=this&&this[a0_0x460be0(0x194)]||function(_0x338492,_0x3c782e,_0x40e920,_0xa698e0){const _0x210ba9=a0_0x460be0;var _0x2339eb=arguments['length'],_0x11cfc7=_0x2339eb<0x3?_0x3c782e:_0xa698e0===null?_0xa698e0=Object['getOwnPropertyDescriptor'](_0x3c782e,_0x40e920):_0xa698e0,_0x1bf398;if(typeof Reflect===_0x210ba9(0x19b)&&typeof Reflect[_0x210ba9(0x1ae)]===_0x210ba9(0x192))_0x11cfc7=Reflect[_0x210ba9(0x1ae)](_0x338492,_0x3c782e,_0x40e920,_0xa698e0);else{for(var _0x492390=_0x338492[_0x210ba9(0x1a1)]-0x1;_0x492390>=0x0;_0x492390--)if(_0x1bf398=_0x338492[_0x492390])_0x11cfc7=(_0x2339eb<0x3?_0x1bf398(_0x11cfc7):_0x2339eb>0x3?_0x1bf398(_0x3c782e,_0x40e920,_0x11cfc7):_0x1bf398(_0x3c782e,_0x40e920))||_0x11cfc7;}return _0x2339eb>0x3&&_0x11cfc7&&Object[_0x210ba9(0x18c)](_0x3c782e,_0x40e920,_0x11cfc7),_0x11cfc7;},__metadata=this&&this[a0_0x460be0(0x18e)]||function(_0x2a73ce,_0x1b8ceb){const _0x3e110e=a0_0x460be0;if(typeof Reflect===_0x3e110e(0x19b)&&typeof Reflect['metadata']===_0x3e110e(0x192))return Reflect[_0x3e110e(0x193)](_0x2a73ce,_0x1b8ceb);};Object[a0_0x460be0(0x18c)](exports,a0_0x460be0(0x1b5),{'value':!![]}),exports[a0_0x460be0(0x1b4)]=void 0x0;const typeorm_1=require(a0_0x460be0(0x1ac)),core_1=require(a0_0x460be0(0x1bb)),core_2=require(a0_0x460be0(0x1bb)),typeorm_2=require(a0_0x460be0(0x1ab)),Repository_1=require(a0_0x460be0(0x199)),interface_1=require('./interface'),typeorm=require(a0_0x460be0(0x1ac));let CustomConfiguration=class CustomConfiguration{constructor(){const _0x14f5c2=a0_0x460be0;this[_0x14f5c2(0x1b8)]=[];}async[a0_0x460be0(0x1b6)](_0x437981,_0x35af2d){const _0x9e051f=a0_0x460be0,_0x42ae24=await _0x437981[_0x9e051f(0x1b2)](typeorm_1['TypeORMDataSourceManager']);this['decorator'][_0x9e051f(0x1a9)](interface_1['ENTIFY_KEY'],(_0x109c57,{entity:_0x2dfa19,connection:_0x332442})=>{const _0x583fc3=_0x9e051f;let _0x25a336=this[_0x583fc3(0x1b8)]['find'](_0x48f64e=>_0x48f64e[_0x583fc3(0x1a4)]===_0x2dfa19);return!_0x25a336&&(_0x25a336=new Repository_1[(_0x583fc3(0x190))](_0x35af2d,_0x437981,_0x42ae24[_0x583fc3(0x198)](_0x332442||_0x42ae24[_0x583fc3(0x189)](_0x2dfa19))['getRepository'](_0x2dfa19)),this['handlercache'][_0x583fc3(0x1a3)](_0x25a336)),_0x25a336;}),this['decorator'][_0x9e051f(0x1a9)](interface_1['REPOSITORY_KEY'],(_0xbe41ca,{repository:_0x277de,connection:_0xe0656a})=>{const _0x6ef68f=_0x9e051f;if(!_0x277de)throw new Error('typeorm\x20Error\x20propertyName\x20is\x20not\x20InjectRepository\x20repository');const {entity:_0x12a24f}=(0x0,core_1[_0x6ef68f(0x1b7)])(interface_1[_0x6ef68f(0x19a)],_0x277de)||{};if(!_0x12a24f)throw new Error(_0x6ef68f(0x1a7)+((_0x277de===null||_0x277de===void 0x0?void 0x0:_0x277de[_0x6ef68f(0x19f)])||_0x277de)+'\x20is\x20not\x20ProvideRepository\x20Entify');let _0x5ddffd=this[_0x6ef68f(0x1b8)][_0x6ef68f(0x19d)](_0x239412=>_0x239412===_0x277de);return!_0x5ddffd&&(_0x5ddffd=new _0x277de(_0x35af2d,_0x437981,_0x42ae24[_0x6ef68f(0x198)](_0xe0656a||_0x42ae24['getDataSourceNameByModel'](_0x12a24f))['getRepository'](_0x12a24f)),this[_0x6ef68f(0x1b8)][_0x6ef68f(0x1a3)](_0x5ddffd)),_0x5ddffd;}),_0x35af2d[_0x9e051f(0x1bc)](this[_0x9e051f(0x1a0)](_0x35af2d));}[a0_0x460be0(0x1a0)](_0x2f0971){return async(_0x9ce7b2,_0x305107)=>{const _0x3eeb69=a0_0x36c9;try{await _0x305107();}catch(_0x43decb){if(_0x43decb instanceof typeorm_2[_0x3eeb69(0x197)])_0x43decb instanceof typeorm_2[_0x3eeb69(0x1a5)]?_0x9ce7b2[_0x3eeb69(0x1bd)]={'code':0x194,'msg':'数据不存在'}:(_0x9ce7b2[_0x3eeb69(0x1bd)]={'code':0x1f4,'msg':_0x43decb[_0x3eeb69(0x196)]},_0x2f0971[_0x3eeb69(0x195)]()!='production'&&console[_0x3eeb69(0x19c)](_0x43decb));else throw _0x43decb;}};}};function a0_0x36c9(_0x4d6728,_0x4e75e6){const _0x597848=a0_0x5978();return a0_0x36c9=function(_0x36c9a4,_0x2d1c19){_0x36c9a4=_0x36c9a4-0x189;let _0x3d57bd=_0x597848[_0x36c9a4];return _0x3d57bd;},a0_0x36c9(_0x4d6728,_0x4e75e6);}__decorate([(0x0,core_1[a0_0x460be0(0x1ad)])(),__metadata('design:type',core_2[a0_0x460be0(0x1b9)])],CustomConfiguration[a0_0x460be0(0x1ba)],a0_0x460be0(0x1a2),void 0x0),__decorate([(0x0,core_1[a0_0x460be0(0x1ad)])(),__metadata('design:type',core_2[a0_0x460be0(0x18f)])],CustomConfiguration['prototype'],a0_0x460be0(0x1b3),void 0x0),CustomConfiguration=__decorate([(0x0,core_1[a0_0x460be0(0x1be)])({'imports':[typeorm],'conflictCheck':![],'namespace':'anncic-api:typeorm'})],CustomConfiguration),exports[a0_0x460be0(0x1b4)]=CustomConfiguration;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';function a1_0x210c(_0x4eb2d3,_0x49778d){const _0x3485d9=a1_0x3485();return a1_0x210c=function(_0x210ca5,_0xe08dac){_0x210ca5=_0x210ca5-0x12b;let _0x3942f0=_0x3485d9[_0x210ca5];return _0x3942f0;},a1_0x210c(_0x4eb2d3,_0x49778d);}const a1_0x2637cb=a1_0x210c;(function(_0x4e383b,_0x21639d){const _0x4d191c=a1_0x210c,_0x397bc1=_0x4e383b();while(!![]){try{const _0x111be8=parseInt(_0x4d191c(0x136))/0x1*(parseInt(_0x4d191c(0x13a))/0x2)+parseInt(_0x4d191c(0x131))/0x3+parseInt(_0x4d191c(0x12e))/0x4*(parseInt(_0x4d191c(0x12d))/0x5)+parseInt(_0x4d191c(0x12f))/0x6+parseInt(_0x4d191c(0x13b))/0x7+-parseInt(_0x4d191c(0x133))/0x8*(parseInt(_0x4d191c(0x135))/0x9)+-parseInt(_0x4d191c(0x12b))/0xa*(parseInt(_0x4d191c(0x139))/0xb);if(_0x111be8===_0x21639d)break;else _0x397bc1['push'](_0x397bc1['shift']());}catch(_0x175fb2){_0x397bc1['push'](_0x397bc1['shift']());}}}(a1_0x3485,0xed5e9));Object[a1_0x2637cb(0x130)](exports,a1_0x2637cb(0x137),{'value':!![]}),exports['InjectEntity']=void 0x0;function a1_0x3485(){const _0xae0f37=['683ySuSOg','__esModule','@midwayjs/core','421883UMNhTA','3792ykUqrn','12496813LzmPlq','1150UWskwR','InjectEntity','992365mHlraQ','4tMXlUF','10331916pyqylc','defineProperty','2663652dXaFtr','createCustomPropertyDecorator','1348560zieVVT','../interface','27ftnBrW'];a1_0x3485=function(){return _0xae0f37;};return a1_0x3485();}const core_1=require(a1_0x2637cb(0x138)),interface_1=require(a1_0x2637cb(0x134));function InjectEntity(_0x165ed9,_0xb38b4a='default'){const _0xf353aa=a1_0x2637cb;return(0x0,core_1[_0xf353aa(0x132)])(interface_1['ENTIFY_KEY'],{'entity':_0x165ed9,'connection':_0xb38b4a});}exports[a1_0x2637cb(0x12c)]=InjectEntity;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a2_0x37febe=a2_0x23bc;function a2_0x23bc(_0x509910,_0x182d2c){const _0x5d602a=a2_0x5d60();return a2_0x23bc=function(_0x23bc5f,_0x4623d0){_0x23bc5f=_0x23bc5f-0x1e4;let _0x5a3f25=_0x5d602a[_0x23bc5f];return _0x5a3f25;},a2_0x23bc(_0x509910,_0x182d2c);}(function(_0x171a66,_0x52de64){const _0x44dec1=a2_0x23bc,_0x22710a=_0x171a66();while(!![]){try{const _0xc9b5b=parseInt(_0x44dec1(0x1f1))/0x1+-parseInt(_0x44dec1(0x1f3))/0x2*(parseInt(_0x44dec1(0x1ee))/0x3)+-parseInt(_0x44dec1(0x1f4))/0x4*(-parseInt(_0x44dec1(0x1e9))/0x5)+-parseInt(_0x44dec1(0x1ef))/0x6*(-parseInt(_0x44dec1(0x1ec))/0x7)+-parseInt(_0x44dec1(0x1ea))/0x8+parseInt(_0x44dec1(0x1e7))/0x9*(-parseInt(_0x44dec1(0x1e5))/0xa)+-parseInt(_0x44dec1(0x1e6))/0xb;if(_0xc9b5b===_0x52de64)break;else _0x22710a['push'](_0x22710a['shift']());}catch(_0xf1d28){_0x22710a['push'](_0x22710a['shift']());}}}(a2_0x5d60,0xc20fb));Object['defineProperty'](exports,a2_0x37febe(0x1f2),{'value':!![]}),exports[a2_0x37febe(0x1ed)]=void 0x0;const core_1=require('@midwayjs/core'),interface_1=require(a2_0x37febe(0x1f0));function InjectRepository(_0x261c91,_0x321b40=a2_0x37febe(0x1e8)){const _0x37a832=a2_0x37febe;return(0x0,core_1[_0x37a832(0x1e4)])(interface_1[_0x37a832(0x1eb)],{'repository':_0x261c91,'connection':_0x321b40});}exports['InjectRepository']=InjectRepository;function a2_0x5d60(){const _0x81bdbe=['4835979OYfPmd','default','4601755JbbBWw','3176224nquwxF','REPOSITORY_KEY','707WSResr','InjectRepository','1270797GUWlDq','84984FAqeKt','../interface','817206dCqbMi','__esModule','6iAgggT','4DJYyFT','createCustomPropertyDecorator','10vpBGtO','1848990QQEeDx'];a2_0x5d60=function(){return _0x81bdbe;};return a2_0x5d60();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a3_0x15ae81=a3_0x1a54;(function(_0x414610,_0x194a15){const _0x4c5a14=a3_0x1a54,_0x1f46b6=_0x414610();while(!![]){try{const _0x358d64=-parseInt(_0x4c5a14(0x1df))/0x1+-parseInt(_0x4c5a14(0x1de))/0x2+-parseInt(_0x4c5a14(0x1e0))/0x3+parseInt(_0x4c5a14(0x1ed))/0x4*(-parseInt(_0x4c5a14(0x1d8))/0x5)+parseInt(_0x4c5a14(0x1da))/0x6+parseInt(_0x4c5a14(0x1ec))/0x7+parseInt(_0x4c5a14(0x1e9))/0x8;if(_0x358d64===_0x194a15)break;else _0x1f46b6['push'](_0x1f46b6['shift']());}catch(_0x26fdd9){_0x1f46b6['push'](_0x1f46b6['shift']());}}}(a3_0x698e,0x5484e));Object[a3_0x15ae81(0x1eb)](exports,a3_0x15ae81(0x1e1),{'value':!![]}),exports[a3_0x15ae81(0x1e7)]=void 0x0;const typeorm_1=require(a3_0x15ae81(0x1dd)),core_1=require(a3_0x15ae81(0x1e8)),interface_1=require(a3_0x15ae81(0x1ee));function ProvideEntity(_0x4470d9,_0x3ce2eb={}){return _0x27b623=>{const _0x5c527b=a3_0x1a54;_0x3ce2eb[_0x5c527b(0x1ef)]=_0x4470d9[_0x5c527b(0x1e4)];const _0x234149=[];if(!(_0x4470d9===null||_0x4470d9===void 0x0?void 0x0:_0x4470d9[_0x5c527b(0x1d9)]))_0x234149[_0x5c527b(0x1e2)](_0x5c527b(0x1db));else{if(typeof(_0x4470d9===null||_0x4470d9===void 0x0?void 0x0:_0x4470d9[_0x5c527b(0x1d9)])==_0x5c527b(0x1dc))_0x234149[_0x5c527b(0x1e2)](_0x4470d9===null||_0x4470d9===void 0x0?void 0x0:_0x4470d9[_0x5c527b(0x1d9)]);else{if(Array[_0x5c527b(0x1e6)](_0x4470d9===null||_0x4470d9===void 0x0?void 0x0:_0x4470d9[_0x5c527b(0x1d9)]))for(let _0x37d9b1 of _0x4470d9[_0x5c527b(0x1d9)]||[_0x5c527b(0x1db)]){_0x234149[_0x5c527b(0x1e2)](_0x37d9b1);}}}(0x0,core_1[_0x5c527b(0x1e5)])(interface_1[_0x5c527b(0x1e3)],_0x27b623),(0x0,core_1[_0x5c527b(0x1ea)])(interface_1['ENTIFY_MODULE_SOURCE'],{'tableName':_0x4470d9['tableName'],'dataSource':_0x234149},_0x27b623),(0x0,typeorm_1['Entity'])(_0x4470d9[_0x5c527b(0x1e4)],_0x3ce2eb)(_0x27b623);};}exports[a3_0x15ae81(0x1e7)]=ProvideEntity;function a3_0x1a54(_0x5cfc70,_0x404a14){const _0x698e54=a3_0x698e();return a3_0x1a54=function(_0x1a547e,_0x476ecc){_0x1a547e=_0x1a547e-0x1d8;let _0x53a9a9=_0x698e54[_0x1a547e];return _0x53a9a9;},a3_0x1a54(_0x5cfc70,_0x404a14);}function a3_0x698e(){const _0x386b66=['tableName','saveModule','isArray','ProvideEntity','@midwayjs/core','9620704dhHEOm','saveClassMetadata','defineProperty','1044190MzrUzJ','75824APsGmW','../interface','name','5tpswqk','dataSource','2128338dwtFEG','default','string','typeorm','1218724aqBFMZ','173175RSEkvg','1676394qjQvzA','__esModule','push','ENTIFY_MODULE'];a3_0x698e=function(){return _0x386b66;};return a3_0x698e();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a4_0xc56756=a4_0x11e7;function a4_0x5af1(){const _0xca1f1e=['21HOlvDv','ProvideRepository','REPOSITORY_KEY','307GTHPvn','710500UaFMSb','Provide','131220esGBdb','1607760YzOqlH','saveClassMetadata','Scope','ScopeEnum','1724148uxhITM','454lkvPLT','22136sGSACg','@midwayjs/core','Request','../interface','585GguTig','4605890dlAqOY'];a4_0x5af1=function(){return _0xca1f1e;};return a4_0x5af1();}(function(_0x573bba,_0x7b2046){const _0xfa41e=a4_0x11e7,_0x1d9dfd=_0x573bba();while(!![]){try{const _0xaa2eb9=-parseInt(_0xfa41e(0x1a0))/0x1*(parseInt(_0xfa41e(0x196))/0x2)+parseInt(_0xfa41e(0x19d))/0x3*(parseInt(_0xfa41e(0x1a3))/0x4)+parseInt(_0xfa41e(0x1a4))/0x5+parseInt(_0xfa41e(0x195))/0x6+-parseInt(_0xfa41e(0x1a1))/0x7+-parseInt(_0xfa41e(0x197))/0x8*(-parseInt(_0xfa41e(0x19b))/0x9)+-parseInt(_0xfa41e(0x19c))/0xa;if(_0xaa2eb9===_0x7b2046)break;else _0x1d9dfd['push'](_0x1d9dfd['shift']());}catch(_0x2b658f){_0x1d9dfd['push'](_0x1d9dfd['shift']());}}}(a4_0x5af1,0x5e63e));function a4_0x11e7(_0x7c9586,_0x27575e){const _0x5af19e=a4_0x5af1();return a4_0x11e7=function(_0x11e7a2,_0x4668a9){_0x11e7a2=_0x11e7a2-0x193;let _0x4aa5cd=_0x5af19e[_0x11e7a2];return _0x4aa5cd;},a4_0x11e7(_0x7c9586,_0x27575e);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[a4_0xc56756(0x19e)]=void 0x0;const core_1=require(a4_0xc56756(0x198)),interface_1=require(a4_0xc56756(0x19a));function ProvideRepository(_0x3b8f88){return _0x701d6b=>{const _0x3306d8=a4_0x11e7;(0x0,core_1[_0x3306d8(0x193)])(core_1[_0x3306d8(0x194)][_0x3306d8(0x199)],{'allowDowngrade':!![]})(_0x701d6b),((0x0,core_1[_0x3306d8(0x1a2)])()(_0x701d6b),(0x0,core_1[_0x3306d8(0x1a5)])(interface_1[_0x3306d8(0x19f)],{'entity':_0x3b8f88},_0x701d6b));};}exports[a4_0xc56756(0x19e)]=ProvideRepository;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
export declare function ProvideSearch(model: any): ClassDecorator;
|
|
2
|
-
export declare function Search(field: string, comment
|
|
2
|
+
export declare function Search(field: string, comment: string): MethodDecorator;
|
|
3
|
+
export declare function SearchScope(scope: string, comment: string): MethodDecorator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';function a5_0x3882(){const _0x448e54=['MODEL_KEY','SearchScope','@midwayjs/core','saveModule','561HLyvZC','30hUzHui','ScopeEnum','../interface','7332072veohuv','Search','attachClassMetadata','8090gqvIOb','5139fTxpvB','MODEL_SEARCH_SCOPE_KEY','312JDyoFx','MODEL_SEARCH_KEY','1393850HnKQnc','245707iRONCN','457118LGMnSL','__esModule','5227392ltlSXY','Singleton','Scope','14538CKoICc','defineProperty'];a5_0x3882=function(){return _0x448e54;};return a5_0x3882();}const a5_0x213daf=a5_0x2503;function a5_0x2503(_0x44e0eb,_0x285e13){const _0x388236=a5_0x3882();return a5_0x2503=function(_0x250311,_0x5dd839){_0x250311=_0x250311-0x16e;let _0x31f79b=_0x388236[_0x250311];return _0x31f79b;},a5_0x2503(_0x44e0eb,_0x285e13);}(function(_0x256a03,_0x12e7eb){const _0x322039=a5_0x2503,_0x223176=_0x256a03();while(!![]){try{const _0x354dcf=-parseInt(_0x322039(0x17b))/0x1+parseInt(_0x322039(0x180))/0x2*(-parseInt(_0x322039(0x186))/0x3)+-parseInt(_0x322039(0x17d))/0x4+parseInt(_0x322039(0x179))/0x5*(parseInt(_0x322039(0x16e))/0x6)+parseInt(_0x322039(0x17a))/0x7*(parseInt(_0x322039(0x177))/0x8)+parseInt(_0x322039(0x175))/0x9*(parseInt(_0x322039(0x174))/0xa)+parseInt(_0x322039(0x171))/0xb;if(_0x354dcf===_0x12e7eb)break;else _0x223176['push'](_0x223176['shift']());}catch(_0x2fd1a5){_0x223176['push'](_0x223176['shift']());}}}(a5_0x3882,0xbb80b));Object[a5_0x213daf(0x181)](exports,a5_0x213daf(0x17c),{'value':!![]}),exports[a5_0x213daf(0x183)]=exports['Search']=exports['ProvideSearch']=void 0x0;const core_1=require(a5_0x213daf(0x184)),interface_1=require(a5_0x213daf(0x170));function ProvideSearch(_0x1be73f){return _0x285b77=>{const _0x5d1cde=a5_0x2503;(0x0,core_1[_0x5d1cde(0x185)])(interface_1[_0x5d1cde(0x182)],_0x285b77),(0x0,core_1[_0x5d1cde(0x17f)])(core_1[_0x5d1cde(0x16f)][_0x5d1cde(0x17e)])(_0x285b77),(0x0,core_1['attachClassMetadata'])(interface_1['MODEL_KEY'],_0x1be73f,_0x285b77);};}exports['ProvideSearch']=ProvideSearch;function Search(_0x2494c1,_0x43d63f){return(_0x17371c,_0x59f957,_0x515114)=>{const _0x32c7ff=a5_0x2503;(0x0,core_1[_0x32c7ff(0x173)])(interface_1[_0x32c7ff(0x178)],{'field':_0x2494c1,'comment':_0x43d63f,'target':_0x17371c,'methodName':_0x59f957,'descriptor':_0x515114},_0x17371c);};}exports[a5_0x213daf(0x172)]=Search;function SearchScope(_0x2e058d,_0x3c1b9e){return(_0x4354ab,_0x3db2b5,_0x2ce6e9)=>{const _0x767d35=a5_0x2503;(0x0,core_1['attachClassMetadata'])(interface_1[_0x767d35(0x176)],{'scope':_0x2e058d,'comment':_0x3c1b9e,'target':_0x4354ab,'methodName':_0x3db2b5,'descriptor':_0x2ce6e9},_0x4354ab);};}exports[a5_0x213daf(0x183)]=SearchScope;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a6_0x5c0c10=a6_0x5cd8;(function(_0x110d08,_0x55179e){const _0xefe866=a6_0x5cd8,_0x591cbe=_0x110d08();while(!![]){try{const _0x40e563=-parseInt(_0xefe866(0x9e))/0x1+parseInt(_0xefe866(0xa4))/0x2+parseInt(_0xefe866(0x9f))/0x3*(-parseInt(_0xefe866(0xa1))/0x4)+parseInt(_0xefe866(0xa9))/0x5*(-parseInt(_0xefe866(0xa2))/0x6)+-parseInt(_0xefe866(0x9c))/0x7*(parseInt(_0xefe866(0x9d))/0x8)+parseInt(_0xefe866(0xa3))/0x9+-parseInt(_0xefe866(0xa5))/0xa*(-parseInt(_0xefe866(0xab))/0xb);if(_0x40e563===_0x55179e)break;else _0x591cbe['push'](_0x591cbe['shift']());}catch(_0x7f8c68){_0x591cbe['push'](_0x591cbe['shift']());}}}(a6_0x417c,0xd7db4));Object[a6_0x5c0c10(0xad)](exports,a6_0x5c0c10(0xa0),{'value':!![]}),exports[a6_0x5c0c10(0xaa)]=void 0x0;const core_1=require(a6_0x5c0c10(0xa6)),interface_1=require(a6_0x5c0c10(0xac));function a6_0x5cd8(_0x1f177e,_0x2333b8){const _0x417c24=a6_0x417c();return a6_0x5cd8=function(_0x5cd85c,_0x1fb5e9){_0x5cd85c=_0x5cd85c-0x9c;let _0x943d8=_0x417c24[_0x5cd85c];return _0x943d8;},a6_0x5cd8(_0x1f177e,_0x2333b8);}function VirtualColumn(_0x48d9ff,_0x2a5ea6){return(_0x52dca5,_0x4b2a56)=>{const _0x276f37=a6_0x5cd8,_0x53fdf4=(0x0,core_1[_0x276f37(0xae)])(interface_1[_0x276f37(0xa7)],_0x52dca5)||{};_0x53fdf4[_0x4b2a56]={'comment':_0x48d9ff,..._0x2a5ea6},(0x0,core_1[_0x276f37(0xa8)])(interface_1[_0x276f37(0xa7)],_0x53fdf4,_0x52dca5);};}exports[a6_0x5c0c10(0xaa)]=VirtualColumn;function a6_0x417c(){const _0x9b4566=['defineProperty','getClassMetadata','14binppk','3506528mRPSil','304929sYHIFy','6VqyzkN','__esModule','2576756LzHRHh','504scFDXf','11778048pJzMBu','64762GqeDyU','21310tjGDnI','@midwayjs/core','ENTITY_VIRTUAL_COLUMN_KEY','saveClassMetadata','73235emqcpC','VirtualColumn','16742oosNKE','../interface'];a6_0x417c=function(){return _0x9b4566;};return a6_0x417c();}
|
|
@@ -4,6 +4,7 @@ import { SearchParams, SearchPaginate, SearchOptions } from "../interface";
|
|
|
4
4
|
interface modelSearch {
|
|
5
5
|
model: any;
|
|
6
6
|
searchs: any[];
|
|
7
|
+
searchScopes: any[];
|
|
7
8
|
}
|
|
8
9
|
declare type IsolationLevel = "READ UNCOMMITTED" | "READ COMMITTED" | "REPEATABLE READ" | "SERIALIZABLE";
|
|
9
10
|
export declare class Repository<Entity extends ObjectLiteral> extends BaseRepository<Entity> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a7_0x66a442=a7_0x1c62;(function(_0x3e6835,_0x57d2c7){const _0xe9b1db=a7_0x1c62,_0x2d9a2d=_0x3e6835();while(!![]){try{const _0x79ec7b=-parseInt(_0xe9b1db(0x118))/0x1+-parseInt(_0xe9b1db(0xe2))/0x2+parseInt(_0xe9b1db(0xd2))/0x3*(parseInt(_0xe9b1db(0x108))/0x4)+-parseInt(_0xe9b1db(0xe3))/0x5*(parseInt(_0xe9b1db(0xf3))/0x6)+-parseInt(_0xe9b1db(0xec))/0x7*(-parseInt(_0xe9b1db(0xd5))/0x8)+parseInt(_0xe9b1db(0x10c))/0x9+-parseInt(_0xe9b1db(0x107))/0xa*(parseInt(_0xe9b1db(0xf4))/0xb);if(_0x79ec7b===_0x57d2c7)break;else _0x2d9a2d['push'](_0x2d9a2d['shift']());}catch(_0x5f0f67){_0x2d9a2d['push'](_0x2d9a2d['shift']());}}}(a7_0x17e7,0x5bdd8));Object[a7_0x66a442(0xe8)](exports,a7_0x66a442(0x106),{'value':!![]}),exports[a7_0x66a442(0xd9)]=void 0x0;const core_1=require(a7_0x66a442(0x10d)),typeorm_1=require(a7_0x66a442(0xeb)),interface_1=require(a7_0x66a442(0xdc));function a7_0x1c62(_0x4133e0,_0x2547f6){const _0x17e7cd=a7_0x17e7();return a7_0x1c62=function(_0x1c6242,_0x5e8928){_0x1c6242=_0x1c6242-0xce;let _0x97c5ef=_0x17e7cd[_0x1c6242];return _0x97c5ef;},a7_0x1c62(_0x4133e0,_0x2547f6);}class Repository extends typeorm_1[a7_0x66a442(0xd9)]{constructor(_0x42f64f,_0x138fe7,_0x4a0d9a){const _0x545c50=a7_0x66a442;super(_0x4a0d9a[_0x545c50(0xe4)],_0x4a0d9a[_0x545c50(0xd0)],_0x4a0d9a[_0x545c50(0xf0)]),this['modelSearchs']=[];for(const _0x4b1d4a of(0x0,core_1['getClassMetadata'])(interface_1[_0x545c50(0xe1)],this[_0x545c50(0xe4)])||[]){const _0x2a86d2={'model':_0x4b1d4a,'searchs':[]};for(const _0x43875a of(0x0,core_1[_0x545c50(0x114)])(interface_1['MODEL_SEARCH_KEY'],_0x4b1d4a)||[]){_0x2a86d2[_0x545c50(0xea)][_0x545c50(0xce)](_0x43875a);}this[_0x545c50(0xfe)][_0x545c50(0xce)](_0x2a86d2);}this[_0x545c50(0xe6)]=_0x42f64f,this['container']=_0x138fe7;}async[a7_0x66a442(0x103)](_0xdd9711,_0x373c13,_0x5f20e7={}){const _0x5089c3=a7_0x66a442;var _0xb716e9,_0x43cf65,_0x32a7c6,_0x1d191b,_0x45331d,_0x260938;const _0x420ef3=this[_0x5089c3(0xd4)](undefined,_0x5f20e7===null||_0x5f20e7===void 0x0?void 0x0:_0x5f20e7['queryRunner']),_0x13cc32=[];for(const _0x17e8bb of this[_0x5089c3(0xfe)]){if(_0x17e8bb===null||_0x17e8bb===void 0x0?void 0x0:_0x17e8bb[_0x5089c3(0x11b)]){const _0x596174=await this[_0x5089c3(0xe6)]['getApplicationContext']()[_0x5089c3(0xd1)](_0x17e8bb[_0x5089c3(0x11b)]);if(_0x596174){typeof _0x596174[_0x5089c3(0x102)]==_0x5089c3(0x105)&&await _0x596174['__initialize'][_0x5089c3(0xef)](_0x596174)(_0x420ef3,_0xdd9711,{'paginate':_0x373c13,'queryRunner':_0x5f20e7===null||_0x5f20e7===void 0x0?void 0x0:_0x5f20e7[_0x5089c3(0xf0)]});for(const _0x29fa2f of(_0x17e8bb===null||_0x17e8bb===void 0x0?void 0x0:_0x17e8bb[_0x5089c3(0xea)])||[]){(_0x29fa2f===null||_0x29fa2f===void 0x0?void 0x0:_0x29fa2f[_0x5089c3(0x10f)])&&(_0x29fa2f===null||_0x29fa2f===void 0x0?void 0x0:_0x29fa2f[_0x5089c3(0xf5)])&&typeof _0x596174[_0x29fa2f[_0x5089c3(0xf5)]]==_0x5089c3(0x105)&&(typeof(_0xdd9711===null||_0xdd9711===void 0x0?void 0x0:_0xdd9711[_0x29fa2f[_0x5089c3(0x10f)]])!=_0x5089c3(0xe9)&&!((_0xb716e9=_0xdd9711===null||_0xdd9711===void 0x0?void 0x0:_0xdd9711[_0x29fa2f[_0x5089c3(0x10f)]])===null||_0xb716e9===void 0x0?void 0x0:_0xb716e9['hasOwnProperty'](_0x5089c3(0xf2)))&&(_0x13cc32[_0x5089c3(0x111)](_0x29fa2f[_0x5089c3(0x10f)])==-0x1&&_0x13cc32[_0x5089c3(0xce)](_0x29fa2f[_0x5089c3(0x10f)]),await _0x596174[_0x29fa2f['methodName']][_0x5089c3(0xef)](_0x596174)(_0x420ef3,_0xdd9711[_0x29fa2f[_0x5089c3(0x10f)]],_0xdd9711,{'paginate':_0x373c13,'queryRunner':_0x5f20e7===null||_0x5f20e7===void 0x0?void 0x0:_0x5f20e7[_0x5089c3(0xf0)]})));}}}}for(const _0x36fcbf in _0xdd9711){if(typeof _0xdd9711[_0x36fcbf]==_0x5089c3(0xe9))continue;if(_0x13cc32[_0x5089c3(0x111)](_0x36fcbf)!=-0x1)continue;const _0xdbf570=this['metadata'][_0x5089c3(0xf8)](_0x36fcbf);if(!_0xdbf570)continue;if((_0x43cf65=_0xdd9711===null||_0xdd9711===void 0x0?void 0x0:_0xdd9711[_0x36fcbf])===null||_0x43cf65===void 0x0?void 0x0:_0x43cf65['hasOwnProperty'](_0x5089c3(0xf2))){const _0x3239df=(_0x32a7c6=_0xdd9711[_0x36fcbf])===null||_0x32a7c6===void 0x0?void 0x0:_0x32a7c6[_0x5089c3(0x11a)],_0xefa78c=(_0x1d191b=_0xdd9711[_0x36fcbf])===null||_0x1d191b===void 0x0?void 0x0:_0x1d191b['operator']['trim']()['toUpperCase'](),_0x48c51e=_0x5089c3(0xf1)+_0x36fcbf+'_'+Math[_0x5089c3(0x10b)](Math['random']()*0xa)+Math[_0x5089c3(0x10b)](Math[_0x5089c3(0xcf)]()*0xa)+Math['ceil'](Math[_0x5089c3(0xcf)]()*0xa)+Math['ceil'](Math[_0x5089c3(0xcf)]()*0xa);if(['=','!=','<>','>','>=','<','<=',_0x5089c3(0x100),_0x5089c3(0x104)][_0x5089c3(0x111)](_0xefa78c)!=-0x1)typeof _0x3239df!=_0x5089c3(0xe9)&&_0x420ef3['andWhere'](_0x420ef3[_0x5089c3(0x116)]+'.'+_0x36fcbf+'\x20'+_0xefa78c+'\x20:'+_0x48c51e,{[_0x48c51e]:_0x3239df});else{if(['IN',_0x5089c3(0xed)][_0x5089c3(0x111)](_0xefa78c)!=-0x1){if(typeof _0x3239df!=_0x5089c3(0xe9)){const _0x22f958=Array[_0x5089c3(0xe0)](_0x3239df)?_0x3239df:typeof _0x3239df==_0x5089c3(0xe7)?_0x3239df[_0x5089c3(0xf6)](','):[_0x3239df];_0x22f958['length']==0x0?_0x420ef3[_0x5089c3(0xdb)](_0x5089c3(0xfc)):_0x420ef3['andWhere'](_0x420ef3[_0x5089c3(0x116)]+'.'+_0x36fcbf+'\x20'+_0xefa78c+'(:...'+_0x48c51e+')',{[_0x48c51e]:_0x22f958});}}else{if([_0x5089c3(0xdd),'NOT\x20FIND\x20IN\x20SET']['indexOf'](_0xefa78c)!=-0x1)typeof _0x3239df!=_0x5089c3(0xe9)&&_0x420ef3[_0x5089c3(0xdb)](_0xefa78c+'(:'+_0x48c51e+','+_0x420ef3[_0x5089c3(0x116)]+'.'+_0x36fcbf+')',{[_0x48c51e]:_0x3239df});else{if([_0x5089c3(0xd3),'NOT\x20BETWEEN'][_0x5089c3(0x111)](_0xefa78c)!=-0x1){if(typeof _0x3239df!=_0x5089c3(0xe9)){const _0x54ffcb=Array[_0x5089c3(0xe0)](_0x3239df)?_0x3239df:typeof _0x3239df=='string'?_0x3239df['split'](','):[_0x3239df];_0x54ffcb[_0x5089c3(0x119)]>0x1&&_0x420ef3[_0x5089c3(0xdb)](_0x420ef3['alias']+'.'+_0x36fcbf+'\x20'+_0xefa78c+'\x20:'+_0x48c51e+_0x5089c3(0xfd)+_0x48c51e+'_2',{[''+_0x48c51e]:_0x54ffcb[0x0],[_0x48c51e+'_2']:_0x54ffcb[0x1]});}}else['ISNULL',_0x5089c3(0x112)]['indexOf'](_0xefa78c)!=-0x1&&_0x420ef3['andWhere'](_0xefa78c+'('+_0x420ef3[_0x5089c3(0x116)]+'.'+_0x36fcbf+')');}}}}else{const _0x39b677=((_0x260938=typeof _0xdbf570[_0x5089c3(0xda)]=='function'?(_0x45331d=_0xdbf570===null||_0xdbf570===void 0x0?void 0x0:_0xdbf570['type'])===null||_0x45331d===void 0x0?void 0x0:_0x45331d['name']:_0xdbf570[_0x5089c3(0xda)][_0x5089c3(0x115)]())===null||_0x260938===void 0x0?void 0x0:_0x260938[_0x5089c3(0xee)]())||undefined;if(_0x39b677){if(Array[_0x5089c3(0xe0)](_0xdd9711[_0x36fcbf]))_0xdd9711[_0x36fcbf][_0x5089c3(0x119)]==0x0?_0x420ef3['andWhere'](_0x5089c3(0xfc)):_0x420ef3[_0x5089c3(0xdb)](_0x420ef3[_0x5089c3(0x116)]+'.'+_0x36fcbf+'\x20IN(:..._auto_'+_0x36fcbf+')',{[_0x5089c3(0xf1)+_0x36fcbf]:_0xdd9711[_0x36fcbf]});else _0x39b677=='string'?_0x420ef3[_0x5089c3(0xdb)](_0x420ef3[_0x5089c3(0x116)]+'.'+_0x36fcbf+_0x5089c3(0xfb)+_0x36fcbf,{['_auto_'+_0x36fcbf]:'%'+_0xdd9711[_0x36fcbf]+'%'}):_0x420ef3[_0x5089c3(0xdb)](_0x420ef3['alias']+'.'+_0x36fcbf+_0x5089c3(0xd6)+_0x36fcbf,{[_0x5089c3(0xf1)+_0x36fcbf]:_0xdd9711[_0x36fcbf]});}}}(_0x373c13===null||_0x373c13===void 0x0?void 0x0:_0x373c13[_0x5089c3(0x110)])&&_0x420ef3['take'](Math[_0x5089c3(0xdf)](_0x373c13['_size']));(_0x373c13===null||_0x373c13===void 0x0?void 0x0:_0x373c13[_0x5089c3(0xff)])&&(_0x373c13===null||_0x373c13===void 0x0?void 0x0:_0x373c13[_0x5089c3(0x110)])&&_0x420ef3[_0x5089c3(0x10a)]((Math[_0x5089c3(0xdf)](_0x373c13['_page'])-0x1)*Math[_0x5089c3(0xdf)](_0x373c13['_size']));if(_0x373c13===null||_0x373c13===void 0x0?void 0x0:_0x373c13[_0x5089c3(0xf9)]){if(_0x373c13[_0x5089c3(0xf9)][_0x5089c3(0x111)]('.')!==-0x1)_0x420ef3[_0x5089c3(0xde)](''+_0x373c13['_order'],(_0x373c13===null||_0x373c13===void 0x0?void 0x0:_0x373c13[_0x5089c3(0x113)])?_0x5089c3(0xd8):_0x5089c3(0x10e));else _0x13cc32['indexOf'](_0x373c13[_0x5089c3(0xf9)])==-0x1&&(this[_0x5089c3(0xd7)][_0x5089c3(0xf8)](_0x373c13['_order'])?_0x420ef3[_0x5089c3(0xde)](_0x420ef3['alias']+'.'+_0x373c13[_0x5089c3(0xf9)],(_0x373c13===null||_0x373c13===void 0x0?void 0x0:_0x373c13['_isreverse'])?'ASC':_0x5089c3(0x10e)):_0x420ef3[_0x5089c3(0xde)](''+_0x373c13[_0x5089c3(0xf9)],(_0x373c13===null||_0x373c13===void 0x0?void 0x0:_0x373c13['_isreverse'])?_0x5089c3(0xd8):_0x5089c3(0x10e)));}return typeof(_0x5f20e7===null||_0x5f20e7===void 0x0?void 0x0:_0x5f20e7[_0x5089c3(0xe5)])==_0x5089c3(0x105)&&await(_0x5f20e7===null||_0x5f20e7===void 0x0?void 0x0:_0x5f20e7[_0x5089c3(0xe5)](_0x420ef3)),_0x420ef3;}async['mergeSave'](_0x3c6ef7,..._0x5d3355){const _0x2fd3a9=a7_0x66a442,_0x548a89=this[_0x2fd3a9(0x109)](_0x3c6ef7,..._0x5d3355);return await this[_0x2fd3a9(0xf7)](_0x548a89);}async[a7_0x66a442(0x101)](_0x4d0b01,..._0x526216){const _0xcc8341=a7_0x66a442,_0x16f769=this[_0xcc8341(0x109)](this[_0xcc8341(0xfa)](_0x4d0b01),..._0x526216);return await this[_0xcc8341(0xf7)](_0x16f769);}async[a7_0x66a442(0x117)](_0x4e7b60,_0x3ef797){const _0x1e8d3f=a7_0x66a442;return this[_0x1e8d3f(0xd0)][_0x1e8d3f(0x117)](_0x4e7b60,_0x3ef797);}}function a7_0x17e7(){const _0x4f4698=['NOT\x20ISNULL','_isreverse','getClassMetadata','toString','alias','transaction','1251sVmRjd','length','condition','model','push','random','manager','getAsync','1272ETSwOn','BETWEEN','createQueryBuilder','5581384DvHGhE','\x20=\x20:_auto_','metadata','ASC','Repository','type','andWhere','../interface','FIND\x20IN\x20SET','orderBy','abs','isArray','MODEL_KEY','9490pixeBU','5tuJCrU','target','excess','app','string','defineProperty','undefined','searchs','typeorm','7MtTqLV','NOT\x20IN','toLowerCase','bind','queryRunner','_auto_','operator','1619412VilXea','11801119qhdzGU','methodName','split','save','findColumnWithPropertyName','_order','create','\x20like\x20:_auto_','1\x20=\x202','\x20AND\x20:','modelSearchs','_page','LIKE','createSave','__initialize','search','NOT\x20LIKE','function','__esModule','10WenHEy','5192NULPzk','merge','skip','ceil','4292838LEwKBh','@midwayjs/core','DESC','field','_size','indexOf'];a7_0x17e7=function(){return _0x4f4698;};return a7_0x17e7();}exports[a7_0x66a442(0xd9)]=Repository;
|
|
1
|
+
'use strict';const a7_0x2c4411=a7_0x13b6;(function(_0x232d78,_0x301b27){const _0x35ebb6=a7_0x13b6,_0x3b4868=_0x232d78();while(!![]){try{const _0x42e051=-parseInt(_0x35ebb6(0x190))/0x1*(parseInt(_0x35ebb6(0x17e))/0x2)+-parseInt(_0x35ebb6(0x151))/0x3+-parseInt(_0x35ebb6(0x17c))/0x4*(parseInt(_0x35ebb6(0x143))/0x5)+-parseInt(_0x35ebb6(0x180))/0x6+-parseInt(_0x35ebb6(0x16e))/0x7+-parseInt(_0x35ebb6(0x184))/0x8+parseInt(_0x35ebb6(0x18b))/0x9;if(_0x42e051===_0x301b27)break;else _0x3b4868['push'](_0x3b4868['shift']());}catch(_0x98fff2){_0x3b4868['push'](_0x3b4868['shift']());}}}(a7_0x51bc,0x8693a));Object[a7_0x2c4411(0x178)](exports,a7_0x2c4411(0x160),{'value':!![]}),exports[a7_0x2c4411(0x15f)]=void 0x0;const core_1=require(a7_0x2c4411(0x146)),typeorm_1=require(a7_0x2c4411(0x155)),interface_1=require(a7_0x2c4411(0x158));class Repository extends typeorm_1[a7_0x2c4411(0x15f)]{constructor(_0x53e890,_0x48d53a,_0x30f056){const _0x167a2b=a7_0x2c4411;super(_0x30f056[_0x167a2b(0x157)],_0x30f056[_0x167a2b(0x17a)],_0x30f056[_0x167a2b(0x14d)]),this[_0x167a2b(0x140)]=[];for(const _0x1f4de3 of(0x0,core_1[_0x167a2b(0x185)])(interface_1[_0x167a2b(0x162)],this[_0x167a2b(0x157)])||[]){const _0x5e71bf={'model':_0x1f4de3,'searchs':[],'searchScopes':[]};for(const _0x28f199 of(0x0,core_1[_0x167a2b(0x185)])(interface_1['MODEL_SEARCH_KEY'],_0x1f4de3)||[]){_0x5e71bf[_0x167a2b(0x14f)][_0x167a2b(0x18d)](_0x28f199);}for(const _0x3b20c1 of(0x0,core_1[_0x167a2b(0x185)])(interface_1[_0x167a2b(0x148)],_0x1f4de3)||[]){_0x5e71bf[_0x167a2b(0x169)]['push'](_0x3b20c1);}this[_0x167a2b(0x140)][_0x167a2b(0x18d)](_0x5e71bf);}this[_0x167a2b(0x179)]=_0x53e890,this[_0x167a2b(0x189)]=_0x48d53a;}async[a7_0x2c4411(0x163)](_0x290993,_0x39e37e,_0x21a388={}){const _0x2ce51e=a7_0x2c4411;var _0x4e8ff8,_0x3ece25,_0x48f0e9,_0xe8bea3,_0x45017a,_0x545884;const _0x5f080b=this['createQueryBuilder'](undefined,_0x21a388===null||_0x21a388===void 0x0?void 0x0:_0x21a388[_0x2ce51e(0x14d)]),_0x5af986=[];for(const _0x5501a4 of this[_0x2ce51e(0x140)]){if(_0x5501a4===null||_0x5501a4===void 0x0?void 0x0:_0x5501a4[_0x2ce51e(0x187)]){const _0xdf9b59=await this[_0x2ce51e(0x179)]['getApplicationContext']()[_0x2ce51e(0x16d)](_0x5501a4[_0x2ce51e(0x187)]);if(_0xdf9b59){typeof _0xdf9b59[_0x2ce51e(0x191)]==_0x2ce51e(0x153)&&await _0xdf9b59['__initialize'][_0x2ce51e(0x161)](_0xdf9b59)(_0x5f080b,_0x290993,{'app':this[_0x2ce51e(0x179)],'container':this['container'],'paginate':_0x39e37e,'queryRunner':_0x21a388===null||_0x21a388===void 0x0?void 0x0:_0x21a388[_0x2ce51e(0x14d)]});if(_0x21a388===null||_0x21a388===void 0x0?void 0x0:_0x21a388[_0x2ce51e(0x15c)]){const _0x58d0d4=Array[_0x2ce51e(0x159)](_0x21a388[_0x2ce51e(0x15c)])?_0x21a388[_0x2ce51e(0x15c)]:[_0x21a388[_0x2ce51e(0x15c)]];for(const _0x4805a4 of(_0x5501a4===null||_0x5501a4===void 0x0?void 0x0:_0x5501a4[_0x2ce51e(0x169)])||[]){(_0x4805a4===null||_0x4805a4===void 0x0?void 0x0:_0x4805a4['scope'])&&_0x58d0d4['indexOf'](_0x4805a4['scope'])!=-0x1&&(_0x4805a4===null||_0x4805a4===void 0x0?void 0x0:_0x4805a4[_0x2ce51e(0x166)])&&typeof _0xdf9b59[_0x4805a4[_0x2ce51e(0x166)]]==_0x2ce51e(0x153)&&await _0xdf9b59[_0x4805a4[_0x2ce51e(0x166)]]['bind'](_0xdf9b59)(_0x5f080b,_0x290993,{'app':this[_0x2ce51e(0x179)],'container':this[_0x2ce51e(0x189)],'paginate':_0x39e37e,'queryRunner':_0x21a388===null||_0x21a388===void 0x0?void 0x0:_0x21a388[_0x2ce51e(0x14d)]});}}if(_0x290993)for(const _0x52aef3 of(_0x5501a4===null||_0x5501a4===void 0x0?void 0x0:_0x5501a4[_0x2ce51e(0x14f)])||[]){(_0x52aef3===null||_0x52aef3===void 0x0?void 0x0:_0x52aef3['field'])&&(_0x52aef3===null||_0x52aef3===void 0x0?void 0x0:_0x52aef3['methodName'])&&typeof _0xdf9b59[_0x52aef3['methodName']]==_0x2ce51e(0x153)&&(typeof(_0x290993===null||_0x290993===void 0x0?void 0x0:_0x290993[_0x52aef3[_0x2ce51e(0x14a)]])!=_0x2ce51e(0x142)&&!((_0x4e8ff8=_0x290993===null||_0x290993===void 0x0?void 0x0:_0x290993[_0x52aef3[_0x2ce51e(0x14a)]])===null||_0x4e8ff8===void 0x0?void 0x0:_0x4e8ff8[_0x2ce51e(0x141)](_0x2ce51e(0x188)))&&(_0x5af986[_0x2ce51e(0x16c)](_0x52aef3['field'])==-0x1&&_0x5af986[_0x2ce51e(0x18d)](_0x52aef3['field']),await _0xdf9b59[_0x52aef3[_0x2ce51e(0x166)]][_0x2ce51e(0x161)](_0xdf9b59)(_0x5f080b,_0x290993[_0x52aef3[_0x2ce51e(0x14a)]],_0x290993,{'app':this[_0x2ce51e(0x179)],'container':this[_0x2ce51e(0x189)],'paginate':_0x39e37e,'queryRunner':_0x21a388===null||_0x21a388===void 0x0?void 0x0:_0x21a388[_0x2ce51e(0x14d)]})));}}}}for(const _0x1ed524 in _0x290993){if(typeof _0x290993[_0x1ed524]==_0x2ce51e(0x142))continue;if(_0x5af986[_0x2ce51e(0x16c)](_0x1ed524)!=-0x1)continue;const _0x44b1b8=this['metadata']['findColumnWithPropertyName'](_0x1ed524);if(!_0x44b1b8)continue;if((_0x3ece25=_0x290993===null||_0x290993===void 0x0?void 0x0:_0x290993[_0x1ed524])===null||_0x3ece25===void 0x0?void 0x0:_0x3ece25['hasOwnProperty'](_0x2ce51e(0x188))){const _0x45c46b=(_0x48f0e9=_0x290993[_0x1ed524])===null||_0x48f0e9===void 0x0?void 0x0:_0x48f0e9[_0x2ce51e(0x16b)],_0x1e810b=(_0xe8bea3=_0x290993[_0x1ed524])===null||_0xe8bea3===void 0x0?void 0x0:_0xe8bea3['operator'][_0x2ce51e(0x172)]()[_0x2ce51e(0x18f)](),_0xa41af1=_0x2ce51e(0x150)+_0x1ed524+'_'+Math[_0x2ce51e(0x181)](Math['random']()*0xa)+Math[_0x2ce51e(0x181)](Math[_0x2ce51e(0x182)]()*0xa)+Math['ceil'](Math[_0x2ce51e(0x182)]()*0xa)+Math['ceil'](Math[_0x2ce51e(0x182)]()*0xa);if(['=','!=','<>','>','>=','<','<=',_0x2ce51e(0x17b),_0x2ce51e(0x177)]['indexOf'](_0x1e810b)!=-0x1)typeof _0x45c46b!=_0x2ce51e(0x142)&&_0x5f080b['andWhere'](_0x5f080b[_0x2ce51e(0x17f)]+'.'+_0x1ed524+'\x20'+_0x1e810b+'\x20:'+_0xa41af1,{[_0xa41af1]:_0x45c46b});else{if(['IN',_0x2ce51e(0x15d)]['indexOf'](_0x1e810b)!=-0x1){if(typeof _0x45c46b!=_0x2ce51e(0x142)){const _0x263e7a=Array[_0x2ce51e(0x159)](_0x45c46b)?_0x45c46b:typeof _0x45c46b=='string'?_0x45c46b[_0x2ce51e(0x18a)](','):[_0x45c46b];_0x263e7a[_0x2ce51e(0x193)]==0x0?_0x5f080b[_0x2ce51e(0x154)](_0x2ce51e(0x144)):_0x5f080b['andWhere'](_0x5f080b[_0x2ce51e(0x17f)]+'.'+_0x1ed524+'\x20'+_0x1e810b+_0x2ce51e(0x14c)+_0xa41af1+')',{[_0xa41af1]:_0x263e7a});}}else{if([_0x2ce51e(0x14b),_0x2ce51e(0x165)][_0x2ce51e(0x16c)](_0x1e810b)!=-0x1)typeof _0x45c46b!='undefined'&&_0x5f080b[_0x2ce51e(0x154)](_0x1e810b+'(:'+_0xa41af1+','+_0x5f080b['alias']+'.'+_0x1ed524+')',{[_0xa41af1]:_0x45c46b});else{if([_0x2ce51e(0x18e),_0x2ce51e(0x171)][_0x2ce51e(0x16c)](_0x1e810b)!=-0x1){if(typeof _0x45c46b!=_0x2ce51e(0x142)){const _0x2413b8=Array[_0x2ce51e(0x159)](_0x45c46b)?_0x45c46b:typeof _0x45c46b==_0x2ce51e(0x15b)?_0x45c46b[_0x2ce51e(0x18a)](','):[_0x45c46b];_0x2413b8['length']>0x1&&_0x5f080b[_0x2ce51e(0x154)](_0x5f080b[_0x2ce51e(0x17f)]+'.'+_0x1ed524+'\x20'+_0x1e810b+'\x20:'+_0xa41af1+'\x20AND\x20:'+_0xa41af1+'_2',{[''+_0xa41af1]:_0x2413b8[0x0],[_0xa41af1+'_2']:_0x2413b8[0x1]});}}else[_0x2ce51e(0x14e),_0x2ce51e(0x192)][_0x2ce51e(0x16c)](_0x1e810b)!=-0x1&&_0x5f080b['andWhere'](_0x1e810b+'('+_0x5f080b[_0x2ce51e(0x17f)]+'.'+_0x1ed524+')');}}}}else{const _0x1a3310=((_0x545884=typeof _0x44b1b8['type']=='function'?(_0x45017a=_0x44b1b8===null||_0x44b1b8===void 0x0?void 0x0:_0x44b1b8[_0x2ce51e(0x174)])===null||_0x45017a===void 0x0?void 0x0:_0x45017a[_0x2ce51e(0x15e)]:_0x44b1b8[_0x2ce51e(0x174)][_0x2ce51e(0x173)]())===null||_0x545884===void 0x0?void 0x0:_0x545884[_0x2ce51e(0x170)]())||undefined;if(_0x1a3310){if(Array[_0x2ce51e(0x159)](_0x290993[_0x1ed524]))_0x290993[_0x1ed524][_0x2ce51e(0x193)]==0x0?_0x5f080b[_0x2ce51e(0x154)](_0x2ce51e(0x144)):_0x5f080b[_0x2ce51e(0x154)](_0x5f080b[_0x2ce51e(0x17f)]+'.'+_0x1ed524+_0x2ce51e(0x16a)+_0x1ed524+')',{['_auto_'+_0x1ed524]:_0x290993[_0x1ed524]});else _0x1a3310=='string'?_0x5f080b[_0x2ce51e(0x154)](_0x5f080b[_0x2ce51e(0x17f)]+'.'+_0x1ed524+_0x2ce51e(0x13f)+_0x1ed524,{['_auto_'+_0x1ed524]:'%'+_0x290993[_0x1ed524]+'%'}):_0x5f080b[_0x2ce51e(0x154)](_0x5f080b['alias']+'.'+_0x1ed524+'\x20=\x20:_auto_'+_0x1ed524,{[_0x2ce51e(0x150)+_0x1ed524]:_0x290993[_0x1ed524]});}}}(_0x39e37e===null||_0x39e37e===void 0x0?void 0x0:_0x39e37e['_size'])&&_0x5f080b[_0x2ce51e(0x17d)](Math['abs'](_0x39e37e[_0x2ce51e(0x183)]));(_0x39e37e===null||_0x39e37e===void 0x0?void 0x0:_0x39e37e[_0x2ce51e(0x145)])&&(_0x39e37e===null||_0x39e37e===void 0x0?void 0x0:_0x39e37e[_0x2ce51e(0x183)])&&_0x5f080b[_0x2ce51e(0x168)]((Math[_0x2ce51e(0x15a)](_0x39e37e[_0x2ce51e(0x145)])-0x1)*Math[_0x2ce51e(0x15a)](_0x39e37e['_size']));if(_0x39e37e===null||_0x39e37e===void 0x0?void 0x0:_0x39e37e[_0x2ce51e(0x16f)]){if(_0x39e37e[_0x2ce51e(0x16f)][_0x2ce51e(0x16c)]('.')!==-0x1)_0x5f080b[_0x2ce51e(0x147)](''+_0x39e37e[_0x2ce51e(0x16f)],(_0x39e37e===null||_0x39e37e===void 0x0?void 0x0:_0x39e37e[_0x2ce51e(0x175)])?_0x2ce51e(0x186):'DESC');else _0x5af986['indexOf'](_0x39e37e[_0x2ce51e(0x16f)])==-0x1&&(this['metadata'][_0x2ce51e(0x156)](_0x39e37e[_0x2ce51e(0x16f)])?_0x5f080b['orderBy'](_0x5f080b['alias']+'.'+_0x39e37e[_0x2ce51e(0x16f)],(_0x39e37e===null||_0x39e37e===void 0x0?void 0x0:_0x39e37e[_0x2ce51e(0x175)])?_0x2ce51e(0x186):_0x2ce51e(0x18c)):_0x5f080b[_0x2ce51e(0x147)](''+_0x39e37e[_0x2ce51e(0x16f)],(_0x39e37e===null||_0x39e37e===void 0x0?void 0x0:_0x39e37e[_0x2ce51e(0x175)])?_0x2ce51e(0x186):_0x2ce51e(0x18c)));}return typeof(_0x21a388===null||_0x21a388===void 0x0?void 0x0:_0x21a388[_0x2ce51e(0x164)])==_0x2ce51e(0x153)&&await(_0x21a388===null||_0x21a388===void 0x0?void 0x0:_0x21a388[_0x2ce51e(0x164)](_0x5f080b)),_0x5f080b;}async['mergeSave'](_0x595b51,..._0x455841){const _0x1a4fa1=a7_0x2c4411,_0x49d08c=this['merge'](_0x595b51,..._0x455841);return await this[_0x1a4fa1(0x152)](_0x49d08c);}async['createSave'](_0x4c8dbb,..._0x392c4e){const _0x5f44bc=a7_0x2c4411,_0x79f050=this[_0x5f44bc(0x149)](this[_0x5f44bc(0x176)](_0x4c8dbb),..._0x392c4e);return await this[_0x5f44bc(0x152)](_0x79f050);}async['transaction'](_0xeeb97,_0x520c14){const _0x2cf857=a7_0x2c4411;return this[_0x2cf857(0x17a)][_0x2cf857(0x167)](_0xeeb97,_0x520c14);}}function a7_0x51bc(){const _0x20d167=['skip','searchScopes','\x20IN(:..._auto_','condition','indexOf','getAsync','6140239CUrYmK','_order','toLowerCase','NOT\x20BETWEEN','trim','toString','type','_isreverse','create','NOT\x20LIKE','defineProperty','app','manager','LIKE','4bYdgis','take','144xaIxud','alias','1752180yDrdAY','ceil','random','_size','3025952dbpzfY','getClassMetadata','ASC','model','operator','container','split','35880435NlWKCH','DESC','push','BETWEEN','toUpperCase','8297PGORwT','__initialize','NOT\x20ISNULL','length','\x20like\x20:_auto_','modelSearchs','hasOwnProperty','undefined','4603670PoiVnh','1\x20=\x202','_page','@midwayjs/core','orderBy','MODEL_SEARCH_SCOPE_KEY','merge','field','FIND\x20IN\x20SET','(:...','queryRunner','ISNULL','searchs','_auto_','1109760xtEGpR','save','function','andWhere','typeorm','findColumnWithPropertyName','target','../interface','isArray','abs','string','scope','NOT\x20IN','name','Repository','__esModule','bind','MODEL_KEY','search','excess','NOT\x20FIND\x20IN\x20SET','methodName','transaction'];a7_0x51bc=function(){return _0x20d167;};return a7_0x51bc();}function a7_0x13b6(_0x4f59f6,_0x6efe0e){const _0x51bc29=a7_0x51bc();return a7_0x13b6=function(_0x13b62d,_0x24e88c){_0x13b62d=_0x13b62d-0x13f;let _0x461c39=_0x51bc29[_0x13b62d];return _0x461c39;},a7_0x13b6(_0x4f59f6,_0x6efe0e);}exports[a7_0x2c4411(0x15f)]=Repository;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a8_0x4a2b75=a8_0x79c7;(function(_0x230a87,_0x8500a7){const _0x146f96=a8_0x79c7,_0x171f7a=_0x230a87();while(!![]){try{const _0x20361c=parseInt(_0x146f96(0x1aa))/0x1*(parseInt(_0x146f96(0x1b8))/0x2)+-parseInt(_0x146f96(0x1b5))/0x3+parseInt(_0x146f96(0x1b9))/0x4*(-parseInt(_0x146f96(0x1be))/0x5)+-parseInt(_0x146f96(0x1af))/0x6*(parseInt(_0x146f96(0x1ad))/0x7)+parseInt(_0x146f96(0x1b4))/0x8*(-parseInt(_0x146f96(0x1b3))/0x9)+parseInt(_0x146f96(0x1ab))/0xa*(parseInt(_0x146f96(0x1bd))/0xb)+parseInt(_0x146f96(0x1ae))/0xc*(parseInt(_0x146f96(0x1ba))/0xd);if(_0x20361c===_0x8500a7)break;else _0x171f7a['push'](_0x171f7a['shift']());}catch(_0x599833){_0x171f7a['push'](_0x171f7a['shift']());}}}(a8_0x486e,0x5688f));Object['defineProperty'](exports,a8_0x4a2b75(0x1bc),{'value':!![]}),exports[a8_0x4a2b75(0x1ac)]=void 0x0;function a8_0x79c7(_0x43766,_0xab23c9){const _0x486e8c=a8_0x486e();return a8_0x79c7=function(_0x79c77d,_0x30ac51){_0x79c77d=_0x79c77d-0x1a8;let _0x1dbc0b=_0x486e8c[_0x79c77d];return _0x1dbc0b;},a8_0x79c7(_0x43766,_0xab23c9);}const core_1=require(a8_0x4a2b75(0x1b0)),interface_1=require(a8_0x4a2b75(0x1b1));function a8_0x486e(){const _0x359909=['default','ENTIFY_MODULE_SOURCE','1EoRVtO','62850cUKdaV','getDataSourceEntity','443723uXvxlh','2233752HfMWLE','18yGPeSN','@midwayjs/core','../interface','dataSource','1755BIdZUS','4024xPbONA','1569519WiXHUC','listModule','getClassMetadata','370602hldkVm','200ftjUXO','78MfHAPR','ENTIFY_MODULE','__esModule','187fANSSv','24315UHfRpP'];a8_0x486e=function(){return _0x359909;};return a8_0x486e();}function getDataSourceEntity(_0xbe2546=a8_0x4a2b75(0x1a8)){const _0x2d2125=a8_0x4a2b75;var _0x2315f3;const _0x487fd1=[];for(const _0x651b8a of(0x0,core_1[_0x2d2125(0x1b6)])(interface_1[_0x2d2125(0x1bb)])){const _0x4900bc=(0x0,core_1[_0x2d2125(0x1b7)])(interface_1[_0x2d2125(0x1a9)],_0x651b8a);((_0x2315f3=_0x4900bc===null||_0x4900bc===void 0x0?void 0x0:_0x4900bc[_0x2d2125(0x1b2)])===null||_0x2315f3===void 0x0?void 0x0:_0x2315f3['find'](_0x45fea2=>_0x45fea2==_0xbe2546))&&_0x487fd1['push'](_0x651b8a);}return _0x487fd1;}exports['getDataSourceEntity']=getDataSourceEntity;
|
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export { InjectEntity } from './decorator/InjectEntity';
|
|
|
6
6
|
export { InjectRepository } from './decorator/InjectRepository';
|
|
7
7
|
export { ProvideEntity } from './decorator/ProvideEntity';
|
|
8
8
|
export { ProvideRepository } from './decorator/ProvideRepository';
|
|
9
|
-
export { ProvideSearch, Search } from "./decorator/ProvideSearch";
|
|
9
|
+
export { ProvideSearch, Search, SearchScope } from "./decorator/ProvideSearch";
|
|
10
10
|
export { getDataSourceEntity } from './helper/getDataSourceEntity';
|
|
11
11
|
export { CustomConfiguration as Configuration } from './configuration';
|
|
12
12
|
export { Provide, Inject, Scope, ScopeEnum } from "@midwayjs/core";
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';var a9_0x2d15f6=a9_0x4b9a;(function(_0x4f92e2,_0x2c1d58){var _0x5607f7=a9_0x4b9a,_0x5652a4=_0x4f92e2();while(!![]){try{var _0x1c3009=-parseInt(_0x5607f7(0xcd))/0x1*(parseInt(_0x5607f7(0xe1))/0x2)+parseInt(_0x5607f7(0xd6))/0x3+parseInt(_0x5607f7(0xc9))/0x4*(-parseInt(_0x5607f7(0xbd))/0x5)+parseInt(_0x5607f7(0xda))/0x6+-parseInt(_0x5607f7(0xe0))/0x7*(-parseInt(_0x5607f7(0xd4))/0x8)+-parseInt(_0x5607f7(0xd7))/0x9+parseInt(_0x5607f7(0xd0))/0xa;if(_0x1c3009===_0x2c1d58)break;else _0x5652a4['push'](_0x5652a4['shift']());}catch(_0x3978dc){_0x5652a4['push'](_0x5652a4['shift']());}}}(a9_0x5d58,0x2c454));var __createBinding=this&&this[a9_0x2d15f6(0xd1)]||(Object[a9_0x2d15f6(0xb9)]?function(_0x34678f,_0x502b0c,_0x56d00b,_0x5f2fa5){var _0x4641f1=a9_0x2d15f6;if(_0x5f2fa5===undefined)_0x5f2fa5=_0x56d00b;var _0x537b4=Object[_0x4641f1(0xca)](_0x502b0c,_0x56d00b);(!_0x537b4||('get'in _0x537b4?!_0x502b0c['__esModule']:_0x537b4[_0x4641f1(0xdf)]||_0x537b4[_0x4641f1(0xcf)]))&&(_0x537b4={'enumerable':!![],'get':function(){return _0x502b0c[_0x56d00b];}}),Object[_0x4641f1(0xd3)](_0x34678f,_0x5f2fa5,_0x537b4);}:function(_0x4e56d3,_0x41ed3c,_0x3c3f0f,_0x389a7c){if(_0x389a7c===undefined)_0x389a7c=_0x3c3f0f;_0x4e56d3[_0x389a7c]=_0x41ed3c[_0x3c3f0f];}),__exportStar=this&&this[a9_0x2d15f6(0xdd)]||function(_0x32ebc9,_0x60ff38){var _0x32f6ad=a9_0x2d15f6;for(var _0x1978a7 in _0x32ebc9)if(_0x1978a7!==_0x32f6ad(0xbe)&&!Object[_0x32f6ad(0xd2)]['hasOwnProperty']['call'](_0x60ff38,_0x1978a7))__createBinding(_0x60ff38,_0x32ebc9,_0x1978a7);};Object[a9_0x2d15f6(0xd3)](exports,a9_0x2d15f6(0xc4),{'value':!![]}),exports['ScopeEnum']=exports['Scope']=exports[a9_0x2d15f6(0xd9)]=exports[a9_0x2d15f6(0xc1)]=exports[a9_0x2d15f6(0xe2)]=exports[a9_0x2d15f6(0xd5)]=exports[a9_0x2d15f6(0xde)]=exports[a9_0x2d15f6(0xc2)]=exports[a9_0x2d15f6(0xc7)]=exports[a9_0x2d15f6(0xc8)]=exports[a9_0x2d15f6(0xcc)]=exports[a9_0x2d15f6(0xcb)]=exports['InjectEntity']=exports[a9_0x2d15f6(0xd8)]=exports[a9_0x2d15f6(0xbf)]=void 0x0,__exportStar(require('typeorm'),exports),__exportStar(require(a9_0x2d15f6(0xba)),exports);var Repository_1=require(a9_0x2d15f6(0xc3));Object[a9_0x2d15f6(0xd3)](exports,a9_0x2d15f6(0xbf),{'enumerable':!![],'get':function(){return Repository_1['Repository'];}});var VirtualColumn_1=require('./decorator/VirtualColumn');Object['defineProperty'](exports,'VirtualColumn',{'enumerable':!![],'get':function(){var _0x3a0730=a9_0x2d15f6;return VirtualColumn_1[_0x3a0730(0xd8)];}});var InjectEntity_1=require('./decorator/InjectEntity');Object['defineProperty'](exports,a9_0x2d15f6(0xc5),{'enumerable':!![],'get':function(){var _0xb32dbc=a9_0x2d15f6;return InjectEntity_1[_0xb32dbc(0xc5)];}});var InjectRepository_1=require(a9_0x2d15f6(0xc0));Object['defineProperty'](exports,a9_0x2d15f6(0xcb),{'enumerable':!![],'get':function(){var _0x1beedc=a9_0x2d15f6;return InjectRepository_1[_0x1beedc(0xcb)];}});var ProvideEntity_1=require('./decorator/ProvideEntity');function a9_0x4b9a(_0x2452fa,_0x55b9e1){var _0x5d5854=a9_0x5d58();return a9_0x4b9a=function(_0x4b9a2a,_0x332b22){_0x4b9a2a=_0x4b9a2a-0xb9;var _0x3d7be0=_0x5d5854[_0x4b9a2a];return _0x3d7be0;},a9_0x4b9a(_0x2452fa,_0x55b9e1);}Object[a9_0x2d15f6(0xd3)](exports,a9_0x2d15f6(0xcc),{'enumerable':!![],'get':function(){var _0xbc08df=a9_0x2d15f6;return ProvideEntity_1[_0xbc08df(0xcc)];}});var ProvideRepository_1=require('./decorator/ProvideRepository');Object['defineProperty'](exports,a9_0x2d15f6(0xc8),{'enumerable':!![],'get':function(){var _0x5a802d=a9_0x2d15f6;return ProvideRepository_1[_0x5a802d(0xc8)];}});var ProvideSearch_1=require(a9_0x2d15f6(0xbb));Object['defineProperty'](exports,a9_0x2d15f6(0xc7),{'enumerable':!![],'get':function(){var _0x5bed5e=a9_0x2d15f6;return ProvideSearch_1[_0x5bed5e(0xc7)];}}),Object['defineProperty'](exports,'Search',{'enumerable':!![],'get':function(){var _0x325ed7=a9_0x2d15f6;return ProvideSearch_1[_0x325ed7(0xc2)];}}),Object['defineProperty'](exports,'SearchScope',{'enumerable':!![],'get':function(){var _0x4ca9a2=a9_0x2d15f6;return ProvideSearch_1[_0x4ca9a2(0xde)];}});function a9_0x5d58(){var _0x3b867c=['Scope','ProvideSearch','ProvideRepository','20360AWMlft','getOwnPropertyDescriptor','InjectRepository','ProvideEntity','14477tkNpCG','./configuration','configurable','2983870IJUyoZ','__createBinding','prototype','defineProperty','32DZJHVe','getDataSourceEntity','85935naUhvS','2968641XowLFI','VirtualColumn','Inject','1078722KCKLCv','CustomConfiguration','./helper/getDataSourceEntity','__exportStar','SearchScope','writable','634515dTsQgR','8KpPQCX','Configuration','create','./interface','./decorator/ProvideSearch','ScopeEnum','295xHevDW','default','Repository','./decorator/InjectRepository','Provide','Search','./definition/Repository','__esModule','InjectEntity'];a9_0x5d58=function(){return _0x3b867c;};return a9_0x5d58();}var getDataSourceEntity_1=require(a9_0x2d15f6(0xdc));Object['defineProperty'](exports,a9_0x2d15f6(0xd5),{'enumerable':!![],'get':function(){var _0x121d46=a9_0x2d15f6;return getDataSourceEntity_1[_0x121d46(0xd5)];}});var configuration_1=require(a9_0x2d15f6(0xce));Object['defineProperty'](exports,a9_0x2d15f6(0xe2),{'enumerable':!![],'get':function(){var _0x2162ab=a9_0x2d15f6;return configuration_1[_0x2162ab(0xdb)];}});var core_1=require('@midwayjs/core');Object['defineProperty'](exports,'Provide',{'enumerable':!![],'get':function(){var _0x2ca15e=a9_0x2d15f6;return core_1[_0x2ca15e(0xc1)];}}),Object[a9_0x2d15f6(0xd3)](exports,a9_0x2d15f6(0xd9),{'enumerable':!![],'get':function(){var _0x297927=a9_0x2d15f6;return core_1[_0x297927(0xd9)];}}),Object[a9_0x2d15f6(0xd3)](exports,'Scope',{'enumerable':!![],'get':function(){var _0x16e863=a9_0x2d15f6;return core_1[_0x16e863(0xc6)];}}),Object[a9_0x2d15f6(0xd3)](exports,'ScopeEnum',{'enumerable':!![],'get':function(){var _0x5be6ae=a9_0x2d15f6;return core_1[_0x5be6ae(0xbc)];}});
|
package/dist/interface.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export declare const ENTIFY_MODULE_SOURCE = "decorator:anncic-api:typeorm:entify
|
|
|
6
6
|
export declare const REPOSITORY_KEY = "decorator:anncic-api:typeorm:repository";
|
|
7
7
|
export declare const MODEL_KEY = "decorator:anncic-api:typeorm:model";
|
|
8
8
|
export declare const MODEL_SEARCH_KEY = "decorator:anncic-api:typeorm:model:search";
|
|
9
|
+
export declare const MODEL_SEARCH_SCOPE_KEY = "decorator:anncic-api:typeorm:model:search:scope";
|
|
9
10
|
export declare const ENTITY_VIRTUAL_COLUMN_KEY = "decorator:anncic-api:typeorm:entity:virtual:column";
|
|
10
11
|
export declare type SearchParams<Entity> = {
|
|
11
12
|
[P in keyof Entity]?: {
|
|
@@ -34,5 +35,6 @@ export declare class SearchPaginate {
|
|
|
34
35
|
}
|
|
35
36
|
export interface SearchOptions {
|
|
36
37
|
queryRunner?: QueryRunner;
|
|
38
|
+
scope?: string | string[];
|
|
37
39
|
excess?: <Entity extends ObjectLiteral>(search: SelectQueryBuilder<Entity>) => void;
|
|
38
40
|
}
|
package/dist/interface.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';const a10_0x3fa99f=a10_0xddf7;function a10_0x4538(){const _0x40c143=['decorator:anncic-api:typeorm:entity:virtual:column','getClassMetadata','decorator:anncic-api:typeorm:entify:module:source','then','mainAlias','expressionMap','MODEL_SEARCH_KEY','default','decorator:anncic-api:typeorm:model','833960XlxSiB','versionColumn','2330pwXLwz','decorator:anncic-api:typeorm:model:search:scope','__esModule','@midwayjs/core','resolve','lockMode','MODEL_KEY','decorator:anncic-api:typeorm:model:search','SelectQueryBuilder','8XjPtum','ENTITY_VIRTUAL_COLUMN_KEY','getRawAndEntities','679882JiEqET','5677784sKbQYP','getManyAndCount','lockVersion','984434GRVsCR','getMany','25020SAhfrw','findOne','getTime','5935083MZqvcb','name','ENTIFY_MODULE','reject','EntityManager','OptimisticLockVersionMismatchError','ENTIFY_MODULE_SOURCE','findOneOrFail','hasOwnProperty','findOneByOrFail','MODEL_SEARCH_SCOPE_KEY','ENTIFY_KEY','typeorm','map','SearchPaginate','decorator:anncic-api:typeorm:entify','getEntityValue','prototype','decorator:anncic-api:typeorm:repository','52254WndRuR','getOne','REPOSITORY_KEY','EntityNotFoundError','decorator:anncic-api:typeorm:entify:module','82FRQFRk','12eCWPpu'];a10_0x4538=function(){return _0x40c143;};return a10_0x4538();}(function(_0x568613,_0x377628){const _0x5cc115=a10_0xddf7,_0xb2178=_0x568613();while(!![]){try{const _0x3909fd=parseInt(_0x5cc115(0x121))/0x1+parseInt(_0x5cc115(0x104))/0x2*(parseInt(_0x5cc115(0x123))/0x3)+-parseInt(_0x5cc115(0x11a))/0x4*(parseInt(_0x5cc115(0x10f))/0x5)+parseInt(_0x5cc115(0x105))/0x6*(-parseInt(_0x5cc115(0x11d))/0x7)+parseInt(_0x5cc115(0x11e))/0x8+parseInt(_0x5cc115(0xff))/0x9*(-parseInt(_0x5cc115(0x111))/0xa)+parseInt(_0x5cc115(0x126))/0xb;if(_0x3909fd===_0x377628)break;else _0xb2178['push'](_0xb2178['shift']());}catch(_0x172260){_0xb2178['push'](_0xb2178['shift']());}}}(a10_0x4538,0xa9ae8));function a10_0xddf7(_0x7dbd2e,_0x51937b){const _0x453841=a10_0x4538();return a10_0xddf7=function(_0xddf7d5,_0x1a73f1){_0xddf7d5=_0xddf7d5-0xfd;let _0x570834=_0x453841[_0xddf7d5];return _0x570834;},a10_0xddf7(_0x7dbd2e,_0x51937b);}Object['defineProperty'](exports,a10_0x3fa99f(0x113),{'value':!![]}),exports[a10_0x3fa99f(0x134)]=exports[a10_0x3fa99f(0x11b)]=exports[a10_0x3fa99f(0x130)]=exports[a10_0x3fa99f(0x10c)]=exports[a10_0x3fa99f(0x117)]=exports[a10_0x3fa99f(0x101)]=exports[a10_0x3fa99f(0x12c)]=exports[a10_0x3fa99f(0x128)]=exports['ENTIFY_KEY']=void 0x0;const core_1=require(a10_0x3fa99f(0x114)),typeorm_1=require(a10_0x3fa99f(0x132)),typeorm_2=require(a10_0x3fa99f(0x132));exports[a10_0x3fa99f(0x131)]=a10_0x3fa99f(0x135),exports[a10_0x3fa99f(0x128)]=a10_0x3fa99f(0x103),exports[a10_0x3fa99f(0x12c)]=a10_0x3fa99f(0x108),exports['REPOSITORY_KEY']=a10_0x3fa99f(0xfe),exports[a10_0x3fa99f(0x117)]=a10_0x3fa99f(0x10e),exports[a10_0x3fa99f(0x10c)]=a10_0x3fa99f(0x118),exports[a10_0x3fa99f(0x130)]=a10_0x3fa99f(0x112),exports['ENTITY_VIRTUAL_COLUMN_KEY']=a10_0x3fa99f(0x106);class SearchPaginate{}exports[a10_0x3fa99f(0x134)]=SearchPaginate,typeorm_2[a10_0x3fa99f(0x12a)][a10_0x3fa99f(0xfd)][a10_0x3fa99f(0x12d)]=async function(_0x1d4ffe,_0x16ce56){const _0x26cb70=a10_0x3fa99f;return this[_0x26cb70(0x124)](_0x1d4ffe,_0x16ce56)[_0x26cb70(0x109)](_0x44ac25=>{const _0x1754e7=_0x26cb70;if(_0x44ac25===null||_0x44ac25===undefined)return Promise[_0x1754e7(0x129)](new typeorm_2[(_0x1754e7(0x102))](_0x1d4ffe,_0x16ce56));return Promise[_0x1754e7(0x115)](_0x44ac25);});},typeorm_2[a10_0x3fa99f(0x12a)][a10_0x3fa99f(0xfd)][a10_0x3fa99f(0x12f)]=async function(_0x59e618,_0x1cb882){const _0x4b6fbf=a10_0x3fa99f;return this['findOneBy'](_0x59e618,_0x1cb882)[_0x4b6fbf(0x109)](_0x1707bc=>{const _0x5a137c=_0x4b6fbf;if(_0x1707bc===null||_0x1707bc===undefined)return Promise[_0x5a137c(0x129)](new typeorm_2[(_0x5a137c(0x102))](_0x59e618,_0x1cb882));return Promise[_0x5a137c(0x115)](_0x1707bc);});},typeorm_1['SelectQueryBuilder'][a10_0x3fa99f(0xfd)]['getMany']=async function(){const _0x2e0c99=a10_0x3fa99f;if(this['expressionMap']['lockMode']==='optimistic')throw new typeorm_1['OptimisticLockCanNotBeUsedError']();const {entities:_0x4d5b82,raw:_0x581e55}=await this[_0x2e0c99(0x11c)]();return _0x4d5b82[_0x2e0c99(0x133)]((_0x33e1c4,_0x4ec7e4)=>{const _0x3a12c3=_0x2e0c99;var _0x4abeb6;const _0x13b105=(0x0,core_1[_0x3a12c3(0x107)])(exports[_0x3a12c3(0x11b)],_0x33e1c4)||{};for(const _0x3a9946 in _0x13b105){_0x581e55[_0x4ec7e4]&&_0x581e55[_0x4ec7e4][_0x3a12c3(0x12e)](_0x3a9946)&&(_0x33e1c4[_0x3a9946]=_0x581e55[_0x4ec7e4][_0x3a9946]||((_0x4abeb6=_0x13b105[_0x3a9946])===null||_0x4abeb6===void 0x0?void 0x0:_0x4abeb6['default'])||'');}return _0x33e1c4;});},typeorm_1[a10_0x3fa99f(0x119)][a10_0x3fa99f(0xfd)][a10_0x3fa99f(0x11f)]=async function(){const _0x5b6b91=a10_0x3fa99f;return[await this[_0x5b6b91(0x122)](),await this['getCount']()];},typeorm_1[a10_0x3fa99f(0x119)][a10_0x3fa99f(0xfd)][a10_0x3fa99f(0x100)]=async function(){const _0x5737f7=a10_0x3fa99f;var _0x556ff2;const {entities:_0x414fe5,raw:_0x5536a4}=await this[_0x5737f7(0x11c)]();if(_0x414fe5[0x0]&&this['expressionMap'][_0x5737f7(0x116)]==='optimistic'&&this[_0x5737f7(0x10b)][_0x5737f7(0x120)]){const _0x16e466=this[_0x5737f7(0x10b)][_0x5737f7(0x10a)]['metadata'];if(this[_0x5737f7(0x10b)]['lockVersion']instanceof Date){const _0x5b6548=_0x16e466['updateDateColumn'][_0x5737f7(0x136)](_0x414fe5[0x0]);if(_0x5b6548[_0x5737f7(0x125)]()!==this['expressionMap']['lockVersion']['getTime']())throw new typeorm_1[(_0x5737f7(0x12b))](_0x16e466[_0x5737f7(0x127)],this['expressionMap'][_0x5737f7(0x120)],_0x5b6548);}else{const _0x4b2ca3=_0x16e466[_0x5737f7(0x110)][_0x5737f7(0x136)](_0x414fe5[0x0]);if(_0x4b2ca3!==this[_0x5737f7(0x10b)][_0x5737f7(0x120)])throw new typeorm_1['OptimisticLockVersionMismatchError'](_0x16e466[_0x5737f7(0x127)],this[_0x5737f7(0x10b)][_0x5737f7(0x120)],_0x4b2ca3);}}if(_0x414fe5[0x0]&&_0x5536a4[0x0]){const _0x139aff=(0x0,core_1[_0x5737f7(0x107)])(exports[_0x5737f7(0x11b)],_0x414fe5[0x0]);for(const _0x413bf3 in _0x139aff){_0x5536a4[0x0][_0x5737f7(0x12e)](_0x413bf3)&&(_0x414fe5[0x0][_0x413bf3]=_0x5536a4[0x0][_0x413bf3]||((_0x556ff2=_0x139aff[_0x413bf3])===null||_0x556ff2===void 0x0?void 0x0:_0x556ff2[_0x5737f7(0x10d)])||'');}}return _0x414fe5[0x0]||null;};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anncic-api/typeorm",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.6",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -22,5 +22,5 @@
|
|
|
22
22
|
"javascript-obfuscator": "2.19.0",
|
|
23
23
|
"typescript": "^4.7.4"
|
|
24
24
|
},
|
|
25
|
-
"gitHead": "
|
|
25
|
+
"gitHead": "fe6da800b0c07b4f3a449ec09e8bc0c70ff029ff"
|
|
26
26
|
}
|