@anncic-api/typeorm 1.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.
@@ -0,0 +1,11 @@
1
+ export * from "typeorm";
2
+ export { Repository } from './definition/Repository';
3
+ export { VirtualColumn } from "./decorator/VirtualColumn";
4
+ export { InjectEntity } from './decorator/InjectEntity';
5
+ export { InjectRepository } from './decorator/InjectRepository';
6
+ export { ProvideEntity } from './decorator/ProvideEntity';
7
+ export { ProvideRepository } from './decorator/ProvideRepository';
8
+ export { ProvideSearch, Search } from "./decorator/ProvideSearch";
9
+ export { getDataSourceEntity } from './helper/getDataSourceEntity';
10
+ export { CustomConfiguration as Configuration } from './configuration';
11
+ export { Provide, Inject, Scope, ScopeEnum } from "@midwayjs/decorator";
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ 'use strict';var a12_0x3fb533=a12_0x179c;(function(_0x5adc2d,_0x209ba2){var _0x5f178c=a12_0x179c,_0x58792f=_0x5adc2d();while(!![]){try{var _0x913d3b=-parseInt(_0x5f178c(0x16a))/0x1+parseInt(_0x5f178c(0x167))/0x2*(-parseInt(_0x5f178c(0x150))/0x3)+parseInt(_0x5f178c(0x15b))/0x4*(-parseInt(_0x5f178c(0x151))/0x5)+-parseInt(_0x5f178c(0x16e))/0x6+parseInt(_0x5f178c(0x163))/0x7*(parseInt(_0x5f178c(0x16d))/0x8)+parseInt(_0x5f178c(0x160))/0x9+parseInt(_0x5f178c(0x156))/0xa*(parseInt(_0x5f178c(0x16b))/0xb);if(_0x913d3b===_0x209ba2)break;else _0x58792f['push'](_0x58792f['shift']());}catch(_0x4b09e9){_0x58792f['push'](_0x58792f['shift']());}}}(a12_0xcc9e,0xd8684));var __createBinding=this&&this[a12_0x3fb533(0x164)]||(Object['create']?function(_0x5a8190,_0x14fbf2,_0x52809c,_0xc65b8f){var _0x2fade9=a12_0x3fb533;if(_0xc65b8f===undefined)_0xc65b8f=_0x52809c;var _0xa94950=Object['getOwnPropertyDescriptor'](_0x14fbf2,_0x52809c);(!_0xa94950||(_0x2fade9(0x14e)in _0xa94950?!_0x14fbf2[_0x2fade9(0x170)]:_0xa94950['writable']||_0xa94950[_0x2fade9(0x155)]))&&(_0xa94950={'enumerable':!![],'get':function(){return _0x14fbf2[_0x52809c];}}),Object[_0x2fade9(0x175)](_0x5a8190,_0xc65b8f,_0xa94950);}:function(_0x11b412,_0x1f6913,_0x4dbdbf,_0x47e05c){if(_0x47e05c===undefined)_0x47e05c=_0x4dbdbf;_0x11b412[_0x47e05c]=_0x1f6913[_0x4dbdbf];}),__exportStar=this&&this[a12_0x3fb533(0x162)]||function(_0x192d2f,_0x50a95f){var _0x59f158=a12_0x3fb533;for(var _0x5a6d6b in _0x192d2f)if(_0x5a6d6b!==_0x59f158(0x15f)&&!Object['prototype'][_0x59f158(0x157)][_0x59f158(0x152)](_0x50a95f,_0x5a6d6b))__createBinding(_0x50a95f,_0x192d2f,_0x5a6d6b);};Object['defineProperty'](exports,a12_0x3fb533(0x170),{'value':!![]}),exports[a12_0x3fb533(0x173)]=exports[a12_0x3fb533(0x159)]=exports['Inject']=exports[a12_0x3fb533(0x168)]=exports[a12_0x3fb533(0x16f)]=exports[a12_0x3fb533(0x171)]=exports[a12_0x3fb533(0x154)]=exports['ProvideSearch']=exports[a12_0x3fb533(0x15d)]=exports[a12_0x3fb533(0x161)]=exports[a12_0x3fb533(0x15a)]=exports[a12_0x3fb533(0x165)]=exports['VirtualColumn']=exports[a12_0x3fb533(0x166)]=void 0x0,__exportStar(require(a12_0x3fb533(0x153)),exports);function a12_0x179c(_0x449aab,_0x341dca){var _0xcc9ea2=a12_0xcc9e();return a12_0x179c=function(_0x179cfa,_0x32f64e){_0x179cfa=_0x179cfa-0x14d;var _0xfe761d=_0xcc9ea2[_0x179cfa];return _0xfe761d;},a12_0x179c(_0x449aab,_0x341dca);}var Repository_1=require(a12_0x3fb533(0x174));Object[a12_0x3fb533(0x175)](exports,a12_0x3fb533(0x166),{'enumerable':!![],'get':function(){var _0x5911a1=a12_0x3fb533;return Repository_1[_0x5911a1(0x166)];}});var VirtualColumn_1=require(a12_0x3fb533(0x15e));Object['defineProperty'](exports,a12_0x3fb533(0x158),{'enumerable':!![],'get':function(){var _0x1ef70f=a12_0x3fb533;return VirtualColumn_1[_0x1ef70f(0x158)];}});var InjectEntity_1=require(a12_0x3fb533(0x14f));Object[a12_0x3fb533(0x175)](exports,a12_0x3fb533(0x165),{'enumerable':!![],'get':function(){var _0x4d0528=a12_0x3fb533;return InjectEntity_1[_0x4d0528(0x165)];}});var InjectRepository_1=require('./decorator/InjectRepository');Object[a12_0x3fb533(0x175)](exports,a12_0x3fb533(0x15a),{'enumerable':!![],'get':function(){var _0x4352a7=a12_0x3fb533;return InjectRepository_1[_0x4352a7(0x15a)];}});var ProvideEntity_1=require(a12_0x3fb533(0x15c));Object[a12_0x3fb533(0x175)](exports,'ProvideEntity',{'enumerable':!![],'get':function(){return ProvideEntity_1['ProvideEntity'];}});var ProvideRepository_1=require(a12_0x3fb533(0x172));Object[a12_0x3fb533(0x175)](exports,a12_0x3fb533(0x15d),{'enumerable':!![],'get':function(){var _0x35c709=a12_0x3fb533;return ProvideRepository_1[_0x35c709(0x15d)];}});var ProvideSearch_1=require('./decorator/ProvideSearch');Object[a12_0x3fb533(0x175)](exports,'ProvideSearch',{'enumerable':!![],'get':function(){var _0x4cc4df=a12_0x3fb533;return ProvideSearch_1[_0x4cc4df(0x16c)];}}),Object[a12_0x3fb533(0x175)](exports,a12_0x3fb533(0x154),{'enumerable':!![],'get':function(){var _0x5f4cef=a12_0x3fb533;return ProvideSearch_1[_0x5f4cef(0x154)];}});var getDataSourceEntity_1=require(a12_0x3fb533(0x14d));function a12_0xcc9e(){var _0x188b44=['ScopeEnum','./definition/Repository','defineProperty','./helper/getDataSourceEntity','get','./decorator/InjectEntity','715146AMqZmd','495QYUOPn','call','typeorm','Search','configurable','20360XQYtOl','hasOwnProperty','VirtualColumn','Scope','InjectRepository','10196bJBFud','./decorator/ProvideEntity','ProvideRepository','./decorator/VirtualColumn','default','15319494aVvYLl','ProvideEntity','__exportStar','1318793aSOymA','__createBinding','InjectEntity','Repository','8ShqBsT','Provide','@midwayjs/decorator','1192487MclXYW','2255AkHSeR','ProvideSearch','56FMkRiG','921414MFczmg','Configuration','__esModule','getDataSourceEntity','./decorator/ProvideRepository'];a12_0xcc9e=function(){return _0x188b44;};return a12_0xcc9e();}Object[a12_0x3fb533(0x175)](exports,a12_0x3fb533(0x171),{'enumerable':!![],'get':function(){return getDataSourceEntity_1['getDataSourceEntity'];}});var configuration_1=require('./configuration');Object[a12_0x3fb533(0x175)](exports,a12_0x3fb533(0x16f),{'enumerable':!![],'get':function(){return configuration_1['CustomConfiguration'];}});var decorator_1=require(a12_0x3fb533(0x169));Object[a12_0x3fb533(0x175)](exports,a12_0x3fb533(0x168),{'enumerable':!![],'get':function(){return decorator_1['Provide'];}}),Object['defineProperty'](exports,'Inject',{'enumerable':!![],'get':function(){return decorator_1['Inject'];}}),Object[a12_0x3fb533(0x175)](exports,a12_0x3fb533(0x159),{'enumerable':!![],'get':function(){var _0x5359ec=a12_0x3fb533;return decorator_1[_0x5359ec(0x159)];}}),Object['defineProperty'](exports,a12_0x3fb533(0x173),{'enumerable':!![],'get':function(){var _0x7c4bf6=a12_0x3fb533;return decorator_1[_0x7c4bf6(0x173)];}});
@@ -0,0 +1,31 @@
1
+ import { FindOptionsWhereProperty } from 'typeorm';
2
+ export declare const ENTIFY_KEY = "decorator:anncic-api:typeorm:entify";
3
+ export declare const ENTIFY_MODULE = "decorator:anncic-api:typeorm:entify:module";
4
+ export declare const ENTIFY_MODULE_SOURCE = "decorator:anncic-api:typeorm:entify:module:source";
5
+ export declare const REPOSITORY_KEY = "decorator:anncic-api:typeorm:repository";
6
+ export declare const MODEL_KEY = "decorator:anncic-api:typeorm:model";
7
+ export declare const MODEL_SEARCH_KEY = "decorator:anncic-api:typeorm:model:search";
8
+ export declare const ENTITY_VIRTUAL_COLUMN_KEY = "decorator:anncic-api:typeorm:entity:virtual:column";
9
+ export declare type SearchOperatorOption<Entity> = {
10
+ [P in keyof Entity]?: {
11
+ operator: '=' | '!=' | '<>' | '>' | '>=' | '<' | '<=' | 'LIKE' | 'NOT LIKE';
12
+ condition: FindOptionsWhereProperty<NonNullable<Entity[P]>>;
13
+ } | {
14
+ operator: 'BETWEEN' | 'NOT BETWEEN';
15
+ condition: [FindOptionsWhereProperty<NonNullable<Entity[P]>>, FindOptionsWhereProperty<NonNullable<Entity[P]>>];
16
+ } | {
17
+ operator: 'IN' | 'NOT IN';
18
+ condition: FindOptionsWhereProperty<NonNullable<Entity[P]>>[] | string;
19
+ } | {
20
+ operator: 'FIND IN SET' | 'NOT FIND IN SET';
21
+ condition: number | string;
22
+ } | {
23
+ operator: 'ISNULL' | 'NOT ISNULL';
24
+ };
25
+ };
26
+ export declare class SearchPaginateOption {
27
+ _page?: number;
28
+ _size?: number;
29
+ _order?: string;
30
+ _isreverse?: number;
31
+ }
@@ -0,0 +1 @@
1
+ 'use strict';const a13_0x2a3aed=a13_0x5595;(function(_0x3f55f4,_0x3f008){const _0x186131=a13_0x5595,_0x1fa758=_0x3f55f4();while(!![]){try{const _0x4587ff=-parseInt(_0x186131(0xbe))/0x1*(parseInt(_0x186131(0xc3))/0x2)+-parseInt(_0x186131(0xbf))/0x3+parseInt(_0x186131(0xcc))/0x4+-parseInt(_0x186131(0xb9))/0x5+parseInt(_0x186131(0xbb))/0x6*(-parseInt(_0x186131(0xc6))/0x7)+parseInt(_0x186131(0xcd))/0x8+parseInt(_0x186131(0xc0))/0x9;if(_0x4587ff===_0x3f008)break;else _0x1fa758['push'](_0x1fa758['shift']());}catch(_0x1696f2){_0x1fa758['push'](_0x1fa758['shift']());}}}(a13_0x7ca9,0x4c7b3));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['SearchPaginateOption']=exports[a13_0x2a3aed(0xd4)]=exports[a13_0x2a3aed(0xbd)]=exports[a13_0x2a3aed(0xc4)]=exports[a13_0x2a3aed(0xb8)]=exports[a13_0x2a3aed(0xcb)]=exports[a13_0x2a3aed(0xc7)]=exports[a13_0x2a3aed(0xce)]=void 0x0;function a13_0x7ca9(){const _0x3cddbc=['124788aocaKE','typeorm','MODEL_SEARCH_KEY','2RvMmmU','74643XhhYgu','6819615UaOABN','resolve','decorator:anncic-api:typeorm:model:search','312022eRMsXz','MODEL_KEY','findOne','196qPKmUG','ENTIFY_MODULE','then','decorator:anncic-api:typeorm:model','reject','ENTIFY_MODULE_SOURCE','2374968VZqFJA','1038888TpaVyE','ENTIFY_KEY','findOneOrFail','prototype','decorator:anncic-api:typeorm:entify:module','decorator:anncic-api:typeorm:entify','findOneBy','ENTITY_VIRTUAL_COLUMN_KEY','EntityNotFoundError','findOneByOrFail','EntityManager','decorator:anncic-api:typeorm:repository','REPOSITORY_KEY','1244120tcHTkB','SearchPaginateOption'];a13_0x7ca9=function(){return _0x3cddbc;};return a13_0x7ca9();}const typeorm_1=require(a13_0x2a3aed(0xbc));exports[a13_0x2a3aed(0xce)]=a13_0x2a3aed(0xd2),exports[a13_0x2a3aed(0xc7)]=a13_0x2a3aed(0xd1),exports[a13_0x2a3aed(0xcb)]='decorator:anncic-api:typeorm:entify:module:source',exports[a13_0x2a3aed(0xb8)]=a13_0x2a3aed(0xb7),exports[a13_0x2a3aed(0xc4)]=a13_0x2a3aed(0xc9),exports['MODEL_SEARCH_KEY']=a13_0x2a3aed(0xc2),exports['ENTITY_VIRTUAL_COLUMN_KEY']='decorator:anncic-api:typeorm:entity:virtual:column';class SearchPaginateOption{}function a13_0x5595(_0x20a0e3,_0x96c4ea){const _0x7ca93c=a13_0x7ca9();return a13_0x5595=function(_0x5595ce,_0x4e061c){_0x5595ce=_0x5595ce-0xb5;let _0x46b3e2=_0x7ca93c[_0x5595ce];return _0x46b3e2;},a13_0x5595(_0x20a0e3,_0x96c4ea);}exports[a13_0x2a3aed(0xba)]=SearchPaginateOption,typeorm_1['EntityManager'][a13_0x2a3aed(0xd0)][a13_0x2a3aed(0xcf)]=async function(_0x549c5d,_0x5b2b74){const _0x47b521=a13_0x2a3aed;return this[_0x47b521(0xc5)](_0x549c5d,_0x5b2b74)[_0x47b521(0xc8)](_0x227f2e=>{const _0x519824=_0x47b521;if(_0x227f2e===null||_0x227f2e===undefined)return Promise[_0x519824(0xca)](new typeorm_1[(_0x519824(0xd5))](_0x549c5d,_0x5b2b74));return Promise['resolve'](_0x227f2e);});},typeorm_1[a13_0x2a3aed(0xb6)]['prototype'][a13_0x2a3aed(0xb5)]=async function(_0x13d4ee,_0x58e7fd){const _0x577cd8=a13_0x2a3aed;return this[_0x577cd8(0xd3)](_0x13d4ee,_0x58e7fd)[_0x577cd8(0xc8)](_0x49ee5f=>{const _0x2a6927=_0x577cd8;if(_0x49ee5f===null||_0x49ee5f===undefined)return Promise['reject'](new typeorm_1[(_0x2a6927(0xd5))](_0x13d4ee,_0x58e7fd));return Promise[_0x2a6927(0xc1)](_0x49ee5f);});};
package/package.json ADDED
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "@anncic-api/typeorm",
3
+ "version": "1.0.0",
4
+ "main": "./dist/index.js",
5
+ "license": "MIT",
6
+ "files": [
7
+ "dist"
8
+ ],
9
+ "publishConfig": {
10
+ "access": "public"
11
+ },
12
+ "scripts": {
13
+ "build2": "tsc",
14
+ "build": "tsc && javascript-obfuscator ./dist --output ./dist --config obfuscator.json"
15
+ },
16
+ "dependencies": {
17
+ "@midwayjs/typeorm": "^3.4.9",
18
+ "typeorm": "^0.3.7"
19
+ },
20
+ "devDependencies": {
21
+ "@types/node": "^18.6.5",
22
+ "javascript-obfuscator": "2.19.0",
23
+ "typescript": "^4.7.4"
24
+ },
25
+ "gitHead": "7ff678034cf770526c4bb8b6694e56ead6d7f6b2"
26
+ }