@things-factory/operato-tools 6.1.17 → 6.1.19

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_0x15e56b=a0_0x233d;(function(_0x4ad889,_0x4e1085){const _0x132896=a0_0x233d,_0x260930=_0x4ad889();while(!![]){try{const _0x1fa521=parseInt(_0x132896(0x143))/0x1*(-parseInt(_0x132896(0x140))/0x2)+-parseInt(_0x132896(0x147))/0x3*(parseInt(_0x132896(0x13e))/0x4)+parseInt(_0x132896(0x149))/0x5*(-parseInt(_0x132896(0x13f))/0x6)+-parseInt(_0x132896(0x13c))/0x7*(parseInt(_0x132896(0x13d))/0x8)+parseInt(_0x132896(0x142))/0x9+-parseInt(_0x132896(0x13b))/0xa+parseInt(_0x132896(0x145))/0xb;if(_0x1fa521===_0x4e1085)break;else _0x260930['push'](_0x260930['shift']());}catch(_0x35cf51){_0x260930['push'](_0x260930['shift']());}}}(a0_0x192b,0xe51d9));function a0_0x233d(_0x8ddf71,_0x58c255){const _0x192b1a=a0_0x192b();return a0_0x233d=function(_0x233de7,_0x24937c){_0x233de7=_0x233de7-0x137;let _0x2dd38a=_0x192b1a[_0x233de7];return _0x2dd38a;},a0_0x233d(_0x8ddf71,_0x58c255);}function a0_0x192b(){const _0x4bc011=['errorCode','license-error','2954190Elutul','55097vjtyAH','1752wfEtTB','1296672LKYUIt','7044186zFZChl','25324oYLzac','detail','12538053Qolpyl','44qkCuWU','ERROR_CODES','39818185KuogXg','tslib','3SgSxKu','__esModule','5ivwJzO','__importStar','defineProperty','../constants/error-code','LicenseError'];a0_0x192b=function(){return _0x4bc011;};return a0_0x192b();}Object[a0_0x15e56b(0x14b)](exports,a0_0x15e56b(0x148),{'value':!0x0}),exports[a0_0x15e56b(0x138)]=void 0x0;const tslib_1=require(a0_0x15e56b(0x146)),ERROR_CODES=tslib_1[a0_0x15e56b(0x14a)](require(a0_0x15e56b(0x137)));class LicenseError extends Error{static get[a0_0x15e56b(0x144)](){return Object['assign']({},ERROR_CODES);}constructor({errorCode:_0x4aff7d,detail:_0x1dccf1}){const _0x36efac=a0_0x15e56b;super(_0x4aff7d),this['name']=_0x36efac(0x13a),this[_0x36efac(0x139)]=_0x4aff7d,this[_0x36efac(0x141)]=_0x1dccf1;}}exports[a0_0x15e56b(0x138)]=LicenseError;
1
+ 'use strict';const a0_0x4b4752=a0_0x811b;function a0_0x287e(){const _0x158f18=['name','LicenseError','__importStar','22365KJBFhE','../constants/error-code','defineProperty','__esModule','detail','license-error','7490712RRXFRS','15UKIoMM','681234NcxQdm','assign','tslib','390MfDGPb','70762EDtNdQ','372HcmQeO','6700379kbTfpi','3hlAEAD','4552448aszMwD','18ShjNHq','112915BJmaZD'];a0_0x287e=function(){return _0x158f18;};return a0_0x287e();}(function(_0x14f0a2,_0x319ebd){const _0xe338ad=a0_0x811b,_0x5cb9a8=_0x14f0a2();while(!![]){try{const _0x2d67a8=parseInt(_0xe338ad(0x1a2))/0x1*(parseInt(_0xe338ad(0x1a7))/0x2)+parseInt(_0xe338ad(0x1a5))/0x3*(parseInt(_0xe338ad(0x1a6))/0x4)+parseInt(_0xe338ad(0x19d))/0x5*(parseInt(_0xe338ad(0x19e))/0x6)+-parseInt(_0xe338ad(0x1a4))/0x7+-parseInt(_0xe338ad(0x19c))/0x8+parseInt(_0xe338ad(0x196))/0x9*(parseInt(_0xe338ad(0x1a1))/0xa)+-parseInt(_0xe338ad(0x192))/0xb*(-parseInt(_0xe338ad(0x1a3))/0xc);if(_0x2d67a8===_0x319ebd)break;else _0x5cb9a8['push'](_0x5cb9a8['shift']());}catch(_0x3cbcfd){_0x5cb9a8['push'](_0x5cb9a8['shift']());}}}(a0_0x287e,0x9b8fd));function a0_0x811b(_0x4e58e4,_0xc4790d){const _0x287e4a=a0_0x287e();return a0_0x811b=function(_0x811b69,_0x34a2af){_0x811b69=_0x811b69-0x192;let _0x3396ba=_0x287e4a[_0x811b69];return _0x3396ba;},a0_0x811b(_0x4e58e4,_0xc4790d);}Object[a0_0x4b4752(0x198)](exports,a0_0x4b4752(0x199),{'value':!0x0}),exports['LicenseError']=void 0x0;const tslib_1=require(a0_0x4b4752(0x1a0)),ERROR_CODES=tslib_1[a0_0x4b4752(0x195)](require(a0_0x4b4752(0x197)));class LicenseError extends Error{static get['ERROR_CODES'](){const _0xb84dd1=a0_0x4b4752;return Object[_0xb84dd1(0x19f)]({},ERROR_CODES);}constructor({errorCode:_0x340f5f,detail:_0x27889c}){const _0x3d7489=a0_0x4b4752;super(_0x340f5f),this[_0x3d7489(0x193)]=_0x3d7489(0x19b),this['errorCode']=_0x340f5f,this[_0x3d7489(0x19a)]=_0x27889c;}}exports[a0_0x4b4752(0x194)]=LicenseError;
package/server/routes.js CHANGED
@@ -1 +1 @@
1
- function a0_0x43c6(){const _0x3955af=['6fESAds','bootstrap-module-global-private-route','7064BmLNRL','651822AHpnZz','debug','392925VWKCBF','581QfDZht','bootstrap-module-global-public-route','414824bQlkwU','bootstrap-module-domain-private-route','2739036aRqlRo','3417355IolWIT','780cBdecn','things-factory:operato-tools:routes','8289JrIvYb'];a0_0x43c6=function(){return _0x3955af;};return a0_0x43c6();}const a0_0x40428c=a0_0x16ee;(function(_0x353ba9,_0x17f384){const _0x247537=a0_0x16ee,_0x2d4b9f=_0x353ba9();while(!![]){try{const _0x21a86d=-parseInt(_0x247537(0xf4))/0x1+-parseInt(_0x247537(0xf2))/0x2+parseInt(_0x247537(0xef))/0x3*(parseInt(_0x247537(0xf7))/0x4)+parseInt(_0x247537(0xeb))/0x5+parseInt(_0x247537(0xf9))/0x6+parseInt(_0x247537(0xf5))/0x7*(-parseInt(_0x247537(0xf1))/0x8)+parseInt(_0x247537(0xee))/0x9*(-parseInt(_0x247537(0xec))/0xa);if(_0x21a86d===_0x17f384)break;else _0x2d4b9f['push'](_0x2d4b9f['shift']());}catch(_0xbd62dc){_0x2d4b9f['push'](_0x2d4b9f['shift']());}}}(a0_0x43c6,0x76062));const debug=require(a0_0x40428c(0xf3))(a0_0x40428c(0xed));function a0_0x16ee(_0x3c39d8,_0x4f70df){const _0x43c628=a0_0x43c6();return a0_0x16ee=function(_0x16ee44,_0x42484a){_0x16ee44=_0x16ee44-0xeb;let _0x3d8e6b=_0x43c628[_0x16ee44];return _0x3d8e6b;},a0_0x16ee(_0x3c39d8,_0x4f70df);}process['on'](a0_0x40428c(0xf6),(_0x2e2555,_0x54561a)=>{}),process['on'](a0_0x40428c(0xf0),(_0x4cf077,_0xfcaa15)=>{}),process['on']('bootstrap-module-domain-public-route',(_0xa3373b,_0x90089e)=>{}),process['on'](a0_0x40428c(0xf8),(_0x461525,_0x5d6570)=>{});
1
+ const a0_0x1273c9=a0_0xb218;function a0_0xb218(_0x46042f,_0x2d7b55){const _0x5ba800=a0_0x5ba8();return a0_0xb218=function(_0xb218a9,_0x15a3da){_0xb218a9=_0xb218a9-0xf7;let _0xea053b=_0x5ba800[_0xb218a9];return _0xea053b;},a0_0xb218(_0x46042f,_0x2d7b55);}(function(_0x37d015,_0x23570f){const _0x5371d2=a0_0xb218,_0x8b83b8=_0x37d015();while(!![]){try{const _0x15b801=-parseInt(_0x5371d2(0xfb))/0x1+parseInt(_0x5371d2(0xfc))/0x2*(-parseInt(_0x5371d2(0xf8))/0x3)+-parseInt(_0x5371d2(0xfa))/0x4+parseInt(_0x5371d2(0x100))/0x5+parseInt(_0x5371d2(0xf9))/0x6+-parseInt(_0x5371d2(0x101))/0x7+parseInt(_0x5371d2(0xfd))/0x8*(parseInt(_0x5371d2(0xf7))/0x9);if(_0x15b801===_0x23570f)break;else _0x8b83b8['push'](_0x8b83b8['shift']());}catch(_0x25b32f){_0x8b83b8['push'](_0x8b83b8['shift']());}}}(a0_0x5ba8,0x80002));const debug=require(a0_0x1273c9(0xff))(a0_0x1273c9(0x102));process['on']('bootstrap-module-global-public-route',(_0x5a2564,_0x3aa0b9)=>{}),process['on'](a0_0x1273c9(0xfe),(_0xba6500,_0x4ef9bf)=>{}),process['on']('bootstrap-module-domain-public-route',(_0x19d8aa,_0x389880)=>{}),process['on'](a0_0x1273c9(0x103),(_0x5de4fc,_0x360422)=>{});function a0_0x5ba8(){const _0x4a7952=['45Fisdnc','607953AJhhZf','504612mqrXqE','73516oBUTYp','636232jifhxV','2pFnwwb','2151368GlsBYQ','bootstrap-module-global-private-route','debug','1856320xyaAgR','2928933iNMrwl','things-factory:operato-tools:routes','bootstrap-module-domain-private-route'];a0_0x5ba8=function(){return _0x4a7952;};return a0_0x5ba8();}
@@ -1 +1 @@
1
- 'use strict';const a0_0x441bd7=a0_0xac8e;(function(_0x5cba41,_0x7e8d41){const _0x3adcc5=a0_0xac8e,_0x259876=_0x5cba41();while(!![]){try{const _0x4f705e=-parseInt(_0x3adcc5(0x110))/0x1+parseInt(_0x3adcc5(0xcf))/0x2+-parseInt(_0x3adcc5(0xf3))/0x3*(-parseInt(_0x3adcc5(0xda))/0x4)+parseInt(_0x3adcc5(0xb8))/0x5+parseInt(_0x3adcc5(0xe0))/0x6*(-parseInt(_0x3adcc5(0xcb))/0x7)+parseInt(_0x3adcc5(0xfc))/0x8*(parseInt(_0x3adcc5(0xbb))/0x9)+-parseInt(_0x3adcc5(0xd7))/0xa*(parseInt(_0x3adcc5(0xe7))/0xb);if(_0x4f705e===_0x7e8d41)break;else _0x259876['push'](_0x259876['shift']());}catch(_0x5d1f2c){_0x259876['push'](_0x259876['shift']());}}}(a0_0x3557,0x5254b));function a0_0xac8e(_0x33d28d,_0x1ff3dc){const _0x35579e=a0_0x3557();return a0_0xac8e=function(_0xac8e53,_0x1cba14){_0xac8e53=_0xac8e53-0xb6;let _0x1a1a85=_0x35579e[_0xac8e53];return _0x1a1a85;},a0_0xac8e(_0x33d28d,_0x1ff3dc);}function a0_0x3557(){const _0x37b99b=['\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','@things-factory/meta-ui/client/pages/meta-grist-page','createCipheriv','replace','\x22,\x22width\x22:','hex','{\x22type\x22:\x20\x22','10oFeHmH','__decorate','aes-256-ecb','1140436eJgvXI','Mutation','\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}','sort','reverseSort','COPY','18JFPQhG','{\x22name\x22:\x20\x22','Resolver','Menu','string','enc','\x20,\x22editable\x22:\x20','14753695UJhzEC','\x20,\x22exportable\x22:\x20true','readonly','@transaction','substring','created_at','refType','refName','entity','query','\x22,\x22desc\x22:','Entity','3timJxs','updated_at','./../tool-secret/tool-permission','Ctx','@things-factory/resource-base','\x27\x20or\x20id\x20=\x20\x27','randomBytes','createGridColumns','{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22','244448VpdyDi','Arg','{\x22name\x22:\x22','utf8','createSearchCols','rank','hiddenFlag','createSortCols','parent_menu_id','from','{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22','menuType','stringify','join','getRepository','design:type','aes-256-cfb8','update','length','hidden','234255EcvcRa','parent','sortRank','__metadata','save','searchRank','meta-grist-page',',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22','\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}','code','left','push','\x22,\x22header\x22:\x20\x22','createdAt','createMenuData',',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\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',',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22','gridRank','findOne','aes256','searchOper','assign','updater_id','routing','type-graphql','lodash','split','Directive','state','select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27','default','map','\x22,\x22name\x22:\x20\x22','final','filter','aes-256-cfb1','2615580AjapSz','template','resourceUrl','189LUwbkg','aes-256-cfb','\x22,\x22operator\x22:\x20\x22','tslib','SCREEN','OperatoToolCreateMenu',',\x22mandatory\x22:\x20','find','category','@things-factory/menu-base','updatedAt','__esModule','__param','Operato\x20Tool\x20Create\x20Menu','scenario','\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}','401002uwnHxe','creator','name','dataProp','1269368FPyjzZ'];a0_0x3557=function(){return _0x37b99b;};return a0_0x3557();}Object['defineProperty'](exports,a0_0x441bd7(0xc6),{'value':!0x0}),exports[a0_0x441bd7(0xc0)]=void 0x0;const tslib_1=require(a0_0x441bd7(0xbe)),type_graphql_1=require(a0_0x441bd7(0x129)),resource_base_1=require(a0_0x441bd7(0xf7)),menu_base_1=require(a0_0x441bd7(0xc4)),tool_permission_1=require(a0_0x441bd7(0xf5)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x441bd7(0x12a)),{plural:plural}=require('pluralize'),crypto_1=tslib_1['__importDefault'](require('crypto'));let OperatoToolCreateMenu=class{async['toolCreateMenu'](_0x210deb,_0x33e55e,_0x304ec8){const _0x3511d2=a0_0x441bd7,{domain:_0x29c874,user:_0x1d2c56,tx:_0x388170}=_0x304ec8[_0x3511d2(0x12d)];await(0x0,tool_permission_1['checkStudioTemplateIsOverLimit'])('',_0x304ec8);const _0x429edd=await _0x388170[_0x3511d2(0x10a)](resource_base_1[_0x3511d2(0xf2)])[_0x3511d2(0x123)]({'where':{'domain':{'id':_0x29c874['id']},'id':_0x210deb}}),_0x4d0453=await _0x388170['getRepository'](resource_base_1['EntityColumn'])[_0x3511d2(0xc2)]({'where':{'domain':{'id':_0x29c874['id']},'entity':{'id':_0x429edd['id']}}});let {name:_0x26e8fb=''}=_0x429edd||{},_0x292d41=kebabCase(_0x26e8fb),_0x3fe871=modelTemplate[_0x3511d2(0xd3)](/{{pascalCase name}}/g,startCase(camelCase(_0x26e8fb))[_0x3511d2(0xd3)](/ /g,''))[_0x3511d2(0xd3)](/{{camelCase name}}/g,camelCase(_0x26e8fb))[_0x3511d2(0xd3)](/{{snakeCase name}}/g,snakeCase(_0x26e8fb))[_0x3511d2(0xd3)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x26e8fb)))[_0x3511d2(0xd3)](/ /g,''))[_0x3511d2(0xd3)](/{{pluralCamelCase name}}/g,camelCase(plural(_0x26e8fb)))[_0x3511d2(0xd3)](/{{name}}/g,_0x26e8fb),_0x9efe29='';'JSON'==_0x429edd['dataProp']?_0x9efe29=_0x3511d2(0xd0):_0x3511d2(0xdf)==_0x429edd[_0x3511d2(0xce)]&&(_0x9efe29=_0x3511d2(0x120)),_0x3fe871=_0x3fe871[_0x3511d2(0xd3)](/{{HistoryButton}}/g,_0x9efe29);let _0x4e194b=this[_0x3511d2(0x103)](_0x4d0453);_0x3fe871=_0x3fe871[_0x3511d2(0xd3)](/{{SortColumns}}/g,_0x4e194b[_0x3511d2(0x109)](','));let _0x377724=this[_0x3511d2(0x100)](_0x4d0453);_0x3fe871=_0x3fe871['replace'](/{{SearchColumns}}/g,_0x377724['join'](','));let _0x1aa3a2=this[_0x3511d2(0xfa)](_0x4d0453);return _0x3fe871=_0x3fe871[_0x3511d2(0xd3)](/{{GridColumns}}/g,_0x1aa3a2[_0x3511d2(0x109)](',')),_0x3fe871=this[_0x3511d2(0xe5)](_0x3fe871),await this['createMenuData'](_0x388170,_0x29c874,_0x1d2c56,_0x33e55e,_0x292d41,_0x3fe871),!0x0;}['createGridColumns'](_0xcb4180){const _0x1a7136=a0_0x441bd7;return _0xcb4180[_0x1a7136(0xb6)](_0x217c0b=>'id'!=_0x217c0b[_0x1a7136(0xcd)]&&_0x217c0b[_0x1a7136(0x122)]>0x0)[_0x1a7136(0xdd)](function(_0x4f74ce,_0x23c2d2){const _0x4845a9=_0x1a7136;return _0x4f74ce[_0x4845a9(0x122)]-_0x23c2d2[_0x4845a9(0x122)];})[_0x1a7136(0x130)](_0x2fe691=>{const _0x77ee62=_0x1a7136;let {gridEditor:_0x2e9c54=_0x77ee62(0xe4),name:_0xa458a,term:_0x42c222,gridWidth:_0x553ba6=0x0,gridAlign:_0x579518=_0x77ee62(0x11a),nullable:_0x44f22e=!0x1}=_0x2fe691;if(null==_0x2e9c54&&(_0x2e9c54=_0x77ee62(0xe4)),null==_0x579518&&(_0x579518=_0x77ee62(0x11a)),_0x77ee62(0x127)==_0xa458a||'creator_id'==_0xa458a)return _0xa458a=_0x77ee62(0x127)==_0xa458a?'updater':_0x77ee62(0xcc),_0x77ee62(0xfb)+_0xa458a+_0x77ee62(0x11c)+_0xa458a+_0x77ee62(0xca);if(_0x77ee62(0xf4)==_0xa458a||_0x77ee62(0xec)==_0xa458a)return _0x77ee62(0x106)+('updated_at'==_0xa458a?_0x77ee62(0xc5):_0x77ee62(0x11d))+_0x77ee62(0x11c)+_0xa458a+_0x77ee62(0xdc);let _0x2dd9fc=_0x77ee62(0xe9)!=_0x2e9c54&&_0x77ee62(0x10f)!=_0x2e9c54,_0x37acd0=_0x77ee62(0x10f)==_0x2e9c54;0x1!=_0x37acd0&&0x0!=_0x2dd9fc||(_0x2e9c54=_0x77ee62(0xe4));let _0x5825ca=_0x77ee62(0xd6)+_0x2e9c54+_0x77ee62(0x131)+camelCase(_0xa458a)+_0x77ee62(0x11c)+_0x42c222+'\x22,\x22hidden\x22:'+_0x37acd0+_0x77ee62(0xe6)+_0x2dd9fc+_0x77ee62(0xc1)+!_0x44f22e+',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22'+_0x579518+_0x77ee62(0xd4)+_0x553ba6+_0x77ee62(0xe8);return _0x77ee62(0x119)==_0x2fe691[_0x77ee62(0xed)]&&(_0x5825ca+=_0x77ee62(0x121)+_0x2fe691[_0x77ee62(0xee)]+'\x22}'),_0x77ee62(0xc9)==_0x2fe691[_0x77ee62(0xed)]&&(_0x5825ca+=_0x77ee62(0x117)+_0x2fe691['refName']+'\x22}'),_0x77ee62(0xef)==_0x2fe691[_0x77ee62(0xed)]&&(_0x5825ca+=_0x77ee62(0x11f)+camelCase(plural(_0x2fe691[_0x77ee62(0xee)]))+_0x77ee62(0x118)),_0x5825ca+='}',_0x5825ca;});}['createSearchCols'](_0x4e0aab){const _0x1140b3=a0_0x441bd7;return _0x4e0aab['filter'](_0x1ed3de=>_0x1ed3de[_0x1140b3(0x115)]>0x0)[_0x1140b3(0xdd)](function(_0x47a015,_0x4b2714){const _0x1d3439=_0x1140b3;return _0x47a015[_0x1d3439(0x115)]-_0x4b2714[_0x1d3439(0x115)];})['map'](_0x55b8af=>{const _0x49aeb7=_0x1140b3;let _0xdd758d=_0x55b8af[_0x49aeb7(0x125)];return'filter'==_0xdd758d?'\x22'+camelCase(_0x55b8af[_0x49aeb7(0xcd)])+'\x22':(_0xdd758d||(_0xdd758d='eq'),_0x49aeb7(0xe1)+camelCase(_0x55b8af[_0x49aeb7(0xcd)])+_0x49aeb7(0xbd)+_0xdd758d+'\x22}');});}[a0_0x441bd7(0x103)](_0x3c4805){const _0x44c4db=a0_0x441bd7;return _0x3c4805[_0x44c4db(0xb6)](_0x5e9072=>_0x5e9072[_0x44c4db(0x112)]>0x0)[_0x44c4db(0xdd)](function(_0x5a5fad,_0x31a789){const _0x424259=_0x44c4db;return _0x5a5fad[_0x424259(0x112)]-_0x31a789[_0x424259(0x112)];})[_0x44c4db(0x130)](_0xdf0a5d=>_0x44c4db(0xfe)+camelCase(_0xdf0a5d[_0x44c4db(0xcd)])+_0x44c4db(0xf1)+_0xdf0a5d[_0x44c4db(0xde)]+'}');}async[a0_0x441bd7(0x11e)](_0x586281,_0x5ee856,_0x5486e1,_0x3f01aa,_0x2d7e0b,_0x35420d){const _0x4ae275=a0_0x441bd7;let _0x95357=await _0x586281[_0x4ae275(0x10a)](menu_base_1[_0x4ae275(0xe3)])[_0x4ae275(0x123)]({'where':{'domain':{'id':_0x5ee856['id']},'id':_0x3f01aa}}),_0x5117ce=(await _0x586281[_0x4ae275(0x10a)](menu_base_1[_0x4ae275(0xe3)])[_0x4ae275(0xf0)](_0x4ae275(0x12e)+_0x3f01aa+_0x4ae275(0xf8)+_0x3f01aa+'\x27'))[0x0][_0x4ae275(0x101)]+0xa,_0x96f435=new menu_base_1[(_0x4ae275(0xe3))]();_0x96f435[_0x4ae275(0xcd)]=_0x2d7e0b,_0x96f435[_0x4ae275(0x107)]=_0x4ae275(0xbf),_0x96f435[_0x4ae275(0xc3)]=_0x4ae275(0x116),_0x96f435['rank']=_0x5117ce,_0x96f435[_0x4ae275(0x102)]=!0x1,_0x96f435[_0x4ae275(0x128)]=_0x2d7e0b,_0x96f435[_0x4ae275(0xb9)]=_0x35420d,_0x96f435[_0x4ae275(0xba)]=_0x4ae275(0xd1),_0x96f435[_0x4ae275(0x111)]=_0x95357,await _0x586281['getRepository'](menu_base_1[_0x4ae275(0xe3)])[_0x4ae275(0x114)](Object[_0x4ae275(0x126)](Object[_0x4ae275(0x126)]({},_0x96f435),{'domain':_0x5ee856,'creator':_0x5486e1,'updater':_0x5486e1}));}[a0_0x441bd7(0xe5)](_0x478f67){const _0x3516fe=a0_0x441bd7;let _0x4e3822=JSON[_0x3516fe(0x108)](_0x478f67)[_0x3516fe(0x12b)](/(.{100})/)[_0x3516fe(0xb6)](_0x53df47=>_0x53df47),_0x463091=[_0x3516fe(0xd9),'aes-256-cbc',_0x3516fe(0xbc),_0x3516fe(0x10c),_0x3516fe(0xb7),'aes-256-ofb','aes-256-ctr',_0x3516fe(0x124)],_0x4b6de0=crypto_1[_0x3516fe(0x12f)][_0x3516fe(0xf9)](0x20)['toString']('hex'),_0x3f3e63=Buffer[_0x3516fe(0x105)](_0x4b6de0,_0x3516fe(0xd5)),_0x3e2dc1=_0x4b6de0[_0x3516fe(0xeb)](0x0,0x10),_0x96ce53=['',_0x3e2dc1,_0x3e2dc1,_0x3e2dc1,_0x3e2dc1,_0x3e2dc1,_0x3e2dc1,_0x3e2dc1],_0x2dbf50=0x0,_0x34ab12=[];_0x34ab12[_0x3516fe(0x11b)](_0x4b6de0);for(var _0x1f2b93=0x0;_0x1f2b93<_0x4e3822[_0x3516fe(0x10e)];_0x1f2b93++,_0x2dbf50++){_0x2dbf50==_0x463091[_0x3516fe(0x10e)]&&(_0x2dbf50=0x0);let _0x56e07b=crypto_1[_0x3516fe(0x12f)][_0x3516fe(0xd2)](_0x463091[_0x2dbf50],_0x3f3e63,_0x96ce53[_0x2dbf50]),_0x2789d6=_0x56e07b[_0x3516fe(0x10d)](_0x4e3822[_0x1f2b93],_0x3516fe(0xff),_0x3516fe(0xd5));_0x2789d6+=_0x56e07b[_0x3516fe(0x132)]('hex'),_0x34ab12[_0x3516fe(0x11b)](_0x2789d6);}return _0x34ab12[_0x3516fe(0x109)]('h1z0q9i9x7q6');}};tslib_1[a0_0x441bd7(0xd8)]([(0x0,type_graphql_1[a0_0x441bd7(0x12c)])(a0_0x441bd7(0xea)),(0x0,type_graphql_1[a0_0x441bd7(0xdb)])(_0x5686f5=>Boolean,{'description':a0_0x441bd7(0xc8)}),tslib_1[a0_0x441bd7(0xc7)](0x0,(0x0,type_graphql_1[a0_0x441bd7(0xfd)])('id')),tslib_1[a0_0x441bd7(0xc7)](0x1,(0x0,type_graphql_1['Arg'])(a0_0x441bd7(0x104))),tslib_1[a0_0x441bd7(0xc7)](0x2,(0x0,type_graphql_1[a0_0x441bd7(0xf6)])()),tslib_1[a0_0x441bd7(0x113)](a0_0x441bd7(0x10b),Function),tslib_1[a0_0x441bd7(0x113)]('design:paramtypes',[String,String,Object]),tslib_1[a0_0x441bd7(0x113)]('design:returntype',Promise)],OperatoToolCreateMenu['prototype'],'toolCreateMenu',null),OperatoToolCreateMenu=tslib_1[a0_0x441bd7(0xd8)]([(0x0,type_graphql_1[a0_0x441bd7(0xe2)])()],OperatoToolCreateMenu),exports[a0_0x441bd7(0xc0)]=OperatoToolCreateMenu;const modelTemplate='\x0a{\x0a\x20\x20\x22menu\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x22title\x22:\x20\x22{{name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22\x22,\x0a\x20\x20\x20\x20\x20\x20\x22desc\x22:\x20\x22\x22\x0a\x20\x20},\x0a\x20\x20\x22gql\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x22query\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22list_func\x22:\x20\x22{{pluralCamelCase\x20name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22find_one_func\x22:\x22{{camelCase\x20name}}\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x22mutation\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22multiple\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22func\x22:\x22updateMultiple{{pascalCase\x20name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22{{pascalCase\x20name}}Patch\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22delete\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22func\x22:\x22delete{{pluralPascalCase\x20name}}\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20},\x0a\x20\x20\x22button\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22export\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22add\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22delete\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22save\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20],\x0a\x20\x20\x22grid_column\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22string\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22id\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22header\x22:\x20\x22id\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22hidden\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22editable\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22mandatory\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22sortable\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22align\x22:\x20\x22left\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22width\x22:\x200,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22exportable\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20},\x0a{{GridColumns}}\x0a\x20\x20],\x0a\x20\x20\x22grid\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22button\x22:[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{{HistoryButton}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22option\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22mobile_mode\x22:\x20\x22LIST\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22desk_mode\x22:\x20\x22GRID\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22use_row_checker\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22pages\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2020,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2050,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20100,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20300\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22view_mode\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22GRID\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22LIST\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22CARD\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22sorters\x22:\x20[\x0a{{SortColumns}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20]\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x22row\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22multiple_select\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22click\x22:\x20\x22select-row-toggle\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20},\x0a\x20\x20\x22search\x22:\x20[\x0a{{SearchColumns}}\x0a\x20\x20]\x0a}\x0a';
1
+ 'use strict';const a0_0x5e1303=a0_0x4d0a;(function(_0x21f7e2,_0x551ce8){const _0x1e9a1b=a0_0x4d0a,_0x36e0d5=_0x21f7e2();while(!![]){try{const _0x4ea5be=parseInt(_0x1e9a1b(0x1da))/0x1+parseInt(_0x1e9a1b(0x1ff))/0x2*(-parseInt(_0x1e9a1b(0x1eb))/0x3)+-parseInt(_0x1e9a1b(0x1f3))/0x4*(parseInt(_0x1e9a1b(0x227))/0x5)+-parseInt(_0x1e9a1b(0x1d9))/0x6+parseInt(_0x1e9a1b(0x1f7))/0x7*(-parseInt(_0x1e9a1b(0x1ed))/0x8)+parseInt(_0x1e9a1b(0x22b))/0x9+parseInt(_0x1e9a1b(0x212))/0xa*(parseInt(_0x1e9a1b(0x214))/0xb);if(_0x4ea5be===_0x551ce8)break;else _0x36e0d5['push'](_0x36e0d5['shift']());}catch(_0x517cb7){_0x36e0d5['push'](_0x36e0d5['shift']());}}}(a0_0x1e00,0x2e129));function a0_0x4d0a(_0x2c7af2,_0x418484){const _0x1e00e1=a0_0x1e00();return a0_0x4d0a=function(_0x4d0a81,_0x564597){_0x4d0a81=_0x4d0a81-0x1d0;let _0x10812a=_0x1e00e1[_0x4d0a81];return _0x10812a;},a0_0x4d0a(_0x2c7af2,_0x418484);}Object[a0_0x5e1303(0x211)](exports,'__esModule',{'value':!0x0}),exports[a0_0x5e1303(0x20d)]=void 0x0;const tslib_1=require(a0_0x5e1303(0x1f4)),type_graphql_1=require(a0_0x5e1303(0x233)),resource_base_1=require(a0_0x5e1303(0x1ef)),menu_base_1=require('@things-factory/menu-base'),tool_permission_1=require('./../tool-secret/tool-permission'),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x5e1303(0x1e5)),{plural:plural}=require(a0_0x5e1303(0x232)),crypto_1=tslib_1[a0_0x5e1303(0x209)](require('crypto'));let OperatoToolCreateMenu=class{async[a0_0x5e1303(0x1d0)](_0x2d2f2e,_0x1b731a,_0x1d60f4){const _0x348709=a0_0x5e1303,{domain:_0x94bef4,user:_0x30f80f,tx:_0x30be81}=_0x1d60f4[_0x348709(0x217)];await(0x0,tool_permission_1[_0x348709(0x1dd)])('',_0x1d60f4);const _0x3440fe=await _0x30be81[_0x348709(0x230)](resource_base_1[_0x348709(0x24a)])[_0x348709(0x249)]({'where':{'domain':{'id':_0x94bef4['id']},'id':_0x2d2f2e}}),_0x1a67f8=await _0x30be81[_0x348709(0x230)](resource_base_1[_0x348709(0x1f8)])[_0x348709(0x234)]({'where':{'domain':{'id':_0x94bef4['id']},'entity':{'id':_0x3440fe['id']}}});let {name:_0x8474a0=''}=_0x3440fe||{},_0x20c3c1=kebabCase(_0x8474a0),_0x4d9e14=modelTemplate[_0x348709(0x226)](/{{pascalCase name}}/g,startCase(camelCase(_0x8474a0))[_0x348709(0x226)](/ /g,''))[_0x348709(0x226)](/{{camelCase name}}/g,camelCase(_0x8474a0))[_0x348709(0x226)](/{{snakeCase name}}/g,snakeCase(_0x8474a0))['replace'](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x8474a0)))[_0x348709(0x226)](/ /g,''))['replace'](/{{pluralCamelCase name}}/g,camelCase(plural(_0x8474a0)))[_0x348709(0x226)](/{{name}}/g,_0x8474a0),_0x38ce05='';_0x348709(0x20b)==_0x3440fe[_0x348709(0x239)]?_0x38ce05='\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':_0x348709(0x213)==_0x3440fe[_0x348709(0x239)]&&(_0x38ce05=_0x348709(0x231)),_0x4d9e14=_0x4d9e14[_0x348709(0x226)](/{{HistoryButton}}/g,_0x38ce05);let _0xdcb62d=this[_0x348709(0x1fb)](_0x1a67f8);_0x4d9e14=_0x4d9e14['replace'](/{{SortColumns}}/g,_0xdcb62d[_0x348709(0x207)](','));let _0x343d20=this[_0x348709(0x210)](_0x1a67f8);_0x4d9e14=_0x4d9e14[_0x348709(0x226)](/{{SearchColumns}}/g,_0x343d20[_0x348709(0x207)](','));let _0xc4c978=this['createGridColumns'](_0x1a67f8);return _0x4d9e14=_0x4d9e14[_0x348709(0x226)](/{{GridColumns}}/g,_0xc4c978[_0x348709(0x207)](',')),_0x4d9e14=this['enc'](_0x4d9e14),await this[_0x348709(0x1e1)](_0x30be81,_0x94bef4,_0x30f80f,_0x1b731a,_0x20c3c1,_0x4d9e14),!0x0;}[a0_0x5e1303(0x1ec)](_0x3ac5cb){const _0x140ff0=a0_0x5e1303;return _0x3ac5cb[_0x140ff0(0x244)](_0x1b68d5=>'id'!=_0x1b68d5['name']&&_0x1b68d5[_0x140ff0(0x1fd)]>0x0)[_0x140ff0(0x204)](function(_0x51a251,_0x4bf1cc){const _0x47ed7c=_0x140ff0;return _0x51a251[_0x47ed7c(0x1fd)]-_0x4bf1cc[_0x47ed7c(0x1fd)];})[_0x140ff0(0x22f)](_0x379b9c=>{const _0x1a33f9=_0x140ff0;let {gridEditor:_0x1e9227='string',name:_0x53fc80,term:_0x424fc7,gridWidth:_0x92422f=0x0,gridAlign:_0x338de7=_0x1a33f9(0x203),nullable:_0x3d18ca=!0x1}=_0x379b9c;if(null==_0x1e9227&&(_0x1e9227=_0x1a33f9(0x238)),null==_0x338de7&&(_0x338de7='left'),_0x1a33f9(0x248)==_0x53fc80||'creator_id'==_0x53fc80)return _0x53fc80=_0x1a33f9(0x248)==_0x53fc80?_0x1a33f9(0x224):_0x1a33f9(0x225),_0x1a33f9(0x1d4)+_0x53fc80+_0x1a33f9(0x23c)+_0x53fc80+_0x1a33f9(0x20a);if(_0x1a33f9(0x1d6)==_0x53fc80||_0x1a33f9(0x1d7)==_0x53fc80)return _0x1a33f9(0x21c)+('updated_at'==_0x53fc80?'updatedAt':'createdAt')+'\x22,\x22header\x22:\x20\x22'+_0x53fc80+'\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}';let _0x193db0=_0x1a33f9(0x1d2)!=_0x1e9227&&_0x1a33f9(0x1dc)!=_0x1e9227,_0x2e83fa='hidden'==_0x1e9227;0x1!=_0x2e83fa&&0x0!=_0x193db0||(_0x1e9227=_0x1a33f9(0x238));let _0x34fc16=_0x1a33f9(0x236)+_0x1e9227+_0x1a33f9(0x1d5)+camelCase(_0x53fc80)+_0x1a33f9(0x23c)+_0x424fc7+_0x1a33f9(0x23a)+_0x2e83fa+_0x1a33f9(0x246)+_0x193db0+_0x1a33f9(0x215)+!_0x3d18ca+_0x1a33f9(0x1fe)+_0x338de7+_0x1a33f9(0x1e7)+_0x92422f+_0x1a33f9(0x23d);return _0x1a33f9(0x21f)==_0x379b9c[_0x1a33f9(0x1f5)]&&(_0x34fc16+=_0x1a33f9(0x1ea)+_0x379b9c['refName']+'\x22}'),_0x1a33f9(0x1e8)==_0x379b9c['refType']&&(_0x34fc16+=_0x1a33f9(0x22e)+_0x379b9c[_0x1a33f9(0x1f6)]+'\x22}'),'entity'==_0x379b9c[_0x1a33f9(0x1f5)]&&(_0x34fc16+=_0x1a33f9(0x22d)+camelCase(plural(_0x379b9c[_0x1a33f9(0x1f6)]))+_0x1a33f9(0x218)),_0x34fc16+='}',_0x34fc16;});}['createSearchCols'](_0x1b26d0){const _0x384086=a0_0x5e1303;return _0x1b26d0['filter'](_0xfd4b17=>_0xfd4b17['searchRank']>0x0)[_0x384086(0x204)](function(_0x1aa4bc,_0x4b1580){const _0x29c9c8=_0x384086;return _0x1aa4bc[_0x29c9c8(0x200)]-_0x4b1580['searchRank'];})[_0x384086(0x22f)](_0x4b5e33=>{const _0x2f00b8=_0x384086;let _0x1402f4=_0x4b5e33[_0x2f00b8(0x241)];return'filter'==_0x1402f4?'\x22'+camelCase(_0x4b5e33['name'])+'\x22':(_0x1402f4||(_0x1402f4='eq'),_0x2f00b8(0x1e0)+camelCase(_0x4b5e33['name'])+_0x2f00b8(0x1e2)+_0x1402f4+'\x22}');});}[a0_0x5e1303(0x1fb)](_0x225fb0){const _0x408f59=a0_0x5e1303;return _0x225fb0[_0x408f59(0x244)](_0x2e0b47=>_0x2e0b47['sortRank']>0x0)[_0x408f59(0x204)](function(_0x43dc6b,_0x36c613){const _0x38c132=_0x408f59;return _0x43dc6b[_0x38c132(0x247)]-_0x36c613[_0x38c132(0x247)];})[_0x408f59(0x22f)](_0x4fcd30=>_0x408f59(0x228)+camelCase(_0x4fcd30[_0x408f59(0x223)])+_0x408f59(0x235)+_0x4fcd30[_0x408f59(0x23b)]+'}');}async[a0_0x5e1303(0x1e1)](_0x5e68d5,_0x28b6f6,_0x47af38,_0x31e897,_0x4048bf,_0x3b245a){const _0x362ddf=a0_0x5e1303;let _0x92077e=await _0x5e68d5[_0x362ddf(0x230)](menu_base_1[_0x362ddf(0x221)])[_0x362ddf(0x249)]({'where':{'domain':{'id':_0x28b6f6['id']},'id':_0x31e897}}),_0x461b7c=(await _0x5e68d5['getRepository'](menu_base_1[_0x362ddf(0x221)])[_0x362ddf(0x206)]('select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27'+_0x31e897+'\x27\x20or\x20id\x20=\x20\x27'+_0x31e897+'\x27'))[0x0]['rank']+0xa,_0x383ac6=new menu_base_1[(_0x362ddf(0x221))]();_0x383ac6[_0x362ddf(0x223)]=_0x4048bf,_0x383ac6['menuType']=_0x362ddf(0x219),_0x383ac6[_0x362ddf(0x1fc)]=_0x362ddf(0x1e4),_0x383ac6[_0x362ddf(0x21e)]=_0x461b7c,_0x383ac6['hiddenFlag']=!0x1,_0x383ac6['routing']=_0x4048bf,_0x383ac6[_0x362ddf(0x22c)]=_0x3b245a,_0x383ac6[_0x362ddf(0x20c)]=_0x362ddf(0x202),_0x383ac6['parent']=_0x92077e,await _0x5e68d5[_0x362ddf(0x230)](menu_base_1[_0x362ddf(0x221)])[_0x362ddf(0x1e9)](Object[_0x362ddf(0x1d3)](Object[_0x362ddf(0x1d3)]({},_0x383ac6),{'domain':_0x28b6f6,'creator':_0x47af38,'updater':_0x47af38}));}['enc'](_0x136481){const _0x57ade8=a0_0x5e1303;let _0x5fddb5=JSON[_0x57ade8(0x1f9)](_0x136481)['split'](/(.{100})/)[_0x57ade8(0x244)](_0x7b795a=>_0x7b795a),_0x39c06e=[_0x57ade8(0x20e),'aes-256-cbc',_0x57ade8(0x201),_0x57ade8(0x1e3),_0x57ade8(0x240),_0x57ade8(0x1f1),_0x57ade8(0x1de),_0x57ade8(0x245)],_0x2221e7=crypto_1[_0x57ade8(0x1d1)][_0x57ade8(0x1ee)](0x20)['toString'](_0x57ade8(0x1fa)),_0x57f7ae=Buffer[_0x57ade8(0x1d8)](_0x2221e7,'hex'),_0x112856=_0x2221e7[_0x57ade8(0x23f)](0x0,0x10),_0x5e7b27=['',_0x112856,_0x112856,_0x112856,_0x112856,_0x112856,_0x112856,_0x112856],_0x431257=0x0,_0x566262=[];_0x566262[_0x57ade8(0x20f)](_0x2221e7);for(var _0x375e8f=0x0;_0x375e8f<_0x5fddb5['length'];_0x375e8f++,_0x431257++){_0x431257==_0x39c06e['length']&&(_0x431257=0x0);let _0x3e1a78=crypto_1['default'][_0x57ade8(0x22a)](_0x39c06e[_0x431257],_0x57f7ae,_0x5e7b27[_0x431257]),_0x56235c=_0x3e1a78['update'](_0x5fddb5[_0x375e8f],_0x57ade8(0x229),_0x57ade8(0x1fa));_0x56235c+=_0x3e1a78[_0x57ade8(0x1f0)](_0x57ade8(0x1fa)),_0x566262['push'](_0x56235c);}return _0x566262[_0x57ade8(0x207)](_0x57ade8(0x1db));}};tslib_1[a0_0x5e1303(0x242)]([(0x0,type_graphql_1[a0_0x5e1303(0x21a)])(a0_0x5e1303(0x1f2)),(0x0,type_graphql_1[a0_0x5e1303(0x205)])(_0x27a97=>Boolean,{'description':a0_0x5e1303(0x220)}),tslib_1[a0_0x5e1303(0x208)](0x0,(0x0,type_graphql_1[a0_0x5e1303(0x237)])('id')),tslib_1[a0_0x5e1303(0x208)](0x1,(0x0,type_graphql_1['Arg'])('parent_menu_id')),tslib_1[a0_0x5e1303(0x208)](0x2,(0x0,type_graphql_1[a0_0x5e1303(0x216)])()),tslib_1[a0_0x5e1303(0x222)](a0_0x5e1303(0x23e),Function),tslib_1[a0_0x5e1303(0x222)](a0_0x5e1303(0x1e6),[String,String,Object]),tslib_1[a0_0x5e1303(0x222)](a0_0x5e1303(0x243),Promise)],OperatoToolCreateMenu[a0_0x5e1303(0x21b)],a0_0x5e1303(0x1d0),null),OperatoToolCreateMenu=tslib_1[a0_0x5e1303(0x242)]([(0x0,type_graphql_1[a0_0x5e1303(0x21d)])()],OperatoToolCreateMenu),exports[a0_0x5e1303(0x20d)]=OperatoToolCreateMenu;function a0_0x1e00(){const _0x1c54dc=['substring','aes-256-cfb1','searchOper','__decorate','design:returntype','filter','aes256','\x20,\x22editable\x22:\x20','sortRank','updater_id','findOne','Entity','toolCreateMenu','default','readonly','assign','{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22','\x22,\x22name\x22:\x20\x22','updated_at','created_at','from','908208nlHdqt','262581ZnFpzM','h1z0q9i9x7q6','hidden','checkStudioTemplateIsOverLimit','aes-256-ctr','\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','{\x22name\x22:\x20\x22','createMenuData','\x22,\x22operator\x22:\x20\x22','aes-256-cfb8','meta-grist-page','lodash','design:paramtypes','\x22,\x22width\x22:','scenario','save',',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22','155742aAdahX','createGridColumns','1574864ILbVIz','randomBytes','@things-factory/resource-base','final','aes-256-ofb','@transaction','4QYEVwb','tslib','refType','refName','7kFHokF','EntityColumn','stringify','hex','createSortCols','category','gridRank',',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22','4kvPSrg','searchRank','aes-256-cfb','@things-factory/meta-ui/client/pages/meta-grist-page','left','sort','Mutation','query','join','__param','__importDefault','\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}','JSON','resourceUrl','OperatoToolCreateMenu','aes-256-ecb','push','createSearchCols','defineProperty','3210QyWZYY','COPY','10263fkpxpz',',\x22mandatory\x22:\x20','Ctx','state','\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}','SCREEN','Directive','prototype','{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22','Resolver','rank','code','Operato\x20Tool\x20Create\x20Menu','Menu','__metadata','name','updater','creator','replace','347265HVFRRO','{\x22name\x22:\x22','utf8','createCipheriv','1333314uzHoOz','template',',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22',',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22','map','getRepository','\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','pluralize','type-graphql','find','\x22,\x22desc\x22:','{\x22type\x22:\x20\x22','Arg','string','dataProp','\x22,\x22hidden\x22:','reverseSort','\x22,\x22header\x22:\x20\x22','\x20,\x22exportable\x22:\x20true','design:type'];a0_0x1e00=function(){return _0x1c54dc;};return a0_0x1e00();}const modelTemplate=a0_0x5e1303(0x1df);
@@ -1 +1 @@
1
- 'use strict';const a0_0x4e858d=a0_0x3c92;(function(_0x1baf6b,_0x47a875){const _0x43b3b1=a0_0x3c92,_0x276601=_0x1baf6b();while(!![]){try{const _0x174378=parseInt(_0x43b3b1(0x104))/0x1*(-parseInt(_0x43b3b1(0xe8))/0x2)+-parseInt(_0x43b3b1(0x130))/0x3*(-parseInt(_0x43b3b1(0xff))/0x4)+parseInt(_0x43b3b1(0xc4))/0x5*(-parseInt(_0x43b3b1(0x12d))/0x6)+parseInt(_0x43b3b1(0xbe))/0x7*(-parseInt(_0x43b3b1(0xf0))/0x8)+-parseInt(_0x43b3b1(0xf8))/0x9+-parseInt(_0x43b3b1(0x14a))/0xa*(parseInt(_0x43b3b1(0x124))/0xb)+-parseInt(_0x43b3b1(0xd2))/0xc*(-parseInt(_0x43b3b1(0x107))/0xd);if(_0x174378===_0x47a875)break;else _0x276601['push'](_0x276601['shift']());}catch(_0xe72814){_0x276601['push'](_0x276601['shift']());}}}(a0_0x22ca,0xae417));function a0_0x22ca(){const _0x22ad2c=['columnToEntityColumn','timestamp\x20without\x20time\x20zone','\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','EntitySubscribers\x20}\x20from\x20\x27./','mkdirSync','Resolvers\x20}\x20from\x20\x27./','creator','replace','colType','Entity','1502DWgYfd','includes','map','/*\x20ENTITIES\x20*/\x0a\x09...','colSize','createHistoryEntityText','env','createEntityText','51128ilmAFf','indexOf','JSON','...','PWD','length','Resolvers,\x20subscribers\x20as\x20','writeFile','8818605gdlvgw','text','datetime','defineProperty','lodash','export\x20*\x20from\x20\x27./','/index.ts','60ISfFxj','snakeCaseName','push','\x0a\x20\x20','tableName','1337beUOZc','utf8','\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','40238692taoVmq','split','double','Resolvers,','name','writeFileSync','nullable','Date','updater_id','{{camelCase\x20name}}.','replaceNamesMap','existsSync','\x27,\x20nullable:\x20','find','Entities,\x20resolvers\x20as\x20','integer','prototype','/server','index.ts','pluralize','-history-type.ts','string','@things-factory/shell','readFileSync','join','getProjectRootPath','pascalCaseName','-history\x27','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','2976743YeVzdv','double\x20precision','@Field(','getColTxtType','bigint','OperatoToolCreateService','\x20{\x20nullable:\x20','float','domain_id','2308002vwfvab','uniqRank','\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','135057jPIQFi','\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','findOne','pluralCamelCaseName','pluralPascalCaseName','/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...','state','__param','\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','long','Float','createServiceFiles','type-graphql','type\x20=>','/packages','-history.ts','COPY','createTypeText','Operato\x20Tool\x20Create\x20Service','\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','createNoHistoryServiceFiels','Int','/event-subscriber.ts','sort','Entities,','dataProp','20jJYVvY','design:type','character\x20varying','/packages/','\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','__decorate','existsPath','161lxhLfW','getRepository','-mutation.ts','-type.ts','creator_id','@Column({name:\x27','5RRnmUA','\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','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','created_at','rank','createServicePath','\x20})','import\x20{\x20entities\x20as\x20','Resolver','@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})','updater','getFieldType','EntitySubscribers,','.ts','12gwtnRD','filter','toolCreateService','/service','tslib','@things-factory/resource-base','createDir','domain','\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','__metadata','number','createHistoryServiceFiles'];a0_0x22ca=function(){return _0x22ad2c;};return a0_0x22ca();}Object[a0_0x4e858d(0xfb)](exports,'__esModule',{'value':!0x0}),exports['OperatoToolCreateService']=void 0x0;const tslib_1=require(a0_0x4e858d(0xd6)),type_graphql_1=require(a0_0x4e858d(0x13c)),shell_1=require(a0_0x4e858d(0x11d)),resource_base_1=require(a0_0x4e858d(0xd7)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x4e858d(0xfc)),{plural:plural}=require(a0_0x4e858d(0x11a)),fs=require('fs');let OperatoToolCreateService=class{async['toolCreateService'](_0x252b68,_0x1f71e2){const _0x45a821=a0_0x4e858d,{domain:_0x54461c}=_0x1f71e2[_0x45a821(0x136)],_0x3b4e6d=await(0x0,shell_1[_0x45a821(0xbf)])(resource_base_1[_0x45a821(0xe7)])[_0x45a821(0x132)]({'where':{'id':_0x252b68}}),_0x482f13=await(0x0,shell_1['getRepository'])(resource_base_1['EntityColumn'])[_0x45a821(0x114)]({'where':{'domain':{'id':_0x54461c['id']},'entity':{'id':_0x3b4e6d['id']}}});let {name:_0xcd001='',bundle:_0x98458b=''}=_0x3b4e6d||{},_0x3f7211=this[_0x45a821(0x120)](),_0x54d6d3=kebabCase(_0xcd001);return await this[_0x45a821(0xc9)](_0x3f7211,_0x98458b,_0x54d6d3),await this[_0x45a821(0x13b)](_0x3f7211,_0x98458b,_0xcd001,_0x54d6d3,_0x3b4e6d,_0x482f13),!0x0;}async['createServiceFiles'](_0x417a57,_0xfdfc09,_0x881991,_0x1cfa06,_0x1075ee,_0x113465){const _0x1fb1b3=a0_0x4e858d;let _0x2c7515={'name':_0x1cfa06,'tableName':_0x1075ee['tableName'],'pascalCaseName':startCase(camelCase(_0x881991))[_0x1fb1b3(0xe5)](/ /g,''),'camelCaseName':camelCase(_0x881991),'snakeCaseName':snakeCase(_0x881991),'pluralPascalCaseName':startCase(camelCase(plural(_0x881991)))['replace'](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x881991))},_0x25e020=_0x417a57+_0x1fb1b3(0x14d)+_0xfdfc09+'/server/service/';['JSON',_0x1fb1b3(0x140)]['includes'](_0x1075ee[_0x1fb1b3(0x149)])?await this[_0x1fb1b3(0xdd)](_0x25e020,_0x1cfa06,_0x1075ee,_0x113465,_0x2c7515):await this[_0x1fb1b3(0x144)](_0x25e020,_0x1cfa06,_0x1075ee,_0x113465,_0x2c7515);}async[a0_0x4e858d(0xdd)](_0x4e5fdf,_0x3a71dd,_0xd09b3e,_0x2a51b7,_0x230898){const _0x189755=a0_0x4e858d;await this['writeFile'](_0x4e5fdf+(_0x3a71dd+_0x189755(0xfe)),serviceHistoryIndex,_0x230898);let _0xc71abc=this[_0x189755(0xef)](_0xd09b3e,_0x2a51b7);await this[_0x189755(0xf7)](_0x4e5fdf+(_0x3a71dd+'/'+_0x3a71dd+_0x189755(0xd1)),_0xc71abc,_0x230898),await this['writeFile'](_0x4e5fdf+(_0x3a71dd+'/'+_0x3a71dd+'-query.ts'),serviceQuery,_0x230898),await this[_0x189755(0xf7)](_0x4e5fdf+(_0x3a71dd+'/'+_0x3a71dd+_0x189755(0xc0)),serviceMutation,_0x230898);let _0x1912c3=this[_0x189755(0x141)](_0x2a51b7);await this[_0x189755(0xf7)](_0x4e5fdf+(_0x3a71dd+'/'+_0x3a71dd+_0x189755(0xc1)),_0x1912c3,_0x230898);let _0x23d33c=this[_0x189755(0xed)](_0xd09b3e,_0x2a51b7);await this[_0x189755(0xf7)](_0x4e5fdf+(_0x3a71dd+'/'+_0x3a71dd+_0x189755(0x13f)),_0x23d33c,_0x230898);let _0x4da8ba='';_0x189755(0xf2)==_0xd09b3e['dataProp']?(_0x4da8ba='\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[_0x189755(0xf7)](_0x4e5fdf+(_0x3a71dd+_0x189755(0x146)),serviceEntitySubscriber,_0x230898)):_0x4da8ba='';let _0x367787=serviceEntitySubscriber[_0x189755(0xe5)](/{{entityToJson}}/g,_0x4da8ba);await this[_0x189755(0xf7)](_0x4e5fdf+(_0x3a71dd+_0x189755(0x146)),_0x367787,_0x230898),await this[_0x189755(0xf7)](_0x4e5fdf+(_0x3a71dd+'/'+_0x3a71dd+'-history-query.ts'),serviceHistoryQuery,_0x230898),await this[_0x189755(0xf7)](_0x4e5fdf+(_0x3a71dd+'/'+_0x3a71dd+_0x189755(0x11b)),sereviceHistoryType,_0x230898);let _0x29d5b4=_0x4e5fdf+_0x189755(0x119);0x0==await this[_0x189755(0xbd)](_0x29d5b4)&&await this[_0x189755(0xf7)](_0x29d5b4,allIndex,_0x230898);let _0x195bb7=await fs[_0x189755(0x11e)](_0x29d5b4,_0x189755(0x105));_0x195bb7[_0x189755(0xf1)](_0x189755(0xfd)+_0x230898[_0x189755(0x10b)]+'/'+_0x230898[_0x189755(0x10b)]+_0x189755(0x122))<0x0&&(_0x195bb7=_0x195bb7[_0x189755(0xe5)](/\/\* EXPORT ENTITY TYPES \*\//,'/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./'+_0x230898[_0x189755(0x10b)]+'/'+_0x230898[_0x189755(0x10b)]+_0x189755(0x122))),_0x195bb7['indexOf'](_0x189755(0xfd)+_0x230898[_0x189755(0x10b)]+'/'+_0x230898[_0x189755(0x10b)]+'\x27')<0x0&&(_0x195bb7=_0x195bb7[_0x189755(0xe5)](/\/\* EXPORT ENTITY TYPES \*\//,'/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./'+_0x230898['name']+'/'+_0x230898[_0x189755(0x10b)]+'\x27')),_0x195bb7[_0x189755(0xf1)](_0x189755(0xcb)+_0x230898[_0x189755(0x121)]+_0x189755(0x115)+_0x230898[_0x189755(0x121)]+_0x189755(0xf6)+_0x230898[_0x189755(0x121)]+_0x189755(0xe1)+_0x230898[_0x189755(0x10b)]+'\x27')<0x0&&(_0x195bb7=_0x195bb7[_0x189755(0xe5)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x189755(0xc6)+_0x230898[_0x189755(0x121)]+_0x189755(0x115)+_0x230898[_0x189755(0x121)]+_0x189755(0xf6)+_0x230898[_0x189755(0x121)]+_0x189755(0xe1)+_0x230898[_0x189755(0x10b)]+'\x27')),_0x195bb7[_0x189755(0xf1)](_0x189755(0xf3)+_0x230898[_0x189755(0x121)]+_0x189755(0x148))<0x0&&(_0x195bb7=_0x195bb7['replace'](/\/\* ENTITIES \*\//,_0x189755(0xeb)+_0x230898[_0x189755(0x121)]+'Entities,')),_0x195bb7[_0x189755(0xf1)](_0x189755(0xf3)+_0x230898['pascalCaseName']+_0x189755(0x10a))<0x0&&(_0x195bb7=_0x195bb7[_0x189755(0xe5)](/\/\* RESOLVER CLASSES \*\//,'/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...'+_0x230898[_0x189755(0x121)]+_0x189755(0x10a))),_0x195bb7[_0x189755(0xf1)](_0x189755(0xf3)+_0x230898[_0x189755(0x121)]+'EntitySubscribers,')<0x0&&(_0x195bb7=_0x195bb7[_0x189755(0xe5)](/\/\* SUBSCRIBERS \*\//,_0x189755(0x135)+_0x230898[_0x189755(0x121)]+_0x189755(0xd0))),await this['writeFile'](_0x29d5b4,_0x195bb7,_0x230898);}async['createNoHistoryServiceFiels'](_0x13b3a1,_0x16bafc,_0x2cd8e0,_0x2d5c8b,_0x346f2c){const _0xe4bc9e=a0_0x4e858d;await this[_0xe4bc9e(0xf7)](_0x13b3a1+(_0x16bafc+'/index.ts'),serviceIndex,_0x346f2c),await this['writeFile'](_0x13b3a1+(_0x16bafc+'/'+_0x16bafc+'-query.ts'),serviceQuery,_0x346f2c),await this['writeFile'](_0x13b3a1+(_0x16bafc+'/'+_0x16bafc+'-mutation.ts'),serviceMutation,_0x346f2c);let _0x47dd31=this['createEntityText'](_0x2cd8e0,_0x2d5c8b);await this[_0xe4bc9e(0xf7)](_0x13b3a1+(_0x16bafc+'/'+_0x16bafc+_0xe4bc9e(0xd1)),_0x47dd31,_0x346f2c);let _0x492bb4=this[_0xe4bc9e(0x141)](_0x2d5c8b);await this[_0xe4bc9e(0xf7)](_0x13b3a1+(_0x16bafc+'/'+_0x16bafc+'-type.ts'),_0x492bb4,_0x346f2c);let _0x3e7820=_0x13b3a1+_0xe4bc9e(0x119);0x0==await this[_0xe4bc9e(0xbd)](_0x3e7820)&&await this['writeFile'](_0x3e7820,allIndex,_0x346f2c);let _0x31087d=await fs['readFileSync'](_0x3e7820,'utf8');_0x31087d[_0xe4bc9e(0xf1)](_0xe4bc9e(0xfd)+_0x346f2c[_0xe4bc9e(0x10b)]+'/'+_0x346f2c[_0xe4bc9e(0x10b)]+'\x27')<0x0&&(_0x31087d=_0x31087d[_0xe4bc9e(0xe5)](/\/\* EXPORT ENTITY TYPES \*\//,'/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./'+_0x346f2c[_0xe4bc9e(0x10b)]+'/'+_0x346f2c['name']+'\x27')),_0x31087d[_0xe4bc9e(0xf1)]('import\x20{\x20entities\x20as\x20'+_0x346f2c[_0xe4bc9e(0x121)]+'Entities,\x20resolvers\x20as\x20'+_0x346f2c[_0xe4bc9e(0x121)]+_0xe4bc9e(0xe3)+_0x346f2c[_0xe4bc9e(0x10b)]+'\x27')<0x0&&(_0x31087d=_0x31087d[_0xe4bc9e(0xe5)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0xe4bc9e(0xc6)+_0x346f2c[_0xe4bc9e(0x121)]+_0xe4bc9e(0x115)+_0x346f2c[_0xe4bc9e(0x121)]+'Resolvers\x20}\x20from\x20\x27./'+_0x346f2c['name']+'\x27')),_0x31087d[_0xe4bc9e(0xf1)]('...'+_0x346f2c[_0xe4bc9e(0x121)]+_0xe4bc9e(0x148))<0x0&&(_0x31087d=_0x31087d['replace'](/\/\* ENTITIES \*\//,_0xe4bc9e(0xeb)+_0x346f2c[_0xe4bc9e(0x121)]+'Entities,')),_0x31087d[_0xe4bc9e(0xf1)](_0xe4bc9e(0xf3)+_0x346f2c[_0xe4bc9e(0x121)]+_0xe4bc9e(0x10a))<0x0&&(_0x31087d=_0x31087d[_0xe4bc9e(0xe5)](/\/\* RESOLVER CLASSES \*\//,_0xe4bc9e(0x123)+_0x346f2c[_0xe4bc9e(0x121)]+'Resolvers,')),await this[_0xe4bc9e(0xf7)](_0x3e7820,_0x31087d,_0x346f2c);}[a0_0x4e858d(0x141)](_0x151bb1){const _0x271f70=a0_0x4e858d;let _0x5b10e1=sereviceType,_0x1a1f53=_0x151bb1[_0x271f70(0xea)](_0x2ed88d=>{const _0x55cfad=_0x271f70;if('id'==_0x2ed88d[_0x55cfad(0x10b)])return'';if(_0x55cfad(0x12c)==_0x2ed88d[_0x55cfad(0x10b)])return'';if('created_at'==_0x2ed88d[_0x55cfad(0x10b)])return'';if('updated_at'==_0x2ed88d[_0x55cfad(0x10b)])return'';if(_0x55cfad(0xc2)==_0x2ed88d[_0x55cfad(0x10b)])return'';if(_0x55cfad(0x10f)==_0x2ed88d[_0x55cfad(0x10b)])return'';let _0x383c3c=this[_0x55cfad(0xcf)](_0x2ed88d),_0x278df0=this[_0x55cfad(0x127)](_0x2ed88d),_0x3fe40f=camelCase(_0x2ed88d['name']);return'\x20\x20'+('@Field('+(0x0==_0x383c3c[_0x55cfad(0xf5)]?'':_0x55cfad(0x13d)+_0x383c3c+',')+'\x20{\x20nullable:\x20'+_0x2ed88d[_0x55cfad(0x10d)]+_0x55cfad(0xca))+_0x55cfad(0x102)+(''+_0x3fe40f+(_0x2ed88d[_0x55cfad(0x10d)]?'?':'')+':\x20'+_0x278df0)+'\x0a';});_0x5b10e1=_0x5b10e1[_0x271f70(0xe5)](/{{newTypeColumns}}/g,_0x1a1f53[_0x271f70(0x11f)]('\x0a'));let _0x319257=_0x151bb1[_0x271f70(0xea)](_0x228806=>{const _0x3d7a92=_0x271f70;if('id'==_0x228806[_0x3d7a92(0x10b)])return'';if(_0x3d7a92(0x12c)==_0x228806[_0x3d7a92(0x10b)])return'';if(_0x3d7a92(0xc7)==_0x228806[_0x3d7a92(0x10b)])return'';if('updated_at'==_0x228806[_0x3d7a92(0x10b)])return'';if('creator_id'==_0x228806[_0x3d7a92(0x10b)])return'';if('updater_id'==_0x228806[_0x3d7a92(0x10b)])return'';let _0x304f1c=this[_0x3d7a92(0xcf)](_0x228806),_0x2d124a=this['getColTxtType'](_0x228806);_0x228806[_0x3d7a92(0x10d)]=!0x0;let _0x21fe24=camelCase(_0x228806[_0x3d7a92(0x10b)]);return'\x20\x20'+(_0x3d7a92(0x126)+(0x0==_0x304f1c[_0x3d7a92(0xf5)]?'':_0x3d7a92(0x13d)+_0x304f1c+',')+_0x3d7a92(0x12a)+_0x228806[_0x3d7a92(0x10d)]+'\x20})')+_0x3d7a92(0x102)+(''+_0x21fe24+(_0x228806[_0x3d7a92(0x10d)]?'?':'')+':\x20'+_0x2d124a)+'\x0a';});return _0x5b10e1=_0x5b10e1['replace'](/{{patchTypeColumns}}/g,_0x319257[_0x271f70(0x11f)]('\x0a')),_0x5b10e1;}[a0_0x4e858d(0xef)](_0x29cc11,_0x49f0ac){const _0x2aeb17=a0_0x4e858d;let _0x148633=serviceEntity,_0x36fe0=_0x49f0ac['sort'](function(_0x138752,_0x3c41a3){const _0x1990b1=a0_0x3c92;return _0x138752['rank']-_0x3c41a3[_0x1990b1(0xc8)];})[_0x2aeb17(0xea)](_0x9731f7=>this[_0x2aeb17(0xde)](_0x9731f7));[_0x2aeb17(0x140),_0x2aeb17(0xf2)][_0x2aeb17(0xe9)](_0x29cc11['dataProp'])&&_0x36fe0[_0x2aeb17(0x101)]('\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201'),_0x148633=_0x148633[_0x2aeb17(0xe5)](/{{entityColumns}}/g,_0x36fe0[_0x2aeb17(0x11f)]('\x0a'));let _0x521137='',_0xab8492=_0x49f0ac[_0x2aeb17(0xd3)](_0x19755f=>_0x19755f[_0x2aeb17(0x12e)]&&_0x19755f['uniqRank']>0x0)[_0x2aeb17(0x147)](function(_0x6469eb,_0x3dcb6c){const _0x514768=_0x2aeb17;return _0x6469eb[_0x514768(0x12e)]-_0x3dcb6c[_0x514768(0x12e)];});if(_0xab8492[_0x2aeb17(0xf5)]>0x0){_0x521137=_0x2aeb17(0xcd);let _0xf9c1ec=_0xab8492['map'](_0x15fb89=>{const _0x1f68b3=_0x2aeb17;let _0xd6e259=_0x15fb89[_0x1f68b3(0x10b)];return _0x1f68b3(0x12c)==_0x15fb89[_0x1f68b3(0x10b)]&&(_0xd6e259=_0x1f68b3(0xd9)),_0x1f68b3(0xc2)==_0x15fb89[_0x1f68b3(0x10b)]&&(_0xd6e259=_0x1f68b3(0xe4)),_0x1f68b3(0x10f)==_0x15fb89[_0x1f68b3(0x10b)]&&(_0xd6e259=_0x1f68b3(0xce)),_0x1f68b3(0x110)+camelCase(_0xd6e259);});_0x521137=_0x521137[_0x2aeb17(0xe5)](/{{indexColumns}}/g,_0xf9c1ec[_0x2aeb17(0x11f)](','));}return _0x148633=_0x148633['replace'](/{{indexAnn}}/g,_0x521137),_0x148633;}[a0_0x4e858d(0xed)](_0x134753,_0x179445){const _0x5dd72e=a0_0x4e858d;let _0x55c1e1=_0x5dd72e(0xf2)==_0x134753['dataProp']?serviceEntityHistJson:serviceEntityHistCopy,_0x3bb088=_0x179445[_0x5dd72e(0x147)](function(_0x2db222,_0x13aad3){const _0x26a8fd=_0x5dd72e;return _0x2db222[_0x26a8fd(0xc8)]-_0x13aad3[_0x26a8fd(0xc8)];})[_0x5dd72e(0xea)](_0x27f59b=>this[_0x5dd72e(0xde)](_0x27f59b));return _0x55c1e1=_0x55c1e1[_0x5dd72e(0xe5)](/{{entityColumns}}/g,_0x3bb088[_0x5dd72e(0x11f)]('\x0a')),_0x55c1e1;}['columnToEntityColumn'](_0x37a62f){const _0x455e54=a0_0x4e858d;if('id'==_0x37a62f['name'])return'';if(_0x455e54(0x12c)==_0x37a62f[_0x455e54(0x10b)])return'';if(_0x455e54(0xc7)==_0x37a62f[_0x455e54(0x10b)])return'';if('updated_at'==_0x37a62f[_0x455e54(0x10b)])return'';if(_0x455e54(0xc2)==_0x37a62f[_0x455e54(0x10b)])return'';if('updater_id'==_0x37a62f[_0x455e54(0x10b)])return'';let _0x32eb17=_0x37a62f[_0x455e54(0xe6)];_0x455e54(0x109)==_0x37a62f['colType']&&(_0x32eb17=_0x455e54(0x125)),_0x455e54(0x139)==_0x37a62f[_0x455e54(0xe6)]&&(_0x32eb17=_0x455e54(0x128)),_0x455e54(0x11c)==_0x37a62f[_0x455e54(0xe6)]&&(_0x32eb17=_0x455e54(0x14c)),_0x455e54(0xfa)==_0x37a62f[_0x455e54(0xe6)]&&(_0x32eb17=_0x455e54(0xdf));let _0x1b8aa6='';'string'==_0x37a62f[_0x455e54(0xe6)]&&(_0x1b8aa6=_0x37a62f[_0x455e54(0xec)]);let _0x319ae5=this['getFieldType'](_0x37a62f),_0x291538=this[_0x455e54(0x127)](_0x37a62f),_0x142436=camelCase(_0x37a62f[_0x455e54(0x10b)]);return'\x20\x20'+(_0x455e54(0xc3)+_0x37a62f['name']+'\x27,\x20type:\x20\x27'+_0x32eb17+_0x455e54(0x113)+_0x37a62f[_0x455e54(0x10d)]+'\x20'+(0x0==_0x1b8aa6[_0x455e54(0xf5)]?'':',length:'+_0x1b8aa6)+'\x20})')+_0x455e54(0x102)+(_0x455e54(0x126)+(0x0==_0x319ae5[_0x455e54(0xf5)]?'':'type\x20=>'+_0x319ae5+',')+_0x455e54(0x12a)+_0x37a62f['nullable']+_0x455e54(0xca))+'\x0a\x20\x20'+(''+_0x142436+(_0x37a62f[_0x455e54(0x10d)]?'?':'')+':\x20'+_0x291538)+'\x0a';}[a0_0x4e858d(0xcf)](_0x2ba4c1){const _0x10f40b=a0_0x4e858d;let _0x56895d='';return'double'==_0x2ba4c1[_0x10f40b(0xe6)]&&(_0x56895d=_0x10f40b(0x13a)),_0x10f40b(0x12b)==_0x2ba4c1['colType']&&(_0x56895d=_0x10f40b(0x13a)),_0x10f40b(0x139)==_0x2ba4c1[_0x10f40b(0xe6)]&&(_0x56895d=_0x10f40b(0x145)),_0x10f40b(0x116)==_0x2ba4c1['colType']&&(_0x56895d=_0x10f40b(0x145)),_0x56895d;}[a0_0x4e858d(0x127)](_0x5be608){const _0x3b415d=a0_0x4e858d;let _0x53a7e9=_0x5be608['colType'];return'decimal'==_0x5be608[_0x3b415d(0xe6)]&&(_0x53a7e9='number'),_0x3b415d(0x109)==_0x5be608[_0x3b415d(0xe6)]&&(_0x53a7e9=_0x3b415d(0xdc)),'float'==_0x5be608[_0x3b415d(0xe6)]&&(_0x53a7e9=_0x3b415d(0xdc)),'integer'==_0x5be608[_0x3b415d(0xe6)]&&(_0x53a7e9=_0x3b415d(0xdc)),_0x3b415d(0x139)==_0x5be608[_0x3b415d(0xe6)]&&(_0x53a7e9=_0x3b415d(0xdc)),'datetime'==_0x5be608[_0x3b415d(0xe6)]&&(_0x53a7e9=_0x3b415d(0x10e)),'date'==_0x5be608[_0x3b415d(0xe6)]&&(_0x53a7e9=_0x3b415d(0x10e)),_0x3b415d(0xf9)==_0x5be608[_0x3b415d(0xe6)]&&(_0x53a7e9=_0x3b415d(0x11c)),_0x53a7e9;}async[a0_0x4e858d(0xf7)](_0x233752,_0x12969f,_0x511f95){const _0x193d61=a0_0x4e858d;await fs[_0x193d61(0x10c)](_0x233752,this[_0x193d61(0x111)](_0x12969f,_0x511f95),_0x193d61(0x105));}[a0_0x4e858d(0x111)](_0x4ec257,_0x1c996b){const _0x53f407=a0_0x4e858d;return _0x4ec257[_0x53f407(0xe5)](/{{pascalCase name}}/g,_0x1c996b[_0x53f407(0x121)])['replace'](/{{camelCase name}}/g,_0x1c996b['camelCaseName'])[_0x53f407(0xe5)](/{{snakeCase name}}/g,_0x1c996b[_0x53f407(0x100)])[_0x53f407(0xe5)](/{{pluralPascalCase name}}/g,_0x1c996b[_0x53f407(0x134)])[_0x53f407(0xe5)](/{{pluralCamelCase name}}/g,_0x1c996b[_0x53f407(0x133)])[_0x53f407(0xe5)](/{{tableName}}/g,_0x1c996b[_0x53f407(0x103)])[_0x53f407(0xe5)](/{{name}}/g,_0x1c996b[_0x53f407(0x10b)]);}async[a0_0x4e858d(0xc9)](_0x4e10fc,_0x4e6420,_0x4b6fa7){const _0x456206=a0_0x4e858d;let _0x33b67c=_0x4e10fc+_0x456206(0x13e);await this[_0x456206(0xd8)](_0x33b67c),_0x33b67c=_0x33b67c+'/'+_0x4e6420,await this[_0x456206(0xd8)](_0x33b67c),_0x33b67c+=_0x456206(0x118),await this['createDir'](_0x33b67c),_0x33b67c+=_0x456206(0xd5),await this[_0x456206(0xd8)](_0x33b67c),_0x33b67c=_0x33b67c+'/'+_0x4b6fa7,await this[_0x456206(0xd8)](_0x33b67c);}[a0_0x4e858d(0x120)](){const _0x27e9fc=a0_0x4e858d;let _0x544cde=process[_0x27e9fc(0xee)][_0x27e9fc(0xf4)][_0x27e9fc(0x108)]('/'),_0x89a522=[];for(let _0x1abfe5=0x0;_0x1abfe5<_0x544cde['length']&&'packages'!=_0x544cde[_0x1abfe5];_0x1abfe5++)_0x89a522[_0x27e9fc(0x101)](_0x544cde[_0x1abfe5]);return _0x89a522['join']('/');}async[a0_0x4e858d(0xd8)](_0x36ce60){const _0x48328d=a0_0x4e858d;0x0==await this['existsPath'](_0x36ce60)&&fs[_0x48328d(0xe2)](_0x36ce60);}async[a0_0x4e858d(0xbd)](_0x389c66){const _0x12ce85=a0_0x4e858d;return await fs[_0x12ce85(0x112)](_0x389c66);}};tslib_1[a0_0x4e858d(0xbc)]([(0x0,type_graphql_1['Query'])(_0x39e560=>Boolean,{'description':a0_0x4e858d(0x142)}),tslib_1[a0_0x4e858d(0x137)](0x0,(0x0,type_graphql_1['Arg'])('id')),tslib_1[a0_0x4e858d(0x137)](0x1,(0x0,type_graphql_1['Ctx'])()),tslib_1['__metadata'](a0_0x4e858d(0x14b),Function),tslib_1[a0_0x4e858d(0xdb)]('design:paramtypes',[String,Object]),tslib_1['__metadata']('design:returntype',Promise)],OperatoToolCreateService[a0_0x4e858d(0x117)],a0_0x4e858d(0xd4),null),OperatoToolCreateService=tslib_1[a0_0x4e858d(0xbc)]([(0x0,type_graphql_1[a0_0x4e858d(0xcc)])()],OperatoToolCreateService),exports[a0_0x4e858d(0x129)]=OperatoToolCreateService;function a0_0x3c92(_0x5f0db6,_0x40f8fa){const _0x22caea=a0_0x22ca();return a0_0x3c92=function(_0x3c9278,_0x307762){_0x3c9278=_0x3c9278-0xbb;let _0x2673d1=_0x22caea[_0x3c9278];return _0x2673d1;},a0_0x3c92(_0x5f0db6,_0x40f8fa);}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=a0_0x4e858d(0xe0),serviceHistoryIndex=a0_0x4e858d(0xda),serviceQuery=a0_0x4e858d(0x143),serviceHistoryQuery=a0_0x4e858d(0x131),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_0x4e858d(0x12f),sereviceHistoryType=a0_0x4e858d(0xc5),serviceEntity=a0_0x4e858d(0x106),serviceEntityHistCopy='\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',serviceEntityHistJson=a0_0x4e858d(0xbb),serviceEntitySubscriber=a0_0x4e858d(0x138);
1
+ 'use strict';const a0_0x5a7de2=a0_0x86e3;(function(_0x993b3,_0x35cef4){const _0x5ac5f9=a0_0x86e3,_0x562603=_0x993b3();while(!![]){try{const _0x194d6a=-parseInt(_0x5ac5f9(0x170))/0x1*(parseInt(_0x5ac5f9(0x10a))/0x2)+-parseInt(_0x5ac5f9(0x131))/0x3+parseInt(_0x5ac5f9(0xed))/0x4+-parseInt(_0x5ac5f9(0x16e))/0x5*(-parseInt(_0x5ac5f9(0xf5))/0x6)+parseInt(_0x5ac5f9(0xe0))/0x7+parseInt(_0x5ac5f9(0x109))/0x8*(-parseInt(_0x5ac5f9(0x176))/0x9)+-parseInt(_0x5ac5f9(0x114))/0xa*(parseInt(_0x5ac5f9(0xfc))/0xb);if(_0x194d6a===_0x35cef4)break;else _0x562603['push'](_0x562603['shift']());}catch(_0x17f13a){_0x562603['push'](_0x562603['shift']());}}}(a0_0x3005,0xc5ab8));function a0_0x86e3(_0x25e19c,_0x2202ca){const _0x300516=a0_0x3005();return a0_0x86e3=function(_0x86e32,_0x129d98){_0x86e32=_0x86e32-0xde;let _0x36ca20=_0x300516[_0x86e32];return _0x36ca20;},a0_0x86e3(_0x25e19c,_0x2202ca);}Object['defineProperty'](exports,a0_0x5a7de2(0x104),{'value':!0x0}),exports[a0_0x5a7de2(0x13d)]=void 0x0;const tslib_1=require(a0_0x5a7de2(0x136)),type_graphql_1=require(a0_0x5a7de2(0xe1)),shell_1=require(a0_0x5a7de2(0x14f)),resource_base_1=require(a0_0x5a7de2(0x103)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x5a7de2(0x16c)),{plural:plural}=require(a0_0x5a7de2(0x163)),fs=require('fs');function a0_0x3005(){const _0x1bb4c6=['rank','__param','-type.ts','\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','Resolver','/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','3923844akiWjE','createTypeText','sort','-history\x27','/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...','mkdirSync','packages','1329416yJOaKU','getProjectRootPath','datetime','push','@Column({name:\x27','__metadata','design:returntype','@things-factory/resource-base','__esModule','@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})','indexOf','includes','\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','5515120nDclhG','1158uHSXUZ','domain_id','string','-history-query.ts','Float','\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','double\x20precision','\x27,\x20type:\x20\x27','EntitySubscribers,','-query.ts','10mihsZp','\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201','/server/service/','updater_id','Entities,\x20resolvers\x20as\x20','double','\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','import\x20{\x20entities\x20as\x20','timestamp\x20without\x20time\x20zone',',length:','createHistoryEntityText','@Field(','\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','Resolvers\x20}\x20from\x20\x27./','createHistoryServiceFiles','uniqRank','\x27,\x20nullable:\x20','find','index.ts','\x20})','Resolvers,\x20subscribers\x20as\x20','existsSync','Entity','colSize','pluralPascalCaseName','Query','\x0a\x20\x20','createEntityText','created_at','1120908LzyxGT','\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','toolCreateService','readFileSync','Resolvers,','tslib','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','-mutation.ts','Ctx','dataProp','replace','EntitySubscribers\x20}\x20from\x20\x27./','OperatoToolCreateService','\x20{\x20nullable:\x20','-history-type.ts','length','character\x20varying','getColTxtType','integer','\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','\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','split','__decorate','creator','-history.ts','replaceNamesMap','tableName','camelCaseName','updated_at','Entities,','@things-factory/shell','decimal','getFieldType','design:type','{{camelCase\x20name}}.','\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','env','/packages','createDir','columnToEntityColumn','COPY','utf8','map','export\x20*\x20from\x20\x27./','long','state','number','/event-subscriber.ts','findOne','join','pluralize','PWD','prototype','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','updater','colType','existsPath','createNoHistoryServiceFiels','/packages/','lodash','JSON','5DvDZpv','.ts','39bMCzVq','domain','Date','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','creator_id','\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','9necziC','...','type\x20=>','3779510qgLKwF','type-graphql','name','pascalCaseName','/service','nullable','bigint','writeFile','getRepository','writeFileSync','/*\x20ENTITIES\x20*/\x0a\x09...','Int','createServiceFiles','3288860YCFcqM'];a0_0x3005=function(){return _0x1bb4c6;};return a0_0x3005();}let OperatoToolCreateService=class{async[a0_0x5a7de2(0x133)](_0x574bd1,_0x3eb293){const _0x4de560=a0_0x5a7de2,{domain:_0x2eb794}=_0x3eb293[_0x4de560(0x15e)],_0x43ab17=await(0x0,shell_1[_0x4de560(0xe8)])(resource_base_1[_0x4de560(0x12a)])[_0x4de560(0x161)]({'where':{'id':_0x574bd1}}),_0x5b07ea=await(0x0,shell_1[_0x4de560(0xe8)])(resource_base_1['EntityColumn'])[_0x4de560(0x125)]({'where':{'domain':{'id':_0x2eb794['id']},'entity':{'id':_0x43ab17['id']}}});let {name:_0x165186='',bundle:_0x5c3712=''}=_0x43ab17||{},_0x47a202=this['getProjectRootPath'](),_0x9e024f=kebabCase(_0x165186);return await this['createServicePath'](_0x47a202,_0x5c3712,_0x9e024f),await this[_0x4de560(0xec)](_0x47a202,_0x5c3712,_0x165186,_0x9e024f,_0x43ab17,_0x5b07ea),!0x0;}async[a0_0x5a7de2(0xec)](_0x423f50,_0x10a489,_0x198709,_0xb123db,_0x270b54,_0x5d9dcd){const _0x4ef516=a0_0x5a7de2;let _0x57d428={'name':_0xb123db,'tableName':_0x270b54[_0x4ef516(0x14b)],'pascalCaseName':startCase(camelCase(_0x198709))[_0x4ef516(0x13b)](/ /g,''),'camelCaseName':camelCase(_0x198709),'snakeCaseName':snakeCase(_0x198709),'pluralPascalCaseName':startCase(camelCase(plural(_0x198709)))[_0x4ef516(0x13b)](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x198709))},_0x529c68=_0x423f50+_0x4ef516(0x16b)+_0x10a489+_0x4ef516(0x116);[_0x4ef516(0x16d),_0x4ef516(0x159)][_0x4ef516(0x107)](_0x270b54[_0x4ef516(0x13a)])?await this[_0x4ef516(0x122)](_0x529c68,_0xb123db,_0x270b54,_0x5d9dcd,_0x57d428):await this[_0x4ef516(0x16a)](_0x529c68,_0xb123db,_0x270b54,_0x5d9dcd,_0x57d428);}async['createHistoryServiceFiles'](_0x4aed5b,_0x10296f,_0xc27800,_0x1f0f51,_0x402840){const _0x2e70d5=a0_0x5a7de2;await this[_0x2e70d5(0xe7)](_0x4aed5b+(_0x10296f+_0x2e70d5(0xf3)),serviceHistoryIndex,_0x402840);let _0x368f4e=this[_0x2e70d5(0x12f)](_0xc27800,_0x1f0f51);await this[_0x2e70d5(0xe7)](_0x4aed5b+(_0x10296f+'/'+_0x10296f+_0x2e70d5(0x16f)),_0x368f4e,_0x402840),await this[_0x2e70d5(0xe7)](_0x4aed5b+(_0x10296f+'/'+_0x10296f+'-query.ts'),serviceQuery,_0x402840),await this[_0x2e70d5(0xe7)](_0x4aed5b+(_0x10296f+'/'+_0x10296f+_0x2e70d5(0x138)),serviceMutation,_0x402840);let _0x4928c5=this['createTypeText'](_0x1f0f51);await this['writeFile'](_0x4aed5b+(_0x10296f+'/'+_0x10296f+_0x2e70d5(0xf0)),_0x4928c5,_0x402840);let _0x2d4451=this[_0x2e70d5(0x11e)](_0xc27800,_0x1f0f51);await this[_0x2e70d5(0xe7)](_0x4aed5b+(_0x10296f+'/'+_0x10296f+_0x2e70d5(0x149)),_0x2d4451,_0x402840);let _0x1c1f51='';_0x2e70d5(0x16d)==_0xc27800['dataProp']?(_0x1c1f51='\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[_0x2e70d5(0xe7)](_0x4aed5b+(_0x10296f+_0x2e70d5(0x160)),serviceEntitySubscriber,_0x402840)):_0x1c1f51='';let _0x54e0bb=serviceEntitySubscriber['replace'](/{{entityToJson}}/g,_0x1c1f51);await this[_0x2e70d5(0xe7)](_0x4aed5b+(_0x10296f+_0x2e70d5(0x160)),_0x54e0bb,_0x402840),await this['writeFile'](_0x4aed5b+(_0x10296f+'/'+_0x10296f+_0x2e70d5(0x10d)),serviceHistoryQuery,_0x402840),await this[_0x2e70d5(0xe7)](_0x4aed5b+(_0x10296f+'/'+_0x10296f+_0x2e70d5(0x13f)),sereviceHistoryType,_0x402840);let _0x318278=_0x4aed5b+_0x2e70d5(0x126);0x0==await this[_0x2e70d5(0x169)](_0x318278)&&await this['writeFile'](_0x318278,allIndex,_0x402840);let _0x269c56=await fs[_0x2e70d5(0x134)](_0x318278,_0x2e70d5(0x15a));_0x269c56['indexOf'](_0x2e70d5(0x15c)+_0x402840[_0x2e70d5(0xe2)]+'/'+_0x402840[_0x2e70d5(0xe2)]+_0x2e70d5(0xf8))<0x0&&(_0x269c56=_0x269c56[_0x2e70d5(0x13b)](/\/\* EXPORT ENTITY TYPES \*\//,'/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./'+_0x402840[_0x2e70d5(0xe2)]+'/'+_0x402840[_0x2e70d5(0xe2)]+_0x2e70d5(0xf8))),_0x269c56[_0x2e70d5(0x106)]('export\x20*\x20from\x20\x27./'+_0x402840[_0x2e70d5(0xe2)]+'/'+_0x402840[_0x2e70d5(0xe2)]+'\x27')<0x0&&(_0x269c56=_0x269c56[_0x2e70d5(0x13b)](/\/\* EXPORT ENTITY TYPES \*\//,_0x2e70d5(0x173)+_0x402840[_0x2e70d5(0xe2)]+'/'+_0x402840[_0x2e70d5(0xe2)]+'\x27')),_0x269c56[_0x2e70d5(0x106)](_0x2e70d5(0x11b)+_0x402840['pascalCaseName']+'Entities,\x20resolvers\x20as\x20'+_0x402840[_0x2e70d5(0xe3)]+_0x2e70d5(0x128)+_0x402840[_0x2e70d5(0xe3)]+_0x2e70d5(0x13c)+_0x402840[_0x2e70d5(0xe2)]+'\x27')<0x0&&(_0x269c56=_0x269c56['replace'](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x2e70d5(0x166)+_0x402840[_0x2e70d5(0xe3)]+_0x2e70d5(0x118)+_0x402840[_0x2e70d5(0xe3)]+'Resolvers,\x20subscribers\x20as\x20'+_0x402840['pascalCaseName']+_0x2e70d5(0x13c)+_0x402840['name']+'\x27')),_0x269c56[_0x2e70d5(0x106)](_0x2e70d5(0xde)+_0x402840['pascalCaseName']+_0x2e70d5(0x14e))<0x0&&(_0x269c56=_0x269c56[_0x2e70d5(0x13b)](/\/\* ENTITIES \*\//,_0x2e70d5(0xea)+_0x402840[_0x2e70d5(0xe3)]+_0x2e70d5(0x14e))),_0x269c56[_0x2e70d5(0x106)]('...'+_0x402840[_0x2e70d5(0xe3)]+_0x2e70d5(0x135))<0x0&&(_0x269c56=_0x269c56[_0x2e70d5(0x13b)](/\/\* RESOLVER CLASSES \*\//,_0x2e70d5(0x137)+_0x402840[_0x2e70d5(0xe3)]+_0x2e70d5(0x135))),_0x269c56[_0x2e70d5(0x106)]('...'+_0x402840[_0x2e70d5(0xe3)]+_0x2e70d5(0x112))<0x0&&(_0x269c56=_0x269c56[_0x2e70d5(0x13b)](/\/\* SUBSCRIBERS \*\//,_0x2e70d5(0xf9)+_0x402840['pascalCaseName']+'EntitySubscribers,')),await this[_0x2e70d5(0xe7)](_0x318278,_0x269c56,_0x402840);}async[a0_0x5a7de2(0x16a)](_0x405d0e,_0x1af0f1,_0x1a203f,_0x39935e,_0x264167){const _0x11ac27=a0_0x5a7de2;await this['writeFile'](_0x405d0e+(_0x1af0f1+'/index.ts'),serviceIndex,_0x264167),await this[_0x11ac27(0xe7)](_0x405d0e+(_0x1af0f1+'/'+_0x1af0f1+_0x11ac27(0x113)),serviceQuery,_0x264167),await this[_0x11ac27(0xe7)](_0x405d0e+(_0x1af0f1+'/'+_0x1af0f1+'-mutation.ts'),serviceMutation,_0x264167);let _0x2e7b31=this[_0x11ac27(0x12f)](_0x1a203f,_0x39935e);await this[_0x11ac27(0xe7)](_0x405d0e+(_0x1af0f1+'/'+_0x1af0f1+_0x11ac27(0x16f)),_0x2e7b31,_0x264167);let _0x497430=this[_0x11ac27(0xf6)](_0x39935e);await this[_0x11ac27(0xe7)](_0x405d0e+(_0x1af0f1+'/'+_0x1af0f1+_0x11ac27(0xf0)),_0x497430,_0x264167);let _0x633e82=_0x405d0e+_0x11ac27(0x126);0x0==await this['existsPath'](_0x633e82)&&await this['writeFile'](_0x633e82,allIndex,_0x264167);let _0x35bc4d=await fs[_0x11ac27(0x134)](_0x633e82,_0x11ac27(0x15a));_0x35bc4d['indexOf']('export\x20*\x20from\x20\x27./'+_0x264167[_0x11ac27(0xe2)]+'/'+_0x264167[_0x11ac27(0xe2)]+'\x27')<0x0&&(_0x35bc4d=_0x35bc4d[_0x11ac27(0x13b)](/\/\* EXPORT ENTITY TYPES \*\//,_0x11ac27(0x173)+_0x264167[_0x11ac27(0xe2)]+'/'+_0x264167[_0x11ac27(0xe2)]+'\x27')),_0x35bc4d[_0x11ac27(0x106)](_0x11ac27(0x11b)+_0x264167[_0x11ac27(0xe3)]+_0x11ac27(0x118)+_0x264167[_0x11ac27(0xe3)]+_0x11ac27(0x121)+_0x264167['name']+'\x27')<0x0&&(_0x35bc4d=_0x35bc4d[_0x11ac27(0x13b)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x11ac27(0x166)+_0x264167[_0x11ac27(0xe3)]+_0x11ac27(0x118)+_0x264167[_0x11ac27(0xe3)]+'Resolvers\x20}\x20from\x20\x27./'+_0x264167[_0x11ac27(0xe2)]+'\x27')),_0x35bc4d[_0x11ac27(0x106)](_0x11ac27(0xde)+_0x264167[_0x11ac27(0xe3)]+_0x11ac27(0x14e))<0x0&&(_0x35bc4d=_0x35bc4d[_0x11ac27(0x13b)](/\/\* ENTITIES \*\//,_0x11ac27(0xea)+_0x264167[_0x11ac27(0xe3)]+_0x11ac27(0x14e))),_0x35bc4d[_0x11ac27(0x106)](_0x11ac27(0xde)+_0x264167['pascalCaseName']+_0x11ac27(0x135))<0x0&&(_0x35bc4d=_0x35bc4d[_0x11ac27(0x13b)](/\/\* RESOLVER CLASSES \*\//,_0x11ac27(0x137)+_0x264167[_0x11ac27(0xe3)]+_0x11ac27(0x135))),await this['writeFile'](_0x633e82,_0x35bc4d,_0x264167);}[a0_0x5a7de2(0xf6)](_0x5240c3){const _0x5d61df=a0_0x5a7de2;let _0x5512c4=sereviceType,_0x135b08=_0x5240c3[_0x5d61df(0x15b)](_0x24fe28=>{const _0x203039=_0x5d61df;if('id'==_0x24fe28[_0x203039(0xe2)])return'';if(_0x203039(0x10b)==_0x24fe28['name'])return'';if(_0x203039(0x130)==_0x24fe28[_0x203039(0xe2)])return'';if(_0x203039(0x14d)==_0x24fe28['name'])return'';if('creator_id'==_0x24fe28[_0x203039(0xe2)])return'';if('updater_id'==_0x24fe28[_0x203039(0xe2)])return'';let _0x2827bb=this[_0x203039(0x151)](_0x24fe28),_0x36e895=this[_0x203039(0x142)](_0x24fe28),_0x1d3719=camelCase(_0x24fe28[_0x203039(0xe2)]);return'\x20\x20'+('@Field('+(0x0==_0x2827bb[_0x203039(0x140)]?'':_0x203039(0xdf)+_0x2827bb+',')+'\x20{\x20nullable:\x20'+_0x24fe28[_0x203039(0xe5)]+_0x203039(0x127))+_0x203039(0x12e)+(''+_0x1d3719+(_0x24fe28[_0x203039(0xe5)]?'?':'')+':\x20'+_0x36e895)+'\x0a';});_0x5512c4=_0x5512c4[_0x5d61df(0x13b)](/{{newTypeColumns}}/g,_0x135b08['join']('\x0a'));let _0x1a1e96=_0x5240c3[_0x5d61df(0x15b)](_0x128b2f=>{const _0x607c56=_0x5d61df;if('id'==_0x128b2f[_0x607c56(0xe2)])return'';if(_0x607c56(0x10b)==_0x128b2f[_0x607c56(0xe2)])return'';if('created_at'==_0x128b2f['name'])return'';if(_0x607c56(0x14d)==_0x128b2f['name'])return'';if(_0x607c56(0x174)==_0x128b2f[_0x607c56(0xe2)])return'';if(_0x607c56(0x117)==_0x128b2f[_0x607c56(0xe2)])return'';let _0x568021=this['getFieldType'](_0x128b2f),_0x3faa4f=this[_0x607c56(0x142)](_0x128b2f);_0x128b2f['nullable']=!0x0;let _0x5376e3=camelCase(_0x128b2f['name']);return'\x20\x20'+(_0x607c56(0x11f)+(0x0==_0x568021['length']?'':_0x607c56(0xdf)+_0x568021+',')+_0x607c56(0x13e)+_0x128b2f[_0x607c56(0xe5)]+_0x607c56(0x127))+_0x607c56(0x12e)+(''+_0x5376e3+(_0x128b2f[_0x607c56(0xe5)]?'?':'')+':\x20'+_0x3faa4f)+'\x0a';});return _0x5512c4=_0x5512c4[_0x5d61df(0x13b)](/{{patchTypeColumns}}/g,_0x1a1e96[_0x5d61df(0x162)]('\x0a')),_0x5512c4;}[a0_0x5a7de2(0x12f)](_0x2b2ae8,_0xd1b455){const _0x567783=a0_0x5a7de2;let _0x2e1006=serviceEntity,_0x149d82=_0xd1b455[_0x567783(0xf7)](function(_0xbef27f,_0x268538){const _0x2d7c2c=_0x567783;return _0xbef27f[_0x2d7c2c(0xee)]-_0x268538[_0x2d7c2c(0xee)];})['map'](_0x3f5cf9=>this[_0x567783(0x158)](_0x3f5cf9));['COPY',_0x567783(0x16d)][_0x567783(0x107)](_0x2b2ae8[_0x567783(0x13a)])&&_0x149d82[_0x567783(0xff)](_0x567783(0x115)),_0x2e1006=_0x2e1006[_0x567783(0x13b)](/{{entityColumns}}/g,_0x149d82[_0x567783(0x162)]('\x0a'));let _0x4ce940='',_0x15eb59=_0xd1b455['filter'](_0x11e6f2=>_0x11e6f2[_0x567783(0x123)]&&_0x11e6f2[_0x567783(0x123)]>0x0)['sort'](function(_0x4153bd,_0x47f6ed){const _0xd847c=_0x567783;return _0x4153bd[_0xd847c(0x123)]-_0x47f6ed[_0xd847c(0x123)];});if(_0x15eb59[_0x567783(0x140)]>0x0){_0x4ce940=_0x567783(0x105);let _0x555837=_0x15eb59['map'](_0x3ae29b=>{const _0x250c9f=_0x567783;let _0x3bd3ec=_0x3ae29b[_0x250c9f(0xe2)];return _0x250c9f(0x10b)==_0x3ae29b[_0x250c9f(0xe2)]&&(_0x3bd3ec=_0x250c9f(0x171)),_0x250c9f(0x174)==_0x3ae29b[_0x250c9f(0xe2)]&&(_0x3bd3ec=_0x250c9f(0x148)),'updater_id'==_0x3ae29b[_0x250c9f(0xe2)]&&(_0x3bd3ec=_0x250c9f(0x167)),_0x250c9f(0x153)+camelCase(_0x3bd3ec);});_0x4ce940=_0x4ce940[_0x567783(0x13b)](/{{indexColumns}}/g,_0x555837[_0x567783(0x162)](','));}return _0x2e1006=_0x2e1006['replace'](/{{indexAnn}}/g,_0x4ce940),_0x2e1006;}[a0_0x5a7de2(0x11e)](_0x11dbb9,_0x48789f){const _0x2bc23f=a0_0x5a7de2;let _0x42e6e9=_0x2bc23f(0x16d)==_0x11dbb9[_0x2bc23f(0x13a)]?serviceEntityHistJson:serviceEntityHistCopy,_0x1f2bb5=_0x48789f[_0x2bc23f(0xf7)](function(_0x12d7d7,_0x1971d1){const _0xb54b67=_0x2bc23f;return _0x12d7d7[_0xb54b67(0xee)]-_0x1971d1['rank'];})['map'](_0x10b84b=>this[_0x2bc23f(0x158)](_0x10b84b));return _0x42e6e9=_0x42e6e9['replace'](/{{entityColumns}}/g,_0x1f2bb5[_0x2bc23f(0x162)]('\x0a')),_0x42e6e9;}[a0_0x5a7de2(0x158)](_0x38352c){const _0x3b5d54=a0_0x5a7de2;if('id'==_0x38352c[_0x3b5d54(0xe2)])return'';if(_0x3b5d54(0x10b)==_0x38352c[_0x3b5d54(0xe2)])return'';if('created_at'==_0x38352c[_0x3b5d54(0xe2)])return'';if(_0x3b5d54(0x14d)==_0x38352c[_0x3b5d54(0xe2)])return'';if(_0x3b5d54(0x174)==_0x38352c[_0x3b5d54(0xe2)])return'';if(_0x3b5d54(0x117)==_0x38352c[_0x3b5d54(0xe2)])return'';let _0x2c3a24=_0x38352c['colType'];_0x3b5d54(0x119)==_0x38352c[_0x3b5d54(0x168)]&&(_0x2c3a24=_0x3b5d54(0x110)),_0x3b5d54(0x15d)==_0x38352c['colType']&&(_0x2c3a24=_0x3b5d54(0xe6)),_0x3b5d54(0x10c)==_0x38352c['colType']&&(_0x2c3a24=_0x3b5d54(0x141)),_0x3b5d54(0xfe)==_0x38352c['colType']&&(_0x2c3a24=_0x3b5d54(0x11c));let _0x28e7aa='';'string'==_0x38352c[_0x3b5d54(0x168)]&&(_0x28e7aa=_0x38352c[_0x3b5d54(0x12b)]);let _0x287788=this[_0x3b5d54(0x151)](_0x38352c),_0x38b46e=this['getColTxtType'](_0x38352c),_0x1f55e2=camelCase(_0x38352c[_0x3b5d54(0xe2)]);return'\x20\x20'+(_0x3b5d54(0x100)+_0x38352c[_0x3b5d54(0xe2)]+_0x3b5d54(0x111)+_0x2c3a24+_0x3b5d54(0x124)+_0x38352c['nullable']+'\x20'+(0x0==_0x28e7aa['length']?'':_0x3b5d54(0x11d)+_0x28e7aa)+_0x3b5d54(0x127))+'\x0a\x20\x20'+(_0x3b5d54(0x11f)+(0x0==_0x287788[_0x3b5d54(0x140)]?'':_0x3b5d54(0xdf)+_0x287788+',')+_0x3b5d54(0x13e)+_0x38352c[_0x3b5d54(0xe5)]+'\x20})')+_0x3b5d54(0x12e)+(''+_0x1f55e2+(_0x38352c[_0x3b5d54(0xe5)]?'?':'')+':\x20'+_0x38b46e)+'\x0a';}[a0_0x5a7de2(0x151)](_0x3dace1){const _0x10f2dd=a0_0x5a7de2;let _0x1e6c27='';return _0x10f2dd(0x119)==_0x3dace1[_0x10f2dd(0x168)]&&(_0x1e6c27=_0x10f2dd(0x10e)),'float'==_0x3dace1['colType']&&(_0x1e6c27=_0x10f2dd(0x10e)),_0x10f2dd(0x15d)==_0x3dace1[_0x10f2dd(0x168)]&&(_0x1e6c27=_0x10f2dd(0xeb)),_0x10f2dd(0x143)==_0x3dace1[_0x10f2dd(0x168)]&&(_0x1e6c27=_0x10f2dd(0xeb)),_0x1e6c27;}['getColTxtType'](_0x50fa01){const _0x4809f0=a0_0x5a7de2;let _0x427c1e=_0x50fa01[_0x4809f0(0x168)];return _0x4809f0(0x150)==_0x50fa01['colType']&&(_0x427c1e=_0x4809f0(0x15f)),_0x4809f0(0x119)==_0x50fa01[_0x4809f0(0x168)]&&(_0x427c1e=_0x4809f0(0x15f)),'float'==_0x50fa01[_0x4809f0(0x168)]&&(_0x427c1e=_0x4809f0(0x15f)),'integer'==_0x50fa01[_0x4809f0(0x168)]&&(_0x427c1e=_0x4809f0(0x15f)),_0x4809f0(0x15d)==_0x50fa01[_0x4809f0(0x168)]&&(_0x427c1e='number'),_0x4809f0(0xfe)==_0x50fa01['colType']&&(_0x427c1e=_0x4809f0(0x172)),'date'==_0x50fa01[_0x4809f0(0x168)]&&(_0x427c1e=_0x4809f0(0x172)),'text'==_0x50fa01[_0x4809f0(0x168)]&&(_0x427c1e=_0x4809f0(0x10c)),_0x427c1e;}async[a0_0x5a7de2(0xe7)](_0x5b0529,_0x9526fa,_0x2be49e){const _0x2dbb53=a0_0x5a7de2;await fs[_0x2dbb53(0xe9)](_0x5b0529,this[_0x2dbb53(0x14a)](_0x9526fa,_0x2be49e),'utf8');}[a0_0x5a7de2(0x14a)](_0x236776,_0xce98ae){const _0x4d22f5=a0_0x5a7de2;return _0x236776[_0x4d22f5(0x13b)](/{{pascalCase name}}/g,_0xce98ae[_0x4d22f5(0xe3)])['replace'](/{{camelCase name}}/g,_0xce98ae[_0x4d22f5(0x14c)])['replace'](/{{snakeCase name}}/g,_0xce98ae['snakeCaseName'])[_0x4d22f5(0x13b)](/{{pluralPascalCase name}}/g,_0xce98ae[_0x4d22f5(0x12c)])[_0x4d22f5(0x13b)](/{{pluralCamelCase name}}/g,_0xce98ae['pluralCamelCaseName'])['replace'](/{{tableName}}/g,_0xce98ae[_0x4d22f5(0x14b)])[_0x4d22f5(0x13b)](/{{name}}/g,_0xce98ae[_0x4d22f5(0xe2)]);}async['createServicePath'](_0x104fa4,_0xe52884,_0x38d6b5){const _0x27268a=a0_0x5a7de2;let _0x333528=_0x104fa4+_0x27268a(0x156);await this[_0x27268a(0x157)](_0x333528),_0x333528=_0x333528+'/'+_0xe52884,await this[_0x27268a(0x157)](_0x333528),_0x333528+='/server',await this['createDir'](_0x333528),_0x333528+=_0x27268a(0xe4),await this[_0x27268a(0x157)](_0x333528),_0x333528=_0x333528+'/'+_0x38d6b5,await this['createDir'](_0x333528);}[a0_0x5a7de2(0xfd)](){const _0x41fba4=a0_0x5a7de2;let _0x3daf4e=process[_0x41fba4(0x155)][_0x41fba4(0x164)][_0x41fba4(0x146)]('/'),_0x8d47d=[];for(let _0x3a466c=0x0;_0x3a466c<_0x3daf4e[_0x41fba4(0x140)]&&_0x41fba4(0xfb)!=_0x3daf4e[_0x3a466c];_0x3a466c++)_0x8d47d[_0x41fba4(0xff)](_0x3daf4e[_0x3a466c]);return _0x8d47d[_0x41fba4(0x162)]('/');}async['createDir'](_0x1e54a6){const _0x4e8537=a0_0x5a7de2;0x0==await this[_0x4e8537(0x169)](_0x1e54a6)&&fs[_0x4e8537(0xfa)](_0x1e54a6);}async[a0_0x5a7de2(0x169)](_0x3b990c){const _0x3cab2f=a0_0x5a7de2;return await fs[_0x3cab2f(0x129)](_0x3b990c);}};tslib_1[a0_0x5a7de2(0x147)]([(0x0,type_graphql_1[a0_0x5a7de2(0x12d)])(_0x3719dc=>Boolean,{'description':'Operato\x20Tool\x20Create\x20Service'}),tslib_1[a0_0x5a7de2(0xef)](0x0,(0x0,type_graphql_1['Arg'])('id')),tslib_1[a0_0x5a7de2(0xef)](0x1,(0x0,type_graphql_1[a0_0x5a7de2(0x139)])()),tslib_1['__metadata'](a0_0x5a7de2(0x152),Function),tslib_1[a0_0x5a7de2(0x101)]('design:paramtypes',[String,Object]),tslib_1[a0_0x5a7de2(0x101)](a0_0x5a7de2(0x102),Promise)],OperatoToolCreateService[a0_0x5a7de2(0x165)],a0_0x5a7de2(0x133),null),OperatoToolCreateService=tslib_1[a0_0x5a7de2(0x147)]([(0x0,type_graphql_1[a0_0x5a7de2(0xf2)])()],OperatoToolCreateService),exports['OperatoToolCreateService']=OperatoToolCreateService;const allIndex=a0_0x5a7de2(0x175),serviceIndex=a0_0x5a7de2(0x120),serviceHistoryIndex='\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',serviceQuery=a0_0x5a7de2(0x154),serviceHistoryQuery=a0_0x5a7de2(0x10f),serviceMutation=a0_0x5a7de2(0x145),sereviceType=a0_0x5a7de2(0xf4),sereviceHistoryType=a0_0x5a7de2(0x108),serviceEntity=a0_0x5a7de2(0x132),serviceEntityHistCopy=a0_0x5a7de2(0xf1),serviceEntityHistJson=a0_0x5a7de2(0x144),serviceEntitySubscriber=a0_0x5a7de2(0x11a);
@@ -1 +1 @@
1
- 'use strict';const a0_0x3e1004=a0_0x4813;function a0_0x4813(_0xf03298,_0x4df2bc){const _0x3d1030=a0_0x3d10();return a0_0x4813=function(_0x48131e,_0x1c897a){_0x48131e=_0x48131e-0x196;let _0x5da347=_0x3d1030[_0x48131e];return _0x5da347;},a0_0x4813(_0xf03298,_0x4df2bc);}(function(_0x11c0a2,_0x142c50){const _0x34c82b=a0_0x4813,_0x371473=_0x11c0a2();while(!![]){try{const _0x54e396=-parseInt(_0x34c82b(0x1ab))/0x1+parseInt(_0x34c82b(0x1a4))/0x2+parseInt(_0x34c82b(0x1a8))/0x3*(parseInt(_0x34c82b(0x1b9))/0x4)+parseInt(_0x34c82b(0x196))/0x5*(parseInt(_0x34c82b(0x19e))/0x6)+-parseInt(_0x34c82b(0x1af))/0x7*(-parseInt(_0x34c82b(0x1ae))/0x8)+parseInt(_0x34c82b(0x1a5))/0x9*(parseInt(_0x34c82b(0x1b5))/0xa)+-parseInt(_0x34c82b(0x19d))/0xb;if(_0x54e396===_0x142c50)break;else _0x371473['push'](_0x371473['shift']());}catch(_0x75f96){_0x371473['push'](_0x371473['shift']());}}}(a0_0x3d10,0xad8e1));Object['defineProperty'](exports,'__esModule',{'value':!0x0}),exports['checkStudioTemplateIsOverLimit']=exports[a0_0x3e1004(0x1b1)]=void 0x0;const operato_license_checker_1=require(a0_0x3e1004(0x19f)),shell_1=require(a0_0x3e1004(0x1ad)),menu_base_1=require(a0_0x3e1004(0x1b3)),license_error_1=require(a0_0x3e1004(0x198));async function checkStudioPermission(){const _0x5acc78=a0_0x3e1004;let _0x263e26=((0x0,operato_license_checker_1[_0x5acc78(0x19b)])('Permissions\x20For\x20Tailor\x20Tool')||',')[_0x5acc78(0x1a9)](',')['map'](_0x4120e3=>_0x4120e3[_0x5acc78(0x1b6)]()),_0xd0fafe=!0x1;return _0x263e26[_0x5acc78(0x1ba)](_0x1577c0=>{const _0x177c2d=_0x5acc78;_0x1577c0[_0x177c2d(0x1b0)]('Studio')&&(_0xd0fafe=!0x0);}),_0xd0fafe;}function a0_0x3d10(){const _0x51b1f4=['trim','ERROR_CODES','INVALID_LICENSE','172acdPOe','forEach','createQueryBuilder','Menu','20Tjurwz','getRepository','../../errors/license-error','id\x20!=\x20:id','(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)','getPermission','menu','22183579UTGRlt','1369302nsuptD','@things-factory/operato-license-checker','where','getCount','andWhere','OVER_LIMIT','2313610WyWWgE','3467655hDWqFs','manager','from','39213HBltqk','split','checkTarget','831126mnGzRC','select','@things-factory/shell','3688fLNBXb','8225eCpQLK','includes','checkStudioPermission','checkStudioTemplateIsOverLimit','@things-factory/menu-base','LicenseError','10HQVOku'];a0_0x3d10=function(){return _0x51b1f4;};return a0_0x3d10();}async function checkStudioTemplateIsOverLimit(_0x246839,_0x523cba){const _0x3b5dcf=a0_0x3e1004;if(0x0==await checkStudioPermission())throw new license_error_1[(_0x3b5dcf(0x1b4))]({'errorCode':_0x523cba['t'](license_error_1[_0x3b5dcf(0x1b4)][_0x3b5dcf(0x1b7)][_0x3b5dcf(0x1b8)])});var _0xc97519=0x0;if(_0xc97519=_0x246839&&''!=_0x246839?await(0x0,shell_1[_0x3b5dcf(0x197)])(menu_base_1['Menu'])['manager'][_0x3b5dcf(0x1bb)]()[_0x3b5dcf(0x1ac)](_0x3b5dcf(0x19c))[_0x3b5dcf(0x1a7)](menu_base_1[_0x3b5dcf(0x1bc)],_0x3b5dcf(0x19c))[_0x3b5dcf(0x1a0)](_0x3b5dcf(0x199),{'id':_0x246839})[_0x3b5dcf(0x1a2)](_0x3b5dcf(0x19a))['getCount']()+0x1:await(0x0,shell_1[_0x3b5dcf(0x197)])(menu_base_1[_0x3b5dcf(0x1bc)])[_0x3b5dcf(0x1a6)][_0x3b5dcf(0x1bb)]()[_0x3b5dcf(0x1ac)](_0x3b5dcf(0x19c))['from'](menu_base_1['Menu'],_0x3b5dcf(0x19c))[_0x3b5dcf(0x1a0)]('(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)')[_0x3b5dcf(0x1a1)]()+0x1,!(0x0,operato_license_checker_1[_0x3b5dcf(0x1aa)])(_0xc97519))throw new license_error_1['LicenseError']({'errorCode':_0x523cba['t'](license_error_1[_0x3b5dcf(0x1b4)][_0x3b5dcf(0x1b7)][_0x3b5dcf(0x1a3)])});return!0x0;}exports[a0_0x3e1004(0x1b1)]=checkStudioPermission,exports[a0_0x3e1004(0x1b2)]=checkStudioTemplateIsOverLimit;
1
+ 'use strict';const a0_0xd7b6f3=a0_0x3081;(function(_0x1bd1b7,_0x12c2cb){const _0x5324d6=a0_0x3081,_0x20ccb1=_0x1bd1b7();while(!![]){try{const _0x42159d=parseInt(_0x5324d6(0x19b))/0x1+parseInt(_0x5324d6(0x19f))/0x2*(-parseInt(_0x5324d6(0x1a3))/0x3)+-parseInt(_0x5324d6(0x1b1))/0x4*(parseInt(_0x5324d6(0x1a6))/0x5)+-parseInt(_0x5324d6(0x1b0))/0x6*(-parseInt(_0x5324d6(0x1a2))/0x7)+-parseInt(_0x5324d6(0x194))/0x8*(-parseInt(_0x5324d6(0x1a4))/0x9)+-parseInt(_0x5324d6(0x1be))/0xa+parseInt(_0x5324d6(0x1ab))/0xb*(-parseInt(_0x5324d6(0x1b2))/0xc);if(_0x42159d===_0x12c2cb)break;else _0x20ccb1['push'](_0x20ccb1['shift']());}catch(_0x28b3c7){_0x20ccb1['push'](_0x20ccb1['shift']());}}}(a0_0xdc9f,0x271b4));Object[a0_0xd7b6f3(0x199)](exports,a0_0xd7b6f3(0x1b8),{'value':!0x0}),exports['checkStudioTemplateIsOverLimit']=exports[a0_0xd7b6f3(0x19d)]=void 0x0;function a0_0x3081(_0x440349,_0x198f82){const _0xdc9f53=a0_0xdc9f();return a0_0x3081=function(_0x3081fd,_0x5e7ccc){_0x3081fd=_0x3081fd-0x194;let _0x73931e=_0xdc9f53[_0x3081fd];return _0x73931e;},a0_0x3081(_0x440349,_0x198f82);}function a0_0xdc9f(){const _0x1e1cd4=['__esModule','LicenseError','Studio','map','OVER_LIMIT','Menu','1054400mGLyMy','16jeBtvG','select','@things-factory/operato-license-checker','checkTarget','andWhere','defineProperty','(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)','206894CZKhSj','ERROR_CODES','checkStudioPermission','../../errors/license-error','11118Pwpmhi','menu','manager','14OFpYJZ','57XvaqBk','836604csIwTZ','forEach','35665hXipEj','INVALID_LICENSE','split','getRepository','Permissions\x20For\x20Tailor\x20Tool','1167122ukfLBZ','@things-factory/menu-base','from','getCount','getPermission','636114RshXfF','12wZAyLX','24ABUOHG','@things-factory/shell','includes','createQueryBuilder','trim','where'];a0_0xdc9f=function(){return _0x1e1cd4;};return a0_0xdc9f();}const operato_license_checker_1=require(a0_0xd7b6f3(0x196)),shell_1=require(a0_0xd7b6f3(0x1b3)),menu_base_1=require(a0_0xd7b6f3(0x1ac)),license_error_1=require(a0_0xd7b6f3(0x19e));async function checkStudioPermission(){const _0x57a51c=a0_0xd7b6f3;let _0x1a92a2=((0x0,operato_license_checker_1[_0x57a51c(0x1af)])(_0x57a51c(0x1aa))||',')[_0x57a51c(0x1a8)](',')[_0x57a51c(0x1bb)](_0x1b49ab=>_0x1b49ab[_0x57a51c(0x1b6)]()),_0x3b9e18=!0x1;return _0x1a92a2[_0x57a51c(0x1a5)](_0x5874d1=>{const _0x5b94b8=_0x57a51c;_0x5874d1[_0x5b94b8(0x1b4)](_0x5b94b8(0x1ba))&&(_0x3b9e18=!0x0);}),_0x3b9e18;}async function checkStudioTemplateIsOverLimit(_0x40462e,_0x3cbbc8){const _0x593866=a0_0xd7b6f3;if(0x0==await checkStudioPermission())throw new license_error_1['LicenseError']({'errorCode':_0x3cbbc8['t'](license_error_1['LicenseError'][_0x593866(0x19c)][_0x593866(0x1a7)])});var _0x589778=0x0;if(_0x589778=_0x40462e&&''!=_0x40462e?await(0x0,shell_1[_0x593866(0x1a9)])(menu_base_1[_0x593866(0x1bd)])['manager'][_0x593866(0x1b5)]()[_0x593866(0x195)](_0x593866(0x1a0))[_0x593866(0x1ad)](menu_base_1[_0x593866(0x1bd)],_0x593866(0x1a0))[_0x593866(0x1b7)]('id\x20!=\x20:id',{'id':_0x40462e})[_0x593866(0x198)](_0x593866(0x19a))['getCount']()+0x1:await(0x0,shell_1[_0x593866(0x1a9)])(menu_base_1[_0x593866(0x1bd)])[_0x593866(0x1a1)][_0x593866(0x1b5)]()['select'](_0x593866(0x1a0))['from'](menu_base_1[_0x593866(0x1bd)],'menu')[_0x593866(0x1b7)](_0x593866(0x19a))[_0x593866(0x1ae)]()+0x1,!(0x0,operato_license_checker_1[_0x593866(0x197)])(_0x589778))throw new license_error_1[(_0x593866(0x1b9))]({'errorCode':_0x3cbbc8['t'](license_error_1[_0x593866(0x1b9)]['ERROR_CODES'][_0x593866(0x1bc)])});return!0x0;}exports[a0_0xd7b6f3(0x19d)]=checkStudioPermission,exports['checkStudioTemplateIsOverLimit']=checkStudioTemplateIsOverLimit;
@@ -1 +1 @@
1
- 'use strict';function a0_0x418f(_0x5d557e,_0x5e874d){const _0x4c2ab5=a0_0x4c2a();return a0_0x418f=function(_0x418fe8,_0x19e55a){_0x418fe8=_0x418fe8-0x16e;let _0x32540d=_0x4c2ab5[_0x418fe8];return _0x32540d;},a0_0x418f(_0x5d557e,_0x5e874d);}const a0_0x2cb27c=a0_0x418f;(function(_0x30e276,_0x52d5de){const _0x3c0e34=a0_0x418f,_0x10bd4a=_0x30e276();while(!![]){try{const _0x27a962=parseInt(_0x3c0e34(0x18b))/0x1*(-parseInt(_0x3c0e34(0x189))/0x2)+-parseInt(_0x3c0e34(0x178))/0x3*(parseInt(_0x3c0e34(0x16e))/0x4)+parseInt(_0x3c0e34(0x177))/0x5+parseInt(_0x3c0e34(0x17a))/0x6+-parseInt(_0x3c0e34(0x173))/0x7*(parseInt(_0x3c0e34(0x188))/0x8)+parseInt(_0x3c0e34(0x184))/0x9+-parseInt(_0x3c0e34(0x171))/0xa*(-parseInt(_0x3c0e34(0x175))/0xb);if(_0x27a962===_0x52d5de)break;else _0x10bd4a['push'](_0x10bd4a['shift']());}catch(_0x29802b){_0x10bd4a['push'](_0x10bd4a['shift']());}}}(a0_0x4c2a,0x7f687));Object[a0_0x2cb27c(0x17b)](exports,a0_0x2cb27c(0x17e),{'value':!0x0}),exports[a0_0x2cb27c(0x170)]=void 0x0;const tslib_1=require(a0_0x2cb27c(0x176)),type_graphql_1=require('type-graphql'),tool_permission_1=require(a0_0x2cb27c(0x172));let OperatoToolResolver=class{async[a0_0x2cb27c(0x174)](_0x5f4f29){const _0x42d823=a0_0x2cb27c;return(0x0,tool_permission_1[_0x42d823(0x180)])();}async['studioTemplateIsOverLimit'](_0x4d6def,_0x43d9c1){return(0x0,tool_permission_1['checkStudioTemplateIsOverLimit'])(_0x4d6def,_0x43d9c1);}};tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x2cb27c(0x185)])(_0x58af1d=>Boolean,{'description':a0_0x2cb27c(0x186)}),tslib_1[a0_0x2cb27c(0x18c)](0x0,(0x0,type_graphql_1[a0_0x2cb27c(0x17d)])()),tslib_1[a0_0x2cb27c(0x182)](a0_0x2cb27c(0x18a),Function),tslib_1[a0_0x2cb27c(0x182)]('design:paramtypes',[Object]),tslib_1[a0_0x2cb27c(0x182)](a0_0x2cb27c(0x16f),Promise)],OperatoToolResolver[a0_0x2cb27c(0x181)],a0_0x2cb27c(0x174),null),tslib_1[a0_0x2cb27c(0x187)]([(0x0,type_graphql_1[a0_0x2cb27c(0x185)])(_0x31cf71=>Boolean,{'description':a0_0x2cb27c(0x17c)}),tslib_1['__param'](0x0,(0x0,type_graphql_1[a0_0x2cb27c(0x179)])('id')),tslib_1[a0_0x2cb27c(0x18c)](0x1,(0x0,type_graphql_1[a0_0x2cb27c(0x17d)])()),tslib_1['__metadata']('design:type',Function),tslib_1['__metadata'](a0_0x2cb27c(0x17f),[String,Object]),tslib_1[a0_0x2cb27c(0x182)](a0_0x2cb27c(0x16f),Promise)],OperatoToolResolver[a0_0x2cb27c(0x181)],'studioTemplateIsOverLimit',null),OperatoToolResolver=tslib_1[a0_0x2cb27c(0x187)]([(0x0,type_graphql_1[a0_0x2cb27c(0x183)])()],OperatoToolResolver),exports[a0_0x2cb27c(0x170)]=OperatoToolResolver;function a0_0x4c2a(){const _0x53943f=['checkStudioPermission','prototype','__metadata','Resolver','7047621YyamyF','Query','Operato\x20Tool\x20Studio\x20Usage\x20Permissions','__decorate','152zhUOXr','54512rpyezK','design:type','23FhxRAq','__param','68QNjXsK','design:returntype','OperatoToolResolver','20FJWiKy','./tool-permission','362243VFbaNt','studioPermission','1868779ejbQDS','tslib','3908895qQXkFX','681lwDMCj','Arg','1387290DhIwZo','defineProperty','Operato\x20Tool\x20Studio\x20Limit\x20check','Ctx','__esModule','design:paramtypes'];a0_0x4c2a=function(){return _0x53943f;};return a0_0x4c2a();}
1
+ 'use strict';const a0_0x35f1df=a0_0x4bce;function a0_0x4bce(_0x491cc5,_0x16008d){const _0x2c2211=a0_0x2c22();return a0_0x4bce=function(_0x4bce11,_0x326e92){_0x4bce11=_0x4bce11-0x1e8;let _0x594b03=_0x2c2211[_0x4bce11];return _0x594b03;},a0_0x4bce(_0x491cc5,_0x16008d);}function a0_0x2c22(){const _0xb78c40=['prototype','457091IdMvuy','design:type','type-graphql','defineProperty','2411382fphwsK','252606dDZJxA','__metadata','12VxvskO','__param','__esModule','231343pkHzot','72htpInw','Operato\x20Tool\x20Studio\x20Usage\x20Permissions','checkStudioPermission','16bgjIYD','Query','2465iUdIoW','26936745mRUlJJ','792200Kofzmq','__decorate','studioPermission','./tool-permission','Resolver','Ctx','checkStudioTemplateIsOverLimit','studioTemplateIsOverLimit','2358PWHkfs','Operato\x20Tool\x20Studio\x20Limit\x20check','design:returntype'];a0_0x2c22=function(){return _0xb78c40;};return a0_0x2c22();}(function(_0xc270af,_0x3ed0f0){const _0x438bea=a0_0x4bce,_0xef93c5=_0xc270af();while(!![]){try{const _0x25148f=parseInt(_0x438bea(0x1f9))/0x1+-parseInt(_0x438bea(0x1fd))/0x2+-parseInt(_0x438bea(0x1fe))/0x3*(parseInt(_0x438bea(0x200))/0x4)+-parseInt(_0x438bea(0x1eb))/0x5*(parseInt(_0x438bea(0x1f5))/0x6)+-parseInt(_0x438bea(0x203))/0x7*(-parseInt(_0x438bea(0x1e9))/0x8)+-parseInt(_0x438bea(0x204))/0x9*(parseInt(_0x438bea(0x1ed))/0xa)+parseInt(_0x438bea(0x1ec))/0xb;if(_0x25148f===_0x3ed0f0)break;else _0xef93c5['push'](_0xef93c5['shift']());}catch(_0x3bbebd){_0xef93c5['push'](_0xef93c5['shift']());}}}(a0_0x2c22,0xa7862));Object[a0_0x35f1df(0x1fc)](exports,a0_0x35f1df(0x202),{'value':!0x0}),exports['OperatoToolResolver']=void 0x0;const tslib_1=require('tslib'),type_graphql_1=require(a0_0x35f1df(0x1fb)),tool_permission_1=require(a0_0x35f1df(0x1f0));let OperatoToolResolver=class{async[a0_0x35f1df(0x1ef)](_0x3b9ac1){const _0xe4c279=a0_0x35f1df;return(0x0,tool_permission_1[_0xe4c279(0x1e8)])();}async[a0_0x35f1df(0x1f4)](_0x689a82,_0x346f55){const _0x303c21=a0_0x35f1df;return(0x0,tool_permission_1[_0x303c21(0x1f3)])(_0x689a82,_0x346f55);}};tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x35f1df(0x1ea)])(_0x5243a8=>Boolean,{'description':a0_0x35f1df(0x205)}),tslib_1[a0_0x35f1df(0x201)](0x0,(0x0,type_graphql_1['Ctx'])()),tslib_1[a0_0x35f1df(0x1ff)](a0_0x35f1df(0x1fa),Function),tslib_1['__metadata']('design:paramtypes',[Object]),tslib_1[a0_0x35f1df(0x1ff)](a0_0x35f1df(0x1f7),Promise)],OperatoToolResolver[a0_0x35f1df(0x1f8)],'studioPermission',null),tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x35f1df(0x1ea)])(_0x2e5726=>Boolean,{'description':a0_0x35f1df(0x1f6)}),tslib_1[a0_0x35f1df(0x201)](0x0,(0x0,type_graphql_1['Arg'])('id')),tslib_1[a0_0x35f1df(0x201)](0x1,(0x0,type_graphql_1[a0_0x35f1df(0x1f2)])()),tslib_1[a0_0x35f1df(0x1ff)](a0_0x35f1df(0x1fa),Function),tslib_1[a0_0x35f1df(0x1ff)]('design:paramtypes',[String,Object]),tslib_1['__metadata']('design:returntype',Promise)],OperatoToolResolver['prototype'],'studioTemplateIsOverLimit',null),OperatoToolResolver=tslib_1[a0_0x35f1df(0x1ee)]([(0x0,type_graphql_1[a0_0x35f1df(0x1f1)])()],OperatoToolResolver),exports['OperatoToolResolver']=OperatoToolResolver;