anncic-apihelper 3.7.18 → 3.7.20
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 +6 -6
- package/dist/configuration.js +1 -1
- package/dist/helper.d.ts +2 -2
- package/dist/helper.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/service/ApicreateService.d.ts +15 -15
- package/dist/service/ApicreateService.js +1 -1
- package/dist/templateFun/Action.d.ts +10 -10
- package/dist/templateFun/Action.js +1 -1
- package/dist/templateFun/Common.d.ts +7 -7
- package/dist/templateFun/Common.js +1 -1
- package/dist/templateFun/Entities.d.ts +11 -11
- package/dist/templateFun/Entities.js +1 -1
- package/dist/templateFun/Event.d.ts +7 -7
- package/dist/templateFun/Event.js +1 -1
- package/dist/templateFun/Handler.d.ts +9 -9
- package/dist/templateFun/Handler.js +1 -1
- package/dist/templateFun/Search.d.ts +7 -7
- package/dist/templateFun/Search.js +1 -1
- package/dist/templateFun/Validator.d.ts +11 -11
- package/dist/templateFun/Validator.js +1 -1
- package/dist/templateVue/Api.d.ts +9 -9
- package/dist/templateVue/Api.js +1 -1
- package/dist/templateVue/Layout.d.ts +7 -7
- package/dist/templateVue/Layout.js +1 -1
- package/dist/templateVue/LayoutVue.d.ts +10 -10
- package/dist/templateVue/LayoutVue.js +1 -1
- package/dist/templateVue/Router.d.ts +8 -8
- package/dist/templateVue/Router.js +1 -1
- package/dist/templateVue/Validator.d.ts +10 -10
- package/dist/templateVue/Validator.js +1 -1
- package/dist/templateVueV2/Api.d.ts +9 -9
- package/dist/templateVueV2/Api.js +1 -1
- package/dist/templateVueV2/Layout.d.ts +7 -7
- package/dist/templateVueV2/Layout.js +1 -1
- package/dist/templateVueV2/LayoutVue.d.ts +10 -10
- package/dist/templateVueV2/LayoutVue.js +1 -1
- package/dist/templateVueV2/Router.d.ts +8 -8
- package/dist/templateVueV2/Router.js +1 -1
- package/dist/templateVueV2/Validator.d.ts +8 -8
- package/dist/templateVueV2/Validator.js +1 -1
- package/dist/templateVueV3/Api.d.ts +9 -9
- package/dist/templateVueV3/Api.js +1 -1
- package/dist/templateVueV3/Layout.d.ts +8 -8
- package/dist/templateVueV3/Layout.js +1 -1
- package/dist/templateVueV3/LayoutVue.d.ts +11 -11
- package/dist/templateVueV3/LayoutVue.js +1 -1
- package/dist/templateVueV3/Router.d.ts +8 -8
- package/dist/templateVueV3/Router.js +1 -1
- package/dist/templateVueV3/Validator.d.ts +8 -8
- package/dist/templateVueV3/Validator.js +1 -1
- package/dist/types/index.d.ts +18 -18
- package/dist/types/index.js +1 -1
- package/package.json +4 -4
package/dist/configuration.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { MidwayApplicationManager, MidwayConfigService, MidwayDecoratorService } from '@midwayjs/core';
|
|
2
|
-
export declare class CustomConfiguration {
|
|
3
|
-
config: MidwayConfigService;
|
|
4
|
-
decorator: MidwayDecoratorService;
|
|
5
|
-
application: MidwayApplicationManager;
|
|
6
|
-
}
|
|
1
|
+
import { MidwayApplicationManager, MidwayConfigService, MidwayDecoratorService } from '@midwayjs/core';
|
|
2
|
+
export declare class CustomConfiguration {
|
|
3
|
+
config: MidwayConfigService;
|
|
4
|
+
decorator: MidwayDecoratorService;
|
|
5
|
+
application: MidwayApplicationManager;
|
|
6
|
+
}
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
function a0_0x3ffc(){var _0x3727c7=['2215125IockHh','4870224xJyFmF','decorate','@anncic-api/typeorm','__decorate','config','function','length','toString','297692GXbXRR','3986536QylZSc','__metadata','prototype','(((.+)+)+)+$','MidwayApplicationManager','decorator','anncic-apihelper','object','MidwayDecoratorService','design:type','search','__esModule','Inject','@midwayjs/core','781614AvSgVE','getOwnPropertyDescriptor','3roExXh','apply','393828qPftNj','CustomConfiguration','1478876IELokO','6acgNcz','constructor','defineProperty','metadata','application'];a0_0x3ffc=function(){return _0x3727c7;};return a0_0x3ffc();}function a0_0x4b80(_0x1e02bc,_0x4e1183){var _0x451fae=a0_0x3ffc();return a0_0x4b80=function(_0x1787ea,_0x32fd24){_0x1787ea=_0x1787ea-0xe5;var _0x3ffcd1=_0x451fae[_0x1787ea];return _0x3ffcd1;},a0_0x4b80(_0x1e02bc,_0x4e1183);}var a0_0x24816b=a0_0x4b80;(function(_0x380ed1,_0x575d65){var _0x3978c7=a0_0x4b80,_0x1abb22=_0x380ed1();while(!![]){try{var _0x3661ca=-parseInt(_0x3978c7(0xe9))/0x1+parseInt(_0x3978c7(0xf8))/0x2+-parseInt(_0x3978c7(0xfa))/0x3*(-parseInt(_0x3978c7(0xfc))/0x4)+parseInt(_0x3978c7(0x104))/0x5+parseInt(_0x3978c7(0xff))/0x6*(-parseInt(_0x3978c7(0xfe))/0x7)+parseInt(_0x3978c7(0xea))/0x8+-parseInt(_0x3978c7(0x105))/0x9;if(_0x3661ca===_0x575d65)break;else _0x1abb22['push'](_0x1abb22['shift']());}catch(_0x59746a){_0x1abb22['push'](_0x1abb22['shift']());}}}(a0_0x3ffc,0x5ce5e));var a0_0x32fd24=(function(){var _0x3ffbe4=!![];return function(_0x453c18,_0xdcf7aa){var _0x4ba117=_0x3ffbe4?function(){var _0x4f9d56=a0_0x4b80;if(_0xdcf7aa){var _0x501643=_0xdcf7aa[_0x4f9d56(0xfb)](_0x453c18,arguments);return _0xdcf7aa=null,_0x501643;}}:function(){};return _0x3ffbe4=![],_0x4ba117;};}()),a0_0x1787ea=a0_0x32fd24(this,function(){var _0xab10f2=a0_0x4b80;return a0_0x1787ea[_0xab10f2(0xe8)]()[_0xab10f2(0xf4)](_0xab10f2(0xed))[_0xab10f2(0xe8)]()[_0xab10f2(0x100)](a0_0x1787ea)[_0xab10f2(0xf4)]('(((.+)+)+)+$');});a0_0x1787ea();'use strict';var __decorate=this&&this[a0_0x24816b(0x108)]||function(_0x2c4042,_0x4e53b1,_0x49273c,_0x5c3a27){var _0x2f5e7c=a0_0x24816b,_0x4df075=arguments['length'],_0x4e233b=_0x4df075<0x3?_0x4e53b1:_0x5c3a27===null?_0x5c3a27=Object[_0x2f5e7c(0xf9)](_0x4e53b1,_0x49273c):_0x5c3a27,_0x4e2925;if(typeof Reflect===_0x2f5e7c(0xf1)&&typeof Reflect[_0x2f5e7c(0x106)]===_0x2f5e7c(0xe6))_0x4e233b=Reflect[_0x2f5e7c(0x106)](_0x2c4042,_0x4e53b1,_0x49273c,_0x5c3a27);else{for(var _0x58b000=_0x2c4042[_0x2f5e7c(0xe7)]-0x1;_0x58b000>=0x0;_0x58b000--)if(_0x4e2925=_0x2c4042[_0x58b000])_0x4e233b=(_0x4df075<0x3?_0x4e2925(_0x4e233b):_0x4df075>0x3?_0x4e2925(_0x4e53b1,_0x49273c,_0x4e233b):_0x4e2925(_0x4e53b1,_0x49273c))||_0x4e233b;}return _0x4df075>0x3&&_0x4e233b&&Object[_0x2f5e7c(0x101)](_0x4e53b1,_0x49273c,_0x4e233b),_0x4e233b;},__metadata=this&&this[a0_0x24816b(0xeb)]||function(_0x31ada4,_0x353882){var _0x55b3e2=a0_0x24816b;if(typeof Reflect===_0x55b3e2(0xf1)&&typeof Reflect[_0x55b3e2(0x102)]===_0x55b3e2(0xe6))return Reflect[_0x55b3e2(0x102)](_0x31ada4,_0x353882);};Object[a0_0x24816b(0x101)](exports,a0_0x24816b(0xf5),{'value':!![]}),exports[a0_0x24816b(0xfd)]=void 0x0;const core_1=require(a0_0x24816b(0xf7)),core_2=require(a0_0x24816b(0xf7)),typeorm=require(a0_0x24816b(0x107));let CustomConfiguration=class CustomConfiguration{};__decorate([(0x0,core_1[a0_0x24816b(0xf6)])(),__metadata(a0_0x24816b(0xf3),core_2['MidwayConfigService'])],CustomConfiguration[a0_0x24816b(0xec)],a0_0x24816b(0xe5),void 0x0),__decorate([(0x0,core_1[a0_0x24816b(0xf6)])(),__metadata('design:type',core_2[a0_0x24816b(0xf2)])],CustomConfiguration[a0_0x24816b(0xec)],a0_0x24816b(0xef),void 0x0),__decorate([(0x0,core_1[a0_0x24816b(0xf6)])(),__metadata(a0_0x24816b(0xf3),core_2[a0_0x24816b(0xee)])],CustomConfiguration['prototype'],a0_0x24816b(0x103),void 0x0),CustomConfiguration=__decorate([(0x0,core_1['Configuration'])({'conflictCheck':![],'imports':[typeorm],'namespace':a0_0x24816b(0xf0)})],CustomConfiguration),exports[a0_0x24816b(0xfd)]=CustomConfiguration;
|
package/dist/helper.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function getProp(type: string): string;
|
|
2
|
-
export declare function getEnum(type: string): Array<string>;
|
|
1
|
+
export declare function getProp(type: string): string;
|
|
2
|
+
export declare function getEnum(type: string): Array<string>;
|
package/dist/helper.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a1_0x1952(){const _0x36de63=['enum','text','(((.+)+)+)+$','search','413gwbMCY','346885oKQPDq','apply','indexOf','replace','1689246iiqYiU','date','707670NxveOw','26888NifLwv','3307419mFBqGv','hasOwnProperty','defineProperty','substr','json','string','tinyint','21gUoVtE','decimal','15044UYWLLl','52222AsQnWc','__esModule','timestamp','getProp','datetime','getEnum','constructor','split','float'];a1_0x1952=function(){return _0x36de63;};return a1_0x1952();}const a1_0x40070f=a1_0x330f;(function(_0xedd2c2,_0x34b6f4){const _0x1d5aef=a1_0x330f,_0x3c6a32=_0xedd2c2();while(!![]){try{const _0x47a877=-parseInt(_0x1d5aef(0x117))/0x1+parseInt(_0x1d5aef(0x129))/0x2*(-parseInt(_0x1d5aef(0x126))/0x3)+parseInt(_0x1d5aef(0x128))/0x4+-parseInt(_0x1d5aef(0x11d))/0x5+parseInt(_0x1d5aef(0x11b))/0x6+parseInt(_0x1d5aef(0x116))/0x7*(parseInt(_0x1d5aef(0x11e))/0x8)+parseInt(_0x1d5aef(0x11f))/0x9;if(_0x47a877===_0x34b6f4)break;else _0x3c6a32['push'](_0x3c6a32['shift']());}catch(_0x1b4c5d){_0x3c6a32['push'](_0x3c6a32['shift']());}}}(a1_0x1952,0x2beb8));const a1_0x386035=(function(){let _0x5e2679=!![];return function(_0x194b83,_0x2bd5d0){const _0xfd6f72=_0x5e2679?function(){const _0x50dac3=a1_0x330f;if(_0x2bd5d0){const _0x17aa93=_0x2bd5d0[_0x50dac3(0x118)](_0x194b83,arguments);return _0x2bd5d0=null,_0x17aa93;}}:function(){};return _0x5e2679=![],_0xfd6f72;};}()),a1_0x20b84c=a1_0x386035(this,function(){const _0x2fce8a=a1_0x330f;return a1_0x20b84c['toString']()[_0x2fce8a(0x135)](_0x2fce8a(0x134))['toString']()[_0x2fce8a(0x12f)](a1_0x20b84c)[_0x2fce8a(0x135)](_0x2fce8a(0x134));});a1_0x20b84c();'use strict';function a1_0x330f(_0x34667c,_0x2396be){const _0x10bcc6=a1_0x1952();return a1_0x330f=function(_0x20b84c,_0x386035){_0x20b84c=_0x20b84c-0x116;let _0x1952b3=_0x10bcc6[_0x20b84c];return _0x1952b3;},a1_0x330f(_0x34667c,_0x2396be);}Object[a1_0x40070f(0x121)](exports,a1_0x40070f(0x12a),{'value':!![]}),exports[a1_0x40070f(0x12e)]=exports['getProp']=void 0x0;const columnTypes={'json':a1_0x40070f(0x123),'char':'string','varchar':a1_0x40070f(0x124),'text':a1_0x40070f(0x133),'longtext':'longtext','mediumtext':'mediumtext','int':'number','float':'float','double':a1_0x40070f(0x131),'decimal':a1_0x40070f(0x127),'date':a1_0x40070f(0x11c),'time':a1_0x40070f(0x12d),'datetime':a1_0x40070f(0x12d),'timestamp':a1_0x40070f(0x12b),'tinyint':a1_0x40070f(0x125)};function getProp(_0x3ae7c0){const _0x4a3cbf=a1_0x40070f;if(columnTypes[_0x4a3cbf(0x120)](_0x3ae7c0))return columnTypes[_0x3ae7c0];else return _0x3ae7c0[_0x4a3cbf(0x119)]('(')>-0x1||_0x3ae7c0[_0x4a3cbf(0x119)]('\x20')>-0x1?(_0x3ae7c0=_0x3ae7c0[_0x4a3cbf(0x122)](0x0,_0x3ae7c0[_0x4a3cbf(0x119)]('(')>-0x1?_0x3ae7c0[_0x4a3cbf(0x119)]('('):_0x3ae7c0[_0x4a3cbf(0x119)]('\x20')),columnTypes[_0x3ae7c0]||_0x3ae7c0):'string';}exports[a1_0x40070f(0x12c)]=getProp;function getEnum(_0x2af330){const _0x397e66=a1_0x40070f;if(getProp(_0x2af330)==_0x397e66(0x132))return _0x2af330[_0x397e66(0x122)](0x5,_0x2af330['length']-0x6)[_0x397e66(0x11a)](/[\'|\"]/g,'')[_0x397e66(0x130)](',');return[];}exports[a1_0x40070f(0x12e)]=getEnum;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { ApicreateService } from './service/ApicreateService';
|
|
2
|
-
export { CustomConfiguration as Configuration } from './configuration';
|
|
1
|
+
export { ApicreateService } from './service/ApicreateService';
|
|
2
|
+
export { CustomConfiguration as Configuration } from './configuration';
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a2_0xb93ad9=a2_0x5582;(function(_0xc3d45c,_0x65f236){var _0x31babe=a2_0x5582,_0x1f6a75=_0xc3d45c();while(!![]){try{var _0x59ef70=-parseInt(_0x31babe(0x1b5))/0x1+-parseInt(_0x31babe(0x1af))/0x2*(parseInt(_0x31babe(0x1b8))/0x3)+-parseInt(_0x31babe(0x1bd))/0x4*(parseInt(_0x31babe(0x1b9))/0x5)+-parseInt(_0x31babe(0x1b2))/0x6*(-parseInt(_0x31babe(0x1bc))/0x7)+-parseInt(_0x31babe(0x1ae))/0x8*(-parseInt(_0x31babe(0x1ab))/0x9)+-parseInt(_0x31babe(0x1b6))/0xa*(parseInt(_0x31babe(0x1b0))/0xb)+-parseInt(_0x31babe(0x1ac))/0xc*(-parseInt(_0x31babe(0x1ba))/0xd);if(_0x59ef70===_0x65f236)break;else _0x1f6a75['push'](_0x1f6a75['shift']());}catch(_0xd1848f){_0x1f6a75['push'](_0x1f6a75['shift']());}}}(a2_0x5243,0x45234));var a2_0x2db824=(function(){var _0x5b0ae3=!![];return function(_0x5c364a,_0xdceb1){var _0x3c42db=_0x5b0ae3?function(){var _0x19f476=a2_0x5582;if(_0xdceb1){var _0x29af11=_0xdceb1[_0x19f476(0x1ad)](_0x5c364a,arguments);return _0xdceb1=null,_0x29af11;}}:function(){};return _0x5b0ae3=![],_0x3c42db;};}()),a2_0x575379=a2_0x2db824(this,function(){var _0x100892=a2_0x5582;return a2_0x575379[_0x100892(0x1b4)]()[_0x100892(0x1bf)](_0x100892(0x1b3))[_0x100892(0x1b4)]()[_0x100892(0x1c0)](a2_0x575379)[_0x100892(0x1bf)](_0x100892(0x1b3));});a2_0x575379();'use strict';function a2_0x5582(_0x2bd9e4,_0xe0eb4e){var _0x6b9f5b=a2_0x5243();return a2_0x5582=function(_0x575379,_0x2db824){_0x575379=_0x575379-0x1ab;var _0x52437a=_0x6b9f5b[_0x575379];return _0x52437a;},a2_0x5582(_0x2bd9e4,_0xe0eb4e);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[a2_0xb93ad9(0x1bb)]=exports['ApicreateService']=void 0x0;var ApicreateService_1=require(a2_0xb93ad9(0x1be));function a2_0x5243(){var _0x4919a2=['370894PGSEDE','5445fPuUFL','ApicreateService','21438YqFNNM','(((.+)+)+)+$','toString','448872hJGOfx','5140EcVqSP','defineProperty','9hyJzJw','2995iyDZRV','13YLFBBK','Configuration','413gOkCDk','1316tNJtHt','./service/ApicreateService','search','constructor','25002HZNLsE','12448668lDWXqJ','apply','1416lMTRkq'];a2_0x5243=function(){return _0x4919a2;};return a2_0x5243();}Object[a2_0xb93ad9(0x1b7)](exports,a2_0xb93ad9(0x1b1),{'enumerable':!![],'get':function(){var _0x4e05e7=a2_0xb93ad9;return ApicreateService_1[_0x4e05e7(0x1b1)];}});var configuration_1=require('./configuration');Object[a2_0xb93ad9(0x1b7)](exports,'Configuration',{'enumerable':!![],'get':function(){return configuration_1['CustomConfiguration'];}});
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { MidwayEnvironmentService } from '@midwayjs/core';
|
|
2
|
-
import { TypeORMDataSourceManager } from '@midwayjs/typeorm';
|
|
3
|
-
import { IApicreate, IApicreateApp, IApicreateBasic, IApicreatePlugin } from '../types';
|
|
4
|
-
export declare class ApicreateService {
|
|
5
|
-
protected app: any;
|
|
6
|
-
protected config: any;
|
|
7
|
-
environment: MidwayEnvironmentService;
|
|
8
|
-
dataSourceManager: TypeORMDataSourceManager;
|
|
9
|
-
createApp(option: IApicreate): Promise<string>;
|
|
10
|
-
createBasic(option: IApicreate): Promise<string>;
|
|
11
|
-
createPlugin(option: IApicreate): Promise<string>;
|
|
12
|
-
protected createAction(option?: IApicreateApp & IApicreateBasic & IApicreatePlugin): Promise<string>;
|
|
13
|
-
protected checkOption(option: IApicreate): Promise<boolean>;
|
|
14
|
-
protected CreateModuleConfig(CreateOption: any): Promise<void>;
|
|
15
|
-
}
|
|
1
|
+
import { MidwayEnvironmentService } from '@midwayjs/core';
|
|
2
|
+
import { TypeORMDataSourceManager } from '@midwayjs/typeorm';
|
|
3
|
+
import { IApicreate, IApicreateApp, IApicreateBasic, IApicreatePlugin } from '../types';
|
|
4
|
+
export declare class ApicreateService {
|
|
5
|
+
protected app: any;
|
|
6
|
+
protected config: any;
|
|
7
|
+
environment: MidwayEnvironmentService;
|
|
8
|
+
dataSourceManager: TypeORMDataSourceManager;
|
|
9
|
+
createApp(option: IApicreate): Promise<string>;
|
|
10
|
+
createBasic(option: IApicreate): Promise<string>;
|
|
11
|
+
createPlugin(option: IApicreate): Promise<string>;
|
|
12
|
+
protected createAction(option?: IApicreateApp & IApicreateBasic & IApicreatePlugin): Promise<string>;
|
|
13
|
+
protected checkOption(option: IApicreate): Promise<boolean>;
|
|
14
|
+
protected CreateModuleConfig(CreateOption: any): Promise<void>;
|
|
15
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a3_0x2ae557=a3_0xeb36;(function(_0x2ffbe8,_0x434c81){const _0x1ddec6=a3_0xeb36,_0x39e6d2=_0x2ffbe8();while(!![]){try{const _0x4289f3=parseInt(_0x1ddec6(0x156))/0x1+-parseInt(_0x1ddec6(0x13b))/0x2*(-parseInt(_0x1ddec6(0x124))/0x3)+-parseInt(_0x1ddec6(0x11d))/0x4+parseInt(_0x1ddec6(0x155))/0x5*(-parseInt(_0x1ddec6(0x106))/0x6)+parseInt(_0x1ddec6(0x121))/0x7+parseInt(_0x1ddec6(0x11e))/0x8+-parseInt(_0x1ddec6(0x133))/0x9;if(_0x4289f3===_0x434c81)break;else _0x39e6d2['push'](_0x39e6d2['shift']());}catch(_0x2a623f){_0x39e6d2['push'](_0x39e6d2['shift']());}}}(a3_0x59a7,0xce7d3));const a3_0x4f303d=(function(){let _0x3ac9ce=!![];return function(_0x245a9d,_0x12028f){const _0x4e42de=_0x3ac9ce?function(){const _0x55c60b=a3_0xeb36;if(_0x12028f){const _0xe1794d=_0x12028f[_0x55c60b(0xf2)](_0x245a9d,arguments);return _0x12028f=null,_0xe1794d;}}:function(){};return _0x3ac9ce=![],_0x4e42de;};}()),a3_0x7e0bf7=a3_0x4f303d(this,function(){const _0x12662d=a3_0xeb36;return a3_0x7e0bf7['toString']()['search']('(((.+)+)+)+$')['toString']()[_0x12662d(0x10d)](a3_0x7e0bf7)[_0x12662d(0x104)](_0x12662d(0xff));});function a3_0xeb36(_0x5ad49a,_0xa057e4){const _0x44572f=a3_0x59a7();return a3_0xeb36=function(_0x7e0bf7,_0x4f303d){_0x7e0bf7=_0x7e0bf7-0xe6;let _0x59a7ee=_0x44572f[_0x7e0bf7];return _0x59a7ee;},a3_0xeb36(_0x5ad49a,_0xa057e4);}a3_0x7e0bf7();'use strict';var __decorate=this&&this[a3_0x2ae557(0x158)]||function(_0x4e05e1,_0x9b4a32,_0x3552a6,_0xb5b98f){const _0x5b85f1=a3_0x2ae557;var _0x1c69d5=arguments[_0x5b85f1(0xfa)],_0x2f5302=_0x1c69d5<0x3?_0x9b4a32:_0xb5b98f===null?_0xb5b98f=Object[_0x5b85f1(0x15a)](_0x9b4a32,_0x3552a6):_0xb5b98f,_0x5d3338;if(typeof Reflect===_0x5b85f1(0xf8)&&typeof Reflect[_0x5b85f1(0x164)]===_0x5b85f1(0xf4))_0x2f5302=Reflect['decorate'](_0x4e05e1,_0x9b4a32,_0x3552a6,_0xb5b98f);else{for(var _0x17f516=_0x4e05e1['length']-0x1;_0x17f516>=0x0;_0x17f516--)if(_0x5d3338=_0x4e05e1[_0x17f516])_0x2f5302=(_0x1c69d5<0x3?_0x5d3338(_0x2f5302):_0x1c69d5>0x3?_0x5d3338(_0x9b4a32,_0x3552a6,_0x2f5302):_0x5d3338(_0x9b4a32,_0x3552a6))||_0x2f5302;}return _0x1c69d5>0x3&&_0x2f5302&&Object['defineProperty'](_0x9b4a32,_0x3552a6,_0x2f5302),_0x2f5302;},__metadata=this&&this[a3_0x2ae557(0x10a)]||function(_0x4324d4,_0x1b8c02){const _0x4bb989=a3_0x2ae557;if(typeof Reflect===_0x4bb989(0xf8)&&typeof Reflect[_0x4bb989(0xf5)]===_0x4bb989(0xf4))return Reflect['metadata'](_0x4324d4,_0x1b8c02);};Object[a3_0x2ae557(0x15e)](exports,a3_0x2ae557(0x160),{'value':!![]}),exports[a3_0x2ae557(0x13d)]=void 0x0;const fs=require('fs'),path=require(a3_0x2ae557(0x115)),core_1=require('@midwayjs/core'),typeorm_1=require(a3_0x2ae557(0xfc)),core_2=require(a3_0x2ae557(0x123)),Common_1=require(a3_0x2ae557(0x163)),Event_1=require(a3_0x2ae557(0x150)),Search_1=require(a3_0x2ae557(0x107)),Entities_1=require(a3_0x2ae557(0x144)),Handler_1=require(a3_0x2ae557(0x14c)),Validator_1=require('../templateFun/Validator'),Action_1=require('../templateFun/Action'),Api_1=require(a3_0x2ae557(0x149)),Router_1=require('../templateVue/Router'),Layout_1=require(a3_0x2ae557(0xe6)),LayoutVue_1=require(a3_0x2ae557(0xef)),Validator_2=require(a3_0x2ae557(0x128)),Api_2=require(a3_0x2ae557(0x12d)),Router_2=require(a3_0x2ae557(0x122)),Layout_2=require(a3_0x2ae557(0x15d)),LayoutVue_2=require(a3_0x2ae557(0x154)),Validator_3=require(a3_0x2ae557(0x127)),Api_3=require(a3_0x2ae557(0x140)),Router_3=require(a3_0x2ae557(0x10e)),Layout_3=require(a3_0x2ae557(0x129)),LayoutVue_3=require(a3_0x2ae557(0x165)),Validator_4=require(a3_0x2ae557(0xe8));let ApicreateService=class ApicreateService{async[a3_0x2ae557(0x12b)](_0xe81382){const _0x313b79=a3_0x2ae557;return await this[_0x313b79(0x15c)](_0xe81382),await this[_0x313b79(0xec)]({..._0xe81382,'apporbasic':_0x313b79(0x13e)});}async[a3_0x2ae557(0x13c)](_0x3c4476){const _0xadf1b8=a3_0x2ae557;return await this['checkOption'](_0x3c4476),await this['createAction']({..._0x3c4476,'apporbasic':_0xadf1b8(0x157)});}async[a3_0x2ae557(0xf9)](_0x3c5e39){const _0x5c13f5=a3_0x2ae557;return await this[_0x5c13f5(0x15c)](_0x3c5e39),await this[_0x5c13f5(0xec)]({..._0x3c5e39,'module':!![]});}async[a3_0x2ae557(0xec)](_0x573296){const _0xa9656d=a3_0x2ae557;var _0x3e00ee,_0x2add63;!_0x573296[_0xa9656d(0x135)]&&(_0x573296['connection']=_0xa9656d(0x15f));!_0x573296[_0xa9656d(0xf6)]&&(_0x573296[_0xa9656d(0xf6)]=_0xa9656d(0x13e));const _0x16a779=this['app'][_0xa9656d(0x137)](),_0x2dde0c=this['dataSourceManager']['getDataSource'](_0x573296['connection']),_0x514895=await _0x2dde0c[_0xa9656d(0x110)]('SELECT\x20TABLE_NAME\x20as\x20`table`\x20FROM\x20information_schema.TABLES\x20WHERE\x20TABLE_SCHEMA=\x22'+this[_0xa9656d(0x132)][_0xa9656d(0x102)][_0x573296[_0xa9656d(0x135)]][_0xa9656d(0x111)]+_0xa9656d(0x112)+((_0x573296===null||_0x573296===void 0x0?void 0x0:_0x573296[_0xa9656d(0x14b)])?'=\x20\x22'+_0x573296[_0xa9656d(0x14b)]+'\x22':_0xa9656d(0x15b)+(_0x573296['tableprefix']||'')+'%\x22'))||[];for(let _0xfd0f93=0x0;_0xfd0f93<_0x514895[_0xa9656d(0xfa)];_0xfd0f93++){const _0x38c5c7=_0x514895[_0xfd0f93]['table'];if((_0x573296===null||_0x573296===void 0x0?void 0x0:_0x573296[_0xa9656d(0x14b)])&&(_0x573296===null||_0x573296===void 0x0?void 0x0:_0x573296[_0xa9656d(0x14b)])!=_0x38c5c7)continue;if((_0x573296===null||_0x573296===void 0x0?void 0x0:_0x573296[_0xa9656d(0x130)])&&!(_0x38c5c7===null||_0x38c5c7===void 0x0?void 0x0:_0x38c5c7['startsWith'](_0x573296[_0xa9656d(0x130)])))continue;const _0x2048d3=await _0x2dde0c['query']('SELECT\x20TABLE_COMMENT\x20as\x20`comment`\x20FROM\x20information_schema.TABLES\x20WHERE\x20TABLE_SCHEMA=\x22'+this[_0xa9656d(0x132)][_0xa9656d(0x102)][_0x573296['connection']]['database']+_0xa9656d(0x119)+_0x38c5c7+'\x27')||[];if((_0x3e00ee=_0x2048d3[0x0])===null||_0x3e00ee===void 0x0?void 0x0:_0x3e00ee['comment']){const _0x50706b={'tablename':_0x38c5c7,'Primary':{},'Fields':{},'Comment':(_0x2add63=_0x2048d3[0x0])===null||_0x2add63===void 0x0?void 0x0:_0x2add63['comment'],'vuedialog':_0x573296['vuedialog'],'apporbasic':_0x573296[_0xa9656d(0xf6)]};_0x50706b[_0xa9656d(0x10c)]=_0x38c5c7['substr']((_0x573296===null||_0x573296===void 0x0?void 0x0:_0x573296[_0xa9656d(0x152)])||0x0,_0x38c5c7['length']),_0x50706b[_0xa9656d(0xea)]=(_0x573296===null||_0x573296===void 0x0?void 0x0:_0x573296[_0xa9656d(0x153)])?_0x16a779+'/apps/'+_0x50706b['tablestart'][_0xa9656d(0xfd)]('_')[0x0][_0xa9656d(0x12e)]():_0x16a779+'/'+_0x573296[_0xa9656d(0xf6)];const _0x3c8239=_0x50706b[_0xa9656d(0x10c)][_0xa9656d(0xfd)]('_')[_0xa9656d(0x141)](_0x2b5715=>_0x2b5715&&_0x2b5715['trim']());(_0x573296===null||_0x573296===void 0x0?void 0x0:_0x573296[_0xa9656d(0x153)])&&(await this[_0xa9656d(0x118)](_0x50706b),_0x50706b[_0xa9656d(0xf1)]=_0x3c8239[0x0][_0xa9656d(0x12e)]());_0x50706b[_0xa9656d(0xfb)]=_0x3c8239[_0xa9656d(0x125)](_0xbbfc4=>_0xbbfc4[_0xa9656d(0x12e)]())['join'](''),_0x50706b[_0xa9656d(0x13f)]=_0x3c8239[_0xa9656d(0x125)](_0x3f1625=>''+_0x3f1625[_0xa9656d(0x131)](0x0,0x1)[_0xa9656d(0x138)]()+_0x3f1625['substring'](0x1)[_0xa9656d(0x12e)]())['join']('');(_0x50706b===null||_0x50706b===void 0x0?void 0x0:_0x50706b[_0xa9656d(0xf1)])&&_0x3c8239[_0xa9656d(0xfa)]>0x1&&_0x3c8239[0x0][_0xa9656d(0x12e)]()==_0x50706b[_0xa9656d(0xf1)]?(_0x50706b[_0xa9656d(0x139)]=_0x50706b['tablestartUp'][_0xa9656d(0x131)](_0x50706b[_0xa9656d(0xf1)]['length'],_0x50706b[_0xa9656d(0x13f)][_0xa9656d(0xfa)]),_0x50706b[_0xa9656d(0x114)]=_0x50706b[_0xa9656d(0xfb)][_0xa9656d(0x131)](_0x50706b[_0xa9656d(0xf1)][_0xa9656d(0xfa)],_0x50706b['tablestartLow'][_0xa9656d(0xfa)])):(_0x50706b[_0xa9656d(0x139)]=_0x50706b[_0xa9656d(0x13f)],_0x50706b['tablestartLowShort']=_0x50706b[_0xa9656d(0xfb)]);_0x50706b['tablestartUpShort2']=_0x50706b[_0xa9656d(0x139)][_0xa9656d(0x116)](/\/{2,}/g,'/')[_0xa9656d(0xf0)](/[\/|A-Z]*[^A-Z]+/g)[_0xa9656d(0x103)]('-')[_0xa9656d(0x12e)]()[_0xa9656d(0x116)](/\/\-/g,'/');for(let _0x2ab6ed of await _0x2dde0c['query']('SHOW\x20FULL\x20COLUMNS\x20FROM\x20`'+_0x38c5c7+'`')){_0x2ab6ed['Key']=='PRI'?_0x50706b[_0xa9656d(0x10f)]=_0x2ab6ed:_0x50706b['Fields'][_0x2ab6ed[_0xa9656d(0x126)]]=_0x2ab6ed;}if((_0x573296===null||_0x573296===void 0x0?void 0x0:_0x573296[_0xa9656d(0x113)])&&!fs[_0xa9656d(0x105)](_0x50706b['basedir']+_0xa9656d(0xe9)+_0x50706b[_0xa9656d(0x139)]+_0xa9656d(0x134))){var _0x5dd0d9=[];if(typeof(_0x573296===null||_0x573296===void 0x0?void 0x0:_0x573296[_0xa9656d(0x113)])==_0xa9656d(0x108))_0x5dd0d9=[_0x573296===null||_0x573296===void 0x0?void 0x0:_0x573296[_0xa9656d(0x113)]];else Array['isArray'](_0x573296===null||_0x573296===void 0x0?void 0x0:_0x573296['controller'])?_0x5dd0d9=_0x573296===null||_0x573296===void 0x0?void 0x0:_0x573296['controller']:_0x5dd0d9=[!![]];_0x50706b[_0xa9656d(0x162)]=_0x5dd0d9,await(0x0,Search_1[_0xa9656d(0x15f)])(_0x50706b),await(0x0,Entities_1[_0xa9656d(0x15f)])(_0x50706b),await(0x0,Common_1['default'])(_0x50706b),await(0x0,Event_1['default'])(_0x50706b),await(0x0,Handler_1[_0xa9656d(0x15f)])(_0x50706b),await(0x0,Validator_1[_0xa9656d(0x15f)])(_0x50706b);for(let _0x12cd69 of _0x5dd0d9){_0x50706b[_0xa9656d(0x113)]=_0x12cd69,await(0x0,Action_1[_0xa9656d(0x15f)])(_0x50706b);}}if(_0x573296===null||_0x573296===void 0x0?void 0x0:_0x573296[_0xa9656d(0x142)]){var _0x5dd0d9=[];if(typeof(_0x573296===null||_0x573296===void 0x0?void 0x0:_0x573296[_0xa9656d(0x113)])==_0xa9656d(0x108))_0x5dd0d9=[_0x573296===null||_0x573296===void 0x0?void 0x0:_0x573296[_0xa9656d(0x113)]];else Array[_0xa9656d(0x161)](_0x573296===null||_0x573296===void 0x0?void 0x0:_0x573296[_0xa9656d(0x113)])?_0x5dd0d9=_0x573296===null||_0x573296===void 0x0?void 0x0:_0x573296[_0xa9656d(0x113)]:_0x5dd0d9=[!![]];if(_0x573296[_0xa9656d(0x142)]=='v2')for(let _0x3ceed9 of _0x5dd0d9){_0x50706b['controller']=_0x3ceed9;let _0x392a96=process[_0xa9656d(0x117)]()+_0xa9656d(0xed)+(typeof _0x50706b[_0xa9656d(0x113)]=='string'?'/'+_0x50706b[_0xa9656d(0x113)]:'');_0x50706b[_0xa9656d(0xf1)]?_0x392a96=_0x392a96+('/apis/apps/'+_0x50706b['moduleName']+_0xa9656d(0x11b)+_0x50706b[_0xa9656d(0x139)]+_0xa9656d(0xe7)):_0x392a96=_0x392a96+('/apis/'+_0x50706b[_0xa9656d(0xf6)]+_0xa9656d(0x11b)+_0x50706b['tablestartUpShort']+'.js'),!fs['existsSync'](_0x392a96)&&(await(0x0,Api_2['default'])(_0x50706b),await(0x0,Router_2['default'])(_0x50706b),await(0x0,Layout_2[_0xa9656d(0x15f)])(_0x50706b),await(0x0,LayoutVue_2['default'])(_0x50706b),await(0x0,Validator_3[_0xa9656d(0x15f)])(_0x50706b));}else{if(_0x573296[_0xa9656d(0x142)]=='v3')for(let _0x59f73d of _0x5dd0d9){_0x50706b[_0xa9656d(0x113)]=_0x59f73d;let _0x4174d2=process[_0xa9656d(0x117)]()+_0xa9656d(0xed)+(typeof _0x50706b[_0xa9656d(0x113)]==_0xa9656d(0x108)?'/'+_0x50706b['controller']:'');_0x50706b[_0xa9656d(0xf1)]?_0x4174d2=_0x4174d2+(_0xa9656d(0x146)+_0x50706b[_0xa9656d(0xf1)]+_0xa9656d(0x11b)+_0x50706b[_0xa9656d(0x139)]+_0xa9656d(0xe7)):_0x4174d2=_0x4174d2+(_0xa9656d(0x11b)+_0x50706b[_0xa9656d(0xf6)]+_0xa9656d(0x11b)+_0x50706b[_0xa9656d(0x139)]+_0xa9656d(0xe7)),!fs[_0xa9656d(0x105)](_0x4174d2)&&(await(0x0,Api_3['default'])(_0x50706b),await(0x0,Router_3[_0xa9656d(0x15f)])(_0x50706b),await(0x0,Layout_3[_0xa9656d(0x15f)])(_0x50706b),await(0x0,LayoutVue_3[_0xa9656d(0x15f)])(_0x50706b),await(0x0,Validator_4[_0xa9656d(0x15f)])(_0x50706b));}else for(let _0xbc99b6 of _0x5dd0d9){_0x50706b[_0xa9656d(0x113)]=_0xbc99b6;let _0x3c26a0=process[_0xa9656d(0x117)]()+_0xa9656d(0xed)+(typeof _0x50706b[_0xa9656d(0x113)]==_0xa9656d(0x108)?'/'+_0x50706b[_0xa9656d(0x113)]:'');_0x50706b[_0xa9656d(0xf1)]?_0x3c26a0=_0x3c26a0+(_0xa9656d(0x100)+_0x50706b[_0xa9656d(0xf1)]+_0xa9656d(0x12f)+_0x50706b[_0xa9656d(0xee)]+'.js'):_0x3c26a0=_0x3c26a0+('/pages/'+_0x50706b[_0xa9656d(0xf6)]+'/api/'+_0x50706b[_0xa9656d(0xee)]+_0xa9656d(0xe7)),!fs[_0xa9656d(0x105)](_0x3c26a0)&&(await(0x0,Api_1[_0xa9656d(0x15f)])(_0x50706b),await(0x0,Router_1[_0xa9656d(0x15f)])(_0x50706b),await(0x0,Layout_1[_0xa9656d(0x15f)])(_0x50706b),await(0x0,LayoutVue_1[_0xa9656d(0x15f)])(_0x50706b),await(0x0,Validator_2[_0xa9656d(0x15f)])(_0x50706b));}}}}else console[_0xa9656d(0xf3)]('表:'+_0x38c5c7+'\x20表注释不存在');}return'die';}async['checkOption'](_0x587e94){const _0x2c163f=a3_0x2ae557;var _0x39619d,_0x5b8069,_0xbc140;if(!this[_0x2c163f(0x145)][_0x2c163f(0x12a)]()||!((_0x39619d=this[_0x2c163f(0x132)])===null||_0x39619d===void 0x0?void 0x0:_0x39619d[_0x2c163f(0x102)])||!this['app']['getConfig']('apitest'))throw new Error(_0x2c163f(0x101));!_0x587e94[_0x2c163f(0x135)]&&(_0x587e94['connection']=_0x2c163f(0x15f));if(!((_0xbc140=(_0x5b8069=this['config'])===null||_0x5b8069===void 0x0?void 0x0:_0x5b8069[_0x2c163f(0x102)])===null||_0xbc140===void 0x0?void 0x0:_0xbc140[_0x587e94[_0x2c163f(0x135)]]))throw new Error(_0x2c163f(0x143)+_0x587e94['connection']);if(!this[_0x2c163f(0x109)][_0x2c163f(0xf7)](_0x587e94[_0x2c163f(0x135)]))throw new Error('typeorm\x20数据源\x20'+_0x587e94[_0x2c163f(0x135)]+'\x20不存在');if(!this['dataSourceManager']['isConnected'](_0x587e94[_0x2c163f(0x135)]))throw new Error(_0x2c163f(0x148)+_0x587e94['connection']+_0x2c163f(0xeb));return!![];}async[a3_0x2ae557(0x118)](_0x3ca626){const _0x115ab2=a3_0x2ae557,_0x27663e=_0x3ca626['tablestart'][_0x115ab2(0xfd)]('_')[0x0][_0x115ab2(0x12e)]();if(!fs[_0x115ab2(0x105)](_0x3ca626[_0x115ab2(0xea)]+_0x115ab2(0x159))){let _0x19662a=_0x115ab2(0x14a)+(_0x3ca626[_0x115ab2(0x120)]||_0x27663e)+_0x115ab2(0x14d);fs['mkdirSync'](path[_0x115ab2(0x136)](_0x3ca626[_0x115ab2(0xea)]+_0x115ab2(0x159)),{'recursive':!![]}),fs[_0x115ab2(0xfe)](_0x3ca626['basedir']+_0x115ab2(0x159),_0x19662a,_0x115ab2(0x10b));}}};exports[a3_0x2ae557(0x13d)]=ApicreateService,__decorate([(0x0,core_2[a3_0x2ae557(0x11a)])(),__metadata('design:type',Object)],ApicreateService[a3_0x2ae557(0x12c)],a3_0x2ae557(0x13e),void 0x0),__decorate([(0x0,core_2[a3_0x2ae557(0x11c)])('typeorm'),__metadata('design:type',Object)],ApicreateService[a3_0x2ae557(0x12c)],'config',void 0x0),__decorate([(0x0,core_2[a3_0x2ae557(0x151)])(),__metadata(a3_0x2ae557(0x11f),core_1[a3_0x2ae557(0x147)])],ApicreateService['prototype'],a3_0x2ae557(0x145),void 0x0),__decorate([(0x0,core_2[a3_0x2ae557(0x151)])(),__metadata(a3_0x2ae557(0x11f),typeorm_1[a3_0x2ae557(0x13a)])],ApicreateService[a3_0x2ae557(0x12c)],a3_0x2ae557(0x109),void 0x0),exports[a3_0x2ae557(0x13d)]=ApicreateService=__decorate([(0x0,core_2[a3_0x2ae557(0x14f)])('ApicreateService'),(0x0,core_2[a3_0x2ae557(0x14e)])(core_2['ScopeEnum']['Singleton'])],ApicreateService);function a3_0x59a7(){const _0x24aad9=['../templateVue/Api','export\x20default\x20{\x0a\x20\x20\x20\x20name:\x20\x27','table','../templateFun/Handler','\x27,\x0a\x20\x20\x20\x20description:\x20\x27\x27,\x0a\x20\x20\x20\x20middleware:\x20[],\x0a}','Scope','Provide','../templateFun/Event','Inject','substr','module','../templateVueV2/LayoutVue','246685ayYYnf','1166653XYoHlL','basic','__decorate','/config.ts','getOwnPropertyDescriptor','LIKE\x20\x22','checkOption','../templateVueV2/Layout','defineProperty','default','__esModule','isArray','controllers','../templateFun/Common','decorate','../templateVueV3/LayoutVue','../templateVue/Layout','.js','../templateVueV3/Validator','/exceptions/','basedir','\x20未连接','createAction','/vue','tablestartUpShort2','../templateVue/LayoutVue','match','moduleName','apply','error','function','metadata','apporbasic','hasDataSource','object','createPlugin','length','tablestartLow','@midwayjs/typeorm','split','writeFileSync','(((.+)+)+)+$','/pages/apps/','无法生成','dataSource','join','search','existsSync','54DpsPdo','../templateFun/Search','string','dataSourceManager','__metadata','utf-8','tablestart','constructor','../templateVueV3/Router','Primary','query','database','\x22\x20AND\x20table_name\x20','controller','tablestartLowShort','path','replace','cwd','CreateModuleConfig','\x22\x20AND\x20table_name\x20=\x20\x27','App','/apis/','Config','6624280gWyjHP','12368816rRLvpq','design:type','Comment','11504675MpyGJy','../templateVueV2/Router','@midwayjs/core','15gNAXXz','map','Field','../templateVueV2/Validator','../templateVue/Validator','../templateVueV3/Layout','isDevelopmentEnvironment','createApp','prototype','../templateVueV2/Api','toLowerCase','/api/','tableprefix','substring','config','20032542cKvdDb','.ts','connection','dirname','getBaseDir','toUpperCase','tablestartUpShort','TypeORMDataSourceManager','326176PYOuis','createBasic','ApicreateService','app','tablestartUp','../templateVueV3/Api','filter','hasvue','typeorm\x20未配置数据源\x20','../templateFun/Entities','environment','/apis/apps/','MidwayEnvironmentService','typeorm\x20数据源\x20'];a3_0x59a7=function(){return _0x24aad9;};return a3_0x59a7();}
|
|
1
|
+
const a3_0x2ff88d=a3_0x2139;(function(_0x480a84,_0x4b92d8){const _0x27898a=a3_0x2139,_0x4b884c=_0x480a84();while(!![]){try{const _0x3afd92=parseInt(_0x27898a(0x20a))/0x1+parseInt(_0x27898a(0x1ed))/0x2+-parseInt(_0x27898a(0x1db))/0x3+-parseInt(_0x27898a(0x225))/0x4+parseInt(_0x27898a(0x22a))/0x5*(parseInt(_0x27898a(0x207))/0x6)+-parseInt(_0x27898a(0x1f3))/0x7*(parseInt(_0x27898a(0x1d2))/0x8)+parseInt(_0x27898a(0x22d))/0x9;if(_0x3afd92===_0x4b92d8)break;else _0x4b884c['push'](_0x4b884c['shift']());}catch(_0x53b104){_0x4b884c['push'](_0x4b884c['shift']());}}}(a3_0x58eb,0xc5e9f));const a3_0x59a500=(function(){let _0x2265e7=!![];return function(_0x47f783,_0x22cdd0){const _0x5e1a62=_0x2265e7?function(){const _0x1dab02=a3_0x2139;if(_0x22cdd0){const _0x5a2f1=_0x22cdd0[_0x1dab02(0x21a)](_0x47f783,arguments);return _0x22cdd0=null,_0x5a2f1;}}:function(){};return _0x2265e7=![],_0x5e1a62;};}()),a3_0x332cc1=a3_0x59a500(this,function(){const _0x3675f4=a3_0x2139;return a3_0x332cc1[_0x3675f4(0x208)]()[_0x3675f4(0x1ec)](_0x3675f4(0x1ff))['toString']()['constructor'](a3_0x332cc1)[_0x3675f4(0x1ec)](_0x3675f4(0x1ff));});a3_0x332cc1();'use strict';function a3_0x2139(_0x2b4a14,_0x187150){const _0x375725=a3_0x58eb();return a3_0x2139=function(_0x332cc1,_0x59a500){_0x332cc1=_0x332cc1-0x1be;let _0x58eb9a=_0x375725[_0x332cc1];return _0x58eb9a;},a3_0x2139(_0x2b4a14,_0x187150);}var __decorate=this&&this[a3_0x2ff88d(0x1ca)]||function(_0x4d123d,_0x4f0ecc,_0x4386ff,_0x23eddb){const _0x2eb4ee=a3_0x2ff88d;var _0x4e2a4d=arguments[_0x2eb4ee(0x21e)],_0x162d23=_0x4e2a4d<0x3?_0x4f0ecc:_0x23eddb===null?_0x23eddb=Object[_0x2eb4ee(0x210)](_0x4f0ecc,_0x4386ff):_0x23eddb,_0x4fbb06;if(typeof Reflect===_0x2eb4ee(0x231)&&typeof Reflect[_0x2eb4ee(0x1d5)]===_0x2eb4ee(0x1e8))_0x162d23=Reflect[_0x2eb4ee(0x1d5)](_0x4d123d,_0x4f0ecc,_0x4386ff,_0x23eddb);else{for(var _0x29683b=_0x4d123d[_0x2eb4ee(0x21e)]-0x1;_0x29683b>=0x0;_0x29683b--)if(_0x4fbb06=_0x4d123d[_0x29683b])_0x162d23=(_0x4e2a4d<0x3?_0x4fbb06(_0x162d23):_0x4e2a4d>0x3?_0x4fbb06(_0x4f0ecc,_0x4386ff,_0x162d23):_0x4fbb06(_0x4f0ecc,_0x4386ff))||_0x162d23;}return _0x4e2a4d>0x3&&_0x162d23&&Object[_0x2eb4ee(0x223)](_0x4f0ecc,_0x4386ff,_0x162d23),_0x162d23;},__metadata=this&&this[a3_0x2ff88d(0x236)]||function(_0x40cd96,_0x12af57){const _0x5826b5=a3_0x2ff88d;if(typeof Reflect===_0x5826b5(0x231)&&typeof Reflect['metadata']===_0x5826b5(0x1e8))return Reflect[_0x5826b5(0x1f0)](_0x40cd96,_0x12af57);};Object[a3_0x2ff88d(0x223)](exports,a3_0x2ff88d(0x1ce),{'value':!![]}),exports[a3_0x2ff88d(0x219)]=void 0x0;function a3_0x58eb(){const _0x23c0dc=['apporbasic','Config','Primary','4340244pvJHBY','../templateVue/LayoutVue','\x22\x20AND\x20table_name\x20=\x20\x27','tablestart','database','tablestartUp','utf-8','dataSource','cwd','basedir','SHOW\x20FULL\x20COLUMNS\x20FROM\x20`','writeFileSync','match','function','tablestartUpShort','Key','LIKE\x20\x22','search','2474082cNOdhn','substr','prototype','metadata','../templateVueV3/Router','/apis/','7AGTIcA','../templateVue/Api','connection','../templateFun/Common','App','tableprefix','../templateVue/Validator','typeorm','createBasic','../templateVue/Router','\x20未连接','Fields','(((.+)+)+)+$','environment','controller','typeorm\x20未配置数据源\x20','createApp','filter','../templateVueV2/Validator','../templateFun/Handler','26988uNjHPJ','toString','\x20表注释不存在','563911AZSlsn','tablestartLow','isArray','../templateFun/Action','CreateModuleConfig','.ts','getOwnPropertyDescriptor','dataSourceManager','Scope','split','../templateVueV3/Validator','Provide','isDevelopmentEnvironment','createAction','substring','ApicreateService','apply','query','checkOption','无法生成','length','../templateVue/Layout','/api/','tablestartLowShort','Singleton','defineProperty','moduleName','5506900HrMRQO','join','die','/config.ts','/pages/apps/','45FGvhgJ','mkdirSync','createPlugin','22037112hTYNni','app','Inject','ScopeEnum','object','default','../templateVueV3/Api','getDataSource','../templateVueV2/Api','__metadata','\x22\x20AND\x20table_name\x20','/apis/apps/','../templateFun/Search','@midwayjs/typeorm','SELECT\x20TABLE_COMMENT\x20as\x20`comment`\x20FROM\x20information_schema.TABLES\x20WHERE\x20TABLE_SCHEMA=\x22','../templateVueV2/LayoutVue','map','config','/pages/','/exceptions/','apitest','toUpperCase','module','string','existsSync','error','@midwayjs/core','hasDataSource','hasvue','../templateFun/Event','path','typeorm\x20数据源\x20','__decorate','toLowerCase','MidwayEnvironmentService','/apps/','__esModule','vuedialog','/vue','getConfig','5246992XpcxJL','table','tablestartUpShort2','decorate','design:type','.js'];a3_0x58eb=function(){return _0x23c0dc;};return a3_0x58eb();}const fs=require('fs'),path=require(a3_0x2ff88d(0x1c8)),core_1=require(a3_0x2ff88d(0x1c4)),typeorm_1=require(a3_0x2ff88d(0x23a)),core_2=require(a3_0x2ff88d(0x1c4)),Common_1=require(a3_0x2ff88d(0x1f6)),Event_1=require(a3_0x2ff88d(0x1c7)),Search_1=require(a3_0x2ff88d(0x239)),Entities_1=require('../templateFun/Entities'),Handler_1=require(a3_0x2ff88d(0x206)),Validator_1=require('../templateFun/Validator'),Action_1=require(a3_0x2ff88d(0x20d)),Api_1=require(a3_0x2ff88d(0x1f4)),Router_1=require(a3_0x2ff88d(0x1fc)),Layout_1=require(a3_0x2ff88d(0x21f)),LayoutVue_1=require(a3_0x2ff88d(0x1dc)),Validator_2=require(a3_0x2ff88d(0x1f9)),Api_2=require(a3_0x2ff88d(0x235)),Router_2=require('../templateVueV2/Router'),Layout_2=require('../templateVueV2/Layout'),LayoutVue_2=require(a3_0x2ff88d(0x23c)),Validator_3=require(a3_0x2ff88d(0x205)),Api_3=require(a3_0x2ff88d(0x233)),Router_3=require(a3_0x2ff88d(0x1f1)),Layout_3=require('../templateVueV3/Layout'),LayoutVue_3=require('../templateVueV3/LayoutVue'),Validator_4=require(a3_0x2ff88d(0x214));let ApicreateService=class ApicreateService{async[a3_0x2ff88d(0x203)](_0x4f326d){const _0x6d11d8=a3_0x2ff88d;return await this['checkOption'](_0x4f326d),await this[_0x6d11d8(0x217)]({..._0x4f326d,'apporbasic':_0x6d11d8(0x22e)});}async[a3_0x2ff88d(0x1fb)](_0x326156){const _0x536efc=a3_0x2ff88d;return await this[_0x536efc(0x21c)](_0x326156),await this['createAction']({..._0x326156,'apporbasic':'basic'});}async[a3_0x2ff88d(0x22c)](_0x5417ad){const _0x2b37c2=a3_0x2ff88d;return await this['checkOption'](_0x5417ad),await this[_0x2b37c2(0x217)]({..._0x5417ad,'module':!![]});}async[a3_0x2ff88d(0x217)](_0x5e022d){const _0x22f83c=a3_0x2ff88d;var _0x48fa9a,_0x455634;!_0x5e022d[_0x22f83c(0x1f5)]&&(_0x5e022d['connection']=_0x22f83c(0x232));!_0x5e022d['apporbasic']&&(_0x5e022d[_0x22f83c(0x1d8)]=_0x22f83c(0x22e));const _0x11c158=this[_0x22f83c(0x22e)]['getBaseDir'](),_0x1ad373=this['dataSourceManager'][_0x22f83c(0x234)](_0x5e022d[_0x22f83c(0x1f5)]),_0x17f8a7=await _0x1ad373[_0x22f83c(0x21b)]('SELECT\x20TABLE_NAME\x20as\x20`table`\x20FROM\x20information_schema.TABLES\x20WHERE\x20TABLE_SCHEMA=\x22'+this['config'][_0x22f83c(0x1e2)][_0x5e022d[_0x22f83c(0x1f5)]][_0x22f83c(0x1df)]+_0x22f83c(0x237)+((_0x5e022d===null||_0x5e022d===void 0x0?void 0x0:_0x5e022d['table'])?'=\x20\x22'+_0x5e022d['table']+'\x22':_0x22f83c(0x1eb)+(_0x5e022d[_0x22f83c(0x1f8)]||'')+'%\x22'))||[];for(let _0x2bd999=0x0;_0x2bd999<_0x17f8a7[_0x22f83c(0x21e)];_0x2bd999++){const _0x5c1e1e=_0x17f8a7[_0x2bd999][_0x22f83c(0x1d3)];if((_0x5e022d===null||_0x5e022d===void 0x0?void 0x0:_0x5e022d[_0x22f83c(0x1d3)])&&(_0x5e022d===null||_0x5e022d===void 0x0?void 0x0:_0x5e022d[_0x22f83c(0x1d3)])!=_0x5c1e1e)continue;if((_0x5e022d===null||_0x5e022d===void 0x0?void 0x0:_0x5e022d[_0x22f83c(0x1f8)])&&!(_0x5c1e1e===null||_0x5c1e1e===void 0x0?void 0x0:_0x5c1e1e['startsWith'](_0x5e022d['tableprefix'])))continue;const _0x3b06aa=await _0x1ad373[_0x22f83c(0x21b)](_0x22f83c(0x23b)+this['config'][_0x22f83c(0x1e2)][_0x5e022d['connection']][_0x22f83c(0x1df)]+_0x22f83c(0x1dd)+_0x5c1e1e+'\x27')||[];if((_0x48fa9a=_0x3b06aa[0x0])===null||_0x48fa9a===void 0x0?void 0x0:_0x48fa9a['comment']){const _0x149033={'tablename':_0x5c1e1e,'Primary':{},'Fields':{},'Comment':(_0x455634=_0x3b06aa[0x0])===null||_0x455634===void 0x0?void 0x0:_0x455634['comment'],'vuedialog':_0x5e022d[_0x22f83c(0x1cf)],'apporbasic':_0x5e022d['apporbasic']};_0x149033[_0x22f83c(0x1de)]=_0x5c1e1e[_0x22f83c(0x1ee)]((_0x5e022d===null||_0x5e022d===void 0x0?void 0x0:_0x5e022d[_0x22f83c(0x1ee)])||0x0,_0x5c1e1e[_0x22f83c(0x21e)]),_0x149033[_0x22f83c(0x1e4)]=(_0x5e022d===null||_0x5e022d===void 0x0?void 0x0:_0x5e022d[_0x22f83c(0x1c0)])?_0x11c158+_0x22f83c(0x1cd)+_0x149033[_0x22f83c(0x1de)][_0x22f83c(0x213)]('_')[0x0]['toLowerCase']():_0x11c158+'/'+_0x5e022d[_0x22f83c(0x1d8)];const _0x507abf=_0x149033[_0x22f83c(0x1de)][_0x22f83c(0x213)]('_')[_0x22f83c(0x204)](_0x25731e=>_0x25731e&&_0x25731e['trim']());(_0x5e022d===null||_0x5e022d===void 0x0?void 0x0:_0x5e022d[_0x22f83c(0x1c0)])&&(await this[_0x22f83c(0x20e)](_0x149033),_0x149033['moduleName']=_0x507abf[0x0][_0x22f83c(0x1cb)]());_0x149033[_0x22f83c(0x20b)]=_0x507abf[_0x22f83c(0x23d)](_0x33076a=>_0x33076a['toLowerCase']())['join'](''),_0x149033['tablestartUp']=_0x507abf[_0x22f83c(0x23d)](_0x505499=>''+_0x505499[_0x22f83c(0x218)](0x0,0x1)[_0x22f83c(0x1bf)]()+_0x505499['substring'](0x1)[_0x22f83c(0x1cb)]())[_0x22f83c(0x226)]('');(_0x149033===null||_0x149033===void 0x0?void 0x0:_0x149033[_0x22f83c(0x224)])&&_0x507abf[_0x22f83c(0x21e)]>0x1&&_0x507abf[0x0]['toLowerCase']()==_0x149033[_0x22f83c(0x224)]?(_0x149033['tablestartUpShort']=_0x149033[_0x22f83c(0x1e0)][_0x22f83c(0x218)](_0x149033[_0x22f83c(0x224)][_0x22f83c(0x21e)],_0x149033['tablestartUp']['length']),_0x149033[_0x22f83c(0x221)]=_0x149033['tablestartLow'][_0x22f83c(0x218)](_0x149033[_0x22f83c(0x224)][_0x22f83c(0x21e)],_0x149033['tablestartLow'][_0x22f83c(0x21e)])):(_0x149033[_0x22f83c(0x1e9)]=_0x149033[_0x22f83c(0x1e0)],_0x149033[_0x22f83c(0x221)]=_0x149033['tablestartLow']);_0x149033[_0x22f83c(0x1d4)]=_0x149033['tablestartUpShort']['replace'](/\/{2,}/g,'/')[_0x22f83c(0x1e7)](/[\/|A-Z]*[^A-Z]+/g)[_0x22f83c(0x226)]('-')[_0x22f83c(0x1cb)]()['replace'](/\/\-/g,'/');for(let _0x167d2b of await _0x1ad373[_0x22f83c(0x21b)](_0x22f83c(0x1e5)+_0x5c1e1e+'`')){_0x167d2b[_0x22f83c(0x1ea)]=='PRI'?_0x149033[_0x22f83c(0x1da)]=_0x167d2b:_0x149033[_0x22f83c(0x1fe)][_0x167d2b['Field']]=_0x167d2b;}if((_0x5e022d===null||_0x5e022d===void 0x0?void 0x0:_0x5e022d[_0x22f83c(0x201)])&&!fs[_0x22f83c(0x1c2)](_0x149033['basedir']+_0x22f83c(0x240)+_0x149033[_0x22f83c(0x1e9)]+_0x22f83c(0x20f))){var _0x464e74=[];if(typeof(_0x5e022d===null||_0x5e022d===void 0x0?void 0x0:_0x5e022d[_0x22f83c(0x201)])==_0x22f83c(0x1c1))_0x464e74=[_0x5e022d===null||_0x5e022d===void 0x0?void 0x0:_0x5e022d['controller']];else Array[_0x22f83c(0x20c)](_0x5e022d===null||_0x5e022d===void 0x0?void 0x0:_0x5e022d[_0x22f83c(0x201)])?_0x464e74=_0x5e022d===null||_0x5e022d===void 0x0?void 0x0:_0x5e022d['controller']:_0x464e74=[!![]];_0x149033['controllers']=_0x464e74,await(0x0,Search_1['default'])(_0x149033),await(0x0,Entities_1[_0x22f83c(0x232)])(_0x149033),await(0x0,Common_1['default'])(_0x149033),await(0x0,Event_1[_0x22f83c(0x232)])(_0x149033),await(0x0,Handler_1['default'])(_0x149033),await(0x0,Validator_1[_0x22f83c(0x232)])(_0x149033);for(let _0xb82e80 of _0x464e74){_0x149033[_0x22f83c(0x201)]=_0xb82e80,await(0x0,Action_1[_0x22f83c(0x232)])(_0x149033);}}if(_0x5e022d===null||_0x5e022d===void 0x0?void 0x0:_0x5e022d[_0x22f83c(0x1c6)]){var _0x464e74=[];if(typeof(_0x5e022d===null||_0x5e022d===void 0x0?void 0x0:_0x5e022d['controller'])==_0x22f83c(0x1c1))_0x464e74=[_0x5e022d===null||_0x5e022d===void 0x0?void 0x0:_0x5e022d[_0x22f83c(0x201)]];else Array[_0x22f83c(0x20c)](_0x5e022d===null||_0x5e022d===void 0x0?void 0x0:_0x5e022d[_0x22f83c(0x201)])?_0x464e74=_0x5e022d===null||_0x5e022d===void 0x0?void 0x0:_0x5e022d[_0x22f83c(0x201)]:_0x464e74=[!![]];if(_0x5e022d[_0x22f83c(0x1c6)]=='v2')for(let _0x1c3d17 of _0x464e74){_0x149033[_0x22f83c(0x201)]=_0x1c3d17;let _0x1e6e2f=process[_0x22f83c(0x1e3)]()+_0x22f83c(0x1d0)+(typeof _0x149033[_0x22f83c(0x201)]==_0x22f83c(0x1c1)?'/'+_0x149033[_0x22f83c(0x201)]:'');_0x149033['moduleName']?_0x1e6e2f=_0x1e6e2f+(_0x22f83c(0x238)+_0x149033[_0x22f83c(0x224)]+_0x22f83c(0x1f2)+_0x149033[_0x22f83c(0x1e9)]+_0x22f83c(0x1d7)):_0x1e6e2f=_0x1e6e2f+('/apis/'+_0x149033[_0x22f83c(0x1d8)]+'/apis/'+_0x149033[_0x22f83c(0x1e9)]+_0x22f83c(0x1d7)),!fs[_0x22f83c(0x1c2)](_0x1e6e2f)&&(await(0x0,Api_2['default'])(_0x149033),await(0x0,Router_2[_0x22f83c(0x232)])(_0x149033),await(0x0,Layout_2[_0x22f83c(0x232)])(_0x149033),await(0x0,LayoutVue_2[_0x22f83c(0x232)])(_0x149033),await(0x0,Validator_3[_0x22f83c(0x232)])(_0x149033));}else{if(_0x5e022d['hasvue']=='v3')for(let _0x1028ba of _0x464e74){_0x149033[_0x22f83c(0x201)]=_0x1028ba;let _0x15106f=process[_0x22f83c(0x1e3)]()+_0x22f83c(0x1d0)+(typeof _0x149033[_0x22f83c(0x201)]==_0x22f83c(0x1c1)?'/'+_0x149033[_0x22f83c(0x201)]:'');_0x149033[_0x22f83c(0x224)]?_0x15106f=_0x15106f+(_0x22f83c(0x238)+_0x149033[_0x22f83c(0x224)]+_0x22f83c(0x1f2)+_0x149033[_0x22f83c(0x1e9)]+_0x22f83c(0x1d7)):_0x15106f=_0x15106f+('/apis/'+_0x149033[_0x22f83c(0x1d8)]+_0x22f83c(0x1f2)+_0x149033[_0x22f83c(0x1e9)]+_0x22f83c(0x1d7)),!fs['existsSync'](_0x15106f)&&(await(0x0,Api_3['default'])(_0x149033),await(0x0,Router_3[_0x22f83c(0x232)])(_0x149033),await(0x0,Layout_3[_0x22f83c(0x232)])(_0x149033),await(0x0,LayoutVue_3[_0x22f83c(0x232)])(_0x149033),await(0x0,Validator_4[_0x22f83c(0x232)])(_0x149033));}else for(let _0x54ea86 of _0x464e74){_0x149033['controller']=_0x54ea86;let _0x4218e3=process[_0x22f83c(0x1e3)]()+_0x22f83c(0x1d0)+(typeof _0x149033[_0x22f83c(0x201)]==_0x22f83c(0x1c1)?'/'+_0x149033['controller']:'');_0x149033['moduleName']?_0x4218e3=_0x4218e3+(_0x22f83c(0x229)+_0x149033['moduleName']+_0x22f83c(0x220)+_0x149033['tablestartUpShort2']+_0x22f83c(0x1d7)):_0x4218e3=_0x4218e3+(_0x22f83c(0x23f)+_0x149033[_0x22f83c(0x1d8)]+_0x22f83c(0x220)+_0x149033[_0x22f83c(0x1d4)]+_0x22f83c(0x1d7)),!fs[_0x22f83c(0x1c2)](_0x4218e3)&&(await(0x0,Api_1[_0x22f83c(0x232)])(_0x149033),await(0x0,Router_1[_0x22f83c(0x232)])(_0x149033),await(0x0,Layout_1[_0x22f83c(0x232)])(_0x149033),await(0x0,LayoutVue_1[_0x22f83c(0x232)])(_0x149033),await(0x0,Validator_2[_0x22f83c(0x232)])(_0x149033));}}}}else console[_0x22f83c(0x1c3)]('表:'+_0x5c1e1e+_0x22f83c(0x209));}return _0x22f83c(0x227);}async[a3_0x2ff88d(0x21c)](_0x3f1b35){const _0x435a91=a3_0x2ff88d;var _0x5163f9,_0x3ca27a,_0x28a9c0;if(!this[_0x435a91(0x200)][_0x435a91(0x216)]()||!((_0x5163f9=this['config'])===null||_0x5163f9===void 0x0?void 0x0:_0x5163f9[_0x435a91(0x1e2)])||!this[_0x435a91(0x22e)][_0x435a91(0x1d1)](_0x435a91(0x1be)))throw new Error(_0x435a91(0x21d));!_0x3f1b35[_0x435a91(0x1f5)]&&(_0x3f1b35['connection']=_0x435a91(0x232));if(!((_0x28a9c0=(_0x3ca27a=this[_0x435a91(0x23e)])===null||_0x3ca27a===void 0x0?void 0x0:_0x3ca27a['dataSource'])===null||_0x28a9c0===void 0x0?void 0x0:_0x28a9c0[_0x3f1b35[_0x435a91(0x1f5)]]))throw new Error(_0x435a91(0x202)+_0x3f1b35['connection']);if(!this['dataSourceManager'][_0x435a91(0x1c5)](_0x3f1b35[_0x435a91(0x1f5)]))throw new Error(_0x435a91(0x1c9)+_0x3f1b35['connection']+'\x20不存在');if(!this[_0x435a91(0x211)]['isConnected'](_0x3f1b35[_0x435a91(0x1f5)]))throw new Error(_0x435a91(0x1c9)+_0x3f1b35[_0x435a91(0x1f5)]+_0x435a91(0x1fd));return!![];}async[a3_0x2ff88d(0x20e)](_0x44d26a){const _0x1e8c95=a3_0x2ff88d,_0x1bf743=_0x44d26a[_0x1e8c95(0x1de)][_0x1e8c95(0x213)]('_')[0x0][_0x1e8c95(0x1cb)]();if(!fs['existsSync'](_0x44d26a['basedir']+'/config.ts')){let _0x58f9e9='export\x20default\x20{\x0a\x20\x20\x20\x20name:\x20\x27'+(_0x44d26a['Comment']||_0x1bf743)+'\x27,\x0a\x20\x20\x20\x20description:\x20\x27\x27,\x0a\x20\x20\x20\x20middleware:\x20[],\x0a}';fs[_0x1e8c95(0x22b)](path['dirname'](_0x44d26a[_0x1e8c95(0x1e4)]+_0x1e8c95(0x228)),{'recursive':!![]}),fs[_0x1e8c95(0x1e6)](_0x44d26a[_0x1e8c95(0x1e4)]+_0x1e8c95(0x228),_0x58f9e9,_0x1e8c95(0x1e1));}}};__decorate([(0x0,core_2[a3_0x2ff88d(0x1f7)])(),__metadata(a3_0x2ff88d(0x1d6),Object)],ApicreateService[a3_0x2ff88d(0x1ef)],a3_0x2ff88d(0x22e),void 0x0),__decorate([(0x0,core_2[a3_0x2ff88d(0x1d9)])(a3_0x2ff88d(0x1fa)),__metadata(a3_0x2ff88d(0x1d6),Object)],ApicreateService[a3_0x2ff88d(0x1ef)],'config',void 0x0),__decorate([(0x0,core_2['Inject'])(),__metadata(a3_0x2ff88d(0x1d6),core_1[a3_0x2ff88d(0x1cc)])],ApicreateService[a3_0x2ff88d(0x1ef)],a3_0x2ff88d(0x200),void 0x0),__decorate([(0x0,core_2[a3_0x2ff88d(0x22f)])(),__metadata(a3_0x2ff88d(0x1d6),typeorm_1['TypeORMDataSourceManager'])],ApicreateService[a3_0x2ff88d(0x1ef)],a3_0x2ff88d(0x211),void 0x0),ApicreateService=__decorate([(0x0,core_2[a3_0x2ff88d(0x215)])(a3_0x2ff88d(0x219)),(0x0,core_2[a3_0x2ff88d(0x212)])(core_2[a3_0x2ff88d(0x230)][a3_0x2ff88d(0x222)])],ApicreateService),exports[a3_0x2ff88d(0x219)]=ApicreateService;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export default function ({ controller, tablestartUp, tablestartUpShort, basedir, Primary, Comment, moduleName, apporbasic }: {
|
|
2
|
-
controller: any;
|
|
3
|
-
tablestartUp: any;
|
|
4
|
-
tablestartUpShort: any;
|
|
5
|
-
basedir: any;
|
|
6
|
-
Primary: any;
|
|
7
|
-
Comment: any;
|
|
8
|
-
moduleName: any;
|
|
9
|
-
apporbasic: any;
|
|
10
|
-
}): Promise<void>;
|
|
1
|
+
export default function ({ controller, tablestartUp, tablestartUpShort, basedir, Primary, Comment, moduleName, apporbasic }: {
|
|
2
|
+
controller: any;
|
|
3
|
+
tablestartUp: any;
|
|
4
|
+
tablestartUpShort: any;
|
|
5
|
+
basedir: any;
|
|
6
|
+
Primary: any;
|
|
7
|
+
Comment: any;
|
|
8
|
+
moduleName: any;
|
|
9
|
+
apporbasic: any;
|
|
10
|
+
}): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a4_0x2ff9(){const _0x6b9633=[',\x20params:\x20','414775tasGJA','/controller/','DTOCreate)\x20{\x0a\x0a','import\x20{\x20Inject,\x20Action,\x20PageDTO\x20}\x20from\x20\x27anncic-api\x27;\x0a\x0a','Handler.detail(conditions);\x0a\x0a','.ts','Handler.list(conditions,\x20pageinfo);\x0a\x0a','getProp','2712TtuJsI','Controller\x20{\x0a\x0a','\x20\x20\x20\x20}\x0a\x0a\x0a','Type','dirname','\x20\x20\x20\x20@Action.post(\x27添加\x27,\x20\x27add\x27)\x0a','\x20\x20\x20\x20@Action.post(\x22删除\x22,\x20\x27remove\x27)\x0a','Handler:\x20','33032IRvQaN','string','indexOf','@Action(__filename,\x20\x27','(((.+)+)+)+$','DTOSearch\x20}\x20from\x20\x27','126CfyvCp','DTOSearch)\x20{\x0a\x0a','DTOUpdate)\x20{\x0a','@/apps/','Handler.remove(conditions);\x0a\x0a','defineProperty','../helper','/Create\x27;\x0a','\x20\x20\x20\x20\x20\x20\x20\x20const\x20conditions:\x20','/Update\x27;\x0a\x0a','utf-8','976110Airbfz','path','Handler.create(params);\x0a\x0a','Field','/handlers/','\x27;\x0a','1166034Beyqpf','/validators/','43323DtszJr','\x20\x20\x20\x20\x20\x20\x20\x20return\x20this.ctx.ok(tmpModel);\x0a','existsSync','161FnXqdO','DTOCreate\x20}\x20from\x20\x27','DTOSearch,\x20pageinfo:\x20PageDTO)\x20{\x0a\x0a','substring','8mqOaTu','Handler\x20}\x20from\x20\x27','\x20\x20\x20\x20@Action.get(\x27详情\x27,\x20\x27detail/:','number','\x20\x20\x20\x20async\x20index(conditions:\x20','\x20\x20\x20\x20@Action.get(\x27列表\x27,\x20\x27list\x27)\x0a','727335OXYKjv','\x20\x20\x20\x20async\x20update(','\x20\x20\x20\x20@Action.post(\x27修改\x27,\x20\x27edit/:','mediumtext','import\x20{\x20','\x20\x20\x20\x20\x20\x20\x20\x20const\x20tmpModel\x20=\x20await\x20this.','\x20\x20\x20\x20\x20\x20\x20\x20const\x20removes\x20=\x20await\x20this.','import\x20{\x20Context\x20}\x20from\x20\x27@midwayjs/koa\x27;\x0a','Handler.update(conditions,\x20params);\x0a\x0a','\x20\x20\x20\x20\x20\x20\x20\x20const\x20[pagelist,\x20pagetotal]\x20=\x20await\x20this.','\x20\x20\x20\x20async\x20create(params:\x20','\x27)\x0a','\x20};\x0a\x0a','\x20\x20\x20\x20\x20\x20\x20\x20return\x20this.ctx.ok(removes);\x0a','toString'];a4_0x2ff9=function(){return _0x6b9633;};return a4_0x2ff9();}const a4_0x1935f2=a4_0x5ad8;(function(_0x58218e,_0x68471d){const _0x38a43b=a4_0x5ad8,_0xebedd3=_0x58218e();while(!![]){try{const _0x38688d=-parseInt(_0x38a43b(0xb2))/0x1+parseInt(_0x38a43b(0x9f))/0x2*(parseInt(_0x38a43b(0x91))/0x3)+-parseInt(_0x38a43b(0xb9))/0x4*(parseInt(_0x38a43b(0x89))/0x5)+parseInt(_0x38a43b(0xb0))/0x6+-parseInt(_0x38a43b(0xb5))/0x7*(parseInt(_0x38a43b(0x99))/0x8)+parseInt(_0x38a43b(0xbf))/0x9+parseInt(_0x38a43b(0xaa))/0xa;if(_0x38688d===_0x68471d)break;else _0xebedd3['push'](_0xebedd3['shift']());}catch(_0x4c6d69){_0xebedd3['push'](_0xebedd3['shift']());}}}(a4_0x2ff9,0x1ea4d));const a4_0x1627ae=(function(){let _0x55a208=!![];return function(_0x19ad4e,_0x3ad1b3){const _0x38e2d9=_0x55a208?function(){if(_0x3ad1b3){const _0x59ba42=_0x3ad1b3['apply'](_0x19ad4e,arguments);return _0x3ad1b3=null,_0x59ba42;}}:function(){};return _0x55a208=![],_0x38e2d9;};}()),a4_0x556e43=a4_0x1627ae(this,function(){const _0x51342d=a4_0x5ad8;return a4_0x556e43[_0x51342d(0x87)]()['search'](_0x51342d(0x9d))[_0x51342d(0x87)]()['constructor'](a4_0x556e43)['search'](_0x51342d(0x9d));});a4_0x556e43();'use strict';Object[a4_0x1935f2(0xa4)](exports,'__esModule',{'value':!![]});function a4_0x5ad8(_0x38c952,_0x22523a){const _0x2f9c37=a4_0x2ff9();return a4_0x5ad8=function(_0x556e43,_0x1627ae){_0x556e43=_0x556e43-0x7f;let _0x2ff91a=_0x2f9c37[_0x556e43];return _0x2ff91a;},a4_0x5ad8(_0x38c952,_0x22523a);}const fs=require('fs'),path_1=require(a4_0x1935f2(0xab)),helper_1=require(a4_0x1935f2(0xa5));async function default_1({controller:_0xe1b893,tablestartUp:_0x58efa2,tablestartUpShort:_0x1dcb96,basedir:_0x55f0e0,Primary:_0x3fba4f,Comment:_0x13b1b5,moduleName:_0x4932b4,apporbasic:_0x50933b}){const _0x387fb5=a4_0x1935f2;if(_0xe1b893){const _0x3995de=_0x55f0e0+(typeof _0xe1b893==_0x387fb5(0x9a)?'/controller/'+_0xe1b893+'/'+_0x1dcb96+_0x387fb5(0x8e):_0x387fb5(0x8a)+_0x1dcb96+_0x387fb5(0x8e));if(!fs[_0x387fb5(0xb4)](_0x3995de)){let _0x1eea9c='',_0xdcc41a=['text',_0x387fb5(0xc2),_0x387fb5(0x9a)][_0x387fb5(0x9b)]((0x0,helper_1[_0x387fb5(0x90)])(_0x3fba4f[_0x387fb5(0x94)]))==-0x1;_0x1eea9c+=_0x387fb5(0x80),_0x1eea9c+=_0x387fb5(0x8c),_0x1eea9c+='import\x20{\x20'+_0x58efa2+_0x387fb5(0xba)+(typeof _0x4932b4==_0x387fb5(0x9a)?'@/apps/'+_0x4932b4:'@/'+_0x50933b)+_0x387fb5(0xae)+_0x1dcb96+_0x387fb5(0xaf),_0x1eea9c+='import\x20{\x20'+_0x58efa2+_0x387fb5(0x9e)+(typeof _0x4932b4==_0x387fb5(0x9a)?_0x387fb5(0xa2)+_0x4932b4:'@/'+_0x50933b)+'/validators/'+_0x1dcb96+'/Search\x27;\x0a',_0x1eea9c+=_0x387fb5(0xc3)+_0x58efa2+_0x387fb5(0xb6)+(typeof _0x4932b4==_0x387fb5(0x9a)?_0x387fb5(0xa2)+_0x4932b4:'@/'+_0x50933b)+_0x387fb5(0xb1)+_0x1dcb96+_0x387fb5(0xa6),_0x1eea9c+=_0x387fb5(0xc3)+_0x58efa2+'DTOUpdate\x20}\x20from\x20\x27'+(typeof _0x4932b4==_0x387fb5(0x9a)?_0x387fb5(0xa2)+_0x4932b4:'@/'+_0x50933b)+_0x387fb5(0xb1)+_0x1dcb96+_0x387fb5(0xa8),_0x1eea9c+=_0x387fb5(0x9c)+_0x13b1b5+_0x387fb5(0x84),_0x1eea9c+='export\x20class\x20'+(typeof _0xe1b893=='string'?_0xe1b893[_0x387fb5(0xb8)](0x0,0x1)['toUpperCase']()+_0xe1b893[_0x387fb5(0xb8)](0x1):'')+_0x58efa2+_0x387fb5(0x92),_0x1eea9c+='\x20\x20\x20\x20@Inject()\x20protected\x20ctx:\x20Context;\x0a\x0a',_0x1eea9c+='\x20\x20\x20\x20@Inject()\x20protected\x20'+_0x58efa2+_0x387fb5(0x98)+_0x58efa2+'Handler\x0a\x0a\x0a',_0x1eea9c+=_0x387fb5(0xbe),_0x1eea9c+=_0x387fb5(0xbd)+_0x58efa2+_0x387fb5(0xb7),_0x1eea9c+=_0x387fb5(0x82)+_0x58efa2+_0x387fb5(0x8f),_0x1eea9c+='\x20\x20\x20\x20\x20\x20\x20\x20return\x20this.ctx.ok(pagelist,\x20{\x20pageinfo,\x20pagetotal\x20});\x0a',_0x1eea9c+='\x20\x20\x20\x20}\x0a\x0a\x0a',_0x1eea9c+=_0x387fb5(0xbb)+_0x3fba4f['Field']+_0x387fb5(0x84),_0x1eea9c+='\x20\x20\x20\x20async\x20detail('+_0x3fba4f[_0x387fb5(0xad)]+':\x20'+(_0xdcc41a?_0x387fb5(0xbc):'string')+')\x20{\x0a',_0x1eea9c+=_0x387fb5(0xa7)+_0x58efa2+'DTOSearch\x20=\x20{\x20'+_0x3fba4f[_0x387fb5(0xad)]+_0x387fb5(0x85),_0x1eea9c+=_0x387fb5(0xc4)+_0x58efa2+_0x387fb5(0x8d),_0x1eea9c+='\x20\x20\x20\x20\x20\x20\x20\x20return\x20this.ctx.ok(tmpModel);\x0a',_0x1eea9c+=_0x387fb5(0x93),_0x1eea9c+=_0x387fb5(0x96),_0x1eea9c+=_0x387fb5(0x83)+_0x58efa2+_0x387fb5(0x8b),_0x1eea9c+=_0x387fb5(0xc4)+_0x58efa2+_0x387fb5(0xac),_0x1eea9c+=_0x387fb5(0xb3),_0x1eea9c+=_0x387fb5(0x93),_0x1eea9c+=_0x387fb5(0xc1)+_0x3fba4f['Field']+_0x387fb5(0x84),_0x1eea9c+=_0x387fb5(0xc0)+_0x3fba4f[_0x387fb5(0xad)]+':\x20'+(_0xdcc41a?_0x387fb5(0xbc):_0x387fb5(0x9a))+_0x387fb5(0x88)+_0x58efa2+_0x387fb5(0xa1),_0x1eea9c+=_0x387fb5(0xa7)+_0x58efa2+'DTOSearch\x20=\x20{\x20'+_0x3fba4f[_0x387fb5(0xad)]+_0x387fb5(0x85),_0x1eea9c+='\x20\x20\x20\x20\x20\x20\x20\x20const\x20tmpModel\x20=\x20await\x20this.'+_0x58efa2+_0x387fb5(0x81),_0x1eea9c+=_0x387fb5(0xb3),_0x1eea9c+='\x20\x20\x20\x20}\x0a\x0a\x0a',_0x1eea9c+=_0x387fb5(0x97),_0x1eea9c+='\x20\x20\x20\x20async\x20remove(conditions:\x20'+_0x58efa2+_0x387fb5(0xa0),_0x1eea9c+=_0x387fb5(0x7f)+_0x58efa2+_0x387fb5(0xa3),_0x1eea9c+=_0x387fb5(0x86),_0x1eea9c+=_0x387fb5(0x93),_0x1eea9c+='}',!fs[_0x387fb5(0xb4)]((0x0,path_1[_0x387fb5(0x95)])(_0x3995de))&&fs['mkdirSync']((0x0,path_1[_0x387fb5(0x95)])(_0x3995de),{'recursive':!![]}),fs['writeFileSync'](_0x3995de,_0x1eea9c,_0x387fb5(0xa9));}}}exports['default']=default_1;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export default function ({ tablestartUp, tablestartUpShort, basedir, Comment, Fields }: {
|
|
2
|
-
tablestartUp: any;
|
|
3
|
-
tablestartUpShort: any;
|
|
4
|
-
basedir: any;
|
|
5
|
-
Comment: any;
|
|
6
|
-
Fields: any;
|
|
7
|
-
}): Promise<void>;
|
|
1
|
+
export default function ({ tablestartUp, tablestartUpShort, basedir, Comment, Fields }: {
|
|
2
|
+
tablestartUp: any;
|
|
3
|
+
tablestartUpShort: any;
|
|
4
|
+
basedir: any;
|
|
5
|
+
Comment: any;
|
|
6
|
+
Fields: any;
|
|
7
|
+
}): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a5_0x386a47=a5_0x5899;(function(_0x9c8dab,_0x267a90){const _0x3b2ff8=a5_0x5899,_0x269b43=_0x9c8dab();while(!![]){try{const _0x4a31b7=-parseInt(_0x3b2ff8(0xf5))/0x1+parseInt(_0x3b2ff8(0xd0))/0x2*(parseInt(_0x3b2ff8(0xe9))/0x3)+parseInt(_0x3b2ff8(0xd3))/0x4*(-parseInt(_0x3b2ff8(0xd9))/0x5)+-parseInt(_0x3b2ff8(0xea))/0x6+parseInt(_0x3b2ff8(0xdf))/0x7+-parseInt(_0x3b2ff8(0xd8))/0x8+parseInt(_0x3b2ff8(0xe8))/0x9;if(_0x4a31b7===_0x267a90)break;else _0x269b43['push'](_0x269b43['shift']());}catch(_0x44af2c){_0x269b43['push'](_0x269b43['shift']());}}}(a5_0x156c,0xcd439));const a5_0x367b0f=(function(){let _0x246ab5=!![];return function(_0x56b6bc,_0x18928e){const _0x33b259=_0x246ab5?function(){if(_0x18928e){const _0x25ffaf=_0x18928e['apply'](_0x56b6bc,arguments);return _0x18928e=null,_0x25ffaf;}}:function(){};return _0x246ab5=![],_0x33b259;};}()),a5_0x2aa69b=a5_0x367b0f(this,function(){const _0x26ada7=a5_0x5899;return a5_0x2aa69b[_0x26ada7(0xeb)]()['search']('(((.+)+)+)+$')['toString']()[_0x26ada7(0xdc)](a5_0x2aa69b)[_0x26ada7(0xd2)](_0x26ada7(0xe7));});a5_0x2aa69b();'use strict';function a5_0x156c(){const _0x629f5f=['/exceptions/','7754376ObBrei','-错误信息设置\x0a','-常量设置\x0a','/**\x0a','Comment','tinyint','\x20*\x20','_ON:\x20number\x20=\x201;\x0a\x0a','(((.+)+)+)+$','21344769ApMgOb','2219970KEsndq','5482950idHdBo','toString','\x27,\x20\x27开启','defineProperty','toUpperCase','path','\x20\x20\x20\x20static\x20readonly\x20','Enum\x20{\x0a\x0a','existsSync','Error\x20extends\x20AnnError\x20{\x0a\x0a','dirname','358027OsPGmY','utf-8','default','\x20\x20\x20\x20@AnnEnumMsg(\x27','.ts','2yFjsOI','\x20*\x20**/\x0a','search','16oQIBPF','writeFileSync','export\x20class\x20','_OFF:\x20number\x20=\x200;\x0a\x0a\x0a','mkdirSync','5328304JoXxvE','1800935eMAFyy','getProp','../helper','constructor','\x27,\x20\x27关闭'];a5_0x156c=function(){return _0x629f5f;};return a5_0x156c();}Object[a5_0x386a47(0xed)](exports,'__esModule',{'value':!![]});const fs=require('fs'),path=require(a5_0x386a47(0xef)),helper_1=require(a5_0x386a47(0xdb));async function default_1({tablestartUp:_0x49b364,tablestartUpShort:_0x4d6473,basedir:_0x399372,Comment:_0x316060,Fields:_0x3b64b7}){await entity_emum({'tablestartUp':_0x49b364,'tablestartUpShort':_0x4d6473,'basedir':_0x399372,'Comment':_0x316060,'Fields':_0x3b64b7}),await entity_exceptions({'tablestartUp':_0x49b364,'tablestartUpShort':_0x4d6473,'basedir':_0x399372,'Comment':_0x316060});}exports[a5_0x386a47(0xf7)]=default_1;function a5_0x5899(_0x299074,_0x56e361){const _0x1bca6d=a5_0x156c();return a5_0x5899=function(_0x2aa69b,_0x367b0f){_0x2aa69b=_0x2aa69b-0xce;let _0x156cf1=_0x1bca6d[_0x2aa69b];return _0x156cf1;},a5_0x5899(_0x299074,_0x56e361);}async function entity_emum({tablestartUp:_0x102ac9,tablestartUpShort:_0x3eaec9,basedir:_0xd4b5d3,Comment:_0x103d5e,Fields:_0x57db56}){const _0x6f6b5a=a5_0x386a47,_0x5d2734=_0xd4b5d3+('/enums/'+_0x3eaec9+_0x6f6b5a(0xcf));if(!fs[_0x6f6b5a(0xf2)](_0x5d2734)){let _0x405bac='';_0x405bac+='/**\x0a',_0x405bac+=_0x6f6b5a(0xe5)+_0x103d5e+_0x6f6b5a(0xe1),_0x405bac+=_0x6f6b5a(0xd1),_0x405bac+=_0x6f6b5a(0xd5)+_0x102ac9+_0x6f6b5a(0xf1);for(let _0x279361 in _0x57db56){let _0x10833c=_0x57db56[_0x279361],_0xfa14a9=(0x0,helper_1[_0x6f6b5a(0xda)])(_0x10833c['Type']);[_0x6f6b5a(0xe4)]['indexOf'](_0xfa14a9)!=-0x1&&(_0x405bac+=_0x6f6b5a(0xce)+_0x279361+_0x6f6b5a(0xec)+_0x10833c[_0x6f6b5a(0xe3)]+'\x27)\x0a',_0x405bac+=_0x6f6b5a(0xf0)+_0x279361[_0x6f6b5a(0xee)]()+_0x6f6b5a(0xe6),_0x405bac+=_0x6f6b5a(0xce)+_0x279361+_0x6f6b5a(0xdd)+_0x10833c[_0x6f6b5a(0xe3)]+'\x27)\x0a',_0x405bac+=_0x6f6b5a(0xf0)+_0x279361[_0x6f6b5a(0xee)]()+_0x6f6b5a(0xd6));}_0x405bac+='}',!fs['existsSync'](path[_0x6f6b5a(0xf4)](_0x5d2734))&&fs[_0x6f6b5a(0xd7)](path['dirname'](_0x5d2734),{'recursive':!![]}),fs[_0x6f6b5a(0xd4)](_0x5d2734,_0x405bac,_0x6f6b5a(0xf6));}}async function entity_exceptions({tablestartUp:_0xce7cef,tablestartUpShort:_0x596c3c,basedir:_0x34b097,Comment:_0x535d7a}){const _0x2a878d=a5_0x386a47,_0x11e530=_0x34b097+(_0x2a878d(0xde)+_0x596c3c+_0x2a878d(0xcf));if(!fs[_0x2a878d(0xf2)](_0x11e530)){let _0x5e7069='';_0x5e7069+=_0x2a878d(0xe2),_0x5e7069+='\x20*\x20'+_0x535d7a+_0x2a878d(0xe0),_0x5e7069+=_0x2a878d(0xd1),_0x5e7069+=_0x2a878d(0xd5)+_0xce7cef+_0x2a878d(0xf3),_0x5e7069+='}',!fs['existsSync'](path['dirname'](_0x11e530))&&fs[_0x2a878d(0xd7)](path[_0x2a878d(0xf4)](_0x11e530),{'recursive':!![]}),fs[_0x2a878d(0xd4)](_0x11e530,_0x5e7069,_0x2a878d(0xf6));}}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export default function ({ tablename, tablestartUp, tablestartUpShort, basedir, Primary, Fields, Comment, moduleName, apporbasic }: {
|
|
2
|
-
tablename: any;
|
|
3
|
-
tablestartUp: any;
|
|
4
|
-
tablestartUpShort: any;
|
|
5
|
-
basedir: any;
|
|
6
|
-
Primary: any;
|
|
7
|
-
Fields: any;
|
|
8
|
-
Comment: any;
|
|
9
|
-
moduleName: any;
|
|
10
|
-
apporbasic: any;
|
|
11
|
-
}): Promise<void>;
|
|
1
|
+
export default function ({ tablename, tablestartUp, tablestartUpShort, basedir, Primary, Fields, Comment, moduleName, apporbasic }: {
|
|
2
|
+
tablename: any;
|
|
3
|
+
tablestartUp: any;
|
|
4
|
+
tablestartUpShort: any;
|
|
5
|
+
basedir: any;
|
|
6
|
+
Primary: any;
|
|
7
|
+
Fields: any;
|
|
8
|
+
Comment: any;
|
|
9
|
+
moduleName: any;
|
|
10
|
+
apporbasic: any;
|
|
11
|
+
}): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a6_0x94bc(_0x3d7f73,_0x272db2){const _0x116b93=a6_0x3546();return a6_0x94bc=function(_0x4fb5a8,_0x4b837f){_0x4fb5a8=_0x4fb5a8-0x1b9;let _0x3546e3=_0x116b93[_0x4fb5a8];return _0x3546e3;},a6_0x94bc(_0x3d7f73,_0x272db2);}const a6_0x201c2b=a6_0x94bc;(function(_0x3d26d2,_0x549516){const _0x5d7922=a6_0x94bc,_0x1fc512=_0x3d26d2();while(!![]){try{const _0x5a93b2=parseInt(_0x5d7922(0x1bf))/0x1+parseInt(_0x5d7922(0x1f1))/0x2+parseInt(_0x5d7922(0x1d9))/0x3+parseInt(_0x5d7922(0x1d8))/0x4*(-parseInt(_0x5d7922(0x1d3))/0x5)+parseInt(_0x5d7922(0x1cf))/0x6*(parseInt(_0x5d7922(0x1d2))/0x7)+parseInt(_0x5d7922(0x205))/0x8*(-parseInt(_0x5d7922(0x1ca))/0x9)+parseInt(_0x5d7922(0x1da))/0xa*(-parseInt(_0x5d7922(0x212))/0xb);if(_0x5a93b2===_0x549516)break;else _0x1fc512['push'](_0x1fc512['shift']());}catch(_0x42d565){_0x1fc512['push'](_0x1fc512['shift']());}}}(a6_0x3546,0x61605));const a6_0x4b837f=(function(){let _0x1f102d=!![];return function(_0x26eafb,_0x341ebe){const _0xe7a73a=_0x1f102d?function(){const _0x3af0ed=a6_0x94bc;if(_0x341ebe){const _0x5958b8=_0x341ebe[_0x3af0ed(0x201)](_0x26eafb,arguments);return _0x341ebe=null,_0x5958b8;}}:function(){};return _0x1f102d=![],_0xe7a73a;};}()),a6_0x4fb5a8=a6_0x4b837f(this,function(){const _0x120f6f=a6_0x94bc;return a6_0x4fb5a8[_0x120f6f(0x1fa)]()['search'](_0x120f6f(0x1f3))[_0x120f6f(0x1fa)]()[_0x120f6f(0x218)](a6_0x4fb5a8)['search'](_0x120f6f(0x1f3));});a6_0x4fb5a8();'use strict';Object[a6_0x201c2b(0x21d)](exports,a6_0x201c2b(0x20a),{'value':!![]}),exports[a6_0x201c2b(0x1f9)]=default_1;function a6_0x3546(){const _0x4972ad=['\x20\x20\x20\x20@Column({\x20comment:\x20\x27','defineProperty','date','replace','created_at','import\x20{\x20','\x20\x20\x20\x20@Column(\x27text\x27,\x20{\x20comment:\x20\x27','mediumtext','@ProvideSearch(','\x20\x20\x20\x20@Column(\x27json\x27,\x20{\x20comment:\x20\x27','479089ndWrgc','\x20\x20\x20\x20@Column(\x27enum\x27,\x20{\x20comment:\x20\x27','\x20\x20\x20\x20@Column(\x27decimal\x27,\x20{\x20comment:\x20\x27','\x20\x20\x20\x20@Column({\x20comment:\x20\x27默认显示排序\x27,\x20nullable:\x20true,\x20unique:\x20false\x20})\x0a','\x20\x20\x20\x20@PrimaryColumn({\x20comment:\x20\x27','path','updated_at','deleted_at',',\x20unique:\x20false\x20})\x0a','\x20\x20\x20\x20created_at:\x20Date;\x0a\x0a','\x20\x20\x20\x20@Column(\x27float\x27,\x20{\x20comment:\x20\x27','3573dFKIjd','utf-8','PrimaryGeneratedColumn','\x27,\x20enum:\x20[\x27','Entity)\x0a','668586tIDPDE','true','-实体处理器\x0a','7hUjXgg','30gNjOna','\x20\x20\x20\x20deleted_at:\x20Date;\x0a\x0a','@/apps/','\x20\x20\x20\x20@Column(\x27longtext\x27,\x20{\x20comment:\x20\x27','\x27\x20},\x20{\x20orderBy:\x20{\x20displayorder:\x20\x27DESC\x27\x20}\x20})\x0a','210344uvtNZx','1816752BCSqXO','10bHAmiK','\x20\x20\x20\x20displayorder:\x20number;\x0a\x0a','\x27,\x20precision:\x2024,\x20scale:\x202,\x20default:\x200.00,\x20nullable:\x20','indexOf','-实体\x0a','decimal','Search)\x0a','\x27;\x0a\x0a','Search\x20}\x20from\x20\x27','join','Comment','\x20\x20\x20\x20@UpdateDateColumn({\x20comment:\x20\x27修改时间\x27,\x20type:\x20\x27timestamp\x27\x20})\x0a','writeFileSync','YES','Type','\x27,\x20nullable:\x20','\x20\x20\x20\x20@Column(\x27timestamp\x27,\x20{\x20comment:\x20\x27','mkdirSync','\x20*\x20**/\x0a','\x20*\x20','enum','\x27\x20|\x20\x27','number','584208dVdfIh','Null','(((.+)+)+)+$','\x20\x20\x20\x20@PrimaryGeneratedColumn()\x0a','dirname','export\x20class\x20','PrimaryColumn','false','default','toString','double','import\x20{\x20CreateDateColumn,\x20UpdateDateColumn,\x20DeleteDateColumn\x20}\x20from\x20\x27@anncic-api/typeorm\x27;\x0a','Entity\x20}\x20from\x20\x27','/index.ts','timestamp','\x20})\x0a','apply','float',':\x20string;\x0a\x0a',':\x20number;\x0a\x0a','1072yXmqIy','text','Entity>{\x0a\x0a','displayorder','import\x20{\x20ProvideRepository,\x20Repository\x20}\x20from\x20\x27@anncic-api/typeorm\x27;\x0a','__esModule','\x20\x20\x20\x20','/entities/','existsSync','\x20extends\x20Repository<','\x27]\x20})\x0a','\x20\x20\x20\x20@CreateDateColumn({\x20comment:\x20\x27创建时间\x27,\x20type:\x20\x27timestamp\x27\x20})\x0a','getProp','7927051ZRfeGD','\x20\x20\x20\x20@Column(\x27mediumtext\x27,\x20{\x20comment:\x20\x27',':\x20\x27','\x27,\x20\x27','string','\x20\x20\x20\x20@DeleteDateColumn({\x20comment:\x20\x27删除时间\x27,\x20type:\x20\x27timestamp\x27,\x20select:\x20false\x20})\x0a','constructor','Field','//\x20import\x20{\x20ManyToOne,\x20JoinColumn\x20}\x20from\x20\x27@anncic-api/typeorm\x27;\x0a','json'];a6_0x3546=function(){return _0x4972ad;};return a6_0x3546();}const fs=require('fs'),path_1=require(a6_0x201c2b(0x1c4)),helper_1=require('../helper');async function default_1({tablename:_0x463688,tablestartUp:_0x9d9dff,tablestartUpShort:_0xe99048,basedir:_0x5d8919,Primary:_0x49b3bc,Fields:_0x3bc44d,Comment:_0x37b2ca,moduleName:_0x496164,apporbasic:_0x5cbfec}){await entity({'tablename':_0x463688,'tablestartUp':_0x9d9dff,'tablestartUpShort':_0xe99048,'basedir':_0x5d8919,'Primary':_0x49b3bc,'Fields':_0x3bc44d,'Comment':_0x37b2ca,'moduleName':_0x496164,'apporbasic':_0x5cbfec}),await repository({'tablestartUp':_0x9d9dff,'tablestartUpShort':_0xe99048,'basedir':_0x5d8919,'Comment':_0x37b2ca,'moduleName':_0x496164,'apporbasic':_0x5cbfec});}async function entity({tablename:_0x4a9400,tablestartUp:_0x4a21b2,tablestartUpShort:_0x5d946e,basedir:_0x2ac26d,Primary:_0x427285,Fields:_0x15ae33,Comment:_0x55d87d,moduleName:_0x2925e1,apporbasic:_0x3b1f15}){const _0x3be8ad=a6_0x201c2b,_0x4676e2=_0x2ac26d+('/entities/'+_0x5d946e+'/entity.ts');if(!fs[_0x3be8ad(0x20d)](_0x4676e2)){let _0x45c136='',_0x48f752='',_0x92271d=[_0x3be8ad(0x206),_0x3be8ad(0x1bc),_0x3be8ad(0x216)][_0x3be8ad(0x1dd)]((0x0,helper_1[_0x3be8ad(0x211)])(_0x427285['Type']))==-0x1;_0x92271d?(_0x45c136+=_0x3be8ad(0x1f4),_0x45c136+='\x20\x20\x20\x20'+_0x427285[_0x3be8ad(0x219)]+_0x3be8ad(0x204)):(_0x45c136+=_0x3be8ad(0x1c3)+(_0x427285['Comment']||'标识')+'\x27,\x20length:\x20188\x20})\x0a',_0x45c136+=_0x3be8ad(0x20b)+_0x427285[_0x3be8ad(0x219)]+_0x3be8ad(0x203));for(let _0x1258b3 in _0x15ae33){let _0x49a14d=_0x15ae33[_0x1258b3],_0x58977b=(0x0,helper_1[_0x3be8ad(0x211)])(_0x49a14d[_0x3be8ad(0x1e8)]);if(_0x49a14d[_0x3be8ad(0x219)]==_0x3be8ad(0x208)||_0x49a14d[_0x3be8ad(0x219)]==_0x3be8ad(0x1b9)||_0x49a14d[_0x3be8ad(0x219)]==_0x3be8ad(0x1c5)||_0x49a14d[_0x3be8ad(0x219)]==_0x3be8ad(0x1c6))continue;if(_0x58977b==_0x3be8ad(0x21b))_0x45c136+=_0x3be8ad(0x1be)+_0x49a14d['Comment']+'\x27,\x20nullable:\x20'+(_0x49a14d[_0x3be8ad(0x1f2)]=='YES'?'true':'false')+_0x3be8ad(0x1c7),_0x45c136+=_0x3be8ad(0x20b)+_0x49a14d['Field']+':\x20any\x20|\x20any[];\x0a\x0a';else{if(_0x58977b==_0x3be8ad(0x1ee)){let _0x745925=(0x0,helper_1['getEnum'])(_0x49a14d['Type']);_0x45c136+=_0x3be8ad(0x1c0)+_0x49a14d[_0x3be8ad(0x1e4)]+'\x27,\x20default:\x20\x27'+(_0x745925[0x0]||'')+_0x3be8ad(0x1cd)+_0x745925[_0x3be8ad(0x1e3)](_0x3be8ad(0x215))+_0x3be8ad(0x20f),_0x45c136+=_0x3be8ad(0x20b)+_0x49a14d['Field']+_0x3be8ad(0x214)+_0x745925[_0x3be8ad(0x1e3)](_0x3be8ad(0x1ef))+_0x3be8ad(0x1e1);}else{if(_0x58977b==_0x3be8ad(0x202))_0x45c136+=_0x3be8ad(0x1c9)+_0x49a14d[_0x3be8ad(0x1e4)]+'\x27,\x20precision:\x2010,\x20scale:\x202,\x20default:\x200.00,\x20nullable:\x20'+(_0x49a14d[_0x3be8ad(0x1f2)]==_0x3be8ad(0x1e7)?'true':_0x3be8ad(0x1f8))+_0x3be8ad(0x200),_0x45c136+=_0x3be8ad(0x20b)+_0x49a14d[_0x3be8ad(0x219)]+_0x3be8ad(0x204);else{if(_0x58977b==_0x3be8ad(0x1fb))_0x45c136+='\x20\x20\x20\x20@Column(\x27double\x27,\x20{\x20comment:\x20\x27'+_0x49a14d[_0x3be8ad(0x1e4)]+'\x27,\x20precision:\x2010,\x20scale:\x202,\x20default:\x200.00,\x20nullable:\x20'+(_0x49a14d[_0x3be8ad(0x1f2)]==_0x3be8ad(0x1e7)?_0x3be8ad(0x1d0):'false')+_0x3be8ad(0x200),_0x45c136+=_0x3be8ad(0x20b)+_0x49a14d[_0x3be8ad(0x219)]+_0x3be8ad(0x204);else{if(_0x58977b==_0x3be8ad(0x1df))_0x45c136+=_0x3be8ad(0x1c1)+_0x49a14d['Comment']+_0x3be8ad(0x1dc)+(_0x49a14d[_0x3be8ad(0x1f2)]==_0x3be8ad(0x1e7)?_0x3be8ad(0x1d0):'false')+'\x20})\x0a',_0x45c136+=_0x3be8ad(0x20b)+_0x49a14d[_0x3be8ad(0x219)]+_0x3be8ad(0x204);else{if(_0x58977b==_0x3be8ad(0x1f0))_0x45c136+=_0x3be8ad(0x21c)+_0x49a14d[_0x3be8ad(0x1e4)]+_0x3be8ad(0x1e9)+(_0x49a14d[_0x3be8ad(0x1f2)]==_0x3be8ad(0x1e7)?_0x3be8ad(0x1d0):_0x3be8ad(0x1f8))+_0x3be8ad(0x1c7),_0x45c136+=_0x3be8ad(0x20b)+_0x49a14d[_0x3be8ad(0x219)]+_0x3be8ad(0x204);else{if(_0x58977b=='tinyint')_0x45c136+='\x20\x20\x20\x20@Column(\x27tinyint\x27,\x20{\x20comment:\x20\x27'+_0x49a14d[_0x3be8ad(0x1e4)]+_0x3be8ad(0x1e9)+(_0x49a14d['Null']=='YES'?_0x3be8ad(0x1d0):_0x3be8ad(0x1f8))+_0x3be8ad(0x1c7),_0x45c136+=_0x3be8ad(0x20b)+_0x49a14d[_0x3be8ad(0x219)]+_0x3be8ad(0x204);else{if(_0x58977b==_0x3be8ad(0x21e))_0x45c136+='\x20\x20\x20\x20@Column(\x27date\x27,\x20{\x20comment:\x20\x27'+_0x49a14d[_0x3be8ad(0x1e4)]+_0x3be8ad(0x1e9)+(_0x49a14d[_0x3be8ad(0x1f2)]==_0x3be8ad(0x1e7)?_0x3be8ad(0x1d0):'false')+_0x3be8ad(0x200),_0x45c136+='\x20\x20\x20\x20'+_0x49a14d[_0x3be8ad(0x219)]+_0x3be8ad(0x203);else{if(_0x58977b=='datetime')_0x45c136+='\x20\x20\x20\x20@Column(\x27timestamp\x27,\x20{\x20comment:\x20\x27'+_0x49a14d[_0x3be8ad(0x1e4)]+_0x3be8ad(0x1e9)+(_0x49a14d[_0x3be8ad(0x1f2)]==_0x3be8ad(0x1e7)?_0x3be8ad(0x1d0):_0x3be8ad(0x1f8))+'\x20})\x0a',_0x45c136+=_0x3be8ad(0x20b)+_0x49a14d['Field']+_0x3be8ad(0x203);else{if(_0x58977b==_0x3be8ad(0x1ff))_0x45c136+=_0x3be8ad(0x1ea)+_0x49a14d[_0x3be8ad(0x1e4)]+_0x3be8ad(0x1e9)+(_0x49a14d[_0x3be8ad(0x1f2)]==_0x3be8ad(0x1e7)?_0x3be8ad(0x1d0):_0x3be8ad(0x1f8))+_0x3be8ad(0x200),_0x45c136+=_0x3be8ad(0x20b)+_0x49a14d[_0x3be8ad(0x219)]+_0x3be8ad(0x203);else{if(_0x58977b==_0x3be8ad(0x206))_0x45c136+=_0x3be8ad(0x1bb)+_0x49a14d[_0x3be8ad(0x1e4)]+_0x3be8ad(0x1e9)+(_0x49a14d['Null']=='YES'?_0x3be8ad(0x1d0):_0x3be8ad(0x1f8))+_0x3be8ad(0x1c7),_0x45c136+='\x20\x20\x20\x20'+_0x49a14d['Field']+_0x3be8ad(0x203);else{if(_0x58977b=='longtext')_0x45c136+=_0x3be8ad(0x1d6)+_0x49a14d[_0x3be8ad(0x1e4)]+_0x3be8ad(0x1e9)+(_0x49a14d[_0x3be8ad(0x1f2)]==_0x3be8ad(0x1e7)?_0x3be8ad(0x1d0):'false')+',\x20unique:\x20false\x20})\x0a',_0x45c136+=_0x3be8ad(0x20b)+_0x49a14d[_0x3be8ad(0x219)]+':\x20string;\x0a\x0a';else _0x58977b==_0x3be8ad(0x1bc)?(_0x45c136+=_0x3be8ad(0x213)+_0x49a14d[_0x3be8ad(0x1e4)]+_0x3be8ad(0x1e9)+(_0x49a14d['Null']==_0x3be8ad(0x1e7)?_0x3be8ad(0x1d0):_0x3be8ad(0x1f8))+_0x3be8ad(0x1c7),_0x45c136+='\x20\x20\x20\x20'+_0x49a14d[_0x3be8ad(0x219)]+':\x20string;\x0a\x0a'):(_0x45c136+=_0x3be8ad(0x21c)+_0x49a14d[_0x3be8ad(0x1e4)]+_0x3be8ad(0x1e9)+(_0x49a14d[_0x3be8ad(0x1f2)]==_0x3be8ad(0x1e7)?_0x3be8ad(0x1d0):_0x3be8ad(0x1f8))+_0x3be8ad(0x1c7),_0x45c136+='\x20\x20\x20\x20'+_0x49a14d['Field']+_0x3be8ad(0x203));}}}}}}}}}}}}_0x48f752+=_0x3be8ad(0x21a),_0x48f752+=_0x3be8ad(0x1fc),_0x48f752+='import\x20{\x20ProvideEntity,\x20ProvideSearch,\x20'+(_0x92271d?_0x3be8ad(0x1cc):_0x3be8ad(0x1f7))+',\x20Column\x20}\x20from\x20\x27@anncic-api/typeorm\x27;\x0a\x0a',_0x48f752+='import\x20{\x20'+_0x4a21b2+_0x3be8ad(0x1e2)+(typeof _0x2925e1==_0x3be8ad(0x216)?_0x3be8ad(0x1d5)+_0x2925e1:'@/'+_0x3b1f15)+'/searchs/'+_0x5d946e+_0x3be8ad(0x1e1),_0x48f752+='/**\x0a',_0x48f752+=_0x3be8ad(0x1ed)+_0x55d87d+_0x3be8ad(0x1de),_0x48f752+=_0x3be8ad(0x1ec),_0x48f752+=_0x3be8ad(0x1bd)+_0x4a21b2+_0x3be8ad(0x1e0),_0x48f752+='@ProvideEntity({\x20tableName:\x20\x27'+_0x4a9400+_0x3be8ad(0x1d7),_0x48f752+=_0x3be8ad(0x1f6)+_0x4a21b2+'Entity\x20{\x0a\x0a',_0x48f752+='%column%',_0x48f752+=_0x3be8ad(0x1c2),_0x48f752+=_0x3be8ad(0x1db),_0x48f752+=_0x3be8ad(0x210),_0x48f752+=_0x3be8ad(0x1c8),_0x48f752+=_0x3be8ad(0x1e5),_0x48f752+='\x20\x20\x20\x20updated_at:\x20Date;\x0a\x0a',_0x48f752+=_0x3be8ad(0x217),_0x48f752+=_0x3be8ad(0x1d4),_0x48f752+='}',_0x48f752=_0x48f752[_0x3be8ad(0x21f)]('%column%',_0x45c136),!fs[_0x3be8ad(0x20d)]((0x0,path_1[_0x3be8ad(0x1f5)])(_0x4676e2))&&fs[_0x3be8ad(0x1eb)]((0x0,path_1[_0x3be8ad(0x1f5)])(_0x4676e2),{'recursive':!![]}),fs[_0x3be8ad(0x1e6)](_0x4676e2,_0x48f752,_0x3be8ad(0x1cb));}}async function repository({tablestartUp:_0x5c6f0c,tablestartUpShort:_0x19ad3d,basedir:_0x3f15b3,Comment:_0x1717b8,moduleName:_0x57ff3c,apporbasic:_0x43ca6b}){const _0x1d3968=a6_0x201c2b,_0x3b87f3=_0x3f15b3+(_0x1d3968(0x20c)+_0x19ad3d+_0x1d3968(0x1fe));if(!fs[_0x1d3968(0x20d)](_0x3b87f3)){let _0x17b119='';_0x17b119+='/**\x0a',_0x17b119+='\x20*\x20'+_0x1717b8+_0x1d3968(0x1d1),_0x17b119+=_0x1d3968(0x1ec),_0x17b119+=_0x1d3968(0x209),_0x17b119+=_0x1d3968(0x1ba)+_0x5c6f0c+_0x1d3968(0x1fd)+(typeof _0x57ff3c==_0x1d3968(0x216)?_0x1d3968(0x1d5)+_0x57ff3c:'@/'+_0x43ca6b)+_0x1d3968(0x20c)+_0x19ad3d+'/entity\x27;\x0a\x0a',_0x17b119+='@ProvideRepository('+_0x5c6f0c+_0x1d3968(0x1ce),_0x17b119+='export\x20class\x20'+_0x5c6f0c+_0x1d3968(0x20e)+_0x5c6f0c+_0x1d3968(0x207),_0x17b119+='}',!fs['existsSync']((0x0,path_1['dirname'])(_0x3b87f3))&&fs[_0x1d3968(0x1eb)]((0x0,path_1[_0x1d3968(0x1f5)])(_0x3b87f3),{'recursive':!![]}),fs[_0x1d3968(0x1e6)](_0x3b87f3,_0x17b119,_0x1d3968(0x1cb));}}
|
|
1
|
+
const a6_0x3a3b42=a6_0x2e94;(function(_0x512387,_0x202dbe){const _0x20299a=a6_0x2e94,_0x250da0=_0x512387();while(!![]){try{const _0x1d8da5=-parseInt(_0x20299a(0x11e))/0x1+-parseInt(_0x20299a(0x125))/0x2+parseInt(_0x20299a(0x16d))/0x3*(parseInt(_0x20299a(0x158))/0x4)+parseInt(_0x20299a(0x14c))/0x5+-parseInt(_0x20299a(0x11c))/0x6*(-parseInt(_0x20299a(0x15b))/0x7)+parseInt(_0x20299a(0x12c))/0x8+parseInt(_0x20299a(0x150))/0x9*(-parseInt(_0x20299a(0x10a))/0xa);if(_0x1d8da5===_0x202dbe)break;else _0x250da0['push'](_0x250da0['shift']());}catch(_0x3fbb53){_0x250da0['push'](_0x250da0['shift']());}}}(a6_0x2f8a,0x96012));function a6_0x2e94(_0x34bc9f,_0x3ba0a8){const _0x3fcdac=a6_0x2f8a();return a6_0x2e94=function(_0x1957cd,_0xb4b1f9){_0x1957cd=_0x1957cd-0x109;let _0x2f8a61=_0x3fcdac[_0x1957cd];return _0x2f8a61;},a6_0x2e94(_0x34bc9f,_0x3ba0a8);}const a6_0xb4b1f9=(function(){let _0x100019=!![];return function(_0x58323f,_0x414501){const _0x1efc20=_0x100019?function(){if(_0x414501){const _0x34961f=_0x414501['apply'](_0x58323f,arguments);return _0x414501=null,_0x34961f;}}:function(){};return _0x100019=![],_0x1efc20;};}()),a6_0x1957cd=a6_0xb4b1f9(this,function(){const _0x114c11=a6_0x2e94;return a6_0x1957cd[_0x114c11(0x127)]()[_0x114c11(0x111)](_0x114c11(0x112))[_0x114c11(0x127)]()[_0x114c11(0x14d)](a6_0x1957cd)['search'](_0x114c11(0x112));});a6_0x1957cd();'use strict';Object['defineProperty'](exports,a6_0x3a3b42(0x144),{'value':!![]});const fs=require('fs'),path_1=require(a6_0x3a3b42(0x126)),helper_1=require('../helper');async function default_1({tablename:_0x9833d5,tablestartUp:_0x53c17e,tablestartUpShort:_0x5ceca6,basedir:_0x4efa59,Primary:_0x1d0beb,Fields:_0xd65994,Comment:_0x2b299d,moduleName:_0x2c9934,apporbasic:_0x1f8a7e}){await entity({'tablename':_0x9833d5,'tablestartUp':_0x53c17e,'tablestartUpShort':_0x5ceca6,'basedir':_0x4efa59,'Primary':_0x1d0beb,'Fields':_0xd65994,'Comment':_0x2b299d,'moduleName':_0x2c9934,'apporbasic':_0x1f8a7e}),await repository({'tablestartUp':_0x53c17e,'tablestartUpShort':_0x5ceca6,'basedir':_0x4efa59,'Comment':_0x2b299d,'moduleName':_0x2c9934,'apporbasic':_0x1f8a7e});}exports[a6_0x3a3b42(0x160)]=default_1;async function entity({tablename:_0x15c7ed,tablestartUp:_0x5910ce,tablestartUpShort:_0x105b93,basedir:_0x36e68b,Primary:_0x1e2097,Fields:_0x2d1e80,Comment:_0x278422,moduleName:_0x4ea522,apporbasic:_0xd6c52}){const _0x1d0cfb=a6_0x3a3b42,_0xe8cc07=_0x36e68b+(_0x1d0cfb(0x118)+_0x105b93+'/entity.ts');if(!fs[_0x1d0cfb(0x135)](_0xe8cc07)){let _0x28602e='',_0x22eb15='',_0x2340e0=[_0x1d0cfb(0x136),_0x1d0cfb(0x16e),_0x1d0cfb(0x10e)]['indexOf']((0x0,helper_1[_0x1d0cfb(0x133)])(_0x1e2097[_0x1d0cfb(0x141)]))==-0x1;_0x2340e0?(_0x28602e+='\x20\x20\x20\x20@PrimaryGeneratedColumn()\x0a',_0x28602e+=_0x1d0cfb(0x15a)+_0x1e2097[_0x1d0cfb(0x115)]+_0x1d0cfb(0x132)):(_0x28602e+=_0x1d0cfb(0x146)+(_0x1e2097[_0x1d0cfb(0x142)]||'标识')+'\x27,\x20length:\x20188\x20})\x0a',_0x28602e+='\x20\x20\x20\x20'+_0x1e2097[_0x1d0cfb(0x115)]+_0x1d0cfb(0x145));for(let _0x432983 in _0x2d1e80){let _0x5ef318=_0x2d1e80[_0x432983],_0x59cc8b=(0x0,helper_1[_0x1d0cfb(0x133)])(_0x5ef318['Type']);if(_0x5ef318[_0x1d0cfb(0x115)]==_0x1d0cfb(0x11a)||_0x5ef318[_0x1d0cfb(0x115)]=='created_at'||_0x5ef318[_0x1d0cfb(0x115)]==_0x1d0cfb(0x14a)||_0x5ef318['Field']=='deleted_at')continue;if(_0x59cc8b==_0x1d0cfb(0x113))_0x28602e+=_0x1d0cfb(0x10b)+_0x5ef318[_0x1d0cfb(0x142)]+_0x1d0cfb(0x139)+(_0x5ef318[_0x1d0cfb(0x12f)]==_0x1d0cfb(0x13e)?_0x1d0cfb(0x16a):_0x1d0cfb(0x14f))+_0x1d0cfb(0x11f),_0x28602e+=_0x1d0cfb(0x15a)+_0x5ef318[_0x1d0cfb(0x115)]+_0x1d0cfb(0x10f);else{if(_0x59cc8b==_0x1d0cfb(0x151)){let _0x53ea6f=(0x0,helper_1[_0x1d0cfb(0x14b)])(_0x5ef318[_0x1d0cfb(0x141)]);_0x28602e+=_0x1d0cfb(0x109)+_0x5ef318[_0x1d0cfb(0x142)]+'\x27,\x20default:\x20\x27'+(_0x53ea6f[0x0]||'')+'\x27,\x20enum:\x20[\x27'+_0x53ea6f['join'](_0x1d0cfb(0x143))+_0x1d0cfb(0x165),_0x28602e+=_0x1d0cfb(0x15a)+_0x5ef318['Field']+_0x1d0cfb(0x137)+_0x53ea6f['join']('\x27\x20|\x20\x27')+'\x27;\x0a\x0a';}else{if(_0x59cc8b==_0x1d0cfb(0x140))_0x28602e+=_0x1d0cfb(0x147)+_0x5ef318[_0x1d0cfb(0x142)]+'\x27,\x20precision:\x2010,\x20scale:\x202,\x20default:\x200.00,\x20nullable:\x20'+(_0x5ef318[_0x1d0cfb(0x12f)]==_0x1d0cfb(0x13e)?'true':_0x1d0cfb(0x14f))+_0x1d0cfb(0x122),_0x28602e+='\x20\x20\x20\x20'+_0x5ef318[_0x1d0cfb(0x115)]+':\x20number;\x0a\x0a';else{if(_0x59cc8b==_0x1d0cfb(0x15c))_0x28602e+=_0x1d0cfb(0x124)+_0x5ef318[_0x1d0cfb(0x142)]+_0x1d0cfb(0x13c)+(_0x5ef318['Null']==_0x1d0cfb(0x13e)?_0x1d0cfb(0x16a):_0x1d0cfb(0x14f))+_0x1d0cfb(0x122),_0x28602e+=_0x1d0cfb(0x15a)+_0x5ef318[_0x1d0cfb(0x115)]+_0x1d0cfb(0x132);else{if(_0x59cc8b==_0x1d0cfb(0x168))_0x28602e+='\x20\x20\x20\x20@Column(\x27decimal\x27,\x20{\x20comment:\x20\x27'+_0x5ef318['Comment']+_0x1d0cfb(0x16b)+(_0x5ef318[_0x1d0cfb(0x12f)]==_0x1d0cfb(0x13e)?_0x1d0cfb(0x16a):_0x1d0cfb(0x14f))+_0x1d0cfb(0x122),_0x28602e+=_0x1d0cfb(0x15a)+_0x5ef318[_0x1d0cfb(0x115)]+_0x1d0cfb(0x132);else{if(_0x59cc8b==_0x1d0cfb(0x161))_0x28602e+=_0x1d0cfb(0x15d)+_0x5ef318[_0x1d0cfb(0x142)]+_0x1d0cfb(0x139)+(_0x5ef318[_0x1d0cfb(0x12f)]==_0x1d0cfb(0x13e)?'true':_0x1d0cfb(0x14f))+',\x20unique:\x20false\x20})\x0a',_0x28602e+=_0x1d0cfb(0x15a)+_0x5ef318[_0x1d0cfb(0x115)]+_0x1d0cfb(0x132);else{if(_0x59cc8b=='tinyint')_0x28602e+=_0x1d0cfb(0x13b)+_0x5ef318[_0x1d0cfb(0x142)]+_0x1d0cfb(0x139)+(_0x5ef318[_0x1d0cfb(0x12f)]==_0x1d0cfb(0x13e)?_0x1d0cfb(0x16a):'false')+',\x20unique:\x20false\x20})\x0a',_0x28602e+=_0x1d0cfb(0x15a)+_0x5ef318[_0x1d0cfb(0x115)]+':\x20number;\x0a\x0a';else{if(_0x59cc8b=='date')_0x28602e+='\x20\x20\x20\x20@Column(\x27date\x27,\x20{\x20comment:\x20\x27'+_0x5ef318[_0x1d0cfb(0x142)]+_0x1d0cfb(0x139)+(_0x5ef318['Null']=='YES'?_0x1d0cfb(0x16a):'false')+_0x1d0cfb(0x122),_0x28602e+=_0x1d0cfb(0x15a)+_0x5ef318[_0x1d0cfb(0x115)]+_0x1d0cfb(0x145);else{if(_0x59cc8b=='datetime')_0x28602e+='\x20\x20\x20\x20@Column(\x27timestamp\x27,\x20{\x20comment:\x20\x27'+_0x5ef318[_0x1d0cfb(0x142)]+'\x27,\x20nullable:\x20'+(_0x5ef318[_0x1d0cfb(0x12f)]==_0x1d0cfb(0x13e)?_0x1d0cfb(0x16a):_0x1d0cfb(0x14f))+'\x20})\x0a',_0x28602e+='\x20\x20\x20\x20'+_0x5ef318[_0x1d0cfb(0x115)]+':\x20string;\x0a\x0a';else{if(_0x59cc8b==_0x1d0cfb(0x119))_0x28602e+=_0x1d0cfb(0x16f)+_0x5ef318['Comment']+_0x1d0cfb(0x139)+(_0x5ef318[_0x1d0cfb(0x12f)]==_0x1d0cfb(0x13e)?_0x1d0cfb(0x16a):'false')+'\x20})\x0a',_0x28602e+='\x20\x20\x20\x20'+_0x5ef318['Field']+_0x1d0cfb(0x145);else{if(_0x59cc8b==_0x1d0cfb(0x136))_0x28602e+=_0x1d0cfb(0x13a)+_0x5ef318[_0x1d0cfb(0x142)]+'\x27,\x20nullable:\x20'+(_0x5ef318[_0x1d0cfb(0x12f)]=='YES'?_0x1d0cfb(0x16a):_0x1d0cfb(0x14f))+',\x20unique:\x20false\x20})\x0a',_0x28602e+=_0x1d0cfb(0x15a)+_0x5ef318[_0x1d0cfb(0x115)]+_0x1d0cfb(0x145);else{if(_0x59cc8b==_0x1d0cfb(0x114))_0x28602e+='\x20\x20\x20\x20@Column(\x27longtext\x27,\x20{\x20comment:\x20\x27'+_0x5ef318[_0x1d0cfb(0x142)]+'\x27,\x20nullable:\x20'+(_0x5ef318['Null']=='YES'?'true':_0x1d0cfb(0x14f))+',\x20unique:\x20false\x20})\x0a',_0x28602e+=_0x1d0cfb(0x15a)+_0x5ef318[_0x1d0cfb(0x115)]+':\x20string;\x0a\x0a';else _0x59cc8b==_0x1d0cfb(0x16e)?(_0x28602e+=_0x1d0cfb(0x12a)+_0x5ef318[_0x1d0cfb(0x142)]+_0x1d0cfb(0x139)+(_0x5ef318['Null']==_0x1d0cfb(0x13e)?_0x1d0cfb(0x16a):_0x1d0cfb(0x14f))+_0x1d0cfb(0x11f),_0x28602e+=_0x1d0cfb(0x15a)+_0x5ef318[_0x1d0cfb(0x115)]+_0x1d0cfb(0x145)):(_0x28602e+=_0x1d0cfb(0x15d)+_0x5ef318[_0x1d0cfb(0x142)]+_0x1d0cfb(0x139)+(_0x5ef318[_0x1d0cfb(0x12f)]==_0x1d0cfb(0x13e)?'true':'false')+_0x1d0cfb(0x11f),_0x28602e+='\x20\x20\x20\x20'+_0x5ef318['Field']+_0x1d0cfb(0x145));}}}}}}}}}}}}_0x22eb15+=_0x1d0cfb(0x167),_0x22eb15+=_0x1d0cfb(0x16c),_0x22eb15+='import\x20{\x20ProvideEntity,\x20ProvideSearch,\x20'+(_0x2340e0?_0x1d0cfb(0x129):_0x1d0cfb(0x12e))+_0x1d0cfb(0x130),_0x22eb15+=_0x1d0cfb(0x155)+_0x5910ce+_0x1d0cfb(0x121)+(typeof _0x4ea522=='string'?'@/apps/'+_0x4ea522:'@/'+_0xd6c52)+_0x1d0cfb(0x163)+_0x105b93+_0x1d0cfb(0x138),_0x22eb15+=_0x1d0cfb(0x13f),_0x22eb15+=_0x1d0cfb(0x117)+_0x278422+_0x1d0cfb(0x164),_0x22eb15+=_0x1d0cfb(0x169),_0x22eb15+=_0x1d0cfb(0x149)+_0x5910ce+_0x1d0cfb(0x11d),_0x22eb15+=_0x1d0cfb(0x10d)+_0x15c7ed+_0x1d0cfb(0x14e),_0x22eb15+='export\x20class\x20'+_0x5910ce+_0x1d0cfb(0x12b),_0x22eb15+=_0x1d0cfb(0x10c),_0x22eb15+=_0x1d0cfb(0x166),_0x22eb15+=_0x1d0cfb(0x152),_0x22eb15+=_0x1d0cfb(0x131),_0x22eb15+=_0x1d0cfb(0x134),_0x22eb15+=_0x1d0cfb(0x148),_0x22eb15+=_0x1d0cfb(0x120),_0x22eb15+=_0x1d0cfb(0x15e),_0x22eb15+=_0x1d0cfb(0x154),_0x22eb15+='}',_0x22eb15=_0x22eb15[_0x1d0cfb(0x157)](_0x1d0cfb(0x10c),_0x28602e),!fs['existsSync']((0x0,path_1['dirname'])(_0xe8cc07))&&fs[_0x1d0cfb(0x11b)]((0x0,path_1[_0x1d0cfb(0x13d)])(_0xe8cc07),{'recursive':!![]}),fs[_0x1d0cfb(0x123)](_0xe8cc07,_0x22eb15,_0x1d0cfb(0x162));}}async function repository({tablestartUp:_0xe48e6,tablestartUpShort:_0x1d7862,basedir:_0x22346e,Comment:_0x15b6a8,moduleName:_0x4db356,apporbasic:_0x48fe6d}){const _0x40d670=a6_0x3a3b42,_0x3a021b=_0x22346e+(_0x40d670(0x118)+_0x1d7862+'/index.ts');if(!fs[_0x40d670(0x135)](_0x3a021b)){let _0x3edd85='';_0x3edd85+=_0x40d670(0x13f),_0x3edd85+=_0x40d670(0x117)+_0x15b6a8+_0x40d670(0x156),_0x3edd85+='\x20*\x20**/\x0a',_0x3edd85+='import\x20{\x20ProvideRepository,\x20Repository\x20}\x20from\x20\x27@anncic-api/typeorm\x27;\x0a',_0x3edd85+=_0x40d670(0x155)+_0xe48e6+_0x40d670(0x159)+(typeof _0x4db356==_0x40d670(0x10e)?_0x40d670(0x128)+_0x4db356:'@/'+_0x48fe6d)+_0x40d670(0x118)+_0x1d7862+'/entity\x27;\x0a\x0a',_0x3edd85+=_0x40d670(0x110)+_0xe48e6+_0x40d670(0x15f),_0x3edd85+=_0x40d670(0x116)+_0xe48e6+_0x40d670(0x153)+_0xe48e6+_0x40d670(0x12d),_0x3edd85+='}',!fs[_0x40d670(0x135)]((0x0,path_1[_0x40d670(0x13d)])(_0x3a021b))&&fs[_0x40d670(0x11b)]((0x0,path_1[_0x40d670(0x13d)])(_0x3a021b),{'recursive':!![]}),fs[_0x40d670(0x123)](_0x3a021b,_0x3edd85,_0x40d670(0x162));}}function a6_0x2f8a(){const _0x295615=['3806106iywagF','Search)\x0a','317030NlUYlS',',\x20unique:\x20false\x20})\x0a','\x20\x20\x20\x20updated_at:\x20Date;\x0a\x0a','Search\x20}\x20from\x20\x27','\x20})\x0a','writeFileSync','\x20\x20\x20\x20@Column(\x27double\x27,\x20{\x20comment:\x20\x27','22814nHvfWr','path','toString','@/apps/','PrimaryGeneratedColumn','\x20\x20\x20\x20@Column(\x27mediumtext\x27,\x20{\x20comment:\x20\x27','Entity\x20{\x0a\x0a','2360232QUlaHC','Entity>{\x0a\x0a','PrimaryColumn','Null',',\x20Column\x20}\x20from\x20\x27@anncic-api/typeorm\x27;\x0a\x0a','\x20\x20\x20\x20@CreateDateColumn({\x20comment:\x20\x27创建时间\x27,\x20type:\x20\x27timestamp\x27\x20})\x0a',':\x20number;\x0a\x0a','getProp','\x20\x20\x20\x20created_at:\x20Date;\x0a\x0a','existsSync','text',':\x20\x27','\x27;\x0a\x0a','\x27,\x20nullable:\x20','\x20\x20\x20\x20@Column(\x27text\x27,\x20{\x20comment:\x20\x27','\x20\x20\x20\x20@Column(\x27tinyint\x27,\x20{\x20comment:\x20\x27','\x27,\x20precision:\x2010,\x20scale:\x202,\x20default:\x200.00,\x20nullable:\x20','dirname','YES','/**\x0a','float','Type','Comment','\x27,\x20\x27','__esModule',':\x20string;\x0a\x0a','\x20\x20\x20\x20@PrimaryColumn({\x20comment:\x20\x27','\x20\x20\x20\x20@Column(\x27float\x27,\x20{\x20comment:\x20\x27','\x20\x20\x20\x20@UpdateDateColumn({\x20comment:\x20\x27修改时间\x27,\x20type:\x20\x27timestamp\x27\x20})\x0a','@ProvideSearch(','updated_at','getEnum','4534950xHGacy','constructor','\x27\x20},\x20{\x20orderBy:\x20{\x20displayorder:\x20\x27DESC\x27\x20}\x20})\x0a','false','4194OybzYA','enum','\x20\x20\x20\x20displayorder:\x20number;\x0a\x0a','\x20extends\x20Repository<','\x20\x20\x20\x20deleted_at:\x20Date;\x0a\x0a','import\x20{\x20','-实体处理器\x0a','replace','12auOngW','Entity\x20}\x20from\x20\x27','\x20\x20\x20\x20','7dgLCDw','double','\x20\x20\x20\x20@Column({\x20comment:\x20\x27','\x20\x20\x20\x20@DeleteDateColumn({\x20comment:\x20\x27删除时间\x27,\x20type:\x20\x27timestamp\x27,\x20select:\x20false\x20})\x0a','Entity)\x0a','default','number','utf-8','/searchs/','-实体\x0a','\x27]\x20})\x0a','\x20\x20\x20\x20@Column({\x20comment:\x20\x27默认显示排序\x27,\x20nullable:\x20true,\x20unique:\x20false\x20})\x0a','//\x20import\x20{\x20ManyToOne,\x20JoinColumn\x20}\x20from\x20\x27@anncic-api/typeorm\x27;\x0a','decimal','\x20*\x20**/\x0a','true','\x27,\x20precision:\x2024,\x20scale:\x202,\x20default:\x200.00,\x20nullable:\x20','import\x20{\x20CreateDateColumn,\x20UpdateDateColumn,\x20DeleteDateColumn\x20}\x20from\x20\x27@anncic-api/typeorm\x27;\x0a','275679bRRozX','mediumtext','\x20\x20\x20\x20@Column(\x27timestamp\x27,\x20{\x20comment:\x20\x27','\x20\x20\x20\x20@Column(\x27enum\x27,\x20{\x20comment:\x20\x27','25090fjbuhM','\x20\x20\x20\x20@Column(\x27json\x27,\x20{\x20comment:\x20\x27','%column%','@ProvideEntity({\x20tableName:\x20\x27','string',':\x20any\x20|\x20any[];\x0a\x0a','@ProvideRepository(','search','(((.+)+)+)+$','json','longtext','Field','export\x20class\x20','\x20*\x20','/entities/','timestamp','displayorder','mkdirSync'];a6_0x2f8a=function(){return _0x295615;};return a6_0x2f8a();}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export default function ({ tablestartUp, tablestartUpShort, basedir, moduleName, apporbasic }: {
|
|
2
|
-
tablestartUp: any;
|
|
3
|
-
tablestartUpShort: any;
|
|
4
|
-
basedir: any;
|
|
5
|
-
moduleName: any;
|
|
6
|
-
apporbasic: any;
|
|
7
|
-
}): Promise<void>;
|
|
1
|
+
export default function ({ tablestartUp, tablestartUpShort, basedir, moduleName, apporbasic }: {
|
|
2
|
+
tablestartUp: any;
|
|
3
|
+
tablestartUpShort: any;
|
|
4
|
+
basedir: any;
|
|
5
|
+
moduleName: any;
|
|
6
|
+
apporbasic: any;
|
|
7
|
+
}): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a7_0x3d9a90=a7_0x320e;(function(_0x48c4dc,_0x3ce472){const _0x44ddb2=a7_0x320e,_0x6df781=_0x48c4dc();while(!![]){try{const _0xacc66e=parseInt(_0x44ddb2(0x16f))/0x1*(-parseInt(_0x44ddb2(0x168))/0x2)+-parseInt(_0x44ddb2(0x166))/0x3*(parseInt(_0x44ddb2(0x156))/0x4)+-parseInt(_0x44ddb2(0x171))/0x5*(-parseInt(_0x44ddb2(0x167))/0x6)+parseInt(_0x44ddb2(0x16b))/0x7+parseInt(_0x44ddb2(0x153))/0x8+parseInt(_0x44ddb2(0x15c))/0x9+parseInt(_0x44ddb2(0x155))/0xa*(-parseInt(_0x44ddb2(0x160))/0xb);if(_0xacc66e===_0x3ce472)break;else _0x6df781['push'](_0x6df781['shift']());}catch(_0x2565c1){_0x6df781['push'](_0x6df781['shift']());}}}(a7_0x5904,0xafb7c));const a7_0xf6c720=(function(){let _0x451dce=!![];return function(_0x1a5bb0,_0x3adaf7){const _0x339db9=_0x451dce?function(){const _0x5c1ef5=a7_0x320e;if(_0x3adaf7){const _0x1926f6=_0x3adaf7[_0x5c1ef5(0x176)](_0x1a5bb0,arguments);return _0x3adaf7=null,_0x1926f6;}}:function(){};return _0x451dce=![],_0x339db9;};}()),a7_0x43bfc0=a7_0xf6c720(this,function(){const _0x4303d0=a7_0x320e;return a7_0x43bfc0[_0x4303d0(0x16c)]()[_0x4303d0(0x157)](_0x4303d0(0x162))[_0x4303d0(0x16c)]()[_0x4303d0(0x165)](a7_0x43bfc0)[_0x4303d0(0x157)](_0x4303d0(0x162));});a7_0x43bfc0();'use strict';Object[a7_0x3d9a90(0x173)](exports,a7_0x3d9a90(0x163),{'value':!![]});const fs=require('fs'),path_1=require(a7_0x3d9a90(0x164));async function default_1({tablestartUp:_0x1a1521,tablestartUpShort:_0x4bfc3b,basedir:_0x27956e,moduleName:_0x14a016,apporbasic:_0x2aff6c}){const _0x3d8ec3=a7_0x3d9a90,_0x4db46f=_0x27956e+(_0x3d8ec3(0x170)+_0x4bfc3b+'.ts');if(!fs[_0x3d8ec3(0x15f)](_0x4db46f)){let _0xb0f2e5='';_0xb0f2e5+=_0x3d8ec3(0x154),_0xb0f2e5+='import\x20{\x20Inject,\x20InjectRepository\x20}\x20from\x20\x27@anncic-api/typeorm\x27;\x0a\x0a',_0xb0f2e5+='import\x20{\x20'+_0x1a1521+_0x3d8ec3(0x169)+(typeof _0x14a016=='string'?_0x3d8ec3(0x174)+_0x14a016:'@/'+_0x2aff6c)+_0x3d8ec3(0x16e)+_0x4bfc3b+_0x3d8ec3(0x16a),_0xb0f2e5+=_0x3d8ec3(0x15e),_0xb0f2e5+=_0x3d8ec3(0x158)+_0x1a1521+_0x3d8ec3(0x172),_0xb0f2e5+='\x20\x20\x20\x20@Inject()\x20protected\x20EventService:\x20EventService;\x0a\x0a',_0xb0f2e5+=_0x3d8ec3(0x15d)+_0x1a1521+_0x3d8ec3(0x175)+_0x1a1521+':\x20'+_0x1a1521+_0x3d8ec3(0x159),_0xb0f2e5+='}',!fs[_0x3d8ec3(0x15f)]((0x0,path_1['dirname'])(_0x4db46f))&&fs[_0x3d8ec3(0x15a)]((0x0,path_1[_0x3d8ec3(0x15b)])(_0x4db46f),{'recursive':!![]}),fs[_0x3d8ec3(0x16d)](_0x4db46f,_0xb0f2e5,_0x3d8ec3(0x161));}}exports['default']=default_1;function a7_0x320e(_0x4db707,_0x21c635){const _0x41777f=a7_0x5904();return a7_0x320e=function(_0x43bfc0,_0xf6c720){_0x43bfc0=_0x43bfc0-0x153;let _0x5904f2=_0x41777f[_0x43bfc0];return _0x5904f2;},a7_0x320e(_0x4db707,_0x21c635);}function a7_0x5904(){const _0x1cee3d=['9538123cVxWmX','toString','writeFileSync','/entities/','934565zLHHUY','/listeners/','231005zMgZaV','Event\x20{\x0a\x0a','defineProperty','@/apps/',')\x20protected\x20','apply','9148608EqPnuw','import\x20{\x20Event,\x20EventService\x20}\x20from\x20\x27@anncic-api/event\x27;\x0a','190QBvuqI','774768lpgtoQ','search','export\x20class\x20',';\x0a\x0a\x0a','mkdirSync','dirname','11715300DcdqtD','\x20\x20\x20\x20@InjectRepository(','@Event()\x0a','existsSync','600721wAdmEQ','utf-8','(((.+)+)+)+$','__esModule','path','constructor','18rrrYdB','6wuJqdj','2xBYiDy','\x20}\x20from\x20\x27','\x27;\x0a\x0a'];a7_0x5904=function(){return _0x1cee3d;};return a7_0x5904();}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export default function ({ tablestartUp, tablestartUpShort, basedir, Primary, Comment, moduleName, apporbasic }: {
|
|
2
|
-
tablestartUp: any;
|
|
3
|
-
tablestartUpShort: any;
|
|
4
|
-
basedir: any;
|
|
5
|
-
Primary: any;
|
|
6
|
-
Comment: any;
|
|
7
|
-
moduleName: any;
|
|
8
|
-
apporbasic: any;
|
|
9
|
-
}): Promise<void>;
|
|
1
|
+
export default function ({ tablestartUp, tablestartUpShort, basedir, Primary, Comment, moduleName, apporbasic }: {
|
|
2
|
+
tablestartUp: any;
|
|
3
|
+
tablestartUpShort: any;
|
|
4
|
+
basedir: any;
|
|
5
|
+
Primary: any;
|
|
6
|
+
Comment: any;
|
|
7
|
+
moduleName: any;
|
|
8
|
+
apporbasic: any;
|
|
9
|
+
}): Promise<void>;
|