@things-factory/operato-tools 6.0.63 → 6.0.64
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.
- package/client/actions/main.js +1 -1
- package/client/pages/generator/button-config-tab-mixin.js +4 -4
- package/client/pages/generator/column-config-tab-mixin.js +4 -4
- package/client/pages/generator/etc-config-tab-mixin.js +4 -4
- package/client/pages/generator/form-config-tab-mixin.js +4 -4
- package/client/pages/generator/graphql-config-tab-mixin.js +24 -24
- package/client/pages/generator/grid-config-tab-mixin.js +22 -22
- package/client/pages/generator/menu-config-tab-mixin.js +11 -11
- package/client/pages/generator/meta-generator-page.js +11 -11
- package/client/pages/generator/search-config-tab-mixin.js +4 -4
- package/client/pages/generator/tab-config-tab-mixin.js +3 -3
- package/client/pages/main.js +4 -4
- package/client/reducers/main.js +1 -1
- package/package.json +3 -3
- package/server/constants/error-code.js +1 -1
- package/server/errors/license-error.js +1 -1
- package/server/routes.js +1 -1
- package/server/service/tool-entity/create-menu.js +1 -1
- package/server/service/tool-entity/create-service.js +1 -1
- package/server/service/tool-secret/tool-permission.js +1 -1
- package/server/service/tool-secret/tool-resolver.js +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x5891e2=a0_0x3219;(function(_0xb9199,_0x4af451){const _0x5aa16f=a0_0x3219,_0x3fefce=_0xb9199();while(!![]){try{const _0x9e78ee=-parseInt(_0x5aa16f(0xfc))/0x1+parseInt(_0x5aa16f(0x105))/0x2+parseInt(_0x5aa16f(0xf7))/0x3+parseInt(_0x5aa16f(0x104))/0x4*(parseInt(_0x5aa16f(0x101))/0x5)+parseInt(_0x5aa16f(0xff))/0x6+-parseInt(_0x5aa16f(0x102))/0x7+-parseInt(_0x5aa16f(0x103))/0x8;if(_0x9e78ee===_0x4af451)break;else _0x3fefce['push'](_0x3fefce['shift']());}catch(_0x50c236){_0x3fefce['push'](_0x3fefce['shift']());}}}(a0_0x125b,0x4ed00));Object[a0_0x5891e2(0x100)](exports,a0_0x5891e2(0xf6),{'value':!0x0}),exports['LicenseError']=void 0x0;const tslib_1=require(a0_0x5891e2(0xf3)),ERROR_CODES=tslib_1[a0_0x5891e2(0xf9)](require(a0_0x5891e2(0xfe)));class LicenseError extends Error{static get[a0_0x5891e2(0xfa)](){const _0x500ec9=a0_0x5891e2;return Object[_0x500ec9(0xf8)]({},ERROR_CODES);}constructor({errorCode:_0x48d3ae,detail:_0x4924f9}){const _0x3dfbce=a0_0x5891e2;super(_0x48d3ae),this[_0x3dfbce(0xfd)]=_0x3dfbce(0xfb),this[_0x3dfbce(0xf4)]=_0x48d3ae,this[_0x3dfbce(0xf5)]=_0x4924f9;}}exports['LicenseError']=LicenseError;function a0_0x3219(_0x62dedb,_0x3e8ec8){const _0x125be1=a0_0x125b();return a0_0x3219=function(_0x3219f4,_0x48370d){_0x3219f4=_0x3219f4-0xf3;let _0x2e8331=_0x125be1[_0x3219f4];return _0x2e8331;},a0_0x3219(_0x62dedb,_0x3e8ec8);}function a0_0x125b(){const _0x234375=['767815ATnYke','1384061BFWhfw','4727408vsODAQ','8jeTmLR','889202QjCKBx','tslib','errorCode','detail','__esModule','1058181XdIvdS','assign','__importStar','ERROR_CODES','license-error','371688rWegtj','name','../constants/error-code','2272194TBzeIy','defineProperty'];a0_0x125b=function(){return _0x234375;};return a0_0x125b();}
|
package/server/routes.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a0_0x2c7632=a0_0x3620;function a0_0xda1c(){const _0x42cd2f=['956680ohvLhQ','things-factory:operato-tools:routes','bootstrap-module-global-private-route','bootstrap-module-domain-private-route','bootstrap-module-domain-public-route','524532kjDsxT','60GpKJJn','3305421jLLYEI','609609OhHAPm','3155312uATDAR','2YzEnZI','2311077vjLCMI','debug','63LhBNez','24305660rhAyKb'];a0_0xda1c=function(){return _0x42cd2f;};return a0_0xda1c();}function a0_0x3620(_0x279870,_0x556750){const _0xda1cc1=a0_0xda1c();return a0_0x3620=function(_0x3620a6,_0x192f91){_0x3620a6=_0x3620a6-0x193;let _0x5e4885=_0xda1cc1[_0x3620a6];return _0x5e4885;},a0_0x3620(_0x279870,_0x556750);}(function(_0x104c33,_0x584df6){const _0x4b0256=a0_0x3620,_0x47f587=_0x104c33();while(!![]){try{const _0x4dd3cf=parseInt(_0x4b0256(0x196))/0x1+-parseInt(_0x4b0256(0x198))/0x2*(parseInt(_0x4b0256(0x199))/0x3)+parseInt(_0x4b0256(0x197))/0x4+parseInt(_0x4b0256(0x194))/0x5*(-parseInt(_0x4b0256(0x193))/0x6)+-parseInt(_0x4b0256(0x195))/0x7+parseInt(_0x4b0256(0x19d))/0x8*(-parseInt(_0x4b0256(0x19b))/0x9)+parseInt(_0x4b0256(0x19c))/0xa;if(_0x4dd3cf===_0x584df6)break;else _0x47f587['push'](_0x47f587['shift']());}catch(_0x250a06){_0x47f587['push'](_0x47f587['shift']());}}}(a0_0xda1c,0xaaf7a));const debug=require(a0_0x2c7632(0x19a))(a0_0x2c7632(0x19e));process['on']('bootstrap-module-global-public-route',(_0xa53218,_0x157250)=>{}),process['on'](a0_0x2c7632(0x19f),(_0xc13512,_0xd1ee57)=>{}),process['on'](a0_0x2c7632(0x1a1),(_0x194401,_0x179c8e)=>{}),process['on'](a0_0x2c7632(0x1a0),(_0x4ec43d,_0x4ba6c8)=>{});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x3fa1c5=a0_0x2d40;(function(_0x2bf94d,_0x5073d0){const _0x2b0155=a0_0x2d40,_0x2acbbf=_0x2bf94d();while(!![]){try{const _0x1f6964=parseInt(_0x2b0155(0x111))/0x1*(parseInt(_0x2b0155(0x14a))/0x2)+parseInt(_0x2b0155(0x141))/0x3*(parseInt(_0x2b0155(0x105))/0x4)+-parseInt(_0x2b0155(0x109))/0x5*(parseInt(_0x2b0155(0x10b))/0x6)+-parseInt(_0x2b0155(0x16b))/0x7+-parseInt(_0x2b0155(0x11e))/0x8+parseInt(_0x2b0155(0x162))/0x9+parseInt(_0x2b0155(0x127))/0xa;if(_0x1f6964===_0x5073d0)break;else _0x2acbbf['push'](_0x2acbbf['shift']());}catch(_0x1217e7){_0x2acbbf['push'](_0x2acbbf['shift']());}}}(a0_0x56ad,0xef588));Object['defineProperty'](exports,'__esModule',{'value':!0x0}),exports['OperatoToolCreateMenu']=void 0x0;function a0_0x2d40(_0x100255,_0x3332e3){const _0x56ad9b=a0_0x56ad();return a0_0x2d40=function(_0x2d407a,_0x27178f){_0x2d407a=_0x2d407a-0x101;let _0x1c466c=_0x56ad9b[_0x2d407a];return _0x1c466c;},a0_0x2d40(_0x100255,_0x3332e3);}const tslib_1=require('tslib'),type_graphql_1=require(a0_0x3fa1c5(0x110)),resource_base_1=require(a0_0x3fa1c5(0x13d)),menu_base_1=require('@things-factory/menu-base'),tool_permission_1=require(a0_0x3fa1c5(0x103)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require('lodash'),{plural:plural}=require(a0_0x3fa1c5(0x131)),crypto_1=tslib_1['__importDefault'](require(a0_0x3fa1c5(0x133)));let OperatoToolCreateMenu=class{async[a0_0x3fa1c5(0x12a)](_0x71576d,_0x36302b,_0x4ac580){const _0x11ffc2=a0_0x3fa1c5,{domain:_0x547067,user:_0x46ab55,tx:_0x2cf3b6}=_0x4ac580[_0x11ffc2(0x10d)];await(0x0,tool_permission_1[_0x11ffc2(0x15d)])('',_0x4ac580);const _0x1dcc9a=await _0x2cf3b6['getRepository'](resource_base_1[_0x11ffc2(0x15b)])['findOne']({'where':{'domain':{'id':_0x547067['id']},'id':_0x71576d}}),_0x35ba4f=await _0x2cf3b6['getRepository'](resource_base_1['EntityColumn'])['find']({'where':{'domain':{'id':_0x547067['id']},'entity':{'id':_0x1dcc9a['id']}}});let {name:_0x3b9b34=''}=_0x1dcc9a||{},_0x2997c2=kebabCase(_0x3b9b34),_0x5a5d72=modelTemplate[_0x11ffc2(0x152)](/{{pascalCase name}}/g,startCase(camelCase(_0x3b9b34))[_0x11ffc2(0x152)](/ /g,''))['replace'](/{{camelCase name}}/g,camelCase(_0x3b9b34))[_0x11ffc2(0x152)](/{{snakeCase name}}/g,snakeCase(_0x3b9b34))[_0x11ffc2(0x152)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x3b9b34)))[_0x11ffc2(0x152)](/ /g,''))[_0x11ffc2(0x152)](/{{pluralCamelCase name}}/g,camelCase(plural(_0x3b9b34)))[_0x11ffc2(0x152)](/{{name}}/g,_0x3b9b34),_0x1b8d26='';_0x11ffc2(0x165)==_0x1dcc9a['dataProp']?_0x1b8d26=_0x11ffc2(0x123):'COPY'==_0x1dcc9a['dataProp']&&(_0x1b8d26='\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22basic\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22label\x22:\x20\x22data_history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22icon\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22logic\x22:\x20\x22history_copy\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20'),_0x5a5d72=_0x5a5d72[_0x11ffc2(0x152)](/{{HistoryButton}}/g,_0x1b8d26);let _0x100a3d=this[_0x11ffc2(0x173)](_0x35ba4f);_0x5a5d72=_0x5a5d72[_0x11ffc2(0x152)](/{{SortColumns}}/g,_0x100a3d[_0x11ffc2(0x154)](','));let _0x252336=this[_0x11ffc2(0x137)](_0x35ba4f);_0x5a5d72=_0x5a5d72['replace'](/{{SearchColumns}}/g,_0x252336[_0x11ffc2(0x154)](','));let _0x18ee18=this[_0x11ffc2(0x108)](_0x35ba4f);return _0x5a5d72=_0x5a5d72[_0x11ffc2(0x152)](/{{GridColumns}}/g,_0x18ee18[_0x11ffc2(0x154)](',')),_0x5a5d72=this[_0x11ffc2(0x14e)](_0x5a5d72),await this[_0x11ffc2(0x157)](_0x2cf3b6,_0x547067,_0x46ab55,_0x36302b,_0x2997c2,_0x5a5d72),!0x0;}[a0_0x3fa1c5(0x108)](_0x3f01b4){const _0x8438bb=a0_0x3fa1c5;return _0x3f01b4[_0x8438bb(0x14c)](_0xeb0cd3=>'id'!=_0xeb0cd3[_0x8438bb(0x10c)]&&_0xeb0cd3[_0x8438bb(0x129)]>0x0)[_0x8438bb(0x143)](function(_0x1a46fe,_0x56ff3f){return _0x1a46fe['gridRank']-_0x56ff3f['gridRank'];})['map'](_0x363e32=>{const _0x6080d4=_0x8438bb;let {gridEditor:_0x1d226e=_0x6080d4(0x155),name:_0x4ee9c9,term:_0x442414,gridWidth:_0x4448ab=0x0,gridAlign:_0x100893='left',nullable:_0x5285e3=!0x1}=_0x363e32;if(null==_0x1d226e&&(_0x1d226e=_0x6080d4(0x155)),null==_0x100893&&(_0x100893=_0x6080d4(0x139)),_0x6080d4(0x161)==_0x4ee9c9||'creator_id'==_0x4ee9c9)return _0x4ee9c9=_0x6080d4(0x161)==_0x4ee9c9?_0x6080d4(0x116):_0x6080d4(0x153),'{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22'+_0x4ee9c9+_0x6080d4(0x10a)+_0x4ee9c9+'\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}';if(_0x6080d4(0x10e)==_0x4ee9c9||_0x6080d4(0x119)==_0x4ee9c9)return _0x6080d4(0x15a)+('updated_at'==_0x4ee9c9?_0x6080d4(0x120):_0x6080d4(0x121))+_0x6080d4(0x10a)+_0x4ee9c9+_0x6080d4(0x16c);let _0x2195e7=_0x6080d4(0x102)!=_0x1d226e&&_0x6080d4(0x13e)!=_0x1d226e,_0x32d87b=_0x6080d4(0x13e)==_0x1d226e;0x1!=_0x32d87b&&0x0!=_0x2195e7||(_0x1d226e=_0x6080d4(0x155));let _0x3d9a1d=_0x6080d4(0x125)+_0x1d226e+_0x6080d4(0x159)+camelCase(_0x4ee9c9)+_0x6080d4(0x10a)+_0x442414+_0x6080d4(0x11d)+_0x32d87b+'\x20,\x22editable\x22:\x20'+_0x2195e7+_0x6080d4(0x11b)+!_0x5285e3+_0x6080d4(0x150)+_0x100893+_0x6080d4(0x169)+_0x4448ab+_0x6080d4(0x172);return _0x6080d4(0x128)==_0x363e32['refType']&&(_0x3d9a1d+=_0x6080d4(0x144)+_0x363e32[_0x6080d4(0x130)]+'\x22}'),'scenario'==_0x363e32[_0x6080d4(0x107)]&&(_0x3d9a1d+=_0x6080d4(0x16a)+_0x363e32[_0x6080d4(0x130)]+'\x22}'),_0x6080d4(0x10f)==_0x363e32[_0x6080d4(0x107)]&&(_0x3d9a1d+=',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22'+camelCase(plural(_0x363e32[_0x6080d4(0x130)]))+_0x6080d4(0x126)),_0x3d9a1d+='}',_0x3d9a1d;});}[a0_0x3fa1c5(0x137)](_0x524649){const _0x271a2f=a0_0x3fa1c5;return _0x524649[_0x271a2f(0x14c)](_0x20ab0b=>_0x20ab0b[_0x271a2f(0x138)]>0x0)[_0x271a2f(0x143)](function(_0x4381a8,_0x49090e){const _0x1c445d=_0x271a2f;return _0x4381a8[_0x1c445d(0x138)]-_0x49090e[_0x1c445d(0x138)];})[_0x271a2f(0x14b)](_0x36c592=>{const _0x1e12f5=_0x271a2f;let _0x3b7037=_0x36c592[_0x1e12f5(0x167)];return _0x1e12f5(0x14c)==_0x3b7037?'\x22'+camelCase(_0x36c592[_0x1e12f5(0x10c)])+'\x22':(_0x3b7037||(_0x3b7037='eq'),_0x1e12f5(0x156)+camelCase(_0x36c592['name'])+_0x1e12f5(0x14f)+_0x3b7037+'\x22}');});}[a0_0x3fa1c5(0x173)](_0x37ab73){const _0x407aeb=a0_0x3fa1c5;return _0x37ab73['filter'](_0x20e64e=>_0x20e64e[_0x407aeb(0x146)]>0x0)[_0x407aeb(0x143)](function(_0x28eaeb,_0x2125f0){const _0x50c842=_0x407aeb;return _0x28eaeb['sortRank']-_0x2125f0[_0x50c842(0x146)];})[_0x407aeb(0x14b)](_0x4aa221=>_0x407aeb(0x117)+camelCase(_0x4aa221[_0x407aeb(0x10c)])+_0x407aeb(0x168)+_0x4aa221[_0x407aeb(0x11f)]+'}');}async['createMenuData'](_0x27b45c,_0xfad92b,_0x431c84,_0x27ba99,_0x2e392f,_0x3c4146){const _0x46c0cb=a0_0x3fa1c5;let _0x404321=await _0x27b45c[_0x46c0cb(0x104)](menu_base_1[_0x46c0cb(0x171)])[_0x46c0cb(0x124)]({'where':{'domain':{'id':_0xfad92b['id']},'id':_0x27ba99}}),_0x3b1b3b=(await _0x27b45c[_0x46c0cb(0x104)](menu_base_1[_0x46c0cb(0x171)])['query']('select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27'+_0x27ba99+_0x46c0cb(0x166)+_0x27ba99+'\x27'))[0x0][_0x46c0cb(0x113)]+0xa,_0x67aee4=new menu_base_1[(_0x46c0cb(0x171))]();_0x67aee4[_0x46c0cb(0x10c)]=_0x2e392f,_0x67aee4[_0x46c0cb(0x118)]=_0x46c0cb(0x101),_0x67aee4['category']=_0x46c0cb(0x14d),_0x67aee4['rank']=_0x3b1b3b,_0x67aee4[_0x46c0cb(0x11a)]=!0x1,_0x67aee4[_0x46c0cb(0x12d)]=_0x2e392f,_0x67aee4['template']=_0x3c4146,_0x67aee4[_0x46c0cb(0x12e)]='@things-factory/meta-ui/client/pages/meta-grist-page',_0x67aee4['parent']=_0x404321,await _0x27b45c[_0x46c0cb(0x104)](menu_base_1[_0x46c0cb(0x171)])['save'](Object[_0x46c0cb(0x12b)](Object['assign']({},_0x67aee4),{'domain':_0xfad92b,'creator':_0x431c84,'updater':_0x431c84}));}[a0_0x3fa1c5(0x14e)](_0x1f3912){const _0x3b4555=a0_0x3fa1c5;let _0x31256a=JSON[_0x3b4555(0x16f)](_0x1f3912)[_0x3b4555(0x12f)](/(.{100})/)[_0x3b4555(0x14c)](_0x1d2f96=>_0x1d2f96),_0x2c51a5=[_0x3b4555(0x115),_0x3b4555(0x158),'aes-256-cfb',_0x3b4555(0x149),_0x3b4555(0x151),_0x3b4555(0x15f),_0x3b4555(0x114),_0x3b4555(0x134)],_0x3dc0f7=crypto_1[_0x3b4555(0x13a)][_0x3b4555(0x122)](0x20)[_0x3b4555(0x163)](_0x3b4555(0x13b)),_0x5693c1=Buffer['from'](_0x3dc0f7,_0x3b4555(0x13b)),_0x53fab3=_0x3dc0f7[_0x3b4555(0x142)](0x0,0x10),_0xc5c744=['',_0x53fab3,_0x53fab3,_0x53fab3,_0x53fab3,_0x53fab3,_0x53fab3,_0x53fab3],_0x335eb0=0x0,_0x4b75b5=[];_0x4b75b5[_0x3b4555(0x112)](_0x3dc0f7);for(var _0x4017b9=0x0;_0x4017b9<_0x31256a['length'];_0x4017b9++,_0x335eb0++){_0x335eb0==_0x2c51a5[_0x3b4555(0x12c)]&&(_0x335eb0=0x0);let _0xce7be0=crypto_1[_0x3b4555(0x13a)]['createCipheriv'](_0x2c51a5[_0x335eb0],_0x5693c1,_0xc5c744[_0x335eb0]),_0x53ad08=_0xce7be0[_0x3b4555(0x16d)](_0x31256a[_0x4017b9],'utf8',_0x3b4555(0x13b));_0x53ad08+=_0xce7be0['final'](_0x3b4555(0x13b)),_0x4b75b5[_0x3b4555(0x112)](_0x53ad08);}return _0x4b75b5[_0x3b4555(0x154)]('h1z0q9i9x7q6');}};tslib_1[a0_0x3fa1c5(0x147)]([(0x0,type_graphql_1[a0_0x3fa1c5(0x132)])(a0_0x3fa1c5(0x160)),(0x0,type_graphql_1[a0_0x3fa1c5(0x11c)])(_0x38be5e=>Boolean,{'description':a0_0x3fa1c5(0x140)}),tslib_1['__param'](0x0,(0x0,type_graphql_1['Arg'])('id')),tslib_1['__param'](0x1,(0x0,type_graphql_1[a0_0x3fa1c5(0x13c)])(a0_0x3fa1c5(0x106))),tslib_1[a0_0x3fa1c5(0x170)](0x2,(0x0,type_graphql_1[a0_0x3fa1c5(0x145)])()),tslib_1[a0_0x3fa1c5(0x15c)](a0_0x3fa1c5(0x164),Function),tslib_1[a0_0x3fa1c5(0x15c)](a0_0x3fa1c5(0x135),[String,String,Object]),tslib_1[a0_0x3fa1c5(0x15c)](a0_0x3fa1c5(0x136),Promise)],OperatoToolCreateMenu[a0_0x3fa1c5(0x16e)],'toolCreateMenu',null),OperatoToolCreateMenu=tslib_1[a0_0x3fa1c5(0x147)]([(0x0,type_graphql_1[a0_0x3fa1c5(0x148)])()],OperatoToolCreateMenu),exports[a0_0x3fa1c5(0x15e)]=OperatoToolCreateMenu;function a0_0x56ad(){const _0x3d1391=['aes-256-ofb','@transaction','updater_id','10601235jdCCQJ','toString','design:type','JSON','\x27\x20or\x20id\x20=\x20\x27','searchOper','\x22,\x22desc\x22:','\x22,\x22width\x22:',',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22','1859662VuJjDm','\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}','update','prototype','stringify','__param','Menu','\x20,\x22exportable\x22:\x20true','createSortCols','SCREEN','readonly','./../tool-secret/tool-permission','getRepository','13924nyaGEh','parent_menu_id','refType','createGridColumns','30SqxSJZ','\x22,\x22header\x22:\x20\x22','1182444RNcxgQ','name','state','updated_at','entity','type-graphql','2SEFaTa','push','rank','aes-256-ctr','aes-256-ecb','updater','{\x22name\x22:\x22','menuType','created_at','hiddenFlag',',\x22mandatory\x22:\x20','Mutation','\x22,\x22hidden\x22:','7974320riEUvf','reverseSort','updatedAt','createdAt','randomBytes','\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22basic\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22label\x22:\x20\x22data_history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22icon\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22logic\x22:\x20\x22history_json\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20','findOne','{\x22type\x22:\x20\x22','\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}','3406320hNYtMh','code','gridRank','toolCreateMenu','assign','length','routing','resourceUrl','split','refName','pluralize','Directive','crypto','aes256','design:paramtypes','design:returntype','createSearchCols','searchRank','left','default','hex','Arg','@things-factory/resource-base','hidden','\x0a{\x0a\x20\x20\x22menu\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x22title\x22:\x20\x22{{name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22\x22,\x0a\x20\x20\x20\x20\x20\x20\x22desc\x22:\x20\x22\x22\x0a\x20\x20},\x0a\x20\x20\x22gql\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x22query\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22list_func\x22:\x20\x22{{pluralCamelCase\x20name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22find_one_func\x22:\x22{{camelCase\x20name}}\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x22mutation\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22multiple\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22func\x22:\x22updateMultiple{{pascalCase\x20name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22{{pascalCase\x20name}}Patch\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22delete\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22func\x22:\x22delete{{pluralPascalCase\x20name}}\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20},\x0a\x20\x20\x22button\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22export\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22add\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22delete\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22save\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20],\x0a\x20\x20\x22grid_column\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22string\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22id\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22header\x22:\x20\x22id\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22hidden\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22editable\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22mandatory\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22sortable\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22align\x22:\x20\x22left\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22width\x22:\x200,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22exportable\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20},\x0a{{GridColumns}}\x0a\x20\x20],\x0a\x20\x20\x22grid\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22button\x22:[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{{HistoryButton}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22option\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22mobile_mode\x22:\x20\x22LIST\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22desk_mode\x22:\x20\x22GRID\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22use_row_checker\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22pages\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2020,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2050,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20100,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20300\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22view_mode\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22GRID\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22LIST\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22CARD\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22sorters\x22:\x20[\x0a{{SortColumns}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20]\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x22row\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22multiple_select\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22click\x22:\x20\x22select-row-toggle\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20},\x0a\x20\x20\x22search\x22:\x20[\x0a{{SearchColumns}}\x0a\x20\x20]\x0a}\x0a','Operato\x20Tool\x20Create\x20Menu','141mmNvJJ','substring','sort',',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22','Ctx','sortRank','__decorate','Resolver','aes-256-cfb8','1743106avDqNF','map','filter','meta-grist-page','enc','\x22,\x22operator\x22:\x20\x22',',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22','aes-256-cfb1','replace','creator','join','string','{\x22name\x22:\x20\x22','createMenuData','aes-256-cbc','\x22,\x22name\x22:\x20\x22','{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22','Entity','__metadata','checkStudioTemplateIsOverLimit','OperatoToolCreateMenu'];a0_0x56ad=function(){return _0x3d1391;};return a0_0x56ad();}const modelTemplate=a0_0x3fa1c5(0x13f);
|
|
1
|
+
'use strict';function a0_0x41e9(){const _0x3906b5=['lodash','save','\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','{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22','design:returntype','sortRank','Ctx','@things-factory/meta-ui/client/pages/meta-grist-page','\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}','./../tool-secret/tool-permission','hex','\x27\x20or\x20id\x20=\x20\x27','hiddenFlag','toString','\x22,\x22operator\x22:\x20\x22','updatedAt',',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22','\x20,\x22exportable\x22:\x20true','getRepository','refName','code','Arg','assign','checkStudioTemplateIsOverLimit','crypto','60PMVoSZ','findOne','__esModule','OperatoToolCreateMenu','refType','select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27','string','createSortCols','query','length','createGridColumns','filter','state','createMenuData','aes-256-ctr','67438190lEyyAS',',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22','\x22,\x22width\x22:','\x22,\x22hidden\x22:','aes256','stringify','menuType','design:paramtypes','aes-256-ofb','searchRank','__decorate','SCREEN',',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22','EntityColumn','Menu','defineProperty','aes-256-cbc','aes-256-cfb8','substring','574564mGPEEg','{\x22type\x22:\x20\x22','utf8','\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}','\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22basic\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22label\x22:\x20\x22data_history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22icon\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22logic\x22:\x20\x22history_copy\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20','h1z0q9i9x7q6','12155745GSeiTd','718008YLJrkz','scenario','1339548dFmIYb','resourceUrl','parent_menu_id','__param','createdAt','readonly','hidden','map','sort','pluralize','Resolver',',\x22mandatory\x22:\x20','225223bUuOwt','JSON','template','Mutation','\x22,\x22header\x22:\x20\x22','{\x22name\x22:\x22','rank','gridRank','__metadata','name','@things-factory/resource-base','createSearchCols','creator','join','updater_id','{\x22name\x22:\x20\x22','update','prototype','@transaction','creator_id','routing','replace','dataProp','toolCreateMenu','from','updater','push','@things-factory/menu-base','Directive','created_at','final','10ENNNIK','aes-256-cfb1','Entity','\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','updated_at',',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22','\x22,\x22desc\x22:','941340XDMOyB','__importDefault','meta-grist-page','split','{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22','180YZtJwU'];a0_0x41e9=function(){return _0x3906b5;};return a0_0x41e9();}const a0_0x4174e5=a0_0x3a63;function a0_0x3a63(_0x27a628,_0xdd7aea){const _0x41e9ad=a0_0x41e9();return a0_0x3a63=function(_0x3a63ee,_0x4d52b1){_0x3a63ee=_0x3a63ee-0xc8;let _0xbdf0f6=_0x41e9ad[_0x3a63ee];return _0xbdf0f6;},a0_0x3a63(_0x27a628,_0xdd7aea);}(function(_0x2716ed,_0xd2c9c9){const _0x5e61f3=a0_0x3a63,_0x9fac04=_0x2716ed();while(!![]){try{const _0x2569ae=-parseInt(_0x5e61f3(0xca))/0x1*(parseInt(_0x5e61f3(0xe9))/0x2)+parseInt(_0x5e61f3(0x13a))/0x3+-parseInt(_0x5e61f3(0x131))/0x4*(parseInt(_0x5e61f3(0x10f))/0x5)+parseInt(_0x5e61f3(0xf0))/0x6+-parseInt(_0x5e61f3(0x137))/0x7+parseInt(_0x5e61f3(0x138))/0x8*(-parseInt(_0x5e61f3(0xf5))/0x9)+parseInt(_0x5e61f3(0x11e))/0xa;if(_0x2569ae===_0xd2c9c9)break;else _0x9fac04['push'](_0x9fac04['shift']());}catch(_0x1a63c5){_0x9fac04['push'](_0x9fac04['shift']());}}}(a0_0x41e9,0xebce7));Object[a0_0x4174e5(0x12d)](exports,a0_0x4174e5(0x111),{'value':!0x0}),exports[a0_0x4174e5(0x112)]=void 0x0;const tslib_1=require('tslib'),type_graphql_1=require('type-graphql'),resource_base_1=require(a0_0x4174e5(0xd4)),menu_base_1=require(a0_0x4174e5(0xe5)),tool_permission_1=require(a0_0x4174e5(0xff)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x4174e5(0xf6)),{plural:plural}=require(a0_0x4174e5(0x143)),crypto_1=tslib_1[a0_0x4174e5(0xf1)](require(a0_0x4174e5(0x10e)));let OperatoToolCreateMenu=class{async[a0_0x4174e5(0xe1)](_0x407d59,_0xe4585f,_0x478877){const _0xa371ab=a0_0x4174e5,{domain:_0x1cd04c,user:_0xf3975a,tx:_0x537a91}=_0x478877[_0xa371ab(0x11b)];await(0x0,tool_permission_1[_0xa371ab(0x10d)])('',_0x478877);const _0x5903d6=await _0x537a91[_0xa371ab(0x108)](resource_base_1[_0xa371ab(0xeb)])[_0xa371ab(0x110)]({'where':{'domain':{'id':_0x1cd04c['id']},'id':_0x407d59}}),_0x1a6d0e=await _0x537a91[_0xa371ab(0x108)](resource_base_1[_0xa371ab(0x12b)])['find']({'where':{'domain':{'id':_0x1cd04c['id']},'entity':{'id':_0x5903d6['id']}}});let {name:_0x442978=''}=_0x5903d6||{},_0x2e1a2d=kebabCase(_0x442978),_0x2efd26=modelTemplate[_0xa371ab(0xdf)](/{{pascalCase name}}/g,startCase(camelCase(_0x442978))[_0xa371ab(0xdf)](/ /g,''))[_0xa371ab(0xdf)](/{{camelCase name}}/g,camelCase(_0x442978))[_0xa371ab(0xdf)](/{{snakeCase name}}/g,snakeCase(_0x442978))[_0xa371ab(0xdf)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x442978)))[_0xa371ab(0xdf)](/ /g,''))['replace'](/{{pluralCamelCase name}}/g,camelCase(plural(_0x442978)))[_0xa371ab(0xdf)](/{{name}}/g,_0x442978),_0xeebbea='';_0xa371ab(0xcb)==_0x5903d6[_0xa371ab(0xe0)]?_0xeebbea=_0xa371ab(0xec):'COPY'==_0x5903d6['dataProp']&&(_0xeebbea=_0xa371ab(0x135)),_0x2efd26=_0x2efd26[_0xa371ab(0xdf)](/{{HistoryButton}}/g,_0xeebbea);let _0x428365=this['createSortCols'](_0x1a6d0e);_0x2efd26=_0x2efd26[_0xa371ab(0xdf)](/{{SortColumns}}/g,_0x428365[_0xa371ab(0xd7)](','));let _0x52f691=this[_0xa371ab(0xd5)](_0x1a6d0e);_0x2efd26=_0x2efd26[_0xa371ab(0xdf)](/{{SearchColumns}}/g,_0x52f691[_0xa371ab(0xd7)](','));let _0x389018=this[_0xa371ab(0x119)](_0x1a6d0e);return _0x2efd26=_0x2efd26[_0xa371ab(0xdf)](/{{GridColumns}}/g,_0x389018['join'](',')),_0x2efd26=this['enc'](_0x2efd26),await this[_0xa371ab(0x11c)](_0x537a91,_0x1cd04c,_0xf3975a,_0xe4585f,_0x2e1a2d,_0x2efd26),!0x0;}[a0_0x4174e5(0x119)](_0x5c05cd){const _0x154477=a0_0x4174e5;return _0x5c05cd['filter'](_0x14e9cf=>'id'!=_0x14e9cf[_0x154477(0xd3)]&&_0x14e9cf['gridRank']>0x0)['sort'](function(_0x2890ac,_0x23f9ad){const _0x5294e5=_0x154477;return _0x2890ac[_0x5294e5(0xd1)]-_0x23f9ad[_0x5294e5(0xd1)];})['map'](_0x286d54=>{const _0x2aaa2b=_0x154477;let {gridEditor:_0x4ecc74=_0x2aaa2b(0x115),name:_0x4cce6e,term:_0x5628bf,gridWidth:_0x1a8333=0x0,gridAlign:_0x5957e2='left',nullable:_0x357a6b=!0x1}=_0x286d54;if(null==_0x4ecc74&&(_0x4ecc74=_0x2aaa2b(0x115)),null==_0x5957e2&&(_0x5957e2='left'),_0x2aaa2b(0xd8)==_0x4cce6e||_0x2aaa2b(0xdd)==_0x4cce6e)return _0x4cce6e=_0x2aaa2b(0xd8)==_0x4cce6e?_0x2aaa2b(0xe3):_0x2aaa2b(0xd6),_0x2aaa2b(0xf4)+_0x4cce6e+'\x22,\x22header\x22:\x20\x22'+_0x4cce6e+'\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}';if('updated_at'==_0x4cce6e||_0x2aaa2b(0xe7)==_0x4cce6e)return _0x2aaa2b(0xf9)+(_0x2aaa2b(0xed)==_0x4cce6e?_0x2aaa2b(0x105):_0x2aaa2b(0x13e))+'\x22,\x22header\x22:\x20\x22'+_0x4cce6e+_0x2aaa2b(0x134);let _0x50e45c=_0x2aaa2b(0x13f)!=_0x4ecc74&&_0x2aaa2b(0x140)!=_0x4ecc74,_0x42a31b=_0x2aaa2b(0x140)==_0x4ecc74;0x1!=_0x42a31b&&0x0!=_0x50e45c||(_0x4ecc74=_0x2aaa2b(0x115));let _0x2b3f67=_0x2aaa2b(0x132)+_0x4ecc74+'\x22,\x22name\x22:\x20\x22'+camelCase(_0x4cce6e)+_0x2aaa2b(0xce)+_0x5628bf+_0x2aaa2b(0x121)+_0x42a31b+'\x20,\x22editable\x22:\x20'+_0x50e45c+_0x2aaa2b(0xc9)+!_0x357a6b+_0x2aaa2b(0x106)+_0x5957e2+_0x2aaa2b(0x120)+_0x1a8333+_0x2aaa2b(0x107);return _0x2aaa2b(0x10a)==_0x286d54[_0x2aaa2b(0x113)]&&(_0x2b3f67+=_0x2aaa2b(0xee)+_0x286d54[_0x2aaa2b(0x109)]+'\x22}'),_0x2aaa2b(0x139)==_0x286d54[_0x2aaa2b(0x113)]&&(_0x2b3f67+=_0x2aaa2b(0x11f)+_0x286d54[_0x2aaa2b(0x109)]+'\x22}'),'entity'==_0x286d54[_0x2aaa2b(0x113)]&&(_0x2b3f67+=_0x2aaa2b(0x12a)+camelCase(plural(_0x286d54[_0x2aaa2b(0x109)]))+_0x2aaa2b(0xfe)),_0x2b3f67+='}',_0x2b3f67;});}['createSearchCols'](_0x35c2e0){const _0x5c70dd=a0_0x4174e5;return _0x35c2e0[_0x5c70dd(0x11a)](_0x42cdc1=>_0x42cdc1[_0x5c70dd(0x127)]>0x0)['sort'](function(_0x322019,_0x6a5e85){const _0x206c25=_0x5c70dd;return _0x322019[_0x206c25(0x127)]-_0x6a5e85[_0x206c25(0x127)];})[_0x5c70dd(0x141)](_0x54efce=>{const _0x380dad=_0x5c70dd;let _0x4f35b3=_0x54efce['searchOper'];return _0x380dad(0x11a)==_0x4f35b3?'\x22'+camelCase(_0x54efce['name'])+'\x22':(_0x4f35b3||(_0x4f35b3='eq'),_0x380dad(0xd9)+camelCase(_0x54efce[_0x380dad(0xd3)])+_0x380dad(0x104)+_0x4f35b3+'\x22}');});}[a0_0x4174e5(0x116)](_0x5a9fc0){const _0x3bd123=a0_0x4174e5;return _0x5a9fc0[_0x3bd123(0x11a)](_0x26bbed=>_0x26bbed[_0x3bd123(0xfb)]>0x0)[_0x3bd123(0x142)](function(_0x1c3bc9,_0x1edbc6){const _0x21c18f=_0x3bd123;return _0x1c3bc9['sortRank']-_0x1edbc6[_0x21c18f(0xfb)];})[_0x3bd123(0x141)](_0x309e84=>_0x3bd123(0xcf)+camelCase(_0x309e84['name'])+_0x3bd123(0xef)+_0x309e84['reverseSort']+'}');}async[a0_0x4174e5(0x11c)](_0xfa0c9a,_0x5bb7d1,_0x29eabc,_0x4027b4,_0x1605e4,_0x4cb209){const _0x2f4a18=a0_0x4174e5;let _0x2cc0ec=await _0xfa0c9a[_0x2f4a18(0x108)](menu_base_1[_0x2f4a18(0x12c)])[_0x2f4a18(0x110)]({'where':{'domain':{'id':_0x5bb7d1['id']},'id':_0x4027b4}}),_0x429ea5=(await _0xfa0c9a[_0x2f4a18(0x108)](menu_base_1[_0x2f4a18(0x12c)])[_0x2f4a18(0x117)](_0x2f4a18(0x114)+_0x4027b4+_0x2f4a18(0x101)+_0x4027b4+'\x27'))[0x0][_0x2f4a18(0xd0)]+0xa,_0x3f011d=new menu_base_1['Menu']();_0x3f011d[_0x2f4a18(0xd3)]=_0x1605e4,_0x3f011d[_0x2f4a18(0x124)]=_0x2f4a18(0x129),_0x3f011d['category']=_0x2f4a18(0xf2),_0x3f011d[_0x2f4a18(0xd0)]=_0x429ea5,_0x3f011d[_0x2f4a18(0x102)]=!0x1,_0x3f011d[_0x2f4a18(0xde)]=_0x1605e4,_0x3f011d[_0x2f4a18(0xcc)]=_0x4cb209,_0x3f011d[_0x2f4a18(0x13b)]=_0x2f4a18(0xfd),_0x3f011d['parent']=_0x2cc0ec,await _0xfa0c9a[_0x2f4a18(0x108)](menu_base_1[_0x2f4a18(0x12c)])[_0x2f4a18(0xf7)](Object[_0x2f4a18(0x10c)](Object[_0x2f4a18(0x10c)]({},_0x3f011d),{'domain':_0x5bb7d1,'creator':_0x29eabc,'updater':_0x29eabc}));}['enc'](_0x1e243d){const _0x14ac34=a0_0x4174e5;let _0x1a4622=JSON[_0x14ac34(0x123)](_0x1e243d)[_0x14ac34(0xf3)](/(.{100})/)[_0x14ac34(0x11a)](_0x1aed9b=>_0x1aed9b),_0x115b4a=['aes-256-ecb',_0x14ac34(0x12e),'aes-256-cfb',_0x14ac34(0x12f),_0x14ac34(0xea),_0x14ac34(0x126),_0x14ac34(0x11d),_0x14ac34(0x122)],_0x1fa6cb=crypto_1['default']['randomBytes'](0x20)[_0x14ac34(0x103)]('hex'),_0x547b46=Buffer[_0x14ac34(0xe2)](_0x1fa6cb,_0x14ac34(0x100)),_0x55cfb2=_0x1fa6cb[_0x14ac34(0x130)](0x0,0x10),_0x24dd2c=['',_0x55cfb2,_0x55cfb2,_0x55cfb2,_0x55cfb2,_0x55cfb2,_0x55cfb2,_0x55cfb2],_0x268a69=0x0,_0x565384=[];_0x565384['push'](_0x1fa6cb);for(var _0x2e2bc9=0x0;_0x2e2bc9<_0x1a4622['length'];_0x2e2bc9++,_0x268a69++){_0x268a69==_0x115b4a[_0x14ac34(0x118)]&&(_0x268a69=0x0);let _0x1d38f0=crypto_1['default']['createCipheriv'](_0x115b4a[_0x268a69],_0x547b46,_0x24dd2c[_0x268a69]),_0x3050c7=_0x1d38f0[_0x14ac34(0xda)](_0x1a4622[_0x2e2bc9],_0x14ac34(0x133),_0x14ac34(0x100));_0x3050c7+=_0x1d38f0[_0x14ac34(0xe8)](_0x14ac34(0x100)),_0x565384[_0x14ac34(0xe4)](_0x3050c7);}return _0x565384[_0x14ac34(0xd7)](_0x14ac34(0x136));}};tslib_1[a0_0x4174e5(0x128)]([(0x0,type_graphql_1[a0_0x4174e5(0xe6)])(a0_0x4174e5(0xdc)),(0x0,type_graphql_1[a0_0x4174e5(0xcd)])(_0x35f34a=>Boolean,{'description':'Operato\x20Tool\x20Create\x20Menu'}),tslib_1[a0_0x4174e5(0x13d)](0x0,(0x0,type_graphql_1[a0_0x4174e5(0x10b)])('id')),tslib_1[a0_0x4174e5(0x13d)](0x1,(0x0,type_graphql_1['Arg'])(a0_0x4174e5(0x13c))),tslib_1['__param'](0x2,(0x0,type_graphql_1[a0_0x4174e5(0xfc)])()),tslib_1[a0_0x4174e5(0xd2)]('design:type',Function),tslib_1[a0_0x4174e5(0xd2)](a0_0x4174e5(0x125),[String,String,Object]),tslib_1[a0_0x4174e5(0xd2)](a0_0x4174e5(0xfa),Promise)],OperatoToolCreateMenu[a0_0x4174e5(0xdb)],a0_0x4174e5(0xe1),null),OperatoToolCreateMenu=tslib_1[a0_0x4174e5(0x128)]([(0x0,type_graphql_1[a0_0x4174e5(0xc8)])()],OperatoToolCreateMenu),exports['OperatoToolCreateMenu']=OperatoToolCreateMenu;const modelTemplate=a0_0x4174e5(0xf8);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x4a65fe=a0_0x3f8b;(function(_0x5e17cb,_0x5d5368){const _0x372dff=a0_0x3f8b,_0x34983e=_0x5e17cb();while(!![]){try{const _0xa02d85=parseInt(_0x372dff(0x168))/0x1*(parseInt(_0x372dff(0x166))/0x2)+-parseInt(_0x372dff(0x14b))/0x3+parseInt(_0x372dff(0x125))/0x4*(-parseInt(_0x372dff(0x147))/0x5)+parseInt(_0x372dff(0x16d))/0x6+-parseInt(_0x372dff(0xfd))/0x7*(parseInt(_0x372dff(0xf4))/0x8)+-parseInt(_0x372dff(0x16b))/0x9*(-parseInt(_0x372dff(0x120))/0xa)+parseInt(_0x372dff(0x145))/0xb;if(_0xa02d85===_0x5d5368)break;else _0x34983e['push'](_0x34983e['shift']());}catch(_0x3592a6){_0x34983e['push'](_0x34983e['shift']());}}}(a0_0x56dd,0xc2537));function a0_0x56dd(){const _0x4fdcb2=['columnToEntityColumn','state','Resolvers,\x20subscribers\x20as\x20','-history\x27','getProjectRootPath','design:paramtypes','utf8','\x0a/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0a\x0a/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0a\x0aexport\x20const\x20entities\x20=\x20[\x20\x20\x0a\x20\x20/*\x20ENTITIES\x20*/\x0a]\x20\x0a\x0a\x0aexport\x20const\x20schema\x20=\x20{\x0a\x20\x20resolverClasses:\x20[\x0a\x20\x20\x20\x20/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x20\x20]\x20\x0a}\x0a\x0aexport\x20const\x20subscribers\x20=\x20[\x0a\x20\x20/*\x20SUBSCRIBERS\x20*/\x0a]\x0a','EntityColumn','\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryList\x20}\x20from\x20\x27./{{name}}-history-type\x27\x0a\x0a@Resolver({{pascalCase\x20name}}History)\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryQuery\x20{\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}History,\x20{\x20description:\x20\x27To\x20fetch\x20a\x20{{pascalCase\x20name}}History\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}History(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}History>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20return\x20await\x20getRepository({{pascalCase\x20name}}History).findOne({\x0a\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20}\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}HistoryList,\x20{\x20description:\x20\x27To\x20fetch\x20multiple\x20{{pluralPascalCase\x20name}}History\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}Histories(@Args()\x20params:\x20ListParam,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}HistoryList>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20queryBuilder\x20=\x20getQueryBuilderFromListParams({\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20params,\x0a\x20\x20\x20\x20\x20\x20repository:\x20await\x20getRepository({{pascalCase\x20name}}History)\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20const\x20[items,\x20total]\x20=\x20await\x20queryBuilder.getManyAndCount()\x0a\x0a\x20\x20\x20\x20return\x20{\x20items,\x20total\x20}\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20Domain)\x0a\x20\x20async\x20domain(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<Domain>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(Domain).findOneBy({id:{{camelCase\x20name}}History.domainId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20updater(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}History.updaterId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20creator(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}History.creatorId})\x0a\x20\x20}\x0a}\x0a','\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201','Int','decimal','writeFileSync','sort','domain','push','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','createHistoryEntityText','22gAVNta','/*\x20ENTITIES\x20*/\x0a\x09...','48946uZkvBn','createHistoryServiceFiles','.ts','1143XwRuFy','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','3496620TFNMrM','-history-type.ts','OperatoToolCreateService','-type.ts','\x27,\x20type:\x20\x27','split','\x27,\x20nullable:\x20','Float','double','getColTxtType','createDir','number','design:type','name','includes','integer','replace','rank','\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}List\x20}\x20from\x20\x27./{{name}}-type\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Query\x20{\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20fetch\x20a\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20return\x20await\x20getRepository({{pascalCase\x20name}}).findOne({\x0a\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20}\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}List,\x20{\x20description:\x20\x27To\x20fetch\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{pluralCamelCase\x20name}}(@Args()\x20params:\x20ListParam,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}List>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20queryBuilder\x20=\x20getQueryBuilderFromListParams({\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20params,\x0a\x20\x20\x20\x20\x20\x20repository:\x20await\x20getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20const\x20convertedParams\x20=\x20convertListParams(params,\x20domain.id)\x0a\x20\x20\x20\x20const\x20[items,\x20total]\x20=\x20await\x20queryBuilder.getManyAndCount()\x0a\x0a\x20\x20\x20\x20return\x20{\x20items,\x20total\x20}\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20Domain)\x0a\x20\x20async\x20domain(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<Domain>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(Domain).findOneBy({id:{{camelCase\x20name}}.domainId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20updater(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.updaterId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20creator(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.creatorId})\x0a\x20\x20}\x0a}\x0a','timestamp\x20without\x20time\x20zone','export\x20*\x20from\x20\x27./','packages','datetime','11182744NuIYeB','-history.ts','EntitySubscribers\x20}\x20from\x20\x27./','@Field(','\x0aimport\x20{\x20EventSubscriber\x20}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20HistoryEntitySubscriber\x20}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20getRepository\x20}\x20from\x20\x27@things-factory/shell\x27\x0a\x0a@EventSubscriber()\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryEntitySubscriber\x20extends\x20HistoryEntitySubscriber<{{pascalCase\x20name}},{{pascalCase\x20name}}History>\x20{\x0a\x20\x20public\x20get\x20entity()\x20{\x0a\x20\x20\x20\x20return\x20{{pascalCase\x20name}}\x0a\x20\x20}\x0a\x0a\x20\x20public\x20get\x20historyEntity()\x20{\x0a\x20\x20\x20\x20return\x20{{pascalCase\x20name}}History\x0a\x20\x20}\x0a\x0a\x20\x20{{entityToJson}}\x0a\x0a\x20\x20async\x20beforeRemoveHistory(history:{{pascalCase\x20name}}History,entity:{{pascalCase\x20name}}){\x0a\x20\x20\x20\x20let\x20repo\x20=\x20getRepository({{pascalCase\x20name}}History);\x0a\x20\x20\x20\x20const\x20revNo\x20=\x20await\x20repo.createQueryBuilder()\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.select(\x27max(data_revision_no)\x27,\x20\x27rev_no\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.where(\x27domain_id\x20=\x20:domainId\x27,\x20{\x20domainId:\x20entity.domain.id\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.andWhere(\x27original_id\x20=\x20:originalId\x27,\x20{\x20originalId:\x20entity.id\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.getRawOne()\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20history.dataRevisionNo\x20=\x20revNo\x20?\x20revNo.rev_no\x20+\x201\x20:\x201;\x0a\x20\x20\x20\x20return\x20history;\x0a\x20\x20}\x0a}\x0a','type\x20=>','getFieldType','\x20{\x20nullable:\x20','@Column({name:\x27','7IyYJtz','created_at','colType','nullable','prototype','existsSync','dataProp','...','length','pluralPascalCaseName','domain_id','@things-factory/shell','createTypeText','\x20})','find','indexOf','Resolvers\x20}\x20from\x20\x27./','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','createEntityText','index.ts','type-graphql','updater_id','Resolvers,','pluralize','pascalCaseName','-query.ts','writeFile','/server/service/','date','long','map','__metadata','/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...','Operato\x20Tool\x20Create\x20Service','creator_id','37270vHiSAm','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity()\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','createServicePath',',length:','camelCaseName','4eXIcOf','colSize','double\x20precision','-mutation.ts','Entities,','JSON','character\x20varying','\x0aimport\x20{\x20Resolver,\x20Mutation,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20In\x20}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20New{{pascalCase\x20name}},\x20{{pascalCase\x20name}}Patch\x20}\x20from\x20\x27./{{name}}-type\x27\x0aimport\x20{\x20getRepository\x20}\x20from\x20\x27@things-factory/shell\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Mutation\x20{\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20create\x20new\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20create{{pascalCase\x20name}}(@Arg(\x27{{camelCase\x20name}}\x27)\x20{{camelCase\x20name}}:\x20New{{pascalCase\x20name}},\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20return\x20await\x20tx.getRepository({{pascalCase\x20name}}).save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20modify\x20{{pascalCase\x20name}}\x20information\x27\x20})\x0a\x20\x20async\x20update{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27id\x27)\x20id:\x20string,\x0a\x20\x20\x20\x20@Arg(\x27patch\x27)\x20patch:\x20{{pascalCase\x20name}}Patch,\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20repository\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20repository.findOne(\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20)\x0a\x0a\x20\x20\x20\x20return\x20await\x20repository.save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20...patch,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20[{{pascalCase\x20name}}],\x20{\x20description:\x20\x22To\x20modify\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20information\x22\x20})\x0a\x20\x20async\x20updateMultiple{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27patches\x27,\x20type\x20=>\x20[{{pascalCase\x20name}}Patch])\x20patches:\x20{{pascalCase\x20name}}Patch[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}[]>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20results\x20=\x20[]\x0a\x20\x20\x20\x20const\x20_createRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27+\x27)\x0a\x20\x20\x20\x20const\x20_updateRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27M\x27)\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}Repo\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x0a\x20\x20\x20\x20if\x20(_createRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_createRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20newRecord\x20=\x20_createRecords[i]\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...newRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27+\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20if\x20(_updateRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_updateRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20updRecord\x20=\x20_updateRecords[i]\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20{{camelCase\x20name}}Repo.findOne({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id:updRecord.id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...updRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27M\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20return\x20results\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20delete{{pascalCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove({\x20domain,\x20id,\x20updater:user\x20})\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20multiple\x20{{camelCase\x20name}}s\x27\x20})\x0a\x20\x20async\x20delete{{pluralPascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27ids\x27,\x20type\x20=>\x20[String])\x20ids:\x20string[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20delEntitis\x20=\x20ids.map(id=>{\x0a\x20\x20\x20\x20\x20\x20return\x20{domain,id,updater:user}\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove(delEntitis)\x0a\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a}\x0a','createServiceFiles','Resolver','createNoHistoryServiceFiels','float','Date','/index.ts','-history-query.ts','updated_at','updater','\x0a\x20\x20','PWD','filter','\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryQuery\x20}\x20from\x20\x27./{{name}}-history-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryEntitySubscriber\x20}\x20from\x20\x27./event-subscriber\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}},\x20{{pascalCase\x20name}}History]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}HistoryQuery,\x20{{pascalCase\x20name}}Mutation]\x0aexport\x20const\x20subscribers\x20=\x20[{{pascalCase\x20name}}HistoryEntitySubscriber]\x0a\x0a','design:returntype','string','__param','replaceNamesMap','Ctx','tslib','toolCreateService','creator','/event-subscriber.ts','/server','join','29358164hCpGeq','Entity','3505085GfRFop','uniqRank','text','/packages/','4105830AMfqtz','\x0aimport\x20{\x20ObjectType,\x20Field,\x20InputType,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@InputType()\x0aexport\x20class\x20New{{pascalCase\x20name}}\x20{\x0a{{newTypeColumns}}\x0a}\x0a\x0a@InputType()\x0aexport\x20class\x20{{pascalCase\x20name}}Patch\x20{\x0a\x20\x20@Field(type\x20=>\x20ID,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20id?:\x20string\x0a\x0a{{patchTypeColumns}}\x0a\x0a\x20\x20@Field()\x0a\x20\x20cuFlag:\x20string\x0a}\x0a\x0a@ObjectType()\x0aexport\x20class\x20{{pascalCase\x20name}}List\x20{\x0a\x20\x20@Field(type\x20=>\x20[{{pascalCase\x20name}}])\x0a\x20\x20items:\x20{{pascalCase\x20name}}[]\x0a\x0a\x20\x20@Field(type\x20=>\x20Int)\x0a\x20\x20total:\x20number\x0a}\x0a','\x0a\x20\x20public\x20createHistoryEntity(manager,\x20entity)\x20{\x0a\x20\x20\x20\x20let\x20history\x20=\x20manager.create(this.historyEntity,\x20entity);\x0a\x20\x20\x20\x20history.historyJson\x20=\x20JSON.stringify(entity);\x0a\x20\x20\x20\x20return\x20history;\x0a\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20','lodash','Entities,\x20resolvers\x20as\x20','EntitySubscribers,','readFileSync','existsPath'];a0_0x56dd=function(){return _0x4fdcb2;};return a0_0x56dd();}Object['defineProperty'](exports,'__esModule',{'value':!0x0}),exports[a0_0x4a65fe(0x16f)]=void 0x0;const tslib_1=require(a0_0x4a65fe(0x13f)),type_graphql_1=require(a0_0x4a65fe(0x111)),shell_1=require(a0_0x4a65fe(0x108)),resource_base_1=require('@things-factory/resource-base'),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x4a65fe(0x14e)),{plural:plural}=require(a0_0x4a65fe(0x114)),fs=require('fs');function a0_0x3f8b(_0x422f94,_0x209541){const _0x56dda0=a0_0x56dd();return a0_0x3f8b=function(_0x3f8bc7,_0x4a4a9c){_0x3f8bc7=_0x3f8bc7-0xe5;let _0x26c007=_0x56dda0[_0x3f8bc7];return _0x26c007;},a0_0x3f8b(_0x422f94,_0x209541);}let OperatoToolCreateService=class{async[a0_0x4a65fe(0x140)](_0x224537,_0x264c8e){const _0x55b557=a0_0x4a65fe,{domain:_0x2fe6e4}=_0x264c8e[_0x55b557(0x154)],_0x2d7928=await(0x0,shell_1['getRepository'])(resource_base_1[_0x55b557(0x146)])['findOne']({'where':{'id':_0x224537}}),_0x4e5dc2=await(0x0,shell_1['getRepository'])(resource_base_1[_0x55b557(0x15b)])[_0x55b557(0x10b)]({'where':{'domain':{'id':_0x2fe6e4['id']},'entity':{'id':_0x2d7928['id']}}});let {name:_0x307384='',bundle:_0x3ede8a=''}=_0x2d7928||{},_0x14a7dc=this[_0x55b557(0x157)](),_0x49f3b3=kebabCase(_0x307384);return await this[_0x55b557(0x122)](_0x14a7dc,_0x3ede8a,_0x49f3b3),await this['createServiceFiles'](_0x14a7dc,_0x3ede8a,_0x307384,_0x49f3b3,_0x2d7928,_0x4e5dc2),!0x0;}async[a0_0x4a65fe(0x12d)](_0x38f7a8,_0x4f725a,_0x2352cd,_0x563902,_0x243136,_0x1231f2){const _0x74dfa9=a0_0x4a65fe;let _0x2ebaf8={'name':_0x563902,'pascalCaseName':startCase(camelCase(_0x2352cd))[_0x74dfa9(0xed)](/ /g,''),'camelCaseName':camelCase(_0x2352cd),'snakeCaseName':snakeCase(_0x2352cd),'pluralPascalCaseName':startCase(camelCase(plural(_0x2352cd)))['replace'](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x2352cd))},_0x75633a=_0x38f7a8+_0x74dfa9(0x14a)+_0x4f725a+_0x74dfa9(0x118);[_0x74dfa9(0x12a),'COPY']['includes'](_0x243136['dataProp'])?await this['createHistoryServiceFiles'](_0x75633a,_0x563902,_0x243136,_0x1231f2,_0x2ebaf8):await this[_0x74dfa9(0x12f)](_0x75633a,_0x563902,_0x243136,_0x1231f2,_0x2ebaf8);}async[a0_0x4a65fe(0x169)](_0x16ff23,_0x5ae864,_0x3153c1,_0x423a96,_0x2274d6){const _0x10b94f=a0_0x4a65fe;await this[_0x10b94f(0x117)](_0x16ff23+(_0x5ae864+'/index.ts'),serviceHistoryIndex,_0x2274d6);let _0x120bcc=this[_0x10b94f(0x10f)](_0x3153c1,_0x423a96);await this[_0x10b94f(0x117)](_0x16ff23+(_0x5ae864+'/'+_0x5ae864+_0x10b94f(0x16a)),_0x120bcc,_0x2274d6),await this[_0x10b94f(0x117)](_0x16ff23+(_0x5ae864+'/'+_0x5ae864+_0x10b94f(0x116)),serviceQuery,_0x2274d6),await this['writeFile'](_0x16ff23+(_0x5ae864+'/'+_0x5ae864+_0x10b94f(0x128)),serviceMutation,_0x2274d6);let _0x2e60ac=this[_0x10b94f(0x109)](_0x423a96);await this[_0x10b94f(0x117)](_0x16ff23+(_0x5ae864+'/'+_0x5ae864+'-type.ts'),_0x2e60ac,_0x2274d6);let _0x195530=this[_0x10b94f(0x165)](_0x3153c1,_0x423a96);await this[_0x10b94f(0x117)](_0x16ff23+(_0x5ae864+'/'+_0x5ae864+_0x10b94f(0xf5)),_0x195530,_0x2274d6);let _0x66ab9c='';_0x10b94f(0x12a)==_0x3153c1['dataProp']?(_0x66ab9c=_0x10b94f(0x14d),await this['writeFile'](_0x16ff23+(_0x5ae864+_0x10b94f(0x142)),serviceEntitySubscriber,_0x2274d6)):_0x66ab9c='';let _0x57d542=serviceEntitySubscriber[_0x10b94f(0xed)](/{{entityToJson}}/g,_0x66ab9c);await this[_0x10b94f(0x117)](_0x16ff23+(_0x5ae864+_0x10b94f(0x142)),_0x57d542,_0x2274d6),await this[_0x10b94f(0x117)](_0x16ff23+(_0x5ae864+'/'+_0x5ae864+_0x10b94f(0x133)),serviceHistoryQuery,_0x2274d6),await this[_0x10b94f(0x117)](_0x16ff23+(_0x5ae864+'/'+_0x5ae864+_0x10b94f(0x16e)),sereviceHistoryType,_0x2274d6);let _0xe92ac4=_0x16ff23+_0x10b94f(0x110);0x0==await this[_0x10b94f(0x152)](_0xe92ac4)&&await this[_0x10b94f(0x117)](_0xe92ac4,allIndex,_0x2274d6);let _0x4ebd24=await fs[_0x10b94f(0x151)](_0xe92ac4,_0x10b94f(0x159));_0x4ebd24[_0x10b94f(0x10c)](_0x10b94f(0xf1)+_0x2274d6[_0x10b94f(0xea)]+'/'+_0x2274d6['name']+'-history\x27')<0x0&&(_0x4ebd24=_0x4ebd24[_0x10b94f(0xed)](/\/\* EXPORT ENTITY TYPES \*\//,_0x10b94f(0x16c)+_0x2274d6[_0x10b94f(0xea)]+'/'+_0x2274d6[_0x10b94f(0xea)]+_0x10b94f(0x156))),_0x4ebd24[_0x10b94f(0x10c)]('export\x20*\x20from\x20\x27./'+_0x2274d6[_0x10b94f(0xea)]+'/'+_0x2274d6[_0x10b94f(0xea)]+'\x27')<0x0&&(_0x4ebd24=_0x4ebd24['replace'](/\/\* EXPORT ENTITY TYPES \*\//,'/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./'+_0x2274d6[_0x10b94f(0xea)]+'/'+_0x2274d6[_0x10b94f(0xea)]+'\x27')),_0x4ebd24['indexOf']('import\x20{\x20entities\x20as\x20'+_0x2274d6[_0x10b94f(0x115)]+_0x10b94f(0x14f)+_0x2274d6[_0x10b94f(0x115)]+_0x10b94f(0x155)+_0x2274d6[_0x10b94f(0x115)]+_0x10b94f(0xf6)+_0x2274d6[_0x10b94f(0xea)]+'\x27')<0x0&&(_0x4ebd24=_0x4ebd24['replace'](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x10b94f(0x10e)+_0x2274d6[_0x10b94f(0x115)]+_0x10b94f(0x14f)+_0x2274d6[_0x10b94f(0x115)]+'Resolvers,\x20subscribers\x20as\x20'+_0x2274d6[_0x10b94f(0x115)]+'EntitySubscribers\x20}\x20from\x20\x27./'+_0x2274d6[_0x10b94f(0xea)]+'\x27')),_0x4ebd24[_0x10b94f(0x10c)](_0x10b94f(0x104)+_0x2274d6['pascalCaseName']+_0x10b94f(0x129))<0x0&&(_0x4ebd24=_0x4ebd24['replace'](/\/\* ENTITIES \*\//,_0x10b94f(0x167)+_0x2274d6[_0x10b94f(0x115)]+'Entities,')),_0x4ebd24[_0x10b94f(0x10c)]('...'+_0x2274d6[_0x10b94f(0x115)]+_0x10b94f(0x113))<0x0&&(_0x4ebd24=_0x4ebd24[_0x10b94f(0xed)](/\/\* RESOLVER CLASSES \*\//,'/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...'+_0x2274d6[_0x10b94f(0x115)]+_0x10b94f(0x113))),_0x4ebd24['indexOf'](_0x10b94f(0x104)+_0x2274d6[_0x10b94f(0x115)]+_0x10b94f(0x150))<0x0&&(_0x4ebd24=_0x4ebd24[_0x10b94f(0xed)](/\/\* SUBSCRIBERS \*\//,_0x10b94f(0x11d)+_0x2274d6[_0x10b94f(0x115)]+'EntitySubscribers,')),await this['writeFile'](_0xe92ac4,_0x4ebd24,_0x2274d6);}async['createNoHistoryServiceFiels'](_0x4431f0,_0x348844,_0x2aa96e,_0x41ba0a,_0x9443d9){const _0x5484f8=a0_0x4a65fe;await this[_0x5484f8(0x117)](_0x4431f0+(_0x348844+_0x5484f8(0x132)),serviceIndex,_0x9443d9),await this['writeFile'](_0x4431f0+(_0x348844+'/'+_0x348844+_0x5484f8(0x116)),serviceQuery,_0x9443d9),await this[_0x5484f8(0x117)](_0x4431f0+(_0x348844+'/'+_0x348844+_0x5484f8(0x128)),serviceMutation,_0x9443d9);let _0x550bed=this['createEntityText'](_0x2aa96e,_0x41ba0a);await this[_0x5484f8(0x117)](_0x4431f0+(_0x348844+'/'+_0x348844+_0x5484f8(0x16a)),_0x550bed,_0x9443d9);let _0x19404c=this[_0x5484f8(0x109)](_0x41ba0a);await this[_0x5484f8(0x117)](_0x4431f0+(_0x348844+'/'+_0x348844+_0x5484f8(0x170)),_0x19404c,_0x9443d9);let _0x4972c8=_0x4431f0+_0x5484f8(0x110);0x0==await this['existsPath'](_0x4972c8)&&await this[_0x5484f8(0x117)](_0x4972c8,allIndex,_0x9443d9);let _0x29f41d=await fs['readFileSync'](_0x4972c8,_0x5484f8(0x159));_0x29f41d[_0x5484f8(0x10c)](_0x5484f8(0xf1)+_0x9443d9[_0x5484f8(0xea)]+'/'+_0x9443d9['name']+'\x27')<0x0&&(_0x29f41d=_0x29f41d['replace'](/\/\* EXPORT ENTITY TYPES \*\//,'/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./'+_0x9443d9['name']+'/'+_0x9443d9[_0x5484f8(0xea)]+'\x27')),_0x29f41d[_0x5484f8(0x10c)]('import\x20{\x20entities\x20as\x20'+_0x9443d9[_0x5484f8(0x115)]+_0x5484f8(0x14f)+_0x9443d9[_0x5484f8(0x115)]+_0x5484f8(0x10d)+_0x9443d9[_0x5484f8(0xea)]+'\x27')<0x0&&(_0x29f41d=_0x29f41d[_0x5484f8(0xed)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,'/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20'+_0x9443d9['pascalCaseName']+_0x5484f8(0x14f)+_0x9443d9[_0x5484f8(0x115)]+_0x5484f8(0x10d)+_0x9443d9[_0x5484f8(0xea)]+'\x27')),_0x29f41d['indexOf'](_0x5484f8(0x104)+_0x9443d9[_0x5484f8(0x115)]+_0x5484f8(0x129))<0x0&&(_0x29f41d=_0x29f41d[_0x5484f8(0xed)](/\/\* ENTITIES \*\//,_0x5484f8(0x167)+_0x9443d9[_0x5484f8(0x115)]+_0x5484f8(0x129))),_0x29f41d[_0x5484f8(0x10c)](_0x5484f8(0x104)+_0x9443d9[_0x5484f8(0x115)]+_0x5484f8(0x113))<0x0&&(_0x29f41d=_0x29f41d[_0x5484f8(0xed)](/\/\* RESOLVER CLASSES \*\//,_0x5484f8(0x164)+_0x9443d9['pascalCaseName']+'Resolvers,')),await this[_0x5484f8(0x117)](_0x4972c8,_0x29f41d,_0x9443d9);}[a0_0x4a65fe(0x109)](_0x52b288){const _0x628f37=a0_0x4a65fe;let _0x2dc144=sereviceType,_0xceabf0=_0x52b288['map'](_0x56d826=>{const _0x15f1a5=a0_0x3f8b;if('id'==_0x56d826[_0x15f1a5(0xea)])return'';if(_0x15f1a5(0x107)==_0x56d826[_0x15f1a5(0xea)])return'';if('created_at'==_0x56d826[_0x15f1a5(0xea)])return'';if(_0x15f1a5(0x134)==_0x56d826[_0x15f1a5(0xea)])return'';if('creator_id'==_0x56d826[_0x15f1a5(0xea)])return'';if(_0x15f1a5(0x112)==_0x56d826[_0x15f1a5(0xea)])return'';let _0x5b5bc8=this['getFieldType'](_0x56d826),_0x20eacf=this[_0x15f1a5(0xe6)](_0x56d826),_0x56822a=camelCase(_0x56d826[_0x15f1a5(0xea)]);return'\x20\x20'+(_0x15f1a5(0xf7)+(0x0==_0x5b5bc8[_0x15f1a5(0x105)]?'':_0x15f1a5(0xf9)+_0x5b5bc8+',')+_0x15f1a5(0xfb)+_0x56d826[_0x15f1a5(0x100)]+_0x15f1a5(0x10a))+'\x0a\x20\x20'+(''+_0x56822a+(_0x56d826[_0x15f1a5(0x100)]?'?':'')+':\x20'+_0x20eacf)+'\x0a';});_0x2dc144=_0x2dc144[_0x628f37(0xed)](/{{newTypeColumns}}/g,_0xceabf0[_0x628f37(0x144)]('\x0a'));let _0x136346=_0x52b288[_0x628f37(0x11b)](_0x5d6dd4=>{const _0x52f3a0=_0x628f37;if('id'==_0x5d6dd4[_0x52f3a0(0xea)])return'';if(_0x52f3a0(0x107)==_0x5d6dd4[_0x52f3a0(0xea)])return'';if(_0x52f3a0(0xfe)==_0x5d6dd4['name'])return'';if(_0x52f3a0(0x134)==_0x5d6dd4[_0x52f3a0(0xea)])return'';if('creator_id'==_0x5d6dd4[_0x52f3a0(0xea)])return'';if(_0x52f3a0(0x112)==_0x5d6dd4[_0x52f3a0(0xea)])return'';let _0x17393a=this[_0x52f3a0(0xfa)](_0x5d6dd4),_0xd52c82=this[_0x52f3a0(0xe6)](_0x5d6dd4);_0x5d6dd4[_0x52f3a0(0x100)]=!0x0;let _0x179cf8=camelCase(_0x5d6dd4[_0x52f3a0(0xea)]);return'\x20\x20'+(_0x52f3a0(0xf7)+(0x0==_0x17393a[_0x52f3a0(0x105)]?'':'type\x20=>'+_0x17393a+',')+_0x52f3a0(0xfb)+_0x5d6dd4[_0x52f3a0(0x100)]+_0x52f3a0(0x10a))+_0x52f3a0(0x136)+(''+_0x179cf8+(_0x5d6dd4['nullable']?'?':'')+':\x20'+_0xd52c82)+'\x0a';});return _0x2dc144=_0x2dc144[_0x628f37(0xed)](/{{patchTypeColumns}}/g,_0x136346['join']('\x0a')),_0x2dc144;}[a0_0x4a65fe(0x10f)](_0x33c238,_0x126c50){const _0x4b7dbb=a0_0x4a65fe;let _0x57caa7=serviceEntity,_0x160a29=_0x126c50['sort'](function(_0x5802b5,_0x651981){const _0x34ff6c=a0_0x3f8b;return _0x5802b5[_0x34ff6c(0xee)]-_0x651981[_0x34ff6c(0xee)];})['map'](_0x2924b3=>this[_0x4b7dbb(0x153)](_0x2924b3));['COPY','JSON'][_0x4b7dbb(0xeb)](_0x33c238['dataProp'])&&_0x160a29[_0x4b7dbb(0x163)](_0x4b7dbb(0x15d)),_0x57caa7=_0x57caa7[_0x4b7dbb(0xed)](/{{entityColumns}}/g,_0x160a29[_0x4b7dbb(0x144)]('\x0a'));let _0x3af677='',_0x150078=_0x126c50[_0x4b7dbb(0x138)](_0x1964e6=>_0x1964e6[_0x4b7dbb(0x148)]&&_0x1964e6['uniqRank']>0x0)[_0x4b7dbb(0x161)](function(_0x4e23c4,_0x4b0f6f){const _0x21f157=_0x4b7dbb;return _0x4e23c4[_0x21f157(0x148)]-_0x4b0f6f['uniqRank'];});if(_0x150078[_0x4b7dbb(0x105)]>0x0){_0x3af677='@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})';let _0xa14660=_0x150078[_0x4b7dbb(0x11b)](_0x3cd03a=>{const _0x502c42=_0x4b7dbb;let _0x3293af=_0x3cd03a['name'];return _0x502c42(0x107)==_0x3cd03a['name']&&(_0x3293af=_0x502c42(0x162)),_0x502c42(0x11f)==_0x3cd03a['name']&&(_0x3293af=_0x502c42(0x141)),_0x502c42(0x112)==_0x3cd03a[_0x502c42(0xea)]&&(_0x3293af=_0x502c42(0x135)),'{{camelCase\x20name}}.'+camelCase(_0x3293af);});_0x3af677=_0x3af677['replace'](/{{indexColumns}}/g,_0xa14660[_0x4b7dbb(0x144)](','));}return _0x57caa7=_0x57caa7['replace'](/{{indexAnn}}/g,_0x3af677),_0x57caa7;}[a0_0x4a65fe(0x165)](_0x2d6499,_0x3327bb){const _0x3dbe38=a0_0x4a65fe;let _0x934c20=_0x3dbe38(0x12a)==_0x2d6499[_0x3dbe38(0x103)]?serviceEntityHistJson:serviceEntityHistCopy,_0xffa893=_0x3327bb['sort'](function(_0x28d76d,_0x317f39){const _0x2086b1=_0x3dbe38;return _0x28d76d[_0x2086b1(0xee)]-_0x317f39[_0x2086b1(0xee)];})[_0x3dbe38(0x11b)](_0x1042e1=>this[_0x3dbe38(0x153)](_0x1042e1));return _0x934c20=_0x934c20['replace'](/{{entityColumns}}/g,_0xffa893['join']('\x0a')),_0x934c20;}[a0_0x4a65fe(0x153)](_0x495e01){const _0x2848f1=a0_0x4a65fe;if('id'==_0x495e01[_0x2848f1(0xea)])return'';if('domain_id'==_0x495e01[_0x2848f1(0xea)])return'';if(_0x2848f1(0xfe)==_0x495e01[_0x2848f1(0xea)])return'';if(_0x2848f1(0x134)==_0x495e01[_0x2848f1(0xea)])return'';if(_0x2848f1(0x11f)==_0x495e01[_0x2848f1(0xea)])return'';if('updater_id'==_0x495e01[_0x2848f1(0xea)])return'';let _0x4f9694=_0x495e01[_0x2848f1(0xff)];_0x2848f1(0xe5)==_0x495e01[_0x2848f1(0xff)]&&(_0x4f9694=_0x2848f1(0x127)),_0x2848f1(0x11a)==_0x495e01[_0x2848f1(0xff)]&&(_0x4f9694='bigint'),'string'==_0x495e01[_0x2848f1(0xff)]&&(_0x4f9694=_0x2848f1(0x12b)),'datetime'==_0x495e01['colType']&&(_0x4f9694=_0x2848f1(0xf0));let _0x3c8f7b='';_0x2848f1(0x13b)==_0x495e01['colType']&&(_0x3c8f7b=_0x495e01[_0x2848f1(0x126)]);let _0x1a07a9=this[_0x2848f1(0xfa)](_0x495e01),_0x167a89=this['getColTxtType'](_0x495e01),_0x42f5a0=camelCase(_0x495e01[_0x2848f1(0xea)]);return'\x20\x20'+(_0x2848f1(0xfc)+_0x495e01['name']+_0x2848f1(0x171)+_0x4f9694+_0x2848f1(0x173)+_0x495e01['nullable']+'\x20'+(0x0==_0x3c8f7b[_0x2848f1(0x105)]?'':_0x2848f1(0x123)+_0x3c8f7b)+'\x20})')+_0x2848f1(0x136)+(_0x2848f1(0xf7)+(0x0==_0x1a07a9[_0x2848f1(0x105)]?'':_0x2848f1(0xf9)+_0x1a07a9+',')+_0x2848f1(0xfb)+_0x495e01[_0x2848f1(0x100)]+'\x20})')+_0x2848f1(0x136)+(''+_0x42f5a0+(_0x495e01[_0x2848f1(0x100)]?'?':'')+':\x20'+_0x167a89)+'\x0a';}[a0_0x4a65fe(0xfa)](_0x96a16){const _0x4675eb=a0_0x4a65fe;let _0x4b7652='';return _0x4675eb(0xe5)==_0x96a16[_0x4675eb(0xff)]&&(_0x4b7652=_0x4675eb(0x174)),_0x4675eb(0x130)==_0x96a16[_0x4675eb(0xff)]&&(_0x4b7652=_0x4675eb(0x174)),_0x4675eb(0x11a)==_0x96a16[_0x4675eb(0xff)]&&(_0x4b7652=_0x4675eb(0x15e)),_0x4675eb(0xec)==_0x96a16['colType']&&(_0x4b7652='Int'),_0x4b7652;}[a0_0x4a65fe(0xe6)](_0x26b781){const _0x1c2d90=a0_0x4a65fe;let _0x4e828a=_0x26b781[_0x1c2d90(0xff)];return _0x1c2d90(0x15f)==_0x26b781[_0x1c2d90(0xff)]&&(_0x4e828a=_0x1c2d90(0xe8)),'double'==_0x26b781['colType']&&(_0x4e828a=_0x1c2d90(0xe8)),_0x1c2d90(0x130)==_0x26b781[_0x1c2d90(0xff)]&&(_0x4e828a=_0x1c2d90(0xe8)),_0x1c2d90(0xec)==_0x26b781[_0x1c2d90(0xff)]&&(_0x4e828a=_0x1c2d90(0xe8)),_0x1c2d90(0x11a)==_0x26b781[_0x1c2d90(0xff)]&&(_0x4e828a='number'),_0x1c2d90(0xf3)==_0x26b781[_0x1c2d90(0xff)]&&(_0x4e828a=_0x1c2d90(0x131)),_0x1c2d90(0x119)==_0x26b781[_0x1c2d90(0xff)]&&(_0x4e828a='Date'),_0x1c2d90(0x149)==_0x26b781[_0x1c2d90(0xff)]&&(_0x4e828a=_0x1c2d90(0x13b)),_0x4e828a;}async[a0_0x4a65fe(0x117)](_0x35944,_0x3a85b8,_0x2caab5){const _0x38b3db=a0_0x4a65fe;await fs[_0x38b3db(0x160)](_0x35944,this[_0x38b3db(0x13d)](_0x3a85b8,_0x2caab5),_0x38b3db(0x159));}[a0_0x4a65fe(0x13d)](_0x504bde,_0x3d2539){const _0x584b90=a0_0x4a65fe;return _0x504bde['replace'](/{{pascalCase name}}/g,_0x3d2539[_0x584b90(0x115)])[_0x584b90(0xed)](/{{camelCase name}}/g,_0x3d2539[_0x584b90(0x124)])[_0x584b90(0xed)](/{{snakeCase name}}/g,_0x3d2539['snakeCaseName'])[_0x584b90(0xed)](/{{pluralPascalCase name}}/g,_0x3d2539[_0x584b90(0x106)])['replace'](/{{pluralCamelCase name}}/g,_0x3d2539['pluralCamelCaseName'])[_0x584b90(0xed)](/{{name}}/g,_0x3d2539['name']);}async['createServicePath'](_0x13b9dd,_0x35a288,_0x5920d1){const _0x2bed40=a0_0x4a65fe;let _0x20d3dc=_0x13b9dd+'/packages';await this[_0x2bed40(0xe7)](_0x20d3dc),_0x20d3dc=_0x20d3dc+'/'+_0x35a288,await this[_0x2bed40(0xe7)](_0x20d3dc),_0x20d3dc+=_0x2bed40(0x143),await this[_0x2bed40(0xe7)](_0x20d3dc),_0x20d3dc+='/service',await this[_0x2bed40(0xe7)](_0x20d3dc),_0x20d3dc=_0x20d3dc+'/'+_0x5920d1,await this[_0x2bed40(0xe7)](_0x20d3dc);}[a0_0x4a65fe(0x157)](){const _0xb58f27=a0_0x4a65fe;let _0x5458e2=process['env'][_0xb58f27(0x137)][_0xb58f27(0x172)]('/'),_0x13c6c6=[];for(let _0x421547=0x0;_0x421547<_0x5458e2[_0xb58f27(0x105)]&&_0xb58f27(0xf2)!=_0x5458e2[_0x421547];_0x421547++)_0x13c6c6['push'](_0x5458e2[_0x421547]);return _0x13c6c6[_0xb58f27(0x144)]('/');}async[a0_0x4a65fe(0xe7)](_0x2b4f48){0x0==await this['existsPath'](_0x2b4f48)&&fs['mkdirSync'](_0x2b4f48);}async['existsPath'](_0x28a538){const _0x3a791f=a0_0x4a65fe;return await fs[_0x3a791f(0x102)](_0x28a538);}};tslib_1['__decorate']([(0x0,type_graphql_1['Query'])(_0x3f56ee=>Boolean,{'description':a0_0x4a65fe(0x11e)}),tslib_1[a0_0x4a65fe(0x13c)](0x0,(0x0,type_graphql_1['Arg'])('id')),tslib_1['__param'](0x1,(0x0,type_graphql_1[a0_0x4a65fe(0x13e)])()),tslib_1[a0_0x4a65fe(0x11c)](a0_0x4a65fe(0xe9),Function),tslib_1[a0_0x4a65fe(0x11c)](a0_0x4a65fe(0x158),[String,Object]),tslib_1['__metadata'](a0_0x4a65fe(0x13a),Promise)],OperatoToolCreateService[a0_0x4a65fe(0x101)],a0_0x4a65fe(0x140),null),OperatoToolCreateService=tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x4a65fe(0x12e)])()],OperatoToolCreateService),exports[a0_0x4a65fe(0x16f)]=OperatoToolCreateService;const allIndex=a0_0x4a65fe(0x15a),serviceIndex='\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}}]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}Mutation]\x0a',serviceHistoryIndex=a0_0x4a65fe(0x139),serviceQuery=a0_0x4a65fe(0xef),serviceHistoryQuery=a0_0x4a65fe(0x15c),serviceMutation=a0_0x4a65fe(0x12c),sereviceType=a0_0x4a65fe(0x14c),sereviceHistoryType='\x0aimport\x20{\x20ObjectType,\x20Field,\x20InputType,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0a\x0a@ObjectType()\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryList\x20{\x0a\x20\x20@Field(type\x20=>\x20[{{pascalCase\x20name}}History])\x0a\x20\x20items:\x20{{pascalCase\x20name}}History[]\x0a\x0a\x20\x20@Field(type\x20=>\x20Int)\x0a\x20\x20total:\x20number\x0a}\x0a',serviceEntity='\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20Domain\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0a@Entity()\x0a{{indexAnn}}\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}\x20{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a',serviceEntityHistCopy=a0_0x4a65fe(0x121),serviceEntityHistJson='\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity()\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a\x20\x20@Column(\x27simple-json\x27,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20@Field(type\x20=>\x20ScalarObject,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20historyJson?:\x20any\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a',serviceEntitySubscriber=a0_0x4a65fe(0xf8);
|
|
1
|
+
'use strict';const a0_0x35bc6a=a0_0x5196;(function(_0x5d2459,_0x10f4f3){const _0x5c8b50=a0_0x5196,_0x78f927=_0x5d2459();while(!![]){try{const _0x4a5a77=parseInt(_0x5c8b50(0x119))/0x1*(parseInt(_0x5c8b50(0xe7))/0x2)+parseInt(_0x5c8b50(0x121))/0x3+parseInt(_0x5c8b50(0xf3))/0x4*(-parseInt(_0x5c8b50(0x133))/0x5)+parseInt(_0x5c8b50(0x128))/0x6+-parseInt(_0x5c8b50(0x11e))/0x7+-parseInt(_0x5c8b50(0xfc))/0x8*(parseInt(_0x5c8b50(0x135))/0x9)+-parseInt(_0x5c8b50(0xd9))/0xa;if(_0x4a5a77===_0x10f4f3)break;else _0x78f927['push'](_0x78f927['shift']());}catch(_0x203585){_0x78f927['push'](_0x78f927['shift']());}}}(a0_0x3136,0x4977b));Object[a0_0x35bc6a(0x107)](exports,a0_0x35bc6a(0x14f),{'value':!0x0}),exports[a0_0x35bc6a(0xe6)]=void 0x0;function a0_0x5196(_0x4bd1aa,_0x246ada){const _0x313638=a0_0x3136();return a0_0x5196=function(_0x51960b,_0x596554){_0x51960b=_0x51960b-0xcb;let _0x3a509f=_0x313638[_0x51960b];return _0x3a509f;},a0_0x5196(_0x4bd1aa,_0x246ada);}const tslib_1=require(a0_0x35bc6a(0x115)),type_graphql_1=require('type-graphql'),shell_1=require(a0_0x35bc6a(0x10d)),resource_base_1=require(a0_0x35bc6a(0x132)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x35bc6a(0x12e)),{plural:plural}=require(a0_0x35bc6a(0xe5)),fs=require('fs');let OperatoToolCreateService=class{async[a0_0x35bc6a(0xf8)](_0x59227c,_0x310535){const _0x1062f4=a0_0x35bc6a,{domain:_0x5d9008}=_0x310535[_0x1062f4(0xe3)],_0xf4b2ea=await(0x0,shell_1[_0x1062f4(0xf7)])(resource_base_1[_0x1062f4(0x14a)])[_0x1062f4(0x10e)]({'where':{'id':_0x59227c}}),_0xd8908f=await(0x0,shell_1[_0x1062f4(0xf7)])(resource_base_1[_0x1062f4(0x147)])['find']({'where':{'domain':{'id':_0x5d9008['id']},'entity':{'id':_0xf4b2ea['id']}}});let {name:_0x209b01='',bundle:_0x3eb5de=''}=_0xf4b2ea||{},_0x5f59f4=this['getProjectRootPath'](),_0x5a53a2=kebabCase(_0x209b01);return await this[_0x1062f4(0x10a)](_0x5f59f4,_0x3eb5de,_0x5a53a2),await this[_0x1062f4(0xda)](_0x5f59f4,_0x3eb5de,_0x209b01,_0x5a53a2,_0xf4b2ea,_0xd8908f),!0x0;}async[a0_0x35bc6a(0xda)](_0x14cc9d,_0x2e1fdf,_0x35672c,_0xdcf6bd,_0x22e9b9,_0x16a8ff){const _0x4c9f87=a0_0x35bc6a;let _0x1639d6={'name':_0xdcf6bd,'pascalCaseName':startCase(camelCase(_0x35672c))[_0x4c9f87(0xd4)](/ /g,''),'camelCaseName':camelCase(_0x35672c),'snakeCaseName':snakeCase(_0x35672c),'pluralPascalCaseName':startCase(camelCase(plural(_0x35672c)))[_0x4c9f87(0xd4)](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x35672c))},_0x359801=_0x14cc9d+_0x4c9f87(0xf0)+_0x2e1fdf+_0x4c9f87(0xe8);[_0x4c9f87(0x14b),_0x4c9f87(0x102)][_0x4c9f87(0xf2)](_0x22e9b9[_0x4c9f87(0x114)])?await this[_0x4c9f87(0xec)](_0x359801,_0xdcf6bd,_0x22e9b9,_0x16a8ff,_0x1639d6):await this['createNoHistoryServiceFiels'](_0x359801,_0xdcf6bd,_0x22e9b9,_0x16a8ff,_0x1639d6);}async[a0_0x35bc6a(0xec)](_0x399525,_0x3043d3,_0x3468df,_0x5d9b29,_0x591396){const _0xc82409=a0_0x35bc6a;await this[_0xc82409(0x127)](_0x399525+(_0x3043d3+_0xc82409(0x12a)),serviceHistoryIndex,_0x591396);let _0x212d0b=this[_0xc82409(0xfd)](_0x3468df,_0x5d9b29);await this[_0xc82409(0x127)](_0x399525+(_0x3043d3+'/'+_0x3043d3+_0xc82409(0x11c)),_0x212d0b,_0x591396),await this[_0xc82409(0x127)](_0x399525+(_0x3043d3+'/'+_0x3043d3+_0xc82409(0x143)),serviceQuery,_0x591396),await this[_0xc82409(0x127)](_0x399525+(_0x3043d3+'/'+_0x3043d3+'-mutation.ts'),serviceMutation,_0x591396);let _0x1463c0=this[_0xc82409(0x122)](_0x5d9b29);await this[_0xc82409(0x127)](_0x399525+(_0x3043d3+'/'+_0x3043d3+'-type.ts'),_0x1463c0,_0x591396);let _0x323a9e=this[_0xc82409(0xcf)](_0x3468df,_0x5d9b29);await this[_0xc82409(0x127)](_0x399525+(_0x3043d3+'/'+_0x3043d3+'-history.ts'),_0x323a9e,_0x591396);let _0x455075='';_0xc82409(0x14b)==_0x3468df[_0xc82409(0x114)]?(_0x455075='\x0a\x20\x20public\x20createHistoryEntity(manager,\x20entity)\x20{\x0a\x20\x20\x20\x20let\x20history\x20=\x20manager.create(this.historyEntity,\x20entity);\x0a\x20\x20\x20\x20history.historyJson\x20=\x20JSON.stringify(entity);\x0a\x20\x20\x20\x20return\x20history;\x0a\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20',await this[_0xc82409(0x127)](_0x399525+(_0x3043d3+_0xc82409(0xd5)),serviceEntitySubscriber,_0x591396)):_0x455075='';let _0x460a42=serviceEntitySubscriber[_0xc82409(0xd4)](/{{entityToJson}}/g,_0x455075);await this[_0xc82409(0x127)](_0x399525+(_0x3043d3+'/event-subscriber.ts'),_0x460a42,_0x591396),await this[_0xc82409(0x127)](_0x399525+(_0x3043d3+'/'+_0x3043d3+_0xc82409(0x148)),serviceHistoryQuery,_0x591396),await this[_0xc82409(0x127)](_0x399525+(_0x3043d3+'/'+_0x3043d3+_0xc82409(0x100)),sereviceHistoryType,_0x591396);let _0x5cb93c=_0x399525+_0xc82409(0xf9);0x0==await this[_0xc82409(0x12c)](_0x5cb93c)&&await this[_0xc82409(0x127)](_0x5cb93c,allIndex,_0x591396);let _0x4e3ca1=await fs['readFileSync'](_0x5cb93c,'utf8');_0x4e3ca1[_0xc82409(0xdf)]('export\x20*\x20from\x20\x27./'+_0x591396[_0xc82409(0x12f)]+'/'+_0x591396[_0xc82409(0x12f)]+_0xc82409(0xdc))<0x0&&(_0x4e3ca1=_0x4e3ca1['replace'](/\/\* EXPORT ENTITY TYPES \*\//,_0xc82409(0x12b)+_0x591396[_0xc82409(0x12f)]+'/'+_0x591396[_0xc82409(0x12f)]+_0xc82409(0xdc))),_0x4e3ca1[_0xc82409(0xdf)](_0xc82409(0x104)+_0x591396[_0xc82409(0x12f)]+'/'+_0x591396['name']+'\x27')<0x0&&(_0x4e3ca1=_0x4e3ca1[_0xc82409(0xd4)](/\/\* EXPORT ENTITY TYPES \*\//,_0xc82409(0x12b)+_0x591396['name']+'/'+_0x591396[_0xc82409(0x12f)]+'\x27')),_0x4e3ca1[_0xc82409(0xdf)](_0xc82409(0x140)+_0x591396[_0xc82409(0x126)]+_0xc82409(0x113)+_0x591396[_0xc82409(0x126)]+_0xc82409(0x111)+_0x591396[_0xc82409(0x126)]+'EntitySubscribers\x20}\x20from\x20\x27./'+_0x591396['name']+'\x27')<0x0&&(_0x4e3ca1=_0x4e3ca1['replace'](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,'/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20'+_0x591396[_0xc82409(0x126)]+_0xc82409(0x113)+_0x591396['pascalCaseName']+_0xc82409(0x111)+_0x591396[_0xc82409(0x126)]+'EntitySubscribers\x20}\x20from\x20\x27./'+_0x591396[_0xc82409(0x12f)]+'\x27')),_0x4e3ca1[_0xc82409(0xdf)](_0xc82409(0x11a)+_0x591396[_0xc82409(0x126)]+_0xc82409(0x136))<0x0&&(_0x4e3ca1=_0x4e3ca1[_0xc82409(0xd4)](/\/\* ENTITIES \*\//,_0xc82409(0x125)+_0x591396['pascalCaseName']+_0xc82409(0x136))),_0x4e3ca1[_0xc82409(0xdf)](_0xc82409(0x11a)+_0x591396['pascalCaseName']+_0xc82409(0x154))<0x0&&(_0x4e3ca1=_0x4e3ca1[_0xc82409(0xd4)](/\/\* RESOLVER CLASSES \*\//,_0xc82409(0xeb)+_0x591396[_0xc82409(0x126)]+'Resolvers,')),_0x4e3ca1['indexOf'](_0xc82409(0x11a)+_0x591396[_0xc82409(0x126)]+_0xc82409(0x150))<0x0&&(_0x4e3ca1=_0x4e3ca1[_0xc82409(0xd4)](/\/\* SUBSCRIBERS \*\//,'/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...'+_0x591396[_0xc82409(0x126)]+_0xc82409(0x150))),await this[_0xc82409(0x127)](_0x5cb93c,_0x4e3ca1,_0x591396);}async['createNoHistoryServiceFiels'](_0x83ec88,_0x4cfa03,_0x3c2997,_0x54ada9,_0x8e3fa7){const _0x4b45b0=a0_0x35bc6a;await this[_0x4b45b0(0x127)](_0x83ec88+(_0x4cfa03+'/index.ts'),serviceIndex,_0x8e3fa7),await this[_0x4b45b0(0x127)](_0x83ec88+(_0x4cfa03+'/'+_0x4cfa03+_0x4b45b0(0x143)),serviceQuery,_0x8e3fa7),await this[_0x4b45b0(0x127)](_0x83ec88+(_0x4cfa03+'/'+_0x4cfa03+_0x4b45b0(0xfb)),serviceMutation,_0x8e3fa7);let _0xe3bfe4=this[_0x4b45b0(0xfd)](_0x3c2997,_0x54ada9);await this[_0x4b45b0(0x127)](_0x83ec88+(_0x4cfa03+'/'+_0x4cfa03+_0x4b45b0(0x11c)),_0xe3bfe4,_0x8e3fa7);let _0x5290cc=this[_0x4b45b0(0x122)](_0x54ada9);await this[_0x4b45b0(0x127)](_0x83ec88+(_0x4cfa03+'/'+_0x4cfa03+_0x4b45b0(0x12d)),_0x5290cc,_0x8e3fa7);let _0x10c711=_0x83ec88+_0x4b45b0(0xf9);0x0==await this['existsPath'](_0x10c711)&&await this[_0x4b45b0(0x127)](_0x10c711,allIndex,_0x8e3fa7);let _0x4460de=await fs[_0x4b45b0(0xfe)](_0x10c711,_0x4b45b0(0x10c));_0x4460de[_0x4b45b0(0xdf)](_0x4b45b0(0x104)+_0x8e3fa7[_0x4b45b0(0x12f)]+'/'+_0x8e3fa7[_0x4b45b0(0x12f)]+'\x27')<0x0&&(_0x4460de=_0x4460de[_0x4b45b0(0xd4)](/\/\* EXPORT ENTITY TYPES \*\//,_0x4b45b0(0x12b)+_0x8e3fa7[_0x4b45b0(0x12f)]+'/'+_0x8e3fa7[_0x4b45b0(0x12f)]+'\x27')),_0x4460de[_0x4b45b0(0xdf)](_0x4b45b0(0x140)+_0x8e3fa7['pascalCaseName']+'Entities,\x20resolvers\x20as\x20'+_0x8e3fa7['pascalCaseName']+_0x4b45b0(0xe1)+_0x8e3fa7['name']+'\x27')<0x0&&(_0x4460de=_0x4460de[_0x4b45b0(0xd4)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x4b45b0(0x13b)+_0x8e3fa7[_0x4b45b0(0x126)]+_0x4b45b0(0x113)+_0x8e3fa7[_0x4b45b0(0x126)]+'Resolvers\x20}\x20from\x20\x27./'+_0x8e3fa7['name']+'\x27')),_0x4460de[_0x4b45b0(0xdf)](_0x4b45b0(0x11a)+_0x8e3fa7['pascalCaseName']+_0x4b45b0(0x136))<0x0&&(_0x4460de=_0x4460de[_0x4b45b0(0xd4)](/\/\* ENTITIES \*\//,_0x4b45b0(0x125)+_0x8e3fa7[_0x4b45b0(0x126)]+_0x4b45b0(0x136))),_0x4460de[_0x4b45b0(0xdf)](_0x4b45b0(0x11a)+_0x8e3fa7[_0x4b45b0(0x126)]+_0x4b45b0(0x154))<0x0&&(_0x4460de=_0x4460de[_0x4b45b0(0xd4)](/\/\* RESOLVER CLASSES \*\//,_0x4b45b0(0xeb)+_0x8e3fa7['pascalCaseName']+'Resolvers,')),await this[_0x4b45b0(0x127)](_0x10c711,_0x4460de,_0x8e3fa7);}[a0_0x35bc6a(0x122)](_0x7b5d1c){const _0x203373=a0_0x35bc6a;let _0x583a63=sereviceType,_0x4dc1a7=_0x7b5d1c['map'](_0x2693ec=>{const _0x538df0=a0_0x5196;if('id'==_0x2693ec[_0x538df0(0x12f)])return'';if(_0x538df0(0x117)==_0x2693ec[_0x538df0(0x12f)])return'';if(_0x538df0(0x142)==_0x2693ec[_0x538df0(0x12f)])return'';if(_0x538df0(0xf1)==_0x2693ec[_0x538df0(0x12f)])return'';if(_0x538df0(0x124)==_0x2693ec[_0x538df0(0x12f)])return'';if('updater_id'==_0x2693ec[_0x538df0(0x12f)])return'';let _0x398fa7=this[_0x538df0(0x151)](_0x2693ec),_0x514c5b=this[_0x538df0(0xcb)](_0x2693ec),_0x475fbe=camelCase(_0x2693ec[_0x538df0(0x12f)]);return'\x20\x20'+(_0x538df0(0x14c)+(0x0==_0x398fa7[_0x538df0(0x101)]?'':_0x538df0(0xd1)+_0x398fa7+',')+_0x538df0(0x138)+_0x2693ec[_0x538df0(0x13e)]+_0x538df0(0xcd))+_0x538df0(0x149)+(''+_0x475fbe+(_0x2693ec[_0x538df0(0x13e)]?'?':'')+':\x20'+_0x514c5b)+'\x0a';});_0x583a63=_0x583a63['replace'](/{{newTypeColumns}}/g,_0x4dc1a7[_0x203373(0x139)]('\x0a'));let _0x576636=_0x7b5d1c[_0x203373(0x11d)](_0x3fdca1=>{const _0x56f299=_0x203373;if('id'==_0x3fdca1['name'])return'';if(_0x56f299(0x117)==_0x3fdca1[_0x56f299(0x12f)])return'';if(_0x56f299(0x142)==_0x3fdca1['name'])return'';if('updated_at'==_0x3fdca1[_0x56f299(0x12f)])return'';if(_0x56f299(0x124)==_0x3fdca1['name'])return'';if(_0x56f299(0x13c)==_0x3fdca1[_0x56f299(0x12f)])return'';let _0x4bfa60=this[_0x56f299(0x151)](_0x3fdca1),_0x12f2d7=this[_0x56f299(0xcb)](_0x3fdca1);_0x3fdca1[_0x56f299(0x13e)]=!0x0;let _0x4d933f=camelCase(_0x3fdca1[_0x56f299(0x12f)]);return'\x20\x20'+(_0x56f299(0x14c)+(0x0==_0x4bfa60[_0x56f299(0x101)]?'':_0x56f299(0xd1)+_0x4bfa60+',')+'\x20{\x20nullable:\x20'+_0x3fdca1['nullable']+'\x20})')+_0x56f299(0x149)+(''+_0x4d933f+(_0x3fdca1[_0x56f299(0x13e)]?'?':'')+':\x20'+_0x12f2d7)+'\x0a';});return _0x583a63=_0x583a63[_0x203373(0xd4)](/{{patchTypeColumns}}/g,_0x576636[_0x203373(0x139)]('\x0a')),_0x583a63;}['createEntityText'](_0xc8017c,_0x189adc){const _0x46d910=a0_0x35bc6a;let _0x2b9a75=serviceEntity,_0x4d0fcd=_0x189adc['sort'](function(_0x1242ac,_0x3aefb1){const _0x5a38ce=a0_0x5196;return _0x1242ac[_0x5a38ce(0xee)]-_0x3aefb1[_0x5a38ce(0xee)];})['map'](_0xb5c68d=>this[_0x46d910(0x134)](_0xb5c68d));[_0x46d910(0x102),'JSON'][_0x46d910(0xf2)](_0xc8017c['dataProp'])&&_0x4d0fcd[_0x46d910(0xd2)](_0x46d910(0xe0)),_0x2b9a75=_0x2b9a75[_0x46d910(0xd4)](/{{entityColumns}}/g,_0x4d0fcd['join']('\x0a'));let _0x3a6bb0='',_0x1143a9=_0x189adc[_0x46d910(0x123)](_0x85b950=>_0x85b950['uniqRank']&&_0x85b950[_0x46d910(0xdb)]>0x0)['sort'](function(_0x19a633,_0x2a2a27){const _0x504c36=_0x46d910;return _0x19a633[_0x504c36(0xdb)]-_0x2a2a27[_0x504c36(0xdb)];});if(_0x1143a9[_0x46d910(0x101)]>0x0){_0x3a6bb0='@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})';let _0x23ac2d=_0x1143a9[_0x46d910(0x11d)](_0x3af980=>{const _0x21325a=_0x46d910;let _0x283352=_0x3af980['name'];return _0x21325a(0x117)==_0x3af980[_0x21325a(0x12f)]&&(_0x283352=_0x21325a(0xd6)),'creator_id'==_0x3af980[_0x21325a(0x12f)]&&(_0x283352='creator'),_0x21325a(0x13c)==_0x3af980[_0x21325a(0x12f)]&&(_0x283352=_0x21325a(0x129)),'{{camelCase\x20name}}.'+camelCase(_0x283352);});_0x3a6bb0=_0x3a6bb0[_0x46d910(0xd4)](/{{indexColumns}}/g,_0x23ac2d['join'](','));}return _0x2b9a75=_0x2b9a75[_0x46d910(0xd4)](/{{indexAnn}}/g,_0x3a6bb0),_0x2b9a75;}['createHistoryEntityText'](_0x419614,_0x1a026e){const _0x385a26=a0_0x35bc6a;let _0x1f8e9e=_0x385a26(0x14b)==_0x419614[_0x385a26(0x114)]?serviceEntityHistJson:serviceEntityHistCopy,_0x1d085=_0x1a026e['sort'](function(_0x1e1f34,_0x432491){const _0x3ce4f0=_0x385a26;return _0x1e1f34[_0x3ce4f0(0xee)]-_0x432491[_0x3ce4f0(0xee)];})[_0x385a26(0x11d)](_0x15c372=>this[_0x385a26(0x134)](_0x15c372));return _0x1f8e9e=_0x1f8e9e[_0x385a26(0xd4)](/{{entityColumns}}/g,_0x1d085[_0x385a26(0x139)]('\x0a')),_0x1f8e9e;}[a0_0x35bc6a(0x134)](_0x6f60ac){const _0x4cb09f=a0_0x35bc6a;if('id'==_0x6f60ac[_0x4cb09f(0x12f)])return'';if(_0x4cb09f(0x117)==_0x6f60ac['name'])return'';if(_0x4cb09f(0x142)==_0x6f60ac[_0x4cb09f(0x12f)])return'';if(_0x4cb09f(0xf1)==_0x6f60ac[_0x4cb09f(0x12f)])return'';if(_0x4cb09f(0x124)==_0x6f60ac[_0x4cb09f(0x12f)])return'';if(_0x4cb09f(0x13c)==_0x6f60ac[_0x4cb09f(0x12f)])return'';let _0x212262=_0x6f60ac[_0x4cb09f(0x131)];_0x4cb09f(0x11f)==_0x6f60ac[_0x4cb09f(0x131)]&&(_0x212262=_0x4cb09f(0xfa)),_0x4cb09f(0xea)==_0x6f60ac[_0x4cb09f(0x131)]&&(_0x212262='bigint'),_0x4cb09f(0xcc)==_0x6f60ac[_0x4cb09f(0x131)]&&(_0x212262=_0x4cb09f(0xe2)),'datetime'==_0x6f60ac[_0x4cb09f(0x131)]&&(_0x212262=_0x4cb09f(0xed));let _0x4f6efe='';'string'==_0x6f60ac[_0x4cb09f(0x131)]&&(_0x4f6efe=_0x6f60ac[_0x4cb09f(0x14d)]);let _0x571cfb=this[_0x4cb09f(0x151)](_0x6f60ac),_0x2a96da=this[_0x4cb09f(0xcb)](_0x6f60ac),_0x236acf=camelCase(_0x6f60ac[_0x4cb09f(0x12f)]);return'\x20\x20'+('@Column({name:\x27'+_0x6f60ac[_0x4cb09f(0x12f)]+'\x27,\x20type:\x20\x27'+_0x212262+_0x4cb09f(0x106)+_0x6f60ac[_0x4cb09f(0x13e)]+'\x20'+(0x0==_0x4f6efe[_0x4cb09f(0x101)]?'':_0x4cb09f(0x103)+_0x4f6efe)+'\x20})')+_0x4cb09f(0x149)+(_0x4cb09f(0x14c)+(0x0==_0x571cfb['length']?'':_0x4cb09f(0xd1)+_0x571cfb+',')+'\x20{\x20nullable:\x20'+_0x6f60ac[_0x4cb09f(0x13e)]+_0x4cb09f(0xcd))+'\x0a\x20\x20'+(''+_0x236acf+(_0x6f60ac['nullable']?'?':'')+':\x20'+_0x2a96da)+'\x0a';}[a0_0x35bc6a(0x151)](_0x3012ec){const _0xde9e43=a0_0x35bc6a;let _0x155531='';return _0xde9e43(0x11f)==_0x3012ec['colType']&&(_0x155531=_0xde9e43(0x144)),'float'==_0x3012ec['colType']&&(_0x155531=_0xde9e43(0x144)),_0xde9e43(0xea)==_0x3012ec[_0xde9e43(0x131)]&&(_0x155531=_0xde9e43(0xde)),_0xde9e43(0x118)==_0x3012ec[_0xde9e43(0x131)]&&(_0x155531='Int'),_0x155531;}[a0_0x35bc6a(0xcb)](_0x7eb0e7){const _0x240cb6=a0_0x35bc6a;let _0x117c84=_0x7eb0e7[_0x240cb6(0x131)];return _0x240cb6(0x13f)==_0x7eb0e7['colType']&&(_0x117c84=_0x240cb6(0xf6)),_0x240cb6(0x11f)==_0x7eb0e7[_0x240cb6(0x131)]&&(_0x117c84=_0x240cb6(0xf6)),'float'==_0x7eb0e7[_0x240cb6(0x131)]&&(_0x117c84=_0x240cb6(0xf6)),_0x240cb6(0x118)==_0x7eb0e7[_0x240cb6(0x131)]&&(_0x117c84=_0x240cb6(0xf6)),_0x240cb6(0xea)==_0x7eb0e7[_0x240cb6(0x131)]&&(_0x117c84=_0x240cb6(0xf6)),'datetime'==_0x7eb0e7[_0x240cb6(0x131)]&&(_0x117c84='Date'),_0x240cb6(0xd8)==_0x7eb0e7[_0x240cb6(0x131)]&&(_0x117c84='Date'),'text'==_0x7eb0e7['colType']&&(_0x117c84=_0x240cb6(0xcc)),_0x117c84;}async[a0_0x35bc6a(0x127)](_0x421f9c,_0x29d69f,_0x210653){const _0x2d7fdf=a0_0x35bc6a;await fs[_0x2d7fdf(0xf4)](_0x421f9c,this[_0x2d7fdf(0x153)](_0x29d69f,_0x210653),_0x2d7fdf(0x10c));}[a0_0x35bc6a(0x153)](_0x2100c6,_0x16d507){const _0x1a7011=a0_0x35bc6a;return _0x2100c6['replace'](/{{pascalCase name}}/g,_0x16d507[_0x1a7011(0x126)])[_0x1a7011(0xd4)](/{{camelCase name}}/g,_0x16d507[_0x1a7011(0x110)])['replace'](/{{snakeCase name}}/g,_0x16d507[_0x1a7011(0x112)])[_0x1a7011(0xd4)](/{{pluralPascalCase name}}/g,_0x16d507['pluralPascalCaseName'])[_0x1a7011(0xd4)](/{{pluralCamelCase name}}/g,_0x16d507[_0x1a7011(0xe4)])[_0x1a7011(0xd4)](/{{name}}/g,_0x16d507[_0x1a7011(0x12f)]);}async['createServicePath'](_0x310fd1,_0x363360,_0x5264b8){const _0x458667=a0_0x35bc6a;let _0x40b6a6=_0x310fd1+_0x458667(0x105);await this[_0x458667(0x116)](_0x40b6a6),_0x40b6a6=_0x40b6a6+'/'+_0x363360,await this['createDir'](_0x40b6a6),_0x40b6a6+=_0x458667(0x146),await this[_0x458667(0x116)](_0x40b6a6),_0x40b6a6+=_0x458667(0x130),await this[_0x458667(0x116)](_0x40b6a6),_0x40b6a6=_0x40b6a6+'/'+_0x5264b8,await this[_0x458667(0x116)](_0x40b6a6);}[a0_0x35bc6a(0x141)](){const _0x211b73=a0_0x35bc6a;let _0x44214c=process['env'][_0x211b73(0xdd)][_0x211b73(0x14e)]('/'),_0x4196a9=[];for(let _0x248493=0x0;_0x248493<_0x44214c[_0x211b73(0x101)]&&_0x211b73(0x11b)!=_0x44214c[_0x248493];_0x248493++)_0x4196a9['push'](_0x44214c[_0x248493]);return _0x4196a9['join']('/');}async['createDir'](_0x156247){const _0x231380=a0_0x35bc6a;0x0==await this[_0x231380(0x12c)](_0x156247)&&fs[_0x231380(0x145)](_0x156247);}async[a0_0x35bc6a(0x12c)](_0x24b30e){const _0x22a5a4=a0_0x35bc6a;return await fs[_0x22a5a4(0x109)](_0x24b30e);}};tslib_1[a0_0x35bc6a(0x13d)]([(0x0,type_graphql_1[a0_0x35bc6a(0x10f)])(_0x1e2735=>Boolean,{'description':a0_0x35bc6a(0xef)}),tslib_1[a0_0x35bc6a(0x120)](0x0,(0x0,type_graphql_1['Arg'])('id')),tslib_1[a0_0x35bc6a(0x120)](0x1,(0x0,type_graphql_1[a0_0x35bc6a(0x108)])()),tslib_1[a0_0x35bc6a(0x13a)](a0_0x35bc6a(0xce),Function),tslib_1[a0_0x35bc6a(0x13a)]('design:paramtypes',[String,Object]),tslib_1[a0_0x35bc6a(0x13a)](a0_0x35bc6a(0x10b),Promise)],OperatoToolCreateService[a0_0x35bc6a(0x137)],'toolCreateService',null),OperatoToolCreateService=tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x35bc6a(0x152)])()],OperatoToolCreateService),exports[a0_0x35bc6a(0xe6)]=OperatoToolCreateService;const allIndex=a0_0x35bc6a(0xe9),serviceIndex='\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}}]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}Mutation]\x0a',serviceHistoryIndex=a0_0x35bc6a(0x155),serviceQuery=a0_0x35bc6a(0xd0),serviceHistoryQuery='\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryList\x20}\x20from\x20\x27./{{name}}-history-type\x27\x0a\x0a@Resolver({{pascalCase\x20name}}History)\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryQuery\x20{\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}History,\x20{\x20description:\x20\x27To\x20fetch\x20a\x20{{pascalCase\x20name}}History\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}History(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}History>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20return\x20await\x20getRepository({{pascalCase\x20name}}History).findOne({\x0a\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20}\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}HistoryList,\x20{\x20description:\x20\x27To\x20fetch\x20multiple\x20{{pluralPascalCase\x20name}}History\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}Histories(@Args()\x20params:\x20ListParam,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}HistoryList>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20queryBuilder\x20=\x20getQueryBuilderFromListParams({\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20params,\x0a\x20\x20\x20\x20\x20\x20repository:\x20await\x20getRepository({{pascalCase\x20name}}History)\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20const\x20[items,\x20total]\x20=\x20await\x20queryBuilder.getManyAndCount()\x0a\x0a\x20\x20\x20\x20return\x20{\x20items,\x20total\x20}\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20Domain)\x0a\x20\x20async\x20domain(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<Domain>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(Domain).findOneBy({id:{{camelCase\x20name}}History.domainId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20updater(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}History.updaterId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20creator(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}History.creatorId})\x0a\x20\x20}\x0a}\x0a',serviceMutation='\x0aimport\x20{\x20Resolver,\x20Mutation,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20In\x20}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20New{{pascalCase\x20name}},\x20{{pascalCase\x20name}}Patch\x20}\x20from\x20\x27./{{name}}-type\x27\x0aimport\x20{\x20getRepository\x20}\x20from\x20\x27@things-factory/shell\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Mutation\x20{\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20create\x20new\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20create{{pascalCase\x20name}}(@Arg(\x27{{camelCase\x20name}}\x27)\x20{{camelCase\x20name}}:\x20New{{pascalCase\x20name}},\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20return\x20await\x20tx.getRepository({{pascalCase\x20name}}).save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20modify\x20{{pascalCase\x20name}}\x20information\x27\x20})\x0a\x20\x20async\x20update{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27id\x27)\x20id:\x20string,\x0a\x20\x20\x20\x20@Arg(\x27patch\x27)\x20patch:\x20{{pascalCase\x20name}}Patch,\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20repository\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20repository.findOne(\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20)\x0a\x0a\x20\x20\x20\x20return\x20await\x20repository.save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20...patch,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20[{{pascalCase\x20name}}],\x20{\x20description:\x20\x22To\x20modify\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20information\x22\x20})\x0a\x20\x20async\x20updateMultiple{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27patches\x27,\x20type\x20=>\x20[{{pascalCase\x20name}}Patch])\x20patches:\x20{{pascalCase\x20name}}Patch[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}[]>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20results\x20=\x20[]\x0a\x20\x20\x20\x20const\x20_createRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27+\x27)\x0a\x20\x20\x20\x20const\x20_updateRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27M\x27)\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}Repo\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x0a\x20\x20\x20\x20if\x20(_createRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_createRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20newRecord\x20=\x20_createRecords[i]\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...newRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27+\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20if\x20(_updateRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_updateRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20updRecord\x20=\x20_updateRecords[i]\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20{{camelCase\x20name}}Repo.findOne({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id:updRecord.id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...updRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27M\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20return\x20results\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20delete{{pascalCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove({\x20domain,\x20id,\x20updater:user\x20})\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20multiple\x20{{camelCase\x20name}}s\x27\x20})\x0a\x20\x20async\x20delete{{pluralPascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27ids\x27,\x20type\x20=>\x20[String])\x20ids:\x20string[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20delEntitis\x20=\x20ids.map(id=>{\x0a\x20\x20\x20\x20\x20\x20return\x20{domain,id,updater:user}\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove(delEntitis)\x0a\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a}\x0a',sereviceType='\x0aimport\x20{\x20ObjectType,\x20Field,\x20InputType,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@InputType()\x0aexport\x20class\x20New{{pascalCase\x20name}}\x20{\x0a{{newTypeColumns}}\x0a}\x0a\x0a@InputType()\x0aexport\x20class\x20{{pascalCase\x20name}}Patch\x20{\x0a\x20\x20@Field(type\x20=>\x20ID,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20id?:\x20string\x0a\x0a{{patchTypeColumns}}\x0a\x0a\x20\x20@Field()\x0a\x20\x20cuFlag:\x20string\x0a}\x0a\x0a@ObjectType()\x0aexport\x20class\x20{{pascalCase\x20name}}List\x20{\x0a\x20\x20@Field(type\x20=>\x20[{{pascalCase\x20name}}])\x0a\x20\x20items:\x20{{pascalCase\x20name}}[]\x0a\x0a\x20\x20@Field(type\x20=>\x20Int)\x0a\x20\x20total:\x20number\x0a}\x0a',sereviceHistoryType='\x0aimport\x20{\x20ObjectType,\x20Field,\x20InputType,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0a\x0a@ObjectType()\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryList\x20{\x0a\x20\x20@Field(type\x20=>\x20[{{pascalCase\x20name}}History])\x0a\x20\x20items:\x20{{pascalCase\x20name}}History[]\x0a\x0a\x20\x20@Field(type\x20=>\x20Int)\x0a\x20\x20total:\x20number\x0a}\x0a',serviceEntity=a0_0x35bc6a(0xd3),serviceEntityHistCopy=a0_0x35bc6a(0xff),serviceEntityHistJson=a0_0x35bc6a(0xd7),serviceEntitySubscriber=a0_0x35bc6a(0xf5);function a0_0x3136(){const _0x3f5761=['replace','/event-subscriber.ts','domain','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity()\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a\x20\x20@Column(\x27simple-json\x27,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20@Field(type\x20=>\x20ScalarObject,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20historyJson?:\x20any\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','date','2477030kbbShi','createServiceFiles','uniqRank','-history\x27','PWD','Int','indexOf','\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201','Resolvers\x20}\x20from\x20\x27./','character\x20varying','state','pluralCamelCaseName','pluralize','OperatoToolCreateService','1506UWkTNJ','/server/service/','\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','long','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','createHistoryServiceFiles','timestamp\x20without\x20time\x20zone','rank','Operato\x20Tool\x20Create\x20Service','/packages/','updated_at','includes','1209268VLnXyA','writeFileSync','\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','number','getRepository','toolCreateService','index.ts','double\x20precision','-mutation.ts','957064McyoNX','createEntityText','readFileSync','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity()\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','-history-type.ts','length','COPY',',length:','export\x20*\x20from\x20\x27./','/packages','\x27,\x20nullable:\x20','defineProperty','Ctx','existsSync','createServicePath','design:returntype','utf8','@things-factory/shell','findOne','Query','camelCaseName','Resolvers,\x20subscribers\x20as\x20','snakeCaseName','Entities,\x20resolvers\x20as\x20','dataProp','tslib','createDir','domain_id','integer','243Ccxdca','...','packages','.ts','map','953974LIwiqP','double','__param','1038339XqiQfY','createTypeText','filter','creator_id','/*\x20ENTITIES\x20*/\x0a\x09...','pascalCaseName','writeFile','3466596SdlDpS','updater','/index.ts','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','existsPath','-type.ts','lodash','name','/service','colType','@things-factory/resource-base','5LmhqzB','columnToEntityColumn','9wZlZLe','Entities,','prototype','\x20{\x20nullable:\x20','join','__metadata','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','updater_id','__decorate','nullable','decimal','import\x20{\x20entities\x20as\x20','getProjectRootPath','created_at','-query.ts','Float','mkdirSync','/server','EntityColumn','-history-query.ts','\x0a\x20\x20','Entity','JSON','@Field(','colSize','split','__esModule','EntitySubscribers,','getFieldType','Resolver','replaceNamesMap','Resolvers,','\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','getColTxtType','string','\x20})','design:type','createHistoryEntityText','\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','type\x20=>','push','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20Domain\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0a@Entity()\x0a{{indexAnn}}\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}\x20{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a'];a0_0x3136=function(){return _0x3f5761;};return a0_0x3136();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';function a0_0x3414(){const _0x3509d9=['where','checkStudioTemplateIsOverLimit','Menu','select','andWhere','includes','checkTarget','3196gvNZAJ','menu','getRepository','../../errors/license-error','forEach','from','map','OVER_LIMIT','manager','7480287zXgkNN','439758MKmIJO','trim','942UhSaWP','Studio','defineProperty','@things-factory/menu-base','ERROR_CODES','createQueryBuilder','371mTmTfn','16398uVgLHh','241030XYzkGR','@things-factory/shell','getPermission','LicenseError','1309205EpcHbY','1200584CoOuLT','split','getCount','checkStudioPermission'];a0_0x3414=function(){return _0x3509d9;};return a0_0x3414();}const a0_0x1fbf11=a0_0x4df3;(function(_0x477e06,_0x57c016){const _0x5eaab1=a0_0x4df3,_0x1b7900=_0x477e06();while(!![]){try{const _0x563aa6=parseInt(_0x5eaab1(0xb8))/0x1+parseInt(_0x5eaab1(0xae))/0x2+parseInt(_0x5eaab1(0xb0))/0x3*(parseInt(_0x5eaab1(0xc8))/0x4)+parseInt(_0x5eaab1(0xbc))/0x5+-parseInt(_0x5eaab1(0xb7))/0x6*(parseInt(_0x5eaab1(0xb6))/0x7)+parseInt(_0x5eaab1(0xbd))/0x8+-parseInt(_0x5eaab1(0xad))/0x9;if(_0x563aa6===_0x57c016)break;else _0x1b7900['push'](_0x1b7900['shift']());}catch(_0x202611){_0x1b7900['push'](_0x1b7900['shift']());}}}(a0_0x3414,0x24105));Object[a0_0x1fbf11(0xb2)](exports,'__esModule',{'value':!0x0}),exports[a0_0x1fbf11(0xc2)]=exports[a0_0x1fbf11(0xc0)]=void 0x0;const operato_license_checker_1=require('@things-factory/operato-license-checker'),shell_1=require(a0_0x1fbf11(0xb9)),menu_base_1=require(a0_0x1fbf11(0xb3)),license_error_1=require(a0_0x1fbf11(0xcb));function a0_0x4df3(_0xa03660,_0x22d4b0){const _0x3414e3=a0_0x3414();return a0_0x4df3=function(_0x4df382,_0x2613d8){_0x4df382=_0x4df382-0xa8;let _0x3d967e=_0x3414e3[_0x4df382];return _0x3d967e;},a0_0x4df3(_0xa03660,_0x22d4b0);}async function checkStudioPermission(){const _0x3218b6=a0_0x1fbf11;let _0x537c41=((0x0,operato_license_checker_1[_0x3218b6(0xba)])('Permissions\x20For\x20Tailor\x20Tool')||',')[_0x3218b6(0xbe)](',')[_0x3218b6(0xaa)](_0x569d9a=>_0x569d9a[_0x3218b6(0xaf)]()),_0x51b0b2=!0x1;return _0x537c41[_0x3218b6(0xa8)](_0x31a7df=>{const _0x4ef0a5=_0x3218b6;_0x31a7df[_0x4ef0a5(0xc6)](_0x4ef0a5(0xb1))&&(_0x51b0b2=!0x0);}),_0x51b0b2;}async function checkStudioTemplateIsOverLimit(_0x4daf0b,_0x433268){const _0x20b0d7=a0_0x1fbf11;if(0x0==await checkStudioPermission())throw new license_error_1[(_0x20b0d7(0xbb))]({'errorCode':_0x433268['t'](license_error_1[_0x20b0d7(0xbb)][_0x20b0d7(0xb4)]['INVALID_LICENSE'])});var _0x4fc456=0x0;if(_0x4fc456=_0x4daf0b&&''!=_0x4daf0b?await(0x0,shell_1[_0x20b0d7(0xca)])(menu_base_1[_0x20b0d7(0xc3)])[_0x20b0d7(0xac)][_0x20b0d7(0xb5)]()[_0x20b0d7(0xc4)](_0x20b0d7(0xc9))[_0x20b0d7(0xa9)](menu_base_1[_0x20b0d7(0xc3)],'menu')['where']('id\x20!=\x20:id',{'id':_0x4daf0b})[_0x20b0d7(0xc5)]('(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)')[_0x20b0d7(0xbf)]()+0x1:await(0x0,shell_1[_0x20b0d7(0xca)])(menu_base_1['Menu'])[_0x20b0d7(0xac)][_0x20b0d7(0xb5)]()[_0x20b0d7(0xc4)](_0x20b0d7(0xc9))[_0x20b0d7(0xa9)](menu_base_1['Menu'],_0x20b0d7(0xc9))[_0x20b0d7(0xc1)]('(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)')[_0x20b0d7(0xbf)]()+0x1,!(0x0,operato_license_checker_1[_0x20b0d7(0xc7)])(_0x4fc456))throw new license_error_1['LicenseError']({'errorCode':_0x433268['t'](license_error_1['LicenseError'][_0x20b0d7(0xb4)][_0x20b0d7(0xab)])});return!0x0;}exports[a0_0x1fbf11(0xc0)]=checkStudioPermission,exports[a0_0x1fbf11(0xc2)]=checkStudioTemplateIsOverLimit;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';const a0_0x2718a7=a0_0x379e;function a0_0x20a8(){const _0x40050f=['Ctx','defineProperty','__decorate','Arg','checkStudioTemplateIsOverLimit','__param','__metadata','Operato\x20Tool\x20Studio\x20Usage\x20Permissions','2ERJrxI','tslib','2257110cboJhc','prototype','Resolver','4179tpvHOD','design:paramtypes','5610bRNgWO','899049JYWqLK','454470XiaTQj','design:type','OperatoToolResolver','2316620MUAdrA','3920776IOPkDe','630272DcUYMI','27mWlImA','checkStudioPermission','Query','Operato\x20Tool\x20Studio\x20Limit\x20check','./tool-permission','studioTemplateIsOverLimit'];a0_0x20a8=function(){return _0x40050f;};return a0_0x20a8();}(function(_0x26e932,_0x17962b){const _0x335867=a0_0x379e,_0x3e1d59=_0x26e932();while(!![]){try{const _0x3c83a6=-parseInt(_0x335867(0x1c7))/0x1*(parseInt(_0x335867(0x1bf))/0x2)+parseInt(_0x335867(0x1c1))/0x3+parseInt(_0x335867(0x1cc))/0x4+parseInt(_0x335867(0x1c8))/0x5+-parseInt(_0x335867(0x1c6))/0x6*(-parseInt(_0x335867(0x1c4))/0x7)+-parseInt(_0x335867(0x1cd))/0x8+-parseInt(_0x335867(0x1ce))/0x9*(parseInt(_0x335867(0x1cb))/0xa);if(_0x3c83a6===_0x17962b)break;else _0x3e1d59['push'](_0x3e1d59['shift']());}catch(_0x24f30e){_0x3e1d59['push'](_0x3e1d59['shift']());}}}(a0_0x20a8,0xad0e2));Object[a0_0x2718a7(0x1d5)](exports,'__esModule',{'value':!0x0}),exports['OperatoToolResolver']=void 0x0;function a0_0x379e(_0x385087,_0x44e4c5){const _0x20a8ea=a0_0x20a8();return a0_0x379e=function(_0x379e74,_0x510dfe){_0x379e74=_0x379e74-0x1b9;let _0x15367b=_0x20a8ea[_0x379e74];return _0x15367b;},a0_0x379e(_0x385087,_0x44e4c5);}const tslib_1=require(a0_0x2718a7(0x1c0)),type_graphql_1=require('type-graphql'),tool_permission_1=require(a0_0x2718a7(0x1d2));let OperatoToolResolver=class{async['studioPermission'](_0x5ab354){const _0x3b9abf=a0_0x2718a7;return(0x0,tool_permission_1[_0x3b9abf(0x1cf)])();}async[a0_0x2718a7(0x1d3)](_0x5b5836,_0x34c2d4){const _0x2e59ed=a0_0x2718a7;return(0x0,tool_permission_1[_0x2e59ed(0x1bb)])(_0x5b5836,_0x34c2d4);}};tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x2718a7(0x1d0)])(_0x49ad0b=>Boolean,{'description':a0_0x2718a7(0x1be)}),tslib_1['__param'](0x0,(0x0,type_graphql_1[a0_0x2718a7(0x1d4)])()),tslib_1[a0_0x2718a7(0x1bd)]('design:type',Function),tslib_1[a0_0x2718a7(0x1bd)]('design:paramtypes',[Object]),tslib_1['__metadata']('design:returntype',Promise)],OperatoToolResolver[a0_0x2718a7(0x1c2)],'studioPermission',null),tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x2718a7(0x1d0)])(_0x182f7a=>Boolean,{'description':a0_0x2718a7(0x1d1)}),tslib_1[a0_0x2718a7(0x1bc)](0x0,(0x0,type_graphql_1[a0_0x2718a7(0x1ba)])('id')),tslib_1[a0_0x2718a7(0x1bc)](0x1,(0x0,type_graphql_1['Ctx'])()),tslib_1[a0_0x2718a7(0x1bd)](a0_0x2718a7(0x1c9),Function),tslib_1[a0_0x2718a7(0x1bd)](a0_0x2718a7(0x1c5),[String,Object]),tslib_1[a0_0x2718a7(0x1bd)]('design:returntype',Promise)],OperatoToolResolver['prototype'],a0_0x2718a7(0x1d3),null),OperatoToolResolver=tslib_1[a0_0x2718a7(0x1b9)]([(0x0,type_graphql_1[a0_0x2718a7(0x1c3)])()],OperatoToolResolver),exports[a0_0x2718a7(0x1ca)]=OperatoToolResolver;
|