@things-factory/operato-tools 6.0.134 → 6.0.135

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.
@@ -1 +1 @@
1
- 'use strict';const a0_0x33d99e=a0_0x56f5;(function(_0x42360d,_0x3096b1){const _0x570a97=a0_0x56f5,_0x257cef=_0x42360d();while(!![]){try{const _0x41a5d5=-parseInt(_0x570a97(0x1aa))/0x1+parseInt(_0x570a97(0x1b4))/0x2+-parseInt(_0x570a97(0x1ac))/0x3*(-parseInt(_0x570a97(0x1b1))/0x4)+-parseInt(_0x570a97(0x1a6))/0x5+parseInt(_0x570a97(0x1b2))/0x6*(parseInt(_0x570a97(0x1a3))/0x7)+parseInt(_0x570a97(0x1ab))/0x8+-parseInt(_0x570a97(0x1ad))/0x9;if(_0x41a5d5===_0x3096b1)break;else _0x257cef['push'](_0x257cef['shift']());}catch(_0x506727){_0x257cef['push'](_0x257cef['shift']());}}}(a0_0x319f,0x3e516));Object[a0_0x33d99e(0x1b6)](exports,a0_0x33d99e(0x1b5),{'value':!0x0}),exports[a0_0x33d99e(0x1a4)]=void 0x0;const tslib_1=require(a0_0x33d99e(0x1ae)),ERROR_CODES=tslib_1[a0_0x33d99e(0x1b3)](require(a0_0x33d99e(0x1a7)));function a0_0x319f(){const _0x3c6080=['3717216EYEJty','tslib','ERROR_CODES','errorCode','496004rzSaaF','24jwjHrd','__importStar','175716lbzrLM','__esModule','defineProperty','889861tzGJHK','LicenseError','assign','34895MxzXMi','../constants/error-code','name','license-error','306154PjLApM','104464XZGhEA','9JuTCWp'];a0_0x319f=function(){return _0x3c6080;};return a0_0x319f();}class LicenseError extends Error{static get[a0_0x33d99e(0x1af)](){const _0x3c4269=a0_0x33d99e;return Object[_0x3c4269(0x1a5)]({},ERROR_CODES);}constructor({errorCode:_0xd6ce8b,detail:_0x126698}){const _0x52df99=a0_0x33d99e;super(_0xd6ce8b),this[_0x52df99(0x1a8)]=_0x52df99(0x1a9),this[_0x52df99(0x1b0)]=_0xd6ce8b,this['detail']=_0x126698;}}function a0_0x56f5(_0x473020,_0x5d1c73){const _0x319fa7=a0_0x319f();return a0_0x56f5=function(_0x56f505,_0x45797b){_0x56f505=_0x56f505-0x1a3;let _0x1f6e4c=_0x319fa7[_0x56f505];return _0x1f6e4c;},a0_0x56f5(_0x473020,_0x5d1c73);}exports[a0_0x33d99e(0x1a4)]=LicenseError;
1
+ 'use strict';const a0_0x3f4340=a0_0x6aa3;function a0_0x6aa3(_0x148d83,_0x416b0b){const _0x21d8ba=a0_0x21d8();return a0_0x6aa3=function(_0x6aa3e9,_0x2dcde4){_0x6aa3e9=_0x6aa3e9-0x105;let _0x4eb9cd=_0x21d8ba[_0x6aa3e9];return _0x4eb9cd;},a0_0x6aa3(_0x148d83,_0x416b0b);}(function(_0x234370,_0x26f8f7){const _0x25bd7b=a0_0x6aa3,_0x56f070=_0x234370();while(!![]){try{const _0x4e00e8=-parseInt(_0x25bd7b(0x111))/0x1*(parseInt(_0x25bd7b(0x109))/0x2)+parseInt(_0x25bd7b(0x108))/0x3+parseInt(_0x25bd7b(0x10f))/0x4+-parseInt(_0x25bd7b(0x105))/0x5+parseInt(_0x25bd7b(0x110))/0x6*(-parseInt(_0x25bd7b(0x112))/0x7)+-parseInt(_0x25bd7b(0x10c))/0x8*(parseInt(_0x25bd7b(0x107))/0x9)+parseInt(_0x25bd7b(0x10d))/0xa;if(_0x4e00e8===_0x26f8f7)break;else _0x56f070['push'](_0x56f070['shift']());}catch(_0x3c6d70){_0x56f070['push'](_0x56f070['shift']());}}}(a0_0x21d8,0xea267));function a0_0x21d8(){const _0x4de849=['LicenseError','__esModule','23416cJwtsv','39645180uXQIjr','license-error','2024892OvcOPD','18162LQGuZh','2QEvede','1799zuVCrm','../constants/error-code','defineProperty','name','7601470FspKlS','__importStar','4221NoeyfA','3178836jRsQft','900278xDJNyr'];a0_0x21d8=function(){return _0x4de849;};return a0_0x21d8();}Object[a0_0x3f4340(0x114)](exports,a0_0x3f4340(0x10b),{'value':!0x0}),exports[a0_0x3f4340(0x10a)]=void 0x0;const tslib_1=require('tslib'),ERROR_CODES=tslib_1[a0_0x3f4340(0x106)](require(a0_0x3f4340(0x113)));class LicenseError extends Error{static get['ERROR_CODES'](){return Object['assign']({},ERROR_CODES);}constructor({errorCode:_0x4dfc8d,detail:_0x292793}){const _0x818108=a0_0x3f4340;super(_0x4dfc8d),this[_0x818108(0x115)]=_0x818108(0x10e),this['errorCode']=_0x4dfc8d,this['detail']=_0x292793;}}exports[a0_0x3f4340(0x10a)]=LicenseError;
package/server/routes.js CHANGED
@@ -1 +1 @@
1
- function a0_0x531c(){const _0x4e8276=['4577022uboUwh','8829733NbsKfl','bootstrap-module-global-public-route','2440083xMlTeg','10WsVJUL','4927902zbfCYU','112EdgCui','things-factory:operato-tools:routes','6906660ULNoiC','bootstrap-module-domain-public-route','12OXlWQM','350237rRqXwA','4XJxLpL','8MitKgr','524192whbDNy','debug'];a0_0x531c=function(){return _0x4e8276;};return a0_0x531c();}function a0_0x370b(_0x1bb8fe,_0xf4e46f){const _0x531c32=a0_0x531c();return a0_0x370b=function(_0x370be5,_0x161d65){_0x370be5=_0x370be5-0x19a;let _0x5c96fb=_0x531c32[_0x370be5];return _0x5c96fb;},a0_0x370b(_0x1bb8fe,_0xf4e46f);}const a0_0xd60b64=a0_0x370b;(function(_0x150d4c,_0x2332bb){const _0x327dd8=a0_0x370b,_0x5db11a=_0x150d4c();while(!![]){try{const _0x1dfe41=parseInt(_0x327dd8(0x1a0))/0x1*(parseInt(_0x327dd8(0x1a2))/0x2)+parseInt(_0x327dd8(0x1a8))/0x3*(-parseInt(_0x327dd8(0x1a1))/0x4)+-parseInt(_0x327dd8(0x19d))/0x5+parseInt(_0x327dd8(0x19a))/0x6+parseInt(_0x327dd8(0x19b))/0x7*(parseInt(_0x327dd8(0x1a3))/0x8)+parseInt(_0x327dd8(0x1a5))/0x9*(parseInt(_0x327dd8(0x1a9))/0xa)+-parseInt(_0x327dd8(0x1a6))/0xb*(parseInt(_0x327dd8(0x19f))/0xc);if(_0x1dfe41===_0x2332bb)break;else _0x5db11a['push'](_0x5db11a['shift']());}catch(_0x202008){_0x5db11a['push'](_0x5db11a['shift']());}}}(a0_0x531c,0xbedf3));const debug=require(a0_0xd60b64(0x1a4))(a0_0xd60b64(0x19c));process['on'](a0_0xd60b64(0x1a7),(_0x4403b5,_0x28b917)=>{}),process['on']('bootstrap-module-global-private-route',(_0x1c074d,_0x14ecb0)=>{}),process['on'](a0_0xd60b64(0x19e),(_0x5b6fc1,_0x29987c)=>{}),process['on']('bootstrap-module-domain-private-route',(_0x34ec95,_0x213483)=>{});
1
+ const a0_0x3649a4=a0_0x1cf7;function a0_0x34fc(){const _0x931a32=['bootstrap-module-global-private-route','4834392vqFlJF','1395ntYwlr','762ETqdBY','1764hqiAjv','79370fuVBvK','bootstrap-module-global-public-route','567635ctfkrw','160754XwuLOE','3qQjqUk','bootstrap-module-domain-public-route','21763SoNzKV','4eJmeRz','bootstrap-module-domain-private-route','88642Hasmba','things-factory:operato-tools:routes','3237028HXAyOm'];a0_0x34fc=function(){return _0x931a32;};return a0_0x34fc();}(function(_0x58e1b7,_0x33089b){const _0x217910=a0_0x1cf7,_0x1dfb27=_0x58e1b7();while(!![]){try{const _0x40bd41=-parseInt(_0x217910(0x194))/0x1*(parseInt(_0x217910(0x196))/0x2)+-parseInt(_0x217910(0x1a2))/0x3*(-parseInt(_0x217910(0x198))/0x4)+parseInt(_0x217910(0x1a0))/0x5+-parseInt(_0x217910(0x19c))/0x6*(-parseInt(_0x217910(0x1a4))/0x7)+parseInt(_0x217910(0x19a))/0x8+-parseInt(_0x217910(0x19b))/0x9*(-parseInt(_0x217910(0x19e))/0xa)+-parseInt(_0x217910(0x1a1))/0xb*(parseInt(_0x217910(0x19d))/0xc);if(_0x40bd41===_0x33089b)break;else _0x1dfb27['push'](_0x1dfb27['shift']());}catch(_0x292877){_0x1dfb27['push'](_0x1dfb27['shift']());}}}(a0_0x34fc,0xc9cfb));const debug=require('debug')(a0_0x3649a4(0x197));function a0_0x1cf7(_0x40acc7,_0x45b665){const _0x34fcf0=a0_0x34fc();return a0_0x1cf7=function(_0x1cf7db,_0x5b20ec){_0x1cf7db=_0x1cf7db-0x194;let _0x31c856=_0x34fcf0[_0x1cf7db];return _0x31c856;},a0_0x1cf7(_0x40acc7,_0x45b665);}process['on'](a0_0x3649a4(0x19f),(_0x53c99f,_0x4916ee)=>{}),process['on'](a0_0x3649a4(0x199),(_0x39cd54,_0xeb65fd)=>{}),process['on'](a0_0x3649a4(0x1a3),(_0x2892eb,_0x16a1e2)=>{}),process['on'](a0_0x3649a4(0x195),(_0x2d4d9a,_0x41540a)=>{});
@@ -1 +1 @@
1
- 'use strict';const a0_0x276bce=a0_0x431d;(function(_0x18c8ce,_0x40ffe8){const _0x2aa934=a0_0x431d,_0xd79a80=_0x18c8ce();while(!![]){try{const _0x3be21b=parseInt(_0x2aa934(0xd3))/0x1+parseInt(_0x2aa934(0xc7))/0x2+-parseInt(_0x2aa934(0xc2))/0x3*(parseInt(_0x2aa934(0x106))/0x4)+-parseInt(_0x2aa934(0xef))/0x5+-parseInt(_0x2aa934(0xce))/0x6*(parseInt(_0x2aa934(0x112))/0x7)+-parseInt(_0x2aa934(0x10c))/0x8*(-parseInt(_0x2aa934(0xf0))/0x9)+-parseInt(_0x2aa934(0xaf))/0xa*(parseInt(_0x2aa934(0xf5))/0xb);if(_0x3be21b===_0x40ffe8)break;else _0xd79a80['push'](_0xd79a80['shift']());}catch(_0x5108e4){_0xd79a80['push'](_0xd79a80['shift']());}}}(a0_0x3c99,0x93a57));Object[a0_0x276bce(0xcc)](exports,'__esModule',{'value':!0x0}),exports['OperatoToolCreateMenu']=void 0x0;const tslib_1=require(a0_0x276bce(0xb5)),type_graphql_1=require('type-graphql'),resource_base_1=require('@things-factory/resource-base'),menu_base_1=require(a0_0x276bce(0x111)),tool_permission_1=require(a0_0x276bce(0xfe)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x276bce(0xcb)),{plural:plural}=require(a0_0x276bce(0xc0)),crypto_1=tslib_1[a0_0x276bce(0x10f)](require(a0_0x276bce(0xdc)));function a0_0x431d(_0x8a8fab,_0x4691e3){const _0x3c99da=a0_0x3c99();return a0_0x431d=function(_0x431d11,_0x579e68){_0x431d11=_0x431d11-0xaf;let _0x5dc5a7=_0x3c99da[_0x431d11];return _0x5dc5a7;},a0_0x431d(_0x8a8fab,_0x4691e3);}let OperatoToolCreateMenu=class{async[a0_0x276bce(0xda)](_0x4f833b,_0xd707e2,_0x30f63f){const _0x111aec=a0_0x276bce,{domain:_0x9df482,user:_0x428a65,tx:_0x14ec03}=_0x30f63f[_0x111aec(0xc6)];await(0x0,tool_permission_1[_0x111aec(0xfd)])('',_0x30f63f);const _0x2e3390=await _0x14ec03[_0x111aec(0xbd)](resource_base_1['Entity'])[_0x111aec(0xc1)]({'where':{'domain':{'id':_0x9df482['id']},'id':_0x4f833b}}),_0x15e27a=await _0x14ec03['getRepository'](resource_base_1[_0x111aec(0xbe)])[_0x111aec(0xe0)]({'where':{'domain':{'id':_0x9df482['id']},'entity':{'id':_0x2e3390['id']}}});let {name:_0x57e7a5=''}=_0x2e3390||{},_0x2136df=kebabCase(_0x57e7a5),_0x48b640=modelTemplate[_0x111aec(0xec)](/{{pascalCase name}}/g,startCase(camelCase(_0x57e7a5))[_0x111aec(0xec)](/ /g,''))['replace'](/{{camelCase name}}/g,camelCase(_0x57e7a5))[_0x111aec(0xec)](/{{snakeCase name}}/g,snakeCase(_0x57e7a5))[_0x111aec(0xec)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x57e7a5)))[_0x111aec(0xec)](/ /g,''))[_0x111aec(0xec)](/{{pluralCamelCase name}}/g,camelCase(plural(_0x57e7a5)))[_0x111aec(0xec)](/{{name}}/g,_0x57e7a5),_0x261d52='';'JSON'==_0x2e3390[_0x111aec(0xde)]?_0x261d52=_0x111aec(0xf1):_0x111aec(0x11b)==_0x2e3390['dataProp']&&(_0x261d52=_0x111aec(0xc4)),_0x48b640=_0x48b640[_0x111aec(0xec)](/{{HistoryButton}}/g,_0x261d52);let _0x456fca=this[_0x111aec(0xdd)](_0x15e27a);_0x48b640=_0x48b640[_0x111aec(0xec)](/{{SortColumns}}/g,_0x456fca[_0x111aec(0x125)](','));let _0x5f1587=this[_0x111aec(0xd6)](_0x15e27a);_0x48b640=_0x48b640[_0x111aec(0xec)](/{{SearchColumns}}/g,_0x5f1587[_0x111aec(0x125)](','));let _0x4cb708=this[_0x111aec(0x108)](_0x15e27a);return _0x48b640=_0x48b640[_0x111aec(0xec)](/{{GridColumns}}/g,_0x4cb708[_0x111aec(0x125)](',')),_0x48b640=this[_0x111aec(0x122)](_0x48b640),await this[_0x111aec(0xcd)](_0x14ec03,_0x9df482,_0x428a65,_0xd707e2,_0x2136df,_0x48b640),!0x0;}['createGridColumns'](_0x3e8860){const _0x15eaa8=a0_0x276bce;return _0x3e8860[_0x15eaa8(0xd4)](_0x2fb944=>'id'!=_0x2fb944[_0x15eaa8(0x11e)]&&_0x2fb944['gridRank']>0x0)[_0x15eaa8(0xb7)](function(_0x1942c7,_0x30e678){return _0x1942c7['gridRank']-_0x30e678['gridRank'];})[_0x15eaa8(0x100)](_0x38b58e=>{const _0xf5ec81=_0x15eaa8;let {gridEditor:_0x1dc3f1=_0xf5ec81(0x11c),name:_0x3d8049,term:_0x5a8743,gridWidth:_0x5cb691=0x0,gridAlign:_0x17d9d8=_0xf5ec81(0xdb),nullable:_0x448d70=!0x1}=_0x38b58e;if(null==_0x1dc3f1&&(_0x1dc3f1=_0xf5ec81(0x11c)),null==_0x17d9d8&&(_0x17d9d8=_0xf5ec81(0xdb)),_0xf5ec81(0x126)==_0x3d8049||'creator_id'==_0x3d8049)return _0x3d8049=_0xf5ec81(0x126)==_0x3d8049?_0xf5ec81(0x129):_0xf5ec81(0x11f),_0xf5ec81(0xf8)+_0x3d8049+_0xf5ec81(0xb2)+_0x3d8049+'\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}';if(_0xf5ec81(0xee)==_0x3d8049||_0xf5ec81(0xd7)==_0x3d8049)return _0xf5ec81(0xd8)+(_0xf5ec81(0xee)==_0x3d8049?_0xf5ec81(0xcf):_0xf5ec81(0xfb))+'\x22,\x22header\x22:\x20\x22'+_0x3d8049+'\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}';let _0x1f217d=_0xf5ec81(0xf6)!=_0x1dc3f1&&_0xf5ec81(0xe2)!=_0x1dc3f1,_0x3295a4='hidden'==_0x1dc3f1;0x1!=_0x3295a4&&0x0!=_0x1f217d||(_0x1dc3f1='string');let _0x3daca6='{\x22type\x22:\x20\x22'+_0x1dc3f1+_0xf5ec81(0xc3)+camelCase(_0x3d8049)+_0xf5ec81(0xb2)+_0x5a8743+_0xf5ec81(0xe1)+_0x3295a4+_0xf5ec81(0xe3)+_0x1f217d+_0xf5ec81(0xb4)+!_0x448d70+_0xf5ec81(0xc8)+_0x17d9d8+_0xf5ec81(0xe9)+_0x5cb691+_0xf5ec81(0x103);return _0xf5ec81(0x10d)==_0x38b58e[_0xf5ec81(0xb9)]&&(_0x3daca6+=_0xf5ec81(0xed)+_0x38b58e[_0xf5ec81(0x123)]+'\x22}'),'scenario'==_0x38b58e[_0xf5ec81(0xb9)]&&(_0x3daca6+=_0xf5ec81(0x11a)+_0x38b58e[_0xf5ec81(0x123)]+'\x22}'),'entity'==_0x38b58e[_0xf5ec81(0xb9)]&&(_0x3daca6+=_0xf5ec81(0x124)+camelCase(plural(_0x38b58e[_0xf5ec81(0x123)]))+_0xf5ec81(0x117)),_0x3daca6+='}',_0x3daca6;});}[a0_0x276bce(0xd6)](_0x50c649){const _0x4a50bf=a0_0x276bce;return _0x50c649[_0x4a50bf(0xd4)](_0x11dec2=>_0x11dec2[_0x4a50bf(0x115)]>0x0)[_0x4a50bf(0xb7)](function(_0x1789a5,_0x40004){const _0x49844f=_0x4a50bf;return _0x1789a5['searchRank']-_0x40004[_0x49844f(0x115)];})[_0x4a50bf(0x100)](_0x385f42=>{const _0x62eb7f=_0x4a50bf;let _0x56cd8c=_0x385f42[_0x62eb7f(0xe7)];return _0x62eb7f(0xd4)==_0x56cd8c?'\x22'+camelCase(_0x385f42['name'])+'\x22':(_0x56cd8c||(_0x56cd8c='eq'),_0x62eb7f(0x11d)+camelCase(_0x385f42[_0x62eb7f(0x11e)])+'\x22,\x22operator\x22:\x20\x22'+_0x56cd8c+'\x22}');});}[a0_0x276bce(0xdd)](_0x121bf2){const _0x15b778=a0_0x276bce;return _0x121bf2[_0x15b778(0xd4)](_0x82a1c1=>_0x82a1c1[_0x15b778(0xfc)]>0x0)[_0x15b778(0xb7)](function(_0x29dd16,_0x30569a){const _0x4740bc=_0x15b778;return _0x29dd16[_0x4740bc(0xfc)]-_0x30569a[_0x4740bc(0xfc)];})[_0x15b778(0x100)](_0x2c6c6d=>_0x15b778(0xd5)+camelCase(_0x2c6c6d[_0x15b778(0x11e)])+_0x15b778(0x10b)+_0x2c6c6d[_0x15b778(0xb8)]+'}');}async[a0_0x276bce(0xcd)](_0x5a9a32,_0x554342,_0x541f19,_0x49d39b,_0x5c88e6,_0x243bf9){const _0x2e00c9=a0_0x276bce;let _0x3f27ed=await _0x5a9a32[_0x2e00c9(0xbd)](menu_base_1[_0x2e00c9(0xdf)])[_0x2e00c9(0xc1)]({'where':{'domain':{'id':_0x554342['id']},'id':_0x49d39b}}),_0x39aa79=(await _0x5a9a32['getRepository'](menu_base_1[_0x2e00c9(0xdf)])[_0x2e00c9(0xc9)]('select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27'+_0x49d39b+_0x2e00c9(0x127)+_0x49d39b+'\x27'))[0x0][_0x2e00c9(0xbf)]+0xa,_0x13ae58=new menu_base_1['Menu']();_0x13ae58[_0x2e00c9(0x11e)]=_0x5c88e6,_0x13ae58[_0x2e00c9(0xb1)]='SCREEN',_0x13ae58[_0x2e00c9(0xfa)]=_0x2e00c9(0xca),_0x13ae58[_0x2e00c9(0xbf)]=_0x39aa79,_0x13ae58[_0x2e00c9(0xff)]=!0x1,_0x13ae58['routing']=_0x5c88e6,_0x13ae58[_0x2e00c9(0x101)]=_0x243bf9,_0x13ae58[_0x2e00c9(0x120)]=_0x2e00c9(0xe8),_0x13ae58[_0x2e00c9(0x109)]=_0x3f27ed,await _0x5a9a32[_0x2e00c9(0xbd)](menu_base_1['Menu'])[_0x2e00c9(0xeb)](Object[_0x2e00c9(0x114)](Object[_0x2e00c9(0x114)]({},_0x13ae58),{'domain':_0x554342,'creator':_0x541f19,'updater':_0x541f19}));}[a0_0x276bce(0x122)](_0x54ed22){const _0xf1b285=a0_0x276bce;let _0x4d2cf0=JSON[_0xf1b285(0x10a)](_0x54ed22)[_0xf1b285(0x110)](/(.{100})/)['filter'](_0x1c7d5b=>_0x1c7d5b),_0x4ffb0d=[_0xf1b285(0x102),'aes-256-cbc',_0xf1b285(0xba),_0xf1b285(0x10e),_0xf1b285(0xb0),_0xf1b285(0xb6),_0xf1b285(0xf7),'aes256'],_0x313502=crypto_1[_0xf1b285(0xf4)]['randomBytes'](0x20)[_0xf1b285(0x128)]('hex'),_0x55f5ff=Buffer[_0xf1b285(0x116)](_0x313502,'hex'),_0x302003=_0x313502['substring'](0x0,0x10),_0x2ee19f=['',_0x302003,_0x302003,_0x302003,_0x302003,_0x302003,_0x302003,_0x302003],_0x3c348f=0x0,_0x53dfa1=[];_0x53dfa1['push'](_0x313502);for(var _0x3b03bd=0x0;_0x3b03bd<_0x4d2cf0[_0xf1b285(0xbb)];_0x3b03bd++,_0x3c348f++){_0x3c348f==_0x4ffb0d[_0xf1b285(0xbb)]&&(_0x3c348f=0x0);let _0x57fe20=crypto_1[_0xf1b285(0xf4)][_0xf1b285(0x107)](_0x4ffb0d[_0x3c348f],_0x55f5ff,_0x2ee19f[_0x3c348f]),_0x5013a1=_0x57fe20[_0xf1b285(0x105)](_0x4d2cf0[_0x3b03bd],_0xf1b285(0x121),_0xf1b285(0xbc));_0x5013a1+=_0x57fe20[_0xf1b285(0xf9)]('hex'),_0x53dfa1[_0xf1b285(0x119)](_0x5013a1);}return _0x53dfa1['join'](_0xf1b285(0x12a));}};tslib_1[a0_0x276bce(0xe6)]([(0x0,type_graphql_1[a0_0x276bce(0x104)])(a0_0x276bce(0x113)),(0x0,type_graphql_1[a0_0x276bce(0xe5)])(_0x4600ea=>Boolean,{'description':a0_0x276bce(0xd0)}),tslib_1[a0_0x276bce(0xd9)](0x0,(0x0,type_graphql_1[a0_0x276bce(0xc5)])('id')),tslib_1['__param'](0x1,(0x0,type_graphql_1[a0_0x276bce(0xc5)])(a0_0x276bce(0xe4))),tslib_1[a0_0x276bce(0xd9)](0x2,(0x0,type_graphql_1[a0_0x276bce(0xf2)])()),tslib_1[a0_0x276bce(0x118)](a0_0x276bce(0xea),Function),tslib_1[a0_0x276bce(0x118)]('design:paramtypes',[String,String,Object]),tslib_1[a0_0x276bce(0x118)]('design:returntype',Promise)],OperatoToolCreateMenu[a0_0x276bce(0xb3)],a0_0x276bce(0xda),null),OperatoToolCreateMenu=tslib_1[a0_0x276bce(0xe6)]([(0x0,type_graphql_1[a0_0x276bce(0xf3)])()],OperatoToolCreateMenu),exports[a0_0x276bce(0xd1)]=OperatoToolCreateMenu;function a0_0x3c99(){const _0x4f8cd4=['aes-256-ofb','sort','reverseSort','refType','aes-256-cfb','length','hex','getRepository','EntityColumn','rank','pluralize','findOne','224310SGNAPd','\x22,\x22name\x22:\x20\x22','\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','Arg','state','887918psllMo',',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22','query','meta-grist-page','lodash','defineProperty','createMenuData','731454uqoCbu','updatedAt','Operato\x20Tool\x20Create\x20Menu','OperatoToolCreateMenu','\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','1091182PcobJh','filter','{\x22name\x22:\x22','createSearchCols','created_at','{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22','__param','toolCreateMenu','left','crypto','createSortCols','dataProp','Menu','find','\x22,\x22hidden\x22:','hidden','\x20,\x22editable\x22:\x20','parent_menu_id','Mutation','__decorate','searchOper','@things-factory/meta-ui/client/pages/meta-grist-page','\x22,\x22width\x22:','design:type','save','replace',',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22','updated_at','1148220nOgySI','171HFVDlz','\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','Ctx','Resolver','default','30437AYoTzQ','readonly','aes-256-ctr','{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22','final','category','createdAt','sortRank','checkStudioTemplateIsOverLimit','./../tool-secret/tool-permission','hiddenFlag','map','template','aes-256-ecb','\x20,\x22exportable\x22:\x20true','Directive','update','36pGtnvd','createCipheriv','createGridColumns','parent','stringify','\x22,\x22desc\x22:','304224uYTcgY','code','aes-256-cfb8','__importDefault','split','@things-factory/menu-base','21mRGxdp','@transaction','assign','searchRank','from','\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}','__metadata','push',',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22','COPY','string','{\x22name\x22:\x20\x22','name','creator','resourceUrl','utf8','enc','refName',',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22','join','updater_id','\x27\x20or\x20id\x20=\x20\x27','toString','updater','h1z0q9i9x7q6','1390PGlIID','aes-256-cfb1','menuType','\x22,\x22header\x22:\x20\x22','prototype',',\x22mandatory\x22:\x20','tslib'];a0_0x3c99=function(){return _0x4f8cd4;};return a0_0x3c99();}const modelTemplate=a0_0x276bce(0xd2);
1
+ 'use strict';const a0_0x399db8=a0_0x43cb;function a0_0x43cb(_0x2de68d,_0x4d1025){const _0x36e33b=a0_0x36e3();return a0_0x43cb=function(_0x43cbdf,_0x45ad99){_0x43cbdf=_0x43cbdf-0xd4;let _0x42d420=_0x36e33b[_0x43cbdf];return _0x42d420;},a0_0x43cb(_0x2de68d,_0x4d1025);}function a0_0x36e3(){const _0x28739b=['\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}','find','gridRank','sort','{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22','COPY',',\x22mandatory\x22:\x20','Resolver','design:type','toString','{\x22name\x22:\x22','dataProp','toolCreateMenu','select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27','aes-256-ecb','hidden','lodash','Directive','335030GMyhrm','./../tool-secret/tool-permission','__importDefault','Operato\x20Tool\x20Create\x20Menu','refType','left','refName','24hjPynN','SCREEN','OperatoToolCreateMenu','rank','entity','\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','string','resourceUrl','createSortCols','updatedAt','\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','readonly',',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22','aes-256-ofb','state',',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22','__param','name','__esModule','parent','design:returntype','{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22','map','substring','utf8','\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','query','filter','updater','{\x22name\x22:\x20\x22','crypto','createSearchCols','pluralize','\x20,\x22editable\x22:\x20','1720033AJmueZ','join','10OEgknZ','updater_id','update','push','@things-factory/meta-ui/client/pages/meta-grist-page','length','creator','18123LAsbqC','findOne','\x22,\x22operator\x22:\x20\x22','save','replace','created_at','EntityColumn','updated_at','618372EmDvev','code','stringify','Menu','\x27\x20or\x20id\x20=\x20\x27','createMenuData','parent_menu_id','\x22,\x22name\x22:\x20\x22','aes-256-cfb',',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22','aes256','Ctx','\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}','sortRank','design:paramtypes','aes-256-cbc','82705IihKaD','default','creator_id','hiddenFlag','aes-256-ctr','__metadata','\x22,\x22hidden\x22:','getRepository','\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}','76kqgUTf','searchRank','checkStudioTemplateIsOverLimit','defineProperty','__decorate','meta-grist-page','6111919gWgQnF','aes-256-cfb8','Arg','hex','1yErMDX','JSON','split','assign','{\x22type\x22:\x20\x22','Mutation','\x22,\x22header\x22:\x20\x22','\x20,\x22exportable\x22:\x20true','reverseSort','2935368mMLgSL'];a0_0x36e3=function(){return _0x28739b;};return a0_0x36e3();}(function(_0x384f04,_0x2fadf7){const _0x4e4eec=a0_0x43cb,_0x23c49d=_0x384f04();while(!![]){try{const _0x408926=-parseInt(_0x4e4eec(0xf7))/0x1*(parseInt(_0x4e4eec(0x113))/0x2)+parseInt(_0x4e4eec(0x145))/0x3*(-parseInt(_0x4e4eec(0xed))/0x4)+parseInt(_0x4e4eec(0xe4))/0x5+parseInt(_0x4e4eec(0x100))/0x6+-parseInt(_0x4e4eec(0x13c))/0x7+parseInt(_0x4e4eec(0x11a))/0x8*(-parseInt(_0x4e4eec(0xd4))/0x9)+-parseInt(_0x4e4eec(0x13e))/0xa*(-parseInt(_0x4e4eec(0xf3))/0xb);if(_0x408926===_0x2fadf7)break;else _0x23c49d['push'](_0x23c49d['shift']());}catch(_0x417d43){_0x23c49d['push'](_0x23c49d['shift']());}}}(a0_0x36e3,0x4fe5d));Object[a0_0x399db8(0xf0)](exports,a0_0x399db8(0x12c),{'value':!0x0}),exports[a0_0x399db8(0x11c)]=void 0x0;const tslib_1=require('tslib'),type_graphql_1=require('type-graphql'),resource_base_1=require('@things-factory/resource-base'),menu_base_1=require('@things-factory/menu-base'),tool_permission_1=require(a0_0x399db8(0x114)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x399db8(0x111)),{plural:plural}=require(a0_0x399db8(0x13a)),crypto_1=tslib_1[a0_0x399db8(0x115)](require(a0_0x399db8(0x138)));let OperatoToolCreateMenu=class{async[a0_0x399db8(0x10d)](_0x359758,_0x44d738,_0x6faae2){const _0x2c1ca6=a0_0x399db8,{domain:_0x2fb2f4,user:_0x5e09ee,tx:_0x5c6ae7}=_0x6faae2[_0x2c1ca6(0x128)];await(0x0,tool_permission_1[_0x2c1ca6(0xef)])('',_0x6faae2);const _0x1dfae6=await _0x5c6ae7[_0x2c1ca6(0xeb)](resource_base_1['Entity'])['findOne']({'where':{'domain':{'id':_0x2fb2f4['id']},'id':_0x359758}}),_0x321c21=await _0x5c6ae7[_0x2c1ca6(0xeb)](resource_base_1[_0x2c1ca6(0x14b)])[_0x2c1ca6(0x102)]({'where':{'domain':{'id':_0x2fb2f4['id']},'entity':{'id':_0x1dfae6['id']}}});let {name:_0x55d971=''}=_0x1dfae6||{},_0x472517=kebabCase(_0x55d971),_0x73e385=modelTemplate[_0x2c1ca6(0x149)](/{{pascalCase name}}/g,startCase(camelCase(_0x55d971))[_0x2c1ca6(0x149)](/ /g,''))['replace'](/{{camelCase name}}/g,camelCase(_0x55d971))['replace'](/{{snakeCase name}}/g,snakeCase(_0x55d971))[_0x2c1ca6(0x149)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x55d971)))[_0x2c1ca6(0x149)](/ /g,''))[_0x2c1ca6(0x149)](/{{pluralCamelCase name}}/g,camelCase(plural(_0x55d971)))[_0x2c1ca6(0x149)](/{{name}}/g,_0x55d971),_0x5db7b1='';_0x2c1ca6(0xf8)==_0x1dfae6[_0x2c1ca6(0x10c)]?_0x5db7b1=_0x2c1ca6(0x11f):_0x2c1ca6(0x106)==_0x1dfae6[_0x2c1ca6(0x10c)]&&(_0x5db7b1=_0x2c1ca6(0x133)),_0x73e385=_0x73e385['replace'](/{{HistoryButton}}/g,_0x5db7b1);let _0x4b95da=this[_0x2c1ca6(0x122)](_0x321c21);_0x73e385=_0x73e385[_0x2c1ca6(0x149)](/{{SortColumns}}/g,_0x4b95da[_0x2c1ca6(0x13d)](','));let _0x521e5b=this[_0x2c1ca6(0x139)](_0x321c21);_0x73e385=_0x73e385[_0x2c1ca6(0x149)](/{{SearchColumns}}/g,_0x521e5b[_0x2c1ca6(0x13d)](','));let _0x90e47c=this['createGridColumns'](_0x321c21);return _0x73e385=_0x73e385['replace'](/{{GridColumns}}/g,_0x90e47c['join'](',')),_0x73e385=this['enc'](_0x73e385),await this[_0x2c1ca6(0xd9)](_0x5c6ae7,_0x2fb2f4,_0x5e09ee,_0x44d738,_0x472517,_0x73e385),!0x0;}['createGridColumns'](_0x499e04){const _0x1df7c6=a0_0x399db8;return _0x499e04[_0x1df7c6(0x135)](_0x2aae23=>'id'!=_0x2aae23[_0x1df7c6(0x12b)]&&_0x2aae23[_0x1df7c6(0x103)]>0x0)[_0x1df7c6(0x104)](function(_0x51fba5,_0x28d333){const _0x27e033=_0x1df7c6;return _0x51fba5[_0x27e033(0x103)]-_0x28d333[_0x27e033(0x103)];})[_0x1df7c6(0x130)](_0x2d0025=>{const _0x2bf0af=_0x1df7c6;let {gridEditor:_0x2a9426='string',name:_0x4ce5b7,term:_0x3bd48f,gridWidth:_0x28057b=0x0,gridAlign:_0x4d9fed='left',nullable:_0x44b7cb=!0x1}=_0x2d0025;if(null==_0x2a9426&&(_0x2a9426='string'),null==_0x4d9fed&&(_0x4d9fed=_0x2bf0af(0x118)),'updater_id'==_0x4ce5b7||_0x2bf0af(0xe6)==_0x4ce5b7)return _0x4ce5b7=_0x2bf0af(0x13f)==_0x4ce5b7?_0x2bf0af(0x136):_0x2bf0af(0x144),_0x2bf0af(0x12f)+_0x4ce5b7+'\x22,\x22header\x22:\x20\x22'+_0x4ce5b7+_0x2bf0af(0xe0);if(_0x2bf0af(0x14c)==_0x4ce5b7||_0x2bf0af(0x14a)==_0x4ce5b7)return _0x2bf0af(0x105)+(_0x2bf0af(0x14c)==_0x4ce5b7?_0x2bf0af(0x123):'createdAt')+_0x2bf0af(0xfd)+_0x4ce5b7+_0x2bf0af(0x101);let _0x411279=_0x2bf0af(0x125)!=_0x2a9426&&_0x2bf0af(0x110)!=_0x2a9426,_0x44f3f3=_0x2bf0af(0x110)==_0x2a9426;0x1!=_0x44f3f3&&0x0!=_0x411279||(_0x2a9426=_0x2bf0af(0x120));let _0x303326=_0x2bf0af(0xfb)+_0x2a9426+_0x2bf0af(0xdb)+camelCase(_0x4ce5b7)+'\x22,\x22header\x22:\x20\x22'+_0x3bd48f+_0x2bf0af(0xea)+_0x44f3f3+_0x2bf0af(0x13b)+_0x411279+_0x2bf0af(0x107)+!_0x44b7cb+',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22'+_0x4d9fed+'\x22,\x22width\x22:'+_0x28057b+_0x2bf0af(0xfe);return _0x2bf0af(0xd5)==_0x2d0025[_0x2bf0af(0x117)]&&(_0x303326+=_0x2bf0af(0x129)+_0x2d0025['refName']+'\x22}'),'scenario'==_0x2d0025[_0x2bf0af(0x117)]&&(_0x303326+=_0x2bf0af(0xdd)+_0x2d0025['refName']+'\x22}'),_0x2bf0af(0x11e)==_0x2d0025[_0x2bf0af(0x117)]&&(_0x303326+=_0x2bf0af(0x126)+camelCase(plural(_0x2d0025[_0x2bf0af(0x119)]))+_0x2bf0af(0xec)),_0x303326+='}',_0x303326;});}[a0_0x399db8(0x139)](_0x5487f5){const _0x1a70a5=a0_0x399db8;return _0x5487f5[_0x1a70a5(0x135)](_0x3817ba=>_0x3817ba[_0x1a70a5(0xee)]>0x0)[_0x1a70a5(0x104)](function(_0x46c79d,_0x4f58d2){const _0xdb3a48=_0x1a70a5;return _0x46c79d[_0xdb3a48(0xee)]-_0x4f58d2[_0xdb3a48(0xee)];})[_0x1a70a5(0x130)](_0x296217=>{const _0x5c2b11=_0x1a70a5;let _0x553fe1=_0x296217['searchOper'];return _0x5c2b11(0x135)==_0x553fe1?'\x22'+camelCase(_0x296217['name'])+'\x22':(_0x553fe1||(_0x553fe1='eq'),_0x5c2b11(0x137)+camelCase(_0x296217[_0x5c2b11(0x12b)])+_0x5c2b11(0x147)+_0x553fe1+'\x22}');});}[a0_0x399db8(0x122)](_0x58acd9){const _0x2e2928=a0_0x399db8;return _0x58acd9[_0x2e2928(0x135)](_0x5619a8=>_0x5619a8['sortRank']>0x0)['sort'](function(_0x52ca72,_0x373a4d){const _0x572c43=_0x2e2928;return _0x52ca72['sortRank']-_0x373a4d[_0x572c43(0xe1)];})[_0x2e2928(0x130)](_0x2c3797=>_0x2e2928(0x10b)+camelCase(_0x2c3797[_0x2e2928(0x12b)])+'\x22,\x22desc\x22:'+_0x2c3797[_0x2e2928(0xff)]+'}');}async[a0_0x399db8(0xd9)](_0x5c4521,_0xa73cc6,_0x337d5e,_0x5502b9,_0x2f83fd,_0x24418f){const _0x1e808c=a0_0x399db8;let _0x497c25=await _0x5c4521[_0x1e808c(0xeb)](menu_base_1[_0x1e808c(0xd7)])[_0x1e808c(0x146)]({'where':{'domain':{'id':_0xa73cc6['id']},'id':_0x5502b9}}),_0x1b7888=(await _0x5c4521['getRepository'](menu_base_1['Menu'])[_0x1e808c(0x134)](_0x1e808c(0x10e)+_0x5502b9+_0x1e808c(0xd8)+_0x5502b9+'\x27'))[0x0][_0x1e808c(0x11d)]+0xa,_0x224e50=new menu_base_1[(_0x1e808c(0xd7))]();_0x224e50['name']=_0x2f83fd,_0x224e50['menuType']=_0x1e808c(0x11b),_0x224e50['category']=_0x1e808c(0xf2),_0x224e50[_0x1e808c(0x11d)]=_0x1b7888,_0x224e50[_0x1e808c(0xe7)]=!0x1,_0x224e50['routing']=_0x2f83fd,_0x224e50['template']=_0x24418f,_0x224e50[_0x1e808c(0x121)]=_0x1e808c(0x142),_0x224e50[_0x1e808c(0x12d)]=_0x497c25,await _0x5c4521[_0x1e808c(0xeb)](menu_base_1['Menu'])[_0x1e808c(0x148)](Object[_0x1e808c(0xfa)](Object[_0x1e808c(0xfa)]({},_0x224e50),{'domain':_0xa73cc6,'creator':_0x337d5e,'updater':_0x337d5e}));}['enc'](_0x19b1b5){const _0x398e8d=a0_0x399db8;let _0x290517=JSON[_0x398e8d(0xd6)](_0x19b1b5)[_0x398e8d(0xf9)](/(.{100})/)[_0x398e8d(0x135)](_0x2002f6=>_0x2002f6),_0x4a1870=[_0x398e8d(0x10f),_0x398e8d(0xe3),_0x398e8d(0xdc),_0x398e8d(0xf4),'aes-256-cfb1',_0x398e8d(0x127),_0x398e8d(0xe8),_0x398e8d(0xde)],_0x359a4e=crypto_1[_0x398e8d(0xe5)]['randomBytes'](0x20)[_0x398e8d(0x10a)](_0x398e8d(0xf6)),_0x3301ed=Buffer['from'](_0x359a4e,_0x398e8d(0xf6)),_0x4ec8c8=_0x359a4e[_0x398e8d(0x131)](0x0,0x10),_0x3385ab=['',_0x4ec8c8,_0x4ec8c8,_0x4ec8c8,_0x4ec8c8,_0x4ec8c8,_0x4ec8c8,_0x4ec8c8],_0x1a8256=0x0,_0x183f58=[];_0x183f58['push'](_0x359a4e);for(var _0x235c00=0x0;_0x235c00<_0x290517[_0x398e8d(0x143)];_0x235c00++,_0x1a8256++){_0x1a8256==_0x4a1870[_0x398e8d(0x143)]&&(_0x1a8256=0x0);let _0x36aa76=crypto_1[_0x398e8d(0xe5)]['createCipheriv'](_0x4a1870[_0x1a8256],_0x3301ed,_0x3385ab[_0x1a8256]),_0x34d981=_0x36aa76[_0x398e8d(0x140)](_0x290517[_0x235c00],_0x398e8d(0x132),_0x398e8d(0xf6));_0x34d981+=_0x36aa76['final']('hex'),_0x183f58[_0x398e8d(0x141)](_0x34d981);}return _0x183f58['join']('h1z0q9i9x7q6');}};tslib_1[a0_0x399db8(0xf1)]([(0x0,type_graphql_1[a0_0x399db8(0x112)])('@transaction'),(0x0,type_graphql_1[a0_0x399db8(0xfc)])(_0x248fb4=>Boolean,{'description':a0_0x399db8(0x116)}),tslib_1[a0_0x399db8(0x12a)](0x0,(0x0,type_graphql_1[a0_0x399db8(0xf5)])('id')),tslib_1[a0_0x399db8(0x12a)](0x1,(0x0,type_graphql_1[a0_0x399db8(0xf5)])(a0_0x399db8(0xda))),tslib_1[a0_0x399db8(0x12a)](0x2,(0x0,type_graphql_1[a0_0x399db8(0xdf)])()),tslib_1[a0_0x399db8(0xe9)](a0_0x399db8(0x109),Function),tslib_1[a0_0x399db8(0xe9)](a0_0x399db8(0xe2),[String,String,Object]),tslib_1[a0_0x399db8(0xe9)](a0_0x399db8(0x12e),Promise)],OperatoToolCreateMenu['prototype'],a0_0x399db8(0x10d),null),OperatoToolCreateMenu=tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x399db8(0x108)])()],OperatoToolCreateMenu),exports[a0_0x399db8(0x11c)]=OperatoToolCreateMenu;const modelTemplate=a0_0x399db8(0x124);
@@ -1 +1 @@
1
- 'use strict';const a0_0xd6bf0=a0_0x589e;(function(_0x420537,_0x18ac17){const _0x27df76=a0_0x589e,_0x17fc87=_0x420537();while(!![]){try{const _0x16fd61=-parseInt(_0x27df76(0x19a))/0x1*(parseInt(_0x27df76(0x13a))/0x2)+parseInt(_0x27df76(0x167))/0x3*(-parseInt(_0x27df76(0x117))/0x4)+-parseInt(_0x27df76(0x11c))/0x5+-parseInt(_0x27df76(0x18e))/0x6+parseInt(_0x27df76(0x156))/0x7+-parseInt(_0x27df76(0x12b))/0x8*(-parseInt(_0x27df76(0x127))/0x9)+parseInt(_0x27df76(0x110))/0xa;if(_0x16fd61===_0x18ac17)break;else _0x17fc87['push'](_0x17fc87['shift']());}catch(_0x4690ab){_0x17fc87['push'](_0x17fc87['shift']());}}}(a0_0x2aa9,0x7f26b));Object['defineProperty'](exports,a0_0xd6bf0(0x185),{'value':!0x0}),exports[a0_0xd6bf0(0x15e)]=void 0x0;const tslib_1=require(a0_0xd6bf0(0x11b)),type_graphql_1=require(a0_0xd6bf0(0x17f)),shell_1=require(a0_0xd6bf0(0x17d)),resource_base_1=require('@things-factory/resource-base'),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0xd6bf0(0x131)),{plural:plural}=require(a0_0xd6bf0(0x124)),fs=require('fs');let OperatoToolCreateService=class{async[a0_0xd6bf0(0x13f)](_0x34e59e,_0x3dd78b){const _0x361012=a0_0xd6bf0,{domain:_0x29ee47}=_0x3dd78b[_0x361012(0x16d)],_0x5593db=await(0x0,shell_1['getRepository'])(resource_base_1[_0x361012(0x19c)])[_0x361012(0x14d)]({'where':{'id':_0x34e59e}}),_0x3274c8=await(0x0,shell_1['getRepository'])(resource_base_1[_0x361012(0x198)])[_0x361012(0x12c)]({'where':{'domain':{'id':_0x29ee47['id']},'entity':{'id':_0x5593db['id']}}});let {name:_0x5648d5='',bundle:_0x4ec86a=''}=_0x5593db||{},_0x83bd77=this[_0x361012(0x196)](),_0x11df47=kebabCase(_0x5648d5);return await this[_0x361012(0x173)](_0x83bd77,_0x4ec86a,_0x11df47),await this[_0x361012(0x158)](_0x83bd77,_0x4ec86a,_0x5648d5,_0x11df47,_0x5593db,_0x3274c8),!0x0;}async['createServiceFiles'](_0x38f31f,_0x1a446d,_0x23df51,_0x456d95,_0x15687c,_0x334930){const _0x4fe04e=a0_0xd6bf0;let _0x43cf27={'name':_0x456d95,'tableName':_0x15687c[_0x4fe04e(0x178)],'pascalCaseName':startCase(camelCase(_0x23df51))[_0x4fe04e(0x111)](/ /g,''),'camelCaseName':camelCase(_0x23df51),'snakeCaseName':snakeCase(_0x23df51),'pluralPascalCaseName':startCase(camelCase(plural(_0x23df51)))[_0x4fe04e(0x111)](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x23df51))},_0x5d0b0f=_0x38f31f+'/packages/'+_0x1a446d+_0x4fe04e(0x197);[_0x4fe04e(0x19b),_0x4fe04e(0x143)][_0x4fe04e(0x114)](_0x15687c[_0x4fe04e(0x12e)])?await this[_0x4fe04e(0x179)](_0x5d0b0f,_0x456d95,_0x15687c,_0x334930,_0x43cf27):await this[_0x4fe04e(0x190)](_0x5d0b0f,_0x456d95,_0x15687c,_0x334930,_0x43cf27);}async['createHistoryServiceFiles'](_0x67a302,_0x268d04,_0x2f550e,_0x3eef61,_0x5cc395){const _0x3e3a86=a0_0xd6bf0;await this[_0x3e3a86(0x15c)](_0x67a302+(_0x268d04+_0x3e3a86(0x10e)),serviceHistoryIndex,_0x5cc395);let _0x734a93=this[_0x3e3a86(0x140)](_0x2f550e,_0x3eef61);await this['writeFile'](_0x67a302+(_0x268d04+'/'+_0x268d04+_0x3e3a86(0x10d)),_0x734a93,_0x5cc395),await this['writeFile'](_0x67a302+(_0x268d04+'/'+_0x268d04+_0x3e3a86(0x175)),serviceQuery,_0x5cc395),await this[_0x3e3a86(0x15c)](_0x67a302+(_0x268d04+'/'+_0x268d04+_0x3e3a86(0x13e)),serviceMutation,_0x5cc395);let _0x436d4c=this[_0x3e3a86(0x18b)](_0x3eef61);await this[_0x3e3a86(0x15c)](_0x67a302+(_0x268d04+'/'+_0x268d04+_0x3e3a86(0x11d)),_0x436d4c,_0x5cc395);let _0x3efadd=this[_0x3e3a86(0x128)](_0x2f550e,_0x3eef61);await this['writeFile'](_0x67a302+(_0x268d04+'/'+_0x268d04+'-history.ts'),_0x3efadd,_0x5cc395);let _0x2ab4f5='';'JSON'==_0x2f550e[_0x3e3a86(0x12e)]?(_0x2ab4f5='\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',await this[_0x3e3a86(0x15c)](_0x67a302+(_0x268d04+'/event-subscriber.ts'),serviceEntitySubscriber,_0x5cc395)):_0x2ab4f5='';let _0x19eca1=serviceEntitySubscriber['replace'](/{{entityToJson}}/g,_0x2ab4f5);await this[_0x3e3a86(0x15c)](_0x67a302+(_0x268d04+_0x3e3a86(0x135)),_0x19eca1,_0x5cc395),await this[_0x3e3a86(0x15c)](_0x67a302+(_0x268d04+'/'+_0x268d04+_0x3e3a86(0x120)),serviceHistoryQuery,_0x5cc395),await this['writeFile'](_0x67a302+(_0x268d04+'/'+_0x268d04+_0x3e3a86(0x15d)),sereviceHistoryType,_0x5cc395);let _0x219287=_0x67a302+'index.ts';0x0==await this[_0x3e3a86(0x191)](_0x219287)&&await this[_0x3e3a86(0x15c)](_0x219287,allIndex,_0x5cc395);let _0x8dbe63=await fs[_0x3e3a86(0x172)](_0x219287,_0x3e3a86(0x15b));_0x8dbe63[_0x3e3a86(0x134)](_0x3e3a86(0x155)+_0x5cc395['name']+'/'+_0x5cc395[_0x3e3a86(0x133)]+_0x3e3a86(0x16e))<0x0&&(_0x8dbe63=_0x8dbe63[_0x3e3a86(0x111)](/\/\* EXPORT ENTITY TYPES \*\//,_0x3e3a86(0x18f)+_0x5cc395['name']+'/'+_0x5cc395['name']+_0x3e3a86(0x16e))),_0x8dbe63[_0x3e3a86(0x134)](_0x3e3a86(0x155)+_0x5cc395[_0x3e3a86(0x133)]+'/'+_0x5cc395['name']+'\x27')<0x0&&(_0x8dbe63=_0x8dbe63[_0x3e3a86(0x111)](/\/\* EXPORT ENTITY TYPES \*\//,_0x3e3a86(0x18f)+_0x5cc395[_0x3e3a86(0x133)]+'/'+_0x5cc395[_0x3e3a86(0x133)]+'\x27')),_0x8dbe63['indexOf']('import\x20{\x20entities\x20as\x20'+_0x5cc395[_0x3e3a86(0x163)]+_0x3e3a86(0x14c)+_0x5cc395[_0x3e3a86(0x163)]+_0x3e3a86(0x182)+_0x5cc395[_0x3e3a86(0x163)]+_0x3e3a86(0x154)+_0x5cc395[_0x3e3a86(0x133)]+'\x27')<0x0&&(_0x8dbe63=_0x8dbe63[_0x3e3a86(0x111)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x3e3a86(0x147)+_0x5cc395['pascalCaseName']+_0x3e3a86(0x14c)+_0x5cc395[_0x3e3a86(0x163)]+_0x3e3a86(0x182)+_0x5cc395[_0x3e3a86(0x163)]+_0x3e3a86(0x154)+_0x5cc395[_0x3e3a86(0x133)]+'\x27')),_0x8dbe63[_0x3e3a86(0x134)]('...'+_0x5cc395[_0x3e3a86(0x163)]+_0x3e3a86(0x115))<0x0&&(_0x8dbe63=_0x8dbe63[_0x3e3a86(0x111)](/\/\* ENTITIES \*\//,_0x3e3a86(0x186)+_0x5cc395[_0x3e3a86(0x163)]+_0x3e3a86(0x115))),_0x8dbe63[_0x3e3a86(0x134)](_0x3e3a86(0x168)+_0x5cc395[_0x3e3a86(0x163)]+_0x3e3a86(0x119))<0x0&&(_0x8dbe63=_0x8dbe63[_0x3e3a86(0x111)](/\/\* RESOLVER CLASSES \*\//,'/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...'+_0x5cc395['pascalCaseName']+_0x3e3a86(0x119))),_0x8dbe63[_0x3e3a86(0x134)]('...'+_0x5cc395[_0x3e3a86(0x163)]+_0x3e3a86(0x137))<0x0&&(_0x8dbe63=_0x8dbe63['replace'](/\/\* SUBSCRIBERS \*\//,_0x3e3a86(0x113)+_0x5cc395['pascalCaseName']+_0x3e3a86(0x137))),await this[_0x3e3a86(0x15c)](_0x219287,_0x8dbe63,_0x5cc395);}async[a0_0xd6bf0(0x190)](_0x52a2bb,_0x4c3e26,_0x33569e,_0x23b004,_0x4a0716){const _0x355a25=a0_0xd6bf0;await this[_0x355a25(0x15c)](_0x52a2bb+(_0x4c3e26+_0x355a25(0x10e)),serviceIndex,_0x4a0716),await this[_0x355a25(0x15c)](_0x52a2bb+(_0x4c3e26+'/'+_0x4c3e26+_0x355a25(0x175)),serviceQuery,_0x4a0716),await this[_0x355a25(0x15c)](_0x52a2bb+(_0x4c3e26+'/'+_0x4c3e26+'-mutation.ts'),serviceMutation,_0x4a0716);let _0x5b1556=this['createEntityText'](_0x33569e,_0x23b004);await this[_0x355a25(0x15c)](_0x52a2bb+(_0x4c3e26+'/'+_0x4c3e26+_0x355a25(0x10d)),_0x5b1556,_0x4a0716);let _0x2b7323=this['createTypeText'](_0x23b004);await this['writeFile'](_0x52a2bb+(_0x4c3e26+'/'+_0x4c3e26+_0x355a25(0x11d)),_0x2b7323,_0x4a0716);let _0x118d59=_0x52a2bb+_0x355a25(0x187);0x0==await this[_0x355a25(0x191)](_0x118d59)&&await this[_0x355a25(0x15c)](_0x118d59,allIndex,_0x4a0716);let _0x571184=await fs[_0x355a25(0x172)](_0x118d59,_0x355a25(0x15b));_0x571184[_0x355a25(0x134)](_0x355a25(0x155)+_0x4a0716[_0x355a25(0x133)]+'/'+_0x4a0716[_0x355a25(0x133)]+'\x27')<0x0&&(_0x571184=_0x571184[_0x355a25(0x111)](/\/\* EXPORT ENTITY TYPES \*\//,_0x355a25(0x18f)+_0x4a0716[_0x355a25(0x133)]+'/'+_0x4a0716['name']+'\x27')),_0x571184[_0x355a25(0x134)](_0x355a25(0x10a)+_0x4a0716[_0x355a25(0x163)]+'Entities,\x20resolvers\x20as\x20'+_0x4a0716['pascalCaseName']+_0x355a25(0x11a)+_0x4a0716[_0x355a25(0x133)]+'\x27')<0x0&&(_0x571184=_0x571184[_0x355a25(0x111)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,'/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20'+_0x4a0716['pascalCaseName']+'Entities,\x20resolvers\x20as\x20'+_0x4a0716[_0x355a25(0x163)]+_0x355a25(0x11a)+_0x4a0716[_0x355a25(0x133)]+'\x27')),_0x571184[_0x355a25(0x134)]('...'+_0x4a0716['pascalCaseName']+'Entities,')<0x0&&(_0x571184=_0x571184[_0x355a25(0x111)](/\/\* ENTITIES \*\//,_0x355a25(0x186)+_0x4a0716['pascalCaseName']+_0x355a25(0x115))),_0x571184['indexOf'](_0x355a25(0x168)+_0x4a0716[_0x355a25(0x163)]+'Resolvers,')<0x0&&(_0x571184=_0x571184[_0x355a25(0x111)](/\/\* RESOLVER CLASSES \*\//,'/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...'+_0x4a0716[_0x355a25(0x163)]+_0x355a25(0x119))),await this['writeFile'](_0x118d59,_0x571184,_0x4a0716);}[a0_0xd6bf0(0x18b)](_0x118555){const _0x572199=a0_0xd6bf0;let _0x35ad80=sereviceType,_0x4021f5=_0x118555['map'](_0x993995=>{const _0x1b1541=a0_0x589e;if('id'==_0x993995[_0x1b1541(0x133)])return'';if(_0x1b1541(0x121)==_0x993995['name'])return'';if(_0x1b1541(0x19e)==_0x993995[_0x1b1541(0x133)])return'';if(_0x1b1541(0x15f)==_0x993995[_0x1b1541(0x133)])return'';if('creator_id'==_0x993995[_0x1b1541(0x133)])return'';if('updater_id'==_0x993995[_0x1b1541(0x133)])return'';let _0x100896=this[_0x1b1541(0x11e)](_0x993995),_0x3aabda=this['getColTxtType'](_0x993995),_0x19a6d6=camelCase(_0x993995[_0x1b1541(0x133)]);return'\x20\x20'+(_0x1b1541(0x118)+(0x0==_0x100896[_0x1b1541(0x18d)]?'':_0x1b1541(0x148)+_0x100896+',')+_0x1b1541(0x130)+_0x993995[_0x1b1541(0x153)]+_0x1b1541(0x11f))+_0x1b1541(0x139)+(''+_0x19a6d6+(_0x993995[_0x1b1541(0x153)]?'?':'')+':\x20'+_0x3aabda)+'\x0a';});_0x35ad80=_0x35ad80[_0x572199(0x111)](/{{newTypeColumns}}/g,_0x4021f5[_0x572199(0x10b)]('\x0a'));let _0x188bdc=_0x118555[_0x572199(0x129)](_0x34df09=>{const _0x3a1859=_0x572199;if('id'==_0x34df09['name'])return'';if(_0x3a1859(0x121)==_0x34df09[_0x3a1859(0x133)])return'';if('created_at'==_0x34df09['name'])return'';if(_0x3a1859(0x15f)==_0x34df09[_0x3a1859(0x133)])return'';if(_0x3a1859(0x16c)==_0x34df09['name'])return'';if('updater_id'==_0x34df09[_0x3a1859(0x133)])return'';let _0x13620e=this[_0x3a1859(0x11e)](_0x34df09),_0x3ae1a7=this['getColTxtType'](_0x34df09);_0x34df09['nullable']=!0x0;let _0x4dff2d=camelCase(_0x34df09['name']);return'\x20\x20'+(_0x3a1859(0x118)+(0x0==_0x13620e[_0x3a1859(0x18d)]?'':_0x3a1859(0x148)+_0x13620e+',')+_0x3a1859(0x130)+_0x34df09[_0x3a1859(0x153)]+_0x3a1859(0x11f))+_0x3a1859(0x139)+(''+_0x4dff2d+(_0x34df09[_0x3a1859(0x153)]?'?':'')+':\x20'+_0x3ae1a7)+'\x0a';});return _0x35ad80=_0x35ad80[_0x572199(0x111)](/{{patchTypeColumns}}/g,_0x188bdc[_0x572199(0x10b)]('\x0a')),_0x35ad80;}[a0_0xd6bf0(0x140)](_0x3676f8,_0x4aa852){const _0x3db2b4=a0_0xd6bf0;let _0x4eee8b=serviceEntity,_0xecc2c3=_0x4aa852[_0x3db2b4(0x194)](function(_0x2e21dd,_0x1f77cf){const _0x45ad66=_0x3db2b4;return _0x2e21dd[_0x45ad66(0x160)]-_0x1f77cf[_0x45ad66(0x160)];})['map'](_0xab6de5=>this[_0x3db2b4(0x166)](_0xab6de5));[_0x3db2b4(0x143),_0x3db2b4(0x19b)]['includes'](_0x3676f8['dataProp'])&&_0xecc2c3[_0x3db2b4(0x16b)]('\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201'),_0x4eee8b=_0x4eee8b[_0x3db2b4(0x111)](/{{entityColumns}}/g,_0xecc2c3[_0x3db2b4(0x10b)]('\x0a'));let _0x122d49='',_0x4b1e8e=_0x4aa852[_0x3db2b4(0x176)](_0xf099e3=>_0xf099e3[_0x3db2b4(0x136)]&&_0xf099e3['uniqRank']>0x0)[_0x3db2b4(0x194)](function(_0x23362a,_0xe3409d){const _0x119a01=_0x3db2b4;return _0x23362a[_0x119a01(0x136)]-_0xe3409d['uniqRank'];});if(_0x4b1e8e[_0x3db2b4(0x18d)]>0x0){_0x122d49=_0x3db2b4(0x146);let _0x5accf0=_0x4b1e8e['map'](_0x478ce2=>{const _0x1d2206=_0x3db2b4;let _0x46e52f=_0x478ce2[_0x1d2206(0x133)];return _0x1d2206(0x121)==_0x478ce2['name']&&(_0x46e52f=_0x1d2206(0x161)),_0x1d2206(0x16c)==_0x478ce2[_0x1d2206(0x133)]&&(_0x46e52f=_0x1d2206(0x19f)),_0x1d2206(0x189)==_0x478ce2[_0x1d2206(0x133)]&&(_0x46e52f=_0x1d2206(0x13b)),_0x1d2206(0x19d)+camelCase(_0x46e52f);});_0x122d49=_0x122d49[_0x3db2b4(0x111)](/{{indexColumns}}/g,_0x5accf0['join'](','));}return _0x4eee8b=_0x4eee8b[_0x3db2b4(0x111)](/{{indexAnn}}/g,_0x122d49),_0x4eee8b;}[a0_0xd6bf0(0x128)](_0x2efebd,_0x1c17e7){const _0x5d81bf=a0_0xd6bf0;let _0x41ab5c=_0x5d81bf(0x19b)==_0x2efebd['dataProp']?serviceEntityHistJson:serviceEntityHistCopy,_0x655c20=_0x1c17e7['sort'](function(_0x9ff658,_0x5aedd2){const _0xaaa3f7=_0x5d81bf;return _0x9ff658['rank']-_0x5aedd2[_0xaaa3f7(0x160)];})[_0x5d81bf(0x129)](_0x2e9ec3=>this['columnToEntityColumn'](_0x2e9ec3));return _0x41ab5c=_0x41ab5c['replace'](/{{entityColumns}}/g,_0x655c20[_0x5d81bf(0x10b)]('\x0a')),_0x41ab5c;}[a0_0xd6bf0(0x166)](_0x584304){const _0x58e55a=a0_0xd6bf0;if('id'==_0x584304['name'])return'';if('domain_id'==_0x584304[_0x58e55a(0x133)])return'';if('created_at'==_0x584304[_0x58e55a(0x133)])return'';if(_0x58e55a(0x15f)==_0x584304['name'])return'';if(_0x58e55a(0x16c)==_0x584304[_0x58e55a(0x133)])return'';if('updater_id'==_0x584304['name'])return'';let _0x5c6011=_0x584304[_0x58e55a(0x17b)];'double'==_0x584304[_0x58e55a(0x17b)]&&(_0x5c6011=_0x58e55a(0x12d)),_0x58e55a(0x132)==_0x584304[_0x58e55a(0x17b)]&&(_0x5c6011=_0x58e55a(0x159)),_0x58e55a(0x18c)==_0x584304['colType']&&(_0x5c6011='character\x20varying'),_0x58e55a(0x18a)==_0x584304[_0x58e55a(0x17b)]&&(_0x5c6011=_0x58e55a(0x125));let _0x1dd776='';'string'==_0x584304['colType']&&(_0x1dd776=_0x584304['colSize']);let _0x5a12e3=this[_0x58e55a(0x11e)](_0x584304),_0x38a468=this[_0x58e55a(0x171)](_0x584304),_0x2e277a=camelCase(_0x584304[_0x58e55a(0x133)]);return'\x20\x20'+(_0x58e55a(0x14b)+_0x584304[_0x58e55a(0x133)]+_0x58e55a(0x157)+_0x5c6011+_0x58e55a(0x123)+_0x584304[_0x58e55a(0x153)]+'\x20'+(0x0==_0x1dd776[_0x58e55a(0x18d)]?'':_0x58e55a(0x145)+_0x1dd776)+_0x58e55a(0x11f))+'\x0a\x20\x20'+(_0x58e55a(0x118)+(0x0==_0x5a12e3[_0x58e55a(0x18d)]?'':_0x58e55a(0x148)+_0x5a12e3+',')+_0x58e55a(0x130)+_0x584304[_0x58e55a(0x153)]+_0x58e55a(0x11f))+_0x58e55a(0x139)+(''+_0x2e277a+(_0x584304[_0x58e55a(0x153)]?'?':'')+':\x20'+_0x38a468)+'\x0a';}['getFieldType'](_0x1e3ad3){const _0x41bb80=a0_0xd6bf0;let _0xd7e38b='';return _0x41bb80(0x165)==_0x1e3ad3['colType']&&(_0xd7e38b=_0x41bb80(0x195)),_0x41bb80(0x142)==_0x1e3ad3['colType']&&(_0xd7e38b='Float'),'long'==_0x1e3ad3[_0x41bb80(0x17b)]&&(_0xd7e38b='Int'),'integer'==_0x1e3ad3[_0x41bb80(0x17b)]&&(_0xd7e38b=_0x41bb80(0x17c)),_0xd7e38b;}['getColTxtType'](_0x8655b7){const _0x65f9c0=a0_0xd6bf0;let _0x381bd5=_0x8655b7[_0x65f9c0(0x17b)];return _0x65f9c0(0x112)==_0x8655b7[_0x65f9c0(0x17b)]&&(_0x381bd5='number'),_0x65f9c0(0x165)==_0x8655b7[_0x65f9c0(0x17b)]&&(_0x381bd5=_0x65f9c0(0x141)),'float'==_0x8655b7[_0x65f9c0(0x17b)]&&(_0x381bd5=_0x65f9c0(0x141)),_0x65f9c0(0x12a)==_0x8655b7[_0x65f9c0(0x17b)]&&(_0x381bd5=_0x65f9c0(0x141)),'long'==_0x8655b7['colType']&&(_0x381bd5='number'),_0x65f9c0(0x18a)==_0x8655b7[_0x65f9c0(0x17b)]&&(_0x381bd5='Date'),_0x65f9c0(0x149)==_0x8655b7[_0x65f9c0(0x17b)]&&(_0x381bd5=_0x65f9c0(0x180)),'text'==_0x8655b7[_0x65f9c0(0x17b)]&&(_0x381bd5='string'),_0x381bd5;}async['writeFile'](_0x16a5b2,_0x3d0690,_0x1b75fd){const _0x307850=a0_0xd6bf0;await fs['writeFileSync'](_0x16a5b2,this[_0x307850(0x151)](_0x3d0690,_0x1b75fd),'utf8');}[a0_0xd6bf0(0x151)](_0x74c8b4,_0x501b7f){const _0x34426d=a0_0xd6bf0;return _0x74c8b4[_0x34426d(0x111)](/{{pascalCase name}}/g,_0x501b7f['pascalCaseName'])['replace'](/{{camelCase name}}/g,_0x501b7f[_0x34426d(0x162)])[_0x34426d(0x111)](/{{snakeCase name}}/g,_0x501b7f[_0x34426d(0x181)])[_0x34426d(0x111)](/{{pluralPascalCase name}}/g,_0x501b7f[_0x34426d(0x150)])['replace'](/{{pluralCamelCase name}}/g,_0x501b7f['pluralCamelCaseName'])[_0x34426d(0x111)](/{{tableName}}/g,_0x501b7f[_0x34426d(0x178)])[_0x34426d(0x111)](/{{name}}/g,_0x501b7f['name']);}async[a0_0xd6bf0(0x173)](_0x157c00,_0x14ee31,_0x206db9){const _0x193c77=a0_0xd6bf0;let _0x544eb0=_0x157c00+_0x193c77(0x184);await this[_0x193c77(0x14a)](_0x544eb0),_0x544eb0=_0x544eb0+'/'+_0x14ee31,await this[_0x193c77(0x14a)](_0x544eb0),_0x544eb0+=_0x193c77(0x17e),await this[_0x193c77(0x14a)](_0x544eb0),_0x544eb0+=_0x193c77(0x193),await this['createDir'](_0x544eb0),_0x544eb0=_0x544eb0+'/'+_0x206db9,await this[_0x193c77(0x14a)](_0x544eb0);}[a0_0xd6bf0(0x196)](){const _0x51cfc0=a0_0xd6bf0;let _0x42c78e=process[_0x51cfc0(0x188)]['PWD'][_0x51cfc0(0x16a)]('/'),_0x4c818b=[];for(let _0x496ddb=0x0;_0x496ddb<_0x42c78e[_0x51cfc0(0x18d)]&&'packages'!=_0x42c78e[_0x496ddb];_0x496ddb++)_0x4c818b[_0x51cfc0(0x16b)](_0x42c78e[_0x496ddb]);return _0x4c818b[_0x51cfc0(0x10b)]('/');}async['createDir'](_0x574e1d){const _0xc130a4=a0_0xd6bf0;0x0==await this['existsPath'](_0x574e1d)&&fs[_0xc130a4(0x12f)](_0x574e1d);}async[a0_0xd6bf0(0x191)](_0x170172){const _0x5809d0=a0_0xd6bf0;return await fs[_0x5809d0(0x126)](_0x170172);}};tslib_1['__decorate']([(0x0,type_graphql_1[a0_0xd6bf0(0x116)])(_0x1d5536=>Boolean,{'description':'Operato\x20Tool\x20Create\x20Service'}),tslib_1['__param'](0x0,(0x0,type_graphql_1[a0_0xd6bf0(0x152)])('id')),tslib_1[a0_0xd6bf0(0x14f)](0x1,(0x0,type_graphql_1[a0_0xd6bf0(0x174)])()),tslib_1[a0_0xd6bf0(0x13c)](a0_0xd6bf0(0x15a),Function),tslib_1[a0_0xd6bf0(0x13c)](a0_0xd6bf0(0x144),[String,Object]),tslib_1[a0_0xd6bf0(0x13c)](a0_0xd6bf0(0x164),Promise)],OperatoToolCreateService[a0_0xd6bf0(0x17a)],'toolCreateService',null),OperatoToolCreateService=tslib_1[a0_0xd6bf0(0x199)]([(0x0,type_graphql_1[a0_0xd6bf0(0x169)])()],OperatoToolCreateService),exports['OperatoToolCreateService']=OperatoToolCreateService;function a0_0x589e(_0x275bd1,_0x2ac681){const _0x2aa942=a0_0x2aa9();return a0_0x589e=function(_0x589e8b,_0x101ff9){_0x589e8b=_0x589e8b-0x10a;let _0x46cebb=_0x2aa942[_0x589e8b];return _0x46cebb;},a0_0x589e(_0x275bd1,_0x2ac681);}function a0_0x2aa9(){const _0x4115bf=['__esModule','/*\x20ENTITIES\x20*/\x0a\x09...','index.ts','env','updater_id','datetime','createTypeText','string','length','4612044iBWUak','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','createNoHistoryServiceFiels','existsPath','\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','/service','sort','Float','getProjectRootPath','/server/service/','EntityColumn','__decorate','469035DGDNvV','JSON','Entity','{{camelCase\x20name}}.','created_at','creator','import\x20{\x20entities\x20as\x20','join','\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','.ts','/index.ts','\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','4707660HBCzUr','replace','decimal','/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...','includes','Entities,','Query','323452UjUNrA','@Field(','Resolvers,','Resolvers\x20}\x20from\x20\x27./','tslib','318465sukcnt','-type.ts','getFieldType','\x20})','-history-query.ts','domain_id','\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','\x27,\x20nullable:\x20','pluralize','timestamp\x20without\x20time\x20zone','existsSync','44442Ecuzgw','createHistoryEntityText','map','integer','880ZiBITm','find','double\x20precision','dataProp','mkdirSync','\x20{\x20nullable:\x20','lodash','long','name','indexOf','/event-subscriber.ts','uniqRank','EntitySubscribers,','\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','\x0a\x20\x20','2ZgLmvR','updater','__metadata','\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','-mutation.ts','toolCreateService','createEntityText','number','float','COPY','design:paramtypes',',length:','@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','type\x20=>','date','createDir','@Column({name:\x27','Entities,\x20resolvers\x20as\x20','findOne','\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','__param','pluralPascalCaseName','replaceNamesMap','Arg','nullable','EntitySubscribers\x20}\x20from\x20\x27./','export\x20*\x20from\x20\x27./','6223910GOikns','\x27,\x20type:\x20\x27','createServiceFiles','bigint','design:type','utf8','writeFile','-history-type.ts','OperatoToolCreateService','updated_at','rank','domain','camelCaseName','pascalCaseName','design:returntype','double','columnToEntityColumn','3ApokdK','...','Resolver','split','push','creator_id','state','-history\x27','\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','\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','getColTxtType','readFileSync','createServicePath','Ctx','-query.ts','filter','\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','tableName','createHistoryServiceFiles','prototype','colType','Int','@things-factory/shell','/server','type-graphql','Date','snakeCaseName','Resolvers,\x20subscribers\x20as\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','/packages'];a0_0x2aa9=function(){return _0x4115bf;};return a0_0x2aa9();}const allIndex=a0_0xd6bf0(0x13d),serviceIndex=a0_0xd6bf0(0x138),serviceHistoryIndex=a0_0xd6bf0(0x170),serviceQuery=a0_0xd6bf0(0x192),serviceHistoryQuery=a0_0xd6bf0(0x16f),serviceMutation='\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',sereviceType=a0_0xd6bf0(0x10f),sereviceHistoryType=a0_0xd6bf0(0x177),serviceEntity=a0_0xd6bf0(0x10c),serviceEntityHistCopy=a0_0xd6bf0(0x14e),serviceEntityHistJson=a0_0xd6bf0(0x183),serviceEntitySubscriber=a0_0xd6bf0(0x122);
1
+ 'use strict';function a0_0x9b62(){const _0x3d0d66=['length','double','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','createServiceFiles','/server/service/','4oSxiFL','1259106mWREtf','Int','updater','184012mJMIDY','Ctx','pluralPascalCaseName','-history\x27','/server','push','390717yInNJf','.ts','@things-factory/resource-base','Entity','decimal','datetime','createHistoryServiceFiles','mkdirSync','snakeCaseName','createNoHistoryServiceFiels','-history-type.ts','includes','Resolvers,\x20subscribers\x20as\x20','rank','timestamp\x20without\x20time\x20zone','long','198666xzanPG','EntitySubscribers,','\x0a\x20\x20','10qTszMQ','findOne','OperatoToolCreateService','EntityColumn','@Field(','getColTxtType','getRepository','createServicePath','Operato\x20Tool\x20Create\x20Service','nullable','-history.ts','created_at','__metadata','lodash','__param','replaceNamesMap','existsSync','Resolvers,','join','existsPath','creator_id','\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','design:paramtypes','@things-factory/shell','columnToEntityColumn',',length:','createHistoryEntityText','packages','\x20})','Float','createTypeText','type-graphql','Date','\x27,\x20nullable:\x20','writeFile','dataProp','\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','state','getFieldType','-mutation.ts','-type.ts','readFileSync','getProjectRootPath','-history-query.ts','domain','map','replace','export\x20*\x20from\x20\x27./','env','{{camelCase\x20name}}.','integer','\x20{\x20nullable:\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','\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','text','EntitySubscribers\x20}\x20from\x20\x27./','colType','pascalCaseName','/*\x20ENTITIES\x20*/\x0a\x09...','\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','\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','split','toolCreateService','uniqRank','5752itVUbf','__decorate','@Column({name:\x27','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','bigint','double\x20precision','Resolvers\x20}\x20from\x20\x27./','-query.ts','tableName','\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','number','COPY','Entities,\x20resolvers\x20as\x20','sort','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','name','prototype','pluralCamelCaseName','design:returntype','Query','...','createDir','/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...','JSON','domain_id','PWD','writeFileSync','3664030ssjhnp','updated_at','updater_id','utf8','Arg','type\x20=>','\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201','indexOf','/service','index.ts','2653OHDoNC','pluralize','1215009ahObUR','float','createEntityText','Entities,'];a0_0x9b62=function(){return _0x3d0d66;};return a0_0x9b62();}const a0_0x2aa544=a0_0x1e0e;function a0_0x1e0e(_0x153649,_0x2c9c36){const _0x9b62a6=a0_0x9b62();return a0_0x1e0e=function(_0x1e0e8d,_0x24c47c){_0x1e0e8d=_0x1e0e8d-0x1ef;let _0x1e15f1=_0x9b62a6[_0x1e0e8d];return _0x1e15f1;},a0_0x1e0e(_0x153649,_0x2c9c36);}(function(_0x2db941,_0xf67545){const _0x30b0c9=a0_0x1e0e,_0x5da6b7=_0x2db941();while(!![]){try{const _0x2a652d=parseInt(_0x30b0c9(0x26c))/0x1+parseInt(_0x30b0c9(0x256))/0x2+parseInt(_0x30b0c9(0x25c))/0x3*(parseInt(_0x30b0c9(0x252))/0x4)+parseInt(_0x30b0c9(0x26f))/0x5*(-parseInt(_0x30b0c9(0x253))/0x6)+parseInt(_0x30b0c9(0x247))/0x7*(-parseInt(_0x30b0c9(0x222))/0x8)+parseInt(_0x30b0c9(0x249))/0x9+parseInt(_0x30b0c9(0x23d))/0xa;if(_0x2a652d===_0xf67545)break;else _0x5da6b7['push'](_0x5da6b7['shift']());}catch(_0x383c3f){_0x5da6b7['push'](_0x5da6b7['shift']());}}}(a0_0x9b62,0x382e0));Object['defineProperty'](exports,'__esModule',{'value':!0x0}),exports[a0_0x2aa544(0x271)]=void 0x0;const tslib_1=require('tslib'),type_graphql_1=require(a0_0x2aa544(0x201)),shell_1=require(a0_0x2aa544(0x1f9)),resource_base_1=require(a0_0x2aa544(0x25e)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x2aa544(0x1ef)),{plural:plural}=require(a0_0x2aa544(0x248)),fs=require('fs');let OperatoToolCreateService=class{async[a0_0x2aa544(0x220)](_0x2fb3e1,_0xf5f2b7){const _0x16a950=a0_0x2aa544,{domain:_0x58c050}=_0xf5f2b7[_0x16a950(0x207)],_0xc61881=await(0x0,shell_1['getRepository'])(resource_base_1[_0x16a950(0x25f)])[_0x16a950(0x270)]({'where':{'id':_0x2fb3e1}}),_0x4faee9=await(0x0,shell_1[_0x16a950(0x275)])(resource_base_1[_0x16a950(0x272)])['find']({'where':{'domain':{'id':_0x58c050['id']},'entity':{'id':_0xc61881['id']}}});let {name:_0x3c84f5='',bundle:_0x183bbb=''}=_0xc61881||{},_0x36da92=this[_0x16a950(0x20c)](),_0x3b330f=kebabCase(_0x3c84f5);return await this[_0x16a950(0x276)](_0x36da92,_0x183bbb,_0x3b330f),await this['createServiceFiles'](_0x36da92,_0x183bbb,_0x3c84f5,_0x3b330f,_0xc61881,_0x4faee9),!0x0;}async[a0_0x2aa544(0x250)](_0x1e8f02,_0x4e4625,_0x40b243,_0x13200b,_0x383613,_0x133602){const _0x14c19f=a0_0x2aa544;let _0x57a0eb={'name':_0x13200b,'tableName':_0x383613[_0x14c19f(0x22a)],'pascalCaseName':startCase(camelCase(_0x40b243))[_0x14c19f(0x210)](/ /g,''),'camelCaseName':camelCase(_0x40b243),'snakeCaseName':snakeCase(_0x40b243),'pluralPascalCaseName':startCase(camelCase(plural(_0x40b243)))[_0x14c19f(0x210)](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x40b243))},_0x4583a8=_0x1e8f02+'/packages/'+_0x4e4625+_0x14c19f(0x251);[_0x14c19f(0x239),_0x14c19f(0x22d)]['includes'](_0x383613['dataProp'])?await this[_0x14c19f(0x262)](_0x4583a8,_0x13200b,_0x383613,_0x133602,_0x57a0eb):await this[_0x14c19f(0x265)](_0x4583a8,_0x13200b,_0x383613,_0x133602,_0x57a0eb);}async[a0_0x2aa544(0x262)](_0x4459a3,_0x105fd0,_0x599cff,_0x3b7db3,_0x59dd00){const _0x153714=a0_0x2aa544;await this[_0x153714(0x204)](_0x4459a3+(_0x105fd0+'/index.ts'),serviceHistoryIndex,_0x59dd00);let _0x2e6220=this[_0x153714(0x24b)](_0x599cff,_0x3b7db3);await this['writeFile'](_0x4459a3+(_0x105fd0+'/'+_0x105fd0+_0x153714(0x25d)),_0x2e6220,_0x59dd00),await this[_0x153714(0x204)](_0x4459a3+(_0x105fd0+'/'+_0x105fd0+_0x153714(0x229)),serviceQuery,_0x59dd00),await this[_0x153714(0x204)](_0x4459a3+(_0x105fd0+'/'+_0x105fd0+_0x153714(0x209)),serviceMutation,_0x59dd00);let _0x1ef4b4=this['createTypeText'](_0x3b7db3);await this[_0x153714(0x204)](_0x4459a3+(_0x105fd0+'/'+_0x105fd0+_0x153714(0x20a)),_0x1ef4b4,_0x59dd00);let _0x4961ae=this[_0x153714(0x1fc)](_0x599cff,_0x3b7db3);await this[_0x153714(0x204)](_0x4459a3+(_0x105fd0+'/'+_0x105fd0+_0x153714(0x279)),_0x4961ae,_0x59dd00);let _0x3f620b='';_0x153714(0x239)==_0x599cff[_0x153714(0x205)]?(_0x3f620b=_0x153714(0x217),await this[_0x153714(0x204)](_0x4459a3+(_0x105fd0+'/event-subscriber.ts'),serviceEntitySubscriber,_0x59dd00)):_0x3f620b='';let _0x577b66=serviceEntitySubscriber[_0x153714(0x210)](/{{entityToJson}}/g,_0x3f620b);await this[_0x153714(0x204)](_0x4459a3+(_0x105fd0+'/event-subscriber.ts'),_0x577b66,_0x59dd00),await this[_0x153714(0x204)](_0x4459a3+(_0x105fd0+'/'+_0x105fd0+_0x153714(0x20d)),serviceHistoryQuery,_0x59dd00),await this[_0x153714(0x204)](_0x4459a3+(_0x105fd0+'/'+_0x105fd0+_0x153714(0x266)),sereviceHistoryType,_0x59dd00);let _0x472cbc=_0x4459a3+_0x153714(0x246);0x0==await this[_0x153714(0x1f5)](_0x472cbc)&&await this[_0x153714(0x204)](_0x472cbc,allIndex,_0x59dd00);let _0xc8bce6=await fs['readFileSync'](_0x472cbc,_0x153714(0x240));_0xc8bce6['indexOf']('export\x20*\x20from\x20\x27./'+_0x59dd00['name']+'/'+_0x59dd00[_0x153714(0x231)]+_0x153714(0x259))<0x0&&(_0xc8bce6=_0xc8bce6[_0x153714(0x210)](/\/\* EXPORT ENTITY TYPES \*\//,_0x153714(0x230)+_0x59dd00['name']+'/'+_0x59dd00[_0x153714(0x231)]+_0x153714(0x259))),_0xc8bce6[_0x153714(0x244)](_0x153714(0x211)+_0x59dd00[_0x153714(0x231)]+'/'+_0x59dd00['name']+'\x27')<0x0&&(_0xc8bce6=_0xc8bce6[_0x153714(0x210)](/\/\* EXPORT ENTITY TYPES \*\//,_0x153714(0x230)+_0x59dd00['name']+'/'+_0x59dd00[_0x153714(0x231)]+'\x27')),_0xc8bce6[_0x153714(0x244)]('import\x20{\x20entities\x20as\x20'+_0x59dd00[_0x153714(0x21b)]+_0x153714(0x22e)+_0x59dd00['pascalCaseName']+'Resolvers,\x20subscribers\x20as\x20'+_0x59dd00['pascalCaseName']+_0x153714(0x219)+_0x59dd00['name']+'\x27')<0x0&&(_0xc8bce6=_0xc8bce6[_0x153714(0x210)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x153714(0x24f)+_0x59dd00[_0x153714(0x21b)]+'Entities,\x20resolvers\x20as\x20'+_0x59dd00[_0x153714(0x21b)]+_0x153714(0x268)+_0x59dd00[_0x153714(0x21b)]+_0x153714(0x219)+_0x59dd00[_0x153714(0x231)]+'\x27')),_0xc8bce6[_0x153714(0x244)](_0x153714(0x236)+_0x59dd00[_0x153714(0x21b)]+_0x153714(0x24c))<0x0&&(_0xc8bce6=_0xc8bce6[_0x153714(0x210)](/\/\* ENTITIES \*\//,_0x153714(0x21c)+_0x59dd00[_0x153714(0x21b)]+'Entities,')),_0xc8bce6['indexOf'](_0x153714(0x236)+_0x59dd00[_0x153714(0x21b)]+_0x153714(0x1f3))<0x0&&(_0xc8bce6=_0xc8bce6[_0x153714(0x210)](/\/\* RESOLVER CLASSES \*\//,'/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...'+_0x59dd00['pascalCaseName']+'Resolvers,')),_0xc8bce6[_0x153714(0x244)](_0x153714(0x236)+_0x59dd00['pascalCaseName']+_0x153714(0x26d))<0x0&&(_0xc8bce6=_0xc8bce6[_0x153714(0x210)](/\/\* SUBSCRIBERS \*\//,_0x153714(0x238)+_0x59dd00[_0x153714(0x21b)]+_0x153714(0x26d))),await this[_0x153714(0x204)](_0x472cbc,_0xc8bce6,_0x59dd00);}async[a0_0x2aa544(0x265)](_0x4ac0c4,_0x5f3eb4,_0x430e16,_0x2c5e9c,_0x22c66b){const _0x1ae4e2=a0_0x2aa544;await this['writeFile'](_0x4ac0c4+(_0x5f3eb4+'/index.ts'),serviceIndex,_0x22c66b),await this[_0x1ae4e2(0x204)](_0x4ac0c4+(_0x5f3eb4+'/'+_0x5f3eb4+_0x1ae4e2(0x229)),serviceQuery,_0x22c66b),await this[_0x1ae4e2(0x204)](_0x4ac0c4+(_0x5f3eb4+'/'+_0x5f3eb4+'-mutation.ts'),serviceMutation,_0x22c66b);let _0x211ea7=this[_0x1ae4e2(0x24b)](_0x430e16,_0x2c5e9c);await this[_0x1ae4e2(0x204)](_0x4ac0c4+(_0x5f3eb4+'/'+_0x5f3eb4+'.ts'),_0x211ea7,_0x22c66b);let _0x3fc01e=this[_0x1ae4e2(0x200)](_0x2c5e9c);await this[_0x1ae4e2(0x204)](_0x4ac0c4+(_0x5f3eb4+'/'+_0x5f3eb4+_0x1ae4e2(0x20a)),_0x3fc01e,_0x22c66b);let _0x4e9d21=_0x4ac0c4+_0x1ae4e2(0x246);0x0==await this['existsPath'](_0x4e9d21)&&await this['writeFile'](_0x4e9d21,allIndex,_0x22c66b);let _0x2b3820=await fs[_0x1ae4e2(0x20b)](_0x4e9d21,_0x1ae4e2(0x240));_0x2b3820[_0x1ae4e2(0x244)](_0x1ae4e2(0x211)+_0x22c66b[_0x1ae4e2(0x231)]+'/'+_0x22c66b[_0x1ae4e2(0x231)]+'\x27')<0x0&&(_0x2b3820=_0x2b3820[_0x1ae4e2(0x210)](/\/\* EXPORT ENTITY TYPES \*\//,_0x1ae4e2(0x230)+_0x22c66b[_0x1ae4e2(0x231)]+'/'+_0x22c66b[_0x1ae4e2(0x231)]+'\x27')),_0x2b3820[_0x1ae4e2(0x244)]('import\x20{\x20entities\x20as\x20'+_0x22c66b['pascalCaseName']+_0x1ae4e2(0x22e)+_0x22c66b[_0x1ae4e2(0x21b)]+'Resolvers\x20}\x20from\x20\x27./'+_0x22c66b[_0x1ae4e2(0x231)]+'\x27')<0x0&&(_0x2b3820=_0x2b3820[_0x1ae4e2(0x210)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x1ae4e2(0x24f)+_0x22c66b[_0x1ae4e2(0x21b)]+_0x1ae4e2(0x22e)+_0x22c66b[_0x1ae4e2(0x21b)]+_0x1ae4e2(0x228)+_0x22c66b[_0x1ae4e2(0x231)]+'\x27')),_0x2b3820[_0x1ae4e2(0x244)]('...'+_0x22c66b[_0x1ae4e2(0x21b)]+_0x1ae4e2(0x24c))<0x0&&(_0x2b3820=_0x2b3820['replace'](/\/\* ENTITIES \*\//,_0x1ae4e2(0x21c)+_0x22c66b[_0x1ae4e2(0x21b)]+_0x1ae4e2(0x24c))),_0x2b3820[_0x1ae4e2(0x244)](_0x1ae4e2(0x236)+_0x22c66b[_0x1ae4e2(0x21b)]+_0x1ae4e2(0x1f3))<0x0&&(_0x2b3820=_0x2b3820[_0x1ae4e2(0x210)](/\/\* RESOLVER CLASSES \*\//,_0x1ae4e2(0x225)+_0x22c66b[_0x1ae4e2(0x21b)]+_0x1ae4e2(0x1f3))),await this[_0x1ae4e2(0x204)](_0x4e9d21,_0x2b3820,_0x22c66b);}[a0_0x2aa544(0x200)](_0x522331){const _0x4db1da=a0_0x2aa544;let _0x51155a=sereviceType,_0x13b96f=_0x522331['map'](_0x23a485=>{const _0x4f649f=a0_0x1e0e;if('id'==_0x23a485[_0x4f649f(0x231)])return'';if('domain_id'==_0x23a485[_0x4f649f(0x231)])return'';if(_0x4f649f(0x27a)==_0x23a485[_0x4f649f(0x231)])return'';if(_0x4f649f(0x23e)==_0x23a485[_0x4f649f(0x231)])return'';if('creator_id'==_0x23a485[_0x4f649f(0x231)])return'';if('updater_id'==_0x23a485[_0x4f649f(0x231)])return'';let _0x273de1=this[_0x4f649f(0x208)](_0x23a485),_0xcd948=this['getColTxtType'](_0x23a485),_0x111c28=camelCase(_0x23a485[_0x4f649f(0x231)]);return'\x20\x20'+(_0x4f649f(0x273)+(0x0==_0x273de1[_0x4f649f(0x24d)]?'':_0x4f649f(0x242)+_0x273de1+',')+_0x4f649f(0x215)+_0x23a485[_0x4f649f(0x278)]+_0x4f649f(0x1fe))+_0x4f649f(0x26e)+(''+_0x111c28+(_0x23a485[_0x4f649f(0x278)]?'?':'')+':\x20'+_0xcd948)+'\x0a';});_0x51155a=_0x51155a[_0x4db1da(0x210)](/{{newTypeColumns}}/g,_0x13b96f[_0x4db1da(0x1f4)]('\x0a'));let _0x31fa5b=_0x522331['map'](_0x272d81=>{const _0x4aa2f5=_0x4db1da;if('id'==_0x272d81[_0x4aa2f5(0x231)])return'';if(_0x4aa2f5(0x23a)==_0x272d81[_0x4aa2f5(0x231)])return'';if(_0x4aa2f5(0x27a)==_0x272d81[_0x4aa2f5(0x231)])return'';if(_0x4aa2f5(0x23e)==_0x272d81[_0x4aa2f5(0x231)])return'';if(_0x4aa2f5(0x1f6)==_0x272d81[_0x4aa2f5(0x231)])return'';if(_0x4aa2f5(0x23f)==_0x272d81[_0x4aa2f5(0x231)])return'';let _0x2a3f17=this[_0x4aa2f5(0x208)](_0x272d81),_0x4b4304=this[_0x4aa2f5(0x274)](_0x272d81);_0x272d81['nullable']=!0x0;let _0x55e64f=camelCase(_0x272d81[_0x4aa2f5(0x231)]);return'\x20\x20'+(_0x4aa2f5(0x273)+(0x0==_0x2a3f17[_0x4aa2f5(0x24d)]?'':_0x4aa2f5(0x242)+_0x2a3f17+',')+'\x20{\x20nullable:\x20'+_0x272d81[_0x4aa2f5(0x278)]+_0x4aa2f5(0x1fe))+_0x4aa2f5(0x26e)+(''+_0x55e64f+(_0x272d81[_0x4aa2f5(0x278)]?'?':'')+':\x20'+_0x4b4304)+'\x0a';});return _0x51155a=_0x51155a['replace'](/{{patchTypeColumns}}/g,_0x31fa5b[_0x4db1da(0x1f4)]('\x0a')),_0x51155a;}[a0_0x2aa544(0x24b)](_0x43f95a,_0x3cabc4){const _0x22960d=a0_0x2aa544;let _0xfd7dbb=serviceEntity,_0x260572=_0x3cabc4[_0x22960d(0x22f)](function(_0x344164,_0x2f946c){const _0x198758=_0x22960d;return _0x344164[_0x198758(0x269)]-_0x2f946c[_0x198758(0x269)];})['map'](_0x410093=>this[_0x22960d(0x1fa)](_0x410093));[_0x22960d(0x22d),_0x22960d(0x239)][_0x22960d(0x267)](_0x43f95a[_0x22960d(0x205)])&&_0x260572[_0x22960d(0x25b)](_0x22960d(0x243)),_0xfd7dbb=_0xfd7dbb['replace'](/{{entityColumns}}/g,_0x260572[_0x22960d(0x1f4)]('\x0a'));let _0x4cc39d='',_0x31a01c=_0x3cabc4['filter'](_0x3f7793=>_0x3f7793[_0x22960d(0x221)]&&_0x3f7793[_0x22960d(0x221)]>0x0)[_0x22960d(0x22f)](function(_0x240870,_0x1b4db9){const _0x18bbea=_0x22960d;return _0x240870[_0x18bbea(0x221)]-_0x1b4db9['uniqRank'];});if(_0x31a01c[_0x22960d(0x24d)]>0x0){_0x4cc39d='@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})';let _0x162d88=_0x31a01c[_0x22960d(0x20f)](_0x45b49b=>{const _0x5b1519=_0x22960d;let _0x5c1fc7=_0x45b49b['name'];return _0x5b1519(0x23a)==_0x45b49b['name']&&(_0x5c1fc7=_0x5b1519(0x20e)),_0x5b1519(0x1f6)==_0x45b49b['name']&&(_0x5c1fc7='creator'),_0x5b1519(0x23f)==_0x45b49b[_0x5b1519(0x231)]&&(_0x5c1fc7=_0x5b1519(0x255)),_0x5b1519(0x213)+camelCase(_0x5c1fc7);});_0x4cc39d=_0x4cc39d[_0x22960d(0x210)](/{{indexColumns}}/g,_0x162d88[_0x22960d(0x1f4)](','));}return _0xfd7dbb=_0xfd7dbb['replace'](/{{indexAnn}}/g,_0x4cc39d),_0xfd7dbb;}[a0_0x2aa544(0x1fc)](_0x1e7c91,_0x28df40){const _0x2410ee=a0_0x2aa544;let _0x5d3b73=_0x2410ee(0x239)==_0x1e7c91['dataProp']?serviceEntityHistJson:serviceEntityHistCopy,_0x6931d5=_0x28df40[_0x2410ee(0x22f)](function(_0x2b6e6b,_0x110c87){const _0x4c1b62=_0x2410ee;return _0x2b6e6b['rank']-_0x110c87[_0x4c1b62(0x269)];})[_0x2410ee(0x20f)](_0x491022=>this[_0x2410ee(0x1fa)](_0x491022));return _0x5d3b73=_0x5d3b73[_0x2410ee(0x210)](/{{entityColumns}}/g,_0x6931d5[_0x2410ee(0x1f4)]('\x0a')),_0x5d3b73;}[a0_0x2aa544(0x1fa)](_0x4a1be6){const _0x5509c5=a0_0x2aa544;if('id'==_0x4a1be6['name'])return'';if(_0x5509c5(0x23a)==_0x4a1be6[_0x5509c5(0x231)])return'';if(_0x5509c5(0x27a)==_0x4a1be6[_0x5509c5(0x231)])return'';if(_0x5509c5(0x23e)==_0x4a1be6[_0x5509c5(0x231)])return'';if(_0x5509c5(0x1f6)==_0x4a1be6[_0x5509c5(0x231)])return'';if(_0x5509c5(0x23f)==_0x4a1be6[_0x5509c5(0x231)])return'';let _0xe1856f=_0x4a1be6[_0x5509c5(0x21a)];_0x5509c5(0x24e)==_0x4a1be6[_0x5509c5(0x21a)]&&(_0xe1856f=_0x5509c5(0x227)),_0x5509c5(0x26b)==_0x4a1be6[_0x5509c5(0x21a)]&&(_0xe1856f=_0x5509c5(0x226)),'string'==_0x4a1be6[_0x5509c5(0x21a)]&&(_0xe1856f='character\x20varying'),_0x5509c5(0x261)==_0x4a1be6[_0x5509c5(0x21a)]&&(_0xe1856f=_0x5509c5(0x26a));let _0x4b6d6d='';'string'==_0x4a1be6[_0x5509c5(0x21a)]&&(_0x4b6d6d=_0x4a1be6['colSize']);let _0x26060f=this[_0x5509c5(0x208)](_0x4a1be6),_0x22a8e2=this['getColTxtType'](_0x4a1be6),_0x167f41=camelCase(_0x4a1be6[_0x5509c5(0x231)]);return'\x20\x20'+(_0x5509c5(0x224)+_0x4a1be6[_0x5509c5(0x231)]+'\x27,\x20type:\x20\x27'+_0xe1856f+_0x5509c5(0x203)+_0x4a1be6[_0x5509c5(0x278)]+'\x20'+(0x0==_0x4b6d6d[_0x5509c5(0x24d)]?'':_0x5509c5(0x1fb)+_0x4b6d6d)+_0x5509c5(0x1fe))+_0x5509c5(0x26e)+(_0x5509c5(0x273)+(0x0==_0x26060f[_0x5509c5(0x24d)]?'':_0x5509c5(0x242)+_0x26060f+',')+_0x5509c5(0x215)+_0x4a1be6[_0x5509c5(0x278)]+_0x5509c5(0x1fe))+_0x5509c5(0x26e)+(''+_0x167f41+(_0x4a1be6['nullable']?'?':'')+':\x20'+_0x22a8e2)+'\x0a';}[a0_0x2aa544(0x208)](_0x400286){const _0x3eacd7=a0_0x2aa544;let _0x21d578='';return'double'==_0x400286[_0x3eacd7(0x21a)]&&(_0x21d578='Float'),_0x3eacd7(0x24a)==_0x400286[_0x3eacd7(0x21a)]&&(_0x21d578=_0x3eacd7(0x1ff)),_0x3eacd7(0x26b)==_0x400286[_0x3eacd7(0x21a)]&&(_0x21d578=_0x3eacd7(0x254)),'integer'==_0x400286[_0x3eacd7(0x21a)]&&(_0x21d578=_0x3eacd7(0x254)),_0x21d578;}['getColTxtType'](_0x1d047f){const _0x1c4d9a=a0_0x2aa544;let _0x19e36d=_0x1d047f[_0x1c4d9a(0x21a)];return _0x1c4d9a(0x260)==_0x1d047f[_0x1c4d9a(0x21a)]&&(_0x19e36d=_0x1c4d9a(0x22c)),_0x1c4d9a(0x24e)==_0x1d047f['colType']&&(_0x19e36d=_0x1c4d9a(0x22c)),_0x1c4d9a(0x24a)==_0x1d047f[_0x1c4d9a(0x21a)]&&(_0x19e36d=_0x1c4d9a(0x22c)),_0x1c4d9a(0x214)==_0x1d047f[_0x1c4d9a(0x21a)]&&(_0x19e36d=_0x1c4d9a(0x22c)),_0x1c4d9a(0x26b)==_0x1d047f['colType']&&(_0x19e36d=_0x1c4d9a(0x22c)),'datetime'==_0x1d047f[_0x1c4d9a(0x21a)]&&(_0x19e36d='Date'),'date'==_0x1d047f['colType']&&(_0x19e36d=_0x1c4d9a(0x202)),_0x1c4d9a(0x218)==_0x1d047f[_0x1c4d9a(0x21a)]&&(_0x19e36d='string'),_0x19e36d;}async[a0_0x2aa544(0x204)](_0x5236f6,_0x53389f,_0x415b06){const _0x4232ff=a0_0x2aa544;await fs[_0x4232ff(0x23c)](_0x5236f6,this['replaceNamesMap'](_0x53389f,_0x415b06),_0x4232ff(0x240));}[a0_0x2aa544(0x1f1)](_0x1337d4,_0x3ba899){const _0x348fc8=a0_0x2aa544;return _0x1337d4[_0x348fc8(0x210)](/{{pascalCase name}}/g,_0x3ba899[_0x348fc8(0x21b)])['replace'](/{{camelCase name}}/g,_0x3ba899['camelCaseName'])[_0x348fc8(0x210)](/{{snakeCase name}}/g,_0x3ba899[_0x348fc8(0x264)])[_0x348fc8(0x210)](/{{pluralPascalCase name}}/g,_0x3ba899[_0x348fc8(0x258)])['replace'](/{{pluralCamelCase name}}/g,_0x3ba899[_0x348fc8(0x233)])[_0x348fc8(0x210)](/{{tableName}}/g,_0x3ba899[_0x348fc8(0x22a)])[_0x348fc8(0x210)](/{{name}}/g,_0x3ba899[_0x348fc8(0x231)]);}async[a0_0x2aa544(0x276)](_0x216f47,_0x5611c5,_0x18a807){const _0x201112=a0_0x2aa544;let _0x1476c4=_0x216f47+'/packages';await this[_0x201112(0x237)](_0x1476c4),_0x1476c4=_0x1476c4+'/'+_0x5611c5,await this[_0x201112(0x237)](_0x1476c4),_0x1476c4+=_0x201112(0x25a),await this[_0x201112(0x237)](_0x1476c4),_0x1476c4+=_0x201112(0x245),await this[_0x201112(0x237)](_0x1476c4),_0x1476c4=_0x1476c4+'/'+_0x18a807,await this['createDir'](_0x1476c4);}[a0_0x2aa544(0x20c)](){const _0x158bd4=a0_0x2aa544;let _0x19549c=process[_0x158bd4(0x212)][_0x158bd4(0x23b)][_0x158bd4(0x21f)]('/'),_0xbe66f6=[];for(let _0x2fd6ae=0x0;_0x2fd6ae<_0x19549c[_0x158bd4(0x24d)]&&_0x158bd4(0x1fd)!=_0x19549c[_0x2fd6ae];_0x2fd6ae++)_0xbe66f6['push'](_0x19549c[_0x2fd6ae]);return _0xbe66f6[_0x158bd4(0x1f4)]('/');}async[a0_0x2aa544(0x237)](_0x1a08ca){const _0x5525b0=a0_0x2aa544;0x0==await this[_0x5525b0(0x1f5)](_0x1a08ca)&&fs[_0x5525b0(0x263)](_0x1a08ca);}async[a0_0x2aa544(0x1f5)](_0x5b7def){const _0x204f3e=a0_0x2aa544;return await fs[_0x204f3e(0x1f2)](_0x5b7def);}};tslib_1[a0_0x2aa544(0x223)]([(0x0,type_graphql_1[a0_0x2aa544(0x235)])(_0x51611a=>Boolean,{'description':a0_0x2aa544(0x277)}),tslib_1[a0_0x2aa544(0x1f0)](0x0,(0x0,type_graphql_1[a0_0x2aa544(0x241)])('id')),tslib_1[a0_0x2aa544(0x1f0)](0x1,(0x0,type_graphql_1[a0_0x2aa544(0x257)])()),tslib_1[a0_0x2aa544(0x27b)]('design:type',Function),tslib_1[a0_0x2aa544(0x27b)](a0_0x2aa544(0x1f8),[String,Object]),tslib_1['__metadata'](a0_0x2aa544(0x234),Promise)],OperatoToolCreateService[a0_0x2aa544(0x232)],a0_0x2aa544(0x220),null),OperatoToolCreateService=tslib_1[a0_0x2aa544(0x223)]([(0x0,type_graphql_1['Resolver'])()],OperatoToolCreateService),exports['OperatoToolCreateService']=OperatoToolCreateService;const allIndex='\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',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_0x2aa544(0x1f7),serviceQuery='\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',serviceHistoryQuery=a0_0x2aa544(0x216),serviceMutation=a0_0x2aa544(0x22b),sereviceType=a0_0x2aa544(0x21d),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='\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',serviceEntityHistCopy=a0_0x2aa544(0x206),serviceEntityHistJson='\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',serviceEntitySubscriber=a0_0x2aa544(0x21e);
@@ -1 +1 @@
1
- 'use strict';const a0_0x138282=a0_0x5e5b;function a0_0x5e5b(_0x54b9f5,_0x45d234){const _0x84ab8c=a0_0x84ab();return a0_0x5e5b=function(_0x5e5b6a,_0x3f7891){_0x5e5b6a=_0x5e5b6a-0x11c;let _0x546a10=_0x84ab8c[_0x5e5b6a];return _0x546a10;},a0_0x5e5b(_0x54b9f5,_0x45d234);}(function(_0x5f5170,_0x2a085d){const _0x3f7fbd=a0_0x5e5b,_0x56d921=_0x5f5170();while(!![]){try{const _0x4d767f=parseInt(_0x3f7fbd(0x121))/0x1*(parseInt(_0x3f7fbd(0x125))/0x2)+parseInt(_0x3f7fbd(0x131))/0x3+parseInt(_0x3f7fbd(0x13e))/0x4*(parseInt(_0x3f7fbd(0x134))/0x5)+-parseInt(_0x3f7fbd(0x122))/0x6+parseInt(_0x3f7fbd(0x133))/0x7+-parseInt(_0x3f7fbd(0x12f))/0x8*(parseInt(_0x3f7fbd(0x129))/0x9)+parseInt(_0x3f7fbd(0x130))/0xa*(parseInt(_0x3f7fbd(0x13b))/0xb);if(_0x4d767f===_0x2a085d)break;else _0x56d921['push'](_0x56d921['shift']());}catch(_0x13f49d){_0x56d921['push'](_0x56d921['shift']());}}}(a0_0x84ab,0x845a0));function a0_0x84ab(){const _0xb0f85d=['LicenseError','@things-factory/menu-base','map','manager','Permissions\x20For\x20Tailor\x20Tool','where','1353TtfleY','ERROR_CODES','select','32ZEikWf','getPermission','INVALID_LICENSE','defineProperty','trim','checkStudioPermission','getRepository','forEach','id\x20!=\x20:id','includes','8blWZUD','2067744SsNoOQ','Menu','OVER_LIMIT','54560rRCgGE','Studio','split','createQueryBuilder','45891DKfVnz','__esModule','menu','checkStudioTemplateIsOverLimit','(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)','getCount','536JhAxIz','6000OjvnTm','893880WsHxhH','andWhere','3065671nSeHod','125260PvTIPM'];a0_0x84ab=function(){return _0xb0f85d;};return a0_0x84ab();}Object[a0_0x138282(0x141)](exports,a0_0x138282(0x12a),{'value':!0x0}),exports[a0_0x138282(0x12c)]=exports[a0_0x138282(0x11c)]=void 0x0;const operato_license_checker_1=require('@things-factory/operato-license-checker'),shell_1=require('@things-factory/shell'),menu_base_1=require(a0_0x138282(0x136)),license_error_1=require('../../errors/license-error');async function checkStudioPermission(){const _0x3bef5b=a0_0x138282;let _0x4ecda4=((0x0,operato_license_checker_1[_0x3bef5b(0x13f)])(_0x3bef5b(0x139))||',')[_0x3bef5b(0x127)](',')[_0x3bef5b(0x137)](_0xbdcc01=>_0xbdcc01[_0x3bef5b(0x142)]()),_0x190c93=!0x1;return _0x4ecda4[_0x3bef5b(0x11e)](_0x5ed998=>{const _0x2ceef8=_0x3bef5b;_0x5ed998[_0x2ceef8(0x120)](_0x2ceef8(0x126))&&(_0x190c93=!0x0);}),_0x190c93;}async function checkStudioTemplateIsOverLimit(_0x460afb,_0x4a9854){const _0x3f13b0=a0_0x138282;if(0x0==await checkStudioPermission())throw new license_error_1[(_0x3f13b0(0x135))]({'errorCode':_0x4a9854['t'](license_error_1[_0x3f13b0(0x135)][_0x3f13b0(0x13c)][_0x3f13b0(0x140)])});var _0x57f3a1=0x0;if(_0x57f3a1=_0x460afb&&''!=_0x460afb?await(0x0,shell_1[_0x3f13b0(0x11d)])(menu_base_1[_0x3f13b0(0x123)])[_0x3f13b0(0x138)][_0x3f13b0(0x128)]()[_0x3f13b0(0x13d)](_0x3f13b0(0x12b))['from'](menu_base_1[_0x3f13b0(0x123)],_0x3f13b0(0x12b))[_0x3f13b0(0x13a)](_0x3f13b0(0x11f),{'id':_0x460afb})[_0x3f13b0(0x132)](_0x3f13b0(0x12d))['getCount']()+0x1:await(0x0,shell_1[_0x3f13b0(0x11d)])(menu_base_1[_0x3f13b0(0x123)])['manager'][_0x3f13b0(0x128)]()[_0x3f13b0(0x13d)](_0x3f13b0(0x12b))['from'](menu_base_1[_0x3f13b0(0x123)],_0x3f13b0(0x12b))[_0x3f13b0(0x13a)](_0x3f13b0(0x12d))[_0x3f13b0(0x12e)]()+0x1,!(0x0,operato_license_checker_1['checkTarget'])(_0x57f3a1))throw new license_error_1[(_0x3f13b0(0x135))]({'errorCode':_0x4a9854['t'](license_error_1['LicenseError'][_0x3f13b0(0x13c)][_0x3f13b0(0x124)])});return!0x0;}exports[a0_0x138282(0x11c)]=checkStudioPermission,exports[a0_0x138282(0x12c)]=checkStudioTemplateIsOverLimit;
1
+ 'use strict';function a0_0x44d5(_0x4090d4,_0x1ec586){const _0xd8905d=a0_0xd890();return a0_0x44d5=function(_0x44d5d5,_0x2d30c9){_0x44d5d5=_0x44d5d5-0x97;let _0x54feb1=_0xd8905d[_0x44d5d5];return _0x54feb1;},a0_0x44d5(_0x4090d4,_0x1ec586);}const a0_0x5b61c4=a0_0x44d5;(function(_0x4fa871,_0xbe925a){const _0x5ce2d0=a0_0x44d5,_0x382f71=_0x4fa871();while(!![]){try{const _0x4877c8=-parseInt(_0x5ce2d0(0xaa))/0x1*(parseInt(_0x5ce2d0(0xac))/0x2)+-parseInt(_0x5ce2d0(0xb2))/0x3+-parseInt(_0x5ce2d0(0xaf))/0x4*(parseInt(_0x5ce2d0(0x98))/0x5)+-parseInt(_0x5ce2d0(0xb5))/0x6*(-parseInt(_0x5ce2d0(0xa0))/0x7)+-parseInt(_0x5ce2d0(0x9d))/0x8+-parseInt(_0x5ce2d0(0xb8))/0x9*(-parseInt(_0x5ce2d0(0xa6))/0xa)+parseInt(_0x5ce2d0(0xa9))/0xb;if(_0x4877c8===_0xbe925a)break;else _0x382f71['push'](_0x382f71['shift']());}catch(_0xe74f6d){_0x382f71['push'](_0x382f71['shift']());}}}(a0_0xd890,0x5fe16));Object[a0_0x5b61c4(0xbe)](exports,a0_0x5b61c4(0xb3),{'value':!0x0}),exports[a0_0x5b61c4(0xa8)]=exports['checkStudioPermission']=void 0x0;const operato_license_checker_1=require('@things-factory/operato-license-checker'),shell_1=require(a0_0x5b61c4(0xb9)),menu_base_1=require('@things-factory/menu-base'),license_error_1=require(a0_0x5b61c4(0xa4));async function checkStudioPermission(){const _0x39c018=a0_0x5b61c4;let _0x30d7da=((0x0,operato_license_checker_1[_0x39c018(0xa1)])(_0x39c018(0xa5))||',')[_0x39c018(0x9b)](',')[_0x39c018(0x9c)](_0x1b6881=>_0x1b6881[_0x39c018(0xb6)]()),_0x397013=!0x1;return _0x30d7da['forEach'](_0xb85cb1=>{const _0x51333c=_0x39c018;_0xb85cb1[_0x51333c(0x97)]('Studio')&&(_0x397013=!0x0);}),_0x397013;}async function checkStudioTemplateIsOverLimit(_0x814060,_0x1653d9){const _0x2c3f4d=a0_0x5b61c4;if(0x0==await checkStudioPermission())throw new license_error_1[(_0x2c3f4d(0xba))]({'errorCode':_0x1653d9['t'](license_error_1[_0x2c3f4d(0xba)][_0x2c3f4d(0xab)][_0x2c3f4d(0xb1)])});var _0x4de931=0x0;if(_0x4de931=_0x814060&&''!=_0x814060?await(0x0,shell_1[_0x2c3f4d(0xad)])(menu_base_1[_0x2c3f4d(0xa3)])['manager'][_0x2c3f4d(0xb7)]()['select'](_0x2c3f4d(0xa2))[_0x2c3f4d(0xa7)](menu_base_1[_0x2c3f4d(0xa3)],_0x2c3f4d(0xa2))[_0x2c3f4d(0x9e)](_0x2c3f4d(0xbc),{'id':_0x814060})[_0x2c3f4d(0x99)](_0x2c3f4d(0xae))[_0x2c3f4d(0xb0)]()+0x1:await(0x0,shell_1['getRepository'])(menu_base_1['Menu'])[_0x2c3f4d(0xbb)][_0x2c3f4d(0xb7)]()[_0x2c3f4d(0x9f)](_0x2c3f4d(0xa2))[_0x2c3f4d(0xa7)](menu_base_1[_0x2c3f4d(0xa3)],_0x2c3f4d(0xa2))[_0x2c3f4d(0x9e)]('(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)')['getCount']()+0x1,!(0x0,operato_license_checker_1[_0x2c3f4d(0x9a)])(_0x4de931))throw new license_error_1['LicenseError']({'errorCode':_0x1653d9['t'](license_error_1['LicenseError']['ERROR_CODES'][_0x2c3f4d(0xb4)])});return!0x0;}exports[a0_0x5b61c4(0xbd)]=checkStudioPermission,exports['checkStudioTemplateIsOverLimit']=checkStudioTemplateIsOverLimit;function a0_0xd890(){const _0x56daf3=['split','map','3000024KBUESF','where','select','163023lkvcpA','getPermission','menu','Menu','../../errors/license-error','Permissions\x20For\x20Tailor\x20Tool','83890rtxxes','from','checkStudioTemplateIsOverLimit','11454476ZneQaA','2GKemBD','ERROR_CODES','393282erNSCp','getRepository','(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)','380XVpkUa','getCount','INVALID_LICENSE','30018rCyFQp','__esModule','OVER_LIMIT','6UKZhgH','trim','createQueryBuilder','387EGzDTC','@things-factory/shell','LicenseError','manager','id\x20!=\x20:id','checkStudioPermission','defineProperty','includes','13385gBhsGA','andWhere','checkTarget'];a0_0xd890=function(){return _0x56daf3;};return a0_0xd890();}
@@ -1 +1 @@
1
- 'use strict';const a0_0x5ec864=a0_0x47a6;(function(_0x5553ae,_0x6deb3b){const _0xaeede1=a0_0x47a6,_0x6fa44a=_0x5553ae();while(!![]){try{const _0x33f76f=parseInt(_0xaeede1(0xcf))/0x1+-parseInt(_0xaeede1(0xc2))/0x2+-parseInt(_0xaeede1(0xcd))/0x3*(-parseInt(_0xaeede1(0xc8))/0x4)+parseInt(_0xaeede1(0xbc))/0x5+-parseInt(_0xaeede1(0xbe))/0x6+parseInt(_0xaeede1(0xba))/0x7+-parseInt(_0xaeede1(0xc3))/0x8;if(_0x33f76f===_0x6deb3b)break;else _0x6fa44a['push'](_0x6fa44a['shift']());}catch(_0x3c6a42){_0x6fa44a['push'](_0x6fa44a['shift']());}}}(a0_0x3749,0x1fc24));function a0_0x47a6(_0x574d7e,_0x477717){const _0x374985=a0_0x3749();return a0_0x47a6=function(_0x47a6b5,_0x47f593){_0x47a6b5=_0x47a6b5-0xb7;let _0x4c347a=_0x374985[_0x47a6b5];return _0x4c347a;},a0_0x47a6(_0x574d7e,_0x477717);}Object[a0_0x5ec864(0xb7)](exports,a0_0x5ec864(0xca),{'value':!0x0}),exports[a0_0x5ec864(0xcc)]=void 0x0;function a0_0x3749(){const _0x525d14=['__esModule','prototype','OperatoToolResolver','36cXvqnF','studioTemplateIsOverLimit','79504DLoSsi','Resolver','Query','./tool-permission','defineProperty','Operato\x20Tool\x20Studio\x20Usage\x20Permissions','checkStudioTemplateIsOverLimit','1447292SeBZUN','__metadata','782055ojwkAt','design:returntype','135144KIgWSX','__decorate','design:type','Arg','189066sRxQgz','3042448ZdHZyz','Ctx','tslib','studioPermission','design:paramtypes','61592cxqwrB','__param'];a0_0x3749=function(){return _0x525d14;};return a0_0x3749();}const tslib_1=require(a0_0x5ec864(0xc5)),type_graphql_1=require('type-graphql'),tool_permission_1=require(a0_0x5ec864(0xd2));let OperatoToolResolver=class{async['studioPermission'](_0x1f998b){return(0x0,tool_permission_1['checkStudioPermission'])();}async[a0_0x5ec864(0xce)](_0x64a100,_0x310ae2){const _0x43f31a=a0_0x5ec864;return(0x0,tool_permission_1[_0x43f31a(0xb9)])(_0x64a100,_0x310ae2);}};tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x5ec864(0xd1)])(_0x212767=>Boolean,{'description':a0_0x5ec864(0xb8)}),tslib_1[a0_0x5ec864(0xc9)](0x0,(0x0,type_graphql_1[a0_0x5ec864(0xc4)])()),tslib_1['__metadata']('design:type',Function),tslib_1['__metadata'](a0_0x5ec864(0xc7),[Object]),tslib_1['__metadata'](a0_0x5ec864(0xbd),Promise)],OperatoToolResolver['prototype'],a0_0x5ec864(0xc6),null),tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x5ec864(0xd1)])(_0x2aa1e1=>Boolean,{'description':'Operato\x20Tool\x20Studio\x20Limit\x20check'}),tslib_1[a0_0x5ec864(0xc9)](0x0,(0x0,type_graphql_1[a0_0x5ec864(0xc1)])('id')),tslib_1[a0_0x5ec864(0xc9)](0x1,(0x0,type_graphql_1[a0_0x5ec864(0xc4)])()),tslib_1[a0_0x5ec864(0xbb)](a0_0x5ec864(0xc0),Function),tslib_1[a0_0x5ec864(0xbb)](a0_0x5ec864(0xc7),[String,Object]),tslib_1[a0_0x5ec864(0xbb)](a0_0x5ec864(0xbd),Promise)],OperatoToolResolver[a0_0x5ec864(0xcb)],a0_0x5ec864(0xce),null),OperatoToolResolver=tslib_1[a0_0x5ec864(0xbf)]([(0x0,type_graphql_1[a0_0x5ec864(0xd0)])()],OperatoToolResolver),exports[a0_0x5ec864(0xcc)]=OperatoToolResolver;
1
+ 'use strict';const a0_0x92855c=a0_0x1938;function a0_0x1938(_0x1ef758,_0x26b01d){const _0x15ea09=a0_0x15ea();return a0_0x1938=function(_0x19389c,_0x556850){_0x19389c=_0x19389c-0x1bf;let _0x48627c=_0x15ea09[_0x19389c];return _0x48627c;},a0_0x1938(_0x1ef758,_0x26b01d);}(function(_0x2a3643,_0x4ef606){const _0x5f27ce=a0_0x1938,_0x495a86=_0x2a3643();while(!![]){try{const _0x5eb5c8=-parseInt(_0x5f27ce(0x1c2))/0x1*(parseInt(_0x5f27ce(0x1d5))/0x2)+parseInt(_0x5f27ce(0x1bf))/0x3+parseInt(_0x5f27ce(0x1d1))/0x4+-parseInt(_0x5f27ce(0x1c1))/0x5+parseInt(_0x5f27ce(0x1d2))/0x6*(parseInt(_0x5f27ce(0x1c5))/0x7)+parseInt(_0x5f27ce(0x1d0))/0x8+-parseInt(_0x5f27ce(0x1d4))/0x9;if(_0x5eb5c8===_0x4ef606)break;else _0x495a86['push'](_0x495a86['shift']());}catch(_0x507a5e){_0x495a86['push'](_0x495a86['shift']());}}}(a0_0x15ea,0xa971f));Object[a0_0x92855c(0x1ca)](exports,a0_0x92855c(0x1cb),{'value':!0x0}),exports[a0_0x92855c(0x1c6)]=void 0x0;const tslib_1=require('tslib'),type_graphql_1=require('type-graphql'),tool_permission_1=require(a0_0x92855c(0x1ce));let OperatoToolResolver=class{async[a0_0x92855c(0x1d7)](_0x4e61a5){return(0x0,tool_permission_1['checkStudioPermission'])();}async[a0_0x92855c(0x1cf)](_0x4b7e5b,_0x4e8913){const _0xd23a7a=a0_0x92855c;return(0x0,tool_permission_1[_0xd23a7a(0x1d8)])(_0x4b7e5b,_0x4e8913);}};function a0_0x15ea(){const _0x4d83f7=['760154ZvxfvK','__decorate','studioPermission','checkStudioTemplateIsOverLimit','2796375bkmHfU','design:returntype','5020105PBDffn','3zklSaN','design:paramtypes','prototype','7338562isOBbL','OperatoToolResolver','Arg','__param','__metadata','defineProperty','__esModule','design:type','Operato\x20Tool\x20Studio\x20Limit\x20check','./tool-permission','studioTemplateIsOverLimit','6614992JWUolh','2749380gCvqaJ','6afItEB','Query','5907699REwtwi'];a0_0x15ea=function(){return _0x4d83f7;};return a0_0x15ea();}tslib_1[a0_0x92855c(0x1d6)]([(0x0,type_graphql_1[a0_0x92855c(0x1d3)])(_0x1c5346=>Boolean,{'description':'Operato\x20Tool\x20Studio\x20Usage\x20Permissions'}),tslib_1['__param'](0x0,(0x0,type_graphql_1['Ctx'])()),tslib_1['__metadata'](a0_0x92855c(0x1cc),Function),tslib_1[a0_0x92855c(0x1c9)]('design:paramtypes',[Object]),tslib_1[a0_0x92855c(0x1c9)](a0_0x92855c(0x1c0),Promise)],OperatoToolResolver[a0_0x92855c(0x1c4)],a0_0x92855c(0x1d7),null),tslib_1[a0_0x92855c(0x1d6)]([(0x0,type_graphql_1['Query'])(_0x3473ca=>Boolean,{'description':a0_0x92855c(0x1cd)}),tslib_1[a0_0x92855c(0x1c8)](0x0,(0x0,type_graphql_1[a0_0x92855c(0x1c7)])('id')),tslib_1['__param'](0x1,(0x0,type_graphql_1['Ctx'])()),tslib_1[a0_0x92855c(0x1c9)](a0_0x92855c(0x1cc),Function),tslib_1[a0_0x92855c(0x1c9)](a0_0x92855c(0x1c3),[String,Object]),tslib_1['__metadata']('design:returntype',Promise)],OperatoToolResolver['prototype'],a0_0x92855c(0x1cf),null),OperatoToolResolver=tslib_1[a0_0x92855c(0x1d6)]([(0x0,type_graphql_1['Resolver'])()],OperatoToolResolver),exports[a0_0x92855c(0x1c6)]=OperatoToolResolver;