anncic-apihelper 1.0.8 → 1.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/configuration.js +1 -1
- package/dist/helper.js +1 -1
- package/dist/index.js +1 -1
- package/dist/service/ApicreateService.js +1 -1
- package/dist/templateFun/Action.js +1 -1
- package/dist/templateFun/Common.d.ts +6 -0
- package/dist/templateFun/Common.js +1 -0
- package/dist/templateFun/Entify.js +1 -1
- package/dist/templateFun/Entities.js +1 -1
- package/dist/templateFun/Event.js +1 -1
- package/dist/templateFun/Handler.d.ts +6 -1
- package/dist/templateFun/Handler.js +1 -1
- package/dist/templateFun/Index.js +1 -1
- package/dist/templateFun/Search.js +1 -1
- package/dist/templateFun/Validator.d.ts +5 -1
- package/dist/templateFun/Validator.js +1 -1
- package/dist/types/index.js +1 -1
- package/package.json +3 -3
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a0_0x5108dc=a0_0x377a;(function(_0x2a92bd,_0x106cd2){var _0x4e7ee8=a0_0x377a,_0x1846df=_0x2a92bd();while(!![]){try{var _0x3723f2=parseInt(_0x4e7ee8(0x191))/0x1+-parseInt(_0x4e7ee8(0x187))/0x2*(parseInt(_0x4e7ee8(0x19c))/0x3)+-parseInt(_0x4e7ee8(0x194))/0x4+-parseInt(_0x4e7ee8(0x196))/0x5*(-parseInt(_0x4e7ee8(0x19d))/0x6)+-parseInt(_0x4e7ee8(0x198))/0x7+-parseInt(_0x4e7ee8(0x18b))/0x8*(parseInt(_0x4e7ee8(0x188))/0x9)+parseInt(_0x4e7ee8(0x189))/0xa;if(_0x3723f2===_0x106cd2)break;else _0x1846df['push'](_0x1846df['shift']());}catch(_0x2eab55){_0x1846df['push'](_0x1846df['shift']());}}}(a0_0x4633,0x62e2f));var __decorate=this&&this[a0_0x5108dc(0x1a1)]||function(_0x360018,_0x262cf8,_0x4c3a96,_0x411573){var _0x439f2b=a0_0x5108dc,_0x49c852=arguments[_0x439f2b(0x19b)],_0xd8700=_0x49c852<0x3?_0x262cf8:_0x411573===null?_0x411573=Object['getOwnPropertyDescriptor'](_0x262cf8,_0x4c3a96):_0x411573,_0x4918cc;if(typeof Reflect===_0x439f2b(0x19e)&&typeof Reflect['decorate']===_0x439f2b(0x197))_0xd8700=Reflect[_0x439f2b(0x1a0)](_0x360018,_0x262cf8,_0x4c3a96,_0x411573);else{for(var _0x33a9c2=_0x360018[_0x439f2b(0x19b)]-0x1;_0x33a9c2>=0x0;_0x33a9c2--)if(_0x4918cc=_0x360018[_0x33a9c2])_0xd8700=(_0x49c852<0x3?_0x4918cc(_0xd8700):_0x49c852>0x3?_0x4918cc(_0x262cf8,_0x4c3a96,_0xd8700):_0x4918cc(_0x262cf8,_0x4c3a96))||_0xd8700;}return _0x49c852>0x3&&_0xd8700&&Object['defineProperty'](_0x262cf8,_0x4c3a96,_0xd8700),_0xd8700;},__metadata=this&&this[a0_0x5108dc(0x190)]||function(_0x2ef76f,_0x3e52ad){var _0x5628e8=a0_0x5108dc;if(typeof Reflect===_0x5628e8(0x19e)&&typeof Reflect[_0x5628e8(0x186)]===_0x5628e8(0x197))return Reflect[_0x5628e8(0x186)](_0x2ef76f,_0x3e52ad);};Object[a0_0x5108dc(0x19a)](exports,'__esModule',{'value':!![]}),exports[a0_0x5108dc(0x193)]=void 0x0;const decorator_1=require(a0_0x5108dc(0x199)),core_1=require('@midwayjs/core'),typeorm=require(a0_0x5108dc(0x18f));function a0_0x377a(_0x1d2dd1,_0x157761){var _0x463311=a0_0x4633();return a0_0x377a=function(_0x377a7d,_0x48850f){_0x377a7d=_0x377a7d-0x186;var _0x1abd31=_0x463311[_0x377a7d];return _0x1abd31;},a0_0x377a(_0x1d2dd1,_0x157761);}function a0_0x4633(){var _0x34d582=['decorate','__decorate','metadata','506438ITDMkn','18dCuZOH','17833560wWnKhO','Inject','282584qxAtrW','MidwayApplicationManager','design:type','application','@anncic-api/typeorm','__metadata','254793lAKzwm','prototype','CustomConfiguration','1841948vnzayG','config','41230YQruwe','function','4515105SNBUTG','@midwayjs/decorator','defineProperty','length','6HbzWVK','36jEtPWa','object','decorator'];a0_0x4633=function(){return _0x34d582;};return a0_0x4633();}let CustomConfiguration=class CustomConfiguration{};__decorate([(0x0,decorator_1[a0_0x5108dc(0x18a)])(),__metadata(a0_0x5108dc(0x18d),core_1['MidwayConfigService'])],CustomConfiguration[a0_0x5108dc(0x192)],a0_0x5108dc(0x195),void 0x0),__decorate([(0x0,decorator_1['Inject'])(),__metadata('design:type',core_1['MidwayDecoratorService'])],CustomConfiguration[a0_0x5108dc(0x192)],a0_0x5108dc(0x19f),void 0x0),__decorate([(0x0,decorator_1[a0_0x5108dc(0x18a)])(),__metadata('design:type',core_1[a0_0x5108dc(0x18c)])],CustomConfiguration[a0_0x5108dc(0x192)],a0_0x5108dc(0x18e),void 0x0),CustomConfiguration=__decorate([(0x0,decorator_1['Configuration'])({'conflictCheck':![],'imports':[typeorm],'namespace':'anncic-apihelper'})],CustomConfiguration),exports['CustomConfiguration']=CustomConfiguration;
|
package/dist/helper.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a1_0x90a6ae=a1_0x4da2;(function(_0x3017d0,_0x53ffff){const _0x34f88=a1_0x4da2,_0x1e7a6b=_0x3017d0();while(!![]){try{const _0xfcd974=parseInt(_0x34f88(0x146))/0x1*(parseInt(_0x34f88(0x13e))/0x2)+parseInt(_0x34f88(0x13b))/0x3+parseInt(_0x34f88(0x14b))/0x4+parseInt(_0x34f88(0x148))/0x5+parseInt(_0x34f88(0x140))/0x6+-parseInt(_0x34f88(0x13c))/0x7*(-parseInt(_0x34f88(0x14a))/0x8)+-parseInt(_0x34f88(0x13a))/0x9;if(_0xfcd974===_0x53ffff)break;else _0x1e7a6b['push'](_0x1e7a6b['shift']());}catch(_0x57a5d2){_0x1e7a6b['push'](_0x1e7a6b['shift']());}}}(a1_0xa29c,0x98e4e));Object[a1_0x90a6ae(0x14c)](exports,a1_0x90a6ae(0x143),{'value':!![]}),exports[a1_0x90a6ae(0x151)]=exports[a1_0x90a6ae(0x155)]=void 0x0;const columnTypes={'json':a1_0x90a6ae(0x147),'char':'string','varchar':a1_0x90a6ae(0x144),'text':a1_0x90a6ae(0x153),'longtext':a1_0x90a6ae(0x150),'mediumtext':a1_0x90a6ae(0x145),'int':a1_0x90a6ae(0x142),'float':'float','double':'float','decimal':'decimal','date':a1_0x90a6ae(0x13d),'time':a1_0x90a6ae(0x14d),'datetime':a1_0x90a6ae(0x14d),'timestamp':'timestamp','tinyint':a1_0x90a6ae(0x152)};function a1_0x4da2(_0x2e6a4c,_0x18cbdc){const _0xa29c6e=a1_0xa29c();return a1_0x4da2=function(_0x4da2af,_0x3301ab){_0x4da2af=_0x4da2af-0x13a;let _0x3495b5=_0xa29c6e[_0x4da2af];return _0x3495b5;},a1_0x4da2(_0x2e6a4c,_0x18cbdc);}function a1_0xa29c(){const _0x39569b=['6YutQLz','substr','5679258cAhwlq','split','number','__esModule','string','mediumtext','124339TJVJKQ','json','3725315jPTVtn','enum','8PnnwWg','3762132nxBDLo','defineProperty','datetime','indexOf','hasOwnProperty','longtext','getEnum','tinyint','text','length','getProp','34332588EJzRKr','1789125szUUKL','5876185PpWDsl','date'];a1_0xa29c=function(){return _0x39569b;};return a1_0xa29c();}function getProp(_0xdc57c4){const _0x307a22=a1_0x90a6ae;if(columnTypes[_0x307a22(0x14f)](_0xdc57c4))return columnTypes[_0xdc57c4];else return _0xdc57c4[_0x307a22(0x14e)]('(')>-0x1||_0xdc57c4[_0x307a22(0x14e)]('\x20')>-0x1?(_0xdc57c4=_0xdc57c4['substr'](0x0,_0xdc57c4[_0x307a22(0x14e)]('(')>-0x1?_0xdc57c4['indexOf']('('):_0xdc57c4[_0x307a22(0x14e)]('\x20')),columnTypes[_0xdc57c4]||_0xdc57c4):_0x307a22(0x144);}exports['getProp']=getProp;function getEnum(_0x211d71){const _0x37a22f=a1_0x90a6ae;if(getProp(_0x211d71)==_0x37a22f(0x149))return _0x211d71[_0x37a22f(0x13f)](0x5,_0x211d71[_0x37a22f(0x154)]-0x6)['replace'](/[\'|\"]/g,'')[_0x37a22f(0x141)](',');return[];}exports['getEnum']=getEnum;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a2_0x23e9d6=a2_0x1cdc;(function(_0x53bb7b,_0x4fe02f){var _0x2cf58f=a2_0x1cdc,_0x5e8e9b=_0x53bb7b();while(!![]){try{var _0x2c5143=-parseInt(_0x2cf58f(0x1b0))/0x1*(parseInt(_0x2cf58f(0x1b3))/0x2)+-parseInt(_0x2cf58f(0x1b8))/0x3*(parseInt(_0x2cf58f(0x1bf))/0x4)+-parseInt(_0x2cf58f(0x1ae))/0x5*(parseInt(_0x2cf58f(0x1be))/0x6)+-parseInt(_0x2cf58f(0x1bd))/0x7*(-parseInt(_0x2cf58f(0x1bb))/0x8)+parseInt(_0x2cf58f(0x1b9))/0x9*(parseInt(_0x2cf58f(0x1b4))/0xa)+parseInt(_0x2cf58f(0x1bc))/0xb*(-parseInt(_0x2cf58f(0x1b1))/0xc)+-parseInt(_0x2cf58f(0x1ba))/0xd*(-parseInt(_0x2cf58f(0x1b7))/0xe);if(_0x2c5143===_0x4fe02f)break;else _0x5e8e9b['push'](_0x5e8e9b['shift']());}catch(_0x45c983){_0x5e8e9b['push'](_0x5e8e9b['shift']());}}}(a2_0x5b5d,0x533da));Object[a2_0x23e9d6(0x1c0)](exports,a2_0x23e9d6(0x1b6),{'value':!![]}),exports[a2_0x23e9d6(0x1b2)]=exports['ApicreateService']=void 0x0;var ApicreateService_1=require(a2_0x23e9d6(0x1c1));function a2_0x5b5d(){var _0x315aca=['./service/ApicreateService','ApicreateService','5GGDeDn','CustomConfiguration','3JSzKLQ','48NcJBnA','Configuration','11122TLOypH','180piZDXi','./configuration','__esModule','46732NUhraw','672Nbcicm','5373ZyrBDf','4082wdnQFv','958480saucOq','29975HChXZo','35RgkxVe','3690906VKjjGP','12040LXEupE','defineProperty'];a2_0x5b5d=function(){return _0x315aca;};return a2_0x5b5d();}function a2_0x1cdc(_0x5a0859,_0x1fc62f){var _0x5b5d48=a2_0x5b5d();return a2_0x1cdc=function(_0x1cdc64,_0x5f001a){_0x1cdc64=_0x1cdc64-0x1ae;var _0xed76d3=_0x5b5d48[_0x1cdc64];return _0xed76d3;},a2_0x1cdc(_0x5a0859,_0x1fc62f);}Object[a2_0x23e9d6(0x1c0)](exports,a2_0x23e9d6(0x1c2),{'enumerable':!![],'get':function(){var _0x1deb0d=a2_0x23e9d6;return ApicreateService_1[_0x1deb0d(0x1c2)];}});var configuration_1=require(a2_0x23e9d6(0x1b5));Object[a2_0x23e9d6(0x1c0)](exports,a2_0x23e9d6(0x1b2),{'enumerable':!![],'get':function(){var _0x2e0688=a2_0x23e9d6;return configuration_1[_0x2e0688(0x1af)];}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a3_0x3a895f=a3_0x59d7;(function(_0xbff49,_0x21380b){const _0x3443ea=a3_0x59d7,_0x52643e=_0xbff49();while(!![]){try{const _0x56f0b8=parseInt(_0x3443ea(0x17a))/0x1*(-parseInt(_0x3443ea(0x175))/0x2)+parseInt(_0x3443ea(0x162))/0x3+parseInt(_0x3443ea(0x139))/0x4*(parseInt(_0x3443ea(0x129))/0x5)+-parseInt(_0x3443ea(0x177))/0x6*(-parseInt(_0x3443ea(0x138))/0x7)+-parseInt(_0x3443ea(0x160))/0x8*(-parseInt(_0x3443ea(0x147))/0x9)+parseInt(_0x3443ea(0x178))/0xa*(parseInt(_0x3443ea(0x13e))/0xb)+-parseInt(_0x3443ea(0x145))/0xc;if(_0x56f0b8===_0x21380b)break;else _0x52643e['push'](_0x52643e['shift']());}catch(_0x5ccfa9){_0x52643e['push'](_0x52643e['shift']());}}}(a3_0x433b,0xc2caa));var __decorate=this&&this[a3_0x3a895f(0x181)]||function(_0xa3da5a,_0x191381,_0x202ad7,_0x142fe5){const _0x5e4cb3=a3_0x3a895f;var _0x429332=arguments[_0x5e4cb3(0x16d)],_0x55746a=_0x429332<0x3?_0x191381:_0x142fe5===null?_0x142fe5=Object[_0x5e4cb3(0x15c)](_0x191381,_0x202ad7):_0x142fe5,_0x3e0b7b;if(typeof Reflect===_0x5e4cb3(0x167)&&typeof Reflect['decorate']===_0x5e4cb3(0x15e))_0x55746a=Reflect[_0x5e4cb3(0x16e)](_0xa3da5a,_0x191381,_0x202ad7,_0x142fe5);else{for(var _0x32c3e5=_0xa3da5a[_0x5e4cb3(0x16d)]-0x1;_0x32c3e5>=0x0;_0x32c3e5--)if(_0x3e0b7b=_0xa3da5a[_0x32c3e5])_0x55746a=(_0x429332<0x3?_0x3e0b7b(_0x55746a):_0x429332>0x3?_0x3e0b7b(_0x191381,_0x202ad7,_0x55746a):_0x3e0b7b(_0x191381,_0x202ad7))||_0x55746a;}return _0x429332>0x3&&_0x55746a&&Object[_0x5e4cb3(0x149)](_0x191381,_0x202ad7,_0x55746a),_0x55746a;},__metadata=this&&this['__metadata']||function(_0x209dd1,_0x455e58){const _0xf1b9d1=a3_0x3a895f;if(typeof Reflect==='object'&&typeof Reflect[_0xf1b9d1(0x15f)]===_0xf1b9d1(0x15e))return Reflect[_0xf1b9d1(0x15f)](_0x209dd1,_0x455e58);};function a3_0x433b(){const _0x26f248=['5DdJrBJ','toUpperCase','dataSourceManager','substr','Config','\x20不存在','module','\x22\x20AND\x20table_name\x20','mkdirSync','query','join','/app','\x20表注释不存在','prototype','toLowerCase','273vTYrIh','5338436BoYPWQ','isConnected','__esModule','filter','/config.ts','374RPqiwc','../templateFun/Validator','PRI','map','string','tablestartLow','LIKE\x20\x22','37949904kjOZcl','SHOW\x20FULL\x20COLUMNS\x20FROM\x20`','693sjjzBu','apitest','defineProperty','../templateFun/Entities','utf-8','writeFileSync','connection','Provide','getBaseDir','Primary','Scope','substring','getDataSource','typeorm\x20未配置数据源\x20','controller','Singleton','comment','@midwayjs/decorator','tablestartUpShort','typeorm','../templateFun/Action','getOwnPropertyDescriptor','App','function','metadata','136232qiXYoG','split','2251158rhcuJB','../templateFun/Event','CreateModuleConfig','onlyvue','Fields','object','SELECT\x20TABLE_NAME\x20as\x20`table`\x20FROM\x20information_schema.TABLES\x20WHERE\x20TABLE_SCHEMA=\x22','default','error','app','ApicreateService','length','decorate','Inject','isArray','moduleName','table','tablestartLowShort','trim','7940spIchA','\x27,\x0a\x20\x20\x20\x20description:\x20\x27\x27,\x0a\x20\x20\x20\x20middlewares:\x20[],\x0a}','43644HIdIxg','252960mZiqel','MidwayEnvironmentService','146mMEzdY','typeorm\x20数据源\x20','dataSource','tableprefix','environment','config','database','__decorate','path','tablestartUp','@midwayjs/typeorm','design:type','create','die','tablestart','basedir','isDevelopmentEnvironment'];a3_0x433b=function(){return _0x26f248;};return a3_0x433b();}Object['defineProperty'](exports,a3_0x3a895f(0x13b),{'value':!![]}),exports[a3_0x3a895f(0x16c)]=void 0x0;const fs=require('fs'),path=require(a3_0x3a895f(0x182)),core_1=require('@midwayjs/core'),typeorm_1=require(a3_0x3a895f(0x184)),decorator_1=require(a3_0x3a895f(0x158)),Event_1=require(a3_0x3a895f(0x163)),Search_1=require('../templateFun/Search'),Entities_1=require(a3_0x3a895f(0x14a)),Validator_1=require(a3_0x3a895f(0x13f)),Action_1=require(a3_0x3a895f(0x15b));let ApicreateService=class ApicreateService{async[a3_0x3a895f(0x186)](_0x3f6a5f){const _0x1d16a5=a3_0x3a895f;var _0x5230c1,_0x2d0eb5,_0x2809c7,_0x5c2909,_0x4dbad0;if(this[_0x1d16a5(0x17e)][_0x1d16a5(0x128)]()&&((_0x5230c1=this[_0x1d16a5(0x17f)])===null||_0x5230c1===void 0x0?void 0x0:_0x5230c1[_0x1d16a5(0x17c)])&&this[_0x1d16a5(0x16b)]['getConfig'](_0x1d16a5(0x148))){!_0x3f6a5f[_0x1d16a5(0x14d)]&&(_0x3f6a5f[_0x1d16a5(0x14d)]='default');if(!((_0x2809c7=(_0x2d0eb5=this[_0x1d16a5(0x17f)])===null||_0x2d0eb5===void 0x0?void 0x0:_0x2d0eb5[_0x1d16a5(0x17c)])===null||_0x2809c7===void 0x0?void 0x0:_0x2809c7[_0x3f6a5f[_0x1d16a5(0x14d)]]))throw new Error(_0x1d16a5(0x154)+_0x3f6a5f[_0x1d16a5(0x14d)]);if(!this[_0x1d16a5(0x12b)]['hasDataSource'](_0x3f6a5f[_0x1d16a5(0x14d)]))throw new Error(_0x1d16a5(0x17b)+_0x3f6a5f[_0x1d16a5(0x14d)]+_0x1d16a5(0x12e));if(!this[_0x1d16a5(0x12b)][_0x1d16a5(0x13a)](_0x3f6a5f[_0x1d16a5(0x14d)]))throw new Error(_0x1d16a5(0x17b)+_0x3f6a5f['connection']+'\x20未连接');const _0x4cfe89=this['app'][_0x1d16a5(0x14f)](),_0x583d37=this['dataSourceManager'][_0x1d16a5(0x153)](_0x3f6a5f[_0x1d16a5(0x14d)]),_0x1a1abd=await _0x583d37[_0x1d16a5(0x132)](_0x1d16a5(0x168)+this[_0x1d16a5(0x17f)][_0x1d16a5(0x17c)][_0x3f6a5f[_0x1d16a5(0x14d)]][_0x1d16a5(0x180)]+_0x1d16a5(0x130)+((_0x3f6a5f===null||_0x3f6a5f===void 0x0?void 0x0:_0x3f6a5f[_0x1d16a5(0x172)])?'=\x20\x22'+_0x3f6a5f[_0x1d16a5(0x172)]+'\x22':_0x1d16a5(0x144)+(_0x3f6a5f[_0x1d16a5(0x17d)]||'')+'%\x22'))||[];for(let _0x4051a8=0x0;_0x4051a8<_0x1a1abd['length'];_0x4051a8++){const _0x3417af=_0x1a1abd[_0x4051a8][_0x1d16a5(0x172)],_0x1f358b=await _0x583d37['query']('SELECT\x20TABLE_COMMENT\x20as\x20`comment`\x20FROM\x20information_schema.TABLES\x20WHERE\x20TABLE_SCHEMA=\x22'+this[_0x1d16a5(0x17f)][_0x1d16a5(0x17c)][_0x3f6a5f['connection']]['database']+'\x22\x20AND\x20table_name\x20=\x20\x27'+_0x3417af+'\x27')||[];if((_0x5c2909=_0x1f358b[0x0])===null||_0x5c2909===void 0x0?void 0x0:_0x5c2909[_0x1d16a5(0x157)]){const _0x3bbd9e={'tablename':_0x3417af,'Primary':{},'Fields':{},'Comment':(_0x4dbad0=_0x1f358b[0x0])===null||_0x4dbad0===void 0x0?void 0x0:_0x4dbad0[_0x1d16a5(0x157)]};_0x3bbd9e['tablestart']=_0x3417af[_0x1d16a5(0x12c)]((_0x3f6a5f===null||_0x3f6a5f===void 0x0?void 0x0:_0x3f6a5f[_0x1d16a5(0x12c)])||0x0,_0x3417af[_0x1d16a5(0x16d)]),_0x3bbd9e[_0x1d16a5(0x189)]=(_0x3f6a5f===null||_0x3f6a5f===void 0x0?void 0x0:_0x3f6a5f[_0x1d16a5(0x12f)])?_0x4cfe89+'/apps/'+_0x3bbd9e['tablestart']['split']('_')[0x0][_0x1d16a5(0x137)]():_0x4cfe89+_0x1d16a5(0x134);const _0x1ac0f0=_0x3bbd9e[_0x1d16a5(0x188)][_0x1d16a5(0x161)]('_')[_0x1d16a5(0x13c)](_0x1741f9=>_0x1741f9&&_0x1741f9[_0x1d16a5(0x174)]());(_0x3f6a5f===null||_0x3f6a5f===void 0x0?void 0x0:_0x3f6a5f[_0x1d16a5(0x12f)])&&(await this[_0x1d16a5(0x164)](_0x3bbd9e),_0x3bbd9e['moduleName']=_0x1ac0f0[0x0][_0x1d16a5(0x137)]());_0x3bbd9e[_0x1d16a5(0x143)]=_0x1ac0f0[_0x1d16a5(0x141)](_0x2f61da=>_0x2f61da[_0x1d16a5(0x137)]())[_0x1d16a5(0x133)](''),_0x3bbd9e['tablestartUp']=_0x1ac0f0[_0x1d16a5(0x141)](_0x59332e=>''+_0x59332e['substring'](0x0,0x1)[_0x1d16a5(0x12a)]()+_0x59332e[_0x1d16a5(0x152)](0x1)[_0x1d16a5(0x137)]())[_0x1d16a5(0x133)]('');(_0x3bbd9e===null||_0x3bbd9e===void 0x0?void 0x0:_0x3bbd9e[_0x1d16a5(0x171)])&&_0x1ac0f0[_0x1d16a5(0x16d)]>0x1&&_0x1ac0f0[0x0]['toLowerCase']()==_0x3bbd9e['moduleName']?(_0x3bbd9e[_0x1d16a5(0x159)]=_0x3bbd9e[_0x1d16a5(0x183)][_0x1d16a5(0x152)](_0x3bbd9e['moduleName']['length'],_0x3bbd9e[_0x1d16a5(0x183)]['length']),_0x3bbd9e[_0x1d16a5(0x173)]=_0x3bbd9e[_0x1d16a5(0x143)][_0x1d16a5(0x152)](_0x3bbd9e[_0x1d16a5(0x171)]['length'],_0x3bbd9e['tablestartLow'][_0x1d16a5(0x16d)])):(_0x3bbd9e[_0x1d16a5(0x159)]=_0x3bbd9e[_0x1d16a5(0x183)],_0x3bbd9e['tablestartLowShort']=_0x3bbd9e[_0x1d16a5(0x143)]);for(let _0x14fa5d of await _0x583d37[_0x1d16a5(0x132)](_0x1d16a5(0x146)+_0x3417af+'`')){_0x14fa5d['Key']==_0x1d16a5(0x140)?_0x3bbd9e[_0x1d16a5(0x150)]=_0x14fa5d:_0x3bbd9e[_0x1d16a5(0x166)][_0x14fa5d['Field']]=_0x14fa5d;}(_0x3f6a5f===null||_0x3f6a5f===void 0x0?void 0x0:_0x3f6a5f[_0x1d16a5(0x155)])&&(_0x3bbd9e['controller']=_0x3f6a5f===null||_0x3f6a5f===void 0x0?void 0x0:_0x3f6a5f[_0x1d16a5(0x155)]);if(!(_0x3f6a5f===null||_0x3f6a5f===void 0x0?void 0x0:_0x3f6a5f[_0x1d16a5(0x165)])){await(0x0,Event_1['default'])(_0x3bbd9e),await(0x0,Search_1['default'])(_0x3bbd9e),await(0x0,Entities_1['default'])(_0x3bbd9e),await(0x0,Validator_1['default'])(_0x3bbd9e);var _0x1c941c=[];if(typeof(_0x3f6a5f===null||_0x3f6a5f===void 0x0?void 0x0:_0x3f6a5f[_0x1d16a5(0x155)])==_0x1d16a5(0x142))_0x1c941c=[_0x3f6a5f===null||_0x3f6a5f===void 0x0?void 0x0:_0x3f6a5f[_0x1d16a5(0x155)]];else Array[_0x1d16a5(0x170)](_0x3f6a5f===null||_0x3f6a5f===void 0x0?void 0x0:_0x3f6a5f[_0x1d16a5(0x155)])?_0x1c941c=_0x3f6a5f===null||_0x3f6a5f===void 0x0?void 0x0:_0x3f6a5f[_0x1d16a5(0x155)]:_0x1c941c=[!![]];for(let _0x9c75c8 of _0x1c941c){_0x3bbd9e[_0x1d16a5(0x155)]=_0x9c75c8,await(0x0,Action_1[_0x1d16a5(0x169)])(_0x3bbd9e);}}}else console[_0x1d16a5(0x16a)]('表:'+_0x3417af+_0x1d16a5(0x135));}}return _0x1d16a5(0x187);}async[a3_0x3a895f(0x164)](_0x184895){const _0xa21ae4=a3_0x3a895f,_0x8abb69=_0x184895['tablestart'][_0xa21ae4(0x161)]('_')[0x0]['toLowerCase']();if(!fs['existsSync'](_0x184895[_0xa21ae4(0x189)]+_0xa21ae4(0x13d))){let _0x34dc4a='export\x20default\x20{\x0a\x20\x20\x20\x20name:\x20\x27'+(_0x184895['Comment']||_0x8abb69)+_0xa21ae4(0x176);fs[_0xa21ae4(0x131)](path['dirname'](_0x184895[_0xa21ae4(0x189)]+_0xa21ae4(0x13d)),{'recursive':!![]}),fs[_0xa21ae4(0x14c)](_0x184895[_0xa21ae4(0x189)]+_0xa21ae4(0x13d),_0x34dc4a,_0xa21ae4(0x14b));}}};function a3_0x59d7(_0x574021,_0x146e14){const _0x433b58=a3_0x433b();return a3_0x59d7=function(_0x59d7d1,_0x48cda3){_0x59d7d1=_0x59d7d1-0x128;let _0xf19853=_0x433b58[_0x59d7d1];return _0xf19853;},a3_0x59d7(_0x574021,_0x146e14);}__decorate([(0x0,decorator_1[a3_0x3a895f(0x15d)])(),__metadata('design:type',Object)],ApicreateService[a3_0x3a895f(0x136)],'app',void 0x0),__decorate([(0x0,decorator_1[a3_0x3a895f(0x12d)])(a3_0x3a895f(0x15a)),__metadata(a3_0x3a895f(0x185),Object)],ApicreateService['prototype'],a3_0x3a895f(0x17f),void 0x0),__decorate([(0x0,decorator_1[a3_0x3a895f(0x16f)])(),__metadata(a3_0x3a895f(0x185),core_1[a3_0x3a895f(0x179)])],ApicreateService[a3_0x3a895f(0x136)],a3_0x3a895f(0x17e),void 0x0),__decorate([(0x0,decorator_1[a3_0x3a895f(0x16f)])(),__metadata(a3_0x3a895f(0x185),typeorm_1['TypeORMDataSourceManager'])],ApicreateService[a3_0x3a895f(0x136)],a3_0x3a895f(0x12b),void 0x0),ApicreateService=__decorate([(0x0,decorator_1[a3_0x3a895f(0x14e)])(a3_0x3a895f(0x16c)),(0x0,decorator_1[a3_0x3a895f(0x151)])(decorator_1['ScopeEnum'][a3_0x3a895f(0x156)])],ApicreateService),exports['ApicreateService']=ApicreateService;
|
|
1
|
+
'use strict';const a3_0x1c6c11=a3_0x1490;(function(_0x2fe677,_0x7a61af){const _0x429c3a=a3_0x1490,_0x31714e=_0x2fe677();while(!![]){try{const _0x3bc98e=-parseInt(_0x429c3a(0x1f4))/0x1*(-parseInt(_0x429c3a(0x1c8))/0x2)+parseInt(_0x429c3a(0x202))/0x3+parseInt(_0x429c3a(0x203))/0x4*(parseInt(_0x429c3a(0x1be))/0x5)+parseInt(_0x429c3a(0x1b3))/0x6*(-parseInt(_0x429c3a(0x211))/0x7)+parseInt(_0x429c3a(0x20a))/0x8*(parseInt(_0x429c3a(0x1bb))/0x9)+parseInt(_0x429c3a(0x1f0))/0xa*(-parseInt(_0x429c3a(0x1d1))/0xb)+-parseInt(_0x429c3a(0x1d6))/0xc*(parseInt(_0x429c3a(0x1c0))/0xd);if(_0x3bc98e===_0x7a61af)break;else _0x31714e['push'](_0x31714e['shift']());}catch(_0x16ec3f){_0x31714e['push'](_0x31714e['shift']());}}}(a3_0x43bb,0x277fd));var __decorate=this&&this[a3_0x1c6c11(0x1f3)]||function(_0x4356f6,_0x19f8af,_0x374249,_0x285642){const _0x384a6a=a3_0x1c6c11;var _0x465df=arguments[_0x384a6a(0x1f7)],_0x27aa4c=_0x465df<0x3?_0x19f8af:_0x285642===null?_0x285642=Object[_0x384a6a(0x1b6)](_0x19f8af,_0x374249):_0x285642,_0x58123c;if(typeof Reflect===_0x384a6a(0x1c2)&&typeof Reflect[_0x384a6a(0x1b8)]===_0x384a6a(0x1ef))_0x27aa4c=Reflect[_0x384a6a(0x1b8)](_0x4356f6,_0x19f8af,_0x374249,_0x285642);else{for(var _0x53ecf2=_0x4356f6[_0x384a6a(0x1f7)]-0x1;_0x53ecf2>=0x0;_0x53ecf2--)if(_0x58123c=_0x4356f6[_0x53ecf2])_0x27aa4c=(_0x465df<0x3?_0x58123c(_0x27aa4c):_0x465df>0x3?_0x58123c(_0x19f8af,_0x374249,_0x27aa4c):_0x58123c(_0x19f8af,_0x374249))||_0x27aa4c;}return _0x465df>0x3&&_0x27aa4c&&Object[_0x384a6a(0x20e)](_0x19f8af,_0x374249,_0x27aa4c),_0x27aa4c;},__metadata=this&&this[a3_0x1c6c11(0x1d3)]||function(_0x3f73fb,_0x181569){const _0x38aff9=a3_0x1c6c11;if(typeof Reflect===_0x38aff9(0x1c2)&&typeof Reflect[_0x38aff9(0x1e7)]===_0x38aff9(0x1ef))return Reflect[_0x38aff9(0x1e7)](_0x3f73fb,_0x181569);};Object[a3_0x1c6c11(0x20e)](exports,a3_0x1c6c11(0x1cc),{'value':!![]}),exports[a3_0x1c6c11(0x1ba)]=void 0x0;const fs=require('fs'),path=require(a3_0x1c6c11(0x1da)),core_1=require(a3_0x1c6c11(0x1ee)),typeorm_1=require(a3_0x1c6c11(0x210)),decorator_1=require(a3_0x1c6c11(0x1ed)),Common_1=require('../templateFun/Common'),Event_1=require(a3_0x1c6c11(0x1dc)),Search_1=require('../templateFun/Search'),Entities_1=require(a3_0x1c6c11(0x1ec)),Handler_1=require(a3_0x1c6c11(0x1c9)),Validator_1=require(a3_0x1c6c11(0x1ea)),Action_1=require(a3_0x1c6c11(0x212));let ApicreateService=class ApicreateService{async[a3_0x1c6c11(0x1f1)](_0x11816e){const _0x4d467f=a3_0x1c6c11;var _0x1c6c7d,_0xc983ba,_0x22ccee,_0x891057,_0x277d33;if(this[_0x4d467f(0x1cf)]['isDevelopmentEnvironment']()&&((_0x1c6c7d=this[_0x4d467f(0x1c5)])===null||_0x1c6c7d===void 0x0?void 0x0:_0x1c6c7d[_0x4d467f(0x1f6)])&&this['app']['getConfig'](_0x4d467f(0x1c1))){!_0x11816e['connection']&&(_0x11816e['connection']=_0x4d467f(0x1ad));if(!((_0x22ccee=(_0xc983ba=this['config'])===null||_0xc983ba===void 0x0?void 0x0:_0xc983ba[_0x4d467f(0x1f6)])===null||_0x22ccee===void 0x0?void 0x0:_0x22ccee[_0x11816e[_0x4d467f(0x1d4)]]))throw new Error(_0x4d467f(0x1f2)+_0x11816e[_0x4d467f(0x1d4)]);if(!this[_0x4d467f(0x1c3)]['hasDataSource'](_0x11816e[_0x4d467f(0x1d4)]))throw new Error(_0x4d467f(0x1e6)+_0x11816e[_0x4d467f(0x1d4)]+_0x4d467f(0x1d0));if(!this[_0x4d467f(0x1c3)][_0x4d467f(0x1b5)](_0x11816e[_0x4d467f(0x1d4)]))throw new Error(_0x4d467f(0x1e6)+_0x11816e['connection']+_0x4d467f(0x1fc));const _0x4854a1=this[_0x4d467f(0x1cd)]['getBaseDir'](),_0x2181ea=this['dataSourceManager'][_0x4d467f(0x205)](_0x11816e[_0x4d467f(0x1d4)]),_0x27ee45=await _0x2181ea[_0x4d467f(0x1fb)](_0x4d467f(0x1ff)+this[_0x4d467f(0x1c5)][_0x4d467f(0x1f6)][_0x11816e[_0x4d467f(0x1d4)]][_0x4d467f(0x1bf)]+_0x4d467f(0x1ae)+((_0x11816e===null||_0x11816e===void 0x0?void 0x0:_0x11816e[_0x4d467f(0x1af)])?_0x4d467f(0x1e0)+_0x11816e[_0x4d467f(0x1af)]+'\x22':_0x4d467f(0x206)+(_0x11816e['tableprefix']||'')+'%\x22'))||[];for(let _0x1b1db2=0x0;_0x1b1db2<_0x27ee45[_0x4d467f(0x1f7)];_0x1b1db2++){const _0x2765c4=_0x27ee45[_0x1b1db2][_0x4d467f(0x1af)],_0x584b42=await _0x2181ea['query'](_0x4d467f(0x1d2)+this['config']['dataSource'][_0x11816e[_0x4d467f(0x1d4)]][_0x4d467f(0x1bf)]+'\x22\x20AND\x20table_name\x20=\x20\x27'+_0x2765c4+'\x27')||[];if((_0x891057=_0x584b42[0x0])===null||_0x891057===void 0x0?void 0x0:_0x891057[_0x4d467f(0x1de)]){const _0x6f8463={'tablename':_0x2765c4,'Primary':{},'Fields':{},'Comment':(_0x277d33=_0x584b42[0x0])===null||_0x277d33===void 0x0?void 0x0:_0x277d33[_0x4d467f(0x1de)]};_0x6f8463['tablestart']=_0x2765c4['substr']((_0x11816e===null||_0x11816e===void 0x0?void 0x0:_0x11816e[_0x4d467f(0x20b)])||0x0,_0x2765c4[_0x4d467f(0x1f7)]),_0x6f8463[_0x4d467f(0x20f)]=(_0x11816e===null||_0x11816e===void 0x0?void 0x0:_0x11816e[_0x4d467f(0x1e1)])?_0x4854a1+_0x4d467f(0x1d9)+_0x6f8463[_0x4d467f(0x1cb)][_0x4d467f(0x1b2)]('_')[0x0][_0x4d467f(0x1eb)]():_0x4854a1+_0x4d467f(0x200);const _0x5d1ad7=_0x6f8463[_0x4d467f(0x1cb)][_0x4d467f(0x1b2)]('_')['filter'](_0xd3bfd7=>_0xd3bfd7&&_0xd3bfd7['trim']());(_0x11816e===null||_0x11816e===void 0x0?void 0x0:_0x11816e[_0x4d467f(0x1e1)])&&(await this['CreateModuleConfig'](_0x6f8463),_0x6f8463[_0x4d467f(0x1c7)]=_0x5d1ad7[0x0][_0x4d467f(0x1eb)]());_0x6f8463[_0x4d467f(0x1fd)]=_0x5d1ad7['map'](_0x1adfae=>_0x1adfae[_0x4d467f(0x1eb)]())[_0x4d467f(0x1d7)](''),_0x6f8463[_0x4d467f(0x204)]=_0x5d1ad7[_0x4d467f(0x1db)](_0x179337=>''+_0x179337['substring'](0x0,0x1)[_0x4d467f(0x1fa)]()+_0x179337[_0x4d467f(0x1b7)](0x1)[_0x4d467f(0x1eb)]())['join']('');(_0x6f8463===null||_0x6f8463===void 0x0?void 0x0:_0x6f8463['moduleName'])&&_0x5d1ad7[_0x4d467f(0x1f7)]>0x1&&_0x5d1ad7[0x0][_0x4d467f(0x1eb)]()==_0x6f8463[_0x4d467f(0x1c7)]?(_0x6f8463[_0x4d467f(0x1dd)]=_0x6f8463[_0x4d467f(0x204)][_0x4d467f(0x1b7)](_0x6f8463[_0x4d467f(0x1c7)]['length'],_0x6f8463['tablestartUp'][_0x4d467f(0x1f7)]),_0x6f8463[_0x4d467f(0x1b0)]=_0x6f8463[_0x4d467f(0x1fd)][_0x4d467f(0x1b7)](_0x6f8463[_0x4d467f(0x1c7)][_0x4d467f(0x1f7)],_0x6f8463[_0x4d467f(0x1fd)][_0x4d467f(0x1f7)])):(_0x6f8463['tablestartUpShort']=_0x6f8463['tablestartUp'],_0x6f8463['tablestartLowShort']=_0x6f8463[_0x4d467f(0x1fd)]);for(let _0x28dc35 of await _0x2181ea[_0x4d467f(0x1fb)](_0x4d467f(0x1fe)+_0x2765c4+'`')){_0x28dc35['Key']==_0x4d467f(0x1e8)?_0x6f8463[_0x4d467f(0x1ca)]=_0x28dc35:_0x6f8463[_0x4d467f(0x20d)][_0x28dc35[_0x4d467f(0x1d5)]]=_0x28dc35;}(_0x11816e===null||_0x11816e===void 0x0?void 0x0:_0x11816e[_0x4d467f(0x1df)])&&(_0x6f8463[_0x4d467f(0x1df)]=_0x11816e===null||_0x11816e===void 0x0?void 0x0:_0x11816e[_0x4d467f(0x1df)]);if(!(_0x11816e===null||_0x11816e===void 0x0?void 0x0:_0x11816e['onlyvue'])){var _0x4cccb7=[];if(typeof(_0x11816e===null||_0x11816e===void 0x0?void 0x0:_0x11816e['controller'])=='string')_0x4cccb7=[_0x11816e===null||_0x11816e===void 0x0?void 0x0:_0x11816e[_0x4d467f(0x1df)]];else Array[_0x4d467f(0x209)](_0x11816e===null||_0x11816e===void 0x0?void 0x0:_0x11816e[_0x4d467f(0x1df)])?_0x4cccb7=_0x11816e===null||_0x11816e===void 0x0?void 0x0:_0x11816e[_0x4d467f(0x1df)]:_0x4cccb7=[!![]];_0x6f8463['controllers']=_0x4cccb7,await(0x0,Common_1[_0x4d467f(0x1ad)])(_0x6f8463),await(0x0,Event_1[_0x4d467f(0x1ad)])(_0x6f8463),await(0x0,Search_1[_0x4d467f(0x1ad)])(_0x6f8463),await(0x0,Entities_1['default'])(_0x6f8463),await(0x0,Handler_1[_0x4d467f(0x1ad)])(_0x6f8463),await(0x0,Validator_1[_0x4d467f(0x1ad)])(_0x6f8463);for(let _0x770553 of _0x4cccb7){_0x6f8463[_0x4d467f(0x1df)]=_0x770553,await(0x0,Action_1[_0x4d467f(0x1ad)])(_0x6f8463);}}}else console['error']('表:'+_0x2765c4+_0x4d467f(0x1e3));}}return _0x4d467f(0x1f5);}async['CreateModuleConfig'](_0x19c2e4){const _0x312148=a3_0x1c6c11,_0xbd8252=_0x19c2e4[_0x312148(0x1cb)][_0x312148(0x1b2)]('_')[0x0]['toLowerCase']();if(!fs[_0x312148(0x1e2)](_0x19c2e4[_0x312148(0x20f)]+_0x312148(0x1b9))){let _0xffbc32=_0x312148(0x207)+(_0x19c2e4[_0x312148(0x20c)]||_0xbd8252)+_0x312148(0x1ce);fs[_0x312148(0x1e5)](path[_0x312148(0x1bc)](_0x19c2e4[_0x312148(0x20f)]+_0x312148(0x1b9)),{'recursive':!![]}),fs[_0x312148(0x1b1)](_0x19c2e4[_0x312148(0x20f)]+_0x312148(0x1b9),_0xffbc32,'utf-8');}}};__decorate([(0x0,decorator_1[a3_0x1c6c11(0x1d8)])(),__metadata('design:type',Object)],ApicreateService[a3_0x1c6c11(0x201)],a3_0x1c6c11(0x1cd),void 0x0),__decorate([(0x0,decorator_1['Config'])(a3_0x1c6c11(0x1bd)),__metadata(a3_0x1c6c11(0x1c4),Object)],ApicreateService[a3_0x1c6c11(0x201)],'config',void 0x0),__decorate([(0x0,decorator_1[a3_0x1c6c11(0x1f8)])(),__metadata(a3_0x1c6c11(0x1c4),core_1[a3_0x1c6c11(0x1c6)])],ApicreateService[a3_0x1c6c11(0x201)],a3_0x1c6c11(0x1cf),void 0x0),__decorate([(0x0,decorator_1[a3_0x1c6c11(0x1f8)])(),__metadata('design:type',typeorm_1[a3_0x1c6c11(0x1e9)])],ApicreateService[a3_0x1c6c11(0x201)],a3_0x1c6c11(0x1c3),void 0x0),ApicreateService=__decorate([(0x0,decorator_1[a3_0x1c6c11(0x1f9)])('ApicreateService'),(0x0,decorator_1[a3_0x1c6c11(0x1e4)])(decorator_1[a3_0x1c6c11(0x1b4)][a3_0x1c6c11(0x208)])],ApicreateService),exports['ApicreateService']=ApicreateService;function a3_0x1490(_0x5b030b,_0x26e084){const _0x43bb09=a3_0x43bb();return a3_0x1490=function(_0x1490f5,_0x4f566f){_0x1490f5=_0x1490f5-0x1ad;let _0x45f95a=_0x43bb09[_0x1490f5];return _0x45f95a;},a3_0x1490(_0x5b030b,_0x26e084);}function a3_0x43bb(){const _0x2bd8c=['543813xzjtXX','104vKCAMV','tablestartUp','getDataSource','LIKE\x20\x22','export\x20default\x20{\x0a\x20\x20\x20\x20name:\x20\x27','Singleton','isArray','2547896fZWnWA','substr','Comment','Fields','defineProperty','basedir','@midwayjs/typeorm','2282YkVHQC','../templateFun/Action','default','\x22\x20AND\x20table_name\x20','table','tablestartLowShort','writeFileSync','split','4542ELiuJP','ScopeEnum','isConnected','getOwnPropertyDescriptor','substring','decorate','/config.ts','ApicreateService','9bwGzSs','dirname','typeorm','2585tCLjPH','database','26ASKiTZ','apitest','object','dataSourceManager','design:type','config','MidwayEnvironmentService','moduleName','2HrqvWp','../templateFun/Handler','Primary','tablestart','__esModule','app','\x27,\x0a\x20\x20\x20\x20description:\x20\x27\x27,\x0a\x20\x20\x20\x20middlewares:\x20[],\x0a}','environment','\x20不存在','88lwvblI','SELECT\x20TABLE_COMMENT\x20as\x20`comment`\x20FROM\x20information_schema.TABLES\x20WHERE\x20TABLE_SCHEMA=\x22','__metadata','connection','Field','919764mkFRdS','join','App','/apps/','path','map','../templateFun/Event','tablestartUpShort','comment','controller','=\x20\x22','module','existsSync','\x20表注释不存在','Scope','mkdirSync','typeorm\x20数据源\x20','metadata','PRI','TypeORMDataSourceManager','../templateFun/Validator','toLowerCase','../templateFun/Entities','@midwayjs/decorator','@midwayjs/core','function','139550wsmjtM','create','typeorm\x20未配置数据源\x20','__decorate','160305gemcmF','die','dataSource','length','Inject','Provide','toUpperCase','query','\x20未连接','tablestartLow','SHOW\x20FULL\x20COLUMNS\x20FROM\x20`','SELECT\x20TABLE_NAME\x20as\x20`table`\x20FROM\x20information_schema.TABLES\x20WHERE\x20TABLE_SCHEMA=\x22','/app','prototype'];a3_0x43bb=function(){return _0x2bd8c;};return a3_0x43bb();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a4_0x3564b7=a4_0x3340;function a4_0x3340(_0x40f005,_0xaf482b){const _0x3500b4=a4_0x3500();return a4_0x3340=function(_0x3340c8,_0x50aff4){_0x3340c8=_0x3340c8-0x1db;let _0xc78983=_0x3500b4[_0x3340c8];return _0xc78983;},a4_0x3340(_0x40f005,_0xaf482b);}(function(_0x1ddec4,_0x40dbe8){const _0x2b5e5e=a4_0x3340,_0x2e9f48=_0x1ddec4();while(!![]){try{const _0x53c3ab=-parseInt(_0x2b5e5e(0x1ed))/0x1*(-parseInt(_0x2b5e5e(0x20c))/0x2)+-parseInt(_0x2b5e5e(0x1ec))/0x3+-parseInt(_0x2b5e5e(0x1dc))/0x4+parseInt(_0x2b5e5e(0x205))/0x5*(-parseInt(_0x2b5e5e(0x1e5))/0x6)+-parseInt(_0x2b5e5e(0x20b))/0x7*(parseInt(_0x2b5e5e(0x1f4))/0x8)+parseInt(_0x2b5e5e(0x1f2))/0x9+parseInt(_0x2b5e5e(0x1ee))/0xa*(parseInt(_0x2b5e5e(0x207))/0xb);if(_0x53c3ab===_0x40dbe8)break;else _0x2e9f48['push'](_0x2e9f48['shift']());}catch(_0x2ee9ac){_0x2e9f48['push'](_0x2e9f48['shift']());}}}(a4_0x3500,0x5d7b2));Object[a4_0x3564b7(0x209)](exports,a4_0x3564b7(0x212),{'value':!![]});const fs=require('fs'),path_1=require(a4_0x3564b7(0x210));async function default_1({controller:_0x2a9b8,tablestartUp:_0x4a96ca,tablestartUpShort:_0x121358,basedir:_0x4f8bea,Primary:_0x4f5a24,Comment:_0xadf15d,moduleName:_0x32c44a}){const _0x354a2b=a4_0x3564b7;if(_0x2a9b8){const _0x49c77=_0x4f8bea+(typeof _0x2a9b8==_0x354a2b(0x206)?_0x354a2b(0x1de)+_0x2a9b8+'/'+_0x121358+_0x354a2b(0x21b):_0x354a2b(0x1de)+_0x121358+_0x354a2b(0x21b));if(!fs[_0x354a2b(0x1e4)](_0x49c77)){let _0x288a20='';_0x288a20+='import\x20{\x20Context\x20}\x20from\x20\x27@midwayjs/koa\x27;\x0a',_0x288a20+=_0x354a2b(0x20a),_0x288a20+=_0x354a2b(0x1fc)+_0x4a96ca+_0x354a2b(0x1ef)+(typeof _0x32c44a==_0x354a2b(0x206)?'@/apps/'+_0x32c44a:_0x354a2b(0x1e0))+'/handlers/'+_0x121358+_0x354a2b(0x1eb),_0x288a20+=_0x354a2b(0x1fc)+(typeof _0x2a9b8==_0x354a2b(0x206)?_0x2a9b8[_0x354a2b(0x214)](0x0,0x1)[_0x354a2b(0x1e3)]()+_0x2a9b8[_0x354a2b(0x214)](0x1)[_0x354a2b(0x218)]():'')+_0x4a96ca+_0x354a2b(0x1e6)+(typeof _0x32c44a==_0x354a2b(0x206)?_0x354a2b(0x217)+_0x32c44a:_0x354a2b(0x1e0))+_0x354a2b(0x1dd)+_0x121358+'/Create\x27;\x0a',_0x288a20+=_0x354a2b(0x1fc)+(typeof _0x2a9b8==_0x354a2b(0x206)?_0x2a9b8[_0x354a2b(0x214)](0x0,0x1)[_0x354a2b(0x1e3)]()+_0x2a9b8[_0x354a2b(0x214)](0x1)[_0x354a2b(0x218)]():'')+_0x4a96ca+'DTOUpdate\x20}\x20from\x20\x27'+(typeof _0x32c44a==_0x354a2b(0x206)?_0x354a2b(0x217)+_0x32c44a:'@/app')+_0x354a2b(0x1dd)+_0x121358+_0x354a2b(0x1ea),_0x288a20+=_0x354a2b(0x1fc)+(typeof _0x2a9b8==_0x354a2b(0x206)?_0x2a9b8[_0x354a2b(0x214)](0x0,0x1)[_0x354a2b(0x1e3)]()+_0x2a9b8['substring'](0x1)[_0x354a2b(0x218)]():'')+_0x4a96ca+_0x354a2b(0x1df)+(typeof _0x32c44a==_0x354a2b(0x206)?_0x354a2b(0x217)+_0x32c44a:_0x354a2b(0x1e0))+'/validators/'+_0x121358+_0x354a2b(0x1e2),_0x288a20+=_0x354a2b(0x1f1)+_0xadf15d+_0x354a2b(0x20d),_0x288a20+='export\x20class\x20'+_0x4a96ca+_0x354a2b(0x1f6),_0x288a20+='\x20\x20\x20\x20@Inject()\x20protected\x20ctx:\x20Context;\x0a\x0a',_0x288a20+=_0x354a2b(0x1fd)+_0x4a96ca+_0x354a2b(0x211)+_0x4a96ca+_0x354a2b(0x1f3),_0x288a20+=_0x354a2b(0x202),_0x288a20+=_0x354a2b(0x1f5)+(typeof _0x2a9b8==_0x354a2b(0x206)?_0x2a9b8[_0x354a2b(0x214)](0x0,0x1)[_0x354a2b(0x1e3)]()+_0x2a9b8[_0x354a2b(0x214)](0x1)['toLowerCase']():'')+_0x4a96ca+'DTOSearch,\x20pageinfo:\x20PageDTO)\x20{\x0a\x0a',_0x288a20+=_0x354a2b(0x204)+_0x4a96ca+'Handler.list(params,\x20pageinfo);\x0a\x0a',_0x288a20+=_0x354a2b(0x20f),_0x288a20+='\x20\x20\x20\x20}\x0a\x0a\x0a',_0x288a20+=_0x354a2b(0x208),_0x288a20+=_0x354a2b(0x1f7)+(typeof _0x2a9b8==_0x354a2b(0x206)?_0x2a9b8[_0x354a2b(0x214)](0x0,0x1)[_0x354a2b(0x1e3)]()+_0x2a9b8['substring'](0x1)[_0x354a2b(0x218)]():'')+_0x4a96ca+_0x354a2b(0x1db),_0x288a20+=_0x354a2b(0x1ff)+_0x4a96ca+_0x354a2b(0x203),_0x288a20+=_0x354a2b(0x216),_0x288a20+=_0x354a2b(0x1f8),_0x288a20+='\x20\x20\x20\x20@Api(\x27修改数据\x27,\x20\x27put\x27,\x20\x27/:'+_0x4f5a24['Field']+'\x27)\x0a',_0x288a20+='\x20\x20\x20\x20async\x20update('+_0x4f5a24[_0x354a2b(0x201)]+_0x354a2b(0x1f9)+(typeof _0x2a9b8==_0x354a2b(0x206)?_0x2a9b8[_0x354a2b(0x214)](0x0,0x1)[_0x354a2b(0x1e3)]()+_0x2a9b8['substring'](0x1)[_0x354a2b(0x218)]():'')+_0x4a96ca+_0x354a2b(0x1fb),_0x288a20+='\x20\x20\x20\x20\x20\x20\x20\x20const\x20tmpModel\x20=\x20await\x20this.'+_0x4a96ca+_0x354a2b(0x1e9)+_0x4f5a24[_0x354a2b(0x201)]+_0x354a2b(0x1fe),_0x288a20+=_0x354a2b(0x216),_0x288a20+=_0x354a2b(0x1f8),_0x288a20+=_0x354a2b(0x20e)+_0x4f5a24[_0x354a2b(0x201)]+_0x354a2b(0x20d),_0x288a20+='\x20\x20\x20\x20async\x20detail('+_0x4f5a24[_0x354a2b(0x201)]+_0x354a2b(0x1f0),_0x288a20+=_0x354a2b(0x1ff)+_0x4a96ca+'Handler.detail({'+_0x4f5a24[_0x354a2b(0x201)]+'});\x0a\x0a',_0x288a20+='\x20\x20\x20\x20\x20\x20\x20\x20return\x20this.ctx.ok(tmpModel);\x0a',_0x288a20+=_0x354a2b(0x1f8),_0x288a20+=_0x354a2b(0x200)+_0x4f5a24[_0x354a2b(0x201)]+_0x354a2b(0x20d),_0x288a20+=_0x354a2b(0x1e8)+_0x4f5a24[_0x354a2b(0x201)]+':\x20string)\x20{\x0a\x0a',_0x288a20+=_0x354a2b(0x219)+_0x4a96ca+'Handler.remove('+_0x4f5a24[_0x354a2b(0x201)]+_0x354a2b(0x21a),_0x288a20+=_0x354a2b(0x1e7),_0x288a20+='\x20\x20\x20\x20}\x0a\x0a\x0a',_0x288a20+='}',!fs[_0x354a2b(0x1e4)]((0x0,path_1[_0x354a2b(0x215)])(_0x49c77))&&fs[_0x354a2b(0x1fa)]((0x0,path_1[_0x354a2b(0x215)])(_0x49c77),{'recursive':!![]}),fs[_0x354a2b(0x213)](_0x49c77,_0x288a20,_0x354a2b(0x1e1));}}}exports['default']=default_1;function a4_0x3500(){const _0x58b8af=['DTOUpdate)\x20{\x0a\x0a','import\x20{\x20','\x20\x20\x20\x20@Inject()\x20','},\x20params);\x0a\x0a','\x20\x20\x20\x20\x20\x20\x20\x20const\x20tmpModel\x20=\x20await\x20this.','\x20\x20\x20\x20@Api(\x22删除数据\x22,\x20\x27del\x27,\x20\x27/:','Field','\x20\x20\x20\x20@Api(\x27检索数据\x27)\x0a','Handler.create(params);\x0a\x0a','\x20\x20\x20\x20\x20\x20\x20\x20const\x20[pagelist,\x20pagetotal]\x20=\x20await\x20this.','1287060dktoio','string','33wVkKjS','\x20\x20\x20\x20@Api(\x27添加数据\x27,\x20\x27post\x27)\x0a','defineProperty','import\x20{\x20Inject,\x20Action,\x20Api,\x20PageDTO\x20}\x20from\x20\x27anncic-api\x27;\x0a\x0a','763uUxnzj','2YVbuqB','\x27)\x0a','\x20\x20\x20\x20@Api(\x27数据详情\x27,\x20\x27get\x27,\x20\x27/:','\x20\x20\x20\x20\x20\x20\x20\x20return\x20this.ctx.ok(pagelist,\x20{\x20pageinfo,\x20pagetotal\x20});\x0a','path','Handler:\x20','__esModule','writeFileSync','substring','dirname','\x20\x20\x20\x20\x20\x20\x20\x20return\x20this.ctx.ok(tmpModel);\x0a','@/apps/','toLowerCase','\x20\x20\x20\x20\x20\x20\x20\x20const\x20deletes\x20=\x20await\x20this.',');\x0a\x0a','.ts','DTOCreate)\x20{\x0a\x0a','2901244mUanUt','/validators/','/controller/','DTOSearch\x20}\x20from\x20\x27','@/app','utf-8','/Search\x27;\x0a\x0a\x0a','toUpperCase','existsSync','6tbGTDU','DTOCreate\x20}\x20from\x20\x27','\x20\x20\x20\x20\x20\x20\x20\x20return\x20this.ctx.ok(deletes);\x0a','\x20\x20\x20\x20async\x20remove(','Handler.update({','/Update\x27;\x0a','\x27;\x0a','1956591udYiXH','714173tEDwLV','4648810SWeVQi','Handler\x20}\x20from\x20\x27',':\x20number)\x20{\x0a\x0a','@Action(__filename,\x20\x27','2548791urFfsa','Handler\x0a\x0a\x0a','27464uXXdqV','\x20\x20\x20\x20async\x20index(params:\x20','Controller\x20{\x0a\x0a','\x20\x20\x20\x20async\x20create(params:\x20','\x20\x20\x20\x20}\x0a\x0a\x0a',':\x20number,\x20params:\x20','mkdirSync'];a4_0x3500=function(){return _0x58b8af;};return a4_0x3500();}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';function a5_0x4a8a(){const _0x5cde91=['\x20\x20\x20\x20//\x20@AnnEnumMsg(\x27status\x27,\x20\x27开启\x27)\x0a','export\x20class\x20','mkdirSync','326424mKBzgI','61100PwSaAj','utf-8','/exceptions/','5sddIZv','/enum.ts','\x20*\x20','Enum\x20{\x0a\x0a','\x20\x20\x20\x20//\x20static\x20readonly\x20DEMO_STATUS_OFF:\x20string\x20=\x20\x270\x27;\x0a\x0a','dirname','\x20\x20\x20\x20//\x20static\x20readonly\x20DEMO_STATUS_ON:\x20number\x20=\x201;\x0a\x0a','\x20\x20\x20\x20//\x20static\x20readonly\x20DEMO_NOT_FIND\x20=\x20200001;\x0a\x0a','/entities/','path','91FhvUgr','writeFileSync','-常量设置\x0a','2256078ZpjyJn','1193212SZYPae','default','82594gShGJD','Error\x20{\x0a\x0a','-错误信息设置\x0a','1219644nKCHEh','\x20*\x20**/\x0a','existsSync','\x20\x20\x20\x20//\x20@AnnErrorMsg(\x27数据不存在\x27)\x0a','54447MVIcvm','396DRvWzJ','\x20\x20\x20\x20//\x20@AnnEnumMsg(\x27status\x27,\x20\x27关闭\x27)\x0a'];a5_0x4a8a=function(){return _0x5cde91;};return a5_0x4a8a();}const a5_0x3411fc=a5_0x57a4;function a5_0x57a4(_0x53401c,_0x4d4f67){const _0x4a8ae8=a5_0x4a8a();return a5_0x57a4=function(_0x57a455,_0x2547fd){_0x57a455=_0x57a455-0x8e;let _0x220527=_0x4a8ae8[_0x57a455];return _0x220527;},a5_0x57a4(_0x53401c,_0x4d4f67);}(function(_0xa2b65d,_0x15c2b8){const _0x23306a=a5_0x57a4,_0x3f42d2=_0xa2b65d();while(!![]){try{const _0x2d1a6f=-parseInt(_0x23306a(0x9b))/0x1+-parseInt(_0x23306a(0x9e))/0x2+parseInt(_0x23306a(0xa2))/0x3+-parseInt(_0x23306a(0x99))/0x4*(-parseInt(_0x23306a(0xac))/0x5)+parseInt(_0x23306a(0x98))/0x6+parseInt(_0x23306a(0x95))/0x7*(parseInt(_0x23306a(0xa8))/0x8)+-parseInt(_0x23306a(0xa3))/0x9*(-parseInt(_0x23306a(0xa9))/0xa);if(_0x2d1a6f===_0x15c2b8)break;else _0x3f42d2['push'](_0x3f42d2['shift']());}catch(_0x5c9e6e){_0x3f42d2['push'](_0x3f42d2['shift']());}}}(a5_0x4a8a,0xc3260));Object['defineProperty'](exports,'__esModule',{'value':!![]});const fs=require('fs'),path=require(a5_0x3411fc(0x94));async function default_1({tablestartUp:_0x240fba,tablestartUpShort:_0x5aa448,basedir:_0x3527c7,Comment:_0xfd1caf}){await entity_emum({'tablestartUp':_0x240fba,'tablestartUpShort':_0x5aa448,'basedir':_0x3527c7,'Comment':_0xfd1caf}),await entity_exceptions({'tablestartUp':_0x240fba,'tablestartUpShort':_0x5aa448,'basedir':_0x3527c7,'Comment':_0xfd1caf});}exports[a5_0x3411fc(0x9a)]=default_1;async function entity_emum({tablestartUp:_0x2ac6f6,tablestartUpShort:_0x3f0071,basedir:_0x3d5e5c,Comment:_0x274611}){const _0x42c210=a5_0x3411fc,_0x5249dc=_0x3d5e5c+(_0x42c210(0x93)+_0x3f0071+_0x42c210(0xad));if(!fs['existsSync'](_0x5249dc)){let _0x486df5='';_0x486df5+='/**\x0a',_0x486df5+=_0x42c210(0xae)+_0x274611+_0x42c210(0x97),_0x486df5+=_0x42c210(0x9f),_0x486df5+=_0x42c210(0xa6)+_0x2ac6f6+_0x42c210(0x8e),_0x486df5+=_0x42c210(0xa5),_0x486df5+=_0x42c210(0x91),_0x486df5+=_0x42c210(0xa4),_0x486df5+=_0x42c210(0x8f),_0x486df5+='}',!fs[_0x42c210(0xa0)](path[_0x42c210(0x90)](_0x5249dc))&&fs[_0x42c210(0xa7)](path[_0x42c210(0x90)](_0x5249dc),{'recursive':!![]}),fs[_0x42c210(0x96)](_0x5249dc,_0x486df5,_0x42c210(0xaa));}}async function entity_exceptions({tablestartUp:_0x216ccf,tablestartUpShort:_0x19b81f,basedir:_0x3bef6e,Comment:_0x2a4d30}){const _0x2ac603=a5_0x3411fc,_0x2eb5df=_0x3bef6e+(_0x2ac603(0xab)+_0x19b81f+'.ts');if(!fs['existsSync'](_0x2eb5df)){let _0x441bbe='';_0x441bbe+='/**\x0a',_0x441bbe+='\x20*\x20'+_0x2a4d30+_0x2ac603(0x9d),_0x441bbe+=_0x2ac603(0x9f),_0x441bbe+=_0x2ac603(0xa6)+_0x216ccf+_0x2ac603(0x9c),_0x441bbe+=_0x2ac603(0xa1),_0x441bbe+=_0x2ac603(0x92),_0x441bbe+='}',!fs[_0x2ac603(0xa0)](path['dirname'](_0x2eb5df))&&fs['mkdirSync'](path[_0x2ac603(0x90)](_0x2eb5df),{'recursive':!![]}),fs[_0x2ac603(0x96)](_0x2eb5df,_0x441bbe,_0x2ac603(0xaa));}}
|