@things-factory/operato-tools 6.0.150 → 6.0.151
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/client/actions/main.js +1 -1
- package/client/pages/generator/button-config-tab-mixin.js +4 -4
- package/client/pages/generator/column-config-tab-mixin.js +4 -4
- package/client/pages/generator/etc-config-tab-mixin.js +4 -4
- package/client/pages/generator/form-config-tab-mixin.js +4 -4
- package/client/pages/generator/graphql-config-tab-mixin.js +24 -24
- package/client/pages/generator/grid-config-tab-mixin.js +22 -22
- package/client/pages/generator/menu-config-tab-mixin.js +11 -11
- package/client/pages/generator/meta-generator-page.js +11 -11
- package/client/pages/generator/search-config-tab-mixin.js +4 -4
- package/client/pages/generator/tab-config-tab-mixin.js +4 -4
- package/client/pages/main.js +4 -4
- package/client/reducers/main.js +1 -1
- package/package.json +3 -3
- package/server/constants/error-code.js +1 -1
- package/server/errors/license-error.js +1 -1
- package/server/routes.js +1 -1
- package/server/service/tool-entity/create-menu.js +1 -1
- package/server/service/tool-entity/create-service.js +1 -1
- package/server/service/tool-secret/tool-permission.js +1 -1
- package/server/service/tool-secret/tool-resolver.js +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x37c593=a0_0x3a23;(function(_0x3148c2,_0xf8f48d){const _0x9bfd0d=a0_0x3a23,_0x4e2243=_0x3148c2();while(!![]){try{const _0x57d90e=-parseInt(_0x9bfd0d(0xc5))/0x1+parseInt(_0x9bfd0d(0xc7))/0x2+parseInt(_0x9bfd0d(0xca))/0x3+parseInt(_0x9bfd0d(0xd0))/0x4+parseInt(_0x9bfd0d(0xcb))/0x5*(-parseInt(_0x9bfd0d(0xcc))/0x6)+-parseInt(_0x9bfd0d(0xd3))/0x7*(-parseInt(_0x9bfd0d(0xce))/0x8)+-parseInt(_0x9bfd0d(0xd6))/0x9*(parseInt(_0x9bfd0d(0xd1))/0xa);if(_0x57d90e===_0xf8f48d)break;else _0x4e2243['push'](_0x4e2243['shift']());}catch(_0x5e4473){_0x4e2243['push'](_0x4e2243['shift']());}}}(a0_0x1e69,0x45bf0));Object[a0_0x37c593(0xcf)](exports,a0_0x37c593(0xd2),{'value':!0x0}),exports[a0_0x37c593(0xc8)]=void 0x0;const tslib_1=require(a0_0x37c593(0xd5)),ERROR_CODES=tslib_1[a0_0x37c593(0xc6)](require('../constants/error-code'));function a0_0x3a23(_0x541408,_0x4ac231){const _0x1e694f=a0_0x1e69();return a0_0x3a23=function(_0x3a2355,_0x2ec5c7){_0x3a2355=_0x3a2355-0xc5;let _0x599721=_0x1e694f[_0x3a2355];return _0x599721;},a0_0x3a23(_0x541408,_0x4ac231);}class LicenseError extends Error{static get[a0_0x37c593(0xcd)](){const _0x1b5a72=a0_0x37c593;return Object[_0x1b5a72(0xc9)]({},ERROR_CODES);}constructor({errorCode:_0x42b932,detail:_0x1d41ae}){const _0x1e7f51=a0_0x37c593;super(_0x42b932),this['name']='license-error',this['errorCode']=_0x42b932,this[_0x1e7f51(0xd4)]=_0x1d41ae;}}function a0_0x1e69(){const _0x2b2bb8=['580VHdAui','__esModule','483399qFNTdh','detail','tslib','73341XQaDJE','543069jLWsdh','__importStar','838080OgiTZX','LicenseError','assign','1112736fGHWGP','125470QahOFu','120TXNfJN','ERROR_CODES','56yCgWla','defineProperty','2119680kAoLNr'];a0_0x1e69=function(){return _0x2b2bb8;};return a0_0x1e69();}exports['LicenseError']=LicenseError;
|
package/server/routes.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a0_0x37aa(){const _0x4b05d4=['things-factory:operato-tools:routes','bootstrap-module-domain-private-route','6391vCCqhg','1402722VZbOxy','debug','150xdJFsf','bootstrap-module-global-private-route','1xTgely','302346GyQIMN','7neYNAN','1155104SuJCjT','6840LblTwu','2884290Jczswg','2209704IkdDST','6668HYGeFR','bootstrap-module-domain-public-route','9SDAnew','bootstrap-module-global-public-route'];a0_0x37aa=function(){return _0x4b05d4;};return a0_0x37aa();}const a0_0x531de5=a0_0x1011;(function(_0x256eb3,_0x1bc855){const _0x4fd77f=a0_0x1011,_0x4d7672=_0x256eb3();while(!![]){try{const _0x371cdc=-parseInt(_0x4fd77f(0x1f2))/0x1*(-parseInt(_0x4fd77f(0x1f5))/0x2)+-parseInt(_0x4fd77f(0x1f3))/0x3+-parseInt(_0x4fd77f(0x1f9))/0x4*(parseInt(_0x4fd77f(0x1f0))/0x5)+parseInt(_0x4fd77f(0x200))/0x6*(-parseInt(_0x4fd77f(0x1f4))/0x7)+parseInt(_0x4fd77f(0x1f8))/0x8*(parseInt(_0x4fd77f(0x1fb))/0x9)+parseInt(_0x4fd77f(0x1f7))/0xa+parseInt(_0x4fd77f(0x1ff))/0xb*(-parseInt(_0x4fd77f(0x1f6))/0xc);if(_0x371cdc===_0x1bc855)break;else _0x4d7672['push'](_0x4d7672['shift']());}catch(_0x5b8b11){_0x4d7672['push'](_0x4d7672['shift']());}}}(a0_0x37aa,0x681cd));function a0_0x1011(_0x333fa0,_0x3273ba){const _0x37aa2e=a0_0x37aa();return a0_0x1011=function(_0x1011f3,_0x105677){_0x1011f3=_0x1011f3-0x1ef;let _0x545606=_0x37aa2e[_0x1011f3];return _0x545606;},a0_0x1011(_0x333fa0,_0x3273ba);}const debug=require(a0_0x531de5(0x1ef))(a0_0x531de5(0x1fd));process['on'](a0_0x531de5(0x1fc),(_0x75e79f,_0xfd3e97)=>{}),process['on'](a0_0x531de5(0x1f1),(_0x5018e1,_0x2f0a1d)=>{}),process['on'](a0_0x531de5(0x1fa),(_0x5e72e4,_0x4f3999)=>{}),process['on'](a0_0x531de5(0x1fe),(_0x29eb98,_0x2db944)=>{});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x1dbae0=a0_0x42b1;function a0_0x42b1(_0x32f1df,_0x4cf6ec){const _0x1d00e5=a0_0x1d00();return a0_0x42b1=function(_0x42b12d,_0x5a683a){_0x42b12d=_0x42b12d-0x119;let _0x18d58e=_0x1d00e5[_0x42b12d];return _0x18d58e;},a0_0x42b1(_0x32f1df,_0x4cf6ec);}(function(_0x37a8d3,_0x5eb89b){const _0x380275=a0_0x42b1,_0x1738c5=_0x37a8d3();while(!![]){try{const _0x2c3c08=-parseInt(_0x380275(0x12c))/0x1*(parseInt(_0x380275(0x149))/0x2)+-parseInt(_0x380275(0x15f))/0x3+-parseInt(_0x380275(0x12d))/0x4*(parseInt(_0x380275(0x14d))/0x5)+-parseInt(_0x380275(0x127))/0x6+-parseInt(_0x380275(0x18d))/0x7+parseInt(_0x380275(0x13f))/0x8+-parseInt(_0x380275(0x174))/0x9*(-parseInt(_0x380275(0x155))/0xa);if(_0x2c3c08===_0x5eb89b)break;else _0x1738c5['push'](_0x1738c5['shift']());}catch(_0x49b220){_0x1738c5['push'](_0x1738c5['shift']());}}}(a0_0x1d00,0xee9b1));Object[a0_0x1dbae0(0x11c)](exports,a0_0x1dbae0(0x14b),{'value':!0x0}),exports[a0_0x1dbae0(0x170)]=void 0x0;const tslib_1=require(a0_0x1dbae0(0x183)),type_graphql_1=require(a0_0x1dbae0(0x143)),resource_base_1=require(a0_0x1dbae0(0x189)),menu_base_1=require(a0_0x1dbae0(0x17c)),tool_permission_1=require(a0_0x1dbae0(0x13a)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x1dbae0(0x15b)),{plural:plural}=require('pluralize'),crypto_1=tslib_1['__importDefault'](require('crypto'));let OperatoToolCreateMenu=class{async['toolCreateMenu'](_0x396655,_0x52508e,_0x5a5642){const _0x2755ea=a0_0x1dbae0,{domain:_0xbb38d1,user:_0x3346c2,tx:_0x75985c}=_0x5a5642[_0x2755ea(0x172)];await(0x0,tool_permission_1[_0x2755ea(0x120)])('',_0x5a5642);const _0x2bbfbc=await _0x75985c[_0x2755ea(0x171)](resource_base_1[_0x2755ea(0x138)])['findOne']({'where':{'domain':{'id':_0xbb38d1['id']},'id':_0x396655}}),_0x1e866b=await _0x75985c[_0x2755ea(0x171)](resource_base_1[_0x2755ea(0x12f)])[_0x2755ea(0x12a)]({'where':{'domain':{'id':_0xbb38d1['id']},'entity':{'id':_0x2bbfbc['id']}}});let {name:_0x2ef5ef=''}=_0x2bbfbc||{},_0x2ec9d7=kebabCase(_0x2ef5ef),_0x504f5f=modelTemplate[_0x2755ea(0x152)](/{{pascalCase name}}/g,startCase(camelCase(_0x2ef5ef))['replace'](/ /g,''))[_0x2755ea(0x152)](/{{camelCase name}}/g,camelCase(_0x2ef5ef))[_0x2755ea(0x152)](/{{snakeCase name}}/g,snakeCase(_0x2ef5ef))[_0x2755ea(0x152)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x2ef5ef)))[_0x2755ea(0x152)](/ /g,''))[_0x2755ea(0x152)](/{{pluralCamelCase name}}/g,camelCase(plural(_0x2ef5ef)))[_0x2755ea(0x152)](/{{name}}/g,_0x2ef5ef),_0x1c57e4='';_0x2755ea(0x156)==_0x2bbfbc[_0x2755ea(0x131)]?_0x1c57e4=_0x2755ea(0x119):_0x2755ea(0x163)==_0x2bbfbc[_0x2755ea(0x131)]&&(_0x1c57e4='\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22basic\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22label\x22:\x20\x22data_history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22icon\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22logic\x22:\x20\x22history_copy\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20'),_0x504f5f=_0x504f5f[_0x2755ea(0x152)](/{{HistoryButton}}/g,_0x1c57e4);let _0x158b60=this[_0x2755ea(0x137)](_0x1e866b);_0x504f5f=_0x504f5f[_0x2755ea(0x152)](/{{SortColumns}}/g,_0x158b60[_0x2755ea(0x148)](','));let _0x3671a4=this[_0x2755ea(0x15e)](_0x1e866b);_0x504f5f=_0x504f5f[_0x2755ea(0x152)](/{{SearchColumns}}/g,_0x3671a4[_0x2755ea(0x148)](','));let _0x3b41e5=this[_0x2755ea(0x12b)](_0x1e866b);return _0x504f5f=_0x504f5f[_0x2755ea(0x152)](/{{GridColumns}}/g,_0x3b41e5[_0x2755ea(0x148)](',')),_0x504f5f=this[_0x2755ea(0x176)](_0x504f5f),await this[_0x2755ea(0x173)](_0x75985c,_0xbb38d1,_0x3346c2,_0x52508e,_0x2ec9d7,_0x504f5f),!0x0;}[a0_0x1dbae0(0x12b)](_0x1d3817){const _0x361177=a0_0x1dbae0;return _0x1d3817[_0x361177(0x18c)](_0x4eee5e=>'id'!=_0x4eee5e[_0x361177(0x147)]&&_0x4eee5e[_0x361177(0x16f)]>0x0)['sort'](function(_0x57be64,_0x22dc73){const _0x4b8487=_0x361177;return _0x57be64[_0x4b8487(0x16f)]-_0x22dc73[_0x4b8487(0x16f)];})[_0x361177(0x11a)](_0x3cf4b5=>{const _0x913239=_0x361177;let {gridEditor:_0xd2e01e=_0x913239(0x17d),name:_0x5121ec,term:_0x5b3626,gridWidth:_0xe42a53=0x0,gridAlign:_0x593cdb=_0x913239(0x186),nullable:_0x261c35=!0x1}=_0x3cf4b5;if(null==_0xd2e01e&&(_0xd2e01e=_0x913239(0x17d)),null==_0x593cdb&&(_0x593cdb=_0x913239(0x186)),_0x913239(0x18e)==_0x5121ec||'creator_id'==_0x5121ec)return _0x5121ec='updater_id'==_0x5121ec?_0x913239(0x13b):_0x913239(0x182),_0x913239(0x14f)+_0x5121ec+_0x913239(0x12e)+_0x5121ec+_0x913239(0x14c);if(_0x913239(0x16d)==_0x5121ec||_0x913239(0x135)==_0x5121ec)return'{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22'+(_0x913239(0x16d)==_0x5121ec?'updatedAt':_0x913239(0x125))+_0x913239(0x12e)+_0x5121ec+'\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}';let _0x90732a=_0x913239(0x159)!=_0xd2e01e&&_0x913239(0x166)!=_0xd2e01e,_0x2ca463=_0x913239(0x166)==_0xd2e01e;0x1!=_0x2ca463&&0x0!=_0x90732a||(_0xd2e01e='string');let _0x386778=_0x913239(0x164)+_0xd2e01e+'\x22,\x22name\x22:\x20\x22'+camelCase(_0x5121ec)+'\x22,\x22header\x22:\x20\x22'+_0x5b3626+'\x22,\x22hidden\x22:'+_0x2ca463+_0x913239(0x165)+_0x90732a+',\x22mandatory\x22:\x20'+!_0x261c35+_0x913239(0x153)+_0x593cdb+_0x913239(0x146)+_0xe42a53+_0x913239(0x151);return _0x913239(0x130)==_0x3cf4b5[_0x913239(0x15c)]&&(_0x386778+=_0x913239(0x187)+_0x3cf4b5[_0x913239(0x17f)]+'\x22}'),_0x913239(0x150)==_0x3cf4b5[_0x913239(0x15c)]&&(_0x386778+=',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22'+_0x3cf4b5[_0x913239(0x17f)]+'\x22}'),_0x913239(0x144)==_0x3cf4b5[_0x913239(0x15c)]&&(_0x386778+=',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22'+camelCase(plural(_0x3cf4b5[_0x913239(0x17f)]))+_0x913239(0x123)),_0x386778+='}',_0x386778;});}[a0_0x1dbae0(0x15e)](_0x1fdefa){const _0x59c09e=a0_0x1dbae0;return _0x1fdefa[_0x59c09e(0x18c)](_0x35ee5e=>_0x35ee5e[_0x59c09e(0x126)]>0x0)['sort'](function(_0x48af9c,_0x24fded){const _0x49751b=_0x59c09e;return _0x48af9c[_0x49751b(0x126)]-_0x24fded[_0x49751b(0x126)];})[_0x59c09e(0x11a)](_0x328b27=>{const _0x2c17a5=_0x59c09e;let _0x233665=_0x328b27['searchOper'];return _0x2c17a5(0x18c)==_0x233665?'\x22'+camelCase(_0x328b27[_0x2c17a5(0x147)])+'\x22':(_0x233665||(_0x233665='eq'),_0x2c17a5(0x13c)+camelCase(_0x328b27[_0x2c17a5(0x147)])+_0x2c17a5(0x161)+_0x233665+'\x22}');});}[a0_0x1dbae0(0x137)](_0x34eea1){const _0x5764f3=a0_0x1dbae0;return _0x34eea1[_0x5764f3(0x18c)](_0x5898e7=>_0x5898e7[_0x5764f3(0x180)]>0x0)[_0x5764f3(0x140)](function(_0x1582ac,_0x402d6d){const _0x320c70=_0x5764f3;return _0x1582ac[_0x320c70(0x180)]-_0x402d6d[_0x320c70(0x180)];})[_0x5764f3(0x11a)](_0x411f5d=>_0x5764f3(0x122)+camelCase(_0x411f5d['name'])+_0x5764f3(0x11d)+_0x411f5d[_0x5764f3(0x157)]+'}');}async[a0_0x1dbae0(0x173)](_0x5d7e23,_0x317806,_0x2c1b82,_0x3a40ce,_0x4d456a,_0x2456ea){const _0x477965=a0_0x1dbae0;let _0x257f5a=await _0x5d7e23[_0x477965(0x171)](menu_base_1[_0x477965(0x11e)])[_0x477965(0x14a)]({'where':{'domain':{'id':_0x317806['id']},'id':_0x3a40ce}}),_0x512fb1=(await _0x5d7e23[_0x477965(0x171)](menu_base_1['Menu'])['query'](_0x477965(0x154)+_0x3a40ce+_0x477965(0x14e)+_0x3a40ce+'\x27'))[0x0]['rank']+0xa,_0x4392d6=new menu_base_1[(_0x477965(0x11e))]();_0x4392d6[_0x477965(0x147)]=_0x4d456a,_0x4392d6['menuType']=_0x477965(0x132),_0x4392d6[_0x477965(0x167)]=_0x477965(0x15a),_0x4392d6[_0x477965(0x136)]=_0x512fb1,_0x4392d6[_0x477965(0x16a)]=!0x1,_0x4392d6['routing']=_0x4d456a,_0x4392d6['template']=_0x2456ea,_0x4392d6[_0x477965(0x17a)]=_0x477965(0x184),_0x4392d6[_0x477965(0x13d)]=_0x257f5a,await _0x5d7e23['getRepository'](menu_base_1[_0x477965(0x11e)])['save'](Object[_0x477965(0x141)](Object[_0x477965(0x141)]({},_0x4392d6),{'domain':_0x317806,'creator':_0x2c1b82,'updater':_0x2c1b82}));}['enc'](_0x578e2f){const _0x1297c7=a0_0x1dbae0;let _0x1f9f5c=JSON[_0x1297c7(0x121)](_0x578e2f)['split'](/(.{100})/)[_0x1297c7(0x18c)](_0x51b393=>_0x51b393),_0x480f2e=[_0x1297c7(0x169),_0x1297c7(0x16c),_0x1297c7(0x18b),_0x1297c7(0x129),_0x1297c7(0x185),_0x1297c7(0x162),_0x1297c7(0x133),_0x1297c7(0x124)],_0x24720f=crypto_1['default'][_0x1297c7(0x15d)](0x20)[_0x1297c7(0x18a)](_0x1297c7(0x13e)),_0x483011=Buffer['from'](_0x24720f,'hex'),_0xed32cf=_0x24720f[_0x1297c7(0x139)](0x0,0x10),_0x2cb6b1=['',_0xed32cf,_0xed32cf,_0xed32cf,_0xed32cf,_0xed32cf,_0xed32cf,_0xed32cf],_0x4f7a90=0x0,_0x370395=[];_0x370395[_0x1297c7(0x145)](_0x24720f);for(var _0x4ea0cc=0x0;_0x4ea0cc<_0x1f9f5c[_0x1297c7(0x181)];_0x4ea0cc++,_0x4f7a90++){_0x4f7a90==_0x480f2e[_0x1297c7(0x181)]&&(_0x4f7a90=0x0);let _0x220265=crypto_1['default'][_0x1297c7(0x177)](_0x480f2e[_0x4f7a90],_0x483011,_0x2cb6b1[_0x4f7a90]),_0x20ff28=_0x220265[_0x1297c7(0x16b)](_0x1f9f5c[_0x4ea0cc],_0x1297c7(0x16e),_0x1297c7(0x13e));_0x20ff28+=_0x220265['final'](_0x1297c7(0x13e)),_0x370395[_0x1297c7(0x145)](_0x20ff28);}return _0x370395[_0x1297c7(0x148)](_0x1297c7(0x178));}};tslib_1[a0_0x1dbae0(0x18f)]([(0x0,type_graphql_1[a0_0x1dbae0(0x188)])(a0_0x1dbae0(0x128)),(0x0,type_graphql_1['Mutation'])(_0x54be59=>Boolean,{'description':a0_0x1dbae0(0x11f)}),tslib_1[a0_0x1dbae0(0x168)](0x0,(0x0,type_graphql_1[a0_0x1dbae0(0x134)])('id')),tslib_1[a0_0x1dbae0(0x168)](0x1,(0x0,type_graphql_1[a0_0x1dbae0(0x134)])(a0_0x1dbae0(0x17e))),tslib_1[a0_0x1dbae0(0x168)](0x2,(0x0,type_graphql_1['Ctx'])()),tslib_1[a0_0x1dbae0(0x11b)](a0_0x1dbae0(0x17b),Function),tslib_1[a0_0x1dbae0(0x11b)](a0_0x1dbae0(0x160),[String,String,Object]),tslib_1[a0_0x1dbae0(0x11b)](a0_0x1dbae0(0x142),Promise)],OperatoToolCreateMenu[a0_0x1dbae0(0x158)],a0_0x1dbae0(0x179),null),OperatoToolCreateMenu=tslib_1[a0_0x1dbae0(0x18f)]([(0x0,type_graphql_1[a0_0x1dbae0(0x175)])()],OperatoToolCreateMenu),exports['OperatoToolCreateMenu']=OperatoToolCreateMenu;function a0_0x1d00(){const _0xb8d45c=['updater_id','__decorate','\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22basic\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22label\x22:\x20\x22data_history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22icon\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22logic\x22:\x20\x22history_json\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20','map','__metadata','defineProperty','\x22,\x22desc\x22:','Menu','Operato\x20Tool\x20Create\x20Menu','checkStudioTemplateIsOverLimit','stringify','{\x22name\x22:\x22','\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}','aes256','createdAt','searchRank','6653934sBxmml','@transaction','aes-256-cfb8','find','createGridColumns','1701515eBVFDS','32gBOqCP','\x22,\x22header\x22:\x20\x22','EntityColumn','code','dataProp','SCREEN','aes-256-ctr','Arg','created_at','rank','createSortCols','Entity','substring','./../tool-secret/tool-permission','updater','{\x22name\x22:\x20\x22','parent','hex','8422384MkuFXS','sort','assign','design:returntype','type-graphql','entity','push','\x22,\x22width\x22:','name','join','2jDyrTo','findOne','__esModule','\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}','1008010BPkyoM','\x27\x20or\x20id\x20=\x20\x27','{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22','scenario','\x20,\x22exportable\x22:\x20true','replace',',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22','select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27','20tWLPgl','JSON','reverseSort','prototype','readonly','meta-grist-page','lodash','refType','randomBytes','createSearchCols','2172888vnkXZa','design:paramtypes','\x22,\x22operator\x22:\x20\x22','aes-256-ofb','COPY','{\x22type\x22:\x20\x22','\x20,\x22editable\x22:\x20','hidden','category','__param','aes-256-ecb','hiddenFlag','update','aes-256-cbc','updated_at','utf8','gridRank','OperatoToolCreateMenu','getRepository','state','createMenuData','25238313xhvUlv','Resolver','enc','createCipheriv','h1z0q9i9x7q6','toolCreateMenu','resourceUrl','design:type','@things-factory/menu-base','string','parent_menu_id','refName','sortRank','length','creator','tslib','@things-factory/meta-ui/client/pages/meta-grist-page','aes-256-cfb1','left',',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22','Directive','@things-factory/resource-base','toString','aes-256-cfb','filter','3754569QKIwSa'];a0_0x1d00=function(){return _0xb8d45c;};return a0_0x1d00();}const modelTemplate='\x0a{\x0a\x20\x20\x22menu\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x22title\x22:\x20\x22{{name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22\x22,\x0a\x20\x20\x20\x20\x20\x20\x22desc\x22:\x20\x22\x22\x0a\x20\x20},\x0a\x20\x20\x22gql\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x22query\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22list_func\x22:\x20\x22{{pluralCamelCase\x20name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22find_one_func\x22:\x22{{camelCase\x20name}}\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x22mutation\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22multiple\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22func\x22:\x22updateMultiple{{pascalCase\x20name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22{{pascalCase\x20name}}Patch\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22delete\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22func\x22:\x22delete{{pluralPascalCase\x20name}}\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20},\x0a\x20\x20\x22button\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22export\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22add\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22delete\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22save\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20],\x0a\x20\x20\x22grid_column\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22string\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22id\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22header\x22:\x20\x22id\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22hidden\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22editable\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22mandatory\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22sortable\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22align\x22:\x20\x22left\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22width\x22:\x200,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22exportable\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20},\x0a{{GridColumns}}\x0a\x20\x20],\x0a\x20\x20\x22grid\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22button\x22:[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{{HistoryButton}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22option\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22mobile_mode\x22:\x20\x22LIST\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22desk_mode\x22:\x20\x22GRID\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22use_row_checker\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22pages\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2020,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2050,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20100,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20300\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22view_mode\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22GRID\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22LIST\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22CARD\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22sorters\x22:\x20[\x0a{{SortColumns}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20]\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x22row\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22multiple_select\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22click\x22:\x20\x22select-row-toggle\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20},\x0a\x20\x20\x22search\x22:\x20[\x0a{{SearchColumns}}\x0a\x20\x20]\x0a}\x0a';
|
|
1
|
+
'use strict';function a0_0x5ad4(){const _0x5d1ffc=['h1z0q9i9x7q6','\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22basic\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22label\x22:\x20\x22data_history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22icon\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22logic\x22:\x20\x22history_json\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20','\x0a{\x0a\x20\x20\x22menu\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x22title\x22:\x20\x22{{name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22\x22,\x0a\x20\x20\x20\x20\x20\x20\x22desc\x22:\x20\x22\x22\x0a\x20\x20},\x0a\x20\x20\x22gql\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x22query\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22list_func\x22:\x20\x22{{pluralCamelCase\x20name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22find_one_func\x22:\x22{{camelCase\x20name}}\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x22mutation\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22multiple\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22func\x22:\x22updateMultiple{{pascalCase\x20name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22{{pascalCase\x20name}}Patch\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22delete\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22func\x22:\x22delete{{pluralPascalCase\x20name}}\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20},\x0a\x20\x20\x22button\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22export\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22add\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22delete\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22save\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20],\x0a\x20\x20\x22grid_column\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22string\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22id\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22header\x22:\x20\x22id\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22hidden\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22editable\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22mandatory\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22sortable\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22align\x22:\x20\x22left\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22width\x22:\x200,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22exportable\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20},\x0a{{GridColumns}}\x0a\x20\x20],\x0a\x20\x20\x22grid\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22button\x22:[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{{HistoryButton}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22option\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22mobile_mode\x22:\x20\x22LIST\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22desk_mode\x22:\x20\x22GRID\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22use_row_checker\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22pages\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2020,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2050,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20100,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20300\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22view_mode\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22GRID\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22LIST\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22CARD\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22sorters\x22:\x20[\x0a{{SortColumns}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20]\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x22row\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22multiple_select\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22click\x22:\x20\x22select-row-toggle\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20},\x0a\x20\x20\x22search\x22:\x20[\x0a{{SearchColumns}}\x0a\x20\x20]\x0a}\x0a','prototype','{\x22name\x22:\x22',',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22','createGridColumns','{\x22type\x22:\x20\x22','Resolver','556689GDQPSd','gridRank','createCipheriv','aes-256-cfb','1205754RvGgwr','pluralize','updatedAt','Arg','{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22','reverseSort','category','findOne','\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}','rank','createdAt','entity','\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}','find','85746fJFchf','checkStudioTemplateIsOverLimit','__metadata','205aeiHRy','refName','sort','join','getRepository','6bnaGnp','\x22,\x22operator\x22:\x20\x22','updater','__param','\x22,\x22header\x22:\x20\x22','push','hex','5428512lFRcOQ','substring','createSearchCols','EntityColumn','hidden','randomBytes','dataProp','lodash','Directive','map','@transaction','updated_at','updater_id',',\x22mandatory\x22:\x20','length','__importDefault',',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22','2488CvKcpu','update','@things-factory/menu-base','query','64433jTExnJ','stringify','split','\x22,\x22width\x22:','__esModule','Mutation','\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}','searchRank','name','menuType','createMenuData','SCREEN','Menu','replace',',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22','filter','645ClCjxs','created_at','aes-256-ecb','tslib','design:paramtypes','code','select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27','\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22basic\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22label\x22:\x20\x22data_history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22icon\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22logic\x22:\x20\x22history_copy\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20','{\x22name\x22:\x20\x22','routing','toolCreateMenu','aes-256-ofb','aes-256-ctr','parent','\x22,\x22hidden\x22:','refType','aes256','crypto','design:type','hiddenFlag','createSortCols','enc','design:returntype','4613520EDoXMi','default','resourceUrl','string','./../tool-secret/tool-permission','assign','\x27\x20or\x20id\x20=\x20\x27','__decorate','sortRank','OperatoToolCreateMenu','final','creator','utf8','30wQJxRr','left'];a0_0x5ad4=function(){return _0x5d1ffc;};return a0_0x5ad4();}const a0_0x17a8da=a0_0x364e;(function(_0x5e368b,_0x2c5335){const _0x1e8fce=a0_0x364e,_0x1f680a=_0x5e368b();while(!![]){try{const _0x1e2ca5=parseInt(_0x1e8fce(0x1c7))/0x1*(parseInt(_0x1e8fce(0x1ab))/0x2)+-parseInt(_0x1e8fce(0x1d7))/0x3*(-parseInt(_0x1e8fce(0x1c3))/0x4)+-parseInt(_0x1e8fce(0x1a6))/0x5*(-parseInt(_0x1e8fce(0x218))/0x6)+parseInt(_0x1e8fce(0x206))/0x7+parseInt(_0x1e8fce(0x1ee))/0x8+-parseInt(_0x1e8fce(0x1b2))/0x9+parseInt(_0x1e8fce(0x1fb))/0xa*(-parseInt(_0x1e8fce(0x20a))/0xb);if(_0x1e2ca5===_0x2c5335)break;else _0x1f680a['push'](_0x1f680a['shift']());}catch(_0x2bab52){_0x1f680a['push'](_0x1f680a['shift']());}}}(a0_0x5ad4,0x9b8ef));function a0_0x364e(_0x429855,_0x44b7f3){const _0x5ad452=a0_0x5ad4();return a0_0x364e=function(_0x364eab,_0x27a79d){_0x364eab=_0x364eab-0x1a6;let _0x3dfde6=_0x5ad452[_0x364eab];return _0x3dfde6;},a0_0x364e(_0x429855,_0x44b7f3);}Object['defineProperty'](exports,a0_0x17a8da(0x1cb),{'value':!0x0}),exports[a0_0x17a8da(0x1f7)]=void 0x0;const tslib_1=require(a0_0x17a8da(0x1da)),type_graphql_1=require('type-graphql'),resource_base_1=require('@things-factory/resource-base'),menu_base_1=require(a0_0x17a8da(0x1c5)),tool_permission_1=require(a0_0x17a8da(0x1f2)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x17a8da(0x1b9)),{plural:plural}=require(a0_0x17a8da(0x20b)),crypto_1=tslib_1[a0_0x17a8da(0x1c1)](require(a0_0x17a8da(0x1e8)));let OperatoToolCreateMenu=class{async[a0_0x17a8da(0x1e1)](_0x57c693,_0x4dd520,_0x27ebd4){const _0x443520=a0_0x17a8da,{domain:_0x3e09d7,user:_0x344d88,tx:_0x27cb2a}=_0x27ebd4['state'];await(0x0,tool_permission_1[_0x443520(0x219)])('',_0x27ebd4);const _0x1038ce=await _0x27cb2a[_0x443520(0x1aa)](resource_base_1['Entity'])[_0x443520(0x211)]({'where':{'domain':{'id':_0x3e09d7['id']},'id':_0x57c693}}),_0x1acd85=await _0x27cb2a['getRepository'](resource_base_1[_0x443520(0x1b5)])[_0x443520(0x217)]({'where':{'domain':{'id':_0x3e09d7['id']},'entity':{'id':_0x1038ce['id']}}});let {name:_0x46ed65=''}=_0x1038ce||{},_0x562ad5=kebabCase(_0x46ed65),_0x5c698c=modelTemplate[_0x443520(0x1d4)](/{{pascalCase name}}/g,startCase(camelCase(_0x46ed65))[_0x443520(0x1d4)](/ /g,''))[_0x443520(0x1d4)](/{{camelCase name}}/g,camelCase(_0x46ed65))['replace'](/{{snakeCase name}}/g,snakeCase(_0x46ed65))[_0x443520(0x1d4)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x46ed65)))['replace'](/ /g,''))[_0x443520(0x1d4)](/{{pluralCamelCase name}}/g,camelCase(plural(_0x46ed65)))['replace'](/{{name}}/g,_0x46ed65),_0x483c44='';'JSON'==_0x1038ce[_0x443520(0x1b8)]?_0x483c44=_0x443520(0x1fe):'COPY'==_0x1038ce[_0x443520(0x1b8)]&&(_0x483c44=_0x443520(0x1de)),_0x5c698c=_0x5c698c[_0x443520(0x1d4)](/{{HistoryButton}}/g,_0x483c44);let _0x2b2484=this[_0x443520(0x1eb)](_0x1acd85);_0x5c698c=_0x5c698c[_0x443520(0x1d4)](/{{SortColumns}}/g,_0x2b2484[_0x443520(0x1a9)](','));let _0x5980ae=this[_0x443520(0x1b4)](_0x1acd85);_0x5c698c=_0x5c698c[_0x443520(0x1d4)](/{{SearchColumns}}/g,_0x5980ae[_0x443520(0x1a9)](','));let _0x584709=this[_0x443520(0x203)](_0x1acd85);return _0x5c698c=_0x5c698c[_0x443520(0x1d4)](/{{GridColumns}}/g,_0x584709[_0x443520(0x1a9)](',')),_0x5c698c=this[_0x443520(0x1ec)](_0x5c698c),await this[_0x443520(0x1d1)](_0x27cb2a,_0x3e09d7,_0x344d88,_0x4dd520,_0x562ad5,_0x5c698c),!0x0;}[a0_0x17a8da(0x203)](_0x38986c){const _0x576094=a0_0x17a8da;return _0x38986c['filter'](_0x18a36a=>'id'!=_0x18a36a[_0x576094(0x1cf)]&&_0x18a36a[_0x576094(0x207)]>0x0)[_0x576094(0x1a8)](function(_0x5a9a87,_0x17e163){const _0x4e1f87=_0x576094;return _0x5a9a87[_0x4e1f87(0x207)]-_0x17e163[_0x4e1f87(0x207)];})[_0x576094(0x1bb)](_0x5b9438=>{const _0x23dc7c=_0x576094;let {gridEditor:_0x1d743e=_0x23dc7c(0x1f1),name:_0x1d6737,term:_0x80e133,gridWidth:_0x3a517a=0x0,gridAlign:_0x1cc53=_0x23dc7c(0x1fc),nullable:_0x593dbd=!0x1}=_0x5b9438;if(null==_0x1d743e&&(_0x1d743e=_0x23dc7c(0x1f1)),null==_0x1cc53&&(_0x1cc53='left'),_0x23dc7c(0x1be)==_0x1d6737||'creator_id'==_0x1d6737)return _0x1d6737=_0x23dc7c(0x1be)==_0x1d6737?_0x23dc7c(0x1ad):_0x23dc7c(0x1f9),_0x23dc7c(0x20e)+_0x1d6737+_0x23dc7c(0x1af)+_0x1d6737+_0x23dc7c(0x212);if(_0x23dc7c(0x1bd)==_0x1d6737||_0x23dc7c(0x1d8)==_0x1d6737)return'{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22'+(_0x23dc7c(0x1bd)==_0x1d6737?_0x23dc7c(0x20c):_0x23dc7c(0x214))+'\x22,\x22header\x22:\x20\x22'+_0x1d6737+_0x23dc7c(0x216);let _0x4277f6='readonly'!=_0x1d743e&&'hidden'!=_0x1d743e,_0x119708=_0x23dc7c(0x1b6)==_0x1d743e;0x1!=_0x119708&&0x0!=_0x4277f6||(_0x1d743e=_0x23dc7c(0x1f1));let _0x37b314=_0x23dc7c(0x204)+_0x1d743e+'\x22,\x22name\x22:\x20\x22'+camelCase(_0x1d6737)+_0x23dc7c(0x1af)+_0x80e133+_0x23dc7c(0x1e5)+_0x119708+'\x20,\x22editable\x22:\x20'+_0x4277f6+_0x23dc7c(0x1bf)+!_0x593dbd+_0x23dc7c(0x1d5)+_0x1cc53+_0x23dc7c(0x1ca)+_0x3a517a+'\x20,\x22exportable\x22:\x20true';return _0x23dc7c(0x1dc)==_0x5b9438[_0x23dc7c(0x1e6)]&&(_0x37b314+=_0x23dc7c(0x1c2)+_0x5b9438[_0x23dc7c(0x1a7)]+'\x22}'),'scenario'==_0x5b9438[_0x23dc7c(0x1e6)]&&(_0x37b314+=_0x23dc7c(0x202)+_0x5b9438['refName']+'\x22}'),_0x23dc7c(0x215)==_0x5b9438[_0x23dc7c(0x1e6)]&&(_0x37b314+=',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22'+camelCase(plural(_0x5b9438[_0x23dc7c(0x1a7)]))+_0x23dc7c(0x1cd)),_0x37b314+='}',_0x37b314;});}[a0_0x17a8da(0x1b4)](_0x5da176){const _0x5d992f=a0_0x17a8da;return _0x5da176[_0x5d992f(0x1d6)](_0x3d8ab9=>_0x3d8ab9[_0x5d992f(0x1ce)]>0x0)[_0x5d992f(0x1a8)](function(_0x1ad43d,_0x276048){const _0x3519c2=_0x5d992f;return _0x1ad43d[_0x3519c2(0x1ce)]-_0x276048[_0x3519c2(0x1ce)];})[_0x5d992f(0x1bb)](_0x2dfcf9=>{const _0x116343=_0x5d992f;let _0x1a5ae2=_0x2dfcf9['searchOper'];return _0x116343(0x1d6)==_0x1a5ae2?'\x22'+camelCase(_0x2dfcf9[_0x116343(0x1cf)])+'\x22':(_0x1a5ae2||(_0x1a5ae2='eq'),_0x116343(0x1df)+camelCase(_0x2dfcf9[_0x116343(0x1cf)])+_0x116343(0x1ac)+_0x1a5ae2+'\x22}');});}[a0_0x17a8da(0x1eb)](_0x377e0f){const _0x4bba75=a0_0x17a8da;return _0x377e0f['filter'](_0x203e7c=>_0x203e7c[_0x4bba75(0x1f6)]>0x0)['sort'](function(_0x14127d,_0x1777e9){const _0x4a2e17=_0x4bba75;return _0x14127d[_0x4a2e17(0x1f6)]-_0x1777e9[_0x4a2e17(0x1f6)];})[_0x4bba75(0x1bb)](_0x3fdc43=>_0x4bba75(0x201)+camelCase(_0x3fdc43[_0x4bba75(0x1cf)])+'\x22,\x22desc\x22:'+_0x3fdc43[_0x4bba75(0x20f)]+'}');}async[a0_0x17a8da(0x1d1)](_0x272f16,_0x2f201e,_0x15c958,_0x45b975,_0x4be071,_0x49038b){const _0x448a8c=a0_0x17a8da;let _0x38e4d7=await _0x272f16[_0x448a8c(0x1aa)](menu_base_1[_0x448a8c(0x1d3)])['findOne']({'where':{'domain':{'id':_0x2f201e['id']},'id':_0x45b975}}),_0x5323a7=(await _0x272f16['getRepository'](menu_base_1['Menu'])[_0x448a8c(0x1c6)](_0x448a8c(0x1dd)+_0x45b975+_0x448a8c(0x1f4)+_0x45b975+'\x27'))[0x0][_0x448a8c(0x213)]+0xa,_0x176d60=new menu_base_1[(_0x448a8c(0x1d3))]();_0x176d60[_0x448a8c(0x1cf)]=_0x4be071,_0x176d60[_0x448a8c(0x1d0)]=_0x448a8c(0x1d2),_0x176d60[_0x448a8c(0x210)]='meta-grist-page',_0x176d60[_0x448a8c(0x213)]=_0x5323a7,_0x176d60[_0x448a8c(0x1ea)]=!0x1,_0x176d60[_0x448a8c(0x1e0)]=_0x4be071,_0x176d60['template']=_0x49038b,_0x176d60[_0x448a8c(0x1f0)]='@things-factory/meta-ui/client/pages/meta-grist-page',_0x176d60[_0x448a8c(0x1e4)]=_0x38e4d7,await _0x272f16[_0x448a8c(0x1aa)](menu_base_1['Menu'])['save'](Object['assign'](Object[_0x448a8c(0x1f3)]({},_0x176d60),{'domain':_0x2f201e,'creator':_0x15c958,'updater':_0x15c958}));}[a0_0x17a8da(0x1ec)](_0x14e50c){const _0x12309e=a0_0x17a8da;let _0x495100=JSON[_0x12309e(0x1c8)](_0x14e50c)[_0x12309e(0x1c9)](/(.{100})/)['filter'](_0x2847b6=>_0x2847b6),_0x378ca4=[_0x12309e(0x1d9),'aes-256-cbc',_0x12309e(0x209),'aes-256-cfb8','aes-256-cfb1',_0x12309e(0x1e2),_0x12309e(0x1e3),_0x12309e(0x1e7)],_0x3352f5=crypto_1[_0x12309e(0x1ef)][_0x12309e(0x1b7)](0x20)['toString']('hex'),_0x5459d2=Buffer['from'](_0x3352f5,_0x12309e(0x1b1)),_0x21cdab=_0x3352f5[_0x12309e(0x1b3)](0x0,0x10),_0x5df0a5=['',_0x21cdab,_0x21cdab,_0x21cdab,_0x21cdab,_0x21cdab,_0x21cdab,_0x21cdab],_0x1766a4=0x0,_0x718e4f=[];_0x718e4f[_0x12309e(0x1b0)](_0x3352f5);for(var _0xebc5cc=0x0;_0xebc5cc<_0x495100[_0x12309e(0x1c0)];_0xebc5cc++,_0x1766a4++){_0x1766a4==_0x378ca4[_0x12309e(0x1c0)]&&(_0x1766a4=0x0);let _0x1fc67e=crypto_1[_0x12309e(0x1ef)][_0x12309e(0x208)](_0x378ca4[_0x1766a4],_0x5459d2,_0x5df0a5[_0x1766a4]),_0x4d59e9=_0x1fc67e[_0x12309e(0x1c4)](_0x495100[_0xebc5cc],_0x12309e(0x1fa),'hex');_0x4d59e9+=_0x1fc67e[_0x12309e(0x1f8)]('hex'),_0x718e4f[_0x12309e(0x1b0)](_0x4d59e9);}return _0x718e4f[_0x12309e(0x1a9)](_0x12309e(0x1fd));}};tslib_1[a0_0x17a8da(0x1f5)]([(0x0,type_graphql_1[a0_0x17a8da(0x1ba)])(a0_0x17a8da(0x1bc)),(0x0,type_graphql_1[a0_0x17a8da(0x1cc)])(_0xe7d63b=>Boolean,{'description':'Operato\x20Tool\x20Create\x20Menu'}),tslib_1[a0_0x17a8da(0x1ae)](0x0,(0x0,type_graphql_1[a0_0x17a8da(0x20d)])('id')),tslib_1[a0_0x17a8da(0x1ae)](0x1,(0x0,type_graphql_1['Arg'])('parent_menu_id')),tslib_1[a0_0x17a8da(0x1ae)](0x2,(0x0,type_graphql_1['Ctx'])()),tslib_1['__metadata'](a0_0x17a8da(0x1e9),Function),tslib_1[a0_0x17a8da(0x21a)](a0_0x17a8da(0x1db),[String,String,Object]),tslib_1[a0_0x17a8da(0x21a)](a0_0x17a8da(0x1ed),Promise)],OperatoToolCreateMenu[a0_0x17a8da(0x200)],a0_0x17a8da(0x1e1),null),OperatoToolCreateMenu=tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x17a8da(0x205)])()],OperatoToolCreateMenu),exports[a0_0x17a8da(0x1f7)]=OperatoToolCreateMenu;const modelTemplate=a0_0x17a8da(0x1ff);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x5acf9f=a0_0x1e9a;(function(_0x3e5a6e,_0x456182){const _0x4da4ae=a0_0x1e9a,_0x21fc57=_0x3e5a6e();while(!![]){try{const _0x345af4=-parseInt(_0x4da4ae(0x162))/0x1*(-parseInt(_0x4da4ae(0x184))/0x2)+-parseInt(_0x4da4ae(0x1bf))/0x3*(-parseInt(_0x4da4ae(0x143))/0x4)+parseInt(_0x4da4ae(0x15a))/0x5+-parseInt(_0x4da4ae(0x1ae))/0x6*(-parseInt(_0x4da4ae(0x1ad))/0x7)+parseInt(_0x4da4ae(0x153))/0x8+-parseInt(_0x4da4ae(0x1a7))/0x9+-parseInt(_0x4da4ae(0x1c6))/0xa;if(_0x345af4===_0x456182)break;else _0x21fc57['push'](_0x21fc57['shift']());}catch(_0x571be6){_0x21fc57['push'](_0x21fc57['shift']());}}}(a0_0x4a96,0xa69c8));function a0_0x1e9a(_0x1d99bf,_0x4c09a3){const _0x4a96e1=a0_0x4a96();return a0_0x1e9a=function(_0x1e9a44,_0x3218bc){_0x1e9a44=_0x1e9a44-0x143;let _0x587d10=_0x4a96e1[_0x1e9a44];return _0x587d10;},a0_0x1e9a(_0x1d99bf,_0x4c09a3);}function a0_0x4a96(){const _0x463ee=['Resolvers\x20}\x20from\x20\x27./','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','existsSync','creator_id','filter','Resolvers,\x20subscribers\x20as\x20','Resolver','-mutation.ts','prototype','index.ts','...','COPY','join','sort','bigint','getFieldType','Arg','Entity','mkdirSync','\x0aimport\x20{\x20Resolver,\x20Mutation,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20In\x20}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20New{{pascalCase\x20name}},\x20{{pascalCase\x20name}}Patch\x20}\x20from\x20\x27./{{name}}-type\x27\x0aimport\x20{\x20getRepository\x20}\x20from\x20\x27@things-factory/shell\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Mutation\x20{\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20create\x20new\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20create{{pascalCase\x20name}}(@Arg(\x27{{camelCase\x20name}}\x27)\x20{{camelCase\x20name}}:\x20New{{pascalCase\x20name}},\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20return\x20await\x20tx.getRepository({{pascalCase\x20name}}).save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20modify\x20{{pascalCase\x20name}}\x20information\x27\x20})\x0a\x20\x20async\x20update{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27id\x27)\x20id:\x20string,\x0a\x20\x20\x20\x20@Arg(\x27patch\x27)\x20patch:\x20{{pascalCase\x20name}}Patch,\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20repository\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20repository.findOne(\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20)\x0a\x0a\x20\x20\x20\x20return\x20await\x20repository.save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20...patch,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20[{{pascalCase\x20name}}],\x20{\x20description:\x20\x22To\x20modify\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20information\x22\x20})\x0a\x20\x20async\x20updateMultiple{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27patches\x27,\x20type\x20=>\x20[{{pascalCase\x20name}}Patch])\x20patches:\x20{{pascalCase\x20name}}Patch[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}[]>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20results\x20=\x20[]\x0a\x20\x20\x20\x20const\x20_createRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27+\x27)\x0a\x20\x20\x20\x20const\x20_updateRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27M\x27)\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}Repo\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x0a\x20\x20\x20\x20if\x20(_createRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_createRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20newRecord\x20=\x20_createRecords[i]\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...newRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27+\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20if\x20(_updateRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_updateRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20updRecord\x20=\x20_updateRecords[i]\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20{{camelCase\x20name}}Repo.findOne({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id:updRecord.id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...updRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27M\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20return\x20results\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20delete{{pascalCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove({\x20domain,\x20id,\x20updater:user\x20})\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20multiple\x20{{camelCase\x20name}}s\x27\x20})\x0a\x20\x20async\x20delete{{pluralPascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27ids\x27,\x20type\x20=>\x20[String])\x20ids:\x20string[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20delEntitis\x20=\x20ids.map(id=>{\x0a\x20\x20\x20\x20\x20\x20return\x20{domain,id,updater:user}\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove(delEntitis)\x0a\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a}\x0a','pascalCaseName','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','\x20{\x20nullable:\x20','design:type','Entities,\x20resolvers\x20as\x20','map','domain','110JrCKhx','uniqRank','\x20})','string','-history\x27','type-graphql','nullable','Float','rank','tableName','readFileSync','creator','/index.ts','createTypeText','Int','EntitySubscribers,','createNoHistoryServiceFiels','push','env','/server','-history-type.ts','decimal','utf8','toolCreateService','\x0a\x20\x20','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a\x20\x20@Column(\x27simple-json\x27,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20@Field(type\x20=>\x20ScalarObject,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20historyJson?:\x20any\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','@things-factory/shell','double','createDir','existsPath','dataProp','\x0aimport\x20{\x20EventSubscriber\x20}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20HistoryEntitySubscriber\x20}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20getRepository\x20}\x20from\x20\x27@things-factory/shell\x27\x0a\x0a@EventSubscriber()\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryEntitySubscriber\x20extends\x20HistoryEntitySubscriber<{{pascalCase\x20name}},{{pascalCase\x20name}}History>\x20{\x0a\x20\x20public\x20get\x20entity()\x20{\x0a\x20\x20\x20\x20return\x20{{pascalCase\x20name}}\x0a\x20\x20}\x0a\x0a\x20\x20public\x20get\x20historyEntity()\x20{\x0a\x20\x20\x20\x20return\x20{{pascalCase\x20name}}History\x0a\x20\x20}\x0a\x0a\x20\x20{{entityToJson}}\x0a\x0a\x20\x20async\x20beforeRemoveHistory(history:{{pascalCase\x20name}}History,entity:{{pascalCase\x20name}}){\x0a\x20\x20\x20\x20let\x20repo\x20=\x20getRepository({{pascalCase\x20name}}History);\x0a\x20\x20\x20\x20const\x20revNo\x20=\x20await\x20repo.createQueryBuilder()\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.select(\x27max(data_revision_no)\x27,\x20\x27rev_no\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.where(\x27domain_id\x20=\x20:domainId\x27,\x20{\x20domainId:\x20entity.domain.id\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.andWhere(\x27original_id\x20=\x20:originalId\x27,\x20{\x20originalId:\x20entity.id\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.getRawOne()\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20history.dataRevisionNo\x20=\x20revNo\x20?\x20revNo.rev_no\x20+\x201\x20:\x201;\x0a\x20\x20\x20\x20return\x20history;\x0a\x20\x20}\x0a}\x0a','__decorate','JSON','timestamp\x20without\x20time\x20zone','2807226vdGHAT','includes','__esModule','/*\x20ENTITIES\x20*/\x0a\x09...','updater_id','domain_id','8495361gpLVCh','6zTBqtx','getColTxtType','__metadata','lodash','\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryList\x20}\x20from\x20\x27./{{name}}-history-type\x27\x0a\x0a@Resolver({{pascalCase\x20name}}History)\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryQuery\x20{\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}History,\x20{\x20description:\x20\x27To\x20fetch\x20a\x20{{pascalCase\x20name}}History\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}History(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}History>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20return\x20await\x20getRepository({{pascalCase\x20name}}History).findOne({\x0a\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20}\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}HistoryList,\x20{\x20description:\x20\x27To\x20fetch\x20multiple\x20{{pluralPascalCase\x20name}}History\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}Histories(@Args()\x20params:\x20ListParam,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}HistoryList>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20queryBuilder\x20=\x20getQueryBuilderFromListParams({\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20params,\x0a\x20\x20\x20\x20\x20\x20repository:\x20await\x20getRepository({{pascalCase\x20name}}History)\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20const\x20[items,\x20total]\x20=\x20await\x20queryBuilder.getManyAndCount()\x0a\x0a\x20\x20\x20\x20return\x20{\x20items,\x20total\x20}\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20Domain)\x0a\x20\x20async\x20domain(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<Domain>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(Domain).findOneBy({id:{{camelCase\x20name}}History.domainId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20updater(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}History.updaterId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20creator(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}History.creatorId})\x0a\x20\x20}\x0a}\x0a','/service','pluralPascalCaseName','datetime','float','state','indexOf','Query','import\x20{\x20entities\x20as\x20','.ts','/event-subscriber.ts','PWD','export\x20*\x20from\x20\x27./','2770203THqmRD','-query.ts','pluralize','-type.ts','colType','OperatoToolCreateService','@things-factory/resource-base','22990420rsgtgZ','\x0a\x20\x20public\x20createHistoryEntity(manager,\x20entity)\x20{\x0a\x20\x20\x20\x20let\x20history\x20=\x20manager.create(this.historyEntity,\x20entity);\x0a\x20\x20\x20\x20history.historyJson\x20=\x20JSON.stringify(entity);\x0a\x20\x20\x20\x20return\x20history;\x0a\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20','writeFile','\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryQuery\x20}\x20from\x20\x27./{{name}}-history-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryEntitySubscriber\x20}\x20from\x20\x27./event-subscriber\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}},\x20{{pascalCase\x20name}}History]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}HistoryQuery,\x20{{pascalCase\x20name}}Mutation]\x0aexport\x20const\x20subscribers\x20=\x20[{{pascalCase\x20name}}HistoryEntitySubscriber]\x0a\x0a','packages','createHistoryEntityText','colSize','createServiceFiles','length','\x0a/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0a\x0a/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0a\x0aexport\x20const\x20entities\x20=\x20[\x20\x20\x0a\x20\x20/*\x20ENTITIES\x20*/\x0a]\x20\x0a\x0a\x0aexport\x20const\x20schema\x20=\x20{\x0a\x20\x20resolverClasses:\x20[\x0a\x20\x20\x20\x20/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x20\x20]\x20\x0a}\x0a\x0aexport\x20const\x20subscribers\x20=\x20[\x0a\x20\x20/*\x20SUBSCRIBERS\x20*/\x0a]\x0a','defineProperty','snakeCaseName','4EovqoF','Resolvers,','replace','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','long','created_at','-history.ts','Entities,','Date','integer','/server/service/','updater','columnToEntityColumn','text','type\x20=>','\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}List\x20}\x20from\x20\x27./{{name}}-type\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Query\x20{\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20fetch\x20a\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20return\x20await\x20getRepository({{pascalCase\x20name}}).findOne({\x0a\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20}\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}List,\x20{\x20description:\x20\x27To\x20fetch\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{pluralCamelCase\x20name}}(@Args()\x20params:\x20ListParam,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}List>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20queryBuilder\x20=\x20getQueryBuilderFromListParams({\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20params,\x0a\x20\x20\x20\x20\x20\x20repository:\x20await\x20getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20const\x20convertedParams\x20=\x20convertListParams(params,\x20domain.id)\x0a\x20\x20\x20\x20const\x20[items,\x20total]\x20=\x20await\x20queryBuilder.getManyAndCount()\x0a\x0a\x20\x20\x20\x20return\x20{\x20items,\x20total\x20}\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20Domain)\x0a\x20\x20async\x20domain(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<Domain>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(Domain).findOneBy({id:{{camelCase\x20name}}.domainId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20updater(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.updaterId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20creator(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.creatorId})\x0a\x20\x20}\x0a}\x0a','384024EIIbZY','writeFileSync','name','getRepository','createHistoryServiceFiles','createServicePath','find','2131020ncSJIv','tslib','number','date','camelCaseName','Operato\x20Tool\x20Create\x20Service','updated_at','split','12403ajWOYS','EntityColumn','__param','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20Domain\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0a@Entity(\x27{{tableName}}\x27)\x0a{{indexAnn}}\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}\x20{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','@Field(','createEntityText'];a0_0x4a96=function(){return _0x463ee;};return a0_0x4a96();}Object[a0_0x5acf9f(0x1d0)](exports,a0_0x5acf9f(0x1a9),{'value':!0x0}),exports[a0_0x5acf9f(0x1c4)]=void 0x0;const tslib_1=require(a0_0x5acf9f(0x15b)),type_graphql_1=require(a0_0x5acf9f(0x189)),shell_1=require(a0_0x5acf9f(0x19e)),resource_base_1=require(a0_0x5acf9f(0x1c5)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x5acf9f(0x1b1)),{plural:plural}=require(a0_0x5acf9f(0x1c1)),fs=require('fs');let OperatoToolCreateService=class{async[a0_0x5acf9f(0x19b)](_0x5d6356,_0x420482){const _0x1409b6=a0_0x5acf9f,{domain:_0x18582a}=_0x420482[_0x1409b6(0x1b7)],_0x3dae37=await(0x0,shell_1[_0x1409b6(0x156)])(resource_base_1[_0x1409b6(0x17a)])['findOne']({'where':{'id':_0x5d6356}}),_0x454a95=await(0x0,shell_1[_0x1409b6(0x156)])(resource_base_1[_0x1409b6(0x163)])[_0x1409b6(0x159)]({'where':{'domain':{'id':_0x18582a['id']},'entity':{'id':_0x3dae37['id']}}});let {name:_0x9c19df='',bundle:_0x29849d=''}=_0x3dae37||{},_0x18c7b5=this['getProjectRootPath'](),_0x2a2918=kebabCase(_0x9c19df);return await this[_0x1409b6(0x158)](_0x18c7b5,_0x29849d,_0x2a2918),await this[_0x1409b6(0x1cd)](_0x18c7b5,_0x29849d,_0x9c19df,_0x2a2918,_0x3dae37,_0x454a95),!0x0;}async['createServiceFiles'](_0x10fea7,_0x11569a,_0xda7f81,_0x1eac56,_0x514545,_0x119fce){const _0x1dcf36=a0_0x5acf9f;let _0x4fb34b={'name':_0x1eac56,'tableName':_0x514545[_0x1dcf36(0x18d)],'pascalCaseName':startCase(camelCase(_0xda7f81))['replace'](/ /g,''),'camelCaseName':camelCase(_0xda7f81),'snakeCaseName':snakeCase(_0xda7f81),'pluralPascalCaseName':startCase(camelCase(plural(_0xda7f81)))[_0x1dcf36(0x145)](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0xda7f81))},_0x4172ae=_0x10fea7+'/packages/'+_0x11569a+_0x1dcf36(0x14d);['JSON',_0x1dcf36(0x174)][_0x1dcf36(0x1a8)](_0x514545['dataProp'])?await this[_0x1dcf36(0x157)](_0x4172ae,_0x1eac56,_0x514545,_0x119fce,_0x4fb34b):await this[_0x1dcf36(0x194)](_0x4172ae,_0x1eac56,_0x514545,_0x119fce,_0x4fb34b);}async['createHistoryServiceFiles'](_0x4873c5,_0xa7308,_0x2577eb,_0x447887,_0x51becc){const _0x1d4a29=a0_0x5acf9f;await this[_0x1d4a29(0x1c8)](_0x4873c5+(_0xa7308+_0x1d4a29(0x190)),serviceHistoryIndex,_0x51becc);let _0x2ff02d=this[_0x1d4a29(0x168)](_0x2577eb,_0x447887);await this['writeFile'](_0x4873c5+(_0xa7308+'/'+_0xa7308+_0x1d4a29(0x1bb)),_0x2ff02d,_0x51becc),await this['writeFile'](_0x4873c5+(_0xa7308+'/'+_0xa7308+_0x1d4a29(0x1c0)),serviceQuery,_0x51becc),await this[_0x1d4a29(0x1c8)](_0x4873c5+(_0xa7308+'/'+_0xa7308+_0x1d4a29(0x170)),serviceMutation,_0x51becc);let _0x26abdc=this[_0x1d4a29(0x191)](_0x447887);await this[_0x1d4a29(0x1c8)](_0x4873c5+(_0xa7308+'/'+_0xa7308+_0x1d4a29(0x1c2)),_0x26abdc,_0x51becc);let _0x401964=this[_0x1d4a29(0x1cb)](_0x2577eb,_0x447887);await this[_0x1d4a29(0x1c8)](_0x4873c5+(_0xa7308+'/'+_0xa7308+_0x1d4a29(0x149)),_0x401964,_0x51becc);let _0x463384='';_0x1d4a29(0x1a5)==_0x2577eb[_0x1d4a29(0x1a2)]?(_0x463384=_0x1d4a29(0x1c7),await this[_0x1d4a29(0x1c8)](_0x4873c5+(_0xa7308+_0x1d4a29(0x1bc)),serviceEntitySubscriber,_0x51becc)):_0x463384='';let _0x493acb=serviceEntitySubscriber[_0x1d4a29(0x145)](/{{entityToJson}}/g,_0x463384);await this[_0x1d4a29(0x1c8)](_0x4873c5+(_0xa7308+'/event-subscriber.ts'),_0x493acb,_0x51becc),await this[_0x1d4a29(0x1c8)](_0x4873c5+(_0xa7308+'/'+_0xa7308+'-history-query.ts'),serviceHistoryQuery,_0x51becc),await this[_0x1d4a29(0x1c8)](_0x4873c5+(_0xa7308+'/'+_0xa7308+_0x1d4a29(0x198)),sereviceHistoryType,_0x51becc);let _0x5c7373=_0x4873c5+_0x1d4a29(0x172);0x0==await this[_0x1d4a29(0x1a1)](_0x5c7373)&&await this[_0x1d4a29(0x1c8)](_0x5c7373,allIndex,_0x51becc);let _0x45f9fa=await fs[_0x1d4a29(0x18e)](_0x5c7373,_0x1d4a29(0x19a));_0x45f9fa[_0x1d4a29(0x1b8)]('export\x20*\x20from\x20\x27./'+_0x51becc[_0x1d4a29(0x155)]+'/'+_0x51becc['name']+'-history\x27')<0x0&&(_0x45f9fa=_0x45f9fa[_0x1d4a29(0x145)](/\/\* EXPORT ENTITY TYPES \*\//,_0x1d4a29(0x16a)+_0x51becc[_0x1d4a29(0x155)]+'/'+_0x51becc[_0x1d4a29(0x155)]+_0x1d4a29(0x188))),_0x45f9fa['indexOf'](_0x1d4a29(0x1be)+_0x51becc['name']+'/'+_0x51becc[_0x1d4a29(0x155)]+'\x27')<0x0&&(_0x45f9fa=_0x45f9fa['replace'](/\/\* EXPORT ENTITY TYPES \*\//,_0x1d4a29(0x16a)+_0x51becc[_0x1d4a29(0x155)]+'/'+_0x51becc[_0x1d4a29(0x155)]+'\x27')),_0x45f9fa[_0x1d4a29(0x1b8)](_0x1d4a29(0x1ba)+_0x51becc['pascalCaseName']+_0x1d4a29(0x181)+_0x51becc[_0x1d4a29(0x17d)]+_0x1d4a29(0x16e)+_0x51becc[_0x1d4a29(0x17d)]+'EntitySubscribers\x20}\x20from\x20\x27./'+_0x51becc['name']+'\x27')<0x0&&(_0x45f9fa=_0x45f9fa[_0x1d4a29(0x145)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x1d4a29(0x17e)+_0x51becc[_0x1d4a29(0x17d)]+'Entities,\x20resolvers\x20as\x20'+_0x51becc[_0x1d4a29(0x17d)]+_0x1d4a29(0x16e)+_0x51becc[_0x1d4a29(0x17d)]+'EntitySubscribers\x20}\x20from\x20\x27./'+_0x51becc['name']+'\x27')),_0x45f9fa[_0x1d4a29(0x1b8)](_0x1d4a29(0x173)+_0x51becc[_0x1d4a29(0x17d)]+_0x1d4a29(0x14a))<0x0&&(_0x45f9fa=_0x45f9fa[_0x1d4a29(0x145)](/\/\* ENTITIES \*\//,_0x1d4a29(0x1aa)+_0x51becc[_0x1d4a29(0x17d)]+_0x1d4a29(0x14a))),_0x45f9fa[_0x1d4a29(0x1b8)]('...'+_0x51becc[_0x1d4a29(0x17d)]+_0x1d4a29(0x144))<0x0&&(_0x45f9fa=_0x45f9fa[_0x1d4a29(0x145)](/\/\* RESOLVER CLASSES \*\//,'/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...'+_0x51becc['pascalCaseName']+_0x1d4a29(0x144))),_0x45f9fa[_0x1d4a29(0x1b8)](_0x1d4a29(0x173)+_0x51becc[_0x1d4a29(0x17d)]+_0x1d4a29(0x193))<0x0&&(_0x45f9fa=_0x45f9fa['replace'](/\/\* SUBSCRIBERS \*\//,'/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...'+_0x51becc[_0x1d4a29(0x17d)]+_0x1d4a29(0x193))),await this[_0x1d4a29(0x1c8)](_0x5c7373,_0x45f9fa,_0x51becc);}async[a0_0x5acf9f(0x194)](_0x9361ed,_0x7bd90b,_0x5e9329,_0x582423,_0x5b68f2){const _0x13934f=a0_0x5acf9f;await this[_0x13934f(0x1c8)](_0x9361ed+(_0x7bd90b+_0x13934f(0x190)),serviceIndex,_0x5b68f2),await this[_0x13934f(0x1c8)](_0x9361ed+(_0x7bd90b+'/'+_0x7bd90b+_0x13934f(0x1c0)),serviceQuery,_0x5b68f2),await this['writeFile'](_0x9361ed+(_0x7bd90b+'/'+_0x7bd90b+_0x13934f(0x170)),serviceMutation,_0x5b68f2);let _0xf3564d=this['createEntityText'](_0x5e9329,_0x582423);await this[_0x13934f(0x1c8)](_0x9361ed+(_0x7bd90b+'/'+_0x7bd90b+'.ts'),_0xf3564d,_0x5b68f2);let _0xed8b67=this[_0x13934f(0x191)](_0x582423);await this[_0x13934f(0x1c8)](_0x9361ed+(_0x7bd90b+'/'+_0x7bd90b+_0x13934f(0x1c2)),_0xed8b67,_0x5b68f2);let _0x174149=_0x9361ed+_0x13934f(0x172);0x0==await this['existsPath'](_0x174149)&&await this[_0x13934f(0x1c8)](_0x174149,allIndex,_0x5b68f2);let _0x3d8009=await fs[_0x13934f(0x18e)](_0x174149,_0x13934f(0x19a));_0x3d8009[_0x13934f(0x1b8)](_0x13934f(0x1be)+_0x5b68f2[_0x13934f(0x155)]+'/'+_0x5b68f2[_0x13934f(0x155)]+'\x27')<0x0&&(_0x3d8009=_0x3d8009['replace'](/\/\* EXPORT ENTITY TYPES \*\//,_0x13934f(0x16a)+_0x5b68f2[_0x13934f(0x155)]+'/'+_0x5b68f2[_0x13934f(0x155)]+'\x27')),_0x3d8009['indexOf'](_0x13934f(0x1ba)+_0x5b68f2[_0x13934f(0x17d)]+_0x13934f(0x181)+_0x5b68f2['pascalCaseName']+_0x13934f(0x169)+_0x5b68f2[_0x13934f(0x155)]+'\x27')<0x0&&(_0x3d8009=_0x3d8009[_0x13934f(0x145)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,'/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20'+_0x5b68f2[_0x13934f(0x17d)]+'Entities,\x20resolvers\x20as\x20'+_0x5b68f2[_0x13934f(0x17d)]+_0x13934f(0x169)+_0x5b68f2[_0x13934f(0x155)]+'\x27')),_0x3d8009[_0x13934f(0x1b8)](_0x13934f(0x173)+_0x5b68f2[_0x13934f(0x17d)]+_0x13934f(0x14a))<0x0&&(_0x3d8009=_0x3d8009['replace'](/\/\* ENTITIES \*\//,_0x13934f(0x1aa)+_0x5b68f2['pascalCaseName']+_0x13934f(0x14a))),_0x3d8009[_0x13934f(0x1b8)](_0x13934f(0x173)+_0x5b68f2[_0x13934f(0x17d)]+_0x13934f(0x144))<0x0&&(_0x3d8009=_0x3d8009[_0x13934f(0x145)](/\/\* RESOLVER CLASSES \*\//,_0x13934f(0x146)+_0x5b68f2['pascalCaseName']+_0x13934f(0x144))),await this[_0x13934f(0x1c8)](_0x174149,_0x3d8009,_0x5b68f2);}[a0_0x5acf9f(0x191)](_0x2a82c1){const _0x1418f9=a0_0x5acf9f;let _0x1310e3=sereviceType,_0x3046b1=_0x2a82c1[_0x1418f9(0x182)](_0x17f310=>{const _0x1613b3=_0x1418f9;if('id'==_0x17f310[_0x1613b3(0x155)])return'';if(_0x1613b3(0x1ac)==_0x17f310['name'])return'';if('created_at'==_0x17f310[_0x1613b3(0x155)])return'';if(_0x1613b3(0x160)==_0x17f310[_0x1613b3(0x155)])return'';if(_0x1613b3(0x16c)==_0x17f310['name'])return'';if(_0x1613b3(0x1ab)==_0x17f310[_0x1613b3(0x155)])return'';let _0x287c2a=this[_0x1613b3(0x178)](_0x17f310),_0x32e481=this[_0x1613b3(0x1af)](_0x17f310),_0x26be1f=camelCase(_0x17f310['name']);return'\x20\x20'+(_0x1613b3(0x167)+(0x0==_0x287c2a[_0x1613b3(0x1ce)]?'':'type\x20=>'+_0x287c2a+',')+'\x20{\x20nullable:\x20'+_0x17f310[_0x1613b3(0x18a)]+_0x1613b3(0x186))+_0x1613b3(0x19c)+(''+_0x26be1f+(_0x17f310[_0x1613b3(0x18a)]?'?':'')+':\x20'+_0x32e481)+'\x0a';});_0x1310e3=_0x1310e3[_0x1418f9(0x145)](/{{newTypeColumns}}/g,_0x3046b1[_0x1418f9(0x175)]('\x0a'));let _0x4d6d95=_0x2a82c1[_0x1418f9(0x182)](_0x22178b=>{const _0x23ddbb=_0x1418f9;if('id'==_0x22178b['name'])return'';if('domain_id'==_0x22178b[_0x23ddbb(0x155)])return'';if(_0x23ddbb(0x148)==_0x22178b[_0x23ddbb(0x155)])return'';if(_0x23ddbb(0x160)==_0x22178b[_0x23ddbb(0x155)])return'';if(_0x23ddbb(0x16c)==_0x22178b[_0x23ddbb(0x155)])return'';if(_0x23ddbb(0x1ab)==_0x22178b['name'])return'';let _0x52728c=this['getFieldType'](_0x22178b),_0x5db857=this[_0x23ddbb(0x1af)](_0x22178b);_0x22178b['nullable']=!0x0;let _0x11e5c5=camelCase(_0x22178b[_0x23ddbb(0x155)]);return'\x20\x20'+('@Field('+(0x0==_0x52728c[_0x23ddbb(0x1ce)]?'':_0x23ddbb(0x151)+_0x52728c+',')+_0x23ddbb(0x17f)+_0x22178b[_0x23ddbb(0x18a)]+'\x20})')+_0x23ddbb(0x19c)+(''+_0x11e5c5+(_0x22178b[_0x23ddbb(0x18a)]?'?':'')+':\x20'+_0x5db857)+'\x0a';});return _0x1310e3=_0x1310e3[_0x1418f9(0x145)](/{{patchTypeColumns}}/g,_0x4d6d95[_0x1418f9(0x175)]('\x0a')),_0x1310e3;}[a0_0x5acf9f(0x168)](_0x99cd9,_0x3b39f3){const _0x34d156=a0_0x5acf9f;let _0x546e9b=serviceEntity,_0x9e3e4d=_0x3b39f3[_0x34d156(0x176)](function(_0x415ecd,_0x26ed6a){const _0x1c8125=_0x34d156;return _0x415ecd['rank']-_0x26ed6a[_0x1c8125(0x18c)];})[_0x34d156(0x182)](_0x5fd5cd=>this['columnToEntityColumn'](_0x5fd5cd));['COPY',_0x34d156(0x1a5)][_0x34d156(0x1a8)](_0x99cd9[_0x34d156(0x1a2)])&&_0x9e3e4d[_0x34d156(0x195)]('\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201'),_0x546e9b=_0x546e9b[_0x34d156(0x145)](/{{entityColumns}}/g,_0x9e3e4d['join']('\x0a'));let _0x1f885c='',_0x45773a=_0x3b39f3[_0x34d156(0x16d)](_0x3b2878=>_0x3b2878[_0x34d156(0x185)]&&_0x3b2878['uniqRank']>0x0)[_0x34d156(0x176)](function(_0x56a322,_0x4811c3){const _0x1f6165=_0x34d156;return _0x56a322[_0x1f6165(0x185)]-_0x4811c3[_0x1f6165(0x185)];});if(_0x45773a[_0x34d156(0x1ce)]>0x0){_0x1f885c='@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})';let _0x4bfc0a=_0x45773a[_0x34d156(0x182)](_0x5308e5=>{const _0x372c21=_0x34d156;let _0x52f146=_0x5308e5[_0x372c21(0x155)];return _0x372c21(0x1ac)==_0x5308e5[_0x372c21(0x155)]&&(_0x52f146=_0x372c21(0x183)),_0x372c21(0x16c)==_0x5308e5[_0x372c21(0x155)]&&(_0x52f146=_0x372c21(0x18f)),_0x372c21(0x1ab)==_0x5308e5['name']&&(_0x52f146=_0x372c21(0x14e)),'{{camelCase\x20name}}.'+camelCase(_0x52f146);});_0x1f885c=_0x1f885c[_0x34d156(0x145)](/{{indexColumns}}/g,_0x4bfc0a[_0x34d156(0x175)](','));}return _0x546e9b=_0x546e9b[_0x34d156(0x145)](/{{indexAnn}}/g,_0x1f885c),_0x546e9b;}['createHistoryEntityText'](_0x586b61,_0x362dfa){const _0x68d5da=a0_0x5acf9f;let _0x35f695=_0x68d5da(0x1a5)==_0x586b61[_0x68d5da(0x1a2)]?serviceEntityHistJson:serviceEntityHistCopy,_0x4a4680=_0x362dfa[_0x68d5da(0x176)](function(_0x4ee7b7,_0x479e37){const _0x1214c2=_0x68d5da;return _0x4ee7b7[_0x1214c2(0x18c)]-_0x479e37[_0x1214c2(0x18c)];})[_0x68d5da(0x182)](_0x2dda56=>this['columnToEntityColumn'](_0x2dda56));return _0x35f695=_0x35f695['replace'](/{{entityColumns}}/g,_0x4a4680['join']('\x0a')),_0x35f695;}[a0_0x5acf9f(0x14f)](_0x5b37b2){const _0x2bf593=a0_0x5acf9f;if('id'==_0x5b37b2['name'])return'';if(_0x2bf593(0x1ac)==_0x5b37b2['name'])return'';if(_0x2bf593(0x148)==_0x5b37b2[_0x2bf593(0x155)])return'';if(_0x2bf593(0x160)==_0x5b37b2[_0x2bf593(0x155)])return'';if(_0x2bf593(0x16c)==_0x5b37b2[_0x2bf593(0x155)])return'';if(_0x2bf593(0x1ab)==_0x5b37b2[_0x2bf593(0x155)])return'';let _0x1e98ab=_0x5b37b2[_0x2bf593(0x1c3)];_0x2bf593(0x19f)==_0x5b37b2[_0x2bf593(0x1c3)]&&(_0x1e98ab='double\x20precision'),_0x2bf593(0x147)==_0x5b37b2[_0x2bf593(0x1c3)]&&(_0x1e98ab=_0x2bf593(0x177)),'string'==_0x5b37b2['colType']&&(_0x1e98ab='character\x20varying'),_0x2bf593(0x1b5)==_0x5b37b2[_0x2bf593(0x1c3)]&&(_0x1e98ab=_0x2bf593(0x1a6));let _0x5b1518='';_0x2bf593(0x187)==_0x5b37b2[_0x2bf593(0x1c3)]&&(_0x5b1518=_0x5b37b2[_0x2bf593(0x1cc)]);let _0x492f7d=this[_0x2bf593(0x178)](_0x5b37b2),_0x5593b3=this[_0x2bf593(0x1af)](_0x5b37b2),_0x2a5f67=camelCase(_0x5b37b2[_0x2bf593(0x155)]);return'\x20\x20'+('@Column({name:\x27'+_0x5b37b2[_0x2bf593(0x155)]+'\x27,\x20type:\x20\x27'+_0x1e98ab+'\x27,\x20nullable:\x20'+_0x5b37b2['nullable']+'\x20'+(0x0==_0x5b1518['length']?'':',length:'+_0x5b1518)+_0x2bf593(0x186))+'\x0a\x20\x20'+(_0x2bf593(0x167)+(0x0==_0x492f7d[_0x2bf593(0x1ce)]?'':'type\x20=>'+_0x492f7d+',')+_0x2bf593(0x17f)+_0x5b37b2['nullable']+_0x2bf593(0x186))+_0x2bf593(0x19c)+(''+_0x2a5f67+(_0x5b37b2[_0x2bf593(0x18a)]?'?':'')+':\x20'+_0x5593b3)+'\x0a';}[a0_0x5acf9f(0x178)](_0x3663c4){const _0x1a0d8a=a0_0x5acf9f;let _0x4bb4f2='';return _0x1a0d8a(0x19f)==_0x3663c4['colType']&&(_0x4bb4f2=_0x1a0d8a(0x18b)),_0x1a0d8a(0x1b6)==_0x3663c4[_0x1a0d8a(0x1c3)]&&(_0x4bb4f2=_0x1a0d8a(0x18b)),'long'==_0x3663c4[_0x1a0d8a(0x1c3)]&&(_0x4bb4f2=_0x1a0d8a(0x192)),_0x1a0d8a(0x14c)==_0x3663c4['colType']&&(_0x4bb4f2='Int'),_0x4bb4f2;}[a0_0x5acf9f(0x1af)](_0x48e298){const _0xa9c12d=a0_0x5acf9f;let _0xd15656=_0x48e298['colType'];return _0xa9c12d(0x199)==_0x48e298[_0xa9c12d(0x1c3)]&&(_0xd15656='number'),_0xa9c12d(0x19f)==_0x48e298['colType']&&(_0xd15656=_0xa9c12d(0x15c)),_0xa9c12d(0x1b6)==_0x48e298['colType']&&(_0xd15656=_0xa9c12d(0x15c)),_0xa9c12d(0x14c)==_0x48e298[_0xa9c12d(0x1c3)]&&(_0xd15656=_0xa9c12d(0x15c)),'long'==_0x48e298[_0xa9c12d(0x1c3)]&&(_0xd15656=_0xa9c12d(0x15c)),'datetime'==_0x48e298['colType']&&(_0xd15656=_0xa9c12d(0x14b)),_0xa9c12d(0x15d)==_0x48e298[_0xa9c12d(0x1c3)]&&(_0xd15656=_0xa9c12d(0x14b)),_0xa9c12d(0x150)==_0x48e298[_0xa9c12d(0x1c3)]&&(_0xd15656=_0xa9c12d(0x187)),_0xd15656;}async[a0_0x5acf9f(0x1c8)](_0x3b0fcc,_0x46ae5d,_0x48771b){const _0x1b8a68=a0_0x5acf9f;await fs[_0x1b8a68(0x154)](_0x3b0fcc,this['replaceNamesMap'](_0x46ae5d,_0x48771b),_0x1b8a68(0x19a));}['replaceNamesMap'](_0x217379,_0x3d33c2){const _0x54921d=a0_0x5acf9f;return _0x217379[_0x54921d(0x145)](/{{pascalCase name}}/g,_0x3d33c2[_0x54921d(0x17d)])[_0x54921d(0x145)](/{{camelCase name}}/g,_0x3d33c2[_0x54921d(0x15e)])[_0x54921d(0x145)](/{{snakeCase name}}/g,_0x3d33c2[_0x54921d(0x1d1)])[_0x54921d(0x145)](/{{pluralPascalCase name}}/g,_0x3d33c2[_0x54921d(0x1b4)])[_0x54921d(0x145)](/{{pluralCamelCase name}}/g,_0x3d33c2['pluralCamelCaseName'])['replace'](/{{tableName}}/g,_0x3d33c2['tableName'])[_0x54921d(0x145)](/{{name}}/g,_0x3d33c2[_0x54921d(0x155)]);}async[a0_0x5acf9f(0x158)](_0x3b2463,_0x1581d3,_0x3b8c8d){const _0x4dd1d1=a0_0x5acf9f;let _0x106862=_0x3b2463+'/packages';await this[_0x4dd1d1(0x1a0)](_0x106862),_0x106862=_0x106862+'/'+_0x1581d3,await this[_0x4dd1d1(0x1a0)](_0x106862),_0x106862+=_0x4dd1d1(0x197),await this[_0x4dd1d1(0x1a0)](_0x106862),_0x106862+=_0x4dd1d1(0x1b3),await this[_0x4dd1d1(0x1a0)](_0x106862),_0x106862=_0x106862+'/'+_0x3b8c8d,await this['createDir'](_0x106862);}['getProjectRootPath'](){const _0x43ffa7=a0_0x5acf9f;let _0xd35f16=process[_0x43ffa7(0x196)][_0x43ffa7(0x1bd)][_0x43ffa7(0x161)]('/'),_0x2d2f41=[];for(let _0x489711=0x0;_0x489711<_0xd35f16[_0x43ffa7(0x1ce)]&&_0x43ffa7(0x1ca)!=_0xd35f16[_0x489711];_0x489711++)_0x2d2f41['push'](_0xd35f16[_0x489711]);return _0x2d2f41[_0x43ffa7(0x175)]('/');}async[a0_0x5acf9f(0x1a0)](_0x207ff2){const _0x42f479=a0_0x5acf9f;0x0==await this[_0x42f479(0x1a1)](_0x207ff2)&&fs[_0x42f479(0x17b)](_0x207ff2);}async[a0_0x5acf9f(0x1a1)](_0x5e792c){const _0x3526f5=a0_0x5acf9f;return await fs[_0x3526f5(0x16b)](_0x5e792c);}};tslib_1[a0_0x5acf9f(0x1a4)]([(0x0,type_graphql_1[a0_0x5acf9f(0x1b9)])(_0x29b49a=>Boolean,{'description':a0_0x5acf9f(0x15f)}),tslib_1['__param'](0x0,(0x0,type_graphql_1[a0_0x5acf9f(0x179)])('id')),tslib_1[a0_0x5acf9f(0x164)](0x1,(0x0,type_graphql_1['Ctx'])()),tslib_1[a0_0x5acf9f(0x1b0)](a0_0x5acf9f(0x180),Function),tslib_1['__metadata']('design:paramtypes',[String,Object]),tslib_1[a0_0x5acf9f(0x1b0)]('design:returntype',Promise)],OperatoToolCreateService[a0_0x5acf9f(0x171)],'toolCreateService',null),OperatoToolCreateService=tslib_1[a0_0x5acf9f(0x1a4)]([(0x0,type_graphql_1[a0_0x5acf9f(0x16f)])()],OperatoToolCreateService),exports[a0_0x5acf9f(0x1c4)]=OperatoToolCreateService;const allIndex=a0_0x5acf9f(0x1cf),serviceIndex='\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}}]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}Mutation]\x0a',serviceHistoryIndex=a0_0x5acf9f(0x1c9),serviceQuery=a0_0x5acf9f(0x152),serviceHistoryQuery=a0_0x5acf9f(0x1b2),serviceMutation=a0_0x5acf9f(0x17c),sereviceType='\x0aimport\x20{\x20ObjectType,\x20Field,\x20InputType,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@InputType()\x0aexport\x20class\x20New{{pascalCase\x20name}}\x20{\x0a{{newTypeColumns}}\x0a}\x0a\x0a@InputType()\x0aexport\x20class\x20{{pascalCase\x20name}}Patch\x20{\x0a\x20\x20@Field(type\x20=>\x20ID,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20id?:\x20string\x0a\x0a{{patchTypeColumns}}\x0a\x0a\x20\x20@Field()\x0a\x20\x20cuFlag:\x20string\x0a}\x0a\x0a@ObjectType()\x0aexport\x20class\x20{{pascalCase\x20name}}List\x20{\x0a\x20\x20@Field(type\x20=>\x20[{{pascalCase\x20name}}])\x0a\x20\x20items:\x20{{pascalCase\x20name}}[]\x0a\x0a\x20\x20@Field(type\x20=>\x20Int)\x0a\x20\x20total:\x20number\x0a}\x0a',sereviceHistoryType='\x0aimport\x20{\x20ObjectType,\x20Field,\x20InputType,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0a\x0a@ObjectType()\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryList\x20{\x0a\x20\x20@Field(type\x20=>\x20[{{pascalCase\x20name}}History])\x0a\x20\x20items:\x20{{pascalCase\x20name}}History[]\x0a\x0a\x20\x20@Field(type\x20=>\x20Int)\x0a\x20\x20total:\x20number\x0a}\x0a',serviceEntity=a0_0x5acf9f(0x165),serviceEntityHistCopy=a0_0x5acf9f(0x166),serviceEntityHistJson=a0_0x5acf9f(0x19d),serviceEntitySubscriber=a0_0x5acf9f(0x1a3);
|
|
1
|
+
'use strict';const a0_0x20ebbe=a0_0x423a;function a0_0x423a(_0x37029a,_0x32f849){const _0x16a47b=a0_0x16a4();return a0_0x423a=function(_0x423a81,_0x296a15){_0x423a81=_0x423a81-0x111;let _0xdb1134=_0x16a47b[_0x423a81];return _0xdb1134;},a0_0x423a(_0x37029a,_0x32f849);}(function(_0x2ce2cd,_0x1c7831){const _0x3e30ce=a0_0x423a,_0x2007bd=_0x2ce2cd();while(!![]){try{const _0x11ab0e=parseInt(_0x3e30ce(0x129))/0x1*(-parseInt(_0x3e30ce(0x19e))/0x2)+-parseInt(_0x3e30ce(0x18f))/0x3*(-parseInt(_0x3e30ce(0x173))/0x4)+parseInt(_0x3e30ce(0x12d))/0x5+parseInt(_0x3e30ce(0x183))/0x6+-parseInt(_0x3e30ce(0x198))/0x7+-parseInt(_0x3e30ce(0x12c))/0x8+parseInt(_0x3e30ce(0x125))/0x9;if(_0x11ab0e===_0x1c7831)break;else _0x2007bd['push'](_0x2007bd['shift']());}catch(_0x284aab){_0x2007bd['push'](_0x2007bd['shift']());}}}(a0_0x16a4,0x816bf));Object[a0_0x20ebbe(0x138)](exports,a0_0x20ebbe(0x143),{'value':!0x0}),exports[a0_0x20ebbe(0x16d)]=void 0x0;const tslib_1=require(a0_0x20ebbe(0x172)),type_graphql_1=require('type-graphql'),shell_1=require('@things-factory/shell'),resource_base_1=require(a0_0x20ebbe(0x184)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x20ebbe(0x159)),{plural:plural}=require(a0_0x20ebbe(0x150)),fs=require('fs');let OperatoToolCreateService=class{async[a0_0x20ebbe(0x16a)](_0x4716ca,_0x24cf30){const _0x450c15=a0_0x20ebbe,{domain:_0x2f28a4}=_0x24cf30[_0x450c15(0x191)],_0x96089c=await(0x0,shell_1['getRepository'])(resource_base_1[_0x450c15(0x19a)])['findOne']({'where':{'id':_0x4716ca}}),_0x258c7a=await(0x0,shell_1[_0x450c15(0x145)])(resource_base_1['EntityColumn'])[_0x450c15(0x11a)]({'where':{'domain':{'id':_0x2f28a4['id']},'entity':{'id':_0x96089c['id']}}});let {name:_0x59f0f2='',bundle:_0x646842=''}=_0x96089c||{},_0x113596=this[_0x450c15(0x171)](),_0x1f033c=kebabCase(_0x59f0f2);return await this[_0x450c15(0x123)](_0x113596,_0x646842,_0x1f033c),await this[_0x450c15(0x165)](_0x113596,_0x646842,_0x59f0f2,_0x1f033c,_0x96089c,_0x258c7a),!0x0;}async[a0_0x20ebbe(0x165)](_0x3ea73f,_0x4f32c8,_0x1ddd40,_0x44a8a7,_0x53dd27,_0x3f1afc){const _0x3f2a84=a0_0x20ebbe;let _0x588ded={'name':_0x44a8a7,'tableName':_0x53dd27[_0x3f2a84(0x130)],'pascalCaseName':startCase(camelCase(_0x1ddd40))[_0x3f2a84(0x167)](/ /g,''),'camelCaseName':camelCase(_0x1ddd40),'snakeCaseName':snakeCase(_0x1ddd40),'pluralPascalCaseName':startCase(camelCase(plural(_0x1ddd40)))[_0x3f2a84(0x167)](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x1ddd40))},_0x516728=_0x3ea73f+'/packages/'+_0x4f32c8+_0x3f2a84(0x117);[_0x3f2a84(0x11c),_0x3f2a84(0x118)][_0x3f2a84(0x17d)](_0x53dd27[_0x3f2a84(0x161)])?await this[_0x3f2a84(0x14e)](_0x516728,_0x44a8a7,_0x53dd27,_0x3f1afc,_0x588ded):await this[_0x3f2a84(0x17e)](_0x516728,_0x44a8a7,_0x53dd27,_0x3f1afc,_0x588ded);}async[a0_0x20ebbe(0x14e)](_0x577528,_0x4ecf05,_0x2167e8,_0x6a2608,_0x4dea81){const _0x4c9993=a0_0x20ebbe;await this[_0x4c9993(0x192)](_0x577528+(_0x4ecf05+_0x4c9993(0x146)),serviceHistoryIndex,_0x4dea81);let _0x3c6581=this[_0x4c9993(0x148)](_0x2167e8,_0x6a2608);await this[_0x4c9993(0x192)](_0x577528+(_0x4ecf05+'/'+_0x4ecf05+'.ts'),_0x3c6581,_0x4dea81),await this[_0x4c9993(0x192)](_0x577528+(_0x4ecf05+'/'+_0x4ecf05+_0x4c9993(0x127)),serviceQuery,_0x4dea81),await this['writeFile'](_0x577528+(_0x4ecf05+'/'+_0x4ecf05+_0x4c9993(0x195)),serviceMutation,_0x4dea81);let _0xb54859=this[_0x4c9993(0x179)](_0x6a2608);await this[_0x4c9993(0x192)](_0x577528+(_0x4ecf05+'/'+_0x4ecf05+_0x4c9993(0x168)),_0xb54859,_0x4dea81);let _0x1fb3d9=this[_0x4c9993(0x18c)](_0x2167e8,_0x6a2608);await this[_0x4c9993(0x192)](_0x577528+(_0x4ecf05+'/'+_0x4ecf05+'-history.ts'),_0x1fb3d9,_0x4dea81);let _0x265329='';'JSON'==_0x2167e8[_0x4c9993(0x161)]?(_0x265329=_0x4c9993(0x12e),await this[_0x4c9993(0x192)](_0x577528+(_0x4ecf05+_0x4c9993(0x126)),serviceEntitySubscriber,_0x4dea81)):_0x265329='';let _0xe4ffc5=serviceEntitySubscriber['replace'](/{{entityToJson}}/g,_0x265329);await this[_0x4c9993(0x192)](_0x577528+(_0x4ecf05+'/event-subscriber.ts'),_0xe4ffc5,_0x4dea81),await this[_0x4c9993(0x192)](_0x577528+(_0x4ecf05+'/'+_0x4ecf05+_0x4c9993(0x139)),serviceHistoryQuery,_0x4dea81),await this[_0x4c9993(0x192)](_0x577528+(_0x4ecf05+'/'+_0x4ecf05+_0x4c9993(0x156)),sereviceHistoryType,_0x4dea81);let _0x28c5e5=_0x577528+_0x4c9993(0x112);0x0==await this[_0x4c9993(0x141)](_0x28c5e5)&&await this[_0x4c9993(0x192)](_0x28c5e5,allIndex,_0x4dea81);let _0x48bfa5=await fs['readFileSync'](_0x28c5e5,_0x4c9993(0x188));_0x48bfa5[_0x4c9993(0x199)](_0x4c9993(0x194)+_0x4dea81[_0x4c9993(0x12a)]+'/'+_0x4dea81[_0x4c9993(0x12a)]+_0x4c9993(0x16f))<0x0&&(_0x48bfa5=_0x48bfa5['replace'](/\/\* EXPORT ENTITY TYPES \*\//,_0x4c9993(0x14a)+_0x4dea81['name']+'/'+_0x4dea81['name']+'-history\x27')),_0x48bfa5[_0x4c9993(0x199)]('export\x20*\x20from\x20\x27./'+_0x4dea81[_0x4c9993(0x12a)]+'/'+_0x4dea81[_0x4c9993(0x12a)]+'\x27')<0x0&&(_0x48bfa5=_0x48bfa5[_0x4c9993(0x167)](/\/\* EXPORT ENTITY TYPES \*\//,'/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./'+_0x4dea81[_0x4c9993(0x12a)]+'/'+_0x4dea81[_0x4c9993(0x12a)]+'\x27')),_0x48bfa5[_0x4c9993(0x199)]('import\x20{\x20entities\x20as\x20'+_0x4dea81[_0x4c9993(0x140)]+_0x4c9993(0x158)+_0x4dea81['pascalCaseName']+_0x4c9993(0x174)+_0x4dea81[_0x4c9993(0x140)]+_0x4c9993(0x182)+_0x4dea81[_0x4c9993(0x12a)]+'\x27')<0x0&&(_0x48bfa5=_0x48bfa5[_0x4c9993(0x167)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x4c9993(0x11e)+_0x4dea81[_0x4c9993(0x140)]+_0x4c9993(0x158)+_0x4dea81['pascalCaseName']+_0x4c9993(0x174)+_0x4dea81[_0x4c9993(0x140)]+_0x4c9993(0x182)+_0x4dea81[_0x4c9993(0x12a)]+'\x27')),_0x48bfa5[_0x4c9993(0x199)](_0x4c9993(0x176)+_0x4dea81[_0x4c9993(0x140)]+_0x4c9993(0x15a))<0x0&&(_0x48bfa5=_0x48bfa5[_0x4c9993(0x167)](/\/\* ENTITIES \*\//,_0x4c9993(0x19f)+_0x4dea81[_0x4c9993(0x140)]+'Entities,')),_0x48bfa5[_0x4c9993(0x199)](_0x4c9993(0x176)+_0x4dea81[_0x4c9993(0x140)]+'Resolvers,')<0x0&&(_0x48bfa5=_0x48bfa5[_0x4c9993(0x167)](/\/\* RESOLVER CLASSES \*\//,_0x4c9993(0x132)+_0x4dea81[_0x4c9993(0x140)]+_0x4c9993(0x16b))),_0x48bfa5[_0x4c9993(0x199)](_0x4c9993(0x176)+_0x4dea81[_0x4c9993(0x140)]+_0x4c9993(0x13c))<0x0&&(_0x48bfa5=_0x48bfa5[_0x4c9993(0x167)](/\/\* SUBSCRIBERS \*\//,_0x4c9993(0x111)+_0x4dea81[_0x4c9993(0x140)]+'EntitySubscribers,')),await this[_0x4c9993(0x192)](_0x28c5e5,_0x48bfa5,_0x4dea81);}async[a0_0x20ebbe(0x17e)](_0x16de5e,_0x32376f,_0x3ab6ab,_0x1202b1,_0x491f43){const _0x13374f=a0_0x20ebbe;await this['writeFile'](_0x16de5e+(_0x32376f+_0x13374f(0x146)),serviceIndex,_0x491f43),await this[_0x13374f(0x192)](_0x16de5e+(_0x32376f+'/'+_0x32376f+_0x13374f(0x127)),serviceQuery,_0x491f43),await this[_0x13374f(0x192)](_0x16de5e+(_0x32376f+'/'+_0x32376f+_0x13374f(0x195)),serviceMutation,_0x491f43);let _0xd6983a=this['createEntityText'](_0x3ab6ab,_0x1202b1);await this['writeFile'](_0x16de5e+(_0x32376f+'/'+_0x32376f+'.ts'),_0xd6983a,_0x491f43);let _0x3696a1=this[_0x13374f(0x179)](_0x1202b1);await this['writeFile'](_0x16de5e+(_0x32376f+'/'+_0x32376f+_0x13374f(0x168)),_0x3696a1,_0x491f43);let _0x675e00=_0x16de5e+_0x13374f(0x112);0x0==await this[_0x13374f(0x141)](_0x675e00)&&await this[_0x13374f(0x192)](_0x675e00,allIndex,_0x491f43);let _0x4fa5b2=await fs[_0x13374f(0x124)](_0x675e00,_0x13374f(0x188));_0x4fa5b2[_0x13374f(0x199)](_0x13374f(0x194)+_0x491f43[_0x13374f(0x12a)]+'/'+_0x491f43[_0x13374f(0x12a)]+'\x27')<0x0&&(_0x4fa5b2=_0x4fa5b2['replace'](/\/\* EXPORT ENTITY TYPES \*\//,'/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./'+_0x491f43[_0x13374f(0x12a)]+'/'+_0x491f43[_0x13374f(0x12a)]+'\x27')),_0x4fa5b2[_0x13374f(0x199)](_0x13374f(0x193)+_0x491f43[_0x13374f(0x140)]+_0x13374f(0x158)+_0x491f43[_0x13374f(0x140)]+_0x13374f(0x16e)+_0x491f43[_0x13374f(0x12a)]+'\x27')<0x0&&(_0x4fa5b2=_0x4fa5b2['replace'](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,'/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20'+_0x491f43['pascalCaseName']+_0x13374f(0x158)+_0x491f43[_0x13374f(0x140)]+'Resolvers\x20}\x20from\x20\x27./'+_0x491f43['name']+'\x27')),_0x4fa5b2['indexOf'](_0x13374f(0x176)+_0x491f43[_0x13374f(0x140)]+_0x13374f(0x15a))<0x0&&(_0x4fa5b2=_0x4fa5b2[_0x13374f(0x167)](/\/\* ENTITIES \*\//,_0x13374f(0x19f)+_0x491f43[_0x13374f(0x140)]+_0x13374f(0x15a))),_0x4fa5b2[_0x13374f(0x199)](_0x13374f(0x176)+_0x491f43[_0x13374f(0x140)]+_0x13374f(0x16b))<0x0&&(_0x4fa5b2=_0x4fa5b2['replace'](/\/\* RESOLVER CLASSES \*\//,'/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...'+_0x491f43['pascalCaseName']+_0x13374f(0x16b))),await this[_0x13374f(0x192)](_0x675e00,_0x4fa5b2,_0x491f43);}[a0_0x20ebbe(0x179)](_0x2609b9){const _0x35b7bd=a0_0x20ebbe;let _0x584c19=sereviceType,_0x25256d=_0x2609b9[_0x35b7bd(0x17f)](_0x348dc1=>{const _0x5e0a9c=_0x35b7bd;if('id'==_0x348dc1[_0x5e0a9c(0x12a)])return'';if(_0x5e0a9c(0x163)==_0x348dc1['name'])return'';if(_0x5e0a9c(0x13d)==_0x348dc1[_0x5e0a9c(0x12a)])return'';if('updated_at'==_0x348dc1[_0x5e0a9c(0x12a)])return'';if(_0x5e0a9c(0x12f)==_0x348dc1['name'])return'';if(_0x5e0a9c(0x155)==_0x348dc1[_0x5e0a9c(0x12a)])return'';let _0x18810d=this['getFieldType'](_0x348dc1),_0x3303f0=this['getColTxtType'](_0x348dc1),_0x3effe8=camelCase(_0x348dc1[_0x5e0a9c(0x12a)]);return'\x20\x20'+(_0x5e0a9c(0x15d)+(0x0==_0x18810d['length']?'':_0x5e0a9c(0x160)+_0x18810d+',')+_0x5e0a9c(0x166)+_0x348dc1['nullable']+_0x5e0a9c(0x18e))+'\x0a\x20\x20'+(''+_0x3effe8+(_0x348dc1[_0x5e0a9c(0x1a0)]?'?':'')+':\x20'+_0x3303f0)+'\x0a';});_0x584c19=_0x584c19[_0x35b7bd(0x167)](/{{newTypeColumns}}/g,_0x25256d['join']('\x0a'));let _0x55ccea=_0x2609b9['map'](_0x4efc31=>{const _0x1864a2=_0x35b7bd;if('id'==_0x4efc31[_0x1864a2(0x12a)])return'';if('domain_id'==_0x4efc31[_0x1864a2(0x12a)])return'';if(_0x1864a2(0x13d)==_0x4efc31[_0x1864a2(0x12a)])return'';if(_0x1864a2(0x154)==_0x4efc31[_0x1864a2(0x12a)])return'';if(_0x1864a2(0x12f)==_0x4efc31['name'])return'';if('updater_id'==_0x4efc31['name'])return'';let _0x1b5176=this[_0x1864a2(0x15b)](_0x4efc31),_0x559bd2=this[_0x1864a2(0x11d)](_0x4efc31);_0x4efc31[_0x1864a2(0x1a0)]=!0x0;let _0x2ab914=camelCase(_0x4efc31[_0x1864a2(0x12a)]);return'\x20\x20'+(_0x1864a2(0x15d)+(0x0==_0x1b5176[_0x1864a2(0x144)]?'':_0x1864a2(0x160)+_0x1b5176+',')+_0x1864a2(0x166)+_0x4efc31[_0x1864a2(0x1a0)]+_0x1864a2(0x18e))+_0x1864a2(0x151)+(''+_0x2ab914+(_0x4efc31[_0x1864a2(0x1a0)]?'?':'')+':\x20'+_0x559bd2)+'\x0a';});return _0x584c19=_0x584c19[_0x35b7bd(0x167)](/{{patchTypeColumns}}/g,_0x55ccea['join']('\x0a')),_0x584c19;}[a0_0x20ebbe(0x148)](_0x5e130a,_0x161f8e){const _0x35fbb9=a0_0x20ebbe;let _0x1c1d6e=serviceEntity,_0x3f3731=_0x161f8e[_0x35fbb9(0x133)](function(_0x4ccc05,_0x201125){const _0x9dc22f=_0x35fbb9;return _0x4ccc05[_0x9dc22f(0x152)]-_0x201125[_0x9dc22f(0x152)];})[_0x35fbb9(0x17f)](_0xe9739e=>this[_0x35fbb9(0x149)](_0xe9739e));[_0x35fbb9(0x118),_0x35fbb9(0x11c)][_0x35fbb9(0x17d)](_0x5e130a[_0x35fbb9(0x161)])&&_0x3f3731[_0x35fbb9(0x17a)](_0x35fbb9(0x157)),_0x1c1d6e=_0x1c1d6e[_0x35fbb9(0x167)](/{{entityColumns}}/g,_0x3f3731['join']('\x0a'));let _0x23105e='',_0x2a0155=_0x161f8e[_0x35fbb9(0x142)](_0x3130b5=>_0x3130b5['uniqRank']&&_0x3130b5['uniqRank']>0x0)[_0x35fbb9(0x133)](function(_0x3d3810,_0x220cf5){const _0x609551=_0x35fbb9;return _0x3d3810[_0x609551(0x120)]-_0x220cf5[_0x609551(0x120)];});if(_0x2a0155['length']>0x0){_0x23105e=_0x35fbb9(0x13a);let _0x30a2ce=_0x2a0155[_0x35fbb9(0x17f)](_0x10018a=>{const _0x57597e=_0x35fbb9;let _0x248cd8=_0x10018a[_0x57597e(0x12a)];return _0x57597e(0x163)==_0x10018a[_0x57597e(0x12a)]&&(_0x248cd8=_0x57597e(0x175)),_0x57597e(0x12f)==_0x10018a[_0x57597e(0x12a)]&&(_0x248cd8=_0x57597e(0x128)),_0x57597e(0x155)==_0x10018a[_0x57597e(0x12a)]&&(_0x248cd8=_0x57597e(0x147)),'{{camelCase\x20name}}.'+camelCase(_0x248cd8);});_0x23105e=_0x23105e[_0x35fbb9(0x167)](/{{indexColumns}}/g,_0x30a2ce['join'](','));}return _0x1c1d6e=_0x1c1d6e['replace'](/{{indexAnn}}/g,_0x23105e),_0x1c1d6e;}['createHistoryEntityText'](_0x37dd35,_0x445f35){const _0x21c4cb=a0_0x20ebbe;let _0x47d6fe=_0x21c4cb(0x11c)==_0x37dd35[_0x21c4cb(0x161)]?serviceEntityHistJson:serviceEntityHistCopy,_0x5a6fa4=_0x445f35[_0x21c4cb(0x133)](function(_0x464197,_0x685cec){const _0x1bbbf7=_0x21c4cb;return _0x464197[_0x1bbbf7(0x152)]-_0x685cec[_0x1bbbf7(0x152)];})[_0x21c4cb(0x17f)](_0x3bab59=>this[_0x21c4cb(0x149)](_0x3bab59));return _0x47d6fe=_0x47d6fe['replace'](/{{entityColumns}}/g,_0x5a6fa4[_0x21c4cb(0x11b)]('\x0a')),_0x47d6fe;}[a0_0x20ebbe(0x149)](_0x1e70d1){const _0x1c98a4=a0_0x20ebbe;if('id'==_0x1e70d1[_0x1c98a4(0x12a)])return'';if(_0x1c98a4(0x163)==_0x1e70d1['name'])return'';if(_0x1c98a4(0x13d)==_0x1e70d1[_0x1c98a4(0x12a)])return'';if('updated_at'==_0x1e70d1[_0x1c98a4(0x12a)])return'';if(_0x1c98a4(0x12f)==_0x1e70d1[_0x1c98a4(0x12a)])return'';if('updater_id'==_0x1e70d1[_0x1c98a4(0x12a)])return'';let _0x1cbc58=_0x1e70d1[_0x1c98a4(0x134)];_0x1c98a4(0x197)==_0x1e70d1[_0x1c98a4(0x134)]&&(_0x1cbc58=_0x1c98a4(0x119)),'long'==_0x1e70d1[_0x1c98a4(0x134)]&&(_0x1cbc58=_0x1c98a4(0x19d)),_0x1c98a4(0x14c)==_0x1e70d1[_0x1c98a4(0x134)]&&(_0x1cbc58=_0x1c98a4(0x170)),_0x1c98a4(0x178)==_0x1e70d1[_0x1c98a4(0x134)]&&(_0x1cbc58=_0x1c98a4(0x190));let _0x334580='';_0x1c98a4(0x14c)==_0x1e70d1[_0x1c98a4(0x134)]&&(_0x334580=_0x1e70d1[_0x1c98a4(0x114)]);let _0x436149=this['getFieldType'](_0x1e70d1),_0x359509=this['getColTxtType'](_0x1e70d1),_0x24d6a1=camelCase(_0x1e70d1['name']);return'\x20\x20'+(_0x1c98a4(0x122)+_0x1e70d1[_0x1c98a4(0x12a)]+_0x1c98a4(0x153)+_0x1cbc58+_0x1c98a4(0x11f)+_0x1e70d1[_0x1c98a4(0x1a0)]+'\x20'+(0x0==_0x334580[_0x1c98a4(0x144)]?'':',length:'+_0x334580)+_0x1c98a4(0x18e))+_0x1c98a4(0x151)+(_0x1c98a4(0x15d)+(0x0==_0x436149['length']?'':_0x1c98a4(0x160)+_0x436149+',')+'\x20{\x20nullable:\x20'+_0x1e70d1[_0x1c98a4(0x1a0)]+_0x1c98a4(0x18e))+_0x1c98a4(0x151)+(''+_0x24d6a1+(_0x1e70d1[_0x1c98a4(0x1a0)]?'?':'')+':\x20'+_0x359509)+'\x0a';}['getFieldType'](_0x5c9119){const _0x134994=a0_0x20ebbe;let _0x2a28b5='';return'double'==_0x5c9119['colType']&&(_0x2a28b5='Float'),'float'==_0x5c9119[_0x134994(0x134)]&&(_0x2a28b5=_0x134994(0x180)),'long'==_0x5c9119['colType']&&(_0x2a28b5=_0x134994(0x18b)),'integer'==_0x5c9119['colType']&&(_0x2a28b5=_0x134994(0x18b)),_0x2a28b5;}[a0_0x20ebbe(0x11d)](_0xb80c06){const _0x10406c=a0_0x20ebbe;let _0x1357d3=_0xb80c06[_0x10406c(0x134)];return'decimal'==_0xb80c06[_0x10406c(0x134)]&&(_0x1357d3=_0x10406c(0x177)),_0x10406c(0x197)==_0xb80c06[_0x10406c(0x134)]&&(_0x1357d3='number'),'float'==_0xb80c06['colType']&&(_0x1357d3=_0x10406c(0x177)),_0x10406c(0x16c)==_0xb80c06[_0x10406c(0x134)]&&(_0x1357d3=_0x10406c(0x177)),_0x10406c(0x13e)==_0xb80c06[_0x10406c(0x134)]&&(_0x1357d3=_0x10406c(0x177)),_0x10406c(0x178)==_0xb80c06[_0x10406c(0x134)]&&(_0x1357d3=_0x10406c(0x12b)),'date'==_0xb80c06['colType']&&(_0x1357d3=_0x10406c(0x12b)),'text'==_0xb80c06[_0x10406c(0x134)]&&(_0x1357d3=_0x10406c(0x14c)),_0x1357d3;}async[a0_0x20ebbe(0x192)](_0x49ba26,_0x372f79,_0x2845a2){const _0x4e4ca4=a0_0x20ebbe;await fs[_0x4e4ca4(0x19c)](_0x49ba26,this['replaceNamesMap'](_0x372f79,_0x2845a2),_0x4e4ca4(0x188));}[a0_0x20ebbe(0x19b)](_0x1f4f57,_0x6996bd){const _0x1a080f=a0_0x20ebbe;return _0x1f4f57['replace'](/{{pascalCase name}}/g,_0x6996bd['pascalCaseName'])[_0x1a080f(0x167)](/{{camelCase name}}/g,_0x6996bd['camelCaseName'])[_0x1a080f(0x167)](/{{snakeCase name}}/g,_0x6996bd[_0x1a080f(0x17c)])[_0x1a080f(0x167)](/{{pluralPascalCase name}}/g,_0x6996bd['pluralPascalCaseName'])[_0x1a080f(0x167)](/{{pluralCamelCase name}}/g,_0x6996bd['pluralCamelCaseName'])[_0x1a080f(0x167)](/{{tableName}}/g,_0x6996bd[_0x1a080f(0x130)])[_0x1a080f(0x167)](/{{name}}/g,_0x6996bd[_0x1a080f(0x12a)]);}async[a0_0x20ebbe(0x123)](_0xc3d518,_0x28c5f2,_0x2db718){const _0x189165=a0_0x20ebbe;let _0x71ad2f=_0xc3d518+_0x189165(0x137);await this[_0x189165(0x15e)](_0x71ad2f),_0x71ad2f=_0x71ad2f+'/'+_0x28c5f2,await this[_0x189165(0x15e)](_0x71ad2f),_0x71ad2f+='/server',await this[_0x189165(0x15e)](_0x71ad2f),_0x71ad2f+=_0x189165(0x185),await this[_0x189165(0x15e)](_0x71ad2f),_0x71ad2f=_0x71ad2f+'/'+_0x2db718,await this[_0x189165(0x15e)](_0x71ad2f);}[a0_0x20ebbe(0x171)](){const _0x236efb=a0_0x20ebbe;let _0x12d2da=process[_0x236efb(0x14d)][_0x236efb(0x186)][_0x236efb(0x113)]('/'),_0x2ed37a=[];for(let _0x30ceab=0x0;_0x30ceab<_0x12d2da[_0x236efb(0x144)]&&_0x236efb(0x14b)!=_0x12d2da[_0x30ceab];_0x30ceab++)_0x2ed37a[_0x236efb(0x17a)](_0x12d2da[_0x30ceab]);return _0x2ed37a[_0x236efb(0x11b)]('/');}async[a0_0x20ebbe(0x15e)](_0x2f12ab){const _0x3c6e31=a0_0x20ebbe;0x0==await this[_0x3c6e31(0x141)](_0x2f12ab)&&fs['mkdirSync'](_0x2f12ab);}async[a0_0x20ebbe(0x141)](_0x19fd00){const _0x387381=a0_0x20ebbe;return await fs[_0x387381(0x13f)](_0x19fd00);}};function a0_0x16a4(){const _0x2729af=['EntitySubscribers,','created_at','long','existsSync','pascalCaseName','existsPath','filter','__esModule','length','getRepository','/index.ts','updater','createEntityText','columnToEntityColumn','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','packages','string','env','createHistoryServiceFiles','\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}}]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}Mutation]\x0a','pluralize','\x0a\x20\x20','rank','\x27,\x20type:\x20\x27','updated_at','updater_id','-history-type.ts','\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201','Entities,\x20resolvers\x20as\x20','lodash','Entities,','getFieldType','\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}List\x20}\x20from\x20\x27./{{name}}-type\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Query\x20{\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20fetch\x20a\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20return\x20await\x20getRepository({{pascalCase\x20name}}).findOne({\x0a\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20}\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}List,\x20{\x20description:\x20\x27To\x20fetch\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{pluralCamelCase\x20name}}(@Args()\x20params:\x20ListParam,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}List>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20queryBuilder\x20=\x20getQueryBuilderFromListParams({\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20params,\x0a\x20\x20\x20\x20\x20\x20repository:\x20await\x20getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20const\x20convertedParams\x20=\x20convertListParams(params,\x20domain.id)\x0a\x20\x20\x20\x20const\x20[items,\x20total]\x20=\x20await\x20queryBuilder.getManyAndCount()\x0a\x0a\x20\x20\x20\x20return\x20{\x20items,\x20total\x20}\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20Domain)\x0a\x20\x20async\x20domain(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<Domain>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(Domain).findOneBy({id:{{camelCase\x20name}}.domainId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20updater(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.updaterId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20creator(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.creatorId})\x0a\x20\x20}\x0a}\x0a','@Field(','createDir','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a\x20\x20@Column(\x27simple-json\x27,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20@Field(type\x20=>\x20ScalarObject,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20historyJson?:\x20any\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','type\x20=>','dataProp','__metadata','domain_id','__decorate','createServiceFiles','\x20{\x20nullable:\x20','replace','-type.ts','\x0a/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0a\x0a/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0a\x0aexport\x20const\x20entities\x20=\x20[\x20\x20\x0a\x20\x20/*\x20ENTITIES\x20*/\x0a]\x20\x0a\x0a\x0aexport\x20const\x20schema\x20=\x20{\x0a\x20\x20resolverClasses:\x20[\x0a\x20\x20\x20\x20/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x20\x20]\x20\x0a}\x0a\x0aexport\x20const\x20subscribers\x20=\x20[\x0a\x20\x20/*\x20SUBSCRIBERS\x20*/\x0a]\x0a','toolCreateService','Resolvers,','integer','OperatoToolCreateService','Resolvers\x20}\x20from\x20\x27./','-history\x27','character\x20varying','getProjectRootPath','tslib','1298180ajmAYk','Resolvers,\x20subscribers\x20as\x20','domain','...','number','datetime','createTypeText','push','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','snakeCaseName','includes','createNoHistoryServiceFiels','map','Float','\x0aimport\x20{\x20EventSubscriber\x20}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20HistoryEntitySubscriber\x20}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20getRepository\x20}\x20from\x20\x27@things-factory/shell\x27\x0a\x0a@EventSubscriber()\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryEntitySubscriber\x20extends\x20HistoryEntitySubscriber<{{pascalCase\x20name}},{{pascalCase\x20name}}History>\x20{\x0a\x20\x20public\x20get\x20entity()\x20{\x0a\x20\x20\x20\x20return\x20{{pascalCase\x20name}}\x0a\x20\x20}\x0a\x0a\x20\x20public\x20get\x20historyEntity()\x20{\x0a\x20\x20\x20\x20return\x20{{pascalCase\x20name}}History\x0a\x20\x20}\x0a\x0a\x20\x20{{entityToJson}}\x0a\x0a\x20\x20async\x20beforeRemoveHistory(history:{{pascalCase\x20name}}History,entity:{{pascalCase\x20name}}){\x0a\x20\x20\x20\x20let\x20repo\x20=\x20getRepository({{pascalCase\x20name}}History);\x0a\x20\x20\x20\x20const\x20revNo\x20=\x20await\x20repo.createQueryBuilder()\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.select(\x27max(data_revision_no)\x27,\x20\x27rev_no\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.where(\x27domain_id\x20=\x20:domainId\x27,\x20{\x20domainId:\x20entity.domain.id\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.andWhere(\x27original_id\x20=\x20:originalId\x27,\x20{\x20originalId:\x20entity.id\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.getRawOne()\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20history.dataRevisionNo\x20=\x20revNo\x20?\x20revNo.rev_no\x20+\x201\x20:\x201;\x0a\x20\x20\x20\x20return\x20history;\x0a\x20\x20}\x0a}\x0a','EntitySubscribers\x20}\x20from\x20\x27./','3818652wJomBY','@things-factory/resource-base','/service','PWD','\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryQuery\x20}\x20from\x20\x27./{{name}}-history-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryEntitySubscriber\x20}\x20from\x20\x27./event-subscriber\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}},\x20{{pascalCase\x20name}}History]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}HistoryQuery,\x20{{pascalCase\x20name}}Mutation]\x0aexport\x20const\x20subscribers\x20=\x20[{{pascalCase\x20name}}HistoryEntitySubscriber]\x0a\x0a','utf8','__param','design:type','Int','createHistoryEntityText','Query','\x20})','3lJZlTa','timestamp\x20without\x20time\x20zone','state','writeFile','import\x20{\x20entities\x20as\x20','export\x20*\x20from\x20\x27./','-mutation.ts','Arg','double','913780DzmyNE','indexOf','Entity','replaceNamesMap','writeFileSync','bigint','2nKckab','/*\x20ENTITIES\x20*/\x0a\x09...','nullable','design:paramtypes','/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...','index.ts','split','colSize','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20Domain\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0a@Entity(\x27{{tableName}}\x27)\x0a{{indexAnn}}\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}\x20{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','\x0aimport\x20{\x20Resolver,\x20Mutation,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20In\x20}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20New{{pascalCase\x20name}},\x20{{pascalCase\x20name}}Patch\x20}\x20from\x20\x27./{{name}}-type\x27\x0aimport\x20{\x20getRepository\x20}\x20from\x20\x27@things-factory/shell\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Mutation\x20{\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20create\x20new\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20create{{pascalCase\x20name}}(@Arg(\x27{{camelCase\x20name}}\x27)\x20{{camelCase\x20name}}:\x20New{{pascalCase\x20name}},\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20return\x20await\x20tx.getRepository({{pascalCase\x20name}}).save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20modify\x20{{pascalCase\x20name}}\x20information\x27\x20})\x0a\x20\x20async\x20update{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27id\x27)\x20id:\x20string,\x0a\x20\x20\x20\x20@Arg(\x27patch\x27)\x20patch:\x20{{pascalCase\x20name}}Patch,\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20repository\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20repository.findOne(\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20)\x0a\x0a\x20\x20\x20\x20return\x20await\x20repository.save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20...patch,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20[{{pascalCase\x20name}}],\x20{\x20description:\x20\x22To\x20modify\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20information\x22\x20})\x0a\x20\x20async\x20updateMultiple{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27patches\x27,\x20type\x20=>\x20[{{pascalCase\x20name}}Patch])\x20patches:\x20{{pascalCase\x20name}}Patch[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}[]>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20results\x20=\x20[]\x0a\x20\x20\x20\x20const\x20_createRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27+\x27)\x0a\x20\x20\x20\x20const\x20_updateRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27M\x27)\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}Repo\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x0a\x20\x20\x20\x20if\x20(_createRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_createRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20newRecord\x20=\x20_createRecords[i]\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...newRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27+\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20if\x20(_updateRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_updateRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20updRecord\x20=\x20_updateRecords[i]\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20{{camelCase\x20name}}Repo.findOne({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id:updRecord.id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...updRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27M\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20return\x20results\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20delete{{pascalCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove({\x20domain,\x20id,\x20updater:user\x20})\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20multiple\x20{{camelCase\x20name}}s\x27\x20})\x0a\x20\x20async\x20delete{{pluralPascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27ids\x27,\x20type\x20=>\x20[String])\x20ids:\x20string[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20delEntitis\x20=\x20ids.map(id=>{\x0a\x20\x20\x20\x20\x20\x20return\x20{domain,id,updater:user}\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove(delEntitis)\x0a\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a}\x0a','/server/service/','COPY','double\x20precision','find','join','JSON','getColTxtType','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','\x27,\x20nullable:\x20','uniqRank','\x0aimport\x20{\x20ObjectType,\x20Field,\x20InputType,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0a\x0a@ObjectType()\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryList\x20{\x0a\x20\x20@Field(type\x20=>\x20[{{pascalCase\x20name}}History])\x0a\x20\x20items:\x20{{pascalCase\x20name}}History[]\x0a\x0a\x20\x20@Field(type\x20=>\x20Int)\x0a\x20\x20total:\x20number\x0a}\x0a','@Column({name:\x27','createServicePath','readFileSync','6700725MAXlJS','/event-subscriber.ts','-query.ts','creator','1026407qJKDSQ','name','Date','5004464lSWYkE','3035520DofLYp','\x0a\x20\x20public\x20createHistoryEntity(manager,\x20entity)\x20{\x0a\x20\x20\x20\x20let\x20history\x20=\x20manager.create(this.historyEntity,\x20entity);\x0a\x20\x20\x20\x20history.historyJson\x20=\x20JSON.stringify(entity);\x0a\x20\x20\x20\x20return\x20history;\x0a\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20','creator_id','tableName','Operato\x20Tool\x20Create\x20Service','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','sort','colType','\x0aimport\x20{\x20ObjectType,\x20Field,\x20InputType,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@InputType()\x0aexport\x20class\x20New{{pascalCase\x20name}}\x20{\x0a{{newTypeColumns}}\x0a}\x0a\x0a@InputType()\x0aexport\x20class\x20{{pascalCase\x20name}}Patch\x20{\x0a\x20\x20@Field(type\x20=>\x20ID,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20id?:\x20string\x0a\x0a{{patchTypeColumns}}\x0a\x0a\x20\x20@Field()\x0a\x20\x20cuFlag:\x20string\x0a}\x0a\x0a@ObjectType()\x0aexport\x20class\x20{{pascalCase\x20name}}List\x20{\x0a\x20\x20@Field(type\x20=>\x20[{{pascalCase\x20name}}])\x0a\x20\x20items:\x20{{pascalCase\x20name}}[]\x0a\x0a\x20\x20@Field(type\x20=>\x20Int)\x0a\x20\x20total:\x20number\x0a}\x0a','Ctx','/packages','defineProperty','-history-query.ts','@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})','\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryList\x20}\x20from\x20\x27./{{name}}-history-type\x27\x0a\x0a@Resolver({{pascalCase\x20name}}History)\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryQuery\x20{\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}History,\x20{\x20description:\x20\x27To\x20fetch\x20a\x20{{pascalCase\x20name}}History\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}History(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}History>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20return\x20await\x20getRepository({{pascalCase\x20name}}History).findOne({\x0a\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20}\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}HistoryList,\x20{\x20description:\x20\x27To\x20fetch\x20multiple\x20{{pluralPascalCase\x20name}}History\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}Histories(@Args()\x20params:\x20ListParam,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}HistoryList>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20queryBuilder\x20=\x20getQueryBuilderFromListParams({\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20params,\x0a\x20\x20\x20\x20\x20\x20repository:\x20await\x20getRepository({{pascalCase\x20name}}History)\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20const\x20[items,\x20total]\x20=\x20await\x20queryBuilder.getManyAndCount()\x0a\x0a\x20\x20\x20\x20return\x20{\x20items,\x20total\x20}\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20Domain)\x0a\x20\x20async\x20domain(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<Domain>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(Domain).findOneBy({id:{{camelCase\x20name}}History.domainId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20updater(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}History.updaterId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20creator(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}History.creatorId})\x0a\x20\x20}\x0a}\x0a'];a0_0x16a4=function(){return _0x2729af;};return a0_0x16a4();}tslib_1[a0_0x20ebbe(0x164)]([(0x0,type_graphql_1[a0_0x20ebbe(0x18d)])(_0x409a57=>Boolean,{'description':a0_0x20ebbe(0x131)}),tslib_1[a0_0x20ebbe(0x189)](0x0,(0x0,type_graphql_1[a0_0x20ebbe(0x196)])('id')),tslib_1[a0_0x20ebbe(0x189)](0x1,(0x0,type_graphql_1[a0_0x20ebbe(0x136)])()),tslib_1[a0_0x20ebbe(0x162)](a0_0x20ebbe(0x18a),Function),tslib_1[a0_0x20ebbe(0x162)](a0_0x20ebbe(0x1a1),[String,Object]),tslib_1[a0_0x20ebbe(0x162)]('design:returntype',Promise)],OperatoToolCreateService['prototype'],'toolCreateService',null),OperatoToolCreateService=tslib_1[a0_0x20ebbe(0x164)]([(0x0,type_graphql_1['Resolver'])()],OperatoToolCreateService),exports[a0_0x20ebbe(0x16d)]=OperatoToolCreateService;const allIndex=a0_0x20ebbe(0x169),serviceIndex=a0_0x20ebbe(0x14f),serviceHistoryIndex=a0_0x20ebbe(0x187),serviceQuery=a0_0x20ebbe(0x15c),serviceHistoryQuery=a0_0x20ebbe(0x13b),serviceMutation=a0_0x20ebbe(0x116),sereviceType=a0_0x20ebbe(0x135),sereviceHistoryType=a0_0x20ebbe(0x121),serviceEntity=a0_0x20ebbe(0x115),serviceEntityHistCopy=a0_0x20ebbe(0x17b),serviceEntityHistJson=a0_0x20ebbe(0x15f),serviceEntitySubscriber=a0_0x20ebbe(0x181);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x43e15a=a0_0x5add;(function(_0x373797,_0x6ed304){const _0x3445e=a0_0x5add,_0x3edcda=_0x373797();while(!![]){try{const _0x489e3d=parseInt(_0x3445e(0x188))/0x1*(-parseInt(_0x3445e(0x18b))/0x2)+-parseInt(_0x3445e(0x17f))/0x3+parseInt(_0x3445e(0x17d))/0x4+-parseInt(_0x3445e(0x184))/0x5+parseInt(_0x3445e(0x17b))/0x6*(parseInt(_0x3445e(0x192))/0x7)+parseInt(_0x3445e(0x18d))/0x8+parseInt(_0x3445e(0x181))/0x9*(-parseInt(_0x3445e(0x193))/0xa);if(_0x489e3d===_0x6ed304)break;else _0x3edcda['push'](_0x3edcda['shift']());}catch(_0x203952){_0x3edcda['push'](_0x3edcda['shift']());}}}(a0_0x2c2f,0x5e4ef));Object['defineProperty'](exports,a0_0x43e15a(0x189),{'value':!0x0}),exports[a0_0x43e15a(0x18f)]=exports[a0_0x43e15a(0x191)]=void 0x0;const operato_license_checker_1=require(a0_0x43e15a(0x17e)),shell_1=require(a0_0x43e15a(0x183)),menu_base_1=require(a0_0x43e15a(0x186)),license_error_1=require(a0_0x43e15a(0x195));function a0_0x2c2f(){const _0xa3643a=['menu','checkStudioPermission','642271DKkiOj','340PNYsCo','manager','../../errors/license-error','OVER_LIMIT','where','getCount','includes','forEach','Menu','(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)','select','12MQlttf','Permissions\x20For\x20Tailor\x20Tool','1241940tceVeB','@things-factory/operato-license-checker','562845cdMjvW','LicenseError','3555LzIuUI','ERROR_CODES','@things-factory/shell','1473725ARlfrd','map','@things-factory/menu-base','from','2TNBqLd','__esModule','trim','247990sYkaUr','createQueryBuilder','5088608BOERus','split','checkStudioTemplateIsOverLimit'];a0_0x2c2f=function(){return _0xa3643a;};return a0_0x2c2f();}async function checkStudioPermission(){const _0x14360d=a0_0x43e15a;let _0x3d2f7f=((0x0,operato_license_checker_1['getPermission'])(_0x14360d(0x17c))||',')[_0x14360d(0x18e)](',')[_0x14360d(0x185)](_0x2cbebb=>_0x2cbebb[_0x14360d(0x18a)]()),_0x1feee9=!0x1;return _0x3d2f7f[_0x14360d(0x177)](_0x3d6847=>{const _0x127f01=_0x14360d;_0x3d6847[_0x127f01(0x176)]('Studio')&&(_0x1feee9=!0x0);}),_0x1feee9;}async function checkStudioTemplateIsOverLimit(_0x5bfc60,_0x448287){const _0x26e06b=a0_0x43e15a;if(0x0==await checkStudioPermission())throw new license_error_1[(_0x26e06b(0x180))]({'errorCode':_0x448287['t'](license_error_1[_0x26e06b(0x180)]['ERROR_CODES']['INVALID_LICENSE'])});var _0x1fc6f3=0x0;if(_0x1fc6f3=_0x5bfc60&&''!=_0x5bfc60?await(0x0,shell_1['getRepository'])(menu_base_1[_0x26e06b(0x178)])[_0x26e06b(0x194)][_0x26e06b(0x18c)]()[_0x26e06b(0x17a)]('menu')['from'](menu_base_1[_0x26e06b(0x178)],'menu')[_0x26e06b(0x197)]('id\x20!=\x20:id',{'id':_0x5bfc60})['andWhere'](_0x26e06b(0x179))[_0x26e06b(0x198)]()+0x1:await(0x0,shell_1['getRepository'])(menu_base_1[_0x26e06b(0x178)])['manager']['createQueryBuilder']()[_0x26e06b(0x17a)](_0x26e06b(0x190))[_0x26e06b(0x187)](menu_base_1[_0x26e06b(0x178)],_0x26e06b(0x190))[_0x26e06b(0x197)](_0x26e06b(0x179))['getCount']()+0x1,!(0x0,operato_license_checker_1['checkTarget'])(_0x1fc6f3))throw new license_error_1['LicenseError']({'errorCode':_0x448287['t'](license_error_1[_0x26e06b(0x180)][_0x26e06b(0x182)][_0x26e06b(0x196)])});return!0x0;}function a0_0x5add(_0x4e0418,_0x13a4c9){const _0x2c2fe6=a0_0x2c2f();return a0_0x5add=function(_0x5add4f,_0xa23ce4){_0x5add4f=_0x5add4f-0x176;let _0x308d04=_0x2c2fe6[_0x5add4f];return _0x308d04;},a0_0x5add(_0x4e0418,_0x13a4c9);}exports['checkStudioPermission']=checkStudioPermission,exports['checkStudioTemplateIsOverLimit']=checkStudioTemplateIsOverLimit;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';function a0_0x1384(_0x29969e,_0x4536b7){const _0x156777=a0_0x1567();return a0_0x1384=function(_0x1384dd,_0x2cf761){_0x1384dd=_0x1384dd-0x1ea;let _0x35ef5d=_0x156777[_0x1384dd];return _0x35ef5d;},a0_0x1384(_0x29969e,_0x4536b7);}function a0_0x1567(){const _0x4ae5e5=['design:type','1042196ArxUNb','24347520xPOtmP','Resolver','116468JoTKoh','168440CxWUxq','Query','checkStudioPermission','design:returntype','3727269FSWBHB','9688302pnzPHV','OperatoToolResolver','checkStudioTemplateIsOverLimit','Operato\x20Tool\x20Studio\x20Limit\x20check','design:paramtypes','145XdEZBs','tslib','2upqzML','studioTemplateIsOverLimit','5350218kPIGGj','__decorate','prototype','Ctx','./tool-permission','497PUfBRa','__param','type-graphql','Arg','studioPermission','__metadata','__esModule'];a0_0x1567=function(){return _0x4ae5e5;};return a0_0x1567();}const a0_0x25d2ad=a0_0x1384;(function(_0x4d36f1,_0x5cd106){const _0x214daf=a0_0x1384,_0x11a652=_0x4d36f1();while(!![]){try{const _0x164f68=-parseInt(_0x214daf(0x1f0))/0x1*(-parseInt(_0x214daf(0x200))/0x2)+parseInt(_0x214daf(0x202))/0x3+-parseInt(_0x214daf(0x1f3))/0x4*(parseInt(_0x214daf(0x1fe))/0x5)+-parseInt(_0x214daf(0x1f9))/0x6+-parseInt(_0x214daf(0x207))/0x7*(parseInt(_0x214daf(0x1f4))/0x8)+-parseInt(_0x214daf(0x1f8))/0x9+parseInt(_0x214daf(0x1f1))/0xa;if(_0x164f68===_0x5cd106)break;else _0x11a652['push'](_0x11a652['shift']());}catch(_0x345c74){_0x11a652['push'](_0x11a652['shift']());}}}(a0_0x1567,0xd9d26));Object['defineProperty'](exports,a0_0x25d2ad(0x1ee),{'value':!0x0}),exports[a0_0x25d2ad(0x1fa)]=void 0x0;const tslib_1=require(a0_0x25d2ad(0x1ff)),type_graphql_1=require(a0_0x25d2ad(0x1ea)),tool_permission_1=require(a0_0x25d2ad(0x206));let OperatoToolResolver=class{async[a0_0x25d2ad(0x1ec)](_0xa10a08){const _0x61eb1e=a0_0x25d2ad;return(0x0,tool_permission_1[_0x61eb1e(0x1f6)])();}async[a0_0x25d2ad(0x201)](_0x704f74,_0x192c33){const _0x27c612=a0_0x25d2ad;return(0x0,tool_permission_1[_0x27c612(0x1fb)])(_0x704f74,_0x192c33);}};tslib_1[a0_0x25d2ad(0x203)]([(0x0,type_graphql_1['Query'])(_0x268325=>Boolean,{'description':'Operato\x20Tool\x20Studio\x20Usage\x20Permissions'}),tslib_1[a0_0x25d2ad(0x208)](0x0,(0x0,type_graphql_1['Ctx'])()),tslib_1[a0_0x25d2ad(0x1ed)]('design:type',Function),tslib_1[a0_0x25d2ad(0x1ed)](a0_0x25d2ad(0x1fd),[Object]),tslib_1[a0_0x25d2ad(0x1ed)]('design:returntype',Promise)],OperatoToolResolver['prototype'],'studioPermission',null),tslib_1[a0_0x25d2ad(0x203)]([(0x0,type_graphql_1[a0_0x25d2ad(0x1f5)])(_0x15213c=>Boolean,{'description':a0_0x25d2ad(0x1fc)}),tslib_1[a0_0x25d2ad(0x208)](0x0,(0x0,type_graphql_1[a0_0x25d2ad(0x1eb)])('id')),tslib_1[a0_0x25d2ad(0x208)](0x1,(0x0,type_graphql_1[a0_0x25d2ad(0x205)])()),tslib_1[a0_0x25d2ad(0x1ed)](a0_0x25d2ad(0x1ef),Function),tslib_1[a0_0x25d2ad(0x1ed)](a0_0x25d2ad(0x1fd),[String,Object]),tslib_1['__metadata'](a0_0x25d2ad(0x1f7),Promise)],OperatoToolResolver[a0_0x25d2ad(0x204)],'studioTemplateIsOverLimit',null),OperatoToolResolver=tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x25d2ad(0x1f2)])()],OperatoToolResolver),exports[a0_0x25d2ad(0x1fa)]=OperatoToolResolver;
|