@things-factory/operato-tools 6.1.19 → 6.1.20
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 +4 -4
- 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';function a0_0x48f8(_0x2b8c94,_0x309b22){const _0x40e8fe=a0_0x40e8();return a0_0x48f8=function(_0x48f86f,_0x4d78fb){_0x48f86f=_0x48f86f-0x1b3;let _0x26096e=_0x40e8fe[_0x48f86f];return _0x26096e;},a0_0x48f8(_0x2b8c94,_0x309b22);}function a0_0x40e8(){const _0x20ea2e=['__esModule','20VTUuRP','314996GtjRIN','2JnfcEU','assign','name','459OqTzXv','25552GGyRro','1846137ByEjpD','12919968uzFdaW','license-error','4520qSYUTm','defineProperty','42bKEOav','__importStar','detail','117036XBhRXP','../constants/error-code','9878cJhjHl','tslib','331536yseJvU','errorCode','ERROR_CODES'];a0_0x40e8=function(){return _0x20ea2e;};return a0_0x40e8();}const a0_0x4d374a=a0_0x48f8;(function(_0x35e05e,_0x1a25bc){const _0xa20099=a0_0x48f8,_0x15d74c=_0x35e05e();while(!![]){try{const _0x20fe64=-parseInt(_0xa20099(0x1c4))/0x1*(-parseInt(_0xa20099(0x1c3))/0x2)+parseInt(_0xa20099(0x1c9))/0x3+parseInt(_0xa20099(0x1ba))/0x4*(-parseInt(_0xa20099(0x1c2))/0x5)+parseInt(_0xa20099(0x1be))/0x6*(parseInt(_0xa20099(0x1b7))/0x7)+-parseInt(_0xa20099(0x1c8))/0x8*(parseInt(_0xa20099(0x1c7))/0x9)+parseInt(_0xa20099(0x1b5))/0xa*(parseInt(_0xa20099(0x1bc))/0xb)+-parseInt(_0xa20099(0x1b3))/0xc;if(_0x20fe64===_0x1a25bc)break;else _0x15d74c['push'](_0x15d74c['shift']());}catch(_0x5115dd){_0x15d74c['push'](_0x15d74c['shift']());}}}(a0_0x40e8,0x4bfad));Object[a0_0x4d374a(0x1b6)](exports,a0_0x4d374a(0x1c1),{'value':!0x0}),exports['LicenseError']=void 0x0;const tslib_1=require(a0_0x4d374a(0x1bd)),ERROR_CODES=tslib_1[a0_0x4d374a(0x1b8)](require(a0_0x4d374a(0x1bb)));class LicenseError extends Error{static get[a0_0x4d374a(0x1c0)](){const _0xbd60ec=a0_0x4d374a;return Object[_0xbd60ec(0x1c5)]({},ERROR_CODES);}constructor({errorCode:_0x57fbad,detail:_0x11ee0c}){const _0x1f3620=a0_0x4d374a;super(_0x57fbad),this[_0x1f3620(0x1c6)]=_0x1f3620(0x1b4),this[_0x1f3620(0x1bf)]=_0x57fbad,this[_0x1f3620(0x1b9)]=_0x11ee0c;}}exports['LicenseError']=LicenseError;
|
package/server/routes.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a0_0x31c7(_0x3c89d3,_0x3c0c3e){const _0x7a5c23=a0_0x7a5c();return a0_0x31c7=function(_0x31c714,_0x251774){_0x31c714=_0x31c714-0x1a2;let _0xb2acbe=_0x7a5c23[_0x31c714];return _0xb2acbe;},a0_0x31c7(_0x3c89d3,_0x3c0c3e);}function a0_0x7a5c(){const _0xbf0d7d=['debug','3277895bqyUfY','220284jqZhTn','8141yrfYEe','bootstrap-module-domain-public-route','5977305QZMynt','345252jgpEeC','152EPdFrD','965043GpGIOY','bootstrap-module-global-public-route','things-factory:operato-tools:routes','934972SEUtFI','bootstrap-module-global-private-route','bootstrap-module-domain-private-route','6nDZRSz'];a0_0x7a5c=function(){return _0xbf0d7d;};return a0_0x7a5c();}const a0_0x4f7b4f=a0_0x31c7;(function(_0x2410b9,_0x20d26c){const _0x485e14=a0_0x31c7,_0x37add5=_0x2410b9();while(!![]){try{const _0x21b01c=parseInt(_0x485e14(0x1ac))/0x1+parseInt(_0x485e14(0x1a8))/0x2+-parseInt(_0x485e14(0x1ae))/0x3+parseInt(_0x485e14(0x1a2))/0x4+parseInt(_0x485e14(0x1a7))/0x5*(-parseInt(_0x485e14(0x1a5))/0x6)+-parseInt(_0x485e14(0x1a9))/0x7*(parseInt(_0x485e14(0x1ad))/0x8)+parseInt(_0x485e14(0x1ab))/0x9;if(_0x21b01c===_0x20d26c)break;else _0x37add5['push'](_0x37add5['shift']());}catch(_0x567d14){_0x37add5['push'](_0x37add5['shift']());}}}(a0_0x7a5c,0x56685));const debug=require(a0_0x4f7b4f(0x1a6))(a0_0x4f7b4f(0x1b0));process['on'](a0_0x4f7b4f(0x1af),(_0x2966e8,_0x560baa)=>{}),process['on'](a0_0x4f7b4f(0x1a3),(_0x189898,_0x33e5de)=>{}),process['on'](a0_0x4f7b4f(0x1aa),(_0x43e357,_0x4025a0)=>{}),process['on'](a0_0x4f7b4f(0x1a4),(_0x140da9,_0x4c3dd8)=>{});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x5e1303=a0_0x4d0a;(function(_0x21f7e2,_0x551ce8){const _0x1e9a1b=a0_0x4d0a,_0x36e0d5=_0x21f7e2();while(!![]){try{const _0x4ea5be=parseInt(_0x1e9a1b(0x1da))/0x1+parseInt(_0x1e9a1b(0x1ff))/0x2*(-parseInt(_0x1e9a1b(0x1eb))/0x3)+-parseInt(_0x1e9a1b(0x1f3))/0x4*(parseInt(_0x1e9a1b(0x227))/0x5)+-parseInt(_0x1e9a1b(0x1d9))/0x6+parseInt(_0x1e9a1b(0x1f7))/0x7*(-parseInt(_0x1e9a1b(0x1ed))/0x8)+parseInt(_0x1e9a1b(0x22b))/0x9+parseInt(_0x1e9a1b(0x212))/0xa*(parseInt(_0x1e9a1b(0x214))/0xb);if(_0x4ea5be===_0x551ce8)break;else _0x36e0d5['push'](_0x36e0d5['shift']());}catch(_0x517cb7){_0x36e0d5['push'](_0x36e0d5['shift']());}}}(a0_0x1e00,0x2e129));function a0_0x4d0a(_0x2c7af2,_0x418484){const _0x1e00e1=a0_0x1e00();return a0_0x4d0a=function(_0x4d0a81,_0x564597){_0x4d0a81=_0x4d0a81-0x1d0;let _0x10812a=_0x1e00e1[_0x4d0a81];return _0x10812a;},a0_0x4d0a(_0x2c7af2,_0x418484);}Object[a0_0x5e1303(0x211)](exports,'__esModule',{'value':!0x0}),exports[a0_0x5e1303(0x20d)]=void 0x0;const tslib_1=require(a0_0x5e1303(0x1f4)),type_graphql_1=require(a0_0x5e1303(0x233)),resource_base_1=require(a0_0x5e1303(0x1ef)),menu_base_1=require('@things-factory/menu-base'),tool_permission_1=require('./../tool-secret/tool-permission'),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x5e1303(0x1e5)),{plural:plural}=require(a0_0x5e1303(0x232)),crypto_1=tslib_1[a0_0x5e1303(0x209)](require('crypto'));let OperatoToolCreateMenu=class{async[a0_0x5e1303(0x1d0)](_0x2d2f2e,_0x1b731a,_0x1d60f4){const _0x348709=a0_0x5e1303,{domain:_0x94bef4,user:_0x30f80f,tx:_0x30be81}=_0x1d60f4[_0x348709(0x217)];await(0x0,tool_permission_1[_0x348709(0x1dd)])('',_0x1d60f4);const _0x3440fe=await _0x30be81[_0x348709(0x230)](resource_base_1[_0x348709(0x24a)])[_0x348709(0x249)]({'where':{'domain':{'id':_0x94bef4['id']},'id':_0x2d2f2e}}),_0x1a67f8=await _0x30be81[_0x348709(0x230)](resource_base_1[_0x348709(0x1f8)])[_0x348709(0x234)]({'where':{'domain':{'id':_0x94bef4['id']},'entity':{'id':_0x3440fe['id']}}});let {name:_0x8474a0=''}=_0x3440fe||{},_0x20c3c1=kebabCase(_0x8474a0),_0x4d9e14=modelTemplate[_0x348709(0x226)](/{{pascalCase name}}/g,startCase(camelCase(_0x8474a0))[_0x348709(0x226)](/ /g,''))[_0x348709(0x226)](/{{camelCase name}}/g,camelCase(_0x8474a0))[_0x348709(0x226)](/{{snakeCase name}}/g,snakeCase(_0x8474a0))['replace'](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x8474a0)))[_0x348709(0x226)](/ /g,''))['replace'](/{{pluralCamelCase name}}/g,camelCase(plural(_0x8474a0)))[_0x348709(0x226)](/{{name}}/g,_0x8474a0),_0x38ce05='';_0x348709(0x20b)==_0x3440fe[_0x348709(0x239)]?_0x38ce05='\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':_0x348709(0x213)==_0x3440fe[_0x348709(0x239)]&&(_0x38ce05=_0x348709(0x231)),_0x4d9e14=_0x4d9e14[_0x348709(0x226)](/{{HistoryButton}}/g,_0x38ce05);let _0xdcb62d=this[_0x348709(0x1fb)](_0x1a67f8);_0x4d9e14=_0x4d9e14['replace'](/{{SortColumns}}/g,_0xdcb62d[_0x348709(0x207)](','));let _0x343d20=this[_0x348709(0x210)](_0x1a67f8);_0x4d9e14=_0x4d9e14[_0x348709(0x226)](/{{SearchColumns}}/g,_0x343d20[_0x348709(0x207)](','));let _0xc4c978=this['createGridColumns'](_0x1a67f8);return _0x4d9e14=_0x4d9e14[_0x348709(0x226)](/{{GridColumns}}/g,_0xc4c978[_0x348709(0x207)](',')),_0x4d9e14=this['enc'](_0x4d9e14),await this[_0x348709(0x1e1)](_0x30be81,_0x94bef4,_0x30f80f,_0x1b731a,_0x20c3c1,_0x4d9e14),!0x0;}[a0_0x5e1303(0x1ec)](_0x3ac5cb){const _0x140ff0=a0_0x5e1303;return _0x3ac5cb[_0x140ff0(0x244)](_0x1b68d5=>'id'!=_0x1b68d5['name']&&_0x1b68d5[_0x140ff0(0x1fd)]>0x0)[_0x140ff0(0x204)](function(_0x51a251,_0x4bf1cc){const _0x47ed7c=_0x140ff0;return _0x51a251[_0x47ed7c(0x1fd)]-_0x4bf1cc[_0x47ed7c(0x1fd)];})[_0x140ff0(0x22f)](_0x379b9c=>{const _0x1a33f9=_0x140ff0;let {gridEditor:_0x1e9227='string',name:_0x53fc80,term:_0x424fc7,gridWidth:_0x92422f=0x0,gridAlign:_0x338de7=_0x1a33f9(0x203),nullable:_0x3d18ca=!0x1}=_0x379b9c;if(null==_0x1e9227&&(_0x1e9227=_0x1a33f9(0x238)),null==_0x338de7&&(_0x338de7='left'),_0x1a33f9(0x248)==_0x53fc80||'creator_id'==_0x53fc80)return _0x53fc80=_0x1a33f9(0x248)==_0x53fc80?_0x1a33f9(0x224):_0x1a33f9(0x225),_0x1a33f9(0x1d4)+_0x53fc80+_0x1a33f9(0x23c)+_0x53fc80+_0x1a33f9(0x20a);if(_0x1a33f9(0x1d6)==_0x53fc80||_0x1a33f9(0x1d7)==_0x53fc80)return _0x1a33f9(0x21c)+('updated_at'==_0x53fc80?'updatedAt':'createdAt')+'\x22,\x22header\x22:\x20\x22'+_0x53fc80+'\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}';let _0x193db0=_0x1a33f9(0x1d2)!=_0x1e9227&&_0x1a33f9(0x1dc)!=_0x1e9227,_0x2e83fa='hidden'==_0x1e9227;0x1!=_0x2e83fa&&0x0!=_0x193db0||(_0x1e9227=_0x1a33f9(0x238));let _0x34fc16=_0x1a33f9(0x236)+_0x1e9227+_0x1a33f9(0x1d5)+camelCase(_0x53fc80)+_0x1a33f9(0x23c)+_0x424fc7+_0x1a33f9(0x23a)+_0x2e83fa+_0x1a33f9(0x246)+_0x193db0+_0x1a33f9(0x215)+!_0x3d18ca+_0x1a33f9(0x1fe)+_0x338de7+_0x1a33f9(0x1e7)+_0x92422f+_0x1a33f9(0x23d);return _0x1a33f9(0x21f)==_0x379b9c[_0x1a33f9(0x1f5)]&&(_0x34fc16+=_0x1a33f9(0x1ea)+_0x379b9c['refName']+'\x22}'),_0x1a33f9(0x1e8)==_0x379b9c['refType']&&(_0x34fc16+=_0x1a33f9(0x22e)+_0x379b9c[_0x1a33f9(0x1f6)]+'\x22}'),'entity'==_0x379b9c[_0x1a33f9(0x1f5)]&&(_0x34fc16+=_0x1a33f9(0x22d)+camelCase(plural(_0x379b9c[_0x1a33f9(0x1f6)]))+_0x1a33f9(0x218)),_0x34fc16+='}',_0x34fc16;});}['createSearchCols'](_0x1b26d0){const _0x384086=a0_0x5e1303;return _0x1b26d0['filter'](_0xfd4b17=>_0xfd4b17['searchRank']>0x0)[_0x384086(0x204)](function(_0x1aa4bc,_0x4b1580){const _0x29c9c8=_0x384086;return _0x1aa4bc[_0x29c9c8(0x200)]-_0x4b1580['searchRank'];})[_0x384086(0x22f)](_0x4b5e33=>{const _0x2f00b8=_0x384086;let _0x1402f4=_0x4b5e33[_0x2f00b8(0x241)];return'filter'==_0x1402f4?'\x22'+camelCase(_0x4b5e33['name'])+'\x22':(_0x1402f4||(_0x1402f4='eq'),_0x2f00b8(0x1e0)+camelCase(_0x4b5e33['name'])+_0x2f00b8(0x1e2)+_0x1402f4+'\x22}');});}[a0_0x5e1303(0x1fb)](_0x225fb0){const _0x408f59=a0_0x5e1303;return _0x225fb0[_0x408f59(0x244)](_0x2e0b47=>_0x2e0b47['sortRank']>0x0)[_0x408f59(0x204)](function(_0x43dc6b,_0x36c613){const _0x38c132=_0x408f59;return _0x43dc6b[_0x38c132(0x247)]-_0x36c613[_0x38c132(0x247)];})[_0x408f59(0x22f)](_0x4fcd30=>_0x408f59(0x228)+camelCase(_0x4fcd30[_0x408f59(0x223)])+_0x408f59(0x235)+_0x4fcd30[_0x408f59(0x23b)]+'}');}async[a0_0x5e1303(0x1e1)](_0x5e68d5,_0x28b6f6,_0x47af38,_0x31e897,_0x4048bf,_0x3b245a){const _0x362ddf=a0_0x5e1303;let _0x92077e=await _0x5e68d5[_0x362ddf(0x230)](menu_base_1[_0x362ddf(0x221)])[_0x362ddf(0x249)]({'where':{'domain':{'id':_0x28b6f6['id']},'id':_0x31e897}}),_0x461b7c=(await _0x5e68d5['getRepository'](menu_base_1[_0x362ddf(0x221)])[_0x362ddf(0x206)]('select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27'+_0x31e897+'\x27\x20or\x20id\x20=\x20\x27'+_0x31e897+'\x27'))[0x0]['rank']+0xa,_0x383ac6=new menu_base_1[(_0x362ddf(0x221))]();_0x383ac6[_0x362ddf(0x223)]=_0x4048bf,_0x383ac6['menuType']=_0x362ddf(0x219),_0x383ac6[_0x362ddf(0x1fc)]=_0x362ddf(0x1e4),_0x383ac6[_0x362ddf(0x21e)]=_0x461b7c,_0x383ac6['hiddenFlag']=!0x1,_0x383ac6['routing']=_0x4048bf,_0x383ac6[_0x362ddf(0x22c)]=_0x3b245a,_0x383ac6[_0x362ddf(0x20c)]=_0x362ddf(0x202),_0x383ac6['parent']=_0x92077e,await _0x5e68d5[_0x362ddf(0x230)](menu_base_1[_0x362ddf(0x221)])[_0x362ddf(0x1e9)](Object[_0x362ddf(0x1d3)](Object[_0x362ddf(0x1d3)]({},_0x383ac6),{'domain':_0x28b6f6,'creator':_0x47af38,'updater':_0x47af38}));}['enc'](_0x136481){const _0x57ade8=a0_0x5e1303;let _0x5fddb5=JSON[_0x57ade8(0x1f9)](_0x136481)['split'](/(.{100})/)[_0x57ade8(0x244)](_0x7b795a=>_0x7b795a),_0x39c06e=[_0x57ade8(0x20e),'aes-256-cbc',_0x57ade8(0x201),_0x57ade8(0x1e3),_0x57ade8(0x240),_0x57ade8(0x1f1),_0x57ade8(0x1de),_0x57ade8(0x245)],_0x2221e7=crypto_1[_0x57ade8(0x1d1)][_0x57ade8(0x1ee)](0x20)['toString'](_0x57ade8(0x1fa)),_0x57f7ae=Buffer[_0x57ade8(0x1d8)](_0x2221e7,'hex'),_0x112856=_0x2221e7[_0x57ade8(0x23f)](0x0,0x10),_0x5e7b27=['',_0x112856,_0x112856,_0x112856,_0x112856,_0x112856,_0x112856,_0x112856],_0x431257=0x0,_0x566262=[];_0x566262[_0x57ade8(0x20f)](_0x2221e7);for(var _0x375e8f=0x0;_0x375e8f<_0x5fddb5['length'];_0x375e8f++,_0x431257++){_0x431257==_0x39c06e['length']&&(_0x431257=0x0);let _0x3e1a78=crypto_1['default'][_0x57ade8(0x22a)](_0x39c06e[_0x431257],_0x57f7ae,_0x5e7b27[_0x431257]),_0x56235c=_0x3e1a78['update'](_0x5fddb5[_0x375e8f],_0x57ade8(0x229),_0x57ade8(0x1fa));_0x56235c+=_0x3e1a78[_0x57ade8(0x1f0)](_0x57ade8(0x1fa)),_0x566262['push'](_0x56235c);}return _0x566262[_0x57ade8(0x207)](_0x57ade8(0x1db));}};tslib_1[a0_0x5e1303(0x242)]([(0x0,type_graphql_1[a0_0x5e1303(0x21a)])(a0_0x5e1303(0x1f2)),(0x0,type_graphql_1[a0_0x5e1303(0x205)])(_0x27a97=>Boolean,{'description':a0_0x5e1303(0x220)}),tslib_1[a0_0x5e1303(0x208)](0x0,(0x0,type_graphql_1[a0_0x5e1303(0x237)])('id')),tslib_1[a0_0x5e1303(0x208)](0x1,(0x0,type_graphql_1['Arg'])('parent_menu_id')),tslib_1[a0_0x5e1303(0x208)](0x2,(0x0,type_graphql_1[a0_0x5e1303(0x216)])()),tslib_1[a0_0x5e1303(0x222)](a0_0x5e1303(0x23e),Function),tslib_1[a0_0x5e1303(0x222)](a0_0x5e1303(0x1e6),[String,String,Object]),tslib_1[a0_0x5e1303(0x222)](a0_0x5e1303(0x243),Promise)],OperatoToolCreateMenu[a0_0x5e1303(0x21b)],a0_0x5e1303(0x1d0),null),OperatoToolCreateMenu=tslib_1[a0_0x5e1303(0x242)]([(0x0,type_graphql_1[a0_0x5e1303(0x21d)])()],OperatoToolCreateMenu),exports[a0_0x5e1303(0x20d)]=OperatoToolCreateMenu;function a0_0x1e00(){const _0x1c54dc=['substring','aes-256-cfb1','searchOper','__decorate','design:returntype','filter','aes256','\x20,\x22editable\x22:\x20','sortRank','updater_id','findOne','Entity','toolCreateMenu','default','readonly','assign','{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22','\x22,\x22name\x22:\x20\x22','updated_at','created_at','from','908208nlHdqt','262581ZnFpzM','h1z0q9i9x7q6','hidden','checkStudioTemplateIsOverLimit','aes-256-ctr','\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','{\x22name\x22:\x20\x22','createMenuData','\x22,\x22operator\x22:\x20\x22','aes-256-cfb8','meta-grist-page','lodash','design:paramtypes','\x22,\x22width\x22:','scenario','save',',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22','155742aAdahX','createGridColumns','1574864ILbVIz','randomBytes','@things-factory/resource-base','final','aes-256-ofb','@transaction','4QYEVwb','tslib','refType','refName','7kFHokF','EntityColumn','stringify','hex','createSortCols','category','gridRank',',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22','4kvPSrg','searchRank','aes-256-cfb','@things-factory/meta-ui/client/pages/meta-grist-page','left','sort','Mutation','query','join','__param','__importDefault','\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}','JSON','resourceUrl','OperatoToolCreateMenu','aes-256-ecb','push','createSearchCols','defineProperty','3210QyWZYY','COPY','10263fkpxpz',',\x22mandatory\x22:\x20','Ctx','state','\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}','SCREEN','Directive','prototype','{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22','Resolver','rank','code','Operato\x20Tool\x20Create\x20Menu','Menu','__metadata','name','updater','creator','replace','347265HVFRRO','{\x22name\x22:\x22','utf8','createCipheriv','1333314uzHoOz','template',',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22',',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22','map','getRepository','\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22basic\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22label\x22:\x20\x22data_history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22icon\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22logic\x22:\x20\x22history_copy\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20','pluralize','type-graphql','find','\x22,\x22desc\x22:','{\x22type\x22:\x20\x22','Arg','string','dataProp','\x22,\x22hidden\x22:','reverseSort','\x22,\x22header\x22:\x20\x22','\x20,\x22exportable\x22:\x20true','design:type'];a0_0x1e00=function(){return _0x1c54dc;};return a0_0x1e00();}const modelTemplate=a0_0x5e1303(0x1df);
|
|
1
|
+
'use strict';const a0_0x468622=a0_0x53f3;function a0_0x53f3(_0x2d68e1,_0x1f1c94){const _0x12b4ad=a0_0x12b4();return a0_0x53f3=function(_0x53f322,_0x1f65bd){_0x53f322=_0x53f322-0x10c;let _0x9eaf75=_0x12b4ad[_0x53f322];return _0x9eaf75;},a0_0x53f3(_0x2d68e1,_0x1f1c94);}(function(_0x503a05,_0x1f4026){const _0x16605e=a0_0x53f3,_0x3f36c3=_0x503a05();while(!![]){try{const _0x30c1a7=parseInt(_0x16605e(0x182))/0x1*(parseInt(_0x16605e(0x148))/0x2)+-parseInt(_0x16605e(0x110))/0x3+parseInt(_0x16605e(0x14b))/0x4+-parseInt(_0x16605e(0x125))/0x5*(parseInt(_0x16605e(0x134))/0x6)+-parseInt(_0x16605e(0x161))/0x7+parseInt(_0x16605e(0x152))/0x8*(-parseInt(_0x16605e(0x14a))/0x9)+-parseInt(_0x16605e(0x15a))/0xa*(-parseInt(_0x16605e(0x15d))/0xb);if(_0x30c1a7===_0x1f4026)break;else _0x3f36c3['push'](_0x3f36c3['shift']());}catch(_0x4bc8da){_0x3f36c3['push'](_0x3f36c3['shift']());}}}(a0_0x12b4,0xcb327));Object['defineProperty'](exports,a0_0x468622(0x12d),{'value':!0x0}),exports[a0_0x468622(0x16a)]=void 0x0;function a0_0x12b4(){const _0x43417f=['find','\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}','\x22,\x22name\x22:\x20\x22','scenario','gridRank','getRepository','crypto','4446490VukLod','./../tool-secret/tool-permission','readonly','aes-256-ofb','searchOper','filter','prototype','assign','__esModule','template','\x22,\x22desc\x22:',',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22','hex','type-graphql','push','6ePDihB',',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22','select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27','Arg','name','updater_id','design:type','\x20,\x22editable\x22:\x20','entity','randomBytes','__importDefault','string','pluralize','length','{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22','searchRank','findOne','aes-256-cfb','updated_at','refType','14OnEZjJ','sortRank','5310fnULqh','3438400XwAMvz','aes-256-cfb1','parent','updater','design:returntype','createGridColumns','reverseSort','20912yXgCfW','aes-256-cfb8','{\x22type\x22:\x20\x22','replace','aes-256-ecb','final',',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22','h1z0q9i9x7q6','15342490dWWhhD','category','from','22qTdGBM','query','refName','Menu','1968568RvQDNp','hidden','\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}','menuType','utf8','aes-256-ctr','aes256','Resolver','__metadata','OperatoToolCreateMenu','default','Directive','created_at','createMenuData','dataProp','JSON','left','parent_menu_id','split','@things-factory/resource-base','{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22','createSortCols','SCREEN','Operato\x20Tool\x20Create\x20Menu','\x22,\x22header\x22:\x20\x22','@things-factory/meta-ui/client/pages/meta-grist-page','design:paramtypes','__param','\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22basic\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22label\x22:\x20\x22data_history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22icon\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22logic\x22:\x20\x22history_copy\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20',',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22','toString','join','\x20,\x22exportable\x22:\x20true','24533twusNU','map','aes-256-cbc','Mutation','createSearchCols','createdAt','1664256JkpAxd','\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}','\x22,\x22hidden\x22:','rank','\x22,\x22operator\x22:\x20\x22','{\x22name\x22:\x22','sort','\x22,\x22width\x22:','creator','createCipheriv','enc','{\x22name\x22:\x20\x22','Ctx','__decorate'];a0_0x12b4=function(){return _0x43417f;};return a0_0x12b4();}const tslib_1=require('tslib'),type_graphql_1=require(a0_0x468622(0x132)),resource_base_1=require(a0_0x468622(0x174)),menu_base_1=require('@things-factory/menu-base'),tool_permission_1=require(a0_0x468622(0x126)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require('lodash'),{plural:plural}=require(a0_0x468622(0x140)),crypto_1=tslib_1[a0_0x468622(0x13e)](require(a0_0x468622(0x124)));let OperatoToolCreateMenu=class{async['toolCreateMenu'](_0x2e802b,_0x1d8b92,_0x102df8){const _0x3c12d8=a0_0x468622,{domain:_0x15fc1c,user:_0x1bbe25,tx:_0x1f41b9}=_0x102df8['state'];await(0x0,tool_permission_1['checkStudioTemplateIsOverLimit'])('',_0x102df8);const _0x15a9d1=await _0x1f41b9['getRepository'](resource_base_1['Entity'])['findOne']({'where':{'domain':{'id':_0x15fc1c['id']},'id':_0x2e802b}}),_0x3d319d=await _0x1f41b9[_0x3c12d8(0x123)](resource_base_1['EntityColumn'])[_0x3c12d8(0x11e)]({'where':{'domain':{'id':_0x15fc1c['id']},'entity':{'id':_0x15a9d1['id']}}});let {name:_0x4e3083=''}=_0x15a9d1||{},_0x49c61f=kebabCase(_0x4e3083),_0x2a7409=modelTemplate[_0x3c12d8(0x155)](/{{pascalCase name}}/g,startCase(camelCase(_0x4e3083))[_0x3c12d8(0x155)](/ /g,''))[_0x3c12d8(0x155)](/{{camelCase name}}/g,camelCase(_0x4e3083))[_0x3c12d8(0x155)](/{{snakeCase name}}/g,snakeCase(_0x4e3083))[_0x3c12d8(0x155)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x4e3083)))[_0x3c12d8(0x155)](/ /g,''))['replace'](/{{pluralCamelCase name}}/g,camelCase(plural(_0x4e3083)))['replace'](/{{name}}/g,_0x4e3083),_0x451f2d='';_0x3c12d8(0x170)==_0x15a9d1['dataProp']?_0x451f2d='\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':'COPY'==_0x15a9d1[_0x3c12d8(0x16f)]&&(_0x451f2d=_0x3c12d8(0x17d)),_0x2a7409=_0x2a7409[_0x3c12d8(0x155)](/{{HistoryButton}}/g,_0x451f2d);let _0x44241f=this[_0x3c12d8(0x176)](_0x3d319d);_0x2a7409=_0x2a7409[_0x3c12d8(0x155)](/{{SortColumns}}/g,_0x44241f[_0x3c12d8(0x180)](','));let _0x3c8555=this[_0x3c12d8(0x10e)](_0x3d319d);_0x2a7409=_0x2a7409[_0x3c12d8(0x155)](/{{SearchColumns}}/g,_0x3c8555['join'](','));let _0x5132a0=this[_0x3c12d8(0x150)](_0x3d319d);return _0x2a7409=_0x2a7409[_0x3c12d8(0x155)](/{{GridColumns}}/g,_0x5132a0['join'](',')),_0x2a7409=this[_0x3c12d8(0x11a)](_0x2a7409),await this[_0x3c12d8(0x16e)](_0x1f41b9,_0x15fc1c,_0x1bbe25,_0x1d8b92,_0x49c61f,_0x2a7409),!0x0;}['createGridColumns'](_0x23e0d4){const _0xdaa187=a0_0x468622;return _0x23e0d4['filter'](_0x9c58a0=>'id'!=_0x9c58a0['name']&&_0x9c58a0[_0xdaa187(0x122)]>0x0)['sort'](function(_0x175d85,_0x58b6f4){const _0x38f2fa=_0xdaa187;return _0x175d85[_0x38f2fa(0x122)]-_0x58b6f4[_0x38f2fa(0x122)];})[_0xdaa187(0x183)](_0x42309c=>{const _0x1ab52c=_0xdaa187;let {gridEditor:_0x1f4c1f=_0x1ab52c(0x13f),name:_0x2e9a3f,term:_0x84b646,gridWidth:_0x38f16f=0x0,gridAlign:_0x5394ec=_0x1ab52c(0x171),nullable:_0x3a61f=!0x1}=_0x42309c;if(null==_0x1f4c1f&&(_0x1f4c1f=_0x1ab52c(0x13f)),null==_0x5394ec&&(_0x5394ec=_0x1ab52c(0x171)),'updater_id'==_0x2e9a3f||'creator_id'==_0x2e9a3f)return _0x2e9a3f=_0x1ab52c(0x139)==_0x2e9a3f?_0x1ab52c(0x14e):_0x1ab52c(0x118),_0x1ab52c(0x142)+_0x2e9a3f+_0x1ab52c(0x179)+_0x2e9a3f+_0x1ab52c(0x11f);if(_0x1ab52c(0x146)==_0x2e9a3f||_0x1ab52c(0x16d)==_0x2e9a3f)return _0x1ab52c(0x175)+('updated_at'==_0x2e9a3f?'updatedAt':_0x1ab52c(0x10f))+_0x1ab52c(0x179)+_0x2e9a3f+_0x1ab52c(0x163);let _0x271dec=_0x1ab52c(0x127)!=_0x1f4c1f&&_0x1ab52c(0x162)!=_0x1f4c1f,_0x315193=_0x1ab52c(0x162)==_0x1f4c1f;0x1!=_0x315193&&0x0!=_0x271dec||(_0x1f4c1f=_0x1ab52c(0x13f));let _0x2022dd=_0x1ab52c(0x154)+_0x1f4c1f+_0x1ab52c(0x120)+camelCase(_0x2e9a3f)+'\x22,\x22header\x22:\x20\x22'+_0x84b646+_0x1ab52c(0x112)+_0x315193+_0x1ab52c(0x13b)+_0x271dec+',\x22mandatory\x22:\x20'+!_0x3a61f+_0x1ab52c(0x158)+_0x5394ec+_0x1ab52c(0x117)+_0x38f16f+_0x1ab52c(0x181);return'code'==_0x42309c[_0x1ab52c(0x147)]&&(_0x2022dd+=_0x1ab52c(0x135)+_0x42309c[_0x1ab52c(0x15f)]+'\x22}'),_0x1ab52c(0x121)==_0x42309c[_0x1ab52c(0x147)]&&(_0x2022dd+=_0x1ab52c(0x130)+_0x42309c[_0x1ab52c(0x15f)]+'\x22}'),_0x1ab52c(0x13c)==_0x42309c[_0x1ab52c(0x147)]&&(_0x2022dd+=_0x1ab52c(0x17e)+camelCase(plural(_0x42309c[_0x1ab52c(0x15f)]))+_0x1ab52c(0x111)),_0x2022dd+='}',_0x2022dd;});}[a0_0x468622(0x10e)](_0x5e1f5b){const _0x54c870=a0_0x468622;return _0x5e1f5b[_0x54c870(0x12a)](_0x2358f7=>_0x2358f7[_0x54c870(0x143)]>0x0)[_0x54c870(0x116)](function(_0x52f279,_0x14b670){const _0x5b6cd8=_0x54c870;return _0x52f279[_0x5b6cd8(0x143)]-_0x14b670[_0x5b6cd8(0x143)];})[_0x54c870(0x183)](_0x379aa8=>{const _0x17cc75=_0x54c870;let _0x38133c=_0x379aa8[_0x17cc75(0x129)];return _0x17cc75(0x12a)==_0x38133c?'\x22'+camelCase(_0x379aa8['name'])+'\x22':(_0x38133c||(_0x38133c='eq'),_0x17cc75(0x11b)+camelCase(_0x379aa8[_0x17cc75(0x138)])+_0x17cc75(0x114)+_0x38133c+'\x22}');});}[a0_0x468622(0x176)](_0x49dff6){const _0x1745dd=a0_0x468622;return _0x49dff6[_0x1745dd(0x12a)](_0x4ede1a=>_0x4ede1a[_0x1745dd(0x149)]>0x0)[_0x1745dd(0x116)](function(_0x1cc492,_0x4cd97f){return _0x1cc492['sortRank']-_0x4cd97f['sortRank'];})['map'](_0x137607=>_0x1745dd(0x115)+camelCase(_0x137607[_0x1745dd(0x138)])+_0x1745dd(0x12f)+_0x137607[_0x1745dd(0x151)]+'}');}async[a0_0x468622(0x16e)](_0x477bde,_0x25691a,_0x6b016f,_0x3deb23,_0x46c437,_0x237958){const _0x20a0ac=a0_0x468622;let _0x7876fa=await _0x477bde[_0x20a0ac(0x123)](menu_base_1['Menu'])[_0x20a0ac(0x144)]({'where':{'domain':{'id':_0x25691a['id']},'id':_0x3deb23}}),_0x3e1b46=(await _0x477bde['getRepository'](menu_base_1['Menu'])[_0x20a0ac(0x15e)](_0x20a0ac(0x136)+_0x3deb23+'\x27\x20or\x20id\x20=\x20\x27'+_0x3deb23+'\x27'))[0x0][_0x20a0ac(0x113)]+0xa,_0xdca336=new menu_base_1[(_0x20a0ac(0x160))]();_0xdca336[_0x20a0ac(0x138)]=_0x46c437,_0xdca336[_0x20a0ac(0x164)]=_0x20a0ac(0x177),_0xdca336[_0x20a0ac(0x15b)]='meta-grist-page',_0xdca336[_0x20a0ac(0x113)]=_0x3e1b46,_0xdca336['hiddenFlag']=!0x1,_0xdca336['routing']=_0x46c437,_0xdca336[_0x20a0ac(0x12e)]=_0x237958,_0xdca336['resourceUrl']=_0x20a0ac(0x17a),_0xdca336[_0x20a0ac(0x14d)]=_0x7876fa,await _0x477bde[_0x20a0ac(0x123)](menu_base_1['Menu'])['save'](Object[_0x20a0ac(0x12c)](Object['assign']({},_0xdca336),{'domain':_0x25691a,'creator':_0x6b016f,'updater':_0x6b016f}));}[a0_0x468622(0x11a)](_0x62c60b){const _0x42168c=a0_0x468622;let _0x1c02d9=JSON['stringify'](_0x62c60b)[_0x42168c(0x173)](/(.{100})/)['filter'](_0x391f05=>_0x391f05),_0x1fb232=[_0x42168c(0x156),_0x42168c(0x10c),_0x42168c(0x145),_0x42168c(0x153),_0x42168c(0x14c),_0x42168c(0x128),_0x42168c(0x166),_0x42168c(0x167)],_0x6c4278=crypto_1[_0x42168c(0x16b)][_0x42168c(0x13d)](0x20)[_0x42168c(0x17f)]('hex'),_0x13a872=Buffer[_0x42168c(0x15c)](_0x6c4278,_0x42168c(0x131)),_0x73267e=_0x6c4278['substring'](0x0,0x10),_0x30101f=['',_0x73267e,_0x73267e,_0x73267e,_0x73267e,_0x73267e,_0x73267e,_0x73267e],_0x255126=0x0,_0x794617=[];_0x794617[_0x42168c(0x133)](_0x6c4278);for(var _0x5cf77b=0x0;_0x5cf77b<_0x1c02d9[_0x42168c(0x141)];_0x5cf77b++,_0x255126++){_0x255126==_0x1fb232[_0x42168c(0x141)]&&(_0x255126=0x0);let _0x4b4af7=crypto_1[_0x42168c(0x16b)][_0x42168c(0x119)](_0x1fb232[_0x255126],_0x13a872,_0x30101f[_0x255126]),_0x594413=_0x4b4af7['update'](_0x1c02d9[_0x5cf77b],_0x42168c(0x165),_0x42168c(0x131));_0x594413+=_0x4b4af7[_0x42168c(0x157)](_0x42168c(0x131)),_0x794617[_0x42168c(0x133)](_0x594413);}return _0x794617[_0x42168c(0x180)](_0x42168c(0x159));}};tslib_1[a0_0x468622(0x11d)]([(0x0,type_graphql_1[a0_0x468622(0x16c)])('@transaction'),(0x0,type_graphql_1[a0_0x468622(0x10d)])(_0x8cac9b=>Boolean,{'description':a0_0x468622(0x178)}),tslib_1[a0_0x468622(0x17c)](0x0,(0x0,type_graphql_1[a0_0x468622(0x137)])('id')),tslib_1[a0_0x468622(0x17c)](0x1,(0x0,type_graphql_1[a0_0x468622(0x137)])(a0_0x468622(0x172))),tslib_1[a0_0x468622(0x17c)](0x2,(0x0,type_graphql_1[a0_0x468622(0x11c)])()),tslib_1[a0_0x468622(0x169)](a0_0x468622(0x13a),Function),tslib_1[a0_0x468622(0x169)](a0_0x468622(0x17b),[String,String,Object]),tslib_1[a0_0x468622(0x169)](a0_0x468622(0x14f),Promise)],OperatoToolCreateMenu[a0_0x468622(0x12b)],'toolCreateMenu',null),OperatoToolCreateMenu=tslib_1[a0_0x468622(0x11d)]([(0x0,type_graphql_1[a0_0x468622(0x168)])()],OperatoToolCreateMenu),exports[a0_0x468622(0x16a)]=OperatoToolCreateMenu;const modelTemplate='\x0a{\x0a\x20\x20\x22menu\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x22title\x22:\x20\x22{{name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22\x22,\x0a\x20\x20\x20\x20\x20\x20\x22desc\x22:\x20\x22\x22\x0a\x20\x20},\x0a\x20\x20\x22gql\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x22query\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22list_func\x22:\x20\x22{{pluralCamelCase\x20name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22find_one_func\x22:\x22{{camelCase\x20name}}\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x22mutation\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22multiple\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22func\x22:\x22updateMultiple{{pascalCase\x20name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22{{pascalCase\x20name}}Patch\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22delete\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22func\x22:\x22delete{{pluralPascalCase\x20name}}\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20},\x0a\x20\x20\x22button\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22export\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22add\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22delete\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22save\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20],\x0a\x20\x20\x22grid_column\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22string\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22id\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22header\x22:\x20\x22id\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22hidden\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22editable\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22mandatory\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22sortable\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22align\x22:\x20\x22left\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22width\x22:\x200,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22exportable\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20},\x0a{{GridColumns}}\x0a\x20\x20],\x0a\x20\x20\x22grid\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22button\x22:[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{{HistoryButton}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22option\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22mobile_mode\x22:\x20\x22LIST\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22desk_mode\x22:\x20\x22GRID\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22use_row_checker\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22pages\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2020,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2050,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20100,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20300\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22view_mode\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22GRID\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22LIST\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22CARD\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22sorters\x22:\x20[\x0a{{SortColumns}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20]\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x22row\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22multiple_select\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22click\x22:\x20\x22select-row-toggle\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20},\x0a\x20\x20\x22search\x22:\x20[\x0a{{SearchColumns}}\x0a\x20\x20]\x0a}\x0a';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x5a7de2=a0_0x86e3;(function(_0x993b3,_0x35cef4){const _0x5ac5f9=a0_0x86e3,_0x562603=_0x993b3();while(!![]){try{const _0x194d6a=-parseInt(_0x5ac5f9(0x170))/0x1*(parseInt(_0x5ac5f9(0x10a))/0x2)+-parseInt(_0x5ac5f9(0x131))/0x3+parseInt(_0x5ac5f9(0xed))/0x4+-parseInt(_0x5ac5f9(0x16e))/0x5*(-parseInt(_0x5ac5f9(0xf5))/0x6)+parseInt(_0x5ac5f9(0xe0))/0x7+parseInt(_0x5ac5f9(0x109))/0x8*(-parseInt(_0x5ac5f9(0x176))/0x9)+-parseInt(_0x5ac5f9(0x114))/0xa*(parseInt(_0x5ac5f9(0xfc))/0xb);if(_0x194d6a===_0x35cef4)break;else _0x562603['push'](_0x562603['shift']());}catch(_0x17f13a){_0x562603['push'](_0x562603['shift']());}}}(a0_0x3005,0xc5ab8));function a0_0x86e3(_0x25e19c,_0x2202ca){const _0x300516=a0_0x3005();return a0_0x86e3=function(_0x86e32,_0x129d98){_0x86e32=_0x86e32-0xde;let _0x36ca20=_0x300516[_0x86e32];return _0x36ca20;},a0_0x86e3(_0x25e19c,_0x2202ca);}Object['defineProperty'](exports,a0_0x5a7de2(0x104),{'value':!0x0}),exports[a0_0x5a7de2(0x13d)]=void 0x0;const tslib_1=require(a0_0x5a7de2(0x136)),type_graphql_1=require(a0_0x5a7de2(0xe1)),shell_1=require(a0_0x5a7de2(0x14f)),resource_base_1=require(a0_0x5a7de2(0x103)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x5a7de2(0x16c)),{plural:plural}=require(a0_0x5a7de2(0x163)),fs=require('fs');function a0_0x3005(){const _0x1bb4c6=['rank','__param','-type.ts','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\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','Resolver','/index.ts','\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','3923844akiWjE','createTypeText','sort','-history\x27','/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...','mkdirSync','packages','1329416yJOaKU','getProjectRootPath','datetime','push','@Column({name:\x27','__metadata','design:returntype','@things-factory/resource-base','__esModule','@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})','indexOf','includes','\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','5515120nDclhG','1158uHSXUZ','domain_id','string','-history-query.ts','Float','\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','double\x20precision','\x27,\x20type:\x20\x27','EntitySubscribers,','-query.ts','10mihsZp','\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201','/server/service/','updater_id','Entities,\x20resolvers\x20as\x20','double','\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','import\x20{\x20entities\x20as\x20','timestamp\x20without\x20time\x20zone',',length:','createHistoryEntityText','@Field(','\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}}]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}Mutation]\x0a','Resolvers\x20}\x20from\x20\x27./','createHistoryServiceFiles','uniqRank','\x27,\x20nullable:\x20','find','index.ts','\x20})','Resolvers,\x20subscribers\x20as\x20','existsSync','Entity','colSize','pluralPascalCaseName','Query','\x0a\x20\x20','createEntityText','created_at','1120908LzyxGT','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20Domain\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0a@Entity(\x27{{tableName}}\x27)\x0a{{indexAnn}}\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}\x20{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','toolCreateService','readFileSync','Resolvers,','tslib','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','-mutation.ts','Ctx','dataProp','replace','EntitySubscribers\x20}\x20from\x20\x27./','OperatoToolCreateService','\x20{\x20nullable:\x20','-history-type.ts','length','character\x20varying','getColTxtType','integer','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a\x20\x20@Column(\x27simple-json\x27,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20@Field(type\x20=>\x20ScalarObject,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20historyJson?:\x20any\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','\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','split','__decorate','creator','-history.ts','replaceNamesMap','tableName','camelCaseName','updated_at','Entities,','@things-factory/shell','decimal','getFieldType','design:type','{{camelCase\x20name}}.','\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','env','/packages','createDir','columnToEntityColumn','COPY','utf8','map','export\x20*\x20from\x20\x27./','long','state','number','/event-subscriber.ts','findOne','join','pluralize','PWD','prototype','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','updater','colType','existsPath','createNoHistoryServiceFiels','/packages/','lodash','JSON','5DvDZpv','.ts','39bMCzVq','domain','Date','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','creator_id','\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','9necziC','...','type\x20=>','3779510qgLKwF','type-graphql','name','pascalCaseName','/service','nullable','bigint','writeFile','getRepository','writeFileSync','/*\x20ENTITIES\x20*/\x0a\x09...','Int','createServiceFiles','3288860YCFcqM'];a0_0x3005=function(){return _0x1bb4c6;};return a0_0x3005();}let OperatoToolCreateService=class{async[a0_0x5a7de2(0x133)](_0x574bd1,_0x3eb293){const _0x4de560=a0_0x5a7de2,{domain:_0x2eb794}=_0x3eb293[_0x4de560(0x15e)],_0x43ab17=await(0x0,shell_1[_0x4de560(0xe8)])(resource_base_1[_0x4de560(0x12a)])[_0x4de560(0x161)]({'where':{'id':_0x574bd1}}),_0x5b07ea=await(0x0,shell_1[_0x4de560(0xe8)])(resource_base_1['EntityColumn'])[_0x4de560(0x125)]({'where':{'domain':{'id':_0x2eb794['id']},'entity':{'id':_0x43ab17['id']}}});let {name:_0x165186='',bundle:_0x5c3712=''}=_0x43ab17||{},_0x47a202=this['getProjectRootPath'](),_0x9e024f=kebabCase(_0x165186);return await this['createServicePath'](_0x47a202,_0x5c3712,_0x9e024f),await this[_0x4de560(0xec)](_0x47a202,_0x5c3712,_0x165186,_0x9e024f,_0x43ab17,_0x5b07ea),!0x0;}async[a0_0x5a7de2(0xec)](_0x423f50,_0x10a489,_0x198709,_0xb123db,_0x270b54,_0x5d9dcd){const _0x4ef516=a0_0x5a7de2;let _0x57d428={'name':_0xb123db,'tableName':_0x270b54[_0x4ef516(0x14b)],'pascalCaseName':startCase(camelCase(_0x198709))[_0x4ef516(0x13b)](/ /g,''),'camelCaseName':camelCase(_0x198709),'snakeCaseName':snakeCase(_0x198709),'pluralPascalCaseName':startCase(camelCase(plural(_0x198709)))[_0x4ef516(0x13b)](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x198709))},_0x529c68=_0x423f50+_0x4ef516(0x16b)+_0x10a489+_0x4ef516(0x116);[_0x4ef516(0x16d),_0x4ef516(0x159)][_0x4ef516(0x107)](_0x270b54[_0x4ef516(0x13a)])?await this[_0x4ef516(0x122)](_0x529c68,_0xb123db,_0x270b54,_0x5d9dcd,_0x57d428):await this[_0x4ef516(0x16a)](_0x529c68,_0xb123db,_0x270b54,_0x5d9dcd,_0x57d428);}async['createHistoryServiceFiles'](_0x4aed5b,_0x10296f,_0xc27800,_0x1f0f51,_0x402840){const _0x2e70d5=a0_0x5a7de2;await this[_0x2e70d5(0xe7)](_0x4aed5b+(_0x10296f+_0x2e70d5(0xf3)),serviceHistoryIndex,_0x402840);let _0x368f4e=this[_0x2e70d5(0x12f)](_0xc27800,_0x1f0f51);await this[_0x2e70d5(0xe7)](_0x4aed5b+(_0x10296f+'/'+_0x10296f+_0x2e70d5(0x16f)),_0x368f4e,_0x402840),await this[_0x2e70d5(0xe7)](_0x4aed5b+(_0x10296f+'/'+_0x10296f+'-query.ts'),serviceQuery,_0x402840),await this[_0x2e70d5(0xe7)](_0x4aed5b+(_0x10296f+'/'+_0x10296f+_0x2e70d5(0x138)),serviceMutation,_0x402840);let _0x4928c5=this['createTypeText'](_0x1f0f51);await this['writeFile'](_0x4aed5b+(_0x10296f+'/'+_0x10296f+_0x2e70d5(0xf0)),_0x4928c5,_0x402840);let _0x2d4451=this[_0x2e70d5(0x11e)](_0xc27800,_0x1f0f51);await this[_0x2e70d5(0xe7)](_0x4aed5b+(_0x10296f+'/'+_0x10296f+_0x2e70d5(0x149)),_0x2d4451,_0x402840);let _0x1c1f51='';_0x2e70d5(0x16d)==_0xc27800['dataProp']?(_0x1c1f51='\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[_0x2e70d5(0xe7)](_0x4aed5b+(_0x10296f+_0x2e70d5(0x160)),serviceEntitySubscriber,_0x402840)):_0x1c1f51='';let _0x54e0bb=serviceEntitySubscriber['replace'](/{{entityToJson}}/g,_0x1c1f51);await this[_0x2e70d5(0xe7)](_0x4aed5b+(_0x10296f+_0x2e70d5(0x160)),_0x54e0bb,_0x402840),await this['writeFile'](_0x4aed5b+(_0x10296f+'/'+_0x10296f+_0x2e70d5(0x10d)),serviceHistoryQuery,_0x402840),await this[_0x2e70d5(0xe7)](_0x4aed5b+(_0x10296f+'/'+_0x10296f+_0x2e70d5(0x13f)),sereviceHistoryType,_0x402840);let _0x318278=_0x4aed5b+_0x2e70d5(0x126);0x0==await this[_0x2e70d5(0x169)](_0x318278)&&await this['writeFile'](_0x318278,allIndex,_0x402840);let _0x269c56=await fs[_0x2e70d5(0x134)](_0x318278,_0x2e70d5(0x15a));_0x269c56['indexOf'](_0x2e70d5(0x15c)+_0x402840[_0x2e70d5(0xe2)]+'/'+_0x402840[_0x2e70d5(0xe2)]+_0x2e70d5(0xf8))<0x0&&(_0x269c56=_0x269c56[_0x2e70d5(0x13b)](/\/\* EXPORT ENTITY TYPES \*\//,'/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./'+_0x402840[_0x2e70d5(0xe2)]+'/'+_0x402840[_0x2e70d5(0xe2)]+_0x2e70d5(0xf8))),_0x269c56[_0x2e70d5(0x106)]('export\x20*\x20from\x20\x27./'+_0x402840[_0x2e70d5(0xe2)]+'/'+_0x402840[_0x2e70d5(0xe2)]+'\x27')<0x0&&(_0x269c56=_0x269c56[_0x2e70d5(0x13b)](/\/\* EXPORT ENTITY TYPES \*\//,_0x2e70d5(0x173)+_0x402840[_0x2e70d5(0xe2)]+'/'+_0x402840[_0x2e70d5(0xe2)]+'\x27')),_0x269c56[_0x2e70d5(0x106)](_0x2e70d5(0x11b)+_0x402840['pascalCaseName']+'Entities,\x20resolvers\x20as\x20'+_0x402840[_0x2e70d5(0xe3)]+_0x2e70d5(0x128)+_0x402840[_0x2e70d5(0xe3)]+_0x2e70d5(0x13c)+_0x402840[_0x2e70d5(0xe2)]+'\x27')<0x0&&(_0x269c56=_0x269c56['replace'](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x2e70d5(0x166)+_0x402840[_0x2e70d5(0xe3)]+_0x2e70d5(0x118)+_0x402840[_0x2e70d5(0xe3)]+'Resolvers,\x20subscribers\x20as\x20'+_0x402840['pascalCaseName']+_0x2e70d5(0x13c)+_0x402840['name']+'\x27')),_0x269c56[_0x2e70d5(0x106)](_0x2e70d5(0xde)+_0x402840['pascalCaseName']+_0x2e70d5(0x14e))<0x0&&(_0x269c56=_0x269c56[_0x2e70d5(0x13b)](/\/\* ENTITIES \*\//,_0x2e70d5(0xea)+_0x402840[_0x2e70d5(0xe3)]+_0x2e70d5(0x14e))),_0x269c56[_0x2e70d5(0x106)]('...'+_0x402840[_0x2e70d5(0xe3)]+_0x2e70d5(0x135))<0x0&&(_0x269c56=_0x269c56[_0x2e70d5(0x13b)](/\/\* RESOLVER CLASSES \*\//,_0x2e70d5(0x137)+_0x402840[_0x2e70d5(0xe3)]+_0x2e70d5(0x135))),_0x269c56[_0x2e70d5(0x106)]('...'+_0x402840[_0x2e70d5(0xe3)]+_0x2e70d5(0x112))<0x0&&(_0x269c56=_0x269c56[_0x2e70d5(0x13b)](/\/\* SUBSCRIBERS \*\//,_0x2e70d5(0xf9)+_0x402840['pascalCaseName']+'EntitySubscribers,')),await this[_0x2e70d5(0xe7)](_0x318278,_0x269c56,_0x402840);}async[a0_0x5a7de2(0x16a)](_0x405d0e,_0x1af0f1,_0x1a203f,_0x39935e,_0x264167){const _0x11ac27=a0_0x5a7de2;await this['writeFile'](_0x405d0e+(_0x1af0f1+'/index.ts'),serviceIndex,_0x264167),await this[_0x11ac27(0xe7)](_0x405d0e+(_0x1af0f1+'/'+_0x1af0f1+_0x11ac27(0x113)),serviceQuery,_0x264167),await this[_0x11ac27(0xe7)](_0x405d0e+(_0x1af0f1+'/'+_0x1af0f1+'-mutation.ts'),serviceMutation,_0x264167);let _0x2e7b31=this[_0x11ac27(0x12f)](_0x1a203f,_0x39935e);await this[_0x11ac27(0xe7)](_0x405d0e+(_0x1af0f1+'/'+_0x1af0f1+_0x11ac27(0x16f)),_0x2e7b31,_0x264167);let _0x497430=this[_0x11ac27(0xf6)](_0x39935e);await this[_0x11ac27(0xe7)](_0x405d0e+(_0x1af0f1+'/'+_0x1af0f1+_0x11ac27(0xf0)),_0x497430,_0x264167);let _0x633e82=_0x405d0e+_0x11ac27(0x126);0x0==await this['existsPath'](_0x633e82)&&await this['writeFile'](_0x633e82,allIndex,_0x264167);let _0x35bc4d=await fs[_0x11ac27(0x134)](_0x633e82,_0x11ac27(0x15a));_0x35bc4d['indexOf']('export\x20*\x20from\x20\x27./'+_0x264167[_0x11ac27(0xe2)]+'/'+_0x264167[_0x11ac27(0xe2)]+'\x27')<0x0&&(_0x35bc4d=_0x35bc4d[_0x11ac27(0x13b)](/\/\* EXPORT ENTITY TYPES \*\//,_0x11ac27(0x173)+_0x264167[_0x11ac27(0xe2)]+'/'+_0x264167[_0x11ac27(0xe2)]+'\x27')),_0x35bc4d[_0x11ac27(0x106)](_0x11ac27(0x11b)+_0x264167[_0x11ac27(0xe3)]+_0x11ac27(0x118)+_0x264167[_0x11ac27(0xe3)]+_0x11ac27(0x121)+_0x264167['name']+'\x27')<0x0&&(_0x35bc4d=_0x35bc4d[_0x11ac27(0x13b)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x11ac27(0x166)+_0x264167[_0x11ac27(0xe3)]+_0x11ac27(0x118)+_0x264167[_0x11ac27(0xe3)]+'Resolvers\x20}\x20from\x20\x27./'+_0x264167[_0x11ac27(0xe2)]+'\x27')),_0x35bc4d[_0x11ac27(0x106)](_0x11ac27(0xde)+_0x264167[_0x11ac27(0xe3)]+_0x11ac27(0x14e))<0x0&&(_0x35bc4d=_0x35bc4d[_0x11ac27(0x13b)](/\/\* ENTITIES \*\//,_0x11ac27(0xea)+_0x264167[_0x11ac27(0xe3)]+_0x11ac27(0x14e))),_0x35bc4d[_0x11ac27(0x106)](_0x11ac27(0xde)+_0x264167['pascalCaseName']+_0x11ac27(0x135))<0x0&&(_0x35bc4d=_0x35bc4d[_0x11ac27(0x13b)](/\/\* RESOLVER CLASSES \*\//,_0x11ac27(0x137)+_0x264167[_0x11ac27(0xe3)]+_0x11ac27(0x135))),await this['writeFile'](_0x633e82,_0x35bc4d,_0x264167);}[a0_0x5a7de2(0xf6)](_0x5240c3){const _0x5d61df=a0_0x5a7de2;let _0x5512c4=sereviceType,_0x135b08=_0x5240c3[_0x5d61df(0x15b)](_0x24fe28=>{const _0x203039=_0x5d61df;if('id'==_0x24fe28[_0x203039(0xe2)])return'';if(_0x203039(0x10b)==_0x24fe28['name'])return'';if(_0x203039(0x130)==_0x24fe28[_0x203039(0xe2)])return'';if(_0x203039(0x14d)==_0x24fe28['name'])return'';if('creator_id'==_0x24fe28[_0x203039(0xe2)])return'';if('updater_id'==_0x24fe28[_0x203039(0xe2)])return'';let _0x2827bb=this[_0x203039(0x151)](_0x24fe28),_0x36e895=this[_0x203039(0x142)](_0x24fe28),_0x1d3719=camelCase(_0x24fe28[_0x203039(0xe2)]);return'\x20\x20'+('@Field('+(0x0==_0x2827bb[_0x203039(0x140)]?'':_0x203039(0xdf)+_0x2827bb+',')+'\x20{\x20nullable:\x20'+_0x24fe28[_0x203039(0xe5)]+_0x203039(0x127))+_0x203039(0x12e)+(''+_0x1d3719+(_0x24fe28[_0x203039(0xe5)]?'?':'')+':\x20'+_0x36e895)+'\x0a';});_0x5512c4=_0x5512c4[_0x5d61df(0x13b)](/{{newTypeColumns}}/g,_0x135b08['join']('\x0a'));let _0x1a1e96=_0x5240c3[_0x5d61df(0x15b)](_0x128b2f=>{const _0x607c56=_0x5d61df;if('id'==_0x128b2f[_0x607c56(0xe2)])return'';if(_0x607c56(0x10b)==_0x128b2f[_0x607c56(0xe2)])return'';if('created_at'==_0x128b2f['name'])return'';if(_0x607c56(0x14d)==_0x128b2f['name'])return'';if(_0x607c56(0x174)==_0x128b2f[_0x607c56(0xe2)])return'';if(_0x607c56(0x117)==_0x128b2f[_0x607c56(0xe2)])return'';let _0x568021=this['getFieldType'](_0x128b2f),_0x3faa4f=this[_0x607c56(0x142)](_0x128b2f);_0x128b2f['nullable']=!0x0;let _0x5376e3=camelCase(_0x128b2f['name']);return'\x20\x20'+(_0x607c56(0x11f)+(0x0==_0x568021['length']?'':_0x607c56(0xdf)+_0x568021+',')+_0x607c56(0x13e)+_0x128b2f[_0x607c56(0xe5)]+_0x607c56(0x127))+_0x607c56(0x12e)+(''+_0x5376e3+(_0x128b2f[_0x607c56(0xe5)]?'?':'')+':\x20'+_0x3faa4f)+'\x0a';});return _0x5512c4=_0x5512c4[_0x5d61df(0x13b)](/{{patchTypeColumns}}/g,_0x1a1e96[_0x5d61df(0x162)]('\x0a')),_0x5512c4;}[a0_0x5a7de2(0x12f)](_0x2b2ae8,_0xd1b455){const _0x567783=a0_0x5a7de2;let _0x2e1006=serviceEntity,_0x149d82=_0xd1b455[_0x567783(0xf7)](function(_0xbef27f,_0x268538){const _0x2d7c2c=_0x567783;return _0xbef27f[_0x2d7c2c(0xee)]-_0x268538[_0x2d7c2c(0xee)];})['map'](_0x3f5cf9=>this[_0x567783(0x158)](_0x3f5cf9));['COPY',_0x567783(0x16d)][_0x567783(0x107)](_0x2b2ae8[_0x567783(0x13a)])&&_0x149d82[_0x567783(0xff)](_0x567783(0x115)),_0x2e1006=_0x2e1006[_0x567783(0x13b)](/{{entityColumns}}/g,_0x149d82[_0x567783(0x162)]('\x0a'));let _0x4ce940='',_0x15eb59=_0xd1b455['filter'](_0x11e6f2=>_0x11e6f2[_0x567783(0x123)]&&_0x11e6f2[_0x567783(0x123)]>0x0)['sort'](function(_0x4153bd,_0x47f6ed){const _0xd847c=_0x567783;return _0x4153bd[_0xd847c(0x123)]-_0x47f6ed[_0xd847c(0x123)];});if(_0x15eb59[_0x567783(0x140)]>0x0){_0x4ce940=_0x567783(0x105);let _0x555837=_0x15eb59['map'](_0x3ae29b=>{const _0x250c9f=_0x567783;let _0x3bd3ec=_0x3ae29b[_0x250c9f(0xe2)];return _0x250c9f(0x10b)==_0x3ae29b[_0x250c9f(0xe2)]&&(_0x3bd3ec=_0x250c9f(0x171)),_0x250c9f(0x174)==_0x3ae29b[_0x250c9f(0xe2)]&&(_0x3bd3ec=_0x250c9f(0x148)),'updater_id'==_0x3ae29b[_0x250c9f(0xe2)]&&(_0x3bd3ec=_0x250c9f(0x167)),_0x250c9f(0x153)+camelCase(_0x3bd3ec);});_0x4ce940=_0x4ce940[_0x567783(0x13b)](/{{indexColumns}}/g,_0x555837[_0x567783(0x162)](','));}return _0x2e1006=_0x2e1006['replace'](/{{indexAnn}}/g,_0x4ce940),_0x2e1006;}[a0_0x5a7de2(0x11e)](_0x11dbb9,_0x48789f){const _0x2bc23f=a0_0x5a7de2;let _0x42e6e9=_0x2bc23f(0x16d)==_0x11dbb9[_0x2bc23f(0x13a)]?serviceEntityHistJson:serviceEntityHistCopy,_0x1f2bb5=_0x48789f[_0x2bc23f(0xf7)](function(_0x12d7d7,_0x1971d1){const _0xb54b67=_0x2bc23f;return _0x12d7d7[_0xb54b67(0xee)]-_0x1971d1['rank'];})['map'](_0x10b84b=>this[_0x2bc23f(0x158)](_0x10b84b));return _0x42e6e9=_0x42e6e9['replace'](/{{entityColumns}}/g,_0x1f2bb5[_0x2bc23f(0x162)]('\x0a')),_0x42e6e9;}[a0_0x5a7de2(0x158)](_0x38352c){const _0x3b5d54=a0_0x5a7de2;if('id'==_0x38352c[_0x3b5d54(0xe2)])return'';if(_0x3b5d54(0x10b)==_0x38352c[_0x3b5d54(0xe2)])return'';if('created_at'==_0x38352c[_0x3b5d54(0xe2)])return'';if(_0x3b5d54(0x14d)==_0x38352c[_0x3b5d54(0xe2)])return'';if(_0x3b5d54(0x174)==_0x38352c[_0x3b5d54(0xe2)])return'';if(_0x3b5d54(0x117)==_0x38352c[_0x3b5d54(0xe2)])return'';let _0x2c3a24=_0x38352c['colType'];_0x3b5d54(0x119)==_0x38352c[_0x3b5d54(0x168)]&&(_0x2c3a24=_0x3b5d54(0x110)),_0x3b5d54(0x15d)==_0x38352c['colType']&&(_0x2c3a24=_0x3b5d54(0xe6)),_0x3b5d54(0x10c)==_0x38352c['colType']&&(_0x2c3a24=_0x3b5d54(0x141)),_0x3b5d54(0xfe)==_0x38352c['colType']&&(_0x2c3a24=_0x3b5d54(0x11c));let _0x28e7aa='';'string'==_0x38352c[_0x3b5d54(0x168)]&&(_0x28e7aa=_0x38352c[_0x3b5d54(0x12b)]);let _0x287788=this[_0x3b5d54(0x151)](_0x38352c),_0x38b46e=this['getColTxtType'](_0x38352c),_0x1f55e2=camelCase(_0x38352c[_0x3b5d54(0xe2)]);return'\x20\x20'+(_0x3b5d54(0x100)+_0x38352c[_0x3b5d54(0xe2)]+_0x3b5d54(0x111)+_0x2c3a24+_0x3b5d54(0x124)+_0x38352c['nullable']+'\x20'+(0x0==_0x28e7aa['length']?'':_0x3b5d54(0x11d)+_0x28e7aa)+_0x3b5d54(0x127))+'\x0a\x20\x20'+(_0x3b5d54(0x11f)+(0x0==_0x287788[_0x3b5d54(0x140)]?'':_0x3b5d54(0xdf)+_0x287788+',')+_0x3b5d54(0x13e)+_0x38352c[_0x3b5d54(0xe5)]+'\x20})')+_0x3b5d54(0x12e)+(''+_0x1f55e2+(_0x38352c[_0x3b5d54(0xe5)]?'?':'')+':\x20'+_0x38b46e)+'\x0a';}[a0_0x5a7de2(0x151)](_0x3dace1){const _0x10f2dd=a0_0x5a7de2;let _0x1e6c27='';return _0x10f2dd(0x119)==_0x3dace1[_0x10f2dd(0x168)]&&(_0x1e6c27=_0x10f2dd(0x10e)),'float'==_0x3dace1['colType']&&(_0x1e6c27=_0x10f2dd(0x10e)),_0x10f2dd(0x15d)==_0x3dace1[_0x10f2dd(0x168)]&&(_0x1e6c27=_0x10f2dd(0xeb)),_0x10f2dd(0x143)==_0x3dace1[_0x10f2dd(0x168)]&&(_0x1e6c27=_0x10f2dd(0xeb)),_0x1e6c27;}['getColTxtType'](_0x50fa01){const _0x4809f0=a0_0x5a7de2;let _0x427c1e=_0x50fa01[_0x4809f0(0x168)];return _0x4809f0(0x150)==_0x50fa01['colType']&&(_0x427c1e=_0x4809f0(0x15f)),_0x4809f0(0x119)==_0x50fa01[_0x4809f0(0x168)]&&(_0x427c1e=_0x4809f0(0x15f)),'float'==_0x50fa01[_0x4809f0(0x168)]&&(_0x427c1e=_0x4809f0(0x15f)),'integer'==_0x50fa01[_0x4809f0(0x168)]&&(_0x427c1e=_0x4809f0(0x15f)),_0x4809f0(0x15d)==_0x50fa01[_0x4809f0(0x168)]&&(_0x427c1e='number'),_0x4809f0(0xfe)==_0x50fa01['colType']&&(_0x427c1e=_0x4809f0(0x172)),'date'==_0x50fa01[_0x4809f0(0x168)]&&(_0x427c1e=_0x4809f0(0x172)),'text'==_0x50fa01[_0x4809f0(0x168)]&&(_0x427c1e=_0x4809f0(0x10c)),_0x427c1e;}async[a0_0x5a7de2(0xe7)](_0x5b0529,_0x9526fa,_0x2be49e){const _0x2dbb53=a0_0x5a7de2;await fs[_0x2dbb53(0xe9)](_0x5b0529,this[_0x2dbb53(0x14a)](_0x9526fa,_0x2be49e),'utf8');}[a0_0x5a7de2(0x14a)](_0x236776,_0xce98ae){const _0x4d22f5=a0_0x5a7de2;return _0x236776[_0x4d22f5(0x13b)](/{{pascalCase name}}/g,_0xce98ae[_0x4d22f5(0xe3)])['replace'](/{{camelCase name}}/g,_0xce98ae[_0x4d22f5(0x14c)])['replace'](/{{snakeCase name}}/g,_0xce98ae['snakeCaseName'])[_0x4d22f5(0x13b)](/{{pluralPascalCase name}}/g,_0xce98ae[_0x4d22f5(0x12c)])[_0x4d22f5(0x13b)](/{{pluralCamelCase name}}/g,_0xce98ae['pluralCamelCaseName'])['replace'](/{{tableName}}/g,_0xce98ae[_0x4d22f5(0x14b)])[_0x4d22f5(0x13b)](/{{name}}/g,_0xce98ae[_0x4d22f5(0xe2)]);}async['createServicePath'](_0x104fa4,_0xe52884,_0x38d6b5){const _0x27268a=a0_0x5a7de2;let _0x333528=_0x104fa4+_0x27268a(0x156);await this[_0x27268a(0x157)](_0x333528),_0x333528=_0x333528+'/'+_0xe52884,await this[_0x27268a(0x157)](_0x333528),_0x333528+='/server',await this['createDir'](_0x333528),_0x333528+=_0x27268a(0xe4),await this[_0x27268a(0x157)](_0x333528),_0x333528=_0x333528+'/'+_0x38d6b5,await this['createDir'](_0x333528);}[a0_0x5a7de2(0xfd)](){const _0x41fba4=a0_0x5a7de2;let _0x3daf4e=process[_0x41fba4(0x155)][_0x41fba4(0x164)][_0x41fba4(0x146)]('/'),_0x8d47d=[];for(let _0x3a466c=0x0;_0x3a466c<_0x3daf4e[_0x41fba4(0x140)]&&_0x41fba4(0xfb)!=_0x3daf4e[_0x3a466c];_0x3a466c++)_0x8d47d[_0x41fba4(0xff)](_0x3daf4e[_0x3a466c]);return _0x8d47d[_0x41fba4(0x162)]('/');}async['createDir'](_0x1e54a6){const _0x4e8537=a0_0x5a7de2;0x0==await this[_0x4e8537(0x169)](_0x1e54a6)&&fs[_0x4e8537(0xfa)](_0x1e54a6);}async[a0_0x5a7de2(0x169)](_0x3b990c){const _0x3cab2f=a0_0x5a7de2;return await fs[_0x3cab2f(0x129)](_0x3b990c);}};tslib_1[a0_0x5a7de2(0x147)]([(0x0,type_graphql_1[a0_0x5a7de2(0x12d)])(_0x3719dc=>Boolean,{'description':'Operato\x20Tool\x20Create\x20Service'}),tslib_1[a0_0x5a7de2(0xef)](0x0,(0x0,type_graphql_1['Arg'])('id')),tslib_1[a0_0x5a7de2(0xef)](0x1,(0x0,type_graphql_1[a0_0x5a7de2(0x139)])()),tslib_1['__metadata'](a0_0x5a7de2(0x152),Function),tslib_1[a0_0x5a7de2(0x101)]('design:paramtypes',[String,Object]),tslib_1[a0_0x5a7de2(0x101)](a0_0x5a7de2(0x102),Promise)],OperatoToolCreateService[a0_0x5a7de2(0x165)],a0_0x5a7de2(0x133),null),OperatoToolCreateService=tslib_1[a0_0x5a7de2(0x147)]([(0x0,type_graphql_1[a0_0x5a7de2(0xf2)])()],OperatoToolCreateService),exports['OperatoToolCreateService']=OperatoToolCreateService;const allIndex=a0_0x5a7de2(0x175),serviceIndex=a0_0x5a7de2(0x120),serviceHistoryIndex='\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryQuery\x20}\x20from\x20\x27./{{name}}-history-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryEntitySubscriber\x20}\x20from\x20\x27./event-subscriber\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}},\x20{{pascalCase\x20name}}History]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}HistoryQuery,\x20{{pascalCase\x20name}}Mutation]\x0aexport\x20const\x20subscribers\x20=\x20[{{pascalCase\x20name}}HistoryEntitySubscriber]\x0a\x0a',serviceQuery=a0_0x5a7de2(0x154),serviceHistoryQuery=a0_0x5a7de2(0x10f),serviceMutation=a0_0x5a7de2(0x145),sereviceType=a0_0x5a7de2(0xf4),sereviceHistoryType=a0_0x5a7de2(0x108),serviceEntity=a0_0x5a7de2(0x132),serviceEntityHistCopy=a0_0x5a7de2(0xf1),serviceEntityHistJson=a0_0x5a7de2(0x144),serviceEntitySubscriber=a0_0x5a7de2(0x11a);
|
|
1
|
+
'use strict';const a0_0x6d765a=a0_0xc6d7;function a0_0x4b10(){const _0x53b15d=['getRepository','PWD','snakeCaseName','Resolvers,','type\x20=>','\x20})',',length:','join','Float','tableName','datetime','map','utf8','EntitySubscribers\x20}\x20from\x20\x27./','\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}List\x20}\x20from\x20\x27./{{name}}-type\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Query\x20{\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20fetch\x20a\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20return\x20await\x20getRepository({{pascalCase\x20name}}).findOne({\x0a\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20}\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}List,\x20{\x20description:\x20\x27To\x20fetch\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{pluralCamelCase\x20name}}(@Args()\x20params:\x20ListParam,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}List>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20queryBuilder\x20=\x20getQueryBuilderFromListParams({\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20params,\x0a\x20\x20\x20\x20\x20\x20repository:\x20await\x20getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20const\x20convertedParams\x20=\x20convertListParams(params,\x20domain.id)\x0a\x20\x20\x20\x20const\x20[items,\x20total]\x20=\x20await\x20queryBuilder.getManyAndCount()\x0a\x0a\x20\x20\x20\x20return\x20{\x20items,\x20total\x20}\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20Domain)\x0a\x20\x20async\x20domain(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<Domain>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(Domain).findOneBy({id:{{camelCase\x20name}}.domainId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20updater(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.updaterId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20creator(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.creatorId})\x0a\x20\x20}\x0a}\x0a','7PLrBlF','creator_id','\x27,\x20type:\x20\x27','__param','createNoHistoryServiceFiels','nullable','lodash','camelCaseName','getColTxtType','tslib','colSize','uniqRank','\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','-history\x27','.ts','Entities,\x20resolvers\x20as\x20','createServiceFiles','EntitySubscribers,','@things-factory/resource-base','type-graphql','-mutation.ts','\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryList\x20}\x20from\x20\x27./{{name}}-history-type\x27\x0a\x0a@Resolver({{pascalCase\x20name}}History)\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryQuery\x20{\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}History,\x20{\x20description:\x20\x27To\x20fetch\x20a\x20{{pascalCase\x20name}}History\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}History(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}History>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20return\x20await\x20getRepository({{pascalCase\x20name}}History).findOne({\x0a\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20}\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}HistoryList,\x20{\x20description:\x20\x27To\x20fetch\x20multiple\x20{{pluralPascalCase\x20name}}History\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}Histories(@Args()\x20params:\x20ListParam,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}HistoryList>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20queryBuilder\x20=\x20getQueryBuilderFromListParams({\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20params,\x0a\x20\x20\x20\x20\x20\x20repository:\x20await\x20getRepository({{pascalCase\x20name}}History)\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20const\x20[items,\x20total]\x20=\x20await\x20queryBuilder.getManyAndCount()\x0a\x0a\x20\x20\x20\x20return\x20{\x20items,\x20total\x20}\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20Domain)\x0a\x20\x20async\x20domain(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<Domain>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(Domain).findOneBy({id:{{camelCase\x20name}}History.domainId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20updater(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}History.updaterId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20creator(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}History.creatorId})\x0a\x20\x20}\x0a}\x0a','__decorate','__metadata','createTypeText','character\x20varying','updated_at','552MIMxmG','/packages','writeFile','defineProperty','double','pluralize','createServicePath','creator','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','/packages/','1hSnDpd','/server','JSON','domain_id','findOne','filter','\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','getProjectRootPath','createHistoryEntityText','Resolvers\x20}\x20from\x20\x27./','prototype','float','createDir','30455HsXqiT','bigint','COPY','date','colType','Resolvers,\x20subscribers\x20as\x20','18XnpWpQ','toolCreateService','createEntityText','{{camelCase\x20name}}.','17445296LpZfZC','double\x20precision','state','\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','\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','pascalCaseName','dataProp','Entities,','string','92056KovMQE','columnToEntityColumn','Int','getFieldType','readFileSync','long','includes','updater_id','mkdirSync','\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','-history-type.ts','indexOf','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a\x20\x20@Column(\x27simple-json\x27,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20@Field(type\x20=>\x20ScalarObject,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20historyJson?:\x20any\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','5453034sVhySn','Operato\x20Tool\x20Create\x20Service','packages','rank','744358EILNbQ','\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','length','index.ts','writeFileSync','find','/*\x20ENTITIES\x20*/\x0a\x09...','decimal','Ctx','/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...','@things-factory/shell','env','created_at','sort','OperatoToolCreateService','design:returntype','\x20{\x20nullable:\x20','\x27,\x20nullable:\x20','push','number','...','design:paramtypes','@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})','Date','existsPath','-type.ts','-query.ts','integer','\x0a\x20\x20','Entity','updater','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','name','440673gzuMQw','timestamp\x20without\x20time\x20zone','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','/event-subscriber.ts','text','/index.ts','existsSync','export\x20*\x20from\x20\x27./','Query','replace','createHistoryServiceFiles','pluralCamelCaseName','8769290lFJFsC','@Field(','import\x20{\x20entities\x20as\x20'];a0_0x4b10=function(){return _0x53b15d;};return a0_0x4b10();}(function(_0x29c4e1,_0x1e6b98){const _0x56c70c=a0_0xc6d7,_0x4bde86=_0x29c4e1();while(!![]){try{const _0x47670d=parseInt(_0x56c70c(0x1b5))/0x1*(-parseInt(_0x56c70c(0x151))/0x2)+parseInt(_0x56c70c(0x172))/0x3+-parseInt(_0x56c70c(0x1ab))/0x4*(parseInt(_0x56c70c(0x12d))/0x5)+-parseInt(_0x56c70c(0x14d))/0x6*(parseInt(_0x56c70c(0x190))/0x7)+parseInt(_0x56c70c(0x140))/0x8*(parseInt(_0x56c70c(0x133))/0x9)+parseInt(_0x56c70c(0x17e))/0xa+parseInt(_0x56c70c(0x137))/0xb;if(_0x47670d===_0x1e6b98)break;else _0x4bde86['push'](_0x4bde86['shift']());}catch(_0x24861e){_0x4bde86['push'](_0x4bde86['shift']());}}}(a0_0x4b10,0x7ccda));Object[a0_0x6d765a(0x1ae)](exports,'__esModule',{'value':!0x0}),exports['OperatoToolCreateService']=void 0x0;const tslib_1=require(a0_0x6d765a(0x199)),type_graphql_1=require(a0_0x6d765a(0x1a3)),shell_1=require(a0_0x6d765a(0x15b)),resource_base_1=require(a0_0x6d765a(0x1a2)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x6d765a(0x196)),{plural:plural}=require(a0_0x6d765a(0x1b0)),fs=require('fs');let OperatoToolCreateService=class{async[a0_0x6d765a(0x134)](_0x223c95,_0x5d7a5c){const _0x74e44a=a0_0x6d765a,{domain:_0x53aa04}=_0x5d7a5c[_0x74e44a(0x139)],_0x213899=await(0x0,shell_1[_0x74e44a(0x181)])(resource_base_1[_0x74e44a(0x16e)])[_0x74e44a(0x124)]({'where':{'id':_0x223c95}}),_0x59b774=await(0x0,shell_1[_0x74e44a(0x181)])(resource_base_1['EntityColumn'])[_0x74e44a(0x156)]({'where':{'domain':{'id':_0x53aa04['id']},'entity':{'id':_0x213899['id']}}});let {name:_0x456640='',bundle:_0x38f8a9=''}=_0x213899||{},_0x44214f=this['getProjectRootPath'](),_0x35ac5b=kebabCase(_0x456640);return await this[_0x74e44a(0x1b1)](_0x44214f,_0x38f8a9,_0x35ac5b),await this[_0x74e44a(0x1a0)](_0x44214f,_0x38f8a9,_0x456640,_0x35ac5b,_0x213899,_0x59b774),!0x0;}async[a0_0x6d765a(0x1a0)](_0x344d21,_0x424ad4,_0x4ac8f8,_0x335487,_0x44d204,_0x2e0818){const _0x207e88=a0_0x6d765a;let _0x2dced6={'name':_0x335487,'tableName':_0x44d204[_0x207e88(0x18a)],'pascalCaseName':startCase(camelCase(_0x4ac8f8))[_0x207e88(0x17b)](/ /g,''),'camelCaseName':camelCase(_0x4ac8f8),'snakeCaseName':snakeCase(_0x4ac8f8),'pluralPascalCaseName':startCase(camelCase(plural(_0x4ac8f8)))['replace'](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x4ac8f8))},_0x584803=_0x344d21+_0x207e88(0x1b4)+_0x424ad4+'/server/service/';[_0x207e88(0x122),'COPY'][_0x207e88(0x146)](_0x44d204['dataProp'])?await this[_0x207e88(0x17c)](_0x584803,_0x335487,_0x44d204,_0x2e0818,_0x2dced6):await this['createNoHistoryServiceFiels'](_0x584803,_0x335487,_0x44d204,_0x2e0818,_0x2dced6);}async[a0_0x6d765a(0x17c)](_0x3acdf3,_0x5d068c,_0xe5d73a,_0x31dbae,_0xad57c1){const _0x20c89f=a0_0x6d765a;await this[_0x20c89f(0x1ad)](_0x3acdf3+(_0x5d068c+'/index.ts'),serviceHistoryIndex,_0xad57c1);let _0x4b66ce=this[_0x20c89f(0x135)](_0xe5d73a,_0x31dbae);await this[_0x20c89f(0x1ad)](_0x3acdf3+(_0x5d068c+'/'+_0x5d068c+'.ts'),_0x4b66ce,_0xad57c1),await this[_0x20c89f(0x1ad)](_0x3acdf3+(_0x5d068c+'/'+_0x5d068c+_0x20c89f(0x16b)),serviceQuery,_0xad57c1),await this[_0x20c89f(0x1ad)](_0x3acdf3+(_0x5d068c+'/'+_0x5d068c+_0x20c89f(0x1a4)),serviceMutation,_0xad57c1);let _0x246f47=this['createTypeText'](_0x31dbae);await this[_0x20c89f(0x1ad)](_0x3acdf3+(_0x5d068c+'/'+_0x5d068c+_0x20c89f(0x16a)),_0x246f47,_0xad57c1);let _0x513761=this['createHistoryEntityText'](_0xe5d73a,_0x31dbae);await this['writeFile'](_0x3acdf3+(_0x5d068c+'/'+_0x5d068c+'-history.ts'),_0x513761,_0xad57c1);let _0x379cf4='';'JSON'==_0xe5d73a[_0x20c89f(0x13d)]?(_0x379cf4=_0x20c89f(0x13b),await this[_0x20c89f(0x1ad)](_0x3acdf3+(_0x5d068c+_0x20c89f(0x175)),serviceEntitySubscriber,_0xad57c1)):_0x379cf4='';let _0x221f3b=serviceEntitySubscriber[_0x20c89f(0x17b)](/{{entityToJson}}/g,_0x379cf4);await this[_0x20c89f(0x1ad)](_0x3acdf3+(_0x5d068c+_0x20c89f(0x175)),_0x221f3b,_0xad57c1),await this[_0x20c89f(0x1ad)](_0x3acdf3+(_0x5d068c+'/'+_0x5d068c+'-history-query.ts'),serviceHistoryQuery,_0xad57c1),await this[_0x20c89f(0x1ad)](_0x3acdf3+(_0x5d068c+'/'+_0x5d068c+_0x20c89f(0x14a)),sereviceHistoryType,_0xad57c1);let _0x344521=_0x3acdf3+'index.ts';0x0==await this[_0x20c89f(0x169)](_0x344521)&&await this[_0x20c89f(0x1ad)](_0x344521,allIndex,_0xad57c1);let _0x403ff1=await fs[_0x20c89f(0x144)](_0x344521,'utf8');_0x403ff1[_0x20c89f(0x14b)](_0x20c89f(0x179)+_0xad57c1[_0x20c89f(0x171)]+'/'+_0xad57c1[_0x20c89f(0x171)]+_0x20c89f(0x19d))<0x0&&(_0x403ff1=_0x403ff1['replace'](/\/\* EXPORT ENTITY TYPES \*\//,_0x20c89f(0x170)+_0xad57c1[_0x20c89f(0x171)]+'/'+_0xad57c1[_0x20c89f(0x171)]+_0x20c89f(0x19d))),_0x403ff1['indexOf'](_0x20c89f(0x179)+_0xad57c1['name']+'/'+_0xad57c1[_0x20c89f(0x171)]+'\x27')<0x0&&(_0x403ff1=_0x403ff1[_0x20c89f(0x17b)](/\/\* EXPORT ENTITY TYPES \*\//,_0x20c89f(0x170)+_0xad57c1['name']+'/'+_0xad57c1[_0x20c89f(0x171)]+'\x27')),_0x403ff1[_0x20c89f(0x14b)](_0x20c89f(0x180)+_0xad57c1[_0x20c89f(0x13c)]+_0x20c89f(0x19f)+_0xad57c1[_0x20c89f(0x13c)]+_0x20c89f(0x132)+_0xad57c1[_0x20c89f(0x13c)]+_0x20c89f(0x18e)+_0xad57c1[_0x20c89f(0x171)]+'\x27')<0x0&&(_0x403ff1=_0x403ff1[_0x20c89f(0x17b)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,'/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20'+_0xad57c1[_0x20c89f(0x13c)]+_0x20c89f(0x19f)+_0xad57c1[_0x20c89f(0x13c)]+_0x20c89f(0x132)+_0xad57c1['pascalCaseName']+_0x20c89f(0x18e)+_0xad57c1[_0x20c89f(0x171)]+'\x27')),_0x403ff1[_0x20c89f(0x14b)](_0x20c89f(0x165)+_0xad57c1[_0x20c89f(0x13c)]+_0x20c89f(0x13e))<0x0&&(_0x403ff1=_0x403ff1[_0x20c89f(0x17b)](/\/\* ENTITIES \*\//,_0x20c89f(0x157)+_0xad57c1['pascalCaseName']+_0x20c89f(0x13e))),_0x403ff1['indexOf']('...'+_0xad57c1['pascalCaseName']+'Resolvers,')<0x0&&(_0x403ff1=_0x403ff1[_0x20c89f(0x17b)](/\/\* RESOLVER CLASSES \*\//,'/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...'+_0xad57c1[_0x20c89f(0x13c)]+'Resolvers,')),_0x403ff1[_0x20c89f(0x14b)]('...'+_0xad57c1['pascalCaseName']+_0x20c89f(0x1a1))<0x0&&(_0x403ff1=_0x403ff1[_0x20c89f(0x17b)](/\/\* SUBSCRIBERS \*\//,_0x20c89f(0x15a)+_0xad57c1['pascalCaseName']+_0x20c89f(0x1a1))),await this[_0x20c89f(0x1ad)](_0x344521,_0x403ff1,_0xad57c1);}async[a0_0x6d765a(0x194)](_0x50de92,_0xd318cb,_0x4f633f,_0x613109,_0x1b95d4){const _0x799a5=a0_0x6d765a;await this[_0x799a5(0x1ad)](_0x50de92+(_0xd318cb+_0x799a5(0x177)),serviceIndex,_0x1b95d4),await this['writeFile'](_0x50de92+(_0xd318cb+'/'+_0xd318cb+_0x799a5(0x16b)),serviceQuery,_0x1b95d4),await this[_0x799a5(0x1ad)](_0x50de92+(_0xd318cb+'/'+_0xd318cb+_0x799a5(0x1a4)),serviceMutation,_0x1b95d4);let _0x5130a7=this[_0x799a5(0x135)](_0x4f633f,_0x613109);await this[_0x799a5(0x1ad)](_0x50de92+(_0xd318cb+'/'+_0xd318cb+_0x799a5(0x19e)),_0x5130a7,_0x1b95d4);let _0x16df3f=this[_0x799a5(0x1a8)](_0x613109);await this[_0x799a5(0x1ad)](_0x50de92+(_0xd318cb+'/'+_0xd318cb+_0x799a5(0x16a)),_0x16df3f,_0x1b95d4);let _0x5e2e5d=_0x50de92+_0x799a5(0x154);0x0==await this['existsPath'](_0x5e2e5d)&&await this[_0x799a5(0x1ad)](_0x5e2e5d,allIndex,_0x1b95d4);let _0x7eb920=await fs['readFileSync'](_0x5e2e5d,_0x799a5(0x18d));_0x7eb920[_0x799a5(0x14b)](_0x799a5(0x179)+_0x1b95d4['name']+'/'+_0x1b95d4['name']+'\x27')<0x0&&(_0x7eb920=_0x7eb920['replace'](/\/\* EXPORT ENTITY TYPES \*\//,_0x799a5(0x170)+_0x1b95d4[_0x799a5(0x171)]+'/'+_0x1b95d4[_0x799a5(0x171)]+'\x27')),_0x7eb920[_0x799a5(0x14b)]('import\x20{\x20entities\x20as\x20'+_0x1b95d4['pascalCaseName']+'Entities,\x20resolvers\x20as\x20'+_0x1b95d4[_0x799a5(0x13c)]+_0x799a5(0x129)+_0x1b95d4[_0x799a5(0x171)]+'\x27')<0x0&&(_0x7eb920=_0x7eb920[_0x799a5(0x17b)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,'/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20'+_0x1b95d4[_0x799a5(0x13c)]+_0x799a5(0x19f)+_0x1b95d4['pascalCaseName']+'Resolvers\x20}\x20from\x20\x27./'+_0x1b95d4[_0x799a5(0x171)]+'\x27')),_0x7eb920[_0x799a5(0x14b)]('...'+_0x1b95d4[_0x799a5(0x13c)]+_0x799a5(0x13e))<0x0&&(_0x7eb920=_0x7eb920[_0x799a5(0x17b)](/\/\* ENTITIES \*\//,_0x799a5(0x157)+_0x1b95d4[_0x799a5(0x13c)]+'Entities,')),_0x7eb920[_0x799a5(0x14b)](_0x799a5(0x165)+_0x1b95d4[_0x799a5(0x13c)]+_0x799a5(0x184))<0x0&&(_0x7eb920=_0x7eb920[_0x799a5(0x17b)](/\/\* RESOLVER CLASSES \*\//,_0x799a5(0x1b3)+_0x1b95d4[_0x799a5(0x13c)]+_0x799a5(0x184))),await this['writeFile'](_0x5e2e5d,_0x7eb920,_0x1b95d4);}['createTypeText'](_0xe87d45){const _0x7c6b9b=a0_0x6d765a;let _0x13686f=sereviceType,_0x5928f7=_0xe87d45[_0x7c6b9b(0x18c)](_0x22c497=>{const _0x475408=_0x7c6b9b;if('id'==_0x22c497['name'])return'';if(_0x475408(0x123)==_0x22c497['name'])return'';if('created_at'==_0x22c497['name'])return'';if(_0x475408(0x1aa)==_0x22c497[_0x475408(0x171)])return'';if('creator_id'==_0x22c497[_0x475408(0x171)])return'';if('updater_id'==_0x22c497[_0x475408(0x171)])return'';let _0x4ecb40=this['getFieldType'](_0x22c497),_0xdc3323=this[_0x475408(0x198)](_0x22c497),_0x1b90fa=camelCase(_0x22c497[_0x475408(0x171)]);return'\x20\x20'+(_0x475408(0x17f)+(0x0==_0x4ecb40[_0x475408(0x153)]?'':_0x475408(0x185)+_0x4ecb40+',')+'\x20{\x20nullable:\x20'+_0x22c497[_0x475408(0x195)]+_0x475408(0x186))+_0x475408(0x16d)+(''+_0x1b90fa+(_0x22c497[_0x475408(0x195)]?'?':'')+':\x20'+_0xdc3323)+'\x0a';});_0x13686f=_0x13686f[_0x7c6b9b(0x17b)](/{{newTypeColumns}}/g,_0x5928f7[_0x7c6b9b(0x188)]('\x0a'));let _0x5c3f87=_0xe87d45['map'](_0xf7b7cf=>{const _0x5337d7=_0x7c6b9b;if('id'==_0xf7b7cf['name'])return'';if('domain_id'==_0xf7b7cf['name'])return'';if(_0x5337d7(0x15d)==_0xf7b7cf[_0x5337d7(0x171)])return'';if(_0x5337d7(0x1aa)==_0xf7b7cf['name'])return'';if('creator_id'==_0xf7b7cf[_0x5337d7(0x171)])return'';if(_0x5337d7(0x147)==_0xf7b7cf['name'])return'';let _0x16cc53=this[_0x5337d7(0x143)](_0xf7b7cf),_0x55beb5=this[_0x5337d7(0x198)](_0xf7b7cf);_0xf7b7cf[_0x5337d7(0x195)]=!0x0;let _0x10dfe4=camelCase(_0xf7b7cf['name']);return'\x20\x20'+('@Field('+(0x0==_0x16cc53['length']?'':'type\x20=>'+_0x16cc53+',')+'\x20{\x20nullable:\x20'+_0xf7b7cf[_0x5337d7(0x195)]+_0x5337d7(0x186))+_0x5337d7(0x16d)+(''+_0x10dfe4+(_0xf7b7cf[_0x5337d7(0x195)]?'?':'')+':\x20'+_0x55beb5)+'\x0a';});return _0x13686f=_0x13686f[_0x7c6b9b(0x17b)](/{{patchTypeColumns}}/g,_0x5c3f87[_0x7c6b9b(0x188)]('\x0a')),_0x13686f;}[a0_0x6d765a(0x135)](_0xb04da0,_0x445303){const _0x413125=a0_0x6d765a;let _0x13a5ea=serviceEntity,_0x30ff74=_0x445303[_0x413125(0x15e)](function(_0x3f721d,_0x1efde4){const _0x2dd2c4=_0x413125;return _0x3f721d[_0x2dd2c4(0x150)]-_0x1efde4['rank'];})[_0x413125(0x18c)](_0x5bf813=>this['columnToEntityColumn'](_0x5bf813));[_0x413125(0x12f),_0x413125(0x122)][_0x413125(0x146)](_0xb04da0[_0x413125(0x13d)])&&_0x30ff74[_0x413125(0x163)]('\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201'),_0x13a5ea=_0x13a5ea[_0x413125(0x17b)](/{{entityColumns}}/g,_0x30ff74['join']('\x0a'));let _0x1a2361='',_0x3827e0=_0x445303[_0x413125(0x125)](_0x5143b5=>_0x5143b5[_0x413125(0x19b)]&&_0x5143b5['uniqRank']>0x0)['sort'](function(_0xa1374e,_0x5ccc20){const _0x4f3025=_0x413125;return _0xa1374e[_0x4f3025(0x19b)]-_0x5ccc20[_0x4f3025(0x19b)];});if(_0x3827e0['length']>0x0){_0x1a2361=_0x413125(0x167);let _0x374fd4=_0x3827e0[_0x413125(0x18c)](_0x47b77d=>{const _0x497d2c=_0x413125;let _0x48d0ee=_0x47b77d['name'];return'domain_id'==_0x47b77d[_0x497d2c(0x171)]&&(_0x48d0ee='domain'),_0x497d2c(0x191)==_0x47b77d[_0x497d2c(0x171)]&&(_0x48d0ee=_0x497d2c(0x1b2)),_0x497d2c(0x147)==_0x47b77d[_0x497d2c(0x171)]&&(_0x48d0ee=_0x497d2c(0x16f)),_0x497d2c(0x136)+camelCase(_0x48d0ee);});_0x1a2361=_0x1a2361[_0x413125(0x17b)](/{{indexColumns}}/g,_0x374fd4[_0x413125(0x188)](','));}return _0x13a5ea=_0x13a5ea['replace'](/{{indexAnn}}/g,_0x1a2361),_0x13a5ea;}[a0_0x6d765a(0x128)](_0x2923da,_0x5373bd){const _0x39a49a=a0_0x6d765a;let _0x50c1ac='JSON'==_0x2923da[_0x39a49a(0x13d)]?serviceEntityHistJson:serviceEntityHistCopy,_0x5c2dc8=_0x5373bd[_0x39a49a(0x15e)](function(_0x45e40,_0x25c83b){const _0x28fc85=_0x39a49a;return _0x45e40[_0x28fc85(0x150)]-_0x25c83b[_0x28fc85(0x150)];})['map'](_0x6c49f6=>this[_0x39a49a(0x141)](_0x6c49f6));return _0x50c1ac=_0x50c1ac['replace'](/{{entityColumns}}/g,_0x5c2dc8[_0x39a49a(0x188)]('\x0a')),_0x50c1ac;}[a0_0x6d765a(0x141)](_0x341b95){const _0x13f423=a0_0x6d765a;if('id'==_0x341b95['name'])return'';if(_0x13f423(0x123)==_0x341b95['name'])return'';if('created_at'==_0x341b95['name'])return'';if(_0x13f423(0x1aa)==_0x341b95[_0x13f423(0x171)])return'';if(_0x13f423(0x191)==_0x341b95['name'])return'';if(_0x13f423(0x147)==_0x341b95[_0x13f423(0x171)])return'';let _0x582dd6=_0x341b95[_0x13f423(0x131)];_0x13f423(0x1af)==_0x341b95[_0x13f423(0x131)]&&(_0x582dd6=_0x13f423(0x138)),'long'==_0x341b95[_0x13f423(0x131)]&&(_0x582dd6=_0x13f423(0x12e)),_0x13f423(0x13f)==_0x341b95['colType']&&(_0x582dd6=_0x13f423(0x1a9)),_0x13f423(0x18b)==_0x341b95[_0x13f423(0x131)]&&(_0x582dd6=_0x13f423(0x173));let _0x1c631b='';_0x13f423(0x13f)==_0x341b95['colType']&&(_0x1c631b=_0x341b95[_0x13f423(0x19a)]);let _0x43f0d9=this[_0x13f423(0x143)](_0x341b95),_0x49cee1=this[_0x13f423(0x198)](_0x341b95),_0x214866=camelCase(_0x341b95[_0x13f423(0x171)]);return'\x20\x20'+('@Column({name:\x27'+_0x341b95['name']+_0x13f423(0x192)+_0x582dd6+_0x13f423(0x162)+_0x341b95[_0x13f423(0x195)]+'\x20'+(0x0==_0x1c631b['length']?'':_0x13f423(0x187)+_0x1c631b)+_0x13f423(0x186))+'\x0a\x20\x20'+('@Field('+(0x0==_0x43f0d9[_0x13f423(0x153)]?'':_0x13f423(0x185)+_0x43f0d9+',')+_0x13f423(0x161)+_0x341b95[_0x13f423(0x195)]+'\x20})')+'\x0a\x20\x20'+(''+_0x214866+(_0x341b95[_0x13f423(0x195)]?'?':'')+':\x20'+_0x49cee1)+'\x0a';}['getFieldType'](_0x454145){const _0x20aa82=a0_0x6d765a;let _0x4954af='';return _0x20aa82(0x1af)==_0x454145['colType']&&(_0x4954af=_0x20aa82(0x189)),_0x20aa82(0x12b)==_0x454145[_0x20aa82(0x131)]&&(_0x4954af='Float'),'long'==_0x454145[_0x20aa82(0x131)]&&(_0x4954af=_0x20aa82(0x142)),_0x20aa82(0x16c)==_0x454145[_0x20aa82(0x131)]&&(_0x4954af=_0x20aa82(0x142)),_0x4954af;}[a0_0x6d765a(0x198)](_0x3e7668){const _0x2b103a=a0_0x6d765a;let _0x41a048=_0x3e7668[_0x2b103a(0x131)];return _0x2b103a(0x158)==_0x3e7668[_0x2b103a(0x131)]&&(_0x41a048=_0x2b103a(0x164)),_0x2b103a(0x1af)==_0x3e7668[_0x2b103a(0x131)]&&(_0x41a048=_0x2b103a(0x164)),'float'==_0x3e7668['colType']&&(_0x41a048=_0x2b103a(0x164)),_0x2b103a(0x16c)==_0x3e7668[_0x2b103a(0x131)]&&(_0x41a048=_0x2b103a(0x164)),_0x2b103a(0x145)==_0x3e7668[_0x2b103a(0x131)]&&(_0x41a048=_0x2b103a(0x164)),_0x2b103a(0x18b)==_0x3e7668[_0x2b103a(0x131)]&&(_0x41a048='Date'),_0x2b103a(0x130)==_0x3e7668[_0x2b103a(0x131)]&&(_0x41a048=_0x2b103a(0x168)),_0x2b103a(0x176)==_0x3e7668[_0x2b103a(0x131)]&&(_0x41a048='string'),_0x41a048;}async[a0_0x6d765a(0x1ad)](_0x17afb0,_0x58450e,_0x17efaa){const _0x50141b=a0_0x6d765a;await fs[_0x50141b(0x155)](_0x17afb0,this['replaceNamesMap'](_0x58450e,_0x17efaa),'utf8');}['replaceNamesMap'](_0x2560eb,_0x5af592){const _0x3ea911=a0_0x6d765a;return _0x2560eb['replace'](/{{pascalCase name}}/g,_0x5af592[_0x3ea911(0x13c)])[_0x3ea911(0x17b)](/{{camelCase name}}/g,_0x5af592[_0x3ea911(0x197)])[_0x3ea911(0x17b)](/{{snakeCase name}}/g,_0x5af592[_0x3ea911(0x183)])[_0x3ea911(0x17b)](/{{pluralPascalCase name}}/g,_0x5af592['pluralPascalCaseName'])[_0x3ea911(0x17b)](/{{pluralCamelCase name}}/g,_0x5af592[_0x3ea911(0x17d)])[_0x3ea911(0x17b)](/{{tableName}}/g,_0x5af592[_0x3ea911(0x18a)])[_0x3ea911(0x17b)](/{{name}}/g,_0x5af592[_0x3ea911(0x171)]);}async[a0_0x6d765a(0x1b1)](_0xe0a322,_0x2dbf43,_0x582621){const _0x5394ad=a0_0x6d765a;let _0x4c9d31=_0xe0a322+_0x5394ad(0x1ac);await this[_0x5394ad(0x12c)](_0x4c9d31),_0x4c9d31=_0x4c9d31+'/'+_0x2dbf43,await this[_0x5394ad(0x12c)](_0x4c9d31),_0x4c9d31+=_0x5394ad(0x121),await this[_0x5394ad(0x12c)](_0x4c9d31),_0x4c9d31+='/service',await this[_0x5394ad(0x12c)](_0x4c9d31),_0x4c9d31=_0x4c9d31+'/'+_0x582621,await this[_0x5394ad(0x12c)](_0x4c9d31);}[a0_0x6d765a(0x127)](){const _0x24411f=a0_0x6d765a;let _0x3a990c=process[_0x24411f(0x15c)][_0x24411f(0x182)]['split']('/'),_0x503e68=[];for(let _0xed2737=0x0;_0xed2737<_0x3a990c[_0x24411f(0x153)]&&_0x24411f(0x14f)!=_0x3a990c[_0xed2737];_0xed2737++)_0x503e68[_0x24411f(0x163)](_0x3a990c[_0xed2737]);return _0x503e68[_0x24411f(0x188)]('/');}async[a0_0x6d765a(0x12c)](_0x18f87e){const _0x36d1dc=a0_0x6d765a;0x0==await this[_0x36d1dc(0x169)](_0x18f87e)&&fs[_0x36d1dc(0x148)](_0x18f87e);}async[a0_0x6d765a(0x169)](_0x288b79){const _0x281021=a0_0x6d765a;return await fs[_0x281021(0x178)](_0x288b79);}};tslib_1[a0_0x6d765a(0x1a6)]([(0x0,type_graphql_1[a0_0x6d765a(0x17a)])(_0x32755e=>Boolean,{'description':a0_0x6d765a(0x14e)}),tslib_1[a0_0x6d765a(0x193)](0x0,(0x0,type_graphql_1['Arg'])('id')),tslib_1['__param'](0x1,(0x0,type_graphql_1[a0_0x6d765a(0x159)])()),tslib_1['__metadata']('design:type',Function),tslib_1[a0_0x6d765a(0x1a7)](a0_0x6d765a(0x166),[String,Object]),tslib_1['__metadata'](a0_0x6d765a(0x160),Promise)],OperatoToolCreateService[a0_0x6d765a(0x12a)],a0_0x6d765a(0x134),null),OperatoToolCreateService=tslib_1[a0_0x6d765a(0x1a6)]([(0x0,type_graphql_1['Resolver'])()],OperatoToolCreateService),exports[a0_0x6d765a(0x15f)]=OperatoToolCreateService;function a0_0xc6d7(_0x5a58ac,_0x3bd962){const _0x4b10e6=a0_0x4b10();return a0_0xc6d7=function(_0xc6d72,_0x1affca){_0xc6d72=_0xc6d72-0x121;let _0x18d630=_0x4b10e6[_0xc6d72];return _0x18d630;},a0_0xc6d7(_0x5a58ac,_0x3bd962);}const allIndex=a0_0x6d765a(0x19c),serviceIndex=a0_0x6d765a(0x149),serviceHistoryIndex=a0_0x6d765a(0x152),serviceQuery=a0_0x6d765a(0x18f),serviceHistoryQuery=a0_0x6d765a(0x1a5),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=a0_0x6d765a(0x13a),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(\x27{{tableName}}\x27)\x0a{{indexAnn}}\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}\x20{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a',serviceEntityHistCopy=a0_0x6d765a(0x174),serviceEntityHistJson=a0_0x6d765a(0x14c),serviceEntitySubscriber=a0_0x6d765a(0x126);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x101db6=a0_0x2660;function a0_0x2660(_0x2eaef7,_0x3b9b1a){const _0xb3d048=a0_0xb3d0();return a0_0x2660=function(_0x266094,_0x3b689a){_0x266094=_0x266094-0x183;let _0x1ab10c=_0xb3d048[_0x266094];return _0x1ab10c;},a0_0x2660(_0x2eaef7,_0x3b9b1a);}(function(_0x38d8b1,_0x4cc6e3){const _0x2b7f8d=a0_0x2660,_0x164be9=_0x38d8b1();while(!![]){try{const _0x50b9d5=-parseInt(_0x2b7f8d(0x19d))/0x1+parseInt(_0x2b7f8d(0x192))/0x2+parseInt(_0x2b7f8d(0x18c))/0x3*(-parseInt(_0x2b7f8d(0x19a))/0x4)+-parseInt(_0x2b7f8d(0x18a))/0x5*(-parseInt(_0x2b7f8d(0x190))/0x6)+parseInt(_0x2b7f8d(0x18e))/0x7+-parseInt(_0x2b7f8d(0x18b))/0x8*(-parseInt(_0x2b7f8d(0x19f))/0x9)+parseInt(_0x2b7f8d(0x19b))/0xa;if(_0x50b9d5===_0x4cc6e3)break;else _0x164be9['push'](_0x164be9['shift']());}catch(_0x2aed00){_0x164be9['push'](_0x164be9['shift']());}}}(a0_0xb3d0,0x5ead4));function a0_0xb3d0(){const _0x2bb1e1=['OVER_LIMIT','split','LicenseError','getRepository','@things-factory/operato-license-checker','__esModule','andWhere','Menu','getCount','createQueryBuilder','id\x20!=\x20:id','ERROR_CODES','select','@things-factory/menu-base','3330395rxFzjl','453064ylyRJf','39VcBsTq','includes','791623LfvrJv','defineProperty','6IKsXKB','Studio','762874HSVFMP','checkStudioTemplateIsOverLimit','menu','getPermission','(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)','../../errors/license-error','trim','from','156880NercBx','2710680ogEAQR','map','590650JPHeDW','@things-factory/shell','9EUkQzT','checkStudioPermission'];a0_0xb3d0=function(){return _0x2bb1e1;};return a0_0xb3d0();}Object[a0_0x101db6(0x18f)](exports,a0_0x101db6(0x1a6),{'value':!0x0}),exports['checkStudioTemplateIsOverLimit']=exports[a0_0x101db6(0x1a0)]=void 0x0;const operato_license_checker_1=require(a0_0x101db6(0x1a5)),shell_1=require(a0_0x101db6(0x19e)),menu_base_1=require(a0_0x101db6(0x189)),license_error_1=require(a0_0x101db6(0x197));async function checkStudioPermission(){const _0x5777d9=a0_0x101db6;let _0x1f0eb5=((0x0,operato_license_checker_1[_0x5777d9(0x195)])('Permissions\x20For\x20Tailor\x20Tool')||',')[_0x5777d9(0x1a2)](',')[_0x5777d9(0x19c)](_0x23ca48=>_0x23ca48[_0x5777d9(0x198)]()),_0x5afc7c=!0x1;return _0x1f0eb5['forEach'](_0x3b6a7e=>{const _0x2bbac3=_0x5777d9;_0x3b6a7e[_0x2bbac3(0x18d)](_0x2bbac3(0x191))&&(_0x5afc7c=!0x0);}),_0x5afc7c;}async function checkStudioTemplateIsOverLimit(_0x3178f7,_0x93e326){const _0x2c9393=a0_0x101db6;if(0x0==await checkStudioPermission())throw new license_error_1[(_0x2c9393(0x1a3))]({'errorCode':_0x93e326['t'](license_error_1[_0x2c9393(0x1a3)][_0x2c9393(0x187)]['INVALID_LICENSE'])});var _0x512511=0x0;if(_0x512511=_0x3178f7&&''!=_0x3178f7?await(0x0,shell_1[_0x2c9393(0x1a4)])(menu_base_1[_0x2c9393(0x183)])['manager']['createQueryBuilder']()[_0x2c9393(0x188)](_0x2c9393(0x194))[_0x2c9393(0x199)](menu_base_1[_0x2c9393(0x183)],_0x2c9393(0x194))['where'](_0x2c9393(0x186),{'id':_0x3178f7})[_0x2c9393(0x1a7)](_0x2c9393(0x196))[_0x2c9393(0x184)]()+0x1:await(0x0,shell_1[_0x2c9393(0x1a4)])(menu_base_1[_0x2c9393(0x183)])['manager'][_0x2c9393(0x185)]()[_0x2c9393(0x188)](_0x2c9393(0x194))['from'](menu_base_1['Menu'],_0x2c9393(0x194))['where'](_0x2c9393(0x196))['getCount']()+0x1,!(0x0,operato_license_checker_1['checkTarget'])(_0x512511))throw new license_error_1[(_0x2c9393(0x1a3))]({'errorCode':_0x93e326['t'](license_error_1[_0x2c9393(0x1a3)]['ERROR_CODES'][_0x2c9393(0x1a1)])});return!0x0;}exports[a0_0x101db6(0x1a0)]=checkStudioPermission,exports[a0_0x101db6(0x193)]=checkStudioTemplateIsOverLimit;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x33a166=a0_0x3cb6;(function(_0x5424df,_0x11800a){const _0x5f13d0=a0_0x3cb6,_0x2a6404=_0x5424df();while(!![]){try{const _0x4f02c7=-parseInt(_0x5f13d0(0x10c))/0x1*(parseInt(_0x5f13d0(0x106))/0x2)+-parseInt(_0x5f13d0(0x10b))/0x3+-parseInt(_0x5f13d0(0x111))/0x4+parseInt(_0x5f13d0(0x112))/0x5+-parseInt(_0x5f13d0(0x110))/0x6*(-parseInt(_0x5f13d0(0x107))/0x7)+-parseInt(_0x5f13d0(0xfd))/0x8+parseInt(_0x5f13d0(0x102))/0x9;if(_0x4f02c7===_0x11800a)break;else _0x2a6404['push'](_0x2a6404['shift']());}catch(_0x486092){_0x2a6404['push'](_0x2a6404['shift']());}}}(a0_0x2a0a,0xcb60a));Object['defineProperty'](exports,a0_0x33a166(0x104),{'value':!0x0}),exports[a0_0x33a166(0x109)]=void 0x0;function a0_0x2a0a(){const _0x27bb4f=['Query','2cHHOTh','14CHihoM','prototype','OperatoToolResolver','__param','2006457zVzCUf','1534723tPqxbi','checkStudioPermission','./tool-permission','__metadata','1269348jbWvnB','2049384sNDCzb','5211405lKApet','__decorate','Arg','type-graphql','38376ZiqMEI','studioTemplateIsOverLimit','design:paramtypes','design:type','design:returntype','18794898rDQCLM','Operato\x20Tool\x20Studio\x20Limit\x20check','__esModule'];a0_0x2a0a=function(){return _0x27bb4f;};return a0_0x2a0a();}const tslib_1=require('tslib'),type_graphql_1=require(a0_0x33a166(0x115)),tool_permission_1=require(a0_0x33a166(0x10e));function a0_0x3cb6(_0xc3ce6a,_0x36298f){const _0x2a0a1d=a0_0x2a0a();return a0_0x3cb6=function(_0x3cb6b6,_0x333f56){_0x3cb6b6=_0x3cb6b6-0xfd;let _0x384d97=_0x2a0a1d[_0x3cb6b6];return _0x384d97;},a0_0x3cb6(_0xc3ce6a,_0x36298f);}let OperatoToolResolver=class{async['studioPermission'](_0x54cb49){const _0x146c0e=a0_0x33a166;return(0x0,tool_permission_1[_0x146c0e(0x10d)])();}async[a0_0x33a166(0xfe)](_0x3a48e6,_0x17ff94){return(0x0,tool_permission_1['checkStudioTemplateIsOverLimit'])(_0x3a48e6,_0x17ff94);}};tslib_1[a0_0x33a166(0x113)]([(0x0,type_graphql_1[a0_0x33a166(0x105)])(_0x3c3582=>Boolean,{'description':'Operato\x20Tool\x20Studio\x20Usage\x20Permissions'}),tslib_1[a0_0x33a166(0x10a)](0x0,(0x0,type_graphql_1['Ctx'])()),tslib_1[a0_0x33a166(0x10f)](a0_0x33a166(0x100),Function),tslib_1[a0_0x33a166(0x10f)]('design:paramtypes',[Object]),tslib_1[a0_0x33a166(0x10f)](a0_0x33a166(0x101),Promise)],OperatoToolResolver['prototype'],'studioPermission',null),tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x33a166(0x105)])(_0x56e193=>Boolean,{'description':a0_0x33a166(0x103)}),tslib_1[a0_0x33a166(0x10a)](0x0,(0x0,type_graphql_1[a0_0x33a166(0x114)])('id')),tslib_1['__param'](0x1,(0x0,type_graphql_1['Ctx'])()),tslib_1[a0_0x33a166(0x10f)](a0_0x33a166(0x100),Function),tslib_1[a0_0x33a166(0x10f)](a0_0x33a166(0xff),[String,Object]),tslib_1['__metadata'](a0_0x33a166(0x101),Promise)],OperatoToolResolver[a0_0x33a166(0x108)],a0_0x33a166(0xfe),null),OperatoToolResolver=tslib_1['__decorate']([(0x0,type_graphql_1['Resolver'])()],OperatoToolResolver),exports[a0_0x33a166(0x109)]=OperatoToolResolver;
|