@things-factory/operato-tools 6.0.122 → 6.0.124
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 +23 -23
- 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 +4 -4
- package/server/constants/error-code.js +1 -1
- package/server/errors/license-error.js +1 -1
- package/server/routes.js +1 -1
- package/server/service/tool-entity/create-menu.js +1 -1
- package/server/service/tool-entity/create-service.js +1 -1
- package/server/service/tool-secret/tool-permission.js +1 -1
- package/server/service/tool-secret/tool-resolver.js +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x287324=a0_0x36c5;function a0_0x36c5(_0x53f843,_0x44d682){const _0x4f9015=a0_0x4f90();return a0_0x36c5=function(_0x36c5ee,_0x33e34a){_0x36c5ee=_0x36c5ee-0xca;let _0x3d78b7=_0x4f9015[_0x36c5ee];return _0x3d78b7;},a0_0x36c5(_0x53f843,_0x44d682);}function a0_0x4f90(){const _0x2392ca=['defineProperty','ERROR_CODES','../constants/error-code','1eqZhSh','7jPCVyQ','8439035eKnkJV','45WhXbPd','257934lDJHPf','errorCode','689960kklCvv','5428360JDvIsx','994032pmPJhN','LicenseError','784176WmJLVG','tslib','detail','707494EODTzB','35BuSMNZ','license-error','__esModule','__importStar'];a0_0x4f90=function(){return _0x2392ca;};return a0_0x4f90();}(function(_0x3812ec,_0x2b28e8){const _0x273a19=a0_0x36c5,_0x5ef6fb=_0x3812ec();while(!![]){try{const _0x134eda=-parseInt(_0x273a19(0xdb))/0x1*(parseInt(_0x273a19(0xd3))/0x2)+parseInt(_0x273a19(0xd0))/0x3+-parseInt(_0x273a19(0xce))/0x4+-parseInt(_0x273a19(0xd4))/0x5*(-parseInt(_0x273a19(0xca))/0x6)+parseInt(_0x273a19(0xdc))/0x7*(-parseInt(_0x273a19(0xcd))/0x8)+-parseInt(_0x273a19(0xde))/0x9*(-parseInt(_0x273a19(0xcc))/0xa)+parseInt(_0x273a19(0xdd))/0xb;if(_0x134eda===_0x2b28e8)break;else _0x5ef6fb['push'](_0x5ef6fb['shift']());}catch(_0x1e6db6){_0x5ef6fb['push'](_0x5ef6fb['shift']());}}}(a0_0x4f90,0x601d0));Object[a0_0x287324(0xd8)](exports,a0_0x287324(0xd6),{'value':!0x0}),exports[a0_0x287324(0xcf)]=void 0x0;const tslib_1=require(a0_0x287324(0xd1)),ERROR_CODES=tslib_1[a0_0x287324(0xd7)](require(a0_0x287324(0xda)));class LicenseError extends Error{static get[a0_0x287324(0xd9)](){return Object['assign']({},ERROR_CODES);}constructor({errorCode:_0x10addb,detail:_0x3649c2}){const _0x4609b9=a0_0x287324;super(_0x10addb),this['name']=_0x4609b9(0xd5),this[_0x4609b9(0xcb)]=_0x10addb,this[_0x4609b9(0xd2)]=_0x3649c2;}}exports[a0_0x287324(0xcf)]=LicenseError;
|
package/server/routes.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a0_0x30a9(){const _0x5aed98=['debug','4DFAxAj','74943pelkay','114XlkIMj','5433jjDRnf','50SvUvok','29872tsVVaq','bootstrap-module-global-private-route','things-factory:operato-tools:routes','50rYuCjp','183642LqTqlD','bootstrap-module-domain-public-route','354835EzsqeH','21658WCWDzy','413370PpSuCp'];a0_0x30a9=function(){return _0x5aed98;};return a0_0x30a9();}function a0_0x59f9(_0x72073b,_0x202908){const _0x30a9f2=a0_0x30a9();return a0_0x59f9=function(_0x59f950,_0x25ff0d){_0x59f950=_0x59f950-0x1e8;let _0x37b59e=_0x30a9f2[_0x59f950];return _0x37b59e;},a0_0x59f9(_0x72073b,_0x202908);}const a0_0x33155a=a0_0x59f9;(function(_0x2e4743,_0x87a12){const _0x5b7c6a=a0_0x59f9,_0x488467=_0x2e4743();while(!![]){try{const _0x4f701b=-parseInt(_0x5b7c6a(0x1ee))/0x1*(-parseInt(_0x5b7c6a(0x1ef))/0x2)+-parseInt(_0x5b7c6a(0x1f4))/0x3+-parseInt(_0x5b7c6a(0x1eb))/0x4*(parseInt(_0x5b7c6a(0x1f6))/0x5)+-parseInt(_0x5b7c6a(0x1ed))/0x6*(parseInt(_0x5b7c6a(0x1e8))/0x7)+parseInt(_0x5b7c6a(0x1f0))/0x8+parseInt(_0x5b7c6a(0x1e9))/0x9*(parseInt(_0x5b7c6a(0x1f3))/0xa)+parseInt(_0x5b7c6a(0x1ec))/0xb;if(_0x4f701b===_0x87a12)break;else _0x488467['push'](_0x488467['shift']());}catch(_0x2e486e){_0x488467['push'](_0x488467['shift']());}}}(a0_0x30a9,0x2d2df));const debug=require(a0_0x33155a(0x1ea))(a0_0x33155a(0x1f2));process['on']('bootstrap-module-global-public-route',(_0x348011,_0xa6491c)=>{}),process['on'](a0_0x33155a(0x1f1),(_0x37e54e,_0x204d0f)=>{}),process['on'](a0_0x33155a(0x1f5),(_0x33988e,_0xee9369)=>{}),process['on']('bootstrap-module-domain-private-route',(_0x31d2f3,_0x146af9)=>{});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x4306ec=a0_0x1322;(function(_0x212b58,_0x165b59){const _0x4a3cbd=a0_0x1322,_0x258f0d=_0x212b58();while(!![]){try{const _0x2a3164=parseInt(_0x4a3cbd(0xbd))/0x1*(-parseInt(_0x4a3cbd(0xb9))/0x2)+parseInt(_0x4a3cbd(0x98))/0x3*(parseInt(_0x4a3cbd(0xa8))/0x4)+-parseInt(_0x4a3cbd(0xc9))/0x5+-parseInt(_0x4a3cbd(0xb7))/0x6+parseInt(_0x4a3cbd(0x85))/0x7+parseInt(_0x4a3cbd(0xe1))/0x8*(-parseInt(_0x4a3cbd(0xe4))/0x9)+parseInt(_0x4a3cbd(0x83))/0xa;if(_0x2a3164===_0x165b59)break;else _0x258f0d['push'](_0x258f0d['shift']());}catch(_0x1c64a1){_0x258f0d['push'](_0x258f0d['shift']());}}}(a0_0x48f2,0x820df));function a0_0x1322(_0x3936ca,_0x1e4b5e){const _0x48f2eb=a0_0x48f2();return a0_0x1322=function(_0x1322c1,_0x24837a){_0x1322c1=_0x1322c1-0x7b;let _0x1e70ec=_0x48f2eb[_0x1322c1];return _0x1e70ec;},a0_0x1322(_0x3936ca,_0x1e4b5e);}Object[a0_0x4306ec(0xe0)](exports,'__esModule',{'value':!0x0}),exports[a0_0x4306ec(0x7d)]=void 0x0;const tslib_1=require(a0_0x4306ec(0x94)),type_graphql_1=require(a0_0x4306ec(0x8d)),resource_base_1=require(a0_0x4306ec(0x88)),menu_base_1=require(a0_0x4306ec(0x8f)),tool_permission_1=require(a0_0x4306ec(0xe6)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x4306ec(0xda)),{plural:plural}=require(a0_0x4306ec(0x91)),crypto_1=tslib_1['__importDefault'](require(a0_0x4306ec(0xb4)));let OperatoToolCreateMenu=class{async['toolCreateMenu'](_0x5465f5,_0x23e5fc,_0x5e55b6){const _0x4e4efe=a0_0x4306ec,{domain:_0x47087d,user:_0x3ec4ec,tx:_0x4d8fbd}=_0x5e55b6[_0x4e4efe(0x87)];await(0x0,tool_permission_1[_0x4e4efe(0xd6)])('',_0x5e55b6);const _0x1c24dc=await _0x4d8fbd[_0x4e4efe(0x8c)](resource_base_1[_0x4e4efe(0xa0)])[_0x4e4efe(0xe8)]({'where':{'domain':{'id':_0x47087d['id']},'id':_0x5465f5}}),_0x4da5e2=await _0x4d8fbd[_0x4e4efe(0x8c)](resource_base_1['EntityColumn'])['find']({'where':{'domain':{'id':_0x47087d['id']},'entity':{'id':_0x1c24dc['id']}}});let {name:_0x5ce5fb=''}=_0x1c24dc||{},_0x150b23=kebabCase(_0x5ce5fb),_0x1f8570=modelTemplate[_0x4e4efe(0xd5)](/{{pascalCase name}}/g,startCase(camelCase(_0x5ce5fb))[_0x4e4efe(0xd5)](/ /g,''))[_0x4e4efe(0xd5)](/{{camelCase name}}/g,camelCase(_0x5ce5fb))[_0x4e4efe(0xd5)](/{{snakeCase name}}/g,snakeCase(_0x5ce5fb))[_0x4e4efe(0xd5)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x5ce5fb)))[_0x4e4efe(0xd5)](/ /g,''))[_0x4e4efe(0xd5)](/{{pluralCamelCase name}}/g,camelCase(plural(_0x5ce5fb)))[_0x4e4efe(0xd5)](/{{name}}/g,_0x5ce5fb),_0x1a8c27='';'JSON'==_0x1c24dc[_0x4e4efe(0xdd)]?_0x1a8c27=_0x4e4efe(0x7e):_0x4e4efe(0xba)==_0x1c24dc[_0x4e4efe(0xdd)]&&(_0x1a8c27='\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'),_0x1f8570=_0x1f8570['replace'](/{{HistoryButton}}/g,_0x1a8c27);let _0x1b660c=this[_0x4e4efe(0x9b)](_0x4da5e2);_0x1f8570=_0x1f8570[_0x4e4efe(0xd5)](/{{SortColumns}}/g,_0x1b660c[_0x4e4efe(0xad)](','));let _0x560a3a=this[_0x4e4efe(0xc8)](_0x4da5e2);_0x1f8570=_0x1f8570[_0x4e4efe(0xd5)](/{{SearchColumns}}/g,_0x560a3a[_0x4e4efe(0xad)](','));let _0x2b84dc=this[_0x4e4efe(0x90)](_0x4da5e2);return _0x1f8570=_0x1f8570['replace'](/{{GridColumns}}/g,_0x2b84dc[_0x4e4efe(0xad)](',')),_0x1f8570=this[_0x4e4efe(0xae)](_0x1f8570),await this[_0x4e4efe(0xcc)](_0x4d8fbd,_0x47087d,_0x3ec4ec,_0x23e5fc,_0x150b23,_0x1f8570),!0x0;}[a0_0x4306ec(0x90)](_0x5d1782){const _0x48fdf2=a0_0x4306ec;return _0x5d1782['filter'](_0x4c829c=>'id'!=_0x4c829c[_0x48fdf2(0xde)]&&_0x4c829c[_0x48fdf2(0xce)]>0x0)[_0x48fdf2(0xbc)](function(_0x2d5a5c,_0x295202){const _0x557b97=_0x48fdf2;return _0x2d5a5c[_0x557b97(0xce)]-_0x295202[_0x557b97(0xce)];})['map'](_0x2e2f87=>{const _0x75f1f2=_0x48fdf2;let {gridEditor:_0x3252e1=_0x75f1f2(0xa3),name:_0x116233,term:_0x2aa49b,gridWidth:_0x17edb4=0x0,gridAlign:_0x400da4='left',nullable:_0x404fe5=!0x1}=_0x2e2f87;if(null==_0x3252e1&&(_0x3252e1=_0x75f1f2(0xa3)),null==_0x400da4&&(_0x400da4='left'),'updater_id'==_0x116233||_0x75f1f2(0xd9)==_0x116233)return _0x116233=_0x75f1f2(0xdf)==_0x116233?'updater':_0x75f1f2(0x8a),_0x75f1f2(0x80)+_0x116233+_0x75f1f2(0x92)+_0x116233+_0x75f1f2(0xc1);if(_0x75f1f2(0xe5)==_0x116233||_0x75f1f2(0xc4)==_0x116233)return _0x75f1f2(0x81)+('updated_at'==_0x116233?_0x75f1f2(0xaa):_0x75f1f2(0x9c))+'\x22,\x22header\x22:\x20\x22'+_0x116233+'\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}';let _0x5b146a=_0x75f1f2(0xcb)!=_0x3252e1&&_0x75f1f2(0xac)!=_0x3252e1,_0x2e9707=_0x75f1f2(0xac)==_0x3252e1;0x1!=_0x2e9707&&0x0!=_0x5b146a||(_0x3252e1=_0x75f1f2(0xa3));let _0x57a1bd='{\x22type\x22:\x20\x22'+_0x3252e1+_0x75f1f2(0xc0)+camelCase(_0x116233)+_0x75f1f2(0x92)+_0x2aa49b+'\x22,\x22hidden\x22:'+_0x2e9707+'\x20,\x22editable\x22:\x20'+_0x5b146a+_0x75f1f2(0xc5)+!_0x404fe5+_0x75f1f2(0x7c)+_0x400da4+_0x75f1f2(0xdc)+_0x17edb4+_0x75f1f2(0xb2);return _0x75f1f2(0xc3)==_0x2e2f87[_0x75f1f2(0xd2)]&&(_0x57a1bd+=_0x75f1f2(0xa7)+_0x2e2f87['refName']+'\x22}'),_0x75f1f2(0xe3)==_0x2e2f87[_0x75f1f2(0xd2)]&&(_0x57a1bd+=_0x75f1f2(0x9d)+_0x2e2f87[_0x75f1f2(0xbe)]+'\x22}'),_0x75f1f2(0x84)==_0x2e2f87[_0x75f1f2(0xd2)]&&(_0x57a1bd+=_0x75f1f2(0xa1)+camelCase(plural(_0x2e2f87['refName']))+_0x75f1f2(0xb3)),_0x57a1bd+='}',_0x57a1bd;});}[a0_0x4306ec(0xc8)](_0x34248b){const _0x4d1e11=a0_0x4306ec;return _0x34248b[_0x4d1e11(0x7f)](_0x58eef6=>_0x58eef6[_0x4d1e11(0xdb)]>0x0)[_0x4d1e11(0xbc)](function(_0x521408,_0x25f5b4){const _0x1507f1=_0x4d1e11;return _0x521408[_0x1507f1(0xdb)]-_0x25f5b4['searchRank'];})['map'](_0xa28f69=>{const _0x1b91b6=_0x4d1e11;let _0x627e08=_0xa28f69[_0x1b91b6(0xd8)];return _0x1b91b6(0x7f)==_0x627e08?'\x22'+camelCase(_0xa28f69[_0x1b91b6(0xde)])+'\x22':(_0x627e08||(_0x627e08='eq'),_0x1b91b6(0xa6)+camelCase(_0xa28f69[_0x1b91b6(0xde)])+_0x1b91b6(0x8e)+_0x627e08+'\x22}');});}[a0_0x4306ec(0x9b)](_0x539f1c){const _0x503e1a=a0_0x4306ec;return _0x539f1c['filter'](_0x1e7563=>_0x1e7563['sortRank']>0x0)[_0x503e1a(0xbc)](function(_0x4124fa,_0x592c2b){return _0x4124fa['sortRank']-_0x592c2b['sortRank'];})['map'](_0x48f01b=>'{\x22name\x22:\x22'+camelCase(_0x48f01b['name'])+_0x503e1a(0xc6)+_0x48f01b[_0x503e1a(0xcd)]+'}');}async[a0_0x4306ec(0xcc)](_0x5b5838,_0x562306,_0x187866,_0x382b09,_0x27482b,_0x3bf372){const _0x13de54=a0_0x4306ec;let _0x5d2765=await _0x5b5838[_0x13de54(0x8c)](menu_base_1[_0x13de54(0xd1)])[_0x13de54(0xe8)]({'where':{'domain':{'id':_0x562306['id']},'id':_0x382b09}}),_0x54b6a4=(await _0x5b5838[_0x13de54(0x8c)](menu_base_1['Menu'])[_0x13de54(0xe9)]('select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27'+_0x382b09+'\x27\x20or\x20id\x20=\x20\x27'+_0x382b09+'\x27'))[0x0]['rank']+0xa,_0x2db6be=new menu_base_1['Menu']();_0x2db6be['name']=_0x27482b,_0x2db6be[_0x13de54(0xb6)]=_0x13de54(0xd0),_0x2db6be['category']='meta-grist-page',_0x2db6be[_0x13de54(0xb5)]=_0x54b6a4,_0x2db6be[_0x13de54(0xeb)]=!0x1,_0x2db6be['routing']=_0x27482b,_0x2db6be[_0x13de54(0xbb)]=_0x3bf372,_0x2db6be[_0x13de54(0xc7)]='@things-factory/meta-ui/client/pages/meta-grist-page',_0x2db6be[_0x13de54(0x82)]=_0x5d2765,await _0x5b5838[_0x13de54(0x8c)](menu_base_1[_0x13de54(0xd1)])[_0x13de54(0x9f)](Object[_0x13de54(0xe2)](Object[_0x13de54(0xe2)]({},_0x2db6be),{'domain':_0x562306,'creator':_0x187866,'updater':_0x187866}));}[a0_0x4306ec(0xae)](_0x434889){const _0x4bd80f=a0_0x4306ec;let _0x523f2a=JSON[_0x4bd80f(0xaf)](_0x434889)[_0x4bd80f(0xa9)](/(.{100})/)['filter'](_0x130983=>_0x130983),_0x3e75b1=[_0x4bd80f(0xd7),_0x4bd80f(0x99),'aes-256-cfb','aes-256-cfb8',_0x4bd80f(0x9a),_0x4bd80f(0x96),'aes-256-ctr','aes256'],_0x4804e3=crypto_1[_0x4bd80f(0x7b)][_0x4bd80f(0x9e)](0x20)[_0x4bd80f(0x86)]('hex'),_0x4b8126=Buffer[_0x4bd80f(0xb8)](_0x4804e3,_0x4bd80f(0xd4)),_0x4f2c3b=_0x4804e3[_0x4bd80f(0xb1)](0x0,0x10),_0x410fe0=['',_0x4f2c3b,_0x4f2c3b,_0x4f2c3b,_0x4f2c3b,_0x4f2c3b,_0x4f2c3b,_0x4f2c3b],_0x13fb52=0x0,_0x2a02e4=[];_0x2a02e4['push'](_0x4804e3);for(var _0x2d4e2c=0x0;_0x2d4e2c<_0x523f2a['length'];_0x2d4e2c++,_0x13fb52++){_0x13fb52==_0x3e75b1[_0x4bd80f(0xe7)]&&(_0x13fb52=0x0);let _0x39cd74=crypto_1['default'][_0x4bd80f(0xa2)](_0x3e75b1[_0x13fb52],_0x4b8126,_0x410fe0[_0x13fb52]),_0x3470d4=_0x39cd74[_0x4bd80f(0x8b)](_0x523f2a[_0x2d4e2c],_0x4bd80f(0xc2),_0x4bd80f(0xd4));_0x3470d4+=_0x39cd74[_0x4bd80f(0xa4)]('hex'),_0x2a02e4['push'](_0x3470d4);}return _0x2a02e4[_0x4bd80f(0xad)](_0x4bd80f(0xea));}};tslib_1['__decorate']([(0x0,type_graphql_1['Directive'])('@transaction'),(0x0,type_graphql_1['Mutation'])(_0x5d8ece=>Boolean,{'description':'Operato\x20Tool\x20Create\x20Menu'}),tslib_1[a0_0x4306ec(0x95)](0x0,(0x0,type_graphql_1[a0_0x4306ec(0xa5)])('id')),tslib_1[a0_0x4306ec(0x95)](0x1,(0x0,type_graphql_1[a0_0x4306ec(0xa5)])(a0_0x4306ec(0xd3))),tslib_1[a0_0x4306ec(0x95)](0x2,(0x0,type_graphql_1[a0_0x4306ec(0xca)])()),tslib_1[a0_0x4306ec(0xbf)](a0_0x4306ec(0xb0),Function),tslib_1[a0_0x4306ec(0xbf)]('design:paramtypes',[String,String,Object]),tslib_1[a0_0x4306ec(0xbf)](a0_0x4306ec(0x93),Promise)],OperatoToolCreateMenu[a0_0x4306ec(0xab)],a0_0x4306ec(0x97),null),OperatoToolCreateMenu=tslib_1[a0_0x4306ec(0xcf)]([(0x0,type_graphql_1['Resolver'])()],OperatoToolCreateMenu),exports[a0_0x4306ec(0x7d)]=OperatoToolCreateMenu;const modelTemplate=a0_0x4306ec(0x89);function a0_0x48f2(){const _0x11fde3=['createSearchCols','4377145guxShM','Ctx','readonly','createMenuData','reverseSort','gridRank','__decorate','SCREEN','Menu','refType','parent_menu_id','hex','replace','checkStudioTemplateIsOverLimit','aes-256-ecb','searchOper','creator_id','lodash','searchRank','\x22,\x22width\x22:','dataProp','name','updater_id','defineProperty','8shEyKW','assign','scenario','4835574MjvbiN','updated_at','./../tool-secret/tool-permission','length','findOne','query','h1z0q9i9x7q6','hiddenFlag','default',',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22','OperatoToolCreateMenu','\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','filter','{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22','{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22','parent','16660950IVgyFp','entity','785799tWxmFD','toString','state','@things-factory/resource-base','\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','creator','update','getRepository','type-graphql','\x22,\x22operator\x22:\x20\x22','@things-factory/menu-base','createGridColumns','pluralize','\x22,\x22header\x22:\x20\x22','design:returntype','tslib','__param','aes-256-ofb','toolCreateMenu','3nEWkEO','aes-256-cbc','aes-256-cfb1','createSortCols','createdAt',',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22','randomBytes','save','Entity',',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22','createCipheriv','string','final','Arg','{\x22name\x22:\x20\x22',',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22','3863388QHLOYU','split','updatedAt','prototype','hidden','join','enc','stringify','design:type','substring','\x20,\x22exportable\x22:\x20true','\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}','crypto','rank','menuType','556788dTIImp','from','38gxquUt','COPY','template','sort','37157PWhEKl','refName','__metadata','\x22,\x22name\x22:\x20\x22','\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}','utf8','code','created_at',',\x22mandatory\x22:\x20','\x22,\x22desc\x22:','resourceUrl'];a0_0x48f2=function(){return _0x11fde3;};return a0_0x48f2();}
|
|
1
|
+
'use strict';const a0_0x1d12bc=a0_0x59a9;(function(_0x31eeb4,_0x384d65){const _0xf71cd9=a0_0x59a9,_0x2065ea=_0x31eeb4();while(!![]){try{const _0x46920a=parseInt(_0xf71cd9(0x1de))/0x1+-parseInt(_0xf71cd9(0x202))/0x2*(parseInt(_0xf71cd9(0x1f2))/0x3)+parseInt(_0xf71cd9(0x251))/0x4*(parseInt(_0xf71cd9(0x20f))/0x5)+parseInt(_0xf71cd9(0x212))/0x6*(-parseInt(_0xf71cd9(0x1fa))/0x7)+parseInt(_0xf71cd9(0x24b))/0x8*(-parseInt(_0xf71cd9(0x1df))/0x9)+-parseInt(_0xf71cd9(0x217))/0xa*(parseInt(_0xf71cd9(0x22c))/0xb)+parseInt(_0xf71cd9(0x1ef))/0xc;if(_0x46920a===_0x384d65)break;else _0x2065ea['push'](_0x2065ea['shift']());}catch(_0x109fbc){_0x2065ea['push'](_0x2065ea['shift']());}}}(a0_0x57d0,0x1d18b));Object[a0_0x1d12bc(0x22e)](exports,a0_0x1d12bc(0x1e7),{'value':!0x0}),exports[a0_0x1d12bc(0x205)]=void 0x0;function a0_0x57d0(){const _0x26b733=['__esModule','@things-factory/resource-base','replace','updated_at','checkStudioTemplateIsOverLimit',',\x22mandatory\x22:\x20',',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22','{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22','5665164FLmeQy','hiddenFlag','Operato\x20Tool\x20Create\x20Menu','6lXojxQ','menuType','creator','readonly','createdAt','__metadata','type-graphql','scenario','1071TvIpAk','substring','lodash','h1z0q9i9x7q6',',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22','sort','\x22,\x22hidden\x22:','\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}','175724iVoGIs','update','reverseSort','OperatoToolCreateMenu','\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}','searchOper','string','__importDefault','state','design:returntype','SCREEN','refType','./../tool-secret/tool-permission','7415JZSdlE','parent','parent_menu_id','6078fqXpKI','length','\x20,\x22editable\x22:\x20','createGridColumns','enc','10PEaGQt','map','\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','push','prototype','\x22,\x22desc\x22:','\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}','meta-grist-page','randomBytes','dataProp','template','gridRank','Menu','save','join','aes-256-ecb','query','from','searchRank','@transaction','Directive','516021gQtyNi','aes-256-cbc','defineProperty','\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','aes256','JSON','pluralize','assign','filter','toString','{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22','updatedAt','Mutation','\x22,\x22operator\x22:\x20\x22','rank','tslib','aes-256-cfb',',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22','find','hidden','@things-factory/meta-ui/client/pages/meta-grist-page','getRepository','EntityColumn','createSearchCols','name','resourceUrl','entity','sortRank','\x20,\x22exportable\x22:\x20true','\x22,\x22header\x22:\x20\x22','\x22,\x22width\x22:','1192544jCkivQ','createSortCols','\x27\x20or\x20id\x20=\x20\x27','category','Entity','@things-factory/menu-base','412nyLzoZ','Arg','hex','default','__decorate','updater','aes-256-ctr','{\x22name\x22:\x22','__param','left','created_at','\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','21025pyAtLg','9aOKLqi','utf8','refName','\x22,\x22name\x22:\x20\x22','aes-256-ofb','final','Ctx','stringify'];a0_0x57d0=function(){return _0x26b733;};return a0_0x57d0();}const tslib_1=require(a0_0x1d12bc(0x23b)),type_graphql_1=require(a0_0x1d12bc(0x1f8)),resource_base_1=require(a0_0x1d12bc(0x1e8)),menu_base_1=require(a0_0x1d12bc(0x250)),tool_permission_1=require(a0_0x1d12bc(0x20e)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x1d12bc(0x1fc)),{plural:plural}=require(a0_0x1d12bc(0x232)),crypto_1=tslib_1[a0_0x1d12bc(0x209)](require('crypto'));function a0_0x59a9(_0x53343f,_0x532808){const _0x57d0e4=a0_0x57d0();return a0_0x59a9=function(_0x59a9ea,_0x4a1a81){_0x59a9ea=_0x59a9ea-0x1dd;let _0x236fe8=_0x57d0e4[_0x59a9ea];return _0x236fe8;},a0_0x59a9(_0x53343f,_0x532808);}let OperatoToolCreateMenu=class{async['toolCreateMenu'](_0x44f8c7,_0x3547d1,_0x158a0e){const _0x567668=a0_0x1d12bc,{domain:_0x3c7adf,user:_0x106b4a,tx:_0x513e7f}=_0x158a0e[_0x567668(0x20a)];await(0x0,tool_permission_1[_0x567668(0x1eb)])('',_0x158a0e);const _0x3d847e=await _0x513e7f['getRepository'](resource_base_1[_0x567668(0x24f)])['findOne']({'where':{'domain':{'id':_0x3c7adf['id']},'id':_0x44f8c7}}),_0x327cb3=await _0x513e7f[_0x567668(0x241)](resource_base_1[_0x567668(0x242)])[_0x567668(0x23e)]({'where':{'domain':{'id':_0x3c7adf['id']},'entity':{'id':_0x3d847e['id']}}});let {name:_0x500208=''}=_0x3d847e||{},_0x4fc5fa=kebabCase(_0x500208),_0x16fe93=modelTemplate[_0x567668(0x1e9)](/{{pascalCase name}}/g,startCase(camelCase(_0x500208))[_0x567668(0x1e9)](/ /g,''))[_0x567668(0x1e9)](/{{camelCase name}}/g,camelCase(_0x500208))['replace'](/{{snakeCase name}}/g,snakeCase(_0x500208))[_0x567668(0x1e9)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x500208)))[_0x567668(0x1e9)](/ /g,''))[_0x567668(0x1e9)](/{{pluralCamelCase name}}/g,camelCase(plural(_0x500208)))[_0x567668(0x1e9)](/{{name}}/g,_0x500208),_0x5a8a21='';_0x567668(0x231)==_0x3d847e[_0x567668(0x220)]?_0x5a8a21=_0x567668(0x1dd):'COPY'==_0x3d847e[_0x567668(0x220)]&&(_0x5a8a21=_0x567668(0x22f)),_0x16fe93=_0x16fe93['replace'](/{{HistoryButton}}/g,_0x5a8a21);let _0x3b6fb6=this[_0x567668(0x24c)](_0x327cb3);_0x16fe93=_0x16fe93[_0x567668(0x1e9)](/{{SortColumns}}/g,_0x3b6fb6[_0x567668(0x225)](','));let _0x345fa6=this['createSearchCols'](_0x327cb3);_0x16fe93=_0x16fe93['replace'](/{{SearchColumns}}/g,_0x345fa6[_0x567668(0x225)](','));let _0x27636f=this[_0x567668(0x215)](_0x327cb3);return _0x16fe93=_0x16fe93['replace'](/{{GridColumns}}/g,_0x27636f[_0x567668(0x225)](',')),_0x16fe93=this['enc'](_0x16fe93),await this['createMenuData'](_0x513e7f,_0x3c7adf,_0x106b4a,_0x3547d1,_0x4fc5fa,_0x16fe93),!0x0;}[a0_0x1d12bc(0x215)](_0x3e9c13){const _0x5a631c=a0_0x1d12bc;return _0x3e9c13['filter'](_0xa0e227=>'id'!=_0xa0e227['name']&&_0xa0e227['gridRank']>0x0)[_0x5a631c(0x1ff)](function(_0x5ee47b,_0x1ed8aa){const _0x27cb6e=_0x5a631c;return _0x5ee47b['gridRank']-_0x1ed8aa[_0x27cb6e(0x222)];})[_0x5a631c(0x218)](_0x59af37=>{const _0x523963=_0x5a631c;let {gridEditor:_0x2b3a72=_0x523963(0x208),name:_0x34b0cd,term:_0x19d290,gridWidth:_0x49d58d=0x0,gridAlign:_0x82a135=_0x523963(0x25a),nullable:_0x5cc4d7=!0x1}=_0x59af37;if(null==_0x2b3a72&&(_0x2b3a72=_0x523963(0x208)),null==_0x82a135&&(_0x82a135=_0x523963(0x25a)),'updater_id'==_0x34b0cd||'creator_id'==_0x34b0cd)return _0x34b0cd='updater_id'==_0x34b0cd?_0x523963(0x256):_0x523963(0x1f4),_0x523963(0x1ee)+_0x34b0cd+'\x22,\x22header\x22:\x20\x22'+_0x34b0cd+_0x523963(0x201);if(_0x523963(0x1ea)==_0x34b0cd||_0x523963(0x25b)==_0x34b0cd)return _0x523963(0x236)+(_0x523963(0x1ea)==_0x34b0cd?_0x523963(0x237):_0x523963(0x1f6))+_0x523963(0x249)+_0x34b0cd+_0x523963(0x206);let _0x2a6fab=_0x523963(0x1f5)!=_0x2b3a72&&_0x523963(0x23f)!=_0x2b3a72,_0x2e8496='hidden'==_0x2b3a72;0x1!=_0x2e8496&&0x0!=_0x2a6fab||(_0x2b3a72='string');let _0x297a5d='{\x22type\x22:\x20\x22'+_0x2b3a72+_0x523963(0x1e2)+camelCase(_0x34b0cd)+_0x523963(0x249)+_0x19d290+_0x523963(0x200)+_0x2e8496+_0x523963(0x214)+_0x2a6fab+_0x523963(0x1ec)+!_0x5cc4d7+_0x523963(0x1ed)+_0x82a135+_0x523963(0x24a)+_0x49d58d+_0x523963(0x248);return'code'==_0x59af37[_0x523963(0x20d)]&&(_0x297a5d+=',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22'+_0x59af37[_0x523963(0x1e1)]+'\x22}'),_0x523963(0x1f9)==_0x59af37[_0x523963(0x20d)]&&(_0x297a5d+=_0x523963(0x23d)+_0x59af37[_0x523963(0x1e1)]+'\x22}'),_0x523963(0x246)==_0x59af37[_0x523963(0x20d)]&&(_0x297a5d+=_0x523963(0x1fe)+camelCase(plural(_0x59af37['refName']))+_0x523963(0x21d)),_0x297a5d+='}',_0x297a5d;});}[a0_0x1d12bc(0x243)](_0x592f33){const _0x1000d6=a0_0x1d12bc;return _0x592f33[_0x1000d6(0x234)](_0xc0eaa0=>_0xc0eaa0[_0x1000d6(0x229)]>0x0)['sort'](function(_0x1b648d,_0x2846bb){const _0x2c9915=_0x1000d6;return _0x1b648d[_0x2c9915(0x229)]-_0x2846bb[_0x2c9915(0x229)];})[_0x1000d6(0x218)](_0x457fa7=>{const _0x4f30b8=_0x1000d6;let _0x74814d=_0x457fa7[_0x4f30b8(0x207)];return _0x4f30b8(0x234)==_0x74814d?'\x22'+camelCase(_0x457fa7[_0x4f30b8(0x244)])+'\x22':(_0x74814d||(_0x74814d='eq'),'{\x22name\x22:\x20\x22'+camelCase(_0x457fa7[_0x4f30b8(0x244)])+_0x4f30b8(0x239)+_0x74814d+'\x22}');});}[a0_0x1d12bc(0x24c)](_0x341421){const _0x1af253=a0_0x1d12bc;return _0x341421[_0x1af253(0x234)](_0x282b6b=>_0x282b6b[_0x1af253(0x247)]>0x0)[_0x1af253(0x1ff)](function(_0xe354d3,_0x2db8e2){const _0x52fad4=_0x1af253;return _0xe354d3[_0x52fad4(0x247)]-_0x2db8e2[_0x52fad4(0x247)];})[_0x1af253(0x218)](_0x292618=>_0x1af253(0x258)+camelCase(_0x292618[_0x1af253(0x244)])+_0x1af253(0x21c)+_0x292618[_0x1af253(0x204)]+'}');}async['createMenuData'](_0x3d9c69,_0x50992f,_0x390d19,_0x26542c,_0x1e5c53,_0x578522){const _0x4fed97=a0_0x1d12bc;let _0x559fb0=await _0x3d9c69[_0x4fed97(0x241)](menu_base_1['Menu'])['findOne']({'where':{'domain':{'id':_0x50992f['id']},'id':_0x26542c}}),_0xbe7150=(await _0x3d9c69[_0x4fed97(0x241)](menu_base_1[_0x4fed97(0x223)])[_0x4fed97(0x227)]('select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27'+_0x26542c+_0x4fed97(0x24d)+_0x26542c+'\x27'))[0x0][_0x4fed97(0x23a)]+0xa,_0x3beb41=new menu_base_1['Menu']();_0x3beb41['name']=_0x1e5c53,_0x3beb41[_0x4fed97(0x1f3)]=_0x4fed97(0x20c),_0x3beb41[_0x4fed97(0x24e)]=_0x4fed97(0x21e),_0x3beb41[_0x4fed97(0x23a)]=_0xbe7150,_0x3beb41[_0x4fed97(0x1f0)]=!0x1,_0x3beb41['routing']=_0x1e5c53,_0x3beb41[_0x4fed97(0x221)]=_0x578522,_0x3beb41[_0x4fed97(0x245)]=_0x4fed97(0x240),_0x3beb41[_0x4fed97(0x210)]=_0x559fb0,await _0x3d9c69[_0x4fed97(0x241)](menu_base_1[_0x4fed97(0x223)])[_0x4fed97(0x224)](Object[_0x4fed97(0x233)](Object[_0x4fed97(0x233)]({},_0x3beb41),{'domain':_0x50992f,'creator':_0x390d19,'updater':_0x390d19}));}[a0_0x1d12bc(0x216)](_0x1c2d22){const _0x4a911a=a0_0x1d12bc;let _0xeff8ff=JSON[_0x4a911a(0x1e6)](_0x1c2d22)['split'](/(.{100})/)[_0x4a911a(0x234)](_0x184742=>_0x184742),_0x4bdde1=[_0x4a911a(0x226),_0x4a911a(0x22d),_0x4a911a(0x23c),'aes-256-cfb8','aes-256-cfb1',_0x4a911a(0x1e3),_0x4a911a(0x257),_0x4a911a(0x230)],_0x58a37e=crypto_1[_0x4a911a(0x254)][_0x4a911a(0x21f)](0x20)[_0x4a911a(0x235)]('hex'),_0x53ecbc=Buffer[_0x4a911a(0x228)](_0x58a37e,'hex'),_0x5bc80d=_0x58a37e[_0x4a911a(0x1fb)](0x0,0x10),_0x170c18=['',_0x5bc80d,_0x5bc80d,_0x5bc80d,_0x5bc80d,_0x5bc80d,_0x5bc80d,_0x5bc80d],_0x54a64e=0x0,_0x3e48fe=[];_0x3e48fe[_0x4a911a(0x21a)](_0x58a37e);for(var _0x151d66=0x0;_0x151d66<_0xeff8ff['length'];_0x151d66++,_0x54a64e++){_0x54a64e==_0x4bdde1[_0x4a911a(0x213)]&&(_0x54a64e=0x0);let _0x4373d8=crypto_1[_0x4a911a(0x254)]['createCipheriv'](_0x4bdde1[_0x54a64e],_0x53ecbc,_0x170c18[_0x54a64e]),_0x2a0ba5=_0x4373d8[_0x4a911a(0x203)](_0xeff8ff[_0x151d66],_0x4a911a(0x1e0),_0x4a911a(0x253));_0x2a0ba5+=_0x4373d8[_0x4a911a(0x1e4)](_0x4a911a(0x253)),_0x3e48fe[_0x4a911a(0x21a)](_0x2a0ba5);}return _0x3e48fe[_0x4a911a(0x225)](_0x4a911a(0x1fd));}};tslib_1[a0_0x1d12bc(0x255)]([(0x0,type_graphql_1[a0_0x1d12bc(0x22b)])(a0_0x1d12bc(0x22a)),(0x0,type_graphql_1[a0_0x1d12bc(0x238)])(_0x57b92a=>Boolean,{'description':a0_0x1d12bc(0x1f1)}),tslib_1[a0_0x1d12bc(0x259)](0x0,(0x0,type_graphql_1[a0_0x1d12bc(0x252)])('id')),tslib_1['__param'](0x1,(0x0,type_graphql_1[a0_0x1d12bc(0x252)])(a0_0x1d12bc(0x211))),tslib_1[a0_0x1d12bc(0x259)](0x2,(0x0,type_graphql_1[a0_0x1d12bc(0x1e5)])()),tslib_1[a0_0x1d12bc(0x1f7)]('design:type',Function),tslib_1[a0_0x1d12bc(0x1f7)]('design:paramtypes',[String,String,Object]),tslib_1['__metadata'](a0_0x1d12bc(0x20b),Promise)],OperatoToolCreateMenu[a0_0x1d12bc(0x21b)],'toolCreateMenu',null),OperatoToolCreateMenu=tslib_1[a0_0x1d12bc(0x255)]([(0x0,type_graphql_1['Resolver'])()],OperatoToolCreateMenu),exports[a0_0x1d12bc(0x205)]=OperatoToolCreateMenu;const modelTemplate=a0_0x1d12bc(0x219);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x140de2=a0_0x1415;(function(_0x447531,_0x100fc6){const _0x4469cb=a0_0x1415,_0x3d51dd=_0x447531();while(!![]){try{const _0x2c0361=-parseInt(_0x4469cb(0xf9))/0x1+-parseInt(_0x4469cb(0xf2))/0x2+parseInt(_0x4469cb(0xee))/0x3+-parseInt(_0x4469cb(0x114))/0x4*(-parseInt(_0x4469cb(0xf1))/0x5)+-parseInt(_0x4469cb(0x160))/0x6+parseInt(_0x4469cb(0x123))/0x7*(-parseInt(_0x4469cb(0x166))/0x8)+parseInt(_0x4469cb(0x12b))/0x9;if(_0x2c0361===_0x100fc6)break;else _0x3d51dd['push'](_0x3d51dd['shift']());}catch(_0x2e9337){_0x3d51dd['push'](_0x3d51dd['shift']());}}}(a0_0x5568,0xbd1fa));Object['defineProperty'](exports,a0_0x140de2(0x128),{'value':!0x0}),exports['OperatoToolCreateService']=void 0x0;const tslib_1=require(a0_0x140de2(0xf5)),type_graphql_1=require(a0_0x140de2(0x144)),shell_1=require('@things-factory/shell'),resource_base_1=require('@things-factory/resource-base'),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x140de2(0xfa)),{plural:plural}=require(a0_0x140de2(0x102)),fs=require('fs');let OperatoToolCreateService=class{async[a0_0x140de2(0x110)](_0x15ffb4,_0x3ac5bf){const _0x461db0=a0_0x140de2,{domain:_0x44770e}=_0x3ac5bf[_0x461db0(0x141)],_0x5963dd=await(0x0,shell_1[_0x461db0(0x11d)])(resource_base_1[_0x461db0(0x124)])['findOne']({'where':{'id':_0x15ffb4}}),_0x414e17=await(0x0,shell_1['getRepository'])(resource_base_1[_0x461db0(0x156)])[_0x461db0(0x11b)]({'where':{'domain':{'id':_0x44770e['id']},'entity':{'id':_0x5963dd['id']}}});let {name:_0x84a4a0='',bundle:_0x31f463=''}=_0x5963dd||{},_0xb0e152=this[_0x461db0(0x147)](),_0x528cc5=kebabCase(_0x84a4a0);return await this[_0x461db0(0x12f)](_0xb0e152,_0x31f463,_0x528cc5),await this[_0x461db0(0x12e)](_0xb0e152,_0x31f463,_0x84a4a0,_0x528cc5,_0x5963dd,_0x414e17),!0x0;}async['createServiceFiles'](_0x9c8ef0,_0x1bc516,_0x27357a,_0x20dbc8,_0x2252f7,_0x2a5f20){const _0x42e39d=a0_0x140de2;let _0x5ecb44={'name':_0x20dbc8,'tableName':_0x2252f7[_0x42e39d(0x11f)],'pascalCaseName':startCase(camelCase(_0x27357a))[_0x42e39d(0x117)](/ /g,''),'camelCaseName':camelCase(_0x27357a),'snakeCaseName':snakeCase(_0x27357a),'pluralPascalCaseName':startCase(camelCase(plural(_0x27357a)))[_0x42e39d(0x117)](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x27357a))},_0x325005=_0x9c8ef0+_0x42e39d(0xd9)+_0x1bc516+_0x42e39d(0xe9);['JSON',_0x42e39d(0xff)][_0x42e39d(0xfc)](_0x2252f7[_0x42e39d(0x12d)])?await this[_0x42e39d(0xe3)](_0x325005,_0x20dbc8,_0x2252f7,_0x2a5f20,_0x5ecb44):await this[_0x42e39d(0x16b)](_0x325005,_0x20dbc8,_0x2252f7,_0x2a5f20,_0x5ecb44);}async['createHistoryServiceFiles'](_0x343092,_0x4590f0,_0x1d1711,_0x26921a,_0x456cfe){const _0xa58bb=a0_0x140de2;await this['writeFile'](_0x343092+(_0x4590f0+_0xa58bb(0xfb)),serviceHistoryIndex,_0x456cfe);let _0x5a8ab4=this[_0xa58bb(0x13d)](_0x1d1711,_0x26921a);await this['writeFile'](_0x343092+(_0x4590f0+'/'+_0x4590f0+_0xa58bb(0x132)),_0x5a8ab4,_0x456cfe),await this[_0xa58bb(0xfd)](_0x343092+(_0x4590f0+'/'+_0x4590f0+_0xa58bb(0x16d)),serviceQuery,_0x456cfe),await this[_0xa58bb(0xfd)](_0x343092+(_0x4590f0+'/'+_0x4590f0+_0xa58bb(0x106)),serviceMutation,_0x456cfe);let _0x3797ae=this[_0xa58bb(0x16c)](_0x26921a);await this['writeFile'](_0x343092+(_0x4590f0+'/'+_0x4590f0+'-type.ts'),_0x3797ae,_0x456cfe);let _0xb6a6cc=this[_0xa58bb(0x119)](_0x1d1711,_0x26921a);await this[_0xa58bb(0xfd)](_0x343092+(_0x4590f0+'/'+_0x4590f0+_0xa58bb(0x155)),_0xb6a6cc,_0x456cfe);let _0x2a40b7='';_0xa58bb(0xea)==_0x1d1711[_0xa58bb(0x12d)]?(_0x2a40b7=_0xa58bb(0x120),await this['writeFile'](_0x343092+(_0x4590f0+'/event-subscriber.ts'),serviceEntitySubscriber,_0x456cfe)):_0x2a40b7='';let _0x279124=serviceEntitySubscriber[_0xa58bb(0x117)](/{{entityToJson}}/g,_0x2a40b7);await this[_0xa58bb(0xfd)](_0x343092+(_0x4590f0+_0xa58bb(0x104)),_0x279124,_0x456cfe),await this[_0xa58bb(0xfd)](_0x343092+(_0x4590f0+'/'+_0x4590f0+_0xa58bb(0x139)),serviceHistoryQuery,_0x456cfe),await this['writeFile'](_0x343092+(_0x4590f0+'/'+_0x4590f0+'-history-type.ts'),sereviceHistoryType,_0x456cfe);let _0x340275=_0x343092+_0xa58bb(0x111);0x0==await this[_0xa58bb(0x11c)](_0x340275)&&await this[_0xa58bb(0xfd)](_0x340275,allIndex,_0x456cfe);let _0x30a483=await fs[_0xa58bb(0x150)](_0x340275,_0xa58bb(0xf8));_0x30a483['indexOf']('export\x20*\x20from\x20\x27./'+_0x456cfe[_0xa58bb(0xf4)]+'/'+_0x456cfe['name']+_0xa58bb(0x116))<0x0&&(_0x30a483=_0x30a483[_0xa58bb(0x117)](/\/\* EXPORT ENTITY TYPES \*\//,'/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./'+_0x456cfe['name']+'/'+_0x456cfe[_0xa58bb(0xf4)]+_0xa58bb(0x116))),_0x30a483['indexOf'](_0xa58bb(0x13e)+_0x456cfe[_0xa58bb(0xf4)]+'/'+_0x456cfe[_0xa58bb(0xf4)]+'\x27')<0x0&&(_0x30a483=_0x30a483[_0xa58bb(0x117)](/\/\* EXPORT ENTITY TYPES \*\//,_0xa58bb(0x137)+_0x456cfe[_0xa58bb(0xf4)]+'/'+_0x456cfe[_0xa58bb(0xf4)]+'\x27')),_0x30a483['indexOf'](_0xa58bb(0x121)+_0x456cfe['pascalCaseName']+_0xa58bb(0x14a)+_0x456cfe[_0xa58bb(0x10c)]+'Resolvers,\x20subscribers\x20as\x20'+_0x456cfe[_0xa58bb(0x10c)]+_0xa58bb(0xe7)+_0x456cfe[_0xa58bb(0xf4)]+'\x27')<0x0&&(_0x30a483=_0x30a483['replace'](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0xa58bb(0x107)+_0x456cfe['pascalCaseName']+'Entities,\x20resolvers\x20as\x20'+_0x456cfe[_0xa58bb(0x10c)]+_0xa58bb(0x161)+_0x456cfe[_0xa58bb(0x10c)]+_0xa58bb(0xe7)+_0x456cfe[_0xa58bb(0xf4)]+'\x27')),_0x30a483[_0xa58bb(0xdf)](_0xa58bb(0x127)+_0x456cfe[_0xa58bb(0x10c)]+_0xa58bb(0xdc))<0x0&&(_0x30a483=_0x30a483[_0xa58bb(0x117)](/\/\* ENTITIES \*\//,_0xa58bb(0x162)+_0x456cfe[_0xa58bb(0x10c)]+'Entities,')),_0x30a483[_0xa58bb(0xdf)](_0xa58bb(0x127)+_0x456cfe[_0xa58bb(0x10c)]+_0xa58bb(0xef))<0x0&&(_0x30a483=_0x30a483['replace'](/\/\* RESOLVER CLASSES \*\//,'/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...'+_0x456cfe[_0xa58bb(0x10c)]+_0xa58bb(0xef))),_0x30a483['indexOf'](_0xa58bb(0x127)+_0x456cfe[_0xa58bb(0x10c)]+_0xa58bb(0x133))<0x0&&(_0x30a483=_0x30a483['replace'](/\/\* SUBSCRIBERS \*\//,_0xa58bb(0xde)+_0x456cfe[_0xa58bb(0x10c)]+_0xa58bb(0x133))),await this['writeFile'](_0x340275,_0x30a483,_0x456cfe);}async[a0_0x140de2(0x16b)](_0x1394dc,_0xb12112,_0x4a43f1,_0x621d0f,_0x5f10f4){const _0x208f2b=a0_0x140de2;await this[_0x208f2b(0xfd)](_0x1394dc+(_0xb12112+_0x208f2b(0xfb)),serviceIndex,_0x5f10f4),await this[_0x208f2b(0xfd)](_0x1394dc+(_0xb12112+'/'+_0xb12112+_0x208f2b(0x16d)),serviceQuery,_0x5f10f4),await this[_0x208f2b(0xfd)](_0x1394dc+(_0xb12112+'/'+_0xb12112+'-mutation.ts'),serviceMutation,_0x5f10f4);let _0x5c96ed=this['createEntityText'](_0x4a43f1,_0x621d0f);await this['writeFile'](_0x1394dc+(_0xb12112+'/'+_0xb12112+_0x208f2b(0x132)),_0x5c96ed,_0x5f10f4);let _0x420a7b=this['createTypeText'](_0x621d0f);await this[_0x208f2b(0xfd)](_0x1394dc+(_0xb12112+'/'+_0xb12112+'-type.ts'),_0x420a7b,_0x5f10f4);let _0x21cec0=_0x1394dc+_0x208f2b(0x111);0x0==await this[_0x208f2b(0x11c)](_0x21cec0)&&await this[_0x208f2b(0xfd)](_0x21cec0,allIndex,_0x5f10f4);let _0x3606b5=await fs['readFileSync'](_0x21cec0,_0x208f2b(0xf8));_0x3606b5[_0x208f2b(0xdf)](_0x208f2b(0x13e)+_0x5f10f4[_0x208f2b(0xf4)]+'/'+_0x5f10f4[_0x208f2b(0xf4)]+'\x27')<0x0&&(_0x3606b5=_0x3606b5[_0x208f2b(0x117)](/\/\* EXPORT ENTITY TYPES \*\//,_0x208f2b(0x137)+_0x5f10f4[_0x208f2b(0xf4)]+'/'+_0x5f10f4[_0x208f2b(0xf4)]+'\x27')),_0x3606b5[_0x208f2b(0xdf)](_0x208f2b(0x121)+_0x5f10f4[_0x208f2b(0x10c)]+_0x208f2b(0x14a)+_0x5f10f4[_0x208f2b(0x10c)]+_0x208f2b(0x125)+_0x5f10f4[_0x208f2b(0xf4)]+'\x27')<0x0&&(_0x3606b5=_0x3606b5['replace'](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,'/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20'+_0x5f10f4['pascalCaseName']+_0x208f2b(0x14a)+_0x5f10f4[_0x208f2b(0x10c)]+'Resolvers\x20}\x20from\x20\x27./'+_0x5f10f4[_0x208f2b(0xf4)]+'\x27')),_0x3606b5[_0x208f2b(0xdf)](_0x208f2b(0x127)+_0x5f10f4['pascalCaseName']+_0x208f2b(0xdc))<0x0&&(_0x3606b5=_0x3606b5[_0x208f2b(0x117)](/\/\* ENTITIES \*\//,_0x208f2b(0x162)+_0x5f10f4[_0x208f2b(0x10c)]+_0x208f2b(0xdc))),_0x3606b5[_0x208f2b(0xdf)](_0x208f2b(0x127)+_0x5f10f4['pascalCaseName']+_0x208f2b(0xef))<0x0&&(_0x3606b5=_0x3606b5['replace'](/\/\* RESOLVER CLASSES \*\//,_0x208f2b(0x148)+_0x5f10f4[_0x208f2b(0x10c)]+'Resolvers,')),await this['writeFile'](_0x21cec0,_0x3606b5,_0x5f10f4);}[a0_0x140de2(0x16c)](_0x109823){const _0x2c14d1=a0_0x140de2;let _0x4a328e=sereviceType,_0x19bfe8=_0x109823[_0x2c14d1(0xe4)](_0x4cb1d7=>{const _0xc3a988=_0x2c14d1;if('id'==_0x4cb1d7[_0xc3a988(0xf4)])return'';if(_0xc3a988(0x159)==_0x4cb1d7[_0xc3a988(0xf4)])return'';if('created_at'==_0x4cb1d7[_0xc3a988(0xf4)])return'';if(_0xc3a988(0x100)==_0x4cb1d7[_0xc3a988(0xf4)])return'';if(_0xc3a988(0xeb)==_0x4cb1d7[_0xc3a988(0xf4)])return'';if('updater_id'==_0x4cb1d7['name'])return'';let _0xf18099=this[_0xc3a988(0x112)](_0x4cb1d7),_0x1759f3=this[_0xc3a988(0x11a)](_0x4cb1d7),_0x1dc7f2=camelCase(_0x4cb1d7[_0xc3a988(0xf4)]);return'\x20\x20'+(_0xc3a988(0x168)+(0x0==_0xf18099[_0xc3a988(0xf3)]?'':_0xc3a988(0x13f)+_0xf18099+',')+_0xc3a988(0xe0)+_0x4cb1d7[_0xc3a988(0xf0)]+_0xc3a988(0x16a))+_0xc3a988(0x142)+(''+_0x1dc7f2+(_0x4cb1d7['nullable']?'?':'')+':\x20'+_0x1759f3)+'\x0a';});_0x4a328e=_0x4a328e[_0x2c14d1(0x117)](/{{newTypeColumns}}/g,_0x19bfe8[_0x2c14d1(0x157)]('\x0a'));let _0x29b604=_0x109823[_0x2c14d1(0xe4)](_0x120a1c=>{const _0x49c500=_0x2c14d1;if('id'==_0x120a1c[_0x49c500(0xf4)])return'';if(_0x49c500(0x159)==_0x120a1c['name'])return'';if('created_at'==_0x120a1c['name'])return'';if(_0x49c500(0x100)==_0x120a1c[_0x49c500(0xf4)])return'';if('creator_id'==_0x120a1c['name'])return'';if(_0x49c500(0xdd)==_0x120a1c['name'])return'';let _0x6c72ba=this[_0x49c500(0x112)](_0x120a1c),_0x39d61b=this[_0x49c500(0x11a)](_0x120a1c);_0x120a1c['nullable']=!0x0;let _0x31a5e0=camelCase(_0x120a1c[_0x49c500(0xf4)]);return'\x20\x20'+(_0x49c500(0x168)+(0x0==_0x6c72ba[_0x49c500(0xf3)]?'':_0x49c500(0x13f)+_0x6c72ba+',')+_0x49c500(0xe0)+_0x120a1c[_0x49c500(0xf0)]+_0x49c500(0x16a))+'\x0a\x20\x20'+(''+_0x31a5e0+(_0x120a1c['nullable']?'?':'')+':\x20'+_0x39d61b)+'\x0a';});return _0x4a328e=_0x4a328e[_0x2c14d1(0x117)](/{{patchTypeColumns}}/g,_0x29b604['join']('\x0a')),_0x4a328e;}['createEntityText'](_0x47b72e,_0x1fbe50){const _0x33ba2f=a0_0x140de2;let _0x37170a=serviceEntity,_0x36a8bb=_0x1fbe50['sort'](function(_0x3d2812,_0x232fa7){const _0x1b3c41=a0_0x1415;return _0x3d2812[_0x1b3c41(0x15f)]-_0x232fa7[_0x1b3c41(0x15f)];})[_0x33ba2f(0xe4)](_0x17df64=>this['columnToEntityColumn'](_0x17df64));[_0x33ba2f(0xff),_0x33ba2f(0xea)]['includes'](_0x47b72e[_0x33ba2f(0x12d)])&&_0x36a8bb[_0x33ba2f(0x14f)]('\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201'),_0x37170a=_0x37170a[_0x33ba2f(0x117)](/{{entityColumns}}/g,_0x36a8bb[_0x33ba2f(0x157)]('\x0a'));let _0x47b743='',_0x255cda=_0x1fbe50[_0x33ba2f(0x13c)](_0x1fa756=>_0x1fa756['uniqRank']&&_0x1fa756['uniqRank']>0x0)[_0x33ba2f(0x14d)](function(_0x1ed51a,_0x4bd297){const _0x1c52c2=_0x33ba2f;return _0x1ed51a[_0x1c52c2(0x15d)]-_0x4bd297['uniqRank'];});if(_0x255cda[_0x33ba2f(0xf3)]>0x0){_0x47b743=_0x33ba2f(0x126);let _0x1e4ef9=_0x255cda[_0x33ba2f(0xe4)](_0x58287d=>{const _0x23221e=_0x33ba2f;let _0x4bcaa5=_0x58287d[_0x23221e(0xf4)];return _0x23221e(0x159)==_0x58287d[_0x23221e(0xf4)]&&(_0x4bcaa5=_0x23221e(0x138)),_0x23221e(0xeb)==_0x58287d[_0x23221e(0xf4)]&&(_0x4bcaa5='creator'),_0x23221e(0xdd)==_0x58287d[_0x23221e(0xf4)]&&(_0x4bcaa5=_0x23221e(0x169)),_0x23221e(0x15b)+camelCase(_0x4bcaa5);});_0x47b743=_0x47b743[_0x33ba2f(0x117)](/{{indexColumns}}/g,_0x1e4ef9['join'](','));}return _0x37170a=_0x37170a[_0x33ba2f(0x117)](/{{indexAnn}}/g,_0x47b743),_0x37170a;}[a0_0x140de2(0x119)](_0x5115f8,_0x7b37a4){const _0x2f0f6b=a0_0x140de2;let _0x31d65f=_0x2f0f6b(0xea)==_0x5115f8[_0x2f0f6b(0x12d)]?serviceEntityHistJson:serviceEntityHistCopy,_0x5cd9b2=_0x7b37a4[_0x2f0f6b(0x14d)](function(_0x35263b,_0x116b49){const _0x26b525=_0x2f0f6b;return _0x35263b['rank']-_0x116b49[_0x26b525(0x15f)];})[_0x2f0f6b(0xe4)](_0x2bbb48=>this['columnToEntityColumn'](_0x2bbb48));return _0x31d65f=_0x31d65f[_0x2f0f6b(0x117)](/{{entityColumns}}/g,_0x5cd9b2[_0x2f0f6b(0x157)]('\x0a')),_0x31d65f;}[a0_0x140de2(0x14b)](_0x511fd7){const _0x7acb28=a0_0x140de2;if('id'==_0x511fd7['name'])return'';if(_0x7acb28(0x159)==_0x511fd7[_0x7acb28(0xf4)])return'';if(_0x7acb28(0x10f)==_0x511fd7[_0x7acb28(0xf4)])return'';if('updated_at'==_0x511fd7[_0x7acb28(0xf4)])return'';if('creator_id'==_0x511fd7[_0x7acb28(0xf4)])return'';if('updater_id'==_0x511fd7['name'])return'';let _0x3f80f6=_0x511fd7[_0x7acb28(0x151)];_0x7acb28(0x131)==_0x511fd7[_0x7acb28(0x151)]&&(_0x3f80f6=_0x7acb28(0x103)),'long'==_0x511fd7[_0x7acb28(0x151)]&&(_0x3f80f6=_0x7acb28(0x10b)),_0x7acb28(0x165)==_0x511fd7[_0x7acb28(0x151)]&&(_0x3f80f6=_0x7acb28(0x152)),_0x7acb28(0x108)==_0x511fd7[_0x7acb28(0x151)]&&(_0x3f80f6='timestamp\x20without\x20time\x20zone');let _0x304524='';_0x7acb28(0x165)==_0x511fd7[_0x7acb28(0x151)]&&(_0x304524=_0x511fd7[_0x7acb28(0x15a)]);let _0x1e80bb=this['getFieldType'](_0x511fd7),_0x5a3fb2=this['getColTxtType'](_0x511fd7),_0x552deb=camelCase(_0x511fd7['name']);return'\x20\x20'+(_0x7acb28(0x163)+_0x511fd7[_0x7acb28(0xf4)]+_0x7acb28(0x14c)+_0x3f80f6+_0x7acb28(0xed)+_0x511fd7['nullable']+'\x20'+(0x0==_0x304524[_0x7acb28(0xf3)]?'':_0x7acb28(0xec)+_0x304524)+_0x7acb28(0x16a))+'\x0a\x20\x20'+('@Field('+(0x0==_0x1e80bb[_0x7acb28(0xf3)]?'':'type\x20=>'+_0x1e80bb+',')+_0x7acb28(0xe0)+_0x511fd7['nullable']+_0x7acb28(0x16a))+_0x7acb28(0x142)+(''+_0x552deb+(_0x511fd7['nullable']?'?':'')+':\x20'+_0x5a3fb2)+'\x0a';}[a0_0x140de2(0x112)](_0x32649b){const _0x15d9bc=a0_0x140de2;let _0x4dc849='';return'double'==_0x32649b[_0x15d9bc(0x151)]&&(_0x4dc849=_0x15d9bc(0x135)),'float'==_0x32649b['colType']&&(_0x4dc849=_0x15d9bc(0x135)),_0x15d9bc(0x13a)==_0x32649b[_0x15d9bc(0x151)]&&(_0x4dc849=_0x15d9bc(0x105)),'integer'==_0x32649b['colType']&&(_0x4dc849=_0x15d9bc(0x105)),_0x4dc849;}['getColTxtType'](_0x72ee7e){const _0x473fe6=a0_0x140de2;let _0x2b4579=_0x72ee7e['colType'];return _0x473fe6(0x167)==_0x72ee7e[_0x473fe6(0x151)]&&(_0x2b4579='number'),_0x473fe6(0x131)==_0x72ee7e[_0x473fe6(0x151)]&&(_0x2b4579=_0x473fe6(0x122)),_0x473fe6(0xe8)==_0x72ee7e['colType']&&(_0x2b4579=_0x473fe6(0x122)),'integer'==_0x72ee7e[_0x473fe6(0x151)]&&(_0x2b4579=_0x473fe6(0x122)),'long'==_0x72ee7e[_0x473fe6(0x151)]&&(_0x2b4579=_0x473fe6(0x122)),'datetime'==_0x72ee7e['colType']&&(_0x2b4579=_0x473fe6(0x136)),'date'==_0x72ee7e['colType']&&(_0x2b4579='Date'),_0x473fe6(0xdb)==_0x72ee7e['colType']&&(_0x2b4579=_0x473fe6(0x165)),_0x2b4579;}async[a0_0x140de2(0xfd)](_0x21143d,_0x4446d5,_0x3a2dc1){const _0x2ef18f=a0_0x140de2;await fs['writeFileSync'](_0x21143d,this['replaceNamesMap'](_0x4446d5,_0x3a2dc1),_0x2ef18f(0xf8));}[a0_0x140de2(0xf7)](_0x11f8ac,_0x26a76e){const _0x1df2fe=a0_0x140de2;return _0x11f8ac[_0x1df2fe(0x117)](/{{pascalCase name}}/g,_0x26a76e['pascalCaseName'])['replace'](/{{camelCase name}}/g,_0x26a76e[_0x1df2fe(0x14e)])[_0x1df2fe(0x117)](/{{snakeCase name}}/g,_0x26a76e['snakeCaseName'])[_0x1df2fe(0x117)](/{{pluralPascalCase name}}/g,_0x26a76e[_0x1df2fe(0x143)])[_0x1df2fe(0x117)](/{{pluralCamelCase name}}/g,_0x26a76e[_0x1df2fe(0x101)])[_0x1df2fe(0x117)](/{{tableName}}/g,_0x26a76e[_0x1df2fe(0x11f)])['replace'](/{{name}}/g,_0x26a76e[_0x1df2fe(0xf4)]);}async[a0_0x140de2(0x12f)](_0x434275,_0x39a705,_0x250c4b){const _0x57f06f=a0_0x140de2;let _0xaf25ac=_0x434275+_0x57f06f(0x145);await this['createDir'](_0xaf25ac),_0xaf25ac=_0xaf25ac+'/'+_0x39a705,await this[_0x57f06f(0x10d)](_0xaf25ac),_0xaf25ac+=_0x57f06f(0x109),await this[_0x57f06f(0x10d)](_0xaf25ac),_0xaf25ac+=_0x57f06f(0x146),await this[_0x57f06f(0x10d)](_0xaf25ac),_0xaf25ac=_0xaf25ac+'/'+_0x250c4b,await this['createDir'](_0xaf25ac);}[a0_0x140de2(0x147)](){const _0x383710=a0_0x140de2;let _0x52520c=process[_0x383710(0x149)][_0x383710(0x11e)][_0x383710(0x15c)]('/'),_0x238b8f=[];for(let _0xa9bffc=0x0;_0xa9bffc<_0x52520c['length']&&_0x383710(0x118)!=_0x52520c[_0xa9bffc];_0xa9bffc++)_0x238b8f['push'](_0x52520c[_0xa9bffc]);return _0x238b8f[_0x383710(0x157)]('/');}async[a0_0x140de2(0x10d)](_0x5be3ce){const _0x2cf94f=a0_0x140de2;0x0==await this['existsPath'](_0x5be3ce)&&fs[_0x2cf94f(0xe5)](_0x5be3ce);}async[a0_0x140de2(0x11c)](_0x4ce485){const _0x547af7=a0_0x140de2;return await fs[_0x547af7(0xe1)](_0x4ce485);}};tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x140de2(0x12a)])(_0x544cc3=>Boolean,{'description':'Operato\x20Tool\x20Create\x20Service'}),tslib_1[a0_0x140de2(0x153)](0x0,(0x0,type_graphql_1['Arg'])('id')),tslib_1[a0_0x140de2(0x153)](0x1,(0x0,type_graphql_1['Ctx'])()),tslib_1[a0_0x140de2(0x164)](a0_0x140de2(0xf6),Function),tslib_1[a0_0x140de2(0x164)](a0_0x140de2(0xda),[String,Object]),tslib_1[a0_0x140de2(0x164)](a0_0x140de2(0x10a),Promise)],OperatoToolCreateService[a0_0x140de2(0xfe)],a0_0x140de2(0x110),null),OperatoToolCreateService=tslib_1[a0_0x140de2(0xe2)]([(0x0,type_graphql_1[a0_0x140de2(0x12c)])()],OperatoToolCreateService),exports['OperatoToolCreateService']=OperatoToolCreateService;function a0_0x1415(_0x4642ce,_0x2dfa66){const _0x556883=a0_0x5568();return a0_0x1415=function(_0x1415a2,_0x3d8b2b){_0x1415a2=_0x1415a2-0xd9;let _0x60f031=_0x556883[_0x1415a2];return _0x60f031;},a0_0x1415(_0x4642ce,_0x2dfa66);}function a0_0x5568(){const _0x9a5362=['createHistoryServiceFiles','map','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','EntitySubscribers\x20}\x20from\x20\x27./','float','/server/service/','JSON','creator_id',',length:','\x27,\x20nullable:\x20','611547wJHxxP','Resolvers,','nullable','895zFRbkb','1513054dSjqUq','length','name','tslib','design:type','replaceNamesMap','utf8','890411FVqGjN','lodash','/index.ts','includes','writeFile','prototype','COPY','updated_at','pluralCamelCaseName','pluralize','double\x20precision','/event-subscriber.ts','Int','-mutation.ts','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','datetime','/server','design:returntype','bigint','pascalCaseName','createDir','\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','created_at','toolCreateService','index.ts','getFieldType','\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','23756huoaan','\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','-history\x27','replace','packages','createHistoryEntityText','getColTxtType','find','existsPath','getRepository','PWD','tableName','\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','import\x20{\x20entities\x20as\x20','number','75691HtAPlN','Entity','Resolvers\x20}\x20from\x20\x27./','@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})','...','__esModule','\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','Query','12883518PLxatZ','Resolver','dataProp','createServiceFiles','createServicePath','\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','double','.ts','EntitySubscribers,','\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','Float','Date','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','domain','-history-query.ts','long','\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','filter','createEntityText','export\x20*\x20from\x20\x27./','type\x20=>','\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','state','\x0a\x20\x20','pluralPascalCaseName','type-graphql','/packages','/service','getProjectRootPath','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','env','Entities,\x20resolvers\x20as\x20','columnToEntityColumn','\x27,\x20type:\x20\x27','sort','camelCaseName','push','readFileSync','colType','character\x20varying','__param','\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','-history.ts','EntityColumn','join','\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','domain_id','colSize','{{camelCase\x20name}}.','split','uniqRank','\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','rank','1012284TMIQHF','Resolvers,\x20subscribers\x20as\x20','/*\x20ENTITIES\x20*/\x0a\x09...','@Column({name:\x27','__metadata','string','80JaIqvS','decimal','@Field(','updater','\x20})','createNoHistoryServiceFiels','createTypeText','-query.ts','/packages/','design:paramtypes','text','Entities,','updater_id','/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...','indexOf','\x20{\x20nullable:\x20','existsSync','__decorate'];a0_0x5568=function(){return _0x9a5362;};return a0_0x5568();}const allIndex=a0_0x140de2(0x130),serviceIndex=a0_0x140de2(0xe6),serviceHistoryIndex=a0_0x140de2(0x134),serviceQuery=a0_0x140de2(0x129),serviceHistoryQuery=a0_0x140de2(0x15e),serviceMutation=a0_0x140de2(0x115),sereviceType=a0_0x140de2(0x13b),sereviceHistoryType=a0_0x140de2(0x113),serviceEntity=a0_0x140de2(0x158),serviceEntityHistCopy=a0_0x140de2(0x10e),serviceEntityHistJson=a0_0x140de2(0x154),serviceEntitySubscriber=a0_0x140de2(0x140);
|
|
1
|
+
'use strict';const a0_0xdea71a=a0_0x606b;(function(_0x5ee443,_0x17644c){const _0x395a12=a0_0x606b,_0x2ba8e2=_0x5ee443();while(!![]){try{const _0xee5ca5=-parseInt(_0x395a12(0x1b4))/0x1+parseInt(_0x395a12(0x1a7))/0x2+parseInt(_0x395a12(0x173))/0x3+-parseInt(_0x395a12(0x18e))/0x4*(-parseInt(_0x395a12(0x182))/0x5)+parseInt(_0x395a12(0x15b))/0x6*(-parseInt(_0x395a12(0x19c))/0x7)+parseInt(_0x395a12(0x166))/0x8*(-parseInt(_0x395a12(0x174))/0x9)+-parseInt(_0x395a12(0x1b7))/0xa*(parseInt(_0x395a12(0x17c))/0xb);if(_0xee5ca5===_0x17644c)break;else _0x2ba8e2['push'](_0x2ba8e2['shift']());}catch(_0x5b469c){_0x2ba8e2['push'](_0x2ba8e2['shift']());}}}(a0_0xa697,0xcc180));Object[a0_0xdea71a(0x170)](exports,'__esModule',{'value':!0x0}),exports[a0_0xdea71a(0x1ba)]=void 0x0;function a0_0xa697(){const _0x5f5a60=['type\x20=>','createEntityText','\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','33jQhcNu','Entity','export\x20*\x20from\x20\x27./','writeFileSync','\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201','Resolver','295255mrZNsT','/service','lodash','sort','push','number','map','Entities,','\x20})','getRepository',',length:','Resolvers,\x20subscribers\x20as\x20','76KODxav','.ts','domain_id','columnToEntityColumn','/*\x20ENTITIES\x20*/\x0a\x09...','writeFile','string','timestamp\x20without\x20time\x20zone','\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','EntitySubscribers\x20}\x20from\x20\x27./','text','indexOf','mkdirSync','uniqRank','8169xsAmOE','Operato\x20Tool\x20Create\x20Service','colType','name','getProjectRootPath','readFileSync','join','\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','getFieldType','/event-subscriber.ts','dataProp','2071068oNirPF','createDir','packages','integer','design:paramtypes','domain','/packages','...','updater','createServicePath','Entities,\x20resolvers\x20as\x20','Ctx','__decorate','299172dyvNpC','createServiceFiles','pluralize','277930vcPwcJ','filter','\x20{\x20nullable:\x20','OperatoToolCreateService','colSize','existsSync','length','replace','Int','index.ts','COPY','Resolvers\x20}\x20from\x20\x27./','\x27,\x20nullable:\x20','@Field(','createTypeText','replaceNamesMap','decimal','-history-type.ts','\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','pluralPascalCaseName','PWD','{{camelCase\x20name}}.','Float','Date','@things-factory/shell','state','-type.ts','created_at','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20Domain\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0a@Entity(\x27{{tableName}}\x27)\x0a{{indexAnn}}\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}\x20{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','toolCreateService','\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','date','/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...','\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryList\x20}\x20from\x20\x27./{{name}}-history-type\x27\x0a\x0a@Resolver({{pascalCase\x20name}}History)\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryQuery\x20{\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}History,\x20{\x20description:\x20\x27To\x20fetch\x20a\x20{{pascalCase\x20name}}History\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}History(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}History>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20return\x20await\x20getRepository({{pascalCase\x20name}}History).findOne({\x0a\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20}\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}HistoryList,\x20{\x20description:\x20\x27To\x20fetch\x20multiple\x20{{pluralPascalCase\x20name}}History\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}Histories(@Args()\x20params:\x20ListParam,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}HistoryList>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20queryBuilder\x20=\x20getQueryBuilderFromListParams({\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20params,\x0a\x20\x20\x20\x20\x20\x20repository:\x20await\x20getRepository({{pascalCase\x20name}}History)\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20const\x20[items,\x20total]\x20=\x20await\x20queryBuilder.getManyAndCount()\x0a\x0a\x20\x20\x20\x20return\x20{\x20items,\x20total\x20}\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20Domain)\x0a\x20\x20async\x20domain(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<Domain>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(Domain).findOneBy({id:{{camelCase\x20name}}History.domainId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20updater(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}History.updaterId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20creator(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}History.creatorId})\x0a\x20\x20}\x0a}\x0a','EntityColumn','createHistoryServiceFiles','@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})','includes','createNoHistoryServiceFiels','double','prototype','split','bigint','/server/service/','type-graphql','__param','findOne','float','rank','find','tableName','-mutation.ts','existsPath','\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','nullable','pascalCaseName','-query.ts','6768ihbJKo','creator_id','datetime','createHistoryEntityText','utf8','camelCaseName','updated_at','EntitySubscribers,','\x0a\x20\x20','/index.ts','Query','780056bDhZZF','long','getColTxtType','import\x20{\x20entities\x20as\x20','-history.ts','JSON','updater_id','\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','\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','@things-factory/resource-base','defineProperty','Resolvers,','/packages/','1424697TkfGRK','9TdvpqX','__metadata','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','design:returntype','Arg'];a0_0xa697=function(){return _0x5f5a60;};return a0_0xa697();}const tslib_1=require('tslib'),type_graphql_1=require(a0_0xdea71a(0x14e)),shell_1=require(a0_0xdea71a(0x1cf)),resource_base_1=require(a0_0xdea71a(0x16f)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0xdea71a(0x184)),{plural:plural}=require(a0_0xdea71a(0x1b6)),fs=require('fs');function a0_0x606b(_0x4bb336,_0x3f09d7){const _0xa6975b=a0_0xa697();return a0_0x606b=function(_0x606bcc,_0x1a81b1){_0x606bcc=_0x606bcc-0x13c;let _0xe04071=_0xa6975b[_0x606bcc];return _0xe04071;},a0_0x606b(_0x4bb336,_0x3f09d7);}let OperatoToolCreateService=class{async['toolCreateService'](_0x12493d,_0x38a289){const _0x36fbe9=a0_0xdea71a,{domain:_0x19884e}=_0x38a289[_0x36fbe9(0x1d0)],_0x57c975=await(0x0,shell_1[_0x36fbe9(0x18b)])(resource_base_1[_0x36fbe9(0x17d)])[_0x36fbe9(0x150)]({'where':{'id':_0x12493d}}),_0x11d2b5=await(0x0,shell_1[_0x36fbe9(0x18b)])(resource_base_1[_0x36fbe9(0x144)])[_0x36fbe9(0x153)]({'where':{'domain':{'id':_0x19884e['id']},'entity':{'id':_0x57c975['id']}}});let {name:_0x352722='',bundle:_0x4b840a=''}=_0x57c975||{},_0x21b219=this['getProjectRootPath'](),_0x3b6b0f=kebabCase(_0x352722);return await this[_0x36fbe9(0x1b0)](_0x21b219,_0x4b840a,_0x3b6b0f),await this['createServiceFiles'](_0x21b219,_0x4b840a,_0x352722,_0x3b6b0f,_0x57c975,_0x11d2b5),!0x0;}async[a0_0xdea71a(0x1b5)](_0x2ef124,_0x21d687,_0x501d20,_0x5d236a,_0x33f58b,_0xb96c14){const _0x1479b1=a0_0xdea71a;let _0x2843a8={'name':_0x5d236a,'tableName':_0x33f58b[_0x1479b1(0x154)],'pascalCaseName':startCase(camelCase(_0x501d20))[_0x1479b1(0x1be)](/ /g,''),'camelCaseName':camelCase(_0x501d20),'snakeCaseName':snakeCase(_0x501d20),'pluralPascalCaseName':startCase(camelCase(plural(_0x501d20)))['replace'](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x501d20))},_0x396f6b=_0x2ef124+_0x1479b1(0x172)+_0x21d687+_0x1479b1(0x14d);[_0x1479b1(0x16b),_0x1479b1(0x1c1)][_0x1479b1(0x147)](_0x33f58b[_0x1479b1(0x1a6)])?await this[_0x1479b1(0x145)](_0x396f6b,_0x5d236a,_0x33f58b,_0xb96c14,_0x2843a8):await this[_0x1479b1(0x148)](_0x396f6b,_0x5d236a,_0x33f58b,_0xb96c14,_0x2843a8);}async[a0_0xdea71a(0x145)](_0x505bcf,_0x18c965,_0x526757,_0x2b1499,_0x31c664){const _0x5f169b=a0_0xdea71a;await this[_0x5f169b(0x193)](_0x505bcf+(_0x18c965+_0x5f169b(0x164)),serviceHistoryIndex,_0x31c664);let _0x1056f6=this[_0x5f169b(0x17a)](_0x526757,_0x2b1499);await this['writeFile'](_0x505bcf+(_0x18c965+'/'+_0x18c965+_0x5f169b(0x18f)),_0x1056f6,_0x31c664),await this[_0x5f169b(0x193)](_0x505bcf+(_0x18c965+'/'+_0x18c965+_0x5f169b(0x15a)),serviceQuery,_0x31c664),await this[_0x5f169b(0x193)](_0x505bcf+(_0x18c965+'/'+_0x18c965+_0x5f169b(0x155)),serviceMutation,_0x31c664);let _0x27d40d=this['createTypeText'](_0x2b1499);await this[_0x5f169b(0x193)](_0x505bcf+(_0x18c965+'/'+_0x18c965+_0x5f169b(0x13c)),_0x27d40d,_0x31c664);let _0x55d369=this[_0x5f169b(0x15e)](_0x526757,_0x2b1499);await this[_0x5f169b(0x193)](_0x505bcf+(_0x18c965+'/'+_0x18c965+_0x5f169b(0x16a)),_0x55d369,_0x31c664);let _0x3923e9='';_0x5f169b(0x16b)==_0x526757[_0x5f169b(0x1a6)]?(_0x3923e9=_0x5f169b(0x16d),await this[_0x5f169b(0x193)](_0x505bcf+(_0x18c965+'/event-subscriber.ts'),serviceEntitySubscriber,_0x31c664)):_0x3923e9='';let _0x423f0c=serviceEntitySubscriber[_0x5f169b(0x1be)](/{{entityToJson}}/g,_0x3923e9);await this['writeFile'](_0x505bcf+(_0x18c965+_0x5f169b(0x1a5)),_0x423f0c,_0x31c664),await this[_0x5f169b(0x193)](_0x505bcf+(_0x18c965+'/'+_0x18c965+'-history-query.ts'),serviceHistoryQuery,_0x31c664),await this[_0x5f169b(0x193)](_0x505bcf+(_0x18c965+'/'+_0x18c965+_0x5f169b(0x1c8)),sereviceHistoryType,_0x31c664);let _0x585d1c=_0x505bcf+_0x5f169b(0x1c0);0x0==await this['existsPath'](_0x585d1c)&&await this[_0x5f169b(0x193)](_0x585d1c,allIndex,_0x31c664);let _0x2b582b=await fs['readFileSync'](_0x585d1c,'utf8');_0x2b582b[_0x5f169b(0x199)](_0x5f169b(0x17e)+_0x31c664[_0x5f169b(0x19f)]+'/'+_0x31c664[_0x5f169b(0x19f)]+'-history\x27')<0x0&&(_0x2b582b=_0x2b582b[_0x5f169b(0x1be)](/\/\* EXPORT ENTITY TYPES \*\//,'/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./'+_0x31c664['name']+'/'+_0x31c664[_0x5f169b(0x19f)]+'-history\x27')),_0x2b582b['indexOf'](_0x5f169b(0x17e)+_0x31c664[_0x5f169b(0x19f)]+'/'+_0x31c664['name']+'\x27')<0x0&&(_0x2b582b=_0x2b582b[_0x5f169b(0x1be)](/\/\* EXPORT ENTITY TYPES \*\//,_0x5f169b(0x176)+_0x31c664[_0x5f169b(0x19f)]+'/'+_0x31c664[_0x5f169b(0x19f)]+'\x27')),_0x2b582b[_0x5f169b(0x199)](_0x5f169b(0x169)+_0x31c664[_0x5f169b(0x159)]+_0x5f169b(0x1b1)+_0x31c664[_0x5f169b(0x159)]+_0x5f169b(0x18d)+_0x31c664['pascalCaseName']+_0x5f169b(0x197)+_0x31c664['name']+'\x27')<0x0&&(_0x2b582b=_0x2b582b[_0x5f169b(0x1be)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,'/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20'+_0x31c664[_0x5f169b(0x159)]+'Entities,\x20resolvers\x20as\x20'+_0x31c664['pascalCaseName']+_0x5f169b(0x18d)+_0x31c664['pascalCaseName']+'EntitySubscribers\x20}\x20from\x20\x27./'+_0x31c664[_0x5f169b(0x19f)]+'\x27')),_0x2b582b[_0x5f169b(0x199)](_0x5f169b(0x1ae)+_0x31c664['pascalCaseName']+'Entities,')<0x0&&(_0x2b582b=_0x2b582b[_0x5f169b(0x1be)](/\/\* ENTITIES \*\//,_0x5f169b(0x192)+_0x31c664[_0x5f169b(0x159)]+_0x5f169b(0x189))),_0x2b582b[_0x5f169b(0x199)]('...'+_0x31c664[_0x5f169b(0x159)]+'Resolvers,')<0x0&&(_0x2b582b=_0x2b582b[_0x5f169b(0x1be)](/\/\* RESOLVER CLASSES \*\//,'/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...'+_0x31c664[_0x5f169b(0x159)]+'Resolvers,')),_0x2b582b[_0x5f169b(0x199)](_0x5f169b(0x1ae)+_0x31c664[_0x5f169b(0x159)]+_0x5f169b(0x162))<0x0&&(_0x2b582b=_0x2b582b[_0x5f169b(0x1be)](/\/\* SUBSCRIBERS \*\//,_0x5f169b(0x142)+_0x31c664['pascalCaseName']+_0x5f169b(0x162))),await this[_0x5f169b(0x193)](_0x585d1c,_0x2b582b,_0x31c664);}async[a0_0xdea71a(0x148)](_0x41051e,_0x369004,_0x14c436,_0x29b155,_0x34e12a){const _0x2cdecf=a0_0xdea71a;await this[_0x2cdecf(0x193)](_0x41051e+(_0x369004+_0x2cdecf(0x164)),serviceIndex,_0x34e12a),await this[_0x2cdecf(0x193)](_0x41051e+(_0x369004+'/'+_0x369004+_0x2cdecf(0x15a)),serviceQuery,_0x34e12a),await this[_0x2cdecf(0x193)](_0x41051e+(_0x369004+'/'+_0x369004+_0x2cdecf(0x155)),serviceMutation,_0x34e12a);let _0x460b5b=this[_0x2cdecf(0x17a)](_0x14c436,_0x29b155);await this[_0x2cdecf(0x193)](_0x41051e+(_0x369004+'/'+_0x369004+'.ts'),_0x460b5b,_0x34e12a);let _0x23cf99=this[_0x2cdecf(0x1c5)](_0x29b155);await this[_0x2cdecf(0x193)](_0x41051e+(_0x369004+'/'+_0x369004+'-type.ts'),_0x23cf99,_0x34e12a);let _0xa6d421=_0x41051e+_0x2cdecf(0x1c0);0x0==await this[_0x2cdecf(0x156)](_0xa6d421)&&await this[_0x2cdecf(0x193)](_0xa6d421,allIndex,_0x34e12a);let _0x3fc250=await fs[_0x2cdecf(0x1a1)](_0xa6d421,_0x2cdecf(0x15f));_0x3fc250[_0x2cdecf(0x199)]('export\x20*\x20from\x20\x27./'+_0x34e12a['name']+'/'+_0x34e12a[_0x2cdecf(0x19f)]+'\x27')<0x0&&(_0x3fc250=_0x3fc250[_0x2cdecf(0x1be)](/\/\* EXPORT ENTITY TYPES \*\//,_0x2cdecf(0x176)+_0x34e12a[_0x2cdecf(0x19f)]+'/'+_0x34e12a[_0x2cdecf(0x19f)]+'\x27')),_0x3fc250[_0x2cdecf(0x199)](_0x2cdecf(0x169)+_0x34e12a[_0x2cdecf(0x159)]+_0x2cdecf(0x1b1)+_0x34e12a[_0x2cdecf(0x159)]+_0x2cdecf(0x1c2)+_0x34e12a[_0x2cdecf(0x19f)]+'\x27')<0x0&&(_0x3fc250=_0x3fc250[_0x2cdecf(0x1be)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,'/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20'+_0x34e12a['pascalCaseName']+'Entities,\x20resolvers\x20as\x20'+_0x34e12a[_0x2cdecf(0x159)]+'Resolvers\x20}\x20from\x20\x27./'+_0x34e12a['name']+'\x27')),_0x3fc250[_0x2cdecf(0x199)]('...'+_0x34e12a[_0x2cdecf(0x159)]+_0x2cdecf(0x189))<0x0&&(_0x3fc250=_0x3fc250['replace'](/\/\* ENTITIES \*\//,'/*\x20ENTITIES\x20*/\x0a\x09...'+_0x34e12a['pascalCaseName']+_0x2cdecf(0x189))),_0x3fc250[_0x2cdecf(0x199)](_0x2cdecf(0x1ae)+_0x34e12a[_0x2cdecf(0x159)]+_0x2cdecf(0x171))<0x0&&(_0x3fc250=_0x3fc250['replace'](/\/\* RESOLVER CLASSES \*\//,'/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...'+_0x34e12a[_0x2cdecf(0x159)]+_0x2cdecf(0x171))),await this[_0x2cdecf(0x193)](_0xa6d421,_0x3fc250,_0x34e12a);}['createTypeText'](_0x5ef910){const _0x3d5f34=a0_0xdea71a;let _0x24a589=sereviceType,_0x3265af=_0x5ef910['map'](_0x402619=>{const _0x11b5c8=a0_0x606b;if('id'==_0x402619['name'])return'';if(_0x11b5c8(0x190)==_0x402619['name'])return'';if(_0x11b5c8(0x13d)==_0x402619[_0x11b5c8(0x19f)])return'';if('updated_at'==_0x402619[_0x11b5c8(0x19f)])return'';if(_0x11b5c8(0x15c)==_0x402619[_0x11b5c8(0x19f)])return'';if('updater_id'==_0x402619[_0x11b5c8(0x19f)])return'';let _0x5024e5=this['getFieldType'](_0x402619),_0x27d6e2=this[_0x11b5c8(0x168)](_0x402619),_0x154aa8=camelCase(_0x402619[_0x11b5c8(0x19f)]);return'\x20\x20'+(_0x11b5c8(0x1c4)+(0x0==_0x5024e5['length']?'':_0x11b5c8(0x179)+_0x5024e5+',')+_0x11b5c8(0x1b9)+_0x402619[_0x11b5c8(0x158)]+_0x11b5c8(0x18a))+_0x11b5c8(0x163)+(''+_0x154aa8+(_0x402619[_0x11b5c8(0x158)]?'?':'')+':\x20'+_0x27d6e2)+'\x0a';});_0x24a589=_0x24a589[_0x3d5f34(0x1be)](/{{newTypeColumns}}/g,_0x3265af[_0x3d5f34(0x1a2)]('\x0a'));let _0x2ebec8=_0x5ef910[_0x3d5f34(0x188)](_0x105efa=>{const _0x509787=_0x3d5f34;if('id'==_0x105efa[_0x509787(0x19f)])return'';if(_0x509787(0x190)==_0x105efa[_0x509787(0x19f)])return'';if(_0x509787(0x13d)==_0x105efa['name'])return'';if(_0x509787(0x161)==_0x105efa[_0x509787(0x19f)])return'';if(_0x509787(0x15c)==_0x105efa[_0x509787(0x19f)])return'';if(_0x509787(0x16c)==_0x105efa[_0x509787(0x19f)])return'';let _0xf06065=this[_0x509787(0x1a4)](_0x105efa),_0x5a78ab=this[_0x509787(0x168)](_0x105efa);_0x105efa[_0x509787(0x158)]=!0x0;let _0x1bfa95=camelCase(_0x105efa[_0x509787(0x19f)]);return'\x20\x20'+(_0x509787(0x1c4)+(0x0==_0xf06065[_0x509787(0x1bd)]?'':'type\x20=>'+_0xf06065+',')+_0x509787(0x1b9)+_0x105efa[_0x509787(0x158)]+_0x509787(0x18a))+_0x509787(0x163)+(''+_0x1bfa95+(_0x105efa[_0x509787(0x158)]?'?':'')+':\x20'+_0x5a78ab)+'\x0a';});return _0x24a589=_0x24a589[_0x3d5f34(0x1be)](/{{patchTypeColumns}}/g,_0x2ebec8[_0x3d5f34(0x1a2)]('\x0a')),_0x24a589;}[a0_0xdea71a(0x17a)](_0x3aa7db,_0x33a88e){const _0x120ec0=a0_0xdea71a;let _0x279fde=serviceEntity,_0x4862bf=_0x33a88e[_0x120ec0(0x185)](function(_0x6a1d9c,_0x32e835){const _0x2f730c=_0x120ec0;return _0x6a1d9c[_0x2f730c(0x152)]-_0x32e835[_0x2f730c(0x152)];})[_0x120ec0(0x188)](_0x1042d2=>this['columnToEntityColumn'](_0x1042d2));[_0x120ec0(0x1c1),'JSON'][_0x120ec0(0x147)](_0x3aa7db[_0x120ec0(0x1a6)])&&_0x4862bf['push'](_0x120ec0(0x180)),_0x279fde=_0x279fde[_0x120ec0(0x1be)](/{{entityColumns}}/g,_0x4862bf[_0x120ec0(0x1a2)]('\x0a'));let _0x3ae26f='',_0x37fd4c=_0x33a88e[_0x120ec0(0x1b8)](_0x5158a4=>_0x5158a4[_0x120ec0(0x19b)]&&_0x5158a4[_0x120ec0(0x19b)]>0x0)[_0x120ec0(0x185)](function(_0x582737,_0x383b1d){return _0x582737['uniqRank']-_0x383b1d['uniqRank'];});if(_0x37fd4c[_0x120ec0(0x1bd)]>0x0){_0x3ae26f=_0x120ec0(0x146);let _0x2dacaa=_0x37fd4c[_0x120ec0(0x188)](_0x3f374c=>{const _0x469cc2=_0x120ec0;let _0x43e5b1=_0x3f374c[_0x469cc2(0x19f)];return _0x469cc2(0x190)==_0x3f374c[_0x469cc2(0x19f)]&&(_0x43e5b1=_0x469cc2(0x1ac)),_0x469cc2(0x15c)==_0x3f374c['name']&&(_0x43e5b1='creator'),_0x469cc2(0x16c)==_0x3f374c[_0x469cc2(0x19f)]&&(_0x43e5b1=_0x469cc2(0x1af)),_0x469cc2(0x1cc)+camelCase(_0x43e5b1);});_0x3ae26f=_0x3ae26f[_0x120ec0(0x1be)](/{{indexColumns}}/g,_0x2dacaa[_0x120ec0(0x1a2)](','));}return _0x279fde=_0x279fde[_0x120ec0(0x1be)](/{{indexAnn}}/g,_0x3ae26f),_0x279fde;}[a0_0xdea71a(0x15e)](_0x1ecdb3,_0x173682){const _0x45ea0f=a0_0xdea71a;let _0xd14b32=_0x45ea0f(0x16b)==_0x1ecdb3[_0x45ea0f(0x1a6)]?serviceEntityHistJson:serviceEntityHistCopy,_0x2694a5=_0x173682[_0x45ea0f(0x185)](function(_0x3987a9,_0x1dcd95){const _0x425898=_0x45ea0f;return _0x3987a9['rank']-_0x1dcd95[_0x425898(0x152)];})[_0x45ea0f(0x188)](_0x19a24b=>this[_0x45ea0f(0x191)](_0x19a24b));return _0xd14b32=_0xd14b32[_0x45ea0f(0x1be)](/{{entityColumns}}/g,_0x2694a5[_0x45ea0f(0x1a2)]('\x0a')),_0xd14b32;}[a0_0xdea71a(0x191)](_0x14d0f8){const _0x27c50c=a0_0xdea71a;if('id'==_0x14d0f8[_0x27c50c(0x19f)])return'';if(_0x27c50c(0x190)==_0x14d0f8['name'])return'';if(_0x27c50c(0x13d)==_0x14d0f8[_0x27c50c(0x19f)])return'';if(_0x27c50c(0x161)==_0x14d0f8[_0x27c50c(0x19f)])return'';if(_0x27c50c(0x15c)==_0x14d0f8[_0x27c50c(0x19f)])return'';if(_0x27c50c(0x16c)==_0x14d0f8['name'])return'';let _0x38641a=_0x14d0f8['colType'];_0x27c50c(0x149)==_0x14d0f8[_0x27c50c(0x19e)]&&(_0x38641a='double\x20precision'),_0x27c50c(0x167)==_0x14d0f8[_0x27c50c(0x19e)]&&(_0x38641a=_0x27c50c(0x14c)),'string'==_0x14d0f8[_0x27c50c(0x19e)]&&(_0x38641a='character\x20varying'),'datetime'==_0x14d0f8[_0x27c50c(0x19e)]&&(_0x38641a=_0x27c50c(0x195));let _0x5bb1db='';_0x27c50c(0x194)==_0x14d0f8['colType']&&(_0x5bb1db=_0x14d0f8[_0x27c50c(0x1bb)]);let _0x2bbd30=this[_0x27c50c(0x1a4)](_0x14d0f8),_0x344ef5=this[_0x27c50c(0x168)](_0x14d0f8),_0x1f47da=camelCase(_0x14d0f8[_0x27c50c(0x19f)]);return'\x20\x20'+('@Column({name:\x27'+_0x14d0f8[_0x27c50c(0x19f)]+'\x27,\x20type:\x20\x27'+_0x38641a+_0x27c50c(0x1c3)+_0x14d0f8['nullable']+'\x20'+(0x0==_0x5bb1db[_0x27c50c(0x1bd)]?'':_0x27c50c(0x18c)+_0x5bb1db)+_0x27c50c(0x18a))+_0x27c50c(0x163)+(_0x27c50c(0x1c4)+(0x0==_0x2bbd30[_0x27c50c(0x1bd)]?'':'type\x20=>'+_0x2bbd30+',')+_0x27c50c(0x1b9)+_0x14d0f8[_0x27c50c(0x158)]+_0x27c50c(0x18a))+_0x27c50c(0x163)+(''+_0x1f47da+(_0x14d0f8['nullable']?'?':'')+':\x20'+_0x344ef5)+'\x0a';}[a0_0xdea71a(0x1a4)](_0x142625){const _0x268a2c=a0_0xdea71a;let _0xb729f9='';return _0x268a2c(0x149)==_0x142625[_0x268a2c(0x19e)]&&(_0xb729f9=_0x268a2c(0x1cd)),_0x268a2c(0x151)==_0x142625['colType']&&(_0xb729f9=_0x268a2c(0x1cd)),_0x268a2c(0x167)==_0x142625[_0x268a2c(0x19e)]&&(_0xb729f9=_0x268a2c(0x1bf)),'integer'==_0x142625[_0x268a2c(0x19e)]&&(_0xb729f9='Int'),_0xb729f9;}['getColTxtType'](_0xfcba1b){const _0x30cacf=a0_0xdea71a;let _0x4b0b42=_0xfcba1b[_0x30cacf(0x19e)];return _0x30cacf(0x1c7)==_0xfcba1b[_0x30cacf(0x19e)]&&(_0x4b0b42=_0x30cacf(0x187)),_0x30cacf(0x149)==_0xfcba1b[_0x30cacf(0x19e)]&&(_0x4b0b42='number'),_0x30cacf(0x151)==_0xfcba1b[_0x30cacf(0x19e)]&&(_0x4b0b42='number'),_0x30cacf(0x1aa)==_0xfcba1b[_0x30cacf(0x19e)]&&(_0x4b0b42=_0x30cacf(0x187)),_0x30cacf(0x167)==_0xfcba1b['colType']&&(_0x4b0b42=_0x30cacf(0x187)),_0x30cacf(0x15d)==_0xfcba1b['colType']&&(_0x4b0b42=_0x30cacf(0x1ce)),_0x30cacf(0x141)==_0xfcba1b[_0x30cacf(0x19e)]&&(_0x4b0b42=_0x30cacf(0x1ce)),_0x30cacf(0x198)==_0xfcba1b[_0x30cacf(0x19e)]&&(_0x4b0b42=_0x30cacf(0x194)),_0x4b0b42;}async[a0_0xdea71a(0x193)](_0xb70671,_0x16901f,_0x2c4edb){const _0x15e04b=a0_0xdea71a;await fs[_0x15e04b(0x17f)](_0xb70671,this[_0x15e04b(0x1c6)](_0x16901f,_0x2c4edb),_0x15e04b(0x15f));}[a0_0xdea71a(0x1c6)](_0x27dc43,_0x37da9d){const _0x9994c1=a0_0xdea71a;return _0x27dc43['replace'](/{{pascalCase name}}/g,_0x37da9d['pascalCaseName'])[_0x9994c1(0x1be)](/{{camelCase name}}/g,_0x37da9d[_0x9994c1(0x160)])['replace'](/{{snakeCase name}}/g,_0x37da9d['snakeCaseName'])[_0x9994c1(0x1be)](/{{pluralPascalCase name}}/g,_0x37da9d[_0x9994c1(0x1ca)])[_0x9994c1(0x1be)](/{{pluralCamelCase name}}/g,_0x37da9d['pluralCamelCaseName'])['replace'](/{{tableName}}/g,_0x37da9d[_0x9994c1(0x154)])[_0x9994c1(0x1be)](/{{name}}/g,_0x37da9d['name']);}async[a0_0xdea71a(0x1b0)](_0x12a964,_0x4185f9,_0x352a10){const _0x401111=a0_0xdea71a;let _0x19e35c=_0x12a964+_0x401111(0x1ad);await this['createDir'](_0x19e35c),_0x19e35c=_0x19e35c+'/'+_0x4185f9,await this['createDir'](_0x19e35c),_0x19e35c+='/server',await this[_0x401111(0x1a8)](_0x19e35c),_0x19e35c+=_0x401111(0x183),await this[_0x401111(0x1a8)](_0x19e35c),_0x19e35c=_0x19e35c+'/'+_0x352a10,await this['createDir'](_0x19e35c);}[a0_0xdea71a(0x1a0)](){const _0xc60f53=a0_0xdea71a;let _0xf4be05=process['env'][_0xc60f53(0x1cb)][_0xc60f53(0x14b)]('/'),_0x342ebc=[];for(let _0x2ee240=0x0;_0x2ee240<_0xf4be05[_0xc60f53(0x1bd)]&&_0xc60f53(0x1a9)!=_0xf4be05[_0x2ee240];_0x2ee240++)_0x342ebc[_0xc60f53(0x186)](_0xf4be05[_0x2ee240]);return _0x342ebc[_0xc60f53(0x1a2)]('/');}async[a0_0xdea71a(0x1a8)](_0x4b8dbe){const _0x25c396=a0_0xdea71a;0x0==await this['existsPath'](_0x4b8dbe)&&fs[_0x25c396(0x19a)](_0x4b8dbe);}async[a0_0xdea71a(0x156)](_0x4cf9d3){const _0x5356ac=a0_0xdea71a;return await fs[_0x5356ac(0x1bc)](_0x4cf9d3);}};tslib_1['__decorate']([(0x0,type_graphql_1[a0_0xdea71a(0x165)])(_0x1c28ed=>Boolean,{'description':a0_0xdea71a(0x19d)}),tslib_1[a0_0xdea71a(0x14f)](0x0,(0x0,type_graphql_1[a0_0xdea71a(0x178)])('id')),tslib_1[a0_0xdea71a(0x14f)](0x1,(0x0,type_graphql_1[a0_0xdea71a(0x1b2)])()),tslib_1[a0_0xdea71a(0x175)]('design:type',Function),tslib_1['__metadata'](a0_0xdea71a(0x1ab),[String,Object]),tslib_1[a0_0xdea71a(0x175)](a0_0xdea71a(0x177),Promise)],OperatoToolCreateService[a0_0xdea71a(0x14a)],a0_0xdea71a(0x13f),null),OperatoToolCreateService=tslib_1[a0_0xdea71a(0x1b3)]([(0x0,type_graphql_1[a0_0xdea71a(0x181)])()],OperatoToolCreateService),exports[a0_0xdea71a(0x1ba)]=OperatoToolCreateService;const allIndex=a0_0xdea71a(0x196),serviceIndex='\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}}]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}Mutation]\x0a',serviceHistoryIndex=a0_0xdea71a(0x157),serviceQuery='\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}List\x20}\x20from\x20\x27./{{name}}-type\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Query\x20{\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20fetch\x20a\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20return\x20await\x20getRepository({{pascalCase\x20name}}).findOne({\x0a\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20}\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}List,\x20{\x20description:\x20\x27To\x20fetch\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{pluralCamelCase\x20name}}(@Args()\x20params:\x20ListParam,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}List>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20queryBuilder\x20=\x20getQueryBuilderFromListParams({\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20params,\x0a\x20\x20\x20\x20\x20\x20repository:\x20await\x20getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20const\x20convertedParams\x20=\x20convertListParams(params,\x20domain.id)\x0a\x20\x20\x20\x20const\x20[items,\x20total]\x20=\x20await\x20queryBuilder.getManyAndCount()\x0a\x0a\x20\x20\x20\x20return\x20{\x20items,\x20total\x20}\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20Domain)\x0a\x20\x20async\x20domain(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<Domain>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(Domain).findOneBy({id:{{camelCase\x20name}}.domainId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20updater(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.updaterId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20creator(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.creatorId})\x0a\x20\x20}\x0a}\x0a',serviceHistoryQuery=a0_0xdea71a(0x143),serviceMutation=a0_0xdea71a(0x1c9),sereviceType=a0_0xdea71a(0x140),sereviceHistoryType=a0_0xdea71a(0x1a3),serviceEntity=a0_0xdea71a(0x13e),serviceEntityHistCopy='\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a',serviceEntityHistJson=a0_0xdea71a(0x16e),serviceEntitySubscriber=a0_0xdea71a(0x17b);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x3728b0=a0_0x4c1b;(function(_0x2d9805,_0x95ae3c){const _0x4c6703=a0_0x4c1b,_0x2fecc2=_0x2d9805();while(!![]){try{const _0x456fe6=parseInt(_0x4c6703(0x19a))/0x1*(parseInt(_0x4c6703(0x190))/0x2)+-parseInt(_0x4c6703(0x18a))/0x3*(-parseInt(_0x4c6703(0x1a2))/0x4)+parseInt(_0x4c6703(0x1aa))/0x5+parseInt(_0x4c6703(0x1a9))/0x6+-parseInt(_0x4c6703(0x18b))/0x7+-parseInt(_0x4c6703(0x1a6))/0x8*(-parseInt(_0x4c6703(0x18d))/0x9)+-parseInt(_0x4c6703(0x19c))/0xa;if(_0x456fe6===_0x95ae3c)break;else _0x2fecc2['push'](_0x2fecc2['shift']());}catch(_0x5ed8b3){_0x2fecc2['push'](_0x2fecc2['shift']());}}}(a0_0xeca9,0x91800));function a0_0x4c1b(_0x26b7c6,_0x26a121){const _0xeca95e=a0_0xeca9();return a0_0x4c1b=function(_0x4c1b8a,_0x373534){_0x4c1b8a=_0x4c1b8a-0x188;let _0x32c1aa=_0xeca95e[_0x4c1b8a];return _0x32c1aa;},a0_0x4c1b(_0x26b7c6,_0x26a121);}function a0_0xeca9(){const _0x2f6367=['defineProperty','OVER_LIMIT','checkStudioTemplateIsOverLimit','Permissions\x20For\x20Tailor\x20Tool','LicenseError','@things-factory/shell','89746FRaXyp','where','23206120wiZCoP','@things-factory/menu-base','getPermission','ERROR_CODES','getRepository','map','847872ASKmqT','from','@things-factory/operato-license-checker','Menu','264fuYwsZ','forEach','checkStudioPermission','2177508nyDFLu','4708835SCGKfN','createQueryBuilder','getCount','15bfsjWZ','3931641BwYaAT','menu','132408bdVEFg','../../errors/license-error','manager','14GKDacr','(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)','Studio','INVALID_LICENSE'];a0_0xeca9=function(){return _0x2f6367;};return a0_0xeca9();}Object[a0_0x3728b0(0x194)](exports,'__esModule',{'value':!0x0}),exports[a0_0x3728b0(0x196)]=exports[a0_0x3728b0(0x1a8)]=void 0x0;const operato_license_checker_1=require(a0_0x3728b0(0x1a4)),shell_1=require(a0_0x3728b0(0x199)),menu_base_1=require(a0_0x3728b0(0x19d)),license_error_1=require(a0_0x3728b0(0x18e));async function checkStudioPermission(){const _0x303153=a0_0x3728b0;let _0x440d87=((0x0,operato_license_checker_1[_0x303153(0x19e)])(_0x303153(0x197))||',')['split'](',')[_0x303153(0x1a1)](_0xcb546a=>_0xcb546a['trim']()),_0x4d6be8=!0x1;return _0x440d87[_0x303153(0x1a7)](_0x33e12e=>{const _0x558ecf=_0x303153;_0x33e12e['includes'](_0x558ecf(0x192))&&(_0x4d6be8=!0x0);}),_0x4d6be8;}async function checkStudioTemplateIsOverLimit(_0x3de8f5,_0x19a2f1){const _0x2e002d=a0_0x3728b0;if(0x0==await checkStudioPermission())throw new license_error_1['LicenseError']({'errorCode':_0x19a2f1['t'](license_error_1[_0x2e002d(0x198)][_0x2e002d(0x19f)][_0x2e002d(0x193)])});var _0x296c62=0x0;if(_0x296c62=_0x3de8f5&&''!=_0x3de8f5?await(0x0,shell_1['getRepository'])(menu_base_1['Menu'])[_0x2e002d(0x18f)][_0x2e002d(0x188)]()['select']('menu')[_0x2e002d(0x1a3)](menu_base_1[_0x2e002d(0x1a5)],_0x2e002d(0x18c))['where']('id\x20!=\x20:id',{'id':_0x3de8f5})['andWhere'](_0x2e002d(0x191))[_0x2e002d(0x189)]()+0x1:await(0x0,shell_1[_0x2e002d(0x1a0)])(menu_base_1[_0x2e002d(0x1a5)])[_0x2e002d(0x18f)]['createQueryBuilder']()['select']('menu')[_0x2e002d(0x1a3)](menu_base_1[_0x2e002d(0x1a5)],_0x2e002d(0x18c))[_0x2e002d(0x19b)](_0x2e002d(0x191))['getCount']()+0x1,!(0x0,operato_license_checker_1['checkTarget'])(_0x296c62))throw new license_error_1['LicenseError']({'errorCode':_0x19a2f1['t'](license_error_1['LicenseError'][_0x2e002d(0x19f)][_0x2e002d(0x195)])});return!0x0;}exports[a0_0x3728b0(0x1a8)]=checkStudioPermission,exports[a0_0x3728b0(0x196)]=checkStudioTemplateIsOverLimit;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';const a0_0x5b1db5=a0_0x4f7e;(function(_0xdc1f50,_0x1c1a86){const _0x4f5645=a0_0x4f7e,_0xd8e12c=_0xdc1f50();while(!![]){try{const _0x154141=-parseInt(_0x4f5645(0x148))/0x1+-parseInt(_0x4f5645(0x14b))/0x2*(-parseInt(_0x4f5645(0x140))/0x3)+-parseInt(_0x4f5645(0x155))/0x4+parseInt(_0x4f5645(0x147))/0x5+-parseInt(_0x4f5645(0x14a))/0x6*(-parseInt(_0x4f5645(0x152))/0x7)+-parseInt(_0x4f5645(0x13d))/0x8+parseInt(_0x4f5645(0x144))/0x9;if(_0x154141===_0x1c1a86)break;else _0xd8e12c['push'](_0xd8e12c['shift']());}catch(_0x5b9f19){_0xd8e12c['push'](_0xd8e12c['shift']());}}}(a0_0x40c4,0x8f67f));Object[a0_0x5b1db5(0x154)](exports,'__esModule',{'value':!0x0}),exports[a0_0x5b1db5(0x150)]=void 0x0;function a0_0x40c4(){const _0x4b5aa9=['type-graphql','studioTemplateIsOverLimit','7656PBEtnx','__metadata','Ctx','design:returntype','504090JbbIhk','./tool-permission','studioPermission','4069700NpjvHb','1102485ZMKopt','__param','48KPhyYU','854ynxpSn','Operato\x20Tool\x20Studio\x20Usage\x20Permissions','Arg','prototype','Query','OperatoToolResolver','__decorate','748090aHbeBV','design:paramtypes','defineProperty','234124xktgQR','Operato\x20Tool\x20Studio\x20Limit\x20check','design:type','Resolver','checkStudioTemplateIsOverLimit','8529656Nfciyg'];a0_0x40c4=function(){return _0x4b5aa9;};return a0_0x40c4();}function a0_0x4f7e(_0x150113,_0x284d12){const _0x40c410=a0_0x40c4();return a0_0x4f7e=function(_0x4f7eed,_0x4dec3f){_0x4f7eed=_0x4f7eed-0x13d;let _0x5d781e=_0x40c410[_0x4f7eed];return _0x5d781e;},a0_0x4f7e(_0x150113,_0x284d12);}const tslib_1=require('tslib'),type_graphql_1=require(a0_0x5b1db5(0x13e)),tool_permission_1=require(a0_0x5b1db5(0x145));let OperatoToolResolver=class{async[a0_0x5b1db5(0x146)](_0x2478f5){return(0x0,tool_permission_1['checkStudioPermission'])();}async[a0_0x5b1db5(0x13f)](_0x1e3aeb,_0xcf314b){const _0x250b16=a0_0x5b1db5;return(0x0,tool_permission_1[_0x250b16(0x159)])(_0x1e3aeb,_0xcf314b);}};tslib_1['__decorate']([(0x0,type_graphql_1['Query'])(_0x3366a1=>Boolean,{'description':a0_0x5b1db5(0x14c)}),tslib_1[a0_0x5b1db5(0x149)](0x0,(0x0,type_graphql_1[a0_0x5b1db5(0x142)])()),tslib_1['__metadata'](a0_0x5b1db5(0x157),Function),tslib_1['__metadata'](a0_0x5b1db5(0x153),[Object]),tslib_1[a0_0x5b1db5(0x141)](a0_0x5b1db5(0x143),Promise)],OperatoToolResolver[a0_0x5b1db5(0x14e)],a0_0x5b1db5(0x146),null),tslib_1[a0_0x5b1db5(0x151)]([(0x0,type_graphql_1[a0_0x5b1db5(0x14f)])(_0xa1ce5b=>Boolean,{'description':a0_0x5b1db5(0x156)}),tslib_1[a0_0x5b1db5(0x149)](0x0,(0x0,type_graphql_1[a0_0x5b1db5(0x14d)])('id')),tslib_1[a0_0x5b1db5(0x149)](0x1,(0x0,type_graphql_1[a0_0x5b1db5(0x142)])()),tslib_1[a0_0x5b1db5(0x141)](a0_0x5b1db5(0x157),Function),tslib_1[a0_0x5b1db5(0x141)](a0_0x5b1db5(0x153),[String,Object]),tslib_1[a0_0x5b1db5(0x141)]('design:returntype',Promise)],OperatoToolResolver[a0_0x5b1db5(0x14e)],a0_0x5b1db5(0x13f),null),OperatoToolResolver=tslib_1[a0_0x5b1db5(0x151)]([(0x0,type_graphql_1[a0_0x5b1db5(0x158)])()],OperatoToolResolver),exports[a0_0x5b1db5(0x150)]=OperatoToolResolver;
|