@things-factory/operato-tools 6.0.129 → 6.0.130

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_0x44be3b=a0_0x5a0a;function a0_0x2830(){const _0x2d1cb9=['1274847JWeKUJ','187780RvoCjF','11aZoPkw','../constants/error-code','assign','license-error','426348ACuRkj','2QovSHr','1225362syGFlq','tslib','LicenseError','132395XDMUkZ','76OUNdfr','__esModule','6OGNsOy','defineProperty','detail','16vCNkKo','__importStar','143cEhIsP','32746gMiUTO','name','1355892MRtGCi'];a0_0x2830=function(){return _0x2d1cb9;};return a0_0x2830();}(function(_0x58f3f9,_0x3a4838){const _0x1e8872=a0_0x5a0a,_0x2ffa8e=_0x58f3f9();while(!![]){try{const _0x1ea166=-parseInt(_0x1e8872(0x1bb))/0x1*(-parseInt(_0x1e8872(0x1c5))/0x2)+-parseInt(_0x1e8872(0x1c6))/0x3+-parseInt(_0x1e8872(0x1b3))/0x4*(parseInt(_0x1e8872(0x1b2))/0x5)+-parseInt(_0x1e8872(0x1b5))/0x6*(parseInt(_0x1e8872(0x1be))/0x7)+-parseInt(_0x1e8872(0x1b8))/0x8*(-parseInt(_0x1e8872(0x1c4))/0x9)+-parseInt(_0x1e8872(0x1bf))/0xa*(-parseInt(_0x1e8872(0x1c0))/0xb)+parseInt(_0x1e8872(0x1bd))/0xc*(parseInt(_0x1e8872(0x1ba))/0xd);if(_0x1ea166===_0x3a4838)break;else _0x2ffa8e['push'](_0x2ffa8e['shift']());}catch(_0x5eaee0){_0x2ffa8e['push'](_0x2ffa8e['shift']());}}}(a0_0x2830,0x48245));Object[a0_0x44be3b(0x1b6)](exports,a0_0x44be3b(0x1b4),{'value':!0x0}),exports['LicenseError']=void 0x0;const tslib_1=require(a0_0x44be3b(0x1c7)),ERROR_CODES=tslib_1[a0_0x44be3b(0x1b9)](require(a0_0x44be3b(0x1c1)));function a0_0x5a0a(_0x4dbe86,_0x48d182){const _0x28305f=a0_0x2830();return a0_0x5a0a=function(_0x5a0a1b,_0x15b4b2){_0x5a0a1b=_0x5a0a1b-0x1b2;let _0x36ca80=_0x28305f[_0x5a0a1b];return _0x36ca80;},a0_0x5a0a(_0x4dbe86,_0x48d182);}class LicenseError extends Error{static get['ERROR_CODES'](){const _0x34eef7=a0_0x44be3b;return Object[_0x34eef7(0x1c2)]({},ERROR_CODES);}constructor({errorCode:_0x1c294a,detail:_0x5c52b7}){const _0x4b2e48=a0_0x44be3b;super(_0x1c294a),this[_0x4b2e48(0x1bc)]=_0x4b2e48(0x1c3),this['errorCode']=_0x1c294a,this[_0x4b2e48(0x1b7)]=_0x5c52b7;}}exports[a0_0x44be3b(0x1c8)]=LicenseError;
1
+ 'use strict';function a0_0x1950(_0x321956,_0x1000e0){const _0x5a981a=a0_0x5a98();return a0_0x1950=function(_0x195061,_0x296876){_0x195061=_0x195061-0x1a8;let _0x524e8c=_0x5a981a[_0x195061];return _0x524e8c;},a0_0x1950(_0x321956,_0x1000e0);}const a0_0x1f78e0=a0_0x1950;(function(_0xbee8db,_0x24476f){const _0x5e8b61=a0_0x1950,_0x13ed74=_0xbee8db();while(!![]){try{const _0x577793=-parseInt(_0x5e8b61(0x1b4))/0x1+parseInt(_0x5e8b61(0x1ac))/0x2+parseInt(_0x5e8b61(0x1b5))/0x3+parseInt(_0x5e8b61(0x1b8))/0x4+-parseInt(_0x5e8b61(0x1b7))/0x5*(-parseInt(_0x5e8b61(0x1b0))/0x6)+parseInt(_0x5e8b61(0x1ad))/0x7+parseInt(_0x5e8b61(0x1b6))/0x8*(-parseInt(_0x5e8b61(0x1af))/0x9);if(_0x577793===_0x24476f)break;else _0x13ed74['push'](_0x13ed74['shift']());}catch(_0x44e00d){_0x13ed74['push'](_0x13ed74['shift']());}}}(a0_0x5a98,0x25eed));Object['defineProperty'](exports,a0_0x1f78e0(0x1ae),{'value':!0x0}),exports['LicenseError']=void 0x0;const tslib_1=require(a0_0x1f78e0(0x1b1)),ERROR_CODES=tslib_1[a0_0x1f78e0(0x1b3)](require(a0_0x1f78e0(0x1aa)));class LicenseError extends Error{static get[a0_0x1f78e0(0x1ab)](){return Object['assign']({},ERROR_CODES);}constructor({errorCode:_0x16fae0,detail:_0x328ff3}){const _0x1d364b=a0_0x1f78e0;super(_0x16fae0),this[_0x1d364b(0x1a9)]=_0x1d364b(0x1b2),this[_0x1d364b(0x1a8)]=_0x16fae0,this['detail']=_0x328ff3;}}exports['LicenseError']=LicenseError;function a0_0x5a98(){const _0x406d3c=['name','../constants/error-code','ERROR_CODES','356418UANhEx','108647toTkLf','__esModule','96633ohpBjo','159468YgRGDB','tslib','license-error','__importStar','160221QYkTgz','735120PhkSYp','440iWIVqB','55xhKoNo','700004txNwMo','errorCode'];a0_0x5a98=function(){return _0x406d3c;};return a0_0x5a98();}
package/server/routes.js CHANGED
@@ -1 +1 @@
1
- const a0_0xe56ffd=a0_0x3bdd;(function(_0x12883f,_0x211d2d){const _0x35268c=a0_0x3bdd,_0x437389=_0x12883f();while(!![]){try{const _0x336b6b=-parseInt(_0x35268c(0x163))/0x1+parseInt(_0x35268c(0x16d))/0x2*(parseInt(_0x35268c(0x161))/0x3)+-parseInt(_0x35268c(0x160))/0x4+-parseInt(_0x35268c(0x164))/0x5*(-parseInt(_0x35268c(0x16b))/0x6)+parseInt(_0x35268c(0x16a))/0x7+parseInt(_0x35268c(0x167))/0x8+-parseInt(_0x35268c(0x16c))/0x9;if(_0x336b6b===_0x211d2d)break;else _0x437389['push'](_0x437389['shift']());}catch(_0x263173){_0x437389['push'](_0x437389['shift']());}}}(a0_0x3331,0x9dd48));function a0_0x3bdd(_0x2c2362,_0x538e11){const _0x333138=a0_0x3331();return a0_0x3bdd=function(_0x3bdd0c,_0x476b7b){_0x3bdd0c=_0x3bdd0c-0x160;let _0x322d30=_0x333138[_0x3bdd0c];return _0x322d30;},a0_0x3bdd(_0x2c2362,_0x538e11);}const debug=require(a0_0xe56ffd(0x162))(a0_0xe56ffd(0x169));function a0_0x3331(){const _0x2371c0=['4MwDjyD','bootstrap-module-global-private-route','2031540ZdlWDr','699357hbfZDv','debug','498182RbsNwf','5xtGWTv','bootstrap-module-global-public-route','bootstrap-module-domain-private-route','420112YfJPDs','bootstrap-module-domain-public-route','things-factory:operato-tools:routes','6779318iCeAvw','4903794WwUnoK','5867874BALYJb'];a0_0x3331=function(){return _0x2371c0;};return a0_0x3331();}process['on'](a0_0xe56ffd(0x165),(_0xde85a1,_0x60f674)=>{}),process['on'](a0_0xe56ffd(0x16e),(_0x2d207a,_0x57e101)=>{}),process['on'](a0_0xe56ffd(0x168),(_0x31ab37,_0x3b090b)=>{}),process['on'](a0_0xe56ffd(0x166),(_0xe03f0f,_0x403297)=>{});
1
+ const a0_0x5ddd21=a0_0x5e10;(function(_0x2a2a64,_0x3f6bf5){const _0x416eee=a0_0x5e10,_0x21658b=_0x2a2a64();while(!![]){try{const _0x4a785f=parseInt(_0x416eee(0x12b))/0x1+parseInt(_0x416eee(0x124))/0x2*(parseInt(_0x416eee(0x12d))/0x3)+parseInt(_0x416eee(0x128))/0x4*(parseInt(_0x416eee(0x12f))/0x5)+-parseInt(_0x416eee(0x122))/0x6+parseInt(_0x416eee(0x12e))/0x7*(parseInt(_0x416eee(0x123))/0x8)+-parseInt(_0x416eee(0x126))/0x9+-parseInt(_0x416eee(0x125))/0xa*(parseInt(_0x416eee(0x127))/0xb);if(_0x4a785f===_0x3f6bf5)break;else _0x21658b['push'](_0x21658b['shift']());}catch(_0x1b239e){_0x21658b['push'](_0x21658b['shift']());}}}(a0_0x4fbf,0x61033));function a0_0x4fbf(){const _0x401faa=['bootstrap-module-global-private-route','debug','2043618HBNsIu','88tzMlmd','116328TngQhV','33310NnJLzU','2890998YGCyRQ','33ZwCsOu','4IfOkyS','bootstrap-module-domain-public-route','things-factory:operato-tools:routes','792716beHMWh','bootstrap-module-global-public-route','3FyBJLB','135947uWuMdD','23350GVTtRe','bootstrap-module-domain-private-route'];a0_0x4fbf=function(){return _0x401faa;};return a0_0x4fbf();}const debug=require(a0_0x5ddd21(0x121))(a0_0x5ddd21(0x12a));function a0_0x5e10(_0x59ea7c,_0x2fc3fb){const _0x4fbfc9=a0_0x4fbf();return a0_0x5e10=function(_0x5e10f1,_0x48988a){_0x5e10f1=_0x5e10f1-0x120;let _0x3c3d40=_0x4fbfc9[_0x5e10f1];return _0x3c3d40;},a0_0x5e10(_0x59ea7c,_0x2fc3fb);}process['on'](a0_0x5ddd21(0x12c),(_0x2714b1,_0x453ce0)=>{}),process['on'](a0_0x5ddd21(0x120),(_0x132cb9,_0x4557cb)=>{}),process['on'](a0_0x5ddd21(0x129),(_0x521703,_0x538aac)=>{}),process['on'](a0_0x5ddd21(0x130),(_0x149850,_0xbc6b7c)=>{});
@@ -1 +1 @@
1
- 'use strict';const a0_0x16ff0d=a0_0xb982;(function(_0x23e5af,_0x46b152){const _0x531eac=a0_0xb982,_0x33786b=_0x23e5af();while(!![]){try{const _0xb28298=-parseInt(_0x531eac(0x214))/0x1+-parseInt(_0x531eac(0x213))/0x2+parseInt(_0x531eac(0x21a))/0x3*(parseInt(_0x531eac(0x21d))/0x4)+-parseInt(_0x531eac(0x1d9))/0x5+-parseInt(_0x531eac(0x21c))/0x6+parseInt(_0x531eac(0x23a))/0x7*(parseInt(_0x531eac(0x1f3))/0x8)+parseInt(_0x531eac(0x240))/0x9;if(_0xb28298===_0x46b152)break;else _0x33786b['push'](_0x33786b['shift']());}catch(_0xbc40d7){_0x33786b['push'](_0x33786b['shift']());}}}(a0_0x56da,0x48228));function a0_0xb982(_0x345d92,_0x2e777b){const _0x56daaa=a0_0x56da();return a0_0xb982=function(_0xb98247,_0x51cb6c){_0xb98247=_0xb98247-0x1d6;let _0x12b441=_0x56daaa[_0xb98247];return _0x12b441;},a0_0xb982(_0x345d92,_0x2e777b);}Object[a0_0x16ff0d(0x200)](exports,a0_0x16ff0d(0x1fb),{'value':!0x0}),exports[a0_0x16ff0d(0x204)]=void 0x0;const tslib_1=require(a0_0x16ff0d(0x225)),type_graphql_1=require(a0_0x16ff0d(0x232)),resource_base_1=require('@things-factory/resource-base'),menu_base_1=require(a0_0x16ff0d(0x20c)),tool_permission_1=require(a0_0x16ff0d(0x1e4)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require('lodash'),{plural:plural}=require(a0_0x16ff0d(0x1e5)),crypto_1=tslib_1[a0_0x16ff0d(0x1fa)](require(a0_0x16ff0d(0x1ec)));let OperatoToolCreateMenu=class{async['toolCreateMenu'](_0x4b219a,_0x48e34b,_0x3de620){const _0x2aa9fc=a0_0x16ff0d,{domain:_0x5dc945,user:_0x39ebc8,tx:_0x26cb94}=_0x3de620[_0x2aa9fc(0x245)];await(0x0,tool_permission_1[_0x2aa9fc(0x251)])('',_0x3de620);const _0xdae0c5=await _0x26cb94[_0x2aa9fc(0x21e)](resource_base_1[_0x2aa9fc(0x216)])['findOne']({'where':{'domain':{'id':_0x5dc945['id']},'id':_0x4b219a}}),_0x25a6b7=await _0x26cb94[_0x2aa9fc(0x21e)](resource_base_1[_0x2aa9fc(0x238)])[_0x2aa9fc(0x244)]({'where':{'domain':{'id':_0x5dc945['id']},'entity':{'id':_0xdae0c5['id']}}});let {name:_0x17ca57=''}=_0xdae0c5||{},_0x24b12c=kebabCase(_0x17ca57),_0x2cfb50=modelTemplate[_0x2aa9fc(0x250)](/{{pascalCase name}}/g,startCase(camelCase(_0x17ca57))['replace'](/ /g,''))[_0x2aa9fc(0x250)](/{{camelCase name}}/g,camelCase(_0x17ca57))[_0x2aa9fc(0x250)](/{{snakeCase name}}/g,snakeCase(_0x17ca57))[_0x2aa9fc(0x250)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x17ca57)))[_0x2aa9fc(0x250)](/ /g,''))['replace'](/{{pluralCamelCase name}}/g,camelCase(plural(_0x17ca57)))[_0x2aa9fc(0x250)](/{{name}}/g,_0x17ca57),_0x1c6466='';'JSON'==_0xdae0c5['dataProp']?_0x1c6466='\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':_0x2aa9fc(0x1eb)==_0xdae0c5[_0x2aa9fc(0x230)]&&(_0x1c6466=_0x2aa9fc(0x203)),_0x2cfb50=_0x2cfb50[_0x2aa9fc(0x250)](/{{HistoryButton}}/g,_0x1c6466);let _0x2e8767=this['createSortCols'](_0x25a6b7);_0x2cfb50=_0x2cfb50[_0x2aa9fc(0x250)](/{{SortColumns}}/g,_0x2e8767[_0x2aa9fc(0x1de)](','));let _0x915b46=this['createSearchCols'](_0x25a6b7);_0x2cfb50=_0x2cfb50[_0x2aa9fc(0x250)](/{{SearchColumns}}/g,_0x915b46[_0x2aa9fc(0x1de)](','));let _0xabbfda=this[_0x2aa9fc(0x217)](_0x25a6b7);return _0x2cfb50=_0x2cfb50[_0x2aa9fc(0x250)](/{{GridColumns}}/g,_0xabbfda[_0x2aa9fc(0x1de)](',')),_0x2cfb50=this[_0x2aa9fc(0x243)](_0x2cfb50),await this['createMenuData'](_0x26cb94,_0x5dc945,_0x39ebc8,_0x48e34b,_0x24b12c,_0x2cfb50),!0x0;}[a0_0x16ff0d(0x217)](_0x5269ac){const _0xbccfc0=a0_0x16ff0d;return _0x5269ac[_0xbccfc0(0x20a)](_0x51797d=>'id'!=_0x51797d[_0xbccfc0(0x231)]&&_0x51797d[_0xbccfc0(0x1ed)]>0x0)[_0xbccfc0(0x219)](function(_0x267bc0,_0x24da55){const _0x5ad60a=_0xbccfc0;return _0x267bc0['gridRank']-_0x24da55[_0x5ad60a(0x1ed)];})['map'](_0x1824dc=>{const _0x36554e=_0xbccfc0;let {gridEditor:_0x2de128='string',name:_0x308325,term:_0x1f34d7,gridWidth:_0x377324=0x0,gridAlign:_0x7f705f=_0x36554e(0x1fc),nullable:_0x34a4e5=!0x1}=_0x1824dc;if(null==_0x2de128&&(_0x2de128=_0x36554e(0x1fe)),null==_0x7f705f&&(_0x7f705f=_0x36554e(0x1fc)),'updater_id'==_0x308325||_0x36554e(0x20d)==_0x308325)return _0x308325=_0x36554e(0x1f1)==_0x308325?'updater':_0x36554e(0x229),'{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22'+_0x308325+'\x22,\x22header\x22:\x20\x22'+_0x308325+'\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}';if('updated_at'==_0x308325||_0x36554e(0x227)==_0x308325)return _0x36554e(0x218)+('updated_at'==_0x308325?'updatedAt':_0x36554e(0x249))+_0x36554e(0x24b)+_0x308325+_0x36554e(0x1f4);let _0x197f4f='readonly'!=_0x2de128&&_0x36554e(0x1e1)!=_0x2de128,_0x42c558=_0x36554e(0x1e1)==_0x2de128;0x1!=_0x42c558&&0x0!=_0x197f4f||(_0x2de128='string');let _0x4a771d=_0x36554e(0x248)+_0x2de128+_0x36554e(0x22f)+camelCase(_0x308325)+_0x36554e(0x24b)+_0x1f34d7+_0x36554e(0x201)+_0x42c558+_0x36554e(0x226)+_0x197f4f+_0x36554e(0x24a)+!_0x34a4e5+',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22'+_0x7f705f+_0x36554e(0x222)+_0x377324+'\x20,\x22exportable\x22:\x20true';return _0x36554e(0x1d7)==_0x1824dc[_0x36554e(0x1da)]&&(_0x4a771d+=_0x36554e(0x20e)+_0x1824dc[_0x36554e(0x22e)]+'\x22}'),_0x36554e(0x221)==_0x1824dc['refType']&&(_0x4a771d+=_0x36554e(0x1db)+_0x1824dc[_0x36554e(0x22e)]+'\x22}'),_0x36554e(0x22c)==_0x1824dc['refType']&&(_0x4a771d+=_0x36554e(0x212)+camelCase(plural(_0x1824dc['refName']))+_0x36554e(0x235)),_0x4a771d+='}',_0x4a771d;});}['createSearchCols'](_0x21b7d4){const _0x5eafa7=a0_0x16ff0d;return _0x21b7d4['filter'](_0x4712f3=>_0x4712f3[_0x5eafa7(0x22a)]>0x0)[_0x5eafa7(0x219)](function(_0x1e1141,_0x7707cc){return _0x1e1141['searchRank']-_0x7707cc['searchRank'];})[_0x5eafa7(0x1ef)](_0x8ffeac=>{const _0x5dc4a3=_0x5eafa7;let _0x158f45=_0x8ffeac[_0x5dc4a3(0x1e2)];return _0x5dc4a3(0x20a)==_0x158f45?'\x22'+camelCase(_0x8ffeac[_0x5dc4a3(0x231)])+'\x22':(_0x158f45||(_0x158f45='eq'),_0x5dc4a3(0x22b)+camelCase(_0x8ffeac[_0x5dc4a3(0x231)])+'\x22,\x22operator\x22:\x20\x22'+_0x158f45+'\x22}');});}[a0_0x16ff0d(0x21b)](_0x5a1839){const _0x1ac221=a0_0x16ff0d;return _0x5a1839['filter'](_0x5d1843=>_0x5d1843[_0x1ac221(0x241)]>0x0)[_0x1ac221(0x219)](function(_0x3f7c3e,_0x4e9927){const _0x870dc1=_0x1ac221;return _0x3f7c3e[_0x870dc1(0x241)]-_0x4e9927[_0x870dc1(0x241)];})['map'](_0x5a4f16=>_0x1ac221(0x207)+camelCase(_0x5a4f16[_0x1ac221(0x231)])+_0x1ac221(0x24f)+_0x5a4f16[_0x1ac221(0x1e9)]+'}');}async[a0_0x16ff0d(0x20f)](_0x23c033,_0x5dc65a,_0x458711,_0x10e676,_0x4cd456,_0x5c1b93){const _0x569338=a0_0x16ff0d;let _0x134c00=await _0x23c033['getRepository'](menu_base_1[_0x569338(0x1e0)])[_0x569338(0x1e3)]({'where':{'domain':{'id':_0x5dc65a['id']},'id':_0x10e676}}),_0x116cdd=(await _0x23c033[_0x569338(0x21e)](menu_base_1[_0x569338(0x1e0)])['query'](_0x569338(0x24c)+_0x10e676+_0x569338(0x1f8)+_0x10e676+'\x27'))[0x0][_0x569338(0x205)]+0xa,_0x3cdfb3=new menu_base_1[(_0x569338(0x1e0))]();_0x3cdfb3[_0x569338(0x231)]=_0x4cd456,_0x3cdfb3[_0x569338(0x202)]='SCREEN',_0x3cdfb3[_0x569338(0x23d)]=_0x569338(0x1f9),_0x3cdfb3[_0x569338(0x205)]=_0x116cdd,_0x3cdfb3[_0x569338(0x1d6)]=!0x1,_0x3cdfb3[_0x569338(0x1ee)]=_0x4cd456,_0x3cdfb3[_0x569338(0x1ea)]=_0x5c1b93,_0x3cdfb3[_0x569338(0x23c)]=_0x569338(0x211),_0x3cdfb3[_0x569338(0x1e8)]=_0x134c00,await _0x23c033['getRepository'](menu_base_1[_0x569338(0x1e0)])[_0x569338(0x208)](Object[_0x569338(0x1e7)](Object['assign']({},_0x3cdfb3),{'domain':_0x5dc65a,'creator':_0x458711,'updater':_0x458711}));}[a0_0x16ff0d(0x243)](_0x424d27){const _0xd55259=a0_0x16ff0d;let _0x534a07=JSON[_0xd55259(0x237)](_0x424d27)[_0xd55259(0x242)](/(.{100})/)[_0xd55259(0x20a)](_0x489acf=>_0x489acf),_0x53389c=[_0xd55259(0x22d),_0xd55259(0x1df),_0xd55259(0x20b),_0xd55259(0x1dc),_0xd55259(0x1fd),_0xd55259(0x210),_0xd55259(0x1d8),_0xd55259(0x23e)],_0x37720f=crypto_1[_0xd55259(0x1dd)][_0xd55259(0x1f6)](0x20)['toString'](_0xd55259(0x220)),_0x31f550=Buffer[_0xd55259(0x246)](_0x37720f,_0xd55259(0x220)),_0x13210b=_0x37720f['substring'](0x0,0x10),_0x43c247=['',_0x13210b,_0x13210b,_0x13210b,_0x13210b,_0x13210b,_0x13210b,_0x13210b],_0xf7317b=0x0,_0x415843=[];_0x415843[_0xd55259(0x24e)](_0x37720f);for(var _0x1c052=0x0;_0x1c052<_0x534a07[_0xd55259(0x206)];_0x1c052++,_0xf7317b++){_0xf7317b==_0x53389c[_0xd55259(0x206)]&&(_0xf7317b=0x0);let _0x423647=crypto_1['default'][_0xd55259(0x1f5)](_0x53389c[_0xf7317b],_0x31f550,_0x43c247[_0xf7317b]),_0x39bf87=_0x423647[_0xd55259(0x223)](_0x534a07[_0x1c052],_0xd55259(0x234),'hex');_0x39bf87+=_0x423647[_0xd55259(0x1f0)](_0xd55259(0x220)),_0x415843[_0xd55259(0x24e)](_0x39bf87);}return _0x415843['join'](_0xd55259(0x239));}};function a0_0x56da(){const _0x138c1b=['{\x22name\x22:\x20\x22','entity','aes-256-ecb','refName','\x22,\x22name\x22:\x20\x22','dataProp','name','type-graphql','Resolver','utf8','\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}','Mutation','stringify','EntityColumn','h1z0q9i9x7q6','742567WopgMx','__param','resourceUrl','category','aes256','toolCreateMenu','7054614UcMBlq','sortRank','split','enc','find','state','from','__metadata','{\x22type\x22:\x20\x22','createdAt',',\x22mandatory\x22:\x20','\x22,\x22header\x22:\x20\x22','select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27','Arg','push','\x22,\x22desc\x22:','replace','checkStudioTemplateIsOverLimit','hiddenFlag','code','aes-256-ctr','1157335tRmoiE','refType',',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22','aes-256-cfb8','default','join','aes-256-cbc','Menu','hidden','searchOper','findOne','./../tool-secret/tool-permission','pluralize','Directive','assign','parent','reverseSort','template','COPY','crypto','gridRank','routing','map','final','updater_id','\x0a{\x0a\x20\x20\x22menu\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x22title\x22:\x20\x22{{name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22\x22,\x0a\x20\x20\x20\x20\x20\x20\x22desc\x22:\x20\x22\x22\x0a\x20\x20},\x0a\x20\x20\x22gql\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x22query\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22list_func\x22:\x20\x22{{pluralCamelCase\x20name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22find_one_func\x22:\x22{{camelCase\x20name}}\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x22mutation\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22multiple\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22func\x22:\x22updateMultiple{{pascalCase\x20name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22{{pascalCase\x20name}}Patch\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22delete\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22func\x22:\x22delete{{pluralPascalCase\x20name}}\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20},\x0a\x20\x20\x22button\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22export\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22add\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22delete\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22save\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20],\x0a\x20\x20\x22grid_column\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22string\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22id\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22header\x22:\x20\x22id\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22hidden\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22editable\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22mandatory\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22sortable\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22align\x22:\x20\x22left\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22width\x22:\x200,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22exportable\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20},\x0a{{GridColumns}}\x0a\x20\x20],\x0a\x20\x20\x22grid\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22button\x22:[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{{HistoryButton}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22option\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22mobile_mode\x22:\x20\x22LIST\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22desk_mode\x22:\x20\x22GRID\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22use_row_checker\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22pages\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2020,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2050,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20100,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20300\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22view_mode\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22GRID\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22LIST\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22CARD\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22sorters\x22:\x20[\x0a{{SortColumns}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20]\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x22row\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22multiple_select\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22click\x22:\x20\x22select-row-toggle\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20},\x0a\x20\x20\x22search\x22:\x20[\x0a{{SearchColumns}}\x0a\x20\x20]\x0a}\x0a','40RWwXkg','\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}','createCipheriv','randomBytes','design:returntype','\x27\x20or\x20id\x20=\x20\x27','meta-grist-page','__importDefault','__esModule','left','aes-256-cfb1','string','design:paramtypes','defineProperty','\x22,\x22hidden\x22:','menuType','\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','OperatoToolCreateMenu','rank','length','{\x22name\x22:\x22','save','parent_menu_id','filter','aes-256-cfb','@things-factory/menu-base','creator_id',',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22','createMenuData','aes-256-ofb','@things-factory/meta-ui/client/pages/meta-grist-page',',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22','321686QBBlgI','504162QlVrPs','design:type','Entity','createGridColumns','{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22','sort','180HCZNPW','createSortCols','3009810fwdrPB','25288iqzMFD','getRepository','__decorate','hex','scenario','\x22,\x22width\x22:','update','@transaction','tslib','\x20,\x22editable\x22:\x20','created_at','Ctx','creator','searchRank'];a0_0x56da=function(){return _0x138c1b;};return a0_0x56da();}tslib_1[a0_0x16ff0d(0x21f)]([(0x0,type_graphql_1[a0_0x16ff0d(0x1e6)])(a0_0x16ff0d(0x224)),(0x0,type_graphql_1[a0_0x16ff0d(0x236)])(_0x295558=>Boolean,{'description':'Operato\x20Tool\x20Create\x20Menu'}),tslib_1[a0_0x16ff0d(0x23b)](0x0,(0x0,type_graphql_1[a0_0x16ff0d(0x24d)])('id')),tslib_1[a0_0x16ff0d(0x23b)](0x1,(0x0,type_graphql_1[a0_0x16ff0d(0x24d)])(a0_0x16ff0d(0x209))),tslib_1['__param'](0x2,(0x0,type_graphql_1[a0_0x16ff0d(0x228)])()),tslib_1[a0_0x16ff0d(0x247)](a0_0x16ff0d(0x215),Function),tslib_1['__metadata'](a0_0x16ff0d(0x1ff),[String,String,Object]),tslib_1[a0_0x16ff0d(0x247)](a0_0x16ff0d(0x1f7),Promise)],OperatoToolCreateMenu['prototype'],a0_0x16ff0d(0x23f),null),OperatoToolCreateMenu=tslib_1[a0_0x16ff0d(0x21f)]([(0x0,type_graphql_1[a0_0x16ff0d(0x233)])()],OperatoToolCreateMenu),exports[a0_0x16ff0d(0x204)]=OperatoToolCreateMenu;const modelTemplate=a0_0x16ff0d(0x1f2);
1
+ 'use strict';const a0_0x218cb7=a0_0x5ab9;(function(_0x5d379b,_0x2cba8c){const _0x4e33cd=a0_0x5ab9,_0x2208c6=_0x5d379b();while(!![]){try{const _0xa02c9=parseInt(_0x4e33cd(0x1df))/0x1*(-parseInt(_0x4e33cd(0x230))/0x2)+-parseInt(_0x4e33cd(0x235))/0x3*(-parseInt(_0x4e33cd(0x233))/0x4)+-parseInt(_0x4e33cd(0x1f4))/0x5+parseInt(_0x4e33cd(0x200))/0x6+parseInt(_0x4e33cd(0x205))/0x7+parseInt(_0x4e33cd(0x1f8))/0x8*(-parseInt(_0x4e33cd(0x210))/0x9)+-parseInt(_0x4e33cd(0x218))/0xa*(parseInt(_0x4e33cd(0x221))/0xb);if(_0xa02c9===_0x2cba8c)break;else _0x2208c6['push'](_0x2208c6['shift']());}catch(_0x30c906){_0x2208c6['push'](_0x2208c6['shift']());}}}(a0_0x1b20,0x33c9f));function a0_0x1b20(){const _0x57cb4d=['toolCreateMenu','map','271771DrhTSe','type-graphql','updater_id','updated_at','createdAt','aes-256-cfb1','Mutation','aes-256-cfb','assign','meta-grist-page','rank','Arg','__esModule','\x22,\x22width\x22:','lodash','JSON','@things-factory/menu-base','push','scenario','gridRank','refName','426065WAPdLS','OperatoToolCreateMenu','enc','aes-256-ofb','1008zZKcgq','crypto','\x20,\x22editable\x22:\x20','split','Menu','__metadata','update','filter','2016984tyBDIx','__param','default','createSearchCols','hiddenFlag','519519DvvHMg','checkStudioTemplateIsOverLimit','creator_id','\x27\x20or\x20id\x20=\x20\x27','findOne','tslib','aes-256-ecb','SCREEN','\x22,\x22hidden\x22:','\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22basic\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22label\x22:\x20\x22data_history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22icon\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22logic\x22:\x20\x22history_json\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20','refType','11511FTFjmX','menuType',',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22','replace','createSortCols','code','randomBytes',',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22','110FhOIzz','name','final','getRepository','\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}','routing','{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22','@things-factory/meta-ui/client/pages/meta-grist-page','{\x22name\x22:\x20\x22','16676LQdAuG','Ctx','COPY','resourceUrl','left','Entity','pluralize','toString','design:paramtypes','sortRank','state','searchRank','parent_menu_id','./../tool-secret/tool-permission','\x22,\x22header\x22:\x20\x22','2yFxAxR','createGridColumns','utf8','134624sifxpx','createMenuData','30VDzQke','query','__decorate','aes-256-ctr','hidden','\x22,\x22desc\x22:','readonly','Operato\x20Tool\x20Create\x20Menu','category','join','aes256','\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}','entity','updatedAt','template','{\x22name\x22:\x22','\x22,\x22name\x22:\x20\x22','dataProp','string','createCipheriv','sort','hex','prototype','\x22,\x22operator\x22:\x20\x22','\x20,\x22exportable\x22:\x20true','h1z0q9i9x7q6','\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}'];a0_0x1b20=function(){return _0x57cb4d;};return a0_0x1b20();}Object['defineProperty'](exports,a0_0x218cb7(0x1eb),{'value':!0x0}),exports[a0_0x218cb7(0x1f5)]=void 0x0;const tslib_1=require(a0_0x218cb7(0x20a)),type_graphql_1=require(a0_0x218cb7(0x1e0)),resource_base_1=require('@things-factory/resource-base'),menu_base_1=require(a0_0x218cb7(0x1ef)),tool_permission_1=require(a0_0x218cb7(0x22e)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x218cb7(0x1ed)),{plural:plural}=require(a0_0x218cb7(0x227)),crypto_1=tslib_1['__importDefault'](require(a0_0x218cb7(0x1f9)));let OperatoToolCreateMenu=class{async[a0_0x218cb7(0x1dd)](_0xf20349,_0x262a71,_0x332c27){const _0x2c9962=a0_0x218cb7,{domain:_0xda35a2,user:_0x202190,tx:_0x32d846}=_0x332c27[_0x2c9962(0x22b)];await(0x0,tool_permission_1[_0x2c9962(0x206)])('',_0x332c27);const _0x82d2d2=await _0x32d846[_0x2c9962(0x21b)](resource_base_1[_0x2c9962(0x226)])['findOne']({'where':{'domain':{'id':_0xda35a2['id']},'id':_0xf20349}}),_0x414e1a=await _0x32d846[_0x2c9962(0x21b)](resource_base_1['EntityColumn'])['find']({'where':{'domain':{'id':_0xda35a2['id']},'entity':{'id':_0x82d2d2['id']}}});let {name:_0x3b2792=''}=_0x82d2d2||{},_0x5c01d6=kebabCase(_0x3b2792),_0x221306=modelTemplate[_0x2c9962(0x213)](/{{pascalCase name}}/g,startCase(camelCase(_0x3b2792))[_0x2c9962(0x213)](/ /g,''))[_0x2c9962(0x213)](/{{camelCase name}}/g,camelCase(_0x3b2792))[_0x2c9962(0x213)](/{{snakeCase name}}/g,snakeCase(_0x3b2792))[_0x2c9962(0x213)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x3b2792)))[_0x2c9962(0x213)](/ /g,''))[_0x2c9962(0x213)](/{{pluralCamelCase name}}/g,camelCase(plural(_0x3b2792)))[_0x2c9962(0x213)](/{{name}}/g,_0x3b2792),_0x496056='';_0x2c9962(0x1ee)==_0x82d2d2[_0x2c9962(0x1d3)]?_0x496056=_0x2c9962(0x20e):_0x2c9962(0x223)==_0x82d2d2[_0x2c9962(0x1d3)]&&(_0x496056='\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'),_0x221306=_0x221306['replace'](/{{HistoryButton}}/g,_0x496056);let _0x24bc31=this[_0x2c9962(0x214)](_0x414e1a);_0x221306=_0x221306['replace'](/{{SortColumns}}/g,_0x24bc31[_0x2c9962(0x1cb)](','));let _0x5722e0=this[_0x2c9962(0x203)](_0x414e1a);_0x221306=_0x221306[_0x2c9962(0x213)](/{{SearchColumns}}/g,_0x5722e0[_0x2c9962(0x1cb)](','));let _0x3df52a=this[_0x2c9962(0x231)](_0x414e1a);return _0x221306=_0x221306['replace'](/{{GridColumns}}/g,_0x3df52a[_0x2c9962(0x1cb)](',')),_0x221306=this[_0x2c9962(0x1f6)](_0x221306),await this[_0x2c9962(0x234)](_0x32d846,_0xda35a2,_0x202190,_0x262a71,_0x5c01d6,_0x221306),!0x0;}[a0_0x218cb7(0x231)](_0x5c5533){const _0x3fcfc3=a0_0x218cb7;return _0x5c5533[_0x3fcfc3(0x1ff)](_0x522951=>'id'!=_0x522951['name']&&_0x522951[_0x3fcfc3(0x1f2)]>0x0)[_0x3fcfc3(0x1d6)](function(_0x382b70,_0x2e38dd){const _0x2eb3b4=_0x3fcfc3;return _0x382b70[_0x2eb3b4(0x1f2)]-_0x2e38dd[_0x2eb3b4(0x1f2)];})['map'](_0x271dbe=>{const _0x2bf59b=_0x3fcfc3;let {gridEditor:_0x37e2a4=_0x2bf59b(0x1d4),name:_0x4ddf43,term:_0xa54f10,gridWidth:_0x482718=0x0,gridAlign:_0x3480e2=_0x2bf59b(0x225),nullable:_0x1f01d7=!0x1}=_0x271dbe;if(null==_0x37e2a4&&(_0x37e2a4=_0x2bf59b(0x1d4)),null==_0x3480e2&&(_0x3480e2=_0x2bf59b(0x225)),_0x2bf59b(0x1e1)==_0x4ddf43||_0x2bf59b(0x207)==_0x4ddf43)return _0x4ddf43=_0x2bf59b(0x1e1)==_0x4ddf43?'updater':'creator','{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22'+_0x4ddf43+_0x2bf59b(0x22f)+_0x4ddf43+_0x2bf59b(0x1dc);if(_0x2bf59b(0x1e2)==_0x4ddf43||'created_at'==_0x4ddf43)return _0x2bf59b(0x21e)+(_0x2bf59b(0x1e2)==_0x4ddf43?_0x2bf59b(0x1cf):_0x2bf59b(0x1e3))+_0x2bf59b(0x22f)+_0x4ddf43+_0x2bf59b(0x21c);let _0x4cfa99=_0x2bf59b(0x1c8)!=_0x37e2a4&&'hidden'!=_0x37e2a4,_0x30492e=_0x2bf59b(0x1c6)==_0x37e2a4;0x1!=_0x30492e&&0x0!=_0x4cfa99||(_0x37e2a4=_0x2bf59b(0x1d4));let _0x4b6a1f='{\x22type\x22:\x20\x22'+_0x37e2a4+_0x2bf59b(0x1d2)+camelCase(_0x4ddf43)+_0x2bf59b(0x22f)+_0xa54f10+_0x2bf59b(0x20d)+_0x30492e+_0x2bf59b(0x1fa)+_0x4cfa99+',\x22mandatory\x22:\x20'+!_0x1f01d7+',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22'+_0x3480e2+_0x2bf59b(0x1ec)+_0x482718+_0x2bf59b(0x1da);return _0x2bf59b(0x215)==_0x271dbe[_0x2bf59b(0x20f)]&&(_0x4b6a1f+=',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22'+_0x271dbe['refName']+'\x22}'),_0x2bf59b(0x1f1)==_0x271dbe[_0x2bf59b(0x20f)]&&(_0x4b6a1f+=_0x2bf59b(0x217)+_0x271dbe[_0x2bf59b(0x1f3)]+'\x22}'),_0x2bf59b(0x1ce)==_0x271dbe['refType']&&(_0x4b6a1f+=_0x2bf59b(0x212)+camelCase(plural(_0x271dbe['refName']))+_0x2bf59b(0x1cd)),_0x4b6a1f+='}',_0x4b6a1f;});}[a0_0x218cb7(0x203)](_0x268aa1){const _0x1045da=a0_0x218cb7;return _0x268aa1['filter'](_0x50f52e=>_0x50f52e['searchRank']>0x0)['sort'](function(_0x59e76c,_0x4fe3c9){const _0x29da3a=a0_0x5ab9;return _0x59e76c[_0x29da3a(0x22c)]-_0x4fe3c9[_0x29da3a(0x22c)];})[_0x1045da(0x1de)](_0x33ec89=>{const _0x43465a=_0x1045da;let _0xc8b75=_0x33ec89['searchOper'];return'filter'==_0xc8b75?'\x22'+camelCase(_0x33ec89[_0x43465a(0x219)])+'\x22':(_0xc8b75||(_0xc8b75='eq'),_0x43465a(0x220)+camelCase(_0x33ec89[_0x43465a(0x219)])+_0x43465a(0x1d9)+_0xc8b75+'\x22}');});}[a0_0x218cb7(0x214)](_0xb36546){const _0x17ba97=a0_0x218cb7;return _0xb36546[_0x17ba97(0x1ff)](_0x4c616e=>_0x4c616e[_0x17ba97(0x22a)]>0x0)[_0x17ba97(0x1d6)](function(_0x4d4a1b,_0x18ddbd){const _0x24c9ee=_0x17ba97;return _0x4d4a1b['sortRank']-_0x18ddbd[_0x24c9ee(0x22a)];})[_0x17ba97(0x1de)](_0x4c8d9=>_0x17ba97(0x1d1)+camelCase(_0x4c8d9[_0x17ba97(0x219)])+_0x17ba97(0x1c7)+_0x4c8d9['reverseSort']+'}');}async[a0_0x218cb7(0x234)](_0x26ac1e,_0x2a94b3,_0x5975f,_0x55bb0c,_0x574baa,_0x3599de){const _0xb6edd8=a0_0x218cb7;let _0x7fa5e3=await _0x26ac1e[_0xb6edd8(0x21b)](menu_base_1[_0xb6edd8(0x1fc)])[_0xb6edd8(0x209)]({'where':{'domain':{'id':_0x2a94b3['id']},'id':_0x55bb0c}}),_0x35556a=(await _0x26ac1e['getRepository'](menu_base_1[_0xb6edd8(0x1fc)])[_0xb6edd8(0x236)]('select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27'+_0x55bb0c+_0xb6edd8(0x208)+_0x55bb0c+'\x27'))[0x0][_0xb6edd8(0x1e9)]+0xa,_0x68ee3e=new menu_base_1[(_0xb6edd8(0x1fc))]();_0x68ee3e['name']=_0x574baa,_0x68ee3e[_0xb6edd8(0x211)]=_0xb6edd8(0x20c),_0x68ee3e[_0xb6edd8(0x1ca)]=_0xb6edd8(0x1e8),_0x68ee3e[_0xb6edd8(0x1e9)]=_0x35556a,_0x68ee3e[_0xb6edd8(0x204)]=!0x1,_0x68ee3e[_0xb6edd8(0x21d)]=_0x574baa,_0x68ee3e[_0xb6edd8(0x1d0)]=_0x3599de,_0x68ee3e[_0xb6edd8(0x224)]=_0xb6edd8(0x21f),_0x68ee3e['parent']=_0x7fa5e3,await _0x26ac1e[_0xb6edd8(0x21b)](menu_base_1['Menu'])['save'](Object[_0xb6edd8(0x1e7)](Object['assign']({},_0x68ee3e),{'domain':_0x2a94b3,'creator':_0x5975f,'updater':_0x5975f}));}[a0_0x218cb7(0x1f6)](_0x324c5){const _0x3ed51a=a0_0x218cb7;let _0x5e34cf=JSON['stringify'](_0x324c5)[_0x3ed51a(0x1fb)](/(.{100})/)[_0x3ed51a(0x1ff)](_0x1d5a28=>_0x1d5a28),_0xa2670a=[_0x3ed51a(0x20b),'aes-256-cbc',_0x3ed51a(0x1e6),'aes-256-cfb8',_0x3ed51a(0x1e4),_0x3ed51a(0x1f7),_0x3ed51a(0x1c5),_0x3ed51a(0x1cc)],_0x5e1462=crypto_1[_0x3ed51a(0x202)][_0x3ed51a(0x216)](0x20)[_0x3ed51a(0x228)](_0x3ed51a(0x1d7)),_0x202223=Buffer['from'](_0x5e1462,'hex'),_0x28774a=_0x5e1462['substring'](0x0,0x10),_0x63a51a=['',_0x28774a,_0x28774a,_0x28774a,_0x28774a,_0x28774a,_0x28774a,_0x28774a],_0x1ecad9=0x0,_0x1d498d=[];_0x1d498d[_0x3ed51a(0x1f0)](_0x5e1462);for(var _0x83005=0x0;_0x83005<_0x5e34cf['length'];_0x83005++,_0x1ecad9++){_0x1ecad9==_0xa2670a['length']&&(_0x1ecad9=0x0);let _0xd106f1=crypto_1[_0x3ed51a(0x202)][_0x3ed51a(0x1d5)](_0xa2670a[_0x1ecad9],_0x202223,_0x63a51a[_0x1ecad9]),_0x3561fa=_0xd106f1[_0x3ed51a(0x1fe)](_0x5e34cf[_0x83005],_0x3ed51a(0x232),_0x3ed51a(0x1d7));_0x3561fa+=_0xd106f1[_0x3ed51a(0x21a)](_0x3ed51a(0x1d7)),_0x1d498d['push'](_0x3561fa);}return _0x1d498d[_0x3ed51a(0x1cb)](_0x3ed51a(0x1db));}};tslib_1[a0_0x218cb7(0x237)]([(0x0,type_graphql_1['Directive'])('@transaction'),(0x0,type_graphql_1[a0_0x218cb7(0x1e5)])(_0x3dc9b0=>Boolean,{'description':a0_0x218cb7(0x1c9)}),tslib_1[a0_0x218cb7(0x201)](0x0,(0x0,type_graphql_1[a0_0x218cb7(0x1ea)])('id')),tslib_1[a0_0x218cb7(0x201)](0x1,(0x0,type_graphql_1['Arg'])(a0_0x218cb7(0x22d))),tslib_1[a0_0x218cb7(0x201)](0x2,(0x0,type_graphql_1[a0_0x218cb7(0x222)])()),tslib_1[a0_0x218cb7(0x1fd)]('design:type',Function),tslib_1[a0_0x218cb7(0x1fd)](a0_0x218cb7(0x229),[String,String,Object]),tslib_1[a0_0x218cb7(0x1fd)]('design:returntype',Promise)],OperatoToolCreateMenu[a0_0x218cb7(0x1d8)],a0_0x218cb7(0x1dd),null),OperatoToolCreateMenu=tslib_1[a0_0x218cb7(0x237)]([(0x0,type_graphql_1['Resolver'])()],OperatoToolCreateMenu),exports[a0_0x218cb7(0x1f5)]=OperatoToolCreateMenu;function a0_0x5ab9(_0x3c7de4,_0x4fa3c2){const _0x1b2049=a0_0x1b20();return a0_0x5ab9=function(_0x5ab9f8,_0x2cbb9e){_0x5ab9f8=_0x5ab9f8-0x1c5;let _0x506fd0=_0x1b2049[_0x5ab9f8];return _0x506fd0;},a0_0x5ab9(_0x3c7de4,_0x4fa3c2);}const modelTemplate='\x0a{\x0a\x20\x20\x22menu\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x22title\x22:\x20\x22{{name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22\x22,\x0a\x20\x20\x20\x20\x20\x20\x22desc\x22:\x20\x22\x22\x0a\x20\x20},\x0a\x20\x20\x22gql\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x22query\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22list_func\x22:\x20\x22{{pluralCamelCase\x20name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22find_one_func\x22:\x22{{camelCase\x20name}}\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x22mutation\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22multiple\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22func\x22:\x22updateMultiple{{pascalCase\x20name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22{{pascalCase\x20name}}Patch\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22delete\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22func\x22:\x22delete{{pluralPascalCase\x20name}}\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20},\x0a\x20\x20\x22button\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22export\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22add\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22delete\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22save\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20],\x0a\x20\x20\x22grid_column\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22string\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22id\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22header\x22:\x20\x22id\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22hidden\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22editable\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22mandatory\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22sortable\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22align\x22:\x20\x22left\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22width\x22:\x200,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22exportable\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20},\x0a{{GridColumns}}\x0a\x20\x20],\x0a\x20\x20\x22grid\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22button\x22:[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{{HistoryButton}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22option\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22mobile_mode\x22:\x20\x22LIST\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22desk_mode\x22:\x20\x22GRID\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22use_row_checker\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22pages\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2020,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2050,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20100,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20300\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22view_mode\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22GRID\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22LIST\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22CARD\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22sorters\x22:\x20[\x0a{{SortColumns}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20]\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x22row\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22multiple_select\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22click\x22:\x20\x22select-row-toggle\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20},\x0a\x20\x20\x22search\x22:\x20[\x0a{{SearchColumns}}\x0a\x20\x20]\x0a}\x0a';
@@ -1 +1 @@
1
- 'use strict';const a0_0x2a3b71=a0_0x31e7;(function(_0x2da755,_0x151e7b){const _0x1a3e7a=a0_0x31e7,_0x34125e=_0x2da755();while(!![]){try{const _0x296967=-parseInt(_0x1a3e7a(0x19a))/0x1*(parseInt(_0x1a3e7a(0x1b0))/0x2)+-parseInt(_0x1a3e7a(0x1c6))/0x3*(-parseInt(_0x1a3e7a(0x1b8))/0x4)+parseInt(_0x1a3e7a(0x1bc))/0x5*(parseInt(_0x1a3e7a(0x19e))/0x6)+-parseInt(_0x1a3e7a(0x183))/0x7+parseInt(_0x1a3e7a(0x1bd))/0x8+parseInt(_0x1a3e7a(0x1c4))/0x9*(-parseInt(_0x1a3e7a(0x201))/0xa)+parseInt(_0x1a3e7a(0x196))/0xb;if(_0x296967===_0x151e7b)break;else _0x34125e['push'](_0x34125e['shift']());}catch(_0x1f981d){_0x34125e['push'](_0x34125e['shift']());}}}(a0_0x4cf5,0xa66fd));function a0_0x4cf5(){const _0x10b5d3=['{{camelCase\x20name}}.','EntitySubscribers\x20}\x20from\x20\x27./','__param','createServicePath','Entities,\x20resolvers\x20as\x20','@things-factory/resource-base','createServiceFiles','-query.ts','createNoHistoryServiceFiels','replace','/index.ts','\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201','@Column({name:\x27','filter','indexOf','type\x20=>','text','\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','Resolvers,','existsSync','Float','/event-subscriber.ts','/packages/','number','colType','\x20})','utf8','type-graphql','Entities,','\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','EntityColumn','updater_id','colSize','...','Resolver','@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})','sort','domain','Arg','columnToEntityColumn','/*\x20ENTITIES\x20*/\x0a\x09...','10EOLOqx','Ctx','/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','-history.ts','writeFile','updated_at','Date','Resolvers,\x20subscribers\x20as\x20','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','long','creator_id','createEntityText','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','\x20{\x20nullable:\x20','defineProperty','3942631RudpUj','JSON','env','\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','uniqRank','rank','createDir','join','includes','findOne',',length:','map','design:paramtypes','find','date','pascalCaseName','domain_id','Query','datetime','17820902fZlszd','created_at','/packages','length','46281DXrxnw','writeFileSync','design:returntype','\x0a\x20\x20','280914wIcqNY','\x0aimport\x20{\x20ObjectType,\x20Field,\x20InputType,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@InputType()\x0aexport\x20class\x20New{{pascalCase\x20name}}\x20{\x0a{{newTypeColumns}}\x0a}\x0a\x0a@InputType()\x0aexport\x20class\x20{{pascalCase\x20name}}Patch\x20{\x0a\x20\x20@Field(type\x20=>\x20ID,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20id?:\x20string\x0a\x0a{{patchTypeColumns}}\x0a\x0a\x20\x20@Field()\x0a\x20\x20cuFlag:\x20string\x0a}\x0a\x0a@ObjectType()\x0aexport\x20class\x20{{pascalCase\x20name}}List\x20{\x0a\x20\x20@Field(type\x20=>\x20[{{pascalCase\x20name}}])\x0a\x20\x20items:\x20{{pascalCase\x20name}}[]\x0a\x0a\x20\x20@Field(type\x20=>\x20Int)\x0a\x20\x20total:\x20number\x0a}\x0a','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','dataProp','toolCreateService','Int','push','existsPath','pluralCamelCaseName','EntitySubscribers,','getColTxtType','export\x20*\x20from\x20\x27./','-history\x27','createTypeText','__decorate','OperatoToolCreateService','-mutation.ts','character\x20varying','2Qgscpe','@Field(','tableName','\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','\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','.ts','design:type','createHistoryServiceFiles','4ovsWTM','__metadata','Resolvers\x20}\x20from\x20\x27./','mkdirSync','5FxNzUc','567392hzNLsu','nullable','double\x20precision','replaceNamesMap','float','Operato\x20Tool\x20Create\x20Service','pluralPascalCaseName','7702497BqxnWi','lodash','1227741pwGwow','/server','name','PWD','integer','getFieldType','/server/service/','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20Domain\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0a@Entity(\x27{{tableName}}\x27)\x0a{{indexAnn}}\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}\x20{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','creator','getProjectRootPath','-type.ts','createHistoryEntityText','/service','getRepository','\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','COPY','index.ts','double'];a0_0x4cf5=function(){return _0x10b5d3;};return a0_0x4cf5();}function a0_0x31e7(_0x46d688,_0x5d2bf8){const _0x4cf55c=a0_0x4cf5();return a0_0x31e7=function(_0x31e746,_0x304c94){_0x31e746=_0x31e746-0x181;let _0x3f5643=_0x4cf55c[_0x31e746];return _0x3f5643;},a0_0x31e7(_0x46d688,_0x5d2bf8);}Object[a0_0x2a3b71(0x182)](exports,'__esModule',{'value':!0x0}),exports[a0_0x2a3b71(0x1ad)]=void 0x0;const tslib_1=require('tslib'),type_graphql_1=require(a0_0x2a3b71(0x1f3)),shell_1=require('@things-factory/shell'),resource_base_1=require(a0_0x2a3b71(0x1dd)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x2a3b71(0x1c5)),{plural:plural}=require('pluralize'),fs=require('fs');let OperatoToolCreateService=class{async[a0_0x2a3b71(0x1a2)](_0x33343b,_0xd693ab){const _0xd369e6=a0_0x2a3b71,{domain:_0x4e2d3d}=_0xd693ab['state'],_0x207120=await(0x0,shell_1['getRepository'])(resource_base_1['Entity'])[_0xd369e6(0x18c)]({'where':{'id':_0x33343b}}),_0x1bcfe7=await(0x0,shell_1[_0xd369e6(0x1d3)])(resource_base_1[_0xd369e6(0x1f6)])[_0xd369e6(0x190)]({'where':{'domain':{'id':_0x4e2d3d['id']},'entity':{'id':_0x207120['id']}}});let {name:_0x4d339a='',bundle:_0x395ef7=''}=_0x207120||{},_0x48d8da=this[_0xd369e6(0x1cf)](),_0x3989e0=kebabCase(_0x4d339a);return await this['createServicePath'](_0x48d8da,_0x395ef7,_0x3989e0),await this[_0xd369e6(0x1de)](_0x48d8da,_0x395ef7,_0x4d339a,_0x3989e0,_0x207120,_0x1bcfe7),!0x0;}async[a0_0x2a3b71(0x1de)](_0x4aff78,_0x89c8c1,_0x52f5f5,_0xca87a4,_0x16984e,_0x40a9c2){const _0x463721=a0_0x2a3b71;let _0x5da20d={'name':_0xca87a4,'tableName':_0x16984e['tableName'],'pascalCaseName':startCase(camelCase(_0x52f5f5))['replace'](/ /g,''),'camelCaseName':camelCase(_0x52f5f5),'snakeCaseName':snakeCase(_0x52f5f5),'pluralPascalCaseName':startCase(camelCase(plural(_0x52f5f5)))[_0x463721(0x1e1)](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x52f5f5))},_0x23ed64=_0x4aff78+_0x463721(0x1ee)+_0x89c8c1+_0x463721(0x1cc);[_0x463721(0x184),_0x463721(0x1d5)][_0x463721(0x18b)](_0x16984e[_0x463721(0x1a1)])?await this[_0x463721(0x1b7)](_0x23ed64,_0xca87a4,_0x16984e,_0x40a9c2,_0x5da20d):await this[_0x463721(0x1e0)](_0x23ed64,_0xca87a4,_0x16984e,_0x40a9c2,_0x5da20d);}async[a0_0x2a3b71(0x1b7)](_0x5680f1,_0x2c7a3b,_0x5003de,_0x407baf,_0x112383){const _0x5c8201=a0_0x2a3b71;await this[_0x5c8201(0x206)](_0x5680f1+(_0x2c7a3b+_0x5c8201(0x1e2)),serviceHistoryIndex,_0x112383);let _0x45137e=this[_0x5c8201(0x20d)](_0x5003de,_0x407baf);await this[_0x5c8201(0x206)](_0x5680f1+(_0x2c7a3b+'/'+_0x2c7a3b+'.ts'),_0x45137e,_0x112383),await this[_0x5c8201(0x206)](_0x5680f1+(_0x2c7a3b+'/'+_0x2c7a3b+_0x5c8201(0x1df)),serviceQuery,_0x112383),await this[_0x5c8201(0x206)](_0x5680f1+(_0x2c7a3b+'/'+_0x2c7a3b+_0x5c8201(0x1ae)),serviceMutation,_0x112383);let _0x505c64=this['createTypeText'](_0x407baf);await this['writeFile'](_0x5680f1+(_0x2c7a3b+'/'+_0x2c7a3b+_0x5c8201(0x1d0)),_0x505c64,_0x112383);let _0xdbb4c0=this[_0x5c8201(0x1d1)](_0x5003de,_0x407baf);await this[_0x5c8201(0x206)](_0x5680f1+(_0x2c7a3b+'/'+_0x2c7a3b+_0x5c8201(0x205)),_0xdbb4c0,_0x112383);let _0x31a0e1='';_0x5c8201(0x184)==_0x5003de['dataProp']?(_0x31a0e1=_0x5c8201(0x186),await this[_0x5c8201(0x206)](_0x5680f1+(_0x2c7a3b+'/event-subscriber.ts'),serviceEntitySubscriber,_0x112383)):_0x31a0e1='';let _0x359d72=serviceEntitySubscriber[_0x5c8201(0x1e1)](/{{entityToJson}}/g,_0x31a0e1);await this[_0x5c8201(0x206)](_0x5680f1+(_0x2c7a3b+_0x5c8201(0x1ed)),_0x359d72,_0x112383),await this[_0x5c8201(0x206)](_0x5680f1+(_0x2c7a3b+'/'+_0x2c7a3b+'-history-query.ts'),serviceHistoryQuery,_0x112383),await this[_0x5c8201(0x206)](_0x5680f1+(_0x2c7a3b+'/'+_0x2c7a3b+'-history-type.ts'),sereviceHistoryType,_0x112383);let _0x2da9b2=_0x5680f1+'index.ts';0x0==await this[_0x5c8201(0x1a5)](_0x2da9b2)&&await this[_0x5c8201(0x206)](_0x2da9b2,allIndex,_0x112383);let _0xe57c59=await fs['readFileSync'](_0x2da9b2,_0x5c8201(0x1f2));_0xe57c59[_0x5c8201(0x1e6)](_0x5c8201(0x1a9)+_0x112383['name']+'/'+_0x112383[_0x5c8201(0x1c8)]+_0x5c8201(0x1aa))<0x0&&(_0xe57c59=_0xe57c59[_0x5c8201(0x1e1)](/\/\* EXPORT ENTITY TYPES \*\//,_0x5c8201(0x20e)+_0x112383[_0x5c8201(0x1c8)]+'/'+_0x112383[_0x5c8201(0x1c8)]+_0x5c8201(0x1aa))),_0xe57c59['indexOf'](_0x5c8201(0x1a9)+_0x112383['name']+'/'+_0x112383[_0x5c8201(0x1c8)]+'\x27')<0x0&&(_0xe57c59=_0xe57c59['replace'](/\/\* EXPORT ENTITY TYPES \*\//,_0x5c8201(0x20e)+_0x112383['name']+'/'+_0x112383['name']+'\x27')),_0xe57c59[_0x5c8201(0x1e6)]('import\x20{\x20entities\x20as\x20'+_0x112383[_0x5c8201(0x192)]+_0x5c8201(0x1dc)+_0x112383[_0x5c8201(0x192)]+_0x5c8201(0x209)+_0x112383[_0x5c8201(0x192)]+'EntitySubscribers\x20}\x20from\x20\x27./'+_0x112383['name']+'\x27')<0x0&&(_0xe57c59=_0xe57c59[_0x5c8201(0x1e1)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x5c8201(0x20a)+_0x112383[_0x5c8201(0x192)]+_0x5c8201(0x1dc)+_0x112383[_0x5c8201(0x192)]+_0x5c8201(0x209)+_0x112383[_0x5c8201(0x192)]+_0x5c8201(0x1d9)+_0x112383[_0x5c8201(0x1c8)]+'\x27')),_0xe57c59[_0x5c8201(0x1e6)](_0x5c8201(0x1f9)+_0x112383['pascalCaseName']+'Entities,')<0x0&&(_0xe57c59=_0xe57c59[_0x5c8201(0x1e1)](/\/\* ENTITIES \*\//,_0x5c8201(0x200)+_0x112383[_0x5c8201(0x192)]+_0x5c8201(0x1f4))),_0xe57c59['indexOf']('...'+_0x112383['pascalCaseName']+_0x5c8201(0x1ea))<0x0&&(_0xe57c59=_0xe57c59['replace'](/\/\* RESOLVER CLASSES \*\//,'/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...'+_0x112383[_0x5c8201(0x192)]+_0x5c8201(0x1ea))),_0xe57c59[_0x5c8201(0x1e6)]('...'+_0x112383['pascalCaseName']+'EntitySubscribers,')<0x0&&(_0xe57c59=_0xe57c59[_0x5c8201(0x1e1)](/\/\* SUBSCRIBERS \*\//,_0x5c8201(0x203)+_0x112383[_0x5c8201(0x192)]+_0x5c8201(0x1a7))),await this[_0x5c8201(0x206)](_0x2da9b2,_0xe57c59,_0x112383);}async[a0_0x2a3b71(0x1e0)](_0x5e8895,_0x3f1d04,_0x1a79b0,_0x32a95f,_0x314bc7){const _0x5d2946=a0_0x2a3b71;await this[_0x5d2946(0x206)](_0x5e8895+(_0x3f1d04+_0x5d2946(0x1e2)),serviceIndex,_0x314bc7),await this[_0x5d2946(0x206)](_0x5e8895+(_0x3f1d04+'/'+_0x3f1d04+_0x5d2946(0x1df)),serviceQuery,_0x314bc7),await this[_0x5d2946(0x206)](_0x5e8895+(_0x3f1d04+'/'+_0x3f1d04+_0x5d2946(0x1ae)),serviceMutation,_0x314bc7);let _0x5c9ff9=this[_0x5d2946(0x20d)](_0x1a79b0,_0x32a95f);await this[_0x5d2946(0x206)](_0x5e8895+(_0x3f1d04+'/'+_0x3f1d04+_0x5d2946(0x1b5)),_0x5c9ff9,_0x314bc7);let _0x5481a9=this[_0x5d2946(0x1ab)](_0x32a95f);await this[_0x5d2946(0x206)](_0x5e8895+(_0x3f1d04+'/'+_0x3f1d04+_0x5d2946(0x1d0)),_0x5481a9,_0x314bc7);let _0x3cfa99=_0x5e8895+_0x5d2946(0x1d6);0x0==await this['existsPath'](_0x3cfa99)&&await this[_0x5d2946(0x206)](_0x3cfa99,allIndex,_0x314bc7);let _0x44ee16=await fs['readFileSync'](_0x3cfa99,'utf8');_0x44ee16['indexOf'](_0x5d2946(0x1a9)+_0x314bc7['name']+'/'+_0x314bc7[_0x5d2946(0x1c8)]+'\x27')<0x0&&(_0x44ee16=_0x44ee16[_0x5d2946(0x1e1)](/\/\* EXPORT ENTITY TYPES \*\//,_0x5d2946(0x20e)+_0x314bc7['name']+'/'+_0x314bc7[_0x5d2946(0x1c8)]+'\x27')),_0x44ee16[_0x5d2946(0x1e6)]('import\x20{\x20entities\x20as\x20'+_0x314bc7[_0x5d2946(0x192)]+_0x5d2946(0x1dc)+_0x314bc7['pascalCaseName']+_0x5d2946(0x1ba)+_0x314bc7[_0x5d2946(0x1c8)]+'\x27')<0x0&&(_0x44ee16=_0x44ee16[_0x5d2946(0x1e1)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x5d2946(0x20a)+_0x314bc7[_0x5d2946(0x192)]+_0x5d2946(0x1dc)+_0x314bc7[_0x5d2946(0x192)]+_0x5d2946(0x1ba)+_0x314bc7[_0x5d2946(0x1c8)]+'\x27')),_0x44ee16[_0x5d2946(0x1e6)](_0x5d2946(0x1f9)+_0x314bc7[_0x5d2946(0x192)]+_0x5d2946(0x1f4))<0x0&&(_0x44ee16=_0x44ee16[_0x5d2946(0x1e1)](/\/\* ENTITIES \*\//,_0x5d2946(0x200)+_0x314bc7[_0x5d2946(0x192)]+'Entities,')),_0x44ee16[_0x5d2946(0x1e6)]('...'+_0x314bc7[_0x5d2946(0x192)]+_0x5d2946(0x1ea))<0x0&&(_0x44ee16=_0x44ee16[_0x5d2946(0x1e1)](/\/\* RESOLVER CLASSES \*\//,_0x5d2946(0x204)+_0x314bc7[_0x5d2946(0x192)]+_0x5d2946(0x1ea))),await this['writeFile'](_0x3cfa99,_0x44ee16,_0x314bc7);}['createTypeText'](_0x2a40f4){const _0x105884=a0_0x2a3b71;let _0x40c5e3=sereviceType,_0x2a149f=_0x2a40f4[_0x105884(0x18e)](_0x3c99dd=>{const _0x38c347=_0x105884;if('id'==_0x3c99dd[_0x38c347(0x1c8)])return'';if(_0x38c347(0x193)==_0x3c99dd[_0x38c347(0x1c8)])return'';if(_0x38c347(0x197)==_0x3c99dd['name'])return'';if(_0x38c347(0x207)==_0x3c99dd['name'])return'';if(_0x38c347(0x20c)==_0x3c99dd[_0x38c347(0x1c8)])return'';if(_0x38c347(0x1f7)==_0x3c99dd['name'])return'';let _0x465e0e=this[_0x38c347(0x1cb)](_0x3c99dd),_0x354738=this[_0x38c347(0x1a8)](_0x3c99dd),_0xc84ff7=camelCase(_0x3c99dd[_0x38c347(0x1c8)]);return'\x20\x20'+('@Field('+(0x0==_0x465e0e[_0x38c347(0x199)]?'':'type\x20=>'+_0x465e0e+',')+_0x38c347(0x181)+_0x3c99dd['nullable']+'\x20})')+_0x38c347(0x19d)+(''+_0xc84ff7+(_0x3c99dd['nullable']?'?':'')+':\x20'+_0x354738)+'\x0a';});_0x40c5e3=_0x40c5e3[_0x105884(0x1e1)](/{{newTypeColumns}}/g,_0x2a149f[_0x105884(0x18a)]('\x0a'));let _0x1cccd8=_0x2a40f4['map'](_0x5b0e78=>{const _0x531251=_0x105884;if('id'==_0x5b0e78[_0x531251(0x1c8)])return'';if(_0x531251(0x193)==_0x5b0e78[_0x531251(0x1c8)])return'';if('created_at'==_0x5b0e78[_0x531251(0x1c8)])return'';if(_0x531251(0x207)==_0x5b0e78['name'])return'';if(_0x531251(0x20c)==_0x5b0e78[_0x531251(0x1c8)])return'';if('updater_id'==_0x5b0e78[_0x531251(0x1c8)])return'';let _0x131343=this[_0x531251(0x1cb)](_0x5b0e78),_0x2d0428=this['getColTxtType'](_0x5b0e78);_0x5b0e78['nullable']=!0x0;let _0x3b029a=camelCase(_0x5b0e78[_0x531251(0x1c8)]);return'\x20\x20'+(_0x531251(0x1b1)+(0x0==_0x131343[_0x531251(0x199)]?'':_0x531251(0x1e7)+_0x131343+',')+_0x531251(0x181)+_0x5b0e78[_0x531251(0x1be)]+_0x531251(0x1f1))+'\x0a\x20\x20'+(''+_0x3b029a+(_0x5b0e78[_0x531251(0x1be)]?'?':'')+':\x20'+_0x2d0428)+'\x0a';});return _0x40c5e3=_0x40c5e3[_0x105884(0x1e1)](/{{patchTypeColumns}}/g,_0x1cccd8[_0x105884(0x18a)]('\x0a')),_0x40c5e3;}[a0_0x2a3b71(0x20d)](_0x560a40,_0x16e91c){const _0x3c435b=a0_0x2a3b71;let _0x1a6172=serviceEntity,_0x327155=_0x16e91c[_0x3c435b(0x1fc)](function(_0x1172bb,_0x3f02c5){const _0x44232f=_0x3c435b;return _0x1172bb[_0x44232f(0x188)]-_0x3f02c5['rank'];})['map'](_0x14adba=>this[_0x3c435b(0x1ff)](_0x14adba));[_0x3c435b(0x1d5),'JSON'][_0x3c435b(0x18b)](_0x560a40[_0x3c435b(0x1a1)])&&_0x327155[_0x3c435b(0x1a4)](_0x3c435b(0x1e3)),_0x1a6172=_0x1a6172['replace'](/{{entityColumns}}/g,_0x327155[_0x3c435b(0x18a)]('\x0a'));let _0x44537a='',_0x11f18f=_0x16e91c[_0x3c435b(0x1e5)](_0x399af7=>_0x399af7[_0x3c435b(0x187)]&&_0x399af7[_0x3c435b(0x187)]>0x0)['sort'](function(_0x1c913b,_0x44b010){const _0x4fe728=_0x3c435b;return _0x1c913b[_0x4fe728(0x187)]-_0x44b010[_0x4fe728(0x187)];});if(_0x11f18f[_0x3c435b(0x199)]>0x0){_0x44537a=_0x3c435b(0x1fb);let _0x435c24=_0x11f18f[_0x3c435b(0x18e)](_0x296e21=>{const _0x1ffe2a=_0x3c435b;let _0x35ce1d=_0x296e21[_0x1ffe2a(0x1c8)];return _0x1ffe2a(0x193)==_0x296e21[_0x1ffe2a(0x1c8)]&&(_0x35ce1d=_0x1ffe2a(0x1fd)),_0x1ffe2a(0x20c)==_0x296e21['name']&&(_0x35ce1d=_0x1ffe2a(0x1ce)),_0x1ffe2a(0x1f7)==_0x296e21[_0x1ffe2a(0x1c8)]&&(_0x35ce1d='updater'),_0x1ffe2a(0x1d8)+camelCase(_0x35ce1d);});_0x44537a=_0x44537a[_0x3c435b(0x1e1)](/{{indexColumns}}/g,_0x435c24['join'](','));}return _0x1a6172=_0x1a6172['replace'](/{{indexAnn}}/g,_0x44537a),_0x1a6172;}[a0_0x2a3b71(0x1d1)](_0x1515b8,_0x52ed95){const _0x3a0bf0=a0_0x2a3b71;let _0x4aa56c=_0x3a0bf0(0x184)==_0x1515b8[_0x3a0bf0(0x1a1)]?serviceEntityHistJson:serviceEntityHistCopy,_0x2f860c=_0x52ed95[_0x3a0bf0(0x1fc)](function(_0x283ff0,_0x18d4f5){const _0x287508=_0x3a0bf0;return _0x283ff0['rank']-_0x18d4f5[_0x287508(0x188)];})[_0x3a0bf0(0x18e)](_0x59b3de=>this[_0x3a0bf0(0x1ff)](_0x59b3de));return _0x4aa56c=_0x4aa56c[_0x3a0bf0(0x1e1)](/{{entityColumns}}/g,_0x2f860c['join']('\x0a')),_0x4aa56c;}[a0_0x2a3b71(0x1ff)](_0x242a5a){const _0x5c90f8=a0_0x2a3b71;if('id'==_0x242a5a['name'])return'';if(_0x5c90f8(0x193)==_0x242a5a['name'])return'';if(_0x5c90f8(0x197)==_0x242a5a['name'])return'';if(_0x5c90f8(0x207)==_0x242a5a[_0x5c90f8(0x1c8)])return'';if(_0x5c90f8(0x20c)==_0x242a5a[_0x5c90f8(0x1c8)])return'';if(_0x5c90f8(0x1f7)==_0x242a5a['name'])return'';let _0x9146f9=_0x242a5a[_0x5c90f8(0x1f0)];_0x5c90f8(0x1d7)==_0x242a5a[_0x5c90f8(0x1f0)]&&(_0x9146f9=_0x5c90f8(0x1bf)),_0x5c90f8(0x20b)==_0x242a5a['colType']&&(_0x9146f9='bigint'),'string'==_0x242a5a['colType']&&(_0x9146f9=_0x5c90f8(0x1af)),'datetime'==_0x242a5a[_0x5c90f8(0x1f0)]&&(_0x9146f9='timestamp\x20without\x20time\x20zone');let _0x4131b2='';'string'==_0x242a5a[_0x5c90f8(0x1f0)]&&(_0x4131b2=_0x242a5a[_0x5c90f8(0x1f8)]);let _0x453633=this[_0x5c90f8(0x1cb)](_0x242a5a),_0x3db004=this[_0x5c90f8(0x1a8)](_0x242a5a),_0x3c3f03=camelCase(_0x242a5a[_0x5c90f8(0x1c8)]);return'\x20\x20'+(_0x5c90f8(0x1e4)+_0x242a5a['name']+'\x27,\x20type:\x20\x27'+_0x9146f9+'\x27,\x20nullable:\x20'+_0x242a5a[_0x5c90f8(0x1be)]+'\x20'+(0x0==_0x4131b2[_0x5c90f8(0x199)]?'':_0x5c90f8(0x18d)+_0x4131b2)+_0x5c90f8(0x1f1))+_0x5c90f8(0x19d)+(_0x5c90f8(0x1b1)+(0x0==_0x453633[_0x5c90f8(0x199)]?'':'type\x20=>'+_0x453633+',')+'\x20{\x20nullable:\x20'+_0x242a5a[_0x5c90f8(0x1be)]+_0x5c90f8(0x1f1))+_0x5c90f8(0x19d)+(''+_0x3c3f03+(_0x242a5a[_0x5c90f8(0x1be)]?'?':'')+':\x20'+_0x3db004)+'\x0a';}[a0_0x2a3b71(0x1cb)](_0x417842){const _0x51bd61=a0_0x2a3b71;let _0x16b992='';return'double'==_0x417842[_0x51bd61(0x1f0)]&&(_0x16b992='Float'),_0x51bd61(0x1c1)==_0x417842[_0x51bd61(0x1f0)]&&(_0x16b992=_0x51bd61(0x1ec)),_0x51bd61(0x20b)==_0x417842[_0x51bd61(0x1f0)]&&(_0x16b992=_0x51bd61(0x1a3)),_0x51bd61(0x1ca)==_0x417842[_0x51bd61(0x1f0)]&&(_0x16b992=_0x51bd61(0x1a3)),_0x16b992;}[a0_0x2a3b71(0x1a8)](_0x55a595){const _0xdb912=a0_0x2a3b71;let _0x270a17=_0x55a595[_0xdb912(0x1f0)];return'decimal'==_0x55a595[_0xdb912(0x1f0)]&&(_0x270a17=_0xdb912(0x1ef)),'double'==_0x55a595[_0xdb912(0x1f0)]&&(_0x270a17='number'),_0xdb912(0x1c1)==_0x55a595[_0xdb912(0x1f0)]&&(_0x270a17=_0xdb912(0x1ef)),_0xdb912(0x1ca)==_0x55a595[_0xdb912(0x1f0)]&&(_0x270a17=_0xdb912(0x1ef)),_0xdb912(0x20b)==_0x55a595['colType']&&(_0x270a17=_0xdb912(0x1ef)),_0xdb912(0x195)==_0x55a595[_0xdb912(0x1f0)]&&(_0x270a17=_0xdb912(0x208)),_0xdb912(0x191)==_0x55a595[_0xdb912(0x1f0)]&&(_0x270a17=_0xdb912(0x208)),_0xdb912(0x1e8)==_0x55a595[_0xdb912(0x1f0)]&&(_0x270a17='string'),_0x270a17;}async[a0_0x2a3b71(0x206)](_0x382485,_0x8b074c,_0x4d6d72){const _0x57b983=a0_0x2a3b71;await fs[_0x57b983(0x19b)](_0x382485,this[_0x57b983(0x1c0)](_0x8b074c,_0x4d6d72),_0x57b983(0x1f2));}[a0_0x2a3b71(0x1c0)](_0x62bf1,_0x1e7958){const _0x3ba05e=a0_0x2a3b71;return _0x62bf1[_0x3ba05e(0x1e1)](/{{pascalCase name}}/g,_0x1e7958['pascalCaseName'])[_0x3ba05e(0x1e1)](/{{camelCase name}}/g,_0x1e7958['camelCaseName'])[_0x3ba05e(0x1e1)](/{{snakeCase name}}/g,_0x1e7958['snakeCaseName'])['replace'](/{{pluralPascalCase name}}/g,_0x1e7958[_0x3ba05e(0x1c3)])['replace'](/{{pluralCamelCase name}}/g,_0x1e7958[_0x3ba05e(0x1a6)])['replace'](/{{tableName}}/g,_0x1e7958[_0x3ba05e(0x1b2)])['replace'](/{{name}}/g,_0x1e7958['name']);}async[a0_0x2a3b71(0x1db)](_0xdb7877,_0x1f4b07,_0x30ec96){const _0x2f4668=a0_0x2a3b71;let _0x15fdb0=_0xdb7877+_0x2f4668(0x198);await this[_0x2f4668(0x189)](_0x15fdb0),_0x15fdb0=_0x15fdb0+'/'+_0x1f4b07,await this[_0x2f4668(0x189)](_0x15fdb0),_0x15fdb0+=_0x2f4668(0x1c7),await this['createDir'](_0x15fdb0),_0x15fdb0+=_0x2f4668(0x1d2),await this['createDir'](_0x15fdb0),_0x15fdb0=_0x15fdb0+'/'+_0x30ec96,await this['createDir'](_0x15fdb0);}[a0_0x2a3b71(0x1cf)](){const _0x39615a=a0_0x2a3b71;let _0x362c2c=process[_0x39615a(0x185)][_0x39615a(0x1c9)]['split']('/'),_0x3c45d0=[];for(let _0x51a637=0x0;_0x51a637<_0x362c2c[_0x39615a(0x199)]&&'packages'!=_0x362c2c[_0x51a637];_0x51a637++)_0x3c45d0[_0x39615a(0x1a4)](_0x362c2c[_0x51a637]);return _0x3c45d0['join']('/');}async[a0_0x2a3b71(0x189)](_0x3d1470){const _0x4ac567=a0_0x2a3b71;0x0==await this[_0x4ac567(0x1a5)](_0x3d1470)&&fs[_0x4ac567(0x1bb)](_0x3d1470);}async[a0_0x2a3b71(0x1a5)](_0x254932){const _0x168bcb=a0_0x2a3b71;return await fs[_0x168bcb(0x1eb)](_0x254932);}};tslib_1[a0_0x2a3b71(0x1ac)]([(0x0,type_graphql_1[a0_0x2a3b71(0x194)])(_0x2327a5=>Boolean,{'description':a0_0x2a3b71(0x1c2)}),tslib_1[a0_0x2a3b71(0x1da)](0x0,(0x0,type_graphql_1[a0_0x2a3b71(0x1fe)])('id')),tslib_1[a0_0x2a3b71(0x1da)](0x1,(0x0,type_graphql_1[a0_0x2a3b71(0x202)])()),tslib_1[a0_0x2a3b71(0x1b9)](a0_0x2a3b71(0x1b6),Function),tslib_1[a0_0x2a3b71(0x1b9)](a0_0x2a3b71(0x18f),[String,Object]),tslib_1['__metadata'](a0_0x2a3b71(0x19c),Promise)],OperatoToolCreateService['prototype'],a0_0x2a3b71(0x1a2),null),OperatoToolCreateService=tslib_1[a0_0x2a3b71(0x1ac)]([(0x0,type_graphql_1[a0_0x2a3b71(0x1fa)])()],OperatoToolCreateService),exports['OperatoToolCreateService']=OperatoToolCreateService;const allIndex=a0_0x2a3b71(0x1b3),serviceIndex=a0_0x2a3b71(0x1d4),serviceHistoryIndex='\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryQuery\x20}\x20from\x20\x27./{{name}}-history-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryEntitySubscriber\x20}\x20from\x20\x27./event-subscriber\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}},\x20{{pascalCase\x20name}}History]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}HistoryQuery,\x20{{pascalCase\x20name}}Mutation]\x0aexport\x20const\x20subscribers\x20=\x20[{{pascalCase\x20name}}HistoryEntitySubscriber]\x0a\x0a',serviceQuery='\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}List\x20}\x20from\x20\x27./{{name}}-type\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Query\x20{\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20fetch\x20a\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20return\x20await\x20getRepository({{pascalCase\x20name}}).findOne({\x0a\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20}\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}List,\x20{\x20description:\x20\x27To\x20fetch\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{pluralCamelCase\x20name}}(@Args()\x20params:\x20ListParam,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}List>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20queryBuilder\x20=\x20getQueryBuilderFromListParams({\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20params,\x0a\x20\x20\x20\x20\x20\x20repository:\x20await\x20getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20const\x20convertedParams\x20=\x20convertListParams(params,\x20domain.id)\x0a\x20\x20\x20\x20const\x20[items,\x20total]\x20=\x20await\x20queryBuilder.getManyAndCount()\x0a\x0a\x20\x20\x20\x20return\x20{\x20items,\x20total\x20}\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20Domain)\x0a\x20\x20async\x20domain(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<Domain>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(Domain).findOneBy({id:{{camelCase\x20name}}.domainId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20updater(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.updaterId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20creator(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.creatorId})\x0a\x20\x20}\x0a}\x0a',serviceHistoryQuery=a0_0x2a3b71(0x1f5),serviceMutation='\x0aimport\x20{\x20Resolver,\x20Mutation,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20In\x20}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20New{{pascalCase\x20name}},\x20{{pascalCase\x20name}}Patch\x20}\x20from\x20\x27./{{name}}-type\x27\x0aimport\x20{\x20getRepository\x20}\x20from\x20\x27@things-factory/shell\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Mutation\x20{\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20create\x20new\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20create{{pascalCase\x20name}}(@Arg(\x27{{camelCase\x20name}}\x27)\x20{{camelCase\x20name}}:\x20New{{pascalCase\x20name}},\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20return\x20await\x20tx.getRepository({{pascalCase\x20name}}).save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20modify\x20{{pascalCase\x20name}}\x20information\x27\x20})\x0a\x20\x20async\x20update{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27id\x27)\x20id:\x20string,\x0a\x20\x20\x20\x20@Arg(\x27patch\x27)\x20patch:\x20{{pascalCase\x20name}}Patch,\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20repository\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20repository.findOne(\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20)\x0a\x0a\x20\x20\x20\x20return\x20await\x20repository.save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20...patch,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20[{{pascalCase\x20name}}],\x20{\x20description:\x20\x22To\x20modify\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20information\x22\x20})\x0a\x20\x20async\x20updateMultiple{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27patches\x27,\x20type\x20=>\x20[{{pascalCase\x20name}}Patch])\x20patches:\x20{{pascalCase\x20name}}Patch[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}[]>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20results\x20=\x20[]\x0a\x20\x20\x20\x20const\x20_createRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27+\x27)\x0a\x20\x20\x20\x20const\x20_updateRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27M\x27)\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}Repo\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x0a\x20\x20\x20\x20if\x20(_createRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_createRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20newRecord\x20=\x20_createRecords[i]\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...newRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27+\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20if\x20(_updateRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_updateRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20updRecord\x20=\x20_updateRecords[i]\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20{{camelCase\x20name}}Repo.findOne({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id:updRecord.id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...updRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27M\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20return\x20results\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20delete{{pascalCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove({\x20domain,\x20id,\x20updater:user\x20})\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20multiple\x20{{camelCase\x20name}}s\x27\x20})\x0a\x20\x20async\x20delete{{pluralPascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27ids\x27,\x20type\x20=>\x20[String])\x20ids:\x20string[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20delEntitis\x20=\x20ids.map(id=>{\x0a\x20\x20\x20\x20\x20\x20return\x20{domain,id,updater:user}\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove(delEntitis)\x0a\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a}\x0a',sereviceType=a0_0x2a3b71(0x19f),sereviceHistoryType=a0_0x2a3b71(0x1b4),serviceEntity=a0_0x2a3b71(0x1cd),serviceEntityHistCopy=a0_0x2a3b71(0x1a0),serviceEntityHistJson='\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a\x20\x20@Column(\x27simple-json\x27,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20@Field(type\x20=>\x20ScalarObject,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20historyJson?:\x20any\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a',serviceEntitySubscriber=a0_0x2a3b71(0x1e9);
1
+ 'use strict';const a0_0x2508b9=a0_0x2218;(function(_0xc18ac7,_0x2dbe77){const _0x8af792=a0_0x2218,_0x2477c6=_0xc18ac7();while(!![]){try{const _0x52a704=parseInt(_0x8af792(0xe8))/0x1*(parseInt(_0x8af792(0x146))/0x2)+-parseInt(_0x8af792(0x106))/0x3*(-parseInt(_0x8af792(0xe3))/0x4)+-parseInt(_0x8af792(0x167))/0x5*(-parseInt(_0x8af792(0xf6))/0x6)+-parseInt(_0x8af792(0x12f))/0x7*(parseInt(_0x8af792(0xd7))/0x8)+parseInt(_0x8af792(0x169))/0x9+parseInt(_0x8af792(0x113))/0xa*(parseInt(_0x8af792(0x153))/0xb)+-parseInt(_0x8af792(0x15e))/0xc;if(_0x52a704===_0x2dbe77)break;else _0x2477c6['push'](_0x2477c6['shift']());}catch(_0x292062){_0x2477c6['push'](_0x2477c6['shift']());}}}(a0_0x2ec3,0x1e505));Object[a0_0x2508b9(0x145)](exports,a0_0x2508b9(0xde),{'value':!0x0}),exports[a0_0x2508b9(0xda)]=void 0x0;const tslib_1=require('tslib'),type_graphql_1=require('type-graphql'),shell_1=require(a0_0x2508b9(0x142)),resource_base_1=require(a0_0x2508b9(0x124)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x2508b9(0x139)),{plural:plural}=require(a0_0x2508b9(0x10f)),fs=require('fs');function a0_0x2ec3(){const _0x15b23d=['replace','Int','createServiceFiles','44872SmMyxr','createTypeText','design:type','OperatoToolCreateService','createDir','EntitySubscribers,','bigint','__esModule','@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})','\x27,\x20nullable:\x20','{{camelCase\x20name}}.','domain_id','1052JtfUkB','creator','updater_id','/*\x20ENTITIES\x20*/\x0a\x09...','double\x20precision','44211pUaxIZ','type\x20=>','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','\x0aimport\x20{\x20ObjectType,\x20Field,\x20InputType,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@InputType()\x0aexport\x20class\x20New{{pascalCase\x20name}}\x20{\x0a{{newTypeColumns}}\x0a}\x0a\x0a@InputType()\x0aexport\x20class\x20{{pascalCase\x20name}}Patch\x20{\x0a\x20\x20@Field(type\x20=>\x20ID,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20id?:\x20string\x0a\x0a{{patchTypeColumns}}\x0a\x0a\x20\x20@Field()\x0a\x20\x20cuFlag:\x20string\x0a}\x0a\x0a@ObjectType()\x0aexport\x20class\x20{{pascalCase\x20name}}List\x20{\x0a\x20\x20@Field(type\x20=>\x20[{{pascalCase\x20name}}])\x0a\x20\x20items:\x20{{pascalCase\x20name}}[]\x0a\x0a\x20\x20@Field(type\x20=>\x20Int)\x0a\x20\x20total:\x20number\x0a}\x0a','\x20{\x20nullable:\x20','/event-subscriber.ts','getFieldType','@Column({name:\x27','existsSync','Date','.ts','existsPath','/server','writeFileSync','124728ITToVd','replaceNamesMap','state','findOne','colSize','export\x20*\x20from\x20\x27./','push','createNoHistoryServiceFiels','number','\x20})','utf8','double','rank','mkdirSync','Resolvers,','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','357ZMjDBt','long','createHistoryEntityText','float','Float','PWD','Query','/packages/','created_at','pluralize','pascalCaseName','camelCaseName','domain','40780MIuwzv','sort','/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...','split','\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','map','...','getProjectRootPath','updater','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\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','Arg','indexOf','Entities,','__decorate','EntitySubscribers\x20}\x20from\x20\x27./','@Field(','Resolvers\x20}\x20from\x20\x27./','@things-factory/resource-base','createHistoryServiceFiles','/index.ts','design:returntype','index.ts','text','-mutation.ts','string','__param','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','\x0a\x20\x20','7ShRQRo','pluralPascalCaseName','toolCreateService','import\x20{\x20entities\x20as\x20','getColTxtType','\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','uniqRank',',length:','datetime','includes','lodash','nullable','writeFile','EntityColumn','timestamp\x20without\x20time\x20zone','tableName','prototype','join','__metadata','@things-factory/shell','find','Resolver','defineProperty','6BAGzxu','-type.ts','Entities,\x20resolvers\x20as\x20','colType','creator_id','dataProp','length','\x0a\x20\x20public\x20createHistoryEntity(manager,\x20entity)\x20{\x0a\x20\x20\x20\x20let\x20history\x20=\x20manager.create(this.historyEntity,\x20entity);\x0a\x20\x20\x20\x20history.historyJson\x20=\x20JSON.stringify(entity);\x0a\x20\x20\x20\x20return\x20history;\x0a\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20','createServicePath','updated_at','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20Domain\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0a@Entity(\x27{{tableName}}\x27)\x0a{{indexAnn}}\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}\x20{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','date','\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','154HSJPgs','getRepository','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','-history\x27','readFileSync','\x27,\x20type:\x20\x27','createEntityText','/packages','-history.ts','name','JSON','3873936CxGYgo','Ctx','pluralCamelCaseName','\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','Resolvers,\x20subscribers\x20as\x20','/service','\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201','Operato\x20Tool\x20Create\x20Service','COPY','15dQLbru','-query.ts','1522944KvyvCU','integer'];a0_0x2ec3=function(){return _0x15b23d;};return a0_0x2ec3();}let OperatoToolCreateService=class{async['toolCreateService'](_0x41d8d3,_0x391543){const _0x8b1904=a0_0x2508b9,{domain:_0xa9cc19}=_0x391543[_0x8b1904(0xf8)],_0x206443=await(0x0,shell_1[_0x8b1904(0x154)])(resource_base_1['Entity'])[_0x8b1904(0xf9)]({'where':{'id':_0x41d8d3}}),_0x54071e=await(0x0,shell_1[_0x8b1904(0x154)])(resource_base_1[_0x8b1904(0x13c)])[_0x8b1904(0x143)]({'where':{'domain':{'id':_0xa9cc19['id']},'entity':{'id':_0x206443['id']}}});let {name:_0x139fc3='',bundle:_0x5b9f96=''}=_0x206443||{},_0x491d4=this[_0x8b1904(0x11a)](),_0x3f48d3=kebabCase(_0x139fc3);return await this[_0x8b1904(0x14e)](_0x491d4,_0x5b9f96,_0x3f48d3),await this[_0x8b1904(0xd6)](_0x491d4,_0x5b9f96,_0x139fc3,_0x3f48d3,_0x206443,_0x54071e),!0x0;}async[a0_0x2508b9(0xd6)](_0x44d35b,_0x18f15b,_0x3f87dd,_0xc24299,_0x198a64,_0x3fcae4){const _0x447a0e=a0_0x2508b9;let _0x389c3b={'name':_0xc24299,'tableName':_0x198a64[_0x447a0e(0x13e)],'pascalCaseName':startCase(camelCase(_0x3f87dd))['replace'](/ /g,''),'camelCaseName':camelCase(_0x3f87dd),'snakeCaseName':snakeCase(_0x3f87dd),'pluralPascalCaseName':startCase(camelCase(plural(_0x3f87dd)))['replace'](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x3f87dd))},_0x3ad9f2=_0x44d35b+_0x447a0e(0x10d)+_0x18f15b+'/server/service/';['JSON',_0x447a0e(0x166)][_0x447a0e(0x138)](_0x198a64['dataProp'])?await this[_0x447a0e(0x125)](_0x3ad9f2,_0xc24299,_0x198a64,_0x3fcae4,_0x389c3b):await this[_0x447a0e(0xfd)](_0x3ad9f2,_0xc24299,_0x198a64,_0x3fcae4,_0x389c3b);}async['createHistoryServiceFiles'](_0x461a42,_0x16c4d6,_0x44363f,_0x295061,_0x5bdfdb){const _0x34ea75=a0_0x2508b9;await this[_0x34ea75(0x13b)](_0x461a42+(_0x16c4d6+_0x34ea75(0x126)),serviceHistoryIndex,_0x5bdfdb);let _0x44ef70=this['createEntityText'](_0x44363f,_0x295061);await this[_0x34ea75(0x13b)](_0x461a42+(_0x16c4d6+'/'+_0x16c4d6+_0x34ea75(0xf2)),_0x44ef70,_0x5bdfdb),await this['writeFile'](_0x461a42+(_0x16c4d6+'/'+_0x16c4d6+_0x34ea75(0x168)),serviceQuery,_0x5bdfdb),await this[_0x34ea75(0x13b)](_0x461a42+(_0x16c4d6+'/'+_0x16c4d6+'-mutation.ts'),serviceMutation,_0x5bdfdb);let _0x55c886=this[_0x34ea75(0xd8)](_0x295061);await this['writeFile'](_0x461a42+(_0x16c4d6+'/'+_0x16c4d6+_0x34ea75(0x147)),_0x55c886,_0x5bdfdb);let _0x225ebb=this[_0x34ea75(0x108)](_0x44363f,_0x295061);await this['writeFile'](_0x461a42+(_0x16c4d6+'/'+_0x16c4d6+_0x34ea75(0x15b)),_0x225ebb,_0x5bdfdb);let _0x296432='';'JSON'==_0x44363f[_0x34ea75(0x14b)]?(_0x296432=_0x34ea75(0x14d),await this[_0x34ea75(0x13b)](_0x461a42+(_0x16c4d6+'/event-subscriber.ts'),serviceEntitySubscriber,_0x5bdfdb)):_0x296432='';let _0x352c8c=serviceEntitySubscriber['replace'](/{{entityToJson}}/g,_0x296432);await this[_0x34ea75(0x13b)](_0x461a42+(_0x16c4d6+_0x34ea75(0xed)),_0x352c8c,_0x5bdfdb),await this[_0x34ea75(0x13b)](_0x461a42+(_0x16c4d6+'/'+_0x16c4d6+'-history-query.ts'),serviceHistoryQuery,_0x5bdfdb),await this['writeFile'](_0x461a42+(_0x16c4d6+'/'+_0x16c4d6+'-history-type.ts'),sereviceHistoryType,_0x5bdfdb);let _0x5a08cd=_0x461a42+_0x34ea75(0x128);0x0==await this[_0x34ea75(0xf3)](_0x5a08cd)&&await this['writeFile'](_0x5a08cd,allIndex,_0x5bdfdb);let _0x46ffa5=await fs[_0x34ea75(0x157)](_0x5a08cd,_0x34ea75(0x100));_0x46ffa5[_0x34ea75(0x11e)](_0x34ea75(0xfb)+_0x5bdfdb[_0x34ea75(0x15c)]+'/'+_0x5bdfdb[_0x34ea75(0x15c)]+_0x34ea75(0x156))<0x0&&(_0x46ffa5=_0x46ffa5['replace'](/\/\* EXPORT ENTITY TYPES \*\//,_0x34ea75(0x12d)+_0x5bdfdb[_0x34ea75(0x15c)]+'/'+_0x5bdfdb[_0x34ea75(0x15c)]+'-history\x27')),_0x46ffa5[_0x34ea75(0x11e)]('export\x20*\x20from\x20\x27./'+_0x5bdfdb[_0x34ea75(0x15c)]+'/'+_0x5bdfdb[_0x34ea75(0x15c)]+'\x27')<0x0&&(_0x46ffa5=_0x46ffa5[_0x34ea75(0x16b)](/\/\* EXPORT ENTITY TYPES \*\//,_0x34ea75(0x12d)+_0x5bdfdb[_0x34ea75(0x15c)]+'/'+_0x5bdfdb[_0x34ea75(0x15c)]+'\x27')),_0x46ffa5[_0x34ea75(0x11e)](_0x34ea75(0x132)+_0x5bdfdb['pascalCaseName']+_0x34ea75(0x148)+_0x5bdfdb[_0x34ea75(0x110)]+'Resolvers,\x20subscribers\x20as\x20'+_0x5bdfdb['pascalCaseName']+'EntitySubscribers\x20}\x20from\x20\x27./'+_0x5bdfdb[_0x34ea75(0x15c)]+'\x27')<0x0&&(_0x46ffa5=_0x46ffa5[_0x34ea75(0x16b)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x34ea75(0x155)+_0x5bdfdb[_0x34ea75(0x110)]+_0x34ea75(0x148)+_0x5bdfdb['pascalCaseName']+_0x34ea75(0x162)+_0x5bdfdb[_0x34ea75(0x110)]+_0x34ea75(0x121)+_0x5bdfdb['name']+'\x27')),_0x46ffa5[_0x34ea75(0x11e)](_0x34ea75(0x119)+_0x5bdfdb[_0x34ea75(0x110)]+_0x34ea75(0x11f))<0x0&&(_0x46ffa5=_0x46ffa5[_0x34ea75(0x16b)](/\/\* ENTITIES \*\//,'/*\x20ENTITIES\x20*/\x0a\x09...'+_0x5bdfdb['pascalCaseName']+_0x34ea75(0x11f))),_0x46ffa5['indexOf'](_0x34ea75(0x119)+_0x5bdfdb['pascalCaseName']+'Resolvers,')<0x0&&(_0x46ffa5=_0x46ffa5[_0x34ea75(0x16b)](/\/\* RESOLVER CLASSES \*\//,'/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...'+_0x5bdfdb['pascalCaseName']+_0x34ea75(0x104))),_0x46ffa5[_0x34ea75(0x11e)]('...'+_0x5bdfdb[_0x34ea75(0x110)]+_0x34ea75(0xdc))<0x0&&(_0x46ffa5=_0x46ffa5[_0x34ea75(0x16b)](/\/\* SUBSCRIBERS \*\//,_0x34ea75(0x115)+_0x5bdfdb[_0x34ea75(0x110)]+_0x34ea75(0xdc))),await this[_0x34ea75(0x13b)](_0x5a08cd,_0x46ffa5,_0x5bdfdb);}async[a0_0x2508b9(0xfd)](_0x5c18c7,_0x5cf7cb,_0x2bdbe0,_0x2a431b,_0x16355c){const _0x50fb6c=a0_0x2508b9;await this['writeFile'](_0x5c18c7+(_0x5cf7cb+'/index.ts'),serviceIndex,_0x16355c),await this[_0x50fb6c(0x13b)](_0x5c18c7+(_0x5cf7cb+'/'+_0x5cf7cb+_0x50fb6c(0x168)),serviceQuery,_0x16355c),await this[_0x50fb6c(0x13b)](_0x5c18c7+(_0x5cf7cb+'/'+_0x5cf7cb+_0x50fb6c(0x12a)),serviceMutation,_0x16355c);let _0x6073c=this[_0x50fb6c(0x159)](_0x2bdbe0,_0x2a431b);await this[_0x50fb6c(0x13b)](_0x5c18c7+(_0x5cf7cb+'/'+_0x5cf7cb+_0x50fb6c(0xf2)),_0x6073c,_0x16355c);let _0x4c06d7=this[_0x50fb6c(0xd8)](_0x2a431b);await this[_0x50fb6c(0x13b)](_0x5c18c7+(_0x5cf7cb+'/'+_0x5cf7cb+_0x50fb6c(0x147)),_0x4c06d7,_0x16355c);let _0x4a69f9=_0x5c18c7+_0x50fb6c(0x128);0x0==await this[_0x50fb6c(0xf3)](_0x4a69f9)&&await this[_0x50fb6c(0x13b)](_0x4a69f9,allIndex,_0x16355c);let _0x4690e0=await fs[_0x50fb6c(0x157)](_0x4a69f9,_0x50fb6c(0x100));_0x4690e0[_0x50fb6c(0x11e)]('export\x20*\x20from\x20\x27./'+_0x16355c['name']+'/'+_0x16355c[_0x50fb6c(0x15c)]+'\x27')<0x0&&(_0x4690e0=_0x4690e0['replace'](/\/\* EXPORT ENTITY TYPES \*\//,_0x50fb6c(0x12d)+_0x16355c[_0x50fb6c(0x15c)]+'/'+_0x16355c[_0x50fb6c(0x15c)]+'\x27')),_0x4690e0[_0x50fb6c(0x11e)]('import\x20{\x20entities\x20as\x20'+_0x16355c[_0x50fb6c(0x110)]+_0x50fb6c(0x148)+_0x16355c[_0x50fb6c(0x110)]+_0x50fb6c(0x123)+_0x16355c[_0x50fb6c(0x15c)]+'\x27')<0x0&&(_0x4690e0=_0x4690e0['replace'](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,'/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20'+_0x16355c['pascalCaseName']+'Entities,\x20resolvers\x20as\x20'+_0x16355c[_0x50fb6c(0x110)]+'Resolvers\x20}\x20from\x20\x27./'+_0x16355c[_0x50fb6c(0x15c)]+'\x27')),_0x4690e0[_0x50fb6c(0x11e)]('...'+_0x16355c[_0x50fb6c(0x110)]+_0x50fb6c(0x11f))<0x0&&(_0x4690e0=_0x4690e0[_0x50fb6c(0x16b)](/\/\* ENTITIES \*\//,_0x50fb6c(0xe6)+_0x16355c['pascalCaseName']+_0x50fb6c(0x11f))),_0x4690e0['indexOf']('...'+_0x16355c['pascalCaseName']+_0x50fb6c(0x104))<0x0&&(_0x4690e0=_0x4690e0[_0x50fb6c(0x16b)](/\/\* RESOLVER CLASSES \*\//,_0x50fb6c(0xea)+_0x16355c[_0x50fb6c(0x110)]+'Resolvers,')),await this['writeFile'](_0x4a69f9,_0x4690e0,_0x16355c);}['createTypeText'](_0x1245e2){const _0x3e5692=a0_0x2508b9;let _0x43fcda=sereviceType,_0x689b34=_0x1245e2['map'](_0x503763=>{const _0xd56fbf=a0_0x2218;if('id'==_0x503763[_0xd56fbf(0x15c)])return'';if('domain_id'==_0x503763[_0xd56fbf(0x15c)])return'';if('created_at'==_0x503763[_0xd56fbf(0x15c)])return'';if(_0xd56fbf(0x14f)==_0x503763[_0xd56fbf(0x15c)])return'';if(_0xd56fbf(0x14a)==_0x503763['name'])return'';if(_0xd56fbf(0xe5)==_0x503763['name'])return'';let _0x2ff41a=this[_0xd56fbf(0xee)](_0x503763),_0x23b068=this[_0xd56fbf(0x133)](_0x503763),_0x28c124=camelCase(_0x503763[_0xd56fbf(0x15c)]);return'\x20\x20'+(_0xd56fbf(0x122)+(0x0==_0x2ff41a[_0xd56fbf(0x14c)]?'':_0xd56fbf(0xe9)+_0x2ff41a+',')+_0xd56fbf(0xec)+_0x503763[_0xd56fbf(0x13a)]+_0xd56fbf(0xff))+_0xd56fbf(0x12e)+(''+_0x28c124+(_0x503763[_0xd56fbf(0x13a)]?'?':'')+':\x20'+_0x23b068)+'\x0a';});_0x43fcda=_0x43fcda[_0x3e5692(0x16b)](/{{newTypeColumns}}/g,_0x689b34[_0x3e5692(0x140)]('\x0a'));let _0x5cbcd0=_0x1245e2[_0x3e5692(0x118)](_0x5e486f=>{const _0x1c1007=_0x3e5692;if('id'==_0x5e486f[_0x1c1007(0x15c)])return'';if('domain_id'==_0x5e486f['name'])return'';if(_0x1c1007(0x10e)==_0x5e486f['name'])return'';if(_0x1c1007(0x14f)==_0x5e486f['name'])return'';if(_0x1c1007(0x14a)==_0x5e486f[_0x1c1007(0x15c)])return'';if(_0x1c1007(0xe5)==_0x5e486f[_0x1c1007(0x15c)])return'';let _0x40c0e0=this[_0x1c1007(0xee)](_0x5e486f),_0x19ea65=this[_0x1c1007(0x133)](_0x5e486f);_0x5e486f[_0x1c1007(0x13a)]=!0x0;let _0x388434=camelCase(_0x5e486f['name']);return'\x20\x20'+('@Field('+(0x0==_0x40c0e0['length']?'':'type\x20=>'+_0x40c0e0+',')+_0x1c1007(0xec)+_0x5e486f[_0x1c1007(0x13a)]+_0x1c1007(0xff))+'\x0a\x20\x20'+(''+_0x388434+(_0x5e486f[_0x1c1007(0x13a)]?'?':'')+':\x20'+_0x19ea65)+'\x0a';});return _0x43fcda=_0x43fcda['replace'](/{{patchTypeColumns}}/g,_0x5cbcd0[_0x3e5692(0x140)]('\x0a')),_0x43fcda;}[a0_0x2508b9(0x159)](_0x7cbabd,_0xcd31a0){const _0x18cf31=a0_0x2508b9;let _0x7448c=serviceEntity,_0x379746=_0xcd31a0['sort'](function(_0x31683e,_0x5d234e){const _0x43ac37=a0_0x2218;return _0x31683e[_0x43ac37(0x102)]-_0x5d234e[_0x43ac37(0x102)];})[_0x18cf31(0x118)](_0xa3b5d0=>this['columnToEntityColumn'](_0xa3b5d0));[_0x18cf31(0x166),'JSON']['includes'](_0x7cbabd[_0x18cf31(0x14b)])&&_0x379746['push'](_0x18cf31(0x164)),_0x7448c=_0x7448c[_0x18cf31(0x16b)](/{{entityColumns}}/g,_0x379746['join']('\x0a'));let _0x2fa603='',_0x48a9fb=_0xcd31a0['filter'](_0x27ecc8=>_0x27ecc8['uniqRank']&&_0x27ecc8['uniqRank']>0x0)[_0x18cf31(0x114)](function(_0x37d753,_0x3c8006){const _0x3b0524=_0x18cf31;return _0x37d753['uniqRank']-_0x3c8006[_0x3b0524(0x135)];});if(_0x48a9fb[_0x18cf31(0x14c)]>0x0){_0x2fa603=_0x18cf31(0xdf);let _0x38d00e=_0x48a9fb[_0x18cf31(0x118)](_0x110bf4=>{const _0x4f0010=_0x18cf31;let _0x2f8f7f=_0x110bf4[_0x4f0010(0x15c)];return'domain_id'==_0x110bf4['name']&&(_0x2f8f7f=_0x4f0010(0x112)),_0x4f0010(0x14a)==_0x110bf4[_0x4f0010(0x15c)]&&(_0x2f8f7f=_0x4f0010(0xe4)),_0x4f0010(0xe5)==_0x110bf4[_0x4f0010(0x15c)]&&(_0x2f8f7f=_0x4f0010(0x11b)),_0x4f0010(0xe1)+camelCase(_0x2f8f7f);});_0x2fa603=_0x2fa603['replace'](/{{indexColumns}}/g,_0x38d00e[_0x18cf31(0x140)](','));}return _0x7448c=_0x7448c[_0x18cf31(0x16b)](/{{indexAnn}}/g,_0x2fa603),_0x7448c;}[a0_0x2508b9(0x108)](_0x2dc269,_0x879a11){const _0x22a828=a0_0x2508b9;let _0x3560bf=_0x22a828(0x15d)==_0x2dc269['dataProp']?serviceEntityHistJson:serviceEntityHistCopy,_0x7c9846=_0x879a11[_0x22a828(0x114)](function(_0x572eb3,_0x56a422){const _0x497ede=_0x22a828;return _0x572eb3[_0x497ede(0x102)]-_0x56a422['rank'];})[_0x22a828(0x118)](_0x4252ae=>this['columnToEntityColumn'](_0x4252ae));return _0x3560bf=_0x3560bf[_0x22a828(0x16b)](/{{entityColumns}}/g,_0x7c9846[_0x22a828(0x140)]('\x0a')),_0x3560bf;}['columnToEntityColumn'](_0x737110){const _0x7ab9d8=a0_0x2508b9;if('id'==_0x737110['name'])return'';if(_0x7ab9d8(0xe2)==_0x737110['name'])return'';if('created_at'==_0x737110[_0x7ab9d8(0x15c)])return'';if(_0x7ab9d8(0x14f)==_0x737110[_0x7ab9d8(0x15c)])return'';if(_0x7ab9d8(0x14a)==_0x737110[_0x7ab9d8(0x15c)])return'';if('updater_id'==_0x737110[_0x7ab9d8(0x15c)])return'';let _0x2294e2=_0x737110['colType'];'double'==_0x737110[_0x7ab9d8(0x149)]&&(_0x2294e2=_0x7ab9d8(0xe7)),'long'==_0x737110['colType']&&(_0x2294e2=_0x7ab9d8(0xdd)),_0x7ab9d8(0x12b)==_0x737110[_0x7ab9d8(0x149)]&&(_0x2294e2='character\x20varying'),'datetime'==_0x737110['colType']&&(_0x2294e2=_0x7ab9d8(0x13d));let _0xf5b851='';_0x7ab9d8(0x12b)==_0x737110[_0x7ab9d8(0x149)]&&(_0xf5b851=_0x737110[_0x7ab9d8(0xfa)]);let _0x22e977=this[_0x7ab9d8(0xee)](_0x737110),_0x2d18df=this[_0x7ab9d8(0x133)](_0x737110),_0x110a22=camelCase(_0x737110[_0x7ab9d8(0x15c)]);return'\x20\x20'+(_0x7ab9d8(0xef)+_0x737110['name']+_0x7ab9d8(0x158)+_0x2294e2+_0x7ab9d8(0xe0)+_0x737110[_0x7ab9d8(0x13a)]+'\x20'+(0x0==_0xf5b851['length']?'':_0x7ab9d8(0x136)+_0xf5b851)+_0x7ab9d8(0xff))+'\x0a\x20\x20'+(_0x7ab9d8(0x122)+(0x0==_0x22e977[_0x7ab9d8(0x14c)]?'':_0x7ab9d8(0xe9)+_0x22e977+',')+_0x7ab9d8(0xec)+_0x737110[_0x7ab9d8(0x13a)]+_0x7ab9d8(0xff))+'\x0a\x20\x20'+(''+_0x110a22+(_0x737110['nullable']?'?':'')+':\x20'+_0x2d18df)+'\x0a';}['getFieldType'](_0x267bb4){const _0x105122=a0_0x2508b9;let _0x5ab269='';return _0x105122(0x101)==_0x267bb4['colType']&&(_0x5ab269=_0x105122(0x10a)),_0x105122(0x109)==_0x267bb4[_0x105122(0x149)]&&(_0x5ab269=_0x105122(0x10a)),_0x105122(0x107)==_0x267bb4[_0x105122(0x149)]&&(_0x5ab269=_0x105122(0x16c)),_0x105122(0x16a)==_0x267bb4['colType']&&(_0x5ab269=_0x105122(0x16c)),_0x5ab269;}[a0_0x2508b9(0x133)](_0x2eec49){const _0x3fd2f6=a0_0x2508b9;let _0x14b24a=_0x2eec49[_0x3fd2f6(0x149)];return'decimal'==_0x2eec49[_0x3fd2f6(0x149)]&&(_0x14b24a=_0x3fd2f6(0xfe)),_0x3fd2f6(0x101)==_0x2eec49[_0x3fd2f6(0x149)]&&(_0x14b24a=_0x3fd2f6(0xfe)),_0x3fd2f6(0x109)==_0x2eec49[_0x3fd2f6(0x149)]&&(_0x14b24a='number'),_0x3fd2f6(0x16a)==_0x2eec49['colType']&&(_0x14b24a=_0x3fd2f6(0xfe)),_0x3fd2f6(0x107)==_0x2eec49[_0x3fd2f6(0x149)]&&(_0x14b24a='number'),_0x3fd2f6(0x137)==_0x2eec49['colType']&&(_0x14b24a=_0x3fd2f6(0xf1)),_0x3fd2f6(0x151)==_0x2eec49[_0x3fd2f6(0x149)]&&(_0x14b24a=_0x3fd2f6(0xf1)),_0x3fd2f6(0x129)==_0x2eec49[_0x3fd2f6(0x149)]&&(_0x14b24a=_0x3fd2f6(0x12b)),_0x14b24a;}async['writeFile'](_0x4bf9d7,_0x3598e6,_0x4f451f){const _0x52a1f9=a0_0x2508b9;await fs[_0x52a1f9(0xf5)](_0x4bf9d7,this['replaceNamesMap'](_0x3598e6,_0x4f451f),_0x52a1f9(0x100));}[a0_0x2508b9(0xf7)](_0x4e1901,_0x1f4c8f){const _0x13ae34=a0_0x2508b9;return _0x4e1901[_0x13ae34(0x16b)](/{{pascalCase name}}/g,_0x1f4c8f['pascalCaseName'])[_0x13ae34(0x16b)](/{{camelCase name}}/g,_0x1f4c8f[_0x13ae34(0x111)])[_0x13ae34(0x16b)](/{{snakeCase name}}/g,_0x1f4c8f['snakeCaseName'])[_0x13ae34(0x16b)](/{{pluralPascalCase name}}/g,_0x1f4c8f[_0x13ae34(0x130)])[_0x13ae34(0x16b)](/{{pluralCamelCase name}}/g,_0x1f4c8f[_0x13ae34(0x160)])[_0x13ae34(0x16b)](/{{tableName}}/g,_0x1f4c8f[_0x13ae34(0x13e)])[_0x13ae34(0x16b)](/{{name}}/g,_0x1f4c8f['name']);}async['createServicePath'](_0x78f0fe,_0x3bed56,_0x36bfc0){const _0x35d8c2=a0_0x2508b9;let _0x3cfd9d=_0x78f0fe+_0x35d8c2(0x15a);await this[_0x35d8c2(0xdb)](_0x3cfd9d),_0x3cfd9d=_0x3cfd9d+'/'+_0x3bed56,await this[_0x35d8c2(0xdb)](_0x3cfd9d),_0x3cfd9d+=_0x35d8c2(0xf4),await this[_0x35d8c2(0xdb)](_0x3cfd9d),_0x3cfd9d+=_0x35d8c2(0x163),await this['createDir'](_0x3cfd9d),_0x3cfd9d=_0x3cfd9d+'/'+_0x36bfc0,await this[_0x35d8c2(0xdb)](_0x3cfd9d);}[a0_0x2508b9(0x11a)](){const _0x260b61=a0_0x2508b9;let _0x1833a5=process['env'][_0x260b61(0x10b)][_0x260b61(0x116)]('/'),_0x57ae24=[];for(let _0x144414=0x0;_0x144414<_0x1833a5[_0x260b61(0x14c)]&&'packages'!=_0x1833a5[_0x144414];_0x144414++)_0x57ae24[_0x260b61(0xfc)](_0x1833a5[_0x144414]);return _0x57ae24[_0x260b61(0x140)]('/');}async['createDir'](_0x5db4a3){const _0x583a45=a0_0x2508b9;0x0==await this[_0x583a45(0xf3)](_0x5db4a3)&&fs[_0x583a45(0x103)](_0x5db4a3);}async[a0_0x2508b9(0xf3)](_0x45bc69){const _0x17c9ba=a0_0x2508b9;return await fs[_0x17c9ba(0xf0)](_0x45bc69);}};function a0_0x2218(_0x31c288,_0x69b8e0){const _0x2ec3f0=a0_0x2ec3();return a0_0x2218=function(_0x221881,_0x11b0f9){_0x221881=_0x221881-0xd6;let _0xc89dda=_0x2ec3f0[_0x221881];return _0xc89dda;},a0_0x2218(_0x31c288,_0x69b8e0);}tslib_1[a0_0x2508b9(0x120)]([(0x0,type_graphql_1[a0_0x2508b9(0x10c)])(_0x2c612d=>Boolean,{'description':a0_0x2508b9(0x165)}),tslib_1[a0_0x2508b9(0x12c)](0x0,(0x0,type_graphql_1[a0_0x2508b9(0x11d)])('id')),tslib_1['__param'](0x1,(0x0,type_graphql_1[a0_0x2508b9(0x15f)])()),tslib_1[a0_0x2508b9(0x141)](a0_0x2508b9(0xd9),Function),tslib_1['__metadata']('design:paramtypes',[String,Object]),tslib_1[a0_0x2508b9(0x141)](a0_0x2508b9(0x127),Promise)],OperatoToolCreateService[a0_0x2508b9(0x13f)],a0_0x2508b9(0x131),null),OperatoToolCreateService=tslib_1[a0_0x2508b9(0x120)]([(0x0,type_graphql_1[a0_0x2508b9(0x144)])()],OperatoToolCreateService),exports[a0_0x2508b9(0xda)]=OperatoToolCreateService;const allIndex='\x0a/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0a\x0a/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0a\x0aexport\x20const\x20entities\x20=\x20[\x20\x20\x0a\x20\x20/*\x20ENTITIES\x20*/\x0a]\x20\x0a\x0a\x0aexport\x20const\x20schema\x20=\x20{\x0a\x20\x20resolverClasses:\x20[\x0a\x20\x20\x20\x20/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x20\x20]\x20\x0a}\x0a\x0aexport\x20const\x20subscribers\x20=\x20[\x0a\x20\x20/*\x20SUBSCRIBERS\x20*/\x0a]\x0a',serviceIndex=a0_0x2508b9(0x161),serviceHistoryIndex='\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryQuery\x20}\x20from\x20\x27./{{name}}-history-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryEntitySubscriber\x20}\x20from\x20\x27./event-subscriber\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}},\x20{{pascalCase\x20name}}History]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}HistoryQuery,\x20{{pascalCase\x20name}}Mutation]\x0aexport\x20const\x20subscribers\x20=\x20[{{pascalCase\x20name}}HistoryEntitySubscriber]\x0a\x0a',serviceQuery=a0_0x2508b9(0x152),serviceHistoryQuery='\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryList\x20}\x20from\x20\x27./{{name}}-history-type\x27\x0a\x0a@Resolver({{pascalCase\x20name}}History)\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryQuery\x20{\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}History,\x20{\x20description:\x20\x27To\x20fetch\x20a\x20{{pascalCase\x20name}}History\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}History(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}History>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20return\x20await\x20getRepository({{pascalCase\x20name}}History).findOne({\x0a\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20}\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}HistoryList,\x20{\x20description:\x20\x27To\x20fetch\x20multiple\x20{{pluralPascalCase\x20name}}History\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}Histories(@Args()\x20params:\x20ListParam,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}HistoryList>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20queryBuilder\x20=\x20getQueryBuilderFromListParams({\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20params,\x0a\x20\x20\x20\x20\x20\x20repository:\x20await\x20getRepository({{pascalCase\x20name}}History)\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20const\x20[items,\x20total]\x20=\x20await\x20queryBuilder.getManyAndCount()\x0a\x0a\x20\x20\x20\x20return\x20{\x20items,\x20total\x20}\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20Domain)\x0a\x20\x20async\x20domain(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<Domain>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(Domain).findOneBy({id:{{camelCase\x20name}}History.domainId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20updater(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}History.updaterId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20creator(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}History.creatorId})\x0a\x20\x20}\x0a}\x0a',serviceMutation=a0_0x2508b9(0x117),sereviceType=a0_0x2508b9(0xeb),sereviceHistoryType=a0_0x2508b9(0x134),serviceEntity=a0_0x2508b9(0x150),serviceEntityHistCopy=a0_0x2508b9(0x105),serviceEntityHistJson=a0_0x2508b9(0x11c),serviceEntitySubscriber='\x0aimport\x20{\x20EventSubscriber\x20}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20HistoryEntitySubscriber\x20}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20getRepository\x20}\x20from\x20\x27@things-factory/shell\x27\x0a\x0a@EventSubscriber()\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryEntitySubscriber\x20extends\x20HistoryEntitySubscriber<{{pascalCase\x20name}},{{pascalCase\x20name}}History>\x20{\x0a\x20\x20public\x20get\x20entity()\x20{\x0a\x20\x20\x20\x20return\x20{{pascalCase\x20name}}\x0a\x20\x20}\x0a\x0a\x20\x20public\x20get\x20historyEntity()\x20{\x0a\x20\x20\x20\x20return\x20{{pascalCase\x20name}}History\x0a\x20\x20}\x0a\x0a\x20\x20{{entityToJson}}\x0a\x0a\x20\x20async\x20beforeRemoveHistory(history:{{pascalCase\x20name}}History,entity:{{pascalCase\x20name}}){\x0a\x20\x20\x20\x20let\x20repo\x20=\x20getRepository({{pascalCase\x20name}}History);\x0a\x20\x20\x20\x20const\x20revNo\x20=\x20await\x20repo.createQueryBuilder()\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.select(\x27max(data_revision_no)\x27,\x20\x27rev_no\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.where(\x27domain_id\x20=\x20:domainId\x27,\x20{\x20domainId:\x20entity.domain.id\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.andWhere(\x27original_id\x20=\x20:originalId\x27,\x20{\x20originalId:\x20entity.id\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.getRawOne()\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20history.dataRevisionNo\x20=\x20revNo\x20?\x20revNo.rev_no\x20+\x201\x20:\x201;\x0a\x20\x20\x20\x20return\x20history;\x0a\x20\x20}\x0a}\x0a';
@@ -1 +1 @@
1
- 'use strict';const a0_0x6d9283=a0_0x2e98;(function(_0x6dd867,_0x303309){const _0x5ee7f3=a0_0x2e98,_0x5152e1=_0x6dd867();while(!![]){try{const _0x3d4591=parseInt(_0x5ee7f3(0xac))/0x1+parseInt(_0x5ee7f3(0xae))/0x2*(-parseInt(_0x5ee7f3(0x91))/0x3)+-parseInt(_0x5ee7f3(0xa6))/0x4*(-parseInt(_0x5ee7f3(0x8f))/0x5)+parseInt(_0x5ee7f3(0xb4))/0x6*(-parseInt(_0x5ee7f3(0x95))/0x7)+parseInt(_0x5ee7f3(0xa8))/0x8+-parseInt(_0x5ee7f3(0xb8))/0x9*(-parseInt(_0x5ee7f3(0xb7))/0xa)+parseInt(_0x5ee7f3(0x9b))/0xb*(-parseInt(_0x5ee7f3(0xb1))/0xc);if(_0x3d4591===_0x303309)break;else _0x5152e1['push'](_0x5152e1['shift']());}catch(_0xe6147b){_0x5152e1['push'](_0x5152e1['shift']());}}}(a0_0x1252,0xbd8b4));Object[a0_0x6d9283(0x9c)](exports,a0_0x6d9283(0x93),{'value':!0x0}),exports[a0_0x6d9283(0x98)]=exports['checkStudioPermission']=void 0x0;const operato_license_checker_1=require(a0_0x6d9283(0xa0)),shell_1=require(a0_0x6d9283(0x9d)),menu_base_1=require(a0_0x6d9283(0xad)),license_error_1=require(a0_0x6d9283(0xa1));async function checkStudioPermission(){const _0x3622ba=a0_0x6d9283;let _0x265100=((0x0,operato_license_checker_1[_0x3622ba(0x99)])(_0x3622ba(0xa4))||',')[_0x3622ba(0xa9)](',')[_0x3622ba(0x94)](_0x609081=>_0x609081['trim']()),_0x3d81b5=!0x1;return _0x265100[_0x3622ba(0xb9)](_0x412f71=>{const _0x3d7935=_0x3622ba;_0x412f71[_0x3d7935(0x9e)](_0x3d7935(0xa5))&&(_0x3d81b5=!0x0);}),_0x3d81b5;}async function checkStudioTemplateIsOverLimit(_0x2aa291,_0x50120f){const _0x55a36=a0_0x6d9283;if(0x0==await checkStudioPermission())throw new license_error_1['LicenseError']({'errorCode':_0x50120f['t'](license_error_1['LicenseError'][_0x55a36(0xb6)][_0x55a36(0xb2)])});var _0x469cde=0x0;if(_0x469cde=_0x2aa291&&''!=_0x2aa291?await(0x0,shell_1[_0x55a36(0x9f)])(menu_base_1[_0x55a36(0xb5)])[_0x55a36(0xa7)][_0x55a36(0x92)]()[_0x55a36(0x97)](_0x55a36(0xa3))['from'](menu_base_1[_0x55a36(0xb5)],_0x55a36(0xa3))[_0x55a36(0xa2)](_0x55a36(0xab),{'id':_0x2aa291})[_0x55a36(0xaf)](_0x55a36(0x90))[_0x55a36(0xaa)]()+0x1:await(0x0,shell_1[_0x55a36(0x9f)])(menu_base_1[_0x55a36(0xb5)])[_0x55a36(0xa7)][_0x55a36(0x92)]()[_0x55a36(0x97)](_0x55a36(0xa3))[_0x55a36(0xb3)](menu_base_1[_0x55a36(0xb5)],_0x55a36(0xa3))[_0x55a36(0xa2)](_0x55a36(0x90))[_0x55a36(0xaa)]()+0x1,!(0x0,operato_license_checker_1[_0x55a36(0xb0)])(_0x469cde))throw new license_error_1[(_0x55a36(0x9a))]({'errorCode':_0x50120f['t'](license_error_1[_0x55a36(0x9a)][_0x55a36(0xb6)][_0x55a36(0x96)])});return!0x0;}exports['checkStudioPermission']=checkStudioPermission,exports[a0_0x6d9283(0x98)]=checkStudioTemplateIsOverLimit;function a0_0x2e98(_0x217759,_0x24b8de){const _0x12525b=a0_0x1252();return a0_0x2e98=function(_0x2e98ec,_0x222914){_0x2e98ec=_0x2e98ec-0x8f;let _0x536f14=_0x12525b[_0x2e98ec];return _0x536f14;},a0_0x2e98(_0x217759,_0x24b8de);}function a0_0x1252(){const _0x3b0213=['1289479SIZoYK','@things-factory/menu-base','2nehEzg','andWhere','checkTarget','547044EwhzVc','INVALID_LICENSE','from','4074YcctWE','Menu','ERROR_CODES','10jCrvlF','12018591atCoFD','forEach','15qZzJaX','(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)','926799nQqbtt','createQueryBuilder','__esModule','map','15967CLnzVR','OVER_LIMIT','select','checkStudioTemplateIsOverLimit','getPermission','LicenseError','275sZrNnr','defineProperty','@things-factory/shell','includes','getRepository','@things-factory/operato-license-checker','../../errors/license-error','where','menu','Permissions\x20For\x20Tailor\x20Tool','Studio','1314812jumfeS','manager','1302336xKyoQJ','split','getCount','id\x20!=\x20:id'];a0_0x1252=function(){return _0x3b0213;};return a0_0x1252();}
1
+ 'use strict';function a0_0x3e71(_0x9dfed9,_0x24fd95){const _0x1802ee=a0_0x1802();return a0_0x3e71=function(_0x3e71d4,_0xa67729){_0x3e71d4=_0x3e71d4-0x103;let _0x4d71e9=_0x1802ee[_0x3e71d4];return _0x4d71e9;},a0_0x3e71(_0x9dfed9,_0x24fd95);}const a0_0x5d76ed=a0_0x3e71;(function(_0x2dcbd6,_0x2f7e6d){const _0x2549ed=a0_0x3e71,_0x4cc5d3=_0x2dcbd6();while(!![]){try{const _0x2899a1=parseInt(_0x2549ed(0x116))/0x1*(parseInt(_0x2549ed(0x11a))/0x2)+-parseInt(_0x2549ed(0x106))/0x3+-parseInt(_0x2549ed(0x10e))/0x4+parseInt(_0x2549ed(0x120))/0x5+parseInt(_0x2549ed(0x110))/0x6+-parseInt(_0x2549ed(0x112))/0x7+-parseInt(_0x2549ed(0x11c))/0x8*(-parseInt(_0x2549ed(0x118))/0x9);if(_0x2899a1===_0x2f7e6d)break;else _0x4cc5d3['push'](_0x4cc5d3['shift']());}catch(_0x301ef4){_0x4cc5d3['push'](_0x4cc5d3['shift']());}}}(a0_0x1802,0xd4d85));Object[a0_0x5d76ed(0x104)](exports,a0_0x5d76ed(0x124),{'value':!0x0}),exports['checkStudioTemplateIsOverLimit']=exports[a0_0x5d76ed(0x10a)]=void 0x0;const operato_license_checker_1=require(a0_0x5d76ed(0x10b)),shell_1=require(a0_0x5d76ed(0x105)),menu_base_1=require(a0_0x5d76ed(0x107)),license_error_1=require(a0_0x5d76ed(0x119));async function checkStudioPermission(){const _0x1ac62d=a0_0x5d76ed;let _0x418cab=((0x0,operato_license_checker_1['getPermission'])('Permissions\x20For\x20Tailor\x20Tool')||',')['split'](',')['map'](_0x5da060=>_0x5da060[_0x1ac62d(0x103)]()),_0x45b812=!0x1;return _0x418cab['forEach'](_0x455ef2=>{const _0x3f2a3c=_0x1ac62d;_0x455ef2[_0x3f2a3c(0x113)](_0x3f2a3c(0x114))&&(_0x45b812=!0x0);}),_0x45b812;}async function checkStudioTemplateIsOverLimit(_0x1c9cbc,_0x5b18e6){const _0x44638e=a0_0x5d76ed;if(0x0==await checkStudioPermission())throw new license_error_1[(_0x44638e(0x115))]({'errorCode':_0x5b18e6['t'](license_error_1[_0x44638e(0x115)][_0x44638e(0x10c)][_0x44638e(0x121)])});var _0x30e185=0x0;if(_0x30e185=_0x1c9cbc&&''!=_0x1c9cbc?await(0x0,shell_1[_0x44638e(0x11b)])(menu_base_1[_0x44638e(0x125)])['manager'][_0x44638e(0x122)]()[_0x44638e(0x11f)](_0x44638e(0x109))[_0x44638e(0x123)](menu_base_1[_0x44638e(0x125)],_0x44638e(0x109))[_0x44638e(0x11e)](_0x44638e(0x111),{'id':_0x1c9cbc})[_0x44638e(0x10f)]('(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)')[_0x44638e(0x11d)]()+0x1:await(0x0,shell_1[_0x44638e(0x11b)])(menu_base_1['Menu'])['manager']['createQueryBuilder']()[_0x44638e(0x11f)](_0x44638e(0x109))['from'](menu_base_1[_0x44638e(0x125)],_0x44638e(0x109))[_0x44638e(0x11e)]('(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)')['getCount']()+0x1,!(0x0,operato_license_checker_1[_0x44638e(0x108)])(_0x30e185))throw new license_error_1[(_0x44638e(0x115))]({'errorCode':_0x5b18e6['t'](license_error_1[_0x44638e(0x115)][_0x44638e(0x10c)][_0x44638e(0x10d)])});return!0x0;}exports[a0_0x5d76ed(0x10a)]=checkStudioPermission,exports[a0_0x5d76ed(0x117)]=checkStudioTemplateIsOverLimit;function a0_0x1802(){const _0x5a6666=['ERROR_CODES','OVER_LIMIT','1376920DFnWZF','andWhere','2749344HxMfgw','id\x20!=\x20:id','4067315onYNgw','includes','Studio','LicenseError','1YyFXtY','checkStudioTemplateIsOverLimit','1696797vJCmGB','../../errors/license-error','1620148IKIjny','getRepository','24EjfyGg','getCount','where','select','7496570NEIbmm','INVALID_LICENSE','createQueryBuilder','from','__esModule','Menu','trim','defineProperty','@things-factory/shell','4608369qgtpNK','@things-factory/menu-base','checkTarget','menu','checkStudioPermission','@things-factory/operato-license-checker'];a0_0x1802=function(){return _0x5a6666;};return a0_0x1802();}
@@ -1 +1 @@
1
- 'use strict';const a0_0x46d92a=a0_0x5b8f;function a0_0x5e04(){const _0x4c67ea=['10ZxXHVQ','studioPermission','2821232iWYvyp','9mBylJV','3628HeExnr','__param','__metadata','662612jxlGag','prototype','714756iLSxjN','studioTemplateIsOverLimit','design:paramtypes','2285780VFfWOZ','./tool-permission','checkStudioPermission','__esModule','Arg','design:returntype','design:type','456fymWet','380578NHkpXD','OperatoToolResolver','Ctx','__decorate','Operato\x20Tool\x20Studio\x20Usage\x20Permissions','30puWQWJ','193223NbkeVF','tslib','defineProperty'];a0_0x5e04=function(){return _0x4c67ea;};return a0_0x5e04();}(function(_0x462947,_0x275cdb){const _0x449a44=a0_0x5b8f,_0x5aa02d=_0x462947();while(!![]){try{const _0x1810ba=parseInt(_0x449a44(0xf5))/0x1+parseInt(_0x449a44(0xdf))/0x2*(parseInt(_0x449a44(0xee))/0x3)+-parseInt(_0x449a44(0xe2))/0x4*(parseInt(_0x449a44(0xdb))/0x5)+parseInt(_0x449a44(0xe4))/0x6+-parseInt(_0x449a44(0xe7))/0x7+-parseInt(_0x449a44(0xdd))/0x8*(-parseInt(_0x449a44(0xde))/0x9)+parseInt(_0x449a44(0xf4))/0xa*(-parseInt(_0x449a44(0xef))/0xb);if(_0x1810ba===_0x275cdb)break;else _0x5aa02d['push'](_0x5aa02d['shift']());}catch(_0x191470){_0x5aa02d['push'](_0x5aa02d['shift']());}}}(a0_0x5e04,0x2bb93));function a0_0x5b8f(_0x174ea4,_0x58c85d){const _0x5e0465=a0_0x5e04();return a0_0x5b8f=function(_0x5b8f33,_0x495716){_0x5b8f33=_0x5b8f33-0xdb;let _0xbec99e=_0x5e0465[_0x5b8f33];return _0xbec99e;},a0_0x5b8f(_0x174ea4,_0x58c85d);}Object[a0_0x46d92a(0xf7)](exports,a0_0x46d92a(0xea),{'value':!0x0}),exports[a0_0x46d92a(0xf0)]=void 0x0;const tslib_1=require(a0_0x46d92a(0xf6)),type_graphql_1=require('type-graphql'),tool_permission_1=require(a0_0x46d92a(0xe8));let OperatoToolResolver=class{async[a0_0x46d92a(0xdc)](_0x3befc2){const _0x10e4b4=a0_0x46d92a;return(0x0,tool_permission_1[_0x10e4b4(0xe9)])();}async[a0_0x46d92a(0xe5)](_0xed36c,_0x596a0a){return(0x0,tool_permission_1['checkStudioTemplateIsOverLimit'])(_0xed36c,_0x596a0a);}};tslib_1['__decorate']([(0x0,type_graphql_1['Query'])(_0x1231cf=>Boolean,{'description':a0_0x46d92a(0xf3)}),tslib_1[a0_0x46d92a(0xe0)](0x0,(0x0,type_graphql_1['Ctx'])()),tslib_1[a0_0x46d92a(0xe1)](a0_0x46d92a(0xed),Function),tslib_1[a0_0x46d92a(0xe1)]('design:paramtypes',[Object]),tslib_1[a0_0x46d92a(0xe1)](a0_0x46d92a(0xec),Promise)],OperatoToolResolver[a0_0x46d92a(0xe3)],a0_0x46d92a(0xdc),null),tslib_1[a0_0x46d92a(0xf2)]([(0x0,type_graphql_1['Query'])(_0x4756df=>Boolean,{'description':'Operato\x20Tool\x20Studio\x20Limit\x20check'}),tslib_1[a0_0x46d92a(0xe0)](0x0,(0x0,type_graphql_1[a0_0x46d92a(0xeb)])('id')),tslib_1['__param'](0x1,(0x0,type_graphql_1[a0_0x46d92a(0xf1)])()),tslib_1[a0_0x46d92a(0xe1)](a0_0x46d92a(0xed),Function),tslib_1[a0_0x46d92a(0xe1)](a0_0x46d92a(0xe6),[String,Object]),tslib_1[a0_0x46d92a(0xe1)](a0_0x46d92a(0xec),Promise)],OperatoToolResolver[a0_0x46d92a(0xe3)],a0_0x46d92a(0xe5),null),OperatoToolResolver=tslib_1['__decorate']([(0x0,type_graphql_1['Resolver'])()],OperatoToolResolver),exports[a0_0x46d92a(0xf0)]=OperatoToolResolver;
1
+ 'use strict';function a0_0x4c62(){const _0x23edf0=['Ctx','20706036ETRUMG','105SzGbVB','__param','design:type','404LQRETe','Resolver','695932LQxDRB','checkStudioTemplateIsOverLimit','Operato\x20Tool\x20Studio\x20Limit\x20check','OperatoToolResolver','prototype','Arg','8830WgIvgQ','9684mrCtVo','studioTemplateIsOverLimit','Operato\x20Tool\x20Studio\x20Usage\x20Permissions','Query','type-graphql','design:returntype','defineProperty','2841711xMIWaT','457376oYDyQw','857195EuXNBQ','6UPFqeA','11xxaVzI','./tool-permission','__esModule','__decorate','design:paramtypes','213SsOxYi','studioPermission','__metadata'];a0_0x4c62=function(){return _0x23edf0;};return a0_0x4c62();}const a0_0xfe8f50=a0_0x2f5f;function a0_0x2f5f(_0x55317d,_0x49642d){const _0x4c62a9=a0_0x4c62();return a0_0x2f5f=function(_0x2f5fe7,_0x315851){_0x2f5fe7=_0x2f5fe7-0xaf;let _0x2185fb=_0x4c62a9[_0x2f5fe7];return _0x2185fb;},a0_0x2f5f(_0x55317d,_0x49642d);}(function(_0x38b38f,_0xcb6766){const _0x791e97=a0_0x2f5f,_0x5a6e21=_0x38b38f();while(!![]){try{const _0x4614fc=-parseInt(_0x791e97(0xaf))/0x1*(parseInt(_0x791e97(0xb7))/0x2)+parseInt(_0x791e97(0xc7))/0x3+-parseInt(_0x791e97(0xb9))/0x4+parseInt(_0x791e97(0xc9))/0x5*(-parseInt(_0x791e97(0xca))/0x6)+-parseInt(_0x791e97(0xb4))/0x7*(parseInt(_0x791e97(0xc8))/0x8)+-parseInt(_0x791e97(0xc0))/0x9*(parseInt(_0x791e97(0xbf))/0xa)+parseInt(_0x791e97(0xcb))/0xb*(parseInt(_0x791e97(0xb3))/0xc);if(_0x4614fc===_0xcb6766)break;else _0x5a6e21['push'](_0x5a6e21['shift']());}catch(_0x3875ba){_0x5a6e21['push'](_0x5a6e21['shift']());}}}(a0_0x4c62,0x745bc));Object[a0_0xfe8f50(0xc6)](exports,a0_0xfe8f50(0xcd),{'value':!0x0}),exports['OperatoToolResolver']=void 0x0;const tslib_1=require('tslib'),type_graphql_1=require(a0_0xfe8f50(0xc4)),tool_permission_1=require(a0_0xfe8f50(0xcc));let OperatoToolResolver=class{async[a0_0xfe8f50(0xb0)](_0xe58b75){return(0x0,tool_permission_1['checkStudioPermission'])();}async['studioTemplateIsOverLimit'](_0x51f6d4,_0x343cc9){const _0x1d24fc=a0_0xfe8f50;return(0x0,tool_permission_1[_0x1d24fc(0xba)])(_0x51f6d4,_0x343cc9);}};tslib_1[a0_0xfe8f50(0xce)]([(0x0,type_graphql_1[a0_0xfe8f50(0xc3)])(_0x24096f=>Boolean,{'description':a0_0xfe8f50(0xc2)}),tslib_1[a0_0xfe8f50(0xb5)](0x0,(0x0,type_graphql_1[a0_0xfe8f50(0xb2)])()),tslib_1[a0_0xfe8f50(0xb1)](a0_0xfe8f50(0xb6),Function),tslib_1[a0_0xfe8f50(0xb1)]('design:paramtypes',[Object]),tslib_1[a0_0xfe8f50(0xb1)](a0_0xfe8f50(0xc5),Promise)],OperatoToolResolver[a0_0xfe8f50(0xbd)],'studioPermission',null),tslib_1['__decorate']([(0x0,type_graphql_1[a0_0xfe8f50(0xc3)])(_0x590029=>Boolean,{'description':a0_0xfe8f50(0xbb)}),tslib_1[a0_0xfe8f50(0xb5)](0x0,(0x0,type_graphql_1[a0_0xfe8f50(0xbe)])('id')),tslib_1[a0_0xfe8f50(0xb5)](0x1,(0x0,type_graphql_1[a0_0xfe8f50(0xb2)])()),tslib_1[a0_0xfe8f50(0xb1)](a0_0xfe8f50(0xb6),Function),tslib_1[a0_0xfe8f50(0xb1)](a0_0xfe8f50(0xcf),[String,Object]),tslib_1[a0_0xfe8f50(0xb1)](a0_0xfe8f50(0xc5),Promise)],OperatoToolResolver[a0_0xfe8f50(0xbd)],a0_0xfe8f50(0xc1),null),OperatoToolResolver=tslib_1[a0_0xfe8f50(0xce)]([(0x0,type_graphql_1[a0_0xfe8f50(0xb8)])()],OperatoToolResolver),exports[a0_0xfe8f50(0xbc)]=OperatoToolResolver;