@anncic-api/typeorm 3.7.49 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/configuration.d.ts +8 -8
- package/dist/configuration.js +1 -1
- package/dist/decorator/InjectEntity.d.ts +1 -1
- package/dist/decorator/InjectEntity.js +1 -1
- package/dist/decorator/InjectRepository.d.ts +8 -8
- package/dist/decorator/InjectRepository.js +1 -1
- package/dist/decorator/ProvideEntity.d.ts +5 -5
- package/dist/decorator/ProvideEntity.js +1 -1
- package/dist/decorator/ProvideObserve.d.ts +2 -2
- package/dist/decorator/ProvideObserve.js +1 -1
- package/dist/decorator/ProvideRepository.d.ts +2 -2
- package/dist/decorator/ProvideRepository.js +1 -1
- package/dist/decorator/ProvideSearch.d.ts +3 -3
- package/dist/decorator/ProvideSearch.js +1 -1
- package/dist/decorator/ProvideSharding.d.ts +1 -1
- package/dist/decorator/ProvideSharding.js +1 -1
- package/dist/decorator/VirtualColumn.d.ts +4 -4
- package/dist/decorator/VirtualColumn.js +1 -1
- package/dist/definition/Repository.d.ts +25 -25
- package/dist/definition/Repository.js +1 -1
- package/dist/helper/getDataSourceEntity.d.ts +1 -1
- package/dist/helper/getDataSourceEntity.js +1 -1
- package/dist/helper/getProvideObserve.d.ts +1 -1
- package/dist/helper/getProvideObserve.js +1 -1
- package/dist/helper/sleep.d.ts +1 -1
- package/dist/helper/sleep.js +1 -1
- package/dist/index.d.ts +16 -16
- package/dist/index.js +1 -1
- package/dist/interface.d.ts +79 -80
- package/dist/interface.js +1 -1
- package/dist/interfaceSharding.d.ts +22 -22
- package/dist/interfaceSharding.js +1 -1
- package/package.json +30 -26
package/dist/configuration.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { MidwayConfigService, MidwayDecoratorService, IMidwayContainer, IMidwayApplication } from '@midwayjs/core';
|
|
2
|
-
import { Repository as IRepository } from "./definition/Repository";
|
|
3
|
-
export declare class CustomConfiguration {
|
|
4
|
-
config: MidwayConfigService;
|
|
5
|
-
decorator: MidwayDecoratorService;
|
|
6
|
-
protected handlercache: Map<any, IRepository<any>>;
|
|
7
|
-
onReady(container: IMidwayContainer, app: IMidwayApplication): Promise<void>;
|
|
8
|
-
}
|
|
1
|
+
import { MidwayConfigService, MidwayDecoratorService, IMidwayContainer, IMidwayApplication } from '@midwayjs/core';
|
|
2
|
+
import { Repository as IRepository } from "./definition/Repository";
|
|
3
|
+
export declare class CustomConfiguration {
|
|
4
|
+
config: MidwayConfigService;
|
|
5
|
+
decorator: MidwayDecoratorService;
|
|
6
|
+
protected handlercache: Map<any, IRepository<any>>;
|
|
7
|
+
onReady(container: IMidwayContainer, app: IMidwayApplication): Promise<void>;
|
|
8
|
+
}
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a0_0x2dbd(){const _0x4e8c68=['getOwnPropertyDescriptor','CustomConfiguration','search','4508888yWkauv','get','getAsync','design:type','toString','typeorm\x20Error\x20propertyName\x20is\x20not\x20InjectRepository\x20repository','onReady','prototype','150iQPHOx','has','Configuration','getDataSourceNameByModel','2719073AbvbPb','REPOSITORY_KEY','getRepository','defineProperty','18985FbUPzd','set','./definition/Repository','@midwayjs/core','decorator','typeorm\x20Error\x20','21469TocaAa','object','handlercache','ENTIFY_KEY','registerPropertyHandler','function','decorate','TypeORMDataSourceManager','constructor','__metadata','9633864QcvPHP','9crgFbd','anncic-api:typeorm','(((.+)+)+)+$','30484570AaxBYZ','60xeGnme','1162173ZQqHVL','metadata','\x20is\x20not\x20ProvideRepository\x20Entify','@midwayjs/typeorm','Inject','apply','MidwayConfigService','length','getDataSource','__esModule'];a0_0x2dbd=function(){return _0x4e8c68;};return a0_0x2dbd();}const a0_0x9b77b1=a0_0x4916;(function(_0x583f87,_0x23f44f){const _0x31fb03=a0_0x4916,_0x42d262=_0x583f87();while(!![]){try{const _0x3f25f0=parseInt(_0x31fb03(0x1b9))/0x1*(parseInt(_0x31fb03(0x1ab))/0x2)+parseInt(_0x31fb03(0x196))/0x3+parseInt(_0x31fb03(0x1a3))/0x4+parseInt(_0x31fb03(0x1b3))/0x5*(parseInt(_0x31fb03(0x195))/0x6)+-parseInt(_0x31fb03(0x1af))/0x7+parseInt(_0x31fb03(0x1c3))/0x8*(parseInt(_0x31fb03(0x1c4))/0x9)+-parseInt(_0x31fb03(0x194))/0xa;if(_0x3f25f0===_0x23f44f)break;else _0x42d262['push'](_0x42d262['shift']());}catch(_0x2103ff){_0x42d262['push'](_0x42d262['shift']());}}}(a0_0x2dbd,0xe312f));const a0_0x39d5ec=(function(){let _0x44e634=!![];return function(_0x566cc4,_0x179425){const _0x36971d=_0x44e634?function(){const _0x411904=a0_0x4916;if(_0x179425){const _0xc3ef02=_0x179425[_0x411904(0x19b)](_0x566cc4,arguments);return _0x179425=null,_0xc3ef02;}}:function(){};return _0x44e634=![],_0x36971d;};}()),a0_0x23f46d=a0_0x39d5ec(this,function(){const _0x480e58=a0_0x4916;return a0_0x23f46d[_0x480e58(0x1a7)]()[_0x480e58(0x1a2)](_0x480e58(0x193))['toString']()[_0x480e58(0x1c1)](a0_0x23f46d)['search'](_0x480e58(0x193));});function a0_0x4916(_0x110e9d,_0x5a09da){_0x110e9d=_0x110e9d-0x192;const _0x116f0d=a0_0x2dbd();let _0x23f46d=_0x116f0d[_0x110e9d];return _0x23f46d;}a0_0x23f46d();'use strict';var __decorate=this&&this['__decorate']||function(_0x6fb953,_0x5cb169,_0x34070e,_0x3855f2){const _0x1e83bc=a0_0x4916;var _0x3ae492=arguments[_0x1e83bc(0x19d)],_0x9389f7=_0x3ae492<0x3?_0x5cb169:_0x3855f2===null?_0x3855f2=Object[_0x1e83bc(0x1a0)](_0x5cb169,_0x34070e):_0x3855f2,_0x82879c;if(typeof Reflect===_0x1e83bc(0x1ba)&&typeof Reflect[_0x1e83bc(0x1bf)]==='function')_0x9389f7=Reflect['decorate'](_0x6fb953,_0x5cb169,_0x34070e,_0x3855f2);else{for(var _0x916ded=_0x6fb953[_0x1e83bc(0x19d)]-0x1;_0x916ded>=0x0;_0x916ded--)if(_0x82879c=_0x6fb953[_0x916ded])_0x9389f7=(_0x3ae492<0x3?_0x82879c(_0x9389f7):_0x3ae492>0x3?_0x82879c(_0x5cb169,_0x34070e,_0x9389f7):_0x82879c(_0x5cb169,_0x34070e))||_0x9389f7;}return _0x3ae492>0x3&&_0x9389f7&&Object['defineProperty'](_0x5cb169,_0x34070e,_0x9389f7),_0x9389f7;},__metadata=this&&this[a0_0x9b77b1(0x1c2)]||function(_0x3eb448,_0x142c70){const _0x7944aa=a0_0x9b77b1;if(typeof Reflect===_0x7944aa(0x1ba)&&typeof Reflect[_0x7944aa(0x197)]===_0x7944aa(0x1be))return Reflect['metadata'](_0x3eb448,_0x142c70);};Object[a0_0x9b77b1(0x1b2)](exports,a0_0x9b77b1(0x19f),{'value':!![]}),exports[a0_0x9b77b1(0x1a1)]=void 0x0;const typeorm_1=require(a0_0x9b77b1(0x199)),core_1=require(a0_0x9b77b1(0x1b6)),core_2=require(a0_0x9b77b1(0x1b6)),Repository_1=require(a0_0x9b77b1(0x1b5)),interface_1=require('./interface'),typeorm=require('@midwayjs/typeorm');let CustomConfiguration=class CustomConfiguration{constructor(){const _0x493cc7=a0_0x9b77b1;this[_0x493cc7(0x1bb)]=new Map();}async[a0_0x9b77b1(0x1a9)](_0x562eed,_0x2d071e){const _0x33dfd7=a0_0x9b77b1,_0x2d67b=await _0x562eed[_0x33dfd7(0x1a5)](typeorm_1[_0x33dfd7(0x1c0)]);this[_0x33dfd7(0x1b7)][_0x33dfd7(0x1bd)](interface_1[_0x33dfd7(0x1bc)],(_0x219f0f,{entity:_0x452052,connection:_0x5156d6})=>{const _0x2e006b=_0x33dfd7;if(!this[_0x2e006b(0x1bb)]['has'](_0x452052)){const _0x54416c=_0x562eed['get'](Repository_1['Repository'],[_0x2d071e,_0x562eed,_0x2d67b['getDataSource'](_0x5156d6||_0x2d67b[_0x2e006b(0x1ae)](_0x452052))[_0x2e006b(0x1b1)](_0x452052)]);this[_0x2e006b(0x1bb)][_0x2e006b(0x1b4)](_0x452052,_0x54416c);}return this[_0x2e006b(0x1bb)][_0x2e006b(0x1a4)](_0x452052);}),this[_0x33dfd7(0x1b7)][_0x33dfd7(0x1bd)](interface_1[_0x33dfd7(0x1b0)],(_0x28a4bb,{repository:_0x1417fa,connection:_0x3abe07})=>{const _0x500757=_0x33dfd7;if(!_0x1417fa)throw new Error(_0x500757(0x1a8));const {entity:_0x48208b}=core_1['MetadataManager']['getOwnMetadata'](interface_1[_0x500757(0x1b0)],_0x1417fa)||{};if(!_0x48208b)throw new Error(_0x500757(0x1b8)+((_0x1417fa===null||_0x1417fa===void 0x0?void 0x0:_0x1417fa['name'])||_0x1417fa)+_0x500757(0x198));if(!this[_0x500757(0x1bb)][_0x500757(0x1ac)](_0x1417fa)){const _0x6783fa=_0x562eed[_0x500757(0x1a4)](_0x1417fa,[_0x2d071e,_0x562eed,_0x2d67b[_0x500757(0x19e)](_0x3abe07||_0x2d67b[_0x500757(0x1ae)](_0x48208b))[_0x500757(0x1b1)](_0x48208b)]);this[_0x500757(0x1bb)][_0x500757(0x1b4)](_0x1417fa,_0x6783fa);}return this[_0x500757(0x1bb)][_0x500757(0x1a4)](_0x1417fa);});}};exports['CustomConfiguration']=CustomConfiguration,__decorate([(0x0,core_1['Inject'])(),__metadata(a0_0x9b77b1(0x1a6),core_2[a0_0x9b77b1(0x19c)])],CustomConfiguration['prototype'],'config',void 0x0),__decorate([(0x0,core_1[a0_0x9b77b1(0x19a)])(),__metadata('design:type',core_2['MidwayDecoratorService'])],CustomConfiguration[a0_0x9b77b1(0x1aa)],'decorator',void 0x0),exports[a0_0x9b77b1(0x1a1)]=CustomConfiguration=__decorate([(0x0,core_1[a0_0x9b77b1(0x1ad)])({'imports':[typeorm],'namespace':a0_0x9b77b1(0x192)})],CustomConfiguration);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function InjectEntity(entity: any, connection?: string): any;
|
|
1
|
+
export declare function InjectEntity(entity: any, connection?: string): any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a1_0x45e3bf=a1_0x3a5e;(function(_0x299ee4,_0x199903){const _0x5028fa=a1_0x3a5e,_0x47e89e=_0x299ee4();while(!![]){try{const _0x171961=-parseInt(_0x5028fa(0x195))/0x1+-parseInt(_0x5028fa(0x190))/0x2+parseInt(_0x5028fa(0x19e))/0x3+parseInt(_0x5028fa(0x199))/0x4*(-parseInt(_0x5028fa(0x19b))/0x5)+-parseInt(_0x5028fa(0x193))/0x6+-parseInt(_0x5028fa(0x19c))/0x7+parseInt(_0x5028fa(0x192))/0x8;if(_0x171961===_0x199903)break;else _0x47e89e['push'](_0x47e89e['shift']());}catch(_0x52b218){_0x47e89e['push'](_0x47e89e['shift']());}}}(a1_0x5b7d,0x4f20c));const a1_0x593c85=(function(){let _0xc781ba=!![];return function(_0x119e3d,_0x399620){const _0x5dde00=_0xc781ba?function(){const _0x5cb9f2=a1_0x3a5e;if(_0x399620){const _0x2da8c0=_0x399620[_0x5cb9f2(0x194)](_0x119e3d,arguments);return _0x399620=null,_0x2da8c0;}}:function(){};return _0xc781ba=![],_0x5dde00;};}()),a1_0x6e29c5=a1_0x593c85(this,function(){const _0x4da3bd=a1_0x3a5e;return a1_0x6e29c5[_0x4da3bd(0x18d)]()['search']('(((.+)+)+)+$')[_0x4da3bd(0x18d)]()['constructor'](a1_0x6e29c5)[_0x4da3bd(0x19a)](_0x4da3bd(0x196));});function a1_0x5b7d(){const _0x4e04ca=['(((.+)+)+)+$','@midwayjs/core','default','2492oBgQty','search','1770EvSYbY','2947819qEDhcB','createCustomPropertyDecorator','1397691dsgPfc','defineProperty','toString','__esModule','ENTIFY_KEY','367258gagYSm','InjectEntity','9272864rXokwl','2313480CXCijm','apply','90029saPdAF'];a1_0x5b7d=function(){return _0x4e04ca;};return a1_0x5b7d();}function a1_0x3a5e(_0x4e261e,_0x4f878e){_0x4e261e=_0x4e261e-0x18c;const _0x2ebed0=a1_0x5b7d();let _0x6e29c5=_0x2ebed0[_0x4e261e];return _0x6e29c5;}a1_0x6e29c5();'use strict';Object[a1_0x45e3bf(0x18c)](exports,a1_0x45e3bf(0x18e),{'value':!![]}),exports[a1_0x45e3bf(0x191)]=InjectEntity;const core_1=require(a1_0x45e3bf(0x197)),interface_1=require('../interface');function InjectEntity(_0x33d29b,_0x2d1992=a1_0x45e3bf(0x198)){const _0xc367da=a1_0x45e3bf;return core_1['DecoratorManager'][_0xc367da(0x19d)](interface_1[_0xc367da(0x18f)],{'entity':_0x33d29b,'connection':_0x2d1992});}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { IMidwayApplication, IMidwayContainer } from '@midwayjs/core';
|
|
2
|
-
import { Repository as BaseRepository, ObjectLiteral } from "typeorm";
|
|
3
|
-
import { Repository } from '../definition/Repository';
|
|
4
|
-
interface RepositoryOption<Entity extends ObjectLiteral> {
|
|
5
|
-
new (app: IMidwayApplication, container: IMidwayContainer, repository: BaseRepository<Entity>): Repository<Entity>;
|
|
6
|
-
}
|
|
7
|
-
export declare function InjectRepository<T extends ObjectLiteral>(repository: RepositoryOption<T>, connection?: string): any;
|
|
8
|
-
export {};
|
|
1
|
+
import { IMidwayApplication, IMidwayContainer } from '@midwayjs/core';
|
|
2
|
+
import { Repository as BaseRepository, ObjectLiteral } from "typeorm";
|
|
3
|
+
import { Repository } from '../definition/Repository';
|
|
4
|
+
interface RepositoryOption<Entity extends ObjectLiteral> {
|
|
5
|
+
new (app: IMidwayApplication, container: IMidwayContainer, repository: BaseRepository<Entity>): Repository<Entity>;
|
|
6
|
+
}
|
|
7
|
+
export declare function InjectRepository<T extends ObjectLiteral>(repository: RepositoryOption<T>, connection?: string): any;
|
|
8
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a2_0x5a90d0=a2_0x3c91;(function(_0x4966b2,_0xb070c0){const _0x5cc0cb=a2_0x3c91,_0xd23053=_0x4966b2();while(!![]){try{const _0x2136af=-parseInt(_0x5cc0cb(0x13b))/0x1*(parseInt(_0x5cc0cb(0x13e))/0x2)+parseInt(_0x5cc0cb(0x131))/0x3+parseInt(_0x5cc0cb(0x13d))/0x4*(parseInt(_0x5cc0cb(0x12c))/0x5)+parseInt(_0x5cc0cb(0x140))/0x6*(-parseInt(_0x5cc0cb(0x138))/0x7)+parseInt(_0x5cc0cb(0x13c))/0x8+parseInt(_0x5cc0cb(0x133))/0x9+parseInt(_0x5cc0cb(0x132))/0xa;if(_0x2136af===_0xb070c0)break;else _0xd23053['push'](_0xd23053['shift']());}catch(_0xce7f30){_0xd23053['push'](_0xd23053['shift']());}}}(a2_0x4cc0,0xc39c7));const a2_0x452972=(function(){let _0x10a926=!![];return function(_0x32683e,_0x2f27ec){const _0x53c792=_0x10a926?function(){if(_0x2f27ec){const _0x19c59f=_0x2f27ec['apply'](_0x32683e,arguments);return _0x2f27ec=null,_0x19c59f;}}:function(){};return _0x10a926=![],_0x53c792;};}()),a2_0x4c14bd=a2_0x452972(this,function(){const _0x1aff94=a2_0x3c91;return a2_0x4c14bd[_0x1aff94(0x136)]()['search']('(((.+)+)+)+$')[_0x1aff94(0x136)]()['constructor'](a2_0x4c14bd)[_0x1aff94(0x13a)](_0x1aff94(0x134));});a2_0x4c14bd();function a2_0x4cc0(){const _0x334025=['DecoratorManager','search','303922xmEEwJ','301152FVUdqL','2723708ZJSyCT','2EpfUXI','InjectRepository','60jqvoOk','10XHvcxH','defineProperty','@midwayjs/core','__esModule','default','239559VaCyYe','2645890KcRzSq','5467815abNBmg','(((.+)+)+)+$','createCustomPropertyDecorator','toString','REPOSITORY_KEY','872431bhSENN'];a2_0x4cc0=function(){return _0x334025;};return a2_0x4cc0();}function a2_0x3c91(_0x229d56,_0x2b7927){_0x229d56=_0x229d56-0x12c;const _0x4e0387=a2_0x4cc0();let _0x4c14bd=_0x4e0387[_0x229d56];return _0x4c14bd;}'use strict';Object[a2_0x5a90d0(0x12d)](exports,a2_0x5a90d0(0x12f),{'value':!![]}),exports[a2_0x5a90d0(0x13f)]=InjectRepository;const core_1=require(a2_0x5a90d0(0x12e)),interface_1=require('../interface');function InjectRepository(_0x30c297,_0x5a6709=a2_0x5a90d0(0x130)){const _0x27b9d3=a2_0x5a90d0;return core_1[_0x27b9d3(0x139)][_0x27b9d3(0x135)](interface_1[_0x27b9d3(0x137)],{'repository':_0x30c297,'connection':_0x5a6709});}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { EntityOptions } from "typeorm";
|
|
2
|
-
export declare function ProvideEntity(table: {
|
|
3
|
-
tableName: string;
|
|
4
|
-
dataSource?: string | string[];
|
|
5
|
-
}, option?: EntityOptions): ClassDecorator;
|
|
1
|
+
import { EntityOptions } from "typeorm";
|
|
2
|
+
export declare function ProvideEntity(table: {
|
|
3
|
+
tableName: string;
|
|
4
|
+
dataSource?: string | string[];
|
|
5
|
+
}, option?: EntityOptions): ClassDecorator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a3_0x27f2ab=a3_0x4007;(function(_0x454f60,_0x33f43b){const _0x276a9b=a3_0x4007,_0x4369d3=_0x454f60();while(!![]){try{const _0x4cb109=-parseInt(_0x276a9b(0x1c4))/0x1+parseInt(_0x276a9b(0x1b4))/0x2*(-parseInt(_0x276a9b(0x1b9))/0x3)+parseInt(_0x276a9b(0x1b5))/0x4+parseInt(_0x276a9b(0x1ca))/0x5+parseInt(_0x276a9b(0x1bd))/0x6*(-parseInt(_0x276a9b(0x1c1))/0x7)+parseInt(_0x276a9b(0x1cf))/0x8+-parseInt(_0x276a9b(0x1be))/0x9*(-parseInt(_0x276a9b(0x1bb))/0xa);if(_0x4cb109===_0x33f43b)break;else _0x4369d3['push'](_0x4369d3['shift']());}catch(_0x112653){_0x4369d3['push'](_0x4369d3['shift']());}}}(a3_0xbd9d,0xbcc17));function a3_0x4007(_0x408a20,_0x1f8c65){_0x408a20=_0x408a20-0x1b4;const _0x4cd669=a3_0xbd9d();let _0x3f3037=_0x4cd669[_0x408a20];return _0x3f3037;}const a3_0x555e7e=(function(){let _0x381e55=!![];return function(_0x14e88e,_0x1a4dd6){const _0x3713ca=_0x381e55?function(){const _0x1e81c8=a3_0x4007;if(_0x1a4dd6){const _0x26beb0=_0x1a4dd6[_0x1e81c8(0x1cc)](_0x14e88e,arguments);return _0x1a4dd6=null,_0x26beb0;}}:function(){};return _0x381e55=![],_0x3713ca;};}()),a3_0x3f3037=a3_0x555e7e(this,function(){const _0x297282=a3_0x4007;return a3_0x3f3037[_0x297282(0x1c9)]()[_0x297282(0x1d1)](_0x297282(0x1ba))[_0x297282(0x1c9)]()[_0x297282(0x1cd)](a3_0x3f3037)[_0x297282(0x1d1)](_0x297282(0x1ba));});a3_0x3f3037();function a3_0xbd9d(){const _0x4fdb27=['DecoratorManager','31120XKFIOU','name','saveModule','string','Entity','toString','83470GYNidQ','MetadataManager','apply','constructor','@midwayjs/core','4225848gDBeyH','dataSource','search','274438LavleZ','64108CiTDih','default','defineMetadata','../interface','12zfZEgk','(((.+)+)+)+$','510470BQJvma','__esModule','78ukvGaE','162PXcsUI','isArray','tableName','68201KjZeMI','ENTIFY_MODULE'];a3_0xbd9d=function(){return _0x4fdb27;};return a3_0xbd9d();}'use strict';Object['defineProperty'](exports,a3_0x27f2ab(0x1bc),{'value':!![]}),exports['ProvideEntity']=ProvideEntity;const typeorm_1=require('typeorm'),core_1=require(a3_0x27f2ab(0x1ce)),interface_1=require(a3_0x27f2ab(0x1b8));function ProvideEntity(_0x52cc45,_0x42dd6d={}){return _0xae34ca=>{const _0x4aa611=a3_0x4007;_0x42dd6d[_0x4aa611(0x1c5)]=_0x52cc45[_0x4aa611(0x1c0)];const _0x56a853=[];if(!(_0x52cc45===null||_0x52cc45===void 0x0?void 0x0:_0x52cc45['dataSource']))_0x56a853['push'](_0x4aa611(0x1b6));else{if(typeof(_0x52cc45===null||_0x52cc45===void 0x0?void 0x0:_0x52cc45[_0x4aa611(0x1d0)])==_0x4aa611(0x1c7))_0x56a853['push'](_0x52cc45===null||_0x52cc45===void 0x0?void 0x0:_0x52cc45['dataSource']);else{if(Array[_0x4aa611(0x1bf)](_0x52cc45===null||_0x52cc45===void 0x0?void 0x0:_0x52cc45['dataSource']))for(let _0x30d9d4 of _0x52cc45[_0x4aa611(0x1d0)]||['default']){_0x56a853['push'](_0x30d9d4);}}}core_1[_0x4aa611(0x1c3)][_0x4aa611(0x1c6)](interface_1[_0x4aa611(0x1c2)],_0xae34ca),core_1[_0x4aa611(0x1cb)][_0x4aa611(0x1b7)](interface_1['ENTIFY_MODULE_SOURCE'],{'tableName':_0x52cc45[_0x4aa611(0x1c0)],'dataSource':_0x56a853},_0xae34ca),(0x0,typeorm_1[_0x4aa611(0x1c8)])(_0x52cc45['tableName'],_0x42dd6d)(_0xae34ca);};}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { EntitySchema } from "typeorm";
|
|
2
|
-
export declare function ProvideObserve(entity?: Function | EntitySchema<any>): ClassDecorator;
|
|
1
|
+
import { EntitySchema } from "typeorm";
|
|
2
|
+
export declare function ProvideObserve(entity?: Function | EntitySchema<any>): ClassDecorator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a4_0xede7(_0x2bde22,_0x43f3cc){_0x2bde22=_0x2bde22-0x6e;const _0x2b68f6=a4_0x501d();let _0xeb69ff=_0x2b68f6[_0x2bde22];return _0xeb69ff;}function a4_0x501d(){const _0x82854b=['Singleton','3670840ScIlob','constructor','180DpGdJr','ScopeEnum','628356goyTpO','28AdzlIL','Provide','apply','prototype','215035PJhDdm','514526wEqXjo','REPOSITORY_OBSERVE_KEY','Scope','48104MSOiLM','303464fjrGEO','typeorm','undefined','toString','defineProperty','EventSubscriber','__esModule','DecoratorManager','766287NPtVLR','(((.+)+)+)+$','listenTo','../interface','search','@midwayjs/core'];a4_0x501d=function(){return _0x82854b;};return a4_0x501d();}const a4_0x4572c8=a4_0xede7;(function(_0xbc80f9,_0x4a1727){const _0x5803b7=a4_0xede7,_0x5829c6=_0xbc80f9();while(!![]){try{const _0x1b5744=parseInt(_0x5803b7(0x83))/0x1+-parseInt(_0x5803b7(0x87))/0x2+-parseInt(_0x5803b7(0x7d))/0x3+parseInt(_0x5803b7(0x7e))/0x4*(parseInt(_0x5803b7(0x82))/0x5)+-parseInt(_0x5803b7(0x7b))/0x6*(parseInt(_0x5803b7(0x86))/0x7)+parseInt(_0x5803b7(0x79))/0x8+-parseInt(_0x5803b7(0x72))/0x9;if(_0x1b5744===_0x4a1727)break;else _0x5829c6['push'](_0x5829c6['shift']());}catch(_0x4fdca5){_0x5829c6['push'](_0x5829c6['shift']());}}}(a4_0x501d,0x97d77));const a4_0x33420c=(function(){let _0x24922f=!![];return function(_0x3bf7d9,_0x180815){const _0x3abd1f=_0x24922f?function(){const _0x3dae35=a4_0xede7;if(_0x180815){const _0x13cf54=_0x180815[_0x3dae35(0x80)](_0x3bf7d9,arguments);return _0x180815=null,_0x13cf54;}}:function(){};return _0x24922f=![],_0x3abd1f;};}()),a4_0xeb69ff=a4_0x33420c(this,function(){const _0x59b64a=a4_0xede7;return a4_0xeb69ff[_0x59b64a(0x8a)]()[_0x59b64a(0x76)](_0x59b64a(0x73))[_0x59b64a(0x8a)]()[_0x59b64a(0x7a)](a4_0xeb69ff)[_0x59b64a(0x76)](_0x59b64a(0x73));});a4_0xeb69ff();'use strict';Object[a4_0x4572c8(0x6e)](exports,a4_0x4572c8(0x70),{'value':!![]}),exports['ProvideObserve']=ProvideObserve;const typeorm_1=require(a4_0x4572c8(0x88)),core_1=require(a4_0x4572c8(0x77)),core_2=require('@midwayjs/core'),interface_1=require(a4_0x4572c8(0x75));function ProvideObserve(_0x474e03){return _0x2db76a=>{const _0xdcdf99=a4_0xede7;_0x474e03&&typeof _0x2db76a[_0xdcdf99(0x81)][_0xdcdf99(0x74)]==_0xdcdf99(0x89)&&(_0x2db76a[_0xdcdf99(0x81)][_0xdcdf99(0x74)]=()=>_0x474e03),(0x0,typeorm_1[_0xdcdf99(0x6f)])()(_0x2db76a),core_2[_0xdcdf99(0x71)]['saveModule'](interface_1[_0xdcdf99(0x84)],_0x2db76a),((0x0,core_1[_0xdcdf99(0x7f)])()(_0x2db76a),(0x0,core_1[_0xdcdf99(0x85)])(core_1[_0xdcdf99(0x7c)][_0xdcdf99(0x78)])(_0x2db76a));};}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { EntitySchema } from "typeorm";
|
|
2
|
-
export declare function ProvideRepository(entity: Function | EntitySchema<any>): ClassDecorator;
|
|
1
|
+
import { EntitySchema } from "typeorm";
|
|
2
|
+
export declare function ProvideRepository(entity: Function | EntitySchema<any>): ClassDecorator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a5_0x4aefe4=a5_0x3572;function a5_0x138f(){const _0x550cc4=['4eqvsSY','defineMetadata','toString','119maiyqv','499488mvaFtz','12tADbgk','ScopeEnum','defineProperty','24EhevLQ','__esModule','@midwayjs/core','Scope','Provide','444738FwklNk','1493469oHPuaj','search','2JgkFLH','ProvideRepository','(((.+)+)+)+$','29633318VJcLGd','MetadataManager','8145400SWiRQh','6945695NBOCaS','2258502VnAVmn'];a5_0x138f=function(){return _0x550cc4;};return a5_0x138f();}(function(_0x4ba0aa,_0x507697){const _0x30c028=a5_0x3572,_0x3993fb=_0x4ba0aa();while(!![]){try{const _0x274392=parseInt(_0x30c028(0xf0))/0x1+-parseInt(_0x30c028(0xfc))/0x2*(-parseInt(_0x30c028(0xeb))/0x3)+-parseInt(_0x30c028(0xec))/0x4*(parseInt(_0x30c028(0xea))/0x5)+parseInt(_0x30c028(0xf9))/0x6*(-parseInt(_0x30c028(0xef))/0x7)+-parseInt(_0x30c028(0xf4))/0x8*(-parseInt(_0x30c028(0xfa))/0x9)+-parseInt(_0x30c028(0xe9))/0xa+-parseInt(_0x30c028(0xff))/0xb*(-parseInt(_0x30c028(0xf1))/0xc);if(_0x274392===_0x507697)break;else _0x3993fb['push'](_0x3993fb['shift']());}catch(_0x4d6518){_0x3993fb['push'](_0x3993fb['shift']());}}}(a5_0x138f,0xef559));const a5_0x148108=(function(){let _0x5aec90=!![];return function(_0x60eefa,_0x45cdfc){const _0xacc886=_0x5aec90?function(){if(_0x45cdfc){const _0x43f469=_0x45cdfc['apply'](_0x60eefa,arguments);return _0x45cdfc=null,_0x43f469;}}:function(){};return _0x5aec90=![],_0xacc886;};}()),a5_0x42c63f=a5_0x148108(this,function(){const _0x1a759e=a5_0x3572;return a5_0x42c63f[_0x1a759e(0xee)]()['search']('(((.+)+)+)+$')[_0x1a759e(0xee)]()['constructor'](a5_0x42c63f)[_0x1a759e(0xfb)](_0x1a759e(0xfe));});a5_0x42c63f();'use strict';Object[a5_0x4aefe4(0xf3)](exports,a5_0x4aefe4(0xf5),{'value':!![]}),exports[a5_0x4aefe4(0xfd)]=ProvideRepository;const core_1=require(a5_0x4aefe4(0xf6)),core_2=require('@midwayjs/core'),interface_1=require('../interface');function a5_0x3572(_0x5ac3f2,_0x525996){_0x5ac3f2=_0x5ac3f2-0xe8;const _0x48f0db=a5_0x138f();let _0x42c63f=_0x48f0db[_0x5ac3f2];return _0x42c63f;}function ProvideRepository(_0x1f8b13){return _0x1eadfd=>{const _0x3f2ba7=a5_0x3572;(0x0,core_1[_0x3f2ba7(0xf7)])(core_1[_0x3f2ba7(0xf2)]['Request'],{'allowDowngrade':!![]})(_0x1eadfd),((0x0,core_1[_0x3f2ba7(0xf8)])()(_0x1eadfd),core_2[_0x3f2ba7(0xe8)][_0x3f2ba7(0xed)](interface_1['REPOSITORY_KEY'],{'entity':_0x1f8b13},_0x1eadfd));};}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare function ProvideSearch(model: any): ClassDecorator;
|
|
2
|
-
export declare function Search(field: string, comment: string): MethodDecorator;
|
|
3
|
-
export declare function SearchScope(scope: string, comment: string): MethodDecorator;
|
|
1
|
+
export declare function ProvideSearch(model: any): ClassDecorator;
|
|
2
|
+
export declare function Search(field: string, comment: string): MethodDecorator;
|
|
3
|
+
export declare function SearchScope(scope: string, comment: string): MethodDecorator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a6_0x49830a=a6_0x61d6;(function(_0x586387,_0x68dcc){const _0x12febd=a6_0x61d6,_0x4c2d0d=_0x586387();while(!![]){try{const _0x5edd0a=parseInt(_0x12febd(0x12d))/0x1+-parseInt(_0x12febd(0x123))/0x2*(-parseInt(_0x12febd(0x128))/0x3)+-parseInt(_0x12febd(0x12e))/0x4+parseInt(_0x12febd(0x11e))/0x5*(parseInt(_0x12febd(0x11b))/0x6)+parseInt(_0x12febd(0x11a))/0x7*(-parseInt(_0x12febd(0x127))/0x8)+-parseInt(_0x12febd(0x122))/0x9*(-parseInt(_0x12febd(0x129))/0xa)+parseInt(_0x12febd(0x11d))/0xb*(-parseInt(_0x12febd(0x11c))/0xc);if(_0x5edd0a===_0x68dcc)break;else _0x4c2d0d['push'](_0x4c2d0d['shift']());}catch(_0x4c4c2b){_0x4c2d0d['push'](_0x4c2d0d['shift']());}}}(a6_0x1cfe,0xcde57));const a6_0x5e85ea=(function(){let _0x516419=!![];return function(_0xa8c1fb,_0x430edc){const _0x402fa6=_0x516419?function(){if(_0x430edc){const _0x2b5326=_0x430edc['apply'](_0xa8c1fb,arguments);return _0x430edc=null,_0x2b5326;}}:function(){};return _0x516419=![],_0x402fa6;};}()),a6_0x14e762=a6_0x5e85ea(this,function(){const _0x10dbd0=a6_0x61d6;return a6_0x14e762['toString']()[_0x10dbd0(0x125)](_0x10dbd0(0x126))['toString']()['constructor'](a6_0x14e762)[_0x10dbd0(0x125)](_0x10dbd0(0x126));});a6_0x14e762();'use strict';Object['defineProperty'](exports,a6_0x49830a(0x118),{'value':!![]}),exports['ProvideSearch']=ProvideSearch,exports[a6_0x49830a(0x11f)]=Search,exports['SearchScope']=SearchScope;function a6_0x1cfe(){const _0x17491e=['../interface','MetadataManager','__esModule','Provide','10604027wAVLIX','2584926gWBbxr','24DEnLLc','3185633acobMa','10bCPcyS','Search','Scope','MODEL_KEY','2208699FwtcXJ','43034LTAZDZ','@midwayjs/core','search','(((.+)+)+)+$','8CvIOtY','159jnjUNF','10dMSGfO','MODEL_SEARCH_KEY','attachMetadata','Singleton','1264636IqIzbX','2298688vkMmdh'];a6_0x1cfe=function(){return _0x17491e;};return a6_0x1cfe();}const core_1=require('@midwayjs/core'),core_2=require(a6_0x49830a(0x124)),interface_1=require(a6_0x49830a(0x116));function ProvideSearch(_0x5d769e){return _0xfe2fda=>{const _0x377e9c=a6_0x61d6;core_2['DecoratorManager']['saveModule'](interface_1[_0x377e9c(0x121)],_0xfe2fda),((0x0,core_1[_0x377e9c(0x119)])()(_0xfe2fda),(0x0,core_1[_0x377e9c(0x120)])(core_1['ScopeEnum'][_0x377e9c(0x12c)])(_0xfe2fda)),core_2[_0x377e9c(0x117)][_0x377e9c(0x12b)](interface_1[_0x377e9c(0x121)],_0x5d769e,_0xfe2fda);};}function a6_0x61d6(_0xd98ea6,_0x581d8b){_0xd98ea6=_0xd98ea6-0x116;const _0x3b9c4c=a6_0x1cfe();let _0x14e762=_0x3b9c4c[_0xd98ea6];return _0x14e762;}function Search(_0x585215,_0x3a1bf7){return(_0x526c87,_0x2efd48,_0x3a1ffe)=>{const _0x5e5620=a6_0x61d6;core_2['MetadataManager'][_0x5e5620(0x12b)](interface_1[_0x5e5620(0x12a)],{'field':_0x585215,'comment':_0x3a1bf7,'target':_0x526c87,'methodName':_0x2efd48,'descriptor':_0x3a1ffe},_0x526c87);};}function SearchScope(_0x2bb7cc,_0x1be33b){return(_0x56ae51,_0x5e7140,_0x29e24e)=>{const _0x40607b=a6_0x61d6;core_2[_0x40607b(0x117)][_0x40607b(0x12b)](interface_1['MODEL_SEARCH_SCOPE_KEY'],{'scope':_0x2bb7cc,'comment':_0x1be33b,'target':_0x56ae51,'methodName':_0x5e7140,'descriptor':_0x29e24e},_0x56ae51);};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function ProvideSharding(...entities: Function[]): ClassDecorator;
|
|
1
|
+
export declare function ProvideSharding(...entities: Function[]): ClassDecorator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a7_0x16cb6f=a7_0x8040;function a7_0x477e(){const _0xe941a4=['672704onIwOa','MetadataManager','975365ykVvXX','constructor','14930rvKlkh','ScopeEnum','@midwayjs/core','3663lTWCqL','(((.+)+)+)+$','defineMetadata','../interface','15056vnBpBI','__esModule','ProvideSharding','toString','ENTIFY_SHARDING_KEY','752072hoaLak','287JeWZEz','2876676Pvfjqe','Provide','169429TQKQmZ','search','apply','defineProperty','18TIHFAE'];a7_0x477e=function(){return _0xe941a4;};return a7_0x477e();}(function(_0x4cd64d,_0x1183e1){const _0x4d62da=a7_0x8040,_0x21a126=_0x4cd64d();while(!![]){try{const _0x3206ed=-parseInt(_0x4d62da(0xcd))/0x1+-parseInt(_0x4d62da(0xc9))/0x2+parseInt(_0x4d62da(0xcb))/0x3+parseInt(_0x4d62da(0xb9))/0x4+-parseInt(_0x4d62da(0xbb))/0x5*(parseInt(_0x4d62da(0xb8))/0x6)+parseInt(_0x4d62da(0xca))/0x7*(-parseInt(_0x4d62da(0xc4))/0x8)+parseInt(_0x4d62da(0xc0))/0x9*(parseInt(_0x4d62da(0xbd))/0xa);if(_0x3206ed===_0x1183e1)break;else _0x21a126['push'](_0x21a126['shift']());}catch(_0x1b3d3e){_0x21a126['push'](_0x21a126['shift']());}}}(a7_0x477e,0x80a19));const a7_0x47381f=(function(){let _0x1840e3=!![];return function(_0x13e158,_0x3aa4c1){const _0x1fc7ac=_0x1840e3?function(){const _0x3e42fd=a7_0x8040;if(_0x3aa4c1){const _0xba85ab=_0x3aa4c1[_0x3e42fd(0xcf)](_0x13e158,arguments);return _0x3aa4c1=null,_0xba85ab;}}:function(){};return _0x1840e3=![],_0x1fc7ac;};}()),a7_0x54c2b7=a7_0x47381f(this,function(){const _0x1026e9=a7_0x8040;return a7_0x54c2b7[_0x1026e9(0xc7)]()[_0x1026e9(0xce)]('(((.+)+)+)+$')['toString']()[_0x1026e9(0xbc)](a7_0x54c2b7)[_0x1026e9(0xce)](_0x1026e9(0xc1));});a7_0x54c2b7();'use strict';Object[a7_0x16cb6f(0xd0)](exports,a7_0x16cb6f(0xc5),{'value':!![]}),exports[a7_0x16cb6f(0xc6)]=ProvideSharding;function a7_0x8040(_0x3d3e49,_0x365956){_0x3d3e49=_0x3d3e49-0xb8;const _0x9a7669=a7_0x477e();let _0x54c2b7=_0x9a7669[_0x3d3e49];return _0x54c2b7;}const core_1=require(a7_0x16cb6f(0xbf)),core_2=require(a7_0x16cb6f(0xbf)),interface_1=require(a7_0x16cb6f(0xc3));function ProvideSharding(..._0x5cd072){return _0x3ff1ad=>{const _0x1d6e62=a7_0x8040;(0x0,core_1[_0x1d6e62(0xcc)])()(_0x3ff1ad),(0x0,core_1['Scope'])(core_1[_0x1d6e62(0xbe)]['Singleton'])(_0x3ff1ad);for(const _0x182352 of _0x5cd072){core_2[_0x1d6e62(0xba)][_0x1d6e62(0xc2)](interface_1[_0x1d6e62(0xc8)],{'strategy':_0x3ff1ad},_0x182352);}};}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare function VirtualColumn(comment: string, option?: {
|
|
2
|
-
[key: string]: any;
|
|
3
|
-
default?: any;
|
|
4
|
-
}): PropertyDecorator;
|
|
1
|
+
export declare function VirtualColumn(comment: string, option?: {
|
|
2
|
+
[key: string]: any;
|
|
3
|
+
default?: any;
|
|
4
|
+
}): PropertyDecorator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a8_0x1805(_0xa6c272,_0x29a5f8){_0xa6c272=_0xa6c272-0x141;const _0x5683c0=a8_0x54df();let _0xae072a=_0x5683c0[_0xa6c272];return _0xae072a;}const a8_0x121d3e=a8_0x1805;(function(_0x50e35d,_0x559e4e){const _0x50a0b4=a8_0x1805,_0xa11e70=_0x50e35d();while(!![]){try{const _0x29be97=parseInt(_0x50a0b4(0x150))/0x1*(-parseInt(_0x50a0b4(0x14e))/0x2)+-parseInt(_0x50a0b4(0x14b))/0x3*(-parseInt(_0x50a0b4(0x154))/0x4)+parseInt(_0x50a0b4(0x14f))/0x5+parseInt(_0x50a0b4(0x155))/0x6+parseInt(_0x50a0b4(0x14c))/0x7+parseInt(_0x50a0b4(0x148))/0x8*(parseInt(_0x50a0b4(0x149))/0x9)+-parseInt(_0x50a0b4(0x144))/0xa*(parseInt(_0x50a0b4(0x145))/0xb);if(_0x29be97===_0x559e4e)break;else _0xa11e70['push'](_0xa11e70['shift']());}catch(_0x5b8290){_0xa11e70['push'](_0xa11e70['shift']());}}}(a8_0x54df,0x63b79));function a8_0x54df(){const _0x3174ca=['@midwayjs/core','VirtualColumn','10OiGcph','21583826rhXnRo','MetadataManager','ENTITY_VIRTUAL_COLUMN_KEY','169528EqjXRw','342RvBfdw','apply','3IwfUrR','3982300mqCqMc','defineProperty','39724UCFtDs','2666900EhlgMP','29KytExT','search','__esModule','defineMetadata','1936384RkyUfO','3329826xsHnqc','getOwnMetadata','constructor','toString','../interface'];a8_0x54df=function(){return _0x3174ca;};return a8_0x54df();}const a8_0x4663de=(function(){let _0x146a23=!![];return function(_0x4d953e,_0x3c99cb){const _0x40ed86=_0x146a23?function(){const _0x4ea5de=a8_0x1805;if(_0x3c99cb){const _0x404b0f=_0x3c99cb[_0x4ea5de(0x14a)](_0x4d953e,arguments);return _0x3c99cb=null,_0x404b0f;}}:function(){};return _0x146a23=![],_0x40ed86;};}()),a8_0xae072a=a8_0x4663de(this,function(){const _0xe1b11d=a8_0x1805;return a8_0xae072a[_0xe1b11d(0x158)]()[_0xe1b11d(0x151)]('(((.+)+)+)+$')[_0xe1b11d(0x158)]()[_0xe1b11d(0x157)](a8_0xae072a)['search']('(((.+)+)+)+$');});a8_0xae072a();'use strict';Object[a8_0x121d3e(0x14d)](exports,a8_0x121d3e(0x152),{'value':!![]}),exports[a8_0x121d3e(0x143)]=VirtualColumn;const core_1=require(a8_0x121d3e(0x142)),interface_1=require(a8_0x121d3e(0x141));function VirtualColumn(_0x282633,_0x5e4cae){return(_0x45d34,_0x33ae44)=>{const _0x147445=a8_0x1805,_0x34ba3f=core_1[_0x147445(0x146)][_0x147445(0x156)](interface_1['ENTITY_VIRTUAL_COLUMN_KEY'],_0x45d34)||{};_0x34ba3f[_0x33ae44]={'comment':_0x282633,..._0x5e4cae},core_1['MetadataManager'][_0x147445(0x153)](interface_1[_0x147445(0x147)],_0x34ba3f,_0x45d34);};}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { IMidwayApplication, IMidwayContainer } from '@midwayjs/core';
|
|
2
|
-
import { QueryDeepPartialEntity } from 'typeorm/query-builder/QueryPartialEntity';
|
|
3
|
-
import { Repository as BaseRepository, EntityManager, ObjectLiteral, DeepPartial, FindOptionsWhere
|
|
4
|
-
import { SearchParams, SearchPaginate, SearchOptions } from "../interface";
|
|
5
|
-
interface modelSearch {
|
|
6
|
-
model: any;
|
|
7
|
-
searchs: any[];
|
|
8
|
-
searchScopes: any[];
|
|
9
|
-
}
|
|
10
|
-
type IsolationLevel = "READ UNCOMMITTED" | "READ COMMITTED" | "REPEATABLE READ" | "SERIALIZABLE";
|
|
11
|
-
export declare class Repository<Entity extends ObjectLiteral> extends BaseRepository<Entity> {
|
|
12
|
-
readonly app: IMidwayApplication;
|
|
13
|
-
readonly container: IMidwayContainer;
|
|
14
|
-
readonly modelSearchs: modelSearch[];
|
|
15
|
-
search(params?: SearchParams<Entity>, paginate?: SearchPaginate, options?: SearchOptions): Promise<import("typeorm").SelectQueryBuilder<Entity>>;
|
|
16
|
-
safeUpdate(criteria: string | string[] | number | number[] | Date | Date[] |
|
|
17
|
-
mergeSave(mergeIntoEntity: Entity, ...entityLikes: DeepPartial<Entity>[]): Promise<Entity>;
|
|
18
|
-
createSave(mergeIntoEntity: DeepPartial<Entity>, ...entityLikes: DeepPartial<Entity>[]): Promise<Entity>;
|
|
19
|
-
transaction<T>(runInTransaction: (manager: EntityManager) => Promise<T>): Promise<T>;
|
|
20
|
-
transaction<T>(isolationLevel: IsolationLevel, runInTransaction: (manager: EntityManager) => Promise<T>): Promise<T>;
|
|
21
|
-
isDirty(tmpEntity: Entity, entityLike: DeepPartial<Entity>, ignoreKeys?: string[]): boolean;
|
|
22
|
-
getDirty(tmpEntity: Entity, entityLike: DeepPartial<Entity>, ignoreKeys?: string[]): DeepPartial<Entity>;
|
|
23
|
-
constructor(app: IMidwayApplication, container: IMidwayContainer, repository: BaseRepository<Entity>);
|
|
24
|
-
}
|
|
25
|
-
export {};
|
|
1
|
+
import { IMidwayApplication, IMidwayContainer } from '@midwayjs/core';
|
|
2
|
+
import { QueryDeepPartialEntity } from 'typeorm/query-builder/QueryPartialEntity';
|
|
3
|
+
import { Repository as BaseRepository, EntityManager, ObjectLiteral, DeepPartial, FindOptionsWhere } from "typeorm";
|
|
4
|
+
import { SearchParams, SearchPaginate, SearchOptions } from "../interface";
|
|
5
|
+
interface modelSearch {
|
|
6
|
+
model: any;
|
|
7
|
+
searchs: any[];
|
|
8
|
+
searchScopes: any[];
|
|
9
|
+
}
|
|
10
|
+
type IsolationLevel = "READ UNCOMMITTED" | "READ COMMITTED" | "REPEATABLE READ" | "SERIALIZABLE";
|
|
11
|
+
export declare class Repository<Entity extends ObjectLiteral> extends BaseRepository<Entity> {
|
|
12
|
+
readonly app: IMidwayApplication;
|
|
13
|
+
readonly container: IMidwayContainer;
|
|
14
|
+
readonly modelSearchs: modelSearch[];
|
|
15
|
+
search(params?: SearchParams<Entity>, paginate?: SearchPaginate, options?: SearchOptions): Promise<import("typeorm").SelectQueryBuilder<Entity>>;
|
|
16
|
+
safeUpdate(criteria: string | string[] | number | number[] | Date | Date[] | FindOptionsWhere<Entity>, partialEntity: QueryDeepPartialEntity<Entity>, retrycount?: number): Promise<import("typeorm").UpdateResult>;
|
|
17
|
+
mergeSave(mergeIntoEntity: Entity, ...entityLikes: DeepPartial<Entity>[]): Promise<Entity>;
|
|
18
|
+
createSave(mergeIntoEntity: DeepPartial<Entity>, ...entityLikes: DeepPartial<Entity>[]): Promise<Entity>;
|
|
19
|
+
transaction<T>(runInTransaction: (manager: EntityManager) => Promise<T>): Promise<T>;
|
|
20
|
+
transaction<T>(isolationLevel: IsolationLevel, runInTransaction: (manager: EntityManager) => Promise<T>): Promise<T>;
|
|
21
|
+
isDirty(tmpEntity: Entity, entityLike: DeepPartial<Entity>, ignoreKeys?: string[]): boolean;
|
|
22
|
+
getDirty(tmpEntity: Entity, entityLike: DeepPartial<Entity>, ignoreKeys?: string[]): DeepPartial<Entity>;
|
|
23
|
+
constructor(app: IMidwayApplication, container: IMidwayContainer, repository: BaseRepository<Entity>);
|
|
24
|
+
}
|
|
25
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a9_0x404ad3=a9_0x1a21;(function(_0xc49ebc,_0x51f585){const _0x429c9b=a9_0x1a21,_0xb8c54a=_0xc49ebc();while(!![]){try{const _0x56c067=-parseInt(_0x429c9b(0x1a3))/0x1*(-parseInt(_0x429c9b(0x1a7))/0x2)+-parseInt(_0x429c9b(0x1ae))/0x3*(parseInt(_0x429c9b(0x1d4))/0x4)+parseInt(_0x429c9b(0x1a0))/0x5*(-parseInt(_0x429c9b(0x1e9))/0x6)+-parseInt(_0x429c9b(0x1df))/0x7+-parseInt(_0x429c9b(0x1d1))/0x8+parseInt(_0x429c9b(0x1f3))/0x9+parseInt(_0x429c9b(0x1e6))/0xa;if(_0x56c067===_0x51f585)break;else _0xb8c54a['push'](_0xb8c54a['shift']());}catch(_0x151111){_0xb8c54a['push'](_0xb8c54a['shift']());}}}(a9_0x55d1,0x9c699));const a9_0x419345=(function(){let _0x11f630=!![];return function(_0x4749e4,_0x311ce1){const _0x318c44=_0x11f630?function(){if(_0x311ce1){const _0xe7c5f=_0x311ce1['apply'](_0x4749e4,arguments);return _0x311ce1=null,_0xe7c5f;}}:function(){};return _0x11f630=![],_0x318c44;};}()),a9_0x1552ea=a9_0x419345(this,function(){const _0x374692=a9_0x1a21;return a9_0x1552ea[_0x374692(0x1ec)]()[_0x374692(0x1f0)]('(((.+)+)+)+$')[_0x374692(0x1ec)]()['constructor'](a9_0x1552ea)['search']('(((.+)+)+)+$');});a9_0x1552ea();'use strict';function a9_0x55d1(){const _0x2412d8=['_page','includes','findColumnWithPropertyName','LIKE','__initialize','methodName','assign','399128VOOAMz','limit','orderBy','288HMXjhg','function','(:...','toLowerCase','\x20IN(:..._auto_','app','model','NOT\x20LIKE','BETWEEN','modelSearchs','bind','5757122YHLoAU','\x20AND\x20:','修改失败','_auto_','mergeSave','manager','searchs','17482660wEQCwW','type','container','18xuKSxG','MODEL_SEARCH_KEY','\x20=\x20:_auto_','toString','pageType','getDirty','indexOf','search','NOT\x20BETWEEN','random','4879674XjYaXI','getClassMetadata','FIND\x20IN\x20SET','DESC','create','merge','SERIALIZABLE','andWhere','isArray','name','transaction','target','753895sdBwHy','metadata','string','21cwTDIg','undefined','Repository','createSave','48038vOqJbE','isDirty','1\x20=\x202','length','offset','getAsync','scope','34563XisAIC','condition','ceil','skip','operator','@midwayjs/core','excess','_isreverse','abs','save','alias','_size','ISNULL','split','affected','trim','take','searchScopes','NOT\x20ISNULL','createQueryBuilder','queryRunner','hasOwnProperty','field','push','NOT\x20IN','_order','defineProperty','ASC'];a9_0x55d1=function(){return _0x2412d8;};return a9_0x55d1();}Object[a9_0x404ad3(0x1c8)](exports,'__esModule',{'value':!![]}),exports[a9_0x404ad3(0x1a5)]=void 0x0;const core_1=require(a9_0x404ad3(0x1b3)),typeorm_1=require('typeorm'),interface_1=require('../interface');function a9_0x1a21(_0x244f8b,_0x3fcc20){const _0x4dad35=a9_0x55d1();return a9_0x1a21=function(_0x1552ea,_0x419345){_0x1552ea=_0x1552ea-0x195;let _0x55d16c=_0x4dad35[_0x1552ea];return _0x55d16c;},a9_0x1a21(_0x244f8b,_0x3fcc20);}class Repository extends typeorm_1[a9_0x404ad3(0x1a5)]{async[a9_0x404ad3(0x1f0)](_0xdb166,_0x32581d,_0x1aae72={}){const _0x37f34a=a9_0x404ad3;var _0x2f080b,_0x407789,_0x56938d,_0x6b27c1,_0x3719cb,_0x2507d1;const _0x2e86dc=this[_0x37f34a(0x1c1)](undefined,_0x1aae72===null||_0x1aae72===void 0x0?void 0x0:_0x1aae72[_0x37f34a(0x1c2)]),_0x3536bc=[];for(const _0x525d9d of this['modelSearchs']){if(_0x525d9d===null||_0x525d9d===void 0x0?void 0x0:_0x525d9d[_0x37f34a(0x1da)]){const _0x253269=await this['app']['getApplicationContext']()[_0x37f34a(0x1ac)](_0x525d9d['model']);if(_0x253269){typeof _0x253269[_0x37f34a(0x1ce)]==_0x37f34a(0x1d5)&&await _0x253269[_0x37f34a(0x1ce)][_0x37f34a(0x1de)](_0x253269)(_0x2e86dc,_0xdb166,{'app':this[_0x37f34a(0x1d9)],'container':this[_0x37f34a(0x1e8)],'paginate':_0x32581d,'queryRunner':_0x1aae72===null||_0x1aae72===void 0x0?void 0x0:_0x1aae72[_0x37f34a(0x1c2)]});if(_0x1aae72===null||_0x1aae72===void 0x0?void 0x0:_0x1aae72[_0x37f34a(0x1ad)]){const _0x2959c3=Array[_0x37f34a(0x19c)](_0x1aae72[_0x37f34a(0x1ad)])?_0x1aae72[_0x37f34a(0x1ad)]:[_0x1aae72[_0x37f34a(0x1ad)]];for(const _0x2dc976 of(_0x525d9d===null||_0x525d9d===void 0x0?void 0x0:_0x525d9d[_0x37f34a(0x1bf)])||[]){(_0x2dc976===null||_0x2dc976===void 0x0?void 0x0:_0x2dc976[_0x37f34a(0x1ad)])&&_0x2959c3[_0x37f34a(0x1ef)](_0x2dc976[_0x37f34a(0x1ad)])!=-0x1&&(_0x2dc976===null||_0x2dc976===void 0x0?void 0x0:_0x2dc976['methodName'])&&typeof _0x253269[_0x2dc976[_0x37f34a(0x1cf)]]=='function'&&await _0x253269[_0x2dc976[_0x37f34a(0x1cf)]][_0x37f34a(0x1de)](_0x253269)(_0x2e86dc,_0xdb166,{'app':this[_0x37f34a(0x1d9)],'container':this[_0x37f34a(0x1e8)],'paginate':_0x32581d,'queryRunner':_0x1aae72===null||_0x1aae72===void 0x0?void 0x0:_0x1aae72[_0x37f34a(0x1c2)]});}}if(_0xdb166)for(const _0x2c3d48 of(_0x525d9d===null||_0x525d9d===void 0x0?void 0x0:_0x525d9d['searchs'])||[]){(_0x2c3d48===null||_0x2c3d48===void 0x0?void 0x0:_0x2c3d48[_0x37f34a(0x1c4)])&&(_0x2c3d48===null||_0x2c3d48===void 0x0?void 0x0:_0x2c3d48[_0x37f34a(0x1cf)])&&typeof _0x253269[_0x2c3d48['methodName']]==_0x37f34a(0x1d5)&&(typeof(_0xdb166===null||_0xdb166===void 0x0?void 0x0:_0xdb166[_0x2c3d48[_0x37f34a(0x1c4)]])!=_0x37f34a(0x1a4)&&!((_0x2f080b=_0xdb166===null||_0xdb166===void 0x0?void 0x0:_0xdb166[_0x2c3d48[_0x37f34a(0x1c4)]])===null||_0x2f080b===void 0x0?void 0x0:_0x2f080b[_0x37f34a(0x1c3)](_0x37f34a(0x1b2)))&&(_0x3536bc[_0x37f34a(0x1ef)](_0x2c3d48[_0x37f34a(0x1c4)])==-0x1&&_0x3536bc[_0x37f34a(0x1c5)](_0x2c3d48['field']),await _0x253269[_0x2c3d48[_0x37f34a(0x1cf)]][_0x37f34a(0x1de)](_0x253269)(_0x2e86dc,_0xdb166[_0x2c3d48[_0x37f34a(0x1c4)]],_0xdb166,{'app':this[_0x37f34a(0x1d9)],'container':this[_0x37f34a(0x1e8)],'paginate':_0x32581d,'queryRunner':_0x1aae72===null||_0x1aae72===void 0x0?void 0x0:_0x1aae72[_0x37f34a(0x1c2)]})));}}}}for(const _0x36b250 in _0xdb166){if(typeof _0xdb166[_0x36b250]==_0x37f34a(0x1a4))continue;if(_0x3536bc['indexOf'](_0x36b250)!=-0x1)continue;const _0x3d450c=this[_0x37f34a(0x1a1)][_0x37f34a(0x1cc)](_0x36b250);if(!_0x3d450c)continue;if((_0x407789=_0xdb166===null||_0xdb166===void 0x0?void 0x0:_0xdb166[_0x36b250])===null||_0x407789===void 0x0?void 0x0:_0x407789[_0x37f34a(0x1c3)](_0x37f34a(0x1b2))){const _0x40ea33=(_0x56938d=_0xdb166[_0x36b250])===null||_0x56938d===void 0x0?void 0x0:_0x56938d[_0x37f34a(0x1af)],_0x3423f7=(_0x6b27c1=_0xdb166[_0x36b250])===null||_0x6b27c1===void 0x0?void 0x0:_0x6b27c1['operator'][_0x37f34a(0x1bd)]()['toUpperCase'](),_0x5c5618=_0x37f34a(0x1e2)+_0x36b250+'_'+Math['ceil'](Math[_0x37f34a(0x1f2)]()*0xa)+Math[_0x37f34a(0x1b0)](Math[_0x37f34a(0x1f2)]()*0xa)+Math['ceil'](Math['random']()*0xa)+Math[_0x37f34a(0x1b0)](Math[_0x37f34a(0x1f2)]()*0xa);if(['=','!=','<>','>','>=','<','<=',_0x37f34a(0x1cd),_0x37f34a(0x1db)][_0x37f34a(0x1ef)](_0x3423f7)!=-0x1)typeof _0x40ea33!=_0x37f34a(0x1a4)&&_0x2e86dc[_0x37f34a(0x19b)](_0x2e86dc['alias']+'.'+_0x36b250+'\x20'+_0x3423f7+'\x20:'+_0x5c5618,{[_0x5c5618]:_0x40ea33});else{if(['IN',_0x37f34a(0x1c6)]['indexOf'](_0x3423f7)!=-0x1){if(typeof _0x40ea33!=_0x37f34a(0x1a4)){const _0x584014=Array[_0x37f34a(0x19c)](_0x40ea33)?_0x40ea33:typeof _0x40ea33==_0x37f34a(0x1a2)?_0x40ea33[_0x37f34a(0x1bb)](','):[_0x40ea33];_0x584014[_0x37f34a(0x1aa)]==0x0?_0x2e86dc[_0x37f34a(0x19b)]('1\x20=\x202'):_0x2e86dc[_0x37f34a(0x19b)](_0x2e86dc[_0x37f34a(0x1b8)]+'.'+_0x36b250+'\x20'+_0x3423f7+_0x37f34a(0x1d6)+_0x5c5618+')',{[_0x5c5618]:_0x584014});}else _0x2e86dc[_0x37f34a(0x19b)](_0x37f34a(0x1a9));}else{if([_0x37f34a(0x196),'NOT\x20FIND\x20IN\x20SET']['indexOf'](_0x3423f7)!=-0x1)typeof _0x40ea33!=_0x37f34a(0x1a4)&&_0x2e86dc[_0x37f34a(0x19b)](_0x3423f7+'(:'+_0x5c5618+','+_0x2e86dc[_0x37f34a(0x1b8)]+'.'+_0x36b250+')',{[_0x5c5618]:_0x40ea33});else{if([_0x37f34a(0x1dc),_0x37f34a(0x1f1)][_0x37f34a(0x1ef)](_0x3423f7)!=-0x1){if(typeof _0x40ea33!=_0x37f34a(0x1a4)){const _0x2f6ca5=Array['isArray'](_0x40ea33)?_0x40ea33:typeof _0x40ea33==_0x37f34a(0x1a2)?_0x40ea33[_0x37f34a(0x1bb)](','):[_0x40ea33];_0x2f6ca5['length']>0x1&&_0x2e86dc[_0x37f34a(0x19b)](_0x2e86dc['alias']+'.'+_0x36b250+'\x20'+_0x3423f7+'\x20:'+_0x5c5618+_0x37f34a(0x1e0)+_0x5c5618+'_2',{[''+_0x5c5618]:_0x2f6ca5[0x0],[_0x5c5618+'_2']:_0x2f6ca5[0x1]});}}else[_0x37f34a(0x1ba),_0x37f34a(0x1c0)][_0x37f34a(0x1ef)](_0x3423f7)!=-0x1&&_0x2e86dc[_0x37f34a(0x19b)](_0x3423f7+'('+_0x2e86dc['alias']+'.'+_0x36b250+')');}}}}else{const _0x76ac1=((_0x2507d1=typeof _0x3d450c[_0x37f34a(0x1e7)]==_0x37f34a(0x1d5)?(_0x3719cb=_0x3d450c===null||_0x3d450c===void 0x0?void 0x0:_0x3d450c[_0x37f34a(0x1e7)])===null||_0x3719cb===void 0x0?void 0x0:_0x3719cb[_0x37f34a(0x19d)]:_0x3d450c[_0x37f34a(0x1e7)]['toString']())===null||_0x2507d1===void 0x0?void 0x0:_0x2507d1[_0x37f34a(0x1d7)]())||undefined;_0x76ac1&&(Array[_0x37f34a(0x19c)](_0xdb166[_0x36b250])?_0xdb166[_0x36b250]['length']==0x0?_0x2e86dc['andWhere'](_0x37f34a(0x1a9)):_0x2e86dc['andWhere'](_0x2e86dc['alias']+'.'+_0x36b250+_0x37f34a(0x1d8)+_0x36b250+')',{[_0x37f34a(0x1e2)+_0x36b250]:_0xdb166[_0x36b250]}):_0x2e86dc[_0x37f34a(0x19b)](_0x2e86dc[_0x37f34a(0x1b8)]+'.'+_0x36b250+_0x37f34a(0x1eb)+_0x36b250,{[_0x37f34a(0x1e2)+_0x36b250]:_0xdb166[_0x36b250]}));}}if(_0x32581d===null||_0x32581d===void 0x0?void 0x0:_0x32581d[_0x37f34a(0x1c7)]){if(_0x32581d[_0x37f34a(0x1c7)]['indexOf']('.')!==-0x1)_0x2e86dc[_0x37f34a(0x1d3)](''+_0x32581d[_0x37f34a(0x1c7)],(_0x32581d===null||_0x32581d===void 0x0?void 0x0:_0x32581d[_0x37f34a(0x1b5)])?_0x37f34a(0x1c9):_0x37f34a(0x197));else this[_0x37f34a(0x1a1)][_0x37f34a(0x1cc)](_0x32581d[_0x37f34a(0x1c7)])&&_0x2e86dc[_0x37f34a(0x1d3)](_0x2e86dc[_0x37f34a(0x1b8)]+'.'+_0x32581d[_0x37f34a(0x1c7)],(_0x32581d===null||_0x32581d===void 0x0?void 0x0:_0x32581d[_0x37f34a(0x1b5)])?'ASC':_0x37f34a(0x197));}return(_0x1aae72===null||_0x1aae72===void 0x0?void 0x0:_0x1aae72[_0x37f34a(0x1ed)])==_0x37f34a(0x1d2)?((_0x32581d===null||_0x32581d===void 0x0?void 0x0:_0x32581d[_0x37f34a(0x1b9)])&&_0x2e86dc[_0x37f34a(0x1d2)](_0x32581d===null||_0x32581d===void 0x0?void 0x0:_0x32581d['_size']),(_0x32581d===null||_0x32581d===void 0x0?void 0x0:_0x32581d[_0x37f34a(0x1ca)])&&(_0x32581d===null||_0x32581d===void 0x0?void 0x0:_0x32581d[_0x37f34a(0x1b9)])&&_0x2e86dc[_0x37f34a(0x1ab)]((Math[_0x37f34a(0x1b6)](_0x32581d[_0x37f34a(0x1ca)])-0x1)*Math[_0x37f34a(0x1b6)](_0x32581d[_0x37f34a(0x1b9)]))):((_0x32581d===null||_0x32581d===void 0x0?void 0x0:_0x32581d['_size'])&&_0x2e86dc[_0x37f34a(0x1be)](Math[_0x37f34a(0x1b6)](_0x32581d['_size'])),(_0x32581d===null||_0x32581d===void 0x0?void 0x0:_0x32581d[_0x37f34a(0x1ca)])&&(_0x32581d===null||_0x32581d===void 0x0?void 0x0:_0x32581d[_0x37f34a(0x1b9)])&&_0x2e86dc[_0x37f34a(0x1b1)]((Math['abs'](_0x32581d['_page'])-0x1)*Math[_0x37f34a(0x1b6)](_0x32581d[_0x37f34a(0x1b9)]))),typeof(_0x1aae72===null||_0x1aae72===void 0x0?void 0x0:_0x1aae72[_0x37f34a(0x1b4)])=='function'&&await(_0x1aae72===null||_0x1aae72===void 0x0?void 0x0:_0x1aae72['excess'](_0x2e86dc)),_0x2e86dc;}async['safeUpdate'](_0x5eecea,_0x11f9c2,_0x31a088=0x0){const _0x2497ba=a9_0x404ad3;let _0x42bf15=0x0;while(!![]){const _0x58d534=await this['update'](_0x5eecea,_0x11f9c2);if((_0x58d534===null||_0x58d534===void 0x0?void 0x0:_0x58d534[_0x2497ba(0x1bc)])&&_0x58d534['affected']>0x0)return _0x58d534;if(_0x31a088>0x0&&_0x42bf15>=_0x31a088)throw new Error(_0x2497ba(0x1e1));_0x42bf15++;}}async[a9_0x404ad3(0x1e3)](_0x526e44,..._0x3b0b24){const _0x19be33=a9_0x404ad3,_0x3ad3ef=this['merge'](_0x526e44,..._0x3b0b24);return await this[_0x19be33(0x1b7)](_0x3ad3ef);}async[a9_0x404ad3(0x1a6)](_0x33fe75,..._0x50efa6){const _0x4f1343=a9_0x404ad3,_0xe4a18f=this[_0x4f1343(0x199)](this[_0x4f1343(0x198)](_0x33fe75),..._0x50efa6);return await this[_0x4f1343(0x1b7)](_0xe4a18f);}async[a9_0x404ad3(0x19e)](_0x494693,_0x361980){const _0x380b56=a9_0x404ad3;return typeof _0x494693=='function'?this[_0x380b56(0x1e4)][_0x380b56(0x19e)](_0x380b56(0x19a),_0x494693):this[_0x380b56(0x1e4)][_0x380b56(0x19e)](_0x494693,_0x361980);}[a9_0x404ad3(0x1a8)](_0xf682d2,_0x1985ee,_0x3c063a=[]){const _0x35a268=a9_0x404ad3,_0x3362db=Object[_0x35a268(0x1d0)]({},{..._0xf682d2},{..._0x1985ee});for(const _0x3e68fd in _0x3362db){if(_0x3c063a[_0x35a268(0x1cb)](_0x3e68fd))continue;if((_0x3362db===null||_0x3362db===void 0x0?void 0x0:_0x3362db[_0x3e68fd])!=(_0xf682d2===null||_0xf682d2===void 0x0?void 0x0:_0xf682d2[_0x3e68fd]))return!![];if((_0x3362db===null||_0x3362db===void 0x0?void 0x0:_0x3362db[_0x3e68fd])!=(_0x1985ee===null||_0x1985ee===void 0x0?void 0x0:_0x1985ee[_0x3e68fd]))return!![];}return![];}[a9_0x404ad3(0x1ee)](_0x315487,_0x54fc84,_0x2ca3f3=[]){const _0x3e5fc2=a9_0x404ad3,_0x5e5074={},_0x1778a3=Object[_0x3e5fc2(0x1d0)]({},{..._0x315487},{..._0x54fc84});for(const _0x4adb6a in _0x1778a3){if(_0x2ca3f3[_0x3e5fc2(0x1cb)](_0x4adb6a))continue;(_0x1778a3===null||_0x1778a3===void 0x0?void 0x0:_0x1778a3[_0x4adb6a])!=(_0x315487===null||_0x315487===void 0x0?void 0x0:_0x315487[_0x4adb6a])&&(_0x5e5074[_0x4adb6a]=_0x1778a3[_0x4adb6a]);}return _0x5e5074;}constructor(_0x3cca41,_0x21b5bd,_0x153d15){const _0x2ab1e6=a9_0x404ad3;super(_0x153d15[_0x2ab1e6(0x19f)],_0x153d15[_0x2ab1e6(0x1e4)],_0x153d15[_0x2ab1e6(0x1c2)]),this['modelSearchs']=[];for(const _0x27577a of(0x0,core_1[_0x2ab1e6(0x195)])(interface_1['MODEL_KEY'],this[_0x2ab1e6(0x19f)])||[]){const _0x53a802={'model':_0x27577a,'searchs':[],'searchScopes':[]};for(const _0x291a85 of(0x0,core_1[_0x2ab1e6(0x195)])(interface_1[_0x2ab1e6(0x1ea)],_0x27577a)||[]){_0x53a802[_0x2ab1e6(0x1e5)][_0x2ab1e6(0x1c5)](_0x291a85);}for(const _0x3f19aa of(0x0,core_1[_0x2ab1e6(0x195)])(interface_1['MODEL_SEARCH_SCOPE_KEY'],_0x27577a)||[]){_0x53a802['searchScopes'][_0x2ab1e6(0x1c5)](_0x3f19aa);}this[_0x2ab1e6(0x1dd)][_0x2ab1e6(0x1c5)](_0x53a802);}this['app']=_0x3cca41,this[_0x2ab1e6(0x1e8)]=_0x21b5bd;}}exports[a9_0x404ad3(0x1a5)]=Repository;
|
|
1
|
+
const a9_0x2d318b=a9_0x1769;(function(_0x266c23,_0x7add86){const _0x125c6a=a9_0x1769,_0x273990=_0x266c23();while(!![]){try{const _0xc0caf6=parseInt(_0x125c6a(0x15f))/0x1*(parseInt(_0x125c6a(0x1a9))/0x2)+-parseInt(_0x125c6a(0x15e))/0x3*(-parseInt(_0x125c6a(0x1ac))/0x4)+-parseInt(_0x125c6a(0x18a))/0x5+parseInt(_0x125c6a(0x187))/0x6*(parseInt(_0x125c6a(0x176))/0x7)+parseInt(_0x125c6a(0x182))/0x8+parseInt(_0x125c6a(0x179))/0x9*(parseInt(_0x125c6a(0x17e))/0xa)+-parseInt(_0x125c6a(0x18d))/0xb;if(_0xc0caf6===_0x7add86)break;else _0x273990['push'](_0x273990['shift']());}catch(_0x3aa7ae){_0x273990['push'](_0x273990['shift']());}}}(a9_0x2f0c,0x3148c));const a9_0x4a9287=(function(){let _0x75a8fb=!![];return function(_0x32cca4,_0x15e709){const _0x1dacfd=_0x75a8fb?function(){const _0x49cbb8=a9_0x1769;if(_0x15e709){const _0x29fd85=_0x15e709[_0x49cbb8(0x1a6)](_0x32cca4,arguments);return _0x15e709=null,_0x29fd85;}}:function(){};return _0x75a8fb=![],_0x1dacfd;};}()),a9_0x21386e=a9_0x4a9287(this,function(){const _0x59e93b=a9_0x1769;return a9_0x21386e[_0x59e93b(0x1af)]()[_0x59e93b(0x1b4)](_0x59e93b(0x15a))[_0x59e93b(0x1af)]()['constructor'](a9_0x21386e)['search']('(((.+)+)+)+$');});a9_0x21386e();'use strict';Object[a9_0x2d318b(0x1b5)](exports,'__esModule',{'value':!![]}),exports[a9_0x2d318b(0x172)]=void 0x0;function a9_0x1769(_0x23cf93,_0x1ea133){_0x23cf93=_0x23cf93-0x159;const _0x9769c5=a9_0x2f0c();let _0x21386e=_0x9769c5[_0x23cf93];return _0x21386e;}const core_1=require(a9_0x2d318b(0x184)),typeorm_1=require(a9_0x2d318b(0x1b6)),interface_1=require('../interface');class Repository extends typeorm_1[a9_0x2d318b(0x172)]{async[a9_0x2d318b(0x1b4)](_0x492194,_0x21b4ce,_0xe8bab3={}){const _0xfd62f2=a9_0x2d318b;var _0x1e60e3,_0x51c09d,_0x3bdbf6,_0x2ed259,_0x752b57,_0xdb6094;const _0x4d704d=this[_0xfd62f2(0x19a)](undefined,_0xe8bab3===null||_0xe8bab3===void 0x0?void 0x0:_0xe8bab3[_0xfd62f2(0x181)]),_0x1c3bff=[];for(const _0xd59de2 of this['modelSearchs']){if(_0xd59de2===null||_0xd59de2===void 0x0?void 0x0:_0xd59de2[_0xfd62f2(0x17b)]){const _0x1ab011=await this[_0xfd62f2(0x17f)][_0xfd62f2(0x16e)]()[_0xfd62f2(0x162)](_0xd59de2[_0xfd62f2(0x17b)]);if(_0x1ab011){typeof _0x1ab011['__initialize']=='function'&&await _0x1ab011['__initialize'][_0xfd62f2(0x166)](_0x1ab011)(_0x4d704d,_0x492194,{'app':this[_0xfd62f2(0x17f)],'container':this[_0xfd62f2(0x1b2)],'paginate':_0x21b4ce,'queryRunner':_0xe8bab3===null||_0xe8bab3===void 0x0?void 0x0:_0xe8bab3[_0xfd62f2(0x181)]});if(_0xe8bab3===null||_0xe8bab3===void 0x0?void 0x0:_0xe8bab3[_0xfd62f2(0x1a1)]){const _0x58d991=Array['isArray'](_0xe8bab3[_0xfd62f2(0x1a1)])?_0xe8bab3['scope']:[_0xe8bab3[_0xfd62f2(0x1a1)]];for(const _0x2daff8 of(_0xd59de2===null||_0xd59de2===void 0x0?void 0x0:_0xd59de2['searchScopes'])||[]){(_0x2daff8===null||_0x2daff8===void 0x0?void 0x0:_0x2daff8[_0xfd62f2(0x1a1)])&&_0x58d991[_0xfd62f2(0x186)](_0x2daff8[_0xfd62f2(0x1a1)])!=-0x1&&(_0x2daff8===null||_0x2daff8===void 0x0?void 0x0:_0x2daff8[_0xfd62f2(0x171)])&&typeof _0x1ab011[_0x2daff8[_0xfd62f2(0x171)]]=='function'&&await _0x1ab011[_0x2daff8['methodName']][_0xfd62f2(0x166)](_0x1ab011)(_0x4d704d,_0x492194,{'app':this[_0xfd62f2(0x17f)],'container':this[_0xfd62f2(0x1b2)],'paginate':_0x21b4ce,'queryRunner':_0xe8bab3===null||_0xe8bab3===void 0x0?void 0x0:_0xe8bab3['queryRunner']});}}if(_0x492194)for(const _0xb453a4 of(_0xd59de2===null||_0xd59de2===void 0x0?void 0x0:_0xd59de2['searchs'])||[]){(_0xb453a4===null||_0xb453a4===void 0x0?void 0x0:_0xb453a4['field'])&&(_0xb453a4===null||_0xb453a4===void 0x0?void 0x0:_0xb453a4[_0xfd62f2(0x171)])&&typeof _0x1ab011[_0xb453a4[_0xfd62f2(0x171)]]=='function'&&(typeof(_0x492194===null||_0x492194===void 0x0?void 0x0:_0x492194[_0xb453a4[_0xfd62f2(0x169)]])!=_0xfd62f2(0x194)&&!((_0x1e60e3=_0x492194===null||_0x492194===void 0x0?void 0x0:_0x492194[_0xb453a4['field']])===null||_0x1e60e3===void 0x0?void 0x0:_0x1e60e3[_0xfd62f2(0x197)](_0xfd62f2(0x177)))&&(_0x1c3bff[_0xfd62f2(0x186)](_0xb453a4[_0xfd62f2(0x169)])==-0x1&&_0x1c3bff[_0xfd62f2(0x193)](_0xb453a4[_0xfd62f2(0x169)]),await _0x1ab011[_0xb453a4['methodName']]['bind'](_0x1ab011)(_0x4d704d,_0x492194[_0xb453a4[_0xfd62f2(0x169)]],_0x492194,{'app':this[_0xfd62f2(0x17f)],'container':this[_0xfd62f2(0x1b2)],'paginate':_0x21b4ce,'queryRunner':_0xe8bab3===null||_0xe8bab3===void 0x0?void 0x0:_0xe8bab3['queryRunner']})));}}}}for(const _0x123b11 in _0x492194){if(typeof _0x492194[_0x123b11]==_0xfd62f2(0x194))continue;if(_0x1c3bff['indexOf'](_0x123b11)!=-0x1)continue;const _0x17dd22=this['metadata'][_0xfd62f2(0x16c)](_0x123b11);if(!_0x17dd22)continue;if((_0x51c09d=_0x492194===null||_0x492194===void 0x0?void 0x0:_0x492194[_0x123b11])===null||_0x51c09d===void 0x0?void 0x0:_0x51c09d[_0xfd62f2(0x197)](_0xfd62f2(0x177))){const _0x41528b=(_0x3bdbf6=_0x492194[_0x123b11])===null||_0x3bdbf6===void 0x0?void 0x0:_0x3bdbf6['condition'],_0x385712=(_0x2ed259=_0x492194[_0x123b11])===null||_0x2ed259===void 0x0?void 0x0:_0x2ed259[_0xfd62f2(0x177)]['trim']()['toUpperCase'](),_0x3f80ab=_0xfd62f2(0x161)+_0x123b11+'_'+Math[_0xfd62f2(0x17c)](Math[_0xfd62f2(0x1ab)]()*0xa)+Math[_0xfd62f2(0x17c)](Math[_0xfd62f2(0x1ab)]()*0xa)+Math[_0xfd62f2(0x17c)](Math[_0xfd62f2(0x1ab)]()*0xa)+Math['ceil'](Math[_0xfd62f2(0x1ab)]()*0xa);if(['=','!=','<>','>','>=','<','<=',_0xfd62f2(0x1b0),_0xfd62f2(0x19f)][_0xfd62f2(0x186)](_0x385712)!=-0x1)typeof _0x41528b!=_0xfd62f2(0x194)&&_0x4d704d[_0xfd62f2(0x185)](_0x4d704d[_0xfd62f2(0x1b1)]+'.'+_0x123b11+'\x20'+_0x385712+'\x20:'+_0x3f80ab,{[_0x3f80ab]:_0x41528b});else{if(['IN',_0xfd62f2(0x17d)][_0xfd62f2(0x186)](_0x385712)!=-0x1){if(typeof _0x41528b!=_0xfd62f2(0x194)){const _0x396ce8=Array[_0xfd62f2(0x160)](_0x41528b)?_0x41528b:typeof _0x41528b==_0xfd62f2(0x165)?_0x41528b[_0xfd62f2(0x164)](','):[_0x41528b];_0x396ce8[_0xfd62f2(0x18b)]==0x0?_0x4d704d['andWhere'](_0xfd62f2(0x19c)):_0x4d704d[_0xfd62f2(0x185)](_0x4d704d['alias']+'.'+_0x123b11+'\x20'+_0x385712+'(:...'+_0x3f80ab+')',{[_0x3f80ab]:_0x396ce8});}else _0x4d704d[_0xfd62f2(0x185)](_0xfd62f2(0x19c));}else{if([_0xfd62f2(0x16f),'NOT\x20FIND\x20IN\x20SET'][_0xfd62f2(0x186)](_0x385712)!=-0x1)typeof _0x41528b!=_0xfd62f2(0x194)&&_0x4d704d[_0xfd62f2(0x185)](_0x385712+'(:'+_0x3f80ab+','+_0x4d704d[_0xfd62f2(0x1b1)]+'.'+_0x123b11+')',{[_0x3f80ab]:_0x41528b});else{if(['BETWEEN',_0xfd62f2(0x191)][_0xfd62f2(0x186)](_0x385712)!=-0x1){if(typeof _0x41528b!=_0xfd62f2(0x194)){const _0x33ec2e=Array['isArray'](_0x41528b)?_0x41528b:typeof _0x41528b==_0xfd62f2(0x165)?_0x41528b[_0xfd62f2(0x164)](','):[_0x41528b];_0x33ec2e[_0xfd62f2(0x18b)]>0x1&&_0x4d704d['andWhere'](_0x4d704d[_0xfd62f2(0x1b1)]+'.'+_0x123b11+'\x20'+_0x385712+'\x20:'+_0x3f80ab+_0xfd62f2(0x15d)+_0x3f80ab+'_2',{[''+_0x3f80ab]:_0x33ec2e[0x0],[_0x3f80ab+'_2']:_0x33ec2e[0x1]});}}else[_0xfd62f2(0x1a2),_0xfd62f2(0x175)][_0xfd62f2(0x186)](_0x385712)!=-0x1&&_0x4d704d[_0xfd62f2(0x185)](_0x385712+'('+_0x4d704d[_0xfd62f2(0x1b1)]+'.'+_0x123b11+')');}}}}else{const _0x41d574=((_0xdb6094=typeof _0x17dd22[_0xfd62f2(0x168)]==_0xfd62f2(0x1b3)?(_0x752b57=_0x17dd22===null||_0x17dd22===void 0x0?void 0x0:_0x17dd22[_0xfd62f2(0x168)])===null||_0x752b57===void 0x0?void 0x0:_0x752b57[_0xfd62f2(0x173)]:_0x17dd22[_0xfd62f2(0x168)]['toString']())===null||_0xdb6094===void 0x0?void 0x0:_0xdb6094[_0xfd62f2(0x189)]())||undefined;_0x41d574&&(Array[_0xfd62f2(0x160)](_0x492194[_0x123b11])?_0x492194[_0x123b11][_0xfd62f2(0x18b)]==0x0?_0x4d704d[_0xfd62f2(0x185)]('1\x20=\x202'):_0x4d704d[_0xfd62f2(0x185)](_0x4d704d[_0xfd62f2(0x1b1)]+'.'+_0x123b11+'\x20IN(:..._auto_'+_0x123b11+')',{['_auto_'+_0x123b11]:_0x492194[_0x123b11]}):_0x4d704d[_0xfd62f2(0x185)](_0x4d704d[_0xfd62f2(0x1b1)]+'.'+_0x123b11+_0xfd62f2(0x174)+_0x123b11,{[_0xfd62f2(0x161)+_0x123b11]:_0x492194[_0x123b11]}));}}if(_0x21b4ce===null||_0x21b4ce===void 0x0?void 0x0:_0x21b4ce[_0xfd62f2(0x170)]){if(_0x21b4ce[_0xfd62f2(0x170)]['indexOf']('.')!==-0x1)_0x4d704d['orderBy'](''+_0x21b4ce[_0xfd62f2(0x170)],(_0x21b4ce===null||_0x21b4ce===void 0x0?void 0x0:_0x21b4ce['_isreverse'])?_0xfd62f2(0x180):_0xfd62f2(0x19b));else this[_0xfd62f2(0x1ae)]['findColumnWithPropertyName'](_0x21b4ce[_0xfd62f2(0x170)])&&_0x4d704d['orderBy'](_0x4d704d[_0xfd62f2(0x1b1)]+'.'+_0x21b4ce[_0xfd62f2(0x170)],(_0x21b4ce===null||_0x21b4ce===void 0x0?void 0x0:_0x21b4ce[_0xfd62f2(0x1ad)])?'ASC':_0xfd62f2(0x19b));}return(_0xe8bab3===null||_0xe8bab3===void 0x0?void 0x0:_0xe8bab3[_0xfd62f2(0x19d)])=='limit'?((_0x21b4ce===null||_0x21b4ce===void 0x0?void 0x0:_0x21b4ce['_size'])&&_0x4d704d['limit'](_0x21b4ce===null||_0x21b4ce===void 0x0?void 0x0:_0x21b4ce['_size']),(_0x21b4ce===null||_0x21b4ce===void 0x0?void 0x0:_0x21b4ce[_0xfd62f2(0x159)])&&(_0x21b4ce===null||_0x21b4ce===void 0x0?void 0x0:_0x21b4ce[_0xfd62f2(0x18f)])&&_0x4d704d[_0xfd62f2(0x18c)]((Math[_0xfd62f2(0x198)](_0x21b4ce['_page'])-0x1)*Math[_0xfd62f2(0x198)](_0x21b4ce[_0xfd62f2(0x18f)]))):((_0x21b4ce===null||_0x21b4ce===void 0x0?void 0x0:_0x21b4ce[_0xfd62f2(0x18f)])&&_0x4d704d[_0xfd62f2(0x188)](Math[_0xfd62f2(0x198)](_0x21b4ce['_size'])),(_0x21b4ce===null||_0x21b4ce===void 0x0?void 0x0:_0x21b4ce[_0xfd62f2(0x159)])&&(_0x21b4ce===null||_0x21b4ce===void 0x0?void 0x0:_0x21b4ce[_0xfd62f2(0x18f)])&&_0x4d704d[_0xfd62f2(0x190)]((Math[_0xfd62f2(0x198)](_0x21b4ce[_0xfd62f2(0x159)])-0x1)*Math[_0xfd62f2(0x198)](_0x21b4ce[_0xfd62f2(0x18f)]))),typeof(_0xe8bab3===null||_0xe8bab3===void 0x0?void 0x0:_0xe8bab3['excess'])==_0xfd62f2(0x1b3)&&await(_0xe8bab3===null||_0xe8bab3===void 0x0?void 0x0:_0xe8bab3['excess'](_0x4d704d)),_0x4d704d;}async[a9_0x2d318b(0x183)](_0x2e8633,_0x5ab212,_0x3faed5=0x0){const _0x145342=a9_0x2d318b;let _0xb80e9b=0x0;while(!![]){const _0x3ca3fc=await this[_0x145342(0x192)](_0x2e8633,_0x5ab212);if((_0x3ca3fc===null||_0x3ca3fc===void 0x0?void 0x0:_0x3ca3fc[_0x145342(0x1a4)])&&_0x3ca3fc['affected']>0x0)return _0x3ca3fc;if(_0x3faed5>0x0&&_0xb80e9b>=_0x3faed5)throw new Error(_0x145342(0x167));_0xb80e9b++;}}async[a9_0x2d318b(0x178)](_0xe2e1b8,..._0x2d5eae){const _0x4587e5=a9_0x2d318b,_0x30c6d5=this['merge'](_0xe2e1b8,..._0x2d5eae);return await this[_0x4587e5(0x16b)](_0x30c6d5);}async[a9_0x2d318b(0x196)](_0x549991,..._0x5449e1){const _0x5219ec=a9_0x2d318b,_0x63d26c=this[_0x5219ec(0x1a5)](this[_0x5219ec(0x195)](_0x549991),..._0x5449e1);return await this[_0x5219ec(0x16b)](_0x63d26c);}async[a9_0x2d318b(0x1a3)](_0x34a9a0,_0x3493d9){const _0x475661=a9_0x2d318b;return typeof _0x34a9a0==_0x475661(0x1b3)?this['manager'][_0x475661(0x1a3)](_0x475661(0x16d),_0x34a9a0):this[_0x475661(0x15b)][_0x475661(0x1a3)](_0x34a9a0,_0x3493d9);}[a9_0x2d318b(0x17a)](_0x2314f1,_0x26ecb9,_0x318127=[]){const _0x5c3cf3=a9_0x2d318b,_0x1c5160=Object[_0x5c3cf3(0x1a8)]({},{..._0x2314f1},{..._0x26ecb9});for(const _0x380a80 in _0x1c5160){if(_0x318127['includes'](_0x380a80))continue;if((_0x1c5160===null||_0x1c5160===void 0x0?void 0x0:_0x1c5160[_0x380a80])!=(_0x2314f1===null||_0x2314f1===void 0x0?void 0x0:_0x2314f1[_0x380a80]))return!![];if((_0x1c5160===null||_0x1c5160===void 0x0?void 0x0:_0x1c5160[_0x380a80])!=(_0x26ecb9===null||_0x26ecb9===void 0x0?void 0x0:_0x26ecb9[_0x380a80]))return!![];}return![];}[a9_0x2d318b(0x163)](_0x36b6df,_0x4edaa5,_0x1e9315=[]){const _0x310ae0=a9_0x2d318b,_0x30efa9={},_0xeaf1c9=Object['assign']({},{..._0x36b6df},{..._0x4edaa5});for(const _0x5dc57c in _0xeaf1c9){if(_0x1e9315[_0x310ae0(0x199)](_0x5dc57c))continue;(_0xeaf1c9===null||_0xeaf1c9===void 0x0?void 0x0:_0xeaf1c9[_0x5dc57c])!=(_0x36b6df===null||_0x36b6df===void 0x0?void 0x0:_0x36b6df[_0x5dc57c])&&(_0x30efa9[_0x5dc57c]=_0xeaf1c9[_0x5dc57c]);}return _0x30efa9;}constructor(_0x46ed79,_0x2c986b,_0x59e89c){const _0x3246f2=a9_0x2d318b;super(_0x59e89c['target'],_0x59e89c[_0x3246f2(0x15b)],_0x59e89c[_0x3246f2(0x181)]),this['modelSearchs']=[];for(const _0x73f57c of core_1[_0x3246f2(0x16a)][_0x3246f2(0x1aa)](interface_1[_0x3246f2(0x1a0)],this[_0x3246f2(0x19e)])||[]){const _0x1161cb={'model':_0x73f57c,'searchs':[],'searchScopes':[]};for(const _0xf8a485 of core_1[_0x3246f2(0x16a)][_0x3246f2(0x1aa)](interface_1[_0x3246f2(0x1a7)],_0x73f57c)||[]){_0x1161cb['searchs'][_0x3246f2(0x193)](_0xf8a485);}for(const _0x205d9c of core_1[_0x3246f2(0x16a)][_0x3246f2(0x1aa)](interface_1[_0x3246f2(0x18e)],_0x73f57c)||[]){_0x1161cb[_0x3246f2(0x15c)][_0x3246f2(0x193)](_0x205d9c);}this['modelSearchs'][_0x3246f2(0x193)](_0x1161cb);}this['app']=_0x46ed79,this[_0x3246f2(0x1b2)]=_0x2c986b;}}function a9_0x2f0c(){const _0x2a5244=['41YyyhHv','isArray','_auto_','getAsync','getDirty','split','string','bind','修改失败','type','field','MetadataManager','save','findColumnWithPropertyName','SERIALIZABLE','getApplicationContext','FIND\x20IN\x20SET','_order','methodName','Repository','name','\x20=\x20:_auto_','NOT\x20ISNULL','483JtGPPM','operator','mergeSave','2526327aZQstr','isDirty','model','ceil','NOT\x20IN','10drGFeH','app','ASC','queryRunner','1209376TIVEwK','safeUpdate','@midwayjs/core','andWhere','indexOf','16110wfZJwX','take','toLowerCase','1798890bwTydN','length','offset','5288888hSelav','MODEL_SEARCH_SCOPE_KEY','_size','skip','NOT\x20BETWEEN','update','push','undefined','create','createSave','hasOwnProperty','abs','includes','createQueryBuilder','DESC','1\x20=\x202','pageType','target','NOT\x20LIKE','MODEL_KEY','scope','ISNULL','transaction','affected','merge','apply','MODEL_SEARCH_KEY','assign','11406gyuEUc','getOwnMetadata','random','765964XInWqo','_isreverse','metadata','toString','LIKE','alias','container','function','search','defineProperty','typeorm','_page','(((.+)+)+)+$','manager','searchScopes','\x20AND\x20:','3OSkDyK'];a9_0x2f0c=function(){return _0x2a5244;};return a9_0x2f0c();}exports[a9_0x2d318b(0x172)]=Repository;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function getDataSourceEntity(source?: string): any[];
|
|
1
|
+
export declare function getDataSourceEntity(source?: string): any[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a10_0x1f2c(_0x141408,_0x4e41d8){_0x141408=_0x141408-0x182;const _0x150e52=a10_0x39ff();let _0x601bfd=_0x150e52[_0x141408];return _0x601bfd;}const a10_0x44540e=a10_0x1f2c;(function(_0x160fd8,_0x44d5eb){const _0x13e4fd=a10_0x1f2c,_0x3d8c09=_0x160fd8();while(!![]){try{const _0x489d87=parseInt(_0x13e4fd(0x186))/0x1*(parseInt(_0x13e4fd(0x18a))/0x2)+parseInt(_0x13e4fd(0x19a))/0x3*(-parseInt(_0x13e4fd(0x185))/0x4)+parseInt(_0x13e4fd(0x197))/0x5*(-parseInt(_0x13e4fd(0x18f))/0x6)+parseInt(_0x13e4fd(0x184))/0x7*(parseInt(_0x13e4fd(0x199))/0x8)+parseInt(_0x13e4fd(0x187))/0x9*(parseInt(_0x13e4fd(0x190))/0xa)+parseInt(_0x13e4fd(0x182))/0xb+-parseInt(_0x13e4fd(0x194))/0xc*(parseInt(_0x13e4fd(0x18c))/0xd);if(_0x489d87===_0x44d5eb)break;else _0x3d8c09['push'](_0x3d8c09['shift']());}catch(_0x4eada5){_0x3d8c09['push'](_0x3d8c09['shift']());}}}(a10_0x39ff,0x542d8));const a10_0x1f52f2=(function(){let _0x3f2e24=!![];return function(_0x553716,_0x36f93c){const _0x290341=_0x3f2e24?function(){const _0x6f969f=a10_0x1f2c;if(_0x36f93c){const _0x21a96f=_0x36f93c[_0x6f969f(0x183)](_0x553716,arguments);return _0x36f93c=null,_0x21a96f;}}:function(){};return _0x3f2e24=![],_0x290341;};}()),a10_0x601bfd=a10_0x1f52f2(this,function(){const _0x159f79=a10_0x1f2c;return a10_0x601bfd[_0x159f79(0x196)]()[_0x159f79(0x195)](_0x159f79(0x189))[_0x159f79(0x196)]()[_0x159f79(0x191)](a10_0x601bfd)[_0x159f79(0x195)](_0x159f79(0x189));});a10_0x601bfd();'use strict';function a10_0x39ff(){const _0x18a4a5=['1233sSDJgu','MetadataManager','(((.+)+)+)+$','1039662IiGQWh','defineProperty','169gXuxLs','DecoratorManager','ENTIFY_MODULE_SOURCE','1140252gJqbfC','19450YCqWvF','constructor','listModule','push','452580lryKiR','search','toString','10YnkiVP','__esModule','112PuCUHh','17847JUbkYX','default','7187950lvJuRI','apply','51310OjogZN','220CanPeZ','1VZBoua'];a10_0x39ff=function(){return _0x18a4a5;};return a10_0x39ff();}Object[a10_0x44540e(0x18b)](exports,a10_0x44540e(0x198),{'value':!![]}),exports['getDataSourceEntity']=getDataSourceEntity;const core_1=require('@midwayjs/core'),interface_1=require('../interface');function getDataSourceEntity(_0x2a88b8=a10_0x44540e(0x19b)){const _0x463f91=a10_0x44540e;var _0x22583b;const _0x29d68c=[];for(const _0x5eb578 of core_1[_0x463f91(0x18d)][_0x463f91(0x192)](interface_1['ENTIFY_MODULE'])){const _0x25afaf=core_1[_0x463f91(0x188)]['getOwnMetadata'](interface_1[_0x463f91(0x18e)],_0x5eb578);((_0x22583b=_0x25afaf===null||_0x25afaf===void 0x0?void 0x0:_0x25afaf['dataSource'])===null||_0x22583b===void 0x0?void 0x0:_0x22583b['find'](_0x1c17fb=>_0x1c17fb==_0x2a88b8))&&_0x29d68c[_0x463f91(0x193)](_0x5eb578);}return _0x29d68c;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function getProvideObserve(): any[];
|
|
1
|
+
export declare function getProvideObserve(): any[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a11_0x16de81=a11_0x10bb;(function(_0x280064,_0x136642){const _0x2de2cf=a11_0x10bb,_0x4d1539=_0x280064();while(!![]){try{const _0x5aa89b=parseInt(_0x2de2cf(0x175))/0x1*(parseInt(_0x2de2cf(0x177))/0x2)+-parseInt(_0x2de2cf(0x180))/0x3+-parseInt(_0x2de2cf(0x17c))/0x4*(-parseInt(_0x2de2cf(0x173))/0x5)+parseInt(_0x2de2cf(0x186))/0x6*(parseInt(_0x2de2cf(0x179))/0x7)+parseInt(_0x2de2cf(0x184))/0x8+parseInt(_0x2de2cf(0x17f))/0x9+-parseInt(_0x2de2cf(0x183))/0xa;if(_0x5aa89b===_0x136642)break;else _0x4d1539['push'](_0x4d1539['shift']());}catch(_0x545344){_0x4d1539['push'](_0x4d1539['shift']());}}}(a11_0x3539,0x98371));const a11_0x53710f=(function(){let _0x35a89a=!![];return function(_0x51dec0,_0x45988c){const _0x1fe97c=_0x35a89a?function(){const _0xbf6ffa=a11_0x10bb;if(_0x45988c){const _0x1ad5fd=_0x45988c[_0xbf6ffa(0x185)](_0x51dec0,arguments);return _0x45988c=null,_0x1ad5fd;}}:function(){};return _0x35a89a=![],_0x1fe97c;};}()),a11_0x50b31a=a11_0x53710f(this,function(){const _0x47651a=a11_0x10bb;return a11_0x50b31a[_0x47651a(0x176)]()[_0x47651a(0x17e)](_0x47651a(0x17a))[_0x47651a(0x176)]()[_0x47651a(0x178)](a11_0x50b31a)[_0x47651a(0x17e)](_0x47651a(0x17a));});a11_0x50b31a();'use strict';function a11_0x10bb(_0x14b7bc,_0x15b3fb){_0x14b7bc=_0x14b7bc-0x173;const _0x486088=a11_0x3539();let _0x50b31a=_0x486088[_0x14b7bc];return _0x50b31a;}Object[a11_0x16de81(0x188)](exports,a11_0x16de81(0x17d),{'value':!![]}),exports[a11_0x16de81(0x182)]=getProvideObserve;const core_1=require(a11_0x16de81(0x181)),interface_1=require(a11_0x16de81(0x17b));function a11_0x3539(){const _0x59f330=['apply','330WINMct','REPOSITORY_OBSERVE_KEY','defineProperty','2893820HVElTO','DecoratorManager','139760YyoNoz','toString','16KuoojG','constructor','84602hbikKi','(((.+)+)+)+$','../interface','8nvTqSJ','__esModule','search','5139630RMXlyk','208641YyITWp','@midwayjs/core','getProvideObserve','37680380nVodtZ','7597200tRLKQw'];a11_0x3539=function(){return _0x59f330;};return a11_0x3539();}function getProvideObserve(){const _0x2d081c=a11_0x16de81;return core_1[_0x2d081c(0x174)]['listModule'](interface_1[_0x2d081c(0x187)])||[];}
|
package/dist/helper/sleep.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function sleep(time?: number): Promise<void>;
|
|
1
|
+
export declare function sleep(time?: number): Promise<void>;
|
package/dist/helper/sleep.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a12_0x2eb1ae=a12_0x49d5;(function(_0x11e16a,_0x279e15){var _0x5b471b=a12_0x49d5,_0x1d7a4c=_0x11e16a();while(!![]){try{var _0x1d52a8=-parseInt(_0x5b471b(0xfb))/0x1+parseInt(_0x5b471b(0xf4))/0x2*(parseInt(_0x5b471b(0xef))/0x3)+-parseInt(_0x5b471b(0xfd))/0x4+parseInt(_0x5b471b(0xfa))/0x5+parseInt(_0x5b471b(0xf9))/0x6*(parseInt(_0x5b471b(0xf5))/0x7)+parseInt(_0x5b471b(0xfc))/0x8*(parseInt(_0x5b471b(0xf6))/0x9)+parseInt(_0x5b471b(0xf1))/0xa*(-parseInt(_0x5b471b(0xf2))/0xb);if(_0x1d52a8===_0x279e15)break;else _0x1d7a4c['push'](_0x1d7a4c['shift']());}catch(_0x4b0806){_0x1d7a4c['push'](_0x1d7a4c['shift']());}}}(a12_0x238d,0xeea0c));var a12_0x2d35a=(function(){var _0x1bb9b4=!![];return function(_0x23ead1,_0x1e7465){var _0x31ac2c=_0x1bb9b4?function(){var _0x31d616=a12_0x49d5;if(_0x1e7465){var _0x2b90b6=_0x1e7465[_0x31d616(0xf7)](_0x23ead1,arguments);return _0x1e7465=null,_0x2b90b6;}}:function(){};return _0x1bb9b4=![],_0x31ac2c;};}()),a12_0x14f0d4=a12_0x2d35a(this,function(){var _0x4b5245=a12_0x49d5;return a12_0x14f0d4[_0x4b5245(0xf3)]()[_0x4b5245(0xf8)](_0x4b5245(0xed))[_0x4b5245(0xf3)]()[_0x4b5245(0xf0)](a12_0x14f0d4)[_0x4b5245(0xf8)](_0x4b5245(0xed));});function a12_0x238d(){var _0x382719=['1170143HQgwgL','3088ZbhYrc','3120316TyAneC','(((.+)+)+)+$','sleep','39bysOGG','constructor','1702990RCXzzh','154jVCxyH','toString','281034QfIPIq','176659XCcIZw','14697wpjEHw','apply','search','378KYtIcp','6324190HEgZMw'];a12_0x238d=function(){return _0x382719;};return a12_0x238d();}a12_0x14f0d4();'use strict';Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[a12_0x2eb1ae(0xee)]=sleep;function a12_0x49d5(_0x4ac186,_0xaaf8a3){_0x4ac186=_0x4ac186-0xed;var _0x243b6a=a12_0x238d();var _0x14f0d4=_0x243b6a[_0x4ac186];return _0x14f0d4;}function sleep(_0x38ae96=0xc8){return new Promise(_0x1bf359=>setTimeout(_0x1bf359,_0x38ae96));}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
export * from "typeorm";
|
|
2
|
-
export * from './interface';
|
|
3
|
-
export * from './interfaceSharding';
|
|
4
|
-
export { Repository } from './definition/Repository';
|
|
5
|
-
export { VirtualColumn } from "./decorator/VirtualColumn";
|
|
6
|
-
export { InjectEntity } from './decorator/InjectEntity';
|
|
7
|
-
export { InjectRepository } from './decorator/InjectRepository';
|
|
8
|
-
export { ProvideEntity } from './decorator/ProvideEntity';
|
|
9
|
-
export { ProvideObserve } from './decorator/ProvideObserve';
|
|
10
|
-
export { ProvideRepository } from './decorator/ProvideRepository';
|
|
11
|
-
export { ProvideSearch, Search, SearchScope } from "./decorator/ProvideSearch";
|
|
12
|
-
export { ProvideSharding } from './decorator/ProvideSharding';
|
|
13
|
-
export { getProvideObserve } from './helper/getProvideObserve';
|
|
14
|
-
export { getDataSourceEntity } from './helper/getDataSourceEntity';
|
|
15
|
-
export { CustomConfiguration as Configuration } from './configuration';
|
|
16
|
-
export { Provide, Inject, Scope, ScopeEnum } from "@midwayjs/core";
|
|
1
|
+
export * from "typeorm";
|
|
2
|
+
export * from './interface';
|
|
3
|
+
export * from './interfaceSharding';
|
|
4
|
+
export { Repository } from './definition/Repository';
|
|
5
|
+
export { VirtualColumn } from "./decorator/VirtualColumn";
|
|
6
|
+
export { InjectEntity } from './decorator/InjectEntity';
|
|
7
|
+
export { InjectRepository } from './decorator/InjectRepository';
|
|
8
|
+
export { ProvideEntity } from './decorator/ProvideEntity';
|
|
9
|
+
export { ProvideObserve } from './decorator/ProvideObserve';
|
|
10
|
+
export { ProvideRepository } from './decorator/ProvideRepository';
|
|
11
|
+
export { ProvideSearch, Search, SearchScope } from "./decorator/ProvideSearch";
|
|
12
|
+
export { ProvideSharding } from './decorator/ProvideSharding';
|
|
13
|
+
export { getProvideObserve } from './helper/getProvideObserve';
|
|
14
|
+
export { getDataSourceEntity } from './helper/getDataSourceEntity';
|
|
15
|
+
export { CustomConfiguration as Configuration } from './configuration';
|
|
16
|
+
export { Provide, Inject, Scope, ScopeEnum } from "@midwayjs/core";
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a13_0x24c73a=a13_0x1cde;(function(_0x221aa5,_0x2e3e3f){var _0x143c1f=a13_0x1cde,_0x80efd1=_0x221aa5();while(!![]){try{var _0x186d90=-parseInt(_0x143c1f(0xd1))/0x1+-parseInt(_0x143c1f(0xb1))/0x2*(-parseInt(_0x143c1f(0xdc))/0x3)+-parseInt(_0x143c1f(0xeb))/0x4*(parseInt(_0x143c1f(0xc6))/0x5)+parseInt(_0x143c1f(0xc9))/0x6*(parseInt(_0x143c1f(0xd8))/0x7)+parseInt(_0x143c1f(0xb9))/0x8+-parseInt(_0x143c1f(0xd2))/0x9*(parseInt(_0x143c1f(0xc4))/0xa)+-parseInt(_0x143c1f(0xbf))/0xb*(parseInt(_0x143c1f(0xc5))/0xc);if(_0x186d90===_0x2e3e3f)break;else _0x80efd1['push'](_0x80efd1['shift']());}catch(_0x4e97a1){_0x80efd1['push'](_0x80efd1['shift']());}}}(a13_0x2cce,0x7449b));var a13_0x353f3a=(function(){var _0x419795=!![];return function(_0x4c7929,_0x41cc13){var _0x14788b=_0x419795?function(){var _0x4bb084=a13_0x1cde;if(_0x41cc13){var _0x55a72e=_0x41cc13[_0x4bb084(0xe3)](_0x4c7929,arguments);return _0x41cc13=null,_0x55a72e;}}:function(){};return _0x419795=![],_0x14788b;};}()),a13_0x28beb0=a13_0x353f3a(this,function(){var _0x3d48a4=a13_0x1cde;return a13_0x28beb0[_0x3d48a4(0xe7)]()[_0x3d48a4(0xbb)]('(((.+)+)+)+$')[_0x3d48a4(0xe7)]()[_0x3d48a4(0xcd)](a13_0x28beb0)[_0x3d48a4(0xbb)](_0x3d48a4(0xc8));});a13_0x28beb0();'use strict';function a13_0x2cce(){var _0x472de3=['./decorator/ProvideObserve','prototype','typeorm','@midwayjs/core','6937432msdQTE','ProvideSearch','search','./decorator/InjectRepository','ProvideEntity','InjectEntity','55GkqPjA','./interface','create','Configuration','VirtualColumn','53240AAahWM','1443516msrhCa','10HmYPyX','SearchScope','(((.+)+)+)+$','6DiXnqH','./decorator/ProvideSharding','ProvideRepository','Repository','constructor','./decorator/InjectEntity','Scope','getDataSourceEntity','162062HKEXdR','1296kdboxT','./helper/getProvideObserve','./decorator/ProvideSearch','writable','default','Search','6397223wDlsSc','./decorator/VirtualColumn','__createBinding','Provide','48VcJRAA','./configuration','getOwnPropertyDescriptor','Inject','./definition/Repository','./decorator/ProvideEntity','__esModule','apply','ProvideSharding','hasOwnProperty','./decorator/ProvideRepository','toString','ProvideObserve','ScopeEnum','./helper/getDataSourceEntity','868692JItMmP','InjectRepository','82472wTDceb','getProvideObserve','__exportStar','defineProperty'];a13_0x2cce=function(){return _0x472de3;};return a13_0x2cce();}var __createBinding=this&&this[a13_0x24c73a(0xda)]||(Object[a13_0x24c73a(0xc1)]?function(_0xc71805,_0x26495d,_0x42457a,_0x507c0a){var _0x187b8f=a13_0x24c73a;if(_0x507c0a===undefined)_0x507c0a=_0x42457a;var _0x2550c9=Object[_0x187b8f(0xde)](_0x26495d,_0x42457a);(!_0x2550c9||('get'in _0x2550c9?!_0x26495d['__esModule']:_0x2550c9[_0x187b8f(0xd5)]||_0x2550c9['configurable']))&&(_0x2550c9={'enumerable':!![],'get':function(){return _0x26495d[_0x42457a];}}),Object[_0x187b8f(0xb4)](_0xc71805,_0x507c0a,_0x2550c9);}:function(_0x31d1a0,_0x55519a,_0x19bf2c,_0x1ef8fc){if(_0x1ef8fc===undefined)_0x1ef8fc=_0x19bf2c;_0x31d1a0[_0x1ef8fc]=_0x55519a[_0x19bf2c];}),__exportStar=this&&this[a13_0x24c73a(0xb3)]||function(_0x3ac433,_0x9870ad){var _0x213473=a13_0x24c73a;for(var _0x26219a in _0x3ac433)if(_0x26219a!==_0x213473(0xd6)&&!Object[_0x213473(0xb6)][_0x213473(0xe5)]['call'](_0x9870ad,_0x26219a))__createBinding(_0x9870ad,_0x3ac433,_0x26219a);};Object[a13_0x24c73a(0xb4)](exports,a13_0x24c73a(0xe2),{'value':!![]}),exports[a13_0x24c73a(0xe9)]=exports['Scope']=exports[a13_0x24c73a(0xdf)]=exports[a13_0x24c73a(0xdb)]=exports[a13_0x24c73a(0xc2)]=exports[a13_0x24c73a(0xd0)]=exports[a13_0x24c73a(0xb2)]=exports[a13_0x24c73a(0xe4)]=exports['SearchScope']=exports['Search']=exports[a13_0x24c73a(0xba)]=exports[a13_0x24c73a(0xcb)]=exports[a13_0x24c73a(0xe8)]=exports[a13_0x24c73a(0xbd)]=exports[a13_0x24c73a(0xb0)]=exports[a13_0x24c73a(0xbe)]=exports['VirtualColumn']=exports[a13_0x24c73a(0xcc)]=void 0x0,__exportStar(require(a13_0x24c73a(0xb7)),exports),__exportStar(require(a13_0x24c73a(0xc0)),exports),__exportStar(require('./interfaceSharding'),exports);var Repository_1=require(a13_0x24c73a(0xe0));function a13_0x1cde(_0xce3c9e,_0x29864a){_0xce3c9e=_0xce3c9e-0xb0;var _0x2531b5=a13_0x2cce();var _0x28beb0=_0x2531b5[_0xce3c9e];return _0x28beb0;}Object[a13_0x24c73a(0xb4)](exports,a13_0x24c73a(0xcc),{'enumerable':!![],'get':function(){var _0x91113c=a13_0x24c73a;return Repository_1[_0x91113c(0xcc)];}});var VirtualColumn_1=require(a13_0x24c73a(0xd9));Object['defineProperty'](exports,a13_0x24c73a(0xc3),{'enumerable':!![],'get':function(){var _0x56b2ab=a13_0x24c73a;return VirtualColumn_1[_0x56b2ab(0xc3)];}});var InjectEntity_1=require(a13_0x24c73a(0xce));Object[a13_0x24c73a(0xb4)](exports,a13_0x24c73a(0xbe),{'enumerable':!![],'get':function(){var _0xe032ad=a13_0x24c73a;return InjectEntity_1[_0xe032ad(0xbe)];}});var InjectRepository_1=require(a13_0x24c73a(0xbc));Object[a13_0x24c73a(0xb4)](exports,a13_0x24c73a(0xb0),{'enumerable':!![],'get':function(){return InjectRepository_1['InjectRepository'];}});var ProvideEntity_1=require(a13_0x24c73a(0xe1));Object[a13_0x24c73a(0xb4)](exports,a13_0x24c73a(0xbd),{'enumerable':!![],'get':function(){var _0x4fd62c=a13_0x24c73a;return ProvideEntity_1[_0x4fd62c(0xbd)];}});var ProvideObserve_1=require(a13_0x24c73a(0xb5));Object[a13_0x24c73a(0xb4)](exports,a13_0x24c73a(0xe8),{'enumerable':!![],'get':function(){var _0x189acd=a13_0x24c73a;return ProvideObserve_1[_0x189acd(0xe8)];}});var ProvideRepository_1=require(a13_0x24c73a(0xe6));Object[a13_0x24c73a(0xb4)](exports,'ProvideRepository',{'enumerable':!![],'get':function(){var _0x5379c4=a13_0x24c73a;return ProvideRepository_1[_0x5379c4(0xcb)];}});var ProvideSearch_1=require(a13_0x24c73a(0xd4));Object[a13_0x24c73a(0xb4)](exports,a13_0x24c73a(0xba),{'enumerable':!![],'get':function(){var _0x152f53=a13_0x24c73a;return ProvideSearch_1[_0x152f53(0xba)];}}),Object[a13_0x24c73a(0xb4)](exports,a13_0x24c73a(0xd7),{'enumerable':!![],'get':function(){return ProvideSearch_1['Search'];}}),Object[a13_0x24c73a(0xb4)](exports,'SearchScope',{'enumerable':!![],'get':function(){var _0x1a1638=a13_0x24c73a;return ProvideSearch_1[_0x1a1638(0xc7)];}});var ProvideSharding_1=require(a13_0x24c73a(0xca));Object[a13_0x24c73a(0xb4)](exports,a13_0x24c73a(0xe4),{'enumerable':!![],'get':function(){var _0x9e07db=a13_0x24c73a;return ProvideSharding_1[_0x9e07db(0xe4)];}});var getProvideObserve_1=require(a13_0x24c73a(0xd3));Object[a13_0x24c73a(0xb4)](exports,'getProvideObserve',{'enumerable':!![],'get':function(){var _0x55ea43=a13_0x24c73a;return getProvideObserve_1[_0x55ea43(0xb2)];}});var getDataSourceEntity_1=require(a13_0x24c73a(0xea));Object[a13_0x24c73a(0xb4)](exports,'getDataSourceEntity',{'enumerable':!![],'get':function(){var _0x4bd1da=a13_0x24c73a;return getDataSourceEntity_1[_0x4bd1da(0xd0)];}});var configuration_1=require(a13_0x24c73a(0xdd));Object['defineProperty'](exports,a13_0x24c73a(0xc2),{'enumerable':!![],'get':function(){return configuration_1['CustomConfiguration'];}});var core_1=require(a13_0x24c73a(0xb8));Object['defineProperty'](exports,a13_0x24c73a(0xdb),{'enumerable':!![],'get':function(){var _0x2c7cfc=a13_0x24c73a;return core_1[_0x2c7cfc(0xdb)];}}),Object[a13_0x24c73a(0xb4)](exports,a13_0x24c73a(0xdf),{'enumerable':!![],'get':function(){return core_1['Inject'];}}),Object[a13_0x24c73a(0xb4)](exports,'Scope',{'enumerable':!![],'get':function(){var _0x32ad1b=a13_0x24c73a;return core_1[_0x32ad1b(0xcf)];}}),Object[a13_0x24c73a(0xb4)](exports,a13_0x24c73a(0xe9),{'enumerable':!![],'get':function(){var _0x34faa3=a13_0x24c73a;return core_1[_0x34faa3(0xe9)];}});
|
package/dist/interface.d.ts
CHANGED
|
@@ -1,80 +1,79 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
export declare const
|
|
10
|
-
export declare const
|
|
11
|
-
export declare const
|
|
12
|
-
export declare const
|
|
13
|
-
export declare const
|
|
14
|
-
export declare const
|
|
15
|
-
export declare const
|
|
16
|
-
export declare const
|
|
17
|
-
export declare const
|
|
18
|
-
export
|
|
19
|
-
export
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
on(event: '
|
|
53
|
-
on(event: '
|
|
54
|
-
on(event:
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}
|
|
1
|
+
import { Readable } from "stream";
|
|
2
|
+
import { FindManyOptions } from "typeorm";
|
|
3
|
+
import { RelationMetadataArgs } from "typeorm/metadata-args/RelationMetadataArgs";
|
|
4
|
+
import { JoinColumnMetadataArgs } from "typeorm/metadata-args/JoinColumnMetadataArgs";
|
|
5
|
+
import { SelectQueryBuilder } from "typeorm";
|
|
6
|
+
import { FindOneOptions, FindOptionsWhereProperty, DeepPartial, ObjectLiteral, QueryRunner } from 'typeorm';
|
|
7
|
+
import './interfaceSharding';
|
|
8
|
+
export declare const ENTIFY_KEY = "decorator:anncic-api:typeorm:entify";
|
|
9
|
+
export declare const ENTIFY_MODULE = "decorator:anncic-api:typeorm:entify:module";
|
|
10
|
+
export declare const ENTIFY_MODULE_SOURCE = "decorator:anncic-api:typeorm:entify:module:source";
|
|
11
|
+
export declare const ENTIFY_SHARDING_KEY = "decorator:anncic-api:typeorm:entify:sharding";
|
|
12
|
+
export declare const REPOSITORY_KEY = "decorator:anncic-api:typeorm:repository";
|
|
13
|
+
export declare const REPOSITORY_OBSERVE_KEY = "decorator:anncic-api:typeorm:repository:observe";
|
|
14
|
+
export declare const MODEL_KEY = "decorator:anncic-api:typeorm:model";
|
|
15
|
+
export declare const MODEL_SEARCH_KEY = "decorator:anncic-api:typeorm:model:search";
|
|
16
|
+
export declare const MODEL_SEARCH_SCOPE_KEY = "decorator:anncic-api:typeorm:model:search:scope";
|
|
17
|
+
export declare const ENTITY_VIRTUAL_COLUMN_KEY = "decorator:anncic-api:typeorm:entity:virtual:column";
|
|
18
|
+
export { ShardingContext, ShardingStrategy, clearTableExistsCache } from './interfaceSharding';
|
|
19
|
+
export type SearchParams<Entity> = {
|
|
20
|
+
[P in keyof Entity]?: {
|
|
21
|
+
operator: '=' | '!=' | '<>' | '>' | '>=' | '<' | '<=' | 'LIKE' | 'NOT LIKE';
|
|
22
|
+
condition: FindOptionsWhereProperty<NonNullable<Entity[P]>>;
|
|
23
|
+
} | {
|
|
24
|
+
operator: 'BETWEEN' | 'NOT BETWEEN';
|
|
25
|
+
condition: [FindOptionsWhereProperty<NonNullable<Entity[P]>>, FindOptionsWhereProperty<NonNullable<Entity[P]>>];
|
|
26
|
+
} | {
|
|
27
|
+
operator: 'IN' | 'NOT IN';
|
|
28
|
+
condition: FindOptionsWhereProperty<NonNullable<Entity[P]>>[] | string;
|
|
29
|
+
} | {
|
|
30
|
+
operator: 'FIND IN SET' | 'NOT FIND IN SET';
|
|
31
|
+
condition: number | string;
|
|
32
|
+
} | {
|
|
33
|
+
operator: 'ISNULL' | 'NOT ISNULL';
|
|
34
|
+
};
|
|
35
|
+
} | DeepPartial<Entity> | {
|
|
36
|
+
[key: string]: any;
|
|
37
|
+
};
|
|
38
|
+
export declare class SearchPaginate {
|
|
39
|
+
_page?: number;
|
|
40
|
+
_size?: number;
|
|
41
|
+
_order?: string;
|
|
42
|
+
_isreverse?: number;
|
|
43
|
+
}
|
|
44
|
+
export interface SearchOptions {
|
|
45
|
+
pageType?: 'limit' | 'take';
|
|
46
|
+
queryRunner?: QueryRunner;
|
|
47
|
+
scope?: string | string[];
|
|
48
|
+
excess?: <Entity extends ObjectLiteral>(search: SelectQueryBuilder<Entity>) => void;
|
|
49
|
+
}
|
|
50
|
+
export interface ChunkStream<T> extends Readable {
|
|
51
|
+
on(event: 'data', listener: (chunk: Array<T>) => void): this;
|
|
52
|
+
on(event: 'end', listener: () => void): this;
|
|
53
|
+
on(event: 'error', listener: (err: Error) => void): this;
|
|
54
|
+
on(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
55
|
+
[Symbol.asyncIterator](): AsyncIterableIterator<T>;
|
|
56
|
+
}
|
|
57
|
+
declare module 'typeorm' {
|
|
58
|
+
interface SelectQueryBuilder<Entity extends ObjectLiteral> {
|
|
59
|
+
getExplainCount: () => Promise<number>;
|
|
60
|
+
getManyExplainCount: () => Promise<[Array<any>, number]>;
|
|
61
|
+
chunk: (optionORsize?: number | {
|
|
62
|
+
size?: number;
|
|
63
|
+
countsize?: number;
|
|
64
|
+
delay?: number | boolean;
|
|
65
|
+
immediately?: boolean;
|
|
66
|
+
}, callback?: (chunkEntitys: Array<Entity>, index: number, QueryAndParameters: [string, Array<any>]) => Promise<void | Array<Entity>> | void | Array<Entity>) => ChunkStream<Entity>;
|
|
67
|
+
joinAppends: (append: string, option?: string | {
|
|
68
|
+
alias?: string;
|
|
69
|
+
findOption?: FindOneOptions | FindManyOptions;
|
|
70
|
+
}) => this;
|
|
71
|
+
_joinAppendsResolve: (entityData: any) => Promise<any>;
|
|
72
|
+
_appends: Array<{
|
|
73
|
+
alias: string;
|
|
74
|
+
relation: RelationMetadataArgs;
|
|
75
|
+
joinColumn: JoinColumnMetadataArgs;
|
|
76
|
+
findOption: FindOneOptions;
|
|
77
|
+
}>;
|
|
78
|
+
}
|
|
79
|
+
}
|
package/dist/interface.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a14_0x10e455=a14_0x2a56;(function(_0xbdbaa,_0x54d9ba){const _0x53c78a=a14_0x2a56,_0x4add45=_0xbdbaa();while(!![]){try{const _0x51edf2=-parseInt(_0x53c78a(0xe1))/0x1*(parseInt(_0x53c78a(0x13a))/0x2)+-parseInt(_0x53c78a(0xb5))/0x3*(parseInt(_0x53c78a(0xf7))/0x4)+parseInt(_0x53c78a(0x13c))/0x5+parseInt(_0x53c78a(0xc4))/0x6+parseInt(_0x53c78a(0xca))/0x7+parseInt(_0x53c78a(0xb0))/0x8*(parseInt(_0x53c78a(0x117))/0x9)+-parseInt(_0x53c78a(0x11b))/0xa*(parseInt(_0x53c78a(0xb4))/0xb);if(_0x51edf2===_0x54d9ba)break;else _0x4add45['push'](_0x4add45['shift']());}catch(_0x1f7018){_0x4add45['push'](_0x4add45['shift']());}}}(a14_0x14b4,0xa386d));const a14_0x533f1e=(function(){let _0x361911=!![];return function(_0x5bbcfe,_0x6d0543){const _0x3db020=_0x361911?function(){const _0xa99b3b=a14_0x2a56;if(_0x6d0543){const _0x478708=_0x6d0543[_0xa99b3b(0x120)](_0x5bbcfe,arguments);return _0x6d0543=null,_0x478708;}}:function(){};return _0x361911=![],_0x3db020;};}()),a14_0x385f75=a14_0x533f1e(this,function(){const _0x370ff6=a14_0x2a56;return a14_0x385f75[_0x370ff6(0x105)]()['search'](_0x370ff6(0xf8))['toString']()[_0x370ff6(0xbd)](a14_0x385f75)[_0x370ff6(0xc6)]('(((.+)+)+)+$');});a14_0x385f75();'use strict';Object[a14_0x10e455(0x131)](exports,a14_0x10e455(0x10e),{'value':!![]}),exports[a14_0x10e455(0xdf)]=exports[a14_0x10e455(0xeb)]=exports[a14_0x10e455(0x12e)]=exports['ENTITY_VIRTUAL_COLUMN_KEY']=exports['MODEL_SEARCH_SCOPE_KEY']=exports['MODEL_SEARCH_KEY']=exports[a14_0x10e455(0xf5)]=exports['REPOSITORY_OBSERVE_KEY']=exports[a14_0x10e455(0x118)]=exports[a14_0x10e455(0xfd)]=exports[a14_0x10e455(0xfc)]=exports[a14_0x10e455(0x143)]=exports[a14_0x10e455(0xd1)]=void 0x0;const stream_1=require(a14_0x10e455(0xbb)),core_1=require(a14_0x10e455(0xd9)),typeorm_1=require(a14_0x10e455(0x12b)),DriverUtils_1=require(a14_0x10e455(0xbf)),typeorm_2=require('typeorm'),typeorm_3=require(a14_0x10e455(0x12b));function a14_0x2a56(_0x1c5327,_0x44501e){const _0x3d8b3d=a14_0x14b4();return a14_0x2a56=function(_0x385f75,_0x533f1e){_0x385f75=_0x385f75-0xaf;let _0x14b4f4=_0x3d8b3d[_0x385f75];return _0x14b4f4;},a14_0x2a56(_0x1c5327,_0x44501e);}require(a14_0x10e455(0xd6));const sleep_1=require('./helper/sleep');exports[a14_0x10e455(0xd1)]=a14_0x10e455(0x130),exports['ENTIFY_MODULE']=a14_0x10e455(0x124),exports[a14_0x10e455(0xfc)]=a14_0x10e455(0x11f),exports[a14_0x10e455(0xfd)]='decorator:anncic-api:typeorm:entify:sharding',exports[a14_0x10e455(0x118)]=a14_0x10e455(0x141),exports[a14_0x10e455(0x103)]=a14_0x10e455(0xb3),exports[a14_0x10e455(0xf5)]=a14_0x10e455(0xaf),exports[a14_0x10e455(0x104)]=a14_0x10e455(0xf3),exports[a14_0x10e455(0xd3)]=a14_0x10e455(0xb6),exports[a14_0x10e455(0xf0)]=a14_0x10e455(0x110);function a14_0x14b4(){const _0x58be56=['resume','countsize','DriverUtils','REPOSITORY_OBSERVE_KEY','MODEL_SEARCH_KEY','toString','_appends','findOneBy','_joinAppendsResolve','alias','clone','isMySQLFamily','stringify','push','__esModule','EntityManager','decorator:anncic-api:typeorm:entity:virtual:column','limit','relations','size','emit','duration','alwaysEnabled','8325IrLvtZ','REPOSITORY_KEY','optimistic','queryRunner','20XESVJy','function','getMetadataArgsStorage','boolean','decorator:anncic-api:typeorm:entify:module:source','apply','isExpired','getClassMetadata','findOneByOrFail','decorator:anncic-api:typeorm:entify:module','lockMode','SelectQueryBuilder','object','storeInCache','splice','sleep','typeorm','findOneOrFail','getRawAndEntities','ShardingStrategy','\x20--\x20PARAMETERS:\x20','decorator:anncic-api:typeorm:entify','defineProperty','take','mainAlias','map','number','getQueryAndParameters','records','data','driver','945444GKVchY','getExplainCount','2298800sCsThp','reject','findOne','queryResultCache','one-to-many','decorator:anncic-api:typeorm:repository','offset','ENTIFY_MODULE','hasOwnProperty','EXPLAIN\x20','OptimisticLockCanNotBeUsedError','many-to-one','find','decorator:anncic-api:typeorm:model','3176rqpahe','chunk','expressionMap','decorator:anncic-api:typeorm:repository:observe','4128102YuQllG','1329BiwwTZ','decorator:anncic-api:typeorm:model:search:scope','connection','joinColumn','getEntityValue','all','stream','Readable','constructor','metadata','typeorm/driver/DriverUtils','obtainQueryRunner','getMany','getCount','listenerCount','6658176jlNCKS','release','search','string','cacheDuration','rows','7056644eckJsB','relation','setFindOptions','skip','many-to-many','type','updateDateColumn','ENTIFY_KEY','immediately','MODEL_SEARCH_SCOPE_KEY','length','target','./interfaceSharding','getFromCache','name','@midwayjs/core','OptimisticLockVersionMismatchError','withDeleted','relationType','getManyAndCount','end','SearchPaginate','destroy','1xbrGZY','delay','getOne','ignoreErrors','getTime','resolve','createQueryBuilder','cacheId','referencedColumnName','prototype','clearTableExistsCache','lockVersion','joinAppends','one-to-one','cache','ENTITY_VIRTUAL_COLUMN_KEY','query','then','decorator:anncic-api:typeorm:model:search','abs','MODEL_KEY','findOption','9496qOYgRG','(((.+)+)+)+$','substring','propertyName','default','ENTIFY_MODULE_SOURCE','ENTIFY_SHARDING_KEY','options','\x20=\x20:'];a14_0x14b4=function(){return _0x58be56;};return a14_0x14b4();}var interfaceSharding_1=require(a14_0x10e455(0xd6));Object[a14_0x10e455(0x131)](exports,a14_0x10e455(0x12e),{'enumerable':!![],'get':function(){const _0x1b0b8e=a14_0x10e455;return interfaceSharding_1[_0x1b0b8e(0x12e)];}}),Object[a14_0x10e455(0x131)](exports,a14_0x10e455(0xeb),{'enumerable':!![],'get':function(){const _0x117f20=a14_0x10e455;return interfaceSharding_1[_0x117f20(0xeb)];}});class SearchPaginate{}exports[a14_0x10e455(0xdf)]=SearchPaginate,typeorm_2[a14_0x10e455(0x126)][a14_0x10e455(0xea)][a14_0x10e455(0xb1)]=function(_0x1bd6bc=0x64,_0x13193b){const _0x39dc04=a14_0x10e455;let _0x13cc5b=0x1,_0x4ee5c3=0x64,_0x4dce09=0x0,_0x195889=0x0,_0x21ca3f=![],_0x3e28f9=!![];if(typeof _0x1bd6bc==_0x39dc04(0x135)||typeof _0x1bd6bc==_0x39dc04(0xc7))_0x4ee5c3=parseInt(''+_0x1bd6bc);else _0x1bd6bc&&((_0x1bd6bc===null||_0x1bd6bc===void 0x0?void 0x0:_0x1bd6bc[_0x39dc04(0x113)])&&(_0x4ee5c3=parseInt(''+_0x1bd6bc[_0x39dc04(0x113)])),(_0x1bd6bc===null||_0x1bd6bc===void 0x0?void 0x0:_0x1bd6bc[_0x39dc04(0x101)])&&(_0x4dce09=parseInt(''+_0x1bd6bc['countsize'])),(_0x1bd6bc===null||_0x1bd6bc===void 0x0?void 0x0:_0x1bd6bc[_0x39dc04(0xe2)])&&(_0x21ca3f=typeof _0x1bd6bc[_0x39dc04(0xe2)]==_0x39dc04(0x11e)?0x1f4:parseInt(''+_0x1bd6bc[_0x39dc04(0xe2)])),typeof(_0x1bd6bc===null||_0x1bd6bc===void 0x0?void 0x0:_0x1bd6bc[_0x39dc04(0xd2)])=='boolean'&&(_0x3e28f9=_0x1bd6bc[_0x39dc04(0xd2)]));_0x4dce09>0x0&&_0x4dce09>_0x4ee5c3&&(_0x4ee5c3=_0x4dce09);const _0x1c2243=this,_0x4508e2=new stream_1[(_0x39dc04(0xbc))]({'objectMode':!![],'highWaterMark':_0x4ee5c3*0x2,async 'read'(){const _0x57e6fe=_0x39dc04;try{if(_0x4dce09>0x0&&_0x4dce09<=_0x195889)this[_0x57e6fe(0xc3)](_0x57e6fe(0x138))>0x0?this['push'](null):this[_0x57e6fe(0x114)](_0x57e6fe(0xde));else{const _0x261108=_0x1c2243[_0x57e6fe(0x10a)]()[_0x57e6fe(0x111)](Math[_0x57e6fe(0xf4)](_0x4ee5c3))[_0x57e6fe(0x142)]((Math[_0x57e6fe(0xf4)](_0x13cc5b)-0x1)*Math['abs'](_0x4ee5c3)),_0x1b05bf=await _0x261108['getMany']();if((_0x1b05bf===null||_0x1b05bf===void 0x0?void 0x0:_0x1b05bf[_0x57e6fe(0xd4)])>0x0){_0x4dce09>0x0&&_0x195889+_0x1b05bf[_0x57e6fe(0xd4)]>_0x4dce09&&_0x1b05bf[_0x57e6fe(0x129)](0x0,_0x4dce09-(_0x195889+_0x1b05bf[_0x57e6fe(0xd4)]-_0x4dce09));if(typeof _0x13193b==_0x57e6fe(0x11c)){const _0x4d556e=await _0x13193b(_0x1b05bf,_0x13cc5b,_0x261108['getQueryAndParameters']());_0x4d556e&&Array['isArray'](_0x4d556e)?(_0x4d556e===null||_0x4d556e===void 0x0?void 0x0:_0x4d556e['length'])>0x0&&(_0x195889+=_0x4d556e['length'],_0x4dce09>0x0&&_0x195889>_0x4dce09&&_0x4d556e[_0x57e6fe(0x129)](0x0,_0x4dce09-(_0x195889-_0x4dce09)),this[_0x57e6fe(0x10d)](_0x4d556e),_0x4d556e[_0x57e6fe(0xd4)]=0x0):(_0x195889+=_0x1b05bf['length'],_0x4dce09>0x0&&_0x195889>_0x4dce09&&_0x1b05bf[_0x57e6fe(0x129)](0x0,_0x4dce09-(_0x195889-_0x4dce09)),this[_0x57e6fe(0x10d)](_0x1b05bf));}else _0x195889+=_0x1b05bf[_0x57e6fe(0xd4)],_0x4dce09>0x0&&_0x195889>_0x4dce09&&_0x1b05bf[_0x57e6fe(0x129)](0x0,_0x4dce09-(_0x195889-_0x4dce09)),this[_0x57e6fe(0x10d)](_0x1b05bf);_0x1b05bf['length']=0x0,_0x13cc5b++,_0x21ca3f&&typeof _0x21ca3f==_0x57e6fe(0x135)&&await(0x0,sleep_1[_0x57e6fe(0x12a)])(_0x21ca3f);}else this[_0x57e6fe(0xc3)](_0x57e6fe(0x138))>0x0?this[_0x57e6fe(0x10d)](null):this['emit'](_0x57e6fe(0xde));}}catch(_0x395154){this['destroy'](_0x395154);}}});return _0x4508e2['on']('end',()=>_0x4508e2['destroy']()),_0x4508e2['on']('close',()=>_0x4508e2[_0x39dc04(0xe0)]()),_0x3e28f9&&_0x4508e2[_0x39dc04(0x100)](),_0x4508e2;},typeorm_3[a14_0x10e455(0x10f)][a14_0x10e455(0xea)][a14_0x10e455(0x12c)]=async function(_0x4fb9c9,_0x2c3b1f){const _0x3ebf8c=a14_0x10e455;return this[_0x3ebf8c(0x13e)](_0x4fb9c9,_0x2c3b1f)[_0x3ebf8c(0xf2)](_0x5c91c2=>{const _0x2fc4da=_0x3ebf8c;if(_0x5c91c2===null||_0x5c91c2===undefined)return Promise[_0x2fc4da(0x13d)](new typeorm_3['EntityNotFoundError'](_0x4fb9c9,_0x2c3b1f));return Promise[_0x2fc4da(0xe6)](_0x5c91c2);});},typeorm_3['EntityManager'][a14_0x10e455(0xea)][a14_0x10e455(0x123)]=async function(_0x42fc62,_0x258bfb){const _0x45d63e=a14_0x10e455;return this[_0x45d63e(0x107)](_0x42fc62,_0x258bfb)[_0x45d63e(0xf2)](_0x594705=>{const _0xe1ad5d=_0x45d63e;if(_0x594705===null||_0x594705===undefined)return Promise[_0xe1ad5d(0x13d)](new typeorm_3['EntityNotFoundError'](_0x42fc62,_0x258bfb));return Promise[_0xe1ad5d(0xe6)](_0x594705);});},typeorm_2[a14_0x10e455(0x126)]['prototype'][a14_0x10e455(0xe3)]=async function(){const _0x201874=a14_0x10e455;var _0x503c22;const {entities:_0x13994a,raw:_0x476bd5}=await this[_0x201874(0x12d)]();if(_0x13994a[0x0]&&this['expressionMap'][_0x201874(0x125)]==='optimistic'&&this['expressionMap'][_0x201874(0xec)]){const _0x17ca8b=this[_0x201874(0xb2)]['mainAlias'][_0x201874(0xbe)];if(this['expressionMap'][_0x201874(0xec)]instanceof Date){const _0x574052=_0x17ca8b[_0x201874(0xd0)][_0x201874(0xb9)](_0x13994a[0x0]);if(_0x574052[_0x201874(0xe5)]()!==this['expressionMap']['lockVersion']['getTime']())throw new typeorm_2[(_0x201874(0xda))](_0x17ca8b[_0x201874(0xd8)],this[_0x201874(0xb2)]['lockVersion'],_0x574052);}else{const _0x4ff585=_0x17ca8b['versionColumn'][_0x201874(0xb9)](_0x13994a[0x0]);if(_0x4ff585!==this[_0x201874(0xb2)][_0x201874(0xec)])throw new typeorm_2['OptimisticLockVersionMismatchError'](_0x17ca8b[_0x201874(0xd8)],this['expressionMap'][_0x201874(0xec)],_0x4ff585);}}if(_0x13994a[0x0]&&_0x476bd5[0x0]){const _0x42feaa=(0x0,core_1[_0x201874(0x122)])(exports[_0x201874(0xf0)],_0x13994a[0x0]);for(const _0x151389 in _0x42feaa){_0x476bd5[0x0]['hasOwnProperty'](_0x151389)&&(_0x13994a[0x0][_0x151389]=_0x476bd5[0x0][_0x151389]||((_0x503c22=_0x42feaa[_0x151389])===null||_0x503c22===void 0x0?void 0x0:_0x503c22[_0x201874(0xfb)])||'');}}return _0x13994a[0x0]&&typeof this[_0x201874(0x108)]=='function'&&(_0x13994a[0x0]=await this[_0x201874(0x108)](_0x13994a[0x0])),_0x13994a[0x0]||null;},typeorm_2[a14_0x10e455(0x126)][a14_0x10e455(0xea)]['getMany']=async function(){const _0x5c0dfa=a14_0x10e455;if(this['expressionMap'][_0x5c0dfa(0x125)]===_0x5c0dfa(0x119))throw new typeorm_2[(_0x5c0dfa(0x146))]();const {entities:_0x5e1084,raw:_0x699d43}=await this[_0x5c0dfa(0x12d)]();return await Promise[_0x5c0dfa(0xba)](_0x5e1084[_0x5c0dfa(0x134)](async(_0x26ab6b,_0x2cf50b)=>{const _0x5358ec=_0x5c0dfa;var _0x4113db;const _0x53a756=(0x0,core_1[_0x5358ec(0x122)])(exports[_0x5358ec(0xf0)],_0x26ab6b)||{};for(const _0xf797e5 in _0x53a756){_0x699d43[_0x2cf50b]&&_0x699d43[_0x2cf50b][_0x5358ec(0x144)](_0xf797e5)&&(_0x26ab6b[_0xf797e5]=_0x699d43[_0x2cf50b][_0xf797e5]||((_0x4113db=_0x53a756[_0xf797e5])===null||_0x4113db===void 0x0?void 0x0:_0x4113db[_0x5358ec(0xfb)])||'');}return _0x26ab6b&&typeof this[_0x5358ec(0x108)]==_0x5358ec(0x11c)&&(_0x26ab6b=await this[_0x5358ec(0x108)](_0x26ab6b)),_0x26ab6b;}));},typeorm_2[a14_0x10e455(0x126)]['prototype'][a14_0x10e455(0xdd)]=async function(){const _0x4bcf30=a14_0x10e455;return[await this['getMany'](),await this[_0x4bcf30(0xc2)]()];},typeorm_2[a14_0x10e455(0x126)][a14_0x10e455(0xea)]['getManyExplainCount']=async function(){const _0x1ae2d9=a14_0x10e455;return[await this[_0x1ae2d9(0xc1)](),await this[_0x1ae2d9(0x13b)]()];},typeorm_2['SelectQueryBuilder']['prototype'][a14_0x10e455(0x13b)]=async function(){const _0x26decf=a14_0x10e455;var _0x4ec0ab,_0x5de01e,_0x43624f,_0x30f6a0;if(DriverUtils_1[_0x26decf(0x102)][_0x26decf(0x10b)](this['connection'][_0x26decf(0x139)])){const _0x4a952f=this[_0x26decf(0xc0)]();try{this['expressionMap']['queryEntity']=![];const [_0x4cdd23,_0x2917ae]=this[_0x26decf(0x10a)]()[_0x26decf(0x142)](undefined)[_0x26decf(0x111)](undefined)[_0x26decf(0xcd)](undefined)[_0x26decf(0x132)](undefined)[_0x26decf(0x136)](),_0x1ff742=_0x26decf(0x145)+_0x4cdd23+_0x26decf(0x12f)+JSON[_0x26decf(0x10c)](_0x2917ae),_0x2359d4=typeof this[_0x26decf(0xb7)][_0x26decf(0xfe)]['cache']===_0x26decf(0x127)?this[_0x26decf(0xb7)][_0x26decf(0xfe)][_0x26decf(0xef)]:{},_0x4d91f2=_0x2359d4[_0x26decf(0x116)]&&this['expressionMap'][_0x26decf(0xef)]||this[_0x26decf(0xb2)]['cache'];let _0x1012bf=undefined,_0x3a8b2b=![];if(this[_0x26decf(0xb7)][_0x26decf(0x13f)]&&_0x4d91f2)try{_0x1012bf=await this[_0x26decf(0xb7)][_0x26decf(0x13f)][_0x26decf(0xd7)]({'query':_0x1ff742,'identifier':this['expressionMap'][_0x26decf(0xe8)],'duration':this['expressionMap'][_0x26decf(0xc8)]||_0x2359d4[_0x26decf(0x115)]||0x3e8},_0x4a952f);if(_0x1012bf&&!this[_0x26decf(0xb7)]['queryResultCache'][_0x26decf(0x121)](_0x1012bf))return parseInt(((_0x5de01e=(_0x4ec0ab=JSON['parse'](_0x1012bf['result']))===null||_0x4ec0ab===void 0x0?void 0x0:_0x4ec0ab[0x0])===null||_0x5de01e===void 0x0?void 0x0:_0x5de01e['rows'])||'0');}catch(_0x480322){if(!_0x2359d4[_0x26decf(0xe4)])throw _0x480322;_0x3a8b2b=!![];}const _0x345b65=await _0x4a952f[_0x26decf(0xf1)](_0x26decf(0x145)+_0x4cdd23,_0x2917ae,!![]);if(!_0x3a8b2b&&this[_0x26decf(0xb7)]['queryResultCache']&&_0x4d91f2)try{await this['connection'][_0x26decf(0x13f)][_0x26decf(0x128)]({'query':_0x1ff742,'time':new Date()[_0x26decf(0xe5)](),'identifier':this[_0x26decf(0xb2)][_0x26decf(0xe8)],'duration':this['expressionMap'][_0x26decf(0xc8)]||_0x2359d4['duration']||0x3e8,'result':JSON[_0x26decf(0x10c)](_0x345b65[_0x26decf(0x137)])},_0x1012bf,_0x4a952f);}catch(_0x15c772){if(!_0x2359d4[_0x26decf(0xe4)])throw _0x15c772;}return parseInt(((_0x30f6a0=(_0x43624f=_0x345b65[_0x26decf(0x137)])===null||_0x43624f===void 0x0?void 0x0:_0x43624f[0x0])===null||_0x30f6a0===void 0x0?void 0x0:_0x30f6a0[_0x26decf(0xc9)])||'0');}catch(_0x18a947){throw _0x18a947;}finally{_0x4a952f!==this[_0x26decf(0x11a)]&&await _0x4a952f[_0x26decf(0xc5)]();}}else return this[_0x26decf(0xc2)]();},typeorm_2[a14_0x10e455(0x126)]['prototype'][a14_0x10e455(0xed)]=function(_0x1787c3,_0x47373f){const _0x23e8cd=a14_0x10e455;_0x1787c3['startsWith'](this[_0x23e8cd(0x109)]+'.')&&(_0x1787c3=_0x1787c3[_0x23e8cd(0xf9)]((this[_0x23e8cd(0x109)]+'.')[_0x23e8cd(0xd4)]));const _0x43f8a1=typeof _0x47373f==_0x23e8cd(0xc7)?{'alias':_0x47373f}:_0x47373f,_0x51bf84=this[_0x23e8cd(0xb2)][_0x23e8cd(0x133)][_0x23e8cd(0xbe)],_0x7336e=(0x0,typeorm_1[_0x23e8cd(0x11d)])(),_0x232abe=_0x7336e['relations'][_0x23e8cd(0x148)](_0x3df364=>_0x3df364[_0x23e8cd(0xd5)]==_0x51bf84[_0x23e8cd(0xd5)]&&_0x3df364[_0x23e8cd(0xfa)]==_0x1787c3);if((_0x51bf84===null||_0x51bf84===void 0x0?void 0x0:_0x51bf84['target'])&&(_0x232abe===null||_0x232abe===void 0x0?void 0x0:_0x232abe[_0x23e8cd(0xfa)])){!this[_0x23e8cd(0x106)]&&(this[_0x23e8cd(0x106)]=[]);if(_0x232abe['relationType']==_0x23e8cd(0x147)||_0x232abe[_0x23e8cd(0xdc)]==_0x23e8cd(0xee)){const _0x4f26ce=_0x7336e['joinColumns'][_0x23e8cd(0x148)](_0x356077=>_0x356077[_0x23e8cd(0xd5)]==_0x51bf84['target']&&_0x356077['propertyName']==_0x1787c3);_0x232abe['propertyName']==(_0x4f26ce===null||_0x4f26ce===void 0x0?void 0x0:_0x4f26ce[_0x23e8cd(0xfa)])&&(!this[_0x23e8cd(0x106)]['find'](_0x5416c8=>_0x5416c8['alias']==((_0x43f8a1===null||_0x43f8a1===void 0x0?void 0x0:_0x43f8a1[_0x23e8cd(0x109)])||_0x1787c3))&&this[_0x23e8cd(0x106)][_0x23e8cd(0x10d)]({'alias':(_0x43f8a1===null||_0x43f8a1===void 0x0?void 0x0:_0x43f8a1[_0x23e8cd(0x109)])||_0x1787c3,'relation':_0x232abe,'joinColumn':_0x4f26ce,'findOption':(_0x43f8a1===null||_0x43f8a1===void 0x0?void 0x0:_0x43f8a1[_0x23e8cd(0xf6)])||undefined}));}else{if(_0x232abe[_0x23e8cd(0xdc)]=='one-to-many')try{const _0x2fa685=_0x7336e[_0x23e8cd(0x112)][_0x23e8cd(0x148)](_0x4fa0ad=>_0x4fa0ad['target']==_0x232abe[_0x23e8cd(0xcf)](_0x232abe[_0x23e8cd(0xfa)])&&_0x4fa0ad[_0x23e8cd(0xcf)](_0x4fa0ad[_0x23e8cd(0xdc)])==_0x51bf84[_0x23e8cd(0xd5)]),_0xe3756=_0x7336e['joinColumns'][_0x23e8cd(0x148)](_0x95e2cf=>_0x95e2cf[_0x23e8cd(0xd5)]==_0x2fa685[_0x23e8cd(0xd5)]&&_0x95e2cf[_0x23e8cd(0xfa)]==_0x2fa685[_0x23e8cd(0xfa)]);_0x2fa685[_0x23e8cd(0xfa)]==(_0xe3756===null||_0xe3756===void 0x0?void 0x0:_0xe3756[_0x23e8cd(0xfa)])&&(!this['_appends'][_0x23e8cd(0x148)](_0x2e77b6=>_0x2e77b6[_0x23e8cd(0x109)]==((_0x43f8a1===null||_0x43f8a1===void 0x0?void 0x0:_0x43f8a1[_0x23e8cd(0x109)])||_0x1787c3))&&this[_0x23e8cd(0x106)]['push']({'alias':(_0x43f8a1===null||_0x43f8a1===void 0x0?void 0x0:_0x43f8a1[_0x23e8cd(0x109)])||_0x1787c3,'relation':_0x232abe,'joinColumn':_0xe3756,'findOption':(_0x43f8a1===null||_0x43f8a1===void 0x0?void 0x0:_0x43f8a1['findOption'])||undefined}));}catch(_0x597600){}}}return this;},typeorm_2[a14_0x10e455(0x126)][a14_0x10e455(0xea)][a14_0x10e455(0x108)]=async function(_0x579bff){const _0x143f65=a14_0x10e455;var _0x3afb4c,_0x4adc85,_0x2d4511,_0x3d738b;for(const _0x581ada of this['_appends']||[]){if(!((_0x3afb4c=_0x581ada===null||_0x581ada===void 0x0?void 0x0:_0x581ada[_0x143f65(0xcb)])===null||_0x3afb4c===void 0x0?void 0x0:_0x3afb4c[_0x143f65(0xdc)]))continue;if(!((_0x4adc85=_0x581ada===null||_0x581ada===void 0x0?void 0x0:_0x581ada['joinColumn'])===null||_0x4adc85===void 0x0?void 0x0:_0x4adc85[_0x143f65(0xd8)])||!((_0x2d4511=_0x581ada===null||_0x581ada===void 0x0?void 0x0:_0x581ada['joinColumn'])===null||_0x2d4511===void 0x0?void 0x0:_0x2d4511[_0x143f65(0xe9)]))continue;if(!_0x579bff[_0x581ada[_0x143f65(0xb8)][_0x143f65(0xe9)]])continue;if(typeof((_0x3d738b=_0x581ada===null||_0x581ada===void 0x0?void 0x0:_0x581ada[_0x143f65(0xcb)])===null||_0x3d738b===void 0x0?void 0x0:_0x3d738b[_0x143f65(0xcf)])!=_0x143f65(0x11c))continue;if(_0x581ada[_0x143f65(0xcb)][_0x143f65(0xdc)]==_0x143f65(0x147)||_0x581ada[_0x143f65(0xcb)][_0x143f65(0xdc)]=='one-to-one'){const _0x37fe10=this['connection'][_0x143f65(0xe7)](_0x581ada[_0x143f65(0xcb)][_0x143f65(0xcf)](_0x581ada[_0x143f65(0xcb)][_0x143f65(0xdc)]),_0x581ada[_0x143f65(0xcb)][_0x143f65(0xfa)])['withDeleted']();(_0x581ada===null||_0x581ada===void 0x0?void 0x0:_0x581ada[_0x143f65(0xf6)])&&_0x37fe10[_0x143f65(0xcc)]({..._0x581ada[_0x143f65(0xf6)],'skip':0x0,'take':0x1}),_0x579bff[_0x581ada[_0x143f65(0x109)]]=await _0x37fe10['andWhere'](_0x37fe10['alias']+'.'+_0x581ada[_0x143f65(0xb8)][_0x143f65(0xe9)]+_0x143f65(0xff)+_0x581ada['joinColumn'][_0x143f65(0xe9)],{[_0x581ada[_0x143f65(0xb8)][_0x143f65(0xe9)]]:_0x579bff[_0x581ada['joinColumn']['name']]})[_0x143f65(0xe3)]();}else{if(_0x581ada['relation']['relationType']==_0x143f65(0x140)||_0x581ada[_0x143f65(0xcb)][_0x143f65(0xdc)]==_0x143f65(0xce)){const _0x5f58fd=this['connection'][_0x143f65(0xe7)](_0x581ada[_0x143f65(0xcb)][_0x143f65(0xcf)](_0x581ada[_0x143f65(0xcb)][_0x143f65(0xdc)]),_0x581ada[_0x143f65(0xcb)][_0x143f65(0xfa)])[_0x143f65(0xdb)]();(_0x581ada===null||_0x581ada===void 0x0?void 0x0:_0x581ada['findOption'])&&_0x5f58fd['setFindOptions']({'skip':0x0,'take':0xa,..._0x581ada[_0x143f65(0xf6)]}),_0x579bff[_0x581ada[_0x143f65(0x109)]]=await _0x5f58fd['andWhere'](_0x5f58fd['alias']+'.'+_0x581ada[_0x143f65(0xb8)]['name']+_0x143f65(0xff)+_0x581ada['joinColumn'][_0x143f65(0xd8)],{[_0x581ada[_0x143f65(0xb8)][_0x143f65(0xd8)]]:_0x579bff[_0x581ada['joinColumn'][_0x143f65(0xe9)]]})['getMany']();}}}return _0x579bff;};
|
|
1
|
+
const a14_0xf53a76=a14_0xfc06;(function(_0x2a371e,_0x3f8216){const _0x4f3142=a14_0xfc06,_0x381303=_0x2a371e();while(!![]){try{const _0x2bd30b=parseInt(_0x4f3142(0xb2))/0x1*(-parseInt(_0x4f3142(0xeb))/0x2)+-parseInt(_0x4f3142(0xdf))/0x3+parseInt(_0x4f3142(0xd7))/0x4*(parseInt(_0x4f3142(0x8f))/0x5)+parseInt(_0x4f3142(0xb5))/0x6*(parseInt(_0x4f3142(0xc4))/0x7)+parseInt(_0x4f3142(0xa1))/0x8+parseInt(_0x4f3142(0xe8))/0x9+-parseInt(_0x4f3142(0x72))/0xa;if(_0x2bd30b===_0x3f8216)break;else _0x381303['push'](_0x381303['shift']());}catch(_0x1879f9){_0x381303['push'](_0x381303['shift']());}}}(a14_0x10e5,0x32087));const a14_0x179fa0=(function(){let _0xfdc39f=!![];return function(_0x1d270f,_0x1e6beb){const _0x243eaa=_0xfdc39f?function(){const _0xf8bdd6=a14_0xfc06;if(_0x1e6beb){const _0xf0fad7=_0x1e6beb[_0xf8bdd6(0xbd)](_0x1d270f,arguments);return _0x1e6beb=null,_0xf0fad7;}}:function(){};return _0xfdc39f=![],_0x243eaa;};}()),a14_0x51979a=a14_0x179fa0(this,function(){const _0x45c665=a14_0xfc06;return a14_0x51979a[_0x45c665(0xf2)]()[_0x45c665(0xee)](_0x45c665(0x87))[_0x45c665(0xf2)]()[_0x45c665(0x9c)](a14_0x51979a)[_0x45c665(0xee)]('(((.+)+)+)+$');});a14_0x51979a();'use strict';Object[a14_0xf53a76(0x6d)](exports,a14_0xf53a76(0xbf),{'value':!![]}),exports[a14_0xf53a76(0x74)]=exports[a14_0xf53a76(0x92)]=exports['ShardingStrategy']=exports[a14_0xf53a76(0xdd)]=exports[a14_0xf53a76(0xd8)]=exports['MODEL_SEARCH_KEY']=exports[a14_0xf53a76(0xd3)]=exports[a14_0xf53a76(0xc9)]=exports[a14_0xf53a76(0xaf)]=exports[a14_0xf53a76(0xdb)]=exports[a14_0xf53a76(0x7d)]=exports['ENTIFY_MODULE']=exports[a14_0xf53a76(0xd4)]=void 0x0;const stream_1=require(a14_0xf53a76(0xe2)),core_1=require(a14_0xf53a76(0x75)),typeorm_1=require(a14_0xf53a76(0xcd)),DriverUtils_1=require(a14_0xf53a76(0xb6)),typeorm_2=require(a14_0xf53a76(0xcd)),typeorm_3=require(a14_0xf53a76(0xcd));require(a14_0xf53a76(0xf3));const sleep_1=require('./helper/sleep');exports[a14_0xf53a76(0xd4)]=a14_0xf53a76(0x7b),exports[a14_0xf53a76(0x80)]='decorator:anncic-api:typeorm:entify:module',exports['ENTIFY_MODULE_SOURCE']=a14_0xf53a76(0xcf),exports[a14_0xf53a76(0xdb)]=a14_0xf53a76(0xda),exports[a14_0xf53a76(0xaf)]='decorator:anncic-api:typeorm:repository',exports['REPOSITORY_OBSERVE_KEY']=a14_0xf53a76(0xe6),exports['MODEL_KEY']='decorator:anncic-api:typeorm:model',exports[a14_0xf53a76(0x77)]=a14_0xf53a76(0x7e),exports[a14_0xf53a76(0xd8)]=a14_0xf53a76(0xd5),exports[a14_0xf53a76(0xdd)]=a14_0xf53a76(0xbe);function a14_0xfc06(_0x3cfdaa,_0x3ab5fc){_0x3cfdaa=_0x3cfdaa-0x66;const _0x25e6f6=a14_0x10e5();let _0x51979a=_0x25e6f6[_0x3cfdaa];return _0x51979a;}var interfaceSharding_1=require(a14_0xf53a76(0xf3));Object[a14_0xf53a76(0x6d)](exports,a14_0xf53a76(0x94),{'enumerable':!![],'get':function(){return interfaceSharding_1['ShardingStrategy'];}}),Object[a14_0xf53a76(0x6d)](exports,a14_0xf53a76(0x92),{'enumerable':!![],'get':function(){const _0x11fd3a=a14_0xf53a76;return interfaceSharding_1[_0x11fd3a(0x92)];}});function a14_0x10e5(){const _0x1789aa=['type','reject','\x20--\x20PARAMETERS:\x20','query','queryResultCache','defineProperty','mainAlias','records','getTime','splice','432550nNwaza','substring','SearchPaginate','@midwayjs/core','many-to-many','MODEL_SEARCH_KEY','chunk','target','OptimisticLockVersionMismatchError','decorator:anncic-api:typeorm:entify','getEntityValue','ENTIFY_MODULE_SOURCE','decorator:anncic-api:typeorm:model:search','destroy','ENTIFY_MODULE','isExpired','getRawAndEntities','getManyAndCount','alwaysEnabled','isArray','immediately','(((.+)+)+)+$','getQueryAndParameters','data','delay','all','listenerCount','createQueryBuilder','propertyName','570zuMepc','relation','findOne','clearTableExistsCache','startsWith','ShardingStrategy','SelectQueryBuilder','length','take','relationType','findOneByOrFail','obtainQueryRunner','abs','constructor','sleep','string','_joinAppendsResolve','Readable','813208jcHXzj','withDeleted','updateDateColumn','number','emit','rows','lockMode','getExplainCount','size','one-to-one','EntityManager','parse','connection','getFromCache','REPOSITORY_KEY','default','andWhere','76061HyXxXl','countsize','clone','174MQDUFU','typeorm/driver/DriverUtils','duration','EXPLAIN\x20','function','getCount','options','prototype','apply','decorator:anncic-api:typeorm:entity:virtual:column','__esModule','getMany','cache','find','optimistic','69013DRxkwj','push','DriverUtils','joinColumns','getManyExplainCount','REPOSITORY_OBSERVE_KEY','name','findOption','one-to-many','typeorm','getMetadataArgsStorage','decorator:anncic-api:typeorm:entify:module:source','MetadataManager','versionColumn','joinColumn','MODEL_KEY','ENTIFY_KEY','decorator:anncic-api:typeorm:model:search:scope','\x20=\x20:','6052aXjZDa','MODEL_SEARCH_SCOPE_KEY','boolean','decorator:anncic-api:typeorm:entify:sharding','ENTIFY_SHARDING_KEY','alias','ENTITY_VIRTUAL_COLUMN_KEY','result','971547FemXsP','cacheId','_appends','stream','setFindOptions','then','limit','decorator:anncic-api:typeorm:repository:observe','release','792504JqUDTt','lockVersion','end','2jbydYr','resolve','offset','search','ignoreErrors','cacheDuration','stringify','toString','./interfaceSharding','EntityNotFoundError','getOwnMetadata','getOne','referencedColumnName','many-to-one','expressionMap'];a14_0x10e5=function(){return _0x1789aa;};return a14_0x10e5();}class SearchPaginate{}exports[a14_0xf53a76(0x74)]=SearchPaginate,typeorm_2[a14_0xf53a76(0x95)]['prototype'][a14_0xf53a76(0x78)]=function(_0x27a4a7=0x64,_0x4010cd){const _0x3ec606=a14_0xf53a76;let _0x401c69=0x1,_0x33cccd=0x64,_0x32a683=0x0,_0x2869e9=0x0,_0x1186d3=![],_0x17c736=!![];if(typeof _0x27a4a7=='number'||typeof _0x27a4a7==_0x3ec606(0x9e))_0x33cccd=parseInt(''+_0x27a4a7);else _0x27a4a7&&((_0x27a4a7===null||_0x27a4a7===void 0x0?void 0x0:_0x27a4a7[_0x3ec606(0xa9)])&&(_0x33cccd=parseInt(''+_0x27a4a7['size'])),(_0x27a4a7===null||_0x27a4a7===void 0x0?void 0x0:_0x27a4a7[_0x3ec606(0xb3)])&&(_0x32a683=parseInt(''+_0x27a4a7[_0x3ec606(0xb3)])),(_0x27a4a7===null||_0x27a4a7===void 0x0?void 0x0:_0x27a4a7['delay'])&&(_0x1186d3=typeof _0x27a4a7[_0x3ec606(0x8a)]==_0x3ec606(0xd9)?0x1f4:parseInt(''+_0x27a4a7['delay'])),typeof(_0x27a4a7===null||_0x27a4a7===void 0x0?void 0x0:_0x27a4a7[_0x3ec606(0x86)])==_0x3ec606(0xd9)&&(_0x17c736=_0x27a4a7[_0x3ec606(0x86)]));_0x32a683>0x0&&_0x32a683>_0x33cccd&&(_0x33cccd=_0x32a683);const _0x1b1962=this,_0x4afff2=new stream_1[(_0x3ec606(0xa0))]({'objectMode':!![],'highWaterMark':_0x33cccd*0x2,async 'read'(){const _0x11e8b8=_0x3ec606;try{if(_0x32a683>0x0&&_0x32a683<=_0x2869e9)this[_0x11e8b8(0x8c)](_0x11e8b8(0x89))>0x0?this['push'](null):this[_0x11e8b8(0xa5)](_0x11e8b8(0xea));else{const _0x2e71e0=_0x1b1962[_0x11e8b8(0xb4)]()[_0x11e8b8(0xe5)](Math[_0x11e8b8(0x9b)](_0x33cccd))['offset']((Math[_0x11e8b8(0x9b)](_0x401c69)-0x1)*Math[_0x11e8b8(0x9b)](_0x33cccd)),_0x276baa=await _0x2e71e0[_0x11e8b8(0xc0)]();if((_0x276baa===null||_0x276baa===void 0x0?void 0x0:_0x276baa['length'])>0x0){_0x32a683>0x0&&_0x2869e9+_0x276baa[_0x11e8b8(0x96)]>_0x32a683&&_0x276baa[_0x11e8b8(0x71)](0x0,_0x32a683-(_0x2869e9+_0x276baa['length']-_0x32a683));if(typeof _0x4010cd==_0x11e8b8(0xb9)){const _0x411ddf=await _0x4010cd(_0x276baa,_0x401c69,_0x2e71e0[_0x11e8b8(0x88)]());_0x411ddf&&Array[_0x11e8b8(0x85)](_0x411ddf)?(_0x411ddf===null||_0x411ddf===void 0x0?void 0x0:_0x411ddf[_0x11e8b8(0x96)])>0x0&&(_0x2869e9+=_0x411ddf[_0x11e8b8(0x96)],_0x32a683>0x0&&_0x2869e9>_0x32a683&&_0x411ddf[_0x11e8b8(0x71)](0x0,_0x32a683-(_0x2869e9-_0x32a683)),this[_0x11e8b8(0xc5)](_0x411ddf),_0x411ddf[_0x11e8b8(0x96)]=0x0):(_0x2869e9+=_0x276baa['length'],_0x32a683>0x0&&_0x2869e9>_0x32a683&&_0x276baa[_0x11e8b8(0x71)](0x0,_0x32a683-(_0x2869e9-_0x32a683)),this[_0x11e8b8(0xc5)](_0x276baa));}else _0x2869e9+=_0x276baa[_0x11e8b8(0x96)],_0x32a683>0x0&&_0x2869e9>_0x32a683&&_0x276baa[_0x11e8b8(0x71)](0x0,_0x32a683-(_0x2869e9-_0x32a683)),this[_0x11e8b8(0xc5)](_0x276baa);_0x276baa[_0x11e8b8(0x96)]=0x0,_0x401c69++,_0x1186d3&&typeof _0x1186d3==_0x11e8b8(0xa4)&&await(0x0,sleep_1[_0x11e8b8(0x9d)])(_0x1186d3);}else this[_0x11e8b8(0x8c)](_0x11e8b8(0x89))>0x0?this[_0x11e8b8(0xc5)](null):this['emit']('end');}}catch(_0x93a853){this['destroy'](_0x93a853);}}});return _0x4afff2['on'](_0x3ec606(0xea),()=>_0x4afff2[_0x3ec606(0x7f)]()),_0x4afff2['on']('close',()=>_0x4afff2['destroy']()),_0x17c736&&_0x4afff2['resume'](),_0x4afff2;},typeorm_3[a14_0xf53a76(0xab)]['prototype']['findOneOrFail']=async function(_0x183bdc,_0x4c239b){const _0x2e65e3=a14_0xf53a76;return this[_0x2e65e3(0x91)](_0x183bdc,_0x4c239b)['then'](_0x591c87=>{const _0x204cb7=_0x2e65e3;if(_0x591c87===null||_0x591c87===undefined)return Promise[_0x204cb7(0x69)](new typeorm_3[(_0x204cb7(0xf4))](_0x183bdc,_0x4c239b));return Promise[_0x204cb7(0xec)](_0x591c87);});},typeorm_3['EntityManager']['prototype'][a14_0xf53a76(0x99)]=async function(_0x39c349,_0x4e93b2){const _0x4cee0d=a14_0xf53a76;return this['findOneBy'](_0x39c349,_0x4e93b2)[_0x4cee0d(0xe4)](_0x1cb3a8=>{const _0x1e1b38=_0x4cee0d;if(_0x1cb3a8===null||_0x1cb3a8===undefined)return Promise[_0x1e1b38(0x69)](new typeorm_3['EntityNotFoundError'](_0x39c349,_0x4e93b2));return Promise[_0x1e1b38(0xec)](_0x1cb3a8);});},typeorm_2[a14_0xf53a76(0x95)][a14_0xf53a76(0xbc)]['getOne']=async function(){const _0x2d276f=a14_0xf53a76;var _0x1363a1;const {entities:_0x134d7f,raw:_0x3048d8}=await this[_0x2d276f(0x82)]();if(_0x134d7f[0x0]&&this[_0x2d276f(0x67)][_0x2d276f(0xa7)]===_0x2d276f(0xc3)&&this[_0x2d276f(0x67)][_0x2d276f(0xe9)]){const _0x353b16=this[_0x2d276f(0x67)][_0x2d276f(0x6e)]['metadata'];if(this[_0x2d276f(0x67)][_0x2d276f(0xe9)]instanceof Date){const _0x3bdf2c=_0x353b16[_0x2d276f(0xa3)]['getEntityValue'](_0x134d7f[0x0]);if(_0x3bdf2c[_0x2d276f(0x70)]()!==this[_0x2d276f(0x67)]['lockVersion'][_0x2d276f(0x70)]())throw new typeorm_2[(_0x2d276f(0x7a))](_0x353b16[_0x2d276f(0xca)],this[_0x2d276f(0x67)][_0x2d276f(0xe9)],_0x3bdf2c);}else{const _0xd7739e=_0x353b16[_0x2d276f(0xd1)][_0x2d276f(0x7c)](_0x134d7f[0x0]);if(_0xd7739e!==this[_0x2d276f(0x67)][_0x2d276f(0xe9)])throw new typeorm_2['OptimisticLockVersionMismatchError'](_0x353b16[_0x2d276f(0xca)],this[_0x2d276f(0x67)]['lockVersion'],_0xd7739e);}}if(_0x134d7f[0x0]&&_0x3048d8[0x0]){const _0x1c0e25=core_1[_0x2d276f(0xd0)][_0x2d276f(0xf5)](exports['ENTITY_VIRTUAL_COLUMN_KEY'],_0x134d7f[0x0]);for(const _0x4f67bd in _0x1c0e25){_0x3048d8[0x0]['hasOwnProperty'](_0x4f67bd)&&(_0x134d7f[0x0][_0x4f67bd]=_0x3048d8[0x0][_0x4f67bd]||((_0x1363a1=_0x1c0e25[_0x4f67bd])===null||_0x1363a1===void 0x0?void 0x0:_0x1363a1[_0x2d276f(0xb0)])||'');}}return _0x134d7f[0x0]&&typeof this[_0x2d276f(0x9f)]=='function'&&(_0x134d7f[0x0]=await this[_0x2d276f(0x9f)](_0x134d7f[0x0])),_0x134d7f[0x0]||null;},typeorm_2[a14_0xf53a76(0x95)][a14_0xf53a76(0xbc)][a14_0xf53a76(0xc0)]=async function(){const _0x271a23=a14_0xf53a76;if(this[_0x271a23(0x67)][_0x271a23(0xa7)]==='optimistic')throw new typeorm_2['OptimisticLockCanNotBeUsedError']();const {entities:_0x493577,raw:_0xaf5d7e}=await this[_0x271a23(0x82)]();return await Promise[_0x271a23(0x8b)](_0x493577['map'](async(_0x19980e,_0x2bd9dd)=>{const _0x10beac=_0x271a23;var _0x18c675;const _0xe3e056=core_1[_0x10beac(0xd0)][_0x10beac(0xf5)](exports[_0x10beac(0xdd)],_0x19980e)||{};for(const _0x353eee in _0xe3e056){_0xaf5d7e[_0x2bd9dd]&&_0xaf5d7e[_0x2bd9dd]['hasOwnProperty'](_0x353eee)&&(_0x19980e[_0x353eee]=_0xaf5d7e[_0x2bd9dd][_0x353eee]||((_0x18c675=_0xe3e056[_0x353eee])===null||_0x18c675===void 0x0?void 0x0:_0x18c675['default'])||'');}return _0x19980e&&typeof this[_0x10beac(0x9f)]=='function'&&(_0x19980e=await this[_0x10beac(0x9f)](_0x19980e)),_0x19980e;}));},typeorm_2[a14_0xf53a76(0x95)][a14_0xf53a76(0xbc)][a14_0xf53a76(0x83)]=async function(){const _0x48cd0d=a14_0xf53a76;return[await this[_0x48cd0d(0xc0)](),await this['getCount']()];},typeorm_2[a14_0xf53a76(0x95)]['prototype'][a14_0xf53a76(0xc8)]=async function(){const _0x1817f5=a14_0xf53a76;return[await this['getMany'](),await this[_0x1817f5(0xa8)]()];},typeorm_2[a14_0xf53a76(0x95)]['prototype'][a14_0xf53a76(0xa8)]=async function(){const _0x275db4=a14_0xf53a76;var _0x1e6f54,_0x5e6155,_0x10c942,_0x1b921b;if(DriverUtils_1[_0x275db4(0xc6)]['isMySQLFamily'](this['connection']['driver'])){const _0x4fa83d=this[_0x275db4(0x9a)]();try{this[_0x275db4(0x67)]['queryEntity']=![];const [_0x5bf7b4,_0x522713]=this['clone']()[_0x275db4(0xed)](undefined)[_0x275db4(0xe5)](undefined)['skip'](undefined)[_0x275db4(0x97)](undefined)[_0x275db4(0x88)](),_0x20d258=_0x275db4(0xb8)+_0x5bf7b4+_0x275db4(0x6a)+JSON[_0x275db4(0xf1)](_0x522713),_0x2bba26=typeof this[_0x275db4(0xad)][_0x275db4(0xbb)][_0x275db4(0xc1)]==='object'?this[_0x275db4(0xad)][_0x275db4(0xbb)][_0x275db4(0xc1)]:{},_0x46d94d=_0x2bba26[_0x275db4(0x84)]&&this['expressionMap'][_0x275db4(0xc1)]||this[_0x275db4(0x67)][_0x275db4(0xc1)];let _0x4b7c3d=undefined,_0x322bac=![];if(this['connection'][_0x275db4(0x6c)]&&_0x46d94d)try{_0x4b7c3d=await this[_0x275db4(0xad)][_0x275db4(0x6c)][_0x275db4(0xae)]({'query':_0x20d258,'identifier':this['expressionMap'][_0x275db4(0xe0)],'duration':this[_0x275db4(0x67)]['cacheDuration']||_0x2bba26[_0x275db4(0xb7)]||0x3e8},_0x4fa83d);if(_0x4b7c3d&&!this[_0x275db4(0xad)][_0x275db4(0x6c)][_0x275db4(0x81)](_0x4b7c3d))return parseInt(((_0x5e6155=(_0x1e6f54=JSON[_0x275db4(0xac)](_0x4b7c3d[_0x275db4(0xde)]))===null||_0x1e6f54===void 0x0?void 0x0:_0x1e6f54[0x0])===null||_0x5e6155===void 0x0?void 0x0:_0x5e6155[_0x275db4(0xa6)])||'0');}catch(_0x38c5e4){if(!_0x2bba26[_0x275db4(0xef)])throw _0x38c5e4;_0x322bac=!![];}const _0x874bee=await _0x4fa83d[_0x275db4(0x6b)](_0x275db4(0xb8)+_0x5bf7b4,_0x522713,!![]);if(!_0x322bac&&this[_0x275db4(0xad)]['queryResultCache']&&_0x46d94d)try{await this['connection'][_0x275db4(0x6c)]['storeInCache']({'query':_0x20d258,'time':new Date()[_0x275db4(0x70)](),'identifier':this['expressionMap']['cacheId'],'duration':this[_0x275db4(0x67)][_0x275db4(0xf0)]||_0x2bba26['duration']||0x3e8,'result':JSON['stringify'](_0x874bee['records'])},_0x4b7c3d,_0x4fa83d);}catch(_0x5be0e3){if(!_0x2bba26[_0x275db4(0xef)])throw _0x5be0e3;}return parseInt(((_0x1b921b=(_0x10c942=_0x874bee[_0x275db4(0x6f)])===null||_0x10c942===void 0x0?void 0x0:_0x10c942[0x0])===null||_0x1b921b===void 0x0?void 0x0:_0x1b921b['rows'])||'0');}catch(_0x42eb3c){throw _0x42eb3c;}finally{_0x4fa83d!==this['queryRunner']&&await _0x4fa83d[_0x275db4(0xe7)]();}}else return this[_0x275db4(0xba)]();},typeorm_2[a14_0xf53a76(0x95)][a14_0xf53a76(0xbc)]['joinAppends']=function(_0x4a719a,_0x350e32){const _0x4207d8=a14_0xf53a76;_0x4a719a[_0x4207d8(0x93)](this[_0x4207d8(0xdc)]+'.')&&(_0x4a719a=_0x4a719a[_0x4207d8(0x73)]((this[_0x4207d8(0xdc)]+'.')['length']));const _0x50a5cb=typeof _0x350e32==_0x4207d8(0x9e)?{'alias':_0x350e32}:_0x350e32,_0x2f40d7=this[_0x4207d8(0x67)][_0x4207d8(0x6e)]['metadata'],_0x1da91b=(0x0,typeorm_1[_0x4207d8(0xce)])(),_0x3fb00d=_0x1da91b['relations'][_0x4207d8(0xc2)](_0x55e32d=>_0x55e32d[_0x4207d8(0x79)]==_0x2f40d7[_0x4207d8(0x79)]&&_0x55e32d[_0x4207d8(0x8e)]==_0x4a719a);if((_0x2f40d7===null||_0x2f40d7===void 0x0?void 0x0:_0x2f40d7[_0x4207d8(0x79)])&&(_0x3fb00d===null||_0x3fb00d===void 0x0?void 0x0:_0x3fb00d['propertyName'])){!this[_0x4207d8(0xe1)]&&(this['_appends']=[]);if(_0x3fb00d[_0x4207d8(0x98)]==_0x4207d8(0x66)||_0x3fb00d[_0x4207d8(0x98)]==_0x4207d8(0xaa)){const _0x4a89a7=_0x1da91b[_0x4207d8(0xc7)]['find'](_0x382262=>_0x382262[_0x4207d8(0x79)]==_0x2f40d7['target']&&_0x382262[_0x4207d8(0x8e)]==_0x4a719a);_0x3fb00d[_0x4207d8(0x8e)]==(_0x4a89a7===null||_0x4a89a7===void 0x0?void 0x0:_0x4a89a7[_0x4207d8(0x8e)])&&(!this[_0x4207d8(0xe1)][_0x4207d8(0xc2)](_0x1368d6=>_0x1368d6['alias']==((_0x50a5cb===null||_0x50a5cb===void 0x0?void 0x0:_0x50a5cb['alias'])||_0x4a719a))&&this[_0x4207d8(0xe1)][_0x4207d8(0xc5)]({'alias':(_0x50a5cb===null||_0x50a5cb===void 0x0?void 0x0:_0x50a5cb[_0x4207d8(0xdc)])||_0x4a719a,'relation':_0x3fb00d,'joinColumn':_0x4a89a7,'findOption':(_0x50a5cb===null||_0x50a5cb===void 0x0?void 0x0:_0x50a5cb[_0x4207d8(0xcb)])||undefined}));}else{if(_0x3fb00d[_0x4207d8(0x98)]==_0x4207d8(0xcc))try{const _0x5310d2=_0x1da91b['relations'][_0x4207d8(0xc2)](_0x2d2334=>_0x2d2334['target']==_0x3fb00d[_0x4207d8(0x68)](_0x3fb00d[_0x4207d8(0x8e)])&&_0x2d2334['type'](_0x2d2334[_0x4207d8(0x98)])==_0x2f40d7[_0x4207d8(0x79)]),_0x57ad94=_0x1da91b[_0x4207d8(0xc7)][_0x4207d8(0xc2)](_0x51e3d3=>_0x51e3d3[_0x4207d8(0x79)]==_0x5310d2[_0x4207d8(0x79)]&&_0x51e3d3[_0x4207d8(0x8e)]==_0x5310d2['propertyName']);_0x5310d2[_0x4207d8(0x8e)]==(_0x57ad94===null||_0x57ad94===void 0x0?void 0x0:_0x57ad94[_0x4207d8(0x8e)])&&(!this[_0x4207d8(0xe1)][_0x4207d8(0xc2)](_0x17aca7=>_0x17aca7[_0x4207d8(0xdc)]==((_0x50a5cb===null||_0x50a5cb===void 0x0?void 0x0:_0x50a5cb[_0x4207d8(0xdc)])||_0x4a719a))&&this['_appends'][_0x4207d8(0xc5)]({'alias':(_0x50a5cb===null||_0x50a5cb===void 0x0?void 0x0:_0x50a5cb['alias'])||_0x4a719a,'relation':_0x3fb00d,'joinColumn':_0x57ad94,'findOption':(_0x50a5cb===null||_0x50a5cb===void 0x0?void 0x0:_0x50a5cb['findOption'])||undefined}));}catch(_0x48b7a3){}}}return this;},typeorm_2[a14_0xf53a76(0x95)][a14_0xf53a76(0xbc)]['_joinAppendsResolve']=async function(_0x2c3fbd){const _0x183cbb=a14_0xf53a76;var _0x5e2713,_0x26dbea,_0x28e50e,_0x3c9758;for(const _0x2801bd of this['_appends']||[]){if(!((_0x5e2713=_0x2801bd===null||_0x2801bd===void 0x0?void 0x0:_0x2801bd[_0x183cbb(0x90)])===null||_0x5e2713===void 0x0?void 0x0:_0x5e2713[_0x183cbb(0x98)]))continue;if(!((_0x26dbea=_0x2801bd===null||_0x2801bd===void 0x0?void 0x0:_0x2801bd[_0x183cbb(0xd2)])===null||_0x26dbea===void 0x0?void 0x0:_0x26dbea[_0x183cbb(0xca)])||!((_0x28e50e=_0x2801bd===null||_0x2801bd===void 0x0?void 0x0:_0x2801bd[_0x183cbb(0xd2)])===null||_0x28e50e===void 0x0?void 0x0:_0x28e50e[_0x183cbb(0xf7)]))continue;if(!_0x2c3fbd[_0x2801bd[_0x183cbb(0xd2)]['referencedColumnName']])continue;if(typeof((_0x3c9758=_0x2801bd===null||_0x2801bd===void 0x0?void 0x0:_0x2801bd[_0x183cbb(0x90)])===null||_0x3c9758===void 0x0?void 0x0:_0x3c9758[_0x183cbb(0x68)])!=_0x183cbb(0xb9))continue;if(_0x2801bd[_0x183cbb(0x90)]['relationType']==_0x183cbb(0x66)||_0x2801bd[_0x183cbb(0x90)]['relationType']==_0x183cbb(0xaa)){const _0x156ec7=this['connection']['createQueryBuilder'](_0x2801bd['relation'][_0x183cbb(0x68)](_0x2801bd[_0x183cbb(0x90)][_0x183cbb(0x98)]),_0x2801bd[_0x183cbb(0x90)]['propertyName'])[_0x183cbb(0xa2)]();(_0x2801bd===null||_0x2801bd===void 0x0?void 0x0:_0x2801bd[_0x183cbb(0xcb)])&&_0x156ec7[_0x183cbb(0xe3)]({..._0x2801bd[_0x183cbb(0xcb)],'skip':0x0,'take':0x1}),_0x2c3fbd[_0x2801bd['alias']]=await _0x156ec7[_0x183cbb(0xb1)](_0x156ec7[_0x183cbb(0xdc)]+'.'+_0x2801bd['joinColumn'][_0x183cbb(0xf7)]+_0x183cbb(0xd6)+_0x2801bd[_0x183cbb(0xd2)][_0x183cbb(0xf7)],{[_0x2801bd[_0x183cbb(0xd2)]['referencedColumnName']]:_0x2c3fbd[_0x2801bd[_0x183cbb(0xd2)][_0x183cbb(0xca)]]})[_0x183cbb(0xf6)]();}else{if(_0x2801bd[_0x183cbb(0x90)][_0x183cbb(0x98)]=='one-to-many'||_0x2801bd['relation'][_0x183cbb(0x98)]==_0x183cbb(0x76)){const _0x51406f=this['connection'][_0x183cbb(0x8d)](_0x2801bd[_0x183cbb(0x90)][_0x183cbb(0x68)](_0x2801bd['relation'][_0x183cbb(0x98)]),_0x2801bd[_0x183cbb(0x90)]['propertyName'])[_0x183cbb(0xa2)]();(_0x2801bd===null||_0x2801bd===void 0x0?void 0x0:_0x2801bd[_0x183cbb(0xcb)])&&_0x51406f['setFindOptions']({'skip':0x0,'take':0xa,..._0x2801bd[_0x183cbb(0xcb)]}),_0x2c3fbd[_0x2801bd['alias']]=await _0x51406f[_0x183cbb(0xb1)](_0x51406f[_0x183cbb(0xdc)]+'.'+_0x2801bd[_0x183cbb(0xd2)][_0x183cbb(0xca)]+_0x183cbb(0xd6)+_0x2801bd[_0x183cbb(0xd2)][_0x183cbb(0xca)],{[_0x2801bd[_0x183cbb(0xd2)][_0x183cbb(0xca)]]:_0x2c3fbd[_0x2801bd[_0x183cbb(0xd2)]['referencedColumnName']]})[_0x183cbb(0xc0)]();}}}return _0x2c3fbd;};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { DataSource, EntityManager, EntityMetadata } from "typeorm";
|
|
2
|
-
export interface ShardingContext {
|
|
3
|
-
entity: Function;
|
|
4
|
-
baseTableName: string;
|
|
5
|
-
dataSource: DataSource;
|
|
6
|
-
entityMetadata: EntityMetadata;
|
|
7
|
-
manager: EntityManager;
|
|
8
|
-
}
|
|
9
|
-
export declare abstract class ShardingStrategy {
|
|
10
|
-
getTableName?(baseTableName: string, queryParams: any): string;
|
|
11
|
-
getSelectTableName?(baseTableName: string, queryParams: any): string;
|
|
12
|
-
getInsertTableName?(baseTableName: string, queryParams: any): string;
|
|
13
|
-
getUpdateTableName?(baseTableName: string, queryParams: any): string;
|
|
14
|
-
getDeleteTableName?(baseTableName: string, queryParams: any): string;
|
|
15
|
-
getPreCreateTableNames?(baseTableName: string): string[] | Promise<string[]>;
|
|
16
|
-
createTables?(ctx: ShardingContext, tableName: string): boolean | Promise<boolean>;
|
|
17
|
-
checkTableExists(ctx: ShardingContext, tableName: string): Promise<boolean>;
|
|
18
|
-
protected createTableFromMetadata(ctx: ShardingContext, tableName: string): Promise<void>;
|
|
19
|
-
ensureTableExists(ctx: ShardingContext, tableName: string): Promise<void>;
|
|
20
|
-
preCreateTables(ctx: ShardingContext, tableNames?: string[]): Promise<void>;
|
|
21
|
-
}
|
|
22
|
-
export declare function clearTableExistsCache(ds?: DataSource, tableName?: string): void;
|
|
1
|
+
import { DataSource, EntityManager, EntityMetadata } from "typeorm";
|
|
2
|
+
export interface ShardingContext {
|
|
3
|
+
entity: Function;
|
|
4
|
+
baseTableName: string;
|
|
5
|
+
dataSource: DataSource;
|
|
6
|
+
entityMetadata: EntityMetadata;
|
|
7
|
+
manager: EntityManager;
|
|
8
|
+
}
|
|
9
|
+
export declare abstract class ShardingStrategy {
|
|
10
|
+
getTableName?(baseTableName: string, queryParams: any): string;
|
|
11
|
+
getSelectTableName?(baseTableName: string, queryParams: any): string;
|
|
12
|
+
getInsertTableName?(baseTableName: string, queryParams: any): string;
|
|
13
|
+
getUpdateTableName?(baseTableName: string, queryParams: any): string;
|
|
14
|
+
getDeleteTableName?(baseTableName: string, queryParams: any): string;
|
|
15
|
+
getPreCreateTableNames?(baseTableName: string): string[] | Promise<string[]>;
|
|
16
|
+
createTables?(ctx: ShardingContext, tableName: string): boolean | Promise<boolean>;
|
|
17
|
+
checkTableExists(ctx: ShardingContext, tableName: string): Promise<boolean>;
|
|
18
|
+
protected createTableFromMetadata(ctx: ShardingContext, tableName: string): Promise<void>;
|
|
19
|
+
ensureTableExists(ctx: ShardingContext, tableName: string): Promise<void>;
|
|
20
|
+
preCreateTables(ctx: ShardingContext, tableNames?: string[]): Promise<void>;
|
|
21
|
+
}
|
|
22
|
+
export declare function clearTableExistsCache(ds?: DataSource, tableName?: string): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a15_0x11e4(){const _0x4c7a5a=['getDeleteTableName','metadata','brackets','strategy','hasOwnProperty','expressionMap','FindOperator','driver','InsertQueryBuilder','entities','entityMetadata','execute','getPreCreateTableNames','getUpdateTableName','getPrototypeOf','exclusions','keys','_type','set','ENTIFY_SHARDING_KEY','IDFK','getRawAndEntities','typeorm','\x22\x20was\x20not\x20created','__shardingParams','clear','find','isArray','_value','connection','warn','not','prototype','hasMetadata','delete','aliases','name','getCurrentApplicationContext','pop','ShardingStrategy','map','createQueryRunner','1527138geLDjt','length','tableName','filter','toString','IDUQ','indices','defineProperty','split','get','forEach','crypto','string','332452ZLmGon','condition','628914DwTIBH','ensureTableExists','nativeParameters','assign','__esModule','call','getClassMetadata','Table','\x22\x20after\x203\x20retries:\x20','matchAll','./interface','(((.+)+)+)+$','object','hasTable','apply','size','release','tablePath','1134932TdPIpX','baseTableName','@midwayjs/core','@instanceof','digest','where','valuesSet','checkTableExists','manager','QueryBuilder','1774885pNAkdn','slice','IDEXC','IDX','SelectQueryBuilder','getAsync','has','[Sharding]\x20Custom\x20createTables\x20failed,\x20fallback\x20to\x20default:','foreignKeys','getTableName','startsWith','simple','target','equal','parameters','176946nkBcOM','md5','DeleteQueryBuilder','select','raw','between','columns','search','createTable','[Sharding]\x20Ensure\x20table\x20exists\x20failed:','291268yKIkDl','isNull','getInsertTableName','dataSource','constructor','wheres','hex','getRawMany','UpdateQueryBuilder','type','create','uniques','description'];a15_0x11e4=function(){return _0x4c7a5a;};return a15_0x11e4();}const a15_0x1c2a98=a15_0x4612;(function(_0x5d475a,_0x3bb1aa){const _0x4afcb5=a15_0x4612,_0x183ae8=_0x5d475a();while(!![]){try{const _0x549fe5=-parseInt(_0x4afcb5(0xcf))/0x1+parseInt(_0x4afcb5(0x106))/0x2+parseInt(_0x4afcb5(0xd1))/0x3+-parseInt(_0x4afcb5(0xe3))/0x4+parseInt(_0x4afcb5(0xed))/0x5+parseInt(_0x4afcb5(0xc2))/0x6+parseInt(_0x4afcb5(0xfc))/0x7;if(_0x549fe5===_0x3bb1aa)break;else _0x183ae8['push'](_0x183ae8['shift']());}catch(_0x69340d){_0x183ae8['push'](_0x183ae8['shift']());}}}(a15_0x11e4,0x5b469));const a15_0x3cba90=(function(){let _0x281ed3=!![];return function(_0x3124f6,_0x44d041){const _0x188a14=_0x281ed3?function(){const _0x1c1cff=a15_0x4612;if(_0x44d041){const _0x135808=_0x44d041[_0x1c1cff(0xdf)](_0x3124f6,arguments);return _0x44d041=null,_0x135808;}}:function(){};return _0x281ed3=![],_0x188a14;};}()),a15_0x4905f1=a15_0x3cba90(this,function(){const _0x2ea35a=a15_0x4612;return a15_0x4905f1[_0x2ea35a(0xc6)]()[_0x2ea35a(0x103)](_0x2ea35a(0xdc))[_0x2ea35a(0xc6)]()[_0x2ea35a(0x10a)](a15_0x4905f1)['search'](_0x2ea35a(0xdc));});a15_0x4905f1();'use strict';function a15_0x4612(_0x268559,_0x215134){const _0x9b4069=a15_0x11e4();return a15_0x4612=function(_0x4905f1,_0x3cba90){_0x4905f1=_0x4905f1-0x9a;let _0x11e444=_0x9b4069[_0x4905f1];return _0x11e444;},a15_0x4612(_0x268559,_0x215134);}Object[a15_0x1c2a98(0xc9)](exports,a15_0x1c2a98(0xd5),{'value':!![]}),exports['clearTableExistsCache']=exports['ShardingStrategy']=void 0x0;const crypto_1=require(a15_0x1c2a98(0xcd)),core_1=require(a15_0x1c2a98(0xe5)),typeorm_1=require(a15_0x1c2a98(0xae)),interface_1=require(a15_0x1c2a98(0xdb)),tableExistsCache=new Map(),MAX_CACHE_SIZE=0x3e8;class ShardingStrategy{async[a15_0x1c2a98(0xea)](_0xff1e19,_0x2d5c4d){const _0x54c456=a15_0x1c2a98;var _0x2108a8;let _0x17cacc=tableExistsCache[_0x54c456(0xcb)](_0xff1e19[_0x54c456(0x109)]);!_0x17cacc&&tableExistsCache['set'](_0xff1e19[_0x54c456(0x109)],_0x17cacc=new Map());if(_0x17cacc[_0x54c456(0xf3)](_0x2d5c4d))return(_0x2108a8=_0x17cacc[_0x54c456(0xcb)](_0x2d5c4d))!==null&&_0x2108a8!==void 0x0?_0x2108a8:![];const _0x2c2522=_0xff1e19['manager'][_0x54c456(0xb5)][_0x54c456(0xc1)]();try{return await _0x2c2522[_0x54c456(0xde)](_0x2d5c4d)&&(_0x17cacc[_0x54c456(0xe0)]>=MAX_CACHE_SIZE&&_0x17cacc[_0x54c456(0xb1)](),_0x17cacc[_0x54c456(0xaa)](_0x2d5c4d,!![])),_0x17cacc[_0x54c456(0xcb)](_0x2d5c4d)||![];}finally{await _0x2c2522[_0x54c456(0xe1)]();}}async['createTableFromMetadata'](_0x306a38,_0x3f5859){const _0x176d65=a15_0x1c2a98;var _0x36814a;const _0xe71475=_0x306a38[_0x176d65(0xeb)]['connection'][_0x176d65(0xc1)]();try{const _0x4294c7=Object['assign'](Object[_0x176d65(0x110)](Object[_0x176d65(0xa6)](_0x306a38['entityMetadata'])),_0x306a38[_0x176d65(0xa2)]);Object[_0x176d65(0xc9)](_0x4294c7,_0x176d65(0xc4),{'get':()=>_0x3f5859,'enumerable':!![],'configurable':!![]});const _0x5c1176=typeorm_1[_0x176d65(0xd8)][_0x176d65(0x110)](_0x4294c7,_0x306a38[_0x176d65(0x109)][_0x176d65(0x9f)]),_0x5e135e=new Map(),_0x215a31=_0x6a754f=>_0x1b7ca4=>{const _0x4b6879=_0x176d65,_0x59e94b=(_0x5e135e[_0x4b6879(0xcb)](_0x1b7ca4)||0x0)+0x1;return _0x5e135e[_0x4b6879(0xaa)](_0x1b7ca4,_0x59e94b),_0x6a754f+'_'+(0x0,crypto_1['createHash'])(_0x4b6879(0xfd))['update'](_0x1b7ca4+'_'+_0x3f5859+'_'+_0x59e94b)[_0x4b6879(0xe7)](_0x4b6879(0x10c));};_0x5c1176[_0x176d65(0xc8)][_0x176d65(0xcc)](_0x2a38f8=>_0x2a38f8[_0x176d65(0xbc)]&&(_0x2a38f8[_0x176d65(0xbc)]=_0x215a31(_0x176d65(0xf0))(_0x2a38f8['name']))),_0x5c1176[_0x176d65(0xf5)][_0x176d65(0xcc)](_0x32f716=>_0x32f716['name']&&(_0x32f716[_0x176d65(0xbc)]=_0x215a31(_0x176d65(0xac))(_0x32f716[_0x176d65(0xbc)]))),_0x5c1176[_0x176d65(0x111)][_0x176d65(0xcc)](_0x505d47=>_0x505d47['name']&&(_0x505d47['name']=_0x215a31(_0x176d65(0xc7))(_0x505d47['name']))),_0x5c1176['checks'][_0x176d65(0xcc)](_0x3cc5aa=>_0x3cc5aa[_0x176d65(0xbc)]&&(_0x3cc5aa[_0x176d65(0xbc)]=_0x215a31('IDCHK')(_0x3cc5aa[_0x176d65(0xbc)]))),_0x5c1176[_0x176d65(0xa7)]['forEach'](_0x429f37=>_0x429f37['name']&&(_0x429f37[_0x176d65(0xbc)]=_0x215a31(_0x176d65(0xef))(_0x429f37['name']))),await _0xe71475[_0x176d65(0x104)](_0x5c1176,!![],![],![]);if(!await _0xe71475[_0x176d65(0xde)](_0x3f5859))throw new Error('Table\x20\x22'+_0x3f5859+_0x176d65(0xaf));(_0x36814a=tableExistsCache['get'](_0x306a38[_0x176d65(0x109)]))===null||_0x36814a===void 0x0?void 0x0:_0x36814a[_0x176d65(0xaa)](_0x3f5859,!![]);}finally{await _0xe71475[_0x176d65(0xe1)]();}}async['ensureTableExists'](_0x5ddc96,_0xf10904){const _0x4ac1e3=a15_0x1c2a98;if(await this[_0x4ac1e3(0xea)](_0x5ddc96,_0xf10904))return;let _0x501d2a=![];if(this['createTables'])try{_0x501d2a=await this['createTables'](_0x5ddc96,_0xf10904);}catch(_0x1419cc){console[_0x4ac1e3(0xb6)](_0x4ac1e3(0xf4),_0x1419cc);}if(!_0x501d2a&&!await this[_0x4ac1e3(0xea)](_0x5ddc96,_0xf10904)){let _0x2972cc;for(let _0x46affb=0x0;_0x46affb<0x3;_0x46affb++){try{await this['createTableFromMetadata'](_0x5ddc96,_0xf10904);return;}catch(_0x304204){_0x2972cc=_0x304204,await new Promise(_0x4a747b=>setTimeout(_0x4a747b,0x32*(_0x46affb+0x1)));if(await this['checkTableExists'](_0x5ddc96,_0xf10904))return;}}throw new Error('[Sharding]\x20Failed\x20to\x20create\x20table\x20\x22'+_0xf10904+_0x4ac1e3(0xd9)+(_0x2972cc instanceof Error?_0x2972cc['message']:String(_0x2972cc)));}}async['preCreateTables'](_0x189b1e,_0x34a229){const _0x17f69e=a15_0x1c2a98;var _0x799d3;const _0x2d42d6=_0x34a229||await((_0x799d3=this[_0x17f69e(0xa4)])===null||_0x799d3===void 0x0?void 0x0:_0x799d3[_0x17f69e(0xd6)](this,_0x189b1e[_0x17f69e(0xe4)]))||[];for(const _0x2e0676 of _0x2d42d6){_0x2e0676&&_0x2e0676!==_0x189b1e[_0x17f69e(0xe4)]&&await this[_0x17f69e(0xd2)](_0x189b1e,_0x2e0676);}}}exports[a15_0x1c2a98(0xbf)]=ShardingStrategy;const METHODS=['getSelectTableName',a15_0x1c2a98(0x108),a15_0x1c2a98(0xa5),a15_0x1c2a98(0x113)];function extractOriginalWhereParams(_0x879fe7){const _0x2d80cb=a15_0x1c2a98;var _0x4a4449,_0x5e8982,_0x4d67ef,_0x5653a5,_0x410f5a;if(_0x879fe7[_0x2d80cb(0xb0)])return _0x879fe7[_0x2d80cb(0xb0)];const _0x3a00ac={},_0x2099e8={...(_0x4a4449=_0x879fe7[_0x2d80cb(0x9d)])===null||_0x4a4449===void 0x0?void 0x0:_0x4a4449[_0x2d80cb(0xd3)],...(_0x5e8982=_0x879fe7[_0x2d80cb(0x9d)])===null||_0x5e8982===void 0x0?void 0x0:_0x5e8982['parameters']};((_0x4d67ef=_0x879fe7['findOptions'])===null||_0x4d67ef===void 0x0?void 0x0:_0x4d67ef[_0x2d80cb(0xe8)])&&Object[_0x2d80cb(0xd4)](_0x3a00ac,_0x879fe7['findOptions'][_0x2d80cb(0xe8)]);function _0x8f099f(_0x1d97f2,_0x5de2d9){const _0x75189b=_0x2d80cb;var _0x1dc86d,_0x34b13e,_0x58d6af;if(!_0x1d97f2||typeof _0x1d97f2!==_0x75189b(0xdd))return;const _0x5ba8ed=_0x1d97f2[_0x75189b(0xa9)]!==undefined&&(((_0x34b13e=(_0x1dc86d=Object[_0x75189b(0xa6)](_0x1d97f2))===null||_0x1dc86d===void 0x0?void 0x0:_0x1dc86d['constructor'])===null||_0x34b13e===void 0x0?void 0x0:_0x34b13e[_0x75189b(0xbc)])===_0x75189b(0x9e)||((_0x58d6af=_0x1d97f2[_0x75189b(0xe6)])===null||_0x58d6af===void 0x0?void 0x0:_0x58d6af[_0x75189b(0x112)])===_0x75189b(0x9e));if(_0x5ba8ed){const _0x29d68d=_0x1d97f2[_0x75189b(0xb4)];if(_0x5de2d9){if(Array[_0x75189b(0xb3)](_0x29d68d))_0x3a00ac[_0x5de2d9]=_0x29d68d[0x0];else _0x29d68d!==undefined?_0x3a00ac[_0x5de2d9]=_0x29d68d:_0x3a00ac[_0x5de2d9]=null;}return;}if(Array['isArray'](_0x1d97f2)){_0x1d97f2[_0x75189b(0xcc)](_0x32d061=>_0x8f099f(_0x32d061));return;}for(const _0x3b814d in _0x1d97f2){if(_0x1d97f2['hasOwnProperty'](_0x3b814d)){const _0x3802b5=_0x1d97f2[_0x3b814d];typeof _0x3802b5===_0x75189b(0xdd)&&_0x3802b5!==null&&_0x8f099f(_0x3802b5,_0x3b814d);}}}_0x8f099f((_0x5653a5=_0x879fe7['findOptions'])===null||_0x5653a5===void 0x0?void 0x0:_0x5653a5[_0x2d80cb(0xe8)]);const _0x5de55a=(_0x410f5a=_0x879fe7['expressionMap'])===null||_0x410f5a===void 0x0?void 0x0:_0x410f5a[_0x2d80cb(0x10b)];if(!(_0x5de55a===null||_0x5de55a===void 0x0?void 0x0:_0x5de55a[_0x2d80cb(0xc3)])){const _0x3c47d2=Object[_0x2d80cb(0xa8)](_0x3a00ac)[_0x2d80cb(0xc3)]>0x0?_0x3a00ac:null;return _0x879fe7[_0x2d80cb(0xb0)]=_0x3c47d2,_0x3c47d2;}const _0x184172={};function _0x59b346(_0x5eb9c9){const _0x4b3b25=_0x2d80cb;try{const _0x3e57d1=_0x5eb9c9[_0x4b3b25(0xda)](/(\w+)\.(\w+)\s*=\s*:([\w_]+)/g);for(const _0x233376 of _0x3e57d1){const [,,_0x2a129d,_0x3025ef]=_0x233376;_0x2a129d&&_0x3025ef&&!_0x3a00ac[_0x4b3b25(0x9c)](_0x2a129d)&&_0x2099e8[_0x4b3b25(0x9c)](_0x3025ef)&&(_0x3a00ac[_0x2a129d]=_0x2099e8[_0x3025ef],_0x184172[_0x3025ef]=_0x2099e8[_0x3025ef]);}}catch(_0x68499){console['warn']('[Sharding]\x20Failed\x20to\x20parse\x20string\x20condition:',_0x5eb9c9,_0x68499);}}function _0x2bc4be(_0x51a2bc){const _0x2a5330=_0x2d80cb;if(!_0x51a2bc)return;if(typeof _0x51a2bc==='string'){_0x59b346(_0x51a2bc);return;}if(Array[_0x2a5330(0xb3)](_0x51a2bc)){_0x51a2bc['forEach'](_0x2bc4be);return;}const {operator:_0x2effe1,parameters:_0xc720e3}=_0x51a2bc;if(!_0x2effe1){if(_0x51a2bc['parameters']&&Array['isArray'](_0x51a2bc[_0x2a5330(0xfb)])){const _0x324f68=_0x51a2bc[_0x2a5330(0xfb)][0x0];if(typeof _0x324f68===_0x2a5330(0xce)){const _0x2860e9=_0x324f68[_0x2a5330(0xca)]('.')[_0x2a5330(0xbe)]();if(_0x51a2bc[_0x2a5330(0xfb)][_0x2a5330(0xc3)]>=0x2){const _0x5e825f=_0x565c48=>typeof _0x565c48===_0x2a5330(0xce)&&_0x565c48[_0x2a5330(0xf7)](':')?_0x2099e8[_0x565c48[_0x2a5330(0xee)](0x1)]:_0x565c48,_0x2ec83b=_0x5e825f(_0x51a2bc[_0x2a5330(0xfb)][0x1]);_0x2ec83b!==undefined&&!_0x3a00ac['hasOwnProperty'](_0x2860e9)&&(_0x3a00ac[_0x2860e9]=_0x2ec83b);if(typeof _0x51a2bc[_0x2a5330(0xfb)][0x1]==='string'&&_0x51a2bc['parameters'][0x1][_0x2a5330(0xf7)](':')){const _0x27b942=_0x51a2bc[_0x2a5330(0xfb)][0x1][_0x2a5330(0xee)](0x1);!(_0x27b942 in _0x184172)&&(_0x184172[_0x27b942]=_0x2099e8[_0x27b942]);}}}}_0x51a2bc[_0x2a5330(0xd0)]&&_0x2bc4be(_0x51a2bc[_0x2a5330(0xd0)]);return;}if(_0x2effe1===_0x2a5330(0x9a)||_0x2effe1===_0x2a5330(0xb7)){_0x2bc4be(_0x51a2bc[_0x2a5330(0xd0)]);return;}if(_0x2effe1==='and'){if(Array['isArray'](_0xc720e3)&&_0xc720e3[_0x2a5330(0xc3)]>0x0&&typeof _0xc720e3[0x0]===_0x2a5330(0xce))return;if(Array[_0x2a5330(0xb3)](_0xc720e3))_0xc720e3[_0x2a5330(0xcc)](_0x2bc4be);else{if(_0xc720e3)_0x2bc4be(_0xc720e3);else{if(_0x51a2bc['condition'])_0x2bc4be(_0x51a2bc[_0x2a5330(0xd0)]);}}return;}if(!(_0xc720e3===null||_0xc720e3===void 0x0?void 0x0:_0xc720e3['length'])||typeof _0xc720e3[0x0]!==_0x2a5330(0xce))return;const _0x50e5a3=_0x2b26c2=>typeof _0x2b26c2==='string'&&_0x2b26c2[_0x2a5330(0xf7)](':')?_0x2099e8[_0x2b26c2[_0x2a5330(0xee)](0x1)]:_0x2b26c2;for(let _0x48d231=0x1;_0x48d231<_0xc720e3[_0x2a5330(0xc3)];_0x48d231++){const _0x255805=_0xc720e3[_0x48d231];if(typeof _0x255805===_0x2a5330(0xce)&&_0x255805[_0x2a5330(0xf7)](':')){const _0x133c7a=_0x255805['slice'](0x1),_0x2c5623=_0x2099e8[_0x133c7a];_0x2c5623!==undefined&&!(_0x133c7a in _0x184172)&&(_0x184172[_0x133c7a]=_0x2c5623);}}const _0x1279f1=_0xc720e3[0x0][_0x2a5330(0xca)]('.')[_0x2a5330(0xbe)]();if(_0x3a00ac[_0x2a5330(0x9c)](_0x1279f1))return;if(_0x2effe1===_0x2a5330(0x107))_0x3a00ac[_0x1279f1]=null;else{if(_0x2effe1===_0x2a5330(0x101)&&_0xc720e3[_0x2a5330(0xc3)]>=0x3)_0x3a00ac[_0x1279f1]=[_0x50e5a3(_0xc720e3[0x1]),_0x50e5a3(_0xc720e3[0x2])];else{if(_0x2effe1==='in'&&_0xc720e3['length']>0x1){const _0x103cf3=_0xc720e3[_0x2a5330(0xee)](0x1)[_0x2a5330(0xc0)](_0x50e5a3)[_0x2a5330(0xc5)](_0x448296=>_0x448296!==undefined);if(_0x103cf3['length'])_0x3a00ac[_0x1279f1]=_0x103cf3;}else{if(_0xc720e3[_0x2a5330(0xc3)]>=0x2){const _0x465bd3=_0x50e5a3(_0xc720e3[0x1]);_0x465bd3!==undefined&&(_0x3a00ac[_0x1279f1]=_0x2effe1===_0x2a5330(0xfa)?_0x465bd3:{'operator':_0x2effe1,'value':_0x465bd3});}}}}}_0x5de55a[_0x2d80cb(0xcc)](_0x572fec=>{const _0x4dba63=_0x2d80cb;if(_0x572fec['type']===_0x4dba63(0xf8)&&Array['isArray'](_0x572fec[_0x4dba63(0xd0)]))_0x572fec['condition'][_0x4dba63(0xcc)](_0xd605e2=>_0x2bc4be(_0xd605e2));else Array[_0x4dba63(0xb3)](_0x572fec[_0x4dba63(0xd0)])?_0x572fec[_0x4dba63(0xd0)][_0x4dba63(0xcc)](_0x2bc4be):_0x2bc4be(_0x572fec['condition']);});const _0x46fb71=Object[_0x2d80cb(0xa8)](_0x3a00ac)[_0x2d80cb(0xc3)]>0x0||Object['keys'](_0x184172)[_0x2d80cb(0xc3)]>0x0?{..._0x3a00ac,..._0x184172}:null;return _0x879fe7['__shardingParams']=_0x46fb71,_0x46fb71;}function getQueryType(_0x362416){const _0x6ff745=a15_0x1c2a98;if(_0x362416 instanceof typeorm_1[_0x6ff745(0xf1)])return 0x0;if(_0x362416 instanceof typeorm_1[_0x6ff745(0xa0)])return 0x1;if(_0x362416 instanceof typeorm_1[_0x6ff745(0x10e)])return 0x2;return 0x3;}function extractEntityValues(_0x5b4e99){const _0x5b7bbc=a15_0x1c2a98;var _0x35aefa;const _0x2e040a=(_0x35aefa=_0x5b4e99[_0x5b7bbc(0x9d)])===null||_0x35aefa===void 0x0?void 0x0:_0x35aefa[_0x5b7bbc(0xe9)];if(!_0x2e040a)return null;if(Array[_0x5b7bbc(0xb3)](_0x2e040a)){if(_0x2e040a[_0x5b7bbc(0xc3)]>0x0&&_0x2e040a[0x0]&&typeof _0x2e040a[0x0]===_0x5b7bbc(0xdd))return{..._0x2e040a[0x0]};return null;}if(typeof _0x2e040a===_0x5b7bbc(0xdd))return{..._0x2e040a};return null;}function resolveTableName(_0x425000,_0x5b2b52,_0x3af66f,_0x1946bc){const _0x552b7f=a15_0x1c2a98;var _0x24d8bc,_0xa5df66;const _0x2e0d28=_0x425000[METHODS[_0x1946bc]];if(_0x2e0d28){const _0x23f583=_0x2e0d28[_0x552b7f(0xd6)](_0x425000,_0x5b2b52,_0x3af66f);if(_0x23f583)return _0x23f583;}return(_0xa5df66=(_0x24d8bc=_0x425000[_0x552b7f(0xf6)])===null||_0x24d8bc===void 0x0?void 0x0:_0x24d8bc['call'](_0x425000,_0x5b2b52,_0x3af66f))!==null&&_0xa5df66!==void 0x0?_0xa5df66:null;}function getShardingMeta(_0x3cdd2e){const _0x12e662=a15_0x1c2a98,_0x616ea2=(0x0,core_1[_0x12e662(0xd7)])(interface_1[_0x12e662(0xab)],_0x3cdd2e);if(!(_0x616ea2===null||_0x616ea2===void 0x0?void 0x0:_0x616ea2[_0x12e662(0x9b)]))return null;return{'strategy':_0x616ea2[_0x12e662(0x9b)]};}function getShardingTableNameSync(_0x1fdfcf,_0x2a6c42){const _0x2b430d=a15_0x1c2a98;var _0x3a202b,_0x4dbbaa,_0x1309f3,_0x3416cf,_0x6c6bbc;const _0x1a1aab=(_0x4dbbaa=(_0x3a202b=_0x1fdfcf['expressionMap'])===null||_0x3a202b===void 0x0?void 0x0:_0x3a202b[_0x2b430d(0xbb)])===null||_0x4dbbaa===void 0x0?void 0x0:_0x4dbbaa[_0x2b430d(0xb2)](_0x32245d=>{const _0x47fae2=_0x2b430d;var _0x2ee0b1;if(_0x32245d[_0x47fae2(0xe2)]===_0x2a6c42)return!![];if(_0x32245d[_0x47fae2(0xb9)]&&((_0x2ee0b1=_0x32245d['metadata'])===null||_0x2ee0b1===void 0x0?void 0x0:_0x2ee0b1['tableName'])===_0x2a6c42)return!![];return![];});if(!(_0x1a1aab===null||_0x1a1aab===void 0x0?void 0x0:_0x1a1aab[_0x2b430d(0xb9)]))return null;const _0x47a3ad=_0x1a1aab['metadata'];if(!(_0x47a3ad===null||_0x47a3ad===void 0x0?void 0x0:_0x47a3ad['target']))return null;const _0x45d20b=getShardingMeta(_0x47a3ad['target']);if(!_0x45d20b)return null;try{const _0x56014b=(_0x1309f3=(0x0,core_1['getCurrentApplicationContext'])())===null||_0x1309f3===void 0x0?void 0x0:_0x1309f3[_0x2b430d(0xcb)](_0x45d20b[_0x2b430d(0x9b)]);if(!_0x56014b)return null;const _0xeca37a=_0x47a3ad[_0x2b430d(0xc4)];let _0x75c9eb=extractOriginalWhereParams(_0x1fdfcf);const _0x3f5d0d=extractEntityValues(_0x1fdfcf);_0x3f5d0d&&(_0x75c9eb=_0x75c9eb?{..._0x3f5d0d,..._0x75c9eb}:_0x3f5d0d);!_0x75c9eb&&(_0x75c9eb={...(_0x3416cf=_0x1fdfcf['expressionMap'])===null||_0x3416cf===void 0x0?void 0x0:_0x3416cf[_0x2b430d(0xd3)],...(_0x6c6bbc=_0x1fdfcf[_0x2b430d(0x9d)])===null||_0x6c6bbc===void 0x0?void 0x0:_0x6c6bbc['parameters']});const _0x53c460=resolveTableName(_0x56014b,_0xeca37a,_0x75c9eb,getQueryType(_0x1fdfcf));return _0x53c460&&_0x53c460!==_0xeca37a?_0x53c460:null;}catch{}return null;}async function ensureShardingTablesExist(_0x2ffc88){const _0x25761e=a15_0x1c2a98;var _0x5bcf1c,_0x56213d,_0x1cec27;const _0x115a10=(0x0,core_1[_0x25761e(0xbd)])();if(!_0x115a10)return;let _0x24f56a=extractOriginalWhereParams(_0x2ffc88);const _0x392614=extractEntityValues(_0x2ffc88);_0x392614&&(_0x24f56a=_0x24f56a?{..._0x392614,..._0x24f56a}:_0x392614);!_0x24f56a&&(_0x24f56a={...(_0x5bcf1c=_0x2ffc88[_0x25761e(0x9d)])===null||_0x5bcf1c===void 0x0?void 0x0:_0x5bcf1c[_0x25761e(0xd3)],...(_0x56213d=_0x2ffc88[_0x25761e(0x9d)])===null||_0x56213d===void 0x0?void 0x0:_0x56213d[_0x25761e(0xfb)]});const _0x43782d=getQueryType(_0x2ffc88);for(const _0x47c178 of((_0x1cec27=_0x2ffc88[_0x25761e(0x9d)])===null||_0x1cec27===void 0x0?void 0x0:_0x1cec27[_0x25761e(0xbb)])||[]){if(_0x47c178['type']!=='from'&&_0x47c178[_0x25761e(0x10f)]!==_0x25761e(0xff)&&_0x47c178[_0x25761e(0x10f)]!=='join')continue;if(!_0x47c178[_0x25761e(0xb9)])continue;const _0x1059ed=_0x47c178[_0x25761e(0x114)];if(!(_0x1059ed===null||_0x1059ed===void 0x0?void 0x0:_0x1059ed[_0x25761e(0xf9)]))continue;const _0x12db33=getShardingMeta(_0x1059ed[_0x25761e(0xf9)]);if(!_0x12db33)continue;try{const _0x5dd7b9=await _0x115a10[_0x25761e(0xf2)](_0x12db33[_0x25761e(0x9b)]);if(!_0x5dd7b9)continue;const _0x10ce27=_0x1059ed['tableName'],_0x1d5fa1=resolveTableName(_0x5dd7b9,_0x10ce27,_0x24f56a,_0x43782d)||_0x10ce27,_0xc1ac76={'entity':_0x1059ed[_0x25761e(0xf9)],'baseTableName':_0x10ce27,'dataSource':_0x2ffc88[_0x25761e(0xb5)],'entityMetadata':_0x1059ed,'manager':_0x2ffc88['connection']['manager']};_0x1d5fa1!==_0x10ce27&&await _0x5dd7b9[_0x25761e(0xd2)](_0xc1ac76,_0x1d5fa1),await _0x5dd7b9['preCreateTables'](_0xc1ac76);}catch(_0x4ae84e){console[_0x25761e(0xb6)](_0x25761e(0x105),_0x4ae84e);}}}const _origGetTableName=typeorm_1['QueryBuilder'][a15_0x1c2a98(0xb8)][a15_0x1c2a98(0xf6)],_getRawAndEntities=typeorm_1[a15_0x1c2a98(0xf1)][a15_0x1c2a98(0xb8)][a15_0x1c2a98(0xad)],_getRawMany=typeorm_1['SelectQueryBuilder'][a15_0x1c2a98(0xb8)][a15_0x1c2a98(0x10d)],_selectExecute=typeorm_1['SelectQueryBuilder'][a15_0x1c2a98(0xb8)][a15_0x1c2a98(0xa3)],_insert=typeorm_1['InsertQueryBuilder'][a15_0x1c2a98(0xb8)]['execute'],_update=typeorm_1['UpdateQueryBuilder'][a15_0x1c2a98(0xb8)]['execute'],_delete=typeorm_1[a15_0x1c2a98(0xfe)][a15_0x1c2a98(0xb8)][a15_0x1c2a98(0xa3)];typeorm_1[a15_0x1c2a98(0xec)][a15_0x1c2a98(0xb8)][a15_0x1c2a98(0xf6)]=function(_0x456ae1){const _0x598c3f=a15_0x1c2a98;return _origGetTableName[_0x598c3f(0xd6)](this,getShardingTableNameSync(this,_0x456ae1)||_0x456ae1);},typeorm_1[a15_0x1c2a98(0xf1)]['prototype'][a15_0x1c2a98(0xad)]=async function(){const _0xcd4ef5=a15_0x1c2a98;var _0x43a868,_0x634476,_0x3fa4c3,_0x577493;await ensureShardingTablesExist(this);const _0x28da10=await _getRawAndEntities['call'](this);if(((_0x43a868=_0x28da10===null||_0x28da10===void 0x0?void 0x0:_0x28da10[_0xcd4ef5(0x100)])===null||_0x43a868===void 0x0?void 0x0:_0x43a868['length'])>0x0&&((_0x634476=_0x28da10===null||_0x28da10===void 0x0?void 0x0:_0x28da10[_0xcd4ef5(0xa1)])===null||_0x634476===void 0x0?void 0x0:_0x634476['length'])===0x0){const _0x377fa4=(_0x577493=(_0x3fa4c3=this['expressionMap'])===null||_0x3fa4c3===void 0x0?void 0x0:_0x3fa4c3['mainAlias'])===null||_0x577493===void 0x0?void 0x0:_0x577493[_0xcd4ef5(0x114)];if(_0x377fa4===null||_0x377fa4===void 0x0?void 0x0:_0x377fa4[_0xcd4ef5(0xf9)]){const _0x571e0b=_0x377fa4['target'];_0x28da10[_0xcd4ef5(0xa1)]=_0x28da10[_0xcd4ef5(0x100)][_0xcd4ef5(0xc0)](_0x23fc00=>{const _0x120136=_0xcd4ef5,_0x4c1206=new _0x571e0b();for(const _0x465434 of _0x377fa4[_0x120136(0x102)]||[]){const {propertyName:_0x1b15fc,databaseName:_0x1bc991}=_0x465434;if(_0x23fc00[_0x120136(0x9c)](_0x1bc991))_0x4c1206[_0x1b15fc]=_0x23fc00[_0x1bc991];else _0x23fc00[_0x120136(0x9c)](_0x1b15fc)&&(_0x4c1206[_0x1b15fc]=_0x23fc00[_0x1b15fc]);}return _0x4c1206;});}}return _0x28da10;},typeorm_1[a15_0x1c2a98(0xf1)][a15_0x1c2a98(0xb8)]['getRawMany']=async function(){const _0x2e9a3d=a15_0x1c2a98;return await ensureShardingTablesExist(this),_getRawMany[_0x2e9a3d(0xd6)](this);},typeorm_1['SelectQueryBuilder']['prototype']['execute']=async function(){return await ensureShardingTablesExist(this),_selectExecute['call'](this);},typeorm_1[a15_0x1c2a98(0xa0)][a15_0x1c2a98(0xb8)][a15_0x1c2a98(0xa3)]=async function(){const _0x2b15bb=a15_0x1c2a98;return await ensureShardingTablesExist(this),_insert[_0x2b15bb(0xd6)](this);},typeorm_1['UpdateQueryBuilder'][a15_0x1c2a98(0xb8)][a15_0x1c2a98(0xa3)]=async function(){const _0x4e4e60=a15_0x1c2a98;return await ensureShardingTablesExist(this),_update[_0x4e4e60(0xd6)](this);},typeorm_1[a15_0x1c2a98(0xfe)]['prototype']['execute']=async function(){return await ensureShardingTablesExist(this),_delete['call'](this);};function clearTableExistsCache(_0x199f83,_0x3669e3){const _0x30766f=a15_0x1c2a98;var _0x2e3b5d,_0x585620;if(_0x199f83&&_0x3669e3)(_0x2e3b5d=tableExistsCache[_0x30766f(0xcb)](_0x199f83))===null||_0x2e3b5d===void 0x0?void 0x0:_0x2e3b5d[_0x30766f(0xba)](_0x3669e3);else{if(_0x199f83)(_0x585620=tableExistsCache[_0x30766f(0xcb)](_0x199f83))===null||_0x585620===void 0x0?void 0x0:_0x585620['clear']();else tableExistsCache[_0x30766f(0xcc)](_0x504717=>_0x504717['clear']());}}exports['clearTableExistsCache']=clearTableExistsCache;
|
|
1
|
+
const a15_0x2ed71f=a15_0x5864;(function(_0x12d6d0,_0x2015f6){const _0x1fb42e=a15_0x5864,_0x1cefdf=_0x12d6d0();while(!![]){try{const _0x3230a6=-parseInt(_0x1fb42e(0x15d))/0x1*(-parseInt(_0x1fb42e(0x1bd))/0x2)+-parseInt(_0x1fb42e(0x1aa))/0x3*(parseInt(_0x1fb42e(0x198))/0x4)+parseInt(_0x1fb42e(0x180))/0x5*(-parseInt(_0x1fb42e(0x152))/0x6)+parseInt(_0x1fb42e(0x16b))/0x7+-parseInt(_0x1fb42e(0x1a1))/0x8+parseInt(_0x1fb42e(0x196))/0x9+-parseInt(_0x1fb42e(0x1c0))/0xa*(-parseInt(_0x1fb42e(0x16a))/0xb);if(_0x3230a6===_0x2015f6)break;else _0x1cefdf['push'](_0x1cefdf['shift']());}catch(_0x54bed6){_0x1cefdf['push'](_0x1cefdf['shift']());}}}(a15_0x4019,0x46580));const a15_0x2f47e1=(function(){let _0x1008d2=!![];return function(_0x4b5ddf,_0x13d1ef){const _0x47e2a9=_0x1008d2?function(){const _0x15725b=a15_0x5864;if(_0x13d1ef){const _0x2c852d=_0x13d1ef[_0x15725b(0x15f)](_0x4b5ddf,arguments);return _0x13d1ef=null,_0x2c852d;}}:function(){};return _0x1008d2=![],_0x47e2a9;};}()),a15_0x663e8d=a15_0x2f47e1(this,function(){const _0x3d9a17=a15_0x5864;return a15_0x663e8d[_0x3d9a17(0x174)]()[_0x3d9a17(0x1bf)](_0x3d9a17(0x175))[_0x3d9a17(0x174)]()['constructor'](a15_0x663e8d)['search'](_0x3d9a17(0x175));});a15_0x663e8d();'use strict';function a15_0x5864(_0x454041,_0x215715){_0x454041=_0x454041-0x149;const _0x13f9b6=a15_0x4019();let _0x663e8d=_0x13f9b6[_0x454041];return _0x663e8d;}Object['defineProperty'](exports,a15_0x2ed71f(0x1c5),{'value':!![]}),exports[a15_0x2ed71f(0x156)]=void 0x0,exports[a15_0x2ed71f(0x1c1)]=clearTableExistsCache;const crypto_1=require('crypto'),core_1=require(a15_0x2ed71f(0x185)),typeorm_1=require(a15_0x2ed71f(0x15e)),interface_1=require(a15_0x2ed71f(0x169)),tableExistsCache=new Map(),MAX_CACHE_SIZE=0x3e8;class ShardingStrategy{async[a15_0x2ed71f(0x1a4)](_0x318137,_0x3250ba){const _0x39a80f=a15_0x2ed71f;var _0x51b53e;let _0x1afd72=tableExistsCache[_0x39a80f(0x171)](_0x318137['dataSource']);!_0x1afd72&&tableExistsCache[_0x39a80f(0x1a5)](_0x318137[_0x39a80f(0x1a2)],_0x1afd72=new Map());if(_0x1afd72[_0x39a80f(0x1ab)](_0x3250ba))return(_0x51b53e=_0x1afd72[_0x39a80f(0x171)](_0x3250ba))!==null&&_0x51b53e!==void 0x0?_0x51b53e:![];const _0x1a34b3=_0x318137[_0x39a80f(0x195)][_0x39a80f(0x176)]['createQueryRunner']();try{return await _0x1a34b3[_0x39a80f(0x15b)](_0x3250ba)&&(_0x1afd72[_0x39a80f(0x1ac)]>=MAX_CACHE_SIZE&&_0x1afd72[_0x39a80f(0x158)](),_0x1afd72[_0x39a80f(0x1a5)](_0x3250ba,!![])),_0x1afd72[_0x39a80f(0x171)](_0x3250ba)||![];}finally{await _0x1a34b3[_0x39a80f(0x14b)]();}}async['createTableFromMetadata'](_0x498aa0,_0x2ae73b){const _0x572043=a15_0x2ed71f;var _0xc989d1;const _0x4602c1=_0x498aa0[_0x572043(0x195)][_0x572043(0x176)][_0x572043(0x1a9)]();try{const _0x4e1181=Object['assign'](Object[_0x572043(0x1b6)](Object[_0x572043(0x150)](_0x498aa0[_0x572043(0x1bb)])),_0x498aa0[_0x572043(0x1bb)]);Object[_0x572043(0x1a3)](_0x4e1181,_0x572043(0x19e),{'get':()=>_0x2ae73b,'enumerable':!![],'configurable':!![]});const _0x1e7400=typeorm_1[_0x572043(0x1b9)][_0x572043(0x1b6)](_0x4e1181,_0x498aa0['dataSource'][_0x572043(0x164)]),_0x3873e6=new Map(),_0x4c8e75=_0x29833c=>_0xf47f41=>{const _0x3b6487=_0x572043,_0x5e974b=(_0x3873e6[_0x3b6487(0x171)](_0xf47f41)||0x0)+0x1;return _0x3873e6[_0x3b6487(0x1a5)](_0xf47f41,_0x5e974b),_0x29833c+'_'+(0x0,crypto_1['createHash'])(_0x3b6487(0x151))['update'](_0xf47f41+'_'+_0x2ae73b+'_'+_0x5e974b)[_0x3b6487(0x193)](_0x3b6487(0x18b));};_0x1e7400[_0x572043(0x1c3)][_0x572043(0x17e)](_0x4d5909=>_0x4d5909[_0x572043(0x199)]&&(_0x4d5909[_0x572043(0x199)]=_0x4c8e75('IDX')(_0x4d5909[_0x572043(0x199)]))),_0x1e7400['foreignKeys'][_0x572043(0x17e)](_0x7e59c4=>_0x7e59c4['name']&&(_0x7e59c4[_0x572043(0x199)]=_0x4c8e75(_0x572043(0x18f))(_0x7e59c4[_0x572043(0x199)]))),_0x1e7400[_0x572043(0x18c)][_0x572043(0x17e)](_0x29cd03=>_0x29cd03[_0x572043(0x199)]&&(_0x29cd03[_0x572043(0x199)]=_0x4c8e75(_0x572043(0x173))(_0x29cd03['name']))),_0x1e7400[_0x572043(0x1ae)][_0x572043(0x17e)](_0x43d2a6=>_0x43d2a6['name']&&(_0x43d2a6[_0x572043(0x199)]=_0x4c8e75(_0x572043(0x159))(_0x43d2a6[_0x572043(0x199)]))),_0x1e7400[_0x572043(0x166)][_0x572043(0x17e)](_0x507706=>_0x507706['name']&&(_0x507706[_0x572043(0x199)]=_0x4c8e75(_0x572043(0x14f))(_0x507706[_0x572043(0x199)]))),await _0x4602c1[_0x572043(0x188)](_0x1e7400,!![],![],![]);if(!await _0x4602c1['hasTable'](_0x2ae73b))throw new Error(_0x572043(0x19f)+_0x2ae73b+'\x22\x20was\x20not\x20created');(_0xc989d1=tableExistsCache[_0x572043(0x171)](_0x498aa0['dataSource']))===null||_0xc989d1===void 0x0?void 0x0:_0xc989d1[_0x572043(0x1a5)](_0x2ae73b,!![]);}finally{await _0x4602c1[_0x572043(0x14b)]();}}async[a15_0x2ed71f(0x16f)](_0x83d03f,_0xe4afa4){const _0x37c8f6=a15_0x2ed71f;if(await this[_0x37c8f6(0x1a4)](_0x83d03f,_0xe4afa4))return;let _0x27beb9=![];if(this[_0x37c8f6(0x14a)])try{_0x27beb9=await this[_0x37c8f6(0x14a)](_0x83d03f,_0xe4afa4);}catch(_0x1b08a4){console[_0x37c8f6(0x181)](_0x37c8f6(0x190),_0x1b08a4);}if(!_0x27beb9&&!await this['checkTableExists'](_0x83d03f,_0xe4afa4)){let _0x2bbc58;for(let _0x13b171=0x0;_0x13b171<0x3;_0x13b171++){try{await this[_0x37c8f6(0x1a8)](_0x83d03f,_0xe4afa4);return;}catch(_0x3be1fe){_0x2bbc58=_0x3be1fe,await new Promise(_0x426f1a=>setTimeout(_0x426f1a,0x32*(_0x13b171+0x1)));if(await this[_0x37c8f6(0x1a4)](_0x83d03f,_0xe4afa4))return;}}throw new Error(_0x37c8f6(0x149)+_0xe4afa4+_0x37c8f6(0x1b1)+(_0x2bbc58 instanceof Error?_0x2bbc58[_0x37c8f6(0x161)]:String(_0x2bbc58)));}}async[a15_0x2ed71f(0x178)](_0x1c9042,_0x43e81f){const _0x1c6051=a15_0x2ed71f;var _0x512e0c;const _0x53ecf9=_0x43e81f||await((_0x512e0c=this[_0x1c6051(0x1bc)])===null||_0x512e0c===void 0x0?void 0x0:_0x512e0c[_0x1c6051(0x189)](this,_0x1c9042['baseTableName']))||[];for(const _0x22b276 of _0x53ecf9){_0x22b276&&_0x22b276!==_0x1c9042[_0x1c6051(0x18a)]&&await this[_0x1c6051(0x16f)](_0x1c9042,_0x22b276);}}}exports[a15_0x2ed71f(0x156)]=ShardingStrategy;const METHODS=['getSelectTableName','getInsertTableName',a15_0x2ed71f(0x168),'getDeleteTableName'];function extractOriginalWhereParams(_0x5d31f3){const _0x129d1c=a15_0x2ed71f;var _0x1b6b11,_0x3e0c1c,_0x2844d6,_0x5cab79,_0x58f24b;if(_0x5d31f3[_0x129d1c(0x19c)])return _0x5d31f3['__shardingParams'];const _0x93614c={},_0x1662a4={...(_0x1b6b11=_0x5d31f3['expressionMap'])===null||_0x1b6b11===void 0x0?void 0x0:_0x1b6b11['nativeParameters'],...(_0x3e0c1c=_0x5d31f3['expressionMap'])===null||_0x3e0c1c===void 0x0?void 0x0:_0x3e0c1c[_0x129d1c(0x18d)]};((_0x2844d6=_0x5d31f3[_0x129d1c(0x1b8)])===null||_0x2844d6===void 0x0?void 0x0:_0x2844d6[_0x129d1c(0x177)])&&Object['assign'](_0x93614c,_0x5d31f3[_0x129d1c(0x1b8)][_0x129d1c(0x177)]);function _0x40c2e7(_0x8e8f3a,_0xf5d9b){const _0x414818=_0x129d1c;var _0x3bcc89,_0xc9f552,_0x30ddea;if(!_0x8e8f3a||typeof _0x8e8f3a!==_0x414818(0x18e))return;const _0x363c49=_0x8e8f3a[_0x414818(0x184)]!==undefined&&(((_0xc9f552=(_0x3bcc89=Object[_0x414818(0x150)](_0x8e8f3a))===null||_0x3bcc89===void 0x0?void 0x0:_0x3bcc89[_0x414818(0x1b2)])===null||_0xc9f552===void 0x0?void 0x0:_0xc9f552[_0x414818(0x199)])===_0x414818(0x14c)||((_0x30ddea=_0x8e8f3a['@instanceof'])===null||_0x30ddea===void 0x0?void 0x0:_0x30ddea['description'])===_0x414818(0x14c));if(_0x363c49){const _0x4e46db=_0x8e8f3a['_value'];if(_0xf5d9b){if(Array['isArray'](_0x4e46db))_0x93614c[_0xf5d9b]=_0x4e46db[0x0];else _0x4e46db!==undefined?_0x93614c[_0xf5d9b]=_0x4e46db:_0x93614c[_0xf5d9b]=null;}return;}if(Array[_0x414818(0x19b)](_0x8e8f3a)){_0x8e8f3a['forEach'](_0x237144=>_0x40c2e7(_0x237144));return;}for(const _0x139cfe in _0x8e8f3a){if(_0x8e8f3a[_0x414818(0x17d)](_0x139cfe)){const _0x4ca0a9=_0x8e8f3a[_0x139cfe];typeof _0x4ca0a9===_0x414818(0x18e)&&_0x4ca0a9!==null&&_0x40c2e7(_0x4ca0a9,_0x139cfe);}}}_0x40c2e7((_0x5cab79=_0x5d31f3[_0x129d1c(0x1b8)])===null||_0x5cab79===void 0x0?void 0x0:_0x5cab79[_0x129d1c(0x177)]);const _0x36028c=(_0x58f24b=_0x5d31f3[_0x129d1c(0x172)])===null||_0x58f24b===void 0x0?void 0x0:_0x58f24b[_0x129d1c(0x163)];if(!(_0x36028c===null||_0x36028c===void 0x0?void 0x0:_0x36028c[_0x129d1c(0x1b7)])){const _0x1b902c=Object['keys'](_0x93614c)['length']>0x0?_0x93614c:null;return _0x5d31f3[_0x129d1c(0x19c)]=_0x1b902c,_0x1b902c;}const _0x10f085={};function _0x2026ac(_0x13f01f){const _0x2279d1=_0x129d1c;try{const _0x5f4f49=_0x13f01f[_0x2279d1(0x14d)](/(\w+)\.(\w+)\s*=\s*:([\w_]+)/g);for(const _0x1f25b6 of _0x5f4f49){const [,,_0x229823,_0x3743e2]=_0x1f25b6;_0x229823&&_0x3743e2&&!_0x93614c[_0x2279d1(0x17d)](_0x229823)&&_0x1662a4[_0x2279d1(0x17d)](_0x3743e2)&&(_0x93614c[_0x229823]=_0x1662a4[_0x3743e2],_0x10f085[_0x3743e2]=_0x1662a4[_0x3743e2]);}}catch(_0x3d4d70){console[_0x2279d1(0x181)]('[Sharding]\x20Failed\x20to\x20parse\x20string\x20condition:',_0x13f01f,_0x3d4d70);}}function _0x149315(_0x238e28){const _0x532ade=_0x129d1c;if(!_0x238e28)return;if(typeof _0x238e28==='string'){_0x2026ac(_0x238e28);return;}if(Array['isArray'](_0x238e28)){_0x238e28[_0x532ade(0x17e)](_0x149315);return;}const {operator:_0x3b6383,parameters:_0x543dfe}=_0x238e28;if(!_0x3b6383){if(_0x238e28['parameters']&&Array[_0x532ade(0x19b)](_0x238e28[_0x532ade(0x18d)])){const _0x46a2c5=_0x238e28[_0x532ade(0x18d)][0x0];if(typeof _0x46a2c5===_0x532ade(0x17a)){const _0x179cdc=_0x46a2c5['split']('.')[_0x532ade(0x1b4)]();if(_0x238e28['parameters']['length']>=0x2){const _0x531ddf=_0x29b4fb=>typeof _0x29b4fb==='string'&&_0x29b4fb[_0x532ade(0x16e)](':')?_0x1662a4[_0x29b4fb[_0x532ade(0x16c)](0x1)]:_0x29b4fb,_0x51812e=_0x531ddf(_0x238e28['parameters'][0x1]);_0x51812e!==undefined&&!_0x93614c[_0x532ade(0x17d)](_0x179cdc)&&(_0x93614c[_0x179cdc]=_0x51812e);if(typeof _0x238e28[_0x532ade(0x18d)][0x1]===_0x532ade(0x17a)&&_0x238e28[_0x532ade(0x18d)][0x1][_0x532ade(0x16e)](':')){const _0x40ee3f=_0x238e28[_0x532ade(0x18d)][0x1][_0x532ade(0x16c)](0x1);!(_0x40ee3f in _0x10f085)&&(_0x10f085[_0x40ee3f]=_0x1662a4[_0x40ee3f]);}}}}_0x238e28[_0x532ade(0x194)]&&_0x149315(_0x238e28[_0x532ade(0x194)]);return;}if(_0x3b6383===_0x532ade(0x1af)||_0x3b6383===_0x532ade(0x153)){_0x149315(_0x238e28[_0x532ade(0x194)]);return;}if(_0x3b6383===_0x532ade(0x170)){if(Array['isArray'](_0x543dfe)&&_0x543dfe[_0x532ade(0x1b7)]>0x0&&typeof _0x543dfe[0x0]===_0x532ade(0x17a))return;if(Array[_0x532ade(0x19b)](_0x543dfe))_0x543dfe['forEach'](_0x149315);else{if(_0x543dfe)_0x149315(_0x543dfe);else{if(_0x238e28[_0x532ade(0x194)])_0x149315(_0x238e28[_0x532ade(0x194)]);}}return;}if(!(_0x543dfe===null||_0x543dfe===void 0x0?void 0x0:_0x543dfe[_0x532ade(0x1b7)])||typeof _0x543dfe[0x0]!=='string')return;const _0x24c1e7=_0x10dc91=>typeof _0x10dc91==='string'&&_0x10dc91[_0x532ade(0x16e)](':')?_0x1662a4[_0x10dc91[_0x532ade(0x16c)](0x1)]:_0x10dc91;for(let _0x4c20f3=0x1;_0x4c20f3<_0x543dfe['length'];_0x4c20f3++){const _0x2d67f8=_0x543dfe[_0x4c20f3];if(typeof _0x2d67f8===_0x532ade(0x17a)&&_0x2d67f8[_0x532ade(0x16e)](':')){const _0x3ca106=_0x2d67f8[_0x532ade(0x16c)](0x1),_0x1bcc2f=_0x1662a4[_0x3ca106];_0x1bcc2f!==undefined&&!(_0x3ca106 in _0x10f085)&&(_0x10f085[_0x3ca106]=_0x1bcc2f);}}const _0x1c9169=_0x543dfe[0x0][_0x532ade(0x1b3)]('.')[_0x532ade(0x1b4)]();if(_0x93614c[_0x532ade(0x17d)](_0x1c9169))return;if(_0x3b6383===_0x532ade(0x157))_0x93614c[_0x1c9169]=null;else{if(_0x3b6383===_0x532ade(0x154)&&_0x543dfe['length']>=0x3)_0x93614c[_0x1c9169]=[_0x24c1e7(_0x543dfe[0x1]),_0x24c1e7(_0x543dfe[0x2])];else{if(_0x3b6383==='in'&&_0x543dfe[_0x532ade(0x1b7)]>0x1){const _0x53f306=_0x543dfe[_0x532ade(0x16c)](0x1)[_0x532ade(0x15c)](_0x24c1e7)[_0x532ade(0x1ad)](_0x48fd0e=>_0x48fd0e!==undefined);if(_0x53f306[_0x532ade(0x1b7)])_0x93614c[_0x1c9169]=_0x53f306;}else{if(_0x543dfe[_0x532ade(0x1b7)]>=0x2){const _0x5accff=_0x24c1e7(_0x543dfe[0x1]);_0x5accff!==undefined&&(_0x93614c[_0x1c9169]=_0x3b6383===_0x532ade(0x1a0)?_0x5accff:{'operator':_0x3b6383,'value':_0x5accff});}}}}}_0x36028c['forEach'](_0x58da98=>{const _0x5043ad=_0x129d1c;if(_0x58da98[_0x5043ad(0x192)]==='simple'&&Array[_0x5043ad(0x19b)](_0x58da98['condition']))_0x58da98[_0x5043ad(0x194)][_0x5043ad(0x17e)](_0x4d24d6=>_0x149315(_0x4d24d6));else Array[_0x5043ad(0x19b)](_0x58da98[_0x5043ad(0x194)])?_0x58da98[_0x5043ad(0x194)][_0x5043ad(0x17e)](_0x149315):_0x149315(_0x58da98[_0x5043ad(0x194)]);});const _0x4a27be=Object[_0x129d1c(0x197)](_0x93614c)['length']>0x0||Object[_0x129d1c(0x197)](_0x10f085)[_0x129d1c(0x1b7)]>0x0?{..._0x93614c,..._0x10f085}:null;return _0x5d31f3[_0x129d1c(0x19c)]=_0x4a27be,_0x4a27be;}function getQueryType(_0x243453){const _0x11e024=a15_0x2ed71f;if(_0x243453 instanceof typeorm_1[_0x11e024(0x155)])return 0x0;if(_0x243453 instanceof typeorm_1['InsertQueryBuilder'])return 0x1;if(_0x243453 instanceof typeorm_1[_0x11e024(0x19d)])return 0x2;return 0x3;}function extractEntityValues(_0x39babf){const _0x5e55a8=a15_0x2ed71f;var _0x1a4802;const _0x3d7ff8=(_0x1a4802=_0x39babf['expressionMap'])===null||_0x1a4802===void 0x0?void 0x0:_0x1a4802[_0x5e55a8(0x1c2)];if(!_0x3d7ff8)return null;if(Array[_0x5e55a8(0x19b)](_0x3d7ff8)){if(_0x3d7ff8[_0x5e55a8(0x1b7)]>0x0&&_0x3d7ff8[0x0]&&typeof _0x3d7ff8[0x0]===_0x5e55a8(0x18e))return{..._0x3d7ff8[0x0]};return null;}if(typeof _0x3d7ff8===_0x5e55a8(0x18e))return{..._0x3d7ff8};return null;}function resolveTableName(_0x2db1e4,_0x4718a7,_0x1ed0ee,_0x2cc881){const _0xbe174c=a15_0x2ed71f;var _0x421456,_0x45a8f5;const _0x1522de=_0x2db1e4[METHODS[_0x2cc881]];if(_0x1522de){const _0x53355f=_0x1522de[_0xbe174c(0x189)](_0x2db1e4,_0x4718a7,_0x1ed0ee);if(_0x53355f)return _0x53355f;}return(_0x45a8f5=(_0x421456=_0x2db1e4['getTableName'])===null||_0x421456===void 0x0?void 0x0:_0x421456['call'](_0x2db1e4,_0x4718a7,_0x1ed0ee))!==null&&_0x45a8f5!==void 0x0?_0x45a8f5:null;}function getShardingMeta(_0x149886){const _0x57f41b=a15_0x2ed71f,_0x5c6591=core_1[_0x57f41b(0x165)][_0x57f41b(0x160)](interface_1[_0x57f41b(0x183)],_0x149886);if(!(_0x5c6591===null||_0x5c6591===void 0x0?void 0x0:_0x5c6591['strategy']))return null;return{'strategy':_0x5c6591[_0x57f41b(0x15a)]};}function getShardingTableNameSync(_0x19d14d,_0x3622d0){const _0x147681=a15_0x2ed71f;var _0x645176,_0x19a9ae,_0x5ef9a5,_0x95b344,_0x2e52cc;const _0x20dd9c=(_0x19a9ae=(_0x645176=_0x19d14d['expressionMap'])===null||_0x645176===void 0x0?void 0x0:_0x645176['aliases'])===null||_0x19a9ae===void 0x0?void 0x0:_0x19a9ae[_0x147681(0x14e)](_0x5d7dfe=>{var _0x4ca2a2;if(_0x5d7dfe['tablePath']===_0x3622d0)return!![];if(_0x5d7dfe['hasMetadata']&&((_0x4ca2a2=_0x5d7dfe['metadata'])===null||_0x4ca2a2===void 0x0?void 0x0:_0x4ca2a2['tableName'])===_0x3622d0)return!![];return![];});if(!(_0x20dd9c===null||_0x20dd9c===void 0x0?void 0x0:_0x20dd9c[_0x147681(0x1c4)]))return null;const _0x587f48=_0x20dd9c[_0x147681(0x1c6)];if(!(_0x587f48===null||_0x587f48===void 0x0?void 0x0:_0x587f48[_0x147681(0x187)]))return null;const _0x476c24=getShardingMeta(_0x587f48[_0x147681(0x187)]);if(!_0x476c24)return null;try{const _0xb26a11=(_0x5ef9a5=(0x0,core_1[_0x147681(0x1be)])())===null||_0x5ef9a5===void 0x0?void 0x0:_0x5ef9a5[_0x147681(0x171)](_0x476c24['strategy']);if(!_0xb26a11)return null;const _0x51bb72=_0x587f48['tableName'];let _0x7a94a3=extractOriginalWhereParams(_0x19d14d);const _0x210750=extractEntityValues(_0x19d14d);_0x210750&&(_0x7a94a3=_0x7a94a3?{..._0x210750,..._0x7a94a3}:_0x210750);!_0x7a94a3&&(_0x7a94a3={...(_0x95b344=_0x19d14d[_0x147681(0x172)])===null||_0x95b344===void 0x0?void 0x0:_0x95b344[_0x147681(0x1b5)],...(_0x2e52cc=_0x19d14d[_0x147681(0x172)])===null||_0x2e52cc===void 0x0?void 0x0:_0x2e52cc[_0x147681(0x18d)]});const _0x5dd49e=resolveTableName(_0xb26a11,_0x51bb72,_0x7a94a3,getQueryType(_0x19d14d));return _0x5dd49e&&_0x5dd49e!==_0x51bb72?_0x5dd49e:null;}catch{}return null;}async function ensureShardingTablesExist(_0x34883c){const _0x54f8a9=a15_0x2ed71f;var _0x33f374,_0x21ed58,_0x57c325;const _0x57fe0a=(0x0,core_1[_0x54f8a9(0x1be)])();if(!_0x57fe0a)return;let _0x220fa5=extractOriginalWhereParams(_0x34883c);const _0x35efea=extractEntityValues(_0x34883c);_0x35efea&&(_0x220fa5=_0x220fa5?{..._0x35efea,..._0x220fa5}:_0x35efea);!_0x220fa5&&(_0x220fa5={...(_0x33f374=_0x34883c['expressionMap'])===null||_0x33f374===void 0x0?void 0x0:_0x33f374[_0x54f8a9(0x1b5)],...(_0x21ed58=_0x34883c[_0x54f8a9(0x172)])===null||_0x21ed58===void 0x0?void 0x0:_0x21ed58['parameters']});const _0x126d6e=getQueryType(_0x34883c);for(const _0x57921b of((_0x57c325=_0x34883c['expressionMap'])===null||_0x57c325===void 0x0?void 0x0:_0x57c325['aliases'])||[]){if(_0x57921b['type']!=='from'&&_0x57921b[_0x54f8a9(0x192)]!==_0x54f8a9(0x17c)&&_0x57921b['type']!==_0x54f8a9(0x19a))continue;if(!_0x57921b[_0x54f8a9(0x1c4)])continue;const _0x187a64=_0x57921b[_0x54f8a9(0x1c6)];if(!(_0x187a64===null||_0x187a64===void 0x0?void 0x0:_0x187a64[_0x54f8a9(0x187)]))continue;const _0x37dc6a=getShardingMeta(_0x187a64[_0x54f8a9(0x187)]);if(!_0x37dc6a)continue;try{const _0x3ed3fa=await _0x57fe0a['getAsync'](_0x37dc6a['strategy']);if(!_0x3ed3fa)continue;const _0x6d971f=_0x187a64['tableName'],_0x4ff39c=resolveTableName(_0x3ed3fa,_0x6d971f,_0x220fa5,_0x126d6e)||_0x6d971f,_0x47377e={'entity':_0x187a64[_0x54f8a9(0x187)],'baseTableName':_0x6d971f,'dataSource':_0x34883c['connection'],'entityMetadata':_0x187a64,'manager':_0x34883c[_0x54f8a9(0x176)][_0x54f8a9(0x195)]};_0x4ff39c!==_0x6d971f&&await _0x3ed3fa['ensureTableExists'](_0x47377e,_0x4ff39c),await _0x3ed3fa[_0x54f8a9(0x178)](_0x47377e);}catch(_0x3503ec){console[_0x54f8a9(0x181)](_0x54f8a9(0x162),_0x3503ec);}}}const _origGetTableName=typeorm_1[a15_0x2ed71f(0x17f)][a15_0x2ed71f(0x179)][a15_0x2ed71f(0x17b)],_getRawAndEntities=typeorm_1[a15_0x2ed71f(0x155)][a15_0x2ed71f(0x179)][a15_0x2ed71f(0x186)],_getRawMany=typeorm_1[a15_0x2ed71f(0x155)][a15_0x2ed71f(0x179)][a15_0x2ed71f(0x182)],_selectExecute=typeorm_1[a15_0x2ed71f(0x155)][a15_0x2ed71f(0x179)][a15_0x2ed71f(0x1a7)],_insert=typeorm_1[a15_0x2ed71f(0x167)][a15_0x2ed71f(0x179)][a15_0x2ed71f(0x1a7)],_update=typeorm_1[a15_0x2ed71f(0x19d)][a15_0x2ed71f(0x179)]['execute'],_delete=typeorm_1[a15_0x2ed71f(0x1b0)][a15_0x2ed71f(0x179)]['execute'];typeorm_1[a15_0x2ed71f(0x17f)][a15_0x2ed71f(0x179)][a15_0x2ed71f(0x17b)]=function(_0x3920fd){const _0x3306f4=a15_0x2ed71f;return _origGetTableName[_0x3306f4(0x189)](this,getShardingTableNameSync(this,_0x3920fd)||_0x3920fd);},typeorm_1['SelectQueryBuilder']['prototype'][a15_0x2ed71f(0x186)]=async function(){const _0x496f07=a15_0x2ed71f;var _0x2cee8b,_0x3ff862,_0x34f327,_0x52cfc9;await ensureShardingTablesExist(this);const _0x2eabd1=await _getRawAndEntities['call'](this);if(((_0x2cee8b=_0x2eabd1===null||_0x2eabd1===void 0x0?void 0x0:_0x2eabd1['raw'])===null||_0x2cee8b===void 0x0?void 0x0:_0x2cee8b[_0x496f07(0x1b7)])>0x0&&((_0x3ff862=_0x2eabd1===null||_0x2eabd1===void 0x0?void 0x0:_0x2eabd1[_0x496f07(0x191)])===null||_0x3ff862===void 0x0?void 0x0:_0x3ff862['length'])===0x0){const _0x443a33=(_0x52cfc9=(_0x34f327=this[_0x496f07(0x172)])===null||_0x34f327===void 0x0?void 0x0:_0x34f327['mainAlias'])===null||_0x52cfc9===void 0x0?void 0x0:_0x52cfc9['metadata'];if(_0x443a33===null||_0x443a33===void 0x0?void 0x0:_0x443a33[_0x496f07(0x187)]){const _0x29963a=_0x443a33['target'];_0x2eabd1[_0x496f07(0x191)]=_0x2eabd1[_0x496f07(0x1a6)][_0x496f07(0x15c)](_0x441580=>{const _0x55bbc4=_0x496f07,_0x1d3037=new _0x29963a();for(const _0x393412 of _0x443a33[_0x55bbc4(0x1ba)]||[]){const {propertyName:_0x417927,databaseName:_0x56aef7}=_0x393412;if(_0x441580[_0x55bbc4(0x17d)](_0x56aef7))_0x1d3037[_0x417927]=_0x441580[_0x56aef7];else _0x441580[_0x55bbc4(0x17d)](_0x417927)&&(_0x1d3037[_0x417927]=_0x441580[_0x417927]);}return _0x1d3037;});}}return _0x2eabd1;},typeorm_1[a15_0x2ed71f(0x155)][a15_0x2ed71f(0x179)][a15_0x2ed71f(0x182)]=async function(){const _0x5ad4f4=a15_0x2ed71f;return await ensureShardingTablesExist(this),_getRawMany[_0x5ad4f4(0x189)](this);},typeorm_1['SelectQueryBuilder'][a15_0x2ed71f(0x179)]['execute']=async function(){const _0x505352=a15_0x2ed71f;return await ensureShardingTablesExist(this),_selectExecute[_0x505352(0x189)](this);},typeorm_1[a15_0x2ed71f(0x167)][a15_0x2ed71f(0x179)]['execute']=async function(){return await ensureShardingTablesExist(this),_insert['call'](this);},typeorm_1['UpdateQueryBuilder']['prototype'][a15_0x2ed71f(0x1a7)]=async function(){const _0xa5ee91=a15_0x2ed71f;return await ensureShardingTablesExist(this),_update[_0xa5ee91(0x189)](this);},typeorm_1[a15_0x2ed71f(0x1b0)][a15_0x2ed71f(0x179)][a15_0x2ed71f(0x1a7)]=async function(){const _0x789954=a15_0x2ed71f;return await ensureShardingTablesExist(this),_delete[_0x789954(0x189)](this);};function clearTableExistsCache(_0x195e87,_0xf1ef16){const _0x3e3a0=a15_0x2ed71f;var _0x54c500,_0x2637e4;if(_0x195e87&&_0xf1ef16)(_0x54c500=tableExistsCache[_0x3e3a0(0x171)](_0x195e87))===null||_0x54c500===void 0x0?void 0x0:_0x54c500[_0x3e3a0(0x16d)](_0xf1ef16);else{if(_0x195e87)(_0x2637e4=tableExistsCache['get'](_0x195e87))===null||_0x2637e4===void 0x0?void 0x0:_0x2637e4[_0x3e3a0(0x158)]();else tableExistsCache[_0x3e3a0(0x17e)](_0xf8cffd=>_0xf8cffd[_0x3e3a0(0x158)]());}}function a15_0x4019(){const _0x1d2a4f=['Table','columns','entityMetadata','getPreCreateTableNames','44CQtQHx','getCurrentApplicationContext','search','20lwoAbn','clearTableExistsCache','valuesSet','indices','hasMetadata','__esModule','metadata','[Sharding]\x20Failed\x20to\x20create\x20table\x20\x22','createTables','release','FindOperator','matchAll','find','IDEXC','getPrototypeOf','md5','997740GihOBm','not','between','SelectQueryBuilder','ShardingStrategy','isNull','clear','IDCHK','strategy','hasTable','map','15169LfVEdq','typeorm','apply','getOwnMetadata','message','[Sharding]\x20Ensure\x20table\x20exists\x20failed:','wheres','driver','MetadataManager','exclusions','InsertQueryBuilder','getUpdateTableName','./interface','3299472FGgATb','864640poBXDL','slice','delete','startsWith','ensureTableExists','and','get','expressionMap','IDUQ','toString','(((.+)+)+)+$','connection','where','preCreateTables','prototype','string','getTableName','select','hasOwnProperty','forEach','QueryBuilder','15vpJDLV','warn','getRawMany','ENTIFY_SHARDING_KEY','_type','@midwayjs/core','getRawAndEntities','target','createTable','call','baseTableName','hex','uniques','parameters','object','IDFK','[Sharding]\x20Custom\x20createTables\x20failed,\x20fallback\x20to\x20default:','entities','type','digest','condition','manager','1964079yrJbzS','keys','8RmLCQr','name','join','isArray','__shardingParams','UpdateQueryBuilder','tableName','Table\x20\x22','equal','540792YcWjIX','dataSource','defineProperty','checkTableExists','set','raw','execute','createTableFromMetadata','createQueryRunner','631164fLSQkc','has','size','filter','checks','brackets','DeleteQueryBuilder','\x22\x20after\x203\x20retries:\x20','constructor','split','pop','nativeParameters','create','length','findOptions'];a15_0x4019=function(){return _0x1d2a4f;};return a15_0x4019();}
|
package/package.json
CHANGED
|
@@ -1,27 +1,31 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
2
|
+
"name": "@anncic-api/typeorm",
|
|
3
|
+
"version": "4.0.0",
|
|
4
|
+
"main": "./dist/index.js",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist"
|
|
8
|
+
],
|
|
9
|
+
"publishConfig": {
|
|
10
|
+
"access": "public",
|
|
11
|
+
"registry": "https://registry.npmjs.org/"
|
|
12
|
+
},
|
|
13
|
+
"peerDependencies": {
|
|
14
|
+
"@midwayjs/core": "^4.2.6",
|
|
15
|
+
"@midwayjs/typeorm": "^4.2.6",
|
|
16
|
+
"typeorm": "^1.1.2"
|
|
17
|
+
},
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"@midwayjs/core": "^4.2.6",
|
|
20
|
+
"@midwayjs/typeorm": "^4.2.6",
|
|
21
|
+
"@types/node": "20.10.0",
|
|
22
|
+
"javascript-obfuscator": "^4.0.2",
|
|
23
|
+
"typescript": "~5.9.3",
|
|
24
|
+
"typeorm": "^1.1.2"
|
|
25
|
+
},
|
|
26
|
+
"gitHead": "f7d4644d5e0591c4b383021edab6db20d1714880",
|
|
27
|
+
"scripts": {
|
|
28
|
+
"build2": "tsc",
|
|
29
|
+
"build": "tsc && javascript-obfuscator ./dist --output ./dist --config obfuscator.json"
|
|
30
|
+
}
|
|
31
|
+
}
|