@things-factory/operato-tools 6.1.0 → 6.1.2

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_0x3edf84=a0_0x2cf1;(function(_0x1bf9ac,_0x20763a){const _0x56859c=a0_0x2cf1,_0x26f6c9=_0x1bf9ac();while(!![]){try{const _0x178d1d=parseInt(_0x56859c(0x1f5))/0x1*(parseInt(_0x56859c(0x200))/0x2)+-parseInt(_0x56859c(0x1f7))/0x3+-parseInt(_0x56859c(0x1fc))/0x4*(parseInt(_0x56859c(0x1f9))/0x5)+parseInt(_0x56859c(0x202))/0x6+-parseInt(_0x56859c(0x1fd))/0x7+-parseInt(_0x56859c(0x201))/0x8+-parseInt(_0x56859c(0x1fb))/0x9*(-parseInt(_0x56859c(0x1f4))/0xa);if(_0x178d1d===_0x20763a)break;else _0x26f6c9['push'](_0x26f6c9['shift']());}catch(_0xa8f292){_0x26f6c9['push'](_0x26f6c9['shift']());}}}(a0_0x3f82,0x704d4));Object[a0_0x3edf84(0x204)](exports,a0_0x3edf84(0x205),{'value':!0x0}),exports[a0_0x3edf84(0x1f3)]=void 0x0;const tslib_1=require(a0_0x3edf84(0x1f8)),ERROR_CODES=tslib_1[a0_0x3edf84(0x1ff)](require(a0_0x3edf84(0x1f6)));class LicenseError extends Error{static get['ERROR_CODES'](){return Object['assign']({},ERROR_CODES);}constructor({errorCode:_0x2752d5,detail:_0x101cad}){const _0xfa2261=a0_0x3edf84;super(_0x2752d5),this[_0xfa2261(0x203)]=_0xfa2261(0x1fa),this[_0xfa2261(0x1fe)]=_0x2752d5,this['detail']=_0x101cad;}}function a0_0x2cf1(_0x4571ed,_0x4724b6){const _0x3f8221=a0_0x3f82();return a0_0x2cf1=function(_0x2cf1c2,_0x5ea20f){_0x2cf1c2=_0x2cf1c2-0x1f3;let _0x474a2d=_0x3f8221[_0x2cf1c2];return _0x474a2d;},a0_0x2cf1(_0x4571ed,_0x4724b6);}exports[a0_0x3edf84(0x1f3)]=LicenseError;function a0_0x3f82(){const _0x48fe7e=['4487028JHAaiX','name','defineProperty','__esModule','LicenseError','400eKfarY','1391QzeuIP','../constants/error-code','2675091IoCwvP','tslib','2145xaECWJ','license-error','324783MPVJGq','3444gYXVhW','772590TVkANA','errorCode','__importStar','566AuCCTW','6028376tBMIrr'];a0_0x3f82=function(){return _0x48fe7e;};return a0_0x3f82();}
1
+ 'use strict';const a0_0x444308=a0_0x5f6c;(function(_0x33dd4a,_0x2db489){const _0x425fdf=a0_0x5f6c,_0x14c7b1=_0x33dd4a();while(!![]){try{const _0x1f669e=parseInt(_0x425fdf(0x1a3))/0x1+parseInt(_0x425fdf(0x1a8))/0x2+-parseInt(_0x425fdf(0x1a1))/0x3*(-parseInt(_0x425fdf(0x1a9))/0x4)+-parseInt(_0x425fdf(0x19d))/0x5*(-parseInt(_0x425fdf(0x1ac))/0x6)+-parseInt(_0x425fdf(0x19c))/0x7*(-parseInt(_0x425fdf(0x1a2))/0x8)+-parseInt(_0x425fdf(0x1a6))/0x9*(parseInt(_0x425fdf(0x1a0))/0xa)+parseInt(_0x425fdf(0x1ad))/0xb;if(_0x1f669e===_0x2db489)break;else _0x14c7b1['push'](_0x14c7b1['shift']());}catch(_0xafc9c3){_0x14c7b1['push'](_0x14c7b1['shift']());}}}(a0_0x1cbd,0x19bcb));function a0_0x1cbd(){const _0x3c487c=['25BRkQam','assign','__esModule','10RoRVVZ','3432XYSpvj','176mpLrhC','48398wSdvxE','LicenseError','name','1716579GuFFKl','detail','237524HZvjOm','92ExjAGy','tslib','defineProperty','108534roXyCu','52041SIwOTL','errorCode','2387VYpyYY'];a0_0x1cbd=function(){return _0x3c487c;};return a0_0x1cbd();}Object[a0_0x444308(0x1ab)](exports,a0_0x444308(0x19f),{'value':!0x0}),exports[a0_0x444308(0x1a4)]=void 0x0;const tslib_1=require(a0_0x444308(0x1aa)),ERROR_CODES=tslib_1['__importStar'](require('../constants/error-code'));class LicenseError extends Error{static get['ERROR_CODES'](){const _0x2e5599=a0_0x444308;return Object[_0x2e5599(0x19e)]({},ERROR_CODES);}constructor({errorCode:_0x2a9256,detail:_0x56ecea}){const _0x465dd4=a0_0x444308;super(_0x2a9256),this[_0x465dd4(0x1a5)]='license-error',this[_0x465dd4(0x19b)]=_0x2a9256,this[_0x465dd4(0x1a7)]=_0x56ecea;}}function a0_0x5f6c(_0x757c0e,_0x1827df){const _0x1cbdf2=a0_0x1cbd();return a0_0x5f6c=function(_0x5f6cd0,_0x16851c){_0x5f6cd0=_0x5f6cd0-0x19b;let _0x12ffce=_0x1cbdf2[_0x5f6cd0];return _0x12ffce;},a0_0x5f6c(_0x757c0e,_0x1827df);}exports[a0_0x444308(0x1a4)]=LicenseError;
package/server/routes.js CHANGED
@@ -1 +1 @@
1
- const a0_0x1dd65d=a0_0x4bb8;(function(_0x2bfeef,_0x316bae){const _0x4d3583=a0_0x4bb8,_0x5d590a=_0x2bfeef();while(!![]){try{const _0xa7531a=-parseInt(_0x4d3583(0x1ad))/0x1*(-parseInt(_0x4d3583(0x1b1))/0x2)+-parseInt(_0x4d3583(0x1b0))/0x3*(-parseInt(_0x4d3583(0x1b6))/0x4)+parseInt(_0x4d3583(0x1af))/0x5+parseInt(_0x4d3583(0x1ac))/0x6+parseInt(_0x4d3583(0x1b7))/0x7*(parseInt(_0x4d3583(0x1b5))/0x8)+-parseInt(_0x4d3583(0x1b4))/0x9+-parseInt(_0x4d3583(0x1ae))/0xa;if(_0xa7531a===_0x316bae)break;else _0x5d590a['push'](_0x5d590a['shift']());}catch(_0x1af5d7){_0x5d590a['push'](_0x5d590a['shift']());}}}(a0_0x1607,0x2ddca));function a0_0x1607(){const _0x212651=['things-factory:operato-tools:routes','bootstrap-module-domain-private-route','2723049fUQGiu','8VUhSHc','4OlSQKs','879347xQLRWH','1795266PqqFAN','1Ppsczo','618850rHtoHz','247280Qojaqa','194853BFVmsp','26114ABRNfh'];a0_0x1607=function(){return _0x212651;};return a0_0x1607();}function a0_0x4bb8(_0x47a726,_0x170d51){const _0x1607af=a0_0x1607();return a0_0x4bb8=function(_0x4bb8f0,_0x2fce31){_0x4bb8f0=_0x4bb8f0-0x1ac;let _0x136f59=_0x1607af[_0x4bb8f0];return _0x136f59;},a0_0x4bb8(_0x47a726,_0x170d51);}const debug=require('debug')(a0_0x1dd65d(0x1b2));process['on']('bootstrap-module-global-public-route',(_0x47cf1d,_0x28367d)=>{}),process['on']('bootstrap-module-global-private-route',(_0x452b91,_0x2a9d13)=>{}),process['on']('bootstrap-module-domain-public-route',(_0xe9e2c2,_0x4f7c5f)=>{}),process['on'](a0_0x1dd65d(0x1b3),(_0x19b3c0,_0x4193a6)=>{});
1
+ const a0_0x401bbe=a0_0x5215;(function(_0x7b0903,_0x4fbab0){const _0x4c4f8b=a0_0x5215,_0x180ed3=_0x7b0903();while(!![]){try{const _0x4af31d=parseInt(_0x4c4f8b(0x14a))/0x1*(-parseInt(_0x4c4f8b(0x146))/0x2)+-parseInt(_0x4c4f8b(0x144))/0x3*(parseInt(_0x4c4f8b(0x145))/0x4)+-parseInt(_0x4c4f8b(0x150))/0x5*(-parseInt(_0x4c4f8b(0x149))/0x6)+-parseInt(_0x4c4f8b(0x14c))/0x7+parseInt(_0x4c4f8b(0x147))/0x8+-parseInt(_0x4c4f8b(0x14f))/0x9*(-parseInt(_0x4c4f8b(0x142))/0xa)+parseInt(_0x4c4f8b(0x14b))/0xb;if(_0x4af31d===_0x4fbab0)break;else _0x180ed3['push'](_0x180ed3['shift']());}catch(_0x4fbd33){_0x180ed3['push'](_0x180ed3['shift']());}}}(a0_0x36d3,0x60dc0));function a0_0x5215(_0x1d03b4,_0x4841ad){const _0x36d3bd=a0_0x36d3();return a0_0x5215=function(_0x5215a9,_0x334fef){_0x5215a9=_0x5215a9-0x142;let _0x4895c7=_0x36d3bd[_0x5215a9];return _0x4895c7;},a0_0x5215(_0x1d03b4,_0x4841ad);}function a0_0x36d3(){const _0xbcfa23=['381770WNeCOv','bootstrap-module-global-public-route','138PKHqFI','33492XcBRJs','2YAtpfB','1128536cQzctZ','debug','36hJfcrm','611629jcOKLR','11153076zLkuuo','1995315gxLgyx','bootstrap-module-domain-private-route','things-factory:operato-tools:routes','99FiZhzt','86365PzHvPD'];a0_0x36d3=function(){return _0xbcfa23;};return a0_0x36d3();}const debug=require(a0_0x401bbe(0x148))(a0_0x401bbe(0x14e));process['on'](a0_0x401bbe(0x143),(_0x125546,_0x243fea)=>{}),process['on']('bootstrap-module-global-private-route',(_0x1d0ef9,_0x1b6291)=>{}),process['on']('bootstrap-module-domain-public-route',(_0x14673f,_0xfb7b8)=>{}),process['on'](a0_0x401bbe(0x14d),(_0x22fccb,_0x1052c9)=>{});
@@ -1 +1 @@
1
- 'use strict';const a0_0x19577b=a0_0x5a26;(function(_0x5bdb8e,_0x69f70e){const _0x14e4ee=a0_0x5a26,_0x58495f=_0x5bdb8e();while(!![]){try{const _0x140099=-parseInt(_0x14e4ee(0x19e))/0x1+-parseInt(_0x14e4ee(0x16c))/0x2*(parseInt(_0x14e4ee(0x187))/0x3)+-parseInt(_0x14e4ee(0x196))/0x4+-parseInt(_0x14e4ee(0x156))/0x5*(parseInt(_0x14e4ee(0x165))/0x6)+parseInt(_0x14e4ee(0x189))/0x7+-parseInt(_0x14e4ee(0x172))/0x8*(-parseInt(_0x14e4ee(0x155))/0x9)+parseInt(_0x14e4ee(0x16b))/0xa*(parseInt(_0x14e4ee(0x188))/0xb);if(_0x140099===_0x69f70e)break;else _0x58495f['push'](_0x58495f['shift']());}catch(_0x2493ed){_0x58495f['push'](_0x58495f['shift']());}}}(a0_0xf2bd,0x35814));function a0_0xf2bd(){const _0x3dd3b2=['EntityColumn','createSortCols','gridRank','routing','query','36fyiEoh','2846855bdNnCe','2404444xnDlSD','hex','lodash','aes-256-cfb','push','updater','filter','\x22,\x22hidden\x22:','left','refType','reverseSort','__importDefault','\x22,\x22width\x22:','843332EguWYK','string','{\x22name\x22:\x20\x22','getRepository','\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}','update','\x22,\x22header\x22:\x20\x22','@transaction','177915zEsQyR','pluralize','SCREEN','parent_menu_id','name','\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}','defineProperty',',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22','readonly','from','\x22,\x22operator\x22:\x20\x22','Resolver','design:returntype','aes256','aes-256-ecb','rank','toolCreateMenu','template','createSearchCols','design:paramtypes','hiddenFlag','find','\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','Mutation','length','creator','Operato\x20Tool\x20Create\x20Menu','\x27\x20or\x20id\x20=\x20\x27','final','state','\x20,\x22exportable\x22:\x20true','Directive','refName','OperatoToolCreateMenu','split','checkStudioTemplateIsOverLimit','enc','Entity','prototype','substring','9VuKgCH','5gkeVCs',',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22','__metadata','resourceUrl','replace','design:type','updatedAt','assign','join','searchRank','\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}','__param','default',',\x22mandatory\x22:\x20','@things-factory/resource-base','1149324exjtKz','aes-256-ctr','./../tool-secret/tool-permission','stringify','updater_id','Menu','10alBLvE','1022rRDcOZ','crypto','select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27','Arg','hidden','sort','1626344yEjXyD','createCipheriv','sortRank','toString','updated_at','aes-256-ofb','{\x22name\x22:\x22','h1z0q9i9x7q6','utf8','searchOper','createGridColumns','aes-256-cbc','randomBytes','__decorate','created_at','\x22,\x22name\x22:\x20\x22'];a0_0xf2bd=function(){return _0x3dd3b2;};return a0_0xf2bd();}Object[a0_0x19577b(0x1a4)](exports,'__esModule',{'value':!0x0}),exports[a0_0x19577b(0x14e)]=void 0x0;function a0_0x5a26(_0x55b948,_0x52858a){const _0xf2bd48=a0_0xf2bd();return a0_0x5a26=function(_0x5a26a5,_0x9d291d){_0x5a26a5=_0x5a26a5-0x146;let _0x4f82f4=_0xf2bd48[_0x5a26a5];return _0x4f82f4;},a0_0x5a26(_0x55b948,_0x52858a);}const tslib_1=require('tslib'),type_graphql_1=require('type-graphql'),resource_base_1=require(a0_0x19577b(0x164)),menu_base_1=require('@things-factory/menu-base'),tool_permission_1=require(a0_0x19577b(0x167)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x19577b(0x18b)),{plural:plural}=require(a0_0x19577b(0x19f)),crypto_1=tslib_1[a0_0x19577b(0x194)](require(a0_0x19577b(0x16d)));let OperatoToolCreateMenu=class{async[a0_0x19577b(0x1ae)](_0x4f8a4e,_0x572bf5,_0x275bc3){const _0x3ab605=a0_0x19577b,{domain:_0x2ca341,user:_0xa2fb5f,tx:_0x1fc7fd}=_0x275bc3[_0x3ab605(0x14a)];await(0x0,tool_permission_1[_0x3ab605(0x150)])('',_0x275bc3);const _0x4f6ddf=await _0x1fc7fd[_0x3ab605(0x199)](resource_base_1[_0x3ab605(0x152)])['findOne']({'where':{'domain':{'id':_0x2ca341['id']},'id':_0x4f8a4e}}),_0x48da34=await _0x1fc7fd['getRepository'](resource_base_1[_0x3ab605(0x182)])[_0x3ab605(0x1b3)]({'where':{'domain':{'id':_0x2ca341['id']},'entity':{'id':_0x4f6ddf['id']}}});let {name:_0x4d6869=''}=_0x4f6ddf||{},_0xb390df=kebabCase(_0x4d6869),_0x35a557=modelTemplate[_0x3ab605(0x15a)](/{{pascalCase name}}/g,startCase(camelCase(_0x4d6869))['replace'](/ /g,''))['replace'](/{{camelCase name}}/g,camelCase(_0x4d6869))[_0x3ab605(0x15a)](/{{snakeCase name}}/g,snakeCase(_0x4d6869))[_0x3ab605(0x15a)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x4d6869)))[_0x3ab605(0x15a)](/ /g,''))[_0x3ab605(0x15a)](/{{pluralCamelCase name}}/g,camelCase(plural(_0x4d6869)))['replace'](/{{name}}/g,_0x4d6869),_0x519f66='';'JSON'==_0x4f6ddf['dataProp']?_0x519f66='\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':'COPY'==_0x4f6ddf['dataProp']&&(_0x519f66=_0x3ab605(0x1b4)),_0x35a557=_0x35a557[_0x3ab605(0x15a)](/{{HistoryButton}}/g,_0x519f66);let _0x39dea1=this['createSortCols'](_0x48da34);_0x35a557=_0x35a557[_0x3ab605(0x15a)](/{{SortColumns}}/g,_0x39dea1[_0x3ab605(0x15e)](','));let _0x297033=this['createSearchCols'](_0x48da34);_0x35a557=_0x35a557[_0x3ab605(0x15a)](/{{SearchColumns}}/g,_0x297033['join'](','));let _0x4fb33d=this[_0x3ab605(0x17c)](_0x48da34);return _0x35a557=_0x35a557[_0x3ab605(0x15a)](/{{GridColumns}}/g,_0x4fb33d['join'](',')),_0x35a557=this[_0x3ab605(0x151)](_0x35a557),await this['createMenuData'](_0x1fc7fd,_0x2ca341,_0xa2fb5f,_0x572bf5,_0xb390df,_0x35a557),!0x0;}[a0_0x19577b(0x17c)](_0x335be6){const _0x463efc=a0_0x19577b;return _0x335be6[_0x463efc(0x18f)](_0x2b75f6=>'id'!=_0x2b75f6['name']&&_0x2b75f6[_0x463efc(0x184)]>0x0)[_0x463efc(0x171)](function(_0x25ec70,_0x1c6bf7){const _0x115ef3=_0x463efc;return _0x25ec70[_0x115ef3(0x184)]-_0x1c6bf7[_0x115ef3(0x184)];})['map'](_0x1e5ed8=>{const _0x1090ab=_0x463efc;let {gridEditor:_0x246775='string',name:_0x1b3f20,term:_0x5a6bf6,gridWidth:_0x208642=0x0,gridAlign:_0x212f89=_0x1090ab(0x191),nullable:_0x58e1d6=!0x1}=_0x1e5ed8;if(null==_0x246775&&(_0x246775=_0x1090ab(0x197)),null==_0x212f89&&(_0x212f89=_0x1090ab(0x191)),_0x1090ab(0x169)==_0x1b3f20||'creator_id'==_0x1b3f20)return _0x1b3f20='updater_id'==_0x1b3f20?_0x1090ab(0x18e):_0x1090ab(0x146),'{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22'+_0x1b3f20+_0x1090ab(0x19c)+_0x1b3f20+_0x1090ab(0x160);if(_0x1090ab(0x176)==_0x1b3f20||_0x1090ab(0x180)==_0x1b3f20)return'{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22'+('updated_at'==_0x1b3f20?_0x1090ab(0x15c):'createdAt')+_0x1090ab(0x19c)+_0x1b3f20+_0x1090ab(0x19a);let _0x363a61=_0x1090ab(0x1a6)!=_0x246775&&_0x1090ab(0x170)!=_0x246775,_0x33388c='hidden'==_0x246775;0x1!=_0x33388c&&0x0!=_0x363a61||(_0x246775=_0x1090ab(0x197));let _0x3a8c28='{\x22type\x22:\x20\x22'+_0x246775+_0x1090ab(0x181)+camelCase(_0x1b3f20)+_0x1090ab(0x19c)+_0x5a6bf6+_0x1090ab(0x190)+_0x33388c+'\x20,\x22editable\x22:\x20'+_0x363a61+_0x1090ab(0x163)+!_0x58e1d6+_0x1090ab(0x157)+_0x212f89+_0x1090ab(0x195)+_0x208642+_0x1090ab(0x14b);return'code'==_0x1e5ed8[_0x1090ab(0x192)]&&(_0x3a8c28+=_0x1090ab(0x1a5)+_0x1e5ed8[_0x1090ab(0x14d)]+'\x22}'),'scenario'==_0x1e5ed8[_0x1090ab(0x192)]&&(_0x3a8c28+=',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22'+_0x1e5ed8['refName']+'\x22}'),'entity'==_0x1e5ed8[_0x1090ab(0x192)]&&(_0x3a8c28+=',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22'+camelCase(plural(_0x1e5ed8[_0x1090ab(0x14d)]))+_0x1090ab(0x1a3)),_0x3a8c28+='}',_0x3a8c28;});}[a0_0x19577b(0x1b0)](_0x4c6645){const _0x4d384e=a0_0x19577b;return _0x4c6645[_0x4d384e(0x18f)](_0x59a9b1=>_0x59a9b1['searchRank']>0x0)[_0x4d384e(0x171)](function(_0x44f11f,_0x239aa9){const _0x1fc600=_0x4d384e;return _0x44f11f[_0x1fc600(0x15f)]-_0x239aa9[_0x1fc600(0x15f)];})['map'](_0x3e7256=>{const _0x355140=_0x4d384e;let _0x411405=_0x3e7256[_0x355140(0x17b)];return _0x355140(0x18f)==_0x411405?'\x22'+camelCase(_0x3e7256[_0x355140(0x1a2)])+'\x22':(_0x411405||(_0x411405='eq'),_0x355140(0x198)+camelCase(_0x3e7256['name'])+_0x355140(0x1a8)+_0x411405+'\x22}');});}[a0_0x19577b(0x183)](_0xb3cad6){const _0x2803c3=a0_0x19577b;return _0xb3cad6[_0x2803c3(0x18f)](_0x142f10=>_0x142f10[_0x2803c3(0x174)]>0x0)[_0x2803c3(0x171)](function(_0x555246,_0x12a078){const _0x4c2df8=_0x2803c3;return _0x555246[_0x4c2df8(0x174)]-_0x12a078[_0x4c2df8(0x174)];})['map'](_0x788d6e=>_0x2803c3(0x178)+camelCase(_0x788d6e[_0x2803c3(0x1a2)])+'\x22,\x22desc\x22:'+_0x788d6e[_0x2803c3(0x193)]+'}');}async['createMenuData'](_0x30e1a7,_0x3dfa98,_0x4eab51,_0x189f0b,_0x3f70f0,_0x54d092){const _0xb720c9=a0_0x19577b;let _0x1d58c3=await _0x30e1a7[_0xb720c9(0x199)](menu_base_1['Menu'])['findOne']({'where':{'domain':{'id':_0x3dfa98['id']},'id':_0x189f0b}}),_0x5ee579=(await _0x30e1a7[_0xb720c9(0x199)](menu_base_1[_0xb720c9(0x16a)])[_0xb720c9(0x186)](_0xb720c9(0x16e)+_0x189f0b+_0xb720c9(0x148)+_0x189f0b+'\x27'))[0x0][_0xb720c9(0x1ad)]+0xa,_0x2adc55=new menu_base_1[(_0xb720c9(0x16a))]();_0x2adc55[_0xb720c9(0x1a2)]=_0x3f70f0,_0x2adc55['menuType']=_0xb720c9(0x1a0),_0x2adc55['category']='meta-grist-page',_0x2adc55[_0xb720c9(0x1ad)]=_0x5ee579,_0x2adc55[_0xb720c9(0x1b2)]=!0x1,_0x2adc55[_0xb720c9(0x185)]=_0x3f70f0,_0x2adc55[_0xb720c9(0x1af)]=_0x54d092,_0x2adc55[_0xb720c9(0x159)]='@things-factory/meta-ui/client/pages/meta-grist-page',_0x2adc55['parent']=_0x1d58c3,await _0x30e1a7[_0xb720c9(0x199)](menu_base_1[_0xb720c9(0x16a)])['save'](Object[_0xb720c9(0x15d)](Object[_0xb720c9(0x15d)]({},_0x2adc55),{'domain':_0x3dfa98,'creator':_0x4eab51,'updater':_0x4eab51}));}['enc'](_0x1335ed){const _0x13f50f=a0_0x19577b;let _0x23fc18=JSON[_0x13f50f(0x168)](_0x1335ed)[_0x13f50f(0x14f)](/(.{100})/)['filter'](_0x49ae49=>_0x49ae49),_0x383654=[_0x13f50f(0x1ac),_0x13f50f(0x17d),_0x13f50f(0x18c),'aes-256-cfb8','aes-256-cfb1',_0x13f50f(0x177),_0x13f50f(0x166),_0x13f50f(0x1ab)],_0x56594d=crypto_1[_0x13f50f(0x162)][_0x13f50f(0x17e)](0x20)[_0x13f50f(0x175)](_0x13f50f(0x18a)),_0x931a1d=Buffer[_0x13f50f(0x1a7)](_0x56594d,_0x13f50f(0x18a)),_0x50f3bc=_0x56594d[_0x13f50f(0x154)](0x0,0x10),_0x38a30f=['',_0x50f3bc,_0x50f3bc,_0x50f3bc,_0x50f3bc,_0x50f3bc,_0x50f3bc,_0x50f3bc],_0x5728b4=0x0,_0x5300ca=[];_0x5300ca[_0x13f50f(0x18d)](_0x56594d);for(var _0x180525=0x0;_0x180525<_0x23fc18[_0x13f50f(0x1b6)];_0x180525++,_0x5728b4++){_0x5728b4==_0x383654['length']&&(_0x5728b4=0x0);let _0x94525f=crypto_1[_0x13f50f(0x162)][_0x13f50f(0x173)](_0x383654[_0x5728b4],_0x931a1d,_0x38a30f[_0x5728b4]),_0x533cef=_0x94525f[_0x13f50f(0x19b)](_0x23fc18[_0x180525],_0x13f50f(0x17a),_0x13f50f(0x18a));_0x533cef+=_0x94525f[_0x13f50f(0x149)](_0x13f50f(0x18a)),_0x5300ca[_0x13f50f(0x18d)](_0x533cef);}return _0x5300ca['join'](_0x13f50f(0x179));}};tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x19577b(0x14c)])(a0_0x19577b(0x19d)),(0x0,type_graphql_1[a0_0x19577b(0x1b5)])(_0x5572fe=>Boolean,{'description':a0_0x19577b(0x147)}),tslib_1[a0_0x19577b(0x161)](0x0,(0x0,type_graphql_1[a0_0x19577b(0x16f)])('id')),tslib_1[a0_0x19577b(0x161)](0x1,(0x0,type_graphql_1[a0_0x19577b(0x16f)])(a0_0x19577b(0x1a1))),tslib_1[a0_0x19577b(0x161)](0x2,(0x0,type_graphql_1['Ctx'])()),tslib_1['__metadata'](a0_0x19577b(0x15b),Function),tslib_1[a0_0x19577b(0x158)](a0_0x19577b(0x1b1),[String,String,Object]),tslib_1[a0_0x19577b(0x158)](a0_0x19577b(0x1aa),Promise)],OperatoToolCreateMenu[a0_0x19577b(0x153)],a0_0x19577b(0x1ae),null),OperatoToolCreateMenu=tslib_1[a0_0x19577b(0x17f)]([(0x0,type_graphql_1[a0_0x19577b(0x1a9)])()],OperatoToolCreateMenu),exports[a0_0x19577b(0x14e)]=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_0x59ccf2=a0_0x3aa8;(function(_0x66a81d,_0x2148ce){const _0x115d11=a0_0x3aa8,_0x319a99=_0x66a81d();while(!![]){try{const _0x598605=parseInt(_0x115d11(0x1c4))/0x1*(parseInt(_0x115d11(0x1aa))/0x2)+-parseInt(_0x115d11(0x1ee))/0x3*(-parseInt(_0x115d11(0x1f7))/0x4)+parseInt(_0x115d11(0x1b5))/0x5*(-parseInt(_0x115d11(0x226))/0x6)+parseInt(_0x115d11(0x1db))/0x7+parseInt(_0x115d11(0x1de))/0x8*(-parseInt(_0x115d11(0x1d2))/0x9)+-parseInt(_0x115d11(0x1e3))/0xa+parseInt(_0x115d11(0x20a))/0xb*(parseInt(_0x115d11(0x1c6))/0xc);if(_0x598605===_0x2148ce)break;else _0x319a99['push'](_0x319a99['shift']());}catch(_0x30f3ea){_0x319a99['push'](_0x319a99['shift']());}}}(a0_0x5b33,0x74238));Object['defineProperty'](exports,a0_0x59ccf2(0x1c2),{'value':!0x0}),exports[a0_0x59ccf2(0x1ba)]=void 0x0;function a0_0x3aa8(_0x48f6b0,_0x298278){const _0x5b330b=a0_0x5b33();return a0_0x3aa8=function(_0x3aa873,_0x45f86f){_0x3aa873=_0x3aa873-0x1aa;let _0x1def14=_0x5b330b[_0x3aa873];return _0x1def14;},a0_0x3aa8(_0x48f6b0,_0x298278);}const tslib_1=require('tslib'),type_graphql_1=require('type-graphql'),resource_base_1=require('@things-factory/resource-base'),menu_base_1=require(a0_0x59ccf2(0x1ea)),tool_permission_1=require(a0_0x59ccf2(0x203)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x59ccf2(0x1fb)),{plural:plural}=require(a0_0x59ccf2(0x1e8)),crypto_1=tslib_1[a0_0x59ccf2(0x21a)](require('crypto'));let OperatoToolCreateMenu=class{async[a0_0x59ccf2(0x207)](_0x4d6f89,_0x27e32e,_0x380dbc){const _0x1a6268=a0_0x59ccf2,{domain:_0x510e31,user:_0x429bea,tx:_0x220e0c}=_0x380dbc[_0x1a6268(0x20b)];await(0x0,tool_permission_1[_0x1a6268(0x21d)])('',_0x380dbc);const _0x1771bb=await _0x220e0c[_0x1a6268(0x1ff)](resource_base_1[_0x1a6268(0x1b9)])[_0x1a6268(0x218)]({'where':{'domain':{'id':_0x510e31['id']},'id':_0x4d6f89}}),_0x46a767=await _0x220e0c[_0x1a6268(0x1ff)](resource_base_1[_0x1a6268(0x1d9)])[_0x1a6268(0x1f4)]({'where':{'domain':{'id':_0x510e31['id']},'entity':{'id':_0x1771bb['id']}}});let {name:_0x519885=''}=_0x1771bb||{},_0x334c38=kebabCase(_0x519885),_0x35ad7f=modelTemplate[_0x1a6268(0x21f)](/{{pascalCase name}}/g,startCase(camelCase(_0x519885))[_0x1a6268(0x21f)](/ /g,''))[_0x1a6268(0x21f)](/{{camelCase name}}/g,camelCase(_0x519885))[_0x1a6268(0x21f)](/{{snakeCase name}}/g,snakeCase(_0x519885))[_0x1a6268(0x21f)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x519885)))[_0x1a6268(0x21f)](/ /g,''))['replace'](/{{pluralCamelCase name}}/g,camelCase(plural(_0x519885)))[_0x1a6268(0x21f)](/{{name}}/g,_0x519885),_0x3328e5='';_0x1a6268(0x1f6)==_0x1771bb[_0x1a6268(0x20c)]?_0x3328e5='\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':_0x1a6268(0x1ca)==_0x1771bb[_0x1a6268(0x20c)]&&(_0x3328e5='\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'),_0x35ad7f=_0x35ad7f[_0x1a6268(0x21f)](/{{HistoryButton}}/g,_0x3328e5);let _0x139c61=this[_0x1a6268(0x1bd)](_0x46a767);_0x35ad7f=_0x35ad7f[_0x1a6268(0x21f)](/{{SortColumns}}/g,_0x139c61[_0x1a6268(0x1e6)](','));let _0x146f0e=this[_0x1a6268(0x20f)](_0x46a767);_0x35ad7f=_0x35ad7f['replace'](/{{SearchColumns}}/g,_0x146f0e[_0x1a6268(0x1e6)](','));let _0x59b3c2=this[_0x1a6268(0x1e4)](_0x46a767);return _0x35ad7f=_0x35ad7f[_0x1a6268(0x21f)](/{{GridColumns}}/g,_0x59b3c2[_0x1a6268(0x1e6)](',')),_0x35ad7f=this['enc'](_0x35ad7f),await this[_0x1a6268(0x1ad)](_0x220e0c,_0x510e31,_0x429bea,_0x27e32e,_0x334c38,_0x35ad7f),!0x0;}[a0_0x59ccf2(0x1e4)](_0x349b8e){const _0x35911b=a0_0x59ccf2;return _0x349b8e[_0x35911b(0x1e9)](_0x885feb=>'id'!=_0x885feb[_0x35911b(0x1b4)]&&_0x885feb[_0x35911b(0x1fc)]>0x0)[_0x35911b(0x1d1)](function(_0x5eb2b3,_0x34180a){const _0x3ae654=_0x35911b;return _0x5eb2b3['gridRank']-_0x34180a[_0x3ae654(0x1fc)];})[_0x35911b(0x1ae)](_0xcf678=>{const _0x47a6b2=_0x35911b;let {gridEditor:_0x298c79=_0x47a6b2(0x1bf),name:_0x4bbfa5,term:_0x3f2773,gridWidth:_0xc7d826=0x0,gridAlign:_0x11d0ab=_0x47a6b2(0x201),nullable:_0x46ca72=!0x1}=_0xcf678;if(null==_0x298c79&&(_0x298c79=_0x47a6b2(0x1bf)),null==_0x11d0ab&&(_0x11d0ab='left'),'updater_id'==_0x4bbfa5||_0x47a6b2(0x1cc)==_0x4bbfa5)return _0x4bbfa5=_0x47a6b2(0x1d3)==_0x4bbfa5?_0x47a6b2(0x1b7):'creator',_0x47a6b2(0x208)+_0x4bbfa5+_0x47a6b2(0x1f0)+_0x4bbfa5+_0x47a6b2(0x1af);if(_0x47a6b2(0x221)==_0x4bbfa5||_0x47a6b2(0x211)==_0x4bbfa5)return _0x47a6b2(0x1b2)+(_0x47a6b2(0x221)==_0x4bbfa5?_0x47a6b2(0x1df):'createdAt')+_0x47a6b2(0x1f0)+_0x4bbfa5+_0x47a6b2(0x1cd);let _0x24b09a='readonly'!=_0x298c79&&_0x47a6b2(0x1f2)!=_0x298c79,_0x3efd31=_0x47a6b2(0x1f2)==_0x298c79;0x1!=_0x3efd31&&0x0!=_0x24b09a||(_0x298c79='string');let _0x38220b='{\x22type\x22:\x20\x22'+_0x298c79+_0x47a6b2(0x223)+camelCase(_0x4bbfa5)+_0x47a6b2(0x1f0)+_0x3f2773+_0x47a6b2(0x209)+_0x3efd31+'\x20,\x22editable\x22:\x20'+_0x24b09a+_0x47a6b2(0x1be)+!_0x46ca72+_0x47a6b2(0x1ec)+_0x11d0ab+_0x47a6b2(0x21b)+_0xc7d826+_0x47a6b2(0x1f8);return _0x47a6b2(0x206)==_0xcf678[_0x47a6b2(0x21c)]&&(_0x38220b+=_0x47a6b2(0x220)+_0xcf678[_0x47a6b2(0x1d8)]+'\x22}'),_0x47a6b2(0x1e0)==_0xcf678[_0x47a6b2(0x21c)]&&(_0x38220b+=_0x47a6b2(0x1bb)+_0xcf678[_0x47a6b2(0x1d8)]+'\x22}'),_0x47a6b2(0x1d5)==_0xcf678[_0x47a6b2(0x21c)]&&(_0x38220b+=_0x47a6b2(0x214)+camelCase(plural(_0xcf678[_0x47a6b2(0x1d8)]))+'\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}'),_0x38220b+='}',_0x38220b;});}['createSearchCols'](_0x5460b7){const _0x45c206=a0_0x59ccf2;return _0x5460b7[_0x45c206(0x1e9)](_0x9a78d3=>_0x9a78d3[_0x45c206(0x1fd)]>0x0)[_0x45c206(0x1d1)](function(_0x51518e,_0x313ba9){const _0x34b7af=_0x45c206;return _0x51518e[_0x34b7af(0x1fd)]-_0x313ba9[_0x34b7af(0x1fd)];})[_0x45c206(0x1ae)](_0x3bf96f=>{const _0x23f2d6=_0x45c206;let _0x278adb=_0x3bf96f[_0x23f2d6(0x1b0)];return _0x23f2d6(0x1e9)==_0x278adb?'\x22'+camelCase(_0x3bf96f[_0x23f2d6(0x1b4)])+'\x22':(_0x278adb||(_0x278adb='eq'),_0x23f2d6(0x200)+camelCase(_0x3bf96f[_0x23f2d6(0x1b4)])+_0x23f2d6(0x1cf)+_0x278adb+'\x22}');});}[a0_0x59ccf2(0x1bd)](_0x147e1f){const _0x1234c6=a0_0x59ccf2;return _0x147e1f['filter'](_0x6b55b0=>_0x6b55b0['sortRank']>0x0)[_0x1234c6(0x1d1)](function(_0x327456,_0x4790c5){const _0x5049c7=_0x1234c6;return _0x327456[_0x5049c7(0x1f5)]-_0x4790c5['sortRank'];})[_0x1234c6(0x1ae)](_0x2965bb=>_0x1234c6(0x1dc)+camelCase(_0x2965bb[_0x1234c6(0x1b4)])+_0x1234c6(0x219)+_0x2965bb[_0x1234c6(0x222)]+'}');}async[a0_0x59ccf2(0x1ad)](_0x984560,_0x11103b,_0x2a18e7,_0x20b354,_0x78763,_0x6aa23f){const _0x27b219=a0_0x59ccf2;let _0x1d4c8a=await _0x984560[_0x27b219(0x1ff)](menu_base_1[_0x27b219(0x227)])[_0x27b219(0x218)]({'where':{'domain':{'id':_0x11103b['id']},'id':_0x20b354}}),_0x2ae873=(await _0x984560[_0x27b219(0x1ff)](menu_base_1[_0x27b219(0x227)])[_0x27b219(0x1ac)](_0x27b219(0x205)+_0x20b354+_0x27b219(0x1e2)+_0x20b354+'\x27'))[0x0][_0x27b219(0x1ef)]+0xa,_0x200240=new menu_base_1[(_0x27b219(0x227))]();_0x200240[_0x27b219(0x1b4)]=_0x78763,_0x200240[_0x27b219(0x1f1)]=_0x27b219(0x1c3),_0x200240['category']=_0x27b219(0x216),_0x200240[_0x27b219(0x1ef)]=_0x2ae873,_0x200240[_0x27b219(0x20d)]=!0x1,_0x200240[_0x27b219(0x1b8)]=_0x78763,_0x200240[_0x27b219(0x1b1)]=_0x6aa23f,_0x200240[_0x27b219(0x1e7)]='@things-factory/meta-ui/client/pages/meta-grist-page',_0x200240[_0x27b219(0x1fa)]=_0x1d4c8a,await _0x984560['getRepository'](menu_base_1[_0x27b219(0x227)])[_0x27b219(0x225)](Object[_0x27b219(0x1bc)](Object[_0x27b219(0x1bc)]({},_0x200240),{'domain':_0x11103b,'creator':_0x2a18e7,'updater':_0x2a18e7}));}[a0_0x59ccf2(0x1b6)](_0x434253){const _0x2ce894=a0_0x59ccf2;let _0x4adc50=JSON[_0x2ce894(0x1d4)](_0x434253)[_0x2ce894(0x1d6)](/(.{100})/)['filter'](_0x4bb2a1=>_0x4bb2a1),_0xeb050b=[_0x2ce894(0x1b3),'aes-256-cbc','aes-256-cfb',_0x2ce894(0x1e1),_0x2ce894(0x204),_0x2ce894(0x1eb),_0x2ce894(0x1f9),_0x2ce894(0x213)],_0x2c4278=crypto_1[_0x2ce894(0x1c5)][_0x2ce894(0x1ce)](0x20)[_0x2ce894(0x1dd)](_0x2ce894(0x1c0)),_0x56a36e=Buffer[_0x2ce894(0x224)](_0x2c4278,_0x2ce894(0x1c0)),_0x31a990=_0x2c4278[_0x2ce894(0x217)](0x0,0x10),_0x55aaa3=['',_0x31a990,_0x31a990,_0x31a990,_0x31a990,_0x31a990,_0x31a990,_0x31a990],_0x15d371=0x0,_0x4046b2=[];_0x4046b2['push'](_0x2c4278);for(var _0x12f27e=0x0;_0x12f27e<_0x4adc50[_0x2ce894(0x20e)];_0x12f27e++,_0x15d371++){_0x15d371==_0xeb050b[_0x2ce894(0x20e)]&&(_0x15d371=0x0);let _0x3de308=crypto_1[_0x2ce894(0x1c5)][_0x2ce894(0x1d0)](_0xeb050b[_0x15d371],_0x56a36e,_0x55aaa3[_0x15d371]),_0x244183=_0x3de308[_0x2ce894(0x1c1)](_0x4adc50[_0x12f27e],_0x2ce894(0x202),_0x2ce894(0x1c0));_0x244183+=_0x3de308[_0x2ce894(0x1f3)](_0x2ce894(0x1c0)),_0x4046b2[_0x2ce894(0x21e)](_0x244183);}return _0x4046b2[_0x2ce894(0x1e6)](_0x2ce894(0x1cb));}};tslib_1[a0_0x59ccf2(0x215)]([(0x0,type_graphql_1['Directive'])('@transaction'),(0x0,type_graphql_1[a0_0x59ccf2(0x1ed)])(_0x5677fb=>Boolean,{'description':a0_0x59ccf2(0x1fe)}),tslib_1['__param'](0x0,(0x0,type_graphql_1[a0_0x59ccf2(0x1c9)])('id')),tslib_1[a0_0x59ccf2(0x1e5)](0x1,(0x0,type_graphql_1['Arg'])(a0_0x59ccf2(0x1c7))),tslib_1[a0_0x59ccf2(0x1e5)](0x2,(0x0,type_graphql_1[a0_0x59ccf2(0x210)])()),tslib_1['__metadata'](a0_0x59ccf2(0x1ab),Function),tslib_1[a0_0x59ccf2(0x1da)]('design:paramtypes',[String,String,Object]),tslib_1[a0_0x59ccf2(0x1da)](a0_0x59ccf2(0x212),Promise)],OperatoToolCreateMenu['prototype'],a0_0x59ccf2(0x207),null),OperatoToolCreateMenu=tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x59ccf2(0x1d7)])()],OperatoToolCreateMenu),exports[a0_0x59ccf2(0x1ba)]=OperatoToolCreateMenu;function a0_0x5b33(){const _0x141254=['enc','updater','routing','Entity','OperatoToolCreateMenu',',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22','assign','createSortCols',',\x22mandatory\x22:\x20','string','hex','update','__esModule','SCREEN','56805TormES','default','99732zbgcxF','parent_menu_id','\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','Arg','COPY','h1z0q9i9x7q6','creator_id','\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}','randomBytes','\x22,\x22operator\x22:\x20\x22','createCipheriv','sort','340596TbdMXp','updater_id','stringify','entity','split','Resolver','refName','EntityColumn','__metadata','705201YqHLIZ','{\x22name\x22:\x22','toString','80DXkYmB','updatedAt','scenario','aes-256-cfb8','\x27\x20or\x20id\x20=\x20\x27','1823720UOMyac','createGridColumns','__param','join','resourceUrl','pluralize','filter','@things-factory/menu-base','aes-256-ofb',',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22','Mutation','388809bqtnuE','rank','\x22,\x22header\x22:\x20\x22','menuType','hidden','final','find','sortRank','JSON','28MSHeEy','\x20,\x22exportable\x22:\x20true','aes-256-ctr','parent','lodash','gridRank','searchRank','Operato\x20Tool\x20Create\x20Menu','getRepository','{\x22name\x22:\x20\x22','left','utf8','./../tool-secret/tool-permission','aes-256-cfb1','select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27','code','toolCreateMenu','{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22','\x22,\x22hidden\x22:','638NYgmnO','state','dataProp','hiddenFlag','length','createSearchCols','Ctx','created_at','design:returntype','aes256',',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22','__decorate','meta-grist-page','substring','findOne','\x22,\x22desc\x22:','__importDefault','\x22,\x22width\x22:','refType','checkStudioTemplateIsOverLimit','push','replace',',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22','updated_at','reverseSort','\x22,\x22name\x22:\x20\x22','from','save','86766cUoSiw','Menu','10irgcws','design:type','query','createMenuData','map','\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}','searchOper','template','{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22','aes-256-ecb','name','255hZPnEB'];a0_0x5b33=function(){return _0x141254;};return a0_0x5b33();}const modelTemplate=a0_0x59ccf2(0x1c8);
@@ -1 +1 @@
1
- 'use strict';function a0_0x224c(_0x8c6a47,_0x7750bb){const _0x1079c4=a0_0x1079();return a0_0x224c=function(_0x224cd6,_0x5d1617){_0x224cd6=_0x224cd6-0xb3;let _0x45a9c5=_0x1079c4[_0x224cd6];return _0x45a9c5;},a0_0x224c(_0x8c6a47,_0x7750bb);}const a0_0x36a4a4=a0_0x224c;(function(_0x3b98a4,_0x139fa9){const _0x4b1e9c=a0_0x224c,_0x1825a1=_0x3b98a4();while(!![]){try{const _0x14edcf=-parseInt(_0x4b1e9c(0xd4))/0x1+parseInt(_0x4b1e9c(0xe6))/0x2+-parseInt(_0x4b1e9c(0xe7))/0x3+-parseInt(_0x4b1e9c(0xe5))/0x4+-parseInt(_0x4b1e9c(0xf4))/0x5*(parseInt(_0x4b1e9c(0xf3))/0x6)+-parseInt(_0x4b1e9c(0x13d))/0x7+parseInt(_0x4b1e9c(0xf6))/0x8;if(_0x14edcf===_0x139fa9)break;else _0x1825a1['push'](_0x1825a1['shift']());}catch(_0x44c91b){_0x1825a1['push'](_0x1825a1['shift']());}}}(a0_0x1079,0xe3994));function a0_0x1079(){const _0x4aa13b=['colType','/server','design:returntype','\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','18XiGZSa','541690etmGPJ','__decorate','23336120Dkhzzk','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','\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','.ts','lodash','\x20})','utf8','/*\x20ENTITIES\x20*/\x0a\x09...','\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','Resolvers,\x20subscribers\x20as\x20','double','Entity','bigint','Entities,','replace','double\x20precision','\x0a\x20\x20','getRepository','\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','string','createHistoryServiceFiles','/server/service/','Operato\x20Tool\x20Create\x20Service','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','...','updater','toolCreateService','__metadata','find','pluralCamelCaseName','snakeCaseName','writeFileSync','float','readFileSync','join','Resolvers,','EntitySubscribers,','packages','createServicePath','existsPath','OperatoToolCreateService','creator_id','updated_at','-query.ts','sort','timestamp\x20without\x20time\x20zone','camelCaseName','prototype','Ctx','getProjectRootPath','\x27,\x20type:\x20\x27','\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\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','type\x20=>','push','import\x20{\x20entities\x20as\x20','length','pascalCaseName','createEntityText','writeFile','updater_id','\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201','createDir','createServiceFiles','\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','\x20{\x20nullable:\x20','/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...','@Column({name:\x27','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','env','\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','replaceNamesMap','8779085EYZmiK','rank','pluralPascalCaseName','\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','@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})','/packages','-type.ts','existsSync','__esModule','text','Date','indexOf','findOne','/packages/','Entities,\x20resolvers\x20as\x20','getColTxtType','getFieldType','/index.ts','-mutation.ts','\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','EntitySubscribers\x20}\x20from\x20\x27./','export\x20*\x20from\x20\x27./','datetime','JSON','map','columnToEntityColumn','pluralize','/service','__param','uniqRank','design:type','created_at','tableName','dataProp','@things-factory/resource-base','\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','long','domain_id','91765rsNSTd','defineProperty','mkdirSync','COPY','number','createTypeText','Float','PWD','index.ts','name','Arg','-history\x27','state','\x27,\x20nullable:\x20','decimal','tslib','-history.ts','5876128KLiGbV','2806854Ypiebj','744696nDxFNI','Int','createNoHistoryServiceFiels','@Field(','nullable','character\x20varying','/event-subscriber.ts','Resolvers\x20}\x20from\x20\x27./'];a0_0x1079=function(){return _0x4aa13b;};return a0_0x1079();}Object[a0_0x36a4a4(0xd5)](exports,a0_0x36a4a4(0xb6),{'value':!0x0}),exports[a0_0x36a4a4(0x11e)]=void 0x0;const tslib_1=require(a0_0x36a4a4(0xe3)),type_graphql_1=require('type-graphql'),shell_1=require('@things-factory/shell'),resource_base_1=require(a0_0x36a4a4(0xd0)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x36a4a4(0xfa)),{plural:plural}=require(a0_0x36a4a4(0xc8)),fs=require('fs');let OperatoToolCreateService=class{async[a0_0x36a4a4(0x110)](_0x593076,_0x2f0e12){const _0x239cd1=a0_0x36a4a4,{domain:_0x20357c}=_0x2f0e12[_0x239cd1(0xe0)],_0x38f01c=await(0x0,shell_1[_0x239cd1(0x107)])(resource_base_1[_0x239cd1(0x101)])[_0x239cd1(0xba)]({'where':{'id':_0x593076}}),_0xb0f946=await(0x0,shell_1[_0x239cd1(0x107)])(resource_base_1['EntityColumn'])[_0x239cd1(0x112)]({'where':{'domain':{'id':_0x20357c['id']},'entity':{'id':_0x38f01c['id']}}});let {name:_0x4a2bfd='',bundle:_0x175bb0=''}=_0x38f01c||{},_0x36942b=this[_0x239cd1(0x127)](),_0x5b7261=kebabCase(_0x4a2bfd);return await this[_0x239cd1(0x11c)](_0x36942b,_0x175bb0,_0x5b7261),await this[_0x239cd1(0x134)](_0x36942b,_0x175bb0,_0x4a2bfd,_0x5b7261,_0x38f01c,_0xb0f946),!0x0;}async['createServiceFiles'](_0x179873,_0x3cd5b4,_0x291427,_0xe4c820,_0x4ed6d1,_0x4e344c){const _0xe7eb74=a0_0x36a4a4;let _0x4f6272={'name':_0xe4c820,'tableName':_0x4ed6d1['tableName'],'pascalCaseName':startCase(camelCase(_0x291427))[_0xe7eb74(0x104)](/ /g,''),'camelCaseName':camelCase(_0x291427),'snakeCaseName':snakeCase(_0x291427),'pluralPascalCaseName':startCase(camelCase(plural(_0x291427)))['replace'](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x291427))},_0x2bbb7f=_0x179873+_0xe7eb74(0xbb)+_0x3cd5b4+_0xe7eb74(0x10b);['JSON',_0xe7eb74(0xd7)]['includes'](_0x4ed6d1[_0xe7eb74(0xcf)])?await this[_0xe7eb74(0x10a)](_0x2bbb7f,_0xe4c820,_0x4ed6d1,_0x4e344c,_0x4f6272):await this[_0xe7eb74(0xe9)](_0x2bbb7f,_0xe4c820,_0x4ed6d1,_0x4e344c,_0x4f6272);}async['createHistoryServiceFiles'](_0x29a357,_0x1ea5d4,_0x6d7899,_0x8651bb,_0x400d55){const _0x222bb9=a0_0x36a4a4;await this[_0x222bb9(0x130)](_0x29a357+(_0x1ea5d4+_0x222bb9(0xbf)),serviceHistoryIndex,_0x400d55);let _0x23938c=this['createEntityText'](_0x6d7899,_0x8651bb);await this['writeFile'](_0x29a357+(_0x1ea5d4+'/'+_0x1ea5d4+_0x222bb9(0xf9)),_0x23938c,_0x400d55),await this[_0x222bb9(0x130)](_0x29a357+(_0x1ea5d4+'/'+_0x1ea5d4+_0x222bb9(0x121)),serviceQuery,_0x400d55),await this[_0x222bb9(0x130)](_0x29a357+(_0x1ea5d4+'/'+_0x1ea5d4+_0x222bb9(0xc0)),serviceMutation,_0x400d55);let _0xf9be5f=this['createTypeText'](_0x8651bb);await this[_0x222bb9(0x130)](_0x29a357+(_0x1ea5d4+'/'+_0x1ea5d4+_0x222bb9(0xb4)),_0xf9be5f,_0x400d55);let _0x587772=this['createHistoryEntityText'](_0x6d7899,_0x8651bb);await this[_0x222bb9(0x130)](_0x29a357+(_0x1ea5d4+'/'+_0x1ea5d4+_0x222bb9(0xe4)),_0x587772,_0x400d55);let _0x274950='';_0x222bb9(0xc5)==_0x6d7899[_0x222bb9(0xcf)]?(_0x274950='\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['writeFile'](_0x29a357+(_0x1ea5d4+'/event-subscriber.ts'),serviceEntitySubscriber,_0x400d55)):_0x274950='';let _0x11e2a7=serviceEntitySubscriber[_0x222bb9(0x104)](/{{entityToJson}}/g,_0x274950);await this['writeFile'](_0x29a357+(_0x1ea5d4+_0x222bb9(0xed)),_0x11e2a7,_0x400d55),await this['writeFile'](_0x29a357+(_0x1ea5d4+'/'+_0x1ea5d4+'-history-query.ts'),serviceHistoryQuery,_0x400d55),await this['writeFile'](_0x29a357+(_0x1ea5d4+'/'+_0x1ea5d4+'-history-type.ts'),sereviceHistoryType,_0x400d55);let _0x4d9456=_0x29a357+'index.ts';0x0==await this[_0x222bb9(0x11d)](_0x4d9456)&&await this['writeFile'](_0x4d9456,allIndex,_0x400d55);let _0x437250=await fs[_0x222bb9(0x117)](_0x4d9456,_0x222bb9(0xfc));_0x437250[_0x222bb9(0xb9)](_0x222bb9(0xc3)+_0x400d55[_0x222bb9(0xdd)]+'/'+_0x400d55[_0x222bb9(0xdd)]+_0x222bb9(0xdf))<0x0&&(_0x437250=_0x437250[_0x222bb9(0x104)](/\/\* EXPORT ENTITY TYPES \*\//,_0x222bb9(0x10d)+_0x400d55[_0x222bb9(0xdd)]+'/'+_0x400d55[_0x222bb9(0xdd)]+'-history\x27')),_0x437250[_0x222bb9(0xb9)](_0x222bb9(0xc3)+_0x400d55[_0x222bb9(0xdd)]+'/'+_0x400d55['name']+'\x27')<0x0&&(_0x437250=_0x437250[_0x222bb9(0x104)](/\/\* EXPORT ENTITY TYPES \*\//,'/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./'+_0x400d55[_0x222bb9(0xdd)]+'/'+_0x400d55[_0x222bb9(0xdd)]+'\x27')),_0x437250['indexOf'](_0x222bb9(0x12c)+_0x400d55[_0x222bb9(0x12e)]+_0x222bb9(0xbc)+_0x400d55[_0x222bb9(0x12e)]+_0x222bb9(0xff)+_0x400d55[_0x222bb9(0x12e)]+_0x222bb9(0xc2)+_0x400d55[_0x222bb9(0xdd)]+'\x27')<0x0&&(_0x437250=_0x437250[_0x222bb9(0x104)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x222bb9(0x139)+_0x400d55['pascalCaseName']+_0x222bb9(0xbc)+_0x400d55[_0x222bb9(0x12e)]+_0x222bb9(0xff)+_0x400d55['pascalCaseName']+_0x222bb9(0xc2)+_0x400d55['name']+'\x27')),_0x437250[_0x222bb9(0xb9)](_0x222bb9(0x10e)+_0x400d55['pascalCaseName']+'Entities,')<0x0&&(_0x437250=_0x437250['replace'](/\/\* ENTITIES \*\//,_0x222bb9(0xfd)+_0x400d55[_0x222bb9(0x12e)]+_0x222bb9(0x103))),_0x437250['indexOf'](_0x222bb9(0x10e)+_0x400d55[_0x222bb9(0x12e)]+_0x222bb9(0x119))<0x0&&(_0x437250=_0x437250[_0x222bb9(0x104)](/\/\* RESOLVER CLASSES \*\//,_0x222bb9(0xf7)+_0x400d55['pascalCaseName']+'Resolvers,')),_0x437250['indexOf'](_0x222bb9(0x10e)+_0x400d55[_0x222bb9(0x12e)]+'EntitySubscribers,')<0x0&&(_0x437250=_0x437250[_0x222bb9(0x104)](/\/\* SUBSCRIBERS \*\//,_0x222bb9(0x137)+_0x400d55[_0x222bb9(0x12e)]+_0x222bb9(0x11a))),await this[_0x222bb9(0x130)](_0x4d9456,_0x437250,_0x400d55);}async['createNoHistoryServiceFiels'](_0x3ecba4,_0x34bf65,_0x1fe16d,_0x663650,_0x1dcec8){const _0x2d540f=a0_0x36a4a4;await this[_0x2d540f(0x130)](_0x3ecba4+(_0x34bf65+'/index.ts'),serviceIndex,_0x1dcec8),await this[_0x2d540f(0x130)](_0x3ecba4+(_0x34bf65+'/'+_0x34bf65+_0x2d540f(0x121)),serviceQuery,_0x1dcec8),await this['writeFile'](_0x3ecba4+(_0x34bf65+'/'+_0x34bf65+_0x2d540f(0xc0)),serviceMutation,_0x1dcec8);let _0x4b4139=this['createEntityText'](_0x1fe16d,_0x663650);await this[_0x2d540f(0x130)](_0x3ecba4+(_0x34bf65+'/'+_0x34bf65+_0x2d540f(0xf9)),_0x4b4139,_0x1dcec8);let _0x2cb7bc=this[_0x2d540f(0xd9)](_0x663650);await this[_0x2d540f(0x130)](_0x3ecba4+(_0x34bf65+'/'+_0x34bf65+_0x2d540f(0xb4)),_0x2cb7bc,_0x1dcec8);let _0x232908=_0x3ecba4+_0x2d540f(0xdc);0x0==await this[_0x2d540f(0x11d)](_0x232908)&&await this[_0x2d540f(0x130)](_0x232908,allIndex,_0x1dcec8);let _0x2a2c53=await fs[_0x2d540f(0x117)](_0x232908,_0x2d540f(0xfc));_0x2a2c53[_0x2d540f(0xb9)]('export\x20*\x20from\x20\x27./'+_0x1dcec8[_0x2d540f(0xdd)]+'/'+_0x1dcec8['name']+'\x27')<0x0&&(_0x2a2c53=_0x2a2c53[_0x2d540f(0x104)](/\/\* EXPORT ENTITY TYPES \*\//,_0x2d540f(0x10d)+_0x1dcec8[_0x2d540f(0xdd)]+'/'+_0x1dcec8[_0x2d540f(0xdd)]+'\x27')),_0x2a2c53[_0x2d540f(0xb9)](_0x2d540f(0x12c)+_0x1dcec8[_0x2d540f(0x12e)]+_0x2d540f(0xbc)+_0x1dcec8[_0x2d540f(0x12e)]+'Resolvers\x20}\x20from\x20\x27./'+_0x1dcec8['name']+'\x27')<0x0&&(_0x2a2c53=_0x2a2c53[_0x2d540f(0x104)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x2d540f(0x139)+_0x1dcec8['pascalCaseName']+_0x2d540f(0xbc)+_0x1dcec8[_0x2d540f(0x12e)]+_0x2d540f(0xee)+_0x1dcec8[_0x2d540f(0xdd)]+'\x27')),_0x2a2c53[_0x2d540f(0xb9)](_0x2d540f(0x10e)+_0x1dcec8['pascalCaseName']+'Entities,')<0x0&&(_0x2a2c53=_0x2a2c53['replace'](/\/\* ENTITIES \*\//,_0x2d540f(0xfd)+_0x1dcec8[_0x2d540f(0x12e)]+_0x2d540f(0x103))),_0x2a2c53[_0x2d540f(0xb9)]('...'+_0x1dcec8['pascalCaseName']+_0x2d540f(0x119))<0x0&&(_0x2a2c53=_0x2a2c53[_0x2d540f(0x104)](/\/\* RESOLVER CLASSES \*\//,'/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...'+_0x1dcec8[_0x2d540f(0x12e)]+_0x2d540f(0x119))),await this[_0x2d540f(0x130)](_0x232908,_0x2a2c53,_0x1dcec8);}[a0_0x36a4a4(0xd9)](_0x1dd8a1){const _0x4bded3=a0_0x36a4a4;let _0x6b3f65=sereviceType,_0x40798b=_0x1dd8a1[_0x4bded3(0xc6)](_0x5b5b93=>{const _0x1643dc=_0x4bded3;if('id'==_0x5b5b93[_0x1643dc(0xdd)])return'';if(_0x1643dc(0xd3)==_0x5b5b93[_0x1643dc(0xdd)])return'';if(_0x1643dc(0xcd)==_0x5b5b93[_0x1643dc(0xdd)])return'';if('updated_at'==_0x5b5b93[_0x1643dc(0xdd)])return'';if('creator_id'==_0x5b5b93[_0x1643dc(0xdd)])return'';if('updater_id'==_0x5b5b93[_0x1643dc(0xdd)])return'';let _0x199798=this[_0x1643dc(0xbe)](_0x5b5b93),_0x79b9ce=this[_0x1643dc(0xbd)](_0x5b5b93),_0xee086d=camelCase(_0x5b5b93[_0x1643dc(0xdd)]);return'\x20\x20'+(_0x1643dc(0xea)+(0x0==_0x199798[_0x1643dc(0x12d)]?'':_0x1643dc(0x12a)+_0x199798+',')+_0x1643dc(0x136)+_0x5b5b93[_0x1643dc(0xeb)]+'\x20})')+_0x1643dc(0x106)+(''+_0xee086d+(_0x5b5b93['nullable']?'?':'')+':\x20'+_0x79b9ce)+'\x0a';});_0x6b3f65=_0x6b3f65[_0x4bded3(0x104)](/{{newTypeColumns}}/g,_0x40798b['join']('\x0a'));let _0x293e36=_0x1dd8a1['map'](_0x369228=>{const _0x48560f=_0x4bded3;if('id'==_0x369228['name'])return'';if(_0x48560f(0xd3)==_0x369228[_0x48560f(0xdd)])return'';if(_0x48560f(0xcd)==_0x369228[_0x48560f(0xdd)])return'';if(_0x48560f(0x120)==_0x369228[_0x48560f(0xdd)])return'';if(_0x48560f(0x11f)==_0x369228[_0x48560f(0xdd)])return'';if('updater_id'==_0x369228[_0x48560f(0xdd)])return'';let _0x35028d=this['getFieldType'](_0x369228),_0x20e690=this[_0x48560f(0xbd)](_0x369228);_0x369228[_0x48560f(0xeb)]=!0x0;let _0x520476=camelCase(_0x369228[_0x48560f(0xdd)]);return'\x20\x20'+(_0x48560f(0xea)+(0x0==_0x35028d[_0x48560f(0x12d)]?'':_0x48560f(0x12a)+_0x35028d+',')+'\x20{\x20nullable:\x20'+_0x369228[_0x48560f(0xeb)]+_0x48560f(0xfb))+'\x0a\x20\x20'+(''+_0x520476+(_0x369228['nullable']?'?':'')+':\x20'+_0x20e690)+'\x0a';});return _0x6b3f65=_0x6b3f65['replace'](/{{patchTypeColumns}}/g,_0x293e36[_0x4bded3(0x118)]('\x0a')),_0x6b3f65;}[a0_0x36a4a4(0x12f)](_0x4e9041,_0xad0226){const _0x829182=a0_0x36a4a4;let _0x4e622e=serviceEntity,_0x4dd029=_0xad0226[_0x829182(0x122)](function(_0x4f13a8,_0x198840){const _0x301085=_0x829182;return _0x4f13a8[_0x301085(0x13e)]-_0x198840['rank'];})[_0x829182(0xc6)](_0x2e9479=>this['columnToEntityColumn'](_0x2e9479));[_0x829182(0xd7),_0x829182(0xc5)]['includes'](_0x4e9041['dataProp'])&&_0x4dd029[_0x829182(0x12b)](_0x829182(0x132)),_0x4e622e=_0x4e622e[_0x829182(0x104)](/{{entityColumns}}/g,_0x4dd029[_0x829182(0x118)]('\x0a'));let _0x4b418d='',_0x1c7d37=_0xad0226['filter'](_0x561668=>_0x561668[_0x829182(0xcb)]&&_0x561668[_0x829182(0xcb)]>0x0)[_0x829182(0x122)](function(_0x5522f9,_0x352063){const _0x34f650=_0x829182;return _0x5522f9[_0x34f650(0xcb)]-_0x352063[_0x34f650(0xcb)];});if(_0x1c7d37[_0x829182(0x12d)]>0x0){_0x4b418d=_0x829182(0x141);let _0x2d62b5=_0x1c7d37[_0x829182(0xc6)](_0x3454e3=>{const _0x4701dc=_0x829182;let _0x5dd992=_0x3454e3[_0x4701dc(0xdd)];return _0x4701dc(0xd3)==_0x3454e3['name']&&(_0x5dd992='domain'),_0x4701dc(0x11f)==_0x3454e3['name']&&(_0x5dd992='creator'),_0x4701dc(0x131)==_0x3454e3['name']&&(_0x5dd992=_0x4701dc(0x10f)),'{{camelCase\x20name}}.'+camelCase(_0x5dd992);});_0x4b418d=_0x4b418d[_0x829182(0x104)](/{{indexColumns}}/g,_0x2d62b5[_0x829182(0x118)](','));}return _0x4e622e=_0x4e622e[_0x829182(0x104)](/{{indexAnn}}/g,_0x4b418d),_0x4e622e;}['createHistoryEntityText'](_0x42c489,_0x5466aa){const _0xfa48a4=a0_0x36a4a4;let _0x45b2a8=_0xfa48a4(0xc5)==_0x42c489[_0xfa48a4(0xcf)]?serviceEntityHistJson:serviceEntityHistCopy,_0x1161c4=_0x5466aa[_0xfa48a4(0x122)](function(_0x4ecf36,_0x47a29b){return _0x4ecf36['rank']-_0x47a29b['rank'];})[_0xfa48a4(0xc6)](_0x54b6c4=>this[_0xfa48a4(0xc7)](_0x54b6c4));return _0x45b2a8=_0x45b2a8[_0xfa48a4(0x104)](/{{entityColumns}}/g,_0x1161c4[_0xfa48a4(0x118)]('\x0a')),_0x45b2a8;}['columnToEntityColumn'](_0x5b41f3){const _0x5eb5b1=a0_0x36a4a4;if('id'==_0x5b41f3[_0x5eb5b1(0xdd)])return'';if(_0x5eb5b1(0xd3)==_0x5b41f3[_0x5eb5b1(0xdd)])return'';if(_0x5eb5b1(0xcd)==_0x5b41f3['name'])return'';if(_0x5eb5b1(0x120)==_0x5b41f3[_0x5eb5b1(0xdd)])return'';if('creator_id'==_0x5b41f3[_0x5eb5b1(0xdd)])return'';if('updater_id'==_0x5b41f3[_0x5eb5b1(0xdd)])return'';let _0x414e27=_0x5b41f3[_0x5eb5b1(0xef)];_0x5eb5b1(0x100)==_0x5b41f3[_0x5eb5b1(0xef)]&&(_0x414e27=_0x5eb5b1(0x105)),_0x5eb5b1(0xd2)==_0x5b41f3[_0x5eb5b1(0xef)]&&(_0x414e27=_0x5eb5b1(0x102)),'string'==_0x5b41f3[_0x5eb5b1(0xef)]&&(_0x414e27=_0x5eb5b1(0xec)),_0x5eb5b1(0xc4)==_0x5b41f3['colType']&&(_0x414e27=_0x5eb5b1(0x123));let _0x5f25ca='';_0x5eb5b1(0x109)==_0x5b41f3['colType']&&(_0x5f25ca=_0x5b41f3['colSize']);let _0x329293=this[_0x5eb5b1(0xbe)](_0x5b41f3),_0x4f16e6=this[_0x5eb5b1(0xbd)](_0x5b41f3),_0x40e1d0=camelCase(_0x5b41f3[_0x5eb5b1(0xdd)]);return'\x20\x20'+(_0x5eb5b1(0x138)+_0x5b41f3[_0x5eb5b1(0xdd)]+_0x5eb5b1(0x128)+_0x414e27+_0x5eb5b1(0xe1)+_0x5b41f3[_0x5eb5b1(0xeb)]+'\x20'+(0x0==_0x5f25ca[_0x5eb5b1(0x12d)]?'':',length:'+_0x5f25ca)+_0x5eb5b1(0xfb))+'\x0a\x20\x20'+(_0x5eb5b1(0xea)+(0x0==_0x329293[_0x5eb5b1(0x12d)]?'':_0x5eb5b1(0x12a)+_0x329293+',')+_0x5eb5b1(0x136)+_0x5b41f3[_0x5eb5b1(0xeb)]+_0x5eb5b1(0xfb))+_0x5eb5b1(0x106)+(''+_0x40e1d0+(_0x5b41f3[_0x5eb5b1(0xeb)]?'?':'')+':\x20'+_0x4f16e6)+'\x0a';}[a0_0x36a4a4(0xbe)](_0x403fb2){const _0x3bb7e5=a0_0x36a4a4;let _0x5e0052='';return'double'==_0x403fb2['colType']&&(_0x5e0052='Float'),_0x3bb7e5(0x116)==_0x403fb2[_0x3bb7e5(0xef)]&&(_0x5e0052=_0x3bb7e5(0xda)),_0x3bb7e5(0xd2)==_0x403fb2['colType']&&(_0x5e0052=_0x3bb7e5(0xe8)),'integer'==_0x403fb2[_0x3bb7e5(0xef)]&&(_0x5e0052=_0x3bb7e5(0xe8)),_0x5e0052;}[a0_0x36a4a4(0xbd)](_0x2144a5){const _0x5817bf=a0_0x36a4a4;let _0x302a2e=_0x2144a5[_0x5817bf(0xef)];return _0x5817bf(0xe2)==_0x2144a5[_0x5817bf(0xef)]&&(_0x302a2e=_0x5817bf(0xd8)),_0x5817bf(0x100)==_0x2144a5[_0x5817bf(0xef)]&&(_0x302a2e='number'),_0x5817bf(0x116)==_0x2144a5[_0x5817bf(0xef)]&&(_0x302a2e='number'),'integer'==_0x2144a5['colType']&&(_0x302a2e=_0x5817bf(0xd8)),_0x5817bf(0xd2)==_0x2144a5[_0x5817bf(0xef)]&&(_0x302a2e=_0x5817bf(0xd8)),_0x5817bf(0xc4)==_0x2144a5[_0x5817bf(0xef)]&&(_0x302a2e=_0x5817bf(0xb8)),'date'==_0x2144a5[_0x5817bf(0xef)]&&(_0x302a2e=_0x5817bf(0xb8)),_0x5817bf(0xb7)==_0x2144a5['colType']&&(_0x302a2e=_0x5817bf(0x109)),_0x302a2e;}async['writeFile'](_0x5758dd,_0x5397ec,_0x52fbaa){const _0x194c81=a0_0x36a4a4;await fs[_0x194c81(0x115)](_0x5758dd,this[_0x194c81(0x13c)](_0x5397ec,_0x52fbaa),'utf8');}['replaceNamesMap'](_0xef7cbd,_0x518630){const _0x5cf156=a0_0x36a4a4;return _0xef7cbd[_0x5cf156(0x104)](/{{pascalCase name}}/g,_0x518630[_0x5cf156(0x12e)])[_0x5cf156(0x104)](/{{camelCase name}}/g,_0x518630[_0x5cf156(0x124)])[_0x5cf156(0x104)](/{{snakeCase name}}/g,_0x518630[_0x5cf156(0x114)])['replace'](/{{pluralPascalCase name}}/g,_0x518630[_0x5cf156(0x13f)])[_0x5cf156(0x104)](/{{pluralCamelCase name}}/g,_0x518630[_0x5cf156(0x113)])[_0x5cf156(0x104)](/{{tableName}}/g,_0x518630[_0x5cf156(0xce)])[_0x5cf156(0x104)](/{{name}}/g,_0x518630[_0x5cf156(0xdd)]);}async[a0_0x36a4a4(0x11c)](_0x412036,_0x1b6074,_0xd1687d){const _0x193517=a0_0x36a4a4;let _0x17fae1=_0x412036+_0x193517(0xb3);await this[_0x193517(0x133)](_0x17fae1),_0x17fae1=_0x17fae1+'/'+_0x1b6074,await this[_0x193517(0x133)](_0x17fae1),_0x17fae1+=_0x193517(0xf0),await this[_0x193517(0x133)](_0x17fae1),_0x17fae1+=_0x193517(0xc9),await this[_0x193517(0x133)](_0x17fae1),_0x17fae1=_0x17fae1+'/'+_0xd1687d,await this['createDir'](_0x17fae1);}[a0_0x36a4a4(0x127)](){const _0xc887f0=a0_0x36a4a4;let _0xba381f=process[_0xc887f0(0x13a)][_0xc887f0(0xdb)]['split']('/'),_0x1318c9=[];for(let _0x275e43=0x0;_0x275e43<_0xba381f[_0xc887f0(0x12d)]&&_0xc887f0(0x11b)!=_0xba381f[_0x275e43];_0x275e43++)_0x1318c9['push'](_0xba381f[_0x275e43]);return _0x1318c9[_0xc887f0(0x118)]('/');}async[a0_0x36a4a4(0x133)](_0x2a829b){const _0x2e8574=a0_0x36a4a4;0x0==await this[_0x2e8574(0x11d)](_0x2a829b)&&fs[_0x2e8574(0xd6)](_0x2a829b);}async[a0_0x36a4a4(0x11d)](_0x9c5ed4){const _0xf3e361=a0_0x36a4a4;return await fs[_0xf3e361(0xb5)](_0x9c5ed4);}};tslib_1[a0_0x36a4a4(0xf5)]([(0x0,type_graphql_1['Query'])(_0x40a933=>Boolean,{'description':a0_0x36a4a4(0x10c)}),tslib_1[a0_0x36a4a4(0xca)](0x0,(0x0,type_graphql_1[a0_0x36a4a4(0xde)])('id')),tslib_1['__param'](0x1,(0x0,type_graphql_1[a0_0x36a4a4(0x126)])()),tslib_1[a0_0x36a4a4(0x111)](a0_0x36a4a4(0xcc),Function),tslib_1[a0_0x36a4a4(0x111)]('design:paramtypes',[String,Object]),tslib_1[a0_0x36a4a4(0x111)](a0_0x36a4a4(0xf1),Promise)],OperatoToolCreateService[a0_0x36a4a4(0x125)],a0_0x36a4a4(0x110),null),OperatoToolCreateService=tslib_1['__decorate']([(0x0,type_graphql_1['Resolver'])()],OperatoToolCreateService),exports[a0_0x36a4a4(0x11e)]=OperatoToolCreateService;const allIndex=a0_0x36a4a4(0xfe),serviceIndex=a0_0x36a4a4(0x13b),serviceHistoryIndex=a0_0x36a4a4(0xc1),serviceQuery=a0_0x36a4a4(0x129),serviceHistoryQuery=a0_0x36a4a4(0xf8),serviceMutation=a0_0x36a4a4(0x135),sereviceType=a0_0x36a4a4(0xd1),sereviceHistoryType='\x0aimport\x20{\x20ObjectType,\x20Field,\x20InputType,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0a\x0a@ObjectType()\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryList\x20{\x0a\x20\x20@Field(type\x20=>\x20[{{pascalCase\x20name}}History])\x0a\x20\x20items:\x20{{pascalCase\x20name}}History[]\x0a\x0a\x20\x20@Field(type\x20=>\x20Int)\x0a\x20\x20total:\x20number\x0a}\x0a',serviceEntity='\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20Domain\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0a@Entity(\x27{{tableName}}\x27)\x0a{{indexAnn}}\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}\x20{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a',serviceEntityHistCopy=a0_0x36a4a4(0x140),serviceEntityHistJson=a0_0x36a4a4(0x108),serviceEntitySubscriber=a0_0x36a4a4(0xf2);
1
+ 'use strict';const a0_0x50dfcb=a0_0x33e2;(function(_0x195df3,_0x3f7a54){const _0x500188=a0_0x33e2,_0x5942f4=_0x195df3();while(!![]){try{const _0x13d5b3=-parseInt(_0x500188(0x114))/0x1+-parseInt(_0x500188(0xca))/0x2+-parseInt(_0x500188(0x10d))/0x3*(-parseInt(_0x500188(0xcf))/0x4)+-parseInt(_0x500188(0x118))/0x5+parseInt(_0x500188(0x11e))/0x6*(parseInt(_0x500188(0xb3))/0x7)+-parseInt(_0x500188(0x112))/0x8*(parseInt(_0x500188(0xcd))/0x9)+parseInt(_0x500188(0xad))/0xa;if(_0x13d5b3===_0x3f7a54)break;else _0x5942f4['push'](_0x5942f4['shift']());}catch(_0x41c395){_0x5942f4['push'](_0x5942f4['shift']());}}}(a0_0x18d3,0x8eaca));function a0_0x33e2(_0x5155fb,_0x260e23){const _0x18d335=a0_0x18d3();return a0_0x33e2=function(_0x33e27e,_0x45f5f8){_0x33e27e=_0x33e27e-0xa1;let _0x564f31=_0x18d335[_0x33e27e];return _0x564f31;},a0_0x33e2(_0x5155fb,_0x260e23);}function a0_0x18d3(){const _0x32923b=['filter','design:paramtypes','Resolvers,\x20subscribers\x20as\x20','@Column({name:\x27','14766230uHhPEw','{{camelCase\x20name}}.','findOne','sort','length','@things-factory/shell','161GIFyFS','-mutation.ts','export\x20*\x20from\x20\x27./','tableName','JSON','split','\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','map','character\x20varying','pascalCaseName','\x20{\x20nullable:\x20','\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','type-graphql','replaceNamesMap','decimal','find','created_at','uniqRank','type\x20=>','pluralPascalCaseName','\x27,\x20type:\x20\x27','includes','createTypeText','1726342auxLsO','Ctx','createEntityText','27kRyDaT','join','12cREIJv','\x27,\x20nullable:\x20','@things-factory/resource-base','packages','design:type','nullable','timestamp\x20without\x20time\x20zone','\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','/event-subscriber.ts','Resolver','\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','camelCaseName','__decorate','getFieldType','long','...','\x20})','createHistoryServiceFiles',',length:','createNoHistoryServiceFiels','existsSync','-query.ts','double','PWD','creator','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','float','.ts','-history-type.ts','domain','text','Arg','EntitySubscribers\x20}\x20from\x20\x27./','colType','__esModule','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','creator_id','createHistoryEntityText','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','snakeCaseName','\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','EntityColumn','existsPath','domain_id','Int','integer','pluralCamelCaseName','updater_id','\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','index.ts','readFileSync','Resolvers,','indexOf','Resolvers\x20}\x20from\x20\x27./','dataProp','number','Date','writeFile','\x0a\x20\x20','createServicePath','getProjectRootPath','createServiceFiles','950757dgUjCu','import\x20{\x20entities\x20as\x20','\x0aimport\x20{\x20ObjectType,\x20Field,\x20InputType,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@InputType()\x0aexport\x20class\x20New{{pascalCase\x20name}}\x20{\x0a{{newTypeColumns}}\x0a}\x0a\x0a@InputType()\x0aexport\x20class\x20{{pascalCase\x20name}}Patch\x20{\x0a\x20\x20@Field(type\x20=>\x20ID,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20id?:\x20string\x0a\x0a{{patchTypeColumns}}\x0a\x0a\x20\x20@Field()\x0a\x20\x20cuFlag:\x20string\x0a}\x0a\x0a@ObjectType()\x0aexport\x20class\x20{{pascalCase\x20name}}List\x20{\x0a\x20\x20@Field(type\x20=>\x20[{{pascalCase\x20name}}])\x0a\x20\x20items:\x20{{pascalCase\x20name}}[]\x0a\x0a\x20\x20@Field(type\x20=>\x20Int)\x0a\x20\x20total:\x20number\x0a}\x0a','\x0aimport\x20{\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','name','2622792jFWldR','toolCreateService','822506zalIpQ','/index.ts','-history\x27','tslib','397855QzWzjn','replace','Entity','/packages/','getRepository','updater','236298OgrIlm','date','__param','__metadata','datetime','updated_at','createDir','\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','bigint','utf8','EntitySubscribers,','Float','COPY','pluralize','-type.ts','\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}List\x20}\x20from\x20\x27./{{name}}-type\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Query\x20{\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20fetch\x20a\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20return\x20await\x20getRepository({{pascalCase\x20name}}).findOne({\x0a\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20}\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}List,\x20{\x20description:\x20\x27To\x20fetch\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{pluralCamelCase\x20name}}(@Args()\x20params:\x20ListParam,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}List>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20queryBuilder\x20=\x20getQueryBuilderFromListParams({\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20params,\x0a\x20\x20\x20\x20\x20\x20repository:\x20await\x20getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20const\x20convertedParams\x20=\x20convertListParams(params,\x20domain.id)\x0a\x20\x20\x20\x20const\x20[items,\x20total]\x20=\x20await\x20queryBuilder.getManyAndCount()\x0a\x0a\x20\x20\x20\x20return\x20{\x20items,\x20total\x20}\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20Domain)\x0a\x20\x20async\x20domain(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<Domain>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(Domain).findOneBy({id:{{camelCase\x20name}}.domainId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20updater(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.updaterId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20creator(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.creatorId})\x0a\x20\x20}\x0a}\x0a','@Field(','/*\x20ENTITIES\x20*/\x0a\x09...','env','getColTxtType','rank','string','push','Operato\x20Tool\x20Create\x20Service','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','Entities,','OperatoToolCreateService','lodash','Entities,\x20resolvers\x20as\x20'];a0_0x18d3=function(){return _0x32923b;};return a0_0x18d3();}Object['defineProperty'](exports,a0_0x50dfcb(0xf1),{'value':!0x0}),exports[a0_0x50dfcb(0xa6)]=void 0x0;const tslib_1=require(a0_0x50dfcb(0x117)),type_graphql_1=require(a0_0x50dfcb(0xbf)),shell_1=require(a0_0x50dfcb(0xb2)),resource_base_1=require(a0_0x50dfcb(0xd1)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x50dfcb(0xa7)),{plural:plural}=require(a0_0x50dfcb(0x12b)),fs=require('fs');let OperatoToolCreateService=class{async[a0_0x50dfcb(0x113)](_0x1e379e,_0xb21a33){const _0x350f59=a0_0x50dfcb,{domain:_0x2b547c}=_0xb21a33['state'],_0x2ec53e=await(0x0,shell_1[_0x350f59(0x11c)])(resource_base_1[_0x350f59(0x11a)])[_0x350f59(0xaf)]({'where':{'id':_0x1e379e}}),_0x4f444b=await(0x0,shell_1['getRepository'])(resource_base_1[_0x350f59(0xf8)])[_0x350f59(0xc2)]({'where':{'domain':{'id':_0x2b547c['id']},'entity':{'id':_0x2ec53e['id']}}});let {name:_0x47145d='',bundle:_0x225158=''}=_0x2ec53e||{},_0x1fd901=this[_0x350f59(0x10b)](),_0x1d9d9b=kebabCase(_0x47145d);return await this[_0x350f59(0x10a)](_0x1fd901,_0x225158,_0x1d9d9b),await this[_0x350f59(0x10c)](_0x1fd901,_0x225158,_0x47145d,_0x1d9d9b,_0x2ec53e,_0x4f444b),!0x0;}async[a0_0x50dfcb(0x10c)](_0x5182a7,_0x5b779c,_0x58c422,_0x3eeb9a,_0x323d67,_0x2af6f5){const _0x19167f=a0_0x50dfcb;let _0x5e2df6={'name':_0x3eeb9a,'tableName':_0x323d67[_0x19167f(0xb6)],'pascalCaseName':startCase(camelCase(_0x58c422))[_0x19167f(0x119)](/ /g,''),'camelCaseName':camelCase(_0x58c422),'snakeCaseName':snakeCase(_0x58c422),'pluralPascalCaseName':startCase(camelCase(plural(_0x58c422)))[_0x19167f(0x119)](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x58c422))},_0x2feb97=_0x5182a7+_0x19167f(0x11b)+_0x5b779c+'/server/service/';['JSON','COPY'][_0x19167f(0xc8)](_0x323d67[_0x19167f(0x105)])?await this[_0x19167f(0xe0)](_0x2feb97,_0x3eeb9a,_0x323d67,_0x2af6f5,_0x5e2df6):await this[_0x19167f(0xe2)](_0x2feb97,_0x3eeb9a,_0x323d67,_0x2af6f5,_0x5e2df6);}async['createHistoryServiceFiles'](_0x1f90bb,_0x2f6f24,_0x48f73a,_0x1dedb2,_0x25cc46){const _0x120010=a0_0x50dfcb;await this[_0x120010(0x108)](_0x1f90bb+(_0x2f6f24+_0x120010(0x115)),serviceHistoryIndex,_0x25cc46);let _0x3504e7=this[_0x120010(0xcc)](_0x48f73a,_0x1dedb2);await this[_0x120010(0x108)](_0x1f90bb+(_0x2f6f24+'/'+_0x2f6f24+_0x120010(0xea)),_0x3504e7,_0x25cc46),await this[_0x120010(0x108)](_0x1f90bb+(_0x2f6f24+'/'+_0x2f6f24+_0x120010(0xe4)),serviceQuery,_0x25cc46),await this[_0x120010(0x108)](_0x1f90bb+(_0x2f6f24+'/'+_0x2f6f24+_0x120010(0xb4)),serviceMutation,_0x25cc46);let _0x355277=this[_0x120010(0xc9)](_0x1dedb2);await this['writeFile'](_0x1f90bb+(_0x2f6f24+'/'+_0x2f6f24+_0x120010(0x12c)),_0x355277,_0x25cc46);let _0xd96ae0=this['createHistoryEntityText'](_0x48f73a,_0x1dedb2);await this[_0x120010(0x108)](_0x1f90bb+(_0x2f6f24+'/'+_0x2f6f24+'-history.ts'),_0xd96ae0,_0x25cc46);let _0x308f33='';'JSON'==_0x48f73a[_0x120010(0x105)]?(_0x308f33=_0x120010(0xf7),await this[_0x120010(0x108)](_0x1f90bb+(_0x2f6f24+_0x120010(0xd7)),serviceEntitySubscriber,_0x25cc46)):_0x308f33='';let _0x49465d=serviceEntitySubscriber[_0x120010(0x119)](/{{entityToJson}}/g,_0x308f33);await this[_0x120010(0x108)](_0x1f90bb+(_0x2f6f24+_0x120010(0xd7)),_0x49465d,_0x25cc46),await this[_0x120010(0x108)](_0x1f90bb+(_0x2f6f24+'/'+_0x2f6f24+'-history-query.ts'),serviceHistoryQuery,_0x25cc46),await this[_0x120010(0x108)](_0x1f90bb+(_0x2f6f24+'/'+_0x2f6f24+_0x120010(0xeb)),sereviceHistoryType,_0x25cc46);let _0x476cfd=_0x1f90bb+_0x120010(0x100);0x0==await this[_0x120010(0xf9)](_0x476cfd)&&await this[_0x120010(0x108)](_0x476cfd,allIndex,_0x25cc46);let _0x324980=await fs[_0x120010(0x101)](_0x476cfd,'utf8');_0x324980['indexOf']('export\x20*\x20from\x20\x27./'+_0x25cc46[_0x120010(0x111)]+'/'+_0x25cc46[_0x120010(0x111)]+_0x120010(0x116))<0x0&&(_0x324980=_0x324980[_0x120010(0x119)](/\/\* EXPORT ENTITY TYPES \*\//,_0x120010(0xe8)+_0x25cc46[_0x120010(0x111)]+'/'+_0x25cc46[_0x120010(0x111)]+'-history\x27')),_0x324980[_0x120010(0x103)]('export\x20*\x20from\x20\x27./'+_0x25cc46['name']+'/'+_0x25cc46[_0x120010(0x111)]+'\x27')<0x0&&(_0x324980=_0x324980[_0x120010(0x119)](/\/\* EXPORT ENTITY TYPES \*\//,_0x120010(0xe8)+_0x25cc46[_0x120010(0x111)]+'/'+_0x25cc46[_0x120010(0x111)]+'\x27')),_0x324980[_0x120010(0x103)](_0x120010(0x10e)+_0x25cc46[_0x120010(0xbc)]+'Entities,\x20resolvers\x20as\x20'+_0x25cc46[_0x120010(0xbc)]+_0x120010(0xab)+_0x25cc46[_0x120010(0xbc)]+_0x120010(0xef)+_0x25cc46['name']+'\x27')<0x0&&(_0x324980=_0x324980['replace'](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x120010(0xa4)+_0x25cc46[_0x120010(0xbc)]+_0x120010(0xa8)+_0x25cc46[_0x120010(0xbc)]+_0x120010(0xab)+_0x25cc46[_0x120010(0xbc)]+_0x120010(0xef)+_0x25cc46[_0x120010(0x111)]+'\x27')),_0x324980['indexOf'](_0x120010(0xde)+_0x25cc46[_0x120010(0xbc)]+_0x120010(0xa5))<0x0&&(_0x324980=_0x324980[_0x120010(0x119)](/\/\* ENTITIES \*\//,_0x120010(0x12f)+_0x25cc46[_0x120010(0xbc)]+'Entities,')),_0x324980['indexOf'](_0x120010(0xde)+_0x25cc46[_0x120010(0xbc)]+_0x120010(0x102))<0x0&&(_0x324980=_0x324980['replace'](/\/\* RESOLVER CLASSES \*\//,_0x120010(0xf2)+_0x25cc46[_0x120010(0xbc)]+_0x120010(0x102))),_0x324980[_0x120010(0x103)](_0x120010(0xde)+_0x25cc46[_0x120010(0xbc)]+'EntitySubscribers,')<0x0&&(_0x324980=_0x324980['replace'](/\/\* SUBSCRIBERS \*\//,'/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...'+_0x25cc46[_0x120010(0xbc)]+_0x120010(0x128))),await this['writeFile'](_0x476cfd,_0x324980,_0x25cc46);}async['createNoHistoryServiceFiels'](_0x21ce92,_0x362d37,_0x334d94,_0x53d84d,_0x4553a0){const _0x283450=a0_0x50dfcb;await this[_0x283450(0x108)](_0x21ce92+(_0x362d37+_0x283450(0x115)),serviceIndex,_0x4553a0),await this[_0x283450(0x108)](_0x21ce92+(_0x362d37+'/'+_0x362d37+_0x283450(0xe4)),serviceQuery,_0x4553a0),await this[_0x283450(0x108)](_0x21ce92+(_0x362d37+'/'+_0x362d37+_0x283450(0xb4)),serviceMutation,_0x4553a0);let _0x2e26e8=this[_0x283450(0xcc)](_0x334d94,_0x53d84d);await this[_0x283450(0x108)](_0x21ce92+(_0x362d37+'/'+_0x362d37+_0x283450(0xea)),_0x2e26e8,_0x4553a0);let _0x398841=this[_0x283450(0xc9)](_0x53d84d);await this[_0x283450(0x108)](_0x21ce92+(_0x362d37+'/'+_0x362d37+_0x283450(0x12c)),_0x398841,_0x4553a0);let _0x27671c=_0x21ce92+_0x283450(0x100);0x0==await this['existsPath'](_0x27671c)&&await this[_0x283450(0x108)](_0x27671c,allIndex,_0x4553a0);let _0x3d1cfe=await fs['readFileSync'](_0x27671c,_0x283450(0x127));_0x3d1cfe[_0x283450(0x103)](_0x283450(0xb5)+_0x4553a0[_0x283450(0x111)]+'/'+_0x4553a0[_0x283450(0x111)]+'\x27')<0x0&&(_0x3d1cfe=_0x3d1cfe['replace'](/\/\* EXPORT ENTITY TYPES \*\//,_0x283450(0xe8)+_0x4553a0['name']+'/'+_0x4553a0[_0x283450(0x111)]+'\x27')),_0x3d1cfe[_0x283450(0x103)](_0x283450(0x10e)+_0x4553a0['pascalCaseName']+_0x283450(0xa8)+_0x4553a0['pascalCaseName']+'Resolvers\x20}\x20from\x20\x27./'+_0x4553a0[_0x283450(0x111)]+'\x27')<0x0&&(_0x3d1cfe=_0x3d1cfe[_0x283450(0x119)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,'/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20'+_0x4553a0[_0x283450(0xbc)]+_0x283450(0xa8)+_0x4553a0['pascalCaseName']+_0x283450(0x104)+_0x4553a0['name']+'\x27')),_0x3d1cfe[_0x283450(0x103)](_0x283450(0xde)+_0x4553a0[_0x283450(0xbc)]+_0x283450(0xa5))<0x0&&(_0x3d1cfe=_0x3d1cfe[_0x283450(0x119)](/\/\* ENTITIES \*\//,_0x283450(0x12f)+_0x4553a0['pascalCaseName']+'Entities,')),_0x3d1cfe[_0x283450(0x103)](_0x283450(0xde)+_0x4553a0[_0x283450(0xbc)]+'Resolvers,')<0x0&&(_0x3d1cfe=_0x3d1cfe[_0x283450(0x119)](/\/\* RESOLVER CLASSES \*\//,_0x283450(0xf2)+_0x4553a0[_0x283450(0xbc)]+_0x283450(0x102))),await this['writeFile'](_0x27671c,_0x3d1cfe,_0x4553a0);}[a0_0x50dfcb(0xc9)](_0x539fdb){const _0x57e038=a0_0x50dfcb;let _0x531a6b=sereviceType,_0x3a3ecb=_0x539fdb[_0x57e038(0xba)](_0x2662ee=>{const _0x5b7e0f=_0x57e038;if('id'==_0x2662ee[_0x5b7e0f(0x111)])return'';if(_0x5b7e0f(0xfa)==_0x2662ee[_0x5b7e0f(0x111)])return'';if(_0x5b7e0f(0xc3)==_0x2662ee[_0x5b7e0f(0x111)])return'';if(_0x5b7e0f(0x123)==_0x2662ee[_0x5b7e0f(0x111)])return'';if(_0x5b7e0f(0xf3)==_0x2662ee[_0x5b7e0f(0x111)])return'';if(_0x5b7e0f(0xfe)==_0x2662ee[_0x5b7e0f(0x111)])return'';let _0x381230=this['getFieldType'](_0x2662ee),_0x22e10a=this[_0x5b7e0f(0x131)](_0x2662ee),_0x5a9154=camelCase(_0x2662ee['name']);return'\x20\x20'+(_0x5b7e0f(0x12e)+(0x0==_0x381230[_0x5b7e0f(0xb1)]?'':_0x5b7e0f(0xc5)+_0x381230+',')+_0x5b7e0f(0xbd)+_0x2662ee[_0x5b7e0f(0xd4)]+_0x5b7e0f(0xdf))+_0x5b7e0f(0x109)+(''+_0x5a9154+(_0x2662ee[_0x5b7e0f(0xd4)]?'?':'')+':\x20'+_0x22e10a)+'\x0a';});_0x531a6b=_0x531a6b[_0x57e038(0x119)](/{{newTypeColumns}}/g,_0x3a3ecb['join']('\x0a'));let _0x5f598d=_0x539fdb[_0x57e038(0xba)](_0x4ba937=>{const _0x11efeb=_0x57e038;if('id'==_0x4ba937[_0x11efeb(0x111)])return'';if(_0x11efeb(0xfa)==_0x4ba937[_0x11efeb(0x111)])return'';if('created_at'==_0x4ba937['name'])return'';if(_0x11efeb(0x123)==_0x4ba937[_0x11efeb(0x111)])return'';if(_0x11efeb(0xf3)==_0x4ba937[_0x11efeb(0x111)])return'';if('updater_id'==_0x4ba937[_0x11efeb(0x111)])return'';let _0x38c0ba=this[_0x11efeb(0xdc)](_0x4ba937),_0x545036=this[_0x11efeb(0x131)](_0x4ba937);_0x4ba937[_0x11efeb(0xd4)]=!0x0;let _0x4584fb=camelCase(_0x4ba937[_0x11efeb(0x111)]);return'\x20\x20'+(_0x11efeb(0x12e)+(0x0==_0x38c0ba[_0x11efeb(0xb1)]?'':_0x11efeb(0xc5)+_0x38c0ba+',')+_0x11efeb(0xbd)+_0x4ba937[_0x11efeb(0xd4)]+_0x11efeb(0xdf))+_0x11efeb(0x109)+(''+_0x4584fb+(_0x4ba937[_0x11efeb(0xd4)]?'?':'')+':\x20'+_0x545036)+'\x0a';});return _0x531a6b=_0x531a6b[_0x57e038(0x119)](/{{patchTypeColumns}}/g,_0x5f598d['join']('\x0a')),_0x531a6b;}['createEntityText'](_0x1520fe,_0xfb5915){const _0x306c29=a0_0x50dfcb;let _0x190764=serviceEntity,_0x1a58d0=_0xfb5915[_0x306c29(0xb0)](function(_0x4178e2,_0x3b20eb){const _0x2995ef=_0x306c29;return _0x4178e2[_0x2995ef(0x132)]-_0x3b20eb[_0x2995ef(0x132)];})[_0x306c29(0xba)](_0x50a114=>this['columnToEntityColumn'](_0x50a114));[_0x306c29(0x12a),_0x306c29(0xb7)]['includes'](_0x1520fe[_0x306c29(0x105)])&&_0x1a58d0[_0x306c29(0xa2)]('\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201'),_0x190764=_0x190764['replace'](/{{entityColumns}}/g,_0x1a58d0[_0x306c29(0xce)]('\x0a'));let _0x4cfe23='',_0x1a85f7=_0xfb5915[_0x306c29(0xa9)](_0x186f77=>_0x186f77[_0x306c29(0xc4)]&&_0x186f77[_0x306c29(0xc4)]>0x0)[_0x306c29(0xb0)](function(_0x57e686,_0xb086ea){const _0x3a4696=_0x306c29;return _0x57e686[_0x3a4696(0xc4)]-_0xb086ea[_0x3a4696(0xc4)];});if(_0x1a85f7[_0x306c29(0xb1)]>0x0){_0x4cfe23='@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})';let _0x138533=_0x1a85f7[_0x306c29(0xba)](_0x1b61b3=>{const _0x4bc90b=_0x306c29;let _0x490aca=_0x1b61b3[_0x4bc90b(0x111)];return'domain_id'==_0x1b61b3['name']&&(_0x490aca=_0x4bc90b(0xec)),_0x4bc90b(0xf3)==_0x1b61b3[_0x4bc90b(0x111)]&&(_0x490aca=_0x4bc90b(0xe7)),_0x4bc90b(0xfe)==_0x1b61b3[_0x4bc90b(0x111)]&&(_0x490aca=_0x4bc90b(0x11d)),_0x4bc90b(0xae)+camelCase(_0x490aca);});_0x4cfe23=_0x4cfe23[_0x306c29(0x119)](/{{indexColumns}}/g,_0x138533[_0x306c29(0xce)](','));}return _0x190764=_0x190764[_0x306c29(0x119)](/{{indexAnn}}/g,_0x4cfe23),_0x190764;}[a0_0x50dfcb(0xf4)](_0x373014,_0x4f47a4){const _0x53dee5=a0_0x50dfcb;let _0x3f0bc1=_0x53dee5(0xb7)==_0x373014[_0x53dee5(0x105)]?serviceEntityHistJson:serviceEntityHistCopy,_0x3d7875=_0x4f47a4[_0x53dee5(0xb0)](function(_0x336620,_0x4c3bcd){const _0xca133e=_0x53dee5;return _0x336620[_0xca133e(0x132)]-_0x4c3bcd[_0xca133e(0x132)];})[_0x53dee5(0xba)](_0x103367=>this['columnToEntityColumn'](_0x103367));return _0x3f0bc1=_0x3f0bc1[_0x53dee5(0x119)](/{{entityColumns}}/g,_0x3d7875['join']('\x0a')),_0x3f0bc1;}['columnToEntityColumn'](_0x46036e){const _0x5a4268=a0_0x50dfcb;if('id'==_0x46036e['name'])return'';if('domain_id'==_0x46036e[_0x5a4268(0x111)])return'';if('created_at'==_0x46036e[_0x5a4268(0x111)])return'';if(_0x5a4268(0x123)==_0x46036e[_0x5a4268(0x111)])return'';if(_0x5a4268(0xf3)==_0x46036e[_0x5a4268(0x111)])return'';if(_0x5a4268(0xfe)==_0x46036e[_0x5a4268(0x111)])return'';let _0x484bd=_0x46036e[_0x5a4268(0xf0)];_0x5a4268(0xe5)==_0x46036e[_0x5a4268(0xf0)]&&(_0x484bd='double\x20precision'),_0x5a4268(0xdd)==_0x46036e['colType']&&(_0x484bd=_0x5a4268(0x126)),_0x5a4268(0xa1)==_0x46036e[_0x5a4268(0xf0)]&&(_0x484bd=_0x5a4268(0xbb)),_0x5a4268(0x122)==_0x46036e['colType']&&(_0x484bd=_0x5a4268(0xd5));let _0x903350='';_0x5a4268(0xa1)==_0x46036e[_0x5a4268(0xf0)]&&(_0x903350=_0x46036e['colSize']);let _0x45df39=this[_0x5a4268(0xdc)](_0x46036e),_0x3e267d=this[_0x5a4268(0x131)](_0x46036e),_0x25bbe2=camelCase(_0x46036e[_0x5a4268(0x111)]);return'\x20\x20'+(_0x5a4268(0xac)+_0x46036e[_0x5a4268(0x111)]+_0x5a4268(0xc7)+_0x484bd+_0x5a4268(0xd0)+_0x46036e[_0x5a4268(0xd4)]+'\x20'+(0x0==_0x903350[_0x5a4268(0xb1)]?'':_0x5a4268(0xe1)+_0x903350)+_0x5a4268(0xdf))+_0x5a4268(0x109)+(_0x5a4268(0x12e)+(0x0==_0x45df39[_0x5a4268(0xb1)]?'':_0x5a4268(0xc5)+_0x45df39+',')+_0x5a4268(0xbd)+_0x46036e[_0x5a4268(0xd4)]+_0x5a4268(0xdf))+'\x0a\x20\x20'+(''+_0x25bbe2+(_0x46036e[_0x5a4268(0xd4)]?'?':'')+':\x20'+_0x3e267d)+'\x0a';}['getFieldType'](_0x215545){const _0x3347bf=a0_0x50dfcb;let _0x51e17e='';return _0x3347bf(0xe5)==_0x215545[_0x3347bf(0xf0)]&&(_0x51e17e=_0x3347bf(0x129)),'float'==_0x215545[_0x3347bf(0xf0)]&&(_0x51e17e=_0x3347bf(0x129)),_0x3347bf(0xdd)==_0x215545[_0x3347bf(0xf0)]&&(_0x51e17e=_0x3347bf(0xfb)),'integer'==_0x215545[_0x3347bf(0xf0)]&&(_0x51e17e=_0x3347bf(0xfb)),_0x51e17e;}[a0_0x50dfcb(0x131)](_0xc7ac53){const _0x4c4367=a0_0x50dfcb;let _0x84e549=_0xc7ac53[_0x4c4367(0xf0)];return _0x4c4367(0xc1)==_0xc7ac53['colType']&&(_0x84e549=_0x4c4367(0x106)),'double'==_0xc7ac53[_0x4c4367(0xf0)]&&(_0x84e549=_0x4c4367(0x106)),_0x4c4367(0xe9)==_0xc7ac53[_0x4c4367(0xf0)]&&(_0x84e549='number'),_0x4c4367(0xfc)==_0xc7ac53[_0x4c4367(0xf0)]&&(_0x84e549=_0x4c4367(0x106)),_0x4c4367(0xdd)==_0xc7ac53['colType']&&(_0x84e549=_0x4c4367(0x106)),_0x4c4367(0x122)==_0xc7ac53[_0x4c4367(0xf0)]&&(_0x84e549='Date'),_0x4c4367(0x11f)==_0xc7ac53[_0x4c4367(0xf0)]&&(_0x84e549=_0x4c4367(0x107)),_0x4c4367(0xed)==_0xc7ac53['colType']&&(_0x84e549=_0x4c4367(0xa1)),_0x84e549;}async['writeFile'](_0x26bbe0,_0x2acd7c,_0x5f0cfe){const _0x155543=a0_0x50dfcb;await fs['writeFileSync'](_0x26bbe0,this[_0x155543(0xc0)](_0x2acd7c,_0x5f0cfe),_0x155543(0x127));}['replaceNamesMap'](_0x3cffc9,_0x404ab2){const _0x1e2370=a0_0x50dfcb;return _0x3cffc9[_0x1e2370(0x119)](/{{pascalCase name}}/g,_0x404ab2['pascalCaseName'])[_0x1e2370(0x119)](/{{camelCase name}}/g,_0x404ab2[_0x1e2370(0xda)])[_0x1e2370(0x119)](/{{snakeCase name}}/g,_0x404ab2[_0x1e2370(0xf6)])[_0x1e2370(0x119)](/{{pluralPascalCase name}}/g,_0x404ab2[_0x1e2370(0xc6)])[_0x1e2370(0x119)](/{{pluralCamelCase name}}/g,_0x404ab2[_0x1e2370(0xfd)])[_0x1e2370(0x119)](/{{tableName}}/g,_0x404ab2[_0x1e2370(0xb6)])[_0x1e2370(0x119)](/{{name}}/g,_0x404ab2[_0x1e2370(0x111)]);}async[a0_0x50dfcb(0x10a)](_0x17d586,_0x97db8a,_0x314052){const _0x42e889=a0_0x50dfcb;let _0x35f570=_0x17d586+'/packages';await this[_0x42e889(0x124)](_0x35f570),_0x35f570=_0x35f570+'/'+_0x97db8a,await this['createDir'](_0x35f570),_0x35f570+='/server',await this[_0x42e889(0x124)](_0x35f570),_0x35f570+='/service',await this[_0x42e889(0x124)](_0x35f570),_0x35f570=_0x35f570+'/'+_0x314052,await this[_0x42e889(0x124)](_0x35f570);}[a0_0x50dfcb(0x10b)](){const _0x2eaaed=a0_0x50dfcb;let _0x260944=process[_0x2eaaed(0x130)][_0x2eaaed(0xe6)][_0x2eaaed(0xb8)]('/'),_0x2152f8=[];for(let _0xae60f0=0x0;_0xae60f0<_0x260944['length']&&_0x2eaaed(0xd2)!=_0x260944[_0xae60f0];_0xae60f0++)_0x2152f8[_0x2eaaed(0xa2)](_0x260944[_0xae60f0]);return _0x2152f8[_0x2eaaed(0xce)]('/');}async[a0_0x50dfcb(0x124)](_0x1f348f){const _0x22d6d9=a0_0x50dfcb;0x0==await this[_0x22d6d9(0xf9)](_0x1f348f)&&fs['mkdirSync'](_0x1f348f);}async[a0_0x50dfcb(0xf9)](_0x3d54a7){const _0x3c8afc=a0_0x50dfcb;return await fs[_0x3c8afc(0xe3)](_0x3d54a7);}};tslib_1[a0_0x50dfcb(0xdb)]([(0x0,type_graphql_1['Query'])(_0x200579=>Boolean,{'description':a0_0x50dfcb(0xa3)}),tslib_1[a0_0x50dfcb(0x120)](0x0,(0x0,type_graphql_1[a0_0x50dfcb(0xee)])('id')),tslib_1[a0_0x50dfcb(0x120)](0x1,(0x0,type_graphql_1[a0_0x50dfcb(0xcb)])()),tslib_1[a0_0x50dfcb(0x121)](a0_0x50dfcb(0xd3),Function),tslib_1[a0_0x50dfcb(0x121)](a0_0x50dfcb(0xaa),[String,Object]),tslib_1[a0_0x50dfcb(0x121)]('design:returntype',Promise)],OperatoToolCreateService['prototype'],a0_0x50dfcb(0x113),null),OperatoToolCreateService=tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x50dfcb(0xd8)])()],OperatoToolCreateService),exports[a0_0x50dfcb(0xa6)]=OperatoToolCreateService;const allIndex=a0_0x50dfcb(0xd9),serviceIndex=a0_0x50dfcb(0xb9),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_0x50dfcb(0x12d),serviceHistoryQuery=a0_0x50dfcb(0x125),serviceMutation=a0_0x50dfcb(0xbe),sereviceType=a0_0x50dfcb(0x10f),sereviceHistoryType='\x0aimport\x20{\x20ObjectType,\x20Field,\x20InputType,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0a\x0a@ObjectType()\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryList\x20{\x0a\x20\x20@Field(type\x20=>\x20[{{pascalCase\x20name}}History])\x0a\x20\x20items:\x20{{pascalCase\x20name}}History[]\x0a\x0a\x20\x20@Field(type\x20=>\x20Int)\x0a\x20\x20total:\x20number\x0a}\x0a',serviceEntity=a0_0x50dfcb(0x110),serviceEntityHistCopy=a0_0x50dfcb(0xf5),serviceEntityHistJson=a0_0x50dfcb(0xff),serviceEntitySubscriber=a0_0x50dfcb(0xd6);
@@ -1 +1 @@
1
- 'use strict';const a0_0xea7a12=a0_0x39f0;(function(_0x52e67a,_0x5b45ce){const _0x2e6201=a0_0x39f0,_0x5724af=_0x52e67a();while(!![]){try{const _0xa26ae1=-parseInt(_0x2e6201(0xd3))/0x1+-parseInt(_0x2e6201(0xcc))/0x2*(-parseInt(_0x2e6201(0xc0))/0x3)+-parseInt(_0x2e6201(0xc5))/0x4*(parseInt(_0x2e6201(0xd4))/0x5)+parseInt(_0x2e6201(0xe3))/0x6*(parseInt(_0x2e6201(0xd1))/0x7)+parseInt(_0x2e6201(0xc7))/0x8*(-parseInt(_0x2e6201(0xc6))/0x9)+-parseInt(_0x2e6201(0xe1))/0xa+-parseInt(_0x2e6201(0xbf))/0xb*(-parseInt(_0x2e6201(0xca))/0xc);if(_0xa26ae1===_0x5b45ce)break;else _0x5724af['push'](_0x5724af['shift']());}catch(_0x264c1e){_0x5724af['push'](_0x5724af['shift']());}}}(a0_0x469a,0xef3d1));function a0_0x39f0(_0x3caa1c,_0x261b54){const _0x469ae3=a0_0x469a();return a0_0x39f0=function(_0x39f01e,_0x276230){_0x39f01e=_0x39f01e-0xbe;let _0x33ee48=_0x469ae3[_0x39f01e];return _0x33ee48;},a0_0x39f0(_0x3caa1c,_0x261b54);}Object[a0_0xea7a12(0xd9)](exports,a0_0xea7a12(0xd5),{'value':!0x0}),exports['checkStudioTemplateIsOverLimit']=exports[a0_0xea7a12(0xde)]=void 0x0;const operato_license_checker_1=require('@things-factory/operato-license-checker'),shell_1=require(a0_0xea7a12(0xc1)),menu_base_1=require(a0_0xea7a12(0xe4)),license_error_1=require('../../errors/license-error');async function checkStudioPermission(){const _0x48cccf=a0_0xea7a12;let _0x4f97d9=((0x0,operato_license_checker_1['getPermission'])(_0x48cccf(0xe5))||',')[_0x48cccf(0xd8)](',')[_0x48cccf(0xcf)](_0x1252a3=>_0x1252a3[_0x48cccf(0xdd)]()),_0x3ddd6c=!0x1;return _0x4f97d9[_0x48cccf(0xc8)](_0x3464c9=>{const _0x324c14=_0x48cccf;_0x3464c9[_0x324c14(0xbe)](_0x324c14(0xce))&&(_0x3ddd6c=!0x0);}),_0x3ddd6c;}function a0_0x469a(){const _0x51b71a=['@things-factory/menu-base','Permissions\x20For\x20Tailor\x20Tool','INVALID_LICENSE','includes','31267841DZUaAb','890811gjbLEG','@things-factory/shell','getRepository','(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)','Menu','550404uFTmlX','9XfjcBa','5012920Qqytfs','forEach','manager','12kOCjMl','from','2aDmgYN','getCount','Studio','map','select','7ROwnjz','ERROR_CODES','1736818PZsCiv','55udvoSL','__esModule','where','LicenseError','split','defineProperty','checkStudioTemplateIsOverLimit','id\x20!=\x20:id','createQueryBuilder','trim','checkStudioPermission','menu','andWhere','2365240yZpWVr','OVER_LIMIT','11724126BjSbaV'];a0_0x469a=function(){return _0x51b71a;};return a0_0x469a();}async function checkStudioTemplateIsOverLimit(_0x453cb6,_0x434819){const _0x53e683=a0_0xea7a12;if(0x0==await checkStudioPermission())throw new license_error_1[(_0x53e683(0xd7))]({'errorCode':_0x434819['t'](license_error_1[_0x53e683(0xd7)][_0x53e683(0xd2)][_0x53e683(0xe6)])});var _0x2603b7=0x0;if(_0x2603b7=_0x453cb6&&''!=_0x453cb6?await(0x0,shell_1['getRepository'])(menu_base_1[_0x53e683(0xc4)])[_0x53e683(0xc9)][_0x53e683(0xdc)]()[_0x53e683(0xd0)](_0x53e683(0xdf))['from'](menu_base_1['Menu'],'menu')[_0x53e683(0xd6)](_0x53e683(0xdb),{'id':_0x453cb6})[_0x53e683(0xe0)]('(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)')[_0x53e683(0xcd)]()+0x1:await(0x0,shell_1[_0x53e683(0xc2)])(menu_base_1[_0x53e683(0xc4)])[_0x53e683(0xc9)][_0x53e683(0xdc)]()[_0x53e683(0xd0)](_0x53e683(0xdf))[_0x53e683(0xcb)](menu_base_1[_0x53e683(0xc4)],_0x53e683(0xdf))['where'](_0x53e683(0xc3))[_0x53e683(0xcd)]()+0x1,!(0x0,operato_license_checker_1['checkTarget'])(_0x2603b7))throw new license_error_1['LicenseError']({'errorCode':_0x434819['t'](license_error_1[_0x53e683(0xd7)][_0x53e683(0xd2)][_0x53e683(0xe2)])});return!0x0;}exports[a0_0xea7a12(0xde)]=checkStudioPermission,exports[a0_0xea7a12(0xda)]=checkStudioTemplateIsOverLimit;
1
+ 'use strict';const a0_0x262c10=a0_0x4c46;(function(_0x1972e6,_0x2492f4){const _0x28fc6d=a0_0x4c46,_0xac8fbd=_0x1972e6();while(!![]){try{const _0x47a6dd=parseInt(_0x28fc6d(0x192))/0x1+parseInt(_0x28fc6d(0x19e))/0x2+-parseInt(_0x28fc6d(0x1a5))/0x3+-parseInt(_0x28fc6d(0x1b0))/0x4*(parseInt(_0x28fc6d(0x19c))/0x5)+-parseInt(_0x28fc6d(0x196))/0x6*(parseInt(_0x28fc6d(0x1ae))/0x7)+-parseInt(_0x28fc6d(0x1ac))/0x8+parseInt(_0x28fc6d(0x1a9))/0x9*(-parseInt(_0x28fc6d(0x1a2))/0xa);if(_0x47a6dd===_0x2492f4)break;else _0xac8fbd['push'](_0xac8fbd['shift']());}catch(_0x3f2178){_0xac8fbd['push'](_0xac8fbd['shift']());}}}(a0_0x7a25,0x7525e));Object[a0_0x262c10(0x1a8)](exports,a0_0x262c10(0x1aa),{'value':!0x0}),exports[a0_0x262c10(0x198)]=exports[a0_0x262c10(0x19f)]=void 0x0;const operato_license_checker_1=require(a0_0x262c10(0x1a0)),shell_1=require('@things-factory/shell'),menu_base_1=require(a0_0x262c10(0x1af)),license_error_1=require(a0_0x262c10(0x19a));function a0_0x4c46(_0x40a9c1,_0x1a5a0d){const _0x7a2536=a0_0x7a25();return a0_0x4c46=function(_0x4c46d2,_0x38d4aa){_0x4c46d2=_0x4c46d2-0x18f;let _0x10713a=_0x7a2536[_0x4c46d2];return _0x10713a;},a0_0x4c46(_0x40a9c1,_0x1a5a0d);}async function checkStudioPermission(){const _0x48a5fa=a0_0x262c10;let _0x44f6de=((0x0,operato_license_checker_1[_0x48a5fa(0x19d)])('Permissions\x20For\x20Tailor\x20Tool')||',')['split'](',')[_0x48a5fa(0x1a1)](_0x3fba91=>_0x3fba91['trim']()),_0x101128=!0x1;return _0x44f6de['forEach'](_0x292a7b=>{const _0x264051=_0x48a5fa;_0x292a7b[_0x264051(0x194)]('Studio')&&(_0x101128=!0x0);}),_0x101128;}async function checkStudioTemplateIsOverLimit(_0x2e173f,_0x2d0583){const _0x8cee8f=a0_0x262c10;if(0x0==await checkStudioPermission())throw new license_error_1[(_0x8cee8f(0x191))]({'errorCode':_0x2d0583['t'](license_error_1[_0x8cee8f(0x191)][_0x8cee8f(0x190)][_0x8cee8f(0x199)])});var _0xd14818=0x0;if(_0xd14818=_0x2e173f&&''!=_0x2e173f?await(0x0,shell_1['getRepository'])(menu_base_1[_0x8cee8f(0x1ab)])[_0x8cee8f(0x1a4)]['createQueryBuilder']()['select']('menu')[_0x8cee8f(0x19b)](menu_base_1['Menu'],'menu')[_0x8cee8f(0x18f)](_0x8cee8f(0x1a6),{'id':_0x2e173f})[_0x8cee8f(0x197)](_0x8cee8f(0x1b1))[_0x8cee8f(0x195)]()+0x1:await(0x0,shell_1[_0x8cee8f(0x1ad)])(menu_base_1[_0x8cee8f(0x1ab)])[_0x8cee8f(0x1a4)]['createQueryBuilder']()['select'](_0x8cee8f(0x1a3))[_0x8cee8f(0x19b)](menu_base_1[_0x8cee8f(0x1ab)],_0x8cee8f(0x1a3))[_0x8cee8f(0x18f)](_0x8cee8f(0x1b1))[_0x8cee8f(0x195)]()+0x1,!(0x0,operato_license_checker_1[_0x8cee8f(0x1a7)])(_0xd14818))throw new license_error_1[(_0x8cee8f(0x191))]({'errorCode':_0x2d0583['t'](license_error_1[_0x8cee8f(0x191)][_0x8cee8f(0x190)][_0x8cee8f(0x193)])});return!0x0;}exports[a0_0x262c10(0x19f)]=checkStudioPermission,exports[a0_0x262c10(0x198)]=checkStudioTemplateIsOverLimit;function a0_0x7a25(){const _0x33c215=['checkStudioTemplateIsOverLimit','INVALID_LICENSE','../../errors/license-error','from','935aakraW','getPermission','954882xTZfiA','checkStudioPermission','@things-factory/operato-license-checker','map','1054540qdADsN','menu','manager','911196GWAHAs','id\x20!=\x20:id','checkTarget','defineProperty','18rIMkki','__esModule','Menu','1290064VoIWyy','getRepository','7ooBktC','@things-factory/menu-base','536DVsijx','(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)','where','ERROR_CODES','LicenseError','790462ikfPRK','OVER_LIMIT','includes','getCount','522654VkMVeb','andWhere'];a0_0x7a25=function(){return _0x33c215;};return a0_0x7a25();}
@@ -1 +1 @@
1
- 'use strict';function a0_0x4e9c(){const _0xc77048=['3934630EbiBsl','__param','Query','checkStudioTemplateIsOverLimit','Ctx','35PUCHYq','1525638zCYbxt','design:paramtypes','748010FHaLIB','prototype','OperatoToolResolver','design:returntype','Operato\x20Tool\x20Studio\x20Usage\x20Permissions','type-graphql','616665cLifVs','defineProperty','tslib','design:type','./tool-permission','698484jUncDv','3Zsnkzp','__metadata','Arg','4911592SUBgot','436542dgOral','studioTemplateIsOverLimit','__decorate','18wTSaZH'];a0_0x4e9c=function(){return _0xc77048;};return a0_0x4e9c();}const a0_0x3d156d=a0_0x522a;(function(_0x5a2e5a,_0x4ab99d){const _0xe7d2b0=a0_0x522a,_0x6ed395=_0x5a2e5a();while(!![]){try{const _0x13416f=parseInt(_0xe7d2b0(0x11a))/0x1+parseInt(_0xe7d2b0(0x12e))/0x2*(-parseInt(_0xe7d2b0(0x120))/0x3)+-parseInt(_0xe7d2b0(0x11f))/0x4+parseInt(_0xe7d2b0(0x12d))/0x5*(parseInt(_0xe7d2b0(0x124))/0x6)+-parseInt(_0xe7d2b0(0x128))/0x7+parseInt(_0xe7d2b0(0x123))/0x8+-parseInt(_0xe7d2b0(0x127))/0x9*(-parseInt(_0xe7d2b0(0x130))/0xa);if(_0x13416f===_0x4ab99d)break;else _0x6ed395['push'](_0x6ed395['shift']());}catch(_0x22dd96){_0x6ed395['push'](_0x6ed395['shift']());}}}(a0_0x4e9c,0x5f361));Object[a0_0x3d156d(0x11b)](exports,'__esModule',{'value':!0x0}),exports[a0_0x3d156d(0x132)]=void 0x0;const tslib_1=require(a0_0x3d156d(0x11c)),type_graphql_1=require(a0_0x3d156d(0x119)),tool_permission_1=require(a0_0x3d156d(0x11e));let OperatoToolResolver=class{async['studioPermission'](_0x2e3bb6){return(0x0,tool_permission_1['checkStudioPermission'])();}async[a0_0x3d156d(0x125)](_0x140d64,_0x32defe){const _0x3fa1c3=a0_0x3d156d;return(0x0,tool_permission_1[_0x3fa1c3(0x12b)])(_0x140d64,_0x32defe);}};function a0_0x522a(_0x46b25f,_0x1a6686){const _0x4e9c61=a0_0x4e9c();return a0_0x522a=function(_0x522aad,_0x2feac8){_0x522aad=_0x522aad-0x119;let _0x1bb9df=_0x4e9c61[_0x522aad];return _0x1bb9df;},a0_0x522a(_0x46b25f,_0x1a6686);}tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x3d156d(0x12a)])(_0x7b63a0=>Boolean,{'description':a0_0x3d156d(0x134)}),tslib_1[a0_0x3d156d(0x129)](0x0,(0x0,type_graphql_1[a0_0x3d156d(0x12c)])()),tslib_1['__metadata'](a0_0x3d156d(0x11d),Function),tslib_1['__metadata'](a0_0x3d156d(0x12f),[Object]),tslib_1['__metadata']('design:returntype',Promise)],OperatoToolResolver[a0_0x3d156d(0x131)],'studioPermission',null),tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x3d156d(0x12a)])(_0x479a55=>Boolean,{'description':'Operato\x20Tool\x20Studio\x20Limit\x20check'}),tslib_1[a0_0x3d156d(0x129)](0x0,(0x0,type_graphql_1[a0_0x3d156d(0x122)])('id')),tslib_1['__param'](0x1,(0x0,type_graphql_1[a0_0x3d156d(0x12c)])()),tslib_1[a0_0x3d156d(0x121)]('design:type',Function),tslib_1[a0_0x3d156d(0x121)](a0_0x3d156d(0x12f),[String,Object]),tslib_1['__metadata'](a0_0x3d156d(0x133),Promise)],OperatoToolResolver['prototype'],'studioTemplateIsOverLimit',null),OperatoToolResolver=tslib_1[a0_0x3d156d(0x126)]([(0x0,type_graphql_1['Resolver'])()],OperatoToolResolver),exports[a0_0x3d156d(0x132)]=OperatoToolResolver;
1
+ 'use strict';const a0_0x222bdb=a0_0x289d;(function(_0x1e4eea,_0x3fe103){const _0x199a0b=a0_0x289d,_0x120996=_0x1e4eea();while(!![]){try{const _0x32ead8=-parseInt(_0x199a0b(0x9b))/0x1+parseInt(_0x199a0b(0x8f))/0x2*(-parseInt(_0x199a0b(0x84))/0x3)+parseInt(_0x199a0b(0x8e))/0x4+-parseInt(_0x199a0b(0x96))/0x5*(parseInt(_0x199a0b(0x98))/0x6)+parseInt(_0x199a0b(0x93))/0x7*(parseInt(_0x199a0b(0x9f))/0x8)+-parseInt(_0x199a0b(0x88))/0x9*(parseInt(_0x199a0b(0x95))/0xa)+parseInt(_0x199a0b(0x9a))/0xb;if(_0x32ead8===_0x3fe103)break;else _0x120996['push'](_0x120996['shift']());}catch(_0x275c37){_0x120996['push'](_0x120996['shift']());}}}(a0_0x3780,0xf0d03));Object[a0_0x222bdb(0x92)](exports,a0_0x222bdb(0x8d),{'value':!0x0}),exports[a0_0x222bdb(0x87)]=void 0x0;function a0_0x289d(_0x3acdc2,_0x461e26){const _0x3780e5=a0_0x3780();return a0_0x289d=function(_0x289d6e,_0x1a58a6){_0x289d6e=_0x289d6e-0x83;let _0x2b842c=_0x3780e5[_0x289d6e];return _0x2b842c;},a0_0x289d(_0x3acdc2,_0x461e26);}function a0_0x3780(){const _0x2bb458=['__decorate','Arg','design:paramtypes','Operato\x20Tool\x20Studio\x20Usage\x20Permissions','__esModule','7376088UUFScz','315914oNpAiM','Ctx','checkStudioPermission','defineProperty','511sADMJy','__metadata','2973110MxOjsJ','5TcGofC','design:returntype','1204494XjwIbZ','prototype','12208845lcyDRO','1046446dyOAzb','Operato\x20Tool\x20Studio\x20Limit\x20check','__param','studioTemplateIsOverLimit','139976qRPCDZ','Query','21XbbiDz','design:type','studioPermission','OperatoToolResolver','27onJWCD'];a0_0x3780=function(){return _0x2bb458;};return a0_0x3780();}const tslib_1=require('tslib'),type_graphql_1=require('type-graphql'),tool_permission_1=require('./tool-permission');let OperatoToolResolver=class{async[a0_0x222bdb(0x86)](_0x5320a3){const _0x3b1728=a0_0x222bdb;return(0x0,tool_permission_1[_0x3b1728(0x91)])();}async[a0_0x222bdb(0x9e)](_0x28dade,_0x204ab){return(0x0,tool_permission_1['checkStudioTemplateIsOverLimit'])(_0x28dade,_0x204ab);}};tslib_1[a0_0x222bdb(0x89)]([(0x0,type_graphql_1[a0_0x222bdb(0x83)])(_0x232be0=>Boolean,{'description':a0_0x222bdb(0x8c)}),tslib_1['__param'](0x0,(0x0,type_graphql_1[a0_0x222bdb(0x90)])()),tslib_1['__metadata'](a0_0x222bdb(0x85),Function),tslib_1['__metadata'](a0_0x222bdb(0x8b),[Object]),tslib_1[a0_0x222bdb(0x94)](a0_0x222bdb(0x97),Promise)],OperatoToolResolver[a0_0x222bdb(0x99)],a0_0x222bdb(0x86),null),tslib_1[a0_0x222bdb(0x89)]([(0x0,type_graphql_1['Query'])(_0x303413=>Boolean,{'description':a0_0x222bdb(0x9c)}),tslib_1[a0_0x222bdb(0x9d)](0x0,(0x0,type_graphql_1[a0_0x222bdb(0x8a)])('id')),tslib_1['__param'](0x1,(0x0,type_graphql_1[a0_0x222bdb(0x90)])()),tslib_1[a0_0x222bdb(0x94)](a0_0x222bdb(0x85),Function),tslib_1['__metadata'](a0_0x222bdb(0x8b),[String,Object]),tslib_1[a0_0x222bdb(0x94)](a0_0x222bdb(0x97),Promise)],OperatoToolResolver['prototype'],a0_0x222bdb(0x9e),null),OperatoToolResolver=tslib_1[a0_0x222bdb(0x89)]([(0x0,type_graphql_1['Resolver'])()],OperatoToolResolver),exports[a0_0x222bdb(0x87)]=OperatoToolResolver;