@things-factory/operato-tools 6.1.2 → 6.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/actions/main.js +1 -1
- package/client/pages/generator/button-config-tab-mixin.js +4 -4
- package/client/pages/generator/column-config-tab-mixin.js +4 -4
- package/client/pages/generator/etc-config-tab-mixin.js +4 -4
- package/client/pages/generator/form-config-tab-mixin.js +4 -4
- package/client/pages/generator/graphql-config-tab-mixin.js +24 -24
- package/client/pages/generator/grid-config-tab-mixin.js +22 -22
- package/client/pages/generator/menu-config-tab-mixin.js +11 -11
- package/client/pages/generator/meta-generator-page.js +11 -11
- package/client/pages/generator/search-config-tab-mixin.js +4 -4
- package/client/pages/generator/tab-config-tab-mixin.js +4 -4
- package/client/pages/main.js +4 -4
- package/client/reducers/main.js +1 -1
- package/package.json +3 -3
- package/server/constants/error-code.js +1 -1
- package/server/errors/license-error.js +1 -1
- package/server/routes.js +1 -1
- package/server/service/tool-entity/create-menu.js +1 -1
- package/server/service/tool-entity/create-service.js +1 -1
- package/server/service/tool-secret/tool-permission.js +1 -1
- package/server/service/tool-secret/tool-resolver.js +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x14133c=a0_0x449b;(function(_0x37e88a,_0x377240){const _0x1d04b8=a0_0x449b,_0x487231=_0x37e88a();while(!![]){try{const _0x8f71f2=-parseInt(_0x1d04b8(0x140))/0x1+-parseInt(_0x1d04b8(0x148))/0x2*(parseInt(_0x1d04b8(0x13c))/0x3)+-parseInt(_0x1d04b8(0x146))/0x4+-parseInt(_0x1d04b8(0x145))/0x5*(-parseInt(_0x1d04b8(0x13e))/0x6)+-parseInt(_0x1d04b8(0x143))/0x7+parseInt(_0x1d04b8(0x13b))/0x8+-parseInt(_0x1d04b8(0x144))/0x9*(-parseInt(_0x1d04b8(0x13a))/0xa);if(_0x8f71f2===_0x377240)break;else _0x487231['push'](_0x487231['shift']());}catch(_0x9ab35b){_0x487231['push'](_0x487231['shift']());}}}(a0_0x5c9c,0xa0461));Object[a0_0x14133c(0x13f)](exports,a0_0x14133c(0x141),{'value':!0x0}),exports[a0_0x14133c(0x147)]=void 0x0;function a0_0x5c9c(){const _0x3bacd8=['4760462kxFXqt','9RVgNdY','55RFYqQJ','3677196DTtABu','LicenseError','2JQKJPL','assign','../constants/error-code','21227190yVrhDQ','9197088zTDdxT','3283755GbcLwa','ERROR_CODES','572034ceiHpa','defineProperty','970653mtZnTN','__esModule','errorCode'];a0_0x5c9c=function(){return _0x3bacd8;};return a0_0x5c9c();}const tslib_1=require('tslib'),ERROR_CODES=tslib_1['__importStar'](require(a0_0x14133c(0x139)));function a0_0x449b(_0x2c51a7,_0x548ab7){const _0x5c9cd5=a0_0x5c9c();return a0_0x449b=function(_0x449bbe,_0x439ac0){_0x449bbe=_0x449bbe-0x138;let _0x4b80d1=_0x5c9cd5[_0x449bbe];return _0x4b80d1;},a0_0x449b(_0x2c51a7,_0x548ab7);}class LicenseError extends Error{static get[a0_0x14133c(0x13d)](){const _0x55a1b7=a0_0x14133c;return Object[_0x55a1b7(0x138)]({},ERROR_CODES);}constructor({errorCode:_0x4600cd,detail:_0x399d34}){const _0x45a0d5=a0_0x14133c;super(_0x4600cd),this['name']='license-error',this[_0x45a0d5(0x142)]=_0x4600cd,this['detail']=_0x399d34;}}exports[a0_0x14133c(0x147)]=LicenseError;
|
package/server/routes.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a0_0xdb081c=a0_0x2d4e;function a0_0x5867(){const _0x27f87a=['14402792SdnsXX','1158768ooJFfU','265915ZsuopI','things-factory:operato-tools:routes','24jkkjar','3811689nigbgG','debug','81402gHItkz','bootstrap-module-domain-public-route','250311HyQMLk','6277740QgbZXe','108OpeaHv','bootstrap-module-global-private-route'];a0_0x5867=function(){return _0x27f87a;};return a0_0x5867();}function a0_0x2d4e(_0x484e75,_0x2e6b27){const _0x58672a=a0_0x5867();return a0_0x2d4e=function(_0x2d4ed3,_0x5edaba){_0x2d4ed3=_0x2d4ed3-0x173;let _0x40a2f3=_0x58672a[_0x2d4ed3];return _0x40a2f3;},a0_0x2d4e(_0x484e75,_0x2e6b27);}(function(_0x7eb7b4,_0x39e470){const _0x121dee=a0_0x2d4e,_0x44ee05=_0x7eb7b4();while(!![]){try{const _0xdb5e72=parseInt(_0x121dee(0x178))/0x1+-parseInt(_0x121dee(0x176))/0x2*(parseInt(_0x121dee(0x173))/0x3)+-parseInt(_0x121dee(0x17d))/0x4+parseInt(_0x121dee(0x17e))/0x5*(-parseInt(_0x121dee(0x17a))/0x6)+parseInt(_0x121dee(0x179))/0x7+parseInt(_0x121dee(0x17c))/0x8+-parseInt(_0x121dee(0x174))/0x9;if(_0xdb5e72===_0x39e470)break;else _0x44ee05['push'](_0x44ee05['shift']());}catch(_0x5b98c6){_0x44ee05['push'](_0x44ee05['shift']());}}}(a0_0x5867,0xe8445));const debug=require(a0_0xdb081c(0x175))(a0_0xdb081c(0x17f));process['on']('bootstrap-module-global-public-route',(_0x5c12bb,_0xec40da)=>{}),process['on'](a0_0xdb081c(0x17b),(_0x2ca62e,_0x1eebc5)=>{}),process['on'](a0_0xdb081c(0x177),(_0x44427e,_0x5b7e4d)=>{}),process['on']('bootstrap-module-domain-private-route',(_0x54f824,_0x31937d)=>{});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x59ccf2=a0_0x3aa8;(function(_0x66a81d,_0x2148ce){const _0x115d11=a0_0x3aa8,_0x319a99=_0x66a81d();while(!![]){try{const _0x598605=parseInt(_0x115d11(0x1c4))/0x1*(parseInt(_0x115d11(0x1aa))/0x2)+-parseInt(_0x115d11(0x1ee))/0x3*(-parseInt(_0x115d11(0x1f7))/0x4)+parseInt(_0x115d11(0x1b5))/0x5*(-parseInt(_0x115d11(0x226))/0x6)+parseInt(_0x115d11(0x1db))/0x7+parseInt(_0x115d11(0x1de))/0x8*(-parseInt(_0x115d11(0x1d2))/0x9)+-parseInt(_0x115d11(0x1e3))/0xa+parseInt(_0x115d11(0x20a))/0xb*(parseInt(_0x115d11(0x1c6))/0xc);if(_0x598605===_0x2148ce)break;else _0x319a99['push'](_0x319a99['shift']());}catch(_0x30f3ea){_0x319a99['push'](_0x319a99['shift']());}}}(a0_0x5b33,0x74238));Object['defineProperty'](exports,a0_0x59ccf2(0x1c2),{'value':!0x0}),exports[a0_0x59ccf2(0x1ba)]=void 0x0;function a0_0x3aa8(_0x48f6b0,_0x298278){const _0x5b330b=a0_0x5b33();return a0_0x3aa8=function(_0x3aa873,_0x45f86f){_0x3aa873=_0x3aa873-0x1aa;let _0x1def14=_0x5b330b[_0x3aa873];return _0x1def14;},a0_0x3aa8(_0x48f6b0,_0x298278);}const tslib_1=require('tslib'),type_graphql_1=require('type-graphql'),resource_base_1=require('@things-factory/resource-base'),menu_base_1=require(a0_0x59ccf2(0x1ea)),tool_permission_1=require(a0_0x59ccf2(0x203)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x59ccf2(0x1fb)),{plural:plural}=require(a0_0x59ccf2(0x1e8)),crypto_1=tslib_1[a0_0x59ccf2(0x21a)](require('crypto'));let OperatoToolCreateMenu=class{async[a0_0x59ccf2(0x207)](_0x4d6f89,_0x27e32e,_0x380dbc){const _0x1a6268=a0_0x59ccf2,{domain:_0x510e31,user:_0x429bea,tx:_0x220e0c}=_0x380dbc[_0x1a6268(0x20b)];await(0x0,tool_permission_1[_0x1a6268(0x21d)])('',_0x380dbc);const _0x1771bb=await _0x220e0c[_0x1a6268(0x1ff)](resource_base_1[_0x1a6268(0x1b9)])[_0x1a6268(0x218)]({'where':{'domain':{'id':_0x510e31['id']},'id':_0x4d6f89}}),_0x46a767=await _0x220e0c[_0x1a6268(0x1ff)](resource_base_1[_0x1a6268(0x1d9)])[_0x1a6268(0x1f4)]({'where':{'domain':{'id':_0x510e31['id']},'entity':{'id':_0x1771bb['id']}}});let {name:_0x519885=''}=_0x1771bb||{},_0x334c38=kebabCase(_0x519885),_0x35ad7f=modelTemplate[_0x1a6268(0x21f)](/{{pascalCase name}}/g,startCase(camelCase(_0x519885))[_0x1a6268(0x21f)](/ /g,''))[_0x1a6268(0x21f)](/{{camelCase name}}/g,camelCase(_0x519885))[_0x1a6268(0x21f)](/{{snakeCase name}}/g,snakeCase(_0x519885))[_0x1a6268(0x21f)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x519885)))[_0x1a6268(0x21f)](/ /g,''))['replace'](/{{pluralCamelCase name}}/g,camelCase(plural(_0x519885)))[_0x1a6268(0x21f)](/{{name}}/g,_0x519885),_0x3328e5='';_0x1a6268(0x1f6)==_0x1771bb[_0x1a6268(0x20c)]?_0x3328e5='\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':_0x1a6268(0x1ca)==_0x1771bb[_0x1a6268(0x20c)]&&(_0x3328e5='\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'),_0x35ad7f=_0x35ad7f[_0x1a6268(0x21f)](/{{HistoryButton}}/g,_0x3328e5);let _0x139c61=this[_0x1a6268(0x1bd)](_0x46a767);_0x35ad7f=_0x35ad7f[_0x1a6268(0x21f)](/{{SortColumns}}/g,_0x139c61[_0x1a6268(0x1e6)](','));let _0x146f0e=this[_0x1a6268(0x20f)](_0x46a767);_0x35ad7f=_0x35ad7f['replace'](/{{SearchColumns}}/g,_0x146f0e[_0x1a6268(0x1e6)](','));let _0x59b3c2=this[_0x1a6268(0x1e4)](_0x46a767);return _0x35ad7f=_0x35ad7f[_0x1a6268(0x21f)](/{{GridColumns}}/g,_0x59b3c2[_0x1a6268(0x1e6)](',')),_0x35ad7f=this['enc'](_0x35ad7f),await this[_0x1a6268(0x1ad)](_0x220e0c,_0x510e31,_0x429bea,_0x27e32e,_0x334c38,_0x35ad7f),!0x0;}[a0_0x59ccf2(0x1e4)](_0x349b8e){const _0x35911b=a0_0x59ccf2;return _0x349b8e[_0x35911b(0x1e9)](_0x885feb=>'id'!=_0x885feb[_0x35911b(0x1b4)]&&_0x885feb[_0x35911b(0x1fc)]>0x0)[_0x35911b(0x1d1)](function(_0x5eb2b3,_0x34180a){const _0x3ae654=_0x35911b;return _0x5eb2b3['gridRank']-_0x34180a[_0x3ae654(0x1fc)];})[_0x35911b(0x1ae)](_0xcf678=>{const _0x47a6b2=_0x35911b;let {gridEditor:_0x298c79=_0x47a6b2(0x1bf),name:_0x4bbfa5,term:_0x3f2773,gridWidth:_0xc7d826=0x0,gridAlign:_0x11d0ab=_0x47a6b2(0x201),nullable:_0x46ca72=!0x1}=_0xcf678;if(null==_0x298c79&&(_0x298c79=_0x47a6b2(0x1bf)),null==_0x11d0ab&&(_0x11d0ab='left'),'updater_id'==_0x4bbfa5||_0x47a6b2(0x1cc)==_0x4bbfa5)return _0x4bbfa5=_0x47a6b2(0x1d3)==_0x4bbfa5?_0x47a6b2(0x1b7):'creator',_0x47a6b2(0x208)+_0x4bbfa5+_0x47a6b2(0x1f0)+_0x4bbfa5+_0x47a6b2(0x1af);if(_0x47a6b2(0x221)==_0x4bbfa5||_0x47a6b2(0x211)==_0x4bbfa5)return _0x47a6b2(0x1b2)+(_0x47a6b2(0x221)==_0x4bbfa5?_0x47a6b2(0x1df):'createdAt')+_0x47a6b2(0x1f0)+_0x4bbfa5+_0x47a6b2(0x1cd);let _0x24b09a='readonly'!=_0x298c79&&_0x47a6b2(0x1f2)!=_0x298c79,_0x3efd31=_0x47a6b2(0x1f2)==_0x298c79;0x1!=_0x3efd31&&0x0!=_0x24b09a||(_0x298c79='string');let _0x38220b='{\x22type\x22:\x20\x22'+_0x298c79+_0x47a6b2(0x223)+camelCase(_0x4bbfa5)+_0x47a6b2(0x1f0)+_0x3f2773+_0x47a6b2(0x209)+_0x3efd31+'\x20,\x22editable\x22:\x20'+_0x24b09a+_0x47a6b2(0x1be)+!_0x46ca72+_0x47a6b2(0x1ec)+_0x11d0ab+_0x47a6b2(0x21b)+_0xc7d826+_0x47a6b2(0x1f8);return _0x47a6b2(0x206)==_0xcf678[_0x47a6b2(0x21c)]&&(_0x38220b+=_0x47a6b2(0x220)+_0xcf678[_0x47a6b2(0x1d8)]+'\x22}'),_0x47a6b2(0x1e0)==_0xcf678[_0x47a6b2(0x21c)]&&(_0x38220b+=_0x47a6b2(0x1bb)+_0xcf678[_0x47a6b2(0x1d8)]+'\x22}'),_0x47a6b2(0x1d5)==_0xcf678[_0x47a6b2(0x21c)]&&(_0x38220b+=_0x47a6b2(0x214)+camelCase(plural(_0xcf678[_0x47a6b2(0x1d8)]))+'\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}'),_0x38220b+='}',_0x38220b;});}['createSearchCols'](_0x5460b7){const _0x45c206=a0_0x59ccf2;return _0x5460b7[_0x45c206(0x1e9)](_0x9a78d3=>_0x9a78d3[_0x45c206(0x1fd)]>0x0)[_0x45c206(0x1d1)](function(_0x51518e,_0x313ba9){const _0x34b7af=_0x45c206;return _0x51518e[_0x34b7af(0x1fd)]-_0x313ba9[_0x34b7af(0x1fd)];})[_0x45c206(0x1ae)](_0x3bf96f=>{const _0x23f2d6=_0x45c206;let _0x278adb=_0x3bf96f[_0x23f2d6(0x1b0)];return _0x23f2d6(0x1e9)==_0x278adb?'\x22'+camelCase(_0x3bf96f[_0x23f2d6(0x1b4)])+'\x22':(_0x278adb||(_0x278adb='eq'),_0x23f2d6(0x200)+camelCase(_0x3bf96f[_0x23f2d6(0x1b4)])+_0x23f2d6(0x1cf)+_0x278adb+'\x22}');});}[a0_0x59ccf2(0x1bd)](_0x147e1f){const _0x1234c6=a0_0x59ccf2;return _0x147e1f['filter'](_0x6b55b0=>_0x6b55b0['sortRank']>0x0)[_0x1234c6(0x1d1)](function(_0x327456,_0x4790c5){const _0x5049c7=_0x1234c6;return _0x327456[_0x5049c7(0x1f5)]-_0x4790c5['sortRank'];})[_0x1234c6(0x1ae)](_0x2965bb=>_0x1234c6(0x1dc)+camelCase(_0x2965bb[_0x1234c6(0x1b4)])+_0x1234c6(0x219)+_0x2965bb[_0x1234c6(0x222)]+'}');}async[a0_0x59ccf2(0x1ad)](_0x984560,_0x11103b,_0x2a18e7,_0x20b354,_0x78763,_0x6aa23f){const _0x27b219=a0_0x59ccf2;let _0x1d4c8a=await _0x984560[_0x27b219(0x1ff)](menu_base_1[_0x27b219(0x227)])[_0x27b219(0x218)]({'where':{'domain':{'id':_0x11103b['id']},'id':_0x20b354}}),_0x2ae873=(await _0x984560[_0x27b219(0x1ff)](menu_base_1[_0x27b219(0x227)])[_0x27b219(0x1ac)](_0x27b219(0x205)+_0x20b354+_0x27b219(0x1e2)+_0x20b354+'\x27'))[0x0][_0x27b219(0x1ef)]+0xa,_0x200240=new menu_base_1[(_0x27b219(0x227))]();_0x200240[_0x27b219(0x1b4)]=_0x78763,_0x200240[_0x27b219(0x1f1)]=_0x27b219(0x1c3),_0x200240['category']=_0x27b219(0x216),_0x200240[_0x27b219(0x1ef)]=_0x2ae873,_0x200240[_0x27b219(0x20d)]=!0x1,_0x200240[_0x27b219(0x1b8)]=_0x78763,_0x200240[_0x27b219(0x1b1)]=_0x6aa23f,_0x200240[_0x27b219(0x1e7)]='@things-factory/meta-ui/client/pages/meta-grist-page',_0x200240[_0x27b219(0x1fa)]=_0x1d4c8a,await _0x984560['getRepository'](menu_base_1[_0x27b219(0x227)])[_0x27b219(0x225)](Object[_0x27b219(0x1bc)](Object[_0x27b219(0x1bc)]({},_0x200240),{'domain':_0x11103b,'creator':_0x2a18e7,'updater':_0x2a18e7}));}[a0_0x59ccf2(0x1b6)](_0x434253){const _0x2ce894=a0_0x59ccf2;let _0x4adc50=JSON[_0x2ce894(0x1d4)](_0x434253)[_0x2ce894(0x1d6)](/(.{100})/)['filter'](_0x4bb2a1=>_0x4bb2a1),_0xeb050b=[_0x2ce894(0x1b3),'aes-256-cbc','aes-256-cfb',_0x2ce894(0x1e1),_0x2ce894(0x204),_0x2ce894(0x1eb),_0x2ce894(0x1f9),_0x2ce894(0x213)],_0x2c4278=crypto_1[_0x2ce894(0x1c5)][_0x2ce894(0x1ce)](0x20)[_0x2ce894(0x1dd)](_0x2ce894(0x1c0)),_0x56a36e=Buffer[_0x2ce894(0x224)](_0x2c4278,_0x2ce894(0x1c0)),_0x31a990=_0x2c4278[_0x2ce894(0x217)](0x0,0x10),_0x55aaa3=['',_0x31a990,_0x31a990,_0x31a990,_0x31a990,_0x31a990,_0x31a990,_0x31a990],_0x15d371=0x0,_0x4046b2=[];_0x4046b2['push'](_0x2c4278);for(var _0x12f27e=0x0;_0x12f27e<_0x4adc50[_0x2ce894(0x20e)];_0x12f27e++,_0x15d371++){_0x15d371==_0xeb050b[_0x2ce894(0x20e)]&&(_0x15d371=0x0);let _0x3de308=crypto_1[_0x2ce894(0x1c5)][_0x2ce894(0x1d0)](_0xeb050b[_0x15d371],_0x56a36e,_0x55aaa3[_0x15d371]),_0x244183=_0x3de308[_0x2ce894(0x1c1)](_0x4adc50[_0x12f27e],_0x2ce894(0x202),_0x2ce894(0x1c0));_0x244183+=_0x3de308[_0x2ce894(0x1f3)](_0x2ce894(0x1c0)),_0x4046b2[_0x2ce894(0x21e)](_0x244183);}return _0x4046b2[_0x2ce894(0x1e6)](_0x2ce894(0x1cb));}};tslib_1[a0_0x59ccf2(0x215)]([(0x0,type_graphql_1['Directive'])('@transaction'),(0x0,type_graphql_1[a0_0x59ccf2(0x1ed)])(_0x5677fb=>Boolean,{'description':a0_0x59ccf2(0x1fe)}),tslib_1['__param'](0x0,(0x0,type_graphql_1[a0_0x59ccf2(0x1c9)])('id')),tslib_1[a0_0x59ccf2(0x1e5)](0x1,(0x0,type_graphql_1['Arg'])(a0_0x59ccf2(0x1c7))),tslib_1[a0_0x59ccf2(0x1e5)](0x2,(0x0,type_graphql_1[a0_0x59ccf2(0x210)])()),tslib_1['__metadata'](a0_0x59ccf2(0x1ab),Function),tslib_1[a0_0x59ccf2(0x1da)]('design:paramtypes',[String,String,Object]),tslib_1[a0_0x59ccf2(0x1da)](a0_0x59ccf2(0x212),Promise)],OperatoToolCreateMenu['prototype'],a0_0x59ccf2(0x207),null),OperatoToolCreateMenu=tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x59ccf2(0x1d7)])()],OperatoToolCreateMenu),exports[a0_0x59ccf2(0x1ba)]=OperatoToolCreateMenu;function a0_0x5b33(){const _0x141254=['enc','updater','routing','Entity','OperatoToolCreateMenu',',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22','assign','createSortCols',',\x22mandatory\x22:\x20','string','hex','update','__esModule','SCREEN','56805TormES','default','99732zbgcxF','parent_menu_id','\x0a{\x0a\x20\x20\x22menu\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x22title\x22:\x20\x22{{name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22\x22,\x0a\x20\x20\x20\x20\x20\x20\x22desc\x22:\x20\x22\x22\x0a\x20\x20},\x0a\x20\x20\x22gql\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x22query\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22list_func\x22:\x20\x22{{pluralCamelCase\x20name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22find_one_func\x22:\x22{{camelCase\x20name}}\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x22mutation\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22multiple\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22func\x22:\x22updateMultiple{{pascalCase\x20name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22{{pascalCase\x20name}}Patch\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22delete\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22func\x22:\x22delete{{pluralPascalCase\x20name}}\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20},\x0a\x20\x20\x22button\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22export\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22add\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22delete\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22save\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20],\x0a\x20\x20\x22grid_column\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22string\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22id\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22header\x22:\x20\x22id\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22hidden\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22editable\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22mandatory\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22sortable\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22align\x22:\x20\x22left\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22width\x22:\x200,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22exportable\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20},\x0a{{GridColumns}}\x0a\x20\x20],\x0a\x20\x20\x22grid\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22button\x22:[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{{HistoryButton}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22option\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22mobile_mode\x22:\x20\x22LIST\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22desk_mode\x22:\x20\x22GRID\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22use_row_checker\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22pages\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2020,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2050,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20100,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20300\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22view_mode\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22GRID\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22LIST\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22CARD\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22sorters\x22:\x20[\x0a{{SortColumns}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20]\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x22row\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22multiple_select\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22click\x22:\x20\x22select-row-toggle\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20},\x0a\x20\x20\x22search\x22:\x20[\x0a{{SearchColumns}}\x0a\x20\x20]\x0a}\x0a','Arg','COPY','h1z0q9i9x7q6','creator_id','\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}','randomBytes','\x22,\x22operator\x22:\x20\x22','createCipheriv','sort','340596TbdMXp','updater_id','stringify','entity','split','Resolver','refName','EntityColumn','__metadata','705201YqHLIZ','{\x22name\x22:\x22','toString','80DXkYmB','updatedAt','scenario','aes-256-cfb8','\x27\x20or\x20id\x20=\x20\x27','1823720UOMyac','createGridColumns','__param','join','resourceUrl','pluralize','filter','@things-factory/menu-base','aes-256-ofb',',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22','Mutation','388809bqtnuE','rank','\x22,\x22header\x22:\x20\x22','menuType','hidden','final','find','sortRank','JSON','28MSHeEy','\x20,\x22exportable\x22:\x20true','aes-256-ctr','parent','lodash','gridRank','searchRank','Operato\x20Tool\x20Create\x20Menu','getRepository','{\x22name\x22:\x20\x22','left','utf8','./../tool-secret/tool-permission','aes-256-cfb1','select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27','code','toolCreateMenu','{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22','\x22,\x22hidden\x22:','638NYgmnO','state','dataProp','hiddenFlag','length','createSearchCols','Ctx','created_at','design:returntype','aes256',',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22','__decorate','meta-grist-page','substring','findOne','\x22,\x22desc\x22:','__importDefault','\x22,\x22width\x22:','refType','checkStudioTemplateIsOverLimit','push','replace',',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22','updated_at','reverseSort','\x22,\x22name\x22:\x20\x22','from','save','86766cUoSiw','Menu','10irgcws','design:type','query','createMenuData','map','\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}','searchOper','template','{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22','aes-256-ecb','name','255hZPnEB'];a0_0x5b33=function(){return _0x141254;};return a0_0x5b33();}const modelTemplate=a0_0x59ccf2(0x1c8);
|
|
1
|
+
'use strict';function a0_0x2df7(_0x13c688,_0x2043b1){const _0x333690=a0_0x3336();return a0_0x2df7=function(_0x2df7aa,_0x6ddbf0){_0x2df7aa=_0x2df7aa-0x17f;let _0x471842=_0x333690[_0x2df7aa];return _0x471842;},a0_0x2df7(_0x13c688,_0x2043b1);}const a0_0x2f94fb=a0_0x2df7;(function(_0x285059,_0x1f0a7f){const _0x41712a=a0_0x2df7,_0x211a74=_0x285059();while(!![]){try{const _0x1da6e7=-parseInt(_0x41712a(0x180))/0x1+parseInt(_0x41712a(0x1f2))/0x2+-parseInt(_0x41712a(0x1a9))/0x3+parseInt(_0x41712a(0x19b))/0x4*(parseInt(_0x41712a(0x1be))/0x5)+parseInt(_0x41712a(0x190))/0x6+-parseInt(_0x41712a(0x1c4))/0x7+parseInt(_0x41712a(0x1ef))/0x8;if(_0x1da6e7===_0x1f0a7f)break;else _0x211a74['push'](_0x211a74['shift']());}catch(_0x3a9bc8){_0x211a74['push'](_0x211a74['shift']());}}}(a0_0x3336,0x8a324));Object[a0_0x2f94fb(0x1bf)](exports,a0_0x2f94fb(0x1a1),{'value':!0x0}),exports[a0_0x2f94fb(0x1a7)]=void 0x0;const tslib_1=require(a0_0x2f94fb(0x1b0)),type_graphql_1=require('type-graphql'),resource_base_1=require('@things-factory/resource-base'),menu_base_1=require('@things-factory/menu-base'),tool_permission_1=require(a0_0x2f94fb(0x1e1)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x2f94fb(0x185)),{plural:plural}=require(a0_0x2f94fb(0x1e6)),crypto_1=tslib_1[a0_0x2f94fb(0x1b6)](require(a0_0x2f94fb(0x1a3)));let OperatoToolCreateMenu=class{async[a0_0x2f94fb(0x1c2)](_0x3e3f96,_0x12323b,_0x58abb8){const _0x1f87af=a0_0x2f94fb,{domain:_0x1cc3d3,user:_0x3eec83,tx:_0x319792}=_0x58abb8[_0x1f87af(0x1a4)];await(0x0,tool_permission_1[_0x1f87af(0x1b9)])('',_0x58abb8);const _0x5cc3fa=await _0x319792['getRepository'](resource_base_1[_0x1f87af(0x1ea)])['findOne']({'where':{'domain':{'id':_0x1cc3d3['id']},'id':_0x3e3f96}}),_0x305406=await _0x319792[_0x1f87af(0x1b7)](resource_base_1[_0x1f87af(0x1e5)])['find']({'where':{'domain':{'id':_0x1cc3d3['id']},'entity':{'id':_0x5cc3fa['id']}}});let {name:_0x5c497c=''}=_0x5cc3fa||{},_0x1ec618=kebabCase(_0x5c497c),_0x123aea=modelTemplate['replace'](/{{pascalCase name}}/g,startCase(camelCase(_0x5c497c))[_0x1f87af(0x1bb)](/ /g,''))['replace'](/{{camelCase name}}/g,camelCase(_0x5c497c))[_0x1f87af(0x1bb)](/{{snakeCase name}}/g,snakeCase(_0x5c497c))[_0x1f87af(0x1bb)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x5c497c)))['replace'](/ /g,''))[_0x1f87af(0x1bb)](/{{pluralCamelCase name}}/g,camelCase(plural(_0x5c497c)))[_0x1f87af(0x1bb)](/{{name}}/g,_0x5c497c),_0x149ea0='';_0x1f87af(0x1bd)==_0x5cc3fa['dataProp']?_0x149ea0='\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':_0x1f87af(0x1a0)==_0x5cc3fa[_0x1f87af(0x1cf)]&&(_0x149ea0=_0x1f87af(0x194)),_0x123aea=_0x123aea['replace'](/{{HistoryButton}}/g,_0x149ea0);let _0x314146=this[_0x1f87af(0x1d7)](_0x305406);_0x123aea=_0x123aea[_0x1f87af(0x1bb)](/{{SortColumns}}/g,_0x314146[_0x1f87af(0x18e)](','));let _0x2f9355=this[_0x1f87af(0x1b4)](_0x305406);_0x123aea=_0x123aea['replace'](/{{SearchColumns}}/g,_0x2f9355[_0x1f87af(0x18e)](','));let _0x5a3e74=this[_0x1f87af(0x1c0)](_0x305406);return _0x123aea=_0x123aea[_0x1f87af(0x1bb)](/{{GridColumns}}/g,_0x5a3e74[_0x1f87af(0x18e)](',')),_0x123aea=this['enc'](_0x123aea),await this['createMenuData'](_0x319792,_0x1cc3d3,_0x3eec83,_0x12323b,_0x1ec618,_0x123aea),!0x0;}[a0_0x2f94fb(0x1c0)](_0x4cdee5){const _0x43c5c1=a0_0x2f94fb;return _0x4cdee5['filter'](_0x3220cc=>'id'!=_0x3220cc[_0x43c5c1(0x1ce)]&&_0x3220cc[_0x43c5c1(0x1ee)]>0x0)[_0x43c5c1(0x1a8)](function(_0x325ba7,_0x37b55d){const _0x1edc9e=_0x43c5c1;return _0x325ba7['gridRank']-_0x37b55d[_0x1edc9e(0x1ee)];})['map'](_0x2b78e9=>{const _0x5376c0=_0x43c5c1;let {gridEditor:_0x1ee7f0=_0x5376c0(0x1ac),name:_0x159810,term:_0x2d3437,gridWidth:_0x5b6b1d=0x0,gridAlign:_0x561e4d=_0x5376c0(0x1c1),nullable:_0x230880=!0x1}=_0x2b78e9;if(null==_0x1ee7f0&&(_0x1ee7f0=_0x5376c0(0x1ac)),null==_0x561e4d&&(_0x561e4d=_0x5376c0(0x1c1)),'updater_id'==_0x159810||'creator_id'==_0x159810)return _0x159810='updater_id'==_0x159810?'updater':_0x5376c0(0x19f),_0x5376c0(0x18c)+_0x159810+'\x22,\x22header\x22:\x20\x22'+_0x159810+_0x5376c0(0x195);if(_0x5376c0(0x181)==_0x159810||_0x5376c0(0x188)==_0x159810)return _0x5376c0(0x1df)+(_0x5376c0(0x181)==_0x159810?_0x5376c0(0x1af):_0x5376c0(0x1ec))+'\x22,\x22header\x22:\x20\x22'+_0x159810+'\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}';let _0x2fb581=_0x5376c0(0x191)!=_0x1ee7f0&&_0x5376c0(0x1d0)!=_0x1ee7f0,_0xf9bd30=_0x5376c0(0x1d0)==_0x1ee7f0;0x1!=_0xf9bd30&&0x0!=_0x2fb581||(_0x1ee7f0=_0x5376c0(0x1ac));let _0x2f138e=_0x5376c0(0x18b)+_0x1ee7f0+'\x22,\x22name\x22:\x20\x22'+camelCase(_0x159810)+'\x22,\x22header\x22:\x20\x22'+_0x2d3437+_0x5376c0(0x1e0)+_0xf9bd30+_0x5376c0(0x19a)+_0x2fb581+_0x5376c0(0x1d2)+!_0x230880+_0x5376c0(0x1de)+_0x561e4d+_0x5376c0(0x1e4)+_0x5b6b1d+_0x5376c0(0x1ed);return _0x5376c0(0x19d)==_0x2b78e9[_0x5376c0(0x1b2)]&&(_0x2f138e+=_0x5376c0(0x1e7)+_0x2b78e9[_0x5376c0(0x1d8)]+'\x22}'),_0x5376c0(0x199)==_0x2b78e9[_0x5376c0(0x1b2)]&&(_0x2f138e+=',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22'+_0x2b78e9[_0x5376c0(0x1d8)]+'\x22}'),'entity'==_0x2b78e9[_0x5376c0(0x1b2)]&&(_0x2f138e+=',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22'+camelCase(plural(_0x2b78e9[_0x5376c0(0x1d8)]))+_0x5376c0(0x1b8)),_0x2f138e+='}',_0x2f138e;});}[a0_0x2f94fb(0x1b4)](_0x15c872){const _0x5b3876=a0_0x2f94fb;return _0x15c872['filter'](_0x2a97e2=>_0x2a97e2['searchRank']>0x0)[_0x5b3876(0x1a8)](function(_0x42ebb4,_0x19159c){const _0x279f21=_0x5b3876;return _0x42ebb4[_0x279f21(0x18a)]-_0x19159c[_0x279f21(0x18a)];})['map'](_0x496362=>{const _0x4c4814=_0x5b3876;let _0x56347b=_0x496362[_0x4c4814(0x1c7)];return'filter'==_0x56347b?'\x22'+camelCase(_0x496362[_0x4c4814(0x1ce)])+'\x22':(_0x56347b||(_0x56347b='eq'),_0x4c4814(0x1dc)+camelCase(_0x496362[_0x4c4814(0x1ce)])+_0x4c4814(0x1eb)+_0x56347b+'\x22}');});}[a0_0x2f94fb(0x1d7)](_0x48de48){const _0x13fdee=a0_0x2f94fb;return _0x48de48['filter'](_0x5acad2=>_0x5acad2[_0x13fdee(0x1f0)]>0x0)[_0x13fdee(0x1a8)](function(_0x57bb90,_0x17d5db){const _0x533e97=_0x13fdee;return _0x57bb90[_0x533e97(0x1f0)]-_0x17d5db[_0x533e97(0x1f0)];})[_0x13fdee(0x1ab)](_0x244f39=>'{\x22name\x22:\x22'+camelCase(_0x244f39[_0x13fdee(0x1ce)])+_0x13fdee(0x1d3)+_0x244f39[_0x13fdee(0x1c5)]+'}');}async['createMenuData'](_0x26ede1,_0x337463,_0x387cd5,_0x228320,_0x2f9f98,_0x36258d){const _0x27fc4b=a0_0x2f94fb;let _0x1acc5a=await _0x26ede1[_0x27fc4b(0x1b7)](menu_base_1[_0x27fc4b(0x182)])[_0x27fc4b(0x1a6)]({'where':{'domain':{'id':_0x337463['id']},'id':_0x228320}}),_0x3d7f49=(await _0x26ede1[_0x27fc4b(0x1b7)](menu_base_1[_0x27fc4b(0x182)])['query'](_0x27fc4b(0x1b1)+_0x228320+_0x27fc4b(0x197)+_0x228320+'\x27'))[0x0][_0x27fc4b(0x187)]+0xa,_0x2a03f0=new menu_base_1['Menu']();_0x2a03f0[_0x27fc4b(0x1ce)]=_0x2f9f98,_0x2a03f0[_0x27fc4b(0x189)]=_0x27fc4b(0x1ba),_0x2a03f0[_0x27fc4b(0x1e3)]=_0x27fc4b(0x1a2),_0x2a03f0[_0x27fc4b(0x187)]=_0x3d7f49,_0x2a03f0['hiddenFlag']=!0x1,_0x2a03f0[_0x27fc4b(0x196)]=_0x2f9f98,_0x2a03f0[_0x27fc4b(0x1d6)]=_0x36258d,_0x2a03f0['resourceUrl']=_0x27fc4b(0x1e9),_0x2a03f0[_0x27fc4b(0x1e8)]=_0x1acc5a,await _0x26ede1[_0x27fc4b(0x1b7)](menu_base_1['Menu'])['save'](Object[_0x27fc4b(0x1f4)](Object[_0x27fc4b(0x1f4)]({},_0x2a03f0),{'domain':_0x337463,'creator':_0x387cd5,'updater':_0x387cd5}));}[a0_0x2f94fb(0x1da)](_0x13dbd3){const _0x41ff8e=a0_0x2f94fb;let _0x146861=JSON[_0x41ff8e(0x1c3)](_0x13dbd3)['split'](/(.{100})/)['filter'](_0x537e12=>_0x537e12),_0x1b1d14=[_0x41ff8e(0x1cd),_0x41ff8e(0x19c),_0x41ff8e(0x18f),_0x41ff8e(0x1f1),_0x41ff8e(0x1c6),_0x41ff8e(0x18d),_0x41ff8e(0x1cb),_0x41ff8e(0x1d9)],_0x3d433c=crypto_1[_0x41ff8e(0x1c9)]['randomBytes'](0x20)[_0x41ff8e(0x1f3)](_0x41ff8e(0x184)),_0x502c35=Buffer[_0x41ff8e(0x19e)](_0x3d433c,_0x41ff8e(0x184)),_0xa0a9a1=_0x3d433c[_0x41ff8e(0x1cc)](0x0,0x10),_0x1c14ae=['',_0xa0a9a1,_0xa0a9a1,_0xa0a9a1,_0xa0a9a1,_0xa0a9a1,_0xa0a9a1,_0xa0a9a1],_0x11b048=0x0,_0x5d6c45=[];_0x5d6c45[_0x41ff8e(0x1b5)](_0x3d433c);for(var _0x2528ec=0x0;_0x2528ec<_0x146861[_0x41ff8e(0x1d4)];_0x2528ec++,_0x11b048++){_0x11b048==_0x1b1d14[_0x41ff8e(0x1d4)]&&(_0x11b048=0x0);let _0x24d0b0=crypto_1['default'][_0x41ff8e(0x1d1)](_0x1b1d14[_0x11b048],_0x502c35,_0x1c14ae[_0x11b048]),_0x48c604=_0x24d0b0[_0x41ff8e(0x1dd)](_0x146861[_0x2528ec],_0x41ff8e(0x186),_0x41ff8e(0x184));_0x48c604+=_0x24d0b0[_0x41ff8e(0x1e2)](_0x41ff8e(0x184)),_0x5d6c45['push'](_0x48c604);}return _0x5d6c45[_0x41ff8e(0x18e)](_0x41ff8e(0x1c8));}};function a0_0x3336(){const _0x3eee4b=['utf8','rank','created_at','menuType','searchRank','{\x22type\x22:\x20\x22','{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22','aes-256-ofb','join','aes-256-cfb','3866094oHhkjp','readonly','Mutation','__param','\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22basic\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22label\x22:\x20\x22data_history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22icon\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22logic\x22:\x20\x22history_copy\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20','\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}','routing','\x27\x20or\x20id\x20=\x20\x27','Operato\x20Tool\x20Create\x20Menu','scenario','\x20,\x22editable\x22:\x20','20516zKmhxD','aes-256-cbc','code','from','creator','COPY','__esModule','meta-grist-page','crypto','state','__decorate','findOne','OperatoToolCreateMenu','sort','2224191FINcpu','\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','map','string','design:type','parent_menu_id','updatedAt','tslib','select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27','refType','Directive','createSearchCols','push','__importDefault','getRepository','\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}','checkStudioTemplateIsOverLimit','SCREEN','replace','Arg','JSON','45wogXjK','defineProperty','createGridColumns','left','toolCreateMenu','stringify','3350480CSCgei','reverseSort','aes-256-cfb1','searchOper','h1z0q9i9x7q6','default','design:paramtypes','aes-256-ctr','substring','aes-256-ecb','name','dataProp','hidden','createCipheriv',',\x22mandatory\x22:\x20','\x22,\x22desc\x22:','length','design:returntype','template','createSortCols','refName','aes256','enc','@transaction','{\x22name\x22:\x20\x22','update',',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22','{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22','\x22,\x22hidden\x22:','./../tool-secret/tool-permission','final','category','\x22,\x22width\x22:','EntityColumn','pluralize',',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22','parent','@things-factory/meta-ui/client/pages/meta-grist-page','Entity','\x22,\x22operator\x22:\x20\x22','createdAt','\x20,\x22exportable\x22:\x20true','gridRank','11384000SZTZEJ','sortRank','aes-256-cfb8','103582wiytGD','toString','assign','prototype','379212QoNkdl','updated_at','Menu','__metadata','hex','lodash'];a0_0x3336=function(){return _0x3eee4b;};return a0_0x3336();}tslib_1[a0_0x2f94fb(0x1a5)]([(0x0,type_graphql_1[a0_0x2f94fb(0x1b3)])(a0_0x2f94fb(0x1db)),(0x0,type_graphql_1[a0_0x2f94fb(0x192)])(_0x1ad6c9=>Boolean,{'description':a0_0x2f94fb(0x198)}),tslib_1[a0_0x2f94fb(0x193)](0x0,(0x0,type_graphql_1[a0_0x2f94fb(0x1bc)])('id')),tslib_1[a0_0x2f94fb(0x193)](0x1,(0x0,type_graphql_1['Arg'])(a0_0x2f94fb(0x1ae))),tslib_1[a0_0x2f94fb(0x193)](0x2,(0x0,type_graphql_1['Ctx'])()),tslib_1[a0_0x2f94fb(0x183)](a0_0x2f94fb(0x1ad),Function),tslib_1['__metadata'](a0_0x2f94fb(0x1ca),[String,String,Object]),tslib_1[a0_0x2f94fb(0x183)](a0_0x2f94fb(0x1d5),Promise)],OperatoToolCreateMenu[a0_0x2f94fb(0x17f)],'toolCreateMenu',null),OperatoToolCreateMenu=tslib_1[a0_0x2f94fb(0x1a5)]([(0x0,type_graphql_1['Resolver'])()],OperatoToolCreateMenu),exports[a0_0x2f94fb(0x1a7)]=OperatoToolCreateMenu;const modelTemplate=a0_0x2f94fb(0x1aa);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x50dfcb=a0_0x33e2;(function(_0x195df3,_0x3f7a54){const _0x500188=a0_0x33e2,_0x5942f4=_0x195df3();while(!![]){try{const _0x13d5b3=-parseInt(_0x500188(0x114))/0x1+-parseInt(_0x500188(0xca))/0x2+-parseInt(_0x500188(0x10d))/0x3*(-parseInt(_0x500188(0xcf))/0x4)+-parseInt(_0x500188(0x118))/0x5+parseInt(_0x500188(0x11e))/0x6*(parseInt(_0x500188(0xb3))/0x7)+-parseInt(_0x500188(0x112))/0x8*(parseInt(_0x500188(0xcd))/0x9)+parseInt(_0x500188(0xad))/0xa;if(_0x13d5b3===_0x3f7a54)break;else _0x5942f4['push'](_0x5942f4['shift']());}catch(_0x41c395){_0x5942f4['push'](_0x5942f4['shift']());}}}(a0_0x18d3,0x8eaca));function a0_0x33e2(_0x5155fb,_0x260e23){const _0x18d335=a0_0x18d3();return a0_0x33e2=function(_0x33e27e,_0x45f5f8){_0x33e27e=_0x33e27e-0xa1;let _0x564f31=_0x18d335[_0x33e27e];return _0x564f31;},a0_0x33e2(_0x5155fb,_0x260e23);}function a0_0x18d3(){const _0x32923b=['filter','design:paramtypes','Resolvers,\x20subscribers\x20as\x20','@Column({name:\x27','14766230uHhPEw','{{camelCase\x20name}}.','findOne','sort','length','@things-factory/shell','161GIFyFS','-mutation.ts','export\x20*\x20from\x20\x27./','tableName','JSON','split','\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','map','character\x20varying','pascalCaseName','\x20{\x20nullable:\x20','\x0aimport\x20{\x20Resolver,\x20Mutation,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20In\x20}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20New{{pascalCase\x20name}},\x20{{pascalCase\x20name}}Patch\x20}\x20from\x20\x27./{{name}}-type\x27\x0aimport\x20{\x20getRepository\x20}\x20from\x20\x27@things-factory/shell\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Mutation\x20{\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20create\x20new\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20create{{pascalCase\x20name}}(@Arg(\x27{{camelCase\x20name}}\x27)\x20{{camelCase\x20name}}:\x20New{{pascalCase\x20name}},\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20return\x20await\x20tx.getRepository({{pascalCase\x20name}}).save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20modify\x20{{pascalCase\x20name}}\x20information\x27\x20})\x0a\x20\x20async\x20update{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27id\x27)\x20id:\x20string,\x0a\x20\x20\x20\x20@Arg(\x27patch\x27)\x20patch:\x20{{pascalCase\x20name}}Patch,\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20repository\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20repository.findOne(\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20)\x0a\x0a\x20\x20\x20\x20return\x20await\x20repository.save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20...patch,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20[{{pascalCase\x20name}}],\x20{\x20description:\x20\x22To\x20modify\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20information\x22\x20})\x0a\x20\x20async\x20updateMultiple{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27patches\x27,\x20type\x20=>\x20[{{pascalCase\x20name}}Patch])\x20patches:\x20{{pascalCase\x20name}}Patch[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}[]>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20results\x20=\x20[]\x0a\x20\x20\x20\x20const\x20_createRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27+\x27)\x0a\x20\x20\x20\x20const\x20_updateRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27M\x27)\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}Repo\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x0a\x20\x20\x20\x20if\x20(_createRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_createRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20newRecord\x20=\x20_createRecords[i]\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...newRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27+\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20if\x20(_updateRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_updateRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20updRecord\x20=\x20_updateRecords[i]\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20{{camelCase\x20name}}Repo.findOne({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id:updRecord.id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...updRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27M\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20return\x20results\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20delete{{pascalCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove({\x20domain,\x20id,\x20updater:user\x20})\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20multiple\x20{{camelCase\x20name}}s\x27\x20})\x0a\x20\x20async\x20delete{{pluralPascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27ids\x27,\x20type\x20=>\x20[String])\x20ids:\x20string[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20delEntitis\x20=\x20ids.map(id=>{\x0a\x20\x20\x20\x20\x20\x20return\x20{domain,id,updater:user}\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove(delEntitis)\x0a\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a}\x0a','type-graphql','replaceNamesMap','decimal','find','created_at','uniqRank','type\x20=>','pluralPascalCaseName','\x27,\x20type:\x20\x27','includes','createTypeText','1726342auxLsO','Ctx','createEntityText','27kRyDaT','join','12cREIJv','\x27,\x20nullable:\x20','@things-factory/resource-base','packages','design:type','nullable','timestamp\x20without\x20time\x20zone','\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','/event-subscriber.ts','Resolver','\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','camelCaseName','__decorate','getFieldType','long','...','\x20})','createHistoryServiceFiles',',length:','createNoHistoryServiceFiels','existsSync','-query.ts','double','PWD','creator','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','float','.ts','-history-type.ts','domain','text','Arg','EntitySubscribers\x20}\x20from\x20\x27./','colType','__esModule','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','creator_id','createHistoryEntityText','\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','snakeCaseName','\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','EntityColumn','existsPath','domain_id','Int','integer','pluralCamelCaseName','updater_id','\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','index.ts','readFileSync','Resolvers,','indexOf','Resolvers\x20}\x20from\x20\x27./','dataProp','number','Date','writeFile','\x0a\x20\x20','createServicePath','getProjectRootPath','createServiceFiles','950757dgUjCu','import\x20{\x20entities\x20as\x20','\x0aimport\x20{\x20ObjectType,\x20Field,\x20InputType,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@InputType()\x0aexport\x20class\x20New{{pascalCase\x20name}}\x20{\x0a{{newTypeColumns}}\x0a}\x0a\x0a@InputType()\x0aexport\x20class\x20{{pascalCase\x20name}}Patch\x20{\x0a\x20\x20@Field(type\x20=>\x20ID,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20id?:\x20string\x0a\x0a{{patchTypeColumns}}\x0a\x0a\x20\x20@Field()\x0a\x20\x20cuFlag:\x20string\x0a}\x0a\x0a@ObjectType()\x0aexport\x20class\x20{{pascalCase\x20name}}List\x20{\x0a\x20\x20@Field(type\x20=>\x20[{{pascalCase\x20name}}])\x0a\x20\x20items:\x20{{pascalCase\x20name}}[]\x0a\x0a\x20\x20@Field(type\x20=>\x20Int)\x0a\x20\x20total:\x20number\x0a}\x0a','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\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','name','2622792jFWldR','toolCreateService','822506zalIpQ','/index.ts','-history\x27','tslib','397855QzWzjn','replace','Entity','/packages/','getRepository','updater','236298OgrIlm','date','__param','__metadata','datetime','updated_at','createDir','\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','bigint','utf8','EntitySubscribers,','Float','COPY','pluralize','-type.ts','\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\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','@Field(','/*\x20ENTITIES\x20*/\x0a\x09...','env','getColTxtType','rank','string','push','Operato\x20Tool\x20Create\x20Service','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','Entities,','OperatoToolCreateService','lodash','Entities,\x20resolvers\x20as\x20'];a0_0x18d3=function(){return _0x32923b;};return a0_0x18d3();}Object['defineProperty'](exports,a0_0x50dfcb(0xf1),{'value':!0x0}),exports[a0_0x50dfcb(0xa6)]=void 0x0;const tslib_1=require(a0_0x50dfcb(0x117)),type_graphql_1=require(a0_0x50dfcb(0xbf)),shell_1=require(a0_0x50dfcb(0xb2)),resource_base_1=require(a0_0x50dfcb(0xd1)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x50dfcb(0xa7)),{plural:plural}=require(a0_0x50dfcb(0x12b)),fs=require('fs');let OperatoToolCreateService=class{async[a0_0x50dfcb(0x113)](_0x1e379e,_0xb21a33){const _0x350f59=a0_0x50dfcb,{domain:_0x2b547c}=_0xb21a33['state'],_0x2ec53e=await(0x0,shell_1[_0x350f59(0x11c)])(resource_base_1[_0x350f59(0x11a)])[_0x350f59(0xaf)]({'where':{'id':_0x1e379e}}),_0x4f444b=await(0x0,shell_1['getRepository'])(resource_base_1[_0x350f59(0xf8)])[_0x350f59(0xc2)]({'where':{'domain':{'id':_0x2b547c['id']},'entity':{'id':_0x2ec53e['id']}}});let {name:_0x47145d='',bundle:_0x225158=''}=_0x2ec53e||{},_0x1fd901=this[_0x350f59(0x10b)](),_0x1d9d9b=kebabCase(_0x47145d);return await this[_0x350f59(0x10a)](_0x1fd901,_0x225158,_0x1d9d9b),await this[_0x350f59(0x10c)](_0x1fd901,_0x225158,_0x47145d,_0x1d9d9b,_0x2ec53e,_0x4f444b),!0x0;}async[a0_0x50dfcb(0x10c)](_0x5182a7,_0x5b779c,_0x58c422,_0x3eeb9a,_0x323d67,_0x2af6f5){const _0x19167f=a0_0x50dfcb;let _0x5e2df6={'name':_0x3eeb9a,'tableName':_0x323d67[_0x19167f(0xb6)],'pascalCaseName':startCase(camelCase(_0x58c422))[_0x19167f(0x119)](/ /g,''),'camelCaseName':camelCase(_0x58c422),'snakeCaseName':snakeCase(_0x58c422),'pluralPascalCaseName':startCase(camelCase(plural(_0x58c422)))[_0x19167f(0x119)](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x58c422))},_0x2feb97=_0x5182a7+_0x19167f(0x11b)+_0x5b779c+'/server/service/';['JSON','COPY'][_0x19167f(0xc8)](_0x323d67[_0x19167f(0x105)])?await this[_0x19167f(0xe0)](_0x2feb97,_0x3eeb9a,_0x323d67,_0x2af6f5,_0x5e2df6):await this[_0x19167f(0xe2)](_0x2feb97,_0x3eeb9a,_0x323d67,_0x2af6f5,_0x5e2df6);}async['createHistoryServiceFiles'](_0x1f90bb,_0x2f6f24,_0x48f73a,_0x1dedb2,_0x25cc46){const _0x120010=a0_0x50dfcb;await this[_0x120010(0x108)](_0x1f90bb+(_0x2f6f24+_0x120010(0x115)),serviceHistoryIndex,_0x25cc46);let _0x3504e7=this[_0x120010(0xcc)](_0x48f73a,_0x1dedb2);await this[_0x120010(0x108)](_0x1f90bb+(_0x2f6f24+'/'+_0x2f6f24+_0x120010(0xea)),_0x3504e7,_0x25cc46),await this[_0x120010(0x108)](_0x1f90bb+(_0x2f6f24+'/'+_0x2f6f24+_0x120010(0xe4)),serviceQuery,_0x25cc46),await this[_0x120010(0x108)](_0x1f90bb+(_0x2f6f24+'/'+_0x2f6f24+_0x120010(0xb4)),serviceMutation,_0x25cc46);let _0x355277=this[_0x120010(0xc9)](_0x1dedb2);await this['writeFile'](_0x1f90bb+(_0x2f6f24+'/'+_0x2f6f24+_0x120010(0x12c)),_0x355277,_0x25cc46);let _0xd96ae0=this['createHistoryEntityText'](_0x48f73a,_0x1dedb2);await this[_0x120010(0x108)](_0x1f90bb+(_0x2f6f24+'/'+_0x2f6f24+'-history.ts'),_0xd96ae0,_0x25cc46);let _0x308f33='';'JSON'==_0x48f73a[_0x120010(0x105)]?(_0x308f33=_0x120010(0xf7),await this[_0x120010(0x108)](_0x1f90bb+(_0x2f6f24+_0x120010(0xd7)),serviceEntitySubscriber,_0x25cc46)):_0x308f33='';let _0x49465d=serviceEntitySubscriber[_0x120010(0x119)](/{{entityToJson}}/g,_0x308f33);await this[_0x120010(0x108)](_0x1f90bb+(_0x2f6f24+_0x120010(0xd7)),_0x49465d,_0x25cc46),await this[_0x120010(0x108)](_0x1f90bb+(_0x2f6f24+'/'+_0x2f6f24+'-history-query.ts'),serviceHistoryQuery,_0x25cc46),await this[_0x120010(0x108)](_0x1f90bb+(_0x2f6f24+'/'+_0x2f6f24+_0x120010(0xeb)),sereviceHistoryType,_0x25cc46);let _0x476cfd=_0x1f90bb+_0x120010(0x100);0x0==await this[_0x120010(0xf9)](_0x476cfd)&&await this[_0x120010(0x108)](_0x476cfd,allIndex,_0x25cc46);let _0x324980=await fs[_0x120010(0x101)](_0x476cfd,'utf8');_0x324980['indexOf']('export\x20*\x20from\x20\x27./'+_0x25cc46[_0x120010(0x111)]+'/'+_0x25cc46[_0x120010(0x111)]+_0x120010(0x116))<0x0&&(_0x324980=_0x324980[_0x120010(0x119)](/\/\* EXPORT ENTITY TYPES \*\//,_0x120010(0xe8)+_0x25cc46[_0x120010(0x111)]+'/'+_0x25cc46[_0x120010(0x111)]+'-history\x27')),_0x324980[_0x120010(0x103)]('export\x20*\x20from\x20\x27./'+_0x25cc46['name']+'/'+_0x25cc46[_0x120010(0x111)]+'\x27')<0x0&&(_0x324980=_0x324980[_0x120010(0x119)](/\/\* EXPORT ENTITY TYPES \*\//,_0x120010(0xe8)+_0x25cc46[_0x120010(0x111)]+'/'+_0x25cc46[_0x120010(0x111)]+'\x27')),_0x324980[_0x120010(0x103)](_0x120010(0x10e)+_0x25cc46[_0x120010(0xbc)]+'Entities,\x20resolvers\x20as\x20'+_0x25cc46[_0x120010(0xbc)]+_0x120010(0xab)+_0x25cc46[_0x120010(0xbc)]+_0x120010(0xef)+_0x25cc46['name']+'\x27')<0x0&&(_0x324980=_0x324980['replace'](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x120010(0xa4)+_0x25cc46[_0x120010(0xbc)]+_0x120010(0xa8)+_0x25cc46[_0x120010(0xbc)]+_0x120010(0xab)+_0x25cc46[_0x120010(0xbc)]+_0x120010(0xef)+_0x25cc46[_0x120010(0x111)]+'\x27')),_0x324980['indexOf'](_0x120010(0xde)+_0x25cc46[_0x120010(0xbc)]+_0x120010(0xa5))<0x0&&(_0x324980=_0x324980[_0x120010(0x119)](/\/\* ENTITIES \*\//,_0x120010(0x12f)+_0x25cc46[_0x120010(0xbc)]+'Entities,')),_0x324980['indexOf'](_0x120010(0xde)+_0x25cc46[_0x120010(0xbc)]+_0x120010(0x102))<0x0&&(_0x324980=_0x324980['replace'](/\/\* RESOLVER CLASSES \*\//,_0x120010(0xf2)+_0x25cc46[_0x120010(0xbc)]+_0x120010(0x102))),_0x324980[_0x120010(0x103)](_0x120010(0xde)+_0x25cc46[_0x120010(0xbc)]+'EntitySubscribers,')<0x0&&(_0x324980=_0x324980['replace'](/\/\* SUBSCRIBERS \*\//,'/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...'+_0x25cc46[_0x120010(0xbc)]+_0x120010(0x128))),await this['writeFile'](_0x476cfd,_0x324980,_0x25cc46);}async['createNoHistoryServiceFiels'](_0x21ce92,_0x362d37,_0x334d94,_0x53d84d,_0x4553a0){const _0x283450=a0_0x50dfcb;await this[_0x283450(0x108)](_0x21ce92+(_0x362d37+_0x283450(0x115)),serviceIndex,_0x4553a0),await this[_0x283450(0x108)](_0x21ce92+(_0x362d37+'/'+_0x362d37+_0x283450(0xe4)),serviceQuery,_0x4553a0),await this[_0x283450(0x108)](_0x21ce92+(_0x362d37+'/'+_0x362d37+_0x283450(0xb4)),serviceMutation,_0x4553a0);let _0x2e26e8=this[_0x283450(0xcc)](_0x334d94,_0x53d84d);await this[_0x283450(0x108)](_0x21ce92+(_0x362d37+'/'+_0x362d37+_0x283450(0xea)),_0x2e26e8,_0x4553a0);let _0x398841=this[_0x283450(0xc9)](_0x53d84d);await this[_0x283450(0x108)](_0x21ce92+(_0x362d37+'/'+_0x362d37+_0x283450(0x12c)),_0x398841,_0x4553a0);let _0x27671c=_0x21ce92+_0x283450(0x100);0x0==await this['existsPath'](_0x27671c)&&await this[_0x283450(0x108)](_0x27671c,allIndex,_0x4553a0);let _0x3d1cfe=await fs['readFileSync'](_0x27671c,_0x283450(0x127));_0x3d1cfe[_0x283450(0x103)](_0x283450(0xb5)+_0x4553a0[_0x283450(0x111)]+'/'+_0x4553a0[_0x283450(0x111)]+'\x27')<0x0&&(_0x3d1cfe=_0x3d1cfe['replace'](/\/\* EXPORT ENTITY TYPES \*\//,_0x283450(0xe8)+_0x4553a0['name']+'/'+_0x4553a0[_0x283450(0x111)]+'\x27')),_0x3d1cfe[_0x283450(0x103)](_0x283450(0x10e)+_0x4553a0['pascalCaseName']+_0x283450(0xa8)+_0x4553a0['pascalCaseName']+'Resolvers\x20}\x20from\x20\x27./'+_0x4553a0[_0x283450(0x111)]+'\x27')<0x0&&(_0x3d1cfe=_0x3d1cfe[_0x283450(0x119)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,'/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20'+_0x4553a0[_0x283450(0xbc)]+_0x283450(0xa8)+_0x4553a0['pascalCaseName']+_0x283450(0x104)+_0x4553a0['name']+'\x27')),_0x3d1cfe[_0x283450(0x103)](_0x283450(0xde)+_0x4553a0[_0x283450(0xbc)]+_0x283450(0xa5))<0x0&&(_0x3d1cfe=_0x3d1cfe[_0x283450(0x119)](/\/\* ENTITIES \*\//,_0x283450(0x12f)+_0x4553a0['pascalCaseName']+'Entities,')),_0x3d1cfe[_0x283450(0x103)](_0x283450(0xde)+_0x4553a0[_0x283450(0xbc)]+'Resolvers,')<0x0&&(_0x3d1cfe=_0x3d1cfe[_0x283450(0x119)](/\/\* RESOLVER CLASSES \*\//,_0x283450(0xf2)+_0x4553a0[_0x283450(0xbc)]+_0x283450(0x102))),await this['writeFile'](_0x27671c,_0x3d1cfe,_0x4553a0);}[a0_0x50dfcb(0xc9)](_0x539fdb){const _0x57e038=a0_0x50dfcb;let _0x531a6b=sereviceType,_0x3a3ecb=_0x539fdb[_0x57e038(0xba)](_0x2662ee=>{const _0x5b7e0f=_0x57e038;if('id'==_0x2662ee[_0x5b7e0f(0x111)])return'';if(_0x5b7e0f(0xfa)==_0x2662ee[_0x5b7e0f(0x111)])return'';if(_0x5b7e0f(0xc3)==_0x2662ee[_0x5b7e0f(0x111)])return'';if(_0x5b7e0f(0x123)==_0x2662ee[_0x5b7e0f(0x111)])return'';if(_0x5b7e0f(0xf3)==_0x2662ee[_0x5b7e0f(0x111)])return'';if(_0x5b7e0f(0xfe)==_0x2662ee[_0x5b7e0f(0x111)])return'';let _0x381230=this['getFieldType'](_0x2662ee),_0x22e10a=this[_0x5b7e0f(0x131)](_0x2662ee),_0x5a9154=camelCase(_0x2662ee['name']);return'\x20\x20'+(_0x5b7e0f(0x12e)+(0x0==_0x381230[_0x5b7e0f(0xb1)]?'':_0x5b7e0f(0xc5)+_0x381230+',')+_0x5b7e0f(0xbd)+_0x2662ee[_0x5b7e0f(0xd4)]+_0x5b7e0f(0xdf))+_0x5b7e0f(0x109)+(''+_0x5a9154+(_0x2662ee[_0x5b7e0f(0xd4)]?'?':'')+':\x20'+_0x22e10a)+'\x0a';});_0x531a6b=_0x531a6b[_0x57e038(0x119)](/{{newTypeColumns}}/g,_0x3a3ecb['join']('\x0a'));let _0x5f598d=_0x539fdb[_0x57e038(0xba)](_0x4ba937=>{const _0x11efeb=_0x57e038;if('id'==_0x4ba937[_0x11efeb(0x111)])return'';if(_0x11efeb(0xfa)==_0x4ba937[_0x11efeb(0x111)])return'';if('created_at'==_0x4ba937['name'])return'';if(_0x11efeb(0x123)==_0x4ba937[_0x11efeb(0x111)])return'';if(_0x11efeb(0xf3)==_0x4ba937[_0x11efeb(0x111)])return'';if('updater_id'==_0x4ba937[_0x11efeb(0x111)])return'';let _0x38c0ba=this[_0x11efeb(0xdc)](_0x4ba937),_0x545036=this[_0x11efeb(0x131)](_0x4ba937);_0x4ba937[_0x11efeb(0xd4)]=!0x0;let _0x4584fb=camelCase(_0x4ba937[_0x11efeb(0x111)]);return'\x20\x20'+(_0x11efeb(0x12e)+(0x0==_0x38c0ba[_0x11efeb(0xb1)]?'':_0x11efeb(0xc5)+_0x38c0ba+',')+_0x11efeb(0xbd)+_0x4ba937[_0x11efeb(0xd4)]+_0x11efeb(0xdf))+_0x11efeb(0x109)+(''+_0x4584fb+(_0x4ba937[_0x11efeb(0xd4)]?'?':'')+':\x20'+_0x545036)+'\x0a';});return _0x531a6b=_0x531a6b[_0x57e038(0x119)](/{{patchTypeColumns}}/g,_0x5f598d['join']('\x0a')),_0x531a6b;}['createEntityText'](_0x1520fe,_0xfb5915){const _0x306c29=a0_0x50dfcb;let _0x190764=serviceEntity,_0x1a58d0=_0xfb5915[_0x306c29(0xb0)](function(_0x4178e2,_0x3b20eb){const _0x2995ef=_0x306c29;return _0x4178e2[_0x2995ef(0x132)]-_0x3b20eb[_0x2995ef(0x132)];})[_0x306c29(0xba)](_0x50a114=>this['columnToEntityColumn'](_0x50a114));[_0x306c29(0x12a),_0x306c29(0xb7)]['includes'](_0x1520fe[_0x306c29(0x105)])&&_0x1a58d0[_0x306c29(0xa2)]('\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201'),_0x190764=_0x190764['replace'](/{{entityColumns}}/g,_0x1a58d0[_0x306c29(0xce)]('\x0a'));let _0x4cfe23='',_0x1a85f7=_0xfb5915[_0x306c29(0xa9)](_0x186f77=>_0x186f77[_0x306c29(0xc4)]&&_0x186f77[_0x306c29(0xc4)]>0x0)[_0x306c29(0xb0)](function(_0x57e686,_0xb086ea){const _0x3a4696=_0x306c29;return _0x57e686[_0x3a4696(0xc4)]-_0xb086ea[_0x3a4696(0xc4)];});if(_0x1a85f7[_0x306c29(0xb1)]>0x0){_0x4cfe23='@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})';let _0x138533=_0x1a85f7[_0x306c29(0xba)](_0x1b61b3=>{const _0x4bc90b=_0x306c29;let _0x490aca=_0x1b61b3[_0x4bc90b(0x111)];return'domain_id'==_0x1b61b3['name']&&(_0x490aca=_0x4bc90b(0xec)),_0x4bc90b(0xf3)==_0x1b61b3[_0x4bc90b(0x111)]&&(_0x490aca=_0x4bc90b(0xe7)),_0x4bc90b(0xfe)==_0x1b61b3[_0x4bc90b(0x111)]&&(_0x490aca=_0x4bc90b(0x11d)),_0x4bc90b(0xae)+camelCase(_0x490aca);});_0x4cfe23=_0x4cfe23[_0x306c29(0x119)](/{{indexColumns}}/g,_0x138533[_0x306c29(0xce)](','));}return _0x190764=_0x190764[_0x306c29(0x119)](/{{indexAnn}}/g,_0x4cfe23),_0x190764;}[a0_0x50dfcb(0xf4)](_0x373014,_0x4f47a4){const _0x53dee5=a0_0x50dfcb;let _0x3f0bc1=_0x53dee5(0xb7)==_0x373014[_0x53dee5(0x105)]?serviceEntityHistJson:serviceEntityHistCopy,_0x3d7875=_0x4f47a4[_0x53dee5(0xb0)](function(_0x336620,_0x4c3bcd){const _0xca133e=_0x53dee5;return _0x336620[_0xca133e(0x132)]-_0x4c3bcd[_0xca133e(0x132)];})[_0x53dee5(0xba)](_0x103367=>this['columnToEntityColumn'](_0x103367));return _0x3f0bc1=_0x3f0bc1[_0x53dee5(0x119)](/{{entityColumns}}/g,_0x3d7875['join']('\x0a')),_0x3f0bc1;}['columnToEntityColumn'](_0x46036e){const _0x5a4268=a0_0x50dfcb;if('id'==_0x46036e['name'])return'';if('domain_id'==_0x46036e[_0x5a4268(0x111)])return'';if('created_at'==_0x46036e[_0x5a4268(0x111)])return'';if(_0x5a4268(0x123)==_0x46036e[_0x5a4268(0x111)])return'';if(_0x5a4268(0xf3)==_0x46036e[_0x5a4268(0x111)])return'';if(_0x5a4268(0xfe)==_0x46036e[_0x5a4268(0x111)])return'';let _0x484bd=_0x46036e[_0x5a4268(0xf0)];_0x5a4268(0xe5)==_0x46036e[_0x5a4268(0xf0)]&&(_0x484bd='double\x20precision'),_0x5a4268(0xdd)==_0x46036e['colType']&&(_0x484bd=_0x5a4268(0x126)),_0x5a4268(0xa1)==_0x46036e[_0x5a4268(0xf0)]&&(_0x484bd=_0x5a4268(0xbb)),_0x5a4268(0x122)==_0x46036e['colType']&&(_0x484bd=_0x5a4268(0xd5));let _0x903350='';_0x5a4268(0xa1)==_0x46036e[_0x5a4268(0xf0)]&&(_0x903350=_0x46036e['colSize']);let _0x45df39=this[_0x5a4268(0xdc)](_0x46036e),_0x3e267d=this[_0x5a4268(0x131)](_0x46036e),_0x25bbe2=camelCase(_0x46036e[_0x5a4268(0x111)]);return'\x20\x20'+(_0x5a4268(0xac)+_0x46036e[_0x5a4268(0x111)]+_0x5a4268(0xc7)+_0x484bd+_0x5a4268(0xd0)+_0x46036e[_0x5a4268(0xd4)]+'\x20'+(0x0==_0x903350[_0x5a4268(0xb1)]?'':_0x5a4268(0xe1)+_0x903350)+_0x5a4268(0xdf))+_0x5a4268(0x109)+(_0x5a4268(0x12e)+(0x0==_0x45df39[_0x5a4268(0xb1)]?'':_0x5a4268(0xc5)+_0x45df39+',')+_0x5a4268(0xbd)+_0x46036e[_0x5a4268(0xd4)]+_0x5a4268(0xdf))+'\x0a\x20\x20'+(''+_0x25bbe2+(_0x46036e[_0x5a4268(0xd4)]?'?':'')+':\x20'+_0x3e267d)+'\x0a';}['getFieldType'](_0x215545){const _0x3347bf=a0_0x50dfcb;let _0x51e17e='';return _0x3347bf(0xe5)==_0x215545[_0x3347bf(0xf0)]&&(_0x51e17e=_0x3347bf(0x129)),'float'==_0x215545[_0x3347bf(0xf0)]&&(_0x51e17e=_0x3347bf(0x129)),_0x3347bf(0xdd)==_0x215545[_0x3347bf(0xf0)]&&(_0x51e17e=_0x3347bf(0xfb)),'integer'==_0x215545[_0x3347bf(0xf0)]&&(_0x51e17e=_0x3347bf(0xfb)),_0x51e17e;}[a0_0x50dfcb(0x131)](_0xc7ac53){const _0x4c4367=a0_0x50dfcb;let _0x84e549=_0xc7ac53[_0x4c4367(0xf0)];return _0x4c4367(0xc1)==_0xc7ac53['colType']&&(_0x84e549=_0x4c4367(0x106)),'double'==_0xc7ac53[_0x4c4367(0xf0)]&&(_0x84e549=_0x4c4367(0x106)),_0x4c4367(0xe9)==_0xc7ac53[_0x4c4367(0xf0)]&&(_0x84e549='number'),_0x4c4367(0xfc)==_0xc7ac53[_0x4c4367(0xf0)]&&(_0x84e549=_0x4c4367(0x106)),_0x4c4367(0xdd)==_0xc7ac53['colType']&&(_0x84e549=_0x4c4367(0x106)),_0x4c4367(0x122)==_0xc7ac53[_0x4c4367(0xf0)]&&(_0x84e549='Date'),_0x4c4367(0x11f)==_0xc7ac53[_0x4c4367(0xf0)]&&(_0x84e549=_0x4c4367(0x107)),_0x4c4367(0xed)==_0xc7ac53['colType']&&(_0x84e549=_0x4c4367(0xa1)),_0x84e549;}async['writeFile'](_0x26bbe0,_0x2acd7c,_0x5f0cfe){const _0x155543=a0_0x50dfcb;await fs['writeFileSync'](_0x26bbe0,this[_0x155543(0xc0)](_0x2acd7c,_0x5f0cfe),_0x155543(0x127));}['replaceNamesMap'](_0x3cffc9,_0x404ab2){const _0x1e2370=a0_0x50dfcb;return _0x3cffc9[_0x1e2370(0x119)](/{{pascalCase name}}/g,_0x404ab2['pascalCaseName'])[_0x1e2370(0x119)](/{{camelCase name}}/g,_0x404ab2[_0x1e2370(0xda)])[_0x1e2370(0x119)](/{{snakeCase name}}/g,_0x404ab2[_0x1e2370(0xf6)])[_0x1e2370(0x119)](/{{pluralPascalCase name}}/g,_0x404ab2[_0x1e2370(0xc6)])[_0x1e2370(0x119)](/{{pluralCamelCase name}}/g,_0x404ab2[_0x1e2370(0xfd)])[_0x1e2370(0x119)](/{{tableName}}/g,_0x404ab2[_0x1e2370(0xb6)])[_0x1e2370(0x119)](/{{name}}/g,_0x404ab2[_0x1e2370(0x111)]);}async[a0_0x50dfcb(0x10a)](_0x17d586,_0x97db8a,_0x314052){const _0x42e889=a0_0x50dfcb;let _0x35f570=_0x17d586+'/packages';await this[_0x42e889(0x124)](_0x35f570),_0x35f570=_0x35f570+'/'+_0x97db8a,await this['createDir'](_0x35f570),_0x35f570+='/server',await this[_0x42e889(0x124)](_0x35f570),_0x35f570+='/service',await this[_0x42e889(0x124)](_0x35f570),_0x35f570=_0x35f570+'/'+_0x314052,await this[_0x42e889(0x124)](_0x35f570);}[a0_0x50dfcb(0x10b)](){const _0x2eaaed=a0_0x50dfcb;let _0x260944=process[_0x2eaaed(0x130)][_0x2eaaed(0xe6)][_0x2eaaed(0xb8)]('/'),_0x2152f8=[];for(let _0xae60f0=0x0;_0xae60f0<_0x260944['length']&&_0x2eaaed(0xd2)!=_0x260944[_0xae60f0];_0xae60f0++)_0x2152f8[_0x2eaaed(0xa2)](_0x260944[_0xae60f0]);return _0x2152f8[_0x2eaaed(0xce)]('/');}async[a0_0x50dfcb(0x124)](_0x1f348f){const _0x22d6d9=a0_0x50dfcb;0x0==await this[_0x22d6d9(0xf9)](_0x1f348f)&&fs['mkdirSync'](_0x1f348f);}async[a0_0x50dfcb(0xf9)](_0x3d54a7){const _0x3c8afc=a0_0x50dfcb;return await fs[_0x3c8afc(0xe3)](_0x3d54a7);}};tslib_1[a0_0x50dfcb(0xdb)]([(0x0,type_graphql_1['Query'])(_0x200579=>Boolean,{'description':a0_0x50dfcb(0xa3)}),tslib_1[a0_0x50dfcb(0x120)](0x0,(0x0,type_graphql_1[a0_0x50dfcb(0xee)])('id')),tslib_1[a0_0x50dfcb(0x120)](0x1,(0x0,type_graphql_1[a0_0x50dfcb(0xcb)])()),tslib_1[a0_0x50dfcb(0x121)](a0_0x50dfcb(0xd3),Function),tslib_1[a0_0x50dfcb(0x121)](a0_0x50dfcb(0xaa),[String,Object]),tslib_1[a0_0x50dfcb(0x121)]('design:returntype',Promise)],OperatoToolCreateService['prototype'],a0_0x50dfcb(0x113),null),OperatoToolCreateService=tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x50dfcb(0xd8)])()],OperatoToolCreateService),exports[a0_0x50dfcb(0xa6)]=OperatoToolCreateService;const allIndex=a0_0x50dfcb(0xd9),serviceIndex=a0_0x50dfcb(0xb9),serviceHistoryIndex='\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryQuery\x20}\x20from\x20\x27./{{name}}-history-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryEntitySubscriber\x20}\x20from\x20\x27./event-subscriber\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}},\x20{{pascalCase\x20name}}History]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}HistoryQuery,\x20{{pascalCase\x20name}}Mutation]\x0aexport\x20const\x20subscribers\x20=\x20[{{pascalCase\x20name}}HistoryEntitySubscriber]\x0a\x0a',serviceQuery=a0_0x50dfcb(0x12d),serviceHistoryQuery=a0_0x50dfcb(0x125),serviceMutation=a0_0x50dfcb(0xbe),sereviceType=a0_0x50dfcb(0x10f),sereviceHistoryType='\x0aimport\x20{\x20ObjectType,\x20Field,\x20InputType,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0a\x0a@ObjectType()\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryList\x20{\x0a\x20\x20@Field(type\x20=>\x20[{{pascalCase\x20name}}History])\x0a\x20\x20items:\x20{{pascalCase\x20name}}History[]\x0a\x0a\x20\x20@Field(type\x20=>\x20Int)\x0a\x20\x20total:\x20number\x0a}\x0a',serviceEntity=a0_0x50dfcb(0x110),serviceEntityHistCopy=a0_0x50dfcb(0xf5),serviceEntityHistJson=a0_0x50dfcb(0xff),serviceEntitySubscriber=a0_0x50dfcb(0xd6);
|
|
1
|
+
'use strict';function a0_0x2c08(){const _0x4bb68e=['Query','long','map','EntitySubscribers\x20}\x20from\x20\x27./','@things-factory/shell','design:returntype','rank','float','-history-query.ts','Resolvers,\x20subscribers\x20as\x20','timestamp\x20without\x20time\x20zone','__param','\x20})','Entity','mkdirSync','getProjectRootPath','26760QjqQXp','\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201','createHistoryServiceFiles','tableName','createTypeText','camelCaseName','find','JSON','type\x20=>','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20Domain\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0a@Entity(\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','168cYxGLM','updated_at','\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','date','{{camelCase\x20name}}.','\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','\x0a\x20\x20','.ts','character\x20varying','Entities,\x20resolvers\x20as\x20','columnToEntityColumn','-mutation.ts','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','-type.ts','/*\x20ENTITIES\x20*/\x0a\x09...','colSize','OperatoToolCreateService','packages','replace','updater_id','createServicePath','sort','/packages/','/event-subscriber.ts','500270BPYRNI','58295JsNPBX','split','env','Entities,','createDir','/server/service/','pascalCaseName','@things-factory/resource-base','-history-type.ts','double','export\x20*\x20from\x20\x27./','Resolvers,','Float','includes','...','name','createEntityText','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','Arg',',length:','createServiceFiles','datetime','/server','Ctx','nullable','length','710666cBGVXB','integer','4294197kBYMPS','-query.ts','writeFile','snakeCaseName','getFieldType','push','double\x20precision','state','/packages','@Field(','design:type','existsSync','design:paramtypes','getColTxtType','\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','replaceNamesMap','34685mxLyKa','prototype','readFileSync','tslib','join','getRepository','number','132JkYVRk','__esModule','dataProp','\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','1936cwaoww','creator','indexOf','__metadata','\x27,\x20nullable:\x20','pluralCamelCaseName','index.ts','pluralize','COPY','150321sMRGxF','createHistoryEntityText','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','Date','EntitySubscribers,','16llCUxD','\x20{\x20nullable:\x20','utf8','\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','Int','@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})','domain_id','existsPath','writeFileSync','created_at','__decorate','import\x20{\x20entities\x20as\x20','Resolvers\x20}\x20from\x20\x27./','createNoHistoryServiceFiels','uniqRank','creator_id','-history\x27','Operato\x20Tool\x20Create\x20Service','colType'];a0_0x2c08=function(){return _0x4bb68e;};return a0_0x2c08();}const a0_0x28ceca=a0_0x2557;(function(_0x52ad00,_0x4980e2){const _0x209cef=a0_0x2557,_0x353d2a=_0x52ad00();while(!![]){try{const _0xa731a6=-parseInt(_0x209cef(0x10f))/0x1+-parseInt(_0x209cef(0x9e))/0x2+parseInt(_0x209cef(0xc4))/0x3*(-parseInt(_0x209cef(0xca))/0x4)+-parseInt(_0x209cef(0x110))/0x5*(-parseInt(_0x209cef(0xb7))/0x6)+parseInt(_0x209cef(0xb0))/0x7*(parseInt(_0x209cef(0xf7))/0x8)+parseInt(_0x209cef(0xa0))/0x9+-parseInt(_0x209cef(0xed))/0xa*(-parseInt(_0x209cef(0xbb))/0xb);if(_0xa731a6===_0x4980e2)break;else _0x353d2a['push'](_0x353d2a['shift']());}catch(_0x288f48){_0x353d2a['push'](_0x353d2a['shift']());}}}(a0_0x2c08,0x3dad7));Object['defineProperty'](exports,a0_0x28ceca(0xb8),{'value':!0x0}),exports[a0_0x28ceca(0x107)]=void 0x0;const tslib_1=require(a0_0x28ceca(0xb3)),type_graphql_1=require('type-graphql'),shell_1=require(a0_0x28ceca(0xe1)),resource_base_1=require(a0_0x28ceca(0x117)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require('lodash'),{plural:plural}=require(a0_0x28ceca(0xc2)),fs=require('fs');let OperatoToolCreateService=class{async['toolCreateService'](_0x1d88b0,_0x2861bc){const _0x867d1=a0_0x28ceca,{domain:_0x21939f}=_0x2861bc[_0x867d1(0xa7)],_0x384dc6=await(0x0,shell_1['getRepository'])(resource_base_1[_0x867d1(0xea)])['findOne']({'where':{'id':_0x1d88b0}}),_0x5ec88c=await(0x0,shell_1[_0x867d1(0xb5)])(resource_base_1['EntityColumn'])[_0x867d1(0xf3)]({'where':{'domain':{'id':_0x21939f['id']},'entity':{'id':_0x384dc6['id']}}});let {name:_0x33f2fb='',bundle:_0x384613=''}=_0x384dc6||{},_0x140d34=this[_0x867d1(0xec)](),_0x3b9175=kebabCase(_0x33f2fb);return await this[_0x867d1(0x10b)](_0x140d34,_0x384613,_0x3b9175),await this['createServiceFiles'](_0x140d34,_0x384613,_0x33f2fb,_0x3b9175,_0x384dc6,_0x5ec88c),!0x0;}async[a0_0x28ceca(0x98)](_0x1260fa,_0x8d229c,_0x8e3183,_0x5e44fb,_0x16f7a0,_0x5673b1){const _0x556733=a0_0x28ceca;let _0x8cd66e={'name':_0x5e44fb,'tableName':_0x16f7a0['tableName'],'pascalCaseName':startCase(camelCase(_0x8e3183))[_0x556733(0x109)](/ /g,''),'camelCaseName':camelCase(_0x8e3183),'snakeCaseName':snakeCase(_0x8e3183),'pluralPascalCaseName':startCase(camelCase(plural(_0x8e3183)))[_0x556733(0x109)](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x8e3183))},_0xf59748=_0x1260fa+_0x556733(0x10d)+_0x8d229c+_0x556733(0x115);[_0x556733(0xf4),_0x556733(0xc3)][_0x556733(0x11d)](_0x16f7a0['dataProp'])?await this['createHistoryServiceFiles'](_0xf59748,_0x5e44fb,_0x16f7a0,_0x5673b1,_0x8cd66e):await this[_0x556733(0xd7)](_0xf59748,_0x5e44fb,_0x16f7a0,_0x5673b1,_0x8cd66e);}async[a0_0x28ceca(0xef)](_0x206d53,_0x214363,_0x599e51,_0x58d751,_0x2987b8){const _0x61d842=a0_0x28ceca;await this[_0x61d842(0xa2)](_0x206d53+(_0x214363+'/index.ts'),serviceHistoryIndex,_0x2987b8);let _0x3a2dea=this[_0x61d842(0x120)](_0x599e51,_0x58d751);await this[_0x61d842(0xa2)](_0x206d53+(_0x214363+'/'+_0x214363+_0x61d842(0xfe)),_0x3a2dea,_0x2987b8),await this['writeFile'](_0x206d53+(_0x214363+'/'+_0x214363+_0x61d842(0xa1)),serviceQuery,_0x2987b8),await this['writeFile'](_0x206d53+(_0x214363+'/'+_0x214363+'-mutation.ts'),serviceMutation,_0x2987b8);let _0x5c3408=this[_0x61d842(0xf1)](_0x58d751);await this['writeFile'](_0x206d53+(_0x214363+'/'+_0x214363+_0x61d842(0x104)),_0x5c3408,_0x2987b8);let _0x28e393=this['createHistoryEntityText'](_0x599e51,_0x58d751);await this[_0x61d842(0xa2)](_0x206d53+(_0x214363+'/'+_0x214363+'-history.ts'),_0x28e393,_0x2987b8);let _0x1daff3='';_0x61d842(0xf4)==_0x599e51[_0x61d842(0xb9)]?(_0x1daff3=_0x61d842(0xae),await this[_0x61d842(0xa2)](_0x206d53+(_0x214363+'/event-subscriber.ts'),serviceEntitySubscriber,_0x2987b8)):_0x1daff3='';let _0x2311a5=serviceEntitySubscriber[_0x61d842(0x109)](/{{entityToJson}}/g,_0x1daff3);await this[_0x61d842(0xa2)](_0x206d53+(_0x214363+_0x61d842(0x10e)),_0x2311a5,_0x2987b8),await this[_0x61d842(0xa2)](_0x206d53+(_0x214363+'/'+_0x214363+_0x61d842(0xe5)),serviceHistoryQuery,_0x2987b8),await this['writeFile'](_0x206d53+(_0x214363+'/'+_0x214363+_0x61d842(0x118)),sereviceHistoryType,_0x2987b8);let _0x4b1ef0=_0x206d53+_0x61d842(0xc1);0x0==await this[_0x61d842(0xd1)](_0x4b1ef0)&&await this[_0x61d842(0xa2)](_0x4b1ef0,allIndex,_0x2987b8);let _0x22d43d=await fs[_0x61d842(0xb2)](_0x4b1ef0,'utf8');_0x22d43d[_0x61d842(0xbd)]('export\x20*\x20from\x20\x27./'+_0x2987b8['name']+'/'+_0x2987b8['name']+_0x61d842(0xda))<0x0&&(_0x22d43d=_0x22d43d[_0x61d842(0x109)](/\/\* EXPORT ENTITY TYPES \*\//,_0x61d842(0x121)+_0x2987b8[_0x61d842(0x11f)]+'/'+_0x2987b8[_0x61d842(0x11f)]+'-history\x27')),_0x22d43d['indexOf'](_0x61d842(0x11a)+_0x2987b8[_0x61d842(0x11f)]+'/'+_0x2987b8[_0x61d842(0x11f)]+'\x27')<0x0&&(_0x22d43d=_0x22d43d['replace'](/\/\* EXPORT ENTITY TYPES \*\//,_0x61d842(0x121)+_0x2987b8[_0x61d842(0x11f)]+'/'+_0x2987b8[_0x61d842(0x11f)]+'\x27')),_0x22d43d[_0x61d842(0xbd)]('import\x20{\x20entities\x20as\x20'+_0x2987b8['pascalCaseName']+_0x61d842(0x100)+_0x2987b8[_0x61d842(0x116)]+_0x61d842(0xe6)+_0x2987b8[_0x61d842(0x116)]+_0x61d842(0xe0)+_0x2987b8[_0x61d842(0x11f)]+'\x27')<0x0&&(_0x22d43d=_0x22d43d[_0x61d842(0x109)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,'/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20'+_0x2987b8[_0x61d842(0x116)]+_0x61d842(0x100)+_0x2987b8[_0x61d842(0x116)]+_0x61d842(0xe6)+_0x2987b8[_0x61d842(0x116)]+_0x61d842(0xe0)+_0x2987b8['name']+'\x27')),_0x22d43d['indexOf'](_0x61d842(0x11e)+_0x2987b8[_0x61d842(0x116)]+_0x61d842(0x113))<0x0&&(_0x22d43d=_0x22d43d[_0x61d842(0x109)](/\/\* ENTITIES \*\//,_0x61d842(0x105)+_0x2987b8[_0x61d842(0x116)]+_0x61d842(0x113))),_0x22d43d[_0x61d842(0xbd)](_0x61d842(0x11e)+_0x2987b8[_0x61d842(0x116)]+_0x61d842(0x11b))<0x0&&(_0x22d43d=_0x22d43d[_0x61d842(0x109)](/\/\* RESOLVER CLASSES \*\//,_0x61d842(0xc7)+_0x2987b8['pascalCaseName']+_0x61d842(0x11b))),_0x22d43d[_0x61d842(0xbd)]('...'+_0x2987b8['pascalCaseName']+_0x61d842(0xc9))<0x0&&(_0x22d43d=_0x22d43d[_0x61d842(0x109)](/\/\* SUBSCRIBERS \*\//,'/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...'+_0x2987b8[_0x61d842(0x116)]+_0x61d842(0xc9))),await this[_0x61d842(0xa2)](_0x4b1ef0,_0x22d43d,_0x2987b8);}async[a0_0x28ceca(0xd7)](_0x368469,_0x2c4c4e,_0x8d9d78,_0x564cd1,_0x1c7330){const _0x4f79c7=a0_0x28ceca;await this[_0x4f79c7(0xa2)](_0x368469+(_0x2c4c4e+'/index.ts'),serviceIndex,_0x1c7330),await this[_0x4f79c7(0xa2)](_0x368469+(_0x2c4c4e+'/'+_0x2c4c4e+_0x4f79c7(0xa1)),serviceQuery,_0x1c7330),await this['writeFile'](_0x368469+(_0x2c4c4e+'/'+_0x2c4c4e+_0x4f79c7(0x102)),serviceMutation,_0x1c7330);let _0x1cb98b=this[_0x4f79c7(0x120)](_0x8d9d78,_0x564cd1);await this[_0x4f79c7(0xa2)](_0x368469+(_0x2c4c4e+'/'+_0x2c4c4e+_0x4f79c7(0xfe)),_0x1cb98b,_0x1c7330);let _0x533cc1=this[_0x4f79c7(0xf1)](_0x564cd1);await this[_0x4f79c7(0xa2)](_0x368469+(_0x2c4c4e+'/'+_0x2c4c4e+'-type.ts'),_0x533cc1,_0x1c7330);let _0x454a4f=_0x368469+_0x4f79c7(0xc1);0x0==await this['existsPath'](_0x454a4f)&&await this['writeFile'](_0x454a4f,allIndex,_0x1c7330);let _0x3ac2a1=await fs[_0x4f79c7(0xb2)](_0x454a4f,_0x4f79c7(0xcc));_0x3ac2a1[_0x4f79c7(0xbd)](_0x4f79c7(0x11a)+_0x1c7330[_0x4f79c7(0x11f)]+'/'+_0x1c7330[_0x4f79c7(0x11f)]+'\x27')<0x0&&(_0x3ac2a1=_0x3ac2a1[_0x4f79c7(0x109)](/\/\* EXPORT ENTITY TYPES \*\//,_0x4f79c7(0x121)+_0x1c7330[_0x4f79c7(0x11f)]+'/'+_0x1c7330[_0x4f79c7(0x11f)]+'\x27')),_0x3ac2a1[_0x4f79c7(0xbd)](_0x4f79c7(0xd5)+_0x1c7330[_0x4f79c7(0x116)]+_0x4f79c7(0x100)+_0x1c7330[_0x4f79c7(0x116)]+_0x4f79c7(0xd6)+_0x1c7330[_0x4f79c7(0x11f)]+'\x27')<0x0&&(_0x3ac2a1=_0x3ac2a1[_0x4f79c7(0x109)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x4f79c7(0xc6)+_0x1c7330[_0x4f79c7(0x116)]+_0x4f79c7(0x100)+_0x1c7330[_0x4f79c7(0x116)]+_0x4f79c7(0xd6)+_0x1c7330['name']+'\x27')),_0x3ac2a1[_0x4f79c7(0xbd)](_0x4f79c7(0x11e)+_0x1c7330[_0x4f79c7(0x116)]+_0x4f79c7(0x113))<0x0&&(_0x3ac2a1=_0x3ac2a1[_0x4f79c7(0x109)](/\/\* ENTITIES \*\//,_0x4f79c7(0x105)+_0x1c7330[_0x4f79c7(0x116)]+_0x4f79c7(0x113))),_0x3ac2a1[_0x4f79c7(0xbd)](_0x4f79c7(0x11e)+_0x1c7330['pascalCaseName']+_0x4f79c7(0x11b))<0x0&&(_0x3ac2a1=_0x3ac2a1['replace'](/\/\* RESOLVER CLASSES \*\//,_0x4f79c7(0xc7)+_0x1c7330['pascalCaseName']+_0x4f79c7(0x11b))),await this[_0x4f79c7(0xa2)](_0x454a4f,_0x3ac2a1,_0x1c7330);}['createTypeText'](_0x472c28){const _0x2f0bb7=a0_0x28ceca;let _0x280978=sereviceType,_0x4b63cb=_0x472c28[_0x2f0bb7(0xdf)](_0x3e8736=>{const _0x13e3c2=_0x2f0bb7;if('id'==_0x3e8736['name'])return'';if(_0x13e3c2(0xd0)==_0x3e8736[_0x13e3c2(0x11f)])return'';if(_0x13e3c2(0xd3)==_0x3e8736[_0x13e3c2(0x11f)])return'';if(_0x13e3c2(0xf8)==_0x3e8736[_0x13e3c2(0x11f)])return'';if('creator_id'==_0x3e8736['name'])return'';if(_0x13e3c2(0x10a)==_0x3e8736['name'])return'';let _0x3ee742=this[_0x13e3c2(0xa4)](_0x3e8736),_0x49f4f6=this[_0x13e3c2(0xad)](_0x3e8736),_0x4c13e5=camelCase(_0x3e8736[_0x13e3c2(0x11f)]);return'\x20\x20'+(_0x13e3c2(0xa9)+(0x0==_0x3ee742['length']?'':_0x13e3c2(0xf5)+_0x3ee742+',')+_0x13e3c2(0xcb)+_0x3e8736[_0x13e3c2(0x9c)]+_0x13e3c2(0xe9))+'\x0a\x20\x20'+(''+_0x4c13e5+(_0x3e8736[_0x13e3c2(0x9c)]?'?':'')+':\x20'+_0x49f4f6)+'\x0a';});_0x280978=_0x280978[_0x2f0bb7(0x109)](/{{newTypeColumns}}/g,_0x4b63cb[_0x2f0bb7(0xb4)]('\x0a'));let _0x381fc8=_0x472c28[_0x2f0bb7(0xdf)](_0x5a8bb3=>{const _0x228762=_0x2f0bb7;if('id'==_0x5a8bb3[_0x228762(0x11f)])return'';if(_0x228762(0xd0)==_0x5a8bb3[_0x228762(0x11f)])return'';if(_0x228762(0xd3)==_0x5a8bb3[_0x228762(0x11f)])return'';if(_0x228762(0xf8)==_0x5a8bb3[_0x228762(0x11f)])return'';if(_0x228762(0xd9)==_0x5a8bb3[_0x228762(0x11f)])return'';if(_0x228762(0x10a)==_0x5a8bb3[_0x228762(0x11f)])return'';let _0xe6be69=this[_0x228762(0xa4)](_0x5a8bb3),_0x127cc3=this['getColTxtType'](_0x5a8bb3);_0x5a8bb3[_0x228762(0x9c)]=!0x0;let _0x417368=camelCase(_0x5a8bb3[_0x228762(0x11f)]);return'\x20\x20'+(_0x228762(0xa9)+(0x0==_0xe6be69[_0x228762(0x9d)]?'':_0x228762(0xf5)+_0xe6be69+',')+'\x20{\x20nullable:\x20'+_0x5a8bb3['nullable']+_0x228762(0xe9))+_0x228762(0xfd)+(''+_0x417368+(_0x5a8bb3['nullable']?'?':'')+':\x20'+_0x127cc3)+'\x0a';});return _0x280978=_0x280978['replace'](/{{patchTypeColumns}}/g,_0x381fc8[_0x2f0bb7(0xb4)]('\x0a')),_0x280978;}[a0_0x28ceca(0x120)](_0x4630f5,_0x35c2f9){const _0x5f3606=a0_0x28ceca;let _0x3f368f=serviceEntity,_0x59e9f3=_0x35c2f9[_0x5f3606(0x10c)](function(_0x20f3d2,_0x2249ea){const _0x4d9287=_0x5f3606;return _0x20f3d2[_0x4d9287(0xe3)]-_0x2249ea['rank'];})[_0x5f3606(0xdf)](_0x5070d3=>this['columnToEntityColumn'](_0x5070d3));[_0x5f3606(0xc3),_0x5f3606(0xf4)][_0x5f3606(0x11d)](_0x4630f5[_0x5f3606(0xb9)])&&_0x59e9f3[_0x5f3606(0xa5)](_0x5f3606(0xee)),_0x3f368f=_0x3f368f[_0x5f3606(0x109)](/{{entityColumns}}/g,_0x59e9f3[_0x5f3606(0xb4)]('\x0a'));let _0x721d3d='',_0x52694a=_0x35c2f9['filter'](_0x1f27aa=>_0x1f27aa['uniqRank']&&_0x1f27aa[_0x5f3606(0xd8)]>0x0)[_0x5f3606(0x10c)](function(_0x3d5c84,_0x35d0e8){const _0x430128=_0x5f3606;return _0x3d5c84[_0x430128(0xd8)]-_0x35d0e8['uniqRank'];});if(_0x52694a['length']>0x0){_0x721d3d=_0x5f3606(0xcf);let _0x9cb733=_0x52694a[_0x5f3606(0xdf)](_0x206f6c=>{const _0xf2f87b=_0x5f3606;let _0x569732=_0x206f6c[_0xf2f87b(0x11f)];return _0xf2f87b(0xd0)==_0x206f6c[_0xf2f87b(0x11f)]&&(_0x569732='domain'),'creator_id'==_0x206f6c[_0xf2f87b(0x11f)]&&(_0x569732=_0xf2f87b(0xbc)),_0xf2f87b(0x10a)==_0x206f6c[_0xf2f87b(0x11f)]&&(_0x569732='updater'),_0xf2f87b(0xfb)+camelCase(_0x569732);});_0x721d3d=_0x721d3d['replace'](/{{indexColumns}}/g,_0x9cb733[_0x5f3606(0xb4)](','));}return _0x3f368f=_0x3f368f[_0x5f3606(0x109)](/{{indexAnn}}/g,_0x721d3d),_0x3f368f;}[a0_0x28ceca(0xc5)](_0x2995fc,_0xcd6b53){const _0x530922=a0_0x28ceca;let _0x288dc6=_0x530922(0xf4)==_0x2995fc['dataProp']?serviceEntityHistJson:serviceEntityHistCopy,_0x45a500=_0xcd6b53[_0x530922(0x10c)](function(_0x5ba0cf,_0x5220a6){const _0x3d5e31=_0x530922;return _0x5ba0cf[_0x3d5e31(0xe3)]-_0x5220a6[_0x3d5e31(0xe3)];})[_0x530922(0xdf)](_0x54a605=>this[_0x530922(0x101)](_0x54a605));return _0x288dc6=_0x288dc6[_0x530922(0x109)](/{{entityColumns}}/g,_0x45a500[_0x530922(0xb4)]('\x0a')),_0x288dc6;}[a0_0x28ceca(0x101)](_0x3b75b5){const _0x173be9=a0_0x28ceca;if('id'==_0x3b75b5['name'])return'';if(_0x173be9(0xd0)==_0x3b75b5[_0x173be9(0x11f)])return'';if(_0x173be9(0xd3)==_0x3b75b5[_0x173be9(0x11f)])return'';if(_0x173be9(0xf8)==_0x3b75b5['name'])return'';if('creator_id'==_0x3b75b5['name'])return'';if(_0x173be9(0x10a)==_0x3b75b5[_0x173be9(0x11f)])return'';let _0x57876c=_0x3b75b5[_0x173be9(0xdc)];_0x173be9(0x119)==_0x3b75b5[_0x173be9(0xdc)]&&(_0x57876c=_0x173be9(0xa6)),_0x173be9(0xde)==_0x3b75b5[_0x173be9(0xdc)]&&(_0x57876c='bigint'),'string'==_0x3b75b5[_0x173be9(0xdc)]&&(_0x57876c=_0x173be9(0xff)),'datetime'==_0x3b75b5[_0x173be9(0xdc)]&&(_0x57876c=_0x173be9(0xe7));let _0x18d260='';'string'==_0x3b75b5['colType']&&(_0x18d260=_0x3b75b5[_0x173be9(0x106)]);let _0x5796f2=this[_0x173be9(0xa4)](_0x3b75b5),_0x45d31a=this[_0x173be9(0xad)](_0x3b75b5),_0x31e701=camelCase(_0x3b75b5[_0x173be9(0x11f)]);return'\x20\x20'+('@Column({name:\x27'+_0x3b75b5[_0x173be9(0x11f)]+'\x27,\x20type:\x20\x27'+_0x57876c+_0x173be9(0xbf)+_0x3b75b5['nullable']+'\x20'+(0x0==_0x18d260[_0x173be9(0x9d)]?'':_0x173be9(0x123)+_0x18d260)+_0x173be9(0xe9))+'\x0a\x20\x20'+(_0x173be9(0xa9)+(0x0==_0x5796f2[_0x173be9(0x9d)]?'':_0x173be9(0xf5)+_0x5796f2+',')+'\x20{\x20nullable:\x20'+_0x3b75b5['nullable']+'\x20})')+_0x173be9(0xfd)+(''+_0x31e701+(_0x3b75b5[_0x173be9(0x9c)]?'?':'')+':\x20'+_0x45d31a)+'\x0a';}['getFieldType'](_0x4478bf){const _0xffc530=a0_0x28ceca;let _0x413b43='';return _0xffc530(0x119)==_0x4478bf[_0xffc530(0xdc)]&&(_0x413b43='Float'),_0xffc530(0xe4)==_0x4478bf[_0xffc530(0xdc)]&&(_0x413b43=_0xffc530(0x11c)),_0xffc530(0xde)==_0x4478bf[_0xffc530(0xdc)]&&(_0x413b43=_0xffc530(0xce)),_0xffc530(0x9f)==_0x4478bf['colType']&&(_0x413b43=_0xffc530(0xce)),_0x413b43;}[a0_0x28ceca(0xad)](_0x7c1adb){const _0x594b27=a0_0x28ceca;let _0x4f5d71=_0x7c1adb['colType'];return'decimal'==_0x7c1adb[_0x594b27(0xdc)]&&(_0x4f5d71=_0x594b27(0xb6)),_0x594b27(0x119)==_0x7c1adb['colType']&&(_0x4f5d71=_0x594b27(0xb6)),_0x594b27(0xe4)==_0x7c1adb[_0x594b27(0xdc)]&&(_0x4f5d71=_0x594b27(0xb6)),_0x594b27(0x9f)==_0x7c1adb[_0x594b27(0xdc)]&&(_0x4f5d71=_0x594b27(0xb6)),_0x594b27(0xde)==_0x7c1adb['colType']&&(_0x4f5d71=_0x594b27(0xb6)),_0x594b27(0x99)==_0x7c1adb['colType']&&(_0x4f5d71=_0x594b27(0xc8)),_0x594b27(0xfa)==_0x7c1adb[_0x594b27(0xdc)]&&(_0x4f5d71=_0x594b27(0xc8)),'text'==_0x7c1adb[_0x594b27(0xdc)]&&(_0x4f5d71='string'),_0x4f5d71;}async[a0_0x28ceca(0xa2)](_0xa77e58,_0x2bc946,_0x2c0b9d){const _0xb92d0d=a0_0x28ceca;await fs[_0xb92d0d(0xd2)](_0xa77e58,this[_0xb92d0d(0xaf)](_0x2bc946,_0x2c0b9d),_0xb92d0d(0xcc));}['replaceNamesMap'](_0x4be579,_0x16c323){const _0x157c4a=a0_0x28ceca;return _0x4be579[_0x157c4a(0x109)](/{{pascalCase name}}/g,_0x16c323[_0x157c4a(0x116)])[_0x157c4a(0x109)](/{{camelCase name}}/g,_0x16c323[_0x157c4a(0xf2)])[_0x157c4a(0x109)](/{{snakeCase name}}/g,_0x16c323[_0x157c4a(0xa3)])[_0x157c4a(0x109)](/{{pluralPascalCase name}}/g,_0x16c323['pluralPascalCaseName'])[_0x157c4a(0x109)](/{{pluralCamelCase name}}/g,_0x16c323[_0x157c4a(0xc0)])['replace'](/{{tableName}}/g,_0x16c323[_0x157c4a(0xf0)])[_0x157c4a(0x109)](/{{name}}/g,_0x16c323[_0x157c4a(0x11f)]);}async['createServicePath'](_0x104f32,_0x10c3f9,_0x59fd32){const _0x25a993=a0_0x28ceca;let _0x147140=_0x104f32+_0x25a993(0xa8);await this['createDir'](_0x147140),_0x147140=_0x147140+'/'+_0x10c3f9,await this['createDir'](_0x147140),_0x147140+=_0x25a993(0x9a),await this[_0x25a993(0x114)](_0x147140),_0x147140+='/service',await this[_0x25a993(0x114)](_0x147140),_0x147140=_0x147140+'/'+_0x59fd32,await this[_0x25a993(0x114)](_0x147140);}[a0_0x28ceca(0xec)](){const _0xbceea1=a0_0x28ceca;let _0x42b0a3=process[_0xbceea1(0x112)]['PWD'][_0xbceea1(0x111)]('/'),_0x5c5add=[];for(let _0x34caa8=0x0;_0x34caa8<_0x42b0a3[_0xbceea1(0x9d)]&&_0xbceea1(0x108)!=_0x42b0a3[_0x34caa8];_0x34caa8++)_0x5c5add['push'](_0x42b0a3[_0x34caa8]);return _0x5c5add[_0xbceea1(0xb4)]('/');}async['createDir'](_0x21ecf0){const _0x136ce0=a0_0x28ceca;0x0==await this[_0x136ce0(0xd1)](_0x21ecf0)&&fs[_0x136ce0(0xeb)](_0x21ecf0);}async[a0_0x28ceca(0xd1)](_0x1dc9e2){const _0x3028c4=a0_0x28ceca;return await fs[_0x3028c4(0xab)](_0x1dc9e2);}};tslib_1[a0_0x28ceca(0xd4)]([(0x0,type_graphql_1[a0_0x28ceca(0xdd)])(_0x162e2f=>Boolean,{'description':a0_0x28ceca(0xdb)}),tslib_1['__param'](0x0,(0x0,type_graphql_1[a0_0x28ceca(0x122)])('id')),tslib_1[a0_0x28ceca(0xe8)](0x1,(0x0,type_graphql_1[a0_0x28ceca(0x9b)])()),tslib_1['__metadata'](a0_0x28ceca(0xaa),Function),tslib_1[a0_0x28ceca(0xbe)](a0_0x28ceca(0xac),[String,Object]),tslib_1['__metadata'](a0_0x28ceca(0xe2),Promise)],OperatoToolCreateService[a0_0x28ceca(0xb1)],'toolCreateService',null),OperatoToolCreateService=tslib_1[a0_0x28ceca(0xd4)]([(0x0,type_graphql_1['Resolver'])()],OperatoToolCreateService),exports[a0_0x28ceca(0x107)]=OperatoToolCreateService;function a0_0x2557(_0x2907be,_0x377f10){const _0x2c0889=a0_0x2c08();return a0_0x2557=function(_0x255788,_0x50618f){_0x255788=_0x255788-0x98;let _0x197db4=_0x2c0889[_0x255788];return _0x197db4;},a0_0x2557(_0x2907be,_0x377f10);}const allIndex='\x0a/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0a\x0a/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0a\x0aexport\x20const\x20entities\x20=\x20[\x20\x20\x0a\x20\x20/*\x20ENTITIES\x20*/\x0a]\x20\x0a\x0a\x0aexport\x20const\x20schema\x20=\x20{\x0a\x20\x20resolverClasses:\x20[\x0a\x20\x20\x20\x20/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x20\x20]\x20\x0a}\x0a\x0aexport\x20const\x20subscribers\x20=\x20[\x0a\x20\x20/*\x20SUBSCRIBERS\x20*/\x0a]\x0a',serviceIndex='\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='\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryQuery\x20}\x20from\x20\x27./{{name}}-history-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryEntitySubscriber\x20}\x20from\x20\x27./event-subscriber\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}},\x20{{pascalCase\x20name}}History]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}HistoryQuery,\x20{{pascalCase\x20name}}Mutation]\x0aexport\x20const\x20subscribers\x20=\x20[{{pascalCase\x20name}}HistoryEntitySubscriber]\x0a\x0a',serviceQuery=a0_0x28ceca(0xba),serviceHistoryQuery=a0_0x28ceca(0xf9),serviceMutation=a0_0x28ceca(0xfc),sereviceType='\x0aimport\x20{\x20ObjectType,\x20Field,\x20InputType,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@InputType()\x0aexport\x20class\x20New{{pascalCase\x20name}}\x20{\x0a{{newTypeColumns}}\x0a}\x0a\x0a@InputType()\x0aexport\x20class\x20{{pascalCase\x20name}}Patch\x20{\x0a\x20\x20@Field(type\x20=>\x20ID,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20id?:\x20string\x0a\x0a{{patchTypeColumns}}\x0a\x0a\x20\x20@Field()\x0a\x20\x20cuFlag:\x20string\x0a}\x0a\x0a@ObjectType()\x0aexport\x20class\x20{{pascalCase\x20name}}List\x20{\x0a\x20\x20@Field(type\x20=>\x20[{{pascalCase\x20name}}])\x0a\x20\x20items:\x20{{pascalCase\x20name}}[]\x0a\x0a\x20\x20@Field(type\x20=>\x20Int)\x0a\x20\x20total:\x20number\x0a}\x0a',sereviceHistoryType='\x0aimport\x20{\x20ObjectType,\x20Field,\x20InputType,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0a\x0a@ObjectType()\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryList\x20{\x0a\x20\x20@Field(type\x20=>\x20[{{pascalCase\x20name}}History])\x0a\x20\x20items:\x20{{pascalCase\x20name}}History[]\x0a\x0a\x20\x20@Field(type\x20=>\x20Int)\x0a\x20\x20total:\x20number\x0a}\x0a',serviceEntity=a0_0x28ceca(0xf6),serviceEntityHistCopy=a0_0x28ceca(0x103),serviceEntityHistJson=a0_0x28ceca(0xcd),serviceEntitySubscriber='\x0aimport\x20{\x20EventSubscriber\x20}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20HistoryEntitySubscriber\x20}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20getRepository\x20}\x20from\x20\x27@things-factory/shell\x27\x0a\x0a@EventSubscriber()\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryEntitySubscriber\x20extends\x20HistoryEntitySubscriber<{{pascalCase\x20name}},{{pascalCase\x20name}}History>\x20{\x0a\x20\x20public\x20get\x20entity()\x20{\x0a\x20\x20\x20\x20return\x20{{pascalCase\x20name}}\x0a\x20\x20}\x0a\x0a\x20\x20public\x20get\x20historyEntity()\x20{\x0a\x20\x20\x20\x20return\x20{{pascalCase\x20name}}History\x0a\x20\x20}\x0a\x0a\x20\x20{{entityToJson}}\x0a\x0a\x20\x20async\x20beforeRemoveHistory(history:{{pascalCase\x20name}}History,entity:{{pascalCase\x20name}}){\x0a\x20\x20\x20\x20let\x20repo\x20=\x20getRepository({{pascalCase\x20name}}History);\x0a\x20\x20\x20\x20const\x20revNo\x20=\x20await\x20repo.createQueryBuilder()\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.select(\x27max(data_revision_no)\x27,\x20\x27rev_no\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.where(\x27domain_id\x20=\x20:domainId\x27,\x20{\x20domainId:\x20entity.domain.id\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.andWhere(\x27original_id\x20=\x20:originalId\x27,\x20{\x20originalId:\x20entity.id\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.getRawOne()\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20history.dataRevisionNo\x20=\x20revNo\x20?\x20revNo.rev_no\x20+\x201\x20:\x201;\x0a\x20\x20\x20\x20return\x20history;\x0a\x20\x20}\x0a}\x0a';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x8ca0d8=a0_0x2975;(function(_0x501325,_0x16a589){const _0x345718=a0_0x2975,_0x2ce7cc=_0x501325();while(!![]){try{const _0x10be66=parseInt(_0x345718(0x8e))/0x1+parseInt(_0x345718(0x84))/0x2+parseInt(_0x345718(0x70))/0x3+parseInt(_0x345718(0x72))/0x4*(-parseInt(_0x345718(0x6e))/0x5)+parseInt(_0x345718(0x71))/0x6*(-parseInt(_0x345718(0x6c))/0x7)+parseInt(_0x345718(0x75))/0x8*(parseInt(_0x345718(0x7a))/0x9)+-parseInt(_0x345718(0x74))/0xa*(parseInt(_0x345718(0x79))/0xb);if(_0x10be66===_0x16a589)break;else _0x2ce7cc['push'](_0x2ce7cc['shift']());}catch(_0x4dec46){_0x2ce7cc['push'](_0x2ce7cc['shift']());}}}(a0_0x21de,0x99c5b));function a0_0x2975(_0xf6fd85,_0x4e4bfb){const _0x21deec=a0_0x21de();return a0_0x2975=function(_0x297581,_0x311a38){_0x297581=_0x297581-0x6a;let _0x4127c=_0x21deec[_0x297581];return _0x4127c;},a0_0x2975(_0xf6fd85,_0x4e4bfb);}function a0_0x21de(){const _0x48c6b5=['LicenseError','INVALID_LICENSE','id\x20!=\x20:id','@things-factory/shell','manager','getRepository','includes','getPermission','checkStudioTemplateIsOverLimit','1066768FVYqUA','where','trim','getCount','@things-factory/menu-base','Studio','@things-factory/operato-license-checker','map','split','from','394703xfjOeC','defineProperty','(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)','32193GidoGE','checkStudioPermission','55HwQfXW','ERROR_CODES','1769181XXNJpv','426NmmxHy','379516hPkLyT','menu','730GBVBYo','2712KgShYS','Menu','checkTarget','select','78078FowQAi','26559JpFEwm'];a0_0x21de=function(){return _0x48c6b5;};return a0_0x21de();}Object[a0_0x8ca0d8(0x6a)](exports,'__esModule',{'value':!0x0}),exports[a0_0x8ca0d8(0x83)]=exports[a0_0x8ca0d8(0x6d)]=void 0x0;const operato_license_checker_1=require(a0_0x8ca0d8(0x8a)),shell_1=require(a0_0x8ca0d8(0x7e)),menu_base_1=require(a0_0x8ca0d8(0x88)),license_error_1=require('../../errors/license-error');async function checkStudioPermission(){const _0xf0e3f7=a0_0x8ca0d8;let _0x308242=((0x0,operato_license_checker_1[_0xf0e3f7(0x82)])('Permissions\x20For\x20Tailor\x20Tool')||',')[_0xf0e3f7(0x8c)](',')[_0xf0e3f7(0x8b)](_0x35096b=>_0x35096b[_0xf0e3f7(0x86)]()),_0x4e8ddb=!0x1;return _0x308242['forEach'](_0x42b46a=>{const _0x3af492=_0xf0e3f7;_0x42b46a[_0x3af492(0x81)](_0x3af492(0x89))&&(_0x4e8ddb=!0x0);}),_0x4e8ddb;}async function checkStudioTemplateIsOverLimit(_0x2ac6f9,_0x4e2e91){const _0x42a0ea=a0_0x8ca0d8;if(0x0==await checkStudioPermission())throw new license_error_1[(_0x42a0ea(0x7b))]({'errorCode':_0x4e2e91['t'](license_error_1[_0x42a0ea(0x7b)][_0x42a0ea(0x6f)][_0x42a0ea(0x7c)])});var _0x59bd2a=0x0;if(_0x59bd2a=_0x2ac6f9&&''!=_0x2ac6f9?await(0x0,shell_1[_0x42a0ea(0x80)])(menu_base_1['Menu'])['manager']['createQueryBuilder']()[_0x42a0ea(0x78)](_0x42a0ea(0x73))['from'](menu_base_1[_0x42a0ea(0x76)],_0x42a0ea(0x73))[_0x42a0ea(0x85)](_0x42a0ea(0x7d),{'id':_0x2ac6f9})['andWhere'](_0x42a0ea(0x6b))[_0x42a0ea(0x87)]()+0x1:await(0x0,shell_1[_0x42a0ea(0x80)])(menu_base_1[_0x42a0ea(0x76)])[_0x42a0ea(0x7f)]['createQueryBuilder']()[_0x42a0ea(0x78)](_0x42a0ea(0x73))[_0x42a0ea(0x8d)](menu_base_1[_0x42a0ea(0x76)],_0x42a0ea(0x73))[_0x42a0ea(0x85)](_0x42a0ea(0x6b))[_0x42a0ea(0x87)]()+0x1,!(0x0,operato_license_checker_1[_0x42a0ea(0x77)])(_0x59bd2a))throw new license_error_1[(_0x42a0ea(0x7b))]({'errorCode':_0x4e2e91['t'](license_error_1['LicenseError'][_0x42a0ea(0x6f)]['OVER_LIMIT'])});return!0x0;}exports['checkStudioPermission']=checkStudioPermission,exports[a0_0x8ca0d8(0x83)]=checkStudioTemplateIsOverLimit;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0xd41327=a0_0x2188;(function(_0x1b5700,_0x57c33b){const _0x353804=a0_0x2188,_0x4cc2a8=_0x1b5700();while(!![]){try{const _0x3c1d06=-parseInt(_0x353804(0x122))/0x1+parseInt(_0x353804(0x135))/0x2+parseInt(_0x353804(0x130))/0x3*(parseInt(_0x353804(0x126))/0x4)+parseInt(_0x353804(0x138))/0x5+parseInt(_0x353804(0x134))/0x6*(parseInt(_0x353804(0x137))/0x7)+parseInt(_0x353804(0x139))/0x8+-parseInt(_0x353804(0x12f))/0x9;if(_0x3c1d06===_0x57c33b)break;else _0x4cc2a8['push'](_0x4cc2a8['shift']());}catch(_0x76931e){_0x4cc2a8['push'](_0x4cc2a8['shift']());}}}(a0_0x20ee,0x5e858));Object[a0_0xd41327(0x125)](exports,a0_0xd41327(0x12c),{'value':!0x0}),exports[a0_0xd41327(0x128)]=void 0x0;function a0_0x20ee(){const _0x20d87b=['7zDAvcG','3399280lzZvDG','6031864lxQFGs','__param','prototype','./tool-permission','design:returntype','studioTemplateIsOverLimit','766834LspQZs','checkStudioTemplateIsOverLimit','tslib','defineProperty','82564ttsqCE','__metadata','OperatoToolResolver','Ctx','Resolver','Arg','__esModule','design:paramtypes','__decorate','15763959IrvUIA','27XmlkKD','checkStudioPermission','Query','design:type','3296160UOmSUY','1473154aHcyNt','studioPermission'];a0_0x20ee=function(){return _0x20d87b;};return a0_0x20ee();}function a0_0x2188(_0x174c64,_0x42f86b){const _0x20ee82=a0_0x20ee();return a0_0x2188=function(_0x2188b8,_0x5dd03e){_0x2188b8=_0x2188b8-0x121;let _0x284b2f=_0x20ee82[_0x2188b8];return _0x284b2f;},a0_0x2188(_0x174c64,_0x42f86b);}const tslib_1=require(a0_0xd41327(0x124)),type_graphql_1=require('type-graphql'),tool_permission_1=require(a0_0xd41327(0x13c));let OperatoToolResolver=class{async[a0_0xd41327(0x136)](_0x4c9a8c){const _0x1ac5ce=a0_0xd41327;return(0x0,tool_permission_1[_0x1ac5ce(0x131)])();}async['studioTemplateIsOverLimit'](_0xb690e3,_0x128ecc){const _0x3b603d=a0_0xd41327;return(0x0,tool_permission_1[_0x3b603d(0x123)])(_0xb690e3,_0x128ecc);}};tslib_1[a0_0xd41327(0x12e)]([(0x0,type_graphql_1['Query'])(_0x46e17=>Boolean,{'description':'Operato\x20Tool\x20Studio\x20Usage\x20Permissions'}),tslib_1[a0_0xd41327(0x13a)](0x0,(0x0,type_graphql_1[a0_0xd41327(0x129)])()),tslib_1[a0_0xd41327(0x127)](a0_0xd41327(0x133),Function),tslib_1[a0_0xd41327(0x127)](a0_0xd41327(0x12d),[Object]),tslib_1[a0_0xd41327(0x127)]('design:returntype',Promise)],OperatoToolResolver['prototype'],a0_0xd41327(0x136),null),tslib_1[a0_0xd41327(0x12e)]([(0x0,type_graphql_1[a0_0xd41327(0x132)])(_0x4cd3d6=>Boolean,{'description':'Operato\x20Tool\x20Studio\x20Limit\x20check'}),tslib_1[a0_0xd41327(0x13a)](0x0,(0x0,type_graphql_1[a0_0xd41327(0x12b)])('id')),tslib_1[a0_0xd41327(0x13a)](0x1,(0x0,type_graphql_1[a0_0xd41327(0x129)])()),tslib_1['__metadata']('design:type',Function),tslib_1[a0_0xd41327(0x127)](a0_0xd41327(0x12d),[String,Object]),tslib_1[a0_0xd41327(0x127)](a0_0xd41327(0x13d),Promise)],OperatoToolResolver[a0_0xd41327(0x13b)],a0_0xd41327(0x121),null),OperatoToolResolver=tslib_1[a0_0xd41327(0x12e)]([(0x0,type_graphql_1[a0_0xd41327(0x12a)])()],OperatoToolResolver),exports[a0_0xd41327(0x128)]=OperatoToolResolver;
|