@things-factory/operato-tools 6.0.78 → 6.0.82

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_0x47846c=a0_0x18fa;function a0_0x2d78(){const _0x40207b=['detail','1438695cKVBja','ERROR_CODES','assign','384955lJMiKg','tslib','defineProperty','87448qIDZRe','511xePAbc','__esModule','44hnCnBr','../constants/error-code','867633HYHFrL','22422888aapZTX','8906826TqmKEP','474638xxQIPf'];a0_0x2d78=function(){return _0x40207b;};return a0_0x2d78();}(function(_0x53dd19,_0x5e31b1){const _0x3fc3b6=a0_0x18fa,_0xa7da35=_0x53dd19();while(!![]){try{const _0x18a255=-parseInt(_0x3fc3b6(0xca))/0x1+-parseInt(_0x3fc3b6(0xcd))/0x2+-parseInt(_0x3fc3b6(0xcf))/0x3+-parseInt(_0x3fc3b6(0xd8))/0x4*(parseInt(_0x3fc3b6(0xd2))/0x5)+parseInt(_0x3fc3b6(0xcc))/0x6+parseInt(_0x3fc3b6(0xd6))/0x7*(-parseInt(_0x3fc3b6(0xd5))/0x8)+parseInt(_0x3fc3b6(0xcb))/0x9;if(_0x18a255===_0x5e31b1)break;else _0xa7da35['push'](_0xa7da35['shift']());}catch(_0x48b8db){_0xa7da35['push'](_0xa7da35['shift']());}}}(a0_0x2d78,0xb641a));Object[a0_0x47846c(0xd4)](exports,a0_0x47846c(0xd7),{'value':!0x0}),exports['LicenseError']=void 0x0;const tslib_1=require(a0_0x47846c(0xd3)),ERROR_CODES=tslib_1['__importStar'](require(a0_0x47846c(0xd9)));class LicenseError extends Error{static get[a0_0x47846c(0xd0)](){const _0x1af6f1=a0_0x47846c;return Object[_0x1af6f1(0xd1)]({},ERROR_CODES);}constructor({errorCode:_0x4c8b45,detail:_0x586bbd}){const _0x3990dd=a0_0x47846c;super(_0x4c8b45),this['name']='license-error',this['errorCode']=_0x4c8b45,this[_0x3990dd(0xce)]=_0x586bbd;}}function a0_0x18fa(_0x83dd5,_0x1c7033){const _0x2d786d=a0_0x2d78();return a0_0x18fa=function(_0x18fa45,_0x4ccf48){_0x18fa45=_0x18fa45-0xca;let _0x4c6376=_0x2d786d[_0x18fa45];return _0x4c6376;},a0_0x18fa(_0x83dd5,_0x1c7033);}exports['LicenseError']=LicenseError;
1
+ 'use strict';const a0_0x4e111e=a0_0x3c0a;function a0_0x3c0a(_0x5e1c8d,_0x240681){const _0x30dfd3=a0_0x30df();return a0_0x3c0a=function(_0x3c0acc,_0xf3cdaf){_0x3c0acc=_0x3c0acc-0x152;let _0x2b6dfe=_0x30dfd3[_0x3c0acc];return _0x2b6dfe;},a0_0x3c0a(_0x5e1c8d,_0x240681);}(function(_0x539691,_0x4f9433){const _0x2ee323=a0_0x3c0a,_0x52a034=_0x539691();while(!![]){try{const _0x3a721e=-parseInt(_0x2ee323(0x15a))/0x1+-parseInt(_0x2ee323(0x154))/0x2*(-parseInt(_0x2ee323(0x15e))/0x3)+-parseInt(_0x2ee323(0x157))/0x4+-parseInt(_0x2ee323(0x152))/0x5+parseInt(_0x2ee323(0x156))/0x6+-parseInt(_0x2ee323(0x153))/0x7*(parseInt(_0x2ee323(0x160))/0x8)+parseInt(_0x2ee323(0x159))/0x9;if(_0x3a721e===_0x4f9433)break;else _0x52a034['push'](_0x52a034['shift']());}catch(_0x290861){_0x52a034['push'](_0x52a034['shift']());}}}(a0_0x30df,0xf3de5));Object[a0_0x4e111e(0x155)](exports,a0_0x4e111e(0x164),{'value':!0x0}),exports[a0_0x4e111e(0x163)]=void 0x0;function a0_0x30df(){const _0x30914f=['__importStar','92440vFBqdW','errorCode','detail','LicenseError','__esModule','name','7577330wlDEkv','35jARmzE','32ASlZgk','defineProperty','9726912ayFFRK','2359860WpZrSa','ERROR_CODES','3560391IfxcSX','834676GRlemb','../constants/error-code','license-error','assign','371253fJLifa'];a0_0x30df=function(){return _0x30914f;};return a0_0x30df();}const tslib_1=require('tslib'),ERROR_CODES=tslib_1[a0_0x4e111e(0x15f)](require(a0_0x4e111e(0x15b)));class LicenseError extends Error{static get[a0_0x4e111e(0x158)](){const _0xb3a868=a0_0x4e111e;return Object[_0xb3a868(0x15d)]({},ERROR_CODES);}constructor({errorCode:_0x3104a3,detail:_0x5c653f}){const _0x4576ab=a0_0x4e111e;super(_0x3104a3),this[_0x4576ab(0x165)]=_0x4576ab(0x15c),this[_0x4576ab(0x161)]=_0x3104a3,this[_0x4576ab(0x162)]=_0x5c653f;}}exports[a0_0x4e111e(0x163)]=LicenseError;
package/server/routes.js CHANGED
@@ -1 +1 @@
1
- const a0_0x5533c6=a0_0x5507;function a0_0x5507(_0x210fb2,_0x9ac74c){const _0x461b13=a0_0x461b();return a0_0x5507=function(_0x5507dd,_0x212b0f){_0x5507dd=_0x5507dd-0xda;let _0x500666=_0x461b13[_0x5507dd];return _0x500666;},a0_0x5507(_0x210fb2,_0x9ac74c);}function a0_0x461b(){const _0x4c4a08=['things-factory:operato-tools:routes','54glyYzj','36rqocmP','bootstrap-module-domain-private-route','bootstrap-module-global-public-route','debug','2729130NnQzBB','11GLkMfu','456ZQLnVe','457479GsXYKn','54603pHLzuc','2kvpLmZ','1328028OzOpsu','223083QqbMbv','100070JkmVgi','bootstrap-module-domain-public-route','112855RMMQEl'];a0_0x461b=function(){return _0x4c4a08;};return a0_0x461b();}(function(_0x5e1943,_0x154b16){const _0x5ca346=a0_0x5507,_0x2b8cb1=_0x5e1943();while(!![]){try{const _0xbeca31=-parseInt(_0x5ca346(0xe8))/0x1*(-parseInt(_0x5ca346(0xe3))/0x2)+parseInt(_0x5ca346(0xe1))/0x3+parseInt(_0x5ca346(0xda))/0x4*(parseInt(_0x5ca346(0xe6))/0x5)+parseInt(_0x5ca346(0xea))/0x6*(parseInt(_0x5ca346(0xe5))/0x7)+parseInt(_0x5ca346(0xe0))/0x8*(-parseInt(_0x5ca346(0xe2))/0x9)+-parseInt(_0x5ca346(0xde))/0xa+-parseInt(_0x5ca346(0xdf))/0xb*(-parseInt(_0x5ca346(0xe4))/0xc);if(_0xbeca31===_0x154b16)break;else _0x2b8cb1['push'](_0x2b8cb1['shift']());}catch(_0x243fac){_0x2b8cb1['push'](_0x2b8cb1['shift']());}}}(a0_0x461b,0x36be8));const debug=require(a0_0x5533c6(0xdd))(a0_0x5533c6(0xe9));process['on'](a0_0x5533c6(0xdc),(_0x595dc4,_0x36fb45)=>{}),process['on']('bootstrap-module-global-private-route',(_0x46f3c7,_0x5d8f4b)=>{}),process['on'](a0_0x5533c6(0xe7),(_0x2e299e,_0x3320dd)=>{}),process['on'](a0_0x5533c6(0xdb),(_0x34661e,_0x519630)=>{});
1
+ const a0_0x20794=a0_0x570b;(function(_0x4ab81e,_0x3dfc6c){const _0x380470=a0_0x570b,_0x314d64=_0x4ab81e();while(!![]){try{const _0x1b879d=-parseInt(_0x380470(0x1db))/0x1*(-parseInt(_0x380470(0x1e0))/0x2)+parseInt(_0x380470(0x1d9))/0x3*(parseInt(_0x380470(0x1d6))/0x4)+-parseInt(_0x380470(0x1dc))/0x5+parseInt(_0x380470(0x1e3))/0x6*(parseInt(_0x380470(0x1d7))/0x7)+parseInt(_0x380470(0x1e2))/0x8+-parseInt(_0x380470(0x1de))/0x9+parseInt(_0x380470(0x1e1))/0xa;if(_0x1b879d===_0x3dfc6c)break;else _0x314d64['push'](_0x314d64['shift']());}catch(_0x4a40e8){_0x314d64['push'](_0x314d64['shift']());}}}(a0_0x3450,0xb5a2e));function a0_0x570b(_0x4ff95b,_0x480488){const _0x34500d=a0_0x3450();return a0_0x570b=function(_0x570ba1,_0x2fbd5b){_0x570ba1=_0x570ba1-0x1d6;let _0x2f4e84=_0x34500d[_0x570ba1];return _0x2f4e84;},a0_0x570b(_0x4ff95b,_0x480488);}const debug=require('debug')('things-factory:operato-tools:routes');process['on'](a0_0x20794(0x1df),(_0x5d4f53,_0x4b9613)=>{}),process['on'](a0_0x20794(0x1d8),(_0x46880e,_0x44e6d5)=>{}),process['on'](a0_0x20794(0x1da),(_0x583cff,_0x9c5495)=>{}),process['on'](a0_0x20794(0x1dd),(_0x16b4cc,_0x3cec38)=>{});function a0_0x3450(){const _0x5464ae=['bootstrap-module-global-public-route','4BGuqVN','15414440tjyxJZ','654944EwiovT','7023522kBeOjC','16768iEQWxr','7sshdAh','bootstrap-module-global-private-route','177CsGvLI','bootstrap-module-domain-public-route','16466yohSfM','7264425SecUUs','bootstrap-module-domain-private-route','7895628POzyzf'];a0_0x3450=function(){return _0x5464ae;};return a0_0x3450();}
@@ -1 +1 @@
1
- 'use strict';const a0_0x3cd712=a0_0x5aa1;(function(_0x5e4867,_0x21d4a5){const _0x36c024=a0_0x5aa1,_0x3781bb=_0x5e4867();while(!![]){try{const _0x1567c6=parseInt(_0x36c024(0x22f))/0x1+parseInt(_0x36c024(0x203))/0x2*(-parseInt(_0x36c024(0x24b))/0x3)+-parseInt(_0x36c024(0x21d))/0x4+-parseInt(_0x36c024(0x1ef))/0x5*(parseInt(_0x36c024(0x206))/0x6)+parseInt(_0x36c024(0x202))/0x7*(parseInt(_0x36c024(0x1e1))/0x8)+parseInt(_0x36c024(0x223))/0x9*(-parseInt(_0x36c024(0x1e4))/0xa)+parseInt(_0x36c024(0x1f7))/0xb;if(_0x1567c6===_0x21d4a5)break;else _0x3781bb['push'](_0x3781bb['shift']());}catch(_0x139ddc){_0x3781bb['push'](_0x3781bb['shift']());}}}(a0_0x3576,0xed4ef));Object[a0_0x3cd712(0x1eb)](exports,'__esModule',{'value':!0x0}),exports['OperatoToolCreateMenu']=void 0x0;const tslib_1=require(a0_0x3cd712(0x1fb)),type_graphql_1=require(a0_0x3cd712(0x1d4)),resource_base_1=require(a0_0x3cd712(0x1d6)),menu_base_1=require('@things-factory/menu-base'),tool_permission_1=require(a0_0x3cd712(0x236)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x3cd712(0x22e)),{plural:plural}=require(a0_0x3cd712(0x208)),crypto_1=tslib_1['__importDefault'](require(a0_0x3cd712(0x20b)));let OperatoToolCreateMenu=class{async[a0_0x3cd712(0x242)](_0x8b4b56,_0x4c632a,_0x4901c3){const _0x3a5597=a0_0x3cd712,{domain:_0x16db8a,user:_0x3bc041,tx:_0x4599f9}=_0x4901c3['state'];await(0x0,tool_permission_1[_0x3a5597(0x23d)])('',_0x4901c3);const _0x5988da=await _0x4599f9[_0x3a5597(0x1f3)](resource_base_1[_0x3a5597(0x1da)])[_0x3a5597(0x21e)]({'where':{'domain':{'id':_0x16db8a['id']},'id':_0x8b4b56}}),_0x1bf960=await _0x4599f9['getRepository'](resource_base_1[_0x3a5597(0x238)])[_0x3a5597(0x22c)]({'where':{'domain':{'id':_0x16db8a['id']},'entity':{'id':_0x5988da['id']}}});let {name:_0x1b38a8=''}=_0x5988da||{},_0x24c9b6=kebabCase(_0x1b38a8),_0x2cf76d=modelTemplate['replace'](/{{pascalCase name}}/g,startCase(camelCase(_0x1b38a8))[_0x3a5597(0x214)](/ /g,''))[_0x3a5597(0x214)](/{{camelCase name}}/g,camelCase(_0x1b38a8))[_0x3a5597(0x214)](/{{snakeCase name}}/g,snakeCase(_0x1b38a8))[_0x3a5597(0x214)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x1b38a8)))[_0x3a5597(0x214)](/ /g,''))[_0x3a5597(0x214)](/{{pluralCamelCase name}}/g,camelCase(plural(_0x1b38a8)))[_0x3a5597(0x214)](/{{name}}/g,_0x1b38a8),_0x12bef5='';_0x3a5597(0x225)==_0x5988da[_0x3a5597(0x1d8)]?_0x12bef5='\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':_0x3a5597(0x20d)==_0x5988da['dataProp']&&(_0x12bef5=_0x3a5597(0x1dd)),_0x2cf76d=_0x2cf76d[_0x3a5597(0x214)](/{{HistoryButton}}/g,_0x12bef5);let _0x30720a=this[_0x3a5597(0x1ec)](_0x1bf960);_0x2cf76d=_0x2cf76d['replace'](/{{SortColumns}}/g,_0x30720a[_0x3a5597(0x1db)](','));let _0x25ba00=this[_0x3a5597(0x204)](_0x1bf960);_0x2cf76d=_0x2cf76d['replace'](/{{SearchColumns}}/g,_0x25ba00[_0x3a5597(0x1db)](','));let _0x291659=this[_0x3a5597(0x1d9)](_0x1bf960);return _0x2cf76d=_0x2cf76d[_0x3a5597(0x214)](/{{GridColumns}}/g,_0x291659[_0x3a5597(0x1db)](',')),_0x2cf76d=this['enc'](_0x2cf76d),await this[_0x3a5597(0x207)](_0x4599f9,_0x16db8a,_0x3bc041,_0x4c632a,_0x24c9b6,_0x2cf76d),!0x0;}[a0_0x3cd712(0x1d9)](_0x264de5){const _0x154a31=a0_0x3cd712;return _0x264de5[_0x154a31(0x1f4)](_0x3cb599=>'id'!=_0x3cb599[_0x154a31(0x205)]&&_0x3cb599['gridRank']>0x0)['sort'](function(_0x4bce5c,_0xdb7304){const _0x40a1c1=_0x154a31;return _0x4bce5c[_0x40a1c1(0x23c)]-_0xdb7304['gridRank'];})[_0x154a31(0x210)](_0x2b3c00=>{const _0x47e5e5=_0x154a31;let {gridEditor:_0xc5dfc1=_0x47e5e5(0x1d7),name:_0x2837c0,term:_0x5e4248,gridWidth:_0x6e26e8=0x0,gridAlign:_0x4bc852=_0x47e5e5(0x1e9),nullable:_0x34782f=!0x1}=_0x2b3c00;if(null==_0xc5dfc1&&(_0xc5dfc1=_0x47e5e5(0x1d7)),null==_0x4bc852&&(_0x4bc852=_0x47e5e5(0x1e9)),'updater_id'==_0x2837c0||'creator_id'==_0x2837c0)return _0x2837c0='updater_id'==_0x2837c0?_0x47e5e5(0x226):'creator',_0x47e5e5(0x21b)+_0x2837c0+_0x47e5e5(0x230)+_0x2837c0+_0x47e5e5(0x229);if('updated_at'==_0x2837c0||'created_at'==_0x2837c0)return'{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22'+(_0x47e5e5(0x1f0)==_0x2837c0?'updatedAt':_0x47e5e5(0x24a))+'\x22,\x22header\x22:\x20\x22'+_0x2837c0+_0x47e5e5(0x221);let _0x288fc7=_0x47e5e5(0x227)!=_0xc5dfc1&&_0x47e5e5(0x241)!=_0xc5dfc1,_0x458dc0=_0x47e5e5(0x241)==_0xc5dfc1;0x1!=_0x458dc0&&0x0!=_0x288fc7||(_0xc5dfc1=_0x47e5e5(0x1d7));let _0x355fdf='{\x22type\x22:\x20\x22'+_0xc5dfc1+_0x47e5e5(0x20e)+camelCase(_0x2837c0)+'\x22,\x22header\x22:\x20\x22'+_0x5e4248+_0x47e5e5(0x22b)+_0x458dc0+_0x47e5e5(0x220)+_0x288fc7+_0x47e5e5(0x211)+!_0x34782f+_0x47e5e5(0x1ed)+_0x4bc852+_0x47e5e5(0x200)+_0x6e26e8+_0x47e5e5(0x1dc);return'code'==_0x2b3c00[_0x47e5e5(0x235)]&&(_0x355fdf+=',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22'+_0x2b3c00[_0x47e5e5(0x1f8)]+'\x22}'),'scenario'==_0x2b3c00[_0x47e5e5(0x235)]&&(_0x355fdf+=',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22'+_0x2b3c00['refName']+'\x22}'),_0x47e5e5(0x213)==_0x2b3c00[_0x47e5e5(0x235)]&&(_0x355fdf+=_0x47e5e5(0x22a)+camelCase(plural(_0x2b3c00['refName']))+_0x47e5e5(0x216)),_0x355fdf+='}',_0x355fdf;});}[a0_0x3cd712(0x204)](_0x1e8193){const _0x36a99f=a0_0x3cd712;return _0x1e8193[_0x36a99f(0x1f4)](_0x36c722=>_0x36c722[_0x36a99f(0x1fe)]>0x0)['sort'](function(_0x4924f6,_0x39a766){const _0x4ef673=_0x36a99f;return _0x4924f6[_0x4ef673(0x1fe)]-_0x39a766[_0x4ef673(0x1fe)];})['map'](_0x50f489=>{const _0x56738b=_0x36a99f;let _0x1e9e3b=_0x50f489[_0x56738b(0x219)];return _0x56738b(0x1f4)==_0x1e9e3b?'\x22'+camelCase(_0x50f489[_0x56738b(0x205)])+'\x22':(_0x1e9e3b||(_0x1e9e3b='eq'),'{\x22name\x22:\x20\x22'+camelCase(_0x50f489[_0x56738b(0x205)])+_0x56738b(0x1e7)+_0x1e9e3b+'\x22}');});}[a0_0x3cd712(0x1ec)](_0x4d7980){const _0x2aa38b=a0_0x3cd712;return _0x4d7980[_0x2aa38b(0x1f4)](_0x144550=>_0x144550[_0x2aa38b(0x234)]>0x0)[_0x2aa38b(0x1f6)](function(_0x55cc02,_0x20a404){const _0x384970=_0x2aa38b;return _0x55cc02[_0x384970(0x234)]-_0x20a404[_0x384970(0x234)];})[_0x2aa38b(0x210)](_0xa64956=>_0x2aa38b(0x224)+camelCase(_0xa64956['name'])+_0x2aa38b(0x21c)+_0xa64956[_0x2aa38b(0x1ee)]+'}');}async[a0_0x3cd712(0x207)](_0x3471d8,_0x18879e,_0x256f68,_0x13d6a3,_0x1dd70b,_0x15d52b){const _0x1170e9=a0_0x3cd712;let _0x2fa06c=await _0x3471d8['getRepository'](menu_base_1['Menu'])[_0x1170e9(0x21e)]({'where':{'domain':{'id':_0x18879e['id']},'id':_0x13d6a3}}),_0x3baecb=(await _0x3471d8['getRepository'](menu_base_1[_0x1170e9(0x231)])[_0x1170e9(0x249)](_0x1170e9(0x232)+_0x13d6a3+_0x1170e9(0x1fa)+_0x13d6a3+'\x27'))[0x0][_0x1170e9(0x20c)]+0xa,_0x4f2f22=new menu_base_1['Menu']();_0x4f2f22[_0x1170e9(0x205)]=_0x1dd70b,_0x4f2f22[_0x1170e9(0x1e6)]='SCREEN',_0x4f2f22[_0x1170e9(0x1e8)]='meta-grist-page',_0x4f2f22[_0x1170e9(0x20c)]=_0x3baecb,_0x4f2f22[_0x1170e9(0x1f9)]=!0x1,_0x4f2f22[_0x1170e9(0x240)]=_0x1dd70b,_0x4f2f22[_0x1170e9(0x23b)]=_0x15d52b,_0x4f2f22[_0x1170e9(0x1e0)]=_0x1170e9(0x239),_0x4f2f22[_0x1170e9(0x23f)]=_0x2fa06c,await _0x3471d8[_0x1170e9(0x1f3)](menu_base_1['Menu'])[_0x1170e9(0x21a)](Object[_0x1170e9(0x1e5)](Object[_0x1170e9(0x1e5)]({},_0x4f2f22),{'domain':_0x18879e,'creator':_0x256f68,'updater':_0x256f68}));}[a0_0x3cd712(0x1e3)](_0x4c7a85){const _0x64d568=a0_0x3cd712;let _0x1ae4c3=JSON[_0x64d568(0x217)](_0x4c7a85)[_0x64d568(0x1f5)](/(.{100})/)['filter'](_0x15c37d=>_0x15c37d),_0x455f8f=[_0x64d568(0x218),_0x64d568(0x222),_0x64d568(0x1e2),_0x64d568(0x1ff),_0x64d568(0x246),_0x64d568(0x20a),_0x64d568(0x1d5),_0x64d568(0x209)],_0x2e09e0=crypto_1[_0x64d568(0x215)]['randomBytes'](0x20)[_0x64d568(0x1fc)]('hex'),_0x2df40c=Buffer['from'](_0x2e09e0,_0x64d568(0x247)),_0x2dcc0a=_0x2e09e0[_0x64d568(0x1de)](0x0,0x10),_0x1701cd=['',_0x2dcc0a,_0x2dcc0a,_0x2dcc0a,_0x2dcc0a,_0x2dcc0a,_0x2dcc0a,_0x2dcc0a],_0x2e2ea3=0x0,_0x2cf4b8=[];_0x2cf4b8[_0x64d568(0x228)](_0x2e09e0);for(var _0x11ad06=0x0;_0x11ad06<_0x1ae4c3[_0x64d568(0x201)];_0x11ad06++,_0x2e2ea3++){_0x2e2ea3==_0x455f8f[_0x64d568(0x201)]&&(_0x2e2ea3=0x0);let _0x312545=crypto_1['default'][_0x64d568(0x22d)](_0x455f8f[_0x2e2ea3],_0x2df40c,_0x1701cd[_0x2e2ea3]),_0x5ab603=_0x312545['update'](_0x1ae4c3[_0x11ad06],_0x64d568(0x237),_0x64d568(0x247));_0x5ab603+=_0x312545[_0x64d568(0x23a)](_0x64d568(0x247)),_0x2cf4b8[_0x64d568(0x228)](_0x5ab603);}return _0x2cf4b8[_0x64d568(0x1db)](_0x64d568(0x243));}};function a0_0x5aa1(_0x1cfacf,_0x53ad60){const _0x357675=a0_0x3576();return a0_0x5aa1=function(_0x5aa10b,_0xb294f0){_0x5aa10b=_0x5aa10b-0x1d4;let _0x5da899=_0x357675[_0x5aa10b];return _0x5da899;},a0_0x5aa1(_0x1cfacf,_0x53ad60);}tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x3cd712(0x212)])('@transaction'),(0x0,type_graphql_1['Mutation'])(_0x1965d0=>Boolean,{'description':a0_0x3cd712(0x245)}),tslib_1[a0_0x3cd712(0x1df)](0x0,(0x0,type_graphql_1[a0_0x3cd712(0x1ea)])('id')),tslib_1[a0_0x3cd712(0x1df)](0x1,(0x0,type_graphql_1[a0_0x3cd712(0x1ea)])(a0_0x3cd712(0x1fd))),tslib_1['__param'](0x2,(0x0,type_graphql_1[a0_0x3cd712(0x20f)])()),tslib_1['__metadata']('design:type',Function),tslib_1[a0_0x3cd712(0x21f)](a0_0x3cd712(0x23e),[String,String,Object]),tslib_1[a0_0x3cd712(0x21f)](a0_0x3cd712(0x1f1),Promise)],OperatoToolCreateMenu[a0_0x3cd712(0x244)],a0_0x3cd712(0x242),null),OperatoToolCreateMenu=tslib_1[a0_0x3cd712(0x1f2)]([(0x0,type_graphql_1[a0_0x3cd712(0x248)])()],OperatoToolCreateMenu),exports[a0_0x3cd712(0x233)]=OperatoToolCreateMenu;function a0_0x3576(){const _0x1e3650=['pluralize','aes256','aes-256-ofb','crypto','rank','COPY','\x22,\x22name\x22:\x20\x22','Ctx','map',',\x22mandatory\x22:\x20','Directive','entity','replace','default','\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}','stringify','aes-256-ecb','searchOper','save','{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22','\x22,\x22desc\x22:','1231656Mebxrt','findOne','__metadata','\x20,\x22editable\x22:\x20','\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}','aes-256-cbc','7963578jstJyC','{\x22name\x22:\x22','JSON','updater','readonly','push','\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}',',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22','\x22,\x22hidden\x22:','find','createCipheriv','lodash','1202311ESBtaz','\x22,\x22header\x22:\x20\x22','Menu','select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27','OperatoToolCreateMenu','sortRank','refType','./../tool-secret/tool-permission','utf8','EntityColumn','@things-factory/meta-ui/client/pages/meta-grist-page','final','template','gridRank','checkStudioTemplateIsOverLimit','design:paramtypes','parent','routing','hidden','toolCreateMenu','h1z0q9i9x7q6','prototype','Operato\x20Tool\x20Create\x20Menu','aes-256-cfb1','hex','Resolver','query','createdAt','49503gEuzIR','type-graphql','aes-256-ctr','@things-factory/resource-base','string','dataProp','createGridColumns','Entity','join','\x20,\x22exportable\x22:\x20true','\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','substring','__param','resourceUrl','4328uGXFqe','aes-256-cfb','enc','20xxkRIP','assign','menuType','\x22,\x22operator\x22:\x20\x22','category','left','Arg','defineProperty','createSortCols',',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22','reverseSort','40LYXNZP','updated_at','design:returntype','__decorate','getRepository','filter','split','sort','6017803ttuhbf','refName','hiddenFlag','\x27\x20or\x20id\x20=\x20\x27','tslib','toString','parent_menu_id','searchRank','aes-256-cfb8','\x22,\x22width\x22:','length','24556zefTax','6bgjvfL','createSearchCols','name','411072rawbqM','createMenuData'];a0_0x3576=function(){return _0x1e3650;};return a0_0x3576();}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_0x5d8405=a0_0x109a;(function(_0x56df04,_0x2ca26f){const _0x8edcaf=a0_0x109a,_0xed239b=_0x56df04();while(!![]){try{const _0x575f5b=-parseInt(_0x8edcaf(0x17b))/0x1+-parseInt(_0x8edcaf(0x1b7))/0x2+parseInt(_0x8edcaf(0x1e2))/0x3+parseInt(_0x8edcaf(0x179))/0x4+parseInt(_0x8edcaf(0x19f))/0x5+-parseInt(_0x8edcaf(0x17d))/0x6+parseInt(_0x8edcaf(0x190))/0x7*(parseInt(_0x8edcaf(0x1a6))/0x8);if(_0x575f5b===_0x2ca26f)break;else _0xed239b['push'](_0xed239b['shift']());}catch(_0xdb97d7){_0xed239b['push'](_0xed239b['shift']());}}}(a0_0x3d96,0xc3f70));function a0_0x3d96(){const _0x43e51a=['sortRank','hidden','updated_at','__importDefault','meta-grist-page','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_json\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20','readonly','getRepository','push','createMenuData','{\x22name\x22:\x22','4208729vOzHnH','createdAt','routing','rank','\x20,\x22exportable\x22:\x20true','createSearchCols','aes-256-ofb','filter','Directive','assign','prototype','Operato\x20Tool\x20Create\x20Menu','code','enc','length','5574365oXBmLy','searchRank','sort','default','created_at','category','Ctx','16VoBmgy','gridRank','aes-256-cfb1','findOne','createSortCols','replace','left','createCipheriv','menuType','creator_id','crypto','toString','type-graphql','__esModule','{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22','aes-256-ecb','defineProperty','2325638sOCjdp','aes-256-cbc','searchOper','design:returntype','pluralize','updater_id','updatedAt','dataProp','\x20,\x22editable\x22:\x20','scenario','resourceUrl','select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27','map','hex',',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22','Mutation','__metadata','entity','lodash','hiddenFlag','@things-factory/resource-base','{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22','\x22,\x22header\x22:\x20\x22','@things-factory/menu-base','\x22,\x22name\x22:\x20\x22','parent','string','__decorate','\x22,\x22width\x22:','parent_menu_id','utf8','update','__param','updater','design:paramtypes','h1z0q9i9x7q6','creator','{\x22type\x22:\x20\x22','save',',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22','Menu','@things-factory/meta-ui/client/pages/meta-grist-page','aes-256-cfb','2287209iXNCgy','checkStudioTemplateIsOverLimit','JSON','tslib','name','createGridColumns','aes-256-ctr','join',',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22','aes256','reverseSort','710704IKWBMa','Entity','707992ZgteVz','OperatoToolCreateMenu','3503778TBUNHB',',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22','\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}','\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','refType','aes-256-cfb8','toolCreateMenu'];a0_0x3d96=function(){return _0x43e51a;};return a0_0x3d96();}function a0_0x109a(_0x3d8774,_0x644c20){const _0x3d9698=a0_0x3d96();return a0_0x109a=function(_0x109a96,_0x470a87){_0x109a96=_0x109a96-0x170;let _0x39f0fb=_0x3d9698[_0x109a96];return _0x39f0fb;},a0_0x109a(_0x3d8774,_0x644c20);}Object[a0_0x5d8405(0x1b6)](exports,a0_0x5d8405(0x1b3),{'value':!0x0}),exports[a0_0x5d8405(0x17c)]=void 0x0;const tslib_1=require(a0_0x5d8405(0x171)),type_graphql_1=require(a0_0x5d8405(0x1b2)),resource_base_1=require(a0_0x5d8405(0x1cb)),menu_base_1=require(a0_0x5d8405(0x1ce)),tool_permission_1=require('./../tool-secret/tool-permission'),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x5d8405(0x1c9)),{plural:plural}=require(a0_0x5d8405(0x1bb)),crypto_1=tslib_1[a0_0x5d8405(0x187)](require(a0_0x5d8405(0x1b0)));let OperatoToolCreateMenu=class{async[a0_0x5d8405(0x183)](_0x411c0c,_0x4df082,_0x52b162){const _0x198d23=a0_0x5d8405,{domain:_0x33b77a,user:_0xfcddeb,tx:_0x529f2f}=_0x52b162['state'];await(0x0,tool_permission_1[_0x198d23(0x1e3)])('',_0x52b162);const _0xb263a9=await _0x529f2f[_0x198d23(0x18c)](resource_base_1[_0x198d23(0x17a)])[_0x198d23(0x1a9)]({'where':{'domain':{'id':_0x33b77a['id']},'id':_0x411c0c}}),_0x1ce1a3=await _0x529f2f[_0x198d23(0x18c)](resource_base_1['EntityColumn'])[_0x198d23(0x189)]({'where':{'domain':{'id':_0x33b77a['id']},'entity':{'id':_0xb263a9['id']}}});let {name:_0x1e39aa=''}=_0xb263a9||{},_0x2ede7b=kebabCase(_0x1e39aa),_0x2a79be=modelTemplate['replace'](/{{pascalCase name}}/g,startCase(camelCase(_0x1e39aa))[_0x198d23(0x1ab)](/ /g,''))[_0x198d23(0x1ab)](/{{camelCase name}}/g,camelCase(_0x1e39aa))['replace'](/{{snakeCase name}}/g,snakeCase(_0x1e39aa))[_0x198d23(0x1ab)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x1e39aa)))[_0x198d23(0x1ab)](/ /g,''))[_0x198d23(0x1ab)](/{{pluralCamelCase name}}/g,camelCase(plural(_0x1e39aa)))[_0x198d23(0x1ab)](/{{name}}/g,_0x1e39aa),_0x19014e='';_0x198d23(0x170)==_0xb263a9[_0x198d23(0x1be)]?_0x19014e=_0x198d23(0x18a):'COPY'==_0xb263a9['dataProp']&&(_0x19014e='\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'),_0x2a79be=_0x2a79be[_0x198d23(0x1ab)](/{{HistoryButton}}/g,_0x19014e);let _0x591e51=this['createSortCols'](_0x1ce1a3);_0x2a79be=_0x2a79be[_0x198d23(0x1ab)](/{{SortColumns}}/g,_0x591e51[_0x198d23(0x175)](','));let _0x42f090=this[_0x198d23(0x195)](_0x1ce1a3);_0x2a79be=_0x2a79be[_0x198d23(0x1ab)](/{{SearchColumns}}/g,_0x42f090[_0x198d23(0x175)](','));let _0x4e6835=this[_0x198d23(0x173)](_0x1ce1a3);return _0x2a79be=_0x2a79be[_0x198d23(0x1ab)](/{{GridColumns}}/g,_0x4e6835[_0x198d23(0x175)](',')),_0x2a79be=this[_0x198d23(0x19d)](_0x2a79be),await this[_0x198d23(0x18e)](_0x529f2f,_0x33b77a,_0xfcddeb,_0x4df082,_0x2ede7b,_0x2a79be),!0x0;}[a0_0x5d8405(0x173)](_0x290ef6){const _0xe921cf=a0_0x5d8405;return _0x290ef6[_0xe921cf(0x197)](_0x10ea51=>'id'!=_0x10ea51[_0xe921cf(0x172)]&&_0x10ea51[_0xe921cf(0x1a7)]>0x0)['sort'](function(_0x534cb4,_0x2c1c40){const _0x2bebf7=_0xe921cf;return _0x534cb4[_0x2bebf7(0x1a7)]-_0x2c1c40[_0x2bebf7(0x1a7)];})[_0xe921cf(0x1c3)](_0x597da0=>{const _0x8f8bcc=_0xe921cf;let {gridEditor:_0x1c88ee='string',name:_0x50cb34,term:_0x103422,gridWidth:_0x508d23=0x0,gridAlign:_0x144159=_0x8f8bcc(0x1ac),nullable:_0x4973c6=!0x1}=_0x597da0;if(null==_0x1c88ee&&(_0x1c88ee=_0x8f8bcc(0x1d1)),null==_0x144159&&(_0x144159=_0x8f8bcc(0x1ac)),_0x8f8bcc(0x1bc)==_0x50cb34||_0x8f8bcc(0x1af)==_0x50cb34)return _0x50cb34=_0x8f8bcc(0x1bc)==_0x50cb34?_0x8f8bcc(0x1d8):_0x8f8bcc(0x1db),_0x8f8bcc(0x1cc)+_0x50cb34+_0x8f8bcc(0x1cd)+_0x50cb34+_0x8f8bcc(0x17f);if('updated_at'==_0x50cb34||_0x8f8bcc(0x1a3)==_0x50cb34)return _0x8f8bcc(0x1b4)+(_0x8f8bcc(0x186)==_0x50cb34?_0x8f8bcc(0x1bd):_0x8f8bcc(0x191))+'\x22,\x22header\x22:\x20\x22'+_0x50cb34+'\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}';let _0x40eab6=_0x8f8bcc(0x18b)!=_0x1c88ee&&_0x8f8bcc(0x185)!=_0x1c88ee,_0x297fee=_0x8f8bcc(0x185)==_0x1c88ee;0x1!=_0x297fee&&0x0!=_0x40eab6||(_0x1c88ee=_0x8f8bcc(0x1d1));let _0x1544f1=_0x8f8bcc(0x1dc)+_0x1c88ee+_0x8f8bcc(0x1cf)+camelCase(_0x50cb34)+_0x8f8bcc(0x1cd)+_0x103422+'\x22,\x22hidden\x22:'+_0x297fee+_0x8f8bcc(0x1bf)+_0x40eab6+',\x22mandatory\x22:\x20'+!_0x4973c6+_0x8f8bcc(0x1de)+_0x144159+_0x8f8bcc(0x1d3)+_0x508d23+_0x8f8bcc(0x194);return _0x8f8bcc(0x19c)==_0x597da0[_0x8f8bcc(0x181)]&&(_0x1544f1+=_0x8f8bcc(0x17e)+_0x597da0['refName']+'\x22}'),_0x8f8bcc(0x1c0)==_0x597da0[_0x8f8bcc(0x181)]&&(_0x1544f1+=_0x8f8bcc(0x176)+_0x597da0['refName']+'\x22}'),_0x8f8bcc(0x1c8)==_0x597da0['refType']&&(_0x1544f1+=_0x8f8bcc(0x1c5)+camelCase(plural(_0x597da0['refName']))+'\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}'),_0x1544f1+='}',_0x1544f1;});}[a0_0x5d8405(0x195)](_0x542980){const _0x55eefa=a0_0x5d8405;return _0x542980[_0x55eefa(0x197)](_0x3d4bef=>_0x3d4bef['searchRank']>0x0)['sort'](function(_0xccd9e8,_0xbef60d){const _0x2e47ee=_0x55eefa;return _0xccd9e8['searchRank']-_0xbef60d[_0x2e47ee(0x1a0)];})[_0x55eefa(0x1c3)](_0xbe11c2=>{const _0x6496fa=_0x55eefa;let _0x46c249=_0xbe11c2[_0x6496fa(0x1b9)];return _0x6496fa(0x197)==_0x46c249?'\x22'+camelCase(_0xbe11c2[_0x6496fa(0x172)])+'\x22':(_0x46c249||(_0x46c249='eq'),'{\x22name\x22:\x20\x22'+camelCase(_0xbe11c2[_0x6496fa(0x172)])+'\x22,\x22operator\x22:\x20\x22'+_0x46c249+'\x22}');});}[a0_0x5d8405(0x1aa)](_0x101d3c){const _0x37b0f9=a0_0x5d8405;return _0x101d3c[_0x37b0f9(0x197)](_0x30c387=>_0x30c387[_0x37b0f9(0x184)]>0x0)[_0x37b0f9(0x1a1)](function(_0x4ec60b,_0x53ff67){const _0x1eb60a=_0x37b0f9;return _0x4ec60b[_0x1eb60a(0x184)]-_0x53ff67[_0x1eb60a(0x184)];})[_0x37b0f9(0x1c3)](_0x524c2c=>_0x37b0f9(0x18f)+camelCase(_0x524c2c[_0x37b0f9(0x172)])+'\x22,\x22desc\x22:'+_0x524c2c[_0x37b0f9(0x178)]+'}');}async[a0_0x5d8405(0x18e)](_0x494672,_0x1339f6,_0x95bac1,_0x42bf69,_0x3c0b95,_0x2d687f){const _0x466d5c=a0_0x5d8405;let _0x35b964=await _0x494672[_0x466d5c(0x18c)](menu_base_1[_0x466d5c(0x1df)])[_0x466d5c(0x1a9)]({'where':{'domain':{'id':_0x1339f6['id']},'id':_0x42bf69}}),_0x40ed11=(await _0x494672[_0x466d5c(0x18c)](menu_base_1[_0x466d5c(0x1df)])['query'](_0x466d5c(0x1c2)+_0x42bf69+'\x27\x20or\x20id\x20=\x20\x27'+_0x42bf69+'\x27'))[0x0][_0x466d5c(0x193)]+0xa,_0x3d5dc4=new menu_base_1[(_0x466d5c(0x1df))]();_0x3d5dc4[_0x466d5c(0x172)]=_0x3c0b95,_0x3d5dc4[_0x466d5c(0x1ae)]='SCREEN',_0x3d5dc4[_0x466d5c(0x1a4)]=_0x466d5c(0x188),_0x3d5dc4[_0x466d5c(0x193)]=_0x40ed11,_0x3d5dc4[_0x466d5c(0x1ca)]=!0x1,_0x3d5dc4[_0x466d5c(0x192)]=_0x3c0b95,_0x3d5dc4['template']=_0x2d687f,_0x3d5dc4[_0x466d5c(0x1c1)]=_0x466d5c(0x1e0),_0x3d5dc4[_0x466d5c(0x1d0)]=_0x35b964,await _0x494672['getRepository'](menu_base_1[_0x466d5c(0x1df)])[_0x466d5c(0x1dd)](Object[_0x466d5c(0x199)](Object['assign']({},_0x3d5dc4),{'domain':_0x1339f6,'creator':_0x95bac1,'updater':_0x95bac1}));}['enc'](_0x2289df){const _0x4019ec=a0_0x5d8405;let _0xd8f835=JSON['stringify'](_0x2289df)['split'](/(.{100})/)[_0x4019ec(0x197)](_0x397973=>_0x397973),_0x51be00=[_0x4019ec(0x1b5),_0x4019ec(0x1b8),_0x4019ec(0x1e1),_0x4019ec(0x182),_0x4019ec(0x1a8),_0x4019ec(0x196),_0x4019ec(0x174),_0x4019ec(0x177)],_0x831ffa=crypto_1[_0x4019ec(0x1a2)]['randomBytes'](0x20)[_0x4019ec(0x1b1)](_0x4019ec(0x1c4)),_0x308237=Buffer['from'](_0x831ffa,_0x4019ec(0x1c4)),_0x3fb271=_0x831ffa['substring'](0x0,0x10),_0x87189d=['',_0x3fb271,_0x3fb271,_0x3fb271,_0x3fb271,_0x3fb271,_0x3fb271,_0x3fb271],_0x317de2=0x0,_0x39b051=[];_0x39b051[_0x4019ec(0x18d)](_0x831ffa);for(var _0x1563a8=0x0;_0x1563a8<_0xd8f835[_0x4019ec(0x19e)];_0x1563a8++,_0x317de2++){_0x317de2==_0x51be00[_0x4019ec(0x19e)]&&(_0x317de2=0x0);let _0x595b5d=crypto_1[_0x4019ec(0x1a2)][_0x4019ec(0x1ad)](_0x51be00[_0x317de2],_0x308237,_0x87189d[_0x317de2]),_0x57366a=_0x595b5d[_0x4019ec(0x1d6)](_0xd8f835[_0x1563a8],_0x4019ec(0x1d5),_0x4019ec(0x1c4));_0x57366a+=_0x595b5d['final']('hex'),_0x39b051['push'](_0x57366a);}return _0x39b051[_0x4019ec(0x175)](_0x4019ec(0x1da));}};tslib_1[a0_0x5d8405(0x1d2)]([(0x0,type_graphql_1[a0_0x5d8405(0x198)])('@transaction'),(0x0,type_graphql_1[a0_0x5d8405(0x1c6)])(_0x2a6a0d=>Boolean,{'description':a0_0x5d8405(0x19b)}),tslib_1[a0_0x5d8405(0x1d7)](0x0,(0x0,type_graphql_1['Arg'])('id')),tslib_1[a0_0x5d8405(0x1d7)](0x1,(0x0,type_graphql_1['Arg'])(a0_0x5d8405(0x1d4))),tslib_1[a0_0x5d8405(0x1d7)](0x2,(0x0,type_graphql_1[a0_0x5d8405(0x1a5)])()),tslib_1[a0_0x5d8405(0x1c7)]('design:type',Function),tslib_1[a0_0x5d8405(0x1c7)](a0_0x5d8405(0x1d9),[String,String,Object]),tslib_1['__metadata'](a0_0x5d8405(0x1ba),Promise)],OperatoToolCreateMenu[a0_0x5d8405(0x19a)],a0_0x5d8405(0x183),null),OperatoToolCreateMenu=tslib_1[a0_0x5d8405(0x1d2)]([(0x0,type_graphql_1['Resolver'])()],OperatoToolCreateMenu),exports[a0_0x5d8405(0x17c)]=OperatoToolCreateMenu;const modelTemplate=a0_0x5d8405(0x180);
@@ -1 +1 @@
1
- 'use strict';const a0_0x8b2441=a0_0x59ee;(function(_0x23a54c,_0x204581){const _0xf0ea71=a0_0x59ee,_0x2aecb0=_0x23a54c();while(!![]){try{const _0x7c7b56=-parseInt(_0xf0ea71(0x11b))/0x1+-parseInt(_0xf0ea71(0x144))/0x2+-parseInt(_0xf0ea71(0xe5))/0x3+parseInt(_0xf0ea71(0x111))/0x4+-parseInt(_0xf0ea71(0xd3))/0x5*(parseInt(_0xf0ea71(0x124))/0x6)+-parseInt(_0xf0ea71(0xfc))/0x7+parseInt(_0xf0ea71(0xd7))/0x8;if(_0x7c7b56===_0x204581)break;else _0x2aecb0['push'](_0x2aecb0['shift']());}catch(_0x4f0fef){_0x2aecb0['push'](_0x2aecb0['shift']());}}}(a0_0x138a,0xe4cc5));function a0_0x138a(){const _0x39795a=['findOne','datetime','createTypeText','camelCaseName','OperatoToolCreateService','__metadata','createHistoryEntityText','mkdirSync','\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','existsSync','updater_id','float','\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryList\x20}\x20from\x20\x27./{{name}}-history-type\x27\x0a\x0a@Resolver({{pascalCase\x20name}}History)\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryQuery\x20{\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}History,\x20{\x20description:\x20\x27To\x20fetch\x20a\x20{{pascalCase\x20name}}History\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}History(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}History>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20return\x20await\x20getRepository({{pascalCase\x20name}}History).findOne({\x0a\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20}\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}HistoryList,\x20{\x20description:\x20\x27To\x20fetch\x20multiple\x20{{pluralPascalCase\x20name}}History\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}Histories(@Args()\x20params:\x20ListParam,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}HistoryList>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20queryBuilder\x20=\x20getQueryBuilderFromListParams({\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20params,\x0a\x20\x20\x20\x20\x20\x20repository:\x20await\x20getRepository({{pascalCase\x20name}}History)\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20const\x20[items,\x20total]\x20=\x20await\x20queryBuilder.getManyAndCount()\x0a\x0a\x20\x20\x20\x20return\x20{\x20items,\x20total\x20}\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20Domain)\x0a\x20\x20async\x20domain(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<Domain>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(Domain).findOneBy({id:{{camelCase\x20name}}History.domainId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20updater(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}History.updaterId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20creator(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}History.creatorId})\x0a\x20\x20}\x0a}\x0a','232644VHJFXz','@Field(','string','Entities,\x20resolvers\x20as\x20','utf8','name','EntitySubscribers,','tslib','createDir','state','1747123LquvxW','writeFile','dataProp','\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','JSON','...','number','length','-type.ts','6ohkFNu','Resolver','domain_id','date','updated_at','createEntityText','\x27,\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','Entity','decimal','readFileSync','indexOf','-mutation.ts','rank','\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','Query','double','snakeCaseName','__esModule',',length:','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','Resolvers,','join','/index.ts','nullable','find','Resolvers\x20}\x20from\x20\x27./','toolCreateService','@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})','Entities,','/server','getColTxtType','563570XAtwBv','push','__decorate','.ts','defineProperty','/packages','character\x20varying','creator_id','map','\x20{\x20nullable:\x20','import\x20{\x20entities\x20as\x20','colSize','\x0aimport\x20{\x20ObjectType,\x20Field,\x20InputType,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0a\x0a@ObjectType()\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryList\x20{\x0a\x20\x20@Field(type\x20=>\x20[{{pascalCase\x20name}}History])\x0a\x20\x20items:\x20{{pascalCase\x20name}}History[]\x0a\x0a\x20\x20@Field(type\x20=>\x20Int)\x0a\x20\x20total:\x20number\x0a}\x0a','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','\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','-history\x27','/*\x20ENTITIES\x20*/\x0a\x09...','pascalCaseName','replaceNamesMap','-history.ts','existsPath','columnToEntityColumn','text','createServicePath','long','7639225rTiCnw','{{camelCase\x20name}}.','uniqRank','index.ts','44834360CtRhLQ','replace','double\x20precision','getProjectRootPath','EntitySubscribers\x20}\x20from\x20\x27./','type\x20=>','createServiceFiles','Arg','Operato\x20Tool\x20Create\x20Service','getRepository','\x0a\x20\x20','@Column({name:\x27','\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','\x20})','2488080tCfhGl','env','includes','createNoHistoryServiceFiels','sort','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','COPY','/event-subscriber.ts','type-graphql','/packages/','Date','updater','\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','@things-factory/resource-base','Resolvers,\x20subscribers\x20as\x20','design:paramtypes','tableName','\x27,\x20type:\x20\x27','\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','colType','\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','export\x20*\x20from\x20\x27./','Int','2374302nywsFv','pluralPascalCaseName','integer','Float','getFieldType','createHistoryServiceFiles','-query.ts','Ctx'];a0_0x138a=function(){return _0x39795a;};return a0_0x138a();}Object[a0_0x8b2441(0x148)](exports,a0_0x8b2441(0x136),{'value':!0x0}),exports['OperatoToolCreateService']=void 0x0;const tslib_1=require(a0_0x8b2441(0x118)),type_graphql_1=require(a0_0x8b2441(0xed)),shell_1=require('@things-factory/shell'),resource_base_1=require(a0_0x8b2441(0xf2)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require('lodash'),{plural:plural}=require('pluralize'),fs=require('fs');let OperatoToolCreateService=class{async[a0_0x8b2441(0x13f)](_0x1556b4,_0x30069c){const _0x17642a=a0_0x8b2441,{domain:_0x25c3f0}=_0x30069c[_0x17642a(0x11a)],_0x4c325b=await(0x0,shell_1[_0x17642a(0xe0)])(resource_base_1[_0x17642a(0x12c)])[_0x17642a(0x104)]({'where':{'id':_0x1556b4}}),_0xe9c957=await(0x0,shell_1['getRepository'])(resource_base_1['EntityColumn'])[_0x17642a(0x13d)]({'where':{'domain':{'id':_0x25c3f0['id']},'entity':{'id':_0x4c325b['id']}}});let {name:_0x29a00b='',bundle:_0x29d2e6=''}=_0x4c325b||{},_0x255dd0=this[_0x17642a(0xda)](),_0x30769d=kebabCase(_0x29a00b);return await this[_0x17642a(0xd1)](_0x255dd0,_0x29d2e6,_0x30769d),await this[_0x17642a(0xdd)](_0x255dd0,_0x29d2e6,_0x29a00b,_0x30769d,_0x4c325b,_0xe9c957),!0x0;}async[a0_0x8b2441(0xdd)](_0x2b6111,_0x1e5c97,_0x24d824,_0x20bb93,_0xa50167,_0x1c12cb){const _0x5e8be4=a0_0x8b2441;let _0x16aa78={'name':_0x20bb93,'tableName':_0xa50167[_0x5e8be4(0xf5)],'pascalCaseName':startCase(camelCase(_0x24d824))[_0x5e8be4(0xd8)](/ /g,''),'camelCaseName':camelCase(_0x24d824),'snakeCaseName':snakeCase(_0x24d824),'pluralPascalCaseName':startCase(camelCase(plural(_0x24d824)))[_0x5e8be4(0xd8)](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x24d824))},_0x1bd5b4=_0x2b6111+_0x5e8be4(0xee)+_0x1e5c97+'/server/service/';[_0x5e8be4(0x11f),_0x5e8be4(0xeb)][_0x5e8be4(0xe7)](_0xa50167['dataProp'])?await this[_0x5e8be4(0x101)](_0x1bd5b4,_0x20bb93,_0xa50167,_0x1c12cb,_0x16aa78):await this[_0x5e8be4(0xe8)](_0x1bd5b4,_0x20bb93,_0xa50167,_0x1c12cb,_0x16aa78);}async[a0_0x8b2441(0x101)](_0x2c6d7b,_0x5bf426,_0x50fca0,_0x34a9cb,_0x3d0fef){const _0x4aa82d=a0_0x8b2441;await this['writeFile'](_0x2c6d7b+(_0x5bf426+_0x4aa82d(0x13b)),serviceHistoryIndex,_0x3d0fef);let _0x51f24a=this[_0x4aa82d(0x129)](_0x50fca0,_0x34a9cb);await this[_0x4aa82d(0x11c)](_0x2c6d7b+(_0x5bf426+'/'+_0x5bf426+_0x4aa82d(0x147)),_0x51f24a,_0x3d0fef),await this['writeFile'](_0x2c6d7b+(_0x5bf426+'/'+_0x5bf426+_0x4aa82d(0x102)),serviceQuery,_0x3d0fef),await this['writeFile'](_0x2c6d7b+(_0x5bf426+'/'+_0x5bf426+_0x4aa82d(0x130)),serviceMutation,_0x3d0fef);let _0x32ec94=this[_0x4aa82d(0x106)](_0x34a9cb);await this['writeFile'](_0x2c6d7b+(_0x5bf426+'/'+_0x5bf426+_0x4aa82d(0x123)),_0x32ec94,_0x3d0fef);let _0x5769f5=this[_0x4aa82d(0x10a)](_0x50fca0,_0x34a9cb);await this['writeFile'](_0x2c6d7b+(_0x5bf426+'/'+_0x5bf426+_0x4aa82d(0xcd)),_0x5769f5,_0x3d0fef);let _0x14b3b3='';_0x4aa82d(0x11f)==_0x50fca0[_0x4aa82d(0x11d)]?(_0x14b3b3='\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[_0x4aa82d(0x11c)](_0x2c6d7b+(_0x5bf426+_0x4aa82d(0xec)),serviceEntitySubscriber,_0x3d0fef)):_0x14b3b3='';let _0x51d2d6=serviceEntitySubscriber['replace'](/{{entityToJson}}/g,_0x14b3b3);await this[_0x4aa82d(0x11c)](_0x2c6d7b+(_0x5bf426+_0x4aa82d(0xec)),_0x51d2d6,_0x3d0fef),await this[_0x4aa82d(0x11c)](_0x2c6d7b+(_0x5bf426+'/'+_0x5bf426+'-history-query.ts'),serviceHistoryQuery,_0x3d0fef),await this['writeFile'](_0x2c6d7b+(_0x5bf426+'/'+_0x5bf426+'-history-type.ts'),sereviceHistoryType,_0x3d0fef);let _0x33c663=_0x2c6d7b+_0x4aa82d(0xd6);0x0==await this[_0x4aa82d(0xce)](_0x33c663)&&await this[_0x4aa82d(0x11c)](_0x33c663,allIndex,_0x3d0fef);let _0x1307ae=await fs[_0x4aa82d(0x12e)](_0x33c663,_0x4aa82d(0x115));_0x1307ae['indexOf'](_0x4aa82d(0xfa)+_0x3d0fef['name']+'/'+_0x3d0fef[_0x4aa82d(0x116)]+_0x4aa82d(0xc9))<0x0&&(_0x1307ae=_0x1307ae[_0x4aa82d(0xd8)](/\/\* EXPORT ENTITY TYPES \*\//,_0x4aa82d(0xea)+_0x3d0fef[_0x4aa82d(0x116)]+'/'+_0x3d0fef[_0x4aa82d(0x116)]+'-history\x27')),_0x1307ae[_0x4aa82d(0x12f)]('export\x20*\x20from\x20\x27./'+_0x3d0fef[_0x4aa82d(0x116)]+'/'+_0x3d0fef['name']+'\x27')<0x0&&(_0x1307ae=_0x1307ae['replace'](/\/\* EXPORT ENTITY TYPES \*\//,'/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./'+_0x3d0fef['name']+'/'+_0x3d0fef['name']+'\x27')),_0x1307ae[_0x4aa82d(0x12f)](_0x4aa82d(0xc4)+_0x3d0fef[_0x4aa82d(0xcb)]+_0x4aa82d(0x114)+_0x3d0fef['pascalCaseName']+_0x4aa82d(0xf3)+_0x3d0fef[_0x4aa82d(0xcb)]+_0x4aa82d(0xdb)+_0x3d0fef['name']+'\x27')<0x0&&(_0x1307ae=_0x1307ae[_0x4aa82d(0xd8)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x4aa82d(0xc7)+_0x3d0fef[_0x4aa82d(0xcb)]+_0x4aa82d(0x114)+_0x3d0fef[_0x4aa82d(0xcb)]+_0x4aa82d(0xf3)+_0x3d0fef[_0x4aa82d(0xcb)]+_0x4aa82d(0xdb)+_0x3d0fef[_0x4aa82d(0x116)]+'\x27')),_0x1307ae[_0x4aa82d(0x12f)]('...'+_0x3d0fef[_0x4aa82d(0xcb)]+_0x4aa82d(0x141))<0x0&&(_0x1307ae=_0x1307ae['replace'](/\/\* ENTITIES \*\//,'/*\x20ENTITIES\x20*/\x0a\x09...'+_0x3d0fef[_0x4aa82d(0xcb)]+'Entities,')),_0x1307ae['indexOf'](_0x4aa82d(0x120)+_0x3d0fef[_0x4aa82d(0xcb)]+_0x4aa82d(0x139))<0x0&&(_0x1307ae=_0x1307ae['replace'](/\/\* RESOLVER CLASSES \*\//,'/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...'+_0x3d0fef[_0x4aa82d(0xcb)]+_0x4aa82d(0x139))),_0x1307ae[_0x4aa82d(0x12f)](_0x4aa82d(0x120)+_0x3d0fef[_0x4aa82d(0xcb)]+'EntitySubscribers,')<0x0&&(_0x1307ae=_0x1307ae[_0x4aa82d(0xd8)](/\/\* SUBSCRIBERS \*\//,'/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...'+_0x3d0fef['pascalCaseName']+_0x4aa82d(0x117))),await this[_0x4aa82d(0x11c)](_0x33c663,_0x1307ae,_0x3d0fef);}async['createNoHistoryServiceFiels'](_0x3b8d7b,_0x5c32b2,_0x94fab0,_0x41f884,_0x511aae){const _0x47910=a0_0x8b2441;await this[_0x47910(0x11c)](_0x3b8d7b+(_0x5c32b2+_0x47910(0x13b)),serviceIndex,_0x511aae),await this[_0x47910(0x11c)](_0x3b8d7b+(_0x5c32b2+'/'+_0x5c32b2+_0x47910(0x102)),serviceQuery,_0x511aae),await this[_0x47910(0x11c)](_0x3b8d7b+(_0x5c32b2+'/'+_0x5c32b2+_0x47910(0x130)),serviceMutation,_0x511aae);let _0x44c392=this[_0x47910(0x129)](_0x94fab0,_0x41f884);await this[_0x47910(0x11c)](_0x3b8d7b+(_0x5c32b2+'/'+_0x5c32b2+'.ts'),_0x44c392,_0x511aae);let _0x576124=this['createTypeText'](_0x41f884);await this['writeFile'](_0x3b8d7b+(_0x5c32b2+'/'+_0x5c32b2+_0x47910(0x123)),_0x576124,_0x511aae);let _0x2479c1=_0x3b8d7b+_0x47910(0xd6);0x0==await this[_0x47910(0xce)](_0x2479c1)&&await this[_0x47910(0x11c)](_0x2479c1,allIndex,_0x511aae);let _0x436531=await fs[_0x47910(0x12e)](_0x2479c1,_0x47910(0x115));_0x436531[_0x47910(0x12f)](_0x47910(0xfa)+_0x511aae[_0x47910(0x116)]+'/'+_0x511aae['name']+'\x27')<0x0&&(_0x436531=_0x436531['replace'](/\/\* EXPORT ENTITY TYPES \*\//,_0x47910(0xea)+_0x511aae[_0x47910(0x116)]+'/'+_0x511aae[_0x47910(0x116)]+'\x27')),_0x436531['indexOf'](_0x47910(0xc4)+_0x511aae[_0x47910(0xcb)]+'Entities,\x20resolvers\x20as\x20'+_0x511aae['pascalCaseName']+_0x47910(0x13e)+_0x511aae[_0x47910(0x116)]+'\x27')<0x0&&(_0x436531=_0x436531[_0x47910(0xd8)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x47910(0xc7)+_0x511aae['pascalCaseName']+_0x47910(0x114)+_0x511aae[_0x47910(0xcb)]+_0x47910(0x13e)+_0x511aae[_0x47910(0x116)]+'\x27')),_0x436531[_0x47910(0x12f)](_0x47910(0x120)+_0x511aae[_0x47910(0xcb)]+_0x47910(0x141))<0x0&&(_0x436531=_0x436531[_0x47910(0xd8)](/\/\* ENTITIES \*\//,_0x47910(0xca)+_0x511aae[_0x47910(0xcb)]+_0x47910(0x141))),_0x436531[_0x47910(0x12f)](_0x47910(0x120)+_0x511aae[_0x47910(0xcb)]+'Resolvers,')<0x0&&(_0x436531=_0x436531[_0x47910(0xd8)](/\/\* RESOLVER CLASSES \*\//,_0x47910(0x138)+_0x511aae[_0x47910(0xcb)]+_0x47910(0x139))),await this[_0x47910(0x11c)](_0x2479c1,_0x436531,_0x511aae);}[a0_0x8b2441(0x106)](_0x36b1a7){const _0x7c23e9=a0_0x8b2441;let _0x48467a=sereviceType,_0x322c2d=_0x36b1a7[_0x7c23e9(0xc2)](_0xeae5c7=>{const _0x1126ea=_0x7c23e9;if('id'==_0xeae5c7[_0x1126ea(0x116)])return'';if('domain_id'==_0xeae5c7[_0x1126ea(0x116)])return'';if('created_at'==_0xeae5c7[_0x1126ea(0x116)])return'';if('updated_at'==_0xeae5c7['name'])return'';if(_0x1126ea(0xc1)==_0xeae5c7['name'])return'';if(_0x1126ea(0x10e)==_0xeae5c7['name'])return'';let _0x42c4df=this[_0x1126ea(0x100)](_0xeae5c7),_0x248608=this[_0x1126ea(0x143)](_0xeae5c7),_0x18583c=camelCase(_0xeae5c7[_0x1126ea(0x116)]);return'\x20\x20'+(_0x1126ea(0x112)+(0x0==_0x42c4df[_0x1126ea(0x122)]?'':_0x1126ea(0xdc)+_0x42c4df+',')+_0x1126ea(0xc3)+_0xeae5c7[_0x1126ea(0x13c)]+_0x1126ea(0xe4))+'\x0a\x20\x20'+(''+_0x18583c+(_0xeae5c7[_0x1126ea(0x13c)]?'?':'')+':\x20'+_0x248608)+'\x0a';});_0x48467a=_0x48467a[_0x7c23e9(0xd8)](/{{newTypeColumns}}/g,_0x322c2d['join']('\x0a'));let _0x563eeb=_0x36b1a7['map'](_0x31ac96=>{const _0x32ee07=_0x7c23e9;if('id'==_0x31ac96[_0x32ee07(0x116)])return'';if('domain_id'==_0x31ac96[_0x32ee07(0x116)])return'';if('created_at'==_0x31ac96[_0x32ee07(0x116)])return'';if(_0x32ee07(0x128)==_0x31ac96[_0x32ee07(0x116)])return'';if('creator_id'==_0x31ac96['name'])return'';if('updater_id'==_0x31ac96[_0x32ee07(0x116)])return'';let _0x1b52d8=this[_0x32ee07(0x100)](_0x31ac96),_0x25cb8a=this[_0x32ee07(0x143)](_0x31ac96);_0x31ac96['nullable']=!0x0;let _0xe69b24=camelCase(_0x31ac96['name']);return'\x20\x20'+(_0x32ee07(0x112)+(0x0==_0x1b52d8[_0x32ee07(0x122)]?'':_0x32ee07(0xdc)+_0x1b52d8+',')+_0x32ee07(0xc3)+_0x31ac96[_0x32ee07(0x13c)]+_0x32ee07(0xe4))+_0x32ee07(0xe1)+(''+_0xe69b24+(_0x31ac96[_0x32ee07(0x13c)]?'?':'')+':\x20'+_0x25cb8a)+'\x0a';});return _0x48467a=_0x48467a[_0x7c23e9(0xd8)](/{{patchTypeColumns}}/g,_0x563eeb['join']('\x0a')),_0x48467a;}[a0_0x8b2441(0x129)](_0x4d0378,_0x3325be){const _0xf4dfa8=a0_0x8b2441;let _0x4add9c=serviceEntity,_0x3bd124=_0x3325be[_0xf4dfa8(0xe9)](function(_0x21e409,_0x3fb6ff){const _0x1bb9c1=_0xf4dfa8;return _0x21e409[_0x1bb9c1(0x131)]-_0x3fb6ff['rank'];})[_0xf4dfa8(0xc2)](_0x3e9cd4=>this[_0xf4dfa8(0xcf)](_0x3e9cd4));[_0xf4dfa8(0xeb),_0xf4dfa8(0x11f)][_0xf4dfa8(0xe7)](_0x4d0378['dataProp'])&&_0x3bd124[_0xf4dfa8(0x145)]('\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201'),_0x4add9c=_0x4add9c[_0xf4dfa8(0xd8)](/{{entityColumns}}/g,_0x3bd124[_0xf4dfa8(0x13a)]('\x0a'));let _0x26933f='',_0x178ea5=_0x3325be['filter'](_0x26722b=>_0x26722b[_0xf4dfa8(0xd5)]&&_0x26722b[_0xf4dfa8(0xd5)]>0x0)[_0xf4dfa8(0xe9)](function(_0x3fba89,_0x2e54f1){const _0x2c991a=_0xf4dfa8;return _0x3fba89[_0x2c991a(0xd5)]-_0x2e54f1[_0x2c991a(0xd5)];});if(_0x178ea5['length']>0x0){_0x26933f=_0xf4dfa8(0x140);let _0x202897=_0x178ea5[_0xf4dfa8(0xc2)](_0x5925cf=>{const _0xcf9191=_0xf4dfa8;let _0x2771a2=_0x5925cf[_0xcf9191(0x116)];return _0xcf9191(0x126)==_0x5925cf[_0xcf9191(0x116)]&&(_0x2771a2='domain'),_0xcf9191(0xc1)==_0x5925cf[_0xcf9191(0x116)]&&(_0x2771a2='creator'),'updater_id'==_0x5925cf[_0xcf9191(0x116)]&&(_0x2771a2=_0xcf9191(0xf0)),_0xcf9191(0xd4)+camelCase(_0x2771a2);});_0x26933f=_0x26933f['replace'](/{{indexColumns}}/g,_0x202897['join'](','));}return _0x4add9c=_0x4add9c[_0xf4dfa8(0xd8)](/{{indexAnn}}/g,_0x26933f),_0x4add9c;}['createHistoryEntityText'](_0xa81f2f,_0x20427d){const _0x12fcc5=a0_0x8b2441;let _0x219952='JSON'==_0xa81f2f['dataProp']?serviceEntityHistJson:serviceEntityHistCopy,_0xed931e=_0x20427d['sort'](function(_0x15d415,_0xb9546e){const _0xd00bf0=a0_0x59ee;return _0x15d415[_0xd00bf0(0x131)]-_0xb9546e[_0xd00bf0(0x131)];})[_0x12fcc5(0xc2)](_0x10be09=>this['columnToEntityColumn'](_0x10be09));return _0x219952=_0x219952[_0x12fcc5(0xd8)](/{{entityColumns}}/g,_0xed931e[_0x12fcc5(0x13a)]('\x0a')),_0x219952;}[a0_0x8b2441(0xcf)](_0x1f7691){const _0x55beb3=a0_0x8b2441;if('id'==_0x1f7691[_0x55beb3(0x116)])return'';if(_0x55beb3(0x126)==_0x1f7691['name'])return'';if('created_at'==_0x1f7691[_0x55beb3(0x116)])return'';if(_0x55beb3(0x128)==_0x1f7691['name'])return'';if(_0x55beb3(0xc1)==_0x1f7691['name'])return'';if(_0x55beb3(0x10e)==_0x1f7691[_0x55beb3(0x116)])return'';let _0x4c4a76=_0x1f7691[_0x55beb3(0xf8)];'double'==_0x1f7691[_0x55beb3(0xf8)]&&(_0x4c4a76=_0x55beb3(0xd9)),'long'==_0x1f7691[_0x55beb3(0xf8)]&&(_0x4c4a76='bigint'),_0x55beb3(0x113)==_0x1f7691['colType']&&(_0x4c4a76=_0x55beb3(0x14a)),_0x55beb3(0x105)==_0x1f7691['colType']&&(_0x4c4a76='timestamp\x20without\x20time\x20zone');let _0x45401b='';_0x55beb3(0x113)==_0x1f7691[_0x55beb3(0xf8)]&&(_0x45401b=_0x1f7691[_0x55beb3(0xc5)]);let _0x4da454=this[_0x55beb3(0x100)](_0x1f7691),_0x136465=this[_0x55beb3(0x143)](_0x1f7691),_0x955dc8=camelCase(_0x1f7691[_0x55beb3(0x116)]);return'\x20\x20'+(_0x55beb3(0xe2)+_0x1f7691[_0x55beb3(0x116)]+_0x55beb3(0xf6)+_0x4c4a76+_0x55beb3(0x12a)+_0x1f7691[_0x55beb3(0x13c)]+'\x20'+(0x0==_0x45401b[_0x55beb3(0x122)]?'':_0x55beb3(0x137)+_0x45401b)+_0x55beb3(0xe4))+_0x55beb3(0xe1)+(_0x55beb3(0x112)+(0x0==_0x4da454[_0x55beb3(0x122)]?'':_0x55beb3(0xdc)+_0x4da454+',')+_0x55beb3(0xc3)+_0x1f7691[_0x55beb3(0x13c)]+_0x55beb3(0xe4))+_0x55beb3(0xe1)+(''+_0x955dc8+(_0x1f7691[_0x55beb3(0x13c)]?'?':'')+':\x20'+_0x136465)+'\x0a';}['getFieldType'](_0x3371a5){const _0x145616=a0_0x8b2441;let _0x53b333='';return _0x145616(0x134)==_0x3371a5[_0x145616(0xf8)]&&(_0x53b333=_0x145616(0xff)),_0x145616(0x10f)==_0x3371a5[_0x145616(0xf8)]&&(_0x53b333=_0x145616(0xff)),'long'==_0x3371a5[_0x145616(0xf8)]&&(_0x53b333=_0x145616(0xfb)),_0x145616(0xfe)==_0x3371a5[_0x145616(0xf8)]&&(_0x53b333=_0x145616(0xfb)),_0x53b333;}[a0_0x8b2441(0x143)](_0x2eeaaa){const _0x47c211=a0_0x8b2441;let _0x56a783=_0x2eeaaa[_0x47c211(0xf8)];return _0x47c211(0x12d)==_0x2eeaaa[_0x47c211(0xf8)]&&(_0x56a783=_0x47c211(0x121)),_0x47c211(0x134)==_0x2eeaaa[_0x47c211(0xf8)]&&(_0x56a783=_0x47c211(0x121)),_0x47c211(0x10f)==_0x2eeaaa['colType']&&(_0x56a783='number'),'integer'==_0x2eeaaa[_0x47c211(0xf8)]&&(_0x56a783=_0x47c211(0x121)),_0x47c211(0xd2)==_0x2eeaaa[_0x47c211(0xf8)]&&(_0x56a783=_0x47c211(0x121)),_0x47c211(0x105)==_0x2eeaaa[_0x47c211(0xf8)]&&(_0x56a783='Date'),_0x47c211(0x127)==_0x2eeaaa[_0x47c211(0xf8)]&&(_0x56a783=_0x47c211(0xef)),_0x47c211(0xd0)==_0x2eeaaa[_0x47c211(0xf8)]&&(_0x56a783=_0x47c211(0x113)),_0x56a783;}async[a0_0x8b2441(0x11c)](_0xea2d28,_0x20fdb0,_0x5f2314){const _0x17bebe=a0_0x8b2441;await fs['writeFileSync'](_0xea2d28,this[_0x17bebe(0xcc)](_0x20fdb0,_0x5f2314),'utf8');}['replaceNamesMap'](_0x141116,_0x2f352d){const _0x50b31b=a0_0x8b2441;return _0x141116[_0x50b31b(0xd8)](/{{pascalCase name}}/g,_0x2f352d[_0x50b31b(0xcb)])[_0x50b31b(0xd8)](/{{camelCase name}}/g,_0x2f352d[_0x50b31b(0x107)])[_0x50b31b(0xd8)](/{{snakeCase name}}/g,_0x2f352d[_0x50b31b(0x135)])[_0x50b31b(0xd8)](/{{pluralPascalCase name}}/g,_0x2f352d[_0x50b31b(0xfd)])[_0x50b31b(0xd8)](/{{pluralCamelCase name}}/g,_0x2f352d['pluralCamelCaseName'])[_0x50b31b(0xd8)](/{{tableName}}/g,_0x2f352d[_0x50b31b(0xf5)])[_0x50b31b(0xd8)](/{{name}}/g,_0x2f352d[_0x50b31b(0x116)]);}async[a0_0x8b2441(0xd1)](_0x2654f9,_0x1ac9b8,_0xcc1d2b){const _0x52bfe1=a0_0x8b2441;let _0x127d32=_0x2654f9+_0x52bfe1(0x149);await this[_0x52bfe1(0x119)](_0x127d32),_0x127d32=_0x127d32+'/'+_0x1ac9b8,await this['createDir'](_0x127d32),_0x127d32+=_0x52bfe1(0x142),await this[_0x52bfe1(0x119)](_0x127d32),_0x127d32+='/service',await this[_0x52bfe1(0x119)](_0x127d32),_0x127d32=_0x127d32+'/'+_0xcc1d2b,await this[_0x52bfe1(0x119)](_0x127d32);}[a0_0x8b2441(0xda)](){const _0x233075=a0_0x8b2441;let _0x32fbf2=process[_0x233075(0xe6)]['PWD']['split']('/'),_0x49b424=[];for(let _0x182f5d=0x0;_0x182f5d<_0x32fbf2[_0x233075(0x122)]&&'packages'!=_0x32fbf2[_0x182f5d];_0x182f5d++)_0x49b424[_0x233075(0x145)](_0x32fbf2[_0x182f5d]);return _0x49b424['join']('/');}async[a0_0x8b2441(0x119)](_0x260611){const _0x50afc0=a0_0x8b2441;0x0==await this['existsPath'](_0x260611)&&fs[_0x50afc0(0x10b)](_0x260611);}async[a0_0x8b2441(0xce)](_0x2e3205){const _0x47a809=a0_0x8b2441;return await fs[_0x47a809(0x10d)](_0x2e3205);}};function a0_0x59ee(_0xb2aae1,_0x438cd7){const _0x138ad0=a0_0x138a();return a0_0x59ee=function(_0x59ee93,_0xb182b3){_0x59ee93=_0x59ee93-0xc1;let _0x349ae4=_0x138ad0[_0x59ee93];return _0x349ae4;},a0_0x59ee(_0xb2aae1,_0x438cd7);}tslib_1[a0_0x8b2441(0x146)]([(0x0,type_graphql_1[a0_0x8b2441(0x133)])(_0x181a35=>Boolean,{'description':a0_0x8b2441(0xdf)}),tslib_1['__param'](0x0,(0x0,type_graphql_1[a0_0x8b2441(0xde)])('id')),tslib_1['__param'](0x1,(0x0,type_graphql_1[a0_0x8b2441(0x103)])()),tslib_1[a0_0x8b2441(0x109)]('design:type',Function),tslib_1[a0_0x8b2441(0x109)](a0_0x8b2441(0xf4),[String,Object]),tslib_1[a0_0x8b2441(0x109)]('design:returntype',Promise)],OperatoToolCreateService['prototype'],a0_0x8b2441(0x13f),null),OperatoToolCreateService=tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x8b2441(0x125)])()],OperatoToolCreateService),exports[a0_0x8b2441(0x108)]=OperatoToolCreateService;const allIndex=a0_0x8b2441(0x10c),serviceIndex='\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}}]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}Mutation]\x0a',serviceHistoryIndex=a0_0x8b2441(0x11e),serviceQuery=a0_0x8b2441(0x132),serviceHistoryQuery=a0_0x8b2441(0x110),serviceMutation=a0_0x8b2441(0x12b),sereviceType=a0_0x8b2441(0xe3),sereviceHistoryType=a0_0x8b2441(0xc6),serviceEntity=a0_0x8b2441(0xf7),serviceEntityHistCopy=a0_0x8b2441(0xf1),serviceEntityHistJson=a0_0x8b2441(0xc8),serviceEntitySubscriber=a0_0x8b2441(0xf9);
1
+ 'use strict';function a0_0x4a62(){const _0x310545=['6ezqkRw','createEntityText','PWD','length','design:returntype','EntityColumn','{{camelCase\x20name}}.','join','...','\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','includes','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','number','481774rsUvDB','/server','/event-subscriber.ts','/*\x20ENTITIES\x20*/\x0a\x09...','map','Resolver','getFieldType','9NqdJtC','readFileSync','\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','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','existsPath','updated_at','replace','EntitySubscribers,','replaceNamesMap','createTypeText','lodash',',length:','Float','JSON','Entities,','\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','1145230nBEnJf','\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','text','@things-factory/resource-base','dataProp','indexOf','\x0a\x20\x20','COPY','pascalCaseName','split','existsSync','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','updater_id','filter','\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','type\x20=>','sort','4523004Jwfgqy','Int','writeFile','name','@Field(','domain_id','index.ts','bigint','createHistoryServiceFiles','rank','187134xfyYpo','tslib','createServiceFiles','creator_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','getRepository','prototype','utf8','design:paramtypes','__decorate','Resolvers\x20}\x20from\x20\x27./','Query','8465400zbvQio','2143004DZUzqA','createHistoryEntityText','EntitySubscribers\x20}\x20from\x20\x27./','mkdirSync','pluralPascalCaseName','/server/service/','Date','\x20{\x20nullable:\x20','-query.ts','/service','getProjectRootPath','__metadata','colSize','-type.ts','Operato\x20Tool\x20Create\x20Service','createServicePath','getColTxtType','createDir','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','pluralize','nullable','datetime','\x27,\x20type:\x20\x27','Entities,\x20resolvers\x20as\x20','findOne','uniqRank','@things-factory/shell','string','long','domain','export\x20*\x20from\x20\x27./','__esModule','__param','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}}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','defineProperty','/index.ts','\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','writeFileSync','toolCreateService','float','design:type','Resolvers,','OperatoToolCreateService','type-graphql','\x27,\x20nullable:\x20','colType','timestamp\x20without\x20time\x20zone','@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})','\x20})','find','-mutation.ts','\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','6181245NIGmpv','integer','updater','-history\x27','pluralCamelCaseName','\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','Resolvers,\x20subscribers\x20as\x20','columnToEntityColumn','.ts','created_at','double','packages'];a0_0x4a62=function(){return _0x310545;};return a0_0x4a62();}const a0_0x2980a1=a0_0x49a0;(function(_0x475086,_0x51af47){const _0x5f1150=a0_0x49a0,_0x26c292=_0x475086();while(!![]){try{const _0x13e81d=parseInt(_0x5f1150(0x1b3))/0x1+-parseInt(_0x5f1150(0x181))/0x2*(parseInt(_0x5f1150(0x173))/0x3)+-parseInt(_0x5f1150(0x132))/0x4+parseInt(_0x5f1150(0x198))/0x5+-parseInt(_0x5f1150(0x1a9))/0x6+parseInt(_0x5f1150(0x167))/0x7+parseInt(_0x5f1150(0x131))/0x8*(parseInt(_0x5f1150(0x188))/0x9);if(_0x13e81d===_0x51af47)break;else _0x26c292['push'](_0x26c292['shift']());}catch(_0x552079){_0x26c292['push'](_0x26c292['shift']());}}}(a0_0x4a62,0x8f12f));Object[a0_0x2980a1(0x155)](exports,a0_0x2980a1(0x151),{'value':!0x0}),exports[a0_0x2980a1(0x15d)]=void 0x0;function a0_0x49a0(_0xa54df0,_0x515595){const _0x4a6207=a0_0x4a62();return a0_0x49a0=function(_0x49a025,_0x56c4a0){_0x49a025=_0x49a025-0x129;let _0x3ef823=_0x4a6207[_0x49a025];return _0x3ef823;},a0_0x49a0(_0xa54df0,_0x515595);}const tslib_1=require(a0_0x2980a1(0x1b4)),type_graphql_1=require(a0_0x2980a1(0x15e)),shell_1=require(a0_0x2980a1(0x14c)),resource_base_1=require(a0_0x2980a1(0x19b)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x2980a1(0x192)),{plural:plural}=require(a0_0x2980a1(0x145)),fs=require('fs');let OperatoToolCreateService=class{async[a0_0x2980a1(0x159)](_0x342d27,_0x1bd8db){const _0x35d0f7=a0_0x2980a1,{domain:_0x4a1838}=_0x1bd8db['state'],_0x2d27a4=await(0x0,shell_1[_0x35d0f7(0x12a)])(resource_base_1['Entity'])[_0x35d0f7(0x14a)]({'where':{'id':_0x342d27}}),_0x2250c3=await(0x0,shell_1[_0x35d0f7(0x12a)])(resource_base_1[_0x35d0f7(0x178)])[_0x35d0f7(0x164)]({'where':{'domain':{'id':_0x4a1838['id']},'entity':{'id':_0x2d27a4['id']}}});let {name:_0x3b008e='',bundle:_0x5eac5c=''}=_0x2d27a4||{},_0x2408ff=this[_0x35d0f7(0x13c)](),_0x2f101f=kebabCase(_0x3b008e);return await this['createServicePath'](_0x2408ff,_0x5eac5c,_0x2f101f),await this[_0x35d0f7(0x1b5)](_0x2408ff,_0x5eac5c,_0x3b008e,_0x2f101f,_0x2d27a4,_0x2250c3),!0x0;}async[a0_0x2980a1(0x1b5)](_0x4dee9d,_0x5a1d0a,_0x5d4d1c,_0x207a55,_0x42eb97,_0x51c465){const _0x1632f4=a0_0x2980a1;let _0x421ef9={'name':_0x207a55,'tableName':_0x42eb97['tableName'],'pascalCaseName':startCase(camelCase(_0x5d4d1c))[_0x1632f4(0x18e)](/ /g,''),'camelCaseName':camelCase(_0x5d4d1c),'snakeCaseName':snakeCase(_0x5d4d1c),'pluralPascalCaseName':startCase(camelCase(plural(_0x5d4d1c)))['replace'](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x5d4d1c))},_0xb970c5=_0x4dee9d+'/packages/'+_0x5a1d0a+_0x1632f4(0x137);[_0x1632f4(0x195),'COPY'][_0x1632f4(0x17d)](_0x42eb97[_0x1632f4(0x19c)])?await this[_0x1632f4(0x1b1)](_0xb970c5,_0x207a55,_0x42eb97,_0x51c465,_0x421ef9):await this['createNoHistoryServiceFiels'](_0xb970c5,_0x207a55,_0x42eb97,_0x51c465,_0x421ef9);}async[a0_0x2980a1(0x1b1)](_0x1af33f,_0x3337c4,_0x1951db,_0x3712f5,_0x3ba380){const _0x409241=a0_0x2980a1;await this[_0x409241(0x1ab)](_0x1af33f+(_0x3337c4+_0x409241(0x156)),serviceHistoryIndex,_0x3ba380);let _0x169f4d=this[_0x409241(0x174)](_0x1951db,_0x3712f5);await this[_0x409241(0x1ab)](_0x1af33f+(_0x3337c4+'/'+_0x3337c4+_0x409241(0x16f)),_0x169f4d,_0x3ba380),await this[_0x409241(0x1ab)](_0x1af33f+(_0x3337c4+'/'+_0x3337c4+_0x409241(0x13a)),serviceQuery,_0x3ba380),await this[_0x409241(0x1ab)](_0x1af33f+(_0x3337c4+'/'+_0x3337c4+'-mutation.ts'),serviceMutation,_0x3ba380);let _0x2f9d07=this[_0x409241(0x191)](_0x3712f5);await this[_0x409241(0x1ab)](_0x1af33f+(_0x3337c4+'/'+_0x3337c4+_0x409241(0x13f)),_0x2f9d07,_0x3ba380);let _0x4b2bf6=this[_0x409241(0x133)](_0x1951db,_0x3712f5);await this[_0x409241(0x1ab)](_0x1af33f+(_0x3337c4+'/'+_0x3337c4+'-history.ts'),_0x4b2bf6,_0x3ba380);let _0x373f1b='';_0x409241(0x195)==_0x1951db[_0x409241(0x19c)]?(_0x373f1b=_0x409241(0x1a6),await this['writeFile'](_0x1af33f+(_0x3337c4+'/event-subscriber.ts'),serviceEntitySubscriber,_0x3ba380)):_0x373f1b='';let _0x26fdcb=serviceEntitySubscriber[_0x409241(0x18e)](/{{entityToJson}}/g,_0x373f1b);await this[_0x409241(0x1ab)](_0x1af33f+(_0x3337c4+_0x409241(0x183)),_0x26fdcb,_0x3ba380),await this[_0x409241(0x1ab)](_0x1af33f+(_0x3337c4+'/'+_0x3337c4+'-history-query.ts'),serviceHistoryQuery,_0x3ba380),await this['writeFile'](_0x1af33f+(_0x3337c4+'/'+_0x3337c4+'-history-type.ts'),sereviceHistoryType,_0x3ba380);let _0x3260b9=_0x1af33f+_0x409241(0x1af);0x0==await this[_0x409241(0x18c)](_0x3260b9)&&await this[_0x409241(0x1ab)](_0x3260b9,allIndex,_0x3ba380);let _0x50f45f=await fs[_0x409241(0x189)](_0x3260b9,_0x409241(0x12c));_0x50f45f[_0x409241(0x19d)](_0x409241(0x150)+_0x3ba380[_0x409241(0x1ac)]+'/'+_0x3ba380[_0x409241(0x1ac)]+'-history\x27')<0x0&&(_0x50f45f=_0x50f45f['replace'](/\/\* EXPORT ENTITY TYPES \*\//,'/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./'+_0x3ba380[_0x409241(0x1ac)]+'/'+_0x3ba380['name']+_0x409241(0x16a))),_0x50f45f[_0x409241(0x19d)](_0x409241(0x150)+_0x3ba380[_0x409241(0x1ac)]+'/'+_0x3ba380[_0x409241(0x1ac)]+'\x27')<0x0&&(_0x50f45f=_0x50f45f[_0x409241(0x18e)](/\/\* EXPORT ENTITY TYPES \*\//,_0x409241(0x1a3)+_0x3ba380[_0x409241(0x1ac)]+'/'+_0x3ba380['name']+'\x27')),_0x50f45f[_0x409241(0x19d)](_0x409241(0x153)+_0x3ba380['pascalCaseName']+_0x409241(0x149)+_0x3ba380['pascalCaseName']+_0x409241(0x16d)+_0x3ba380['pascalCaseName']+_0x409241(0x134)+_0x3ba380[_0x409241(0x1ac)]+'\x27')<0x0&&(_0x50f45f=_0x50f45f['replace'](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x409241(0x18b)+_0x3ba380[_0x409241(0x1a0)]+_0x409241(0x149)+_0x3ba380[_0x409241(0x1a0)]+_0x409241(0x16d)+_0x3ba380[_0x409241(0x1a0)]+_0x409241(0x134)+_0x3ba380[_0x409241(0x1ac)]+'\x27')),_0x50f45f['indexOf'](_0x409241(0x17b)+_0x3ba380[_0x409241(0x1a0)]+_0x409241(0x196))<0x0&&(_0x50f45f=_0x50f45f[_0x409241(0x18e)](/\/\* ENTITIES \*\//,_0x409241(0x184)+_0x3ba380['pascalCaseName']+_0x409241(0x196))),_0x50f45f['indexOf'](_0x409241(0x17b)+_0x3ba380[_0x409241(0x1a0)]+_0x409241(0x15c))<0x0&&(_0x50f45f=_0x50f45f[_0x409241(0x18e)](/\/\* RESOLVER CLASSES \*\//,'/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...'+_0x3ba380[_0x409241(0x1a0)]+_0x409241(0x15c))),_0x50f45f[_0x409241(0x19d)](_0x409241(0x17b)+_0x3ba380[_0x409241(0x1a0)]+_0x409241(0x18f))<0x0&&(_0x50f45f=_0x50f45f[_0x409241(0x18e)](/\/\* SUBSCRIBERS \*\//,'/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...'+_0x3ba380[_0x409241(0x1a0)]+_0x409241(0x18f))),await this[_0x409241(0x1ab)](_0x3260b9,_0x50f45f,_0x3ba380);}async['createNoHistoryServiceFiels'](_0x5b93c3,_0x997bd7,_0x3805a7,_0x11e6eb,_0x189c51){const _0x3854e0=a0_0x2980a1;await this[_0x3854e0(0x1ab)](_0x5b93c3+(_0x997bd7+_0x3854e0(0x156)),serviceIndex,_0x189c51),await this[_0x3854e0(0x1ab)](_0x5b93c3+(_0x997bd7+'/'+_0x997bd7+'-query.ts'),serviceQuery,_0x189c51),await this[_0x3854e0(0x1ab)](_0x5b93c3+(_0x997bd7+'/'+_0x997bd7+_0x3854e0(0x165)),serviceMutation,_0x189c51);let _0x36f7af=this[_0x3854e0(0x174)](_0x3805a7,_0x11e6eb);await this[_0x3854e0(0x1ab)](_0x5b93c3+(_0x997bd7+'/'+_0x997bd7+_0x3854e0(0x16f)),_0x36f7af,_0x189c51);let _0x2c4e49=this[_0x3854e0(0x191)](_0x11e6eb);await this['writeFile'](_0x5b93c3+(_0x997bd7+'/'+_0x997bd7+_0x3854e0(0x13f)),_0x2c4e49,_0x189c51);let _0x1f43da=_0x5b93c3+_0x3854e0(0x1af);0x0==await this[_0x3854e0(0x18c)](_0x1f43da)&&await this['writeFile'](_0x1f43da,allIndex,_0x189c51);let _0xe0b453=await fs[_0x3854e0(0x189)](_0x1f43da,_0x3854e0(0x12c));_0xe0b453['indexOf'](_0x3854e0(0x150)+_0x189c51['name']+'/'+_0x189c51[_0x3854e0(0x1ac)]+'\x27')<0x0&&(_0xe0b453=_0xe0b453[_0x3854e0(0x18e)](/\/\* EXPORT ENTITY TYPES \*\//,_0x3854e0(0x1a3)+_0x189c51[_0x3854e0(0x1ac)]+'/'+_0x189c51[_0x3854e0(0x1ac)]+'\x27')),_0xe0b453['indexOf'](_0x3854e0(0x153)+_0x189c51[_0x3854e0(0x1a0)]+_0x3854e0(0x149)+_0x189c51['pascalCaseName']+_0x3854e0(0x12f)+_0x189c51['name']+'\x27')<0x0&&(_0xe0b453=_0xe0b453[_0x3854e0(0x18e)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x3854e0(0x18b)+_0x189c51[_0x3854e0(0x1a0)]+_0x3854e0(0x149)+_0x189c51[_0x3854e0(0x1a0)]+_0x3854e0(0x12f)+_0x189c51[_0x3854e0(0x1ac)]+'\x27')),_0xe0b453[_0x3854e0(0x19d)](_0x3854e0(0x17b)+_0x189c51['pascalCaseName']+_0x3854e0(0x196))<0x0&&(_0xe0b453=_0xe0b453[_0x3854e0(0x18e)](/\/\* ENTITIES \*\//,_0x3854e0(0x184)+_0x189c51['pascalCaseName']+_0x3854e0(0x196))),_0xe0b453[_0x3854e0(0x19d)]('...'+_0x189c51[_0x3854e0(0x1a0)]+_0x3854e0(0x15c))<0x0&&(_0xe0b453=_0xe0b453[_0x3854e0(0x18e)](/\/\* RESOLVER CLASSES \*\//,_0x3854e0(0x144)+_0x189c51[_0x3854e0(0x1a0)]+_0x3854e0(0x15c))),await this[_0x3854e0(0x1ab)](_0x1f43da,_0xe0b453,_0x189c51);}['createTypeText'](_0x3873f3){const _0x40dbbd=a0_0x2980a1;let _0x80ce9e=sereviceType,_0x50b8ac=_0x3873f3['map'](_0x23193f=>{const _0x4a4998=a0_0x49a0;if('id'==_0x23193f[_0x4a4998(0x1ac)])return'';if(_0x4a4998(0x1ae)==_0x23193f[_0x4a4998(0x1ac)])return'';if(_0x4a4998(0x170)==_0x23193f[_0x4a4998(0x1ac)])return'';if(_0x4a4998(0x18d)==_0x23193f[_0x4a4998(0x1ac)])return'';if('creator_id'==_0x23193f['name'])return'';if('updater_id'==_0x23193f[_0x4a4998(0x1ac)])return'';let _0x160a43=this[_0x4a4998(0x187)](_0x23193f),_0x3b7cd7=this[_0x4a4998(0x142)](_0x23193f),_0x4ca217=camelCase(_0x23193f[_0x4a4998(0x1ac)]);return'\x20\x20'+(_0x4a4998(0x1ad)+(0x0==_0x160a43[_0x4a4998(0x176)]?'':_0x4a4998(0x1a7)+_0x160a43+',')+'\x20{\x20nullable:\x20'+_0x23193f[_0x4a4998(0x146)]+_0x4a4998(0x163))+_0x4a4998(0x19e)+(''+_0x4ca217+(_0x23193f[_0x4a4998(0x146)]?'?':'')+':\x20'+_0x3b7cd7)+'\x0a';});_0x80ce9e=_0x80ce9e[_0x40dbbd(0x18e)](/{{newTypeColumns}}/g,_0x50b8ac[_0x40dbbd(0x17a)]('\x0a'));let _0x449089=_0x3873f3[_0x40dbbd(0x185)](_0x8ccba6=>{const _0x250198=_0x40dbbd;if('id'==_0x8ccba6['name'])return'';if('domain_id'==_0x8ccba6[_0x250198(0x1ac)])return'';if('created_at'==_0x8ccba6['name'])return'';if('updated_at'==_0x8ccba6['name'])return'';if(_0x250198(0x1b6)==_0x8ccba6[_0x250198(0x1ac)])return'';if(_0x250198(0x1a4)==_0x8ccba6['name'])return'';let _0x1ec07e=this[_0x250198(0x187)](_0x8ccba6),_0x287443=this[_0x250198(0x142)](_0x8ccba6);_0x8ccba6['nullable']=!0x0;let _0x1b2667=camelCase(_0x8ccba6[_0x250198(0x1ac)]);return'\x20\x20'+(_0x250198(0x1ad)+(0x0==_0x1ec07e[_0x250198(0x176)]?'':_0x250198(0x1a7)+_0x1ec07e+',')+_0x250198(0x139)+_0x8ccba6[_0x250198(0x146)]+'\x20})')+_0x250198(0x19e)+(''+_0x1b2667+(_0x8ccba6[_0x250198(0x146)]?'?':'')+':\x20'+_0x287443)+'\x0a';});return _0x80ce9e=_0x80ce9e[_0x40dbbd(0x18e)](/{{patchTypeColumns}}/g,_0x449089[_0x40dbbd(0x17a)]('\x0a')),_0x80ce9e;}[a0_0x2980a1(0x174)](_0x1cb99d,_0x587a1c){const _0x31282f=a0_0x2980a1;let _0x9344e6=serviceEntity,_0x5d562c=_0x587a1c[_0x31282f(0x1a8)](function(_0x5a580f,_0x84882b){const _0x423f89=_0x31282f;return _0x5a580f[_0x423f89(0x1b2)]-_0x84882b[_0x423f89(0x1b2)];})['map'](_0x21bcd0=>this[_0x31282f(0x16e)](_0x21bcd0));[_0x31282f(0x19f),_0x31282f(0x195)]['includes'](_0x1cb99d['dataProp'])&&_0x5d562c['push']('\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201'),_0x9344e6=_0x9344e6[_0x31282f(0x18e)](/{{entityColumns}}/g,_0x5d562c['join']('\x0a'));let _0x4a6884='',_0x1a740b=_0x587a1c[_0x31282f(0x1a5)](_0x2e42e7=>_0x2e42e7[_0x31282f(0x14b)]&&_0x2e42e7[_0x31282f(0x14b)]>0x0)[_0x31282f(0x1a8)](function(_0xc14205,_0x3af87c){const _0x51110c=_0x31282f;return _0xc14205['uniqRank']-_0x3af87c[_0x51110c(0x14b)];});if(_0x1a740b[_0x31282f(0x176)]>0x0){_0x4a6884=_0x31282f(0x162);let _0x2e7b87=_0x1a740b[_0x31282f(0x185)](_0x1f3d9b=>{const _0x2cf36f=_0x31282f;let _0x2809dc=_0x1f3d9b[_0x2cf36f(0x1ac)];return _0x2cf36f(0x1ae)==_0x1f3d9b[_0x2cf36f(0x1ac)]&&(_0x2809dc=_0x2cf36f(0x14f)),_0x2cf36f(0x1b6)==_0x1f3d9b[_0x2cf36f(0x1ac)]&&(_0x2809dc='creator'),_0x2cf36f(0x1a4)==_0x1f3d9b[_0x2cf36f(0x1ac)]&&(_0x2809dc=_0x2cf36f(0x169)),_0x2cf36f(0x179)+camelCase(_0x2809dc);});_0x4a6884=_0x4a6884['replace'](/{{indexColumns}}/g,_0x2e7b87['join'](','));}return _0x9344e6=_0x9344e6[_0x31282f(0x18e)](/{{indexAnn}}/g,_0x4a6884),_0x9344e6;}[a0_0x2980a1(0x133)](_0x5127ae,_0x425c59){const _0x4fac1e=a0_0x2980a1;let _0x220332=_0x4fac1e(0x195)==_0x5127ae[_0x4fac1e(0x19c)]?serviceEntityHistJson:serviceEntityHistCopy,_0x155d0f=_0x425c59[_0x4fac1e(0x1a8)](function(_0x419f42,_0x4e03e2){const _0x3bbc09=_0x4fac1e;return _0x419f42[_0x3bbc09(0x1b2)]-_0x4e03e2['rank'];})[_0x4fac1e(0x185)](_0x377213=>this[_0x4fac1e(0x16e)](_0x377213));return _0x220332=_0x220332[_0x4fac1e(0x18e)](/{{entityColumns}}/g,_0x155d0f[_0x4fac1e(0x17a)]('\x0a')),_0x220332;}[a0_0x2980a1(0x16e)](_0x5bfa33){const _0x42b90a=a0_0x2980a1;if('id'==_0x5bfa33['name'])return'';if(_0x42b90a(0x1ae)==_0x5bfa33[_0x42b90a(0x1ac)])return'';if(_0x42b90a(0x170)==_0x5bfa33[_0x42b90a(0x1ac)])return'';if('updated_at'==_0x5bfa33['name'])return'';if(_0x42b90a(0x1b6)==_0x5bfa33['name'])return'';if('updater_id'==_0x5bfa33['name'])return'';let _0x4f40f7=_0x5bfa33[_0x42b90a(0x160)];_0x42b90a(0x171)==_0x5bfa33[_0x42b90a(0x160)]&&(_0x4f40f7='double\x20precision'),'long'==_0x5bfa33[_0x42b90a(0x160)]&&(_0x4f40f7=_0x42b90a(0x1b0)),_0x42b90a(0x14d)==_0x5bfa33['colType']&&(_0x4f40f7='character\x20varying'),_0x42b90a(0x147)==_0x5bfa33[_0x42b90a(0x160)]&&(_0x4f40f7=_0x42b90a(0x161));let _0x106cfb='';_0x42b90a(0x14d)==_0x5bfa33[_0x42b90a(0x160)]&&(_0x106cfb=_0x5bfa33[_0x42b90a(0x13e)]);let _0x31cde1=this['getFieldType'](_0x5bfa33),_0x2047e7=this[_0x42b90a(0x142)](_0x5bfa33),_0x287559=camelCase(_0x5bfa33[_0x42b90a(0x1ac)]);return'\x20\x20'+('@Column({name:\x27'+_0x5bfa33['name']+_0x42b90a(0x148)+_0x4f40f7+_0x42b90a(0x15f)+_0x5bfa33[_0x42b90a(0x146)]+'\x20'+(0x0==_0x106cfb[_0x42b90a(0x176)]?'':_0x42b90a(0x193)+_0x106cfb)+_0x42b90a(0x163))+_0x42b90a(0x19e)+('@Field('+(0x0==_0x31cde1['length']?'':_0x42b90a(0x1a7)+_0x31cde1+',')+'\x20{\x20nullable:\x20'+_0x5bfa33[_0x42b90a(0x146)]+_0x42b90a(0x163))+_0x42b90a(0x19e)+(''+_0x287559+(_0x5bfa33[_0x42b90a(0x146)]?'?':'')+':\x20'+_0x2047e7)+'\x0a';}['getFieldType'](_0xd251bb){const _0x52ad73=a0_0x2980a1;let _0x449030='';return _0x52ad73(0x171)==_0xd251bb[_0x52ad73(0x160)]&&(_0x449030=_0x52ad73(0x194)),_0x52ad73(0x15a)==_0xd251bb['colType']&&(_0x449030='Float'),_0x52ad73(0x14e)==_0xd251bb['colType']&&(_0x449030='Int'),_0x52ad73(0x168)==_0xd251bb[_0x52ad73(0x160)]&&(_0x449030=_0x52ad73(0x1aa)),_0x449030;}[a0_0x2980a1(0x142)](_0x5e7329){const _0x173d7c=a0_0x2980a1;let _0x57b25f=_0x5e7329[_0x173d7c(0x160)];return'decimal'==_0x5e7329[_0x173d7c(0x160)]&&(_0x57b25f='number'),'double'==_0x5e7329[_0x173d7c(0x160)]&&(_0x57b25f=_0x173d7c(0x180)),'float'==_0x5e7329[_0x173d7c(0x160)]&&(_0x57b25f='number'),_0x173d7c(0x168)==_0x5e7329[_0x173d7c(0x160)]&&(_0x57b25f=_0x173d7c(0x180)),_0x173d7c(0x14e)==_0x5e7329[_0x173d7c(0x160)]&&(_0x57b25f=_0x173d7c(0x180)),'datetime'==_0x5e7329['colType']&&(_0x57b25f=_0x173d7c(0x138)),'date'==_0x5e7329[_0x173d7c(0x160)]&&(_0x57b25f='Date'),_0x173d7c(0x19a)==_0x5e7329[_0x173d7c(0x160)]&&(_0x57b25f=_0x173d7c(0x14d)),_0x57b25f;}async[a0_0x2980a1(0x1ab)](_0x5de671,_0xad11af,_0x52b88e){const _0x20d89d=a0_0x2980a1;await fs[_0x20d89d(0x158)](_0x5de671,this[_0x20d89d(0x190)](_0xad11af,_0x52b88e),'utf8');}['replaceNamesMap'](_0x35111e,_0x2a6398){const _0xc470f5=a0_0x2980a1;return _0x35111e[_0xc470f5(0x18e)](/{{pascalCase name}}/g,_0x2a6398['pascalCaseName'])['replace'](/{{camelCase name}}/g,_0x2a6398['camelCaseName'])[_0xc470f5(0x18e)](/{{snakeCase name}}/g,_0x2a6398['snakeCaseName'])['replace'](/{{pluralPascalCase name}}/g,_0x2a6398[_0xc470f5(0x136)])[_0xc470f5(0x18e)](/{{pluralCamelCase name}}/g,_0x2a6398[_0xc470f5(0x16b)])['replace'](/{{tableName}}/g,_0x2a6398['tableName'])[_0xc470f5(0x18e)](/{{name}}/g,_0x2a6398[_0xc470f5(0x1ac)]);}async[a0_0x2980a1(0x141)](_0x12998c,_0x328276,_0x4f28d2){const _0x1c1b70=a0_0x2980a1;let _0x5cf705=_0x12998c+'/packages';await this[_0x1c1b70(0x143)](_0x5cf705),_0x5cf705=_0x5cf705+'/'+_0x328276,await this['createDir'](_0x5cf705),_0x5cf705+=_0x1c1b70(0x182),await this['createDir'](_0x5cf705),_0x5cf705+=_0x1c1b70(0x13b),await this[_0x1c1b70(0x143)](_0x5cf705),_0x5cf705=_0x5cf705+'/'+_0x4f28d2,await this['createDir'](_0x5cf705);}[a0_0x2980a1(0x13c)](){const _0x28142b=a0_0x2980a1;let _0x4cb3d1=process[_0x28142b(0x17e)][_0x28142b(0x175)][_0x28142b(0x1a1)]('/'),_0x34f7a3=[];for(let _0x7f82eb=0x0;_0x7f82eb<_0x4cb3d1[_0x28142b(0x176)]&&_0x28142b(0x172)!=_0x4cb3d1[_0x7f82eb];_0x7f82eb++)_0x34f7a3['push'](_0x4cb3d1[_0x7f82eb]);return _0x34f7a3[_0x28142b(0x17a)]('/');}async['createDir'](_0x58d885){const _0x83a18e=a0_0x2980a1;0x0==await this[_0x83a18e(0x18c)](_0x58d885)&&fs[_0x83a18e(0x135)](_0x58d885);}async[a0_0x2980a1(0x18c)](_0x43a97c){const _0x31973f=a0_0x2980a1;return await fs[_0x31973f(0x1a2)](_0x43a97c);}};tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x2980a1(0x130)])(_0x57d391=>Boolean,{'description':a0_0x2980a1(0x140)}),tslib_1[a0_0x2980a1(0x152)](0x0,(0x0,type_graphql_1['Arg'])('id')),tslib_1['__param'](0x1,(0x0,type_graphql_1['Ctx'])()),tslib_1[a0_0x2980a1(0x13d)](a0_0x2980a1(0x15b),Function),tslib_1[a0_0x2980a1(0x13d)](a0_0x2980a1(0x12d),[String,Object]),tslib_1[a0_0x2980a1(0x13d)](a0_0x2980a1(0x177),Promise)],OperatoToolCreateService[a0_0x2980a1(0x12b)],a0_0x2980a1(0x159),null),OperatoToolCreateService=tslib_1[a0_0x2980a1(0x12e)]([(0x0,type_graphql_1[a0_0x2980a1(0x186)])()],OperatoToolCreateService),exports['OperatoToolCreateService']=OperatoToolCreateService;const allIndex=a0_0x2980a1(0x197),serviceIndex=a0_0x2980a1(0x17f),serviceHistoryIndex=a0_0x2980a1(0x17c),serviceQuery=a0_0x2980a1(0x18a),serviceHistoryQuery='\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',serviceMutation=a0_0x2980a1(0x166),sereviceType='\x0aimport\x20{\x20ObjectType,\x20Field,\x20InputType,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@InputType()\x0aexport\x20class\x20New{{pascalCase\x20name}}\x20{\x0a{{newTypeColumns}}\x0a}\x0a\x0a@InputType()\x0aexport\x20class\x20{{pascalCase\x20name}}Patch\x20{\x0a\x20\x20@Field(type\x20=>\x20ID,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20id?:\x20string\x0a\x0a{{patchTypeColumns}}\x0a\x0a\x20\x20@Field()\x0a\x20\x20cuFlag:\x20string\x0a}\x0a\x0a@ObjectType()\x0aexport\x20class\x20{{pascalCase\x20name}}List\x20{\x0a\x20\x20@Field(type\x20=>\x20[{{pascalCase\x20name}}])\x0a\x20\x20items:\x20{{pascalCase\x20name}}[]\x0a\x0a\x20\x20@Field(type\x20=>\x20Int)\x0a\x20\x20total:\x20number\x0a}\x0a',sereviceHistoryType=a0_0x2980a1(0x154),serviceEntity=a0_0x2980a1(0x16c),serviceEntityHistCopy=a0_0x2980a1(0x199),serviceEntityHistJson=a0_0x2980a1(0x129),serviceEntitySubscriber=a0_0x2980a1(0x157);
@@ -1 +1 @@
1
- 'use strict';const a0_0x1ce615=a0_0x4719;(function(_0x122d06,_0x502e53){const _0x341f16=a0_0x4719,_0x151563=_0x122d06();while(!![]){try{const _0x223931=parseInt(_0x341f16(0x121))/0x1*(-parseInt(_0x341f16(0x102))/0x2)+parseInt(_0x341f16(0x10b))/0x3*(-parseInt(_0x341f16(0x120))/0x4)+parseInt(_0x341f16(0x11b))/0x5*(-parseInt(_0x341f16(0x115))/0x6)+-parseInt(_0x341f16(0x108))/0x7*(-parseInt(_0x341f16(0x10c))/0x8)+-parseInt(_0x341f16(0x104))/0x9+parseInt(_0x341f16(0x11a))/0xa+parseInt(_0x341f16(0x101))/0xb;if(_0x223931===_0x502e53)break;else _0x151563['push'](_0x151563['shift']());}catch(_0x3a538b){_0x151563['push'](_0x151563['shift']());}}}(a0_0x2b65,0x270e3));function a0_0x2b65(){const _0xe322ef=['andWhere','../../errors/license-error','111736GEFINs','179999IPuueZ','manager','@things-factory/menu-base','menu','createQueryBuilder','5642351MibLBV','2hsjKtb','checkTarget','1274526reMaFI','@things-factory/operato-license-checker','Permissions\x20For\x20Tailor\x20Tool','OVER_LIMIT','35uDjsZf','select','defineProperty','6ebVWsZ','49704PBPrYX','getCount','(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)','INVALID_LICENSE','split','ERROR_CODES','from','@things-factory/shell','id\x20!=\x20:id','18ZyDLyx','LicenseError','map','checkStudioPermission','getRepository','131050hxhfEB','32765lzeWOo','Menu','where'];a0_0x2b65=function(){return _0xe322ef;};return a0_0x2b65();}Object[a0_0x1ce615(0x10a)](exports,'__esModule',{'value':!0x0}),exports['checkStudioTemplateIsOverLimit']=exports[a0_0x1ce615(0x118)]=void 0x0;const operato_license_checker_1=require(a0_0x1ce615(0x105)),shell_1=require(a0_0x1ce615(0x113)),menu_base_1=require(a0_0x1ce615(0x123)),license_error_1=require(a0_0x1ce615(0x11f));function a0_0x4719(_0x21dc53,_0x17caff){const _0x2b651a=a0_0x2b65();return a0_0x4719=function(_0x4719f3,_0x25a7b4){_0x4719f3=_0x4719f3-0x100;let _0x57f95b=_0x2b651a[_0x4719f3];return _0x57f95b;},a0_0x4719(_0x21dc53,_0x17caff);}async function checkStudioPermission(){const _0x259be5=a0_0x1ce615;let _0x114968=((0x0,operato_license_checker_1['getPermission'])(_0x259be5(0x106))||',')[_0x259be5(0x110)](',')[_0x259be5(0x117)](_0x210ce5=>_0x210ce5['trim']()),_0x1be584=!0x1;return _0x114968['forEach'](_0x42a219=>{_0x42a219['includes']('Studio')&&(_0x1be584=!0x0);}),_0x1be584;}async function checkStudioTemplateIsOverLimit(_0x426232,_0x4e53e4){const _0x338845=a0_0x1ce615;if(0x0==await checkStudioPermission())throw new license_error_1[(_0x338845(0x116))]({'errorCode':_0x4e53e4['t'](license_error_1[_0x338845(0x116)]['ERROR_CODES'][_0x338845(0x10f)])});var _0x26592e=0x0;if(_0x26592e=_0x426232&&''!=_0x426232?await(0x0,shell_1['getRepository'])(menu_base_1[_0x338845(0x11c)])[_0x338845(0x122)][_0x338845(0x100)]()['select']('menu')[_0x338845(0x112)](menu_base_1['Menu'],_0x338845(0x124))[_0x338845(0x11d)](_0x338845(0x114),{'id':_0x426232})[_0x338845(0x11e)]('(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)')[_0x338845(0x10d)]()+0x1:await(0x0,shell_1[_0x338845(0x119)])(menu_base_1['Menu'])[_0x338845(0x122)][_0x338845(0x100)]()[_0x338845(0x109)](_0x338845(0x124))[_0x338845(0x112)](menu_base_1['Menu'],_0x338845(0x124))[_0x338845(0x11d)](_0x338845(0x10e))[_0x338845(0x10d)]()+0x1,!(0x0,operato_license_checker_1[_0x338845(0x103)])(_0x26592e))throw new license_error_1[(_0x338845(0x116))]({'errorCode':_0x4e53e4['t'](license_error_1['LicenseError'][_0x338845(0x111)][_0x338845(0x107)])});return!0x0;}exports['checkStudioPermission']=checkStudioPermission,exports['checkStudioTemplateIsOverLimit']=checkStudioTemplateIsOverLimit;
1
+ 'use strict';const a0_0x2a6d33=a0_0xa15c;function a0_0xa15c(_0x23332d,_0x30cf3b){const _0xe4243c=a0_0xe424();return a0_0xa15c=function(_0xa15c2e,_0x4160c1){_0xa15c2e=_0xa15c2e-0x176;let _0x29d105=_0xe4243c[_0xa15c2e];return _0x29d105;},a0_0xa15c(_0x23332d,_0x30cf3b);}function a0_0xe424(){const _0x3e8b3b=['(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)','../../errors/license-error','@things-factory/operato-license-checker','map','576KpvWUv','100248Qzhazr','6SzLori','from','trim','checkTarget','select','@things-factory/menu-base','Studio','getPermission','34659TMgdjX','OVER_LIMIT','andWhere','725682InOCuj','@things-factory/shell','getCount','INVALID_LICENSE','3005mFJUKm','50WmlgnI','__esModule','checkStudioTemplateIsOverLimit','createQueryBuilder','getRepository','id\x20!=\x20:id','LicenseError','checkStudioPermission','Menu','Permissions\x20For\x20Tailor\x20Tool','ERROR_CODES','split','248273QrplNu','192990xLNGin','menu','manager','includes','850087YNrbRf'];a0_0xe424=function(){return _0x3e8b3b;};return a0_0xe424();}(function(_0x557430,_0x5a5ed4){const _0xd3cef8=a0_0xa15c,_0x415550=_0x557430();while(!![]){try{const _0x11a970=-parseInt(_0xd3cef8(0x198))/0x1+parseInt(_0xd3cef8(0x187))/0x2+parseInt(_0xd3cef8(0x199))/0x3+parseInt(_0xd3cef8(0x17a))/0x4*(-parseInt(_0xd3cef8(0x18b))/0x5)+-parseInt(_0xd3cef8(0x17c))/0x6*(-parseInt(_0xd3cef8(0x19d))/0x7)+-parseInt(_0xd3cef8(0x17b))/0x8+-parseInt(_0xd3cef8(0x184))/0x9*(parseInt(_0xd3cef8(0x18c))/0xa);if(_0x11a970===_0x5a5ed4)break;else _0x415550['push'](_0x415550['shift']());}catch(_0x2da1ab){_0x415550['push'](_0x415550['shift']());}}}(a0_0xe424,0x2c6f9));Object['defineProperty'](exports,a0_0x2a6d33(0x18d),{'value':!0x0}),exports[a0_0x2a6d33(0x18e)]=exports['checkStudioPermission']=void 0x0;const operato_license_checker_1=require(a0_0x2a6d33(0x178)),shell_1=require(a0_0x2a6d33(0x188)),menu_base_1=require(a0_0x2a6d33(0x181)),license_error_1=require(a0_0x2a6d33(0x177));async function checkStudioPermission(){const _0x32121a=a0_0x2a6d33;let _0x1ac422=((0x0,operato_license_checker_1[_0x32121a(0x183)])(_0x32121a(0x195))||',')[_0x32121a(0x197)](',')[_0x32121a(0x179)](_0x1b0aa3=>_0x1b0aa3[_0x32121a(0x17e)]()),_0x83155b=!0x1;return _0x1ac422['forEach'](_0x3c4aeb=>{const _0x4b76ec=_0x32121a;_0x3c4aeb[_0x4b76ec(0x19c)](_0x4b76ec(0x182))&&(_0x83155b=!0x0);}),_0x83155b;}async function checkStudioTemplateIsOverLimit(_0xee9386,_0x1a2009){const _0x4e547b=a0_0x2a6d33;if(0x0==await checkStudioPermission())throw new license_error_1[(_0x4e547b(0x192))]({'errorCode':_0x1a2009['t'](license_error_1[_0x4e547b(0x192)][_0x4e547b(0x196)][_0x4e547b(0x18a)])});var _0x1142a4=0x0;if(_0x1142a4=_0xee9386&&''!=_0xee9386?await(0x0,shell_1[_0x4e547b(0x190)])(menu_base_1[_0x4e547b(0x194)])[_0x4e547b(0x19b)][_0x4e547b(0x18f)]()[_0x4e547b(0x180)](_0x4e547b(0x19a))[_0x4e547b(0x17d)](menu_base_1['Menu'],_0x4e547b(0x19a))['where'](_0x4e547b(0x191),{'id':_0xee9386})[_0x4e547b(0x186)](_0x4e547b(0x176))[_0x4e547b(0x189)]()+0x1:await(0x0,shell_1[_0x4e547b(0x190)])(menu_base_1[_0x4e547b(0x194)])['manager'][_0x4e547b(0x18f)]()[_0x4e547b(0x180)](_0x4e547b(0x19a))[_0x4e547b(0x17d)](menu_base_1['Menu'],'menu')['where'](_0x4e547b(0x176))[_0x4e547b(0x189)]()+0x1,!(0x0,operato_license_checker_1[_0x4e547b(0x17f)])(_0x1142a4))throw new license_error_1['LicenseError']({'errorCode':_0x1a2009['t'](license_error_1[_0x4e547b(0x192)][_0x4e547b(0x196)][_0x4e547b(0x185)])});return!0x0;}exports[a0_0x2a6d33(0x193)]=checkStudioPermission,exports[a0_0x2a6d33(0x18e)]=checkStudioTemplateIsOverLimit;
@@ -1 +1 @@
1
- 'use strict';const a0_0x4b1aa9=a0_0x5530;function a0_0x436c(){const _0x3e20a8=['4472742ztDZJw','Ctx','3LTDBZK','type-graphql','design:paramtypes','654638zVLxah','3938260cwrgzE','10854288NWIAHe','__decorate','./tool-permission','checkStudioTemplateIsOverLimit','tslib','checkStudioPermission','design:returntype','studioPermission','2209543gFuSNx','studioTemplateIsOverLimit','1068832OfUAQt','__metadata','Resolver','Arg','__esModule','OperatoToolResolver','__param','866586jjrgfO','Query','defineProperty'];a0_0x436c=function(){return _0x3e20a8;};return a0_0x436c();}(function(_0xa9fac4,_0x1ec738){const _0x31b521=a0_0x5530,_0xce1ab7=_0xa9fac4();while(!![]){try{const _0x287317=parseInt(_0x31b521(0xe3))/0x1+parseInt(_0x31b521(0xeb))/0x2+-parseInt(_0x31b521(0xe8))/0x3*(parseInt(_0x31b521(0xdc))/0x4)+-parseInt(_0x31b521(0xec))/0x5+-parseInt(_0x31b521(0xe6))/0x6+-parseInt(_0x31b521(0xf5))/0x7+parseInt(_0x31b521(0xed))/0x8;if(_0x287317===_0x1ec738)break;else _0xce1ab7['push'](_0xce1ab7['shift']());}catch(_0x6706be){_0xce1ab7['push'](_0xce1ab7['shift']());}}}(a0_0x436c,0x6a225));function a0_0x5530(_0x3abcbb,_0x2bc11d){const _0x436cfb=a0_0x436c();return a0_0x5530=function(_0x5530d8,_0x85814){_0x5530d8=_0x5530d8-0xdb;let _0x293efd=_0x436cfb[_0x5530d8];return _0x293efd;},a0_0x5530(_0x3abcbb,_0x2bc11d);}Object[a0_0x4b1aa9(0xe5)](exports,a0_0x4b1aa9(0xe0),{'value':!0x0}),exports['OperatoToolResolver']=void 0x0;const tslib_1=require(a0_0x4b1aa9(0xf1)),type_graphql_1=require(a0_0x4b1aa9(0xe9)),tool_permission_1=require(a0_0x4b1aa9(0xef));let OperatoToolResolver=class{async[a0_0x4b1aa9(0xf4)](_0x53174d){const _0x4991cf=a0_0x4b1aa9;return(0x0,tool_permission_1[_0x4991cf(0xf2)])();}async[a0_0x4b1aa9(0xdb)](_0x3b6404,_0x5e727d){const _0x2195b4=a0_0x4b1aa9;return(0x0,tool_permission_1[_0x2195b4(0xf0)])(_0x3b6404,_0x5e727d);}};tslib_1[a0_0x4b1aa9(0xee)]([(0x0,type_graphql_1['Query'])(_0x2268cd=>Boolean,{'description':'Operato\x20Tool\x20Studio\x20Usage\x20Permissions'}),tslib_1[a0_0x4b1aa9(0xe2)](0x0,(0x0,type_graphql_1[a0_0x4b1aa9(0xe7)])()),tslib_1[a0_0x4b1aa9(0xdd)]('design:type',Function),tslib_1[a0_0x4b1aa9(0xdd)](a0_0x4b1aa9(0xea),[Object]),tslib_1[a0_0x4b1aa9(0xdd)](a0_0x4b1aa9(0xf3),Promise)],OperatoToolResolver['prototype'],a0_0x4b1aa9(0xf4),null),tslib_1[a0_0x4b1aa9(0xee)]([(0x0,type_graphql_1[a0_0x4b1aa9(0xe4)])(_0x50aaf5=>Boolean,{'description':'Operato\x20Tool\x20Studio\x20Limit\x20check'}),tslib_1[a0_0x4b1aa9(0xe2)](0x0,(0x0,type_graphql_1[a0_0x4b1aa9(0xdf)])('id')),tslib_1['__param'](0x1,(0x0,type_graphql_1[a0_0x4b1aa9(0xe7)])()),tslib_1['__metadata']('design:type',Function),tslib_1[a0_0x4b1aa9(0xdd)]('design:paramtypes',[String,Object]),tslib_1[a0_0x4b1aa9(0xdd)](a0_0x4b1aa9(0xf3),Promise)],OperatoToolResolver['prototype'],'studioTemplateIsOverLimit',null),OperatoToolResolver=tslib_1[a0_0x4b1aa9(0xee)]([(0x0,type_graphql_1[a0_0x4b1aa9(0xde)])()],OperatoToolResolver),exports[a0_0x4b1aa9(0xe1)]=OperatoToolResolver;
1
+ 'use strict';function a0_0x4720(){const _0x5af9c3=['Resolver','__decorate','design:returntype','type-graphql','tslib','__param','Query','Operato\x20Tool\x20Studio\x20Limit\x20check','684283bbHUCp','23877tBlILc','Operato\x20Tool\x20Studio\x20Usage\x20Permissions','__esModule','422710RbufqL','OperatoToolResolver','studioTemplateIsOverLimit','3ABdHbd','6247752kcUKcn','12YKoxSP','design:type','1954690ywJjZQ','3076384yLREWS','studioPermission','design:paramtypes','__metadata','2504BoYqhe','769638cXRmUQ','Ctx','defineProperty','./tool-permission'];a0_0x4720=function(){return _0x5af9c3;};return a0_0x4720();}const a0_0x9d10f5=a0_0x4dc5;(function(_0x3e5802,_0x3da5d3){const _0xed35bd=a0_0x4dc5,_0x5a3837=_0x3e5802();while(!![]){try{const _0x468137=parseInt(_0xed35bd(0xad))/0x1+-parseInt(_0xed35bd(0xa1))/0x2*(parseInt(_0xed35bd(0xb4))/0x3)+-parseInt(_0xed35bd(0xb9))/0x4+parseInt(_0xed35bd(0xb8))/0x5*(-parseInt(_0xed35bd(0xb6))/0x6)+parseInt(_0xed35bd(0xb5))/0x7+-parseInt(_0xed35bd(0xa0))/0x8*(-parseInt(_0xed35bd(0xae))/0x9)+parseInt(_0xed35bd(0xb1))/0xa;if(_0x468137===_0x3da5d3)break;else _0x5a3837['push'](_0x5a3837['shift']());}catch(_0x297e04){_0x5a3837['push'](_0x5a3837['shift']());}}}(a0_0x4720,0x7d698));function a0_0x4dc5(_0x45bab1,_0x4b03ce){const _0x472028=a0_0x4720();return a0_0x4dc5=function(_0x4dc54d,_0x2c6318){_0x4dc54d=_0x4dc54d-0x9e;let _0x59065a=_0x472028[_0x4dc54d];return _0x59065a;},a0_0x4dc5(_0x45bab1,_0x4b03ce);}Object[a0_0x9d10f5(0xa3)](exports,a0_0x9d10f5(0xb0),{'value':!0x0}),exports[a0_0x9d10f5(0xb2)]=void 0x0;const tslib_1=require(a0_0x9d10f5(0xa9)),type_graphql_1=require(a0_0x9d10f5(0xa8)),tool_permission_1=require(a0_0x9d10f5(0xa4));let OperatoToolResolver=class{async[a0_0x9d10f5(0xba)](_0x35dbe7){return(0x0,tool_permission_1['checkStudioPermission'])();}async[a0_0x9d10f5(0xb3)](_0x45c907,_0x29c7bf){return(0x0,tool_permission_1['checkStudioTemplateIsOverLimit'])(_0x45c907,_0x29c7bf);}};tslib_1[a0_0x9d10f5(0xa6)]([(0x0,type_graphql_1[a0_0x9d10f5(0xab)])(_0x1bf5e4=>Boolean,{'description':a0_0x9d10f5(0xaf)}),tslib_1[a0_0x9d10f5(0xaa)](0x0,(0x0,type_graphql_1[a0_0x9d10f5(0xa2)])()),tslib_1[a0_0x9d10f5(0x9f)](a0_0x9d10f5(0xb7),Function),tslib_1['__metadata'](a0_0x9d10f5(0x9e),[Object]),tslib_1[a0_0x9d10f5(0x9f)](a0_0x9d10f5(0xa7),Promise)],OperatoToolResolver['prototype'],a0_0x9d10f5(0xba),null),tslib_1[a0_0x9d10f5(0xa6)]([(0x0,type_graphql_1[a0_0x9d10f5(0xab)])(_0x5b6b91=>Boolean,{'description':a0_0x9d10f5(0xac)}),tslib_1[a0_0x9d10f5(0xaa)](0x0,(0x0,type_graphql_1['Arg'])('id')),tslib_1[a0_0x9d10f5(0xaa)](0x1,(0x0,type_graphql_1[a0_0x9d10f5(0xa2)])()),tslib_1[a0_0x9d10f5(0x9f)](a0_0x9d10f5(0xb7),Function),tslib_1['__metadata'](a0_0x9d10f5(0x9e),[String,Object]),tslib_1[a0_0x9d10f5(0x9f)](a0_0x9d10f5(0xa7),Promise)],OperatoToolResolver['prototype'],a0_0x9d10f5(0xb3),null),OperatoToolResolver=tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x9d10f5(0xa5)])()],OperatoToolResolver),exports[a0_0x9d10f5(0xb2)]=OperatoToolResolver;