@anncic-api/typeorm 1.0.9 → 1.0.13
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/ModelSearch.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.d.ts +2 -4
- package/dist/definition/Repository.js +1 -1
- package/dist/definitions/Repository.js +1 -1
- package/dist/helper/getDataSourceEntity.js +1 -1
- package/dist/helpers/getDataSourceEntity.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -1
- package/dist/interface.d.ts +4 -2
- 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_0x10ec4c=a0_0x15bb;(function(_0x594104,_0x3c90c9){const _0x5c71c6=a0_0x15bb,_0x280f65=_0x594104();while(!![]){try{const _0x3916be=-parseInt(_0x5c71c6(0x10d))/0x1*(parseInt(_0x5c71c6(0xfb))/0x2)+parseInt(_0x5c71c6(0xfc))/0x3*(parseInt(_0x5c71c6(0x118))/0x4)+-parseInt(_0x5c71c6(0x114))/0x5+-parseInt(_0x5c71c6(0xe6))/0x6+-parseInt(_0x5c71c6(0xec))/0x7*(parseInt(_0x5c71c6(0xf6))/0x8)+parseInt(_0x5c71c6(0xfe))/0x9*(parseInt(_0x5c71c6(0xf9))/0xa)+parseInt(_0x5c71c6(0x10f))/0xb;if(_0x3916be===_0x3c90c9)break;else _0x280f65['push'](_0x280f65['shift']());}catch(_0x307e67){_0x280f65['push'](_0x280f65['shift']());}}}(a0_0xbd64,0x3fa61));function a0_0x15bb(_0x4fd406,_0x7f3252){const _0xbd64b3=a0_0xbd64();return a0_0x15bb=function(_0x15bb87,_0x2c86f8){_0x15bb87=_0x15bb87-0xe6;let _0x200201=_0xbd64b3[_0x15bb87];return _0x200201;},a0_0x15bb(_0x4fd406,_0x7f3252);}var __decorate=this&&this[a0_0x10ec4c(0xed)]||function(_0xfbd2ea,_0x1a5479,_0x2022f3,_0x5ece13){const _0x447110=a0_0x10ec4c;var _0x5a5ef1=arguments['length'],_0x73dc9b=_0x5a5ef1<0x3?_0x1a5479:_0x5ece13===null?_0x5ece13=Object[_0x447110(0xf7)](_0x1a5479,_0x2022f3):_0x5ece13,_0x3beb1c;if(typeof Reflect==='object'&&typeof Reflect[_0x447110(0x10e)]===_0x447110(0xff))_0x73dc9b=Reflect[_0x447110(0x10e)](_0xfbd2ea,_0x1a5479,_0x2022f3,_0x5ece13);else{for(var _0x5603b5=_0xfbd2ea[_0x447110(0xf8)]-0x1;_0x5603b5>=0x0;_0x5603b5--)if(_0x3beb1c=_0xfbd2ea[_0x5603b5])_0x73dc9b=(_0x5a5ef1<0x3?_0x3beb1c(_0x73dc9b):_0x5a5ef1>0x3?_0x3beb1c(_0x1a5479,_0x2022f3,_0x73dc9b):_0x3beb1c(_0x1a5479,_0x2022f3))||_0x73dc9b;}return _0x5a5ef1>0x3&&_0x73dc9b&&Object[_0x447110(0x10a)](_0x1a5479,_0x2022f3,_0x73dc9b),_0x73dc9b;},__metadata=this&&this[a0_0x10ec4c(0x113)]||function(_0x1d55cc,_0x1294c2){const _0x5d0512=a0_0x10ec4c;if(typeof Reflect===_0x5d0512(0x111)&&typeof Reflect['metadata']===_0x5d0512(0xff))return Reflect[_0x5d0512(0xf0)](_0x1d55cc,_0x1294c2);};Object[a0_0x10ec4c(0x10a)](exports,'__esModule',{'value':!![]}),exports[a0_0x10ec4c(0x112)]=void 0x0;const typeorm_1=require(a0_0x10ec4c(0x11d)),decorator_1=require(a0_0x10ec4c(0x119)),core_1=require(a0_0x10ec4c(0x109)),typeorm_2=require(a0_0x10ec4c(0x100)),Repository_1=require('./definition/Repository'),interface_1=require(a0_0x10ec4c(0x108)),typeorm=require(a0_0x10ec4c(0x11d));let CustomConfiguration=class CustomConfiguration{constructor(){const _0x477e2f=a0_0x10ec4c;this[_0x477e2f(0x110)]=[];}async['onReady'](_0x3fea34,_0x4cbdbe){const _0x338527=a0_0x10ec4c,_0x376aa2=await _0x3fea34[_0x338527(0x106)](typeorm_1[_0x338527(0x11a)]);this[_0x338527(0xf1)][_0x338527(0xe8)](interface_1[_0x338527(0x102)],(_0x2d4f9c,{entity:_0x150caa,connection:_0x154c82})=>{const _0x391016=_0x338527;let _0x55836f=this['handlercache']['find'](_0x4cdd3d=>_0x4cdd3d[_0x391016(0x11c)]==_0x150caa);return!_0x55836f&&(_0x55836f=new Repository_1[(_0x391016(0xe9))](_0x4cbdbe,_0x376aa2[_0x391016(0x10b)](_0x154c82||_0x376aa2['getDataSourceNameByModel'](_0x150caa))[_0x391016(0x105)](_0x150caa)),this[_0x391016(0x110)][_0x391016(0x11b)](_0x55836f)),_0x55836f;}),this[_0x338527(0xf1)][_0x338527(0xe8)](interface_1[_0x338527(0xf5)],(_0x4baab1,{repository:_0x138dec,connection:_0x52f6b5})=>{const _0xaea7cb=_0x338527,{entity:_0x5b9f17}=(0x0,decorator_1[_0xaea7cb(0xf2)])(interface_1[_0xaea7cb(0xf5)],_0x138dec)||{};if(!_0x5b9f17)throw new Error('anncic-api-typeorm\x20Error\x20'+((_0x138dec===null||_0x138dec===void 0x0?void 0x0:_0x138dec[_0xaea7cb(0xf3)])||_0x138dec)+_0xaea7cb(0xea));let _0x43771f=this[_0xaea7cb(0x110)]['find'](_0x40a4bd=>_0x40a4bd[_0xaea7cb(0x11c)]==_0x5b9f17);return!_0x43771f&&(_0x43771f=new Repository_1['Repository'](_0x4cbdbe,_0x376aa2[_0xaea7cb(0x10b)](_0x52f6b5||_0x376aa2[_0xaea7cb(0x103)](_0x5b9f17))['getRepository'](_0x5b9f17)),this['handlercache'][_0xaea7cb(0x11b)](_0x43771f)),_0x43771f;}),_0x4cbdbe[_0x338527(0x116)](this[_0x338527(0x107)](_0x4cbdbe));}[a0_0x10ec4c(0x107)](_0x22407c){return async(_0x48c16e,_0x59bf0d)=>{const _0x36073b=a0_0x15bb;try{await _0x59bf0d();}catch(_0x11deb0){if(_0x11deb0 instanceof typeorm_2[_0x36073b(0xf4)])_0x11deb0 instanceof typeorm_2['EntityNotFoundError']?_0x48c16e[_0x36073b(0xfd)]={'code':0x194,'msg':'数据不存在'}:(_0x48c16e[_0x36073b(0xfd)]={'code':0x1f4,'msg':_0x11deb0['message']},_0x22407c[_0x36073b(0xfa)]()!=_0x36073b(0xeb)&&console[_0x36073b(0x115)](_0x11deb0));else throw _0x11deb0;}};}};function a0_0xbd64(){const _0x2a2e1a=['108708DEeWDS','MidwayDecoratorService','registerPropertyHandler','Repository','\x20is\x20not\x20ProvideRepository\x20Entify','production','616cTvzYp','__decorate','design:type','anncic-api:typeorm','metadata','decorator','getClassMetadata','name','TypeORMError','REPOSITORY_KEY','3656KaZyYR','getOwnPropertyDescriptor','length','1149100tCuNlm','getEnv','10VMRDmv','117219OruLtZ','body','27hTdYju','function','typeorm','Configuration','ENTIFY_KEY','getDataSourceNameByModel','Inject','getRepository','getAsync','middlewareError','./interface','@midwayjs/core','defineProperty','getDataSource','prototype','1427tFVaDS','decorate','1627142zttAFV','handlercache','object','CustomConfiguration','__metadata','1613850qORxfK','warn','useMiddleware','MidwayConfigService','16ifoITV','@midwayjs/decorator','TypeORMDataSourceManager','push','target','@midwayjs/typeorm'];a0_0xbd64=function(){return _0x2a2e1a;};return a0_0xbd64();}__decorate([(0x0,decorator_1[a0_0x10ec4c(0x104)])(),__metadata('design:type',core_1[a0_0x10ec4c(0x117)])],CustomConfiguration[a0_0x10ec4c(0x10c)],'config',void 0x0),__decorate([(0x0,decorator_1['Inject'])(),__metadata(a0_0x10ec4c(0xee),core_1[a0_0x10ec4c(0xe7)])],CustomConfiguration[a0_0x10ec4c(0x10c)],a0_0x10ec4c(0xf1),void 0x0),CustomConfiguration=__decorate([(0x0,decorator_1[a0_0x10ec4c(0x101)])({'imports':[typeorm],'conflictCheck':![],'namespace':a0_0x10ec4c(0xef)})],CustomConfiguration),exports['CustomConfiguration']=CustomConfiguration;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a1_0x27efc5=a1_0x4b3b;(function(_0x40cbf4,_0xa4f7d){const _0x35097b=a1_0x4b3b,_0x250f28=_0x40cbf4();while(!![]){try{const _0x57c741=-parseInt(_0x35097b(0x152))/0x1*(-parseInt(_0x35097b(0x15d))/0x2)+parseInt(_0x35097b(0x15c))/0x3*(-parseInt(_0x35097b(0x157))/0x4)+-parseInt(_0x35097b(0x159))/0x5+parseInt(_0x35097b(0x158))/0x6+-parseInt(_0x35097b(0x15b))/0x7+parseInt(_0x35097b(0x14f))/0x8*(parseInt(_0x35097b(0x15a))/0x9)+-parseInt(_0x35097b(0x156))/0xa*(-parseInt(_0x35097b(0x150))/0xb);if(_0x57c741===_0xa4f7d)break;else _0x250f28['push'](_0x250f28['shift']());}catch(_0x1eeb24){_0x250f28['push'](_0x250f28['shift']());}}}(a1_0x1fc2,0x489d0));Object[a1_0x27efc5(0x151)](exports,a1_0x27efc5(0x153),{'value':!![]}),exports[a1_0x27efc5(0x155)]=void 0x0;function a1_0x1fc2(){const _0x239d31=['2547535YvHDWV','88101QcGaZV','3694257AtoZEI','852PBTeyy','167894mFexGv','400BAokMn','849662NnWsZF','defineProperty','1igjfbR','__esModule','../interface','InjectEntity','70uAKrZQ','1148rAHYSY','1812594wglQLy'];a1_0x1fc2=function(){return _0x239d31;};return a1_0x1fc2();}function a1_0x4b3b(_0x120227,_0xd9192c){const _0x1fc21f=a1_0x1fc2();return a1_0x4b3b=function(_0x4b3b31,_0x2d84be){_0x4b3b31=_0x4b3b31-0x14f;let _0x522e49=_0x1fc21f[_0x4b3b31];return _0x522e49;},a1_0x4b3b(_0x120227,_0xd9192c);}const decorator_1=require('@midwayjs/decorator'),interface_1=require(a1_0x27efc5(0x154));function InjectEntity(_0x40adf8,_0x17109e='default'){return(0x0,decorator_1['createCustomPropertyDecorator'])(interface_1['ENTIFY_KEY'],{'entity':_0x40adf8,'connection':_0x17109e});}exports[a1_0x27efc5(0x155)]=InjectEntity;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';function a2_0x2c87(_0x3b5c7b,_0x330846){const _0x2e83f9=a2_0x2e83();return a2_0x2c87=function(_0x2c87e9,_0x1c9d82){_0x2c87e9=_0x2c87e9-0x96;let _0x112da7=_0x2e83f9[_0x2c87e9];return _0x112da7;},a2_0x2c87(_0x3b5c7b,_0x330846);}const a2_0x254851=a2_0x2c87;(function(_0x3a1742,_0x5dc0a3){const _0x4f057f=a2_0x2c87,_0x100502=_0x3a1742();while(!![]){try{const _0x27d8eb=-parseInt(_0x4f057f(0xa3))/0x1*(parseInt(_0x4f057f(0x98))/0x2)+parseInt(_0x4f057f(0x96))/0x3*(-parseInt(_0x4f057f(0x9f))/0x4)+parseInt(_0x4f057f(0x97))/0x5*(-parseInt(_0x4f057f(0xa7))/0x6)+parseInt(_0x4f057f(0x9a))/0x7*(-parseInt(_0x4f057f(0x99))/0x8)+-parseInt(_0x4f057f(0xa5))/0x9+parseInt(_0x4f057f(0xa6))/0xa*(-parseInt(_0x4f057f(0xa0))/0xb)+parseInt(_0x4f057f(0xa1))/0xc;if(_0x27d8eb===_0x5dc0a3)break;else _0x100502['push'](_0x100502['shift']());}catch(_0x1c92e8){_0x100502['push'](_0x100502['shift']());}}}(a2_0x2e83,0xc0339));Object[a2_0x254851(0x9b)](exports,a2_0x254851(0xa2),{'value':!![]}),exports[a2_0x254851(0x9e)]=void 0x0;function a2_0x2e83(){const _0x5b088f=['129008dvxuxd','52786764dWrKBC','__esModule','332824CixquD','REPOSITORY_KEY','13544082qTbcvF','170IemJGJ','1032ZfJBIv','3OgOyhP','4655plzEse','4klFEJr','7860904wHsSGC','7zTZWUV','defineProperty','../interface','createCustomPropertyDecorator','InjectRepository','395892LseiTQ'];a2_0x2e83=function(){return _0x5b088f;};return a2_0x2e83();}const decorator_1=require('@midwayjs/decorator'),interface_1=require(a2_0x254851(0x9c));function InjectRepository(_0x3a0726,_0x628338='default'){const _0x530ad2=a2_0x254851;return(0x0,decorator_1[_0x530ad2(0x9d)])(interface_1[_0x530ad2(0xa4)],{'repository':_0x3a0726,'connection':_0x628338});}exports[a2_0x254851(0x9e)]=InjectRepository;
|