@things-factory/operato-tools 6.0.58 → 6.0.59

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_0xb2b9d1=a0_0x1df9;function a0_0x1df9(_0x46da04,_0x412321){const _0x2d537f=a0_0x2d53();return a0_0x1df9=function(_0x1df964,_0x25ba46){_0x1df964=_0x1df964-0x12d;let _0x53b4d1=_0x2d537f[_0x1df964];return _0x53b4d1;},a0_0x1df9(_0x46da04,_0x412321);}(function(_0x5e606d,_0x2217ef){const _0x39dba7=a0_0x1df9,_0x363e0e=_0x5e606d();while(!![]){try{const _0x47c5ef=parseInt(_0x39dba7(0x133))/0x1+-parseInt(_0x39dba7(0x136))/0x2+-parseInt(_0x39dba7(0x13b))/0x3+-parseInt(_0x39dba7(0x12e))/0x4*(-parseInt(_0x39dba7(0x130))/0x5)+parseInt(_0x39dba7(0x134))/0x6*(parseInt(_0x39dba7(0x131))/0x7)+-parseInt(_0x39dba7(0x13d))/0x8+-parseInt(_0x39dba7(0x137))/0x9;if(_0x47c5ef===_0x2217ef)break;else _0x363e0e['push'](_0x363e0e['shift']());}catch(_0x362fb9){_0x363e0e['push'](_0x363e0e['shift']());}}}(a0_0x2d53,0x1d749));Object[a0_0xb2b9d1(0x12f)](exports,a0_0xb2b9d1(0x13e),{'value':!0x0}),exports[a0_0xb2b9d1(0x13c)]=void 0x0;function a0_0x2d53(){const _0x3042ee=['tslib','100354LUzNwW','1717767oDfifY','errorCode','license-error','detail','553647OVkqBU','LicenseError','126544EeOhdH','__esModule','name','6212iAdcMp','defineProperty','510pLGmLi','7aqxqLh','../constants/error-code','198783hWPVPS','1229202gxhIJS'];a0_0x2d53=function(){return _0x3042ee;};return a0_0x2d53();}const tslib_1=require(a0_0xb2b9d1(0x135)),ERROR_CODES=tslib_1['__importStar'](require(a0_0xb2b9d1(0x132)));class LicenseError extends Error{static get['ERROR_CODES'](){return Object['assign']({},ERROR_CODES);}constructor({errorCode:_0x5be7d2,detail:_0x5b2e6c}){const _0x2ca87c=a0_0xb2b9d1;super(_0x5be7d2),this[_0x2ca87c(0x12d)]=_0x2ca87c(0x139),this[_0x2ca87c(0x138)]=_0x5be7d2,this[_0x2ca87c(0x13a)]=_0x5b2e6c;}}exports[a0_0xb2b9d1(0x13c)]=LicenseError;
1
+ 'use strict';const a0_0x3cf555=a0_0x4448;(function(_0x4e913b,_0xcdcae4){const _0x32d743=a0_0x4448,_0x235697=_0x4e913b();while(!![]){try{const _0xffbcb=parseInt(_0x32d743(0xb1))/0x1*(parseInt(_0x32d743(0xac))/0x2)+parseInt(_0x32d743(0xae))/0x3*(-parseInt(_0x32d743(0xab))/0x4)+parseInt(_0x32d743(0xa6))/0x5+-parseInt(_0x32d743(0xb4))/0x6*(-parseInt(_0x32d743(0xb0))/0x7)+parseInt(_0x32d743(0xb8))/0x8+-parseInt(_0x32d743(0xad))/0x9*(parseInt(_0x32d743(0xa9))/0xa)+-parseInt(_0x32d743(0xb6))/0xb;if(_0xffbcb===_0xcdcae4)break;else _0x235697['push'](_0x235697['shift']());}catch(_0xa0f6ba){_0x235697['push'](_0x235697['shift']());}}}(a0_0xc135,0x64049));function a0_0x4448(_0x255d8c,_0x1a9039){const _0xc135c0=a0_0xc135();return a0_0x4448=function(_0x44480a,_0x948aa3){_0x44480a=_0x44480a-0xa6;let _0x36491b=_0xc135c0[_0x44480a];return _0x36491b;},a0_0x4448(_0x255d8c,_0x1a9039);}function a0_0xc135(){const _0x2d6aeb=['570SQcYVw','LicenseError','52068ByiSUK','22wAFOlZ','6453PmREzH','9tzVnHj','errorCode','21nzoKyz','9294oVsSrV','license-error','ERROR_CODES','334290LVQUor','tslib','6090227qFveGq','../constants/error-code','3557088hsLQri','1646175VwLdNG','__esModule','detail'];a0_0xc135=function(){return _0x2d6aeb;};return a0_0xc135();}Object['defineProperty'](exports,a0_0x3cf555(0xa7),{'value':!0x0}),exports[a0_0x3cf555(0xaa)]=void 0x0;const tslib_1=require(a0_0x3cf555(0xb5)),ERROR_CODES=tslib_1['__importStar'](require(a0_0x3cf555(0xb7)));class LicenseError extends Error{static get[a0_0x3cf555(0xb3)](){return Object['assign']({},ERROR_CODES);}constructor({errorCode:_0xd55a37,detail:_0x5b1b36}){const _0x538694=a0_0x3cf555;super(_0xd55a37),this['name']=_0x538694(0xb2),this[_0x538694(0xaf)]=_0xd55a37,this[_0x538694(0xa8)]=_0x5b1b36;}}exports[a0_0x3cf555(0xaa)]=LicenseError;
package/server/routes.js CHANGED
@@ -1 +1 @@
1
- const a0_0xd2b7fd=a0_0x26c1;(function(_0x237bc5,_0x22222d){const _0xf96443=a0_0x26c1,_0x5e1bb7=_0x237bc5();while(!![]){try{const _0x10b5ab=parseInt(_0xf96443(0xa5))/0x1+-parseInt(_0xf96443(0xa9))/0x2+-parseInt(_0xf96443(0xb0))/0x3*(parseInt(_0xf96443(0xa3))/0x4)+-parseInt(_0xf96443(0xa2))/0x5+parseInt(_0xf96443(0xa6))/0x6*(parseInt(_0xf96443(0xac))/0x7)+parseInt(_0xf96443(0xaf))/0x8*(-parseInt(_0xf96443(0xaa))/0x9)+-parseInt(_0xf96443(0xab))/0xa*(-parseInt(_0xf96443(0xae))/0xb);if(_0x10b5ab===_0x22222d)break;else _0x5e1bb7['push'](_0x5e1bb7['shift']());}catch(_0x1eb7c3){_0x5e1bb7['push'](_0x5e1bb7['shift']());}}}(a0_0x2710,0x7aeb9));function a0_0x26c1(_0x14203d,_0x1a4cce){const _0x27104d=a0_0x2710();return a0_0x26c1=function(_0x26c174,_0x1b0b92){_0x26c174=_0x26c174-0xa0;let _0x576447=_0x27104d[_0x26c174];return _0x576447;},a0_0x26c1(_0x14203d,_0x1a4cce);}function a0_0x2710(){const _0x384f0a=['376sckbuL','1244769QHdirg','bootstrap-module-domain-public-route','bootstrap-module-global-public-route','120875sLgVeh','8EQhkvU','bootstrap-module-domain-private-route','998881XvCBSj','12euSLzp','debug','things-factory:operato-tools:routes','1560628HDbOSf','116973qXHtkO','168990lSwppF','2102317BggeXX','bootstrap-module-global-private-route','748TelLbf'];a0_0x2710=function(){return _0x384f0a;};return a0_0x2710();}const debug=require(a0_0xd2b7fd(0xa7))(a0_0xd2b7fd(0xa8));process['on'](a0_0xd2b7fd(0xa1),(_0x52cf2e,_0x5c4469)=>{}),process['on'](a0_0xd2b7fd(0xad),(_0xe3ede0,_0x690b3b)=>{}),process['on'](a0_0xd2b7fd(0xa0),(_0x141323,_0x5eaa5e)=>{}),process['on'](a0_0xd2b7fd(0xa4),(_0x241e4c,_0x1f431c)=>{});
1
+ const a0_0x3131bd=a0_0x44c9;function a0_0x44c9(_0x534304,_0x1b5336){const _0x436d51=a0_0x436d();return a0_0x44c9=function(_0x44c995,_0x2c0883){_0x44c995=_0x44c995-0x64;let _0x58f96e=_0x436d51[_0x44c995];return _0x58f96e;},a0_0x44c9(_0x534304,_0x1b5336);}(function(_0x4ba275,_0x22206e){const _0x9f30fe=a0_0x44c9,_0x37ffa3=_0x4ba275();while(!![]){try{const _0x300569=-parseInt(_0x9f30fe(0x68))/0x1*(parseInt(_0x9f30fe(0x6c))/0x2)+-parseInt(_0x9f30fe(0x66))/0x3+-parseInt(_0x9f30fe(0x65))/0x4+parseInt(_0x9f30fe(0x64))/0x5+parseInt(_0x9f30fe(0x6b))/0x6+-parseInt(_0x9f30fe(0x6a))/0x7+parseInt(_0x9f30fe(0x69))/0x8;if(_0x300569===_0x22206e)break;else _0x37ffa3['push'](_0x37ffa3['shift']());}catch(_0x28a493){_0x37ffa3['push'](_0x37ffa3['shift']());}}}(a0_0x436d,0x59fae));const debug=require(a0_0x3131bd(0x6f))('things-factory:operato-tools:routes');function a0_0x436d(){const _0x5390c5=['131768HBTekO','2047188XspKbR','1094xtcKZM','bootstrap-module-domain-private-route','bootstrap-module-global-public-route','debug','3553305PMYwEo','1915196hJGFhR','1400502ZyNDgC','bootstrap-module-domain-public-route','791RqtLTi','5710664SCohir'];a0_0x436d=function(){return _0x5390c5;};return a0_0x436d();}process['on'](a0_0x3131bd(0x6e),(_0x53bf80,_0x4716ac)=>{}),process['on']('bootstrap-module-global-private-route',(_0x4e30e6,_0x14f4f1)=>{}),process['on'](a0_0x3131bd(0x67),(_0x4bde2a,_0x4e76b5)=>{}),process['on'](a0_0x3131bd(0x6d),(_0x268229,_0x430168)=>{});
@@ -1 +1 @@
1
- 'use strict';const a0_0x33fb7e=a0_0x1d2d;(function(_0x2c98e2,_0x5deefb){const _0xfc8ff1=a0_0x1d2d,_0x2f9083=_0x2c98e2();while(!![]){try{const _0x234f98=parseInt(_0xfc8ff1(0x191))/0x1+parseInt(_0xfc8ff1(0x12c))/0x2*(-parseInt(_0xfc8ff1(0x173))/0x3)+parseInt(_0xfc8ff1(0x150))/0x4+parseInt(_0xfc8ff1(0x18d))/0x5*(-parseInt(_0xfc8ff1(0x130))/0x6)+-parseInt(_0xfc8ff1(0x192))/0x7+-parseInt(_0xfc8ff1(0x149))/0x8*(parseInt(_0xfc8ff1(0x181))/0x9)+-parseInt(_0xfc8ff1(0x15b))/0xa*(-parseInt(_0xfc8ff1(0x183))/0xb);if(_0x234f98===_0x5deefb)break;else _0x2f9083['push'](_0x2f9083['shift']());}catch(_0x2a9958){_0x2f9083['push'](_0x2f9083['shift']());}}}(a0_0x2077,0xe11be));function a0_0x2077(){const _0x2714f3=['design:type','refType',',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22','assign','\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}','261qwTAec','design:paramtypes','77ARRVxO','./../tool-secret/tool-permission','string','creator','OperatoToolCreateMenu','findOne','left','\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','join','query','5HnRfGC','push','{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22',',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22','1299624zGlNMQ','3875592DAEVGE','\x22,\x22desc\x22:','__metadata','updater_id','createGridColumns','aes-256-cfb1','\x22,\x22name\x22:\x20\x22','@transaction','aes256','toString','\x22,\x22header\x22:\x20\x22','sortRank','196eXkWgg','{\x22name\x22:\x22','searchOper','hidden','5576862LyMHmA','substring','createSearchCols','updated_at','createSortCols','split','replace','aes-256-ecb','Arg','Operato\x20Tool\x20Create\x20Menu','prototype','pluralize','searchRank','__esModule','sort','tslib','rank','creator_id','filter','menuType','aes-256-cfb','toolCreateMenu','\x27\x20or\x20id\x20=\x20\x27','EntityColumn','Menu','499128tzcXnz','created_at','dataProp','entity','code','select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27','@things-factory/resource-base','5942060twnLMe','enc','\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}','__param','refName','Directive','\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','\x20,\x22editable\x22:\x20','{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22',',\x22mandatory\x22:\x20','2045890xgVRdn','Mutation','defineProperty','type-graphql','routing','save','stringify','aes-256-cbc','__decorate','{\x22type\x22:\x20\x22','map','\x22,\x22operator\x22:\x20\x22','Ctx','Resolver','parent_menu_id','updater','update','gridRank','aes-256-cfb8','__importDefault','\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}',',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22','hex','createdAt','84ygXqgD','name','{\x22name\x22:\x20\x22','reverseSort','length','scenario','randomBytes','design:returntype','getRepository'];a0_0x2077=function(){return _0x2714f3;};return a0_0x2077();}Object[a0_0x33fb7e(0x15d)](exports,a0_0x33fb7e(0x13d),{'value':!0x0}),exports[a0_0x33fb7e(0x187)]=void 0x0;const tslib_1=require(a0_0x33fb7e(0x13f)),type_graphql_1=require(a0_0x33fb7e(0x15e)),resource_base_1=require(a0_0x33fb7e(0x14f)),menu_base_1=require('@things-factory/menu-base'),tool_permission_1=require(a0_0x33fb7e(0x184)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require('lodash'),{plural:plural}=require(a0_0x33fb7e(0x13b)),crypto_1=tslib_1[a0_0x33fb7e(0x16e)](require('crypto'));function a0_0x1d2d(_0x347742,_0x529f5c){const _0x207773=a0_0x2077();return a0_0x1d2d=function(_0x1d2d08,_0x1f0298){_0x1d2d08=_0x1d2d08-0x127;let _0x44e419=_0x207773[_0x1d2d08];return _0x44e419;},a0_0x1d2d(_0x347742,_0x529f5c);}let OperatoToolCreateMenu=class{async[a0_0x33fb7e(0x145)](_0x5f11db,_0x55193e,_0x4c399e){const _0x1ea68c=a0_0x33fb7e,{domain:_0x4adaec,user:_0x9c49ca,tx:_0x10a117}=_0x4c399e['state'];await(0x0,tool_permission_1['checkStudioTemplateIsOverLimit'])('',_0x4c399e);const _0x3a32d7=await _0x10a117[_0x1ea68c(0x17b)](resource_base_1['Entity'])[_0x1ea68c(0x188)]({'where':{'domain':{'id':_0x4adaec['id']},'id':_0x5f11db}}),_0x5852ea=await _0x10a117['getRepository'](resource_base_1[_0x1ea68c(0x147)])['find']({'where':{'domain':{'id':_0x4adaec['id']},'entity':{'id':_0x3a32d7['id']}}});let {name:_0x594799=''}=_0x3a32d7||{},_0x60e00a=kebabCase(_0x594799),_0xea9258=modelTemplate[_0x1ea68c(0x136)](/{{pascalCase name}}/g,startCase(camelCase(_0x594799))[_0x1ea68c(0x136)](/ /g,''))[_0x1ea68c(0x136)](/{{camelCase name}}/g,camelCase(_0x594799))[_0x1ea68c(0x136)](/{{snakeCase name}}/g,snakeCase(_0x594799))[_0x1ea68c(0x136)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x594799)))[_0x1ea68c(0x136)](/ /g,''))[_0x1ea68c(0x136)](/{{pluralCamelCase name}}/g,camelCase(plural(_0x594799)))['replace'](/{{name}}/g,_0x594799),_0x574450='';'JSON'==_0x3a32d7[_0x1ea68c(0x14b)]?_0x574450=_0x1ea68c(0x156):'COPY'==_0x3a32d7[_0x1ea68c(0x14b)]&&(_0x574450=_0x1ea68c(0x18a)),_0xea9258=_0xea9258[_0x1ea68c(0x136)](/{{HistoryButton}}/g,_0x574450);let _0x31a81f=this[_0x1ea68c(0x134)](_0x5852ea);_0xea9258=_0xea9258[_0x1ea68c(0x136)](/{{SortColumns}}/g,_0x31a81f[_0x1ea68c(0x18b)](','));let _0x4dfda6=this[_0x1ea68c(0x132)](_0x5852ea);_0xea9258=_0xea9258[_0x1ea68c(0x136)](/{{SearchColumns}}/g,_0x4dfda6[_0x1ea68c(0x18b)](','));let _0x1c11fd=this[_0x1ea68c(0x196)](_0x5852ea);return _0xea9258=_0xea9258['replace'](/{{GridColumns}}/g,_0x1c11fd[_0x1ea68c(0x18b)](',')),_0xea9258=this[_0x1ea68c(0x151)](_0xea9258),await this['createMenuData'](_0x10a117,_0x4adaec,_0x9c49ca,_0x55193e,_0x60e00a,_0xea9258),!0x0;}[a0_0x33fb7e(0x196)](_0xae2a7d){const _0x46e793=a0_0x33fb7e;return _0xae2a7d['filter'](_0x48f551=>'id'!=_0x48f551[_0x46e793(0x174)]&&_0x48f551['gridRank']>0x0)['sort'](function(_0x14fbf0,_0x430961){const _0x4dbc78=_0x46e793;return _0x14fbf0[_0x4dbc78(0x16c)]-_0x430961[_0x4dbc78(0x16c)];})[_0x46e793(0x165)](_0x50854c=>{const _0x465367=_0x46e793;let {gridEditor:_0x43b4a3=_0x465367(0x185),name:_0x198c27,term:_0x5d6de0,gridWidth:_0x57467d=0x0,gridAlign:_0x8055f9=_0x465367(0x189),nullable:_0x29575d=!0x1}=_0x50854c;if(null==_0x43b4a3&&(_0x43b4a3='string'),null==_0x8055f9&&(_0x8055f9=_0x465367(0x189)),_0x465367(0x195)==_0x198c27||_0x465367(0x141)==_0x198c27)return _0x198c27=_0x465367(0x195)==_0x198c27?_0x465367(0x16a):_0x465367(0x186),_0x465367(0x159)+_0x198c27+_0x465367(0x12a)+_0x198c27+_0x465367(0x152);if(_0x465367(0x133)==_0x198c27||_0x465367(0x14a)==_0x198c27)return _0x465367(0x18f)+(_0x465367(0x133)==_0x198c27?'updatedAt':_0x465367(0x172))+_0x465367(0x12a)+_0x198c27+_0x465367(0x16f);let _0xa50605='readonly'!=_0x43b4a3&&'hidden'!=_0x43b4a3,_0x35a6dc=_0x465367(0x12f)==_0x43b4a3;0x1!=_0x35a6dc&&0x0!=_0xa50605||(_0x43b4a3='string');let _0x46f138=_0x465367(0x164)+_0x43b4a3+_0x465367(0x198)+camelCase(_0x198c27)+'\x22,\x22header\x22:\x20\x22'+_0x5d6de0+'\x22,\x22hidden\x22:'+_0x35a6dc+_0x465367(0x158)+_0xa50605+_0x465367(0x15a)+!_0x29575d+_0x465367(0x190)+_0x8055f9+'\x22,\x22width\x22:'+_0x57467d+'\x20,\x22exportable\x22:\x20true';return _0x465367(0x14d)==_0x50854c[_0x465367(0x17d)]&&(_0x46f138+=_0x465367(0x17e)+_0x50854c['refName']+'\x22}'),_0x465367(0x178)==_0x50854c['refType']&&(_0x46f138+=_0x465367(0x170)+_0x50854c['refName']+'\x22}'),_0x465367(0x14c)==_0x50854c['refType']&&(_0x46f138+=',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22'+camelCase(plural(_0x50854c[_0x465367(0x154)]))+_0x465367(0x180)),_0x46f138+='}',_0x46f138;});}[a0_0x33fb7e(0x132)](_0x4dd93d){const _0x32f076=a0_0x33fb7e;return _0x4dd93d[_0x32f076(0x142)](_0x529a52=>_0x529a52['searchRank']>0x0)[_0x32f076(0x13e)](function(_0x264206,_0x1ff325){const _0x421de0=_0x32f076;return _0x264206[_0x421de0(0x13c)]-_0x1ff325[_0x421de0(0x13c)];})[_0x32f076(0x165)](_0x24bff0=>{const _0x4e0754=_0x32f076;let _0x1d5eed=_0x24bff0[_0x4e0754(0x12e)];return _0x4e0754(0x142)==_0x1d5eed?'\x22'+camelCase(_0x24bff0['name'])+'\x22':(_0x1d5eed||(_0x1d5eed='eq'),_0x4e0754(0x175)+camelCase(_0x24bff0[_0x4e0754(0x174)])+_0x4e0754(0x166)+_0x1d5eed+'\x22}');});}[a0_0x33fb7e(0x134)](_0x128da1){const _0x3a821b=a0_0x33fb7e;return _0x128da1[_0x3a821b(0x142)](_0x5112d8=>_0x5112d8[_0x3a821b(0x12b)]>0x0)[_0x3a821b(0x13e)](function(_0x1227fa,_0x279352){const _0x5bf068=_0x3a821b;return _0x1227fa['sortRank']-_0x279352[_0x5bf068(0x12b)];})[_0x3a821b(0x165)](_0x52e006=>_0x3a821b(0x12d)+camelCase(_0x52e006[_0x3a821b(0x174)])+_0x3a821b(0x193)+_0x52e006[_0x3a821b(0x176)]+'}');}async['createMenuData'](_0x5ef3d1,_0x19bcd6,_0x510bd4,_0xe84266,_0x3be2b9,_0x155b49){const _0x34d6a6=a0_0x33fb7e;let _0x350dc3=await _0x5ef3d1[_0x34d6a6(0x17b)](menu_base_1['Menu'])['findOne']({'where':{'domain':{'id':_0x19bcd6['id']},'id':_0xe84266}}),_0x12f658=(await _0x5ef3d1[_0x34d6a6(0x17b)](menu_base_1[_0x34d6a6(0x148)])[_0x34d6a6(0x18c)](_0x34d6a6(0x14e)+_0xe84266+_0x34d6a6(0x146)+_0xe84266+'\x27'))[0x0][_0x34d6a6(0x140)]+0xa,_0x3901d3=new menu_base_1['Menu']();_0x3901d3['name']=_0x3be2b9,_0x3901d3[_0x34d6a6(0x143)]='SCREEN',_0x3901d3['category']='meta-grist-page',_0x3901d3[_0x34d6a6(0x140)]=_0x12f658,_0x3901d3['hiddenFlag']=!0x1,_0x3901d3[_0x34d6a6(0x15f)]=_0x3be2b9,_0x3901d3['template']=_0x155b49,_0x3901d3['resourceUrl']=_0x34d6a6(0x157),_0x3901d3['parent']=_0x350dc3,await _0x5ef3d1['getRepository'](menu_base_1[_0x34d6a6(0x148)])[_0x34d6a6(0x160)](Object[_0x34d6a6(0x17f)](Object[_0x34d6a6(0x17f)]({},_0x3901d3),{'domain':_0x19bcd6,'creator':_0x510bd4,'updater':_0x510bd4}));}[a0_0x33fb7e(0x151)](_0x575d4a){const _0x454094=a0_0x33fb7e;let _0x300212=JSON[_0x454094(0x161)](_0x575d4a)[_0x454094(0x135)](/(.{100})/)[_0x454094(0x142)](_0x39ea78=>_0x39ea78),_0x410c12=[_0x454094(0x137),_0x454094(0x162),_0x454094(0x144),_0x454094(0x16d),_0x454094(0x197),'aes-256-ofb','aes-256-ctr',_0x454094(0x128)],_0x16c0d7=crypto_1['default'][_0x454094(0x179)](0x20)[_0x454094(0x129)](_0x454094(0x171)),_0x5b8b7f=Buffer['from'](_0x16c0d7,_0x454094(0x171)),_0x5867d4=_0x16c0d7[_0x454094(0x131)](0x0,0x10),_0xa34d4=['',_0x5867d4,_0x5867d4,_0x5867d4,_0x5867d4,_0x5867d4,_0x5867d4,_0x5867d4],_0x14027a=0x0,_0xadbb68=[];_0xadbb68[_0x454094(0x18e)](_0x16c0d7);for(var _0x2a01ec=0x0;_0x2a01ec<_0x300212['length'];_0x2a01ec++,_0x14027a++){_0x14027a==_0x410c12[_0x454094(0x177)]&&(_0x14027a=0x0);let _0x4e2d24=crypto_1['default']['createCipheriv'](_0x410c12[_0x14027a],_0x5b8b7f,_0xa34d4[_0x14027a]),_0x41e69e=_0x4e2d24[_0x454094(0x16b)](_0x300212[_0x2a01ec],'utf8','hex');_0x41e69e+=_0x4e2d24['final']('hex'),_0xadbb68[_0x454094(0x18e)](_0x41e69e);}return _0xadbb68[_0x454094(0x18b)]('h1z0q9i9x7q6');}};tslib_1[a0_0x33fb7e(0x163)]([(0x0,type_graphql_1[a0_0x33fb7e(0x155)])(a0_0x33fb7e(0x127)),(0x0,type_graphql_1[a0_0x33fb7e(0x15c)])(_0x27f42c=>Boolean,{'description':a0_0x33fb7e(0x139)}),tslib_1[a0_0x33fb7e(0x153)](0x0,(0x0,type_graphql_1[a0_0x33fb7e(0x138)])('id')),tslib_1[a0_0x33fb7e(0x153)](0x1,(0x0,type_graphql_1[a0_0x33fb7e(0x138)])(a0_0x33fb7e(0x169))),tslib_1['__param'](0x2,(0x0,type_graphql_1[a0_0x33fb7e(0x167)])()),tslib_1[a0_0x33fb7e(0x194)](a0_0x33fb7e(0x17c),Function),tslib_1[a0_0x33fb7e(0x194)](a0_0x33fb7e(0x182),[String,String,Object]),tslib_1[a0_0x33fb7e(0x194)](a0_0x33fb7e(0x17a),Promise)],OperatoToolCreateMenu[a0_0x33fb7e(0x13a)],a0_0x33fb7e(0x145),null),OperatoToolCreateMenu=tslib_1[a0_0x33fb7e(0x163)]([(0x0,type_graphql_1[a0_0x33fb7e(0x168)])()],OperatoToolCreateMenu),exports[a0_0x33fb7e(0x187)]=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_0x3fa1c5=a0_0x2d40;(function(_0x2bf94d,_0x5073d0){const _0x2b0155=a0_0x2d40,_0x2acbbf=_0x2bf94d();while(!![]){try{const _0x1f6964=parseInt(_0x2b0155(0x111))/0x1*(parseInt(_0x2b0155(0x14a))/0x2)+parseInt(_0x2b0155(0x141))/0x3*(parseInt(_0x2b0155(0x105))/0x4)+-parseInt(_0x2b0155(0x109))/0x5*(parseInt(_0x2b0155(0x10b))/0x6)+-parseInt(_0x2b0155(0x16b))/0x7+-parseInt(_0x2b0155(0x11e))/0x8+parseInt(_0x2b0155(0x162))/0x9+parseInt(_0x2b0155(0x127))/0xa;if(_0x1f6964===_0x5073d0)break;else _0x2acbbf['push'](_0x2acbbf['shift']());}catch(_0x1217e7){_0x2acbbf['push'](_0x2acbbf['shift']());}}}(a0_0x56ad,0xef588));Object['defineProperty'](exports,'__esModule',{'value':!0x0}),exports['OperatoToolCreateMenu']=void 0x0;function a0_0x2d40(_0x100255,_0x3332e3){const _0x56ad9b=a0_0x56ad();return a0_0x2d40=function(_0x2d407a,_0x27178f){_0x2d407a=_0x2d407a-0x101;let _0x1c466c=_0x56ad9b[_0x2d407a];return _0x1c466c;},a0_0x2d40(_0x100255,_0x3332e3);}const tslib_1=require('tslib'),type_graphql_1=require(a0_0x3fa1c5(0x110)),resource_base_1=require(a0_0x3fa1c5(0x13d)),menu_base_1=require('@things-factory/menu-base'),tool_permission_1=require(a0_0x3fa1c5(0x103)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require('lodash'),{plural:plural}=require(a0_0x3fa1c5(0x131)),crypto_1=tslib_1['__importDefault'](require(a0_0x3fa1c5(0x133)));let OperatoToolCreateMenu=class{async[a0_0x3fa1c5(0x12a)](_0x71576d,_0x36302b,_0x4ac580){const _0x11ffc2=a0_0x3fa1c5,{domain:_0x547067,user:_0x46ab55,tx:_0x2cf3b6}=_0x4ac580[_0x11ffc2(0x10d)];await(0x0,tool_permission_1[_0x11ffc2(0x15d)])('',_0x4ac580);const _0x1dcc9a=await _0x2cf3b6['getRepository'](resource_base_1[_0x11ffc2(0x15b)])['findOne']({'where':{'domain':{'id':_0x547067['id']},'id':_0x71576d}}),_0x35ba4f=await _0x2cf3b6['getRepository'](resource_base_1['EntityColumn'])['find']({'where':{'domain':{'id':_0x547067['id']},'entity':{'id':_0x1dcc9a['id']}}});let {name:_0x3b9b34=''}=_0x1dcc9a||{},_0x2997c2=kebabCase(_0x3b9b34),_0x5a5d72=modelTemplate[_0x11ffc2(0x152)](/{{pascalCase name}}/g,startCase(camelCase(_0x3b9b34))[_0x11ffc2(0x152)](/ /g,''))['replace'](/{{camelCase name}}/g,camelCase(_0x3b9b34))[_0x11ffc2(0x152)](/{{snakeCase name}}/g,snakeCase(_0x3b9b34))[_0x11ffc2(0x152)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x3b9b34)))[_0x11ffc2(0x152)](/ /g,''))[_0x11ffc2(0x152)](/{{pluralCamelCase name}}/g,camelCase(plural(_0x3b9b34)))[_0x11ffc2(0x152)](/{{name}}/g,_0x3b9b34),_0x1b8d26='';_0x11ffc2(0x165)==_0x1dcc9a['dataProp']?_0x1b8d26=_0x11ffc2(0x123):'COPY'==_0x1dcc9a['dataProp']&&(_0x1b8d26='\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'),_0x5a5d72=_0x5a5d72[_0x11ffc2(0x152)](/{{HistoryButton}}/g,_0x1b8d26);let _0x100a3d=this[_0x11ffc2(0x173)](_0x35ba4f);_0x5a5d72=_0x5a5d72[_0x11ffc2(0x152)](/{{SortColumns}}/g,_0x100a3d[_0x11ffc2(0x154)](','));let _0x252336=this[_0x11ffc2(0x137)](_0x35ba4f);_0x5a5d72=_0x5a5d72['replace'](/{{SearchColumns}}/g,_0x252336[_0x11ffc2(0x154)](','));let _0x18ee18=this[_0x11ffc2(0x108)](_0x35ba4f);return _0x5a5d72=_0x5a5d72[_0x11ffc2(0x152)](/{{GridColumns}}/g,_0x18ee18[_0x11ffc2(0x154)](',')),_0x5a5d72=this[_0x11ffc2(0x14e)](_0x5a5d72),await this[_0x11ffc2(0x157)](_0x2cf3b6,_0x547067,_0x46ab55,_0x36302b,_0x2997c2,_0x5a5d72),!0x0;}[a0_0x3fa1c5(0x108)](_0x3f01b4){const _0x8438bb=a0_0x3fa1c5;return _0x3f01b4[_0x8438bb(0x14c)](_0xeb0cd3=>'id'!=_0xeb0cd3[_0x8438bb(0x10c)]&&_0xeb0cd3[_0x8438bb(0x129)]>0x0)[_0x8438bb(0x143)](function(_0x1a46fe,_0x56ff3f){return _0x1a46fe['gridRank']-_0x56ff3f['gridRank'];})['map'](_0x363e32=>{const _0x6080d4=_0x8438bb;let {gridEditor:_0x1d226e=_0x6080d4(0x155),name:_0x4ee9c9,term:_0x442414,gridWidth:_0x4448ab=0x0,gridAlign:_0x100893='left',nullable:_0x5285e3=!0x1}=_0x363e32;if(null==_0x1d226e&&(_0x1d226e=_0x6080d4(0x155)),null==_0x100893&&(_0x100893=_0x6080d4(0x139)),_0x6080d4(0x161)==_0x4ee9c9||'creator_id'==_0x4ee9c9)return _0x4ee9c9=_0x6080d4(0x161)==_0x4ee9c9?_0x6080d4(0x116):_0x6080d4(0x153),'{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22'+_0x4ee9c9+_0x6080d4(0x10a)+_0x4ee9c9+'\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}';if(_0x6080d4(0x10e)==_0x4ee9c9||_0x6080d4(0x119)==_0x4ee9c9)return _0x6080d4(0x15a)+('updated_at'==_0x4ee9c9?_0x6080d4(0x120):_0x6080d4(0x121))+_0x6080d4(0x10a)+_0x4ee9c9+_0x6080d4(0x16c);let _0x2195e7=_0x6080d4(0x102)!=_0x1d226e&&_0x6080d4(0x13e)!=_0x1d226e,_0x32d87b=_0x6080d4(0x13e)==_0x1d226e;0x1!=_0x32d87b&&0x0!=_0x2195e7||(_0x1d226e=_0x6080d4(0x155));let _0x3d9a1d=_0x6080d4(0x125)+_0x1d226e+_0x6080d4(0x159)+camelCase(_0x4ee9c9)+_0x6080d4(0x10a)+_0x442414+_0x6080d4(0x11d)+_0x32d87b+'\x20,\x22editable\x22:\x20'+_0x2195e7+_0x6080d4(0x11b)+!_0x5285e3+_0x6080d4(0x150)+_0x100893+_0x6080d4(0x169)+_0x4448ab+_0x6080d4(0x172);return _0x6080d4(0x128)==_0x363e32['refType']&&(_0x3d9a1d+=_0x6080d4(0x144)+_0x363e32[_0x6080d4(0x130)]+'\x22}'),'scenario'==_0x363e32[_0x6080d4(0x107)]&&(_0x3d9a1d+=_0x6080d4(0x16a)+_0x363e32[_0x6080d4(0x130)]+'\x22}'),_0x6080d4(0x10f)==_0x363e32[_0x6080d4(0x107)]&&(_0x3d9a1d+=',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22'+camelCase(plural(_0x363e32[_0x6080d4(0x130)]))+_0x6080d4(0x126)),_0x3d9a1d+='}',_0x3d9a1d;});}[a0_0x3fa1c5(0x137)](_0x524649){const _0x271a2f=a0_0x3fa1c5;return _0x524649[_0x271a2f(0x14c)](_0x20ab0b=>_0x20ab0b[_0x271a2f(0x138)]>0x0)[_0x271a2f(0x143)](function(_0x4381a8,_0x49090e){const _0x1c445d=_0x271a2f;return _0x4381a8[_0x1c445d(0x138)]-_0x49090e[_0x1c445d(0x138)];})[_0x271a2f(0x14b)](_0x36c592=>{const _0x1e12f5=_0x271a2f;let _0x3b7037=_0x36c592[_0x1e12f5(0x167)];return _0x1e12f5(0x14c)==_0x3b7037?'\x22'+camelCase(_0x36c592[_0x1e12f5(0x10c)])+'\x22':(_0x3b7037||(_0x3b7037='eq'),_0x1e12f5(0x156)+camelCase(_0x36c592['name'])+_0x1e12f5(0x14f)+_0x3b7037+'\x22}');});}[a0_0x3fa1c5(0x173)](_0x37ab73){const _0x407aeb=a0_0x3fa1c5;return _0x37ab73['filter'](_0x20e64e=>_0x20e64e[_0x407aeb(0x146)]>0x0)[_0x407aeb(0x143)](function(_0x28eaeb,_0x2125f0){const _0x50c842=_0x407aeb;return _0x28eaeb['sortRank']-_0x2125f0[_0x50c842(0x146)];})[_0x407aeb(0x14b)](_0x4aa221=>_0x407aeb(0x117)+camelCase(_0x4aa221[_0x407aeb(0x10c)])+_0x407aeb(0x168)+_0x4aa221[_0x407aeb(0x11f)]+'}');}async['createMenuData'](_0x27b45c,_0xfad92b,_0x431c84,_0x27ba99,_0x2e392f,_0x3c4146){const _0x46c0cb=a0_0x3fa1c5;let _0x404321=await _0x27b45c[_0x46c0cb(0x104)](menu_base_1[_0x46c0cb(0x171)])[_0x46c0cb(0x124)]({'where':{'domain':{'id':_0xfad92b['id']},'id':_0x27ba99}}),_0x3b1b3b=(await _0x27b45c[_0x46c0cb(0x104)](menu_base_1[_0x46c0cb(0x171)])['query']('select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27'+_0x27ba99+_0x46c0cb(0x166)+_0x27ba99+'\x27'))[0x0][_0x46c0cb(0x113)]+0xa,_0x67aee4=new menu_base_1[(_0x46c0cb(0x171))]();_0x67aee4[_0x46c0cb(0x10c)]=_0x2e392f,_0x67aee4[_0x46c0cb(0x118)]=_0x46c0cb(0x101),_0x67aee4['category']=_0x46c0cb(0x14d),_0x67aee4['rank']=_0x3b1b3b,_0x67aee4[_0x46c0cb(0x11a)]=!0x1,_0x67aee4[_0x46c0cb(0x12d)]=_0x2e392f,_0x67aee4['template']=_0x3c4146,_0x67aee4[_0x46c0cb(0x12e)]='@things-factory/meta-ui/client/pages/meta-grist-page',_0x67aee4['parent']=_0x404321,await _0x27b45c[_0x46c0cb(0x104)](menu_base_1[_0x46c0cb(0x171)])['save'](Object[_0x46c0cb(0x12b)](Object['assign']({},_0x67aee4),{'domain':_0xfad92b,'creator':_0x431c84,'updater':_0x431c84}));}[a0_0x3fa1c5(0x14e)](_0x1f3912){const _0x3b4555=a0_0x3fa1c5;let _0x31256a=JSON[_0x3b4555(0x16f)](_0x1f3912)[_0x3b4555(0x12f)](/(.{100})/)[_0x3b4555(0x14c)](_0x1d2f96=>_0x1d2f96),_0x2c51a5=[_0x3b4555(0x115),_0x3b4555(0x158),'aes-256-cfb',_0x3b4555(0x149),_0x3b4555(0x151),_0x3b4555(0x15f),_0x3b4555(0x114),_0x3b4555(0x134)],_0x3dc0f7=crypto_1[_0x3b4555(0x13a)][_0x3b4555(0x122)](0x20)[_0x3b4555(0x163)](_0x3b4555(0x13b)),_0x5693c1=Buffer['from'](_0x3dc0f7,_0x3b4555(0x13b)),_0x53fab3=_0x3dc0f7[_0x3b4555(0x142)](0x0,0x10),_0xc5c744=['',_0x53fab3,_0x53fab3,_0x53fab3,_0x53fab3,_0x53fab3,_0x53fab3,_0x53fab3],_0x335eb0=0x0,_0x4b75b5=[];_0x4b75b5[_0x3b4555(0x112)](_0x3dc0f7);for(var _0x4017b9=0x0;_0x4017b9<_0x31256a['length'];_0x4017b9++,_0x335eb0++){_0x335eb0==_0x2c51a5[_0x3b4555(0x12c)]&&(_0x335eb0=0x0);let _0xce7be0=crypto_1[_0x3b4555(0x13a)]['createCipheriv'](_0x2c51a5[_0x335eb0],_0x5693c1,_0xc5c744[_0x335eb0]),_0x53ad08=_0xce7be0[_0x3b4555(0x16d)](_0x31256a[_0x4017b9],'utf8',_0x3b4555(0x13b));_0x53ad08+=_0xce7be0['final'](_0x3b4555(0x13b)),_0x4b75b5[_0x3b4555(0x112)](_0x53ad08);}return _0x4b75b5[_0x3b4555(0x154)]('h1z0q9i9x7q6');}};tslib_1[a0_0x3fa1c5(0x147)]([(0x0,type_graphql_1[a0_0x3fa1c5(0x132)])(a0_0x3fa1c5(0x160)),(0x0,type_graphql_1[a0_0x3fa1c5(0x11c)])(_0x38be5e=>Boolean,{'description':a0_0x3fa1c5(0x140)}),tslib_1['__param'](0x0,(0x0,type_graphql_1['Arg'])('id')),tslib_1['__param'](0x1,(0x0,type_graphql_1[a0_0x3fa1c5(0x13c)])(a0_0x3fa1c5(0x106))),tslib_1[a0_0x3fa1c5(0x170)](0x2,(0x0,type_graphql_1[a0_0x3fa1c5(0x145)])()),tslib_1[a0_0x3fa1c5(0x15c)](a0_0x3fa1c5(0x164),Function),tslib_1[a0_0x3fa1c5(0x15c)](a0_0x3fa1c5(0x135),[String,String,Object]),tslib_1[a0_0x3fa1c5(0x15c)](a0_0x3fa1c5(0x136),Promise)],OperatoToolCreateMenu[a0_0x3fa1c5(0x16e)],'toolCreateMenu',null),OperatoToolCreateMenu=tslib_1[a0_0x3fa1c5(0x147)]([(0x0,type_graphql_1[a0_0x3fa1c5(0x148)])()],OperatoToolCreateMenu),exports[a0_0x3fa1c5(0x15e)]=OperatoToolCreateMenu;function a0_0x56ad(){const _0x3d1391=['aes-256-ofb','@transaction','updater_id','10601235jdCCQJ','toString','design:type','JSON','\x27\x20or\x20id\x20=\x20\x27','searchOper','\x22,\x22desc\x22:','\x22,\x22width\x22:',',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22','1859662VuJjDm','\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}','update','prototype','stringify','__param','Menu','\x20,\x22exportable\x22:\x20true','createSortCols','SCREEN','readonly','./../tool-secret/tool-permission','getRepository','13924nyaGEh','parent_menu_id','refType','createGridColumns','30SqxSJZ','\x22,\x22header\x22:\x20\x22','1182444RNcxgQ','name','state','updated_at','entity','type-graphql','2SEFaTa','push','rank','aes-256-ctr','aes-256-ecb','updater','{\x22name\x22:\x22','menuType','created_at','hiddenFlag',',\x22mandatory\x22:\x20','Mutation','\x22,\x22hidden\x22:','7974320riEUvf','reverseSort','updatedAt','createdAt','randomBytes','\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','findOne','{\x22type\x22:\x20\x22','\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}','3406320hNYtMh','code','gridRank','toolCreateMenu','assign','length','routing','resourceUrl','split','refName','pluralize','Directive','crypto','aes256','design:paramtypes','design:returntype','createSearchCols','searchRank','left','default','hex','Arg','@things-factory/resource-base','hidden','\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','Operato\x20Tool\x20Create\x20Menu','141mmNvJJ','substring','sort',',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22','Ctx','sortRank','__decorate','Resolver','aes-256-cfb8','1743106avDqNF','map','filter','meta-grist-page','enc','\x22,\x22operator\x22:\x20\x22',',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22','aes-256-cfb1','replace','creator','join','string','{\x22name\x22:\x20\x22','createMenuData','aes-256-cbc','\x22,\x22name\x22:\x20\x22','{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22','Entity','__metadata','checkStudioTemplateIsOverLimit','OperatoToolCreateMenu'];a0_0x56ad=function(){return _0x3d1391;};return a0_0x56ad();}const modelTemplate=a0_0x3fa1c5(0x13f);
@@ -1 +1 @@
1
- 'use strict';const a0_0x1e6da0=a0_0x2ff9;(function(_0x1c16a8,_0x147226){const _0x5113ad=a0_0x2ff9,_0x55bad2=_0x1c16a8();while(!![]){try{const _0x4fc1c5=parseInt(_0x5113ad(0x1db))/0x1+-parseInt(_0x5113ad(0x20d))/0x2*(parseInt(_0x5113ad(0x20c))/0x3)+parseInt(_0x5113ad(0x1b9))/0x4*(parseInt(_0x5113ad(0x1f9))/0x5)+-parseInt(_0x5113ad(0x1b4))/0x6*(-parseInt(_0x5113ad(0x215))/0x7)+parseInt(_0x5113ad(0x22f))/0x8+-parseInt(_0x5113ad(0x1e1))/0x9+parseInt(_0x5113ad(0x1d8))/0xa*(-parseInt(_0x5113ad(0x1d3))/0xb);if(_0x4fc1c5===_0x147226)break;else _0x55bad2['push'](_0x55bad2['shift']());}catch(_0x41b109){_0x55bad2['push'](_0x55bad2['shift']());}}}(a0_0x27d2,0xd28ba));Object[a0_0x1e6da0(0x1e3)](exports,a0_0x1e6da0(0x1c4),{'value':!0x0}),exports[a0_0x1e6da0(0x1c5)]=void 0x0;const tslib_1=require('tslib'),type_graphql_1=require(a0_0x1e6da0(0x227)),shell_1=require(a0_0x1e6da0(0x1f3)),resource_base_1=require(a0_0x1e6da0(0x1bb)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x1e6da0(0x1f6)),{plural:plural}=require('pluralize'),fs=require('fs');function a0_0x2ff9(_0x34b8fb,_0x7413e0){const _0x27d273=a0_0x27d2();return a0_0x2ff9=function(_0x2ff93e,_0x581fa3){_0x2ff93e=_0x2ff93e-0x1ad;let _0x5325a4=_0x27d273[_0x2ff93e];return _0x5325a4;},a0_0x2ff9(_0x34b8fb,_0x7413e0);}let OperatoToolCreateService=class{async[a0_0x1e6da0(0x1f1)](_0x52ef8d,_0x3267b1){const _0x79c079=a0_0x1e6da0,{domain:_0x1f6674}=_0x3267b1[_0x79c079(0x1c0)],_0x3201b6=await(0x0,shell_1[_0x79c079(0x1b5)])(resource_base_1['Entity'])[_0x79c079(0x212)]({'where':{'id':_0x52ef8d}}),_0x358995=await(0x0,shell_1[_0x79c079(0x1b5)])(resource_base_1[_0x79c079(0x1ca)])[_0x79c079(0x1f4)]({'where':{'domain':{'id':_0x1f6674['id']},'entity':{'id':_0x3201b6['id']}}});let {name:_0x2289fd='',bundle:_0x4e9c8e=''}=_0x3201b6||{},_0x11276c=this['getProjectRootPath'](),_0x43dcb3=kebabCase(_0x2289fd);return await this[_0x79c079(0x1c6)](_0x11276c,_0x4e9c8e,_0x43dcb3),await this['createServiceFiles'](_0x11276c,_0x4e9c8e,_0x2289fd,_0x43dcb3,_0x3201b6,_0x358995),!0x0;}async[a0_0x1e6da0(0x205)](_0x5eba8b,_0x4a7b1b,_0x2caf7d,_0x40baea,_0x3d881f,_0x4eae79){const _0x5f2d75=a0_0x1e6da0;let _0xc64cbb={'name':_0x40baea,'pascalCaseName':startCase(camelCase(_0x2caf7d))[_0x5f2d75(0x211)](/ /g,''),'camelCaseName':camelCase(_0x2caf7d),'snakeCaseName':snakeCase(_0x2caf7d),'pluralPascalCaseName':startCase(camelCase(plural(_0x2caf7d)))[_0x5f2d75(0x211)](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x2caf7d))},_0x1d2293=_0x5eba8b+_0x5f2d75(0x1f5)+_0x4a7b1b+_0x5f2d75(0x1be);['JSON',_0x5f2d75(0x1d2)][_0x5f2d75(0x1fc)](_0x3d881f[_0x5f2d75(0x201)])?await this['createHistoryServiceFiles'](_0x1d2293,_0x40baea,_0x3d881f,_0x4eae79,_0xc64cbb):await this['createNoHistoryServiceFiels'](_0x1d2293,_0x40baea,_0x3d881f,_0x4eae79,_0xc64cbb);}async[a0_0x1e6da0(0x234)](_0x2dbcf6,_0x384935,_0x30a50e,_0x32eafc,_0x56d194){const _0x2fcaad=a0_0x1e6da0;await this[_0x2fcaad(0x23e)](_0x2dbcf6+(_0x384935+_0x2fcaad(0x1ce)),serviceHistoryIndex,_0x56d194);let _0x744aa7=this[_0x2fcaad(0x1d4)](_0x30a50e,_0x32eafc);await this[_0x2fcaad(0x23e)](_0x2dbcf6+(_0x384935+'/'+_0x384935+_0x2fcaad(0x1b7)),_0x744aa7,_0x56d194),await this['writeFile'](_0x2dbcf6+(_0x384935+'/'+_0x384935+_0x2fcaad(0x222)),serviceQuery,_0x56d194),await this[_0x2fcaad(0x23e)](_0x2dbcf6+(_0x384935+'/'+_0x384935+'-mutation.ts'),serviceMutation,_0x56d194);let _0xb6bc=this[_0x2fcaad(0x1ad)](_0x32eafc);await this[_0x2fcaad(0x23e)](_0x2dbcf6+(_0x384935+'/'+_0x384935+'-type.ts'),_0xb6bc,_0x56d194);let _0x2de519=this[_0x2fcaad(0x1d0)](_0x30a50e,_0x32eafc);await this['writeFile'](_0x2dbcf6+(_0x384935+'/'+_0x384935+_0x2fcaad(0x23b)),_0x2de519,_0x56d194);let _0x36d61b='';_0x2fcaad(0x232)==_0x30a50e[_0x2fcaad(0x201)]?(_0x36d61b='\x0a\x20\x20public\x20createHistoryEntity(manager,\x20entity)\x20{\x0a\x20\x20\x20\x20let\x20history\x20=\x20manager.create(this.historyEntity,\x20entity);\x0a\x20\x20\x20\x20history.historyJson\x20=\x20JSON.stringify(entity);\x0a\x20\x20\x20\x20return\x20history;\x0a\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20',await this['writeFile'](_0x2dbcf6+(_0x384935+_0x2fcaad(0x22e)),serviceEntitySubscriber,_0x56d194)):_0x36d61b='';let _0x2125f7=serviceEntitySubscriber[_0x2fcaad(0x211)](/{{entityToJson}}/g,_0x36d61b);await this[_0x2fcaad(0x23e)](_0x2dbcf6+(_0x384935+_0x2fcaad(0x22e)),_0x2125f7,_0x56d194),await this[_0x2fcaad(0x23e)](_0x2dbcf6+(_0x384935+'/'+_0x384935+_0x2fcaad(0x20e)),serviceHistoryQuery,_0x56d194),await this[_0x2fcaad(0x23e)](_0x2dbcf6+(_0x384935+'/'+_0x384935+_0x2fcaad(0x1bc)),sereviceHistoryType,_0x56d194);let _0x2df64f=_0x2dbcf6+_0x2fcaad(0x236);0x0==await this['existsPath'](_0x2df64f)&&await this[_0x2fcaad(0x23e)](_0x2df64f,allIndex,_0x56d194);let _0x1fc735=await fs[_0x2fcaad(0x1cc)](_0x2df64f,'utf8');_0x1fc735['indexOf'](_0x2fcaad(0x1cb)+_0x56d194[_0x2fcaad(0x1b0)]+'/'+_0x56d194[_0x2fcaad(0x1b0)]+_0x2fcaad(0x22b))<0x0&&(_0x1fc735=_0x1fc735['replace'](/\/\* EXPORT ENTITY TYPES \*\//,_0x2fcaad(0x1e4)+_0x56d194[_0x2fcaad(0x1b0)]+'/'+_0x56d194[_0x2fcaad(0x1b0)]+_0x2fcaad(0x22b))),_0x1fc735[_0x2fcaad(0x217)]('export\x20*\x20from\x20\x27./'+_0x56d194[_0x2fcaad(0x1b0)]+'/'+_0x56d194[_0x2fcaad(0x1b0)]+'\x27')<0x0&&(_0x1fc735=_0x1fc735[_0x2fcaad(0x211)](/\/\* EXPORT ENTITY TYPES \*\//,_0x2fcaad(0x1e4)+_0x56d194['name']+'/'+_0x56d194['name']+'\x27')),_0x1fc735[_0x2fcaad(0x217)](_0x2fcaad(0x1e7)+_0x56d194['pascalCaseName']+_0x2fcaad(0x1c8)+_0x56d194[_0x2fcaad(0x1d6)]+_0x2fcaad(0x1ff)+_0x56d194[_0x2fcaad(0x1d6)]+_0x2fcaad(0x21c)+_0x56d194[_0x2fcaad(0x1b0)]+'\x27')<0x0&&(_0x1fc735=_0x1fc735[_0x2fcaad(0x211)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x2fcaad(0x210)+_0x56d194[_0x2fcaad(0x1d6)]+'Entities,\x20resolvers\x20as\x20'+_0x56d194[_0x2fcaad(0x1d6)]+'Resolvers,\x20subscribers\x20as\x20'+_0x56d194['pascalCaseName']+_0x2fcaad(0x21c)+_0x56d194[_0x2fcaad(0x1b0)]+'\x27')),_0x1fc735[_0x2fcaad(0x217)]('...'+_0x56d194[_0x2fcaad(0x1d6)]+_0x2fcaad(0x226))<0x0&&(_0x1fc735=_0x1fc735[_0x2fcaad(0x211)](/\/\* ENTITIES \*\//,_0x2fcaad(0x230)+_0x56d194[_0x2fcaad(0x1d6)]+'Entities,')),_0x1fc735[_0x2fcaad(0x217)](_0x2fcaad(0x218)+_0x56d194[_0x2fcaad(0x1d6)]+_0x2fcaad(0x20f))<0x0&&(_0x1fc735=_0x1fc735['replace'](/\/\* RESOLVER CLASSES \*\//,_0x2fcaad(0x224)+_0x56d194[_0x2fcaad(0x1d6)]+'Resolvers,')),_0x1fc735[_0x2fcaad(0x217)](_0x2fcaad(0x218)+_0x56d194[_0x2fcaad(0x1d6)]+_0x2fcaad(0x1da))<0x0&&(_0x1fc735=_0x1fc735[_0x2fcaad(0x211)](/\/\* SUBSCRIBERS \*\//,_0x2fcaad(0x21f)+_0x56d194[_0x2fcaad(0x1d6)]+_0x2fcaad(0x1da))),await this[_0x2fcaad(0x23e)](_0x2df64f,_0x1fc735,_0x56d194);}async[a0_0x1e6da0(0x1eb)](_0x580ce8,_0x44dac9,_0x5dbb10,_0x813222,_0x432624){const _0x89dd61=a0_0x1e6da0;await this[_0x89dd61(0x23e)](_0x580ce8+(_0x44dac9+_0x89dd61(0x1ce)),serviceIndex,_0x432624),await this['writeFile'](_0x580ce8+(_0x44dac9+'/'+_0x44dac9+'-query.ts'),serviceQuery,_0x432624),await this[_0x89dd61(0x23e)](_0x580ce8+(_0x44dac9+'/'+_0x44dac9+_0x89dd61(0x1c9)),serviceMutation,_0x432624);let _0x1b9103=this[_0x89dd61(0x1d4)](_0x5dbb10,_0x813222);await this['writeFile'](_0x580ce8+(_0x44dac9+'/'+_0x44dac9+_0x89dd61(0x1b7)),_0x1b9103,_0x432624);let _0x8dc19d=this['createTypeText'](_0x813222);await this[_0x89dd61(0x23e)](_0x580ce8+(_0x44dac9+'/'+_0x44dac9+_0x89dd61(0x1cd)),_0x8dc19d,_0x432624);let _0x1d4306=_0x580ce8+_0x89dd61(0x236);0x0==await this[_0x89dd61(0x22a)](_0x1d4306)&&await this[_0x89dd61(0x23e)](_0x1d4306,allIndex,_0x432624);let _0x359c8f=await fs['readFileSync'](_0x1d4306,_0x89dd61(0x1bd));_0x359c8f[_0x89dd61(0x217)](_0x89dd61(0x1cb)+_0x432624[_0x89dd61(0x1b0)]+'/'+_0x432624[_0x89dd61(0x1b0)]+'\x27')<0x0&&(_0x359c8f=_0x359c8f[_0x89dd61(0x211)](/\/\* EXPORT ENTITY TYPES \*\//,_0x89dd61(0x1e4)+_0x432624[_0x89dd61(0x1b0)]+'/'+_0x432624[_0x89dd61(0x1b0)]+'\x27')),_0x359c8f[_0x89dd61(0x217)](_0x89dd61(0x1e7)+_0x432624[_0x89dd61(0x1d6)]+'Entities,\x20resolvers\x20as\x20'+_0x432624[_0x89dd61(0x1d6)]+_0x89dd61(0x1f0)+_0x432624[_0x89dd61(0x1b0)]+'\x27')<0x0&&(_0x359c8f=_0x359c8f[_0x89dd61(0x211)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,'/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20'+_0x432624[_0x89dd61(0x1d6)]+_0x89dd61(0x1c8)+_0x432624[_0x89dd61(0x1d6)]+_0x89dd61(0x1f0)+_0x432624[_0x89dd61(0x1b0)]+'\x27')),_0x359c8f[_0x89dd61(0x217)](_0x89dd61(0x218)+_0x432624['pascalCaseName']+_0x89dd61(0x226))<0x0&&(_0x359c8f=_0x359c8f[_0x89dd61(0x211)](/\/\* ENTITIES \*\//,_0x89dd61(0x230)+_0x432624[_0x89dd61(0x1d6)]+_0x89dd61(0x226))),_0x359c8f[_0x89dd61(0x217)](_0x89dd61(0x218)+_0x432624[_0x89dd61(0x1d6)]+_0x89dd61(0x20f))<0x0&&(_0x359c8f=_0x359c8f[_0x89dd61(0x211)](/\/\* RESOLVER CLASSES \*\//,_0x89dd61(0x224)+_0x432624[_0x89dd61(0x1d6)]+_0x89dd61(0x20f))),await this[_0x89dd61(0x23e)](_0x1d4306,_0x359c8f,_0x432624);}['createTypeText'](_0x328f7e){const _0x2153f3=a0_0x1e6da0;let _0x292267=sereviceType,_0x247674=_0x328f7e['map'](_0x5041fa=>{const _0x17be8b=a0_0x2ff9;if('id'==_0x5041fa['name'])return'';if(_0x17be8b(0x221)==_0x5041fa[_0x17be8b(0x1b0)])return'';if(_0x17be8b(0x22d)==_0x5041fa[_0x17be8b(0x1b0)])return'';if(_0x17be8b(0x238)==_0x5041fa[_0x17be8b(0x1b0)])return'';if(_0x17be8b(0x23c)==_0x5041fa[_0x17be8b(0x1b0)])return'';if(_0x17be8b(0x20b)==_0x5041fa[_0x17be8b(0x1b0)])return'';let _0x7457f7=this[_0x17be8b(0x1f7)](_0x5041fa),_0x45cc3d=this[_0x17be8b(0x21e)](_0x5041fa),_0x8d6320=camelCase(_0x5041fa[_0x17be8b(0x1b0)]);return'\x20\x20'+('@Field('+(0x0==_0x7457f7[_0x17be8b(0x1ba)]?'':_0x17be8b(0x229)+_0x7457f7+',')+_0x17be8b(0x1c2)+_0x5041fa[_0x17be8b(0x1d7)]+_0x17be8b(0x239))+_0x17be8b(0x213)+(''+_0x8d6320+(_0x5041fa[_0x17be8b(0x1d7)]?'?':'')+':\x20'+_0x45cc3d)+'\x0a';});_0x292267=_0x292267['replace'](/{{newTypeColumns}}/g,_0x247674[_0x2153f3(0x1b2)]('\x0a'));let _0xe1f496=_0x328f7e['map'](_0x2f24e9=>{const _0x41f847=_0x2153f3;if('id'==_0x2f24e9[_0x41f847(0x1b0)])return'';if(_0x41f847(0x221)==_0x2f24e9[_0x41f847(0x1b0)])return'';if(_0x41f847(0x22d)==_0x2f24e9[_0x41f847(0x1b0)])return'';if(_0x41f847(0x238)==_0x2f24e9[_0x41f847(0x1b0)])return'';if('creator_id'==_0x2f24e9[_0x41f847(0x1b0)])return'';if(_0x41f847(0x20b)==_0x2f24e9[_0x41f847(0x1b0)])return'';let _0x50b886=this[_0x41f847(0x1f7)](_0x2f24e9),_0x4ba9b5=this[_0x41f847(0x21e)](_0x2f24e9);_0x2f24e9['nullable']=!0x0;let _0x295ae6=camelCase(_0x2f24e9[_0x41f847(0x1b0)]);return'\x20\x20'+('@Field('+(0x0==_0x50b886[_0x41f847(0x1ba)]?'':_0x41f847(0x229)+_0x50b886+',')+'\x20{\x20nullable:\x20'+_0x2f24e9['nullable']+'\x20})')+'\x0a\x20\x20'+(''+_0x295ae6+(_0x2f24e9[_0x41f847(0x1d7)]?'?':'')+':\x20'+_0x4ba9b5)+'\x0a';});return _0x292267=_0x292267[_0x2153f3(0x211)](/{{patchTypeColumns}}/g,_0xe1f496[_0x2153f3(0x1b2)]('\x0a')),_0x292267;}['createEntityText'](_0x3c6695,_0xee9d12){const _0x588d00=a0_0x1e6da0;let _0x1556ae=serviceEntity,_0x47275e=_0xee9d12[_0x588d00(0x1b8)](function(_0x1a11a7,_0x47a6b0){return _0x1a11a7['rank']-_0x47a6b0['rank'];})[_0x588d00(0x225)](_0x19886e=>this['columnToEntityColumn'](_0x19886e));[_0x588d00(0x1d2),'JSON']['includes'](_0x3c6695[_0x588d00(0x201)])&&_0x47275e[_0x588d00(0x214)](_0x588d00(0x1d9)),_0x1556ae=_0x1556ae['replace'](/{{entityColumns}}/g,_0x47275e[_0x588d00(0x1b2)]('\x0a'));let _0x2b51aa='',_0x30d4a9=_0xee9d12[_0x588d00(0x233)](_0x4ff660=>_0x4ff660[_0x588d00(0x1e9)]&&_0x4ff660[_0x588d00(0x1e9)]>0x0)[_0x588d00(0x1b8)](function(_0x4c1b45,_0x5f91ad){const _0x4022d5=_0x588d00;return _0x4c1b45[_0x4022d5(0x1e9)]-_0x5f91ad[_0x4022d5(0x1e9)];});if(_0x30d4a9[_0x588d00(0x1ba)]>0x0){_0x2b51aa=_0x588d00(0x207);let _0x1ba125=_0x30d4a9[_0x588d00(0x225)](_0x5d1476=>{const _0x3b40dc=_0x588d00;let _0x59cef1=_0x5d1476[_0x3b40dc(0x1b0)];return _0x3b40dc(0x221)==_0x5d1476['name']&&(_0x59cef1=_0x3b40dc(0x1c7)),_0x3b40dc(0x23c)==_0x5d1476[_0x3b40dc(0x1b0)]&&(_0x59cef1=_0x3b40dc(0x209)),_0x3b40dc(0x20b)==_0x5d1476[_0x3b40dc(0x1b0)]&&(_0x59cef1=_0x3b40dc(0x1c3)),'{{camelCase\x20name}}.'+camelCase(_0x59cef1);});_0x2b51aa=_0x2b51aa['replace'](/{{indexColumns}}/g,_0x1ba125[_0x588d00(0x1b2)](','));}return _0x1556ae=_0x1556ae[_0x588d00(0x211)](/{{indexAnn}}/g,_0x2b51aa),_0x1556ae;}[a0_0x1e6da0(0x1d0)](_0x4382e7,_0x40d130){const _0x4b9064=a0_0x1e6da0;let _0x34741d=_0x4b9064(0x232)==_0x4382e7['dataProp']?serviceEntityHistJson:serviceEntityHistCopy,_0x1673d4=_0x40d130[_0x4b9064(0x1b8)](function(_0x4c3c9c,_0x5a8d7f){const _0x27ed27=_0x4b9064;return _0x4c3c9c[_0x27ed27(0x1ec)]-_0x5a8d7f[_0x27ed27(0x1ec)];})[_0x4b9064(0x225)](_0x44cc0e=>this['columnToEntityColumn'](_0x44cc0e));return _0x34741d=_0x34741d[_0x4b9064(0x211)](/{{entityColumns}}/g,_0x1673d4['join']('\x0a')),_0x34741d;}['columnToEntityColumn'](_0x407e4a){const _0x20064e=a0_0x1e6da0;if('id'==_0x407e4a[_0x20064e(0x1b0)])return'';if(_0x20064e(0x221)==_0x407e4a[_0x20064e(0x1b0)])return'';if(_0x20064e(0x22d)==_0x407e4a['name'])return'';if(_0x20064e(0x238)==_0x407e4a[_0x20064e(0x1b0)])return'';if(_0x20064e(0x23c)==_0x407e4a['name'])return'';if('updater_id'==_0x407e4a[_0x20064e(0x1b0)])return'';let _0x1feb33=_0x407e4a[_0x20064e(0x1bf)];_0x20064e(0x1ee)==_0x407e4a[_0x20064e(0x1bf)]&&(_0x1feb33=_0x20064e(0x1b1)),_0x20064e(0x1ea)==_0x407e4a['colType']&&(_0x1feb33=_0x20064e(0x1ef)),_0x20064e(0x223)==_0x407e4a[_0x20064e(0x1bf)]&&(_0x1feb33=_0x20064e(0x1ed)),_0x20064e(0x1fb)==_0x407e4a['colType']&&(_0x1feb33=_0x20064e(0x1e8));let _0x4d2ed9='';_0x20064e(0x223)==_0x407e4a['colType']&&(_0x4d2ed9=_0x407e4a[_0x20064e(0x1dc)]);let _0x5bbee4=this['getFieldType'](_0x407e4a),_0x532b19=this[_0x20064e(0x21e)](_0x407e4a),_0x4271a0=camelCase(_0x407e4a[_0x20064e(0x1b0)]);return'\x20\x20'+(_0x20064e(0x1f8)+_0x407e4a[_0x20064e(0x1b0)]+_0x20064e(0x1f2)+_0x1feb33+'\x27,\x20nullable:\x20'+_0x407e4a['nullable']+'\x20'+(0x0==_0x4d2ed9['length']?'':_0x20064e(0x1dd)+_0x4d2ed9)+_0x20064e(0x239))+'\x0a\x20\x20'+(_0x20064e(0x220)+(0x0==_0x5bbee4[_0x20064e(0x1ba)]?'':_0x20064e(0x229)+_0x5bbee4+',')+_0x20064e(0x1c2)+_0x407e4a[_0x20064e(0x1d7)]+_0x20064e(0x239))+_0x20064e(0x213)+(''+_0x4271a0+(_0x407e4a['nullable']?'?':'')+':\x20'+_0x532b19)+'\x0a';}[a0_0x1e6da0(0x1f7)](_0x530ce4){const _0x36b0cd=a0_0x1e6da0;let _0x4185e5='';return _0x36b0cd(0x1ee)==_0x530ce4[_0x36b0cd(0x1bf)]&&(_0x4185e5=_0x36b0cd(0x1fe)),_0x36b0cd(0x204)==_0x530ce4[_0x36b0cd(0x1bf)]&&(_0x4185e5=_0x36b0cd(0x1fe)),'long'==_0x530ce4[_0x36b0cd(0x1bf)]&&(_0x4185e5=_0x36b0cd(0x1de)),'integer'==_0x530ce4[_0x36b0cd(0x1bf)]&&(_0x4185e5=_0x36b0cd(0x1de)),_0x4185e5;}[a0_0x1e6da0(0x21e)](_0x1f8faa){const _0x4c22eb=a0_0x1e6da0;let _0x5b5799=_0x1f8faa[_0x4c22eb(0x1bf)];return _0x4c22eb(0x206)==_0x1f8faa[_0x4c22eb(0x1bf)]&&(_0x5b5799=_0x4c22eb(0x1cf)),_0x4c22eb(0x1ee)==_0x1f8faa[_0x4c22eb(0x1bf)]&&(_0x5b5799='number'),'float'==_0x1f8faa[_0x4c22eb(0x1bf)]&&(_0x5b5799=_0x4c22eb(0x1cf)),_0x4c22eb(0x1b3)==_0x1f8faa['colType']&&(_0x5b5799=_0x4c22eb(0x1cf)),'long'==_0x1f8faa['colType']&&(_0x5b5799=_0x4c22eb(0x1cf)),_0x4c22eb(0x1fb)==_0x1f8faa[_0x4c22eb(0x1bf)]&&(_0x5b5799=_0x4c22eb(0x235)),_0x4c22eb(0x1c1)==_0x1f8faa[_0x4c22eb(0x1bf)]&&(_0x5b5799=_0x4c22eb(0x235)),_0x4c22eb(0x1fa)==_0x1f8faa[_0x4c22eb(0x1bf)]&&(_0x5b5799=_0x4c22eb(0x223)),_0x5b5799;}async['writeFile'](_0x33be1a,_0x176961,_0xd8f72a){const _0x233b9e=a0_0x1e6da0;await fs['writeFileSync'](_0x33be1a,this['replaceNamesMap'](_0x176961,_0xd8f72a),_0x233b9e(0x1bd));}['replaceNamesMap'](_0x363f06,_0x55fd5f){const _0x137492=a0_0x1e6da0;return _0x363f06[_0x137492(0x211)](/{{pascalCase name}}/g,_0x55fd5f[_0x137492(0x1d6)])[_0x137492(0x211)](/{{camelCase name}}/g,_0x55fd5f[_0x137492(0x1af)])[_0x137492(0x211)](/{{snakeCase name}}/g,_0x55fd5f['snakeCaseName'])['replace'](/{{pluralPascalCase name}}/g,_0x55fd5f[_0x137492(0x219)])[_0x137492(0x211)](/{{pluralCamelCase name}}/g,_0x55fd5f['pluralCamelCaseName'])['replace'](/{{name}}/g,_0x55fd5f[_0x137492(0x1b0)]);}async[a0_0x1e6da0(0x1c6)](_0x1ffafa,_0x3b2c9d,_0x42cf8b){const _0x1d22d9=a0_0x1e6da0;let _0x378509=_0x1ffafa+'/packages';await this[_0x1d22d9(0x231)](_0x378509),_0x378509=_0x378509+'/'+_0x3b2c9d,await this[_0x1d22d9(0x231)](_0x378509),_0x378509+=_0x1d22d9(0x1d1),await this[_0x1d22d9(0x231)](_0x378509),_0x378509+='/service',await this[_0x1d22d9(0x231)](_0x378509),_0x378509=_0x378509+'/'+_0x42cf8b,await this[_0x1d22d9(0x231)](_0x378509);}['getProjectRootPath'](){const _0x131f04=a0_0x1e6da0;let _0x4f9bf3=process['env'][_0x131f04(0x1e0)][_0x131f04(0x1ae)]('/'),_0x29f099=[];for(let _0x3dbf4a=0x0;_0x3dbf4a<_0x4f9bf3[_0x131f04(0x1ba)]&&_0x131f04(0x1fd)!=_0x4f9bf3[_0x3dbf4a];_0x3dbf4a++)_0x29f099[_0x131f04(0x214)](_0x4f9bf3[_0x3dbf4a]);return _0x29f099[_0x131f04(0x1b2)]('/');}async[a0_0x1e6da0(0x231)](_0x1943e7){const _0x13e530=a0_0x1e6da0;0x0==await this[_0x13e530(0x22a)](_0x1943e7)&&fs['mkdirSync'](_0x1943e7);}async[a0_0x1e6da0(0x22a)](_0x15a20b){const _0x6bbb6a=a0_0x1e6da0;return await fs[_0x6bbb6a(0x1e2)](_0x15a20b);}};function a0_0x27d2(){const _0x1fa31e=['createServicePath','domain','Entities,\x20resolvers\x20as\x20','-mutation.ts','EntityColumn','export\x20*\x20from\x20\x27./','readFileSync','-type.ts','/index.ts','number','createHistoryEntityText','/server','COPY','2609101YFPUEv','createEntityText','Query','pascalCaseName','nullable','30HeoGOC','\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201','EntitySubscribers,','398620HWwLBG','colSize',',length:','Int','design:returntype','PWD','4863015nMiToD','existsSync','defineProperty','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','\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','__metadata','import\x20{\x20entities\x20as\x20','timestamp\x20without\x20time\x20zone','uniqRank','long','createNoHistoryServiceFiels','rank','character\x20varying','double','bigint','Resolvers\x20}\x20from\x20\x27./','toolCreateService','\x27,\x20type:\x20\x27','@things-factory/shell','find','/packages/','lodash','getFieldType','@Column({name:\x27','1127845OAvihn','text','datetime','includes','packages','Float','Resolvers,\x20subscribers\x20as\x20','\x0aimport\x20{\x20Resolver,\x20Mutation,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20In\x20}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20New{{pascalCase\x20name}},\x20{{pascalCase\x20name}}Patch\x20}\x20from\x20\x27./{{name}}-type\x27\x0aimport\x20{\x20getRepository\x20}\x20from\x20\x27@things-factory/shell\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Mutation\x20{\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20create\x20new\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20create{{pascalCase\x20name}}(@Arg(\x27{{camelCase\x20name}}\x27)\x20{{camelCase\x20name}}:\x20New{{pascalCase\x20name}},\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20return\x20await\x20tx.getRepository({{pascalCase\x20name}}).save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20modify\x20{{pascalCase\x20name}}\x20information\x27\x20})\x0a\x20\x20async\x20update{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27id\x27)\x20id:\x20string,\x0a\x20\x20\x20\x20@Arg(\x27patch\x27)\x20patch:\x20{{pascalCase\x20name}}Patch,\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20repository\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20repository.findOne(\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20)\x0a\x0a\x20\x20\x20\x20return\x20await\x20repository.save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20...patch,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20[{{pascalCase\x20name}}],\x20{\x20description:\x20\x22To\x20modify\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20information\x22\x20})\x0a\x20\x20async\x20updateMultiple{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27patches\x27,\x20type\x20=>\x20[{{pascalCase\x20name}}Patch])\x20patches:\x20{{pascalCase\x20name}}Patch[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}[]>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20results\x20=\x20[]\x0a\x20\x20\x20\x20const\x20_createRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27+\x27)\x0a\x20\x20\x20\x20const\x20_updateRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27M\x27)\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}Repo\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x0a\x20\x20\x20\x20if\x20(_createRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_createRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20newRecord\x20=\x20_createRecords[i]\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...newRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27+\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20if\x20(_updateRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_updateRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20updRecord\x20=\x20_updateRecords[i]\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20{{camelCase\x20name}}Repo.findOne({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id:updRecord.id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...updRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27M\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20return\x20results\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20delete{{pascalCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove({\x20domain,\x20id,\x20updater:user\x20})\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20multiple\x20{{camelCase\x20name}}s\x27\x20})\x0a\x20\x20async\x20delete{{pluralPascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27ids\x27,\x20type\x20=>\x20[String])\x20ids:\x20string[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20delEntitis\x20=\x20ids.map(id=>{\x0a\x20\x20\x20\x20\x20\x20return\x20{domain,id,updater:user}\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove(delEntitis)\x0a\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a}\x0a','dataProp','__decorate','Arg','float','createServiceFiles','decimal','@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})','design:paramtypes','creator','\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','updater_id','3qmhxQy','1269434Sgftjb','-history-query.ts','Resolvers,','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','replace','findOne','\x0a\x20\x20','push','7378EkNgLT','__param','indexOf','...','pluralPascalCaseName','\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','\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','EntitySubscribers\x20}\x20from\x20\x27./','\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}List\x20}\x20from\x20\x27./{{name}}-type\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Query\x20{\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20fetch\x20a\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20return\x20await\x20getRepository({{pascalCase\x20name}}).findOne({\x0a\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20}\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}List,\x20{\x20description:\x20\x27To\x20fetch\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{pluralCamelCase\x20name}}(@Args()\x20params:\x20ListParam,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}List>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20queryBuilder\x20=\x20getQueryBuilderFromListParams({\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20params,\x0a\x20\x20\x20\x20\x20\x20repository:\x20await\x20getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20const\x20convertedParams\x20=\x20convertListParams(params,\x20domain.id)\x0a\x20\x20\x20\x20const\x20[items,\x20total]\x20=\x20await\x20queryBuilder.getManyAndCount()\x0a\x0a\x20\x20\x20\x20return\x20{\x20items,\x20total\x20}\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20Domain)\x0a\x20\x20async\x20domain(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<Domain>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(Domain).findOneBy({id:{{camelCase\x20name}}.domainId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20updater(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.updaterId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20creator(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.creatorId})\x0a\x20\x20}\x0a}\x0a','getColTxtType','/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...','@Field(','domain_id','-query.ts','string','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','map','Entities,','type-graphql','\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','type\x20=>','existsPath','-history\x27','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\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()\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','created_at','/event-subscriber.ts','2200272VZTouo','/*\x20ENTITIES\x20*/\x0a\x09...','createDir','JSON','filter','createHistoryServiceFiles','Date','index.ts','\x0aimport\x20{\x20EventSubscriber\x20}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20HistoryEntitySubscriber\x20}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20getRepository\x20}\x20from\x20\x27@things-factory/shell\x27\x0a\x0a@EventSubscriber()\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryEntitySubscriber\x20extends\x20HistoryEntitySubscriber<{{pascalCase\x20name}},{{pascalCase\x20name}}History>\x20{\x0a\x20\x20public\x20get\x20entity()\x20{\x0a\x20\x20\x20\x20return\x20{{pascalCase\x20name}}\x0a\x20\x20}\x0a\x0a\x20\x20public\x20get\x20historyEntity()\x20{\x0a\x20\x20\x20\x20return\x20{{pascalCase\x20name}}History\x0a\x20\x20}\x0a\x0a\x20\x20{{entityToJson}}\x0a\x0a\x20\x20async\x20beforeRemoveHistory(history:{{pascalCase\x20name}}History,entity:{{pascalCase\x20name}}){\x0a\x20\x20\x20\x20let\x20repo\x20=\x20getRepository({{pascalCase\x20name}}History);\x0a\x20\x20\x20\x20const\x20revNo\x20=\x20await\x20repo.createQueryBuilder()\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.select(\x27max(data_revision_no)\x27,\x20\x27rev_no\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.where(\x27domain_id\x20=\x20:domainId\x27,\x20{\x20domainId:\x20entity.domain.id\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.andWhere(\x27original_id\x20=\x20:originalId\x27,\x20{\x20originalId:\x20entity.id\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.getRawOne()\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20history.dataRevisionNo\x20=\x20revNo\x20?\x20revNo.rev_no\x20+\x201\x20:\x201;\x0a\x20\x20\x20\x20return\x20history;\x0a\x20\x20}\x0a}\x0a','updated_at','\x20})','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\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()\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','-history.ts','creator_id','\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','writeFile','createTypeText','split','camelCaseName','name','double\x20precision','join','integer','7962ecXUZH','getRepository','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity()\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','.ts','sort','12gLffXe','length','@things-factory/resource-base','-history-type.ts','utf8','/server/service/','colType','state','date','\x20{\x20nullable:\x20','updater','__esModule','OperatoToolCreateService'];a0_0x27d2=function(){return _0x1fa31e;};return a0_0x27d2();}tslib_1[a0_0x1e6da0(0x202)]([(0x0,type_graphql_1[a0_0x1e6da0(0x1d5)])(_0x39df2c=>Boolean,{'description':'Operato\x20Tool\x20Create\x20Service'}),tslib_1[a0_0x1e6da0(0x216)](0x0,(0x0,type_graphql_1[a0_0x1e6da0(0x203)])('id')),tslib_1[a0_0x1e6da0(0x216)](0x1,(0x0,type_graphql_1['Ctx'])()),tslib_1[a0_0x1e6da0(0x1e6)]('design:type',Function),tslib_1[a0_0x1e6da0(0x1e6)](a0_0x1e6da0(0x208),[String,Object]),tslib_1[a0_0x1e6da0(0x1e6)](a0_0x1e6da0(0x1df),Promise)],OperatoToolCreateService['prototype'],a0_0x1e6da0(0x1f1),null),OperatoToolCreateService=tslib_1[a0_0x1e6da0(0x202)]([(0x0,type_graphql_1['Resolver'])()],OperatoToolCreateService),exports[a0_0x1e6da0(0x1c5)]=OperatoToolCreateService;const allIndex=a0_0x1e6da0(0x228),serviceIndex=a0_0x1e6da0(0x23d),serviceHistoryIndex=a0_0x1e6da0(0x21a),serviceQuery=a0_0x1e6da0(0x21d),serviceHistoryQuery=a0_0x1e6da0(0x21b),serviceMutation=a0_0x1e6da0(0x200),sereviceType=a0_0x1e6da0(0x20a),sereviceHistoryType=a0_0x1e6da0(0x1e5),serviceEntity=a0_0x1e6da0(0x23a),serviceEntityHistCopy=a0_0x1e6da0(0x22c),serviceEntityHistJson=a0_0x1e6da0(0x1b6),serviceEntitySubscriber=a0_0x1e6da0(0x237);
1
+ 'use strict';const a0_0x4a65fe=a0_0x3f8b;(function(_0x5e17cb,_0x5d5368){const _0x372dff=a0_0x3f8b,_0x34983e=_0x5e17cb();while(!![]){try{const _0xa02d85=parseInt(_0x372dff(0x168))/0x1*(parseInt(_0x372dff(0x166))/0x2)+-parseInt(_0x372dff(0x14b))/0x3+parseInt(_0x372dff(0x125))/0x4*(-parseInt(_0x372dff(0x147))/0x5)+parseInt(_0x372dff(0x16d))/0x6+-parseInt(_0x372dff(0xfd))/0x7*(parseInt(_0x372dff(0xf4))/0x8)+-parseInt(_0x372dff(0x16b))/0x9*(-parseInt(_0x372dff(0x120))/0xa)+parseInt(_0x372dff(0x145))/0xb;if(_0xa02d85===_0x5d5368)break;else _0x34983e['push'](_0x34983e['shift']());}catch(_0x3592a6){_0x34983e['push'](_0x34983e['shift']());}}}(a0_0x56dd,0xc2537));function a0_0x56dd(){const _0x4fdcb2=['columnToEntityColumn','state','Resolvers,\x20subscribers\x20as\x20','-history\x27','getProjectRootPath','design:paramtypes','utf8','\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','EntityColumn','\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','\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201','Int','decimal','writeFileSync','sort','domain','push','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','createHistoryEntityText','22gAVNta','/*\x20ENTITIES\x20*/\x0a\x09...','48946uZkvBn','createHistoryServiceFiles','.ts','1143XwRuFy','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','3496620TFNMrM','-history-type.ts','OperatoToolCreateService','-type.ts','\x27,\x20type:\x20\x27','split','\x27,\x20nullable:\x20','Float','double','getColTxtType','createDir','number','design:type','name','includes','integer','replace','rank','\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}List\x20}\x20from\x20\x27./{{name}}-type\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Query\x20{\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20fetch\x20a\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20return\x20await\x20getRepository({{pascalCase\x20name}}).findOne({\x0a\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20}\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}List,\x20{\x20description:\x20\x27To\x20fetch\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{pluralCamelCase\x20name}}(@Args()\x20params:\x20ListParam,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}List>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20queryBuilder\x20=\x20getQueryBuilderFromListParams({\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20params,\x0a\x20\x20\x20\x20\x20\x20repository:\x20await\x20getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20const\x20convertedParams\x20=\x20convertListParams(params,\x20domain.id)\x0a\x20\x20\x20\x20const\x20[items,\x20total]\x20=\x20await\x20queryBuilder.getManyAndCount()\x0a\x0a\x20\x20\x20\x20return\x20{\x20items,\x20total\x20}\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20Domain)\x0a\x20\x20async\x20domain(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<Domain>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(Domain).findOneBy({id:{{camelCase\x20name}}.domainId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20updater(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.updaterId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20creator(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.creatorId})\x0a\x20\x20}\x0a}\x0a','timestamp\x20without\x20time\x20zone','export\x20*\x20from\x20\x27./','packages','datetime','11182744NuIYeB','-history.ts','EntitySubscribers\x20}\x20from\x20\x27./','@Field(','\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','type\x20=>','getFieldType','\x20{\x20nullable:\x20','@Column({name:\x27','7IyYJtz','created_at','colType','nullable','prototype','existsSync','dataProp','...','length','pluralPascalCaseName','domain_id','@things-factory/shell','createTypeText','\x20})','find','indexOf','Resolvers\x20}\x20from\x20\x27./','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','createEntityText','index.ts','type-graphql','updater_id','Resolvers,','pluralize','pascalCaseName','-query.ts','writeFile','/server/service/','date','long','map','__metadata','/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...','Operato\x20Tool\x20Create\x20Service','creator_id','37270vHiSAm','\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()\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','createServicePath',',length:','camelCaseName','4eXIcOf','colSize','double\x20precision','-mutation.ts','Entities,','JSON','character\x20varying','\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','createServiceFiles','Resolver','createNoHistoryServiceFiels','float','Date','/index.ts','-history-query.ts','updated_at','updater','\x0a\x20\x20','PWD','filter','\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','design:returntype','string','__param','replaceNamesMap','Ctx','tslib','toolCreateService','creator','/event-subscriber.ts','/server','join','29358164hCpGeq','Entity','3505085GfRFop','uniqRank','text','/packages/','4105830AMfqtz','\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','\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','lodash','Entities,\x20resolvers\x20as\x20','EntitySubscribers,','readFileSync','existsPath'];a0_0x56dd=function(){return _0x4fdcb2;};return a0_0x56dd();}Object['defineProperty'](exports,'__esModule',{'value':!0x0}),exports[a0_0x4a65fe(0x16f)]=void 0x0;const tslib_1=require(a0_0x4a65fe(0x13f)),type_graphql_1=require(a0_0x4a65fe(0x111)),shell_1=require(a0_0x4a65fe(0x108)),resource_base_1=require('@things-factory/resource-base'),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x4a65fe(0x14e)),{plural:plural}=require(a0_0x4a65fe(0x114)),fs=require('fs');function a0_0x3f8b(_0x422f94,_0x209541){const _0x56dda0=a0_0x56dd();return a0_0x3f8b=function(_0x3f8bc7,_0x4a4a9c){_0x3f8bc7=_0x3f8bc7-0xe5;let _0x26c007=_0x56dda0[_0x3f8bc7];return _0x26c007;},a0_0x3f8b(_0x422f94,_0x209541);}let OperatoToolCreateService=class{async[a0_0x4a65fe(0x140)](_0x224537,_0x264c8e){const _0x55b557=a0_0x4a65fe,{domain:_0x2fe6e4}=_0x264c8e[_0x55b557(0x154)],_0x2d7928=await(0x0,shell_1['getRepository'])(resource_base_1[_0x55b557(0x146)])['findOne']({'where':{'id':_0x224537}}),_0x4e5dc2=await(0x0,shell_1['getRepository'])(resource_base_1[_0x55b557(0x15b)])[_0x55b557(0x10b)]({'where':{'domain':{'id':_0x2fe6e4['id']},'entity':{'id':_0x2d7928['id']}}});let {name:_0x307384='',bundle:_0x3ede8a=''}=_0x2d7928||{},_0x14a7dc=this[_0x55b557(0x157)](),_0x49f3b3=kebabCase(_0x307384);return await this[_0x55b557(0x122)](_0x14a7dc,_0x3ede8a,_0x49f3b3),await this['createServiceFiles'](_0x14a7dc,_0x3ede8a,_0x307384,_0x49f3b3,_0x2d7928,_0x4e5dc2),!0x0;}async[a0_0x4a65fe(0x12d)](_0x38f7a8,_0x4f725a,_0x2352cd,_0x563902,_0x243136,_0x1231f2){const _0x74dfa9=a0_0x4a65fe;let _0x2ebaf8={'name':_0x563902,'pascalCaseName':startCase(camelCase(_0x2352cd))[_0x74dfa9(0xed)](/ /g,''),'camelCaseName':camelCase(_0x2352cd),'snakeCaseName':snakeCase(_0x2352cd),'pluralPascalCaseName':startCase(camelCase(plural(_0x2352cd)))['replace'](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x2352cd))},_0x75633a=_0x38f7a8+_0x74dfa9(0x14a)+_0x4f725a+_0x74dfa9(0x118);[_0x74dfa9(0x12a),'COPY']['includes'](_0x243136['dataProp'])?await this['createHistoryServiceFiles'](_0x75633a,_0x563902,_0x243136,_0x1231f2,_0x2ebaf8):await this[_0x74dfa9(0x12f)](_0x75633a,_0x563902,_0x243136,_0x1231f2,_0x2ebaf8);}async[a0_0x4a65fe(0x169)](_0x16ff23,_0x5ae864,_0x3153c1,_0x423a96,_0x2274d6){const _0x10b94f=a0_0x4a65fe;await this[_0x10b94f(0x117)](_0x16ff23+(_0x5ae864+'/index.ts'),serviceHistoryIndex,_0x2274d6);let _0x120bcc=this[_0x10b94f(0x10f)](_0x3153c1,_0x423a96);await this[_0x10b94f(0x117)](_0x16ff23+(_0x5ae864+'/'+_0x5ae864+_0x10b94f(0x16a)),_0x120bcc,_0x2274d6),await this[_0x10b94f(0x117)](_0x16ff23+(_0x5ae864+'/'+_0x5ae864+_0x10b94f(0x116)),serviceQuery,_0x2274d6),await this['writeFile'](_0x16ff23+(_0x5ae864+'/'+_0x5ae864+_0x10b94f(0x128)),serviceMutation,_0x2274d6);let _0x2e60ac=this[_0x10b94f(0x109)](_0x423a96);await this[_0x10b94f(0x117)](_0x16ff23+(_0x5ae864+'/'+_0x5ae864+'-type.ts'),_0x2e60ac,_0x2274d6);let _0x195530=this[_0x10b94f(0x165)](_0x3153c1,_0x423a96);await this[_0x10b94f(0x117)](_0x16ff23+(_0x5ae864+'/'+_0x5ae864+_0x10b94f(0xf5)),_0x195530,_0x2274d6);let _0x66ab9c='';_0x10b94f(0x12a)==_0x3153c1['dataProp']?(_0x66ab9c=_0x10b94f(0x14d),await this['writeFile'](_0x16ff23+(_0x5ae864+_0x10b94f(0x142)),serviceEntitySubscriber,_0x2274d6)):_0x66ab9c='';let _0x57d542=serviceEntitySubscriber[_0x10b94f(0xed)](/{{entityToJson}}/g,_0x66ab9c);await this[_0x10b94f(0x117)](_0x16ff23+(_0x5ae864+_0x10b94f(0x142)),_0x57d542,_0x2274d6),await this[_0x10b94f(0x117)](_0x16ff23+(_0x5ae864+'/'+_0x5ae864+_0x10b94f(0x133)),serviceHistoryQuery,_0x2274d6),await this[_0x10b94f(0x117)](_0x16ff23+(_0x5ae864+'/'+_0x5ae864+_0x10b94f(0x16e)),sereviceHistoryType,_0x2274d6);let _0xe92ac4=_0x16ff23+_0x10b94f(0x110);0x0==await this[_0x10b94f(0x152)](_0xe92ac4)&&await this[_0x10b94f(0x117)](_0xe92ac4,allIndex,_0x2274d6);let _0x4ebd24=await fs[_0x10b94f(0x151)](_0xe92ac4,_0x10b94f(0x159));_0x4ebd24[_0x10b94f(0x10c)](_0x10b94f(0xf1)+_0x2274d6[_0x10b94f(0xea)]+'/'+_0x2274d6['name']+'-history\x27')<0x0&&(_0x4ebd24=_0x4ebd24[_0x10b94f(0xed)](/\/\* EXPORT ENTITY TYPES \*\//,_0x10b94f(0x16c)+_0x2274d6[_0x10b94f(0xea)]+'/'+_0x2274d6[_0x10b94f(0xea)]+_0x10b94f(0x156))),_0x4ebd24[_0x10b94f(0x10c)]('export\x20*\x20from\x20\x27./'+_0x2274d6[_0x10b94f(0xea)]+'/'+_0x2274d6[_0x10b94f(0xea)]+'\x27')<0x0&&(_0x4ebd24=_0x4ebd24['replace'](/\/\* EXPORT ENTITY TYPES \*\//,'/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./'+_0x2274d6[_0x10b94f(0xea)]+'/'+_0x2274d6[_0x10b94f(0xea)]+'\x27')),_0x4ebd24['indexOf']('import\x20{\x20entities\x20as\x20'+_0x2274d6[_0x10b94f(0x115)]+_0x10b94f(0x14f)+_0x2274d6[_0x10b94f(0x115)]+_0x10b94f(0x155)+_0x2274d6[_0x10b94f(0x115)]+_0x10b94f(0xf6)+_0x2274d6[_0x10b94f(0xea)]+'\x27')<0x0&&(_0x4ebd24=_0x4ebd24['replace'](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x10b94f(0x10e)+_0x2274d6[_0x10b94f(0x115)]+_0x10b94f(0x14f)+_0x2274d6[_0x10b94f(0x115)]+'Resolvers,\x20subscribers\x20as\x20'+_0x2274d6[_0x10b94f(0x115)]+'EntitySubscribers\x20}\x20from\x20\x27./'+_0x2274d6[_0x10b94f(0xea)]+'\x27')),_0x4ebd24[_0x10b94f(0x10c)](_0x10b94f(0x104)+_0x2274d6['pascalCaseName']+_0x10b94f(0x129))<0x0&&(_0x4ebd24=_0x4ebd24['replace'](/\/\* ENTITIES \*\//,_0x10b94f(0x167)+_0x2274d6[_0x10b94f(0x115)]+'Entities,')),_0x4ebd24[_0x10b94f(0x10c)]('...'+_0x2274d6[_0x10b94f(0x115)]+_0x10b94f(0x113))<0x0&&(_0x4ebd24=_0x4ebd24[_0x10b94f(0xed)](/\/\* RESOLVER CLASSES \*\//,'/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...'+_0x2274d6[_0x10b94f(0x115)]+_0x10b94f(0x113))),_0x4ebd24['indexOf'](_0x10b94f(0x104)+_0x2274d6[_0x10b94f(0x115)]+_0x10b94f(0x150))<0x0&&(_0x4ebd24=_0x4ebd24[_0x10b94f(0xed)](/\/\* SUBSCRIBERS \*\//,_0x10b94f(0x11d)+_0x2274d6[_0x10b94f(0x115)]+'EntitySubscribers,')),await this['writeFile'](_0xe92ac4,_0x4ebd24,_0x2274d6);}async['createNoHistoryServiceFiels'](_0x4431f0,_0x348844,_0x2aa96e,_0x41ba0a,_0x9443d9){const _0x5484f8=a0_0x4a65fe;await this[_0x5484f8(0x117)](_0x4431f0+(_0x348844+_0x5484f8(0x132)),serviceIndex,_0x9443d9),await this['writeFile'](_0x4431f0+(_0x348844+'/'+_0x348844+_0x5484f8(0x116)),serviceQuery,_0x9443d9),await this[_0x5484f8(0x117)](_0x4431f0+(_0x348844+'/'+_0x348844+_0x5484f8(0x128)),serviceMutation,_0x9443d9);let _0x550bed=this['createEntityText'](_0x2aa96e,_0x41ba0a);await this[_0x5484f8(0x117)](_0x4431f0+(_0x348844+'/'+_0x348844+_0x5484f8(0x16a)),_0x550bed,_0x9443d9);let _0x19404c=this[_0x5484f8(0x109)](_0x41ba0a);await this[_0x5484f8(0x117)](_0x4431f0+(_0x348844+'/'+_0x348844+_0x5484f8(0x170)),_0x19404c,_0x9443d9);let _0x4972c8=_0x4431f0+_0x5484f8(0x110);0x0==await this['existsPath'](_0x4972c8)&&await this[_0x5484f8(0x117)](_0x4972c8,allIndex,_0x9443d9);let _0x29f41d=await fs['readFileSync'](_0x4972c8,_0x5484f8(0x159));_0x29f41d[_0x5484f8(0x10c)](_0x5484f8(0xf1)+_0x9443d9[_0x5484f8(0xea)]+'/'+_0x9443d9['name']+'\x27')<0x0&&(_0x29f41d=_0x29f41d['replace'](/\/\* EXPORT ENTITY TYPES \*\//,'/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./'+_0x9443d9['name']+'/'+_0x9443d9[_0x5484f8(0xea)]+'\x27')),_0x29f41d[_0x5484f8(0x10c)]('import\x20{\x20entities\x20as\x20'+_0x9443d9[_0x5484f8(0x115)]+_0x5484f8(0x14f)+_0x9443d9[_0x5484f8(0x115)]+_0x5484f8(0x10d)+_0x9443d9[_0x5484f8(0xea)]+'\x27')<0x0&&(_0x29f41d=_0x29f41d[_0x5484f8(0xed)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,'/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20'+_0x9443d9['pascalCaseName']+_0x5484f8(0x14f)+_0x9443d9[_0x5484f8(0x115)]+_0x5484f8(0x10d)+_0x9443d9[_0x5484f8(0xea)]+'\x27')),_0x29f41d['indexOf'](_0x5484f8(0x104)+_0x9443d9[_0x5484f8(0x115)]+_0x5484f8(0x129))<0x0&&(_0x29f41d=_0x29f41d[_0x5484f8(0xed)](/\/\* ENTITIES \*\//,_0x5484f8(0x167)+_0x9443d9[_0x5484f8(0x115)]+_0x5484f8(0x129))),_0x29f41d[_0x5484f8(0x10c)](_0x5484f8(0x104)+_0x9443d9[_0x5484f8(0x115)]+_0x5484f8(0x113))<0x0&&(_0x29f41d=_0x29f41d[_0x5484f8(0xed)](/\/\* RESOLVER CLASSES \*\//,_0x5484f8(0x164)+_0x9443d9['pascalCaseName']+'Resolvers,')),await this[_0x5484f8(0x117)](_0x4972c8,_0x29f41d,_0x9443d9);}[a0_0x4a65fe(0x109)](_0x52b288){const _0x628f37=a0_0x4a65fe;let _0x2dc144=sereviceType,_0xceabf0=_0x52b288['map'](_0x56d826=>{const _0x15f1a5=a0_0x3f8b;if('id'==_0x56d826[_0x15f1a5(0xea)])return'';if(_0x15f1a5(0x107)==_0x56d826[_0x15f1a5(0xea)])return'';if('created_at'==_0x56d826[_0x15f1a5(0xea)])return'';if(_0x15f1a5(0x134)==_0x56d826[_0x15f1a5(0xea)])return'';if('creator_id'==_0x56d826[_0x15f1a5(0xea)])return'';if(_0x15f1a5(0x112)==_0x56d826[_0x15f1a5(0xea)])return'';let _0x5b5bc8=this['getFieldType'](_0x56d826),_0x20eacf=this[_0x15f1a5(0xe6)](_0x56d826),_0x56822a=camelCase(_0x56d826[_0x15f1a5(0xea)]);return'\x20\x20'+(_0x15f1a5(0xf7)+(0x0==_0x5b5bc8[_0x15f1a5(0x105)]?'':_0x15f1a5(0xf9)+_0x5b5bc8+',')+_0x15f1a5(0xfb)+_0x56d826[_0x15f1a5(0x100)]+_0x15f1a5(0x10a))+'\x0a\x20\x20'+(''+_0x56822a+(_0x56d826[_0x15f1a5(0x100)]?'?':'')+':\x20'+_0x20eacf)+'\x0a';});_0x2dc144=_0x2dc144[_0x628f37(0xed)](/{{newTypeColumns}}/g,_0xceabf0[_0x628f37(0x144)]('\x0a'));let _0x136346=_0x52b288[_0x628f37(0x11b)](_0x5d6dd4=>{const _0x52f3a0=_0x628f37;if('id'==_0x5d6dd4[_0x52f3a0(0xea)])return'';if(_0x52f3a0(0x107)==_0x5d6dd4[_0x52f3a0(0xea)])return'';if(_0x52f3a0(0xfe)==_0x5d6dd4['name'])return'';if(_0x52f3a0(0x134)==_0x5d6dd4[_0x52f3a0(0xea)])return'';if('creator_id'==_0x5d6dd4[_0x52f3a0(0xea)])return'';if(_0x52f3a0(0x112)==_0x5d6dd4[_0x52f3a0(0xea)])return'';let _0x17393a=this[_0x52f3a0(0xfa)](_0x5d6dd4),_0xd52c82=this[_0x52f3a0(0xe6)](_0x5d6dd4);_0x5d6dd4[_0x52f3a0(0x100)]=!0x0;let _0x179cf8=camelCase(_0x5d6dd4[_0x52f3a0(0xea)]);return'\x20\x20'+(_0x52f3a0(0xf7)+(0x0==_0x17393a[_0x52f3a0(0x105)]?'':'type\x20=>'+_0x17393a+',')+_0x52f3a0(0xfb)+_0x5d6dd4[_0x52f3a0(0x100)]+_0x52f3a0(0x10a))+_0x52f3a0(0x136)+(''+_0x179cf8+(_0x5d6dd4['nullable']?'?':'')+':\x20'+_0xd52c82)+'\x0a';});return _0x2dc144=_0x2dc144[_0x628f37(0xed)](/{{patchTypeColumns}}/g,_0x136346['join']('\x0a')),_0x2dc144;}[a0_0x4a65fe(0x10f)](_0x33c238,_0x126c50){const _0x4b7dbb=a0_0x4a65fe;let _0x57caa7=serviceEntity,_0x160a29=_0x126c50['sort'](function(_0x5802b5,_0x651981){const _0x34ff6c=a0_0x3f8b;return _0x5802b5[_0x34ff6c(0xee)]-_0x651981[_0x34ff6c(0xee)];})['map'](_0x2924b3=>this[_0x4b7dbb(0x153)](_0x2924b3));['COPY','JSON'][_0x4b7dbb(0xeb)](_0x33c238['dataProp'])&&_0x160a29[_0x4b7dbb(0x163)](_0x4b7dbb(0x15d)),_0x57caa7=_0x57caa7[_0x4b7dbb(0xed)](/{{entityColumns}}/g,_0x160a29[_0x4b7dbb(0x144)]('\x0a'));let _0x3af677='',_0x150078=_0x126c50[_0x4b7dbb(0x138)](_0x1964e6=>_0x1964e6[_0x4b7dbb(0x148)]&&_0x1964e6['uniqRank']>0x0)[_0x4b7dbb(0x161)](function(_0x4e23c4,_0x4b0f6f){const _0x21f157=_0x4b7dbb;return _0x4e23c4[_0x21f157(0x148)]-_0x4b0f6f['uniqRank'];});if(_0x150078[_0x4b7dbb(0x105)]>0x0){_0x3af677='@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})';let _0xa14660=_0x150078[_0x4b7dbb(0x11b)](_0x3cd03a=>{const _0x502c42=_0x4b7dbb;let _0x3293af=_0x3cd03a['name'];return _0x502c42(0x107)==_0x3cd03a['name']&&(_0x3293af=_0x502c42(0x162)),_0x502c42(0x11f)==_0x3cd03a['name']&&(_0x3293af=_0x502c42(0x141)),_0x502c42(0x112)==_0x3cd03a[_0x502c42(0xea)]&&(_0x3293af=_0x502c42(0x135)),'{{camelCase\x20name}}.'+camelCase(_0x3293af);});_0x3af677=_0x3af677['replace'](/{{indexColumns}}/g,_0xa14660[_0x4b7dbb(0x144)](','));}return _0x57caa7=_0x57caa7['replace'](/{{indexAnn}}/g,_0x3af677),_0x57caa7;}[a0_0x4a65fe(0x165)](_0x2d6499,_0x3327bb){const _0x3dbe38=a0_0x4a65fe;let _0x934c20=_0x3dbe38(0x12a)==_0x2d6499[_0x3dbe38(0x103)]?serviceEntityHistJson:serviceEntityHistCopy,_0xffa893=_0x3327bb['sort'](function(_0x28d76d,_0x317f39){const _0x2086b1=_0x3dbe38;return _0x28d76d[_0x2086b1(0xee)]-_0x317f39[_0x2086b1(0xee)];})[_0x3dbe38(0x11b)](_0x1042e1=>this[_0x3dbe38(0x153)](_0x1042e1));return _0x934c20=_0x934c20['replace'](/{{entityColumns}}/g,_0xffa893['join']('\x0a')),_0x934c20;}[a0_0x4a65fe(0x153)](_0x495e01){const _0x2848f1=a0_0x4a65fe;if('id'==_0x495e01[_0x2848f1(0xea)])return'';if('domain_id'==_0x495e01[_0x2848f1(0xea)])return'';if(_0x2848f1(0xfe)==_0x495e01[_0x2848f1(0xea)])return'';if(_0x2848f1(0x134)==_0x495e01[_0x2848f1(0xea)])return'';if(_0x2848f1(0x11f)==_0x495e01[_0x2848f1(0xea)])return'';if('updater_id'==_0x495e01[_0x2848f1(0xea)])return'';let _0x4f9694=_0x495e01[_0x2848f1(0xff)];_0x2848f1(0xe5)==_0x495e01[_0x2848f1(0xff)]&&(_0x4f9694=_0x2848f1(0x127)),_0x2848f1(0x11a)==_0x495e01[_0x2848f1(0xff)]&&(_0x4f9694='bigint'),'string'==_0x495e01[_0x2848f1(0xff)]&&(_0x4f9694=_0x2848f1(0x12b)),'datetime'==_0x495e01['colType']&&(_0x4f9694=_0x2848f1(0xf0));let _0x3c8f7b='';_0x2848f1(0x13b)==_0x495e01['colType']&&(_0x3c8f7b=_0x495e01[_0x2848f1(0x126)]);let _0x1a07a9=this[_0x2848f1(0xfa)](_0x495e01),_0x167a89=this['getColTxtType'](_0x495e01),_0x42f5a0=camelCase(_0x495e01[_0x2848f1(0xea)]);return'\x20\x20'+(_0x2848f1(0xfc)+_0x495e01['name']+_0x2848f1(0x171)+_0x4f9694+_0x2848f1(0x173)+_0x495e01['nullable']+'\x20'+(0x0==_0x3c8f7b[_0x2848f1(0x105)]?'':_0x2848f1(0x123)+_0x3c8f7b)+'\x20})')+_0x2848f1(0x136)+(_0x2848f1(0xf7)+(0x0==_0x1a07a9[_0x2848f1(0x105)]?'':_0x2848f1(0xf9)+_0x1a07a9+',')+_0x2848f1(0xfb)+_0x495e01[_0x2848f1(0x100)]+'\x20})')+_0x2848f1(0x136)+(''+_0x42f5a0+(_0x495e01[_0x2848f1(0x100)]?'?':'')+':\x20'+_0x167a89)+'\x0a';}[a0_0x4a65fe(0xfa)](_0x96a16){const _0x4675eb=a0_0x4a65fe;let _0x4b7652='';return _0x4675eb(0xe5)==_0x96a16[_0x4675eb(0xff)]&&(_0x4b7652=_0x4675eb(0x174)),_0x4675eb(0x130)==_0x96a16[_0x4675eb(0xff)]&&(_0x4b7652=_0x4675eb(0x174)),_0x4675eb(0x11a)==_0x96a16[_0x4675eb(0xff)]&&(_0x4b7652=_0x4675eb(0x15e)),_0x4675eb(0xec)==_0x96a16['colType']&&(_0x4b7652='Int'),_0x4b7652;}[a0_0x4a65fe(0xe6)](_0x26b781){const _0x1c2d90=a0_0x4a65fe;let _0x4e828a=_0x26b781[_0x1c2d90(0xff)];return _0x1c2d90(0x15f)==_0x26b781[_0x1c2d90(0xff)]&&(_0x4e828a=_0x1c2d90(0xe8)),'double'==_0x26b781['colType']&&(_0x4e828a=_0x1c2d90(0xe8)),_0x1c2d90(0x130)==_0x26b781[_0x1c2d90(0xff)]&&(_0x4e828a=_0x1c2d90(0xe8)),_0x1c2d90(0xec)==_0x26b781[_0x1c2d90(0xff)]&&(_0x4e828a=_0x1c2d90(0xe8)),_0x1c2d90(0x11a)==_0x26b781[_0x1c2d90(0xff)]&&(_0x4e828a='number'),_0x1c2d90(0xf3)==_0x26b781[_0x1c2d90(0xff)]&&(_0x4e828a=_0x1c2d90(0x131)),_0x1c2d90(0x119)==_0x26b781[_0x1c2d90(0xff)]&&(_0x4e828a='Date'),_0x1c2d90(0x149)==_0x26b781[_0x1c2d90(0xff)]&&(_0x4e828a=_0x1c2d90(0x13b)),_0x4e828a;}async[a0_0x4a65fe(0x117)](_0x35944,_0x3a85b8,_0x2caab5){const _0x38b3db=a0_0x4a65fe;await fs[_0x38b3db(0x160)](_0x35944,this[_0x38b3db(0x13d)](_0x3a85b8,_0x2caab5),_0x38b3db(0x159));}[a0_0x4a65fe(0x13d)](_0x504bde,_0x3d2539){const _0x584b90=a0_0x4a65fe;return _0x504bde['replace'](/{{pascalCase name}}/g,_0x3d2539[_0x584b90(0x115)])[_0x584b90(0xed)](/{{camelCase name}}/g,_0x3d2539[_0x584b90(0x124)])[_0x584b90(0xed)](/{{snakeCase name}}/g,_0x3d2539['snakeCaseName'])[_0x584b90(0xed)](/{{pluralPascalCase name}}/g,_0x3d2539[_0x584b90(0x106)])['replace'](/{{pluralCamelCase name}}/g,_0x3d2539['pluralCamelCaseName'])[_0x584b90(0xed)](/{{name}}/g,_0x3d2539['name']);}async['createServicePath'](_0x13b9dd,_0x35a288,_0x5920d1){const _0x2bed40=a0_0x4a65fe;let _0x20d3dc=_0x13b9dd+'/packages';await this[_0x2bed40(0xe7)](_0x20d3dc),_0x20d3dc=_0x20d3dc+'/'+_0x35a288,await this[_0x2bed40(0xe7)](_0x20d3dc),_0x20d3dc+=_0x2bed40(0x143),await this[_0x2bed40(0xe7)](_0x20d3dc),_0x20d3dc+='/service',await this[_0x2bed40(0xe7)](_0x20d3dc),_0x20d3dc=_0x20d3dc+'/'+_0x5920d1,await this[_0x2bed40(0xe7)](_0x20d3dc);}[a0_0x4a65fe(0x157)](){const _0xb58f27=a0_0x4a65fe;let _0x5458e2=process['env'][_0xb58f27(0x137)][_0xb58f27(0x172)]('/'),_0x13c6c6=[];for(let _0x421547=0x0;_0x421547<_0x5458e2[_0xb58f27(0x105)]&&_0xb58f27(0xf2)!=_0x5458e2[_0x421547];_0x421547++)_0x13c6c6['push'](_0x5458e2[_0x421547]);return _0x13c6c6[_0xb58f27(0x144)]('/');}async[a0_0x4a65fe(0xe7)](_0x2b4f48){0x0==await this['existsPath'](_0x2b4f48)&&fs['mkdirSync'](_0x2b4f48);}async['existsPath'](_0x28a538){const _0x3a791f=a0_0x4a65fe;return await fs[_0x3a791f(0x102)](_0x28a538);}};tslib_1['__decorate']([(0x0,type_graphql_1['Query'])(_0x3f56ee=>Boolean,{'description':a0_0x4a65fe(0x11e)}),tslib_1[a0_0x4a65fe(0x13c)](0x0,(0x0,type_graphql_1['Arg'])('id')),tslib_1['__param'](0x1,(0x0,type_graphql_1[a0_0x4a65fe(0x13e)])()),tslib_1[a0_0x4a65fe(0x11c)](a0_0x4a65fe(0xe9),Function),tslib_1[a0_0x4a65fe(0x11c)](a0_0x4a65fe(0x158),[String,Object]),tslib_1['__metadata'](a0_0x4a65fe(0x13a),Promise)],OperatoToolCreateService[a0_0x4a65fe(0x101)],a0_0x4a65fe(0x140),null),OperatoToolCreateService=tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x4a65fe(0x12e)])()],OperatoToolCreateService),exports[a0_0x4a65fe(0x16f)]=OperatoToolCreateService;const allIndex=a0_0x4a65fe(0x15a),serviceIndex='\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}}]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}Mutation]\x0a',serviceHistoryIndex=a0_0x4a65fe(0x139),serviceQuery=a0_0x4a65fe(0xef),serviceHistoryQuery=a0_0x4a65fe(0x15c),serviceMutation=a0_0x4a65fe(0x12c),sereviceType=a0_0x4a65fe(0x14c),sereviceHistoryType='\x0aimport\x20{\x20ObjectType,\x20Field,\x20InputType,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0a\x0a@ObjectType()\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryList\x20{\x0a\x20\x20@Field(type\x20=>\x20[{{pascalCase\x20name}}History])\x0a\x20\x20items:\x20{{pascalCase\x20name}}History[]\x0a\x0a\x20\x20@Field(type\x20=>\x20Int)\x0a\x20\x20total:\x20number\x0a}\x0a',serviceEntity='\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20Domain\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0a@Entity()\x0a{{indexAnn}}\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}\x20{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a',serviceEntityHistCopy=a0_0x4a65fe(0x121),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()\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_0x4a65fe(0xf8);
@@ -1 +1 @@
1
- 'use strict';function a0_0x181b(){const _0x2616d9=['@things-factory/operato-license-checker','Menu','manager','id\x20!=\x20:id','2980137SzxImq','1360148zyUYuf','3820740MUhUwo','(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)','from','LicenseError','@things-factory/shell','6578970QVtNsV','ERROR_CODES','select','createQueryBuilder','../../errors/license-error','where','Studio','andWhere','map','defineProperty','855582CkWKil','getPermission','split','28ZPOunV','forEach','checkStudioTemplateIsOverLimit','__esModule','trim','3587864fOIRDW','checkStudioPermission','Permissions\x20For\x20Tailor\x20Tool','OVER_LIMIT','getRepository','checkTarget','menu','1699368ebTqXa'];a0_0x181b=function(){return _0x2616d9;};return a0_0x181b();}const a0_0x830994=a0_0x1834;(function(_0x563f39,_0x2e5bc2){const _0x51c5f8=a0_0x1834,_0x3c4638=_0x563f39();while(!![]){try{const _0x312832=parseInt(_0x51c5f8(0x19d))/0x1+-parseInt(_0x51c5f8(0x187))/0x2+parseInt(_0x51c5f8(0x18c))/0x3+-parseInt(_0x51c5f8(0x18d))/0x4+parseInt(_0x51c5f8(0x18e))/0x5+parseInt(_0x51c5f8(0x193))/0x6+-parseInt(_0x51c5f8(0x1a0))/0x7*(parseInt(_0x51c5f8(0x180))/0x8);if(_0x312832===_0x2e5bc2)break;else _0x3c4638['push'](_0x3c4638['shift']());}catch(_0x3ac62f){_0x3c4638['push'](_0x3c4638['shift']());}}}(a0_0x181b,0xb13bf));function a0_0x1834(_0x13ba2a,_0x10b8d9){const _0x181bee=a0_0x181b();return a0_0x1834=function(_0x183480,_0x532027){_0x183480=_0x183480-0x17f;let _0xb11e4=_0x181bee[_0x183480];return _0xb11e4;},a0_0x1834(_0x13ba2a,_0x10b8d9);}Object[a0_0x830994(0x19c)](exports,a0_0x830994(0x1a3),{'value':!0x0}),exports[a0_0x830994(0x1a2)]=exports[a0_0x830994(0x181)]=void 0x0;const operato_license_checker_1=require(a0_0x830994(0x188)),shell_1=require(a0_0x830994(0x192)),menu_base_1=require('@things-factory/menu-base'),license_error_1=require(a0_0x830994(0x197));async function checkStudioPermission(){const _0x2addd4=a0_0x830994;let _0x2176b4=((0x0,operato_license_checker_1[_0x2addd4(0x19e)])(_0x2addd4(0x182))||',')[_0x2addd4(0x19f)](',')[_0x2addd4(0x19b)](_0x479178=>_0x479178[_0x2addd4(0x17f)]()),_0x55e097=!0x1;return _0x2176b4[_0x2addd4(0x1a1)](_0x49f831=>{const _0x482141=_0x2addd4;_0x49f831['includes'](_0x482141(0x199))&&(_0x55e097=!0x0);}),_0x55e097;}async function checkStudioTemplateIsOverLimit(_0xdf3007,_0x9fc183){const _0x5e83ba=a0_0x830994;if(0x0==await checkStudioPermission())throw new license_error_1[(_0x5e83ba(0x191))]({'errorCode':_0x9fc183['t'](license_error_1[_0x5e83ba(0x191)][_0x5e83ba(0x194)]['INVALID_LICENSE'])});var _0x2598c4=0x0;if(_0x2598c4=_0xdf3007&&''!=_0xdf3007?await(0x0,shell_1['getRepository'])(menu_base_1[_0x5e83ba(0x189)])[_0x5e83ba(0x18a)][_0x5e83ba(0x196)]()[_0x5e83ba(0x195)](_0x5e83ba(0x186))[_0x5e83ba(0x190)](menu_base_1[_0x5e83ba(0x189)],_0x5e83ba(0x186))[_0x5e83ba(0x198)](_0x5e83ba(0x18b),{'id':_0xdf3007})[_0x5e83ba(0x19a)](_0x5e83ba(0x18f))['getCount']()+0x1:await(0x0,shell_1[_0x5e83ba(0x184)])(menu_base_1['Menu'])[_0x5e83ba(0x18a)][_0x5e83ba(0x196)]()[_0x5e83ba(0x195)](_0x5e83ba(0x186))[_0x5e83ba(0x190)](menu_base_1[_0x5e83ba(0x189)],_0x5e83ba(0x186))[_0x5e83ba(0x198)](_0x5e83ba(0x18f))['getCount']()+0x1,!(0x0,operato_license_checker_1[_0x5e83ba(0x185)])(_0x2598c4))throw new license_error_1[(_0x5e83ba(0x191))]({'errorCode':_0x9fc183['t'](license_error_1[_0x5e83ba(0x191)][_0x5e83ba(0x194)][_0x5e83ba(0x183)])});return!0x0;}exports[a0_0x830994(0x181)]=checkStudioPermission,exports['checkStudioTemplateIsOverLimit']=checkStudioTemplateIsOverLimit;
1
+ 'use strict';const a0_0x2d3b51=a0_0x1049;(function(_0x236032,_0xe6dce){const _0x1c9924=a0_0x1049,_0x30c5a5=_0x236032();while(!![]){try{const _0x954b88=-parseInt(_0x1c9924(0x14e))/0x1+-parseInt(_0x1c9924(0x146))/0x2+parseInt(_0x1c9924(0x14c))/0x3*(-parseInt(_0x1c9924(0x134))/0x4)+parseInt(_0x1c9924(0x12e))/0x5+parseInt(_0x1c9924(0x13e))/0x6+-parseInt(_0x1c9924(0x140))/0x7+parseInt(_0x1c9924(0x13c))/0x8*(parseInt(_0x1c9924(0x138))/0x9);if(_0x954b88===_0xe6dce)break;else _0x30c5a5['push'](_0x30c5a5['shift']());}catch(_0x437485){_0x30c5a5['push'](_0x30c5a5['shift']());}}}(a0_0xa0af,0xdba69));function a0_0x1049(_0x43c986,_0x5ea896){const _0xa0af6d=a0_0xa0af();return a0_0x1049=function(_0x104957,_0x1486f3){_0x104957=_0x104957-0x12b;let _0x2c2b70=_0xa0af6d[_0x104957];return _0x2c2b70;},a0_0x1049(_0x43c986,_0x5ea896);}function a0_0xa0af(){const _0x2d2479=['andWhere','getCount','@things-factory/shell','manager','2218238ynrbIs','LicenseError','Permissions\x20For\x20Tailor\x20Tool','split','getRepository','includes','9GepqiZ','(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)','1412979GYwRtJ','id\x20!=\x20:id','INVALID_LICENSE','Menu','checkStudioPermission','getPermission','2039120hkTXWn','checkTarget','select','forEach','OVER_LIMIT','where','432244fQIvCt','map','createQueryBuilder','menu','54dYWQcY','../../errors/license-error','@things-factory/menu-base','defineProperty','3177792PCuLqh','checkStudioTemplateIsOverLimit','8959182eALdmZ','__esModule','3768765rrvGuY','Studio'];a0_0xa0af=function(){return _0x2d2479;};return a0_0xa0af();}Object[a0_0x2d3b51(0x13b)](exports,a0_0x2d3b51(0x13f),{'value':!0x0}),exports[a0_0x2d3b51(0x13d)]=exports[a0_0x2d3b51(0x12c)]=void 0x0;const operato_license_checker_1=require('@things-factory/operato-license-checker'),shell_1=require(a0_0x2d3b51(0x144)),menu_base_1=require(a0_0x2d3b51(0x13a)),license_error_1=require(a0_0x2d3b51(0x139));async function checkStudioPermission(){const _0x2cd0b3=a0_0x2d3b51;let _0x413dbb=((0x0,operato_license_checker_1[_0x2cd0b3(0x12d)])(_0x2cd0b3(0x148))||',')[_0x2cd0b3(0x149)](',')[_0x2cd0b3(0x135)](_0x1b6f31=>_0x1b6f31['trim']()),_0x31c837=!0x1;return _0x413dbb[_0x2cd0b3(0x131)](_0x5157b7=>{const _0x231531=_0x2cd0b3;_0x5157b7[_0x231531(0x14b)](_0x231531(0x141))&&(_0x31c837=!0x0);}),_0x31c837;}async function checkStudioTemplateIsOverLimit(_0x3d6f00,_0x3362a6){const _0x2c2343=a0_0x2d3b51;if(0x0==await checkStudioPermission())throw new license_error_1[(_0x2c2343(0x147))]({'errorCode':_0x3362a6['t'](license_error_1[_0x2c2343(0x147)]['ERROR_CODES'][_0x2c2343(0x150)])});var _0x466a83=0x0;if(_0x466a83=_0x3d6f00&&''!=_0x3d6f00?await(0x0,shell_1[_0x2c2343(0x14a)])(menu_base_1[_0x2c2343(0x12b)])[_0x2c2343(0x145)][_0x2c2343(0x136)]()['select'](_0x2c2343(0x137))['from'](menu_base_1[_0x2c2343(0x12b)],_0x2c2343(0x137))[_0x2c2343(0x133)](_0x2c2343(0x14f),{'id':_0x3d6f00})[_0x2c2343(0x142)]('(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)')['getCount']()+0x1:await(0x0,shell_1[_0x2c2343(0x14a)])(menu_base_1['Menu'])[_0x2c2343(0x145)][_0x2c2343(0x136)]()[_0x2c2343(0x130)](_0x2c2343(0x137))['from'](menu_base_1[_0x2c2343(0x12b)],_0x2c2343(0x137))[_0x2c2343(0x133)](_0x2c2343(0x14d))[_0x2c2343(0x143)]()+0x1,!(0x0,operato_license_checker_1[_0x2c2343(0x12f)])(_0x466a83))throw new license_error_1[(_0x2c2343(0x147))]({'errorCode':_0x3362a6['t'](license_error_1['LicenseError']['ERROR_CODES'][_0x2c2343(0x132)])});return!0x0;}exports['checkStudioPermission']=checkStudioPermission,exports[a0_0x2d3b51(0x13d)]=checkStudioTemplateIsOverLimit;
@@ -1 +1 @@
1
- 'use strict';function a0_0x2e18(_0x52d7b9,_0x74ab5a){const _0xa62703=a0_0xa627();return a0_0x2e18=function(_0x2e18d3,_0x457ca8){_0x2e18d3=_0x2e18d3-0xfa;let _0x2bbc34=_0xa62703[_0x2e18d3];return _0x2bbc34;},a0_0x2e18(_0x52d7b9,_0x74ab5a);}const a0_0x342755=a0_0x2e18;(function(_0x399d91,_0x50fc55){const _0x5625f0=a0_0x2e18,_0xad18ee=_0x399d91();while(!![]){try{const _0x19c41f=parseInt(_0x5625f0(0x105))/0x1+-parseInt(_0x5625f0(0x115))/0x2*(-parseInt(_0x5625f0(0xfe))/0x3)+parseInt(_0x5625f0(0x103))/0x4+parseInt(_0x5625f0(0xfb))/0x5+parseInt(_0x5625f0(0x100))/0x6+parseInt(_0x5625f0(0x107))/0x7+parseInt(_0x5625f0(0xfd))/0x8*(-parseInt(_0x5625f0(0x113))/0x9);if(_0x19c41f===_0x50fc55)break;else _0xad18ee['push'](_0xad18ee['shift']());}catch(_0x24fe91){_0xad18ee['push'](_0xad18ee['shift']());}}}(a0_0xa627,0x2b7db));Object[a0_0x342755(0x109)](exports,a0_0x342755(0x106),{'value':!0x0}),exports[a0_0x342755(0x108)]=void 0x0;const tslib_1=require(a0_0x342755(0x10c)),type_graphql_1=require(a0_0x342755(0xfc)),tool_permission_1=require(a0_0x342755(0x114));function a0_0xa627(){const _0xb3bcd1=['defineProperty','Ctx','__decorate','tslib','Operato\x20Tool\x20Studio\x20Usage\x20Permissions','__metadata','studioTemplateIsOverLimit','Query','Resolver','design:returntype','9jDeZbX','./tool-permission','2dATPgH','studioPermission','220540ASJHIC','type-graphql','7952552nTPUlA','815667BpHnnm','prototype','1049028VciPOP','design:type','Arg','499484yLZiBO','__param','241299phHCyb','__esModule','2206421XIRXKA','OperatoToolResolver'];a0_0xa627=function(){return _0xb3bcd1;};return a0_0xa627();}let OperatoToolResolver=class{async[a0_0x342755(0xfa)](_0x149a63){return(0x0,tool_permission_1['checkStudioPermission'])();}async[a0_0x342755(0x10f)](_0x508c22,_0x2242f6){return(0x0,tool_permission_1['checkStudioTemplateIsOverLimit'])(_0x508c22,_0x2242f6);}};tslib_1[a0_0x342755(0x10b)]([(0x0,type_graphql_1[a0_0x342755(0x110)])(_0x8cba34=>Boolean,{'description':a0_0x342755(0x10d)}),tslib_1['__param'](0x0,(0x0,type_graphql_1[a0_0x342755(0x10a)])()),tslib_1['__metadata'](a0_0x342755(0x101),Function),tslib_1['__metadata']('design:paramtypes',[Object]),tslib_1[a0_0x342755(0x10e)](a0_0x342755(0x112),Promise)],OperatoToolResolver[a0_0x342755(0xff)],a0_0x342755(0xfa),null),tslib_1[a0_0x342755(0x10b)]([(0x0,type_graphql_1[a0_0x342755(0x110)])(_0x4fcb63=>Boolean,{'description':'Operato\x20Tool\x20Studio\x20Limit\x20check'}),tslib_1[a0_0x342755(0x104)](0x0,(0x0,type_graphql_1[a0_0x342755(0x102)])('id')),tslib_1[a0_0x342755(0x104)](0x1,(0x0,type_graphql_1[a0_0x342755(0x10a)])()),tslib_1[a0_0x342755(0x10e)]('design:type',Function),tslib_1[a0_0x342755(0x10e)]('design:paramtypes',[String,Object]),tslib_1[a0_0x342755(0x10e)]('design:returntype',Promise)],OperatoToolResolver[a0_0x342755(0xff)],a0_0x342755(0x10f),null),OperatoToolResolver=tslib_1[a0_0x342755(0x10b)]([(0x0,type_graphql_1[a0_0x342755(0x111)])()],OperatoToolResolver),exports[a0_0x342755(0x108)]=OperatoToolResolver;
1
+ 'use strict';function a0_0x1734(){const _0x394067=['design:returntype','tslib','184232lFZWKh','3576100vLcogJ','6055000mkhdsF','3026288ekVZJM','type-graphql','21bVhdTm','__decorate','design:type','studioPermission','3994386GZCnTb','2XELute','3189591ttzmnJ','defineProperty','Resolver','Arg','53877654rDTHtw','./tool-permission','checkStudioPermission','checkStudioTemplateIsOverLimit','studioTemplateIsOverLimit','prototype','OperatoToolResolver','Ctx','__param','Query','design:paramtypes','__metadata'];a0_0x1734=function(){return _0x394067;};return a0_0x1734();}const a0_0x361444=a0_0x44aa;function a0_0x44aa(_0x2c1b00,_0x10ed71){const _0x17348d=a0_0x1734();return a0_0x44aa=function(_0x44aac2,_0x3d4893){_0x44aac2=_0x44aac2-0x151;let _0xe9a72d=_0x17348d[_0x44aac2];return _0xe9a72d;},a0_0x44aa(_0x2c1b00,_0x10ed71);}(function(_0x33cd9e,_0x26b32e){const _0x1554ff=a0_0x44aa,_0x522664=_0x33cd9e();while(!![]){try{const _0x556ac3=parseInt(_0x1554ff(0x16c))/0x1*(-parseInt(_0x1554ff(0x159))/0x2)+-parseInt(_0x1554ff(0x15a))/0x3+-parseInt(_0x1554ff(0x16d))/0x4+-parseInt(_0x1554ff(0x151))/0x5+-parseInt(_0x1554ff(0x158))/0x6+-parseInt(_0x1554ff(0x154))/0x7*(parseInt(_0x1554ff(0x152))/0x8)+parseInt(_0x1554ff(0x15e))/0x9;if(_0x556ac3===_0x26b32e)break;else _0x522664['push'](_0x522664['shift']());}catch(_0x1e23a1){_0x522664['push'](_0x522664['shift']());}}}(a0_0x1734,0xcb753));Object[a0_0x361444(0x15b)](exports,'__esModule',{'value':!0x0}),exports[a0_0x361444(0x164)]=void 0x0;const tslib_1=require(a0_0x361444(0x16b)),type_graphql_1=require(a0_0x361444(0x153)),tool_permission_1=require(a0_0x361444(0x15f));let OperatoToolResolver=class{async[a0_0x361444(0x157)](_0xe6250e){const _0x1d2cd2=a0_0x361444;return(0x0,tool_permission_1[_0x1d2cd2(0x160)])();}async[a0_0x361444(0x162)](_0x2a601e,_0xd99273){const _0x286daf=a0_0x361444;return(0x0,tool_permission_1[_0x286daf(0x161)])(_0x2a601e,_0xd99273);}};tslib_1[a0_0x361444(0x155)]([(0x0,type_graphql_1[a0_0x361444(0x167)])(_0x4332cc=>Boolean,{'description':'Operato\x20Tool\x20Studio\x20Usage\x20Permissions'}),tslib_1[a0_0x361444(0x166)](0x0,(0x0,type_graphql_1[a0_0x361444(0x165)])()),tslib_1['__metadata'](a0_0x361444(0x156),Function),tslib_1[a0_0x361444(0x169)](a0_0x361444(0x168),[Object]),tslib_1[a0_0x361444(0x169)](a0_0x361444(0x16a),Promise)],OperatoToolResolver[a0_0x361444(0x163)],a0_0x361444(0x157),null),tslib_1[a0_0x361444(0x155)]([(0x0,type_graphql_1['Query'])(_0x34cea4=>Boolean,{'description':'Operato\x20Tool\x20Studio\x20Limit\x20check'}),tslib_1[a0_0x361444(0x166)](0x0,(0x0,type_graphql_1[a0_0x361444(0x15d)])('id')),tslib_1[a0_0x361444(0x166)](0x1,(0x0,type_graphql_1[a0_0x361444(0x165)])()),tslib_1['__metadata'](a0_0x361444(0x156),Function),tslib_1[a0_0x361444(0x169)]('design:paramtypes',[String,Object]),tslib_1[a0_0x361444(0x169)](a0_0x361444(0x16a),Promise)],OperatoToolResolver['prototype'],a0_0x361444(0x162),null),OperatoToolResolver=tslib_1[a0_0x361444(0x155)]([(0x0,type_graphql_1[a0_0x361444(0x15c)])()],OperatoToolResolver),exports['OperatoToolResolver']=OperatoToolResolver;