@things-factory/operato-tools 6.1.15 → 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_0x389a8a=a0_0x55f9;function a0_0x14c2(){const _0x4a51d8=['tslib','351jQqkDc','10481JMlaOJ','20utnsbV','242ElepOY','license-error','LicenseError','2070120SneVOR','334RAglHN','defineProperty','468570gsGXAz','147Knnopv','6505770Snzfbi','1173775xNVKjv','315516SYnNCm','ERROR_CODES','184752LjnVYu','errorCode','__importStar'];a0_0x14c2=function(){return _0x4a51d8;};return a0_0x14c2();}(function(_0x288947,_0x461dd9){const _0x151881=a0_0x55f9,_0x263ba4=_0x288947();while(!![]){try{const _0x4c7f51=-parseInt(_0x151881(0x18d))/0x1*(parseInt(_0x151881(0x193))/0x2)+parseInt(_0x151881(0x192))/0x3+parseInt(_0x151881(0x18e))/0x4*(parseInt(_0x151881(0x185))/0x5)+-parseInt(_0x151881(0x182))/0x6*(-parseInt(_0x151881(0x183))/0x7)+parseInt(_0x151881(0x188))/0x8*(-parseInt(_0x151881(0x18c))/0x9)+parseInt(_0x151881(0x184))/0xa+parseInt(_0x151881(0x18f))/0xb*(-parseInt(_0x151881(0x186))/0xc);if(_0x4c7f51===_0x461dd9)break;else _0x263ba4['push'](_0x263ba4['shift']());}catch(_0x438ec4){_0x263ba4['push'](_0x263ba4['shift']());}}}(a0_0x14c2,0xe1d14));Object[a0_0x389a8a(0x181)](exports,'__esModule',{'value':!0x0}),exports['LicenseError']=void 0x0;function a0_0x55f9(_0x4c74d1,_0x25cdcc){const _0x14c260=a0_0x14c2();return a0_0x55f9=function(_0x55f912,_0x33ff39){_0x55f912=_0x55f912-0x181;let _0x4910a3=_0x14c260[_0x55f912];return _0x4910a3;},a0_0x55f9(_0x4c74d1,_0x25cdcc);}const tslib_1=require(a0_0x389a8a(0x18b)),ERROR_CODES=tslib_1[a0_0x389a8a(0x18a)](require('../constants/error-code'));class LicenseError extends Error{static get[a0_0x389a8a(0x187)](){return Object['assign']({},ERROR_CODES);}constructor({errorCode:_0x4b0026,detail:_0x31f680}){const _0x1db19d=a0_0x389a8a;super(_0x4b0026),this['name']=_0x1db19d(0x190),this[_0x1db19d(0x189)]=_0x4b0026,this['detail']=_0x31f680;}}exports[a0_0x389a8a(0x191)]=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_0x1e7aba=a0_0x5515;function a0_0x1903(){const _0x42a5a5=['297729LBeiUv','2074625UPhdTv','bootstrap-module-global-public-route','1443852ENrySZ','bootstrap-module-domain-public-route','debug','things-factory:operato-tools:routes','6992073tEbdEI','bootstrap-module-domain-private-route','8qOOVKH','2pCKSqF','1358540IvUvcU','772188hFblHI','1632375avsCec'];a0_0x1903=function(){return _0x42a5a5;};return a0_0x1903();}(function(_0x4ab99e,_0x485304){const _0x190c32=a0_0x5515,_0x5f327b=_0x4ab99e();while(!![]){try{const _0xa5d82=-parseInt(_0x190c32(0x9a))/0x1*(-parseInt(_0x190c32(0x96))/0x2)+parseInt(_0x190c32(0x99))/0x3+parseInt(_0x190c32(0x9d))/0x4+-parseInt(_0x190c32(0x97))/0x5+-parseInt(_0x190c32(0x98))/0x6+parseInt(_0x190c32(0x9b))/0x7*(parseInt(_0x190c32(0x95))/0x8)+-parseInt(_0x190c32(0x93))/0x9;if(_0xa5d82===_0x485304)break;else _0x5f327b['push'](_0x5f327b['shift']());}catch(_0x5c893c){_0x5f327b['push'](_0x5f327b['shift']());}}}(a0_0x1903,0x4e961));const debug=require(a0_0x1e7aba(0x9f))(a0_0x1e7aba(0xa0));function a0_0x5515(_0x1287e7,_0x4b2538){const _0x190374=a0_0x1903();return a0_0x5515=function(_0x551563,_0x387a70){_0x551563=_0x551563-0x93;let _0x224915=_0x190374[_0x551563];return _0x224915;},a0_0x5515(_0x1287e7,_0x4b2538);}process['on'](a0_0x1e7aba(0x9c),(_0x23b159,_0x435638)=>{}),process['on']('bootstrap-module-global-private-route',(_0x13e430,_0x85cf3)=>{}),process['on'](a0_0x1e7aba(0x9e),(_0x51d159,_0x2dfecf)=>{}),process['on'](a0_0x1e7aba(0x94),(_0x94ba4f,_0xd392d7)=>{});
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_0x391ebb=a0_0x4516;(function(_0x14519b,_0x4e283f){const _0x28c280=a0_0x4516,_0x2a8366=_0x14519b();while(!![]){try{const _0x5d2ba1=parseInt(_0x28c280(0x133))/0x1*(-parseInt(_0x28c280(0x174))/0x2)+-parseInt(_0x28c280(0x157))/0x3*(-parseInt(_0x28c280(0x15c))/0x4)+-parseInt(_0x28c280(0x134))/0x5+parseInt(_0x28c280(0x12e))/0x6*(parseInt(_0x28c280(0x182))/0x7)+-parseInt(_0x28c280(0x158))/0x8+parseInt(_0x28c280(0x19f))/0x9*(-parseInt(_0x28c280(0x193))/0xa)+-parseInt(_0x28c280(0x153))/0xb*(-parseInt(_0x28c280(0x183))/0xc);if(_0x5d2ba1===_0x4e283f)break;else _0x2a8366['push'](_0x2a8366['shift']());}catch(_0x6e66b0){_0x2a8366['push'](_0x2a8366['shift']());}}}(a0_0x3717,0x9f719));function a0_0x3717(){const _0x2c9eea=['design:paramtypes','parent_menu_id','rank','searchOper','menuType','scenario','16002WSlaoC','enc','updatedAt','randomBytes','aes-256-cfb1','left','\x22,\x22name\x22:\x20\x22','\x22,\x22header\x22:\x20\x22','updated_at','dataProp','createSearchCols','gridRank','createCipheriv','\x20,\x22exportable\x22:\x20true','7jCVdrK','63576XbCOBA','creator_id','\x27\x20or\x20id\x20=\x20\x27','assign','design:returntype','{\x22name\x22:\x22','filter','searchRank','sort','SCREEN','Mutation','Entity','find','refType','refName','\x22,\x22operator\x22:\x20\x22','20dVyGEY','\x22,\x22desc\x22:','hidden','\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}','aes-256-cbc','hiddenFlag','substring','./../tool-secret/tool-permission','prototype','map',',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22','__metadata','4168557uRxGID','Ctx','hex','{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22','COPY','aes-256-cfb8','updater_id','2663130PQTSHM','\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}','Menu','toolCreateMenu','toString','5gKVoYr','2959615HjzeQl','__esModule','@things-factory/menu-base','findOne','string','utf8','Arg','name','Directive','aes-256-ofb','length','design:type','\x22,\x22hidden\x22:','creator','select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27','h1z0q9i9x7q6','OperatoToolCreateMenu','save','parent','from',',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22','template','crypto','state','aes-256-cfb','\x22,\x22width\x22:','readonly','updater','createdAt','update','join','2101axCcpy','@things-factory/resource-base','reverseSort','\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}','17382nolRTK','2808576PkasvZ','default',',\x22mandatory\x22:\x20','created_at','764PYbhxW','code','pluralize','EntityColumn','sortRank','JSON','__param','category','getRepository','\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22basic\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22label\x22:\x20\x22data_history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22icon\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22logic\x22:\x20\x22history_json\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20','push','createMenuData','Resolver','replace','query','split','createSortCols','createGridColumns'];a0_0x3717=function(){return _0x2c9eea;};return a0_0x3717();}Object['defineProperty'](exports,a0_0x391ebb(0x135),{'value':!0x0}),exports[a0_0x391ebb(0x144)]=void 0x0;function a0_0x4516(_0x120424,_0x448a93){const _0x37175c=a0_0x3717();return a0_0x4516=function(_0x451637,_0x1533b8){_0x451637=_0x451637-0x12b;let _0x9f4d31=_0x37175c[_0x451637];return _0x9f4d31;},a0_0x4516(_0x120424,_0x448a93);}const tslib_1=require('tslib'),type_graphql_1=require('type-graphql'),resource_base_1=require(a0_0x391ebb(0x154)),menu_base_1=require(a0_0x391ebb(0x136)),tool_permission_1=require(a0_0x391ebb(0x19a)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require('lodash'),{plural:plural}=require(a0_0x391ebb(0x15e)),crypto_1=tslib_1['__importDefault'](require(a0_0x391ebb(0x14a)));let OperatoToolCreateMenu=class{async[a0_0x391ebb(0x131)](_0x432b17,_0x4d9a35,_0x489998){const _0x3d1a89=a0_0x391ebb,{domain:_0x20a2e6,user:_0x3a59bb,tx:_0x48aa70}=_0x489998[_0x3d1a89(0x14b)];await(0x0,tool_permission_1['checkStudioTemplateIsOverLimit'])('',_0x489998);const _0xf858c9=await _0x48aa70[_0x3d1a89(0x164)](resource_base_1[_0x3d1a89(0x18e)])['findOne']({'where':{'domain':{'id':_0x20a2e6['id']},'id':_0x432b17}}),_0x5d1fd9=await _0x48aa70['getRepository'](resource_base_1[_0x3d1a89(0x15f)])[_0x3d1a89(0x18f)]({'where':{'domain':{'id':_0x20a2e6['id']},'entity':{'id':_0xf858c9['id']}}});let {name:_0x2c3226=''}=_0xf858c9||{},_0xd62cbf=kebabCase(_0x2c3226),_0x2696f5=modelTemplate[_0x3d1a89(0x169)](/{{pascalCase name}}/g,startCase(camelCase(_0x2c3226))[_0x3d1a89(0x169)](/ /g,''))['replace'](/{{camelCase name}}/g,camelCase(_0x2c3226))['replace'](/{{snakeCase name}}/g,snakeCase(_0x2c3226))[_0x3d1a89(0x169)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x2c3226)))[_0x3d1a89(0x169)](/ /g,''))[_0x3d1a89(0x169)](/{{pluralCamelCase name}}/g,camelCase(plural(_0x2c3226)))[_0x3d1a89(0x169)](/{{name}}/g,_0x2c3226),_0x339e2a='';_0x3d1a89(0x161)==_0xf858c9[_0x3d1a89(0x17d)]?_0x339e2a=_0x3d1a89(0x165):_0x3d1a89(0x12b)==_0xf858c9[_0x3d1a89(0x17d)]&&(_0x339e2a='\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'),_0x2696f5=_0x2696f5[_0x3d1a89(0x169)](/{{HistoryButton}}/g,_0x339e2a);let _0x34a9dc=this['createSortCols'](_0x5d1fd9);_0x2696f5=_0x2696f5[_0x3d1a89(0x169)](/{{SortColumns}}/g,_0x34a9dc[_0x3d1a89(0x152)](','));let _0x428724=this[_0x3d1a89(0x17e)](_0x5d1fd9);_0x2696f5=_0x2696f5[_0x3d1a89(0x169)](/{{SearchColumns}}/g,_0x428724[_0x3d1a89(0x152)](','));let _0x66d91c=this['createGridColumns'](_0x5d1fd9);return _0x2696f5=_0x2696f5[_0x3d1a89(0x169)](/{{GridColumns}}/g,_0x66d91c[_0x3d1a89(0x152)](',')),_0x2696f5=this['enc'](_0x2696f5),await this[_0x3d1a89(0x167)](_0x48aa70,_0x20a2e6,_0x3a59bb,_0x4d9a35,_0xd62cbf,_0x2696f5),!0x0;}[a0_0x391ebb(0x16d)](_0x3ab662){const _0x3aecea=a0_0x391ebb;return _0x3ab662['filter'](_0x37fd4b=>'id'!=_0x37fd4b[_0x3aecea(0x13b)]&&_0x37fd4b[_0x3aecea(0x17f)]>0x0)[_0x3aecea(0x18b)](function(_0x3bffea,_0x189f59){return _0x3bffea['gridRank']-_0x189f59['gridRank'];})[_0x3aecea(0x19c)](_0x40a199=>{const _0x45a5f3=_0x3aecea;let {gridEditor:_0x4abb0f=_0x45a5f3(0x138),name:_0x4efff5,term:_0x57bf6c,gridWidth:_0x17a235=0x0,gridAlign:_0x3bf5ea=_0x45a5f3(0x179),nullable:_0x5795d7=!0x1}=_0x40a199;if(null==_0x4abb0f&&(_0x4abb0f='string'),null==_0x3bf5ea&&(_0x3bf5ea='left'),_0x45a5f3(0x12d)==_0x4efff5||_0x45a5f3(0x184)==_0x4efff5)return _0x4efff5=_0x45a5f3(0x12d)==_0x4efff5?_0x45a5f3(0x14f):_0x45a5f3(0x141),_0x45a5f3(0x1a2)+_0x4efff5+_0x45a5f3(0x17b)+_0x4efff5+_0x45a5f3(0x196);if(_0x45a5f3(0x17c)==_0x4efff5||_0x45a5f3(0x15b)==_0x4efff5)return'{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22'+('updated_at'==_0x4efff5?_0x45a5f3(0x176):_0x45a5f3(0x150))+_0x45a5f3(0x17b)+_0x4efff5+_0x45a5f3(0x156);let _0x5011cf=_0x45a5f3(0x14e)!=_0x4abb0f&&_0x45a5f3(0x195)!=_0x4abb0f,_0x23a3b5=_0x45a5f3(0x195)==_0x4abb0f;0x1!=_0x23a3b5&&0x0!=_0x5011cf||(_0x4abb0f=_0x45a5f3(0x138));let _0xbc580b='{\x22type\x22:\x20\x22'+_0x4abb0f+_0x45a5f3(0x17a)+camelCase(_0x4efff5)+_0x45a5f3(0x17b)+_0x57bf6c+_0x45a5f3(0x140)+_0x23a3b5+'\x20,\x22editable\x22:\x20'+_0x5011cf+_0x45a5f3(0x15a)+!_0x5795d7+_0x45a5f3(0x19d)+_0x3bf5ea+_0x45a5f3(0x14d)+_0x17a235+_0x45a5f3(0x181);return _0x45a5f3(0x15d)==_0x40a199['refType']&&(_0xbc580b+=',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22'+_0x40a199['refName']+'\x22}'),_0x45a5f3(0x173)==_0x40a199[_0x45a5f3(0x190)]&&(_0xbc580b+=_0x45a5f3(0x148)+_0x40a199[_0x45a5f3(0x191)]+'\x22}'),'entity'==_0x40a199['refType']&&(_0xbc580b+=',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22'+camelCase(plural(_0x40a199[_0x45a5f3(0x191)]))+_0x45a5f3(0x12f)),_0xbc580b+='}',_0xbc580b;});}['createSearchCols'](_0x2871cb){const _0x1b9670=a0_0x391ebb;return _0x2871cb['filter'](_0x526d08=>_0x526d08[_0x1b9670(0x18a)]>0x0)[_0x1b9670(0x18b)](function(_0x466e12,_0x43978d){const _0x2d878d=_0x1b9670;return _0x466e12['searchRank']-_0x43978d[_0x2d878d(0x18a)];})[_0x1b9670(0x19c)](_0x876050=>{const _0x2472bf=_0x1b9670;let _0x2aae47=_0x876050[_0x2472bf(0x171)];return _0x2472bf(0x189)==_0x2aae47?'\x22'+camelCase(_0x876050[_0x2472bf(0x13b)])+'\x22':(_0x2aae47||(_0x2aae47='eq'),'{\x22name\x22:\x20\x22'+camelCase(_0x876050['name'])+_0x2472bf(0x192)+_0x2aae47+'\x22}');});}[a0_0x391ebb(0x16c)](_0x59a90f){const _0x4e19f2=a0_0x391ebb;return _0x59a90f[_0x4e19f2(0x189)](_0x4f0f7f=>_0x4f0f7f[_0x4e19f2(0x160)]>0x0)['sort'](function(_0x510295,_0x1351ea){const _0x300c40=_0x4e19f2;return _0x510295[_0x300c40(0x160)]-_0x1351ea[_0x300c40(0x160)];})[_0x4e19f2(0x19c)](_0x432027=>_0x4e19f2(0x188)+camelCase(_0x432027[_0x4e19f2(0x13b)])+_0x4e19f2(0x194)+_0x432027[_0x4e19f2(0x155)]+'}');}async['createMenuData'](_0x303515,_0x30b8b5,_0x24ed6f,_0x35c557,_0x1303c8,_0x1e9401){const _0x375ba5=a0_0x391ebb;let _0xeb7f5e=await _0x303515[_0x375ba5(0x164)](menu_base_1[_0x375ba5(0x130)])[_0x375ba5(0x137)]({'where':{'domain':{'id':_0x30b8b5['id']},'id':_0x35c557}}),_0x596861=(await _0x303515[_0x375ba5(0x164)](menu_base_1['Menu'])[_0x375ba5(0x16a)](_0x375ba5(0x142)+_0x35c557+_0x375ba5(0x185)+_0x35c557+'\x27'))[0x0][_0x375ba5(0x170)]+0xa,_0x4a7dda=new menu_base_1[(_0x375ba5(0x130))]();_0x4a7dda[_0x375ba5(0x13b)]=_0x1303c8,_0x4a7dda[_0x375ba5(0x172)]=_0x375ba5(0x18c),_0x4a7dda[_0x375ba5(0x163)]='meta-grist-page',_0x4a7dda[_0x375ba5(0x170)]=_0x596861,_0x4a7dda[_0x375ba5(0x198)]=!0x1,_0x4a7dda['routing']=_0x1303c8,_0x4a7dda[_0x375ba5(0x149)]=_0x1e9401,_0x4a7dda['resourceUrl']='@things-factory/meta-ui/client/pages/meta-grist-page',_0x4a7dda[_0x375ba5(0x146)]=_0xeb7f5e,await _0x303515[_0x375ba5(0x164)](menu_base_1['Menu'])[_0x375ba5(0x145)](Object[_0x375ba5(0x186)](Object[_0x375ba5(0x186)]({},_0x4a7dda),{'domain':_0x30b8b5,'creator':_0x24ed6f,'updater':_0x24ed6f}));}[a0_0x391ebb(0x175)](_0x31ddca){const _0x318448=a0_0x391ebb;let _0x2e4157=JSON['stringify'](_0x31ddca)[_0x318448(0x16b)](/(.{100})/)[_0x318448(0x189)](_0x3297d7=>_0x3297d7),_0x1e61a7=['aes-256-ecb',_0x318448(0x197),_0x318448(0x14c),_0x318448(0x12c),_0x318448(0x178),_0x318448(0x13d),'aes-256-ctr','aes256'],_0xd90cf1=crypto_1[_0x318448(0x159)][_0x318448(0x177)](0x20)[_0x318448(0x132)](_0x318448(0x1a1)),_0x444f4a=Buffer[_0x318448(0x147)](_0xd90cf1,_0x318448(0x1a1)),_0x16a747=_0xd90cf1[_0x318448(0x199)](0x0,0x10),_0x38adee=['',_0x16a747,_0x16a747,_0x16a747,_0x16a747,_0x16a747,_0x16a747,_0x16a747],_0x3046fe=0x0,_0x41c950=[];_0x41c950[_0x318448(0x166)](_0xd90cf1);for(var _0x144009=0x0;_0x144009<_0x2e4157[_0x318448(0x13e)];_0x144009++,_0x3046fe++){_0x3046fe==_0x1e61a7[_0x318448(0x13e)]&&(_0x3046fe=0x0);let _0x131143=crypto_1['default'][_0x318448(0x180)](_0x1e61a7[_0x3046fe],_0x444f4a,_0x38adee[_0x3046fe]),_0xa4b650=_0x131143[_0x318448(0x151)](_0x2e4157[_0x144009],_0x318448(0x139),_0x318448(0x1a1));_0xa4b650+=_0x131143['final'](_0x318448(0x1a1)),_0x41c950[_0x318448(0x166)](_0xa4b650);}return _0x41c950[_0x318448(0x152)](_0x318448(0x143));}};tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x391ebb(0x13c)])('@transaction'),(0x0,type_graphql_1[a0_0x391ebb(0x18d)])(_0x35bc86=>Boolean,{'description':'Operato\x20Tool\x20Create\x20Menu'}),tslib_1[a0_0x391ebb(0x162)](0x0,(0x0,type_graphql_1[a0_0x391ebb(0x13a)])('id')),tslib_1['__param'](0x1,(0x0,type_graphql_1[a0_0x391ebb(0x13a)])(a0_0x391ebb(0x16f))),tslib_1[a0_0x391ebb(0x162)](0x2,(0x0,type_graphql_1[a0_0x391ebb(0x1a0)])()),tslib_1[a0_0x391ebb(0x19e)](a0_0x391ebb(0x13f),Function),tslib_1['__metadata'](a0_0x391ebb(0x16e),[String,String,Object]),tslib_1[a0_0x391ebb(0x19e)](a0_0x391ebb(0x187),Promise)],OperatoToolCreateMenu[a0_0x391ebb(0x19b)],a0_0x391ebb(0x131),null),OperatoToolCreateMenu=tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x391ebb(0x168)])()],OperatoToolCreateMenu),exports[a0_0x391ebb(0x144)]=OperatoToolCreateMenu;const modelTemplate='\x0a{\x0a\x20\x20\x22menu\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x22title\x22:\x20\x22{{name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22\x22,\x0a\x20\x20\x20\x20\x20\x20\x22desc\x22:\x20\x22\x22\x0a\x20\x20},\x0a\x20\x20\x22gql\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x22query\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22list_func\x22:\x20\x22{{pluralCamelCase\x20name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22find_one_func\x22:\x22{{camelCase\x20name}}\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x22mutation\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22multiple\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22func\x22:\x22updateMultiple{{pascalCase\x20name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22{{pascalCase\x20name}}Patch\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22delete\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22func\x22:\x22delete{{pluralPascalCase\x20name}}\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20},\x0a\x20\x20\x22button\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22export\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22add\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22delete\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22save\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20],\x0a\x20\x20\x22grid_column\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22string\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22id\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22header\x22:\x20\x22id\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22hidden\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22editable\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22mandatory\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22sortable\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22align\x22:\x20\x22left\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22width\x22:\x200,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22exportable\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20},\x0a{{GridColumns}}\x0a\x20\x20],\x0a\x20\x20\x22grid\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22button\x22:[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{{HistoryButton}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22option\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22mobile_mode\x22:\x20\x22LIST\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22desk_mode\x22:\x20\x22GRID\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22use_row_checker\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22pages\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2020,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2050,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20100,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20300\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22view_mode\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22GRID\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22LIST\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22CARD\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22sorters\x22:\x20[\x0a{{SortColumns}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20]\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x22row\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22multiple_select\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22click\x22:\x20\x22select-row-toggle\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20},\x0a\x20\x20\x22search\x22:\x20[\x0a{{SearchColumns}}\x0a\x20\x20]\x0a}\x0a';
1
+ 'use strict';const a0_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';const a0_0x4fc1bc=a0_0x3ded;function a0_0x3ded(_0x36f84f,_0x531c2d){const _0x20c3b2=a0_0x20c3();return a0_0x3ded=function(_0x3dedd7,_0x5cff39){_0x3dedd7=_0x3dedd7-0x109;let _0x4b1168=_0x20c3b2[_0x3dedd7];return _0x4b1168;},a0_0x3ded(_0x36f84f,_0x531c2d);}(function(_0x295413,_0x538485){const _0x28257d=a0_0x3ded,_0x3d0e59=_0x295413();while(!![]){try{const _0x2c9954=-parseInt(_0x28257d(0x120))/0x1+parseInt(_0x28257d(0x177))/0x2+-parseInt(_0x28257d(0x139))/0x3+parseInt(_0x28257d(0x132))/0x4*(-parseInt(_0x28257d(0x109))/0x5)+-parseInt(_0x28257d(0x113))/0x6+-parseInt(_0x28257d(0x146))/0x7+parseInt(_0x28257d(0x143))/0x8;if(_0x2c9954===_0x538485)break;else _0x3d0e59['push'](_0x3d0e59['shift']());}catch(_0x3bfd12){_0x3d0e59['push'](_0x3d0e59['shift']());}}}(a0_0x20c3,0xe7d4f));Object[a0_0x4fc1bc(0x14d)](exports,a0_0x4fc1bc(0x18e),{'value':!0x0}),exports[a0_0x4fc1bc(0x10e)]=void 0x0;const tslib_1=require(a0_0x4fc1bc(0x192)),type_graphql_1=require(a0_0x4fc1bc(0x15e)),shell_1=require(a0_0x4fc1bc(0x116)),resource_base_1=require(a0_0x4fc1bc(0x178)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require('lodash'),{plural:plural}=require(a0_0x4fc1bc(0x10f)),fs=require('fs');let OperatoToolCreateService=class{async[a0_0x4fc1bc(0x17c)](_0x1fb209,_0x13995d){const _0x161ea7=a0_0x4fc1bc,{domain:_0xaf3b86}=_0x13995d[_0x161ea7(0x157)],_0x55eb0c=await(0x0,shell_1['getRepository'])(resource_base_1[_0x161ea7(0x172)])[_0x161ea7(0x14e)]({'where':{'id':_0x1fb209}}),_0x27d1f3=await(0x0,shell_1[_0x161ea7(0x111)])(resource_base_1['EntityColumn'])[_0x161ea7(0x15f)]({'where':{'domain':{'id':_0xaf3b86['id']},'entity':{'id':_0x55eb0c['id']}}});let {name:_0x24168c='',bundle:_0x39f9da=''}=_0x55eb0c||{},_0x21b68e=this[_0x161ea7(0x187)](),_0x31ea02=kebabCase(_0x24168c);return await this['createServicePath'](_0x21b68e,_0x39f9da,_0x31ea02),await this['createServiceFiles'](_0x21b68e,_0x39f9da,_0x24168c,_0x31ea02,_0x55eb0c,_0x27d1f3),!0x0;}async[a0_0x4fc1bc(0x11f)](_0x410b3b,_0x10ed19,_0x191587,_0x3d7068,_0x1e33d6,_0x222b05){const _0x4a77e7=a0_0x4fc1bc;let _0x2284e3={'name':_0x3d7068,'tableName':_0x1e33d6[_0x4a77e7(0x13a)],'pascalCaseName':startCase(camelCase(_0x191587))[_0x4a77e7(0x142)](/ /g,''),'camelCaseName':camelCase(_0x191587),'snakeCaseName':snakeCase(_0x191587),'pluralPascalCaseName':startCase(camelCase(plural(_0x191587)))[_0x4a77e7(0x142)](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x191587))},_0x9a4537=_0x410b3b+_0x4a77e7(0x135)+_0x10ed19+_0x4a77e7(0x173);[_0x4a77e7(0x158),_0x4a77e7(0x17d)][_0x4a77e7(0x125)](_0x1e33d6['dataProp'])?await this[_0x4a77e7(0x163)](_0x9a4537,_0x3d7068,_0x1e33d6,_0x222b05,_0x2284e3):await this[_0x4a77e7(0x14b)](_0x9a4537,_0x3d7068,_0x1e33d6,_0x222b05,_0x2284e3);}async[a0_0x4fc1bc(0x163)](_0x2b4615,_0x1f6c34,_0x45c3a0,_0x365a54,_0x3c13f9){const _0x58c073=a0_0x4fc1bc;await this[_0x58c073(0x15c)](_0x2b4615+(_0x1f6c34+_0x58c073(0x11c)),serviceHistoryIndex,_0x3c13f9);let _0xb3fcfd=this[_0x58c073(0x176)](_0x45c3a0,_0x365a54);await this[_0x58c073(0x15c)](_0x2b4615+(_0x1f6c34+'/'+_0x1f6c34+_0x58c073(0x16e)),_0xb3fcfd,_0x3c13f9),await this['writeFile'](_0x2b4615+(_0x1f6c34+'/'+_0x1f6c34+_0x58c073(0x18f)),serviceQuery,_0x3c13f9),await this['writeFile'](_0x2b4615+(_0x1f6c34+'/'+_0x1f6c34+_0x58c073(0x12a)),serviceMutation,_0x3c13f9);let _0x4d719f=this['createTypeText'](_0x365a54);await this['writeFile'](_0x2b4615+(_0x1f6c34+'/'+_0x1f6c34+_0x58c073(0x197)),_0x4d719f,_0x3c13f9);let _0x44e4e7=this['createHistoryEntityText'](_0x45c3a0,_0x365a54);await this[_0x58c073(0x15c)](_0x2b4615+(_0x1f6c34+'/'+_0x1f6c34+_0x58c073(0x198)),_0x44e4e7,_0x3c13f9);let _0x2adec8='';'JSON'==_0x45c3a0['dataProp']?(_0x2adec8=_0x58c073(0x11d),await this[_0x58c073(0x15c)](_0x2b4615+(_0x1f6c34+_0x58c073(0x149)),serviceEntitySubscriber,_0x3c13f9)):_0x2adec8='';let _0x31cdee=serviceEntitySubscriber[_0x58c073(0x142)](/{{entityToJson}}/g,_0x2adec8);await this[_0x58c073(0x15c)](_0x2b4615+(_0x1f6c34+_0x58c073(0x149)),_0x31cdee,_0x3c13f9),await this[_0x58c073(0x15c)](_0x2b4615+(_0x1f6c34+'/'+_0x1f6c34+_0x58c073(0x115)),serviceHistoryQuery,_0x3c13f9),await this[_0x58c073(0x15c)](_0x2b4615+(_0x1f6c34+'/'+_0x1f6c34+_0x58c073(0x16a)),sereviceHistoryType,_0x3c13f9);let _0x2efdad=_0x2b4615+_0x58c073(0x166);0x0==await this[_0x58c073(0x18a)](_0x2efdad)&&await this[_0x58c073(0x15c)](_0x2efdad,allIndex,_0x3c13f9);let _0x185233=await fs[_0x58c073(0x15b)](_0x2efdad,_0x58c073(0x13f));_0x185233[_0x58c073(0x17e)](_0x58c073(0x195)+_0x3c13f9[_0x58c073(0x124)]+'/'+_0x3c13f9[_0x58c073(0x124)]+_0x58c073(0x138))<0x0&&(_0x185233=_0x185233[_0x58c073(0x142)](/\/\* EXPORT ENTITY TYPES \*\//,'/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./'+_0x3c13f9[_0x58c073(0x124)]+'/'+_0x3c13f9[_0x58c073(0x124)]+_0x58c073(0x138))),_0x185233[_0x58c073(0x17e)](_0x58c073(0x195)+_0x3c13f9[_0x58c073(0x124)]+'/'+_0x3c13f9[_0x58c073(0x124)]+'\x27')<0x0&&(_0x185233=_0x185233[_0x58c073(0x142)](/\/\* EXPORT ENTITY TYPES \*\//,'/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./'+_0x3c13f9[_0x58c073(0x124)]+'/'+_0x3c13f9[_0x58c073(0x124)]+'\x27')),_0x185233[_0x58c073(0x17e)]('import\x20{\x20entities\x20as\x20'+_0x3c13f9[_0x58c073(0x18b)]+_0x58c073(0x148)+_0x3c13f9[_0x58c073(0x18b)]+_0x58c073(0x134)+_0x3c13f9[_0x58c073(0x18b)]+_0x58c073(0x12f)+_0x3c13f9[_0x58c073(0x124)]+'\x27')<0x0&&(_0x185233=_0x185233[_0x58c073(0x142)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x58c073(0x153)+_0x3c13f9['pascalCaseName']+_0x58c073(0x148)+_0x3c13f9[_0x58c073(0x18b)]+_0x58c073(0x134)+_0x3c13f9['pascalCaseName']+_0x58c073(0x12f)+_0x3c13f9['name']+'\x27')),_0x185233[_0x58c073(0x17e)](_0x58c073(0x16d)+_0x3c13f9[_0x58c073(0x18b)]+'Entities,')<0x0&&(_0x185233=_0x185233[_0x58c073(0x142)](/\/\* ENTITIES \*\//,_0x58c073(0x160)+_0x3c13f9[_0x58c073(0x18b)]+_0x58c073(0x117))),_0x185233['indexOf'](_0x58c073(0x16d)+_0x3c13f9[_0x58c073(0x18b)]+_0x58c073(0x12b))<0x0&&(_0x185233=_0x185233[_0x58c073(0x142)](/\/\* RESOLVER CLASSES \*\//,'/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...'+_0x3c13f9[_0x58c073(0x18b)]+_0x58c073(0x12b))),_0x185233[_0x58c073(0x17e)](_0x58c073(0x16d)+_0x3c13f9[_0x58c073(0x18b)]+'EntitySubscribers,')<0x0&&(_0x185233=_0x185233[_0x58c073(0x142)](/\/\* SUBSCRIBERS \*\//,_0x58c073(0x159)+_0x3c13f9['pascalCaseName']+_0x58c073(0x13e))),await this['writeFile'](_0x2efdad,_0x185233,_0x3c13f9);}async[a0_0x4fc1bc(0x14b)](_0x5ceb39,_0x998983,_0x277d76,_0x425211,_0x3b3c0d){const _0x62b39b=a0_0x4fc1bc;await this[_0x62b39b(0x15c)](_0x5ceb39+(_0x998983+_0x62b39b(0x11c)),serviceIndex,_0x3b3c0d),await this['writeFile'](_0x5ceb39+(_0x998983+'/'+_0x998983+'-query.ts'),serviceQuery,_0x3b3c0d),await this[_0x62b39b(0x15c)](_0x5ceb39+(_0x998983+'/'+_0x998983+'-mutation.ts'),serviceMutation,_0x3b3c0d);let _0x7d0491=this[_0x62b39b(0x176)](_0x277d76,_0x425211);await this['writeFile'](_0x5ceb39+(_0x998983+'/'+_0x998983+_0x62b39b(0x16e)),_0x7d0491,_0x3b3c0d);let _0x60d0b1=this['createTypeText'](_0x425211);await this['writeFile'](_0x5ceb39+(_0x998983+'/'+_0x998983+_0x62b39b(0x197)),_0x60d0b1,_0x3b3c0d);let _0x1eb37c=_0x5ceb39+_0x62b39b(0x166);0x0==await this[_0x62b39b(0x18a)](_0x1eb37c)&&await this[_0x62b39b(0x15c)](_0x1eb37c,allIndex,_0x3b3c0d);let _0x553167=await fs[_0x62b39b(0x15b)](_0x1eb37c,_0x62b39b(0x13f));_0x553167[_0x62b39b(0x17e)](_0x62b39b(0x195)+_0x3b3c0d['name']+'/'+_0x3b3c0d[_0x62b39b(0x124)]+'\x27')<0x0&&(_0x553167=_0x553167[_0x62b39b(0x142)](/\/\* EXPORT ENTITY TYPES \*\//,'/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./'+_0x3b3c0d[_0x62b39b(0x124)]+'/'+_0x3b3c0d[_0x62b39b(0x124)]+'\x27')),_0x553167['indexOf'](_0x62b39b(0x14f)+_0x3b3c0d[_0x62b39b(0x18b)]+_0x62b39b(0x148)+_0x3b3c0d['pascalCaseName']+_0x62b39b(0x12c)+_0x3b3c0d[_0x62b39b(0x124)]+'\x27')<0x0&&(_0x553167=_0x553167[_0x62b39b(0x142)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,'/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20'+_0x3b3c0d[_0x62b39b(0x18b)]+_0x62b39b(0x148)+_0x3b3c0d[_0x62b39b(0x18b)]+_0x62b39b(0x12c)+_0x3b3c0d['name']+'\x27')),_0x553167['indexOf'](_0x62b39b(0x16d)+_0x3b3c0d[_0x62b39b(0x18b)]+'Entities,')<0x0&&(_0x553167=_0x553167[_0x62b39b(0x142)](/\/\* ENTITIES \*\//,_0x62b39b(0x160)+_0x3b3c0d[_0x62b39b(0x18b)]+'Entities,')),_0x553167[_0x62b39b(0x17e)](_0x62b39b(0x16d)+_0x3b3c0d['pascalCaseName']+'Resolvers,')<0x0&&(_0x553167=_0x553167['replace'](/\/\* RESOLVER CLASSES \*\//,'/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...'+_0x3b3c0d[_0x62b39b(0x18b)]+_0x62b39b(0x12b))),await this[_0x62b39b(0x15c)](_0x1eb37c,_0x553167,_0x3b3c0d);}['createTypeText'](_0x194a62){const _0xee056e=a0_0x4fc1bc;let _0x810156=sereviceType,_0x124a22=_0x194a62[_0xee056e(0x12d)](_0xf6a997=>{const _0x4be379=_0xee056e;if('id'==_0xf6a997[_0x4be379(0x124)])return'';if(_0x4be379(0x14a)==_0xf6a997[_0x4be379(0x124)])return'';if('created_at'==_0xf6a997['name'])return'';if('updated_at'==_0xf6a997[_0x4be379(0x124)])return'';if(_0x4be379(0x145)==_0xf6a997['name'])return'';if(_0x4be379(0x168)==_0xf6a997[_0x4be379(0x124)])return'';let _0x154058=this['getFieldType'](_0xf6a997),_0x2ba637=this[_0x4be379(0x180)](_0xf6a997),_0x484d50=camelCase(_0xf6a997[_0x4be379(0x124)]);return'\x20\x20'+(_0x4be379(0x175)+(0x0==_0x154058['length']?'':'type\x20=>'+_0x154058+',')+_0x4be379(0x190)+_0xf6a997['nullable']+_0x4be379(0x123))+_0x4be379(0x13b)+(''+_0x484d50+(_0xf6a997[_0x4be379(0x129)]?'?':'')+':\x20'+_0x2ba637)+'\x0a';});_0x810156=_0x810156[_0xee056e(0x142)](/{{newTypeColumns}}/g,_0x124a22[_0xee056e(0x152)]('\x0a'));let _0x2d471b=_0x194a62['map'](_0x4dca6b=>{const _0x24b49e=_0xee056e;if('id'==_0x4dca6b[_0x24b49e(0x124)])return'';if(_0x24b49e(0x14a)==_0x4dca6b[_0x24b49e(0x124)])return'';if(_0x24b49e(0x164)==_0x4dca6b[_0x24b49e(0x124)])return'';if(_0x24b49e(0x13d)==_0x4dca6b['name'])return'';if(_0x24b49e(0x145)==_0x4dca6b['name'])return'';if(_0x24b49e(0x168)==_0x4dca6b[_0x24b49e(0x124)])return'';let _0x50dbea=this['getFieldType'](_0x4dca6b),_0x6c2cfc=this[_0x24b49e(0x180)](_0x4dca6b);_0x4dca6b[_0x24b49e(0x129)]=!0x0;let _0x572ea0=camelCase(_0x4dca6b['name']);return'\x20\x20'+(_0x24b49e(0x175)+(0x0==_0x50dbea[_0x24b49e(0x17a)]?'':_0x24b49e(0x174)+_0x50dbea+',')+_0x24b49e(0x190)+_0x4dca6b['nullable']+'\x20})')+'\x0a\x20\x20'+(''+_0x572ea0+(_0x4dca6b[_0x24b49e(0x129)]?'?':'')+':\x20'+_0x6c2cfc)+'\x0a';});return _0x810156=_0x810156['replace'](/{{patchTypeColumns}}/g,_0x2d471b['join']('\x0a')),_0x810156;}[a0_0x4fc1bc(0x176)](_0x1e198e,_0xdf0392){const _0x114f36=a0_0x4fc1bc;let _0xd02457=serviceEntity,_0x32aeb7=_0xdf0392[_0x114f36(0x162)](function(_0x752fd2,_0x2c4f1c){const _0x767761=_0x114f36;return _0x752fd2[_0x767761(0x17b)]-_0x2c4f1c[_0x767761(0x17b)];})['map'](_0xcf12c=>this[_0x114f36(0x181)](_0xcf12c));[_0x114f36(0x17d),_0x114f36(0x158)][_0x114f36(0x125)](_0x1e198e[_0x114f36(0x167)])&&_0x32aeb7[_0x114f36(0x110)](_0x114f36(0x193)),_0xd02457=_0xd02457['replace'](/{{entityColumns}}/g,_0x32aeb7[_0x114f36(0x152)]('\x0a'));let _0x53c705='',_0x530bd2=_0xdf0392[_0x114f36(0x151)](_0x5a95c8=>_0x5a95c8[_0x114f36(0x126)]&&_0x5a95c8['uniqRank']>0x0)['sort'](function(_0x3b80ce,_0x5700ac){const _0x40d191=_0x114f36;return _0x3b80ce[_0x40d191(0x126)]-_0x5700ac['uniqRank'];});if(_0x530bd2[_0x114f36(0x17a)]>0x0){_0x53c705=_0x114f36(0x16b);let _0x486b88=_0x530bd2[_0x114f36(0x12d)](_0x1b4b27=>{const _0xd7d047=_0x114f36;let _0xf1aace=_0x1b4b27['name'];return _0xd7d047(0x14a)==_0x1b4b27[_0xd7d047(0x124)]&&(_0xf1aace=_0xd7d047(0x186)),_0xd7d047(0x145)==_0x1b4b27['name']&&(_0xf1aace=_0xd7d047(0x136)),_0xd7d047(0x168)==_0x1b4b27['name']&&(_0xf1aace='updater'),'{{camelCase\x20name}}.'+camelCase(_0xf1aace);});_0x53c705=_0x53c705['replace'](/{{indexColumns}}/g,_0x486b88[_0x114f36(0x152)](','));}return _0xd02457=_0xd02457[_0x114f36(0x142)](/{{indexAnn}}/g,_0x53c705),_0xd02457;}[a0_0x4fc1bc(0x183)](_0x49d302,_0x2ee8ee){const _0x561535=a0_0x4fc1bc;let _0x107aad=_0x561535(0x158)==_0x49d302[_0x561535(0x167)]?serviceEntityHistJson:serviceEntityHistCopy,_0x5d1a6f=_0x2ee8ee['sort'](function(_0x59719,_0x3679ef){const _0x1e5a24=_0x561535;return _0x59719['rank']-_0x3679ef[_0x1e5a24(0x17b)];})['map'](_0x5cd76f=>this[_0x561535(0x181)](_0x5cd76f));return _0x107aad=_0x107aad[_0x561535(0x142)](/{{entityColumns}}/g,_0x5d1a6f[_0x561535(0x152)]('\x0a')),_0x107aad;}[a0_0x4fc1bc(0x181)](_0x1e17c4){const _0x46aea3=a0_0x4fc1bc;if('id'==_0x1e17c4[_0x46aea3(0x124)])return'';if('domain_id'==_0x1e17c4[_0x46aea3(0x124)])return'';if(_0x46aea3(0x164)==_0x1e17c4[_0x46aea3(0x124)])return'';if(_0x46aea3(0x13d)==_0x1e17c4[_0x46aea3(0x124)])return'';if(_0x46aea3(0x145)==_0x1e17c4['name'])return'';if('updater_id'==_0x1e17c4[_0x46aea3(0x124)])return'';let _0x1ef0ad=_0x1e17c4[_0x46aea3(0x18d)];_0x46aea3(0x165)==_0x1e17c4['colType']&&(_0x1ef0ad=_0x46aea3(0x188)),_0x46aea3(0x10d)==_0x1e17c4[_0x46aea3(0x18d)]&&(_0x1ef0ad=_0x46aea3(0x155)),_0x46aea3(0x196)==_0x1e17c4[_0x46aea3(0x18d)]&&(_0x1ef0ad=_0x46aea3(0x185)),_0x46aea3(0x133)==_0x1e17c4[_0x46aea3(0x18d)]&&(_0x1ef0ad='timestamp\x20without\x20time\x20zone');let _0x2e30c5='';'string'==_0x1e17c4[_0x46aea3(0x18d)]&&(_0x2e30c5=_0x1e17c4['colSize']);let _0x2709bf=this[_0x46aea3(0x112)](_0x1e17c4),_0xbf6862=this[_0x46aea3(0x180)](_0x1e17c4),_0x30b177=camelCase(_0x1e17c4[_0x46aea3(0x124)]);return'\x20\x20'+('@Column({name:\x27'+_0x1e17c4[_0x46aea3(0x124)]+_0x46aea3(0x122)+_0x1ef0ad+_0x46aea3(0x141)+_0x1e17c4['nullable']+'\x20'+(0x0==_0x2e30c5['length']?'':_0x46aea3(0x191)+_0x2e30c5)+_0x46aea3(0x123))+_0x46aea3(0x13b)+('@Field('+(0x0==_0x2709bf[_0x46aea3(0x17a)]?'':'type\x20=>'+_0x2709bf+',')+'\x20{\x20nullable:\x20'+_0x1e17c4[_0x46aea3(0x129)]+'\x20})')+_0x46aea3(0x13b)+(''+_0x30b177+(_0x1e17c4[_0x46aea3(0x129)]?'?':'')+':\x20'+_0xbf6862)+'\x0a';}[a0_0x4fc1bc(0x112)](_0x1531db){const _0x3f8e09=a0_0x4fc1bc;let _0x34a693='';return _0x3f8e09(0x165)==_0x1531db[_0x3f8e09(0x18d)]&&(_0x34a693=_0x3f8e09(0x12e)),'float'==_0x1531db[_0x3f8e09(0x18d)]&&(_0x34a693=_0x3f8e09(0x12e)),_0x3f8e09(0x10d)==_0x1531db[_0x3f8e09(0x18d)]&&(_0x34a693=_0x3f8e09(0x14c)),_0x3f8e09(0x15d)==_0x1531db[_0x3f8e09(0x18d)]&&(_0x34a693=_0x3f8e09(0x14c)),_0x34a693;}[a0_0x4fc1bc(0x180)](_0x8c9690){const _0x17e940=a0_0x4fc1bc;let _0x3e930c=_0x8c9690['colType'];return _0x17e940(0x13c)==_0x8c9690['colType']&&(_0x3e930c=_0x17e940(0x128)),'double'==_0x8c9690[_0x17e940(0x18d)]&&(_0x3e930c='number'),_0x17e940(0x170)==_0x8c9690[_0x17e940(0x18d)]&&(_0x3e930c=_0x17e940(0x128)),_0x17e940(0x15d)==_0x8c9690[_0x17e940(0x18d)]&&(_0x3e930c=_0x17e940(0x128)),'long'==_0x8c9690[_0x17e940(0x18d)]&&(_0x3e930c='number'),'datetime'==_0x8c9690['colType']&&(_0x3e930c='Date'),_0x17e940(0x119)==_0x8c9690['colType']&&(_0x3e930c=_0x17e940(0x16f)),_0x17e940(0x11a)==_0x8c9690[_0x17e940(0x18d)]&&(_0x3e930c=_0x17e940(0x196)),_0x3e930c;}async[a0_0x4fc1bc(0x15c)](_0x50796d,_0x3ec29f,_0x5a46a5){const _0x5ed0d=a0_0x4fc1bc;await fs['writeFileSync'](_0x50796d,this[_0x5ed0d(0x16c)](_0x3ec29f,_0x5a46a5),'utf8');}['replaceNamesMap'](_0x3f0a4d,_0x2b72ab){const _0x5204e8=a0_0x4fc1bc;return _0x3f0a4d['replace'](/{{pascalCase name}}/g,_0x2b72ab['pascalCaseName'])[_0x5204e8(0x142)](/{{camelCase name}}/g,_0x2b72ab['camelCaseName'])[_0x5204e8(0x142)](/{{snakeCase name}}/g,_0x2b72ab[_0x5204e8(0x140)])[_0x5204e8(0x142)](/{{pluralPascalCase name}}/g,_0x2b72ab[_0x5204e8(0x144)])[_0x5204e8(0x142)](/{{pluralCamelCase name}}/g,_0x2b72ab[_0x5204e8(0x171)])[_0x5204e8(0x142)](/{{tableName}}/g,_0x2b72ab[_0x5204e8(0x13a)])[_0x5204e8(0x142)](/{{name}}/g,_0x2b72ab[_0x5204e8(0x124)]);}async['createServicePath'](_0x1ec43c,_0x30f45c,_0x484925){const _0x3046e9=a0_0x4fc1bc;let _0x1526f7=_0x1ec43c+_0x3046e9(0x194);await this[_0x3046e9(0x114)](_0x1526f7),_0x1526f7=_0x1526f7+'/'+_0x30f45c,await this[_0x3046e9(0x114)](_0x1526f7),_0x1526f7+=_0x3046e9(0x156),await this[_0x3046e9(0x114)](_0x1526f7),_0x1526f7+=_0x3046e9(0x154),await this[_0x3046e9(0x114)](_0x1526f7),_0x1526f7=_0x1526f7+'/'+_0x484925,await this[_0x3046e9(0x114)](_0x1526f7);}[a0_0x4fc1bc(0x187)](){const _0x32d1d0=a0_0x4fc1bc;let _0x4e4f54=process[_0x32d1d0(0x130)][_0x32d1d0(0x18c)][_0x32d1d0(0x11e)]('/'),_0x3ffdcd=[];for(let _0x1090b2=0x0;_0x1090b2<_0x4e4f54[_0x32d1d0(0x17a)]&&_0x32d1d0(0x121)!=_0x4e4f54[_0x1090b2];_0x1090b2++)_0x3ffdcd[_0x32d1d0(0x110)](_0x4e4f54[_0x1090b2]);return _0x3ffdcd['join']('/');}async[a0_0x4fc1bc(0x114)](_0x4dee63){const _0xf779f1=a0_0x4fc1bc;0x0==await this['existsPath'](_0x4dee63)&&fs[_0xf779f1(0x189)](_0x4dee63);}async[a0_0x4fc1bc(0x18a)](_0x58957e){const _0x467882=a0_0x4fc1bc;return await fs[_0x467882(0x10a)](_0x58957e);}};function a0_0x20c3(){const _0xec8b33=['/packages/','creator','design:type','-history\x27','480669ueeePj','tableName','\x0a\x20\x20','decimal','updated_at','EntitySubscribers,','utf8','snakeCaseName','\x27,\x20nullable:\x20','replace','19265192KrCFHc','pluralPascalCaseName','creator_id','10603775LHAjBS','__param','Entities,\x20resolvers\x20as\x20','/event-subscriber.ts','domain_id','createNoHistoryServiceFiels','Int','defineProperty','findOne','import\x20{\x20entities\x20as\x20','design:returntype','filter','join','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','/service','bigint','/server','state','JSON','/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...','__metadata','readFileSync','writeFile','integer','type-graphql','find','/*\x20ENTITIES\x20*/\x0a\x09...','\x0aimport\x20{\x20ObjectType,\x20Field,\x20InputType,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@InputType()\x0aexport\x20class\x20New{{pascalCase\x20name}}\x20{\x0a{{newTypeColumns}}\x0a}\x0a\x0a@InputType()\x0aexport\x20class\x20{{pascalCase\x20name}}Patch\x20{\x0a\x20\x20@Field(type\x20=>\x20ID,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20id?:\x20string\x0a\x0a{{patchTypeColumns}}\x0a\x0a\x20\x20@Field()\x0a\x20\x20cuFlag:\x20string\x0a}\x0a\x0a@ObjectType()\x0aexport\x20class\x20{{pascalCase\x20name}}List\x20{\x0a\x20\x20@Field(type\x20=>\x20[{{pascalCase\x20name}}])\x0a\x20\x20items:\x20{{pascalCase\x20name}}[]\x0a\x0a\x20\x20@Field(type\x20=>\x20Int)\x0a\x20\x20total:\x20number\x0a}\x0a','sort','createHistoryServiceFiles','created_at','double','index.ts','dataProp','updater_id','design:paramtypes','-history-type.ts','@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})','replaceNamesMap','...','.ts','Date','float','pluralCamelCaseName','Entity','/server/service/','type\x20=>','@Field(','createEntityText','3404802xVDaSr','@things-factory/resource-base','\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','length','rank','toolCreateService','COPY','indexOf','\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','getColTxtType','columnToEntityColumn','Query','createHistoryEntityText','Ctx','character\x20varying','domain','getProjectRootPath','double\x20precision','mkdirSync','existsPath','pascalCaseName','PWD','colType','__esModule','-query.ts','\x20{\x20nullable:\x20',',length:','tslib','\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201','/packages','export\x20*\x20from\x20\x27./','string','-type.ts','-history.ts','10515wweopN','existsSync','\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','__decorate','long','OperatoToolCreateService','pluralize','push','getRepository','getFieldType','5353782xkAkOs','createDir','-history-query.ts','@things-factory/shell','Entities,','Arg','date','text','Operato\x20Tool\x20Create\x20Service','/index.ts','\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','split','createServiceFiles','528429RurHbu','packages','\x27,\x20type:\x20\x27','\x20})','name','includes','uniqRank','\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','number','nullable','-mutation.ts','Resolvers,','Resolvers\x20}\x20from\x20\x27./','map','Float','EntitySubscribers\x20}\x20from\x20\x27./','env','\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','124WrJEjL','datetime','Resolvers,\x20subscribers\x20as\x20'];a0_0x20c3=function(){return _0xec8b33;};return a0_0x20c3();}tslib_1[a0_0x4fc1bc(0x10c)]([(0x0,type_graphql_1[a0_0x4fc1bc(0x182)])(_0x433a45=>Boolean,{'description':a0_0x4fc1bc(0x11b)}),tslib_1[a0_0x4fc1bc(0x147)](0x0,(0x0,type_graphql_1[a0_0x4fc1bc(0x118)])('id')),tslib_1[a0_0x4fc1bc(0x147)](0x1,(0x0,type_graphql_1[a0_0x4fc1bc(0x184)])()),tslib_1['__metadata'](a0_0x4fc1bc(0x137),Function),tslib_1[a0_0x4fc1bc(0x15a)](a0_0x4fc1bc(0x169),[String,Object]),tslib_1[a0_0x4fc1bc(0x15a)](a0_0x4fc1bc(0x150),Promise)],OperatoToolCreateService['prototype'],'toolCreateService',null),OperatoToolCreateService=tslib_1['__decorate']([(0x0,type_graphql_1['Resolver'])()],OperatoToolCreateService),exports[a0_0x4fc1bc(0x10e)]=OperatoToolCreateService;const allIndex='\x0a/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0a\x0a/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0a\x0aexport\x20const\x20entities\x20=\x20[\x20\x20\x0a\x20\x20/*\x20ENTITIES\x20*/\x0a]\x20\x0a\x0a\x0aexport\x20const\x20schema\x20=\x20{\x0a\x20\x20resolverClasses:\x20[\x0a\x20\x20\x20\x20/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x20\x20]\x20\x0a}\x0a\x0aexport\x20const\x20subscribers\x20=\x20[\x0a\x20\x20/*\x20SUBSCRIBERS\x20*/\x0a]\x0a',serviceIndex=a0_0x4fc1bc(0x17f),serviceHistoryIndex='\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryQuery\x20}\x20from\x20\x27./{{name}}-history-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryEntitySubscriber\x20}\x20from\x20\x27./event-subscriber\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}},\x20{{pascalCase\x20name}}History]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}HistoryQuery,\x20{{pascalCase\x20name}}Mutation]\x0aexport\x20const\x20subscribers\x20=\x20[{{pascalCase\x20name}}HistoryEntitySubscriber]\x0a\x0a',serviceQuery='\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='\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryList\x20}\x20from\x20\x27./{{name}}-history-type\x27\x0a\x0a@Resolver({{pascalCase\x20name}}History)\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryQuery\x20{\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}History,\x20{\x20description:\x20\x27To\x20fetch\x20a\x20{{pascalCase\x20name}}History\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}History(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}History>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20return\x20await\x20getRepository({{pascalCase\x20name}}History).findOne({\x0a\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20}\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}HistoryList,\x20{\x20description:\x20\x27To\x20fetch\x20multiple\x20{{pluralPascalCase\x20name}}History\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}Histories(@Args()\x20params:\x20ListParam,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}HistoryList>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20queryBuilder\x20=\x20getQueryBuilderFromListParams({\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20params,\x0a\x20\x20\x20\x20\x20\x20repository:\x20await\x20getRepository({{pascalCase\x20name}}History)\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20const\x20[items,\x20total]\x20=\x20await\x20queryBuilder.getManyAndCount()\x0a\x0a\x20\x20\x20\x20return\x20{\x20items,\x20total\x20}\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20Domain)\x0a\x20\x20async\x20domain(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<Domain>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(Domain).findOneBy({id:{{camelCase\x20name}}History.domainId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20updater(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}History.updaterId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20creator(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}History.creatorId})\x0a\x20\x20}\x0a}\x0a',serviceMutation='\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_0x4fc1bc(0x161),sereviceHistoryType=a0_0x4fc1bc(0x10b),serviceEntity=a0_0x4fc1bc(0x131),serviceEntityHistCopy=a0_0x4fc1bc(0x127),serviceEntityHistJson='\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a\x20\x20@Column(\x27simple-json\x27,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20@Field(type\x20=>\x20ScalarObject,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20historyJson?:\x20any\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a',serviceEntitySubscriber=a0_0x4fc1bc(0x179);
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';function a0_0x337d(_0x3240ab,_0xd592a6){const _0x3a3662=a0_0x3a36();return a0_0x337d=function(_0x337d1,_0x19d3f0){_0x337d1=_0x337d1-0x14e;let _0x39b70d=_0x3a3662[_0x337d1];return _0x39b70d;},a0_0x337d(_0x3240ab,_0xd592a6);}const a0_0x439d4c=a0_0x337d;(function(_0x3f9dbe,_0x174051){const _0x1f902a=a0_0x337d,_0x4c889a=_0x3f9dbe();while(!![]){try{const _0x5294a1=-parseInt(_0x1f902a(0x15a))/0x1*(parseInt(_0x1f902a(0x16e))/0x2)+parseInt(_0x1f902a(0x16b))/0x3*(parseInt(_0x1f902a(0x158))/0x4)+-parseInt(_0x1f902a(0x152))/0x5+parseInt(_0x1f902a(0x159))/0x6*(parseInt(_0x1f902a(0x157))/0x7)+parseInt(_0x1f902a(0x155))/0x8+parseInt(_0x1f902a(0x167))/0x9*(-parseInt(_0x1f902a(0x16f))/0xa)+-parseInt(_0x1f902a(0x16d))/0xb*(-parseInt(_0x1f902a(0x172))/0xc);if(_0x5294a1===_0x174051)break;else _0x4c889a['push'](_0x4c889a['shift']());}catch(_0xfc8339){_0x4c889a['push'](_0x4c889a['shift']());}}}(a0_0x3a36,0x459dc));function a0_0x3a36(){const _0x58c0d6=['10gjdBAq','Menu','__esModule','24lQbabX','andWhere','checkStudioPermission','LicenseError','select','from','333635XqdFWk','(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)','defineProperty','1600984vbhWdh','where','406bNHnax','4QToPMD','39498zpTBDt','239tqrBPT','@things-factory/menu-base','checkStudioTemplateIsOverLimit','menu','OVER_LIMIT','id\x20!=\x20:id','../../errors/license-error','getPermission','getRepository','Studio','split','getCount','@things-factory/operato-license-checker','1284273gqGxUE','ERROR_CODES','forEach','INVALID_LICENSE','1249359LysAZv','manager','47289hGeRcA','4288LuWDPQ'];a0_0x3a36=function(){return _0x58c0d6;};return a0_0x3a36();}Object[a0_0x439d4c(0x154)](exports,a0_0x439d4c(0x171),{'value':!0x0}),exports[a0_0x439d4c(0x15c)]=exports[a0_0x439d4c(0x14e)]=void 0x0;const operato_license_checker_1=require(a0_0x439d4c(0x166)),shell_1=require('@things-factory/shell'),menu_base_1=require(a0_0x439d4c(0x15b)),license_error_1=require(a0_0x439d4c(0x160));async function checkStudioPermission(){const _0xf3a842=a0_0x439d4c;let _0x579a01=((0x0,operato_license_checker_1[_0xf3a842(0x161)])('Permissions\x20For\x20Tailor\x20Tool')||',')[_0xf3a842(0x164)](',')['map'](_0x376e05=>_0x376e05['trim']()),_0x3870ea=!0x1;return _0x579a01[_0xf3a842(0x169)](_0x501724=>{const _0x3ab96a=_0xf3a842;_0x501724['includes'](_0x3ab96a(0x163))&&(_0x3870ea=!0x0);}),_0x3870ea;}async function checkStudioTemplateIsOverLimit(_0x2c3f10,_0x7ab4a0){const _0x2d2e14=a0_0x439d4c;if(0x0==await checkStudioPermission())throw new license_error_1[(_0x2d2e14(0x14f))]({'errorCode':_0x7ab4a0['t'](license_error_1[_0x2d2e14(0x14f)][_0x2d2e14(0x168)][_0x2d2e14(0x16a)])});var _0x2ccd35=0x0;if(_0x2ccd35=_0x2c3f10&&''!=_0x2c3f10?await(0x0,shell_1['getRepository'])(menu_base_1[_0x2d2e14(0x170)])[_0x2d2e14(0x16c)]['createQueryBuilder']()[_0x2d2e14(0x150)](_0x2d2e14(0x15d))[_0x2d2e14(0x151)](menu_base_1[_0x2d2e14(0x170)],_0x2d2e14(0x15d))[_0x2d2e14(0x156)](_0x2d2e14(0x15f),{'id':_0x2c3f10})[_0x2d2e14(0x173)](_0x2d2e14(0x153))[_0x2d2e14(0x165)]()+0x1:await(0x0,shell_1[_0x2d2e14(0x162)])(menu_base_1['Menu'])[_0x2d2e14(0x16c)]['createQueryBuilder']()[_0x2d2e14(0x150)](_0x2d2e14(0x15d))['from'](menu_base_1['Menu'],_0x2d2e14(0x15d))['where']('(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)')[_0x2d2e14(0x165)]()+0x1,!(0x0,operato_license_checker_1['checkTarget'])(_0x2ccd35))throw new license_error_1[(_0x2d2e14(0x14f))]({'errorCode':_0x7ab4a0['t'](license_error_1[_0x2d2e14(0x14f)][_0x2d2e14(0x168)][_0x2d2e14(0x15e)])});return!0x0;}exports[a0_0x439d4c(0x14e)]=checkStudioPermission,exports[a0_0x439d4c(0x15c)]=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_0x29ae9b=a0_0x175f;function a0_0x1bde(){const _0x543f65=['__metadata','studioPermission','160itrEgZ','__esModule','20973OmLAcF','82tzsMTG','OperatoToolResolver','3974670NaxZzi','design:paramtypes','design:returntype','Arg','prototype','type-graphql','Operato\x20Tool\x20Studio\x20Usage\x20Permissions','6QNfIUi','__decorate','design:type','233905hspYLN','__param','Query','769368ETkzNh','45GwwiGR','Ctx','checkStudioPermission','2156516iXMyXv','studioTemplateIsOverLimit','3979297faMlCk','818543wPZyNJ'];a0_0x1bde=function(){return _0x543f65;};return a0_0x1bde();}(function(_0x5c2b67,_0x4e4408){const _0x1f69b6=a0_0x175f,_0x204854=_0x5c2b67();while(!![]){try{const _0x92974a=parseInt(_0x1f69b6(0xdd))/0x1+parseInt(_0x1f69b6(0xd1))/0x2*(parseInt(_0x1f69b6(0xd0))/0x3)+parseInt(_0x1f69b6(0xe4))/0x4+-parseInt(_0x1f69b6(0xd3))/0x5+parseInt(_0x1f69b6(0xda))/0x6*(-parseInt(_0x1f69b6(0xca))/0x7)+-parseInt(_0x1f69b6(0xe0))/0x8*(parseInt(_0x1f69b6(0xe1))/0x9)+-parseInt(_0x1f69b6(0xce))/0xa*(-parseInt(_0x1f69b6(0xcb))/0xb);if(_0x92974a===_0x4e4408)break;else _0x204854['push'](_0x204854['shift']());}catch(_0x2ab808){_0x204854['push'](_0x204854['shift']());}}}(a0_0x1bde,0x631fd));Object['defineProperty'](exports,a0_0x29ae9b(0xcf),{'value':!0x0}),exports[a0_0x29ae9b(0xd2)]=void 0x0;const tslib_1=require('tslib'),type_graphql_1=require(a0_0x29ae9b(0xd8)),tool_permission_1=require('./tool-permission');function a0_0x175f(_0x4b47c5,_0x549058){const _0x1bde15=a0_0x1bde();return a0_0x175f=function(_0x175fdf,_0xc40a86){_0x175fdf=_0x175fdf-0xc9;let _0x1a4682=_0x1bde15[_0x175fdf];return _0x1a4682;},a0_0x175f(_0x4b47c5,_0x549058);}let OperatoToolResolver=class{async[a0_0x29ae9b(0xcd)](_0x3bbdfd){const _0x228c24=a0_0x29ae9b;return(0x0,tool_permission_1[_0x228c24(0xe3)])();}async['studioTemplateIsOverLimit'](_0x48adf3,_0x3eeb46){return(0x0,tool_permission_1['checkStudioTemplateIsOverLimit'])(_0x48adf3,_0x3eeb46);}};tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x29ae9b(0xdf)])(_0x3b8459=>Boolean,{'description':a0_0x29ae9b(0xd9)}),tslib_1[a0_0x29ae9b(0xde)](0x0,(0x0,type_graphql_1[a0_0x29ae9b(0xe2)])()),tslib_1[a0_0x29ae9b(0xcc)](a0_0x29ae9b(0xdc),Function),tslib_1[a0_0x29ae9b(0xcc)](a0_0x29ae9b(0xd4),[Object]),tslib_1[a0_0x29ae9b(0xcc)]('design:returntype',Promise)],OperatoToolResolver[a0_0x29ae9b(0xd7)],'studioPermission',null),tslib_1[a0_0x29ae9b(0xdb)]([(0x0,type_graphql_1[a0_0x29ae9b(0xdf)])(_0x2c1c18=>Boolean,{'description':'Operato\x20Tool\x20Studio\x20Limit\x20check'}),tslib_1[a0_0x29ae9b(0xde)](0x0,(0x0,type_graphql_1[a0_0x29ae9b(0xd6)])('id')),tslib_1[a0_0x29ae9b(0xde)](0x1,(0x0,type_graphql_1['Ctx'])()),tslib_1['__metadata'](a0_0x29ae9b(0xdc),Function),tslib_1['__metadata'](a0_0x29ae9b(0xd4),[String,Object]),tslib_1[a0_0x29ae9b(0xcc)](a0_0x29ae9b(0xd5),Promise)],OperatoToolResolver['prototype'],a0_0x29ae9b(0xc9),null),OperatoToolResolver=tslib_1[a0_0x29ae9b(0xdb)]([(0x0,type_graphql_1['Resolver'])()],OperatoToolResolver),exports[a0_0x29ae9b(0xd2)]=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();}