@things-factory/operato-tools 6.1.14 → 6.1.16

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_0x519e0b=a0_0x4685;(function(_0x2071b4,_0xa38e90){const _0x3d24ad=a0_0x4685,_0x219418=_0x2071b4();while(!![]){try{const _0x5e84a9=parseInt(_0x3d24ad(0xfb))/0x1+parseInt(_0x3d24ad(0x101))/0x2+-parseInt(_0x3d24ad(0x102))/0x3+parseInt(_0x3d24ad(0x10f))/0x4*(parseInt(_0x3d24ad(0x10a))/0x5)+-parseInt(_0x3d24ad(0x107))/0x6*(parseInt(_0x3d24ad(0x103))/0x7)+parseInt(_0x3d24ad(0x106))/0x8*(parseInt(_0x3d24ad(0x105))/0x9)+-parseInt(_0x3d24ad(0x10d))/0xa;if(_0x5e84a9===_0xa38e90)break;else _0x219418['push'](_0x219418['shift']());}catch(_0x4dd68c){_0x219418['push'](_0x219418['shift']());}}}(a0_0x1210,0xadc58));function a0_0x1210(){const _0x2b3214=['name','432620LmKQNp','744763sZXLmZ','../constants/error-code','defineProperty','errorCode','__importStar','tslib','2316576eQhiaE','3339936RmiCAF','34727NmLfJR','LicenseError','9FyAmuT','2487208CYnBqd','36khAjAY','assign','__esModule','60cetWNp','detail','license-error','16569660cTtwNI'];a0_0x1210=function(){return _0x2b3214;};return a0_0x1210();}function a0_0x4685(_0xe537fe,_0xd8d635){const _0x1210d4=a0_0x1210();return a0_0x4685=function(_0x4685c2,_0x33823a){_0x4685c2=_0x4685c2-0xfb;let _0x5b6207=_0x1210d4[_0x4685c2];return _0x5b6207;},a0_0x4685(_0xe537fe,_0xd8d635);}Object[a0_0x519e0b(0xfd)](exports,a0_0x519e0b(0x109),{'value':!0x0}),exports[a0_0x519e0b(0x104)]=void 0x0;const tslib_1=require(a0_0x519e0b(0x100)),ERROR_CODES=tslib_1[a0_0x519e0b(0xff)](require(a0_0x519e0b(0xfc)));class LicenseError extends Error{static get['ERROR_CODES'](){const _0x5210ae=a0_0x519e0b;return Object[_0x5210ae(0x108)]({},ERROR_CODES);}constructor({errorCode:_0x50cf9b,detail:_0x4571dd}){const _0x4b1ba8=a0_0x519e0b;super(_0x50cf9b),this[_0x4b1ba8(0x10e)]=_0x4b1ba8(0x10c),this[_0x4b1ba8(0xfe)]=_0x50cf9b,this[_0x4b1ba8(0x10b)]=_0x4571dd;}}exports[a0_0x519e0b(0x104)]=LicenseError;
1
+ 'use strict';const a0_0x15e56b=a0_0x233d;(function(_0x4ad889,_0x4e1085){const _0x132896=a0_0x233d,_0x260930=_0x4ad889();while(!![]){try{const _0x1fa521=parseInt(_0x132896(0x143))/0x1*(-parseInt(_0x132896(0x140))/0x2)+-parseInt(_0x132896(0x147))/0x3*(parseInt(_0x132896(0x13e))/0x4)+parseInt(_0x132896(0x149))/0x5*(-parseInt(_0x132896(0x13f))/0x6)+-parseInt(_0x132896(0x13c))/0x7*(parseInt(_0x132896(0x13d))/0x8)+parseInt(_0x132896(0x142))/0x9+-parseInt(_0x132896(0x13b))/0xa+parseInt(_0x132896(0x145))/0xb;if(_0x1fa521===_0x4e1085)break;else _0x260930['push'](_0x260930['shift']());}catch(_0x35cf51){_0x260930['push'](_0x260930['shift']());}}}(a0_0x192b,0xe51d9));function a0_0x233d(_0x8ddf71,_0x58c255){const _0x192b1a=a0_0x192b();return a0_0x233d=function(_0x233de7,_0x24937c){_0x233de7=_0x233de7-0x137;let _0x2dd38a=_0x192b1a[_0x233de7];return _0x2dd38a;},a0_0x233d(_0x8ddf71,_0x58c255);}function a0_0x192b(){const _0x4bc011=['errorCode','license-error','2954190Elutul','55097vjtyAH','1752wfEtTB','1296672LKYUIt','7044186zFZChl','25324oYLzac','detail','12538053Qolpyl','44qkCuWU','ERROR_CODES','39818185KuogXg','tslib','3SgSxKu','__esModule','5ivwJzO','__importStar','defineProperty','../constants/error-code','LicenseError'];a0_0x192b=function(){return _0x4bc011;};return a0_0x192b();}Object[a0_0x15e56b(0x14b)](exports,a0_0x15e56b(0x148),{'value':!0x0}),exports[a0_0x15e56b(0x138)]=void 0x0;const tslib_1=require(a0_0x15e56b(0x146)),ERROR_CODES=tslib_1[a0_0x15e56b(0x14a)](require(a0_0x15e56b(0x137)));class LicenseError extends Error{static get[a0_0x15e56b(0x144)](){return Object['assign']({},ERROR_CODES);}constructor({errorCode:_0x4aff7d,detail:_0x1dccf1}){const _0x36efac=a0_0x15e56b;super(_0x4aff7d),this['name']=_0x36efac(0x13a),this[_0x36efac(0x139)]=_0x4aff7d,this[_0x36efac(0x141)]=_0x1dccf1;}}exports[a0_0x15e56b(0x138)]=LicenseError;
package/server/routes.js CHANGED
@@ -1 +1 @@
1
- const a0_0x591813=a0_0x5b46;function a0_0x4f79(){const _0x35ad35=['242MvJjrx','bootstrap-module-domain-private-route','909820ddBHxU','1146271BBaSeI','5kJXKPA','287526NkyOTE','bootstrap-module-global-private-route','9ofNWIN','debug','281864VPDlmn','11CsSnRY','447MtYYTB','425400NPEwhf','bootstrap-module-domain-public-route','877692bMzjJI'];a0_0x4f79=function(){return _0x35ad35;};return a0_0x4f79();}(function(_0x36aaad,_0xb61c9){const _0x26d694=a0_0x5b46,_0x323f47=_0x36aaad();while(!![]){try{const _0x3f91ba=-parseInt(_0x26d694(0x164))/0x1*(parseInt(_0x26d694(0x168))/0x2)+parseInt(_0x26d694(0x165))/0x3+-parseInt(_0x26d694(0x167))/0x4+-parseInt(_0x26d694(0x16c))/0x5*(-parseInt(_0x26d694(0x16d))/0x6)+parseInt(_0x26d694(0x16b))/0x7+-parseInt(_0x26d694(0x162))/0x8*(parseInt(_0x26d694(0x16f))/0x9)+-parseInt(_0x26d694(0x16a))/0xa*(-parseInt(_0x26d694(0x163))/0xb);if(_0x3f91ba===_0xb61c9)break;else _0x323f47['push'](_0x323f47['shift']());}catch(_0x49b9c9){_0x323f47['push'](_0x323f47['shift']());}}}(a0_0x4f79,0x21221));function a0_0x5b46(_0xee6e04,_0x51cea7){const _0x4f79f9=a0_0x4f79();return a0_0x5b46=function(_0x5b4630,_0x2e87f0){_0x5b4630=_0x5b4630-0x161;let _0x2e0a77=_0x4f79f9[_0x5b4630];return _0x2e0a77;},a0_0x5b46(_0xee6e04,_0x51cea7);}const debug=require(a0_0x591813(0x161))('things-factory:operato-tools:routes');process['on']('bootstrap-module-global-public-route',(_0x39ce52,_0x1f62cb)=>{}),process['on'](a0_0x591813(0x16e),(_0x2217a5,_0x12fee0)=>{}),process['on'](a0_0x591813(0x166),(_0x5088de,_0x538ba5)=>{}),process['on'](a0_0x591813(0x169),(_0x1c6c2a,_0x585d98)=>{});
1
+ function a0_0x43c6(){const _0x3955af=['6fESAds','bootstrap-module-global-private-route','7064BmLNRL','651822AHpnZz','debug','392925VWKCBF','581QfDZht','bootstrap-module-global-public-route','414824bQlkwU','bootstrap-module-domain-private-route','2739036aRqlRo','3417355IolWIT','780cBdecn','things-factory:operato-tools:routes','8289JrIvYb'];a0_0x43c6=function(){return _0x3955af;};return a0_0x43c6();}const a0_0x40428c=a0_0x16ee;(function(_0x353ba9,_0x17f384){const _0x247537=a0_0x16ee,_0x2d4b9f=_0x353ba9();while(!![]){try{const _0x21a86d=-parseInt(_0x247537(0xf4))/0x1+-parseInt(_0x247537(0xf2))/0x2+parseInt(_0x247537(0xef))/0x3*(parseInt(_0x247537(0xf7))/0x4)+parseInt(_0x247537(0xeb))/0x5+parseInt(_0x247537(0xf9))/0x6+parseInt(_0x247537(0xf5))/0x7*(-parseInt(_0x247537(0xf1))/0x8)+parseInt(_0x247537(0xee))/0x9*(-parseInt(_0x247537(0xec))/0xa);if(_0x21a86d===_0x17f384)break;else _0x2d4b9f['push'](_0x2d4b9f['shift']());}catch(_0xbd62dc){_0x2d4b9f['push'](_0x2d4b9f['shift']());}}}(a0_0x43c6,0x76062));const debug=require(a0_0x40428c(0xf3))(a0_0x40428c(0xed));function a0_0x16ee(_0x3c39d8,_0x4f70df){const _0x43c628=a0_0x43c6();return a0_0x16ee=function(_0x16ee44,_0x42484a){_0x16ee44=_0x16ee44-0xeb;let _0x3d8e6b=_0x43c628[_0x16ee44];return _0x3d8e6b;},a0_0x16ee(_0x3c39d8,_0x4f70df);}process['on'](a0_0x40428c(0xf6),(_0x2e2555,_0x54561a)=>{}),process['on'](a0_0x40428c(0xf0),(_0x4cf077,_0xfcaa15)=>{}),process['on']('bootstrap-module-domain-public-route',(_0xa3373b,_0x90089e)=>{}),process['on'](a0_0x40428c(0xf8),(_0x461525,_0x5d6570)=>{});
@@ -1 +1 @@
1
- 'use strict';const a0_0x545eda=a0_0x7d25;(function(_0x49ce67,_0x4cdf98){const _0x11773b=a0_0x7d25,_0x425097=_0x49ce67();while(!![]){try{const _0x4293bb=parseInt(_0x11773b(0x108))/0x1*(parseInt(_0x11773b(0x15c))/0x2)+parseInt(_0x11773b(0x179))/0x3+parseInt(_0x11773b(0x169))/0x4*(-parseInt(_0x11773b(0x165))/0x5)+parseInt(_0x11773b(0x153))/0x6*(parseInt(_0x11773b(0x17e))/0x7)+parseInt(_0x11773b(0x154))/0x8*(-parseInt(_0x11773b(0x13d))/0x9)+-parseInt(_0x11773b(0x129))/0xa*(parseInt(_0x11773b(0x170))/0xb)+-parseInt(_0x11773b(0x114))/0xc*(-parseInt(_0x11773b(0x180))/0xd);if(_0x4293bb===_0x4cdf98)break;else _0x425097['push'](_0x425097['shift']());}catch(_0x26b7fc){_0x425097['push'](_0x425097['shift']());}}}(a0_0x33e6,0xcf37e));Object[a0_0x545eda(0x11c)](exports,'__esModule',{'value':!0x0}),exports[a0_0x545eda(0x141)]=void 0x0;const tslib_1=require(a0_0x545eda(0x121)),type_graphql_1=require(a0_0x545eda(0x15e)),resource_base_1=require(a0_0x545eda(0x135)),menu_base_1=require(a0_0x545eda(0x13f)),tool_permission_1=require(a0_0x545eda(0x12e)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x545eda(0x13a)),{plural:plural}=require(a0_0x545eda(0x11b)),crypto_1=tslib_1['__importDefault'](require('crypto'));let OperatoToolCreateMenu=class{async[a0_0x545eda(0x155)](_0x4fb21e,_0x111090,_0xcedfc7){const _0x786f48=a0_0x545eda,{domain:_0x450e8b,user:_0x5cd67e,tx:_0x5495b2}=_0xcedfc7[_0x786f48(0x167)];await(0x0,tool_permission_1[_0x786f48(0x173)])('',_0xcedfc7);const _0x5d5b0b=await _0x5495b2[_0x786f48(0x13c)](resource_base_1[_0x786f48(0x12b)])[_0x786f48(0x13b)]({'where':{'domain':{'id':_0x450e8b['id']},'id':_0x4fb21e}}),_0x103f44=await _0x5495b2[_0x786f48(0x13c)](resource_base_1[_0x786f48(0x116)])[_0x786f48(0x12c)]({'where':{'domain':{'id':_0x450e8b['id']},'entity':{'id':_0x5d5b0b['id']}}});let {name:_0xb51a23=''}=_0x5d5b0b||{},_0x2033e8=kebabCase(_0xb51a23),_0x1b6cbb=modelTemplate['replace'](/{{pascalCase name}}/g,startCase(camelCase(_0xb51a23))[_0x786f48(0x164)](/ /g,''))[_0x786f48(0x164)](/{{camelCase name}}/g,camelCase(_0xb51a23))[_0x786f48(0x164)](/{{snakeCase name}}/g,snakeCase(_0xb51a23))['replace'](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0xb51a23)))[_0x786f48(0x164)](/ /g,''))[_0x786f48(0x164)](/{{pluralCamelCase name}}/g,camelCase(plural(_0xb51a23)))['replace'](/{{name}}/g,_0xb51a23),_0x43e8d1='';_0x786f48(0x163)==_0x5d5b0b[_0x786f48(0x123)]?_0x43e8d1=_0x786f48(0x119):'COPY'==_0x5d5b0b[_0x786f48(0x123)]&&(_0x43e8d1=_0x786f48(0x161)),_0x1b6cbb=_0x1b6cbb[_0x786f48(0x164)](/{{HistoryButton}}/g,_0x43e8d1);let _0x5ce0e4=this[_0x786f48(0x177)](_0x103f44);_0x1b6cbb=_0x1b6cbb[_0x786f48(0x164)](/{{SortColumns}}/g,_0x5ce0e4[_0x786f48(0x103)](','));let _0x2ec14d=this[_0x786f48(0x17f)](_0x103f44);_0x1b6cbb=_0x1b6cbb['replace'](/{{SearchColumns}}/g,_0x2ec14d['join'](','));let _0x20bb4b=this[_0x786f48(0x120)](_0x103f44);return _0x1b6cbb=_0x1b6cbb['replace'](/{{GridColumns}}/g,_0x20bb4b[_0x786f48(0x103)](',')),_0x1b6cbb=this[_0x786f48(0x175)](_0x1b6cbb),await this['createMenuData'](_0x5495b2,_0x450e8b,_0x5cd67e,_0x111090,_0x2033e8,_0x1b6cbb),!0x0;}[a0_0x545eda(0x120)](_0x485e30){const _0x48db71=a0_0x545eda;return _0x485e30['filter'](_0x1bd321=>'id'!=_0x1bd321['name']&&_0x1bd321[_0x48db71(0x118)]>0x0)[_0x48db71(0x160)](function(_0x461434,_0x4a30d2){const _0x4a8d88=_0x48db71;return _0x461434[_0x4a8d88(0x118)]-_0x4a30d2[_0x4a8d88(0x118)];})[_0x48db71(0x112)](_0xd3e5ce=>{const _0x238c8b=_0x48db71;let {gridEditor:_0x3272a2=_0x238c8b(0x15a),name:_0x47e883,term:_0x3c5f82,gridWidth:_0x7004ef=0x0,gridAlign:_0x471dfa=_0x238c8b(0x16e),nullable:_0x2fc274=!0x1}=_0xd3e5ce;if(null==_0x3272a2&&(_0x3272a2='string'),null==_0x471dfa&&(_0x471dfa='left'),_0x238c8b(0x10d)==_0x47e883||_0x238c8b(0x140)==_0x47e883)return _0x47e883=_0x238c8b(0x10d)==_0x47e883?_0x238c8b(0x178):_0x238c8b(0x15b),'{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22'+_0x47e883+_0x238c8b(0x168)+_0x47e883+_0x238c8b(0x138);if(_0x238c8b(0x107)==_0x47e883||_0x238c8b(0x176)==_0x47e883)return'{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22'+(_0x238c8b(0x107)==_0x47e883?_0x238c8b(0x17b):_0x238c8b(0x128))+_0x238c8b(0x168)+_0x47e883+'\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}';let _0x41264e=_0x238c8b(0x183)!=_0x3272a2&&_0x238c8b(0x132)!=_0x3272a2,_0x3e93f6=_0x238c8b(0x132)==_0x3272a2;0x1!=_0x3e93f6&&0x0!=_0x41264e||(_0x3272a2='string');let _0x2dda3a=_0x238c8b(0x10e)+_0x3272a2+_0x238c8b(0x11d)+camelCase(_0x47e883)+_0x238c8b(0x168)+_0x3c5f82+'\x22,\x22hidden\x22:'+_0x3e93f6+_0x238c8b(0x158)+_0x41264e+_0x238c8b(0x171)+!_0x2fc274+_0x238c8b(0x144)+_0x471dfa+_0x238c8b(0x150)+_0x7004ef+_0x238c8b(0x12f);return _0x238c8b(0x126)==_0xd3e5ce[_0x238c8b(0x16f)]&&(_0x2dda3a+=_0x238c8b(0x133)+_0xd3e5ce[_0x238c8b(0x162)]+'\x22}'),'scenario'==_0xd3e5ce[_0x238c8b(0x16f)]&&(_0x2dda3a+=_0x238c8b(0x125)+_0xd3e5ce[_0x238c8b(0x162)]+'\x22}'),_0x238c8b(0x151)==_0xd3e5ce[_0x238c8b(0x16f)]&&(_0x2dda3a+=',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22'+camelCase(plural(_0xd3e5ce['refName']))+'\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}'),_0x2dda3a+='}',_0x2dda3a;});}['createSearchCols'](_0x48f08c){const _0x43c4b6=a0_0x545eda;return _0x48f08c['filter'](_0x1c4d77=>_0x1c4d77[_0x43c4b6(0x145)]>0x0)['sort'](function(_0x351c56,_0x4f89bf){const _0xb889d4=_0x43c4b6;return _0x351c56[_0xb889d4(0x145)]-_0x4f89bf['searchRank'];})[_0x43c4b6(0x112)](_0x50299c=>{const _0x3d5b21=_0x43c4b6;let _0x1d7f97=_0x50299c[_0x3d5b21(0x157)];return _0x3d5b21(0x152)==_0x1d7f97?'\x22'+camelCase(_0x50299c[_0x3d5b21(0x166)])+'\x22':(_0x1d7f97||(_0x1d7f97='eq'),_0x3d5b21(0x10f)+camelCase(_0x50299c[_0x3d5b21(0x166)])+_0x3d5b21(0x17a)+_0x1d7f97+'\x22}');});}['createSortCols'](_0x3b7c1b){const _0x143a44=a0_0x545eda;return _0x3b7c1b[_0x143a44(0x152)](_0x197977=>_0x197977['sortRank']>0x0)[_0x143a44(0x160)](function(_0x45a8f6,_0x4f66ed){const _0x6660d1=_0x143a44;return _0x45a8f6[_0x6660d1(0x134)]-_0x4f66ed[_0x6660d1(0x134)];})['map'](_0x4ec6fa=>_0x143a44(0x111)+camelCase(_0x4ec6fa['name'])+_0x143a44(0x146)+_0x4ec6fa[_0x143a44(0x147)]+'}');}async[a0_0x545eda(0x17d)](_0x392573,_0x914f00,_0x57a583,_0x25bf39,_0x793cbc,_0x51b69b){const _0x19dcfe=a0_0x545eda;let _0xe63832=await _0x392573['getRepository'](menu_base_1[_0x19dcfe(0x17c)])[_0x19dcfe(0x13b)]({'where':{'domain':{'id':_0x914f00['id']},'id':_0x25bf39}}),_0x2ebed7=(await _0x392573['getRepository'](menu_base_1[_0x19dcfe(0x17c)])[_0x19dcfe(0x113)](_0x19dcfe(0x16d)+_0x25bf39+_0x19dcfe(0x12d)+_0x25bf39+'\x27'))[0x0][_0x19dcfe(0x124)]+0xa,_0x45b17d=new menu_base_1[(_0x19dcfe(0x17c))]();_0x45b17d['name']=_0x793cbc,_0x45b17d['menuType']='SCREEN',_0x45b17d[_0x19dcfe(0x174)]=_0x19dcfe(0x11f),_0x45b17d[_0x19dcfe(0x124)]=_0x2ebed7,_0x45b17d['hiddenFlag']=!0x1,_0x45b17d[_0x19dcfe(0x14e)]=_0x793cbc,_0x45b17d[_0x19dcfe(0x149)]=_0x51b69b,_0x45b17d[_0x19dcfe(0x16c)]=_0x19dcfe(0x131),_0x45b17d[_0x19dcfe(0x139)]=_0xe63832,await _0x392573[_0x19dcfe(0x13c)](menu_base_1[_0x19dcfe(0x17c)])[_0x19dcfe(0x13e)](Object['assign'](Object[_0x19dcfe(0x143)]({},_0x45b17d),{'domain':_0x914f00,'creator':_0x57a583,'updater':_0x57a583}));}[a0_0x545eda(0x175)](_0x4a7e6b){const _0x39e04a=a0_0x545eda;let _0x5a4df0=JSON[_0x39e04a(0x117)](_0x4a7e6b)[_0x39e04a(0x185)](/(.{100})/)[_0x39e04a(0x152)](_0x1dd3f6=>_0x1dd3f6),_0x3de9a2=[_0x39e04a(0x122),'aes-256-cbc',_0x39e04a(0x130),_0x39e04a(0x182),_0x39e04a(0x14d),_0x39e04a(0x172),_0x39e04a(0x11a),'aes256'],_0x2964d2=crypto_1['default'][_0x39e04a(0x16a)](0x20)[_0x39e04a(0x127)]('hex'),_0x22e722=Buffer[_0x39e04a(0x104)](_0x2964d2,_0x39e04a(0x15d)),_0x4d79c7=_0x2964d2['substring'](0x0,0x10),_0x1fc169=['',_0x4d79c7,_0x4d79c7,_0x4d79c7,_0x4d79c7,_0x4d79c7,_0x4d79c7,_0x4d79c7],_0x142f61=0x0,_0x3e061a=[];_0x3e061a[_0x39e04a(0x142)](_0x2964d2);for(var _0x3282a1=0x0;_0x3282a1<_0x5a4df0[_0x39e04a(0x10c)];_0x3282a1++,_0x142f61++){_0x142f61==_0x3de9a2[_0x39e04a(0x10c)]&&(_0x142f61=0x0);let _0x383029=crypto_1[_0x39e04a(0x136)][_0x39e04a(0x115)](_0x3de9a2[_0x142f61],_0x22e722,_0x1fc169[_0x142f61]),_0x52772a=_0x383029[_0x39e04a(0x12a)](_0x5a4df0[_0x3282a1],_0x39e04a(0x14c),_0x39e04a(0x15d));_0x52772a+=_0x383029[_0x39e04a(0x15f)](_0x39e04a(0x15d)),_0x3e061a[_0x39e04a(0x142)](_0x52772a);}return _0x3e061a[_0x39e04a(0x103)](_0x39e04a(0x105));}};function a0_0x33e6(){const _0x28bd9a=['state','\x22,\x22header\x22:\x20\x22','3368ypiQaU','randomBytes','__decorate','resourceUrl','select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27','left','refType','335995VswiSC',',\x22mandatory\x22:\x20','aes-256-ofb','checkStudioTemplateIsOverLimit','category','enc','created_at','createSortCols','updater','669675WlPzAZ','\x22,\x22operator\x22:\x20\x22','updatedAt','Menu','createMenuData','21MyfPPw','createSearchCols','1317758SBqqlk','@transaction','aes-256-cfb8','readonly','parent_menu_id','split','join','from','h1z0q9i9x7q6','design:paramtypes','updated_at','828903rACmaY','Resolver','__param','design:type','length','updater_id','{\x22type\x22:\x20\x22','{\x22name\x22:\x20\x22','Ctx','{\x22name\x22:\x22','map','query','84kgtJQM','createCipheriv','EntityColumn','stringify','gridRank','\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','aes-256-ctr','pluralize','defineProperty','\x22,\x22name\x22:\x20\x22','Arg','meta-grist-page','createGridColumns','tslib','aes-256-ecb','dataProp','rank',',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22','code','toString','createdAt','60YncCNH','update','Entity','find','\x27\x20or\x20id\x20=\x20\x27','./../tool-secret/tool-permission','\x20,\x22exportable\x22:\x20true','aes-256-cfb','@things-factory/meta-ui/client/pages/meta-grist-page','hidden',',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22','sortRank','@things-factory/resource-base','default','__metadata','\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}','parent','lodash','findOne','getRepository','9ICAbXk','save','@things-factory/menu-base','creator_id','OperatoToolCreateMenu','push','assign',',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22','searchRank','\x22,\x22desc\x22:','reverseSort','\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','template','prototype','Directive','utf8','aes-256-cfb1','routing','Operato\x20Tool\x20Create\x20Menu','\x22,\x22width\x22:','entity','filter','780906EnQcMW','5003088QdsBYC','toolCreateMenu','Mutation','searchOper','\x20,\x22editable\x22:\x20','design:returntype','string','creator','4fDOHwW','hex','type-graphql','final','sort','\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','refName','JSON','replace','7860bBqqpq','name'];a0_0x33e6=function(){return _0x28bd9a;};return a0_0x33e6();}tslib_1[a0_0x545eda(0x16b)]([(0x0,type_graphql_1[a0_0x545eda(0x14b)])(a0_0x545eda(0x181)),(0x0,type_graphql_1[a0_0x545eda(0x156)])(_0x144c97=>Boolean,{'description':a0_0x545eda(0x14f)}),tslib_1[a0_0x545eda(0x10a)](0x0,(0x0,type_graphql_1[a0_0x545eda(0x11e)])('id')),tslib_1[a0_0x545eda(0x10a)](0x1,(0x0,type_graphql_1['Arg'])(a0_0x545eda(0x184))),tslib_1['__param'](0x2,(0x0,type_graphql_1[a0_0x545eda(0x110)])()),tslib_1[a0_0x545eda(0x137)](a0_0x545eda(0x10b),Function),tslib_1[a0_0x545eda(0x137)](a0_0x545eda(0x106),[String,String,Object]),tslib_1['__metadata'](a0_0x545eda(0x159),Promise)],OperatoToolCreateMenu[a0_0x545eda(0x14a)],a0_0x545eda(0x155),null),OperatoToolCreateMenu=tslib_1[a0_0x545eda(0x16b)]([(0x0,type_graphql_1[a0_0x545eda(0x109)])()],OperatoToolCreateMenu),exports[a0_0x545eda(0x141)]=OperatoToolCreateMenu;function a0_0x7d25(_0x1df4d1,_0xc664f1){const _0x33e61c=a0_0x33e6();return a0_0x7d25=function(_0x7d250,_0x53d322){_0x7d250=_0x7d250-0x103;let _0x184006=_0x33e61c[_0x7d250];return _0x184006;},a0_0x7d25(_0x1df4d1,_0xc664f1);}const modelTemplate=a0_0x545eda(0x148);
1
+ 'use strict';const a0_0x441bd7=a0_0xac8e;(function(_0x5cba41,_0x7e8d41){const _0x3adcc5=a0_0xac8e,_0x259876=_0x5cba41();while(!![]){try{const _0x4f705e=-parseInt(_0x3adcc5(0x110))/0x1+parseInt(_0x3adcc5(0xcf))/0x2+-parseInt(_0x3adcc5(0xf3))/0x3*(-parseInt(_0x3adcc5(0xda))/0x4)+parseInt(_0x3adcc5(0xb8))/0x5+parseInt(_0x3adcc5(0xe0))/0x6*(-parseInt(_0x3adcc5(0xcb))/0x7)+parseInt(_0x3adcc5(0xfc))/0x8*(parseInt(_0x3adcc5(0xbb))/0x9)+-parseInt(_0x3adcc5(0xd7))/0xa*(parseInt(_0x3adcc5(0xe7))/0xb);if(_0x4f705e===_0x7e8d41)break;else _0x259876['push'](_0x259876['shift']());}catch(_0x5d1f2c){_0x259876['push'](_0x259876['shift']());}}}(a0_0x3557,0x5254b));function a0_0xac8e(_0x33d28d,_0x1ff3dc){const _0x35579e=a0_0x3557();return a0_0xac8e=function(_0xac8e53,_0x1cba14){_0xac8e53=_0xac8e53-0xb6;let _0x1a1a85=_0x35579e[_0xac8e53];return _0x1a1a85;},a0_0xac8e(_0x33d28d,_0x1ff3dc);}function a0_0x3557(){const _0x37b99b=['\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22basic\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22label\x22:\x20\x22data_history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22icon\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22logic\x22:\x20\x22history_json\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20','@things-factory/meta-ui/client/pages/meta-grist-page','createCipheriv','replace','\x22,\x22width\x22:','hex','{\x22type\x22:\x20\x22','10oFeHmH','__decorate','aes-256-ecb','1140436eJgvXI','Mutation','\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}','sort','reverseSort','COPY','18JFPQhG','{\x22name\x22:\x20\x22','Resolver','Menu','string','enc','\x20,\x22editable\x22:\x20','14753695UJhzEC','\x20,\x22exportable\x22:\x20true','readonly','@transaction','substring','created_at','refType','refName','entity','query','\x22,\x22desc\x22:','Entity','3timJxs','updated_at','./../tool-secret/tool-permission','Ctx','@things-factory/resource-base','\x27\x20or\x20id\x20=\x20\x27','randomBytes','createGridColumns','{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22','244448VpdyDi','Arg','{\x22name\x22:\x22','utf8','createSearchCols','rank','hiddenFlag','createSortCols','parent_menu_id','from','{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22','menuType','stringify','join','getRepository','design:type','aes-256-cfb8','update','length','hidden','234255EcvcRa','parent','sortRank','__metadata','save','searchRank','meta-grist-page',',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22','\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}','code','left','push','\x22,\x22header\x22:\x20\x22','createdAt','createMenuData',',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22','\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22basic\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22label\x22:\x20\x22data_history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22icon\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22logic\x22:\x20\x22history_copy\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20',',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22','gridRank','findOne','aes256','searchOper','assign','updater_id','routing','type-graphql','lodash','split','Directive','state','select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27','default','map','\x22,\x22name\x22:\x20\x22','final','filter','aes-256-cfb1','2615580AjapSz','template','resourceUrl','189LUwbkg','aes-256-cfb','\x22,\x22operator\x22:\x20\x22','tslib','SCREEN','OperatoToolCreateMenu',',\x22mandatory\x22:\x20','find','category','@things-factory/menu-base','updatedAt','__esModule','__param','Operato\x20Tool\x20Create\x20Menu','scenario','\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}','401002uwnHxe','creator','name','dataProp','1269368FPyjzZ'];a0_0x3557=function(){return _0x37b99b;};return a0_0x3557();}Object['defineProperty'](exports,a0_0x441bd7(0xc6),{'value':!0x0}),exports[a0_0x441bd7(0xc0)]=void 0x0;const tslib_1=require(a0_0x441bd7(0xbe)),type_graphql_1=require(a0_0x441bd7(0x129)),resource_base_1=require(a0_0x441bd7(0xf7)),menu_base_1=require(a0_0x441bd7(0xc4)),tool_permission_1=require(a0_0x441bd7(0xf5)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x441bd7(0x12a)),{plural:plural}=require('pluralize'),crypto_1=tslib_1['__importDefault'](require('crypto'));let OperatoToolCreateMenu=class{async['toolCreateMenu'](_0x210deb,_0x33e55e,_0x304ec8){const _0x3511d2=a0_0x441bd7,{domain:_0x29c874,user:_0x1d2c56,tx:_0x388170}=_0x304ec8[_0x3511d2(0x12d)];await(0x0,tool_permission_1['checkStudioTemplateIsOverLimit'])('',_0x304ec8);const _0x429edd=await _0x388170[_0x3511d2(0x10a)](resource_base_1[_0x3511d2(0xf2)])[_0x3511d2(0x123)]({'where':{'domain':{'id':_0x29c874['id']},'id':_0x210deb}}),_0x4d0453=await _0x388170['getRepository'](resource_base_1['EntityColumn'])[_0x3511d2(0xc2)]({'where':{'domain':{'id':_0x29c874['id']},'entity':{'id':_0x429edd['id']}}});let {name:_0x26e8fb=''}=_0x429edd||{},_0x292d41=kebabCase(_0x26e8fb),_0x3fe871=modelTemplate[_0x3511d2(0xd3)](/{{pascalCase name}}/g,startCase(camelCase(_0x26e8fb))[_0x3511d2(0xd3)](/ /g,''))[_0x3511d2(0xd3)](/{{camelCase name}}/g,camelCase(_0x26e8fb))[_0x3511d2(0xd3)](/{{snakeCase name}}/g,snakeCase(_0x26e8fb))[_0x3511d2(0xd3)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x26e8fb)))[_0x3511d2(0xd3)](/ /g,''))[_0x3511d2(0xd3)](/{{pluralCamelCase name}}/g,camelCase(plural(_0x26e8fb)))[_0x3511d2(0xd3)](/{{name}}/g,_0x26e8fb),_0x9efe29='';'JSON'==_0x429edd['dataProp']?_0x9efe29=_0x3511d2(0xd0):_0x3511d2(0xdf)==_0x429edd[_0x3511d2(0xce)]&&(_0x9efe29=_0x3511d2(0x120)),_0x3fe871=_0x3fe871[_0x3511d2(0xd3)](/{{HistoryButton}}/g,_0x9efe29);let _0x4e194b=this[_0x3511d2(0x103)](_0x4d0453);_0x3fe871=_0x3fe871[_0x3511d2(0xd3)](/{{SortColumns}}/g,_0x4e194b[_0x3511d2(0x109)](','));let _0x377724=this[_0x3511d2(0x100)](_0x4d0453);_0x3fe871=_0x3fe871['replace'](/{{SearchColumns}}/g,_0x377724['join'](','));let _0x1aa3a2=this[_0x3511d2(0xfa)](_0x4d0453);return _0x3fe871=_0x3fe871[_0x3511d2(0xd3)](/{{GridColumns}}/g,_0x1aa3a2[_0x3511d2(0x109)](',')),_0x3fe871=this[_0x3511d2(0xe5)](_0x3fe871),await this['createMenuData'](_0x388170,_0x29c874,_0x1d2c56,_0x33e55e,_0x292d41,_0x3fe871),!0x0;}['createGridColumns'](_0xcb4180){const _0x1a7136=a0_0x441bd7;return _0xcb4180[_0x1a7136(0xb6)](_0x217c0b=>'id'!=_0x217c0b[_0x1a7136(0xcd)]&&_0x217c0b[_0x1a7136(0x122)]>0x0)[_0x1a7136(0xdd)](function(_0x4f74ce,_0x23c2d2){const _0x4845a9=_0x1a7136;return _0x4f74ce[_0x4845a9(0x122)]-_0x23c2d2[_0x4845a9(0x122)];})[_0x1a7136(0x130)](_0x2fe691=>{const _0x77ee62=_0x1a7136;let {gridEditor:_0x2e9c54=_0x77ee62(0xe4),name:_0xa458a,term:_0x42c222,gridWidth:_0x553ba6=0x0,gridAlign:_0x579518=_0x77ee62(0x11a),nullable:_0x44f22e=!0x1}=_0x2fe691;if(null==_0x2e9c54&&(_0x2e9c54=_0x77ee62(0xe4)),null==_0x579518&&(_0x579518=_0x77ee62(0x11a)),_0x77ee62(0x127)==_0xa458a||'creator_id'==_0xa458a)return _0xa458a=_0x77ee62(0x127)==_0xa458a?'updater':_0x77ee62(0xcc),_0x77ee62(0xfb)+_0xa458a+_0x77ee62(0x11c)+_0xa458a+_0x77ee62(0xca);if(_0x77ee62(0xf4)==_0xa458a||_0x77ee62(0xec)==_0xa458a)return _0x77ee62(0x106)+('updated_at'==_0xa458a?_0x77ee62(0xc5):_0x77ee62(0x11d))+_0x77ee62(0x11c)+_0xa458a+_0x77ee62(0xdc);let _0x2dd9fc=_0x77ee62(0xe9)!=_0x2e9c54&&_0x77ee62(0x10f)!=_0x2e9c54,_0x37acd0=_0x77ee62(0x10f)==_0x2e9c54;0x1!=_0x37acd0&&0x0!=_0x2dd9fc||(_0x2e9c54=_0x77ee62(0xe4));let _0x5825ca=_0x77ee62(0xd6)+_0x2e9c54+_0x77ee62(0x131)+camelCase(_0xa458a)+_0x77ee62(0x11c)+_0x42c222+'\x22,\x22hidden\x22:'+_0x37acd0+_0x77ee62(0xe6)+_0x2dd9fc+_0x77ee62(0xc1)+!_0x44f22e+',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22'+_0x579518+_0x77ee62(0xd4)+_0x553ba6+_0x77ee62(0xe8);return _0x77ee62(0x119)==_0x2fe691[_0x77ee62(0xed)]&&(_0x5825ca+=_0x77ee62(0x121)+_0x2fe691[_0x77ee62(0xee)]+'\x22}'),_0x77ee62(0xc9)==_0x2fe691[_0x77ee62(0xed)]&&(_0x5825ca+=_0x77ee62(0x117)+_0x2fe691['refName']+'\x22}'),_0x77ee62(0xef)==_0x2fe691[_0x77ee62(0xed)]&&(_0x5825ca+=_0x77ee62(0x11f)+camelCase(plural(_0x2fe691[_0x77ee62(0xee)]))+_0x77ee62(0x118)),_0x5825ca+='}',_0x5825ca;});}['createSearchCols'](_0x4e0aab){const _0x1140b3=a0_0x441bd7;return _0x4e0aab['filter'](_0x1ed3de=>_0x1ed3de[_0x1140b3(0x115)]>0x0)[_0x1140b3(0xdd)](function(_0x47a015,_0x4b2714){const _0x1d3439=_0x1140b3;return _0x47a015[_0x1d3439(0x115)]-_0x4b2714[_0x1d3439(0x115)];})['map'](_0x55b8af=>{const _0x49aeb7=_0x1140b3;let _0xdd758d=_0x55b8af[_0x49aeb7(0x125)];return'filter'==_0xdd758d?'\x22'+camelCase(_0x55b8af[_0x49aeb7(0xcd)])+'\x22':(_0xdd758d||(_0xdd758d='eq'),_0x49aeb7(0xe1)+camelCase(_0x55b8af[_0x49aeb7(0xcd)])+_0x49aeb7(0xbd)+_0xdd758d+'\x22}');});}[a0_0x441bd7(0x103)](_0x3c4805){const _0x44c4db=a0_0x441bd7;return _0x3c4805[_0x44c4db(0xb6)](_0x5e9072=>_0x5e9072[_0x44c4db(0x112)]>0x0)[_0x44c4db(0xdd)](function(_0x5a5fad,_0x31a789){const _0x424259=_0x44c4db;return _0x5a5fad[_0x424259(0x112)]-_0x31a789[_0x424259(0x112)];})[_0x44c4db(0x130)](_0xdf0a5d=>_0x44c4db(0xfe)+camelCase(_0xdf0a5d[_0x44c4db(0xcd)])+_0x44c4db(0xf1)+_0xdf0a5d[_0x44c4db(0xde)]+'}');}async[a0_0x441bd7(0x11e)](_0x586281,_0x5ee856,_0x5486e1,_0x3f01aa,_0x2d7e0b,_0x35420d){const _0x4ae275=a0_0x441bd7;let _0x95357=await _0x586281[_0x4ae275(0x10a)](menu_base_1[_0x4ae275(0xe3)])[_0x4ae275(0x123)]({'where':{'domain':{'id':_0x5ee856['id']},'id':_0x3f01aa}}),_0x5117ce=(await _0x586281[_0x4ae275(0x10a)](menu_base_1[_0x4ae275(0xe3)])[_0x4ae275(0xf0)](_0x4ae275(0x12e)+_0x3f01aa+_0x4ae275(0xf8)+_0x3f01aa+'\x27'))[0x0][_0x4ae275(0x101)]+0xa,_0x96f435=new menu_base_1[(_0x4ae275(0xe3))]();_0x96f435[_0x4ae275(0xcd)]=_0x2d7e0b,_0x96f435[_0x4ae275(0x107)]=_0x4ae275(0xbf),_0x96f435[_0x4ae275(0xc3)]=_0x4ae275(0x116),_0x96f435['rank']=_0x5117ce,_0x96f435[_0x4ae275(0x102)]=!0x1,_0x96f435[_0x4ae275(0x128)]=_0x2d7e0b,_0x96f435[_0x4ae275(0xb9)]=_0x35420d,_0x96f435[_0x4ae275(0xba)]=_0x4ae275(0xd1),_0x96f435[_0x4ae275(0x111)]=_0x95357,await _0x586281['getRepository'](menu_base_1[_0x4ae275(0xe3)])[_0x4ae275(0x114)](Object[_0x4ae275(0x126)](Object[_0x4ae275(0x126)]({},_0x96f435),{'domain':_0x5ee856,'creator':_0x5486e1,'updater':_0x5486e1}));}[a0_0x441bd7(0xe5)](_0x478f67){const _0x3516fe=a0_0x441bd7;let _0x4e3822=JSON[_0x3516fe(0x108)](_0x478f67)[_0x3516fe(0x12b)](/(.{100})/)[_0x3516fe(0xb6)](_0x53df47=>_0x53df47),_0x463091=[_0x3516fe(0xd9),'aes-256-cbc',_0x3516fe(0xbc),_0x3516fe(0x10c),_0x3516fe(0xb7),'aes-256-ofb','aes-256-ctr',_0x3516fe(0x124)],_0x4b6de0=crypto_1[_0x3516fe(0x12f)][_0x3516fe(0xf9)](0x20)['toString']('hex'),_0x3f3e63=Buffer[_0x3516fe(0x105)](_0x4b6de0,_0x3516fe(0xd5)),_0x3e2dc1=_0x4b6de0[_0x3516fe(0xeb)](0x0,0x10),_0x96ce53=['',_0x3e2dc1,_0x3e2dc1,_0x3e2dc1,_0x3e2dc1,_0x3e2dc1,_0x3e2dc1,_0x3e2dc1],_0x2dbf50=0x0,_0x34ab12=[];_0x34ab12[_0x3516fe(0x11b)](_0x4b6de0);for(var _0x1f2b93=0x0;_0x1f2b93<_0x4e3822[_0x3516fe(0x10e)];_0x1f2b93++,_0x2dbf50++){_0x2dbf50==_0x463091[_0x3516fe(0x10e)]&&(_0x2dbf50=0x0);let _0x56e07b=crypto_1[_0x3516fe(0x12f)][_0x3516fe(0xd2)](_0x463091[_0x2dbf50],_0x3f3e63,_0x96ce53[_0x2dbf50]),_0x2789d6=_0x56e07b[_0x3516fe(0x10d)](_0x4e3822[_0x1f2b93],_0x3516fe(0xff),_0x3516fe(0xd5));_0x2789d6+=_0x56e07b[_0x3516fe(0x132)]('hex'),_0x34ab12[_0x3516fe(0x11b)](_0x2789d6);}return _0x34ab12[_0x3516fe(0x109)]('h1z0q9i9x7q6');}};tslib_1[a0_0x441bd7(0xd8)]([(0x0,type_graphql_1[a0_0x441bd7(0x12c)])(a0_0x441bd7(0xea)),(0x0,type_graphql_1[a0_0x441bd7(0xdb)])(_0x5686f5=>Boolean,{'description':a0_0x441bd7(0xc8)}),tslib_1[a0_0x441bd7(0xc7)](0x0,(0x0,type_graphql_1[a0_0x441bd7(0xfd)])('id')),tslib_1[a0_0x441bd7(0xc7)](0x1,(0x0,type_graphql_1['Arg'])(a0_0x441bd7(0x104))),tslib_1[a0_0x441bd7(0xc7)](0x2,(0x0,type_graphql_1[a0_0x441bd7(0xf6)])()),tslib_1[a0_0x441bd7(0x113)](a0_0x441bd7(0x10b),Function),tslib_1[a0_0x441bd7(0x113)]('design:paramtypes',[String,String,Object]),tslib_1[a0_0x441bd7(0x113)]('design:returntype',Promise)],OperatoToolCreateMenu['prototype'],'toolCreateMenu',null),OperatoToolCreateMenu=tslib_1[a0_0x441bd7(0xd8)]([(0x0,type_graphql_1[a0_0x441bd7(0xe2)])()],OperatoToolCreateMenu),exports[a0_0x441bd7(0xc0)]=OperatoToolCreateMenu;const modelTemplate='\x0a{\x0a\x20\x20\x22menu\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x22title\x22:\x20\x22{{name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22\x22,\x0a\x20\x20\x20\x20\x20\x20\x22desc\x22:\x20\x22\x22\x0a\x20\x20},\x0a\x20\x20\x22gql\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x22query\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22list_func\x22:\x20\x22{{pluralCamelCase\x20name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22find_one_func\x22:\x22{{camelCase\x20name}}\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x22mutation\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22multiple\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22func\x22:\x22updateMultiple{{pascalCase\x20name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22{{pascalCase\x20name}}Patch\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22delete\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22func\x22:\x22delete{{pluralPascalCase\x20name}}\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20},\x0a\x20\x20\x22button\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22export\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22add\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22delete\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22save\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20],\x0a\x20\x20\x22grid_column\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22string\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22id\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22header\x22:\x20\x22id\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22hidden\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22editable\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22mandatory\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22sortable\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22align\x22:\x20\x22left\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22width\x22:\x200,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22exportable\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20},\x0a{{GridColumns}}\x0a\x20\x20],\x0a\x20\x20\x22grid\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22button\x22:[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{{HistoryButton}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22option\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22mobile_mode\x22:\x20\x22LIST\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22desk_mode\x22:\x20\x22GRID\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22use_row_checker\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22pages\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2020,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2050,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20100,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20300\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22view_mode\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22GRID\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22LIST\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22CARD\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22sorters\x22:\x20[\x0a{{SortColumns}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20]\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x22row\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22multiple_select\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22click\x22:\x20\x22select-row-toggle\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20},\x0a\x20\x20\x22search\x22:\x20[\x0a{{SearchColumns}}\x0a\x20\x20]\x0a}\x0a';
@@ -1 +1 @@
1
- 'use strict';function a0_0x10b8(){const _0x10280d=['793202ageGpx','__decorate','-history-type.ts','...','replace','split','JSON','Float','OperatoToolCreateService','string','Int','existsPath','createDir','date','\x27,\x20type:\x20\x27','length','\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','/packages','Resolvers\x20}\x20from\x20\x27./','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','long','createServicePath','domain','camelCaseName','env','9567BcariO','@things-factory/shell','@Column({name:\x27','\x20{\x20nullable:\x20','dataProp','mkdirSync','-history-query.ts','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\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','name','3633UYoPWX','join','replaceNamesMap','createHistoryServiceFiles','\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',',length:','creator_id','-history.ts','COPY','2804412BCtVYF','prototype','1496qTgrbu','includes','toolCreateService','colType','float','text','Entity','getProjectRootPath','push','-query.ts','updater_id','\x27,\x20nullable:\x20','77MhcuMK','find','decimal','pascalCaseName','readFileSync','character\x20varying','\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201','/packages/','.ts','\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}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','design:returntype','nullable','timestamp\x20without\x20time\x20zone','double','\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','getColTxtType','1660UKCJLn','indexOf','\x0a\x20\x20','getFieldType','\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','pluralCamelCaseName','{{camelCase\x20name}}.','bigint','getRepository','utf8','domain_id','snakeCaseName','Resolvers,','Entities,\x20resolvers\x20as\x20','sort','\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','/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...','__esModule','\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','columnToEntityColumn','__metadata','Operato\x20Tool\x20Create\x20Service','/service','514392iXOWkP','/server','/index.ts','created_at','-history\x27','updated_at','Ctx','packages','createServiceFiles','findOne','6188MGByIP','tableName','EntityColumn','pluralPascalCaseName','Date','integer','import\x20{\x20entities\x20as\x20','state','/event-subscriber.ts','rank','370EPSLka','createTypeText','writeFile','/*\x20ENTITIES\x20*/\x0a\x09...','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})','@Field(','filter','\x20})','1NswKAd','\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','1561839mqePKH','uniqRank','updater','Arg','design:paramtypes','datetime','type\x20=>','creator','colSize','Resolver','Resolvers,\x20subscribers\x20as\x20','-mutation.ts','tslib','type-graphql','index.ts','map','createEntityText','EntitySubscribers\x20}\x20from\x20\x27./','createHistoryEntityText','number','Query','Entities,','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./'];a0_0x10b8=function(){return _0x10280d;};return a0_0x10b8();}const a0_0x204474=a0_0x2cfd;(function(_0x1398ef,_0x1f5bc8){const _0xb030e4=a0_0x2cfd,_0x369b93=_0x1398ef();while(!![]){try{const _0x38747d=parseInt(_0xb030e4(0x94))/0x1*(parseInt(_0xb030e4(0xad))/0x2)+parseInt(_0xb030e4(0x96))/0x3+-parseInt(_0xb030e4(0x117))/0x4*(parseInt(_0xb030e4(0xf6))/0x5)+-parseInt(_0xb030e4(0xd8))/0x6+-parseInt(_0xb030e4(0xcf))/0x7*(-parseInt(_0xb030e4(0xda))/0x8)+parseInt(_0xb030e4(0xc6))/0x9*(parseInt(_0xb030e4(0x121))/0xa)+-parseInt(_0xb030e4(0xe6))/0xb*(-parseInt(_0xb030e4(0x10d))/0xc);if(_0x38747d===_0x1f5bc8)break;else _0x369b93['push'](_0x369b93['shift']());}catch(_0x48592c){_0x369b93['push'](_0x369b93['shift']());}}}(a0_0x10b8,0x5afae));Object['defineProperty'](exports,a0_0x204474(0x107),{'value':!0x0}),exports[a0_0x204474(0xb5)]=void 0x0;function a0_0x2cfd(_0x4a9597,_0x345f90){const _0x10b823=a0_0x10b8();return a0_0x2cfd=function(_0x2cfdfc,_0x55edd2){_0x2cfdfc=_0x2cfdfc-0x94;let _0x399d06=_0x10b823[_0x2cfdfc];return _0x399d06;},a0_0x2cfd(_0x4a9597,_0x345f90);}const tslib_1=require(a0_0x204474(0xa2)),type_graphql_1=require(a0_0x204474(0xa3)),shell_1=require(a0_0x204474(0xc7)),resource_base_1=require('@things-factory/resource-base'),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require('lodash'),{plural:plural}=require('pluralize'),fs=require('fs');let OperatoToolCreateService=class{async[a0_0x204474(0xdc)](_0x1f3144,_0x59bcf8){const _0x2fd802=a0_0x204474,{domain:_0x366003}=_0x59bcf8[_0x2fd802(0x11e)],_0x26261c=await(0x0,shell_1[_0x2fd802(0xfe)])(resource_base_1[_0x2fd802(0xe0)])[_0x2fd802(0x116)]({'where':{'id':_0x1f3144}}),_0x4d0bc2=await(0x0,shell_1[_0x2fd802(0xfe)])(resource_base_1[_0x2fd802(0x119)])[_0x2fd802(0xe7)]({'where':{'domain':{'id':_0x366003['id']},'entity':{'id':_0x26261c['id']}}});let {name:_0x391ab6='',bundle:_0x300bd8=''}=_0x26261c||{},_0x1bd9be=this[_0x2fd802(0xe1)](),_0x76c30e=kebabCase(_0x391ab6);return await this['createServicePath'](_0x1bd9be,_0x300bd8,_0x76c30e),await this[_0x2fd802(0x115)](_0x1bd9be,_0x300bd8,_0x391ab6,_0x76c30e,_0x26261c,_0x4d0bc2),!0x0;}async[a0_0x204474(0x115)](_0x378275,_0x664753,_0x185d41,_0x2d4f30,_0xc777be,_0x477264){const _0x1387a9=a0_0x204474;let _0x2394b3={'name':_0x2d4f30,'tableName':_0xc777be[_0x1387a9(0x118)],'pascalCaseName':startCase(camelCase(_0x185d41))['replace'](/ /g,''),'camelCaseName':camelCase(_0x185d41),'snakeCaseName':snakeCase(_0x185d41),'pluralPascalCaseName':startCase(camelCase(plural(_0x185d41)))[_0x1387a9(0xb1)](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x185d41))},_0x1edff2=_0x378275+_0x1387a9(0xed)+_0x664753+'/server/service/';['JSON','COPY']['includes'](_0xc777be[_0x1387a9(0xca)])?await this['createHistoryServiceFiles'](_0x1edff2,_0x2d4f30,_0xc777be,_0x477264,_0x2394b3):await this['createNoHistoryServiceFiels'](_0x1edff2,_0x2d4f30,_0xc777be,_0x477264,_0x2394b3);}async[a0_0x204474(0xd2)](_0xdfff7a,_0xf246fd,_0x31853f,_0x160023,_0x3086d8){const _0x169252=a0_0x204474;await this['writeFile'](_0xdfff7a+(_0xf246fd+_0x169252(0x10f)),serviceHistoryIndex,_0x3086d8);let _0x259834=this[_0x169252(0xa6)](_0x31853f,_0x160023);await this[_0x169252(0x123)](_0xdfff7a+(_0xf246fd+'/'+_0xf246fd+'.ts'),_0x259834,_0x3086d8),await this[_0x169252(0x123)](_0xdfff7a+(_0xf246fd+'/'+_0xf246fd+_0x169252(0xe3)),serviceQuery,_0x3086d8),await this['writeFile'](_0xdfff7a+(_0xf246fd+'/'+_0xf246fd+_0x169252(0xa1)),serviceMutation,_0x3086d8);let _0x252a80=this[_0x169252(0x122)](_0x160023);await this[_0x169252(0x123)](_0xdfff7a+(_0xf246fd+'/'+_0xf246fd+'-type.ts'),_0x252a80,_0x3086d8);let _0x2dbb6b=this[_0x169252(0xa8)](_0x31853f,_0x160023);await this[_0x169252(0x123)](_0xdfff7a+(_0xf246fd+'/'+_0xf246fd+_0x169252(0xd6)),_0x2dbb6b,_0x3086d8);let _0x128eaf='';_0x169252(0xb3)==_0x31853f[_0x169252(0xca)]?(_0x128eaf=_0x169252(0xbd),await this['writeFile'](_0xdfff7a+(_0xf246fd+_0x169252(0x11f)),serviceEntitySubscriber,_0x3086d8)):_0x128eaf='';let _0x1276dc=serviceEntitySubscriber[_0x169252(0xb1)](/{{entityToJson}}/g,_0x128eaf);await this[_0x169252(0x123)](_0xdfff7a+(_0xf246fd+_0x169252(0x11f)),_0x1276dc,_0x3086d8),await this[_0x169252(0x123)](_0xdfff7a+(_0xf246fd+'/'+_0xf246fd+_0x169252(0xcc)),serviceHistoryQuery,_0x3086d8),await this[_0x169252(0x123)](_0xdfff7a+(_0xf246fd+'/'+_0xf246fd+_0x169252(0xaf)),sereviceHistoryType,_0x3086d8);let _0x5e4d1d=_0xdfff7a+_0x169252(0xa4);0x0==await this[_0x169252(0xb8)](_0x5e4d1d)&&await this[_0x169252(0x123)](_0x5e4d1d,allIndex,_0x3086d8);let _0x374773=await fs[_0x169252(0xea)](_0x5e4d1d,_0x169252(0xff));_0x374773[_0x169252(0xf7)]('export\x20*\x20from\x20\x27./'+_0x3086d8[_0x169252(0xce)]+'/'+_0x3086d8[_0x169252(0xce)]+_0x169252(0x111))<0x0&&(_0x374773=_0x374773[_0x169252(0xb1)](/\/\* EXPORT ENTITY TYPES \*\//,_0x169252(0xac)+_0x3086d8[_0x169252(0xce)]+'/'+_0x3086d8[_0x169252(0xce)]+_0x169252(0x111))),_0x374773[_0x169252(0xf7)]('export\x20*\x20from\x20\x27./'+_0x3086d8[_0x169252(0xce)]+'/'+_0x3086d8[_0x169252(0xce)]+'\x27')<0x0&&(_0x374773=_0x374773[_0x169252(0xb1)](/\/\* EXPORT ENTITY TYPES \*\//,_0x169252(0xac)+_0x3086d8[_0x169252(0xce)]+'/'+_0x3086d8[_0x169252(0xce)]+'\x27')),_0x374773[_0x169252(0xf7)](_0x169252(0x11d)+_0x3086d8[_0x169252(0xe9)]+_0x169252(0x103)+_0x3086d8[_0x169252(0xe9)]+_0x169252(0xa0)+_0x3086d8[_0x169252(0xe9)]+_0x169252(0xa7)+_0x3086d8[_0x169252(0xce)]+'\x27')<0x0&&(_0x374773=_0x374773['replace'](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x169252(0xc0)+_0x3086d8[_0x169252(0xe9)]+_0x169252(0x103)+_0x3086d8[_0x169252(0xe9)]+_0x169252(0xa0)+_0x3086d8[_0x169252(0xe9)]+_0x169252(0xa7)+_0x3086d8[_0x169252(0xce)]+'\x27')),_0x374773[_0x169252(0xf7)]('...'+_0x3086d8[_0x169252(0xe9)]+'Entities,')<0x0&&(_0x374773=_0x374773[_0x169252(0xb1)](/\/\* ENTITIES \*\//,_0x169252(0x124)+_0x3086d8[_0x169252(0xe9)]+'Entities,')),_0x374773[_0x169252(0xf7)](_0x169252(0xb0)+_0x3086d8[_0x169252(0xe9)]+_0x169252(0x102))<0x0&&(_0x374773=_0x374773[_0x169252(0xb1)](/\/\* RESOLVER CLASSES \*\//,'/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...'+_0x3086d8[_0x169252(0xe9)]+_0x169252(0x102))),_0x374773[_0x169252(0xf7)](_0x169252(0xb0)+_0x3086d8[_0x169252(0xe9)]+'EntitySubscribers,')<0x0&&(_0x374773=_0x374773[_0x169252(0xb1)](/\/\* SUBSCRIBERS \*\//,_0x169252(0x106)+_0x3086d8[_0x169252(0xe9)]+'EntitySubscribers,')),await this[_0x169252(0x123)](_0x5e4d1d,_0x374773,_0x3086d8);}async['createNoHistoryServiceFiels'](_0x1bea5c,_0x3b32e3,_0x18eb31,_0x1a3e88,_0x436806){const _0x549cb1=a0_0x204474;await this[_0x549cb1(0x123)](_0x1bea5c+(_0x3b32e3+_0x549cb1(0x10f)),serviceIndex,_0x436806),await this['writeFile'](_0x1bea5c+(_0x3b32e3+'/'+_0x3b32e3+_0x549cb1(0xe3)),serviceQuery,_0x436806),await this[_0x549cb1(0x123)](_0x1bea5c+(_0x3b32e3+'/'+_0x3b32e3+_0x549cb1(0xa1)),serviceMutation,_0x436806);let _0x49ea26=this[_0x549cb1(0xa6)](_0x18eb31,_0x1a3e88);await this['writeFile'](_0x1bea5c+(_0x3b32e3+'/'+_0x3b32e3+_0x549cb1(0xee)),_0x49ea26,_0x436806);let _0x1d38d8=this[_0x549cb1(0x122)](_0x1a3e88);await this['writeFile'](_0x1bea5c+(_0x3b32e3+'/'+_0x3b32e3+'-type.ts'),_0x1d38d8,_0x436806);let _0x170b62=_0x1bea5c+_0x549cb1(0xa4);0x0==await this[_0x549cb1(0xb8)](_0x170b62)&&await this['writeFile'](_0x170b62,allIndex,_0x436806);let _0x15b418=await fs[_0x549cb1(0xea)](_0x170b62,_0x549cb1(0xff));_0x15b418['indexOf']('export\x20*\x20from\x20\x27./'+_0x436806[_0x549cb1(0xce)]+'/'+_0x436806[_0x549cb1(0xce)]+'\x27')<0x0&&(_0x15b418=_0x15b418['replace'](/\/\* EXPORT ENTITY TYPES \*\//,'/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./'+_0x436806[_0x549cb1(0xce)]+'/'+_0x436806['name']+'\x27')),_0x15b418[_0x549cb1(0xf7)]('import\x20{\x20entities\x20as\x20'+_0x436806[_0x549cb1(0xe9)]+'Entities,\x20resolvers\x20as\x20'+_0x436806['pascalCaseName']+_0x549cb1(0xbf)+_0x436806['name']+'\x27')<0x0&&(_0x15b418=_0x15b418[_0x549cb1(0xb1)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x549cb1(0xc0)+_0x436806['pascalCaseName']+'Entities,\x20resolvers\x20as\x20'+_0x436806[_0x549cb1(0xe9)]+_0x549cb1(0xbf)+_0x436806[_0x549cb1(0xce)]+'\x27')),_0x15b418['indexOf'](_0x549cb1(0xb0)+_0x436806[_0x549cb1(0xe9)]+_0x549cb1(0xab))<0x0&&(_0x15b418=_0x15b418[_0x549cb1(0xb1)](/\/\* ENTITIES \*\//,_0x549cb1(0x124)+_0x436806[_0x549cb1(0xe9)]+_0x549cb1(0xab))),_0x15b418[_0x549cb1(0xf7)](_0x549cb1(0xb0)+_0x436806['pascalCaseName']+'Resolvers,')<0x0&&(_0x15b418=_0x15b418[_0x549cb1(0xb1)](/\/\* RESOLVER CLASSES \*\//,_0x549cb1(0x125)+_0x436806[_0x549cb1(0xe9)]+_0x549cb1(0x102))),await this['writeFile'](_0x170b62,_0x15b418,_0x436806);}[a0_0x204474(0x122)](_0x344c30){const _0x38adf2=a0_0x204474;let _0x11168f=sereviceType,_0x440153=_0x344c30[_0x38adf2(0xa5)](_0x20e67a=>{const _0x4d4cb9=_0x38adf2;if('id'==_0x20e67a[_0x4d4cb9(0xce)])return'';if(_0x4d4cb9(0x100)==_0x20e67a[_0x4d4cb9(0xce)])return'';if(_0x4d4cb9(0x110)==_0x20e67a[_0x4d4cb9(0xce)])return'';if(_0x4d4cb9(0x112)==_0x20e67a['name'])return'';if(_0x4d4cb9(0xd5)==_0x20e67a[_0x4d4cb9(0xce)])return'';if('updater_id'==_0x20e67a[_0x4d4cb9(0xce)])return'';let _0x4eda20=this[_0x4d4cb9(0xf9)](_0x20e67a),_0x5ce2b8=this[_0x4d4cb9(0xf5)](_0x20e67a),_0x487c2d=camelCase(_0x20e67a[_0x4d4cb9(0xce)]);return'\x20\x20'+(_0x4d4cb9(0x127)+(0x0==_0x4eda20[_0x4d4cb9(0xbc)]?'':_0x4d4cb9(0x9c)+_0x4eda20+',')+_0x4d4cb9(0xc9)+_0x20e67a[_0x4d4cb9(0xf1)]+'\x20})')+_0x4d4cb9(0xf8)+(''+_0x487c2d+(_0x20e67a[_0x4d4cb9(0xf1)]?'?':'')+':\x20'+_0x5ce2b8)+'\x0a';});_0x11168f=_0x11168f[_0x38adf2(0xb1)](/{{newTypeColumns}}/g,_0x440153['join']('\x0a'));let _0x49fb5a=_0x344c30[_0x38adf2(0xa5)](_0x7d9c2d=>{const _0x2a33bd=_0x38adf2;if('id'==_0x7d9c2d[_0x2a33bd(0xce)])return'';if(_0x2a33bd(0x100)==_0x7d9c2d['name'])return'';if(_0x2a33bd(0x110)==_0x7d9c2d['name'])return'';if(_0x2a33bd(0x112)==_0x7d9c2d[_0x2a33bd(0xce)])return'';if(_0x2a33bd(0xd5)==_0x7d9c2d[_0x2a33bd(0xce)])return'';if(_0x2a33bd(0xe4)==_0x7d9c2d['name'])return'';let _0x27bd2e=this['getFieldType'](_0x7d9c2d),_0x333dcd=this['getColTxtType'](_0x7d9c2d);_0x7d9c2d[_0x2a33bd(0xf1)]=!0x0;let _0x57f54=camelCase(_0x7d9c2d[_0x2a33bd(0xce)]);return'\x20\x20'+(_0x2a33bd(0x127)+(0x0==_0x27bd2e[_0x2a33bd(0xbc)]?'':_0x2a33bd(0x9c)+_0x27bd2e+',')+_0x2a33bd(0xc9)+_0x7d9c2d[_0x2a33bd(0xf1)]+_0x2a33bd(0x129))+_0x2a33bd(0xf8)+(''+_0x57f54+(_0x7d9c2d[_0x2a33bd(0xf1)]?'?':'')+':\x20'+_0x333dcd)+'\x0a';});return _0x11168f=_0x11168f['replace'](/{{patchTypeColumns}}/g,_0x49fb5a['join']('\x0a')),_0x11168f;}[a0_0x204474(0xa6)](_0x73f027,_0x326dee){const _0x3a4a08=a0_0x204474;let _0x438376=serviceEntity,_0x36f5e4=_0x326dee['sort'](function(_0x4ec2b8,_0x1b6a47){const _0x127eb3=a0_0x2cfd;return _0x4ec2b8[_0x127eb3(0x120)]-_0x1b6a47[_0x127eb3(0x120)];})[_0x3a4a08(0xa5)](_0x46342a=>this[_0x3a4a08(0x109)](_0x46342a));[_0x3a4a08(0xd7),'JSON'][_0x3a4a08(0xdb)](_0x73f027[_0x3a4a08(0xca)])&&_0x36f5e4[_0x3a4a08(0xe2)](_0x3a4a08(0xec)),_0x438376=_0x438376[_0x3a4a08(0xb1)](/{{entityColumns}}/g,_0x36f5e4['join']('\x0a'));let _0x11f1de='',_0x5ab92f=_0x326dee[_0x3a4a08(0x128)](_0xfecf04=>_0xfecf04['uniqRank']&&_0xfecf04[_0x3a4a08(0x97)]>0x0)[_0x3a4a08(0x104)](function(_0x2ddee9,_0x2601a4){const _0x581440=_0x3a4a08;return _0x2ddee9[_0x581440(0x97)]-_0x2601a4[_0x581440(0x97)];});if(_0x5ab92f['length']>0x0){_0x11f1de=_0x3a4a08(0x126);let _0x197524=_0x5ab92f['map'](_0x26e6d5=>{const _0x47d58f=_0x3a4a08;let _0x46d5db=_0x26e6d5['name'];return _0x47d58f(0x100)==_0x26e6d5[_0x47d58f(0xce)]&&(_0x46d5db=_0x47d58f(0xc3)),_0x47d58f(0xd5)==_0x26e6d5['name']&&(_0x46d5db=_0x47d58f(0x9d)),_0x47d58f(0xe4)==_0x26e6d5['name']&&(_0x46d5db=_0x47d58f(0x98)),_0x47d58f(0xfc)+camelCase(_0x46d5db);});_0x11f1de=_0x11f1de['replace'](/{{indexColumns}}/g,_0x197524[_0x3a4a08(0xd0)](','));}return _0x438376=_0x438376[_0x3a4a08(0xb1)](/{{indexAnn}}/g,_0x11f1de),_0x438376;}[a0_0x204474(0xa8)](_0x21edab,_0x40610){const _0x3343bb=a0_0x204474;let _0x48365d=_0x3343bb(0xb3)==_0x21edab[_0x3343bb(0xca)]?serviceEntityHistJson:serviceEntityHistCopy,_0x228097=_0x40610[_0x3343bb(0x104)](function(_0x105c23,_0x2e45fb){const _0x2b27d3=_0x3343bb;return _0x105c23[_0x2b27d3(0x120)]-_0x2e45fb['rank'];})[_0x3343bb(0xa5)](_0x523f59=>this[_0x3343bb(0x109)](_0x523f59));return _0x48365d=_0x48365d['replace'](/{{entityColumns}}/g,_0x228097[_0x3343bb(0xd0)]('\x0a')),_0x48365d;}['columnToEntityColumn'](_0x10d1be){const _0x447ce5=a0_0x204474;if('id'==_0x10d1be[_0x447ce5(0xce)])return'';if(_0x447ce5(0x100)==_0x10d1be[_0x447ce5(0xce)])return'';if('created_at'==_0x10d1be[_0x447ce5(0xce)])return'';if(_0x447ce5(0x112)==_0x10d1be['name'])return'';if(_0x447ce5(0xd5)==_0x10d1be[_0x447ce5(0xce)])return'';if('updater_id'==_0x10d1be['name'])return'';let _0x1b4991=_0x10d1be['colType'];_0x447ce5(0xf3)==_0x10d1be[_0x447ce5(0xdd)]&&(_0x1b4991='double\x20precision'),_0x447ce5(0xc1)==_0x10d1be[_0x447ce5(0xdd)]&&(_0x1b4991=_0x447ce5(0xfd)),_0x447ce5(0xb6)==_0x10d1be['colType']&&(_0x1b4991=_0x447ce5(0xeb)),_0x447ce5(0x9b)==_0x10d1be[_0x447ce5(0xdd)]&&(_0x1b4991=_0x447ce5(0xf2));let _0x550828='';_0x447ce5(0xb6)==_0x10d1be[_0x447ce5(0xdd)]&&(_0x550828=_0x10d1be[_0x447ce5(0x9e)]);let _0xebe8a9=this[_0x447ce5(0xf9)](_0x10d1be),_0x5855b5=this[_0x447ce5(0xf5)](_0x10d1be),_0x1195d7=camelCase(_0x10d1be[_0x447ce5(0xce)]);return'\x20\x20'+(_0x447ce5(0xc8)+_0x10d1be[_0x447ce5(0xce)]+_0x447ce5(0xbb)+_0x1b4991+_0x447ce5(0xe5)+_0x10d1be[_0x447ce5(0xf1)]+'\x20'+(0x0==_0x550828[_0x447ce5(0xbc)]?'':_0x447ce5(0xd4)+_0x550828)+'\x20})')+_0x447ce5(0xf8)+(_0x447ce5(0x127)+(0x0==_0xebe8a9['length']?'':_0x447ce5(0x9c)+_0xebe8a9+',')+_0x447ce5(0xc9)+_0x10d1be[_0x447ce5(0xf1)]+'\x20})')+_0x447ce5(0xf8)+(''+_0x1195d7+(_0x10d1be[_0x447ce5(0xf1)]?'?':'')+':\x20'+_0x5855b5)+'\x0a';}['getFieldType'](_0x286b9e){const _0x3326e2=a0_0x204474;let _0x593f18='';return _0x3326e2(0xf3)==_0x286b9e[_0x3326e2(0xdd)]&&(_0x593f18=_0x3326e2(0xb4)),'float'==_0x286b9e['colType']&&(_0x593f18=_0x3326e2(0xb4)),_0x3326e2(0xc1)==_0x286b9e[_0x3326e2(0xdd)]&&(_0x593f18=_0x3326e2(0xb7)),_0x3326e2(0x11c)==_0x286b9e['colType']&&(_0x593f18=_0x3326e2(0xb7)),_0x593f18;}[a0_0x204474(0xf5)](_0x41f01f){const _0x100255=a0_0x204474;let _0xb2d1c6=_0x41f01f[_0x100255(0xdd)];return _0x100255(0xe8)==_0x41f01f[_0x100255(0xdd)]&&(_0xb2d1c6=_0x100255(0xa9)),_0x100255(0xf3)==_0x41f01f[_0x100255(0xdd)]&&(_0xb2d1c6=_0x100255(0xa9)),_0x100255(0xde)==_0x41f01f[_0x100255(0xdd)]&&(_0xb2d1c6=_0x100255(0xa9)),'integer'==_0x41f01f['colType']&&(_0xb2d1c6=_0x100255(0xa9)),_0x100255(0xc1)==_0x41f01f[_0x100255(0xdd)]&&(_0xb2d1c6=_0x100255(0xa9)),'datetime'==_0x41f01f[_0x100255(0xdd)]&&(_0xb2d1c6='Date'),_0x100255(0xba)==_0x41f01f[_0x100255(0xdd)]&&(_0xb2d1c6=_0x100255(0x11b)),_0x100255(0xdf)==_0x41f01f[_0x100255(0xdd)]&&(_0xb2d1c6=_0x100255(0xb6)),_0xb2d1c6;}async[a0_0x204474(0x123)](_0x2b0375,_0x117ad5,_0x4883e7){const _0x7d0923=a0_0x204474;await fs['writeFileSync'](_0x2b0375,this['replaceNamesMap'](_0x117ad5,_0x4883e7),_0x7d0923(0xff));}[a0_0x204474(0xd1)](_0x5bd082,_0x576ccb){const _0x3f069b=a0_0x204474;return _0x5bd082[_0x3f069b(0xb1)](/{{pascalCase name}}/g,_0x576ccb[_0x3f069b(0xe9)])[_0x3f069b(0xb1)](/{{camelCase name}}/g,_0x576ccb[_0x3f069b(0xc4)])[_0x3f069b(0xb1)](/{{snakeCase name}}/g,_0x576ccb[_0x3f069b(0x101)])[_0x3f069b(0xb1)](/{{pluralPascalCase name}}/g,_0x576ccb[_0x3f069b(0x11a)])[_0x3f069b(0xb1)](/{{pluralCamelCase name}}/g,_0x576ccb[_0x3f069b(0xfb)])[_0x3f069b(0xb1)](/{{tableName}}/g,_0x576ccb['tableName'])[_0x3f069b(0xb1)](/{{name}}/g,_0x576ccb['name']);}async[a0_0x204474(0xc2)](_0x239359,_0x2dbb89,_0x222f2f){const _0x5f079b=a0_0x204474;let _0x1e8e24=_0x239359+_0x5f079b(0xbe);await this[_0x5f079b(0xb9)](_0x1e8e24),_0x1e8e24=_0x1e8e24+'/'+_0x2dbb89,await this[_0x5f079b(0xb9)](_0x1e8e24),_0x1e8e24+=_0x5f079b(0x10e),await this[_0x5f079b(0xb9)](_0x1e8e24),_0x1e8e24+=_0x5f079b(0x10c),await this[_0x5f079b(0xb9)](_0x1e8e24),_0x1e8e24=_0x1e8e24+'/'+_0x222f2f,await this[_0x5f079b(0xb9)](_0x1e8e24);}['getProjectRootPath'](){const _0x4b5f33=a0_0x204474;let _0x4aa8cb=process[_0x4b5f33(0xc5)]['PWD'][_0x4b5f33(0xb2)]('/'),_0x5b97d5=[];for(let _0x368f99=0x0;_0x368f99<_0x4aa8cb[_0x4b5f33(0xbc)]&&_0x4b5f33(0x114)!=_0x4aa8cb[_0x368f99];_0x368f99++)_0x5b97d5[_0x4b5f33(0xe2)](_0x4aa8cb[_0x368f99]);return _0x5b97d5[_0x4b5f33(0xd0)]('/');}async['createDir'](_0x29a110){const _0x1236e8=a0_0x204474;0x0==await this['existsPath'](_0x29a110)&&fs[_0x1236e8(0xcb)](_0x29a110);}async[a0_0x204474(0xb8)](_0x232805){return await fs['existsSync'](_0x232805);}};tslib_1[a0_0x204474(0xae)]([(0x0,type_graphql_1[a0_0x204474(0xaa)])(_0x13266e=>Boolean,{'description':a0_0x204474(0x10b)}),tslib_1['__param'](0x0,(0x0,type_graphql_1[a0_0x204474(0x99)])('id')),tslib_1['__param'](0x1,(0x0,type_graphql_1[a0_0x204474(0x113)])()),tslib_1[a0_0x204474(0x10a)]('design:type',Function),tslib_1['__metadata'](a0_0x204474(0x9a),[String,Object]),tslib_1[a0_0x204474(0x10a)](a0_0x204474(0xf0),Promise)],OperatoToolCreateService[a0_0x204474(0xd9)],a0_0x204474(0xdc),null),OperatoToolCreateService=tslib_1[a0_0x204474(0xae)]([(0x0,type_graphql_1[a0_0x204474(0x9f)])()],OperatoToolCreateService),exports[a0_0x204474(0xb5)]=OperatoToolCreateService;const allIndex=a0_0x204474(0xd3),serviceIndex=a0_0x204474(0x105),serviceHistoryIndex=a0_0x204474(0xfa),serviceQuery='\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}List\x20}\x20from\x20\x27./{{name}}-type\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Query\x20{\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20fetch\x20a\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20return\x20await\x20getRepository({{pascalCase\x20name}}).findOne({\x0a\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20}\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}List,\x20{\x20description:\x20\x27To\x20fetch\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{pluralCamelCase\x20name}}(@Args()\x20params:\x20ListParam,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}List>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20queryBuilder\x20=\x20getQueryBuilderFromListParams({\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20params,\x0a\x20\x20\x20\x20\x20\x20repository:\x20await\x20getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20const\x20convertedParams\x20=\x20convertListParams(params,\x20domain.id)\x0a\x20\x20\x20\x20const\x20[items,\x20total]\x20=\x20await\x20queryBuilder.getManyAndCount()\x0a\x0a\x20\x20\x20\x20return\x20{\x20items,\x20total\x20}\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20Domain)\x0a\x20\x20async\x20domain(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<Domain>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(Domain).findOneBy({id:{{camelCase\x20name}}.domainId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20updater(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.updaterId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20creator(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.creatorId})\x0a\x20\x20}\x0a}\x0a',serviceHistoryQuery=a0_0x204474(0xef),serviceMutation='\x0aimport\x20{\x20Resolver,\x20Mutation,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20In\x20}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20New{{pascalCase\x20name}},\x20{{pascalCase\x20name}}Patch\x20}\x20from\x20\x27./{{name}}-type\x27\x0aimport\x20{\x20getRepository\x20}\x20from\x20\x27@things-factory/shell\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Mutation\x20{\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20create\x20new\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20create{{pascalCase\x20name}}(@Arg(\x27{{camelCase\x20name}}\x27)\x20{{camelCase\x20name}}:\x20New{{pascalCase\x20name}},\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20return\x20await\x20tx.getRepository({{pascalCase\x20name}}).save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20modify\x20{{pascalCase\x20name}}\x20information\x27\x20})\x0a\x20\x20async\x20update{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27id\x27)\x20id:\x20string,\x0a\x20\x20\x20\x20@Arg(\x27patch\x27)\x20patch:\x20{{pascalCase\x20name}}Patch,\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20repository\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20repository.findOne(\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20)\x0a\x0a\x20\x20\x20\x20return\x20await\x20repository.save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20...patch,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20[{{pascalCase\x20name}}],\x20{\x20description:\x20\x22To\x20modify\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20information\x22\x20})\x0a\x20\x20async\x20updateMultiple{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27patches\x27,\x20type\x20=>\x20[{{pascalCase\x20name}}Patch])\x20patches:\x20{{pascalCase\x20name}}Patch[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}[]>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20results\x20=\x20[]\x0a\x20\x20\x20\x20const\x20_createRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27+\x27)\x0a\x20\x20\x20\x20const\x20_updateRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27M\x27)\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}Repo\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x0a\x20\x20\x20\x20if\x20(_createRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_createRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20newRecord\x20=\x20_createRecords[i]\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...newRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27+\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20if\x20(_updateRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_updateRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20updRecord\x20=\x20_updateRecords[i]\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20{{camelCase\x20name}}Repo.findOne({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id:updRecord.id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...updRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27M\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20return\x20results\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20delete{{pascalCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove({\x20domain,\x20id,\x20updater:user\x20})\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20multiple\x20{{camelCase\x20name}}s\x27\x20})\x0a\x20\x20async\x20delete{{pluralPascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27ids\x27,\x20type\x20=>\x20[String])\x20ids:\x20string[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20delEntitis\x20=\x20ids.map(id=>{\x0a\x20\x20\x20\x20\x20\x20return\x20{domain,id,updater:user}\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove(delEntitis)\x0a\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a}\x0a',sereviceType=a0_0x204474(0xf4),sereviceHistoryType=a0_0x204474(0x108),serviceEntity=a0_0x204474(0x95),serviceEntityHistCopy='\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a',serviceEntityHistJson=a0_0x204474(0xcd),serviceEntitySubscriber='\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';
1
+ 'use strict';const a0_0x4e858d=a0_0x3c92;(function(_0x1baf6b,_0x47a875){const _0x43b3b1=a0_0x3c92,_0x276601=_0x1baf6b();while(!![]){try{const _0x174378=parseInt(_0x43b3b1(0x104))/0x1*(-parseInt(_0x43b3b1(0xe8))/0x2)+-parseInt(_0x43b3b1(0x130))/0x3*(-parseInt(_0x43b3b1(0xff))/0x4)+parseInt(_0x43b3b1(0xc4))/0x5*(-parseInt(_0x43b3b1(0x12d))/0x6)+parseInt(_0x43b3b1(0xbe))/0x7*(-parseInt(_0x43b3b1(0xf0))/0x8)+-parseInt(_0x43b3b1(0xf8))/0x9+-parseInt(_0x43b3b1(0x14a))/0xa*(parseInt(_0x43b3b1(0x124))/0xb)+-parseInt(_0x43b3b1(0xd2))/0xc*(-parseInt(_0x43b3b1(0x107))/0xd);if(_0x174378===_0x47a875)break;else _0x276601['push'](_0x276601['shift']());}catch(_0xe72814){_0x276601['push'](_0x276601['shift']());}}}(a0_0x22ca,0xae417));function a0_0x22ca(){const _0x22ad2c=['columnToEntityColumn','timestamp\x20without\x20time\x20zone','\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}}]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}Mutation]\x0a','EntitySubscribers\x20}\x20from\x20\x27./','mkdirSync','Resolvers\x20}\x20from\x20\x27./','creator','replace','colType','Entity','1502DWgYfd','includes','map','/*\x20ENTITIES\x20*/\x0a\x09...','colSize','createHistoryEntityText','env','createEntityText','51128ilmAFf','indexOf','JSON','...','PWD','length','Resolvers,\x20subscribers\x20as\x20','writeFile','8818605gdlvgw','text','datetime','defineProperty','lodash','export\x20*\x20from\x20\x27./','/index.ts','60ISfFxj','snakeCaseName','push','\x0a\x20\x20','tableName','1337beUOZc','utf8','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20Domain\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0a@Entity(\x27{{tableName}}\x27)\x0a{{indexAnn}}\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}\x20{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','40238692taoVmq','split','double','Resolvers,','name','writeFileSync','nullable','Date','updater_id','{{camelCase\x20name}}.','replaceNamesMap','existsSync','\x27,\x20nullable:\x20','find','Entities,\x20resolvers\x20as\x20','integer','prototype','/server','index.ts','pluralize','-history-type.ts','string','@things-factory/shell','readFileSync','join','getProjectRootPath','pascalCaseName','-history\x27','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','2976743YeVzdv','double\x20precision','@Field(','getColTxtType','bigint','OperatoToolCreateService','\x20{\x20nullable:\x20','float','domain_id','2308002vwfvab','uniqRank','\x0aimport\x20{\x20ObjectType,\x20Field,\x20InputType,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@InputType()\x0aexport\x20class\x20New{{pascalCase\x20name}}\x20{\x0a{{newTypeColumns}}\x0a}\x0a\x0a@InputType()\x0aexport\x20class\x20{{pascalCase\x20name}}Patch\x20{\x0a\x20\x20@Field(type\x20=>\x20ID,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20id?:\x20string\x0a\x0a{{patchTypeColumns}}\x0a\x0a\x20\x20@Field()\x0a\x20\x20cuFlag:\x20string\x0a}\x0a\x0a@ObjectType()\x0aexport\x20class\x20{{pascalCase\x20name}}List\x20{\x0a\x20\x20@Field(type\x20=>\x20[{{pascalCase\x20name}}])\x0a\x20\x20items:\x20{{pascalCase\x20name}}[]\x0a\x0a\x20\x20@Field(type\x20=>\x20Int)\x0a\x20\x20total:\x20number\x0a}\x0a','135057jPIQFi','\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryList\x20}\x20from\x20\x27./{{name}}-history-type\x27\x0a\x0a@Resolver({{pascalCase\x20name}}History)\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryQuery\x20{\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}History,\x20{\x20description:\x20\x27To\x20fetch\x20a\x20{{pascalCase\x20name}}History\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}History(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}History>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20return\x20await\x20getRepository({{pascalCase\x20name}}History).findOne({\x0a\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20}\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}HistoryList,\x20{\x20description:\x20\x27To\x20fetch\x20multiple\x20{{pluralPascalCase\x20name}}History\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}Histories(@Args()\x20params:\x20ListParam,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}HistoryList>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20queryBuilder\x20=\x20getQueryBuilderFromListParams({\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20params,\x0a\x20\x20\x20\x20\x20\x20repository:\x20await\x20getRepository({{pascalCase\x20name}}History)\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20const\x20[items,\x20total]\x20=\x20await\x20queryBuilder.getManyAndCount()\x0a\x0a\x20\x20\x20\x20return\x20{\x20items,\x20total\x20}\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20Domain)\x0a\x20\x20async\x20domain(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<Domain>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(Domain).findOneBy({id:{{camelCase\x20name}}History.domainId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20updater(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}History.updaterId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20creator(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}History.creatorId})\x0a\x20\x20}\x0a}\x0a','findOne','pluralCamelCaseName','pluralPascalCaseName','/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...','state','__param','\x0aimport\x20{\x20EventSubscriber\x20}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20HistoryEntitySubscriber\x20}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20getRepository\x20}\x20from\x20\x27@things-factory/shell\x27\x0a\x0a@EventSubscriber()\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryEntitySubscriber\x20extends\x20HistoryEntitySubscriber<{{pascalCase\x20name}},{{pascalCase\x20name}}History>\x20{\x0a\x20\x20public\x20get\x20entity()\x20{\x0a\x20\x20\x20\x20return\x20{{pascalCase\x20name}}\x0a\x20\x20}\x0a\x0a\x20\x20public\x20get\x20historyEntity()\x20{\x0a\x20\x20\x20\x20return\x20{{pascalCase\x20name}}History\x0a\x20\x20}\x0a\x0a\x20\x20{{entityToJson}}\x0a\x0a\x20\x20async\x20beforeRemoveHistory(history:{{pascalCase\x20name}}History,entity:{{pascalCase\x20name}}){\x0a\x20\x20\x20\x20let\x20repo\x20=\x20getRepository({{pascalCase\x20name}}History);\x0a\x20\x20\x20\x20const\x20revNo\x20=\x20await\x20repo.createQueryBuilder()\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.select(\x27max(data_revision_no)\x27,\x20\x27rev_no\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.where(\x27domain_id\x20=\x20:domainId\x27,\x20{\x20domainId:\x20entity.domain.id\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.andWhere(\x27original_id\x20=\x20:originalId\x27,\x20{\x20originalId:\x20entity.id\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.getRawOne()\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20history.dataRevisionNo\x20=\x20revNo\x20?\x20revNo.rev_no\x20+\x201\x20:\x201;\x0a\x20\x20\x20\x20return\x20history;\x0a\x20\x20}\x0a}\x0a','long','Float','createServiceFiles','type-graphql','type\x20=>','/packages','-history.ts','COPY','createTypeText','Operato\x20Tool\x20Create\x20Service','\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}List\x20}\x20from\x20\x27./{{name}}-type\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Query\x20{\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20fetch\x20a\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20return\x20await\x20getRepository({{pascalCase\x20name}}).findOne({\x0a\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20}\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}List,\x20{\x20description:\x20\x27To\x20fetch\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{pluralCamelCase\x20name}}(@Args()\x20params:\x20ListParam,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}List>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20queryBuilder\x20=\x20getQueryBuilderFromListParams({\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20params,\x0a\x20\x20\x20\x20\x20\x20repository:\x20await\x20getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20const\x20convertedParams\x20=\x20convertListParams(params,\x20domain.id)\x0a\x20\x20\x20\x20const\x20[items,\x20total]\x20=\x20await\x20queryBuilder.getManyAndCount()\x0a\x0a\x20\x20\x20\x20return\x20{\x20items,\x20total\x20}\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20Domain)\x0a\x20\x20async\x20domain(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<Domain>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(Domain).findOneBy({id:{{camelCase\x20name}}.domainId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20updater(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.updaterId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20creator(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.creatorId})\x0a\x20\x20}\x0a}\x0a','createNoHistoryServiceFiels','Int','/event-subscriber.ts','sort','Entities,','dataProp','20jJYVvY','design:type','character\x20varying','/packages/','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a\x20\x20@Column(\x27simple-json\x27,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20@Field(type\x20=>\x20ScalarObject,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20historyJson?:\x20any\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','__decorate','existsPath','161lxhLfW','getRepository','-mutation.ts','-type.ts','creator_id','@Column({name:\x27','5RRnmUA','\x0aimport\x20{\x20ObjectType,\x20Field,\x20InputType,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0a\x0a@ObjectType()\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryList\x20{\x0a\x20\x20@Field(type\x20=>\x20[{{pascalCase\x20name}}History])\x0a\x20\x20items:\x20{{pascalCase\x20name}}History[]\x0a\x0a\x20\x20@Field(type\x20=>\x20Int)\x0a\x20\x20total:\x20number\x0a}\x0a','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','created_at','rank','createServicePath','\x20})','import\x20{\x20entities\x20as\x20','Resolver','@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})','updater','getFieldType','EntitySubscribers,','.ts','12gwtnRD','filter','toolCreateService','/service','tslib','@things-factory/resource-base','createDir','domain','\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryQuery\x20}\x20from\x20\x27./{{name}}-history-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryEntitySubscriber\x20}\x20from\x20\x27./event-subscriber\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}},\x20{{pascalCase\x20name}}History]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}HistoryQuery,\x20{{pascalCase\x20name}}Mutation]\x0aexport\x20const\x20subscribers\x20=\x20[{{pascalCase\x20name}}HistoryEntitySubscriber]\x0a\x0a','__metadata','number','createHistoryServiceFiles'];a0_0x22ca=function(){return _0x22ad2c;};return a0_0x22ca();}Object[a0_0x4e858d(0xfb)](exports,'__esModule',{'value':!0x0}),exports['OperatoToolCreateService']=void 0x0;const tslib_1=require(a0_0x4e858d(0xd6)),type_graphql_1=require(a0_0x4e858d(0x13c)),shell_1=require(a0_0x4e858d(0x11d)),resource_base_1=require(a0_0x4e858d(0xd7)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x4e858d(0xfc)),{plural:plural}=require(a0_0x4e858d(0x11a)),fs=require('fs');let OperatoToolCreateService=class{async['toolCreateService'](_0x252b68,_0x1f71e2){const _0x45a821=a0_0x4e858d,{domain:_0x54461c}=_0x1f71e2[_0x45a821(0x136)],_0x3b4e6d=await(0x0,shell_1[_0x45a821(0xbf)])(resource_base_1[_0x45a821(0xe7)])[_0x45a821(0x132)]({'where':{'id':_0x252b68}}),_0x482f13=await(0x0,shell_1['getRepository'])(resource_base_1['EntityColumn'])[_0x45a821(0x114)]({'where':{'domain':{'id':_0x54461c['id']},'entity':{'id':_0x3b4e6d['id']}}});let {name:_0xcd001='',bundle:_0x98458b=''}=_0x3b4e6d||{},_0x3f7211=this[_0x45a821(0x120)](),_0x54d6d3=kebabCase(_0xcd001);return await this[_0x45a821(0xc9)](_0x3f7211,_0x98458b,_0x54d6d3),await this[_0x45a821(0x13b)](_0x3f7211,_0x98458b,_0xcd001,_0x54d6d3,_0x3b4e6d,_0x482f13),!0x0;}async['createServiceFiles'](_0x417a57,_0xfdfc09,_0x881991,_0x1cfa06,_0x1075ee,_0x113465){const _0x1fb1b3=a0_0x4e858d;let _0x2c7515={'name':_0x1cfa06,'tableName':_0x1075ee['tableName'],'pascalCaseName':startCase(camelCase(_0x881991))[_0x1fb1b3(0xe5)](/ /g,''),'camelCaseName':camelCase(_0x881991),'snakeCaseName':snakeCase(_0x881991),'pluralPascalCaseName':startCase(camelCase(plural(_0x881991)))['replace'](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x881991))},_0x25e020=_0x417a57+_0x1fb1b3(0x14d)+_0xfdfc09+'/server/service/';['JSON',_0x1fb1b3(0x140)]['includes'](_0x1075ee[_0x1fb1b3(0x149)])?await this[_0x1fb1b3(0xdd)](_0x25e020,_0x1cfa06,_0x1075ee,_0x113465,_0x2c7515):await this[_0x1fb1b3(0x144)](_0x25e020,_0x1cfa06,_0x1075ee,_0x113465,_0x2c7515);}async[a0_0x4e858d(0xdd)](_0x4e5fdf,_0x3a71dd,_0xd09b3e,_0x2a51b7,_0x230898){const _0x189755=a0_0x4e858d;await this['writeFile'](_0x4e5fdf+(_0x3a71dd+_0x189755(0xfe)),serviceHistoryIndex,_0x230898);let _0xc71abc=this[_0x189755(0xef)](_0xd09b3e,_0x2a51b7);await this[_0x189755(0xf7)](_0x4e5fdf+(_0x3a71dd+'/'+_0x3a71dd+_0x189755(0xd1)),_0xc71abc,_0x230898),await this['writeFile'](_0x4e5fdf+(_0x3a71dd+'/'+_0x3a71dd+'-query.ts'),serviceQuery,_0x230898),await this[_0x189755(0xf7)](_0x4e5fdf+(_0x3a71dd+'/'+_0x3a71dd+_0x189755(0xc0)),serviceMutation,_0x230898);let _0x1912c3=this[_0x189755(0x141)](_0x2a51b7);await this[_0x189755(0xf7)](_0x4e5fdf+(_0x3a71dd+'/'+_0x3a71dd+_0x189755(0xc1)),_0x1912c3,_0x230898);let _0x23d33c=this[_0x189755(0xed)](_0xd09b3e,_0x2a51b7);await this[_0x189755(0xf7)](_0x4e5fdf+(_0x3a71dd+'/'+_0x3a71dd+_0x189755(0x13f)),_0x23d33c,_0x230898);let _0x4da8ba='';_0x189755(0xf2)==_0xd09b3e['dataProp']?(_0x4da8ba='\x0a\x20\x20public\x20createHistoryEntity(manager,\x20entity)\x20{\x0a\x20\x20\x20\x20let\x20history\x20=\x20manager.create(this.historyEntity,\x20entity);\x0a\x20\x20\x20\x20history.historyJson\x20=\x20JSON.stringify(entity);\x0a\x20\x20\x20\x20return\x20history;\x0a\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20',await this[_0x189755(0xf7)](_0x4e5fdf+(_0x3a71dd+_0x189755(0x146)),serviceEntitySubscriber,_0x230898)):_0x4da8ba='';let _0x367787=serviceEntitySubscriber[_0x189755(0xe5)](/{{entityToJson}}/g,_0x4da8ba);await this[_0x189755(0xf7)](_0x4e5fdf+(_0x3a71dd+_0x189755(0x146)),_0x367787,_0x230898),await this[_0x189755(0xf7)](_0x4e5fdf+(_0x3a71dd+'/'+_0x3a71dd+'-history-query.ts'),serviceHistoryQuery,_0x230898),await this[_0x189755(0xf7)](_0x4e5fdf+(_0x3a71dd+'/'+_0x3a71dd+_0x189755(0x11b)),sereviceHistoryType,_0x230898);let _0x29d5b4=_0x4e5fdf+_0x189755(0x119);0x0==await this[_0x189755(0xbd)](_0x29d5b4)&&await this[_0x189755(0xf7)](_0x29d5b4,allIndex,_0x230898);let _0x195bb7=await fs[_0x189755(0x11e)](_0x29d5b4,_0x189755(0x105));_0x195bb7[_0x189755(0xf1)](_0x189755(0xfd)+_0x230898[_0x189755(0x10b)]+'/'+_0x230898[_0x189755(0x10b)]+_0x189755(0x122))<0x0&&(_0x195bb7=_0x195bb7[_0x189755(0xe5)](/\/\* EXPORT ENTITY TYPES \*\//,'/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./'+_0x230898[_0x189755(0x10b)]+'/'+_0x230898[_0x189755(0x10b)]+_0x189755(0x122))),_0x195bb7['indexOf'](_0x189755(0xfd)+_0x230898[_0x189755(0x10b)]+'/'+_0x230898[_0x189755(0x10b)]+'\x27')<0x0&&(_0x195bb7=_0x195bb7[_0x189755(0xe5)](/\/\* EXPORT ENTITY TYPES \*\//,'/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./'+_0x230898['name']+'/'+_0x230898[_0x189755(0x10b)]+'\x27')),_0x195bb7[_0x189755(0xf1)](_0x189755(0xcb)+_0x230898[_0x189755(0x121)]+_0x189755(0x115)+_0x230898[_0x189755(0x121)]+_0x189755(0xf6)+_0x230898[_0x189755(0x121)]+_0x189755(0xe1)+_0x230898[_0x189755(0x10b)]+'\x27')<0x0&&(_0x195bb7=_0x195bb7[_0x189755(0xe5)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x189755(0xc6)+_0x230898[_0x189755(0x121)]+_0x189755(0x115)+_0x230898[_0x189755(0x121)]+_0x189755(0xf6)+_0x230898[_0x189755(0x121)]+_0x189755(0xe1)+_0x230898[_0x189755(0x10b)]+'\x27')),_0x195bb7[_0x189755(0xf1)](_0x189755(0xf3)+_0x230898[_0x189755(0x121)]+_0x189755(0x148))<0x0&&(_0x195bb7=_0x195bb7['replace'](/\/\* ENTITIES \*\//,_0x189755(0xeb)+_0x230898[_0x189755(0x121)]+'Entities,')),_0x195bb7[_0x189755(0xf1)](_0x189755(0xf3)+_0x230898['pascalCaseName']+_0x189755(0x10a))<0x0&&(_0x195bb7=_0x195bb7[_0x189755(0xe5)](/\/\* RESOLVER CLASSES \*\//,'/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...'+_0x230898[_0x189755(0x121)]+_0x189755(0x10a))),_0x195bb7[_0x189755(0xf1)](_0x189755(0xf3)+_0x230898[_0x189755(0x121)]+'EntitySubscribers,')<0x0&&(_0x195bb7=_0x195bb7[_0x189755(0xe5)](/\/\* SUBSCRIBERS \*\//,_0x189755(0x135)+_0x230898[_0x189755(0x121)]+_0x189755(0xd0))),await this['writeFile'](_0x29d5b4,_0x195bb7,_0x230898);}async['createNoHistoryServiceFiels'](_0x13b3a1,_0x16bafc,_0x2cd8e0,_0x2d5c8b,_0x346f2c){const _0xe4bc9e=a0_0x4e858d;await this[_0xe4bc9e(0xf7)](_0x13b3a1+(_0x16bafc+'/index.ts'),serviceIndex,_0x346f2c),await this['writeFile'](_0x13b3a1+(_0x16bafc+'/'+_0x16bafc+'-query.ts'),serviceQuery,_0x346f2c),await this['writeFile'](_0x13b3a1+(_0x16bafc+'/'+_0x16bafc+'-mutation.ts'),serviceMutation,_0x346f2c);let _0x47dd31=this['createEntityText'](_0x2cd8e0,_0x2d5c8b);await this[_0xe4bc9e(0xf7)](_0x13b3a1+(_0x16bafc+'/'+_0x16bafc+_0xe4bc9e(0xd1)),_0x47dd31,_0x346f2c);let _0x492bb4=this[_0xe4bc9e(0x141)](_0x2d5c8b);await this[_0xe4bc9e(0xf7)](_0x13b3a1+(_0x16bafc+'/'+_0x16bafc+'-type.ts'),_0x492bb4,_0x346f2c);let _0x3e7820=_0x13b3a1+_0xe4bc9e(0x119);0x0==await this[_0xe4bc9e(0xbd)](_0x3e7820)&&await this['writeFile'](_0x3e7820,allIndex,_0x346f2c);let _0x31087d=await fs['readFileSync'](_0x3e7820,'utf8');_0x31087d[_0xe4bc9e(0xf1)](_0xe4bc9e(0xfd)+_0x346f2c[_0xe4bc9e(0x10b)]+'/'+_0x346f2c[_0xe4bc9e(0x10b)]+'\x27')<0x0&&(_0x31087d=_0x31087d[_0xe4bc9e(0xe5)](/\/\* EXPORT ENTITY TYPES \*\//,'/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./'+_0x346f2c[_0xe4bc9e(0x10b)]+'/'+_0x346f2c['name']+'\x27')),_0x31087d[_0xe4bc9e(0xf1)]('import\x20{\x20entities\x20as\x20'+_0x346f2c[_0xe4bc9e(0x121)]+'Entities,\x20resolvers\x20as\x20'+_0x346f2c[_0xe4bc9e(0x121)]+_0xe4bc9e(0xe3)+_0x346f2c[_0xe4bc9e(0x10b)]+'\x27')<0x0&&(_0x31087d=_0x31087d[_0xe4bc9e(0xe5)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0xe4bc9e(0xc6)+_0x346f2c[_0xe4bc9e(0x121)]+_0xe4bc9e(0x115)+_0x346f2c[_0xe4bc9e(0x121)]+'Resolvers\x20}\x20from\x20\x27./'+_0x346f2c['name']+'\x27')),_0x31087d[_0xe4bc9e(0xf1)]('...'+_0x346f2c[_0xe4bc9e(0x121)]+_0xe4bc9e(0x148))<0x0&&(_0x31087d=_0x31087d['replace'](/\/\* ENTITIES \*\//,_0xe4bc9e(0xeb)+_0x346f2c[_0xe4bc9e(0x121)]+'Entities,')),_0x31087d[_0xe4bc9e(0xf1)](_0xe4bc9e(0xf3)+_0x346f2c[_0xe4bc9e(0x121)]+_0xe4bc9e(0x10a))<0x0&&(_0x31087d=_0x31087d[_0xe4bc9e(0xe5)](/\/\* RESOLVER CLASSES \*\//,_0xe4bc9e(0x123)+_0x346f2c[_0xe4bc9e(0x121)]+'Resolvers,')),await this[_0xe4bc9e(0xf7)](_0x3e7820,_0x31087d,_0x346f2c);}[a0_0x4e858d(0x141)](_0x151bb1){const _0x271f70=a0_0x4e858d;let _0x5b10e1=sereviceType,_0x1a1f53=_0x151bb1[_0x271f70(0xea)](_0x2ed88d=>{const _0x55cfad=_0x271f70;if('id'==_0x2ed88d[_0x55cfad(0x10b)])return'';if(_0x55cfad(0x12c)==_0x2ed88d[_0x55cfad(0x10b)])return'';if('created_at'==_0x2ed88d[_0x55cfad(0x10b)])return'';if('updated_at'==_0x2ed88d[_0x55cfad(0x10b)])return'';if(_0x55cfad(0xc2)==_0x2ed88d[_0x55cfad(0x10b)])return'';if(_0x55cfad(0x10f)==_0x2ed88d[_0x55cfad(0x10b)])return'';let _0x383c3c=this[_0x55cfad(0xcf)](_0x2ed88d),_0x278df0=this[_0x55cfad(0x127)](_0x2ed88d),_0x3fe40f=camelCase(_0x2ed88d['name']);return'\x20\x20'+('@Field('+(0x0==_0x383c3c[_0x55cfad(0xf5)]?'':_0x55cfad(0x13d)+_0x383c3c+',')+'\x20{\x20nullable:\x20'+_0x2ed88d[_0x55cfad(0x10d)]+_0x55cfad(0xca))+_0x55cfad(0x102)+(''+_0x3fe40f+(_0x2ed88d[_0x55cfad(0x10d)]?'?':'')+':\x20'+_0x278df0)+'\x0a';});_0x5b10e1=_0x5b10e1[_0x271f70(0xe5)](/{{newTypeColumns}}/g,_0x1a1f53[_0x271f70(0x11f)]('\x0a'));let _0x319257=_0x151bb1[_0x271f70(0xea)](_0x228806=>{const _0x3d7a92=_0x271f70;if('id'==_0x228806[_0x3d7a92(0x10b)])return'';if(_0x3d7a92(0x12c)==_0x228806[_0x3d7a92(0x10b)])return'';if(_0x3d7a92(0xc7)==_0x228806[_0x3d7a92(0x10b)])return'';if('updated_at'==_0x228806[_0x3d7a92(0x10b)])return'';if('creator_id'==_0x228806[_0x3d7a92(0x10b)])return'';if('updater_id'==_0x228806[_0x3d7a92(0x10b)])return'';let _0x304f1c=this[_0x3d7a92(0xcf)](_0x228806),_0x2d124a=this['getColTxtType'](_0x228806);_0x228806[_0x3d7a92(0x10d)]=!0x0;let _0x21fe24=camelCase(_0x228806[_0x3d7a92(0x10b)]);return'\x20\x20'+(_0x3d7a92(0x126)+(0x0==_0x304f1c[_0x3d7a92(0xf5)]?'':_0x3d7a92(0x13d)+_0x304f1c+',')+_0x3d7a92(0x12a)+_0x228806[_0x3d7a92(0x10d)]+'\x20})')+_0x3d7a92(0x102)+(''+_0x21fe24+(_0x228806[_0x3d7a92(0x10d)]?'?':'')+':\x20'+_0x2d124a)+'\x0a';});return _0x5b10e1=_0x5b10e1['replace'](/{{patchTypeColumns}}/g,_0x319257[_0x271f70(0x11f)]('\x0a')),_0x5b10e1;}[a0_0x4e858d(0xef)](_0x29cc11,_0x49f0ac){const _0x2aeb17=a0_0x4e858d;let _0x148633=serviceEntity,_0x36fe0=_0x49f0ac['sort'](function(_0x138752,_0x3c41a3){const _0x1990b1=a0_0x3c92;return _0x138752['rank']-_0x3c41a3[_0x1990b1(0xc8)];})[_0x2aeb17(0xea)](_0x9731f7=>this[_0x2aeb17(0xde)](_0x9731f7));[_0x2aeb17(0x140),_0x2aeb17(0xf2)][_0x2aeb17(0xe9)](_0x29cc11['dataProp'])&&_0x36fe0[_0x2aeb17(0x101)]('\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201'),_0x148633=_0x148633[_0x2aeb17(0xe5)](/{{entityColumns}}/g,_0x36fe0[_0x2aeb17(0x11f)]('\x0a'));let _0x521137='',_0xab8492=_0x49f0ac[_0x2aeb17(0xd3)](_0x19755f=>_0x19755f[_0x2aeb17(0x12e)]&&_0x19755f['uniqRank']>0x0)[_0x2aeb17(0x147)](function(_0x6469eb,_0x3dcb6c){const _0x514768=_0x2aeb17;return _0x6469eb[_0x514768(0x12e)]-_0x3dcb6c[_0x514768(0x12e)];});if(_0xab8492[_0x2aeb17(0xf5)]>0x0){_0x521137=_0x2aeb17(0xcd);let _0xf9c1ec=_0xab8492['map'](_0x15fb89=>{const _0x1f68b3=_0x2aeb17;let _0xd6e259=_0x15fb89[_0x1f68b3(0x10b)];return _0x1f68b3(0x12c)==_0x15fb89[_0x1f68b3(0x10b)]&&(_0xd6e259=_0x1f68b3(0xd9)),_0x1f68b3(0xc2)==_0x15fb89[_0x1f68b3(0x10b)]&&(_0xd6e259=_0x1f68b3(0xe4)),_0x1f68b3(0x10f)==_0x15fb89[_0x1f68b3(0x10b)]&&(_0xd6e259=_0x1f68b3(0xce)),_0x1f68b3(0x110)+camelCase(_0xd6e259);});_0x521137=_0x521137[_0x2aeb17(0xe5)](/{{indexColumns}}/g,_0xf9c1ec[_0x2aeb17(0x11f)](','));}return _0x148633=_0x148633['replace'](/{{indexAnn}}/g,_0x521137),_0x148633;}[a0_0x4e858d(0xed)](_0x134753,_0x179445){const _0x5dd72e=a0_0x4e858d;let _0x55c1e1=_0x5dd72e(0xf2)==_0x134753['dataProp']?serviceEntityHistJson:serviceEntityHistCopy,_0x3bb088=_0x179445[_0x5dd72e(0x147)](function(_0x2db222,_0x13aad3){const _0x26a8fd=_0x5dd72e;return _0x2db222[_0x26a8fd(0xc8)]-_0x13aad3[_0x26a8fd(0xc8)];})[_0x5dd72e(0xea)](_0x27f59b=>this[_0x5dd72e(0xde)](_0x27f59b));return _0x55c1e1=_0x55c1e1[_0x5dd72e(0xe5)](/{{entityColumns}}/g,_0x3bb088[_0x5dd72e(0x11f)]('\x0a')),_0x55c1e1;}['columnToEntityColumn'](_0x37a62f){const _0x455e54=a0_0x4e858d;if('id'==_0x37a62f['name'])return'';if(_0x455e54(0x12c)==_0x37a62f[_0x455e54(0x10b)])return'';if(_0x455e54(0xc7)==_0x37a62f[_0x455e54(0x10b)])return'';if('updated_at'==_0x37a62f[_0x455e54(0x10b)])return'';if(_0x455e54(0xc2)==_0x37a62f[_0x455e54(0x10b)])return'';if('updater_id'==_0x37a62f[_0x455e54(0x10b)])return'';let _0x32eb17=_0x37a62f[_0x455e54(0xe6)];_0x455e54(0x109)==_0x37a62f['colType']&&(_0x32eb17=_0x455e54(0x125)),_0x455e54(0x139)==_0x37a62f[_0x455e54(0xe6)]&&(_0x32eb17=_0x455e54(0x128)),_0x455e54(0x11c)==_0x37a62f[_0x455e54(0xe6)]&&(_0x32eb17=_0x455e54(0x14c)),_0x455e54(0xfa)==_0x37a62f[_0x455e54(0xe6)]&&(_0x32eb17=_0x455e54(0xdf));let _0x1b8aa6='';'string'==_0x37a62f[_0x455e54(0xe6)]&&(_0x1b8aa6=_0x37a62f[_0x455e54(0xec)]);let _0x319ae5=this['getFieldType'](_0x37a62f),_0x291538=this[_0x455e54(0x127)](_0x37a62f),_0x142436=camelCase(_0x37a62f[_0x455e54(0x10b)]);return'\x20\x20'+(_0x455e54(0xc3)+_0x37a62f['name']+'\x27,\x20type:\x20\x27'+_0x32eb17+_0x455e54(0x113)+_0x37a62f[_0x455e54(0x10d)]+'\x20'+(0x0==_0x1b8aa6[_0x455e54(0xf5)]?'':',length:'+_0x1b8aa6)+'\x20})')+_0x455e54(0x102)+(_0x455e54(0x126)+(0x0==_0x319ae5[_0x455e54(0xf5)]?'':'type\x20=>'+_0x319ae5+',')+_0x455e54(0x12a)+_0x37a62f['nullable']+_0x455e54(0xca))+'\x0a\x20\x20'+(''+_0x142436+(_0x37a62f[_0x455e54(0x10d)]?'?':'')+':\x20'+_0x291538)+'\x0a';}[a0_0x4e858d(0xcf)](_0x2ba4c1){const _0x10f40b=a0_0x4e858d;let _0x56895d='';return'double'==_0x2ba4c1[_0x10f40b(0xe6)]&&(_0x56895d=_0x10f40b(0x13a)),_0x10f40b(0x12b)==_0x2ba4c1['colType']&&(_0x56895d=_0x10f40b(0x13a)),_0x10f40b(0x139)==_0x2ba4c1[_0x10f40b(0xe6)]&&(_0x56895d=_0x10f40b(0x145)),_0x10f40b(0x116)==_0x2ba4c1['colType']&&(_0x56895d=_0x10f40b(0x145)),_0x56895d;}[a0_0x4e858d(0x127)](_0x5be608){const _0x3b415d=a0_0x4e858d;let _0x53a7e9=_0x5be608['colType'];return'decimal'==_0x5be608[_0x3b415d(0xe6)]&&(_0x53a7e9='number'),_0x3b415d(0x109)==_0x5be608[_0x3b415d(0xe6)]&&(_0x53a7e9=_0x3b415d(0xdc)),'float'==_0x5be608[_0x3b415d(0xe6)]&&(_0x53a7e9=_0x3b415d(0xdc)),'integer'==_0x5be608[_0x3b415d(0xe6)]&&(_0x53a7e9=_0x3b415d(0xdc)),_0x3b415d(0x139)==_0x5be608[_0x3b415d(0xe6)]&&(_0x53a7e9=_0x3b415d(0xdc)),'datetime'==_0x5be608[_0x3b415d(0xe6)]&&(_0x53a7e9=_0x3b415d(0x10e)),'date'==_0x5be608[_0x3b415d(0xe6)]&&(_0x53a7e9=_0x3b415d(0x10e)),_0x3b415d(0xf9)==_0x5be608[_0x3b415d(0xe6)]&&(_0x53a7e9=_0x3b415d(0x11c)),_0x53a7e9;}async[a0_0x4e858d(0xf7)](_0x233752,_0x12969f,_0x511f95){const _0x193d61=a0_0x4e858d;await fs[_0x193d61(0x10c)](_0x233752,this[_0x193d61(0x111)](_0x12969f,_0x511f95),_0x193d61(0x105));}[a0_0x4e858d(0x111)](_0x4ec257,_0x1c996b){const _0x53f407=a0_0x4e858d;return _0x4ec257[_0x53f407(0xe5)](/{{pascalCase name}}/g,_0x1c996b[_0x53f407(0x121)])['replace'](/{{camelCase name}}/g,_0x1c996b['camelCaseName'])[_0x53f407(0xe5)](/{{snakeCase name}}/g,_0x1c996b[_0x53f407(0x100)])[_0x53f407(0xe5)](/{{pluralPascalCase name}}/g,_0x1c996b[_0x53f407(0x134)])[_0x53f407(0xe5)](/{{pluralCamelCase name}}/g,_0x1c996b[_0x53f407(0x133)])[_0x53f407(0xe5)](/{{tableName}}/g,_0x1c996b[_0x53f407(0x103)])[_0x53f407(0xe5)](/{{name}}/g,_0x1c996b[_0x53f407(0x10b)]);}async[a0_0x4e858d(0xc9)](_0x4e10fc,_0x4e6420,_0x4b6fa7){const _0x456206=a0_0x4e858d;let _0x33b67c=_0x4e10fc+_0x456206(0x13e);await this[_0x456206(0xd8)](_0x33b67c),_0x33b67c=_0x33b67c+'/'+_0x4e6420,await this[_0x456206(0xd8)](_0x33b67c),_0x33b67c+=_0x456206(0x118),await this['createDir'](_0x33b67c),_0x33b67c+=_0x456206(0xd5),await this[_0x456206(0xd8)](_0x33b67c),_0x33b67c=_0x33b67c+'/'+_0x4b6fa7,await this[_0x456206(0xd8)](_0x33b67c);}[a0_0x4e858d(0x120)](){const _0x27e9fc=a0_0x4e858d;let _0x544cde=process[_0x27e9fc(0xee)][_0x27e9fc(0xf4)][_0x27e9fc(0x108)]('/'),_0x89a522=[];for(let _0x1abfe5=0x0;_0x1abfe5<_0x544cde['length']&&'packages'!=_0x544cde[_0x1abfe5];_0x1abfe5++)_0x89a522[_0x27e9fc(0x101)](_0x544cde[_0x1abfe5]);return _0x89a522['join']('/');}async[a0_0x4e858d(0xd8)](_0x36ce60){const _0x48328d=a0_0x4e858d;0x0==await this['existsPath'](_0x36ce60)&&fs[_0x48328d(0xe2)](_0x36ce60);}async[a0_0x4e858d(0xbd)](_0x389c66){const _0x12ce85=a0_0x4e858d;return await fs[_0x12ce85(0x112)](_0x389c66);}};tslib_1[a0_0x4e858d(0xbc)]([(0x0,type_graphql_1['Query'])(_0x39e560=>Boolean,{'description':a0_0x4e858d(0x142)}),tslib_1[a0_0x4e858d(0x137)](0x0,(0x0,type_graphql_1['Arg'])('id')),tslib_1[a0_0x4e858d(0x137)](0x1,(0x0,type_graphql_1['Ctx'])()),tslib_1['__metadata'](a0_0x4e858d(0x14b),Function),tslib_1[a0_0x4e858d(0xdb)]('design:paramtypes',[String,Object]),tslib_1['__metadata']('design:returntype',Promise)],OperatoToolCreateService[a0_0x4e858d(0x117)],a0_0x4e858d(0xd4),null),OperatoToolCreateService=tslib_1[a0_0x4e858d(0xbc)]([(0x0,type_graphql_1[a0_0x4e858d(0xcc)])()],OperatoToolCreateService),exports[a0_0x4e858d(0x129)]=OperatoToolCreateService;function a0_0x3c92(_0x5f0db6,_0x40f8fa){const _0x22caea=a0_0x22ca();return a0_0x3c92=function(_0x3c9278,_0x307762){_0x3c9278=_0x3c9278-0xbb;let _0x2673d1=_0x22caea[_0x3c9278];return _0x2673d1;},a0_0x3c92(_0x5f0db6,_0x40f8fa);}const allIndex='\x0a/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0a\x0a/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0a\x0aexport\x20const\x20entities\x20=\x20[\x20\x20\x0a\x20\x20/*\x20ENTITIES\x20*/\x0a]\x20\x0a\x0a\x0aexport\x20const\x20schema\x20=\x20{\x0a\x20\x20resolverClasses:\x20[\x0a\x20\x20\x20\x20/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x20\x20]\x20\x0a}\x0a\x0aexport\x20const\x20subscribers\x20=\x20[\x0a\x20\x20/*\x20SUBSCRIBERS\x20*/\x0a]\x0a',serviceIndex=a0_0x4e858d(0xe0),serviceHistoryIndex=a0_0x4e858d(0xda),serviceQuery=a0_0x4e858d(0x143),serviceHistoryQuery=a0_0x4e858d(0x131),serviceMutation='\x0aimport\x20{\x20Resolver,\x20Mutation,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20In\x20}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20New{{pascalCase\x20name}},\x20{{pascalCase\x20name}}Patch\x20}\x20from\x20\x27./{{name}}-type\x27\x0aimport\x20{\x20getRepository\x20}\x20from\x20\x27@things-factory/shell\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Mutation\x20{\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20create\x20new\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20create{{pascalCase\x20name}}(@Arg(\x27{{camelCase\x20name}}\x27)\x20{{camelCase\x20name}}:\x20New{{pascalCase\x20name}},\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20return\x20await\x20tx.getRepository({{pascalCase\x20name}}).save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20modify\x20{{pascalCase\x20name}}\x20information\x27\x20})\x0a\x20\x20async\x20update{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27id\x27)\x20id:\x20string,\x0a\x20\x20\x20\x20@Arg(\x27patch\x27)\x20patch:\x20{{pascalCase\x20name}}Patch,\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20repository\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20repository.findOne(\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20)\x0a\x0a\x20\x20\x20\x20return\x20await\x20repository.save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20...patch,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20[{{pascalCase\x20name}}],\x20{\x20description:\x20\x22To\x20modify\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20information\x22\x20})\x0a\x20\x20async\x20updateMultiple{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27patches\x27,\x20type\x20=>\x20[{{pascalCase\x20name}}Patch])\x20patches:\x20{{pascalCase\x20name}}Patch[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}[]>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20results\x20=\x20[]\x0a\x20\x20\x20\x20const\x20_createRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27+\x27)\x0a\x20\x20\x20\x20const\x20_updateRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27M\x27)\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}Repo\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x0a\x20\x20\x20\x20if\x20(_createRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_createRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20newRecord\x20=\x20_createRecords[i]\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...newRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27+\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20if\x20(_updateRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_updateRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20updRecord\x20=\x20_updateRecords[i]\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20{{camelCase\x20name}}Repo.findOne({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id:updRecord.id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...updRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27M\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20return\x20results\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20delete{{pascalCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove({\x20domain,\x20id,\x20updater:user\x20})\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20multiple\x20{{camelCase\x20name}}s\x27\x20})\x0a\x20\x20async\x20delete{{pluralPascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27ids\x27,\x20type\x20=>\x20[String])\x20ids:\x20string[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20delEntitis\x20=\x20ids.map(id=>{\x0a\x20\x20\x20\x20\x20\x20return\x20{domain,id,updater:user}\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove(delEntitis)\x0a\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a}\x0a',sereviceType=a0_0x4e858d(0x12f),sereviceHistoryType=a0_0x4e858d(0xc5),serviceEntity=a0_0x4e858d(0x106),serviceEntityHistCopy='\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a',serviceEntityHistJson=a0_0x4e858d(0xbb),serviceEntitySubscriber=a0_0x4e858d(0x138);
@@ -1 +1 @@
1
- 'use strict';const a0_0x6c5ea7=a0_0x5307;function a0_0x5307(_0x1cc6ab,_0x671e83){const _0x3acbf0=a0_0x3acb();return a0_0x5307=function(_0x5307c7,_0x3e7982){_0x5307c7=_0x5307c7-0x125;let _0x1836c9=_0x3acbf0[_0x5307c7];return _0x1836c9;},a0_0x5307(_0x1cc6ab,_0x671e83);}(function(_0x305bbd,_0x23f79f){const _0x13bc9a=a0_0x5307,_0x2e83aa=_0x305bbd();while(!![]){try{const _0x1f3e10=parseInt(_0x13bc9a(0x135))/0x1*(-parseInt(_0x13bc9a(0x140))/0x2)+-parseInt(_0x13bc9a(0x14d))/0x3*(-parseInt(_0x13bc9a(0x133))/0x4)+parseInt(_0x13bc9a(0x126))/0x5*(parseInt(_0x13bc9a(0x12f))/0x6)+parseInt(_0x13bc9a(0x14c))/0x7+-parseInt(_0x13bc9a(0x137))/0x8+parseInt(_0x13bc9a(0x134))/0x9*(parseInt(_0x13bc9a(0x144))/0xa)+parseInt(_0x13bc9a(0x131))/0xb*(-parseInt(_0x13bc9a(0x13a))/0xc);if(_0x1f3e10===_0x23f79f)break;else _0x2e83aa['push'](_0x2e83aa['shift']());}catch(_0x21c5f3){_0x2e83aa['push'](_0x2e83aa['shift']());}}}(a0_0x3acb,0xe7531));function a0_0x3acb(){const _0x544261=['../../errors/license-error','Studio','@things-factory/menu-base','30180FDQYGh','map','forEach','select','checkTarget','from','menu','Permissions\x20For\x20Tailor\x20Tool','11148676mlPLGb','9MQIagj','getPermission','5IEFiHu','where','(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)','OVER_LIMIT','getCount','@things-factory/shell','createQueryBuilder','id\x20!=\x20:id','@things-factory/operato-license-checker','920454eEFvay','split','39919stbkix','Menu','1657828TbhDFv','4374FxuYed','1NaXCOm','getRepository','11406368OBDzkn','LicenseError','INVALID_LICENSE','1836oFFgrJ','checkStudioPermission','andWhere','checkStudioTemplateIsOverLimit','manager','defineProperty','3055316WmriXS'];a0_0x3acb=function(){return _0x544261;};return a0_0x3acb();}Object[a0_0x6c5ea7(0x13f)](exports,'__esModule',{'value':!0x0}),exports['checkStudioTemplateIsOverLimit']=exports[a0_0x6c5ea7(0x13b)]=void 0x0;const operato_license_checker_1=require(a0_0x6c5ea7(0x12e)),shell_1=require(a0_0x6c5ea7(0x12b)),menu_base_1=require(a0_0x6c5ea7(0x143)),license_error_1=require(a0_0x6c5ea7(0x141));async function checkStudioPermission(){const _0x4bb6f5=a0_0x6c5ea7;let _0x1274be=((0x0,operato_license_checker_1[_0x4bb6f5(0x125)])(_0x4bb6f5(0x14b))||',')[_0x4bb6f5(0x130)](',')[_0x4bb6f5(0x145)](_0x82ff24=>_0x82ff24['trim']()),_0x391c3a=!0x1;return _0x1274be[_0x4bb6f5(0x146)](_0x584948=>{const _0x16fd9b=_0x4bb6f5;_0x584948['includes'](_0x16fd9b(0x142))&&(_0x391c3a=!0x0);}),_0x391c3a;}async function checkStudioTemplateIsOverLimit(_0x358645,_0x377dbb){const _0x392962=a0_0x6c5ea7;if(0x0==await checkStudioPermission())throw new license_error_1[(_0x392962(0x138))]({'errorCode':_0x377dbb['t'](license_error_1[_0x392962(0x138)]['ERROR_CODES'][_0x392962(0x139)])});var _0x1876dc=0x0;if(_0x1876dc=_0x358645&&''!=_0x358645?await(0x0,shell_1['getRepository'])(menu_base_1['Menu'])[_0x392962(0x13e)]['createQueryBuilder']()[_0x392962(0x147)](_0x392962(0x14a))['from'](menu_base_1[_0x392962(0x132)],_0x392962(0x14a))[_0x392962(0x127)](_0x392962(0x12d),{'id':_0x358645})[_0x392962(0x13c)](_0x392962(0x128))[_0x392962(0x12a)]()+0x1:await(0x0,shell_1[_0x392962(0x136)])(menu_base_1[_0x392962(0x132)])[_0x392962(0x13e)][_0x392962(0x12c)]()[_0x392962(0x147)](_0x392962(0x14a))[_0x392962(0x149)](menu_base_1[_0x392962(0x132)],_0x392962(0x14a))[_0x392962(0x127)](_0x392962(0x128))[_0x392962(0x12a)]()+0x1,!(0x0,operato_license_checker_1[_0x392962(0x148)])(_0x1876dc))throw new license_error_1[(_0x392962(0x138))]({'errorCode':_0x377dbb['t'](license_error_1[_0x392962(0x138)]['ERROR_CODES'][_0x392962(0x129)])});return!0x0;}exports[a0_0x6c5ea7(0x13b)]=checkStudioPermission,exports[a0_0x6c5ea7(0x13d)]=checkStudioTemplateIsOverLimit;
1
+ 'use strict';const a0_0x3e1004=a0_0x4813;function a0_0x4813(_0xf03298,_0x4df2bc){const _0x3d1030=a0_0x3d10();return a0_0x4813=function(_0x48131e,_0x1c897a){_0x48131e=_0x48131e-0x196;let _0x5da347=_0x3d1030[_0x48131e];return _0x5da347;},a0_0x4813(_0xf03298,_0x4df2bc);}(function(_0x11c0a2,_0x142c50){const _0x34c82b=a0_0x4813,_0x371473=_0x11c0a2();while(!![]){try{const _0x54e396=-parseInt(_0x34c82b(0x1ab))/0x1+parseInt(_0x34c82b(0x1a4))/0x2+parseInt(_0x34c82b(0x1a8))/0x3*(parseInt(_0x34c82b(0x1b9))/0x4)+parseInt(_0x34c82b(0x196))/0x5*(parseInt(_0x34c82b(0x19e))/0x6)+-parseInt(_0x34c82b(0x1af))/0x7*(-parseInt(_0x34c82b(0x1ae))/0x8)+parseInt(_0x34c82b(0x1a5))/0x9*(parseInt(_0x34c82b(0x1b5))/0xa)+-parseInt(_0x34c82b(0x19d))/0xb;if(_0x54e396===_0x142c50)break;else _0x371473['push'](_0x371473['shift']());}catch(_0x75f96){_0x371473['push'](_0x371473['shift']());}}}(a0_0x3d10,0xad8e1));Object['defineProperty'](exports,'__esModule',{'value':!0x0}),exports['checkStudioTemplateIsOverLimit']=exports[a0_0x3e1004(0x1b1)]=void 0x0;const operato_license_checker_1=require(a0_0x3e1004(0x19f)),shell_1=require(a0_0x3e1004(0x1ad)),menu_base_1=require(a0_0x3e1004(0x1b3)),license_error_1=require(a0_0x3e1004(0x198));async function checkStudioPermission(){const _0x5acc78=a0_0x3e1004;let _0x263e26=((0x0,operato_license_checker_1[_0x5acc78(0x19b)])('Permissions\x20For\x20Tailor\x20Tool')||',')[_0x5acc78(0x1a9)](',')['map'](_0x4120e3=>_0x4120e3[_0x5acc78(0x1b6)]()),_0xd0fafe=!0x1;return _0x263e26[_0x5acc78(0x1ba)](_0x1577c0=>{const _0x177c2d=_0x5acc78;_0x1577c0[_0x177c2d(0x1b0)]('Studio')&&(_0xd0fafe=!0x0);}),_0xd0fafe;}function a0_0x3d10(){const _0x51b1f4=['trim','ERROR_CODES','INVALID_LICENSE','172acdPOe','forEach','createQueryBuilder','Menu','20Tjurwz','getRepository','../../errors/license-error','id\x20!=\x20:id','(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)','getPermission','menu','22183579UTGRlt','1369302nsuptD','@things-factory/operato-license-checker','where','getCount','andWhere','OVER_LIMIT','2313610WyWWgE','3467655hDWqFs','manager','from','39213HBltqk','split','checkTarget','831126mnGzRC','select','@things-factory/shell','3688fLNBXb','8225eCpQLK','includes','checkStudioPermission','checkStudioTemplateIsOverLimit','@things-factory/menu-base','LicenseError','10HQVOku'];a0_0x3d10=function(){return _0x51b1f4;};return a0_0x3d10();}async function checkStudioTemplateIsOverLimit(_0x246839,_0x523cba){const _0x3b5dcf=a0_0x3e1004;if(0x0==await checkStudioPermission())throw new license_error_1[(_0x3b5dcf(0x1b4))]({'errorCode':_0x523cba['t'](license_error_1[_0x3b5dcf(0x1b4)][_0x3b5dcf(0x1b7)][_0x3b5dcf(0x1b8)])});var _0xc97519=0x0;if(_0xc97519=_0x246839&&''!=_0x246839?await(0x0,shell_1[_0x3b5dcf(0x197)])(menu_base_1['Menu'])['manager'][_0x3b5dcf(0x1bb)]()[_0x3b5dcf(0x1ac)](_0x3b5dcf(0x19c))[_0x3b5dcf(0x1a7)](menu_base_1[_0x3b5dcf(0x1bc)],_0x3b5dcf(0x19c))[_0x3b5dcf(0x1a0)](_0x3b5dcf(0x199),{'id':_0x246839})[_0x3b5dcf(0x1a2)](_0x3b5dcf(0x19a))['getCount']()+0x1:await(0x0,shell_1[_0x3b5dcf(0x197)])(menu_base_1[_0x3b5dcf(0x1bc)])[_0x3b5dcf(0x1a6)][_0x3b5dcf(0x1bb)]()[_0x3b5dcf(0x1ac)](_0x3b5dcf(0x19c))['from'](menu_base_1['Menu'],_0x3b5dcf(0x19c))[_0x3b5dcf(0x1a0)]('(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)')[_0x3b5dcf(0x1a1)]()+0x1,!(0x0,operato_license_checker_1[_0x3b5dcf(0x1aa)])(_0xc97519))throw new license_error_1['LicenseError']({'errorCode':_0x523cba['t'](license_error_1[_0x3b5dcf(0x1b4)][_0x3b5dcf(0x1b7)][_0x3b5dcf(0x1a3)])});return!0x0;}exports[a0_0x3e1004(0x1b1)]=checkStudioPermission,exports[a0_0x3e1004(0x1b2)]=checkStudioTemplateIsOverLimit;
@@ -1 +1 @@
1
- 'use strict';const a0_0x3210a6=a0_0xa9c4;(function(_0x433184,_0x366ad4){const _0x3c9da8=a0_0xa9c4,_0x5a50f3=_0x433184();while(!![]){try{const _0xf98c10=-parseInt(_0x3c9da8(0x19e))/0x1+-parseInt(_0x3c9da8(0x1a4))/0x2*(-parseInt(_0x3c9da8(0x1ad))/0x3)+-parseInt(_0x3c9da8(0x1a0))/0x4+-parseInt(_0x3c9da8(0x19f))/0x5+parseInt(_0x3c9da8(0x19c))/0x6+-parseInt(_0x3c9da8(0x1a1))/0x7*(-parseInt(_0x3c9da8(0x1a6))/0x8)+parseInt(_0x3c9da8(0x19d))/0x9*(parseInt(_0x3c9da8(0x1ae))/0xa);if(_0xf98c10===_0x366ad4)break;else _0x5a50f3['push'](_0x5a50f3['shift']());}catch(_0x4dc36c){_0x5a50f3['push'](_0x5a50f3['shift']());}}}(a0_0x3c09,0x4562d));Object[a0_0x3210a6(0x1b0)](exports,a0_0x3210a6(0x1a5),{'value':!0x0}),exports[a0_0x3210a6(0x1aa)]=void 0x0;const tslib_1=require('tslib'),type_graphql_1=require(a0_0x3210a6(0x1ac)),tool_permission_1=require(a0_0x3210a6(0x1b2));function a0_0xa9c4(_0x24c463,_0x4c7f09){const _0x3c0997=a0_0x3c09();return a0_0xa9c4=function(_0xa9c4dd,_0xfcde02){_0xa9c4dd=_0xa9c4dd-0x19b;let _0x12c83e=_0x3c0997[_0xa9c4dd];return _0x12c83e;},a0_0xa9c4(_0x24c463,_0x4c7f09);}function a0_0x3c09(){const _0x656274=['19352OqEmts','Resolver','studioTemplateIsOverLimit','design:paramtypes','OperatoToolResolver','Ctx','type-graphql','3357WpcRPf','40xEMAuk','Arg','defineProperty','__metadata','./tool-permission','__decorate','design:type','__param','prototype','Query','1889430kUgeOq','1490517HCOHTu','144942UhBKXP','2684955vjBxva','840748ArXkuZ','35NwAKyV','studioPermission','Operato\x20Tool\x20Studio\x20Limit\x20check','334lcgPtK','__esModule'];a0_0x3c09=function(){return _0x656274;};return a0_0x3c09();}let OperatoToolResolver=class{async[a0_0x3210a6(0x1a2)](_0xca0d67){return(0x0,tool_permission_1['checkStudioPermission'])();}async['studioTemplateIsOverLimit'](_0x3f6366,_0x1bb1e6){return(0x0,tool_permission_1['checkStudioTemplateIsOverLimit'])(_0x3f6366,_0x1bb1e6);}};tslib_1[a0_0x3210a6(0x1b3)]([(0x0,type_graphql_1[a0_0x3210a6(0x19b)])(_0xe5cf26=>Boolean,{'description':'Operato\x20Tool\x20Studio\x20Usage\x20Permissions'}),tslib_1[a0_0x3210a6(0x1b5)](0x0,(0x0,type_graphql_1[a0_0x3210a6(0x1ab)])()),tslib_1['__metadata'](a0_0x3210a6(0x1b4),Function),tslib_1[a0_0x3210a6(0x1b1)](a0_0x3210a6(0x1a9),[Object]),tslib_1['__metadata']('design:returntype',Promise)],OperatoToolResolver[a0_0x3210a6(0x1b6)],a0_0x3210a6(0x1a2),null),tslib_1[a0_0x3210a6(0x1b3)]([(0x0,type_graphql_1[a0_0x3210a6(0x19b)])(_0x38d486=>Boolean,{'description':a0_0x3210a6(0x1a3)}),tslib_1[a0_0x3210a6(0x1b5)](0x0,(0x0,type_graphql_1[a0_0x3210a6(0x1af)])('id')),tslib_1[a0_0x3210a6(0x1b5)](0x1,(0x0,type_graphql_1['Ctx'])()),tslib_1['__metadata']('design:type',Function),tslib_1['__metadata']('design:paramtypes',[String,Object]),tslib_1['__metadata']('design:returntype',Promise)],OperatoToolResolver[a0_0x3210a6(0x1b6)],a0_0x3210a6(0x1a8),null),OperatoToolResolver=tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x3210a6(0x1a7)])()],OperatoToolResolver),exports[a0_0x3210a6(0x1aa)]=OperatoToolResolver;
1
+ 'use strict';function a0_0x418f(_0x5d557e,_0x5e874d){const _0x4c2ab5=a0_0x4c2a();return a0_0x418f=function(_0x418fe8,_0x19e55a){_0x418fe8=_0x418fe8-0x16e;let _0x32540d=_0x4c2ab5[_0x418fe8];return _0x32540d;},a0_0x418f(_0x5d557e,_0x5e874d);}const a0_0x2cb27c=a0_0x418f;(function(_0x30e276,_0x52d5de){const _0x3c0e34=a0_0x418f,_0x10bd4a=_0x30e276();while(!![]){try{const _0x27a962=parseInt(_0x3c0e34(0x18b))/0x1*(-parseInt(_0x3c0e34(0x189))/0x2)+-parseInt(_0x3c0e34(0x178))/0x3*(parseInt(_0x3c0e34(0x16e))/0x4)+parseInt(_0x3c0e34(0x177))/0x5+parseInt(_0x3c0e34(0x17a))/0x6+-parseInt(_0x3c0e34(0x173))/0x7*(parseInt(_0x3c0e34(0x188))/0x8)+parseInt(_0x3c0e34(0x184))/0x9+-parseInt(_0x3c0e34(0x171))/0xa*(-parseInt(_0x3c0e34(0x175))/0xb);if(_0x27a962===_0x52d5de)break;else _0x10bd4a['push'](_0x10bd4a['shift']());}catch(_0x29802b){_0x10bd4a['push'](_0x10bd4a['shift']());}}}(a0_0x4c2a,0x7f687));Object[a0_0x2cb27c(0x17b)](exports,a0_0x2cb27c(0x17e),{'value':!0x0}),exports[a0_0x2cb27c(0x170)]=void 0x0;const tslib_1=require(a0_0x2cb27c(0x176)),type_graphql_1=require('type-graphql'),tool_permission_1=require(a0_0x2cb27c(0x172));let OperatoToolResolver=class{async[a0_0x2cb27c(0x174)](_0x5f4f29){const _0x42d823=a0_0x2cb27c;return(0x0,tool_permission_1[_0x42d823(0x180)])();}async['studioTemplateIsOverLimit'](_0x4d6def,_0x43d9c1){return(0x0,tool_permission_1['checkStudioTemplateIsOverLimit'])(_0x4d6def,_0x43d9c1);}};tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x2cb27c(0x185)])(_0x58af1d=>Boolean,{'description':a0_0x2cb27c(0x186)}),tslib_1[a0_0x2cb27c(0x18c)](0x0,(0x0,type_graphql_1[a0_0x2cb27c(0x17d)])()),tslib_1[a0_0x2cb27c(0x182)](a0_0x2cb27c(0x18a),Function),tslib_1[a0_0x2cb27c(0x182)]('design:paramtypes',[Object]),tslib_1[a0_0x2cb27c(0x182)](a0_0x2cb27c(0x16f),Promise)],OperatoToolResolver[a0_0x2cb27c(0x181)],a0_0x2cb27c(0x174),null),tslib_1[a0_0x2cb27c(0x187)]([(0x0,type_graphql_1[a0_0x2cb27c(0x185)])(_0x31cf71=>Boolean,{'description':a0_0x2cb27c(0x17c)}),tslib_1['__param'](0x0,(0x0,type_graphql_1[a0_0x2cb27c(0x179)])('id')),tslib_1[a0_0x2cb27c(0x18c)](0x1,(0x0,type_graphql_1[a0_0x2cb27c(0x17d)])()),tslib_1['__metadata']('design:type',Function),tslib_1['__metadata'](a0_0x2cb27c(0x17f),[String,Object]),tslib_1[a0_0x2cb27c(0x182)](a0_0x2cb27c(0x16f),Promise)],OperatoToolResolver[a0_0x2cb27c(0x181)],'studioTemplateIsOverLimit',null),OperatoToolResolver=tslib_1[a0_0x2cb27c(0x187)]([(0x0,type_graphql_1[a0_0x2cb27c(0x183)])()],OperatoToolResolver),exports[a0_0x2cb27c(0x170)]=OperatoToolResolver;function a0_0x4c2a(){const _0x53943f=['checkStudioPermission','prototype','__metadata','Resolver','7047621YyamyF','Query','Operato\x20Tool\x20Studio\x20Usage\x20Permissions','__decorate','152zhUOXr','54512rpyezK','design:type','23FhxRAq','__param','68QNjXsK','design:returntype','OperatoToolResolver','20FJWiKy','./tool-permission','362243VFbaNt','studioPermission','1868779ejbQDS','tslib','3908895qQXkFX','681lwDMCj','Arg','1387290DhIwZo','defineProperty','Operato\x20Tool\x20Studio\x20Limit\x20check','Ctx','__esModule','design:paramtypes'];a0_0x4c2a=function(){return _0x53943f;};return a0_0x4c2a();}