@anncic-api/typeorm 1.3.14 → 1.3.16
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.d.ts +2 -2
- package/dist/configuration.js +1 -1
- package/dist/decorator/InjectEntity.js +1 -1
- package/dist/decorator/InjectRepository.d.ts +2 -2
- 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.d.ts +3 -2
- 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 +2 -2
package/dist/configuration.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { MidwayConfigService, MidwayDecoratorService, IMidwayApplication } from '@midwayjs/core';
|
|
1
|
+
import { MidwayConfigService, MidwayDecoratorService, IMidwayContainer, IMidwayApplication } from '@midwayjs/core';
|
|
2
2
|
import { Repository } from "./definition/Repository";
|
|
3
3
|
export declare class CustomConfiguration {
|
|
4
4
|
config: MidwayConfigService;
|
|
5
5
|
decorator: MidwayDecoratorService;
|
|
6
6
|
protected handlercache: Repository<any>[];
|
|
7
|
-
onReady(container:
|
|
7
|
+
onReady(container: IMidwayContainer, app: IMidwayApplication): Promise<void>;
|
|
8
8
|
protected middlewareError(app: IMidwayApplication): (ctx: any, next: any) => Promise<void>;
|
|
9
9
|
}
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x277563=a0_0xbde5;function a0_0xbde5(_0x32b76f,_0x28c0cc){const _0x3565a1=a0_0x3565();return a0_0xbde5=function(_0xbde568,_0x320cac){_0xbde568=_0xbde568-0x147;let _0x6e1dd9=_0x3565a1[_0xbde568];return _0x6e1dd9;},a0_0xbde5(_0x32b76f,_0x28c0cc);}(function(_0x370644,_0x360135){const _0x2225a7=a0_0xbde5,_0x56f423=_0x370644();while(!![]){try{const _0x296830=parseInt(_0x2225a7(0x177))/0x1+-parseInt(_0x2225a7(0x158))/0x2+parseInt(_0x2225a7(0x15f))/0x3*(parseInt(_0x2225a7(0x17c))/0x4)+-parseInt(_0x2225a7(0x148))/0x5*(-parseInt(_0x2225a7(0x16e))/0x6)+-parseInt(_0x2225a7(0x152))/0x7*(-parseInt(_0x2225a7(0x15b))/0x8)+parseInt(_0x2225a7(0x15c))/0x9+-parseInt(_0x2225a7(0x176))/0xa;if(_0x296830===_0x360135)break;else _0x56f423['push'](_0x56f423['shift']());}catch(_0x8b78e2){_0x56f423['push'](_0x56f423['shift']());}}}(a0_0x3565,0x44ff0));function a0_0x3565(){const _0x4b8d6f=['Repository','design:type','decorate','decorator','149494kTlZJX','prototype','getRepository','8vDiztk','1581939WPfXEe','find','@midwayjs/core','3AdSqCM','length','push','defineProperty','name','TypeORMError','object','getOwnPropertyDescriptor','ENTIFY_KEY','Inject','warn','__decorate','getDataSource','\x20is\x20not\x20ProvideRepository\x20Entify','function','3678zIKYbl','getDataSourceNameByModel','REPOSITORY_KEY','getAsync','MidwayConfigService','handlercache','config','MidwayDecoratorService','15952220mGwbey','495024VBjOtr','./interface','__esModule','EntityNotFoundError','CustomConfiguration','2205036uolTqC','anncic-api:typeorm','3470FjmJgk','./definition/Repository','registerPropertyHandler','Configuration','getClassMetadata','message','useMiddleware','typeorm\x20Error\x20','@midwayjs/typeorm','middlewareError','2135707JSYDet','metadata'];a0_0x3565=function(){return _0x4b8d6f;};return a0_0x3565();}var __decorate=this&&this[a0_0x277563(0x16a)]||function(_0x4d415f,_0x4775f7,_0xf75f53,_0x50977d){const _0xb83a55=a0_0x277563;var _0x2b3d63=arguments[_0xb83a55(0x160)],_0xec8cf7=_0x2b3d63<0x3?_0x4775f7:_0x50977d===null?_0x50977d=Object[_0xb83a55(0x166)](_0x4775f7,_0xf75f53):_0x50977d,_0x511780;if(typeof Reflect===_0xb83a55(0x165)&&typeof Reflect[_0xb83a55(0x156)]===_0xb83a55(0x16d))_0xec8cf7=Reflect[_0xb83a55(0x156)](_0x4d415f,_0x4775f7,_0xf75f53,_0x50977d);else{for(var _0x3845ee=_0x4d415f[_0xb83a55(0x160)]-0x1;_0x3845ee>=0x0;_0x3845ee--)if(_0x511780=_0x4d415f[_0x3845ee])_0xec8cf7=(_0x2b3d63<0x3?_0x511780(_0xec8cf7):_0x2b3d63>0x3?_0x511780(_0x4775f7,_0xf75f53,_0xec8cf7):_0x511780(_0x4775f7,_0xf75f53))||_0xec8cf7;}return _0x2b3d63>0x3&&_0xec8cf7&&Object[_0xb83a55(0x162)](_0x4775f7,_0xf75f53,_0xec8cf7),_0xec8cf7;},__metadata=this&&this['__metadata']||function(_0x16f606,_0x1a2ea3){const _0x2a32af=a0_0x277563;if(typeof Reflect===_0x2a32af(0x165)&&typeof Reflect[_0x2a32af(0x153)]===_0x2a32af(0x16d))return Reflect[_0x2a32af(0x153)](_0x16f606,_0x1a2ea3);};Object[a0_0x277563(0x162)](exports,a0_0x277563(0x179),{'value':!![]}),exports[a0_0x277563(0x17b)]=void 0x0;const typeorm_1=require(a0_0x277563(0x150)),core_1=require('@midwayjs/core'),core_2=require(a0_0x277563(0x15e)),typeorm_2=require('typeorm'),Repository_1=require(a0_0x277563(0x149)),interface_1=require(a0_0x277563(0x178)),typeorm=require(a0_0x277563(0x150));let CustomConfiguration=class CustomConfiguration{constructor(){const _0x38e6bc=a0_0x277563;this[_0x38e6bc(0x173)]=[];}async['onReady'](_0x2867ce,_0x3e127f){const _0x1c2599=a0_0x277563,_0x11f213=await _0x2867ce[_0x1c2599(0x171)](typeorm_1['TypeORMDataSourceManager']);this[_0x1c2599(0x157)][_0x1c2599(0x14a)](interface_1[_0x1c2599(0x167)],(_0x1f3b0d,{entity:_0x5ee0d1,connection:_0x5d24b8})=>{const _0x2df685=_0x1c2599;let _0xbd3220=this['handlercache'][_0x2df685(0x15d)](_0x493db1=>_0x493db1['target']===_0x5ee0d1);return!_0xbd3220&&(_0xbd3220=new Repository_1[(_0x2df685(0x154))](_0x3e127f,_0x2867ce,_0x11f213[_0x2df685(0x16b)](_0x5d24b8||_0x11f213[_0x2df685(0x16f)](_0x5ee0d1))[_0x2df685(0x15a)](_0x5ee0d1)),this[_0x2df685(0x173)][_0x2df685(0x161)](_0xbd3220)),_0xbd3220;}),this['decorator']['registerPropertyHandler'](interface_1[_0x1c2599(0x170)],(_0x4d8576,{repository:_0x1c357c,connection:_0x1fa3b4})=>{const _0x5e68a6=_0x1c2599,{entity:_0x45ce93}=(0x0,core_1[_0x5e68a6(0x14c)])(interface_1[_0x5e68a6(0x170)],_0x1c357c)||{};if(!_0x45ce93)throw new Error(_0x5e68a6(0x14f)+((_0x1c357c===null||_0x1c357c===void 0x0?void 0x0:_0x1c357c[_0x5e68a6(0x163)])||_0x1c357c)+_0x5e68a6(0x16c));let _0x40e5d5=this[_0x5e68a6(0x173)]['find'](_0x1b12b5=>_0x1b12b5===_0x1c357c);return!_0x40e5d5&&(_0x40e5d5=new _0x1c357c(_0x3e127f,_0x2867ce,_0x11f213[_0x5e68a6(0x16b)](_0x1fa3b4||_0x11f213[_0x5e68a6(0x16f)](_0x45ce93))[_0x5e68a6(0x15a)](_0x45ce93)),this['handlercache'][_0x5e68a6(0x161)](_0x40e5d5)),_0x40e5d5;}),_0x3e127f[_0x1c2599(0x14e)](this[_0x1c2599(0x151)](_0x3e127f));}['middlewareError'](_0x5ee023){return async(_0x4319fe,_0x56407d)=>{const _0x24c64b=a0_0xbde5;try{await _0x56407d();}catch(_0x44d226){if(_0x44d226 instanceof typeorm_2[_0x24c64b(0x164)])_0x44d226 instanceof typeorm_2[_0x24c64b(0x17a)]?_0x4319fe['body']={'code':0x194,'msg':'数据不存在'}:(_0x4319fe['body']={'code':0x1f4,'msg':_0x44d226[_0x24c64b(0x14d)]},_0x5ee023['getEnv']()!='production'&&console[_0x24c64b(0x169)](_0x44d226));else throw _0x44d226;}};}};__decorate([(0x0,core_1['Inject'])(),__metadata(a0_0x277563(0x155),core_2[a0_0x277563(0x172)])],CustomConfiguration[a0_0x277563(0x159)],a0_0x277563(0x174),void 0x0),__decorate([(0x0,core_1[a0_0x277563(0x168)])(),__metadata('design:type',core_2[a0_0x277563(0x175)])],CustomConfiguration[a0_0x277563(0x159)],a0_0x277563(0x157),void 0x0),CustomConfiguration=__decorate([(0x0,core_1[a0_0x277563(0x14b)])({'imports':[typeorm],'conflictCheck':![],'namespace':a0_0x277563(0x147)})],CustomConfiguration),exports['CustomConfiguration']=CustomConfiguration;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';const a1_0x3494a8=a1_0x1a7d;(function(_0x2d2105,_0xc9dbff){const _0x1f55fb=a1_0x1a7d,_0xcce8e=_0x2d2105();while(!![]){try{const _0x5a2c13=-parseInt(_0x1f55fb(0xad))/0x1*(parseInt(_0x1f55fb(0xba))/0x2)+-parseInt(_0x1f55fb(0xab))/0x3*(parseInt(_0x1f55fb(0xb4))/0x4)+parseInt(_0x1f55fb(0xb5))/0x5*(parseInt(_0x1f55fb(0xb1))/0x6)+-parseInt(_0x1f55fb(0xae))/0x7+-parseInt(_0x1f55fb(0xaa))/0x8*(-parseInt(_0x1f55fb(0xac))/0x9)+-parseInt(_0x1f55fb(0xb3))/0xa+parseInt(_0x1f55fb(0xb6))/0xb;if(_0x5a2c13===_0xc9dbff)break;else _0xcce8e['push'](_0xcce8e['shift']());}catch(_0x4f837a){_0xcce8e['push'](_0xcce8e['shift']());}}}(a1_0xe4dc,0xbd433));function a1_0x1a7d(_0x23a6cd,_0x3e4d1a){const _0xe4dc6d=a1_0xe4dc();return a1_0x1a7d=function(_0x1a7dcc,_0x2abbd5){_0x1a7dcc=_0x1a7dcc-0xa9;let _0x506f88=_0xe4dc6d[_0x1a7dcc];return _0x506f88;},a1_0x1a7d(_0x23a6cd,_0x3e4d1a);}Object[a1_0x3494a8(0xb2)](exports,a1_0x3494a8(0xaf),{'value':!![]}),exports[a1_0x3494a8(0xa9)]=void 0x0;function a1_0xe4dc(){const _0x81bc4a=['6761020qoSdQt','__esModule','ENTIFY_KEY','9162wZjtlD','defineProperty','7621280npEixp','585688wjXazi','3505eeqlEf','29581475nwUAUc','createCustomPropertyDecorator','../interface','default','14406RROvYB','InjectEntity','322216LhYlZQ','9mkXujn','54aNEtqb','147Vzjrkb'];a1_0xe4dc=function(){return _0x81bc4a;};return a1_0xe4dc();}const core_1=require('@midwayjs/core'),interface_1=require(a1_0x3494a8(0xb8));function InjectEntity(_0x23cbe5,_0x2e9592=a1_0x3494a8(0xb9)){const _0x4fcb1d=a1_0x3494a8;return(0x0,core_1[_0x4fcb1d(0xb7)])(interface_1[_0x4fcb1d(0xb0)],{'entity':_0x23cbe5,'connection':_0x2e9592});}exports[a1_0x3494a8(0xa9)]=InjectEntity;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { IMidwayApplication } from '@midwayjs/core';
|
|
1
|
+
import { IMidwayApplication, IMidwayContainer } from '@midwayjs/core';
|
|
2
2
|
import { Repository as BaseRepository, ObjectLiteral } from "typeorm";
|
|
3
3
|
import { Repository } from '../definition/Repository';
|
|
4
4
|
interface RepositoryOption<Entity extends ObjectLiteral> {
|
|
5
|
-
new (app: IMidwayApplication, repository: BaseRepository<Entity>): Repository<Entity>;
|
|
5
|
+
new (app: IMidwayApplication, container: IMidwayContainer, repository: BaseRepository<Entity>): Repository<Entity>;
|
|
6
6
|
}
|
|
7
7
|
export declare function InjectRepository<T extends ObjectLiteral>(repository: RepositoryOption<T>, connection?: string): any;
|
|
8
8
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';const a2_0x3caf7c=a2_0x682b;(function(_0x2a0e1a,_0x2ad30a){const _0x43a0c5=a2_0x682b,_0x4c8cca=_0x2a0e1a();while(!![]){try{const _0x5a9537=-parseInt(_0x43a0c5(0xc4))/0x1*(parseInt(_0x43a0c5(0xbf))/0x2)+-parseInt(_0x43a0c5(0xcb))/0x3+parseInt(_0x43a0c5(0xc2))/0x4+-parseInt(_0x43a0c5(0xc9))/0x5+parseInt(_0x43a0c5(0xc3))/0x6*(parseInt(_0x43a0c5(0xcc))/0x7)+-parseInt(_0x43a0c5(0xc7))/0x8+parseInt(_0x43a0c5(0xc8))/0x9;if(_0x5a9537===_0x2ad30a)break;else _0x4c8cca['push'](_0x4c8cca['shift']());}catch(_0x1955f2){_0x4c8cca['push'](_0x4c8cca['shift']());}}}(a2_0x2263,0x8e308));function a2_0x682b(_0xd5fb8b,_0x496637){const _0x2263b8=a2_0x2263();return a2_0x682b=function(_0x682b18,_0x9e5c09){_0x682b18=_0x682b18-0xbf;let _0x359264=_0x2263b8[_0x682b18];return _0x359264;},a2_0x682b(_0xd5fb8b,_0x496637);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['InjectRepository']=void 0x0;const core_1=require(a2_0x3caf7c(0xc0)),interface_1=require(a2_0x3caf7c(0xc5));function a2_0x2263(){const _0x259d01=['6xkzwsw','148841KQZZsf','../interface','default','5853208cnUtTj','22947192ppbGtM','1519490pQmXRY','createCustomPropertyDecorator','2731494iyOAEe','4851707ubYPgb','InjectRepository','14oLtpCq','@midwayjs/core','REPOSITORY_KEY','1310212ayCoBr'];a2_0x2263=function(){return _0x259d01;};return a2_0x2263();}function InjectRepository(_0x275b63,_0x68720e=a2_0x3caf7c(0xc6)){const _0x191196=a2_0x3caf7c;return(0x0,core_1[_0x191196(0xca)])(interface_1[_0x191196(0xc1)],{'repository':_0x275b63,'connection':_0x68720e});}exports[a2_0x3caf7c(0xcd)]=InjectRepository;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a3_0xe8bcff=a3_0x12db;(function(_0xfa1d2a,_0x4905a2){const _0x1ff03c=a3_0x12db,_0x3027b9=_0xfa1d2a();while(!![]){try{const _0x4c2e70=-parseInt(_0x1ff03c(0x19a))/0x1*(parseInt(_0x1ff03c(0x19b))/0x2)+-parseInt(_0x1ff03c(0x1a5))/0x3+-parseInt(_0x1ff03c(0x1a0))/0x4+parseInt(_0x1ff03c(0x1a9))/0x5+parseInt(_0x1ff03c(0x196))/0x6*(-parseInt(_0x1ff03c(0x1aa))/0x7)+parseInt(_0x1ff03c(0x195))/0x8+parseInt(_0x1ff03c(0x1ac))/0x9*(parseInt(_0x1ff03c(0x197))/0xa);if(_0x4c2e70===_0x4905a2)break;else _0x3027b9['push'](_0x3027b9['shift']());}catch(_0x2a46db){_0x3027b9['push'](_0x3027b9['shift']());}}}(a3_0x3248,0xeeee2));function a3_0x12db(_0x33dbd2,_0x401c70){const _0x3248dc=a3_0x3248();return a3_0x12db=function(_0x12dbdb,_0x361447){_0x12dbdb=_0x12dbdb-0x195;let _0x1d0559=_0x3248dc[_0x12dbdb];return _0x1d0559;},a3_0x12db(_0x33dbd2,_0x401c70);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[a3_0xe8bcff(0x1a6)]=void 0x0;const typeorm_1=require(a3_0xe8bcff(0x19f)),core_1=require(a3_0xe8bcff(0x19d)),interface_1=require(a3_0xe8bcff(0x1a2));function ProvideEntity(_0x3fda47,_0x5516cb={}){return _0x4d4ef0=>{const _0x49acb2=a3_0x12db;_0x5516cb['name']=_0x3fda47[_0x49acb2(0x1a4)];const _0x12e641=[];if(!(_0x3fda47===null||_0x3fda47===void 0x0?void 0x0:_0x3fda47[_0x49acb2(0x1a3)]))_0x12e641[_0x49acb2(0x1ab)](_0x49acb2(0x198));else{if(typeof(_0x3fda47===null||_0x3fda47===void 0x0?void 0x0:_0x3fda47['dataSource'])==_0x49acb2(0x19e))_0x12e641['push'](_0x3fda47===null||_0x3fda47===void 0x0?void 0x0:_0x3fda47['dataSource']);else{if(Array['isArray'](_0x3fda47===null||_0x3fda47===void 0x0?void 0x0:_0x3fda47[_0x49acb2(0x1a3)]))for(let _0x2fe4ba of _0x3fda47[_0x49acb2(0x1a3)]||[_0x49acb2(0x198)]){_0x12e641[_0x49acb2(0x1ab)](_0x2fe4ba);}}}(0x0,core_1[_0x49acb2(0x199)])(interface_1[_0x49acb2(0x1a7)],_0x4d4ef0),(0x0,core_1[_0x49acb2(0x1a1)])(interface_1[_0x49acb2(0x19c)],{'tableName':_0x3fda47['tableName'],'dataSource':_0x12e641},_0x4d4ef0),(0x0,typeorm_1[_0x49acb2(0x1a8)])(_0x3fda47[_0x49acb2(0x1a4)],_0x5516cb)(_0x4d4ef0);};}exports[a3_0xe8bcff(0x1a6)]=ProvideEntity;function a3_0x3248(){const _0x23fe25=['default','saveModule','103959NuxFyp','8WRTpZS','ENTIFY_MODULE_SOURCE','@midwayjs/core','string','typeorm','4483148okRqMo','saveClassMetadata','../interface','dataSource','tableName','5137953KwrMCM','ProvideEntity','ENTIFY_MODULE','Entity','7165785HYBlCK','511YFvtrQ','push','16244586YCBKTp','12425296IgkiPy','46302FPoEbi','10IsxOFS'];a3_0x3248=function(){return _0x23fe25;};return a3_0x3248();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a4_0x308573=a4_0x2bfc;(function(_0x3423b8,_0x1b9200){const _0x5de27d=a4_0x2bfc,_0x552b36=_0x3423b8();while(!![]){try{const _0x45618e=-parseInt(_0x5de27d(0xfe))/0x1*(parseInt(_0x5de27d(0x106))/0x2)+parseInt(_0x5de27d(0x102))/0x3*(parseInt(_0x5de27d(0x109))/0x4)+parseInt(_0x5de27d(0x10a))/0x5+parseInt(_0x5de27d(0x100))/0x6*(-parseInt(_0x5de27d(0x103))/0x7)+-parseInt(_0x5de27d(0xfd))/0x8+-parseInt(_0x5de27d(0xfa))/0x9*(-parseInt(_0x5de27d(0x104))/0xa)+-parseInt(_0x5de27d(0x105))/0xb*(-parseInt(_0x5de27d(0x108))/0xc);if(_0x45618e===_0x1b9200)break;else _0x552b36['push'](_0x552b36['shift']());}catch(_0x25bdfd){_0x552b36['push'](_0x552b36['shift']());}}}(a4_0x2e5b,0x390e9));Object[a4_0x308573(0xfb)](exports,'__esModule',{'value':!![]}),exports[a4_0x308573(0xf8)]=void 0x0;const core_1=require(a4_0x308573(0x107)),interface_1=require(a4_0x308573(0xfc));function ProvideRepository(_0x54d0a0){return _0x39e69d=>{const _0x3c5dc2=a4_0x2bfc;(0x0,core_1[_0x3c5dc2(0x10b)])(core_1[_0x3c5dc2(0x101)]['Request'],{'allowDowngrade':!![]})(_0x39e69d),((0x0,core_1[_0x3c5dc2(0xf9)])()(_0x39e69d),(0x0,core_1[_0x3c5dc2(0xff)])(interface_1['REPOSITORY_KEY'],{'entity':_0x54d0a0},_0x39e69d));};}function a4_0x2bfc(_0x5279f6,_0x317bf4){const _0x2e5b2c=a4_0x2e5b();return a4_0x2bfc=function(_0x2bfc51,_0x1a0910){_0x2bfc51=_0x2bfc51-0xf8;let _0x512a67=_0x2e5b2c[_0x2bfc51];return _0x512a67;},a4_0x2bfc(_0x5279f6,_0x317bf4);}exports[a4_0x308573(0xf8)]=ProvideRepository;function a4_0x2e5b(){const _0x5d26d1=['1063360LCQNTa','Scope','ProvideRepository','Provide','2979dQWgpt','defineProperty','../interface','1067040qfALGe','376142kwxwre','saveClassMetadata','64026owkSFV','ScopeEnum','8409nmALCb','91hFwPuD','11530ItdPNV','403546JncWGo','2FcItpk','@midwayjs/core','84SMkJsO','44NAEife'];a4_0x2e5b=function(){return _0x5d26d1;};return a4_0x2e5b();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';function a5_0x72fd(_0x43f35a,_0x2cc205){const _0x498a49=a5_0x498a();return a5_0x72fd=function(_0x72fd62,_0x234e90){_0x72fd62=_0x72fd62-0x193;let _0x579e86=_0x498a49[_0x72fd62];return _0x579e86;},a5_0x72fd(_0x43f35a,_0x2cc205);}const a5_0x5d2665=a5_0x72fd;(function(_0x32ffd0,_0x8ce5b8){const _0x53b718=a5_0x72fd,_0x15c0bb=_0x32ffd0();while(!![]){try{const _0x58bec2=parseInt(_0x53b718(0x193))/0x1+-parseInt(_0x53b718(0x1a3))/0x2+parseInt(_0x53b718(0x196))/0x3*(-parseInt(_0x53b718(0x199))/0x4)+parseInt(_0x53b718(0x19a))/0x5*(-parseInt(_0x53b718(0x19d))/0x6)+-parseInt(_0x53b718(0x19f))/0x7+-parseInt(_0x53b718(0x1a5))/0x8+-parseInt(_0x53b718(0x198))/0x9*(-parseInt(_0x53b718(0x19c))/0xa);if(_0x58bec2===_0x8ce5b8)break;else _0x15c0bb['push'](_0x15c0bb['shift']());}catch(_0x55f483){_0x15c0bb['push'](_0x15c0bb['shift']());}}}(a5_0x498a,0xa8322));Object[a5_0x5d2665(0x194)](exports,'__esModule',{'value':!![]}),exports[a5_0x5d2665(0x1a4)]=exports['ProvideSearch']=void 0x0;const core_1=require(a5_0x5d2665(0x197)),interface_1=require(a5_0x5d2665(0x1a0));function a5_0x498a(){const _0x49df72=['../interface','attachClassMetadata','MODEL_SEARCH_KEY','745254uwkKXg','Search','8081232YIOzxN','89059raDjLR','defineProperty','saveModule','68037vEPPFV','@midwayjs/core','180sAaebz','228Sfwxyz','110Jocxgj','ProvideSearch','2370520SDuTCv','294342FKtkBb','ScopeEnum','2705017iZwxXq'];a5_0x498a=function(){return _0x49df72;};return a5_0x498a();}function ProvideSearch(_0x1e8600){return _0x527923=>{const _0x1b442a=a5_0x72fd;(0x0,core_1[_0x1b442a(0x195)])(interface_1['MODEL_KEY'],_0x527923),(0x0,core_1['Scope'])(core_1[_0x1b442a(0x19e)]['Singleton'])(_0x527923),(0x0,core_1[_0x1b442a(0x1a1)])(interface_1['MODEL_KEY'],_0x1e8600,_0x527923);};}exports[a5_0x5d2665(0x19b)]=ProvideSearch;function Search(_0xcd7888,_0x237b3a){return(_0x18591e,_0x1baef4,_0x276414)=>{const _0xa32515=a5_0x72fd;(0x0,core_1['attachClassMetadata'])(interface_1[_0xa32515(0x1a2)],{'field':_0xcd7888,'comment':_0x237b3a,'target':_0x18591e,'methodName':_0x1baef4,'descriptor':_0x276414},_0x18591e);};}exports[a5_0x5d2665(0x1a4)]=Search;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a6_0x1e2d9a=a6_0x505e;(function(_0x45df4f,_0x465b03){const _0x1da60e=a6_0x505e,_0x5d8ad8=_0x45df4f();while(!![]){try{const _0xa1a6ad=parseInt(_0x1da60e(0x1bb))/0x1*(parseInt(_0x1da60e(0x1ca))/0x2)+parseInt(_0x1da60e(0x1bc))/0x3*(-parseInt(_0x1da60e(0x1c7))/0x4)+parseInt(_0x1da60e(0x1c2))/0x5*(-parseInt(_0x1da60e(0x1c4))/0x6)+parseInt(_0x1da60e(0x1c8))/0x7+-parseInt(_0x1da60e(0x1b9))/0x8*(-parseInt(_0x1da60e(0x1bf))/0x9)+parseInt(_0x1da60e(0x1c9))/0xa+-parseInt(_0x1da60e(0x1be))/0xb;if(_0xa1a6ad===_0x465b03)break;else _0x5d8ad8['push'](_0x5d8ad8['shift']());}catch(_0x53ddca){_0x5d8ad8['push'](_0x5d8ad8['shift']());}}}(a6_0x3a17,0x2bab5));Object['defineProperty'](exports,a6_0x1e2d9a(0x1c0),{'value':!![]}),exports[a6_0x1e2d9a(0x1c1)]=void 0x0;function a6_0x505e(_0x35989e,_0x479f29){const _0x3a1700=a6_0x3a17();return a6_0x505e=function(_0x505ecf,_0x2aaa86){_0x505ecf=_0x505ecf-0x1b9;let _0x3f6108=_0x3a1700[_0x505ecf];return _0x3f6108;},a6_0x505e(_0x35989e,_0x479f29);}const core_1=require(a6_0x1e2d9a(0x1c6)),interface_1=require(a6_0x1e2d9a(0x1c5));function VirtualColumn(_0x30a932,_0x2ebea9){return(_0x185ced,_0x3e6f5f)=>{const _0x19b89c=a6_0x505e,_0x3e9e93=(0x0,core_1[_0x19b89c(0x1bd)])(interface_1[_0x19b89c(0x1c3)],_0x185ced)||{};_0x3e9e93[_0x3e6f5f]={'comment':_0x30a932,..._0x2ebea9},(0x0,core_1[_0x19b89c(0x1ba)])(interface_1[_0x19b89c(0x1c3)],_0x3e9e93,_0x185ced);};}function a6_0x3a17(){const _0xec22b3=['3180OBAgfE','2060625mxqCRZ','3217030xPJaYI','38574BKbhld','1192DMuSNr','saveClassMetadata','10kCbkLQ','339ennVVS','getClassMetadata','5327113gGazwC','10188cTIePw','__esModule','VirtualColumn','1123145WHzPZo','ENTITY_VIRTUAL_COLUMN_KEY','6lozXwz','../interface','@midwayjs/core'];a6_0x3a17=function(){return _0xec22b3;};return a6_0x3a17();}exports['VirtualColumn']=VirtualColumn;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IMidwayApplication } from '@midwayjs/core';
|
|
1
|
+
import { IMidwayApplication, IMidwayContainer } from '@midwayjs/core';
|
|
2
2
|
import { Repository as BaseRepository, EntityManager, ObjectLiteral, DeepPartial } from "typeorm";
|
|
3
3
|
import { SearchParams, SearchPaginate, SearchOptions } from "../interface";
|
|
4
4
|
interface modelSearch {
|
|
@@ -8,12 +8,13 @@ interface modelSearch {
|
|
|
8
8
|
declare type IsolationLevel = "READ UNCOMMITTED" | "READ COMMITTED" | "REPEATABLE READ" | "SERIALIZABLE";
|
|
9
9
|
export declare class Repository<Entity extends ObjectLiteral> extends BaseRepository<Entity> {
|
|
10
10
|
readonly app: IMidwayApplication;
|
|
11
|
+
readonly container: IMidwayContainer;
|
|
11
12
|
readonly modelSearchs: modelSearch[];
|
|
12
13
|
search(params?: SearchParams<Entity>, paginate?: SearchPaginate, options?: SearchOptions): Promise<import("typeorm").SelectQueryBuilder<Entity>>;
|
|
13
14
|
mergeSave(mergeIntoEntity: Entity, ...entityLikes: DeepPartial<Entity>[]): Promise<Entity>;
|
|
14
15
|
createSave(mergeIntoEntity: DeepPartial<Entity>, ...entityLikes: DeepPartial<Entity>[]): Promise<Entity>;
|
|
15
16
|
transaction<T>(runInTransaction: (manager: EntityManager) => Promise<T>): Promise<T>;
|
|
16
17
|
transaction<T>(isolationLevel: IsolationLevel, runInTransaction: (manager: EntityManager) => Promise<T>): Promise<T>;
|
|
17
|
-
constructor(app: IMidwayApplication, repository: BaseRepository<Entity>);
|
|
18
|
+
constructor(app: IMidwayApplication, container: IMidwayContainer, repository: BaseRepository<Entity>);
|
|
18
19
|
}
|
|
19
20
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';function a7_0x425b(){const _0x5c60bd=['typeorm','getAsync','operator','6992676qYySlQ','7wrykjA','3203352IQNNIo','BETWEEN','FIND\x20IN\x20SET','NOT\x20FIND\x20IN\x20SET','getApplicationContext','push','container','search','length','metadata','indexOf','random','2hwNcbw','\x20like\x20:_auto_','MODEL_KEY','ASC','undefined','1\x20=\x202','merge','defineProperty','findColumnWithPropertyName','searchs','methodName','queryRunner','app','alias','_size','createSave','save','DESC','NOT\x20ISNULL','MODEL_SEARCH_KEY','isArray','field','createQueryBuilder','orderBy','41133213yHcKWw','modelSearchs','excess','skip','trim','NOT\x20BETWEEN','../interface','getClassMetadata','1908345lRHCDR','condition','toString','ISNULL','_page','NOT\x20IN','model','_order','_isreverse','manager','792635EysOAY','string','target','split','hasOwnProperty','693300zUhjSB','andWhere','function','abs','@midwayjs/core','LIKE','ceil','_auto_','transaction','create','\x20IN(:..._auto_','Repository','3829796rhjZOU','toUpperCase'];a7_0x425b=function(){return _0x5c60bd;};return a7_0x425b();}function a7_0x4040(_0x401bf9,_0x116c45){const _0x425ba1=a7_0x425b();return a7_0x4040=function(_0x4040a0,_0x15bf67){_0x4040a0=_0x4040a0-0x1e1;let _0x273390=_0x425ba1[_0x4040a0];return _0x273390;},a7_0x4040(_0x401bf9,_0x116c45);}const a7_0x31e483=a7_0x4040;(function(_0x328aa8,_0x46f9bd){const _0x4b855c=a7_0x4040,_0x554012=_0x328aa8();while(!![]){try{const _0x575fd1=parseInt(_0x4b855c(0x213))/0x1*(-parseInt(_0x4b855c(0x1e9))/0x2)+-parseInt(_0x4b855c(0x218))/0x3+-parseInt(_0x4b855c(0x224))/0x4+-parseInt(_0x4b855c(0x209))/0x5+parseInt(_0x4b855c(0x229))/0x6*(-parseInt(_0x4b855c(0x22a))/0x7)+-parseInt(_0x4b855c(0x22b))/0x8+parseInt(_0x4b855c(0x201))/0x9;if(_0x575fd1===_0x46f9bd)break;else _0x554012['push'](_0x554012['shift']());}catch(_0x70c5bc){_0x554012['push'](_0x554012['shift']());}}}(a7_0x425b,0x9ca67));Object[a7_0x31e483(0x1f0)](exports,'__esModule',{'value':!![]}),exports[a7_0x31e483(0x223)]=void 0x0;const core_1=require(a7_0x31e483(0x21c)),typeorm_1=require(a7_0x31e483(0x226)),interface_1=require(a7_0x31e483(0x207));class Repository extends typeorm_1[a7_0x31e483(0x223)]{constructor(_0x5e47a5,_0x48c174,_0x1f4a4f){const _0x3c9f73=a7_0x31e483;super(_0x1f4a4f[_0x3c9f73(0x215)],_0x1f4a4f[_0x3c9f73(0x212)],_0x1f4a4f[_0x3c9f73(0x1f4)]),this['modelSearchs']=[];for(const _0x289d6d of(0x0,core_1[_0x3c9f73(0x208)])(interface_1[_0x3c9f73(0x1eb)],this[_0x3c9f73(0x215)])||[]){const _0x163eea={'model':_0x289d6d,'searchs':[]};for(const _0x3cb176 of(0x0,core_1[_0x3c9f73(0x208)])(interface_1[_0x3c9f73(0x1fc)],_0x289d6d)||[]){_0x163eea[_0x3c9f73(0x1f2)][_0x3c9f73(0x1e2)](_0x3cb176);}this['modelSearchs'][_0x3c9f73(0x1e2)](_0x163eea);}this[_0x3c9f73(0x1f5)]=_0x5e47a5,this[_0x3c9f73(0x1e3)]=_0x48c174;}async[a7_0x31e483(0x1e4)](_0x1279ad,_0x2a1b79,_0x572df4={}){const _0x3b13be=a7_0x31e483;var _0x36dbc9,_0x366751,_0x27a989,_0x58bd6b,_0x10ac69,_0x358111,_0x56559b;const _0x2a8998=this[_0x3b13be(0x1ff)](undefined,_0x572df4===null||_0x572df4===void 0x0?void 0x0:_0x572df4[_0x3b13be(0x1f4)]),_0x7af952=[];for(const _0xb89cd7 of this[_0x3b13be(0x202)]){if((_0xb89cd7===null||_0xb89cd7===void 0x0?void 0x0:_0xb89cd7[_0x3b13be(0x20f)])&&((_0x36dbc9=_0xb89cd7===null||_0xb89cd7===void 0x0?void 0x0:_0xb89cd7[_0x3b13be(0x1f2)])===null||_0x36dbc9===void 0x0?void 0x0:_0x36dbc9['length'])>0x0){const _0x3f360f=await this[_0x3b13be(0x1f5)][_0x3b13be(0x1e1)]()[_0x3b13be(0x227)](_0xb89cd7[_0x3b13be(0x20f)]);for(const _0x3058ed of _0xb89cd7[_0x3b13be(0x1f2)]){(_0x3058ed===null||_0x3058ed===void 0x0?void 0x0:_0x3058ed[_0x3b13be(0x1fe)])&&(_0x3058ed===null||_0x3058ed===void 0x0?void 0x0:_0x3058ed['methodName'])&&typeof _0x3f360f[_0x3058ed[_0x3b13be(0x1f3)]]==_0x3b13be(0x21a)&&(typeof(_0x1279ad===null||_0x1279ad===void 0x0?void 0x0:_0x1279ad[_0x3058ed[_0x3b13be(0x1fe)]])!=_0x3b13be(0x1ed)&&!((_0x366751=_0x1279ad===null||_0x1279ad===void 0x0?void 0x0:_0x1279ad[_0x3058ed['field']])===null||_0x366751===void 0x0?void 0x0:_0x366751[_0x3b13be(0x217)](_0x3b13be(0x228)))&&(_0x7af952[_0x3b13be(0x1e7)](_0x3058ed[_0x3b13be(0x1fe)])==-0x1&&_0x7af952[_0x3b13be(0x1e2)](_0x3058ed['field']),await _0x3f360f[_0x3058ed[_0x3b13be(0x1f3)]]['bind'](_0x3f360f)(_0x2a8998,_0x1279ad[_0x3058ed[_0x3b13be(0x1fe)]],_0x1279ad,_0x2a1b79,_0x572df4===null||_0x572df4===void 0x0?void 0x0:_0x572df4[_0x3b13be(0x1f4)])));}}}for(const _0x1b55a9 in _0x1279ad){if(typeof _0x1279ad[_0x1b55a9]==_0x3b13be(0x1ed))continue;if(_0x7af952['indexOf'](_0x1b55a9)!=-0x1)continue;const _0x980941=this[_0x3b13be(0x1e6)][_0x3b13be(0x1f1)](_0x1b55a9);if(!_0x980941)continue;if((_0x27a989=_0x1279ad===null||_0x1279ad===void 0x0?void 0x0:_0x1279ad[_0x1b55a9])===null||_0x27a989===void 0x0?void 0x0:_0x27a989['hasOwnProperty'](_0x3b13be(0x228))){const _0x3320c0=(_0x58bd6b=_0x1279ad[_0x1b55a9])===null||_0x58bd6b===void 0x0?void 0x0:_0x58bd6b[_0x3b13be(0x20a)],_0xc330dc=(_0x10ac69=_0x1279ad[_0x1b55a9])===null||_0x10ac69===void 0x0?void 0x0:_0x10ac69['operator'][_0x3b13be(0x205)]()[_0x3b13be(0x225)](),_0x2d824f=_0x3b13be(0x21f)+_0x1b55a9+'_'+Math[_0x3b13be(0x21e)](Math[_0x3b13be(0x1e8)]()*0xa)+Math[_0x3b13be(0x21e)](Math[_0x3b13be(0x1e8)]()*0xa)+Math[_0x3b13be(0x21e)](Math[_0x3b13be(0x1e8)]()*0xa)+Math[_0x3b13be(0x21e)](Math['random']()*0xa);if(['=','!=','<>','>','>=','<','<=',_0x3b13be(0x21d),'NOT\x20LIKE'][_0x3b13be(0x1e7)](_0xc330dc)!=-0x1)typeof _0x3320c0!=_0x3b13be(0x1ed)&&_0x2a8998[_0x3b13be(0x219)](_0x2a8998[_0x3b13be(0x1f6)]+'.'+_0x1b55a9+'\x20'+_0xc330dc+'\x20:'+_0x2d824f,{[_0x2d824f]:_0x3320c0});else{if(['IN',_0x3b13be(0x20e)][_0x3b13be(0x1e7)](_0xc330dc)!=-0x1){if(typeof _0x3320c0!='undefined'){const _0x20a8a5=Array[_0x3b13be(0x1fd)](_0x3320c0)?_0x3320c0:typeof _0x3320c0==_0x3b13be(0x214)?_0x3320c0['split'](','):[_0x3320c0];_0x20a8a5[_0x3b13be(0x1e5)]==0x0?_0x2a8998['andWhere']('1\x20=\x202'):_0x2a8998[_0x3b13be(0x219)](_0x2a8998[_0x3b13be(0x1f6)]+'.'+_0x1b55a9+'\x20'+_0xc330dc+'(:...'+_0x2d824f+')',{[_0x2d824f]:_0x20a8a5});}}else{if([_0x3b13be(0x22d),_0x3b13be(0x22e)][_0x3b13be(0x1e7)](_0xc330dc)!=-0x1)typeof _0x3320c0!=_0x3b13be(0x1ed)&&_0x2a8998[_0x3b13be(0x219)](_0xc330dc+'(:'+_0x2d824f+','+_0x2a8998[_0x3b13be(0x1f6)]+'.'+_0x1b55a9+')',{[_0x2d824f]:_0x3320c0});else{if([_0x3b13be(0x22c),_0x3b13be(0x206)][_0x3b13be(0x1e7)](_0xc330dc)!=-0x1){if(typeof _0x3320c0!=_0x3b13be(0x1ed)){const _0x4410ff=Array[_0x3b13be(0x1fd)](_0x3320c0)?_0x3320c0:typeof _0x3320c0==_0x3b13be(0x214)?_0x3320c0[_0x3b13be(0x216)](','):[_0x3320c0];_0x4410ff[_0x3b13be(0x1e5)]>0x1&&_0x2a8998[_0x3b13be(0x219)](_0x2a8998[_0x3b13be(0x1f6)]+'.'+_0x1b55a9+'\x20'+_0xc330dc+'\x20:'+_0x2d824f+'\x20AND\x20:'+_0x2d824f+'_2',{[''+_0x2d824f]:_0x4410ff[0x0],[_0x2d824f+'_2']:_0x4410ff[0x1]});}}else[_0x3b13be(0x20c),_0x3b13be(0x1fb)][_0x3b13be(0x1e7)](_0xc330dc)!=-0x1&&_0x2a8998['andWhere'](_0xc330dc+'('+_0x2a8998[_0x3b13be(0x1f6)]+'.'+_0x1b55a9+')');}}}}else{const _0x3a638c=((_0x56559b=typeof _0x980941['type']==_0x3b13be(0x21a)?(_0x358111=_0x980941===null||_0x980941===void 0x0?void 0x0:_0x980941['type'])===null||_0x358111===void 0x0?void 0x0:_0x358111['name']:_0x980941['type'][_0x3b13be(0x20b)]())===null||_0x56559b===void 0x0?void 0x0:_0x56559b['toLowerCase']())||undefined;if(_0x3a638c){if(Array[_0x3b13be(0x1fd)](_0x1279ad[_0x1b55a9]))_0x1279ad[_0x1b55a9][_0x3b13be(0x1e5)]==0x0?_0x2a8998[_0x3b13be(0x219)](_0x3b13be(0x1ee)):_0x2a8998[_0x3b13be(0x219)](_0x2a8998[_0x3b13be(0x1f6)]+'.'+_0x1b55a9+_0x3b13be(0x222)+_0x1b55a9+')',{[_0x3b13be(0x21f)+_0x1b55a9]:_0x1279ad[_0x1b55a9]});else _0x3a638c=='string'?_0x2a8998['andWhere'](_0x2a8998[_0x3b13be(0x1f6)]+'.'+_0x1b55a9+_0x3b13be(0x1ea)+_0x1b55a9,{['_auto_'+_0x1b55a9]:'%'+_0x1279ad[_0x1b55a9]+'%'}):_0x2a8998[_0x3b13be(0x219)](_0x2a8998['alias']+'.'+_0x1b55a9+'\x20=\x20:_auto_'+_0x1b55a9,{[_0x3b13be(0x21f)+_0x1b55a9]:_0x1279ad[_0x1b55a9]});}}}(_0x2a1b79===null||_0x2a1b79===void 0x0?void 0x0:_0x2a1b79[_0x3b13be(0x1f7)])&&_0x2a8998['take'](Math[_0x3b13be(0x21b)](_0x2a1b79['_size']));(_0x2a1b79===null||_0x2a1b79===void 0x0?void 0x0:_0x2a1b79['_page'])&&(_0x2a1b79===null||_0x2a1b79===void 0x0?void 0x0:_0x2a1b79[_0x3b13be(0x1f7)])&&_0x2a8998[_0x3b13be(0x204)]((Math[_0x3b13be(0x21b)](_0x2a1b79[_0x3b13be(0x20d)])-0x1)*Math[_0x3b13be(0x21b)](_0x2a1b79['_size']));if(_0x2a1b79===null||_0x2a1b79===void 0x0?void 0x0:_0x2a1b79['_order']){if(_0x2a1b79[_0x3b13be(0x210)][_0x3b13be(0x1e7)]('.')!==-0x1)_0x2a8998[_0x3b13be(0x200)](''+_0x2a1b79[_0x3b13be(0x210)],(_0x2a1b79===null||_0x2a1b79===void 0x0?void 0x0:_0x2a1b79[_0x3b13be(0x211)])?_0x3b13be(0x1ec):'DESC');else _0x7af952['indexOf'](_0x2a1b79[_0x3b13be(0x210)])==-0x1&&(this[_0x3b13be(0x1e6)][_0x3b13be(0x1f1)](_0x2a1b79['_order'])?_0x2a8998['orderBy'](_0x2a8998[_0x3b13be(0x1f6)]+'.'+_0x2a1b79['_order'],(_0x2a1b79===null||_0x2a1b79===void 0x0?void 0x0:_0x2a1b79[_0x3b13be(0x211)])?_0x3b13be(0x1ec):_0x3b13be(0x1fa)):_0x2a8998[_0x3b13be(0x200)](''+_0x2a1b79[_0x3b13be(0x210)],(_0x2a1b79===null||_0x2a1b79===void 0x0?void 0x0:_0x2a1b79['_isreverse'])?_0x3b13be(0x1ec):_0x3b13be(0x1fa)));}return typeof(_0x572df4===null||_0x572df4===void 0x0?void 0x0:_0x572df4[_0x3b13be(0x203)])==_0x3b13be(0x21a)&&await(_0x572df4===null||_0x572df4===void 0x0?void 0x0:_0x572df4[_0x3b13be(0x203)](_0x2a8998)),_0x2a8998;}async['mergeSave'](_0x1c869d,..._0x4b9132){const _0x12914b=a7_0x31e483,_0x145d7e=this[_0x12914b(0x1ef)](_0x1c869d,..._0x4b9132);return await this[_0x12914b(0x1f9)](_0x145d7e);}async[a7_0x31e483(0x1f8)](_0x30b44c,..._0x5766e3){const _0x3973a2=a7_0x31e483,_0xb13282=this[_0x3973a2(0x1ef)](this[_0x3973a2(0x221)](_0x30b44c),..._0x5766e3);return await this[_0x3973a2(0x1f9)](_0xb13282);}async[a7_0x31e483(0x220)](_0x2e87fb,_0x3f5d0a){const _0x71ce26=a7_0x31e483;return this[_0x71ce26(0x212)][_0x71ce26(0x220)](_0x2e87fb,_0x3f5d0a);}}exports['Repository']=Repository;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';function a8_0x5201(){const _0x5e5ef5=['18sLtmAP','getClassMetadata','1215492EVRYJI','27150toBQLd','126086nfGPCp','1269rTpcwx','ENTIFY_MODULE_SOURCE','listModule','4168kZVrub','default','@midwayjs/core','682655DQnUCZ','push','getDataSourceEntity','ENTIFY_MODULE','1161013kKupIL','__esModule','defineProperty','879228aZyOhu','../interface'];a8_0x5201=function(){return _0x5e5ef5;};return a8_0x5201();}const a8_0x3188d5=a8_0x1089;(function(_0x19ad80,_0x10b949){const _0x111ccc=a8_0x1089,_0x40d8b8=_0x19ad80();while(!![]){try{const _0x302854=-parseInt(_0x111ccc(0x1b6))/0x1+-parseInt(_0x111ccc(0x1b2))/0x2*(parseInt(_0x111ccc(0x1b5))/0x3)+parseInt(_0x111ccc(0x1c4))/0x4+parseInt(_0x111ccc(0x1bd))/0x5+parseInt(_0x111ccc(0x1b4))/0x6+-parseInt(_0x111ccc(0x1c1))/0x7+parseInt(_0x111ccc(0x1ba))/0x8*(-parseInt(_0x111ccc(0x1b7))/0x9);if(_0x302854===_0x10b949)break;else _0x40d8b8['push'](_0x40d8b8['shift']());}catch(_0x30fde2){_0x40d8b8['push'](_0x40d8b8['shift']());}}}(a8_0x5201,0x1b5c0));Object[a8_0x3188d5(0x1c3)](exports,a8_0x3188d5(0x1c2),{'value':!![]}),exports[a8_0x3188d5(0x1bf)]=void 0x0;function a8_0x1089(_0xed0612,_0x4a98df){const _0x52017f=a8_0x5201();return a8_0x1089=function(_0x10896a,_0x29cd04){_0x10896a=_0x10896a-0x1b1;let _0x1f86ab=_0x52017f[_0x10896a];return _0x1f86ab;},a8_0x1089(_0xed0612,_0x4a98df);}const core_1=require(a8_0x3188d5(0x1bc)),interface_1=require(a8_0x3188d5(0x1b1));function getDataSourceEntity(_0x42cd38=a8_0x3188d5(0x1bb)){const _0x192295=a8_0x3188d5;var _0x24557f;const _0x50d793=[];for(const _0x512344 of(0x0,core_1[_0x192295(0x1b9)])(interface_1[_0x192295(0x1c0)])){const _0x1ac5f3=(0x0,core_1[_0x192295(0x1b3)])(interface_1[_0x192295(0x1b8)],_0x512344);((_0x24557f=_0x1ac5f3===null||_0x1ac5f3===void 0x0?void 0x0:_0x1ac5f3['dataSource'])===null||_0x24557f===void 0x0?void 0x0:_0x24557f['find'](_0x19c07e=>_0x19c07e==_0x42cd38))&&_0x50d793[_0x192295(0x1be)](_0x512344);}return _0x50d793;}exports[a8_0x3188d5(0x1bf)]=getDataSourceEntity;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a9_0x217af0=a9_0x4e99;(function(_0x2b099b,_0xc282ed){var _0x2ea9fa=a9_0x4e99,_0x1508ee=_0x2b099b();while(!![]){try{var _0x40b1e4=parseInt(_0x2ea9fa(0x192))/0x1*(-parseInt(_0x2ea9fa(0x1b1))/0x2)+parseInt(_0x2ea9fa(0x1a0))/0x3*(-parseInt(_0x2ea9fa(0x18d))/0x4)+parseInt(_0x2ea9fa(0x1a1))/0x5*(-parseInt(_0x2ea9fa(0x1aa))/0x6)+-parseInt(_0x2ea9fa(0x1a9))/0x7+-parseInt(_0x2ea9fa(0x19d))/0x8*(parseInt(_0x2ea9fa(0x1af))/0x9)+-parseInt(_0x2ea9fa(0x1a7))/0xa+parseInt(_0x2ea9fa(0x188))/0xb*(parseInt(_0x2ea9fa(0x187))/0xc);if(_0x40b1e4===_0xc282ed)break;else _0x1508ee['push'](_0x1508ee['shift']());}catch(_0x19acd5){_0x1508ee['push'](_0x1508ee['shift']());}}}(a9_0x2b58,0x7ce37));var __createBinding=this&&this['__createBinding']||(Object['create']?function(_0x50f8a,_0x806e80,_0x4dd6b0,_0x348b3a){var _0x3f6fa7=a9_0x4e99;if(_0x348b3a===undefined)_0x348b3a=_0x4dd6b0;var _0x2e48fb=Object[_0x3f6fa7(0x194)](_0x806e80,_0x4dd6b0);(!_0x2e48fb||(_0x3f6fa7(0x196)in _0x2e48fb?!_0x806e80[_0x3f6fa7(0x1a2)]:_0x2e48fb[_0x3f6fa7(0x190)]||_0x2e48fb[_0x3f6fa7(0x191)]))&&(_0x2e48fb={'enumerable':!![],'get':function(){return _0x806e80[_0x4dd6b0];}}),Object[_0x3f6fa7(0x199)](_0x50f8a,_0x348b3a,_0x2e48fb);}:function(_0x5a706c,_0x2fa42c,_0x10b77d,_0x1b59fd){if(_0x1b59fd===undefined)_0x1b59fd=_0x10b77d;_0x5a706c[_0x1b59fd]=_0x2fa42c[_0x10b77d];}),__exportStar=this&&this[a9_0x217af0(0x19a)]||function(_0x132a95,_0x2ecc12){var _0x806a5e=a9_0x217af0;for(var _0x5f54db in _0x132a95)if(_0x5f54db!==_0x806a5e(0x193)&&!Object[_0x806a5e(0x18b)][_0x806a5e(0x19c)]['call'](_0x2ecc12,_0x5f54db))__createBinding(_0x2ecc12,_0x132a95,_0x5f54db);};Object[a9_0x217af0(0x199)](exports,a9_0x217af0(0x1a2),{'value':!![]}),exports[a9_0x217af0(0x1ab)]=exports[a9_0x217af0(0x1b0)]=exports[a9_0x217af0(0x19f)]=exports['Provide']=exports[a9_0x217af0(0x197)]=exports['getDataSourceEntity']=exports[a9_0x217af0(0x1a4)]=exports[a9_0x217af0(0x18e)]=exports[a9_0x217af0(0x19e)]=exports['ProvideEntity']=exports[a9_0x217af0(0x1ae)]=exports[a9_0x217af0(0x19b)]=exports['VirtualColumn']=exports[a9_0x217af0(0x189)]=void 0x0,__exportStar(require(a9_0x217af0(0x1b2)),exports),__exportStar(require(a9_0x217af0(0x1a5)),exports);var Repository_1=require(a9_0x217af0(0x185));function a9_0x2b58(){var _0x3f29e6=['618444ZIJJlO','ProvideSearch','./decorator/InjectRepository','writable','configurable','1PFrsKh','default','getOwnPropertyDescriptor','./decorator/ProvideEntity','get','Configuration','@midwayjs/core','defineProperty','__exportStar','InjectEntity','hasOwnProperty','8gVezRK','ProvideRepository','Inject','12JLgRzU','45qAMkyD','__esModule','./decorator/ProvideRepository','Search','./interface','./decorator/VirtualColumn','3363370oOxDLE','getDataSourceEntity','1377068tmczYP','248322JENVWl','ScopeEnum','./decorator/InjectEntity','./decorator/ProvideSearch','InjectRepository','88380KCdFZX','Scope','1851558IWdRbA','typeorm','./configuration','./definition/Repository','Provide','24IeaVbs','16341215UwNHdn','Repository','ProvideEntity','prototype','VirtualColumn'];a9_0x2b58=function(){return _0x3f29e6;};return a9_0x2b58();}Object['defineProperty'](exports,'Repository',{'enumerable':!![],'get':function(){return Repository_1['Repository'];}});var VirtualColumn_1=require(a9_0x217af0(0x1a6));Object[a9_0x217af0(0x199)](exports,a9_0x217af0(0x18c),{'enumerable':!![],'get':function(){var _0x9237df=a9_0x217af0;return VirtualColumn_1[_0x9237df(0x18c)];}});var InjectEntity_1=require(a9_0x217af0(0x1ac));Object[a9_0x217af0(0x199)](exports,'InjectEntity',{'enumerable':!![],'get':function(){var _0x1153c4=a9_0x217af0;return InjectEntity_1[_0x1153c4(0x19b)];}});var InjectRepository_1=require(a9_0x217af0(0x18f));Object['defineProperty'](exports,'InjectRepository',{'enumerable':!![],'get':function(){return InjectRepository_1['InjectRepository'];}});function a9_0x4e99(_0x4019cb,_0x548924){var _0x2b5835=a9_0x2b58();return a9_0x4e99=function(_0x4e99a2,_0x125f6f){_0x4e99a2=_0x4e99a2-0x185;var _0x4ec90a=_0x2b5835[_0x4e99a2];return _0x4ec90a;},a9_0x4e99(_0x4019cb,_0x548924);}var ProvideEntity_1=require(a9_0x217af0(0x195));Object[a9_0x217af0(0x199)](exports,a9_0x217af0(0x18a),{'enumerable':!![],'get':function(){var _0x1ffa68=a9_0x217af0;return ProvideEntity_1[_0x1ffa68(0x18a)];}});var ProvideRepository_1=require(a9_0x217af0(0x1a3));Object[a9_0x217af0(0x199)](exports,'ProvideRepository',{'enumerable':!![],'get':function(){var _0x78d15f=a9_0x217af0;return ProvideRepository_1[_0x78d15f(0x19e)];}});var ProvideSearch_1=require(a9_0x217af0(0x1ad));Object[a9_0x217af0(0x199)](exports,a9_0x217af0(0x18e),{'enumerable':!![],'get':function(){var _0x33f14b=a9_0x217af0;return ProvideSearch_1[_0x33f14b(0x18e)];}}),Object[a9_0x217af0(0x199)](exports,a9_0x217af0(0x1a4),{'enumerable':!![],'get':function(){var _0x84d7e7=a9_0x217af0;return ProvideSearch_1[_0x84d7e7(0x1a4)];}});var getDataSourceEntity_1=require('./helper/getDataSourceEntity');Object[a9_0x217af0(0x199)](exports,a9_0x217af0(0x1a8),{'enumerable':!![],'get':function(){var _0x545502=a9_0x217af0;return getDataSourceEntity_1[_0x545502(0x1a8)];}});var configuration_1=require(a9_0x217af0(0x1b3));Object[a9_0x217af0(0x199)](exports,'Configuration',{'enumerable':!![],'get':function(){return configuration_1['CustomConfiguration'];}});var core_1=require(a9_0x217af0(0x198));Object[a9_0x217af0(0x199)](exports,a9_0x217af0(0x186),{'enumerable':!![],'get':function(){var _0x571072=a9_0x217af0;return core_1[_0x571072(0x186)];}}),Object[a9_0x217af0(0x199)](exports,a9_0x217af0(0x19f),{'enumerable':!![],'get':function(){var _0xf271d8=a9_0x217af0;return core_1[_0xf271d8(0x19f)];}}),Object[a9_0x217af0(0x199)](exports,a9_0x217af0(0x1b0),{'enumerable':!![],'get':function(){var _0x58c9ba=a9_0x217af0;return core_1[_0x58c9ba(0x1b0)];}}),Object[a9_0x217af0(0x199)](exports,a9_0x217af0(0x1ab),{'enumerable':!![],'get':function(){return core_1['ScopeEnum'];}});
|
package/dist/interface.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';const a10_0x1df954=a10_0x18ae;(function(_0x3630ad,_0x4d902f){const _0x4a6bcc=a10_0x18ae,_0x4effe5=_0x3630ad();while(!![]){try{const _0xdb5eea=parseInt(_0x4a6bcc(0x19e))/0x1+parseInt(_0x4a6bcc(0x18f))/0x2+parseInt(_0x4a6bcc(0x192))/0x3*(-parseInt(_0x4a6bcc(0x18a))/0x4)+-parseInt(_0x4a6bcc(0x180))/0x5*(parseInt(_0x4a6bcc(0x19f))/0x6)+-parseInt(_0x4a6bcc(0x198))/0x7+-parseInt(_0x4a6bcc(0x188))/0x8+parseInt(_0x4a6bcc(0x1a1))/0x9*(parseInt(_0x4a6bcc(0x17a))/0xa);if(_0xdb5eea===_0x4d902f)break;else _0x4effe5['push'](_0x4effe5['shift']());}catch(_0x316551){_0x4effe5['push'](_0x4effe5['shift']());}}}(a10_0x2ed5,0x2ba6c));Object[a10_0x1df954(0x1a4)](exports,a10_0x1df954(0x184),{'value':!![]}),exports['SearchPaginate']=exports[a10_0x1df954(0x193)]=exports[a10_0x1df954(0x18c)]=exports[a10_0x1df954(0x17e)]=exports[a10_0x1df954(0x176)]=exports['ENTIFY_MODULE_SOURCE']=exports['ENTIFY_MODULE']=exports[a10_0x1df954(0x195)]=void 0x0;const core_1=require('@midwayjs/core'),typeorm_1=require(a10_0x1df954(0x1aa)),typeorm_2=require('typeorm');function a10_0x2ed5(){const _0x30d018=['decorator:anncic-api:typeorm:model:search','expressionMap','__esModule','lockMode','SelectQueryBuilder','findOneOrFail','573576gsvYvB','getEntityValue','1284QathjV','EntityNotFoundError','MODEL_SEARCH_KEY','optimistic','SearchPaginate','57824qjPosH','getManyAndCount','getRawAndEntities','933XsvAtx','ENTITY_VIRTUAL_COLUMN_KEY','then','ENTIFY_KEY','name','versionColumn','2374050aMOFog','getClassMetadata','decorator:anncic-api:typeorm:model','hasOwnProperty','getTime','getCount','171700UctDIC','908484jMxlVF','getMany','3562605znyQHS','getOne','reject','defineProperty','mainAlias','OptimisticLockVersionMismatchError','decorator:anncic-api:typeorm:repository','findOneByOrFail','findOneBy','typeorm','lockVersion','REPOSITORY_KEY','prototype','decorator:anncic-api:typeorm:entify:module','resolve','20VlqyWx','ENTIFY_MODULE_SOURCE','default','OptimisticLockCanNotBeUsedError','MODEL_KEY','EntityManager','10tmhFgt','metadata'];a10_0x2ed5=function(){return _0x30d018;};return a10_0x2ed5();}function a10_0x18ae(_0x1cd249,_0x5a4a58){const _0x2ed5ad=a10_0x2ed5();return a10_0x18ae=function(_0x18ae0a,_0x10abdd){_0x18ae0a=_0x18ae0a-0x176;let _0x5e6c72=_0x2ed5ad[_0x18ae0a];return _0x5e6c72;},a10_0x18ae(_0x1cd249,_0x5a4a58);}exports[a10_0x1df954(0x195)]='decorator:anncic-api:typeorm:entify',exports['ENTIFY_MODULE']=a10_0x1df954(0x178),exports[a10_0x1df954(0x17b)]='decorator:anncic-api:typeorm:entify:module:source',exports['REPOSITORY_KEY']=a10_0x1df954(0x1a7),exports[a10_0x1df954(0x17e)]=a10_0x1df954(0x19a),exports['MODEL_SEARCH_KEY']=a10_0x1df954(0x182),exports['ENTITY_VIRTUAL_COLUMN_KEY']='decorator:anncic-api:typeorm:entity:virtual:column';class SearchPaginate{}exports[a10_0x1df954(0x18e)]=SearchPaginate,typeorm_2[a10_0x1df954(0x17f)][a10_0x1df954(0x177)][a10_0x1df954(0x187)]=async function(_0x40d7c3,_0x4a3858){const _0x5e617a=a10_0x1df954;return this['findOne'](_0x40d7c3,_0x4a3858)[_0x5e617a(0x194)](_0x10b5cb=>{const _0x1f94c6=_0x5e617a;if(_0x10b5cb===null||_0x10b5cb===undefined)return Promise[_0x1f94c6(0x1a3)](new typeorm_2[(_0x1f94c6(0x18b))](_0x40d7c3,_0x4a3858));return Promise[_0x1f94c6(0x179)](_0x10b5cb);});},typeorm_2[a10_0x1df954(0x17f)][a10_0x1df954(0x177)][a10_0x1df954(0x1a8)]=async function(_0x2f22b0,_0x11b103){const _0x2f543b=a10_0x1df954;return this[_0x2f543b(0x1a9)](_0x2f22b0,_0x11b103)['then'](_0x5d6e41=>{const _0x295783=_0x2f543b;if(_0x5d6e41===null||_0x5d6e41===undefined)return Promise[_0x295783(0x1a3)](new typeorm_2[(_0x295783(0x18b))](_0x2f22b0,_0x11b103));return Promise[_0x295783(0x179)](_0x5d6e41);});},typeorm_1[a10_0x1df954(0x186)][a10_0x1df954(0x177)][a10_0x1df954(0x1a0)]=async function(){const _0x4f1d53=a10_0x1df954;if(this[_0x4f1d53(0x183)]['lockMode']===_0x4f1d53(0x18d))throw new typeorm_1[(_0x4f1d53(0x17d))]();const {entities:_0x5bd794,raw:_0x4ea560}=await this[_0x4f1d53(0x191)]();return _0x5bd794['map']((_0x37c93d,_0x4850ad)=>{const _0x55c08e=_0x4f1d53;var _0x46f92d;const _0x525c81=(0x0,core_1[_0x55c08e(0x199)])(exports[_0x55c08e(0x193)],_0x37c93d)||{};for(const _0x271552 in _0x525c81){_0x4ea560[_0x4850ad]&&_0x4ea560[_0x4850ad][_0x55c08e(0x19b)](_0x271552)&&(_0x37c93d[_0x271552]=_0x4ea560[_0x4850ad][_0x271552]||((_0x46f92d=_0x525c81[_0x271552])===null||_0x46f92d===void 0x0?void 0x0:_0x46f92d[_0x55c08e(0x17c)])||'');}return _0x37c93d;});},typeorm_1[a10_0x1df954(0x186)]['prototype'][a10_0x1df954(0x190)]=async function(){const _0x4ee935=a10_0x1df954;return[await this['getMany'](),await this[_0x4ee935(0x19d)]()];},typeorm_1[a10_0x1df954(0x186)][a10_0x1df954(0x177)][a10_0x1df954(0x1a2)]=async function(){const _0x398b57=a10_0x1df954;var _0x4ba794;const {entities:_0x35d2ce,raw:_0x5f16ec}=await this[_0x398b57(0x191)]();if(_0x35d2ce[0x0]&&this[_0x398b57(0x183)][_0x398b57(0x185)]===_0x398b57(0x18d)&&this[_0x398b57(0x183)]['lockVersion']){const _0x22c81a=this['expressionMap'][_0x398b57(0x1a5)][_0x398b57(0x181)];if(this['expressionMap'][_0x398b57(0x1ab)]instanceof Date){const _0x3d061f=_0x22c81a['updateDateColumn'][_0x398b57(0x189)](_0x35d2ce[0x0]);if(_0x3d061f[_0x398b57(0x19c)]()!==this[_0x398b57(0x183)][_0x398b57(0x1ab)][_0x398b57(0x19c)]())throw new typeorm_1[(_0x398b57(0x1a6))](_0x22c81a[_0x398b57(0x196)],this[_0x398b57(0x183)][_0x398b57(0x1ab)],_0x3d061f);}else{const _0xbf939=_0x22c81a[_0x398b57(0x197)][_0x398b57(0x189)](_0x35d2ce[0x0]);if(_0xbf939!==this['expressionMap'][_0x398b57(0x1ab)])throw new typeorm_1[(_0x398b57(0x1a6))](_0x22c81a[_0x398b57(0x196)],this[_0x398b57(0x183)]['lockVersion'],_0xbf939);}}if(_0x35d2ce[0x0]&&_0x5f16ec[0x0]){const _0x506db6=(0x0,core_1[_0x398b57(0x199)])(exports[_0x398b57(0x193)],_0x35d2ce[0x0]);for(const _0x54c0aa in _0x506db6){_0x5f16ec[0x0]['hasOwnProperty'](_0x54c0aa)&&(_0x35d2ce[0x0][_0x54c0aa]=_0x5f16ec[0x0][_0x54c0aa]||((_0x4ba794=_0x506db6[_0x54c0aa])===null||_0x4ba794===void 0x0?void 0x0:_0x4ba794[_0x398b57(0x17c)])||'');}}return _0x35d2ce[0x0]||null;};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anncic-api/typeorm",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.16",
|
|
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": "09b73c237971f136ca906932d8748679a36451e2"
|
|
26
26
|
}
|