@things-factory/operato-tools 6.0.108 → 6.0.110
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 +12 -12
- 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';
|
|
1
|
+
'use strict';const a0_0x22ef10=a0_0x4fd5;(function(_0x3ec1c3,_0x2c1663){const _0x43d2a1=a0_0x4fd5,_0x23dde7=_0x3ec1c3();while(!![]){try{const _0xf9c776=parseInt(_0x43d2a1(0x7d))/0x1*(parseInt(_0x43d2a1(0x80))/0x2)+parseInt(_0x43d2a1(0x8c))/0x3*(-parseInt(_0x43d2a1(0x7b))/0x4)+-parseInt(_0x43d2a1(0x8a))/0x5*(parseInt(_0x43d2a1(0x8b))/0x6)+parseInt(_0x43d2a1(0x86))/0x7+parseInt(_0x43d2a1(0x83))/0x8*(-parseInt(_0x43d2a1(0x81))/0x9)+-parseInt(_0x43d2a1(0x89))/0xa*(parseInt(_0x43d2a1(0x8e))/0xb)+-parseInt(_0x43d2a1(0x87))/0xc*(-parseInt(_0x43d2a1(0x82))/0xd);if(_0xf9c776===_0x2c1663)break;else _0x23dde7['push'](_0x23dde7['shift']());}catch(_0x1d82d1){_0x23dde7['push'](_0x23dde7['shift']());}}}(a0_0xa174,0x6ca80));Object['defineProperty'](exports,a0_0x22ef10(0x84),{'value':!0x0}),exports['LicenseError']=void 0x0;function a0_0x4fd5(_0x2bf108,_0x22dc32){const _0xa17424=a0_0xa174();return a0_0x4fd5=function(_0x4fd5b3,_0x34fc49){_0x4fd5b3=_0x4fd5b3-0x7a;let _0x59b207=_0xa17424[_0x4fd5b3];return _0x59b207;},a0_0x4fd5(_0x2bf108,_0x22dc32);}function a0_0xa174(){const _0x22785f=['license-error','1663557GfJaov','5861544mGZYUk','ERROR_CODES','2305590aqyoRO','14415xiCawE','114KcsOWb','6759YxNKPO','LicenseError','22CnqFaY','errorCode','name','492bQijih','assign','1gAvDHE','detail','__importStar','1592852youbXo','6956379ftwJUV','26SlBdhu','8pcceCt','__esModule'];a0_0xa174=function(){return _0x22785f;};return a0_0xa174();}const tslib_1=require('tslib'),ERROR_CODES=tslib_1[a0_0x22ef10(0x7f)](require('../constants/error-code'));class LicenseError extends Error{static get[a0_0x22ef10(0x88)](){const _0x43e6b9=a0_0x22ef10;return Object[_0x43e6b9(0x7c)]({},ERROR_CODES);}constructor({errorCode:_0x53ac29,detail:_0x478608}){const _0x2fb56c=a0_0x22ef10;super(_0x53ac29),this[_0x2fb56c(0x7a)]=_0x2fb56c(0x85),this[_0x2fb56c(0x8f)]=_0x53ac29,this[_0x2fb56c(0x7e)]=_0x478608;}}exports[a0_0x22ef10(0x8d)]=LicenseError;
|
package/server/routes.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a0_0xfeae5b=a0_0x4d8a;function a0_0x4d8a(_0x3452d0,_0x567fab){const _0x35b36d=a0_0x35b3();return a0_0x4d8a=function(_0x4d8ab5,_0x5c157b){_0x4d8ab5=_0x4d8ab5-0x133;let _0x27f4f2=_0x35b36d[_0x4d8ab5];return _0x27f4f2;},a0_0x4d8a(_0x3452d0,_0x567fab);}(function(_0x7a1131,_0x1c3dde){const _0x1a97e6=a0_0x4d8a,_0x2197ba=_0x7a1131();while(!![]){try{const _0x23fe55=-parseInt(_0x1a97e6(0x136))/0x1+parseInt(_0x1a97e6(0x139))/0x2+-parseInt(_0x1a97e6(0x133))/0x3+-parseInt(_0x1a97e6(0x135))/0x4+-parseInt(_0x1a97e6(0x13d))/0x5+parseInt(_0x1a97e6(0x134))/0x6*(parseInt(_0x1a97e6(0x13e))/0x7)+parseInt(_0x1a97e6(0x137))/0x8;if(_0x23fe55===_0x1c3dde)break;else _0x2197ba['push'](_0x2197ba['shift']());}catch(_0x32a523){_0x2197ba['push'](_0x2197ba['shift']());}}}(a0_0x35b3,0x7b741));function a0_0x35b3(){const _0x4adc6a=['388326sqAzNh','bootstrap-module-domain-public-route','things-factory:operato-tools:routes','debug','428815hJsLZo','36638WJZsGY','bootstrap-module-domain-private-route','875784ajwfuC','150GBDRga','2319908hDzaMW','357194LnVfrC','11964112CAfUiX','bootstrap-module-global-private-route'];a0_0x35b3=function(){return _0x4adc6a;};return a0_0x35b3();}const debug=require(a0_0xfeae5b(0x13c))(a0_0xfeae5b(0x13b));process['on']('bootstrap-module-global-public-route',(_0x5680fd,_0x37afcd)=>{}),process['on'](a0_0xfeae5b(0x138),(_0x14a208,_0x51609a)=>{}),process['on'](a0_0xfeae5b(0x13a),(_0x32bd55,_0x39ef45)=>{}),process['on'](a0_0xfeae5b(0x13f),(_0x240d71,_0x256e0c)=>{});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x1601d4=a0_0x5df9;(function(_0x23958d,_0x164413){const _0x3e16a0=a0_0x5df9,_0x380a59=_0x23958d();while(!![]){try{const _0x3008f0=parseInt(_0x3e16a0(0x1e8))/0x1*(parseInt(_0x3e16a0(0x1a3))/0x2)+-parseInt(_0x3e16a0(0x18b))/0x3*(parseInt(_0x3e16a0(0x1ca))/0x4)+parseInt(_0x3e16a0(0x19a))/0x5+-parseInt(_0x3e16a0(0x1db))/0x6+-parseInt(_0x3e16a0(0x17f))/0x7+-parseInt(_0x3e16a0(0x196))/0x8*(parseInt(_0x3e16a0(0x1af))/0x9)+parseInt(_0x3e16a0(0x1d4))/0xa*(parseInt(_0x3e16a0(0x1ad))/0xb);if(_0x3008f0===_0x164413)break;else _0x380a59['push'](_0x380a59['shift']());}catch(_0x14f485){_0x380a59['push'](_0x380a59['shift']());}}}(a0_0xe156,0x95286));function a0_0xe156(){const _0xf7b4d2=['@things-factory/menu-base','save','from',',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22','lodash','createSearchCols','readonly','dataProp','aes-256-ctr','createCipheriv','aes-256-cfb8','__metadata','code','28ppecgn','getRepository','updated_at','updatedAt','type-graphql','\x22,\x22desc\x22:','updater','createGridColumns','randomBytes','__param','4390SmyNWv','Resolver','createSortCols','JSON','\x22,\x22hidden\x22:','\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}','Directive','6172266TWRPqq','{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22','aes-256-cfb1','\x22,\x22header\x22:\x20\x22','\x20,\x22exportable\x22:\x20true','string','searchRank','findOne','join','resourceUrl',',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22','hiddenFlag','substring','82ajktlW','select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27','length','created_at','\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22basic\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22label\x22:\x20\x22data_history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22icon\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22logic\x22:\x20\x22history_json\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20','OperatoToolCreateMenu','category','final','{\x22name\x22:\x22','./../tool-secret/tool-permission',',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22','4610956Taguny','stringify','sortRank','template','refName','{\x22name\x22:\x20\x22','__esModule','Menu','default','aes256',',\x22mandatory\x22:\x20','rank','77664bjFOZF','COPY','routing','design:paramtypes','\x27\x20or\x20id\x20=\x20\x27','hex','hidden','replace','prototype','query','reverseSort','384464ABswZA','left','sort','push','4484260YXJhnX','\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','menuType','name','Mutation','checkStudioTemplateIsOverLimit','createMenuData','filter','Operato\x20Tool\x20Create\x20Menu','5138EKVLJS','split','defineProperty','@transaction','{\x22type\x22:\x20\x22','\x20,\x22editable\x22:\x20','creator','toolCreateMenu','gridRank','Arg','53647JSZhgP','aes-256-cfb','144IkDDtW','tslib','enc','creator_id','refType','\x22,\x22operator\x22:\x20\x22','map','toString','pluralize','EntityColumn','updater_id','entity','{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22','meta-grist-page'];a0_0xe156=function(){return _0xf7b4d2;};return a0_0xe156();}function a0_0x5df9(_0x5d0d93,_0x4e60e8){const _0xe1567f=a0_0xe156();return a0_0x5df9=function(_0x5df92f,_0x3aa8b4){_0x5df92f=_0x5df92f-0x17d;let _0xf4e183=_0xe1567f[_0x5df92f];return _0xf4e183;},a0_0x5df9(_0x5d0d93,_0x4e60e8);}Object[a0_0x1601d4(0x1a5)](exports,a0_0x1601d4(0x185),{'value':!0x0}),exports[a0_0x1601d4(0x1ed)]=void 0x0;const tslib_1=require(a0_0x1601d4(0x1b0)),type_graphql_1=require(a0_0x1601d4(0x1ce)),resource_base_1=require('@things-factory/resource-base'),menu_base_1=require(a0_0x1601d4(0x1bd)),tool_permission_1=require(a0_0x1601d4(0x17d)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x1601d4(0x1c1)),{plural:plural}=require(a0_0x1601d4(0x1b7)),crypto_1=tslib_1['__importDefault'](require('crypto'));let OperatoToolCreateMenu=class{async['toolCreateMenu'](_0x476639,_0x1a6461,_0xb4fa9e){const _0x3051b0=a0_0x1601d4,{domain:_0x22329b,user:_0x5b665b,tx:_0x1f3998}=_0xb4fa9e['state'];await(0x0,tool_permission_1[_0x3051b0(0x19f)])('',_0xb4fa9e);const _0xd71549=await _0x1f3998['getRepository'](resource_base_1['Entity'])['findOne']({'where':{'domain':{'id':_0x22329b['id']},'id':_0x476639}}),_0x2e3f2f=await _0x1f3998[_0x3051b0(0x1cb)](resource_base_1[_0x3051b0(0x1b8)])['find']({'where':{'domain':{'id':_0x22329b['id']},'entity':{'id':_0xd71549['id']}}});let {name:_0x45f3f3=''}=_0xd71549||{},_0x20088c=kebabCase(_0x45f3f3),_0x5081b0=modelTemplate[_0x3051b0(0x192)](/{{pascalCase name}}/g,startCase(camelCase(_0x45f3f3))[_0x3051b0(0x192)](/ /g,''))[_0x3051b0(0x192)](/{{camelCase name}}/g,camelCase(_0x45f3f3))[_0x3051b0(0x192)](/{{snakeCase name}}/g,snakeCase(_0x45f3f3))[_0x3051b0(0x192)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x45f3f3)))['replace'](/ /g,''))[_0x3051b0(0x192)](/{{pluralCamelCase name}}/g,camelCase(plural(_0x45f3f3)))[_0x3051b0(0x192)](/{{name}}/g,_0x45f3f3),_0x4ad8a8='';_0x3051b0(0x1d7)==_0xd71549[_0x3051b0(0x1c4)]?_0x4ad8a8=_0x3051b0(0x1ec):_0x3051b0(0x18c)==_0xd71549[_0x3051b0(0x1c4)]&&(_0x4ad8a8=_0x3051b0(0x19b)),_0x5081b0=_0x5081b0[_0x3051b0(0x192)](/{{HistoryButton}}/g,_0x4ad8a8);let _0x39ece9=this[_0x3051b0(0x1d6)](_0x2e3f2f);_0x5081b0=_0x5081b0[_0x3051b0(0x192)](/{{SortColumns}}/g,_0x39ece9[_0x3051b0(0x1e3)](','));let _0x27f528=this[_0x3051b0(0x1c2)](_0x2e3f2f);_0x5081b0=_0x5081b0['replace'](/{{SearchColumns}}/g,_0x27f528[_0x3051b0(0x1e3)](','));let _0x1ef711=this[_0x3051b0(0x1d1)](_0x2e3f2f);return _0x5081b0=_0x5081b0[_0x3051b0(0x192)](/{{GridColumns}}/g,_0x1ef711[_0x3051b0(0x1e3)](',')),_0x5081b0=this[_0x3051b0(0x1b1)](_0x5081b0),await this['createMenuData'](_0x1f3998,_0x22329b,_0x5b665b,_0x1a6461,_0x20088c,_0x5081b0),!0x0;}[a0_0x1601d4(0x1d1)](_0x4ac7dd){const _0x33ad57=a0_0x1601d4;return _0x4ac7dd['filter'](_0x1ec99a=>'id'!=_0x1ec99a[_0x33ad57(0x19d)]&&_0x1ec99a[_0x33ad57(0x1ab)]>0x0)[_0x33ad57(0x198)](function(_0x5deea0,_0x2175cf){const _0x120060=_0x33ad57;return _0x5deea0[_0x120060(0x1ab)]-_0x2175cf[_0x120060(0x1ab)];})[_0x33ad57(0x1b5)](_0x1d369d=>{const _0x3ca664=_0x33ad57;let {gridEditor:_0x5e4c65='string',name:_0x2b5b1b,term:_0xfc61b8,gridWidth:_0xa2c23d=0x0,gridAlign:_0x323e19=_0x3ca664(0x197),nullable:_0x13700c=!0x1}=_0x1d369d;if(null==_0x5e4c65&&(_0x5e4c65=_0x3ca664(0x1e0)),null==_0x323e19&&(_0x323e19=_0x3ca664(0x197)),'updater_id'==_0x2b5b1b||_0x3ca664(0x1b2)==_0x2b5b1b)return _0x2b5b1b=_0x3ca664(0x1b9)==_0x2b5b1b?_0x3ca664(0x1d0):_0x3ca664(0x1a9),_0x3ca664(0x1dc)+_0x2b5b1b+'\x22,\x22header\x22:\x20\x22'+_0x2b5b1b+'\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}';if('updated_at'==_0x2b5b1b||_0x3ca664(0x1eb)==_0x2b5b1b)return _0x3ca664(0x1bb)+(_0x3ca664(0x1cc)==_0x2b5b1b?_0x3ca664(0x1cd):'createdAt')+_0x3ca664(0x1de)+_0x2b5b1b+_0x3ca664(0x1d9);let _0x254ea7=_0x3ca664(0x1c3)!=_0x5e4c65&&_0x3ca664(0x191)!=_0x5e4c65,_0x3ca0ef=_0x3ca664(0x191)==_0x5e4c65;0x1!=_0x3ca0ef&&0x0!=_0x254ea7||(_0x5e4c65=_0x3ca664(0x1e0));let _0x320896=_0x3ca664(0x1a7)+_0x5e4c65+'\x22,\x22name\x22:\x20\x22'+camelCase(_0x2b5b1b)+'\x22,\x22header\x22:\x20\x22'+_0xfc61b8+_0x3ca664(0x1d8)+_0x3ca0ef+_0x3ca664(0x1a8)+_0x254ea7+_0x3ca664(0x189)+!_0x13700c+_0x3ca664(0x1e5)+_0x323e19+'\x22,\x22width\x22:'+_0xa2c23d+_0x3ca664(0x1df);return _0x3ca664(0x1c9)==_0x1d369d[_0x3ca664(0x1b3)]&&(_0x320896+=_0x3ca664(0x17e)+_0x1d369d[_0x3ca664(0x183)]+'\x22}'),'scenario'==_0x1d369d[_0x3ca664(0x1b3)]&&(_0x320896+=',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22'+_0x1d369d[_0x3ca664(0x183)]+'\x22}'),_0x3ca664(0x1ba)==_0x1d369d['refType']&&(_0x320896+=_0x3ca664(0x1c0)+camelCase(plural(_0x1d369d['refName']))+'\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}'),_0x320896+='}',_0x320896;});}[a0_0x1601d4(0x1c2)](_0x3ca246){const _0x5f08da=a0_0x1601d4;return _0x3ca246[_0x5f08da(0x1a1)](_0x461231=>_0x461231[_0x5f08da(0x1e1)]>0x0)[_0x5f08da(0x198)](function(_0x24e4a9,_0x5daf95){const _0x515b6c=_0x5f08da;return _0x24e4a9[_0x515b6c(0x1e1)]-_0x5daf95[_0x515b6c(0x1e1)];})[_0x5f08da(0x1b5)](_0x21682a=>{const _0x3e7b2c=_0x5f08da;let _0x12c5e6=_0x21682a['searchOper'];return _0x3e7b2c(0x1a1)==_0x12c5e6?'\x22'+camelCase(_0x21682a['name'])+'\x22':(_0x12c5e6||(_0x12c5e6='eq'),_0x3e7b2c(0x184)+camelCase(_0x21682a[_0x3e7b2c(0x19d)])+_0x3e7b2c(0x1b4)+_0x12c5e6+'\x22}');});}[a0_0x1601d4(0x1d6)](_0x3a6f57){const _0x3a0c69=a0_0x1601d4;return _0x3a6f57['filter'](_0x25f688=>_0x25f688[_0x3a0c69(0x181)]>0x0)[_0x3a0c69(0x198)](function(_0x154310,_0x231bda){const _0x5b6237=_0x3a0c69;return _0x154310[_0x5b6237(0x181)]-_0x231bda[_0x5b6237(0x181)];})[_0x3a0c69(0x1b5)](_0x25c555=>_0x3a0c69(0x1f0)+camelCase(_0x25c555[_0x3a0c69(0x19d)])+_0x3a0c69(0x1cf)+_0x25c555[_0x3a0c69(0x195)]+'}');}async[a0_0x1601d4(0x1a0)](_0x26b69f,_0x279c21,_0x283adc,_0x2e9a7a,_0x47441c,_0x2b3e38){const _0x516956=a0_0x1601d4;let _0x2f0cde=await _0x26b69f[_0x516956(0x1cb)](menu_base_1[_0x516956(0x186)])[_0x516956(0x1e2)]({'where':{'domain':{'id':_0x279c21['id']},'id':_0x2e9a7a}}),_0x48390a=(await _0x26b69f[_0x516956(0x1cb)](menu_base_1[_0x516956(0x186)])[_0x516956(0x194)](_0x516956(0x1e9)+_0x2e9a7a+_0x516956(0x18f)+_0x2e9a7a+'\x27'))[0x0][_0x516956(0x18a)]+0xa,_0x350487=new menu_base_1[(_0x516956(0x186))]();_0x350487[_0x516956(0x19d)]=_0x47441c,_0x350487[_0x516956(0x19c)]='SCREEN',_0x350487[_0x516956(0x1ee)]=_0x516956(0x1bc),_0x350487['rank']=_0x48390a,_0x350487[_0x516956(0x1e6)]=!0x1,_0x350487[_0x516956(0x18d)]=_0x47441c,_0x350487[_0x516956(0x182)]=_0x2b3e38,_0x350487[_0x516956(0x1e4)]='@things-factory/meta-ui/client/pages/meta-grist-page',_0x350487['parent']=_0x2f0cde,await _0x26b69f[_0x516956(0x1cb)](menu_base_1[_0x516956(0x186)])[_0x516956(0x1be)](Object['assign'](Object['assign']({},_0x350487),{'domain':_0x279c21,'creator':_0x283adc,'updater':_0x283adc}));}[a0_0x1601d4(0x1b1)](_0xf8175){const _0x5a63f2=a0_0x1601d4;let _0x5cd8b3=JSON[_0x5a63f2(0x180)](_0xf8175)[_0x5a63f2(0x1a4)](/(.{100})/)['filter'](_0x372987=>_0x372987),_0x473745=['aes-256-ecb','aes-256-cbc',_0x5a63f2(0x1ae),_0x5a63f2(0x1c7),_0x5a63f2(0x1dd),'aes-256-ofb',_0x5a63f2(0x1c5),_0x5a63f2(0x188)],_0x4a2701=crypto_1[_0x5a63f2(0x187)][_0x5a63f2(0x1d2)](0x20)[_0x5a63f2(0x1b6)](_0x5a63f2(0x190)),_0x1542df=Buffer[_0x5a63f2(0x1bf)](_0x4a2701,_0x5a63f2(0x190)),_0x5a219b=_0x4a2701[_0x5a63f2(0x1e7)](0x0,0x10),_0x393cbf=['',_0x5a219b,_0x5a219b,_0x5a219b,_0x5a219b,_0x5a219b,_0x5a219b,_0x5a219b],_0xd4cee8=0x0,_0x3560e4=[];_0x3560e4[_0x5a63f2(0x199)](_0x4a2701);for(var _0xf4b983=0x0;_0xf4b983<_0x5cd8b3[_0x5a63f2(0x1ea)];_0xf4b983++,_0xd4cee8++){_0xd4cee8==_0x473745['length']&&(_0xd4cee8=0x0);let _0x2d91e6=crypto_1[_0x5a63f2(0x187)][_0x5a63f2(0x1c6)](_0x473745[_0xd4cee8],_0x1542df,_0x393cbf[_0xd4cee8]),_0x44d2b1=_0x2d91e6['update'](_0x5cd8b3[_0xf4b983],'utf8',_0x5a63f2(0x190));_0x44d2b1+=_0x2d91e6[_0x5a63f2(0x1ef)]('hex'),_0x3560e4['push'](_0x44d2b1);}return _0x3560e4['join']('h1z0q9i9x7q6');}};tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x1601d4(0x1da)])(a0_0x1601d4(0x1a6)),(0x0,type_graphql_1[a0_0x1601d4(0x19e)])(_0x185bf9=>Boolean,{'description':a0_0x1601d4(0x1a2)}),tslib_1[a0_0x1601d4(0x1d3)](0x0,(0x0,type_graphql_1['Arg'])('id')),tslib_1['__param'](0x1,(0x0,type_graphql_1[a0_0x1601d4(0x1ac)])('parent_menu_id')),tslib_1[a0_0x1601d4(0x1d3)](0x2,(0x0,type_graphql_1['Ctx'])()),tslib_1['__metadata']('design:type',Function),tslib_1['__metadata'](a0_0x1601d4(0x18e),[String,String,Object]),tslib_1[a0_0x1601d4(0x1c8)]('design:returntype',Promise)],OperatoToolCreateMenu[a0_0x1601d4(0x193)],a0_0x1601d4(0x1aa),null),OperatoToolCreateMenu=tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x1601d4(0x1d5)])()],OperatoToolCreateMenu),exports[a0_0x1601d4(0x1ed)]=OperatoToolCreateMenu;const modelTemplate='\x0a{\x0a\x20\x20\x22menu\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x22title\x22:\x20\x22{{name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22\x22,\x0a\x20\x20\x20\x20\x20\x20\x22desc\x22:\x20\x22\x22\x0a\x20\x20},\x0a\x20\x20\x22gql\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x22query\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22list_func\x22:\x20\x22{{pluralCamelCase\x20name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22find_one_func\x22:\x22{{camelCase\x20name}}\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x22mutation\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22multiple\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22func\x22:\x22updateMultiple{{pascalCase\x20name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22{{pascalCase\x20name}}Patch\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22delete\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22func\x22:\x22delete{{pluralPascalCase\x20name}}\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20},\x0a\x20\x20\x22button\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22export\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22add\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22delete\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22save\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20],\x0a\x20\x20\x22grid_column\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22string\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22id\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22header\x22:\x20\x22id\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22hidden\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22editable\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22mandatory\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22sortable\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22align\x22:\x20\x22left\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22width\x22:\x200,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22exportable\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20},\x0a{{GridColumns}}\x0a\x20\x20],\x0a\x20\x20\x22grid\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22button\x22:[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{{HistoryButton}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22option\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22mobile_mode\x22:\x20\x22LIST\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22desk_mode\x22:\x20\x22GRID\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22use_row_checker\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22pages\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2020,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2050,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20100,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20300\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22view_mode\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22GRID\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22LIST\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22CARD\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22sorters\x22:\x20[\x0a{{SortColumns}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20]\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x22row\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22multiple_select\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22click\x22:\x20\x22select-row-toggle\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20},\x0a\x20\x20\x22search\x22:\x20[\x0a{{SearchColumns}}\x0a\x20\x20]\x0a}\x0a';
|
|
1
|
+
'use strict';function a0_0x3c2e(_0x3d25e4,_0x5e01d8){const _0x3c7fe6=a0_0x3c7f();return a0_0x3c2e=function(_0x3c2edf,_0x54023a){_0x3c2edf=_0x3c2edf-0x1ef;let _0x5c5189=_0x3c7fe6[_0x3c2edf];return _0x5c5189;},a0_0x3c2e(_0x3d25e4,_0x5e01d8);}const a0_0x498352=a0_0x3c2e;function a0_0x3c7f(){const _0x443212=['hex','__esModule','{\x22type\x22:\x20\x22','push','\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}',',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22','Menu','toolCreateMenu','5736245nzIrfL','Entity','save','{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22','updated_at','stringify','3412341EBLAdW','@things-factory/meta-ui/client/pages/meta-grist-page','hidden','h1z0q9i9x7q6','created_at','findOne','join','createGridColumns','getRepository','template','hiddenFlag','dataProp',',\x22mandatory\x22:\x20','__metadata','searchRank','aes-256-cfb','1698528irRhqj','aes-256-cfb8','creator','updater','lodash','\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}','string','gridRank','\x22,\x22header\x22:\x20\x22','createSortCols','name','@transaction','replace','reverseSort','checkStudioTemplateIsOverLimit','crypto','\x22,\x22operator\x22:\x20\x22','left','{\x22name\x22:\x20\x22','menuType','map','aes-256-cbc','createdAt','refName','refType','randomBytes','sortRank',',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22','assign','aes-256-ofb','\x22,\x22width\x22:','tslib','rank','769010rDUaVY','defineProperty','\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','\x22,\x22name\x22:\x20\x22','substring','routing','pluralize','meta-grist-page','category','aes-256-ctr','477077PfbVZp','code','\x20,\x22editable\x22:\x20','SCREEN','Directive','OperatoToolCreateMenu','Mutation','length','Operato\x20Tool\x20Create\x20Menu','find','50pnBxSc','@things-factory/menu-base','resourceUrl','updater_id','type-graphql','__param','6oQfcQz','filter','final','sort','query','prototype','\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','28637jYWuhy','COPY','224HJcFNy','\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','__decorate','design:paramtypes','utf8','__importDefault','./../tool-secret/tool-permission','scenario','{\x22name\x22:\x22','createMenuData','\x27\x20or\x20id\x20=\x20\x27','\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}','state','\x22,\x22hidden\x22:','design:returntype','createCipheriv','toString','searchOper','840UyhFjf','creator_id','@things-factory/resource-base','createSearchCols','12423fqaOdx'];a0_0x3c7f=function(){return _0x443212;};return a0_0x3c7f();}(function(_0x690820,_0x414216){const _0xd9a672=a0_0x3c2e,_0x1d067b=_0x690820();while(!![]){try{const _0x1ac5dc=parseInt(_0xd9a672(0x256))/0x1*(parseInt(_0xd9a672(0x266))/0x2)+-parseInt(_0xd9a672(0x20c))/0x3*(-parseInt(_0xd9a672(0x1f6))/0x4)+-parseInt(_0xd9a672(0x215))/0x5+-parseInt(_0xd9a672(0x208))/0x6*(parseInt(_0xd9a672(0x1f4))/0x7)+parseInt(_0xd9a672(0x22b))/0x8+parseInt(_0xd9a672(0x21b))/0x9+parseInt(_0xd9a672(0x260))/0xa*(parseInt(_0xd9a672(0x24c))/0xb);if(_0x1ac5dc===_0x414216)break;else _0x1d067b['push'](_0x1d067b['shift']());}catch(_0x41ed17){_0x1d067b['push'](_0x1d067b['shift']());}}}(a0_0x3c7f,0xd7db9));Object[a0_0x498352(0x24d)](exports,a0_0x498352(0x20e),{'value':!0x0}),exports['OperatoToolCreateMenu']=void 0x0;const tslib_1=require(a0_0x498352(0x24a)),type_graphql_1=require(a0_0x498352(0x264)),resource_base_1=require(a0_0x498352(0x20a)),menu_base_1=require(a0_0x498352(0x261)),tool_permission_1=require(a0_0x498352(0x1fc)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x498352(0x22f)),{plural:plural}=require(a0_0x498352(0x252)),crypto_1=tslib_1[a0_0x498352(0x1fb)](require(a0_0x498352(0x23a)));let OperatoToolCreateMenu=class{async[a0_0x498352(0x214)](_0x38cb4a,_0x561264,_0x7e2c93){const _0x3e20a1=a0_0x498352,{domain:_0x30a111,user:_0xe42524,tx:_0x23e1c0}=_0x7e2c93[_0x3e20a1(0x202)];await(0x0,tool_permission_1[_0x3e20a1(0x239)])('',_0x7e2c93);const _0x1257aa=await _0x23e1c0['getRepository'](resource_base_1[_0x3e20a1(0x216)])['findOne']({'where':{'domain':{'id':_0x30a111['id']},'id':_0x38cb4a}}),_0x2f3a45=await _0x23e1c0[_0x3e20a1(0x223)](resource_base_1['EntityColumn'])[_0x3e20a1(0x25f)]({'where':{'domain':{'id':_0x30a111['id']},'entity':{'id':_0x1257aa['id']}}});let {name:_0x1df4a9=''}=_0x1257aa||{},_0x439454=kebabCase(_0x1df4a9),_0x2db91f=modelTemplate[_0x3e20a1(0x237)](/{{pascalCase name}}/g,startCase(camelCase(_0x1df4a9))[_0x3e20a1(0x237)](/ /g,''))[_0x3e20a1(0x237)](/{{camelCase name}}/g,camelCase(_0x1df4a9))['replace'](/{{snakeCase name}}/g,snakeCase(_0x1df4a9))['replace'](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x1df4a9)))[_0x3e20a1(0x237)](/ /g,''))[_0x3e20a1(0x237)](/{{pluralCamelCase name}}/g,camelCase(plural(_0x1df4a9)))[_0x3e20a1(0x237)](/{{name}}/g,_0x1df4a9),_0x24bb9a='';'JSON'==_0x1257aa[_0x3e20a1(0x226)]?_0x24bb9a=_0x3e20a1(0x1f3):_0x3e20a1(0x1f5)==_0x1257aa[_0x3e20a1(0x226)]&&(_0x24bb9a=_0x3e20a1(0x1f7)),_0x2db91f=_0x2db91f[_0x3e20a1(0x237)](/{{HistoryButton}}/g,_0x24bb9a);let _0x5e81aa=this[_0x3e20a1(0x234)](_0x2f3a45);_0x2db91f=_0x2db91f['replace'](/{{SortColumns}}/g,_0x5e81aa[_0x3e20a1(0x221)](','));let _0x46d9d8=this[_0x3e20a1(0x20b)](_0x2f3a45);_0x2db91f=_0x2db91f['replace'](/{{SearchColumns}}/g,_0x46d9d8[_0x3e20a1(0x221)](','));let _0x4d34ae=this['createGridColumns'](_0x2f3a45);return _0x2db91f=_0x2db91f[_0x3e20a1(0x237)](/{{GridColumns}}/g,_0x4d34ae[_0x3e20a1(0x221)](',')),_0x2db91f=this['enc'](_0x2db91f),await this['createMenuData'](_0x23e1c0,_0x30a111,_0xe42524,_0x561264,_0x439454,_0x2db91f),!0x0;}[a0_0x498352(0x222)](_0x500989){const _0x2558ce=a0_0x498352;return _0x500989[_0x2558ce(0x267)](_0x333371=>'id'!=_0x333371[_0x2558ce(0x235)]&&_0x333371[_0x2558ce(0x232)]>0x0)[_0x2558ce(0x1f0)](function(_0x5aee83,_0x22526e){const _0x46e312=_0x2558ce;return _0x5aee83[_0x46e312(0x232)]-_0x22526e[_0x46e312(0x232)];})[_0x2558ce(0x23f)](_0xe0bbc6=>{const _0xa59857=_0x2558ce;let {gridEditor:_0x5b6f57='string',name:_0x528ad9,term:_0x1b1d45,gridWidth:_0x451b19=0x0,gridAlign:_0xdf0af5=_0xa59857(0x23c),nullable:_0x4f4dca=!0x1}=_0xe0bbc6;if(null==_0x5b6f57&&(_0x5b6f57=_0xa59857(0x231)),null==_0xdf0af5&&(_0xdf0af5=_0xa59857(0x23c)),'updater_id'==_0x528ad9||_0xa59857(0x209)==_0x528ad9)return _0x528ad9=_0xa59857(0x263)==_0x528ad9?_0xa59857(0x22e):_0xa59857(0x22d),'{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22'+_0x528ad9+_0xa59857(0x233)+_0x528ad9+_0xa59857(0x211);if(_0xa59857(0x219)==_0x528ad9||_0xa59857(0x21f)==_0x528ad9)return _0xa59857(0x218)+(_0xa59857(0x219)==_0x528ad9?'updatedAt':_0xa59857(0x241))+_0xa59857(0x233)+_0x528ad9+_0xa59857(0x201);let _0x380e4a='readonly'!=_0x5b6f57&&_0xa59857(0x21d)!=_0x5b6f57,_0x136eaa=_0xa59857(0x21d)==_0x5b6f57;0x1!=_0x136eaa&&0x0!=_0x380e4a||(_0x5b6f57=_0xa59857(0x231));let _0x405bad=_0xa59857(0x20f)+_0x5b6f57+_0xa59857(0x24f)+camelCase(_0x528ad9)+_0xa59857(0x233)+_0x1b1d45+_0xa59857(0x203)+_0x136eaa+_0xa59857(0x258)+_0x380e4a+_0xa59857(0x227)+!_0x4f4dca+_0xa59857(0x246)+_0xdf0af5+_0xa59857(0x249)+_0x451b19+'\x20,\x22exportable\x22:\x20true';return _0xa59857(0x257)==_0xe0bbc6[_0xa59857(0x243)]&&(_0x405bad+=',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22'+_0xe0bbc6['refName']+'\x22}'),_0xa59857(0x1fd)==_0xe0bbc6[_0xa59857(0x243)]&&(_0x405bad+=_0xa59857(0x212)+_0xe0bbc6[_0xa59857(0x242)]+'\x22}'),'entity'==_0xe0bbc6[_0xa59857(0x243)]&&(_0x405bad+=',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22'+camelCase(plural(_0xe0bbc6[_0xa59857(0x242)]))+_0xa59857(0x230)),_0x405bad+='}',_0x405bad;});}[a0_0x498352(0x20b)](_0x2ae810){const _0x54b5d9=a0_0x498352;return _0x2ae810[_0x54b5d9(0x267)](_0x9a2a0f=>_0x9a2a0f[_0x54b5d9(0x229)]>0x0)['sort'](function(_0x2f07c3,_0x3b549e){const _0x258e6a=_0x54b5d9;return _0x2f07c3[_0x258e6a(0x229)]-_0x3b549e['searchRank'];})[_0x54b5d9(0x23f)](_0xd25e70=>{const _0x379c5c=_0x54b5d9;let _0x5d76ea=_0xd25e70[_0x379c5c(0x207)];return _0x379c5c(0x267)==_0x5d76ea?'\x22'+camelCase(_0xd25e70[_0x379c5c(0x235)])+'\x22':(_0x5d76ea||(_0x5d76ea='eq'),_0x379c5c(0x23d)+camelCase(_0xd25e70[_0x379c5c(0x235)])+_0x379c5c(0x23b)+_0x5d76ea+'\x22}');});}[a0_0x498352(0x234)](_0x14f87e){const _0x4ac587=a0_0x498352;return _0x14f87e[_0x4ac587(0x267)](_0x2e8a31=>_0x2e8a31[_0x4ac587(0x245)]>0x0)['sort'](function(_0x39604e,_0x2f4215){const _0x498a12=_0x4ac587;return _0x39604e[_0x498a12(0x245)]-_0x2f4215[_0x498a12(0x245)];})[_0x4ac587(0x23f)](_0x3f3c6e=>_0x4ac587(0x1fe)+camelCase(_0x3f3c6e[_0x4ac587(0x235)])+'\x22,\x22desc\x22:'+_0x3f3c6e[_0x4ac587(0x238)]+'}');}async[a0_0x498352(0x1ff)](_0x27d204,_0x1cd776,_0x274bb4,_0x5df3a7,_0x3b5224,_0x1d8f12){const _0x368a7d=a0_0x498352;let _0x47145f=await _0x27d204[_0x368a7d(0x223)](menu_base_1[_0x368a7d(0x213)])[_0x368a7d(0x220)]({'where':{'domain':{'id':_0x1cd776['id']},'id':_0x5df3a7}}),_0x2bc7ed=(await _0x27d204['getRepository'](menu_base_1[_0x368a7d(0x213)])[_0x368a7d(0x1f1)]('select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27'+_0x5df3a7+_0x368a7d(0x200)+_0x5df3a7+'\x27'))[0x0][_0x368a7d(0x24b)]+0xa,_0x185fad=new menu_base_1[(_0x368a7d(0x213))]();_0x185fad[_0x368a7d(0x235)]=_0x3b5224,_0x185fad[_0x368a7d(0x23e)]=_0x368a7d(0x259),_0x185fad[_0x368a7d(0x254)]=_0x368a7d(0x253),_0x185fad[_0x368a7d(0x24b)]=_0x2bc7ed,_0x185fad[_0x368a7d(0x225)]=!0x1,_0x185fad[_0x368a7d(0x251)]=_0x3b5224,_0x185fad[_0x368a7d(0x224)]=_0x1d8f12,_0x185fad[_0x368a7d(0x262)]=_0x368a7d(0x21c),_0x185fad['parent']=_0x47145f,await _0x27d204['getRepository'](menu_base_1[_0x368a7d(0x213)])[_0x368a7d(0x217)](Object[_0x368a7d(0x247)](Object[_0x368a7d(0x247)]({},_0x185fad),{'domain':_0x1cd776,'creator':_0x274bb4,'updater':_0x274bb4}));}['enc'](_0x5c8e31){const _0x416ae0=a0_0x498352;let _0x162df6=JSON[_0x416ae0(0x21a)](_0x5c8e31)['split'](/(.{100})/)[_0x416ae0(0x267)](_0x172b0c=>_0x172b0c),_0x568ba0=['aes-256-ecb',_0x416ae0(0x240),_0x416ae0(0x22a),_0x416ae0(0x22c),'aes-256-cfb1',_0x416ae0(0x248),_0x416ae0(0x255),'aes256'],_0x104c5f=crypto_1['default'][_0x416ae0(0x244)](0x20)[_0x416ae0(0x206)](_0x416ae0(0x20d)),_0x598fce=Buffer['from'](_0x104c5f,_0x416ae0(0x20d)),_0x290d62=_0x104c5f[_0x416ae0(0x250)](0x0,0x10),_0x4bef6d=['',_0x290d62,_0x290d62,_0x290d62,_0x290d62,_0x290d62,_0x290d62,_0x290d62],_0x29d078=0x0,_0x427483=[];_0x427483[_0x416ae0(0x210)](_0x104c5f);for(var _0x166c62=0x0;_0x166c62<_0x162df6[_0x416ae0(0x25d)];_0x166c62++,_0x29d078++){_0x29d078==_0x568ba0[_0x416ae0(0x25d)]&&(_0x29d078=0x0);let _0x1821c5=crypto_1['default'][_0x416ae0(0x205)](_0x568ba0[_0x29d078],_0x598fce,_0x4bef6d[_0x29d078]),_0x186fda=_0x1821c5['update'](_0x162df6[_0x166c62],_0x416ae0(0x1fa),_0x416ae0(0x20d));_0x186fda+=_0x1821c5[_0x416ae0(0x1ef)](_0x416ae0(0x20d)),_0x427483[_0x416ae0(0x210)](_0x186fda);}return _0x427483[_0x416ae0(0x221)](_0x416ae0(0x21e));}};tslib_1[a0_0x498352(0x1f8)]([(0x0,type_graphql_1[a0_0x498352(0x25a)])(a0_0x498352(0x236)),(0x0,type_graphql_1[a0_0x498352(0x25c)])(_0x5987e5=>Boolean,{'description':a0_0x498352(0x25e)}),tslib_1[a0_0x498352(0x265)](0x0,(0x0,type_graphql_1['Arg'])('id')),tslib_1['__param'](0x1,(0x0,type_graphql_1['Arg'])('parent_menu_id')),tslib_1[a0_0x498352(0x265)](0x2,(0x0,type_graphql_1['Ctx'])()),tslib_1[a0_0x498352(0x228)]('design:type',Function),tslib_1[a0_0x498352(0x228)](a0_0x498352(0x1f9),[String,String,Object]),tslib_1['__metadata'](a0_0x498352(0x204),Promise)],OperatoToolCreateMenu[a0_0x498352(0x1f2)],a0_0x498352(0x214),null),OperatoToolCreateMenu=tslib_1[a0_0x498352(0x1f8)]([(0x0,type_graphql_1['Resolver'])()],OperatoToolCreateMenu),exports[a0_0x498352(0x25b)]=OperatoToolCreateMenu;const modelTemplate=a0_0x498352(0x24e);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x15ea95=a0_0x31c3;(function(_0x3484ea,_0x469e1f){const _0x23e892=a0_0x31c3,_0x4f2433=_0x3484ea();while(!![]){try{const _0x50ad82=-parseInt(_0x23e892(0x234))/0x1*(-parseInt(_0x23e892(0x1e0))/0x2)+parseInt(_0x23e892(0x1ea))/0x3*(-parseInt(_0x23e892(0x1e2))/0x4)+-parseInt(_0x23e892(0x22d))/0x5*(parseInt(_0x23e892(0x1d2))/0x6)+-parseInt(_0x23e892(0x223))/0x7+-parseInt(_0x23e892(0x242))/0x8+parseInt(_0x23e892(0x20d))/0x9*(parseInt(_0x23e892(0x210))/0xa)+parseInt(_0x23e892(0x208))/0xb;if(_0x50ad82===_0x469e1f)break;else _0x4f2433['push'](_0x4f2433['shift']());}catch(_0x56e860){_0x4f2433['push'](_0x4f2433['shift']());}}}(a0_0x10dc,0x83f6f));function a0_0x10dc(){const _0x13334b=['\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','double\x20precision','Float','creator_id','datetime','5801192aJCyKD','rank','character\x20varying','__esModule','\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','bigint','existsSync','\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','prototype','split','existsPath','/index.ts','createHistoryServiceFiles','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','Resolvers,','decimal','\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','createHistoryEntityText','index.ts','__param','Resolver','float','Entities,','createDir','readFileSync','@things-factory/shell',',length:','dataProp','/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...','nullable','long','EntityColumn','type\x20=>','getFieldType','design:paramtypes','282hepjLZ','defineProperty','\x20{\x20nullable:\x20','\x20})','-history\x27','.ts','pluralPascalCaseName','Resolvers,\x20subscribers\x20as\x20','Resolvers\x20}\x20from\x20\x27./','getProjectRootPath','colType','\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','Ctx','import\x20{\x20entities\x20as\x20','816ETsGCh','Query','2546492OpWnQj','mkdirSync','toolCreateService','getColTxtType','uniqRank','updated_at','type-graphql','number','3EXvIqL','writeFileSync','createServicePath','\x0a\x20\x20','indexOf','tableName','\x27,\x20nullable:\x20','created_at','columnToEntityColumn','writeFile','name','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','packages','updater','find','design:type','pascalCaseName','integer','state','\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','date','\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','\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','@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})','double','__metadata','string','length','filter','COPY','17874032XOmSPR','-history-query.ts','/*\x20ENTITIES\x20*/\x0a\x09...','-history-type.ts','Entity','8865KzCPlB','@Column({name:\x27','join','2710DXkhuZ','replace','sort','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','createTypeText','...','updater_id','/event-subscriber.ts','Entities,\x20resolvers\x20as\x20','@Field(','Operato\x20Tool\x20Create\x20Service','map','-query.ts','-mutation.ts','/packages','Arg','\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201','export\x20*\x20from\x20\x27./','OperatoToolCreateService','398699PSYehn','PWD','env','includes','domain_id','JSON','__decorate','utf8','pluralize','createServiceFiles','2725rraspj','-type.ts','getRepository','creator','push','@things-factory/resource-base','createEntityText','228uEVvQR','EntitySubscribers\x20}\x20from\x20\x27./','findOne','EntitySubscribers,','camelCaseName','replaceNamesMap','Date','Int','timestamp\x20without\x20time\x20zone'];a0_0x10dc=function(){return _0x13334b;};return a0_0x10dc();}Object[a0_0x15ea95(0x1d3)](exports,a0_0x15ea95(0x245),{'value':!0x0}),exports['OperatoToolCreateService']=void 0x0;function a0_0x31c3(_0x5dd379,_0x2c81a3){const _0x10dc4d=a0_0x10dc();return a0_0x31c3=function(_0x31c3d6,_0x4cc276){_0x31c3d6=_0x31c3d6-0x1c6;let _0x54e477=_0x10dc4d[_0x31c3d6];return _0x54e477;},a0_0x31c3(_0x5dd379,_0x2c81a3);}const tslib_1=require('tslib'),type_graphql_1=require(a0_0x15ea95(0x1e8)),shell_1=require(a0_0x15ea95(0x1c8)),resource_base_1=require(a0_0x15ea95(0x232)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require('lodash'),{plural:plural}=require(a0_0x15ea95(0x22b)),fs=require('fs');let OperatoToolCreateService=class{async[a0_0x15ea95(0x1e4)](_0x35c783,_0x263607){const _0x235efd=a0_0x15ea95,{domain:_0x2e6914}=_0x263607[_0x235efd(0x1fc)],_0x1be079=await(0x0,shell_1[_0x235efd(0x22f)])(resource_base_1[_0x235efd(0x20c)])[_0x235efd(0x236)]({'where':{'id':_0x35c783}}),_0x2f1c05=await(0x0,shell_1[_0x235efd(0x22f)])(resource_base_1[_0x235efd(0x1ce)])[_0x235efd(0x1f8)]({'where':{'domain':{'id':_0x2e6914['id']},'entity':{'id':_0x1be079['id']}}});let {name:_0x7c3dbb='',bundle:_0x49542d=''}=_0x1be079||{},_0x9659ae=this[_0x235efd(0x1db)](),_0x3bbf20=kebabCase(_0x7c3dbb);return await this[_0x235efd(0x1ec)](_0x9659ae,_0x49542d,_0x3bbf20),await this['createServiceFiles'](_0x9659ae,_0x49542d,_0x7c3dbb,_0x3bbf20,_0x1be079,_0x2f1c05),!0x0;}async[a0_0x15ea95(0x22c)](_0x9a49a4,_0x26e4a6,_0xf7c0d3,_0x181bda,_0x3dd723,_0x2e739f){const _0x777635=a0_0x15ea95;let _0xfe747={'name':_0x181bda,'tableName':_0x3dd723[_0x777635(0x1ef)],'pascalCaseName':startCase(camelCase(_0xf7c0d3))['replace'](/ /g,''),'camelCaseName':camelCase(_0xf7c0d3),'snakeCaseName':snakeCase(_0xf7c0d3),'pluralPascalCaseName':startCase(camelCase(plural(_0xf7c0d3)))[_0x777635(0x211)](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0xf7c0d3))},_0x2ebc6a=_0x9a49a4+'/packages/'+_0x26e4a6+'/server/service/';['JSON',_0x777635(0x207)][_0x777635(0x226)](_0x3dd723[_0x777635(0x1ca)])?await this[_0x777635(0x24e)](_0x2ebc6a,_0x181bda,_0x3dd723,_0x2e739f,_0xfe747):await this['createNoHistoryServiceFiels'](_0x2ebc6a,_0x181bda,_0x3dd723,_0x2e739f,_0xfe747);}async[a0_0x15ea95(0x24e)](_0x45bb32,_0x581c9f,_0x4f249b,_0x2454c9,_0x2cd66a){const _0x10423c=a0_0x15ea95;await this[_0x10423c(0x1f3)](_0x45bb32+(_0x581c9f+_0x10423c(0x24d)),serviceHistoryIndex,_0x2cd66a);let _0x3c34a4=this[_0x10423c(0x233)](_0x4f249b,_0x2454c9);await this['writeFile'](_0x45bb32+(_0x581c9f+'/'+_0x581c9f+_0x10423c(0x1d7)),_0x3c34a4,_0x2cd66a),await this['writeFile'](_0x45bb32+(_0x581c9f+'/'+_0x581c9f+'-query.ts'),serviceQuery,_0x2cd66a),await this[_0x10423c(0x1f3)](_0x45bb32+(_0x581c9f+'/'+_0x581c9f+_0x10423c(0x21d)),serviceMutation,_0x2cd66a);let _0x19b42d=this['createTypeText'](_0x2454c9);await this[_0x10423c(0x1f3)](_0x45bb32+(_0x581c9f+'/'+_0x581c9f+_0x10423c(0x22e)),_0x19b42d,_0x2cd66a);let _0x222b1a=this['createHistoryEntityText'](_0x4f249b,_0x2454c9);await this[_0x10423c(0x1f3)](_0x45bb32+(_0x581c9f+'/'+_0x581c9f+'-history.ts'),_0x222b1a,_0x2cd66a);let _0x2d3eef='';_0x10423c(0x228)==_0x4f249b[_0x10423c(0x1ca)]?(_0x2d3eef=_0x10423c(0x246),await this[_0x10423c(0x1f3)](_0x45bb32+(_0x581c9f+'/event-subscriber.ts'),serviceEntitySubscriber,_0x2cd66a)):_0x2d3eef='';let _0x12b695=serviceEntitySubscriber[_0x10423c(0x211)](/{{entityToJson}}/g,_0x2d3eef);await this[_0x10423c(0x1f3)](_0x45bb32+(_0x581c9f+_0x10423c(0x217)),_0x12b695,_0x2cd66a),await this[_0x10423c(0x1f3)](_0x45bb32+(_0x581c9f+'/'+_0x581c9f+_0x10423c(0x209)),serviceHistoryQuery,_0x2cd66a),await this[_0x10423c(0x1f3)](_0x45bb32+(_0x581c9f+'/'+_0x581c9f+_0x10423c(0x20b)),sereviceHistoryType,_0x2cd66a);let _0x496df6=_0x45bb32+_0x10423c(0x254);0x0==await this[_0x10423c(0x24c)](_0x496df6)&&await this[_0x10423c(0x1f3)](_0x496df6,allIndex,_0x2cd66a);let _0x42740a=await fs['readFileSync'](_0x496df6,_0x10423c(0x22a));_0x42740a['indexOf'](_0x10423c(0x221)+_0x2cd66a['name']+'/'+_0x2cd66a[_0x10423c(0x1f4)]+_0x10423c(0x1d6))<0x0&&(_0x42740a=_0x42740a[_0x10423c(0x211)](/\/\* EXPORT ENTITY TYPES \*\//,_0x10423c(0x213)+_0x2cd66a[_0x10423c(0x1f4)]+'/'+_0x2cd66a[_0x10423c(0x1f4)]+_0x10423c(0x1d6))),_0x42740a[_0x10423c(0x1ee)]('export\x20*\x20from\x20\x27./'+_0x2cd66a[_0x10423c(0x1f4)]+'/'+_0x2cd66a['name']+'\x27')<0x0&&(_0x42740a=_0x42740a[_0x10423c(0x211)](/\/\* EXPORT ENTITY TYPES \*\//,_0x10423c(0x213)+_0x2cd66a['name']+'/'+_0x2cd66a['name']+'\x27')),_0x42740a[_0x10423c(0x1ee)](_0x10423c(0x1df)+_0x2cd66a[_0x10423c(0x1fa)]+'Entities,\x20resolvers\x20as\x20'+_0x2cd66a[_0x10423c(0x1fa)]+_0x10423c(0x1d9)+_0x2cd66a[_0x10423c(0x1fa)]+_0x10423c(0x235)+_0x2cd66a[_0x10423c(0x1f4)]+'\x27')<0x0&&(_0x42740a=_0x42740a[_0x10423c(0x211)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x10423c(0x1f5)+_0x2cd66a[_0x10423c(0x1fa)]+_0x10423c(0x218)+_0x2cd66a[_0x10423c(0x1fa)]+_0x10423c(0x1d9)+_0x2cd66a[_0x10423c(0x1fa)]+_0x10423c(0x235)+_0x2cd66a[_0x10423c(0x1f4)]+'\x27')),_0x42740a[_0x10423c(0x1ee)]('...'+_0x2cd66a[_0x10423c(0x1fa)]+_0x10423c(0x258))<0x0&&(_0x42740a=_0x42740a[_0x10423c(0x211)](/\/\* ENTITIES \*\//,_0x10423c(0x20a)+_0x2cd66a[_0x10423c(0x1fa)]+_0x10423c(0x258))),_0x42740a[_0x10423c(0x1ee)]('...'+_0x2cd66a['pascalCaseName']+_0x10423c(0x250))<0x0&&(_0x42740a=_0x42740a['replace'](/\/\* RESOLVER CLASSES \*\//,_0x10423c(0x24f)+_0x2cd66a['pascalCaseName']+'Resolvers,')),_0x42740a[_0x10423c(0x1ee)](_0x10423c(0x215)+_0x2cd66a['pascalCaseName']+'EntitySubscribers,')<0x0&&(_0x42740a=_0x42740a[_0x10423c(0x211)](/\/\* SUBSCRIBERS \*\//,_0x10423c(0x1cb)+_0x2cd66a[_0x10423c(0x1fa)]+_0x10423c(0x237))),await this[_0x10423c(0x1f3)](_0x496df6,_0x42740a,_0x2cd66a);}async['createNoHistoryServiceFiels'](_0x5cad9f,_0x2b7120,_0x7d7f6e,_0x206cba,_0x463ef7){const _0x459abe=a0_0x15ea95;await this[_0x459abe(0x1f3)](_0x5cad9f+(_0x2b7120+_0x459abe(0x24d)),serviceIndex,_0x463ef7),await this['writeFile'](_0x5cad9f+(_0x2b7120+'/'+_0x2b7120+_0x459abe(0x21c)),serviceQuery,_0x463ef7),await this[_0x459abe(0x1f3)](_0x5cad9f+(_0x2b7120+'/'+_0x2b7120+_0x459abe(0x21d)),serviceMutation,_0x463ef7);let _0x20224c=this['createEntityText'](_0x7d7f6e,_0x206cba);await this[_0x459abe(0x1f3)](_0x5cad9f+(_0x2b7120+'/'+_0x2b7120+_0x459abe(0x1d7)),_0x20224c,_0x463ef7);let _0x4b8a9e=this[_0x459abe(0x214)](_0x206cba);await this['writeFile'](_0x5cad9f+(_0x2b7120+'/'+_0x2b7120+_0x459abe(0x22e)),_0x4b8a9e,_0x463ef7);let _0x3085f5=_0x5cad9f+'index.ts';0x0==await this[_0x459abe(0x24c)](_0x3085f5)&&await this[_0x459abe(0x1f3)](_0x3085f5,allIndex,_0x463ef7);let _0x52e09e=await fs[_0x459abe(0x1c7)](_0x3085f5,_0x459abe(0x22a));_0x52e09e['indexOf'](_0x459abe(0x221)+_0x463ef7['name']+'/'+_0x463ef7[_0x459abe(0x1f4)]+'\x27')<0x0&&(_0x52e09e=_0x52e09e['replace'](/\/\* EXPORT ENTITY TYPES \*\//,_0x459abe(0x213)+_0x463ef7['name']+'/'+_0x463ef7[_0x459abe(0x1f4)]+'\x27')),_0x52e09e[_0x459abe(0x1ee)](_0x459abe(0x1df)+_0x463ef7[_0x459abe(0x1fa)]+_0x459abe(0x218)+_0x463ef7['pascalCaseName']+_0x459abe(0x1da)+_0x463ef7['name']+'\x27')<0x0&&(_0x52e09e=_0x52e09e[_0x459abe(0x211)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,'/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20'+_0x463ef7[_0x459abe(0x1fa)]+_0x459abe(0x218)+_0x463ef7['pascalCaseName']+_0x459abe(0x1da)+_0x463ef7[_0x459abe(0x1f4)]+'\x27')),_0x52e09e[_0x459abe(0x1ee)](_0x459abe(0x215)+_0x463ef7['pascalCaseName']+_0x459abe(0x258))<0x0&&(_0x52e09e=_0x52e09e['replace'](/\/\* ENTITIES \*\//,_0x459abe(0x20a)+_0x463ef7['pascalCaseName']+'Entities,')),_0x52e09e[_0x459abe(0x1ee)]('...'+_0x463ef7[_0x459abe(0x1fa)]+'Resolvers,')<0x0&&(_0x52e09e=_0x52e09e[_0x459abe(0x211)](/\/\* RESOLVER CLASSES \*\//,_0x459abe(0x24f)+_0x463ef7['pascalCaseName']+'Resolvers,')),await this[_0x459abe(0x1f3)](_0x3085f5,_0x52e09e,_0x463ef7);}[a0_0x15ea95(0x214)](_0x435119){const _0x5c696b=a0_0x15ea95;let _0x47a88f=sereviceType,_0x3fa4b7=_0x435119[_0x5c696b(0x21b)](_0x2644b0=>{const _0x3bc418=_0x5c696b;if('id'==_0x2644b0[_0x3bc418(0x1f4)])return'';if(_0x3bc418(0x227)==_0x2644b0[_0x3bc418(0x1f4)])return'';if(_0x3bc418(0x1f1)==_0x2644b0[_0x3bc418(0x1f4)])return'';if(_0x3bc418(0x1e7)==_0x2644b0[_0x3bc418(0x1f4)])return'';if(_0x3bc418(0x240)==_0x2644b0[_0x3bc418(0x1f4)])return'';if(_0x3bc418(0x216)==_0x2644b0[_0x3bc418(0x1f4)])return'';let _0x337b2c=this[_0x3bc418(0x1d0)](_0x2644b0),_0x5f1ee4=this[_0x3bc418(0x1e5)](_0x2644b0),_0x3b1890=camelCase(_0x2644b0[_0x3bc418(0x1f4)]);return'\x20\x20'+('@Field('+(0x0==_0x337b2c[_0x3bc418(0x205)]?'':_0x3bc418(0x1cf)+_0x337b2c+',')+_0x3bc418(0x1d4)+_0x2644b0[_0x3bc418(0x1cc)]+_0x3bc418(0x1d5))+'\x0a\x20\x20'+(''+_0x3b1890+(_0x2644b0[_0x3bc418(0x1cc)]?'?':'')+':\x20'+_0x5f1ee4)+'\x0a';});_0x47a88f=_0x47a88f['replace'](/{{newTypeColumns}}/g,_0x3fa4b7['join']('\x0a'));let _0x231197=_0x435119[_0x5c696b(0x21b)](_0x335bd1=>{const _0x532e47=_0x5c696b;if('id'==_0x335bd1[_0x532e47(0x1f4)])return'';if(_0x532e47(0x227)==_0x335bd1[_0x532e47(0x1f4)])return'';if(_0x532e47(0x1f1)==_0x335bd1[_0x532e47(0x1f4)])return'';if(_0x532e47(0x1e7)==_0x335bd1[_0x532e47(0x1f4)])return'';if(_0x532e47(0x240)==_0x335bd1['name'])return'';if('updater_id'==_0x335bd1[_0x532e47(0x1f4)])return'';let _0x391693=this[_0x532e47(0x1d0)](_0x335bd1),_0x30e251=this[_0x532e47(0x1e5)](_0x335bd1);_0x335bd1[_0x532e47(0x1cc)]=!0x0;let _0xc2a6cf=camelCase(_0x335bd1['name']);return'\x20\x20'+(_0x532e47(0x219)+(0x0==_0x391693[_0x532e47(0x205)]?'':_0x532e47(0x1cf)+_0x391693+',')+_0x532e47(0x1d4)+_0x335bd1['nullable']+_0x532e47(0x1d5))+_0x532e47(0x1ed)+(''+_0xc2a6cf+(_0x335bd1[_0x532e47(0x1cc)]?'?':'')+':\x20'+_0x30e251)+'\x0a';});return _0x47a88f=_0x47a88f[_0x5c696b(0x211)](/{{patchTypeColumns}}/g,_0x231197[_0x5c696b(0x20f)]('\x0a')),_0x47a88f;}[a0_0x15ea95(0x233)](_0x2c9681,_0x235ebb){const _0x5b6fff=a0_0x15ea95;let _0x3edd5f=serviceEntity,_0x764b46=_0x235ebb[_0x5b6fff(0x212)](function(_0x188803,_0x397427){const _0x137261=_0x5b6fff;return _0x188803[_0x137261(0x243)]-_0x397427[_0x137261(0x243)];})[_0x5b6fff(0x21b)](_0x36ba75=>this['columnToEntityColumn'](_0x36ba75));[_0x5b6fff(0x207),_0x5b6fff(0x228)][_0x5b6fff(0x226)](_0x2c9681['dataProp'])&&_0x764b46[_0x5b6fff(0x231)](_0x5b6fff(0x220)),_0x3edd5f=_0x3edd5f['replace'](/{{entityColumns}}/g,_0x764b46[_0x5b6fff(0x20f)]('\x0a'));let _0x482435='',_0x52c8f8=_0x235ebb[_0x5b6fff(0x206)](_0x4afea4=>_0x4afea4[_0x5b6fff(0x1e6)]&&_0x4afea4['uniqRank']>0x0)['sort'](function(_0x2283b8,_0x450584){const _0x2a6842=_0x5b6fff;return _0x2283b8[_0x2a6842(0x1e6)]-_0x450584['uniqRank'];});if(_0x52c8f8['length']>0x0){_0x482435=_0x5b6fff(0x201);let _0x262376=_0x52c8f8['map'](_0x20b3cf=>{const _0x7b534e=_0x5b6fff;let _0x38fdcb=_0x20b3cf[_0x7b534e(0x1f4)];return _0x7b534e(0x227)==_0x20b3cf['name']&&(_0x38fdcb='domain'),'creator_id'==_0x20b3cf['name']&&(_0x38fdcb=_0x7b534e(0x230)),_0x7b534e(0x216)==_0x20b3cf[_0x7b534e(0x1f4)]&&(_0x38fdcb=_0x7b534e(0x1f7)),'{{camelCase\x20name}}.'+camelCase(_0x38fdcb);});_0x482435=_0x482435[_0x5b6fff(0x211)](/{{indexColumns}}/g,_0x262376[_0x5b6fff(0x20f)](','));}return _0x3edd5f=_0x3edd5f[_0x5b6fff(0x211)](/{{indexAnn}}/g,_0x482435),_0x3edd5f;}[a0_0x15ea95(0x253)](_0x19a236,_0x688a7e){const _0xcdca4=a0_0x15ea95;let _0x2464e9=_0xcdca4(0x228)==_0x19a236['dataProp']?serviceEntityHistJson:serviceEntityHistCopy,_0x16c656=_0x688a7e[_0xcdca4(0x212)](function(_0x14caa7,_0x30177e){return _0x14caa7['rank']-_0x30177e['rank'];})['map'](_0x2aefb9=>this['columnToEntityColumn'](_0x2aefb9));return _0x2464e9=_0x2464e9[_0xcdca4(0x211)](/{{entityColumns}}/g,_0x16c656[_0xcdca4(0x20f)]('\x0a')),_0x2464e9;}[a0_0x15ea95(0x1f2)](_0x4e2f66){const _0xda8e25=a0_0x15ea95;if('id'==_0x4e2f66[_0xda8e25(0x1f4)])return'';if(_0xda8e25(0x227)==_0x4e2f66[_0xda8e25(0x1f4)])return'';if(_0xda8e25(0x1f1)==_0x4e2f66['name'])return'';if(_0xda8e25(0x1e7)==_0x4e2f66[_0xda8e25(0x1f4)])return'';if('creator_id'==_0x4e2f66[_0xda8e25(0x1f4)])return'';if(_0xda8e25(0x216)==_0x4e2f66[_0xda8e25(0x1f4)])return'';let _0x56e41b=_0x4e2f66[_0xda8e25(0x1dc)];_0xda8e25(0x202)==_0x4e2f66[_0xda8e25(0x1dc)]&&(_0x56e41b=_0xda8e25(0x23e)),_0xda8e25(0x1cd)==_0x4e2f66[_0xda8e25(0x1dc)]&&(_0x56e41b=_0xda8e25(0x247)),_0xda8e25(0x204)==_0x4e2f66[_0xda8e25(0x1dc)]&&(_0x56e41b=_0xda8e25(0x244)),_0xda8e25(0x241)==_0x4e2f66[_0xda8e25(0x1dc)]&&(_0x56e41b=_0xda8e25(0x23c));let _0x4ee7e5='';_0xda8e25(0x204)==_0x4e2f66['colType']&&(_0x4ee7e5=_0x4e2f66['colSize']);let _0x5c6294=this['getFieldType'](_0x4e2f66),_0x3c6d36=this[_0xda8e25(0x1e5)](_0x4e2f66),_0x2136c8=camelCase(_0x4e2f66[_0xda8e25(0x1f4)]);return'\x20\x20'+(_0xda8e25(0x20e)+_0x4e2f66['name']+'\x27,\x20type:\x20\x27'+_0x56e41b+_0xda8e25(0x1f0)+_0x4e2f66[_0xda8e25(0x1cc)]+'\x20'+(0x0==_0x4ee7e5[_0xda8e25(0x205)]?'':_0xda8e25(0x1c9)+_0x4ee7e5)+_0xda8e25(0x1d5))+_0xda8e25(0x1ed)+(_0xda8e25(0x219)+(0x0==_0x5c6294[_0xda8e25(0x205)]?'':_0xda8e25(0x1cf)+_0x5c6294+',')+_0xda8e25(0x1d4)+_0x4e2f66[_0xda8e25(0x1cc)]+'\x20})')+_0xda8e25(0x1ed)+(''+_0x2136c8+(_0x4e2f66[_0xda8e25(0x1cc)]?'?':'')+':\x20'+_0x3c6d36)+'\x0a';}[a0_0x15ea95(0x1d0)](_0x144ef1){const _0x532f89=a0_0x15ea95;let _0x55de0f='';return _0x532f89(0x202)==_0x144ef1[_0x532f89(0x1dc)]&&(_0x55de0f=_0x532f89(0x23f)),'float'==_0x144ef1[_0x532f89(0x1dc)]&&(_0x55de0f=_0x532f89(0x23f)),'long'==_0x144ef1[_0x532f89(0x1dc)]&&(_0x55de0f='Int'),_0x532f89(0x1fb)==_0x144ef1['colType']&&(_0x55de0f=_0x532f89(0x23b)),_0x55de0f;}[a0_0x15ea95(0x1e5)](_0x34f656){const _0x120a11=a0_0x15ea95;let _0x4ba9d0=_0x34f656[_0x120a11(0x1dc)];return _0x120a11(0x251)==_0x34f656[_0x120a11(0x1dc)]&&(_0x4ba9d0=_0x120a11(0x1e9)),'double'==_0x34f656['colType']&&(_0x4ba9d0=_0x120a11(0x1e9)),_0x120a11(0x257)==_0x34f656[_0x120a11(0x1dc)]&&(_0x4ba9d0=_0x120a11(0x1e9)),_0x120a11(0x1fb)==_0x34f656[_0x120a11(0x1dc)]&&(_0x4ba9d0=_0x120a11(0x1e9)),_0x120a11(0x1cd)==_0x34f656[_0x120a11(0x1dc)]&&(_0x4ba9d0=_0x120a11(0x1e9)),_0x120a11(0x241)==_0x34f656['colType']&&(_0x4ba9d0=_0x120a11(0x23a)),_0x120a11(0x1fe)==_0x34f656[_0x120a11(0x1dc)]&&(_0x4ba9d0=_0x120a11(0x23a)),'text'==_0x34f656[_0x120a11(0x1dc)]&&(_0x4ba9d0=_0x120a11(0x204)),_0x4ba9d0;}async[a0_0x15ea95(0x1f3)](_0x439b5f,_0x1475ed,_0x4c112e){const _0x21120b=a0_0x15ea95;await fs[_0x21120b(0x1eb)](_0x439b5f,this[_0x21120b(0x239)](_0x1475ed,_0x4c112e),_0x21120b(0x22a));}[a0_0x15ea95(0x239)](_0x5b92d9,_0x20a037){const _0xec554a=a0_0x15ea95;return _0x5b92d9['replace'](/{{pascalCase name}}/g,_0x20a037['pascalCaseName'])[_0xec554a(0x211)](/{{camelCase name}}/g,_0x20a037[_0xec554a(0x238)])['replace'](/{{snakeCase name}}/g,_0x20a037['snakeCaseName'])[_0xec554a(0x211)](/{{pluralPascalCase name}}/g,_0x20a037[_0xec554a(0x1d8)])[_0xec554a(0x211)](/{{pluralCamelCase name}}/g,_0x20a037['pluralCamelCaseName'])[_0xec554a(0x211)](/{{tableName}}/g,_0x20a037['tableName'])['replace'](/{{name}}/g,_0x20a037[_0xec554a(0x1f4)]);}async[a0_0x15ea95(0x1ec)](_0x223544,_0x579bdb,_0x404827){const _0x415fc3=a0_0x15ea95;let _0x2936f3=_0x223544+_0x415fc3(0x21e);await this[_0x415fc3(0x1c6)](_0x2936f3),_0x2936f3=_0x2936f3+'/'+_0x579bdb,await this[_0x415fc3(0x1c6)](_0x2936f3),_0x2936f3+='/server',await this[_0x415fc3(0x1c6)](_0x2936f3),_0x2936f3+='/service',await this[_0x415fc3(0x1c6)](_0x2936f3),_0x2936f3=_0x2936f3+'/'+_0x404827,await this['createDir'](_0x2936f3);}[a0_0x15ea95(0x1db)](){const _0x553aac=a0_0x15ea95;let _0x5eb972=process[_0x553aac(0x225)][_0x553aac(0x224)][_0x553aac(0x24b)]('/'),_0x3c615a=[];for(let _0x1c2cbe=0x0;_0x1c2cbe<_0x5eb972['length']&&_0x553aac(0x1f6)!=_0x5eb972[_0x1c2cbe];_0x1c2cbe++)_0x3c615a['push'](_0x5eb972[_0x1c2cbe]);return _0x3c615a[_0x553aac(0x20f)]('/');}async['createDir'](_0x5063fa){const _0x290996=a0_0x15ea95;0x0==await this[_0x290996(0x24c)](_0x5063fa)&&fs[_0x290996(0x1e3)](_0x5063fa);}async[a0_0x15ea95(0x24c)](_0xe572d0){const _0x736b71=a0_0x15ea95;return await fs[_0x736b71(0x248)](_0xe572d0);}};tslib_1[a0_0x15ea95(0x229)]([(0x0,type_graphql_1[a0_0x15ea95(0x1e1)])(_0x40db11=>Boolean,{'description':a0_0x15ea95(0x21a)}),tslib_1[a0_0x15ea95(0x255)](0x0,(0x0,type_graphql_1[a0_0x15ea95(0x21f)])('id')),tslib_1['__param'](0x1,(0x0,type_graphql_1[a0_0x15ea95(0x1de)])()),tslib_1['__metadata'](a0_0x15ea95(0x1f9),Function),tslib_1[a0_0x15ea95(0x203)](a0_0x15ea95(0x1d1),[String,Object]),tslib_1[a0_0x15ea95(0x203)]('design:returntype',Promise)],OperatoToolCreateService[a0_0x15ea95(0x24a)],a0_0x15ea95(0x1e4),null),OperatoToolCreateService=tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x15ea95(0x256)])()],OperatoToolCreateService),exports[a0_0x15ea95(0x222)]=OperatoToolCreateService;const allIndex=a0_0x15ea95(0x1fd),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='\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}List\x20}\x20from\x20\x27./{{name}}-type\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Query\x20{\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20fetch\x20a\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20return\x20await\x20getRepository({{pascalCase\x20name}}).findOne({\x0a\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20}\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}List,\x20{\x20description:\x20\x27To\x20fetch\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{pluralCamelCase\x20name}}(@Args()\x20params:\x20ListParam,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}List>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20queryBuilder\x20=\x20getQueryBuilderFromListParams({\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20params,\x0a\x20\x20\x20\x20\x20\x20repository:\x20await\x20getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20const\x20convertedParams\x20=\x20convertListParams(params,\x20domain.id)\x0a\x20\x20\x20\x20const\x20[items,\x20total]\x20=\x20await\x20queryBuilder.getManyAndCount()\x0a\x0a\x20\x20\x20\x20return\x20{\x20items,\x20total\x20}\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20Domain)\x0a\x20\x20async\x20domain(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<Domain>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(Domain).findOneBy({id:{{camelCase\x20name}}.domainId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20updater(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.updaterId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20creator(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.creatorId})\x0a\x20\x20}\x0a}\x0a',serviceHistoryQuery=a0_0x15ea95(0x1dd),serviceMutation=a0_0x15ea95(0x23d),sereviceType='\x0aimport\x20{\x20ObjectType,\x20Field,\x20InputType,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@InputType()\x0aexport\x20class\x20New{{pascalCase\x20name}}\x20{\x0a{{newTypeColumns}}\x0a}\x0a\x0a@InputType()\x0aexport\x20class\x20{{pascalCase\x20name}}Patch\x20{\x0a\x20\x20@Field(type\x20=>\x20ID,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20id?:\x20string\x0a\x0a{{patchTypeColumns}}\x0a\x0a\x20\x20@Field()\x0a\x20\x20cuFlag:\x20string\x0a}\x0a\x0a@ObjectType()\x0aexport\x20class\x20{{pascalCase\x20name}}List\x20{\x0a\x20\x20@Field(type\x20=>\x20[{{pascalCase\x20name}}])\x0a\x20\x20items:\x20{{pascalCase\x20name}}[]\x0a\x0a\x20\x20@Field(type\x20=>\x20Int)\x0a\x20\x20total:\x20number\x0a}\x0a',sereviceHistoryType=a0_0x15ea95(0x200),serviceEntity=a0_0x15ea95(0x1ff),serviceEntityHistCopy='\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a',serviceEntityHistJson=a0_0x15ea95(0x252),serviceEntitySubscriber=a0_0x15ea95(0x249);
|
|
1
|
+
'use strict';function a0_0x416f(){const _0x295181=['56BmCuAw','1736631FYcamK','state','@Field(','type\x20=>','indexOf','12215oBaFud','Operato\x20Tool\x20Create\x20Service','OperatoToolCreateService','text','30qOXrrF','Entities,','__decorate','updated_at','6352ovXrzb','4574840zGTgcq','Float','timestamp\x20without\x20time\x20zone','\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','Resolvers\x20}\x20from\x20\x27./','\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','writeFileSync','pluralize','\x27,\x20type:\x20\x27','import\x20{\x20entities\x20as\x20','/*\x20ENTITIES\x20*/\x0a\x09...','length','snakeCaseName','getProjectRootPath','writeFile','datetime','colSize','uniqRank','getColTxtType','COPY','findOne','push','/index.ts','existsSync','filter','@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})','Resolvers,','creator_id','PWD','EntitySubscribers,','sort','tableName','-mutation.ts','-history\x27','getRepository','env','utf8','pluralCamelCaseName','camelCaseName','colType','/packages','createNoHistoryServiceFiels','50285KfSqhR','replace','bigint','join','index.ts','createHistoryEntityText','lodash','createServicePath','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','includes','@Column({name:\x27','existsPath','JSON','\x0a\x20\x20','\x20{\x20nullable:\x20','EntityColumn','\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','/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...','string','\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','prototype','created_at','\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','11kaJWSq','Date','float','long','Arg',',length:','/service','columnToEntityColumn','\x27,\x20nullable:\x20','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\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','/server/service/','\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201','Query','{{camelCase\x20name}}.','integer','-type.ts','@things-factory/shell','dataProp','rank','-history-query.ts','pluralPascalCaseName','createHistoryServiceFiles','...','map','nullable','getFieldType','\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','/event-subscriber.ts','__param','replaceNamesMap','readFileSync','/server','.ts','toolCreateService','15538oOkMpe','number','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','createDir','updater_id','pascalCaseName','-history.ts','updater','domain_id','18423240IeACUq','createEntityText','Entity','\x20})','__esModule','@things-factory/resource-base','Resolvers,\x20subscribers\x20as\x20','createTypeText','date','\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','Int','double\x20precision','createServiceFiles','Ctx','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','packages','Entities,\x20resolvers\x20as\x20','design:type','export\x20*\x20from\x20\x27./','EntitySubscribers\x20}\x20from\x20\x27./','683324asFpNN','name','double','-query.ts','492nLKVTH'];a0_0x416f=function(){return _0x295181;};return a0_0x416f();}const a0_0x465319=a0_0x4fa9;(function(_0x1bc378,_0x41d763){const _0xe33630=a0_0x4fa9,_0x4b026d=_0x1bc378();while(!![]){try{const _0x851ad8=parseInt(_0xe33630(0x255))/0x1*(-parseInt(_0xe33630(0x233))/0x2)+parseInt(_0xe33630(0x25f))/0x3*(-parseInt(_0xe33630(0x250))/0x4)+parseInt(_0xe33630(0x1fa))/0x5*(parseInt(_0xe33630(0x254))/0x6)+-parseInt(_0xe33630(0x25b))/0x7*(-parseInt(_0xe33630(0x263))/0x8)+-parseInt(_0xe33630(0x256))/0x9+-parseInt(_0xe33630(0x264))/0xa*(parseInt(_0xe33630(0x211))/0xb)+parseInt(_0xe33630(0x23c))/0xc;if(_0x851ad8===_0x41d763)break;else _0x4b026d['push'](_0x4b026d['shift']());}catch(_0x5d6024){_0x4b026d['push'](_0x4b026d['shift']());}}}(a0_0x416f,0xe8569));function a0_0x4fa9(_0x21cb35,_0x18dee4){const _0x416fb4=a0_0x416f();return a0_0x4fa9=function(_0x4fa950,_0x213da1){_0x4fa950=_0x4fa950-0x1ee;let _0x2590ce=_0x416fb4[_0x4fa950];return _0x2590ce;},a0_0x4fa9(_0x21cb35,_0x18dee4);}Object['defineProperty'](exports,a0_0x465319(0x240),{'value':!0x0}),exports[a0_0x465319(0x25d)]=void 0x0;const tslib_1=require('tslib'),type_graphql_1=require('type-graphql'),shell_1=require(a0_0x465319(0x221)),resource_base_1=require(a0_0x465319(0x241)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x465319(0x200)),{plural:plural}=require(a0_0x465319(0x26b)),fs=require('fs');let OperatoToolCreateService=class{async[a0_0x465319(0x232)](_0x4034e7,_0xacc9cf){const _0x41a4a4=a0_0x465319,{domain:_0x1f0600}=_0xacc9cf[_0x41a4a4(0x257)],_0x7051db=await(0x0,shell_1[_0x41a4a4(0x1f2)])(resource_base_1[_0x41a4a4(0x23e)])[_0x41a4a4(0x278)]({'where':{'id':_0x4034e7}}),_0x30e701=await(0x0,shell_1[_0x41a4a4(0x1f2)])(resource_base_1[_0x41a4a4(0x209)])['find']({'where':{'domain':{'id':_0x1f0600['id']},'entity':{'id':_0x7051db['id']}}});let {name:_0x38af43='',bundle:_0x405f59=''}=_0x7051db||{},_0x19ffdc=this[_0x41a4a4(0x271)](),_0x32f6ad=kebabCase(_0x38af43);return await this[_0x41a4a4(0x201)](_0x19ffdc,_0x405f59,_0x32f6ad),await this[_0x41a4a4(0x248)](_0x19ffdc,_0x405f59,_0x38af43,_0x32f6ad,_0x7051db,_0x30e701),!0x0;}async[a0_0x465319(0x248)](_0x2c9453,_0x549e9b,_0xc1c8b0,_0x130322,_0x52b57f,_0x282c69){const _0x2273cf=a0_0x465319;let _0x548114={'name':_0x130322,'tableName':_0x52b57f[_0x2273cf(0x1ef)],'pascalCaseName':startCase(camelCase(_0xc1c8b0))[_0x2273cf(0x1fb)](/ /g,''),'camelCaseName':camelCase(_0xc1c8b0),'snakeCaseName':snakeCase(_0xc1c8b0),'pluralPascalCaseName':startCase(camelCase(plural(_0xc1c8b0)))[_0x2273cf(0x1fb)](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0xc1c8b0))},_0x5f4ddc=_0x2c9453+'/packages/'+_0x549e9b+_0x2273cf(0x21b);[_0x2273cf(0x206),_0x2273cf(0x277)][_0x2273cf(0x203)](_0x52b57f[_0x2273cf(0x222)])?await this['createHistoryServiceFiles'](_0x5f4ddc,_0x130322,_0x52b57f,_0x282c69,_0x548114):await this[_0x2273cf(0x1f9)](_0x5f4ddc,_0x130322,_0x52b57f,_0x282c69,_0x548114);}async[a0_0x465319(0x226)](_0x3399ac,_0x98aa20,_0x43fc3e,_0x21643a,_0x239682){const _0x180b19=a0_0x465319;await this[_0x180b19(0x272)](_0x3399ac+(_0x98aa20+_0x180b19(0x27a)),serviceHistoryIndex,_0x239682);let _0x37a9ca=this[_0x180b19(0x23d)](_0x43fc3e,_0x21643a);await this[_0x180b19(0x272)](_0x3399ac+(_0x98aa20+'/'+_0x98aa20+'.ts'),_0x37a9ca,_0x239682),await this['writeFile'](_0x3399ac+(_0x98aa20+'/'+_0x98aa20+_0x180b19(0x253)),serviceQuery,_0x239682),await this['writeFile'](_0x3399ac+(_0x98aa20+'/'+_0x98aa20+_0x180b19(0x1f0)),serviceMutation,_0x239682);let _0x583c88=this['createTypeText'](_0x21643a);await this['writeFile'](_0x3399ac+(_0x98aa20+'/'+_0x98aa20+_0x180b19(0x220)),_0x583c88,_0x239682);let _0x425d71=this[_0x180b19(0x1ff)](_0x43fc3e,_0x21643a);await this[_0x180b19(0x272)](_0x3399ac+(_0x98aa20+'/'+_0x98aa20+_0x180b19(0x239)),_0x425d71,_0x239682);let _0x42dddf='';_0x180b19(0x206)==_0x43fc3e[_0x180b19(0x222)]?(_0x42dddf='\x0a\x20\x20public\x20createHistoryEntity(manager,\x20entity)\x20{\x0a\x20\x20\x20\x20let\x20history\x20=\x20manager.create(this.historyEntity,\x20entity);\x0a\x20\x20\x20\x20history.historyJson\x20=\x20JSON.stringify(entity);\x0a\x20\x20\x20\x20return\x20history;\x0a\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20',await this[_0x180b19(0x272)](_0x3399ac+(_0x98aa20+_0x180b19(0x22c)),serviceEntitySubscriber,_0x239682)):_0x42dddf='';let _0x52e89d=serviceEntitySubscriber[_0x180b19(0x1fb)](/{{entityToJson}}/g,_0x42dddf);await this['writeFile'](_0x3399ac+(_0x98aa20+_0x180b19(0x22c)),_0x52e89d,_0x239682),await this[_0x180b19(0x272)](_0x3399ac+(_0x98aa20+'/'+_0x98aa20+_0x180b19(0x224)),serviceHistoryQuery,_0x239682),await this[_0x180b19(0x272)](_0x3399ac+(_0x98aa20+'/'+_0x98aa20+'-history-type.ts'),sereviceHistoryType,_0x239682);let _0x4443cd=_0x3399ac+_0x180b19(0x1fe);0x0==await this[_0x180b19(0x205)](_0x4443cd)&&await this[_0x180b19(0x272)](_0x4443cd,allIndex,_0x239682);let _0x217c59=await fs[_0x180b19(0x22f)](_0x4443cd,_0x180b19(0x1f4));_0x217c59[_0x180b19(0x25a)](_0x180b19(0x24e)+_0x239682[_0x180b19(0x251)]+'/'+_0x239682[_0x180b19(0x251)]+_0x180b19(0x1f1))<0x0&&(_0x217c59=_0x217c59[_0x180b19(0x1fb)](/\/\* EXPORT ENTITY TYPES \*\//,_0x180b19(0x202)+_0x239682['name']+'/'+_0x239682['name']+_0x180b19(0x1f1))),_0x217c59[_0x180b19(0x25a)](_0x180b19(0x24e)+_0x239682[_0x180b19(0x251)]+'/'+_0x239682[_0x180b19(0x251)]+'\x27')<0x0&&(_0x217c59=_0x217c59[_0x180b19(0x1fb)](/\/\* EXPORT ENTITY TYPES \*\//,_0x180b19(0x202)+_0x239682[_0x180b19(0x251)]+'/'+_0x239682[_0x180b19(0x251)]+'\x27')),_0x217c59[_0x180b19(0x25a)]('import\x20{\x20entities\x20as\x20'+_0x239682[_0x180b19(0x238)]+_0x180b19(0x24c)+_0x239682['pascalCaseName']+_0x180b19(0x242)+_0x239682[_0x180b19(0x238)]+_0x180b19(0x24f)+_0x239682['name']+'\x27')<0x0&&(_0x217c59=_0x217c59['replace'](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,'/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20'+_0x239682[_0x180b19(0x238)]+'Entities,\x20resolvers\x20as\x20'+_0x239682['pascalCaseName']+_0x180b19(0x242)+_0x239682[_0x180b19(0x238)]+_0x180b19(0x24f)+_0x239682[_0x180b19(0x251)]+'\x27')),_0x217c59['indexOf'](_0x180b19(0x227)+_0x239682[_0x180b19(0x238)]+'Entities,')<0x0&&(_0x217c59=_0x217c59[_0x180b19(0x1fb)](/\/\* ENTITIES \*\//,'/*\x20ENTITIES\x20*/\x0a\x09...'+_0x239682[_0x180b19(0x238)]+_0x180b19(0x260))),_0x217c59[_0x180b19(0x25a)](_0x180b19(0x227)+_0x239682[_0x180b19(0x238)]+_0x180b19(0x27e))<0x0&&(_0x217c59=_0x217c59[_0x180b19(0x1fb)](/\/\* RESOLVER CLASSES \*\//,_0x180b19(0x235)+_0x239682[_0x180b19(0x238)]+_0x180b19(0x27e))),_0x217c59[_0x180b19(0x25a)](_0x180b19(0x227)+_0x239682[_0x180b19(0x238)]+_0x180b19(0x281))<0x0&&(_0x217c59=_0x217c59[_0x180b19(0x1fb)](/\/\* SUBSCRIBERS \*\//,_0x180b19(0x20b)+_0x239682[_0x180b19(0x238)]+_0x180b19(0x281))),await this[_0x180b19(0x272)](_0x4443cd,_0x217c59,_0x239682);}async[a0_0x465319(0x1f9)](_0x4a0210,_0x263487,_0x315bd1,_0x352696,_0x218153){const _0x3f2f5a=a0_0x465319;await this[_0x3f2f5a(0x272)](_0x4a0210+(_0x263487+'/index.ts'),serviceIndex,_0x218153),await this['writeFile'](_0x4a0210+(_0x263487+'/'+_0x263487+_0x3f2f5a(0x253)),serviceQuery,_0x218153),await this[_0x3f2f5a(0x272)](_0x4a0210+(_0x263487+'/'+_0x263487+_0x3f2f5a(0x1f0)),serviceMutation,_0x218153);let _0x4ce178=this['createEntityText'](_0x315bd1,_0x352696);await this[_0x3f2f5a(0x272)](_0x4a0210+(_0x263487+'/'+_0x263487+_0x3f2f5a(0x231)),_0x4ce178,_0x218153);let _0xdd379c=this[_0x3f2f5a(0x243)](_0x352696);await this[_0x3f2f5a(0x272)](_0x4a0210+(_0x263487+'/'+_0x263487+_0x3f2f5a(0x220)),_0xdd379c,_0x218153);let _0x205f1d=_0x4a0210+'index.ts';0x0==await this[_0x3f2f5a(0x205)](_0x205f1d)&&await this[_0x3f2f5a(0x272)](_0x205f1d,allIndex,_0x218153);let _0x191d10=await fs['readFileSync'](_0x205f1d,_0x3f2f5a(0x1f4));_0x191d10[_0x3f2f5a(0x25a)](_0x3f2f5a(0x24e)+_0x218153['name']+'/'+_0x218153[_0x3f2f5a(0x251)]+'\x27')<0x0&&(_0x191d10=_0x191d10[_0x3f2f5a(0x1fb)](/\/\* EXPORT ENTITY TYPES \*\//,_0x3f2f5a(0x202)+_0x218153['name']+'/'+_0x218153['name']+'\x27')),_0x191d10[_0x3f2f5a(0x25a)](_0x3f2f5a(0x26d)+_0x218153[_0x3f2f5a(0x238)]+_0x3f2f5a(0x24c)+_0x218153[_0x3f2f5a(0x238)]+_0x3f2f5a(0x268)+_0x218153[_0x3f2f5a(0x251)]+'\x27')<0x0&&(_0x191d10=_0x191d10[_0x3f2f5a(0x1fb)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x3f2f5a(0x24a)+_0x218153[_0x3f2f5a(0x238)]+_0x3f2f5a(0x24c)+_0x218153[_0x3f2f5a(0x238)]+_0x3f2f5a(0x268)+_0x218153[_0x3f2f5a(0x251)]+'\x27')),_0x191d10['indexOf'](_0x3f2f5a(0x227)+_0x218153[_0x3f2f5a(0x238)]+_0x3f2f5a(0x260))<0x0&&(_0x191d10=_0x191d10[_0x3f2f5a(0x1fb)](/\/\* ENTITIES \*\//,_0x3f2f5a(0x26e)+_0x218153[_0x3f2f5a(0x238)]+'Entities,')),_0x191d10[_0x3f2f5a(0x25a)]('...'+_0x218153[_0x3f2f5a(0x238)]+'Resolvers,')<0x0&&(_0x191d10=_0x191d10['replace'](/\/\* RESOLVER CLASSES \*\//,_0x3f2f5a(0x235)+_0x218153[_0x3f2f5a(0x238)]+_0x3f2f5a(0x27e))),await this[_0x3f2f5a(0x272)](_0x205f1d,_0x191d10,_0x218153);}[a0_0x465319(0x243)](_0x381bf7){const _0xc866f1=a0_0x465319;let _0x535a03=sereviceType,_0x6a6321=_0x381bf7[_0xc866f1(0x228)](_0x5c71f8=>{const _0x18f889=_0xc866f1;if('id'==_0x5c71f8[_0x18f889(0x251)])return'';if(_0x18f889(0x23b)==_0x5c71f8[_0x18f889(0x251)])return'';if(_0x18f889(0x20f)==_0x5c71f8['name'])return'';if(_0x18f889(0x262)==_0x5c71f8[_0x18f889(0x251)])return'';if(_0x18f889(0x27f)==_0x5c71f8['name'])return'';if(_0x18f889(0x237)==_0x5c71f8['name'])return'';let _0x574bcf=this[_0x18f889(0x22a)](_0x5c71f8),_0x22d919=this[_0x18f889(0x276)](_0x5c71f8),_0xa609a6=camelCase(_0x5c71f8[_0x18f889(0x251)]);return'\x20\x20'+(_0x18f889(0x258)+(0x0==_0x574bcf[_0x18f889(0x26f)]?'':_0x18f889(0x259)+_0x574bcf+',')+_0x18f889(0x208)+_0x5c71f8['nullable']+_0x18f889(0x23f))+_0x18f889(0x207)+(''+_0xa609a6+(_0x5c71f8[_0x18f889(0x229)]?'?':'')+':\x20'+_0x22d919)+'\x0a';});_0x535a03=_0x535a03[_0xc866f1(0x1fb)](/{{newTypeColumns}}/g,_0x6a6321[_0xc866f1(0x1fd)]('\x0a'));let _0x230ad6=_0x381bf7[_0xc866f1(0x228)](_0x4948ee=>{const _0x125a15=_0xc866f1;if('id'==_0x4948ee[_0x125a15(0x251)])return'';if(_0x125a15(0x23b)==_0x4948ee[_0x125a15(0x251)])return'';if(_0x125a15(0x20f)==_0x4948ee[_0x125a15(0x251)])return'';if(_0x125a15(0x262)==_0x4948ee[_0x125a15(0x251)])return'';if(_0x125a15(0x27f)==_0x4948ee[_0x125a15(0x251)])return'';if(_0x125a15(0x237)==_0x4948ee[_0x125a15(0x251)])return'';let _0xd0085=this['getFieldType'](_0x4948ee),_0x469a30=this[_0x125a15(0x276)](_0x4948ee);_0x4948ee[_0x125a15(0x229)]=!0x0;let _0x393de8=camelCase(_0x4948ee[_0x125a15(0x251)]);return'\x20\x20'+('@Field('+(0x0==_0xd0085[_0x125a15(0x26f)]?'':_0x125a15(0x259)+_0xd0085+',')+_0x125a15(0x208)+_0x4948ee['nullable']+'\x20})')+'\x0a\x20\x20'+(''+_0x393de8+(_0x4948ee[_0x125a15(0x229)]?'?':'')+':\x20'+_0x469a30)+'\x0a';});return _0x535a03=_0x535a03[_0xc866f1(0x1fb)](/{{patchTypeColumns}}/g,_0x230ad6[_0xc866f1(0x1fd)]('\x0a')),_0x535a03;}[a0_0x465319(0x23d)](_0x1b13ad,_0x40840c){const _0x52437e=a0_0x465319;let _0x305707=serviceEntity,_0xfcbfbf=_0x40840c[_0x52437e(0x1ee)](function(_0xbae6cb,_0x3f4880){const _0x25d092=_0x52437e;return _0xbae6cb[_0x25d092(0x223)]-_0x3f4880[_0x25d092(0x223)];})[_0x52437e(0x228)](_0x13faad=>this['columnToEntityColumn'](_0x13faad));['COPY','JSON'][_0x52437e(0x203)](_0x1b13ad[_0x52437e(0x222)])&&_0xfcbfbf['push'](_0x52437e(0x21c)),_0x305707=_0x305707['replace'](/{{entityColumns}}/g,_0xfcbfbf[_0x52437e(0x1fd)]('\x0a'));let _0x2f3b9e='',_0x4b9f0a=_0x40840c[_0x52437e(0x27c)](_0x33c974=>_0x33c974['uniqRank']&&_0x33c974[_0x52437e(0x275)]>0x0)[_0x52437e(0x1ee)](function(_0xd96d3f,_0x381061){const _0x373a6c=_0x52437e;return _0xd96d3f['uniqRank']-_0x381061[_0x373a6c(0x275)];});if(_0x4b9f0a[_0x52437e(0x26f)]>0x0){_0x2f3b9e=_0x52437e(0x27d);let _0x53e54b=_0x4b9f0a['map'](_0x19891a=>{const _0x137190=_0x52437e;let _0x86e3f1=_0x19891a['name'];return'domain_id'==_0x19891a[_0x137190(0x251)]&&(_0x86e3f1='domain'),_0x137190(0x27f)==_0x19891a[_0x137190(0x251)]&&(_0x86e3f1='creator'),_0x137190(0x237)==_0x19891a[_0x137190(0x251)]&&(_0x86e3f1=_0x137190(0x23a)),_0x137190(0x21e)+camelCase(_0x86e3f1);});_0x2f3b9e=_0x2f3b9e[_0x52437e(0x1fb)](/{{indexColumns}}/g,_0x53e54b['join'](','));}return _0x305707=_0x305707[_0x52437e(0x1fb)](/{{indexAnn}}/g,_0x2f3b9e),_0x305707;}['createHistoryEntityText'](_0x1da25e,_0x5e4aba){const _0x5e25da=a0_0x465319;let _0x135f81=_0x5e25da(0x206)==_0x1da25e[_0x5e25da(0x222)]?serviceEntityHistJson:serviceEntityHistCopy,_0x45b576=_0x5e4aba[_0x5e25da(0x1ee)](function(_0x3eb97d,_0x1f6d4c){const _0x5edc70=_0x5e25da;return _0x3eb97d[_0x5edc70(0x223)]-_0x1f6d4c['rank'];})['map'](_0x5a24a2=>this[_0x5e25da(0x218)](_0x5a24a2));return _0x135f81=_0x135f81[_0x5e25da(0x1fb)](/{{entityColumns}}/g,_0x45b576[_0x5e25da(0x1fd)]('\x0a')),_0x135f81;}[a0_0x465319(0x218)](_0x144566){const _0x4a163b=a0_0x465319;if('id'==_0x144566['name'])return'';if(_0x4a163b(0x23b)==_0x144566['name'])return'';if('created_at'==_0x144566[_0x4a163b(0x251)])return'';if(_0x4a163b(0x262)==_0x144566[_0x4a163b(0x251)])return'';if(_0x4a163b(0x27f)==_0x144566['name'])return'';if(_0x4a163b(0x237)==_0x144566[_0x4a163b(0x251)])return'';let _0x2930b9=_0x144566['colType'];'double'==_0x144566[_0x4a163b(0x1f7)]&&(_0x2930b9=_0x4a163b(0x247)),_0x4a163b(0x214)==_0x144566[_0x4a163b(0x1f7)]&&(_0x2930b9=_0x4a163b(0x1fc)),_0x4a163b(0x20c)==_0x144566[_0x4a163b(0x1f7)]&&(_0x2930b9='character\x20varying'),_0x4a163b(0x273)==_0x144566[_0x4a163b(0x1f7)]&&(_0x2930b9=_0x4a163b(0x266));let _0x16d82a='';_0x4a163b(0x20c)==_0x144566[_0x4a163b(0x1f7)]&&(_0x16d82a=_0x144566[_0x4a163b(0x274)]);let _0x33d65e=this[_0x4a163b(0x22a)](_0x144566),_0x902847=this[_0x4a163b(0x276)](_0x144566),_0x2a5694=camelCase(_0x144566[_0x4a163b(0x251)]);return'\x20\x20'+(_0x4a163b(0x204)+_0x144566[_0x4a163b(0x251)]+_0x4a163b(0x26c)+_0x2930b9+_0x4a163b(0x219)+_0x144566[_0x4a163b(0x229)]+'\x20'+(0x0==_0x16d82a[_0x4a163b(0x26f)]?'':_0x4a163b(0x216)+_0x16d82a)+_0x4a163b(0x23f))+'\x0a\x20\x20'+('@Field('+(0x0==_0x33d65e[_0x4a163b(0x26f)]?'':_0x4a163b(0x259)+_0x33d65e+',')+'\x20{\x20nullable:\x20'+_0x144566[_0x4a163b(0x229)]+_0x4a163b(0x23f))+_0x4a163b(0x207)+(''+_0x2a5694+(_0x144566['nullable']?'?':'')+':\x20'+_0x902847)+'\x0a';}['getFieldType'](_0x34b501){const _0x53a66e=a0_0x465319;let _0x3d52c9='';return _0x53a66e(0x252)==_0x34b501[_0x53a66e(0x1f7)]&&(_0x3d52c9='Float'),'float'==_0x34b501['colType']&&(_0x3d52c9=_0x53a66e(0x265)),_0x53a66e(0x214)==_0x34b501[_0x53a66e(0x1f7)]&&(_0x3d52c9=_0x53a66e(0x246)),'integer'==_0x34b501[_0x53a66e(0x1f7)]&&(_0x3d52c9=_0x53a66e(0x246)),_0x3d52c9;}[a0_0x465319(0x276)](_0x402ea7){const _0x19e5d5=a0_0x465319;let _0x4d3970=_0x402ea7[_0x19e5d5(0x1f7)];return'decimal'==_0x402ea7[_0x19e5d5(0x1f7)]&&(_0x4d3970=_0x19e5d5(0x234)),_0x19e5d5(0x252)==_0x402ea7['colType']&&(_0x4d3970=_0x19e5d5(0x234)),_0x19e5d5(0x213)==_0x402ea7['colType']&&(_0x4d3970=_0x19e5d5(0x234)),_0x19e5d5(0x21f)==_0x402ea7['colType']&&(_0x4d3970=_0x19e5d5(0x234)),_0x19e5d5(0x214)==_0x402ea7[_0x19e5d5(0x1f7)]&&(_0x4d3970=_0x19e5d5(0x234)),_0x19e5d5(0x273)==_0x402ea7['colType']&&(_0x4d3970=_0x19e5d5(0x212)),_0x19e5d5(0x244)==_0x402ea7[_0x19e5d5(0x1f7)]&&(_0x4d3970=_0x19e5d5(0x212)),_0x19e5d5(0x25e)==_0x402ea7[_0x19e5d5(0x1f7)]&&(_0x4d3970=_0x19e5d5(0x20c)),_0x4d3970;}async[a0_0x465319(0x272)](_0x89b884,_0x60de4c,_0xe5fb99){const _0x1b322f=a0_0x465319;await fs[_0x1b322f(0x26a)](_0x89b884,this[_0x1b322f(0x22e)](_0x60de4c,_0xe5fb99),_0x1b322f(0x1f4));}[a0_0x465319(0x22e)](_0x2d8953,_0x5cd2bc){const _0x28abc1=a0_0x465319;return _0x2d8953[_0x28abc1(0x1fb)](/{{pascalCase name}}/g,_0x5cd2bc[_0x28abc1(0x238)])[_0x28abc1(0x1fb)](/{{camelCase name}}/g,_0x5cd2bc[_0x28abc1(0x1f6)])['replace'](/{{snakeCase name}}/g,_0x5cd2bc[_0x28abc1(0x270)])[_0x28abc1(0x1fb)](/{{pluralPascalCase name}}/g,_0x5cd2bc[_0x28abc1(0x225)])[_0x28abc1(0x1fb)](/{{pluralCamelCase name}}/g,_0x5cd2bc[_0x28abc1(0x1f5)])['replace'](/{{tableName}}/g,_0x5cd2bc[_0x28abc1(0x1ef)])[_0x28abc1(0x1fb)](/{{name}}/g,_0x5cd2bc[_0x28abc1(0x251)]);}async['createServicePath'](_0x1dc147,_0x35d9e2,_0x4e2969){const _0x55f2e1=a0_0x465319;let _0x1946fe=_0x1dc147+_0x55f2e1(0x1f8);await this['createDir'](_0x1946fe),_0x1946fe=_0x1946fe+'/'+_0x35d9e2,await this[_0x55f2e1(0x236)](_0x1946fe),_0x1946fe+=_0x55f2e1(0x230),await this[_0x55f2e1(0x236)](_0x1946fe),_0x1946fe+=_0x55f2e1(0x217),await this[_0x55f2e1(0x236)](_0x1946fe),_0x1946fe=_0x1946fe+'/'+_0x4e2969,await this[_0x55f2e1(0x236)](_0x1946fe);}[a0_0x465319(0x271)](){const _0xa7a4da=a0_0x465319;let _0x59ae9a=process[_0xa7a4da(0x1f3)][_0xa7a4da(0x280)]['split']('/'),_0x468e1e=[];for(let _0x27c51f=0x0;_0x27c51f<_0x59ae9a[_0xa7a4da(0x26f)]&&_0xa7a4da(0x24b)!=_0x59ae9a[_0x27c51f];_0x27c51f++)_0x468e1e[_0xa7a4da(0x279)](_0x59ae9a[_0x27c51f]);return _0x468e1e[_0xa7a4da(0x1fd)]('/');}async[a0_0x465319(0x236)](_0x309f63){const _0x4834af=a0_0x465319;0x0==await this[_0x4834af(0x205)](_0x309f63)&&fs['mkdirSync'](_0x309f63);}async['existsPath'](_0x429ea2){const _0x1d96e9=a0_0x465319;return await fs[_0x1d96e9(0x27b)](_0x429ea2);}};tslib_1[a0_0x465319(0x261)]([(0x0,type_graphql_1[a0_0x465319(0x21d)])(_0x55ffc1=>Boolean,{'description':a0_0x465319(0x25c)}),tslib_1[a0_0x465319(0x22d)](0x0,(0x0,type_graphql_1[a0_0x465319(0x215)])('id')),tslib_1[a0_0x465319(0x22d)](0x1,(0x0,type_graphql_1[a0_0x465319(0x249)])()),tslib_1['__metadata'](a0_0x465319(0x24d),Function),tslib_1['__metadata']('design:paramtypes',[String,Object]),tslib_1['__metadata']('design:returntype',Promise)],OperatoToolCreateService[a0_0x465319(0x20e)],a0_0x465319(0x232),null),OperatoToolCreateService=tslib_1[a0_0x465319(0x261)]([(0x0,type_graphql_1['Resolver'])()],OperatoToolCreateService),exports[a0_0x465319(0x25d)]=OperatoToolCreateService;const allIndex='\x0a/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0a\x0a/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0a\x0aexport\x20const\x20entities\x20=\x20[\x20\x20\x0a\x20\x20/*\x20ENTITIES\x20*/\x0a]\x20\x0a\x0a\x0aexport\x20const\x20schema\x20=\x20{\x0a\x20\x20resolverClasses:\x20[\x0a\x20\x20\x20\x20/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x20\x20]\x20\x0a}\x0a\x0aexport\x20const\x20subscribers\x20=\x20[\x0a\x20\x20/*\x20SUBSCRIBERS\x20*/\x0a]\x0a',serviceIndex=a0_0x465319(0x20d),serviceHistoryIndex='\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryQuery\x20}\x20from\x20\x27./{{name}}-history-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryEntitySubscriber\x20}\x20from\x20\x27./event-subscriber\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}},\x20{{pascalCase\x20name}}History]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}HistoryQuery,\x20{{pascalCase\x20name}}Mutation]\x0aexport\x20const\x20subscribers\x20=\x20[{{pascalCase\x20name}}HistoryEntitySubscriber]\x0a\x0a',serviceQuery='\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}List\x20}\x20from\x20\x27./{{name}}-type\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Query\x20{\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20fetch\x20a\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20return\x20await\x20getRepository({{pascalCase\x20name}}).findOne({\x0a\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20}\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}List,\x20{\x20description:\x20\x27To\x20fetch\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{pluralCamelCase\x20name}}(@Args()\x20params:\x20ListParam,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}List>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20queryBuilder\x20=\x20getQueryBuilderFromListParams({\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20params,\x0a\x20\x20\x20\x20\x20\x20repository:\x20await\x20getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20const\x20convertedParams\x20=\x20convertListParams(params,\x20domain.id)\x0a\x20\x20\x20\x20const\x20[items,\x20total]\x20=\x20await\x20queryBuilder.getManyAndCount()\x0a\x0a\x20\x20\x20\x20return\x20{\x20items,\x20total\x20}\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20Domain)\x0a\x20\x20async\x20domain(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<Domain>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(Domain).findOneBy({id:{{camelCase\x20name}}.domainId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20updater(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.updaterId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20creator(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.creatorId})\x0a\x20\x20}\x0a}\x0a',serviceHistoryQuery=a0_0x465319(0x267),serviceMutation=a0_0x465319(0x210),sereviceType=a0_0x465319(0x22b),sereviceHistoryType=a0_0x465319(0x20a),serviceEntity=a0_0x465319(0x245),serviceEntityHistCopy=a0_0x465319(0x21a),serviceEntityHistJson=a0_0x465319(0x269),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_0x4e1ed8=a0_0x2fa4;(function(_0x5e9984,_0x21ce82){const _0x64b0d1=a0_0x2fa4,_0xce8e62=_0x5e9984();while(!![]){try{const _0x181239=-parseInt(_0x64b0d1(0xd6))/0x1*(parseInt(_0x64b0d1(0xd1))/0x2)+parseInt(_0x64b0d1(0xe5))/0x3*(-parseInt(_0x64b0d1(0xd4))/0x4)+-parseInt(_0x64b0d1(0xdb))/0x5+parseInt(_0x64b0d1(0xe8))/0x6*(parseInt(_0x64b0d1(0xd0))/0x7)+-parseInt(_0x64b0d1(0xd2))/0x8+parseInt(_0x64b0d1(0xce))/0x9+parseInt(_0x64b0d1(0xe0))/0xa;if(_0x181239===_0x21ce82)break;else _0xce8e62['push'](_0xce8e62['shift']());}catch(_0x5bd130){_0xce8e62['push'](_0xce8e62['shift']());}}}(a0_0x5c48,0x64608));Object['defineProperty'](exports,'__esModule',{'value':!0x0}),exports[a0_0x4e1ed8(0xe4)]=exports['checkStudioPermission']=void 0x0;const operato_license_checker_1=require('@things-factory/operato-license-checker'),shell_1=require('@things-factory/shell'),menu_base_1=require('@things-factory/menu-base'),license_error_1=require(a0_0x4e1ed8(0xe1));function a0_0x5c48(){const _0x222916=['from','checkStudioTemplateIsOverLimit','31107qZrHfx','ERROR_CODES','includes','420054mjOjmO','manager','LicenseError','getCount','(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)','6776424vNQWwZ','menu','77voCSWt','10TuqsPC','4295992YnYdYc','select','52wgNzhe','id\x20!=\x20:id','66709VNLKsh','checkTarget','andWhere','map','getPermission','3155195Qtfizm','getRepository','Menu','OVER_LIMIT','createQueryBuilder','5244890QCsDcg','../../errors/license-error','Studio'];a0_0x5c48=function(){return _0x222916;};return a0_0x5c48();}function a0_0x2fa4(_0xa4c1b7,_0x4af579){const _0x5c48cb=a0_0x5c48();return a0_0x2fa4=function(_0x2fa4b3,_0x66502d){_0x2fa4b3=_0x2fa4b3-0xcb;let _0x54bee7=_0x5c48cb[_0x2fa4b3];return _0x54bee7;},a0_0x2fa4(_0xa4c1b7,_0x4af579);}async function checkStudioPermission(){const _0x351651=a0_0x4e1ed8;let _0x5c25c8=((0x0,operato_license_checker_1[_0x351651(0xda)])('Permissions\x20For\x20Tailor\x20Tool')||',')['split'](',')[_0x351651(0xd9)](_0x324139=>_0x324139['trim']()),_0x5b2d5d=!0x1;return _0x5c25c8['forEach'](_0x3a9e9a=>{const _0x34f67c=_0x351651;_0x3a9e9a[_0x34f67c(0xe7)](_0x34f67c(0xe2))&&(_0x5b2d5d=!0x0);}),_0x5b2d5d;}async function checkStudioTemplateIsOverLimit(_0x377d63,_0x375782){const _0x1143d4=a0_0x4e1ed8;if(0x0==await checkStudioPermission())throw new license_error_1[(_0x1143d4(0xcb))]({'errorCode':_0x375782['t'](license_error_1[_0x1143d4(0xcb)][_0x1143d4(0xe6)]['INVALID_LICENSE'])});var _0x4eee50=0x0;if(_0x4eee50=_0x377d63&&''!=_0x377d63?await(0x0,shell_1[_0x1143d4(0xdc)])(menu_base_1[_0x1143d4(0xdd)])[_0x1143d4(0xe9)][_0x1143d4(0xdf)]()[_0x1143d4(0xd3)](_0x1143d4(0xcf))[_0x1143d4(0xe3)](menu_base_1[_0x1143d4(0xdd)],_0x1143d4(0xcf))['where'](_0x1143d4(0xd5),{'id':_0x377d63})[_0x1143d4(0xd8)](_0x1143d4(0xcd))[_0x1143d4(0xcc)]()+0x1:await(0x0,shell_1[_0x1143d4(0xdc)])(menu_base_1[_0x1143d4(0xdd)])[_0x1143d4(0xe9)]['createQueryBuilder']()[_0x1143d4(0xd3)](_0x1143d4(0xcf))['from'](menu_base_1[_0x1143d4(0xdd)],'menu')['where'](_0x1143d4(0xcd))[_0x1143d4(0xcc)]()+0x1,!(0x0,operato_license_checker_1[_0x1143d4(0xd7)])(_0x4eee50))throw new license_error_1[(_0x1143d4(0xcb))]({'errorCode':_0x375782['t'](license_error_1['LicenseError']['ERROR_CODES'][_0x1143d4(0xde)])});return!0x0;}exports['checkStudioPermission']=checkStudioPermission,exports[a0_0x4e1ed8(0xe4)]=checkStudioTemplateIsOverLimit;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x6884c7=a0_0x4856;(function(_0x1b4bc5,_0x556028){const _0x53b2c4=a0_0x4856,_0x11086d=_0x1b4bc5();while(!![]){try{const _0x598c1d=parseInt(_0x53b2c4(0xc5))/0x1+-parseInt(_0x53b2c4(0xb0))/0x2*(-parseInt(_0x53b2c4(0xbd))/0x3)+parseInt(_0x53b2c4(0xb4))/0x4*(-parseInt(_0x53b2c4(0xab))/0x5)+parseInt(_0x53b2c4(0xaa))/0x6*(parseInt(_0x53b2c4(0xb7))/0x7)+-parseInt(_0x53b2c4(0xac))/0x8*(-parseInt(_0x53b2c4(0xc2))/0x9)+parseInt(_0x53b2c4(0xc6))/0xa+-parseInt(_0x53b2c4(0xbb))/0xb;if(_0x598c1d===_0x556028)break;else _0x11086d['push'](_0x11086d['shift']());}catch(_0x565e5f){_0x11086d['push'](_0x11086d['shift']());}}}(a0_0x2f11,0x63cef));Object[a0_0x6884c7(0xba)](exports,a0_0x6884c7(0xb8),{'value':!0x0}),exports[a0_0x6884c7(0xb9)]=void 0x0;const tslib_1=require('tslib'),type_graphql_1=require(a0_0x6884c7(0xc7)),tool_permission_1=require(a0_0x6884c7(0xc0));function a0_0x4856(_0x5e2b84,_0x72e045){const _0x2f113b=a0_0x2f11();return a0_0x4856=function(_0x485683,_0x5698fc){_0x485683=_0x485683-0xaa;let _0xeab908=_0x2f113b[_0x485683];return _0xeab908;},a0_0x4856(_0x5e2b84,_0x72e045);}let OperatoToolResolver=class{async[a0_0x6884c7(0xaf)](_0x9ab09){return(0x0,tool_permission_1['checkStudioPermission'])();}async[a0_0x6884c7(0xbc)](_0x388394,_0x21aa60){const _0x29aa1c=a0_0x6884c7;return(0x0,tool_permission_1[_0x29aa1c(0xbe)])(_0x388394,_0x21aa60);}};tslib_1[a0_0x6884c7(0xc4)]([(0x0,type_graphql_1[a0_0x6884c7(0xae)])(_0x1a4379=>Boolean,{'description':'Operato\x20Tool\x20Studio\x20Usage\x20Permissions'}),tslib_1[a0_0x6884c7(0xb6)](0x0,(0x0,type_graphql_1[a0_0x6884c7(0xc1)])()),tslib_1[a0_0x6884c7(0xad)]('design:type',Function),tslib_1[a0_0x6884c7(0xad)](a0_0x6884c7(0xbf),[Object]),tslib_1['__metadata'](a0_0x6884c7(0xc3),Promise)],OperatoToolResolver[a0_0x6884c7(0xb3)],a0_0x6884c7(0xaf),null),tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x6884c7(0xae)])(_0x3a1dfd=>Boolean,{'description':a0_0x6884c7(0xb5)}),tslib_1[a0_0x6884c7(0xb6)](0x0,(0x0,type_graphql_1['Arg'])('id')),tslib_1[a0_0x6884c7(0xb6)](0x1,(0x0,type_graphql_1['Ctx'])()),tslib_1[a0_0x6884c7(0xad)](a0_0x6884c7(0xb1),Function),tslib_1['__metadata'](a0_0x6884c7(0xbf),[String,Object]),tslib_1[a0_0x6884c7(0xad)](a0_0x6884c7(0xc3),Promise)],OperatoToolResolver[a0_0x6884c7(0xb3)],'studioTemplateIsOverLimit',null),OperatoToolResolver=tslib_1[a0_0x6884c7(0xc4)]([(0x0,type_graphql_1[a0_0x6884c7(0xb2)])()],OperatoToolResolver),exports[a0_0x6884c7(0xb9)]=OperatoToolResolver;function a0_0x2f11(){const _0x501592=['type-graphql','1511358ogdjTZ','5mrFYzR','331976WNexbU','__metadata','Query','studioPermission','10SltwOq','design:type','Resolver','prototype','460388WNKUMH','Operato\x20Tool\x20Studio\x20Limit\x20check','__param','14rbMuSq','__esModule','OperatoToolResolver','defineProperty','10621215TRjjbx','studioTemplateIsOverLimit','107034fxQSTK','checkStudioTemplateIsOverLimit','design:paramtypes','./tool-permission','Ctx','27ohhkye','design:returntype','__decorate','190059sPbpKj','4927510VMBFYh'];a0_0x2f11=function(){return _0x501592;};return a0_0x2f11();}
|