@things-factory/operato-tools 6.0.82 → 6.0.91
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/actions/main.js +1 -1
- package/client/pages/generator/button-config-tab-mixin.js +4 -4
- package/client/pages/generator/column-config-tab-mixin.js +4 -4
- package/client/pages/generator/etc-config-tab-mixin.js +4 -4
- package/client/pages/generator/form-config-tab-mixin.js +4 -4
- package/client/pages/generator/graphql-config-tab-mixin.js +24 -24
- package/client/pages/generator/grid-config-tab-mixin.js +22 -22
- package/client/pages/generator/menu-config-tab-mixin.js +11 -11
- package/client/pages/generator/meta-generator-page.js +11 -11
- package/client/pages/generator/search-config-tab-mixin.js +4 -4
- package/client/pages/generator/tab-config-tab-mixin.js +4 -4
- package/client/pages/main.js +4 -4
- package/client/reducers/main.js +1 -1
- package/package.json +4 -4
- package/server/constants/error-code.js +1 -1
- package/server/errors/license-error.js +1 -1
- package/server/routes.js +1 -1
- package/server/service/tool-entity/create-menu.js +1 -1
- package/server/service/tool-entity/create-service.js +1 -1
- package/server/service/tool-secret/tool-permission.js +1 -1
- package/server/service/tool-secret/tool-resolver.js +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x259955=a0_0x2004;(function(_0x3fc251,_0x1a0fde){const _0x55c590=a0_0x2004,_0xb9479f=_0x3fc251();while(!![]){try{const _0x3d8b1a=-parseInt(_0x55c590(0xfc))/0x1+-parseInt(_0x55c590(0xf6))/0x2*(-parseInt(_0x55c590(0x100))/0x3)+-parseInt(_0x55c590(0xfa))/0x4*(parseInt(_0x55c590(0xfe))/0x5)+-parseInt(_0x55c590(0xf2))/0x6*(parseInt(_0x55c590(0xf3))/0x7)+parseInt(_0x55c590(0xee))/0x8*(parseInt(_0x55c590(0xfd))/0x9)+parseInt(_0x55c590(0xf4))/0xa*(parseInt(_0x55c590(0xff))/0xb)+parseInt(_0x55c590(0xef))/0xc;if(_0x3d8b1a===_0x1a0fde)break;else _0xb9479f['push'](_0xb9479f['shift']());}catch(_0x8019a5){_0xb9479f['push'](_0xb9479f['shift']());}}}(a0_0xc80e,0x7903b));function a0_0x2004(_0x49e218,_0x406aa8){const _0xc80e64=a0_0xc80e();return a0_0x2004=function(_0x200431,_0x3ccbb6){_0x200431=_0x200431-0xee;let _0x5b6ae2=_0xc80e64[_0x200431];return _0x5b6ae2;},a0_0x2004(_0x49e218,_0x406aa8);}Object[a0_0x259955(0xf8)](exports,'__esModule',{'value':!0x0}),exports[a0_0x259955(0xfb)]=void 0x0;const tslib_1=require(a0_0x259955(0xf9)),ERROR_CODES=tslib_1['__importStar'](require(a0_0x259955(0xf1)));class LicenseError extends Error{static get[a0_0x259955(0xf0)](){return Object['assign']({},ERROR_CODES);}constructor({errorCode:_0x23177a,detail:_0x4afd30}){const _0x1ec6e6=a0_0x259955;super(_0x23177a),this[_0x1ec6e6(0x101)]=_0x1ec6e6(0xf5),this['errorCode']=_0x23177a,this[_0x1ec6e6(0xf7)]=_0x4afd30;}}exports[a0_0x259955(0xfb)]=LicenseError;function a0_0xc80e(){const _0x2dd508=['../constants/error-code','46458EiGkDl','532uDuBYq','136630JZLjOo','license-error','71986ntJyJU','detail','defineProperty','tslib','80qNRndb','LicenseError','444960NxyTrP','81VxtQSk','165705cLqoXF','561oMHBij','33VTdoSq','name','279584AIVTGG','9415860IuScBX','ERROR_CODES'];a0_0xc80e=function(){return _0x2dd508;};return a0_0xc80e();}
|
package/server/routes.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a0_0x253cbe=a0_0x587d;function a0_0x587d(_0x282e80,_0x226112){const _0x226964=a0_0x2269();return a0_0x587d=function(_0x587d62,_0x23ea82){_0x587d62=_0x587d62-0xf2;let _0x30871a=_0x226964[_0x587d62];return _0x30871a;},a0_0x587d(_0x282e80,_0x226112);}function a0_0x2269(){const _0x52557e=['12XnDzpn','44bGVPmX','3470PYrUZV','debug','2VyPTEF','bootstrap-module-global-public-route','15417yKsYRH','102909lUVBEo','bootstrap-module-domain-public-route','bootstrap-module-global-private-route','234471FmOtNY','1496230qvSxth','638256olqUmr','32rVGhQY','2872104MpsKES','bootstrap-module-domain-private-route','146825LgyzZb'];a0_0x2269=function(){return _0x52557e;};return a0_0x2269();}(function(_0x94c0f,_0x2b3df4){const _0x10a74a=a0_0x587d,_0x1eb81c=_0x94c0f();while(!![]){try{const _0x3d217c=parseInt(_0x10a74a(0x102))/0x1+-parseInt(_0x10a74a(0xff))/0x2*(parseInt(_0x10a74a(0xf4))/0x3)+-parseInt(_0x10a74a(0xf8))/0x4+parseInt(_0x10a74a(0xf5))/0x5*(parseInt(_0x10a74a(0xfb))/0x6)+-parseInt(_0x10a74a(0xfa))/0x7*(-parseInt(_0x10a74a(0xf7))/0x8)+-parseInt(_0x10a74a(0x101))/0x9*(-parseInt(_0x10a74a(0xfd))/0xa)+parseInt(_0x10a74a(0xfc))/0xb*(-parseInt(_0x10a74a(0xf6))/0xc);if(_0x3d217c===_0x2b3df4)break;else _0x1eb81c['push'](_0x1eb81c['shift']());}catch(_0x4e3b60){_0x1eb81c['push'](_0x1eb81c['shift']());}}}(a0_0x2269,0x5a859));const debug=require(a0_0x253cbe(0xfe))('things-factory:operato-tools:routes');process['on'](a0_0x253cbe(0x100),(_0x306a57,_0x36c8a7)=>{}),process['on'](a0_0x253cbe(0xf3),(_0x4b0d48,_0x4bfd92)=>{}),process['on'](a0_0x253cbe(0xf2),(_0x30283b,_0x58fc3d)=>{}),process['on'](a0_0x253cbe(0xf9),(_0x4932e2,_0x40db52)=>{});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x5d8405=a0_0x109a;(function(_0x56df04,_0x2ca26f){const _0x8edcaf=a0_0x109a,_0xed239b=_0x56df04();while(!![]){try{const _0x575f5b=-parseInt(_0x8edcaf(0x17b))/0x1+-parseInt(_0x8edcaf(0x1b7))/0x2+parseInt(_0x8edcaf(0x1e2))/0x3+parseInt(_0x8edcaf(0x179))/0x4+parseInt(_0x8edcaf(0x19f))/0x5+-parseInt(_0x8edcaf(0x17d))/0x6+parseInt(_0x8edcaf(0x190))/0x7*(parseInt(_0x8edcaf(0x1a6))/0x8);if(_0x575f5b===_0x2ca26f)break;else _0xed239b['push'](_0xed239b['shift']());}catch(_0xdb97d7){_0xed239b['push'](_0xed239b['shift']());}}}(a0_0x3d96,0xc3f70));function a0_0x3d96(){const _0x43e51a=['sortRank','hidden','updated_at','__importDefault','meta-grist-page','find','\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','readonly','getRepository','push','createMenuData','{\x22name\x22:\x22','4208729vOzHnH','createdAt','routing','rank','\x20,\x22exportable\x22:\x20true','createSearchCols','aes-256-ofb','filter','Directive','assign','prototype','Operato\x20Tool\x20Create\x20Menu','code','enc','length','5574365oXBmLy','searchRank','sort','default','created_at','category','Ctx','16VoBmgy','gridRank','aes-256-cfb1','findOne','createSortCols','replace','left','createCipheriv','menuType','creator_id','crypto','toString','type-graphql','__esModule','{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22','aes-256-ecb','defineProperty','2325638sOCjdp','aes-256-cbc','searchOper','design:returntype','pluralize','updater_id','updatedAt','dataProp','\x20,\x22editable\x22:\x20','scenario','resourceUrl','select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27','map','hex',',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22','Mutation','__metadata','entity','lodash','hiddenFlag','@things-factory/resource-base','{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22','\x22,\x22header\x22:\x20\x22','@things-factory/menu-base','\x22,\x22name\x22:\x20\x22','parent','string','__decorate','\x22,\x22width\x22:','parent_menu_id','utf8','update','__param','updater','design:paramtypes','h1z0q9i9x7q6','creator','{\x22type\x22:\x20\x22','save',',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22','Menu','@things-factory/meta-ui/client/pages/meta-grist-page','aes-256-cfb','2287209iXNCgy','checkStudioTemplateIsOverLimit','JSON','tslib','name','createGridColumns','aes-256-ctr','join',',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22','aes256','reverseSort','710704IKWBMa','Entity','707992ZgteVz','OperatoToolCreateMenu','3503778TBUNHB',',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22','\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}','\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','refType','aes-256-cfb8','toolCreateMenu'];a0_0x3d96=function(){return _0x43e51a;};return a0_0x3d96();}function a0_0x109a(_0x3d8774,_0x644c20){const _0x3d9698=a0_0x3d96();return a0_0x109a=function(_0x109a96,_0x470a87){_0x109a96=_0x109a96-0x170;let _0x39f0fb=_0x3d9698[_0x109a96];return _0x39f0fb;},a0_0x109a(_0x3d8774,_0x644c20);}Object[a0_0x5d8405(0x1b6)](exports,a0_0x5d8405(0x1b3),{'value':!0x0}),exports[a0_0x5d8405(0x17c)]=void 0x0;const tslib_1=require(a0_0x5d8405(0x171)),type_graphql_1=require(a0_0x5d8405(0x1b2)),resource_base_1=require(a0_0x5d8405(0x1cb)),menu_base_1=require(a0_0x5d8405(0x1ce)),tool_permission_1=require('./../tool-secret/tool-permission'),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x5d8405(0x1c9)),{plural:plural}=require(a0_0x5d8405(0x1bb)),crypto_1=tslib_1[a0_0x5d8405(0x187)](require(a0_0x5d8405(0x1b0)));let OperatoToolCreateMenu=class{async[a0_0x5d8405(0x183)](_0x411c0c,_0x4df082,_0x52b162){const _0x198d23=a0_0x5d8405,{domain:_0x33b77a,user:_0xfcddeb,tx:_0x529f2f}=_0x52b162['state'];await(0x0,tool_permission_1[_0x198d23(0x1e3)])('',_0x52b162);const _0xb263a9=await _0x529f2f[_0x198d23(0x18c)](resource_base_1[_0x198d23(0x17a)])[_0x198d23(0x1a9)]({'where':{'domain':{'id':_0x33b77a['id']},'id':_0x411c0c}}),_0x1ce1a3=await _0x529f2f[_0x198d23(0x18c)](resource_base_1['EntityColumn'])[_0x198d23(0x189)]({'where':{'domain':{'id':_0x33b77a['id']},'entity':{'id':_0xb263a9['id']}}});let {name:_0x1e39aa=''}=_0xb263a9||{},_0x2ede7b=kebabCase(_0x1e39aa),_0x2a79be=modelTemplate['replace'](/{{pascalCase name}}/g,startCase(camelCase(_0x1e39aa))[_0x198d23(0x1ab)](/ /g,''))[_0x198d23(0x1ab)](/{{camelCase name}}/g,camelCase(_0x1e39aa))['replace'](/{{snakeCase name}}/g,snakeCase(_0x1e39aa))[_0x198d23(0x1ab)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x1e39aa)))[_0x198d23(0x1ab)](/ /g,''))[_0x198d23(0x1ab)](/{{pluralCamelCase name}}/g,camelCase(plural(_0x1e39aa)))[_0x198d23(0x1ab)](/{{name}}/g,_0x1e39aa),_0x19014e='';_0x198d23(0x170)==_0xb263a9[_0x198d23(0x1be)]?_0x19014e=_0x198d23(0x18a):'COPY'==_0xb263a9['dataProp']&&(_0x19014e='\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'),_0x2a79be=_0x2a79be[_0x198d23(0x1ab)](/{{HistoryButton}}/g,_0x19014e);let _0x591e51=this['createSortCols'](_0x1ce1a3);_0x2a79be=_0x2a79be[_0x198d23(0x1ab)](/{{SortColumns}}/g,_0x591e51[_0x198d23(0x175)](','));let _0x42f090=this[_0x198d23(0x195)](_0x1ce1a3);_0x2a79be=_0x2a79be[_0x198d23(0x1ab)](/{{SearchColumns}}/g,_0x42f090[_0x198d23(0x175)](','));let _0x4e6835=this[_0x198d23(0x173)](_0x1ce1a3);return _0x2a79be=_0x2a79be[_0x198d23(0x1ab)](/{{GridColumns}}/g,_0x4e6835[_0x198d23(0x175)](',')),_0x2a79be=this[_0x198d23(0x19d)](_0x2a79be),await this[_0x198d23(0x18e)](_0x529f2f,_0x33b77a,_0xfcddeb,_0x4df082,_0x2ede7b,_0x2a79be),!0x0;}[a0_0x5d8405(0x173)](_0x290ef6){const _0xe921cf=a0_0x5d8405;return _0x290ef6[_0xe921cf(0x197)](_0x10ea51=>'id'!=_0x10ea51[_0xe921cf(0x172)]&&_0x10ea51[_0xe921cf(0x1a7)]>0x0)['sort'](function(_0x534cb4,_0x2c1c40){const _0x2bebf7=_0xe921cf;return _0x534cb4[_0x2bebf7(0x1a7)]-_0x2c1c40[_0x2bebf7(0x1a7)];})[_0xe921cf(0x1c3)](_0x597da0=>{const _0x8f8bcc=_0xe921cf;let {gridEditor:_0x1c88ee='string',name:_0x50cb34,term:_0x103422,gridWidth:_0x508d23=0x0,gridAlign:_0x144159=_0x8f8bcc(0x1ac),nullable:_0x4973c6=!0x1}=_0x597da0;if(null==_0x1c88ee&&(_0x1c88ee=_0x8f8bcc(0x1d1)),null==_0x144159&&(_0x144159=_0x8f8bcc(0x1ac)),_0x8f8bcc(0x1bc)==_0x50cb34||_0x8f8bcc(0x1af)==_0x50cb34)return _0x50cb34=_0x8f8bcc(0x1bc)==_0x50cb34?_0x8f8bcc(0x1d8):_0x8f8bcc(0x1db),_0x8f8bcc(0x1cc)+_0x50cb34+_0x8f8bcc(0x1cd)+_0x50cb34+_0x8f8bcc(0x17f);if('updated_at'==_0x50cb34||_0x8f8bcc(0x1a3)==_0x50cb34)return _0x8f8bcc(0x1b4)+(_0x8f8bcc(0x186)==_0x50cb34?_0x8f8bcc(0x1bd):_0x8f8bcc(0x191))+'\x22,\x22header\x22:\x20\x22'+_0x50cb34+'\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}';let _0x40eab6=_0x8f8bcc(0x18b)!=_0x1c88ee&&_0x8f8bcc(0x185)!=_0x1c88ee,_0x297fee=_0x8f8bcc(0x185)==_0x1c88ee;0x1!=_0x297fee&&0x0!=_0x40eab6||(_0x1c88ee=_0x8f8bcc(0x1d1));let _0x1544f1=_0x8f8bcc(0x1dc)+_0x1c88ee+_0x8f8bcc(0x1cf)+camelCase(_0x50cb34)+_0x8f8bcc(0x1cd)+_0x103422+'\x22,\x22hidden\x22:'+_0x297fee+_0x8f8bcc(0x1bf)+_0x40eab6+',\x22mandatory\x22:\x20'+!_0x4973c6+_0x8f8bcc(0x1de)+_0x144159+_0x8f8bcc(0x1d3)+_0x508d23+_0x8f8bcc(0x194);return _0x8f8bcc(0x19c)==_0x597da0[_0x8f8bcc(0x181)]&&(_0x1544f1+=_0x8f8bcc(0x17e)+_0x597da0['refName']+'\x22}'),_0x8f8bcc(0x1c0)==_0x597da0[_0x8f8bcc(0x181)]&&(_0x1544f1+=_0x8f8bcc(0x176)+_0x597da0['refName']+'\x22}'),_0x8f8bcc(0x1c8)==_0x597da0['refType']&&(_0x1544f1+=_0x8f8bcc(0x1c5)+camelCase(plural(_0x597da0['refName']))+'\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}'),_0x1544f1+='}',_0x1544f1;});}[a0_0x5d8405(0x195)](_0x542980){const _0x55eefa=a0_0x5d8405;return _0x542980[_0x55eefa(0x197)](_0x3d4bef=>_0x3d4bef['searchRank']>0x0)['sort'](function(_0xccd9e8,_0xbef60d){const _0x2e47ee=_0x55eefa;return _0xccd9e8['searchRank']-_0xbef60d[_0x2e47ee(0x1a0)];})[_0x55eefa(0x1c3)](_0xbe11c2=>{const _0x6496fa=_0x55eefa;let _0x46c249=_0xbe11c2[_0x6496fa(0x1b9)];return _0x6496fa(0x197)==_0x46c249?'\x22'+camelCase(_0xbe11c2[_0x6496fa(0x172)])+'\x22':(_0x46c249||(_0x46c249='eq'),'{\x22name\x22:\x20\x22'+camelCase(_0xbe11c2[_0x6496fa(0x172)])+'\x22,\x22operator\x22:\x20\x22'+_0x46c249+'\x22}');});}[a0_0x5d8405(0x1aa)](_0x101d3c){const _0x37b0f9=a0_0x5d8405;return _0x101d3c[_0x37b0f9(0x197)](_0x30c387=>_0x30c387[_0x37b0f9(0x184)]>0x0)[_0x37b0f9(0x1a1)](function(_0x4ec60b,_0x53ff67){const _0x1eb60a=_0x37b0f9;return _0x4ec60b[_0x1eb60a(0x184)]-_0x53ff67[_0x1eb60a(0x184)];})[_0x37b0f9(0x1c3)](_0x524c2c=>_0x37b0f9(0x18f)+camelCase(_0x524c2c[_0x37b0f9(0x172)])+'\x22,\x22desc\x22:'+_0x524c2c[_0x37b0f9(0x178)]+'}');}async[a0_0x5d8405(0x18e)](_0x494672,_0x1339f6,_0x95bac1,_0x42bf69,_0x3c0b95,_0x2d687f){const _0x466d5c=a0_0x5d8405;let _0x35b964=await _0x494672[_0x466d5c(0x18c)](menu_base_1[_0x466d5c(0x1df)])[_0x466d5c(0x1a9)]({'where':{'domain':{'id':_0x1339f6['id']},'id':_0x42bf69}}),_0x40ed11=(await _0x494672[_0x466d5c(0x18c)](menu_base_1[_0x466d5c(0x1df)])['query'](_0x466d5c(0x1c2)+_0x42bf69+'\x27\x20or\x20id\x20=\x20\x27'+_0x42bf69+'\x27'))[0x0][_0x466d5c(0x193)]+0xa,_0x3d5dc4=new menu_base_1[(_0x466d5c(0x1df))]();_0x3d5dc4[_0x466d5c(0x172)]=_0x3c0b95,_0x3d5dc4[_0x466d5c(0x1ae)]='SCREEN',_0x3d5dc4[_0x466d5c(0x1a4)]=_0x466d5c(0x188),_0x3d5dc4[_0x466d5c(0x193)]=_0x40ed11,_0x3d5dc4[_0x466d5c(0x1ca)]=!0x1,_0x3d5dc4[_0x466d5c(0x192)]=_0x3c0b95,_0x3d5dc4['template']=_0x2d687f,_0x3d5dc4[_0x466d5c(0x1c1)]=_0x466d5c(0x1e0),_0x3d5dc4[_0x466d5c(0x1d0)]=_0x35b964,await _0x494672['getRepository'](menu_base_1[_0x466d5c(0x1df)])[_0x466d5c(0x1dd)](Object[_0x466d5c(0x199)](Object['assign']({},_0x3d5dc4),{'domain':_0x1339f6,'creator':_0x95bac1,'updater':_0x95bac1}));}['enc'](_0x2289df){const _0x4019ec=a0_0x5d8405;let _0xd8f835=JSON['stringify'](_0x2289df)['split'](/(.{100})/)[_0x4019ec(0x197)](_0x397973=>_0x397973),_0x51be00=[_0x4019ec(0x1b5),_0x4019ec(0x1b8),_0x4019ec(0x1e1),_0x4019ec(0x182),_0x4019ec(0x1a8),_0x4019ec(0x196),_0x4019ec(0x174),_0x4019ec(0x177)],_0x831ffa=crypto_1[_0x4019ec(0x1a2)]['randomBytes'](0x20)[_0x4019ec(0x1b1)](_0x4019ec(0x1c4)),_0x308237=Buffer['from'](_0x831ffa,_0x4019ec(0x1c4)),_0x3fb271=_0x831ffa['substring'](0x0,0x10),_0x87189d=['',_0x3fb271,_0x3fb271,_0x3fb271,_0x3fb271,_0x3fb271,_0x3fb271,_0x3fb271],_0x317de2=0x0,_0x39b051=[];_0x39b051[_0x4019ec(0x18d)](_0x831ffa);for(var _0x1563a8=0x0;_0x1563a8<_0xd8f835[_0x4019ec(0x19e)];_0x1563a8++,_0x317de2++){_0x317de2==_0x51be00[_0x4019ec(0x19e)]&&(_0x317de2=0x0);let _0x595b5d=crypto_1[_0x4019ec(0x1a2)][_0x4019ec(0x1ad)](_0x51be00[_0x317de2],_0x308237,_0x87189d[_0x317de2]),_0x57366a=_0x595b5d[_0x4019ec(0x1d6)](_0xd8f835[_0x1563a8],_0x4019ec(0x1d5),_0x4019ec(0x1c4));_0x57366a+=_0x595b5d['final']('hex'),_0x39b051['push'](_0x57366a);}return _0x39b051[_0x4019ec(0x175)](_0x4019ec(0x1da));}};tslib_1[a0_0x5d8405(0x1d2)]([(0x0,type_graphql_1[a0_0x5d8405(0x198)])('@transaction'),(0x0,type_graphql_1[a0_0x5d8405(0x1c6)])(_0x2a6a0d=>Boolean,{'description':a0_0x5d8405(0x19b)}),tslib_1[a0_0x5d8405(0x1d7)](0x0,(0x0,type_graphql_1['Arg'])('id')),tslib_1[a0_0x5d8405(0x1d7)](0x1,(0x0,type_graphql_1['Arg'])(a0_0x5d8405(0x1d4))),tslib_1[a0_0x5d8405(0x1d7)](0x2,(0x0,type_graphql_1[a0_0x5d8405(0x1a5)])()),tslib_1[a0_0x5d8405(0x1c7)]('design:type',Function),tslib_1[a0_0x5d8405(0x1c7)](a0_0x5d8405(0x1d9),[String,String,Object]),tslib_1['__metadata'](a0_0x5d8405(0x1ba),Promise)],OperatoToolCreateMenu[a0_0x5d8405(0x19a)],a0_0x5d8405(0x183),null),OperatoToolCreateMenu=tslib_1[a0_0x5d8405(0x1d2)]([(0x0,type_graphql_1['Resolver'])()],OperatoToolCreateMenu),exports[a0_0x5d8405(0x17c)]=OperatoToolCreateMenu;const modelTemplate=a0_0x5d8405(0x180);
|
|
1
|
+
'use strict';function a0_0x2abe(){const _0x172032=['Entity','updated_at','__importDefault','push','assign','OperatoToolCreateMenu','createCipheriv','aes-256-cfb1','1461960CpEVUF','\x22,\x22hidden\x22:','randomBytes','JSON','aes-256-cfb8','hiddenFlag','Resolver','from','save','searchRank','utf8','\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}','\x20,\x22exportable\x22:\x20true','createMenuData','state','template','searchOper','SCREEN','design:type','refType','createGridColumns','3966AEmWpw','hidden','Ctx',',\x22mandatory\x22:\x20','pluralize','reverseSort','\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','hex','\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}','aes-256-ecb','\x22,\x22width\x22:','Menu','filter','toString','EntityColumn','createSearchCols','10XuZGNA','meta-grist-page','created_at','aes-256-ofb','defineProperty','sortRank','entity','final','toolCreateMenu','aes-256-ctr',',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22','dataProp','__metadata','gridRank','updater','\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','checkStudioTemplateIsOverLimit','55Ovmskx','432RPkrrr','{\x22type\x22:\x20\x22','default','h1z0q9i9x7q6','parent_menu_id','replace','Mutation',',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22','getRepository','createSortCols','26568VmTJon','5254648ntPCfw','menuType','map','57976NWtCQH','name','\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}','updater_id','COPY','find','creator_id','stringify','11083457ZKTsOl','@transaction','aes-256-cbc','crypto','Arg','parent','scenario','1089HqSTCr','length','join','select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27','\x22,\x22header\x22:\x20\x22','split','lodash','left','@things-factory/meta-ui/client/pages/meta-grist-page','enc','\x22,\x22operator\x22:\x20\x22','refName','__decorate','Directive','Operato\x20Tool\x20Create\x20Menu','design:paramtypes','sort','{\x22name\x22:\x20\x22','resourceUrl','type-graphql','string','prototype','aes256','aes-256-cfb','\x22,\x22name\x22:\x20\x22','593708VJXDbO','__param'];a0_0x2abe=function(){return _0x172032;};return a0_0x2abe();}const a0_0x28817e=a0_0x87a0;(function(_0x54d7cb,_0x496d34){const _0x69c621=a0_0x87a0,_0xb90604=_0x54d7cb();while(!![]){try{const _0x1ff17c=parseInt(_0x69c621(0x17a))/0x1+parseInt(_0x69c621(0x170))/0x2*(parseInt(_0x69c621(0x1c5))/0x3)+-parseInt(_0x69c621(0x1a6))/0x4*(-parseInt(_0x69c621(0x16f))/0x5)+-parseInt(_0x69c621(0x1b0))/0x6+-parseInt(_0x69c621(0x17b))/0x7+-parseInt(_0x69c621(0x17e))/0x8*(-parseInt(_0x69c621(0x18d))/0x9)+-parseInt(_0x69c621(0x1d5))/0xa*(parseInt(_0x69c621(0x186))/0xb);if(_0x1ff17c===_0x496d34)break;else _0xb90604['push'](_0xb90604['shift']());}catch(_0x566c20){_0xb90604['push'](_0xb90604['shift']());}}}(a0_0x2abe,0xc8251));function a0_0x87a0(_0xf75cdf,_0x31ebc7){const _0x2abe11=a0_0x2abe();return a0_0x87a0=function(_0x87a03a,_0x25afc7){_0x87a03a=_0x87a03a-0x167;let _0x44efce=_0x2abe11[_0x87a03a];return _0x44efce;},a0_0x87a0(_0xf75cdf,_0x31ebc7);}Object[a0_0x28817e(0x1d9)](exports,'__esModule',{'value':!0x0}),exports[a0_0x28817e(0x1ad)]=void 0x0;const tslib_1=require('tslib'),type_graphql_1=require(a0_0x28817e(0x1a0)),resource_base_1=require('@things-factory/resource-base'),menu_base_1=require('@things-factory/menu-base'),tool_permission_1=require('./../tool-secret/tool-permission'),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x28817e(0x193)),{plural:plural}=require(a0_0x28817e(0x1c9)),crypto_1=tslib_1[a0_0x28817e(0x1aa)](require(a0_0x28817e(0x189)));let OperatoToolCreateMenu=class{async[a0_0x28817e(0x1dd)](_0x6714d7,_0x3068f0,_0xbe9a2a){const _0x830023=a0_0x28817e,{domain:_0x58c80e,user:_0x2fd245,tx:_0x9f1c61}=_0xbe9a2a[_0x830023(0x1be)];await(0x0,tool_permission_1[_0x830023(0x16e)])('',_0xbe9a2a);const _0x239082=await _0x9f1c61[_0x830023(0x178)](resource_base_1[_0x830023(0x1a8)])['findOne']({'where':{'domain':{'id':_0x58c80e['id']},'id':_0x6714d7}}),_0x3f137d=await _0x9f1c61['getRepository'](resource_base_1[_0x830023(0x1d3)])[_0x830023(0x183)]({'where':{'domain':{'id':_0x58c80e['id']},'entity':{'id':_0x239082['id']}}});let {name:_0x1a1b49=''}=_0x239082||{},_0x317b9c=kebabCase(_0x1a1b49),_0x1e38ea=modelTemplate['replace'](/{{pascalCase name}}/g,startCase(camelCase(_0x1a1b49))['replace'](/ /g,''))[_0x830023(0x175)](/{{camelCase name}}/g,camelCase(_0x1a1b49))[_0x830023(0x175)](/{{snakeCase name}}/g,snakeCase(_0x1a1b49))[_0x830023(0x175)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x1a1b49)))[_0x830023(0x175)](/ /g,''))[_0x830023(0x175)](/{{pluralCamelCase name}}/g,camelCase(plural(_0x1a1b49)))[_0x830023(0x175)](/{{name}}/g,_0x1a1b49),_0x4a366a='';_0x830023(0x1b3)==_0x239082['dataProp']?_0x4a366a=_0x830023(0x1cb):_0x830023(0x182)==_0x239082[_0x830023(0x169)]&&(_0x4a366a='\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'),_0x1e38ea=_0x1e38ea['replace'](/{{HistoryButton}}/g,_0x4a366a);let _0x5b4cb5=this['createSortCols'](_0x3f137d);_0x1e38ea=_0x1e38ea[_0x830023(0x175)](/{{SortColumns}}/g,_0x5b4cb5[_0x830023(0x18f)](','));let _0x5c4307=this['createSearchCols'](_0x3f137d);_0x1e38ea=_0x1e38ea[_0x830023(0x175)](/{{SearchColumns}}/g,_0x5c4307['join'](','));let _0x4b2512=this[_0x830023(0x1c4)](_0x3f137d);return _0x1e38ea=_0x1e38ea[_0x830023(0x175)](/{{GridColumns}}/g,_0x4b2512['join'](',')),_0x1e38ea=this[_0x830023(0x196)](_0x1e38ea),await this['createMenuData'](_0x9f1c61,_0x58c80e,_0x2fd245,_0x3068f0,_0x317b9c,_0x1e38ea),!0x0;}[a0_0x28817e(0x1c4)](_0x20d7c4){const _0x385aa8=a0_0x28817e;return _0x20d7c4[_0x385aa8(0x1d1)](_0x4b5409=>'id'!=_0x4b5409[_0x385aa8(0x17f)]&&_0x4b5409['gridRank']>0x0)[_0x385aa8(0x19d)](function(_0x2d7203,_0x199b1a){const _0x3c1afa=_0x385aa8;return _0x2d7203[_0x3c1afa(0x16b)]-_0x199b1a['gridRank'];})['map'](_0x5871be=>{const _0x5616c9=_0x385aa8;let {gridEditor:_0xa027cc='string',name:_0x5db921,term:_0x679c73,gridWidth:_0x5123f7=0x0,gridAlign:_0x18df63='left',nullable:_0x4944f3=!0x1}=_0x5871be;if(null==_0xa027cc&&(_0xa027cc=_0x5616c9(0x1a1)),null==_0x18df63&&(_0x18df63=_0x5616c9(0x194)),_0x5616c9(0x181)==_0x5db921||_0x5616c9(0x184)==_0x5db921)return _0x5db921=_0x5616c9(0x181)==_0x5db921?_0x5616c9(0x16c):'creator','{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22'+_0x5db921+'\x22,\x22header\x22:\x20\x22'+_0x5db921+_0x5616c9(0x180);if(_0x5616c9(0x1a9)==_0x5db921||_0x5616c9(0x1d7)==_0x5db921)return'{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22'+(_0x5616c9(0x1a9)==_0x5db921?'updatedAt':'createdAt')+_0x5616c9(0x191)+_0x5db921+_0x5616c9(0x1cd);let _0x11c7ae='readonly'!=_0xa027cc&&'hidden'!=_0xa027cc,_0x2aaf7f=_0x5616c9(0x1c6)==_0xa027cc;0x1!=_0x2aaf7f&&0x0!=_0x11c7ae||(_0xa027cc=_0x5616c9(0x1a1));let _0x10e5c3=_0x5616c9(0x171)+_0xa027cc+_0x5616c9(0x1a5)+camelCase(_0x5db921)+_0x5616c9(0x191)+_0x679c73+_0x5616c9(0x1b1)+_0x2aaf7f+'\x20,\x22editable\x22:\x20'+_0x11c7ae+_0x5616c9(0x1c8)+!_0x4944f3+_0x5616c9(0x168)+_0x18df63+_0x5616c9(0x1cf)+_0x5123f7+_0x5616c9(0x1bc);return'code'==_0x5871be[_0x5616c9(0x1c3)]&&(_0x10e5c3+=',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22'+_0x5871be[_0x5616c9(0x198)]+'\x22}'),_0x5616c9(0x18c)==_0x5871be[_0x5616c9(0x1c3)]&&(_0x10e5c3+=',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22'+_0x5871be[_0x5616c9(0x198)]+'\x22}'),_0x5616c9(0x1db)==_0x5871be['refType']&&(_0x10e5c3+=_0x5616c9(0x177)+camelCase(plural(_0x5871be['refName']))+_0x5616c9(0x1bb)),_0x10e5c3+='}',_0x10e5c3;});}[a0_0x28817e(0x1d4)](_0x2d0303){const _0x1625a9=a0_0x28817e;return _0x2d0303[_0x1625a9(0x1d1)](_0xa98dc4=>_0xa98dc4[_0x1625a9(0x1b9)]>0x0)[_0x1625a9(0x19d)](function(_0x53d4b8,_0x5019a0){const _0x5c649d=_0x1625a9;return _0x53d4b8[_0x5c649d(0x1b9)]-_0x5019a0[_0x5c649d(0x1b9)];})[_0x1625a9(0x17d)](_0x8a84a9=>{const _0x3b6059=_0x1625a9;let _0x2830b0=_0x8a84a9[_0x3b6059(0x1c0)];return _0x3b6059(0x1d1)==_0x2830b0?'\x22'+camelCase(_0x8a84a9[_0x3b6059(0x17f)])+'\x22':(_0x2830b0||(_0x2830b0='eq'),_0x3b6059(0x19e)+camelCase(_0x8a84a9[_0x3b6059(0x17f)])+_0x3b6059(0x197)+_0x2830b0+'\x22}');});}[a0_0x28817e(0x179)](_0x593933){const _0x1ee573=a0_0x28817e;return _0x593933[_0x1ee573(0x1d1)](_0x8420f=>_0x8420f['sortRank']>0x0)['sort'](function(_0x1d352c,_0x1da537){const _0x102693=_0x1ee573;return _0x1d352c[_0x102693(0x1da)]-_0x1da537['sortRank'];})[_0x1ee573(0x17d)](_0x692673=>'{\x22name\x22:\x22'+camelCase(_0x692673['name'])+'\x22,\x22desc\x22:'+_0x692673[_0x1ee573(0x1ca)]+'}');}async[a0_0x28817e(0x1bd)](_0x429b77,_0x3d429c,_0x38bd0d,_0x12ccd0,_0x1d3453,_0x574165){const _0x1a08ce=a0_0x28817e;let _0x582ad4=await _0x429b77[_0x1a08ce(0x178)](menu_base_1['Menu'])['findOne']({'where':{'domain':{'id':_0x3d429c['id']},'id':_0x12ccd0}}),_0x515bb6=(await _0x429b77['getRepository'](menu_base_1[_0x1a08ce(0x1d0)])['query'](_0x1a08ce(0x190)+_0x12ccd0+'\x27\x20or\x20id\x20=\x20\x27'+_0x12ccd0+'\x27'))[0x0]['rank']+0xa,_0x40249e=new menu_base_1[(_0x1a08ce(0x1d0))]();_0x40249e[_0x1a08ce(0x17f)]=_0x1d3453,_0x40249e[_0x1a08ce(0x17c)]=_0x1a08ce(0x1c1),_0x40249e['category']=_0x1a08ce(0x1d6),_0x40249e['rank']=_0x515bb6,_0x40249e[_0x1a08ce(0x1b5)]=!0x1,_0x40249e['routing']=_0x1d3453,_0x40249e[_0x1a08ce(0x1bf)]=_0x574165,_0x40249e[_0x1a08ce(0x19f)]=_0x1a08ce(0x195),_0x40249e[_0x1a08ce(0x18b)]=_0x582ad4,await _0x429b77[_0x1a08ce(0x178)](menu_base_1[_0x1a08ce(0x1d0)])[_0x1a08ce(0x1b8)](Object[_0x1a08ce(0x1ac)](Object[_0x1a08ce(0x1ac)]({},_0x40249e),{'domain':_0x3d429c,'creator':_0x38bd0d,'updater':_0x38bd0d}));}[a0_0x28817e(0x196)](_0x4ef92e){const _0x337f64=a0_0x28817e;let _0x11efe0=JSON[_0x337f64(0x185)](_0x4ef92e)[_0x337f64(0x192)](/(.{100})/)[_0x337f64(0x1d1)](_0x49b8c6=>_0x49b8c6),_0x221c96=[_0x337f64(0x1ce),_0x337f64(0x188),_0x337f64(0x1a4),_0x337f64(0x1b4),_0x337f64(0x1af),_0x337f64(0x1d8),_0x337f64(0x167),_0x337f64(0x1a3)],_0x13e2c8=crypto_1[_0x337f64(0x172)][_0x337f64(0x1b2)](0x20)[_0x337f64(0x1d2)](_0x337f64(0x1cc)),_0x5b002f=Buffer[_0x337f64(0x1b7)](_0x13e2c8,'hex'),_0x5b19a6=_0x13e2c8['substring'](0x0,0x10),_0x20b14e=['',_0x5b19a6,_0x5b19a6,_0x5b19a6,_0x5b19a6,_0x5b19a6,_0x5b19a6,_0x5b19a6],_0x1e4cac=0x0,_0x16c18d=[];_0x16c18d[_0x337f64(0x1ab)](_0x13e2c8);for(var _0x3712fd=0x0;_0x3712fd<_0x11efe0[_0x337f64(0x18e)];_0x3712fd++,_0x1e4cac++){_0x1e4cac==_0x221c96[_0x337f64(0x18e)]&&(_0x1e4cac=0x0);let _0xec556a=crypto_1[_0x337f64(0x172)][_0x337f64(0x1ae)](_0x221c96[_0x1e4cac],_0x5b002f,_0x20b14e[_0x1e4cac]),_0x20d923=_0xec556a['update'](_0x11efe0[_0x3712fd],_0x337f64(0x1ba),_0x337f64(0x1cc));_0x20d923+=_0xec556a[_0x337f64(0x1dc)]('hex'),_0x16c18d[_0x337f64(0x1ab)](_0x20d923);}return _0x16c18d[_0x337f64(0x18f)](_0x337f64(0x173));}};tslib_1[a0_0x28817e(0x199)]([(0x0,type_graphql_1[a0_0x28817e(0x19a)])(a0_0x28817e(0x187)),(0x0,type_graphql_1[a0_0x28817e(0x176)])(_0x16722b=>Boolean,{'description':a0_0x28817e(0x19b)}),tslib_1[a0_0x28817e(0x1a7)](0x0,(0x0,type_graphql_1[a0_0x28817e(0x18a)])('id')),tslib_1['__param'](0x1,(0x0,type_graphql_1['Arg'])(a0_0x28817e(0x174))),tslib_1[a0_0x28817e(0x1a7)](0x2,(0x0,type_graphql_1[a0_0x28817e(0x1c7)])()),tslib_1['__metadata'](a0_0x28817e(0x1c2),Function),tslib_1[a0_0x28817e(0x16a)](a0_0x28817e(0x19c),[String,String,Object]),tslib_1[a0_0x28817e(0x16a)]('design:returntype',Promise)],OperatoToolCreateMenu[a0_0x28817e(0x1a2)],a0_0x28817e(0x1dd),null),OperatoToolCreateMenu=tslib_1[a0_0x28817e(0x199)]([(0x0,type_graphql_1[a0_0x28817e(0x1b6)])()],OperatoToolCreateMenu),exports[a0_0x28817e(0x1ad)]=OperatoToolCreateMenu;const modelTemplate=a0_0x28817e(0x16d);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function a0_0x4a62(){const _0x310545=['6ezqkRw','createEntityText','PWD','length','design:returntype','EntityColumn','{{camelCase\x20name}}.','join','...','\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','includes','env','\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','number','481774rsUvDB','/server','/event-subscriber.ts','/*\x20ENTITIES\x20*/\x0a\x09...','map','Resolver','getFieldType','9NqdJtC','readFileSync','\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','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','existsPath','updated_at','replace','EntitySubscribers,','replaceNamesMap','createTypeText','lodash',',length:','Float','JSON','Entities,','\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','1145230nBEnJf','\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','text','@things-factory/resource-base','dataProp','indexOf','\x0a\x20\x20','COPY','pascalCaseName','split','existsSync','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','updater_id','filter','\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','type\x20=>','sort','4523004Jwfgqy','Int','writeFile','name','@Field(','domain_id','index.ts','bigint','createHistoryServiceFiles','rank','187134xfyYpo','tslib','createServiceFiles','creator_id','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a\x20\x20@Column(\x27simple-json\x27,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20@Field(type\x20=>\x20ScalarObject,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20historyJson?:\x20any\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','getRepository','prototype','utf8','design:paramtypes','__decorate','Resolvers\x20}\x20from\x20\x27./','Query','8465400zbvQio','2143004DZUzqA','createHistoryEntityText','EntitySubscribers\x20}\x20from\x20\x27./','mkdirSync','pluralPascalCaseName','/server/service/','Date','\x20{\x20nullable:\x20','-query.ts','/service','getProjectRootPath','__metadata','colSize','-type.ts','Operato\x20Tool\x20Create\x20Service','createServicePath','getColTxtType','createDir','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','pluralize','nullable','datetime','\x27,\x20type:\x20\x27','Entities,\x20resolvers\x20as\x20','findOne','uniqRank','@things-factory/shell','string','long','domain','export\x20*\x20from\x20\x27./','__esModule','__param','import\x20{\x20entities\x20as\x20','\x0aimport\x20{\x20ObjectType,\x20Field,\x20InputType,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}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','defineProperty','/index.ts','\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','writeFileSync','toolCreateService','float','design:type','Resolvers,','OperatoToolCreateService','type-graphql','\x27,\x20nullable:\x20','colType','timestamp\x20without\x20time\x20zone','@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})','\x20})','find','-mutation.ts','\x0aimport\x20{\x20Resolver,\x20Mutation,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20In\x20}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20New{{pascalCase\x20name}},\x20{{pascalCase\x20name}}Patch\x20}\x20from\x20\x27./{{name}}-type\x27\x0aimport\x20{\x20getRepository\x20}\x20from\x20\x27@things-factory/shell\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Mutation\x20{\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20create\x20new\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20create{{pascalCase\x20name}}(@Arg(\x27{{camelCase\x20name}}\x27)\x20{{camelCase\x20name}}:\x20New{{pascalCase\x20name}},\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20return\x20await\x20tx.getRepository({{pascalCase\x20name}}).save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20modify\x20{{pascalCase\x20name}}\x20information\x27\x20})\x0a\x20\x20async\x20update{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27id\x27)\x20id:\x20string,\x0a\x20\x20\x20\x20@Arg(\x27patch\x27)\x20patch:\x20{{pascalCase\x20name}}Patch,\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20repository\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20repository.findOne(\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20)\x0a\x0a\x20\x20\x20\x20return\x20await\x20repository.save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20...patch,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20[{{pascalCase\x20name}}],\x20{\x20description:\x20\x22To\x20modify\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20information\x22\x20})\x0a\x20\x20async\x20updateMultiple{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27patches\x27,\x20type\x20=>\x20[{{pascalCase\x20name}}Patch])\x20patches:\x20{{pascalCase\x20name}}Patch[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}[]>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20results\x20=\x20[]\x0a\x20\x20\x20\x20const\x20_createRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27+\x27)\x0a\x20\x20\x20\x20const\x20_updateRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27M\x27)\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}Repo\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x0a\x20\x20\x20\x20if\x20(_createRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_createRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20newRecord\x20=\x20_createRecords[i]\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...newRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27+\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20if\x20(_updateRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_updateRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20updRecord\x20=\x20_updateRecords[i]\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20{{camelCase\x20name}}Repo.findOne({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id:updRecord.id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...updRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27M\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20return\x20results\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20delete{{pascalCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove({\x20domain,\x20id,\x20updater:user\x20})\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20multiple\x20{{camelCase\x20name}}s\x27\x20})\x0a\x20\x20async\x20delete{{pluralPascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27ids\x27,\x20type\x20=>\x20[String])\x20ids:\x20string[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20delEntitis\x20=\x20ids.map(id=>{\x0a\x20\x20\x20\x20\x20\x20return\x20{domain,id,updater:user}\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove(delEntitis)\x0a\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a}\x0a','6181245NIGmpv','integer','updater','-history\x27','pluralCamelCaseName','\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','Resolvers,\x20subscribers\x20as\x20','columnToEntityColumn','.ts','created_at','double','packages'];a0_0x4a62=function(){return _0x310545;};return a0_0x4a62();}const a0_0x2980a1=a0_0x49a0;(function(_0x475086,_0x51af47){const _0x5f1150=a0_0x49a0,_0x26c292=_0x475086();while(!![]){try{const _0x13e81d=parseInt(_0x5f1150(0x1b3))/0x1+-parseInt(_0x5f1150(0x181))/0x2*(parseInt(_0x5f1150(0x173))/0x3)+-parseInt(_0x5f1150(0x132))/0x4+parseInt(_0x5f1150(0x198))/0x5+-parseInt(_0x5f1150(0x1a9))/0x6+parseInt(_0x5f1150(0x167))/0x7+parseInt(_0x5f1150(0x131))/0x8*(parseInt(_0x5f1150(0x188))/0x9);if(_0x13e81d===_0x51af47)break;else _0x26c292['push'](_0x26c292['shift']());}catch(_0x552079){_0x26c292['push'](_0x26c292['shift']());}}}(a0_0x4a62,0x8f12f));Object[a0_0x2980a1(0x155)](exports,a0_0x2980a1(0x151),{'value':!0x0}),exports[a0_0x2980a1(0x15d)]=void 0x0;function a0_0x49a0(_0xa54df0,_0x515595){const _0x4a6207=a0_0x4a62();return a0_0x49a0=function(_0x49a025,_0x56c4a0){_0x49a025=_0x49a025-0x129;let _0x3ef823=_0x4a6207[_0x49a025];return _0x3ef823;},a0_0x49a0(_0xa54df0,_0x515595);}const tslib_1=require(a0_0x2980a1(0x1b4)),type_graphql_1=require(a0_0x2980a1(0x15e)),shell_1=require(a0_0x2980a1(0x14c)),resource_base_1=require(a0_0x2980a1(0x19b)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x2980a1(0x192)),{plural:plural}=require(a0_0x2980a1(0x145)),fs=require('fs');let OperatoToolCreateService=class{async[a0_0x2980a1(0x159)](_0x342d27,_0x1bd8db){const _0x35d0f7=a0_0x2980a1,{domain:_0x4a1838}=_0x1bd8db['state'],_0x2d27a4=await(0x0,shell_1[_0x35d0f7(0x12a)])(resource_base_1['Entity'])[_0x35d0f7(0x14a)]({'where':{'id':_0x342d27}}),_0x2250c3=await(0x0,shell_1[_0x35d0f7(0x12a)])(resource_base_1[_0x35d0f7(0x178)])[_0x35d0f7(0x164)]({'where':{'domain':{'id':_0x4a1838['id']},'entity':{'id':_0x2d27a4['id']}}});let {name:_0x3b008e='',bundle:_0x5eac5c=''}=_0x2d27a4||{},_0x2408ff=this[_0x35d0f7(0x13c)](),_0x2f101f=kebabCase(_0x3b008e);return await this['createServicePath'](_0x2408ff,_0x5eac5c,_0x2f101f),await this[_0x35d0f7(0x1b5)](_0x2408ff,_0x5eac5c,_0x3b008e,_0x2f101f,_0x2d27a4,_0x2250c3),!0x0;}async[a0_0x2980a1(0x1b5)](_0x4dee9d,_0x5a1d0a,_0x5d4d1c,_0x207a55,_0x42eb97,_0x51c465){const _0x1632f4=a0_0x2980a1;let _0x421ef9={'name':_0x207a55,'tableName':_0x42eb97['tableName'],'pascalCaseName':startCase(camelCase(_0x5d4d1c))[_0x1632f4(0x18e)](/ /g,''),'camelCaseName':camelCase(_0x5d4d1c),'snakeCaseName':snakeCase(_0x5d4d1c),'pluralPascalCaseName':startCase(camelCase(plural(_0x5d4d1c)))['replace'](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x5d4d1c))},_0xb970c5=_0x4dee9d+'/packages/'+_0x5a1d0a+_0x1632f4(0x137);[_0x1632f4(0x195),'COPY'][_0x1632f4(0x17d)](_0x42eb97[_0x1632f4(0x19c)])?await this[_0x1632f4(0x1b1)](_0xb970c5,_0x207a55,_0x42eb97,_0x51c465,_0x421ef9):await this['createNoHistoryServiceFiels'](_0xb970c5,_0x207a55,_0x42eb97,_0x51c465,_0x421ef9);}async[a0_0x2980a1(0x1b1)](_0x1af33f,_0x3337c4,_0x1951db,_0x3712f5,_0x3ba380){const _0x409241=a0_0x2980a1;await this[_0x409241(0x1ab)](_0x1af33f+(_0x3337c4+_0x409241(0x156)),serviceHistoryIndex,_0x3ba380);let _0x169f4d=this[_0x409241(0x174)](_0x1951db,_0x3712f5);await this[_0x409241(0x1ab)](_0x1af33f+(_0x3337c4+'/'+_0x3337c4+_0x409241(0x16f)),_0x169f4d,_0x3ba380),await this[_0x409241(0x1ab)](_0x1af33f+(_0x3337c4+'/'+_0x3337c4+_0x409241(0x13a)),serviceQuery,_0x3ba380),await this[_0x409241(0x1ab)](_0x1af33f+(_0x3337c4+'/'+_0x3337c4+'-mutation.ts'),serviceMutation,_0x3ba380);let _0x2f9d07=this[_0x409241(0x191)](_0x3712f5);await this[_0x409241(0x1ab)](_0x1af33f+(_0x3337c4+'/'+_0x3337c4+_0x409241(0x13f)),_0x2f9d07,_0x3ba380);let _0x4b2bf6=this[_0x409241(0x133)](_0x1951db,_0x3712f5);await this[_0x409241(0x1ab)](_0x1af33f+(_0x3337c4+'/'+_0x3337c4+'-history.ts'),_0x4b2bf6,_0x3ba380);let _0x373f1b='';_0x409241(0x195)==_0x1951db[_0x409241(0x19c)]?(_0x373f1b=_0x409241(0x1a6),await this['writeFile'](_0x1af33f+(_0x3337c4+'/event-subscriber.ts'),serviceEntitySubscriber,_0x3ba380)):_0x373f1b='';let _0x26fdcb=serviceEntitySubscriber[_0x409241(0x18e)](/{{entityToJson}}/g,_0x373f1b);await this[_0x409241(0x1ab)](_0x1af33f+(_0x3337c4+_0x409241(0x183)),_0x26fdcb,_0x3ba380),await this[_0x409241(0x1ab)](_0x1af33f+(_0x3337c4+'/'+_0x3337c4+'-history-query.ts'),serviceHistoryQuery,_0x3ba380),await this['writeFile'](_0x1af33f+(_0x3337c4+'/'+_0x3337c4+'-history-type.ts'),sereviceHistoryType,_0x3ba380);let _0x3260b9=_0x1af33f+_0x409241(0x1af);0x0==await this[_0x409241(0x18c)](_0x3260b9)&&await this[_0x409241(0x1ab)](_0x3260b9,allIndex,_0x3ba380);let _0x50f45f=await fs[_0x409241(0x189)](_0x3260b9,_0x409241(0x12c));_0x50f45f[_0x409241(0x19d)](_0x409241(0x150)+_0x3ba380[_0x409241(0x1ac)]+'/'+_0x3ba380[_0x409241(0x1ac)]+'-history\x27')<0x0&&(_0x50f45f=_0x50f45f['replace'](/\/\* EXPORT ENTITY TYPES \*\//,'/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./'+_0x3ba380[_0x409241(0x1ac)]+'/'+_0x3ba380['name']+_0x409241(0x16a))),_0x50f45f[_0x409241(0x19d)](_0x409241(0x150)+_0x3ba380[_0x409241(0x1ac)]+'/'+_0x3ba380[_0x409241(0x1ac)]+'\x27')<0x0&&(_0x50f45f=_0x50f45f[_0x409241(0x18e)](/\/\* EXPORT ENTITY TYPES \*\//,_0x409241(0x1a3)+_0x3ba380[_0x409241(0x1ac)]+'/'+_0x3ba380['name']+'\x27')),_0x50f45f[_0x409241(0x19d)](_0x409241(0x153)+_0x3ba380['pascalCaseName']+_0x409241(0x149)+_0x3ba380['pascalCaseName']+_0x409241(0x16d)+_0x3ba380['pascalCaseName']+_0x409241(0x134)+_0x3ba380[_0x409241(0x1ac)]+'\x27')<0x0&&(_0x50f45f=_0x50f45f['replace'](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x409241(0x18b)+_0x3ba380[_0x409241(0x1a0)]+_0x409241(0x149)+_0x3ba380[_0x409241(0x1a0)]+_0x409241(0x16d)+_0x3ba380[_0x409241(0x1a0)]+_0x409241(0x134)+_0x3ba380[_0x409241(0x1ac)]+'\x27')),_0x50f45f['indexOf'](_0x409241(0x17b)+_0x3ba380[_0x409241(0x1a0)]+_0x409241(0x196))<0x0&&(_0x50f45f=_0x50f45f[_0x409241(0x18e)](/\/\* ENTITIES \*\//,_0x409241(0x184)+_0x3ba380['pascalCaseName']+_0x409241(0x196))),_0x50f45f['indexOf'](_0x409241(0x17b)+_0x3ba380[_0x409241(0x1a0)]+_0x409241(0x15c))<0x0&&(_0x50f45f=_0x50f45f[_0x409241(0x18e)](/\/\* RESOLVER CLASSES \*\//,'/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...'+_0x3ba380[_0x409241(0x1a0)]+_0x409241(0x15c))),_0x50f45f[_0x409241(0x19d)](_0x409241(0x17b)+_0x3ba380[_0x409241(0x1a0)]+_0x409241(0x18f))<0x0&&(_0x50f45f=_0x50f45f[_0x409241(0x18e)](/\/\* SUBSCRIBERS \*\//,'/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...'+_0x3ba380[_0x409241(0x1a0)]+_0x409241(0x18f))),await this[_0x409241(0x1ab)](_0x3260b9,_0x50f45f,_0x3ba380);}async['createNoHistoryServiceFiels'](_0x5b93c3,_0x997bd7,_0x3805a7,_0x11e6eb,_0x189c51){const _0x3854e0=a0_0x2980a1;await this[_0x3854e0(0x1ab)](_0x5b93c3+(_0x997bd7+_0x3854e0(0x156)),serviceIndex,_0x189c51),await this[_0x3854e0(0x1ab)](_0x5b93c3+(_0x997bd7+'/'+_0x997bd7+'-query.ts'),serviceQuery,_0x189c51),await this[_0x3854e0(0x1ab)](_0x5b93c3+(_0x997bd7+'/'+_0x997bd7+_0x3854e0(0x165)),serviceMutation,_0x189c51);let _0x36f7af=this[_0x3854e0(0x174)](_0x3805a7,_0x11e6eb);await this[_0x3854e0(0x1ab)](_0x5b93c3+(_0x997bd7+'/'+_0x997bd7+_0x3854e0(0x16f)),_0x36f7af,_0x189c51);let _0x2c4e49=this[_0x3854e0(0x191)](_0x11e6eb);await this['writeFile'](_0x5b93c3+(_0x997bd7+'/'+_0x997bd7+_0x3854e0(0x13f)),_0x2c4e49,_0x189c51);let _0x1f43da=_0x5b93c3+_0x3854e0(0x1af);0x0==await this[_0x3854e0(0x18c)](_0x1f43da)&&await this['writeFile'](_0x1f43da,allIndex,_0x189c51);let _0xe0b453=await fs[_0x3854e0(0x189)](_0x1f43da,_0x3854e0(0x12c));_0xe0b453['indexOf'](_0x3854e0(0x150)+_0x189c51['name']+'/'+_0x189c51[_0x3854e0(0x1ac)]+'\x27')<0x0&&(_0xe0b453=_0xe0b453[_0x3854e0(0x18e)](/\/\* EXPORT ENTITY TYPES \*\//,_0x3854e0(0x1a3)+_0x189c51[_0x3854e0(0x1ac)]+'/'+_0x189c51[_0x3854e0(0x1ac)]+'\x27')),_0xe0b453['indexOf'](_0x3854e0(0x153)+_0x189c51[_0x3854e0(0x1a0)]+_0x3854e0(0x149)+_0x189c51['pascalCaseName']+_0x3854e0(0x12f)+_0x189c51['name']+'\x27')<0x0&&(_0xe0b453=_0xe0b453[_0x3854e0(0x18e)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x3854e0(0x18b)+_0x189c51[_0x3854e0(0x1a0)]+_0x3854e0(0x149)+_0x189c51[_0x3854e0(0x1a0)]+_0x3854e0(0x12f)+_0x189c51[_0x3854e0(0x1ac)]+'\x27')),_0xe0b453[_0x3854e0(0x19d)](_0x3854e0(0x17b)+_0x189c51['pascalCaseName']+_0x3854e0(0x196))<0x0&&(_0xe0b453=_0xe0b453[_0x3854e0(0x18e)](/\/\* ENTITIES \*\//,_0x3854e0(0x184)+_0x189c51['pascalCaseName']+_0x3854e0(0x196))),_0xe0b453[_0x3854e0(0x19d)]('...'+_0x189c51[_0x3854e0(0x1a0)]+_0x3854e0(0x15c))<0x0&&(_0xe0b453=_0xe0b453[_0x3854e0(0x18e)](/\/\* RESOLVER CLASSES \*\//,_0x3854e0(0x144)+_0x189c51[_0x3854e0(0x1a0)]+_0x3854e0(0x15c))),await this[_0x3854e0(0x1ab)](_0x1f43da,_0xe0b453,_0x189c51);}['createTypeText'](_0x3873f3){const _0x40dbbd=a0_0x2980a1;let _0x80ce9e=sereviceType,_0x50b8ac=_0x3873f3['map'](_0x23193f=>{const _0x4a4998=a0_0x49a0;if('id'==_0x23193f[_0x4a4998(0x1ac)])return'';if(_0x4a4998(0x1ae)==_0x23193f[_0x4a4998(0x1ac)])return'';if(_0x4a4998(0x170)==_0x23193f[_0x4a4998(0x1ac)])return'';if(_0x4a4998(0x18d)==_0x23193f[_0x4a4998(0x1ac)])return'';if('creator_id'==_0x23193f['name'])return'';if('updater_id'==_0x23193f[_0x4a4998(0x1ac)])return'';let _0x160a43=this[_0x4a4998(0x187)](_0x23193f),_0x3b7cd7=this[_0x4a4998(0x142)](_0x23193f),_0x4ca217=camelCase(_0x23193f[_0x4a4998(0x1ac)]);return'\x20\x20'+(_0x4a4998(0x1ad)+(0x0==_0x160a43[_0x4a4998(0x176)]?'':_0x4a4998(0x1a7)+_0x160a43+',')+'\x20{\x20nullable:\x20'+_0x23193f[_0x4a4998(0x146)]+_0x4a4998(0x163))+_0x4a4998(0x19e)+(''+_0x4ca217+(_0x23193f[_0x4a4998(0x146)]?'?':'')+':\x20'+_0x3b7cd7)+'\x0a';});_0x80ce9e=_0x80ce9e[_0x40dbbd(0x18e)](/{{newTypeColumns}}/g,_0x50b8ac[_0x40dbbd(0x17a)]('\x0a'));let _0x449089=_0x3873f3[_0x40dbbd(0x185)](_0x8ccba6=>{const _0x250198=_0x40dbbd;if('id'==_0x8ccba6['name'])return'';if('domain_id'==_0x8ccba6[_0x250198(0x1ac)])return'';if('created_at'==_0x8ccba6['name'])return'';if('updated_at'==_0x8ccba6['name'])return'';if(_0x250198(0x1b6)==_0x8ccba6[_0x250198(0x1ac)])return'';if(_0x250198(0x1a4)==_0x8ccba6['name'])return'';let _0x1ec07e=this[_0x250198(0x187)](_0x8ccba6),_0x287443=this[_0x250198(0x142)](_0x8ccba6);_0x8ccba6['nullable']=!0x0;let _0x1b2667=camelCase(_0x8ccba6[_0x250198(0x1ac)]);return'\x20\x20'+(_0x250198(0x1ad)+(0x0==_0x1ec07e[_0x250198(0x176)]?'':_0x250198(0x1a7)+_0x1ec07e+',')+_0x250198(0x139)+_0x8ccba6[_0x250198(0x146)]+'\x20})')+_0x250198(0x19e)+(''+_0x1b2667+(_0x8ccba6[_0x250198(0x146)]?'?':'')+':\x20'+_0x287443)+'\x0a';});return _0x80ce9e=_0x80ce9e[_0x40dbbd(0x18e)](/{{patchTypeColumns}}/g,_0x449089[_0x40dbbd(0x17a)]('\x0a')),_0x80ce9e;}[a0_0x2980a1(0x174)](_0x1cb99d,_0x587a1c){const _0x31282f=a0_0x2980a1;let _0x9344e6=serviceEntity,_0x5d562c=_0x587a1c[_0x31282f(0x1a8)](function(_0x5a580f,_0x84882b){const _0x423f89=_0x31282f;return _0x5a580f[_0x423f89(0x1b2)]-_0x84882b[_0x423f89(0x1b2)];})['map'](_0x21bcd0=>this[_0x31282f(0x16e)](_0x21bcd0));[_0x31282f(0x19f),_0x31282f(0x195)]['includes'](_0x1cb99d['dataProp'])&&_0x5d562c['push']('\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201'),_0x9344e6=_0x9344e6[_0x31282f(0x18e)](/{{entityColumns}}/g,_0x5d562c['join']('\x0a'));let _0x4a6884='',_0x1a740b=_0x587a1c[_0x31282f(0x1a5)](_0x2e42e7=>_0x2e42e7[_0x31282f(0x14b)]&&_0x2e42e7[_0x31282f(0x14b)]>0x0)[_0x31282f(0x1a8)](function(_0xc14205,_0x3af87c){const _0x51110c=_0x31282f;return _0xc14205['uniqRank']-_0x3af87c[_0x51110c(0x14b)];});if(_0x1a740b[_0x31282f(0x176)]>0x0){_0x4a6884=_0x31282f(0x162);let _0x2e7b87=_0x1a740b[_0x31282f(0x185)](_0x1f3d9b=>{const _0x2cf36f=_0x31282f;let _0x2809dc=_0x1f3d9b[_0x2cf36f(0x1ac)];return _0x2cf36f(0x1ae)==_0x1f3d9b[_0x2cf36f(0x1ac)]&&(_0x2809dc=_0x2cf36f(0x14f)),_0x2cf36f(0x1b6)==_0x1f3d9b[_0x2cf36f(0x1ac)]&&(_0x2809dc='creator'),_0x2cf36f(0x1a4)==_0x1f3d9b[_0x2cf36f(0x1ac)]&&(_0x2809dc=_0x2cf36f(0x169)),_0x2cf36f(0x179)+camelCase(_0x2809dc);});_0x4a6884=_0x4a6884['replace'](/{{indexColumns}}/g,_0x2e7b87['join'](','));}return _0x9344e6=_0x9344e6[_0x31282f(0x18e)](/{{indexAnn}}/g,_0x4a6884),_0x9344e6;}[a0_0x2980a1(0x133)](_0x5127ae,_0x425c59){const _0x4fac1e=a0_0x2980a1;let _0x220332=_0x4fac1e(0x195)==_0x5127ae[_0x4fac1e(0x19c)]?serviceEntityHistJson:serviceEntityHistCopy,_0x155d0f=_0x425c59[_0x4fac1e(0x1a8)](function(_0x419f42,_0x4e03e2){const _0x3bbc09=_0x4fac1e;return _0x419f42[_0x3bbc09(0x1b2)]-_0x4e03e2['rank'];})[_0x4fac1e(0x185)](_0x377213=>this[_0x4fac1e(0x16e)](_0x377213));return _0x220332=_0x220332[_0x4fac1e(0x18e)](/{{entityColumns}}/g,_0x155d0f[_0x4fac1e(0x17a)]('\x0a')),_0x220332;}[a0_0x2980a1(0x16e)](_0x5bfa33){const _0x42b90a=a0_0x2980a1;if('id'==_0x5bfa33['name'])return'';if(_0x42b90a(0x1ae)==_0x5bfa33[_0x42b90a(0x1ac)])return'';if(_0x42b90a(0x170)==_0x5bfa33[_0x42b90a(0x1ac)])return'';if('updated_at'==_0x5bfa33['name'])return'';if(_0x42b90a(0x1b6)==_0x5bfa33['name'])return'';if('updater_id'==_0x5bfa33['name'])return'';let _0x4f40f7=_0x5bfa33[_0x42b90a(0x160)];_0x42b90a(0x171)==_0x5bfa33[_0x42b90a(0x160)]&&(_0x4f40f7='double\x20precision'),'long'==_0x5bfa33[_0x42b90a(0x160)]&&(_0x4f40f7=_0x42b90a(0x1b0)),_0x42b90a(0x14d)==_0x5bfa33['colType']&&(_0x4f40f7='character\x20varying'),_0x42b90a(0x147)==_0x5bfa33[_0x42b90a(0x160)]&&(_0x4f40f7=_0x42b90a(0x161));let _0x106cfb='';_0x42b90a(0x14d)==_0x5bfa33[_0x42b90a(0x160)]&&(_0x106cfb=_0x5bfa33[_0x42b90a(0x13e)]);let _0x31cde1=this['getFieldType'](_0x5bfa33),_0x2047e7=this[_0x42b90a(0x142)](_0x5bfa33),_0x287559=camelCase(_0x5bfa33[_0x42b90a(0x1ac)]);return'\x20\x20'+('@Column({name:\x27'+_0x5bfa33['name']+_0x42b90a(0x148)+_0x4f40f7+_0x42b90a(0x15f)+_0x5bfa33[_0x42b90a(0x146)]+'\x20'+(0x0==_0x106cfb[_0x42b90a(0x176)]?'':_0x42b90a(0x193)+_0x106cfb)+_0x42b90a(0x163))+_0x42b90a(0x19e)+('@Field('+(0x0==_0x31cde1['length']?'':_0x42b90a(0x1a7)+_0x31cde1+',')+'\x20{\x20nullable:\x20'+_0x5bfa33[_0x42b90a(0x146)]+_0x42b90a(0x163))+_0x42b90a(0x19e)+(''+_0x287559+(_0x5bfa33[_0x42b90a(0x146)]?'?':'')+':\x20'+_0x2047e7)+'\x0a';}['getFieldType'](_0xd251bb){const _0x52ad73=a0_0x2980a1;let _0x449030='';return _0x52ad73(0x171)==_0xd251bb[_0x52ad73(0x160)]&&(_0x449030=_0x52ad73(0x194)),_0x52ad73(0x15a)==_0xd251bb['colType']&&(_0x449030='Float'),_0x52ad73(0x14e)==_0xd251bb['colType']&&(_0x449030='Int'),_0x52ad73(0x168)==_0xd251bb[_0x52ad73(0x160)]&&(_0x449030=_0x52ad73(0x1aa)),_0x449030;}[a0_0x2980a1(0x142)](_0x5e7329){const _0x173d7c=a0_0x2980a1;let _0x57b25f=_0x5e7329[_0x173d7c(0x160)];return'decimal'==_0x5e7329[_0x173d7c(0x160)]&&(_0x57b25f='number'),'double'==_0x5e7329[_0x173d7c(0x160)]&&(_0x57b25f=_0x173d7c(0x180)),'float'==_0x5e7329[_0x173d7c(0x160)]&&(_0x57b25f='number'),_0x173d7c(0x168)==_0x5e7329[_0x173d7c(0x160)]&&(_0x57b25f=_0x173d7c(0x180)),_0x173d7c(0x14e)==_0x5e7329[_0x173d7c(0x160)]&&(_0x57b25f=_0x173d7c(0x180)),'datetime'==_0x5e7329['colType']&&(_0x57b25f=_0x173d7c(0x138)),'date'==_0x5e7329[_0x173d7c(0x160)]&&(_0x57b25f='Date'),_0x173d7c(0x19a)==_0x5e7329[_0x173d7c(0x160)]&&(_0x57b25f=_0x173d7c(0x14d)),_0x57b25f;}async[a0_0x2980a1(0x1ab)](_0x5de671,_0xad11af,_0x52b88e){const _0x20d89d=a0_0x2980a1;await fs[_0x20d89d(0x158)](_0x5de671,this[_0x20d89d(0x190)](_0xad11af,_0x52b88e),'utf8');}['replaceNamesMap'](_0x35111e,_0x2a6398){const _0xc470f5=a0_0x2980a1;return _0x35111e[_0xc470f5(0x18e)](/{{pascalCase name}}/g,_0x2a6398['pascalCaseName'])['replace'](/{{camelCase name}}/g,_0x2a6398['camelCaseName'])[_0xc470f5(0x18e)](/{{snakeCase name}}/g,_0x2a6398['snakeCaseName'])['replace'](/{{pluralPascalCase name}}/g,_0x2a6398[_0xc470f5(0x136)])[_0xc470f5(0x18e)](/{{pluralCamelCase name}}/g,_0x2a6398[_0xc470f5(0x16b)])['replace'](/{{tableName}}/g,_0x2a6398['tableName'])[_0xc470f5(0x18e)](/{{name}}/g,_0x2a6398[_0xc470f5(0x1ac)]);}async[a0_0x2980a1(0x141)](_0x12998c,_0x328276,_0x4f28d2){const _0x1c1b70=a0_0x2980a1;let _0x5cf705=_0x12998c+'/packages';await this[_0x1c1b70(0x143)](_0x5cf705),_0x5cf705=_0x5cf705+'/'+_0x328276,await this['createDir'](_0x5cf705),_0x5cf705+=_0x1c1b70(0x182),await this['createDir'](_0x5cf705),_0x5cf705+=_0x1c1b70(0x13b),await this[_0x1c1b70(0x143)](_0x5cf705),_0x5cf705=_0x5cf705+'/'+_0x4f28d2,await this['createDir'](_0x5cf705);}[a0_0x2980a1(0x13c)](){const _0x28142b=a0_0x2980a1;let _0x4cb3d1=process[_0x28142b(0x17e)][_0x28142b(0x175)][_0x28142b(0x1a1)]('/'),_0x34f7a3=[];for(let _0x7f82eb=0x0;_0x7f82eb<_0x4cb3d1[_0x28142b(0x176)]&&_0x28142b(0x172)!=_0x4cb3d1[_0x7f82eb];_0x7f82eb++)_0x34f7a3['push'](_0x4cb3d1[_0x7f82eb]);return _0x34f7a3[_0x28142b(0x17a)]('/');}async['createDir'](_0x58d885){const _0x83a18e=a0_0x2980a1;0x0==await this[_0x83a18e(0x18c)](_0x58d885)&&fs[_0x83a18e(0x135)](_0x58d885);}async[a0_0x2980a1(0x18c)](_0x43a97c){const _0x31973f=a0_0x2980a1;return await fs[_0x31973f(0x1a2)](_0x43a97c);}};tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x2980a1(0x130)])(_0x57d391=>Boolean,{'description':a0_0x2980a1(0x140)}),tslib_1[a0_0x2980a1(0x152)](0x0,(0x0,type_graphql_1['Arg'])('id')),tslib_1['__param'](0x1,(0x0,type_graphql_1['Ctx'])()),tslib_1[a0_0x2980a1(0x13d)](a0_0x2980a1(0x15b),Function),tslib_1[a0_0x2980a1(0x13d)](a0_0x2980a1(0x12d),[String,Object]),tslib_1[a0_0x2980a1(0x13d)](a0_0x2980a1(0x177),Promise)],OperatoToolCreateService[a0_0x2980a1(0x12b)],a0_0x2980a1(0x159),null),OperatoToolCreateService=tslib_1[a0_0x2980a1(0x12e)]([(0x0,type_graphql_1[a0_0x2980a1(0x186)])()],OperatoToolCreateService),exports['OperatoToolCreateService']=OperatoToolCreateService;const allIndex=a0_0x2980a1(0x197),serviceIndex=a0_0x2980a1(0x17f),serviceHistoryIndex=a0_0x2980a1(0x17c),serviceQuery=a0_0x2980a1(0x18a),serviceHistoryQuery='\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryList\x20}\x20from\x20\x27./{{name}}-history-type\x27\x0a\x0a@Resolver({{pascalCase\x20name}}History)\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryQuery\x20{\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}History,\x20{\x20description:\x20\x27To\x20fetch\x20a\x20{{pascalCase\x20name}}History\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}History(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}History>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20return\x20await\x20getRepository({{pascalCase\x20name}}History).findOne({\x0a\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20}\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}HistoryList,\x20{\x20description:\x20\x27To\x20fetch\x20multiple\x20{{pluralPascalCase\x20name}}History\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}Histories(@Args()\x20params:\x20ListParam,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}HistoryList>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20queryBuilder\x20=\x20getQueryBuilderFromListParams({\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20params,\x0a\x20\x20\x20\x20\x20\x20repository:\x20await\x20getRepository({{pascalCase\x20name}}History)\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20const\x20[items,\x20total]\x20=\x20await\x20queryBuilder.getManyAndCount()\x0a\x0a\x20\x20\x20\x20return\x20{\x20items,\x20total\x20}\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20Domain)\x0a\x20\x20async\x20domain(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<Domain>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(Domain).findOneBy({id:{{camelCase\x20name}}History.domainId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20updater(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}History.updaterId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20creator(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}History.creatorId})\x0a\x20\x20}\x0a}\x0a',serviceMutation=a0_0x2980a1(0x166),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_0x2980a1(0x154),serviceEntity=a0_0x2980a1(0x16c),serviceEntityHistCopy=a0_0x2980a1(0x199),serviceEntityHistJson=a0_0x2980a1(0x129),serviceEntitySubscriber=a0_0x2980a1(0x157);
|
|
1
|
+
'use strict';const a0_0x2387fc=a0_0x385b;(function(_0x3b7a84,_0x1736cb){const _0x589d55=a0_0x385b,_0x216771=_0x3b7a84();while(!![]){try{const _0x4ac58e=-parseInt(_0x589d55(0x1f0))/0x1*(parseInt(_0x589d55(0x246))/0x2)+-parseInt(_0x589d55(0x1e2))/0x3+parseInt(_0x589d55(0x1cb))/0x4+-parseInt(_0x589d55(0x1f3))/0x5*(parseInt(_0x589d55(0x222))/0x6)+-parseInt(_0x589d55(0x1f4))/0x7+-parseInt(_0x589d55(0x1e3))/0x8+-parseInt(_0x589d55(0x233))/0x9*(-parseInt(_0x589d55(0x204))/0xa);if(_0x4ac58e===_0x1736cb)break;else _0x216771['push'](_0x216771['shift']());}catch(_0x5ba343){_0x216771['push'](_0x216771['shift']());}}}(a0_0x3344,0x19954));function a0_0x3344(){const _0x41d76d=['\x27,\x20nullable:\x20','...','-query.ts','430VdOUOK','\x20})','pluralize','domain_id','uniqRank','dataProp','bigint','tslib','tableName','writeFile','length','creator_id','rank','\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryList\x20}\x20from\x20\x27./{{name}}-history-type\x27\x0a\x0a@Resolver({{pascalCase\x20name}}History)\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryQuery\x20{\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}History,\x20{\x20description:\x20\x27To\x20fetch\x20a\x20{{pascalCase\x20name}}History\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}History(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}History>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20return\x20await\x20getRepository({{pascalCase\x20name}}History).findOne({\x0a\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20}\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}HistoryList,\x20{\x20description:\x20\x27To\x20fetch\x20multiple\x20{{pluralPascalCase\x20name}}History\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}Histories(@Args()\x20params:\x20ListParam,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}HistoryList>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20queryBuilder\x20=\x20getQueryBuilderFromListParams({\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20params,\x0a\x20\x20\x20\x20\x20\x20repository:\x20await\x20getRepository({{pascalCase\x20name}}History)\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20const\x20[items,\x20total]\x20=\x20await\x20queryBuilder.getManyAndCount()\x0a\x0a\x20\x20\x20\x20return\x20{\x20items,\x20total\x20}\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20Domain)\x0a\x20\x20async\x20domain(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<Domain>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(Domain).findOneBy({id:{{camelCase\x20name}}History.domainId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20updater(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}History.updaterId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20creator(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}History.creatorId})\x0a\x20\x20}\x0a}\x0a','Date','type-graphql','createNoHistoryServiceFiels','getProjectRootPath','name','createServicePath','readFileSync','getRepository','design:type','domain','string','replace','\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','design:returntype','find','/packages/','12maByTg','sort',',length:','timestamp\x20without\x20time\x20zone','type\x20=>','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','updater','double\x20precision','Resolver','integer','index.ts','{{camelCase\x20name}}.','/server','updater_id','date','replaceNamesMap','datetime','80577XxkRSP','getFieldType','float','__param','packages','\x20{\x20nullable:\x20','push','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\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','join','created_at','Entities,\x20resolvers\x20as\x20','-history-type.ts','Entity','\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','existsPath','__metadata','pascalCaseName','export\x20*\x20from\x20\x27./','EntitySubscribers\x20}\x20from\x20\x27./','56uBVNhG','/*\x20ENTITIES\x20*/\x0a\x09...','number','/server/service/','columnToEntityColumn','createServiceFiles','Ctx','createHistoryServiceFiles','JSON','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','createEntityText','nullable','getColTxtType','COPY','map','updated_at','env','createDir','667644JmlwFs','Operato\x20Tool\x20Create\x20Service','__decorate','Resolvers,','@things-factory/shell','Resolvers,\x20subscribers\x20as\x20','/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...','Arg','/index.ts','/packages','character\x20varying','.ts','double','@Column({name:\x27','long','\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','OperatoToolCreateService','prototype','Entities,','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\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','colType','Int','299133huIRrd','148456FjqIbQ','\x27,\x20type:\x20\x27','\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','-mutation.ts','PWD','-history\x27','lodash','utf8','defineProperty','-history.ts','createHistoryEntityText','Float','snakeCaseName','5855eYOupl','indexOf','import\x20{\x20entities\x20as\x20','142605PJUlGb','754964ibCEkk','filter','pluralPascalCaseName','writeFileSync','createTypeText','\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','\x0a\x20\x20','EntityColumn','creator','-type.ts','split','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','@Field('];a0_0x3344=function(){return _0x41d76d;};return a0_0x3344();}Object[a0_0x2387fc(0x1eb)](exports,'__esModule',{'value':!0x0}),exports['OperatoToolCreateService']=void 0x0;const tslib_1=require(a0_0x2387fc(0x20b)),type_graphql_1=require(a0_0x2387fc(0x213)),shell_1=require(a0_0x2387fc(0x1cf)),resource_base_1=require('@things-factory/resource-base'),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x2387fc(0x1e9)),{plural:plural}=require(a0_0x2387fc(0x206)),fs=require('fs');function a0_0x385b(_0x5beeaa,_0x2a26da){const _0x334454=a0_0x3344();return a0_0x385b=function(_0x385b29,_0x2147d2){_0x385b29=_0x385b29-0x1c1;let _0x48832f=_0x334454[_0x385b29];return _0x48832f;},a0_0x385b(_0x5beeaa,_0x2a26da);}let OperatoToolCreateService=class{async['toolCreateService'](_0xe9c8fb,_0x3941c3){const _0x4b5506=a0_0x2387fc,{domain:_0x4872f6}=_0x3941c3['state'],_0x1abb17=await(0x0,shell_1['getRepository'])(resource_base_1[_0x4b5506(0x23f)])['findOne']({'where':{'id':_0xe9c8fb}}),_0x2beed4=await(0x0,shell_1[_0x4b5506(0x219)])(resource_base_1[_0x4b5506(0x1fb)])[_0x4b5506(0x220)]({'where':{'domain':{'id':_0x4872f6['id']},'entity':{'id':_0x1abb17['id']}}});let {name:_0xdaf06c='',bundle:_0x29f95f=''}=_0x1abb17||{},_0x2c5920=this[_0x4b5506(0x215)](),_0x519802=kebabCase(_0xdaf06c);return await this[_0x4b5506(0x217)](_0x2c5920,_0x29f95f,_0x519802),await this[_0x4b5506(0x24b)](_0x2c5920,_0x29f95f,_0xdaf06c,_0x519802,_0x1abb17,_0x2beed4),!0x0;}async['createServiceFiles'](_0x5f3213,_0x58aa79,_0x307856,_0x2f032c,_0x2e406a,_0x30e533){const _0x3802ba=a0_0x2387fc;let _0x252f5a={'name':_0x2f032c,'tableName':_0x2e406a['tableName'],'pascalCaseName':startCase(camelCase(_0x307856))['replace'](/ /g,''),'camelCaseName':camelCase(_0x307856),'snakeCaseName':snakeCase(_0x307856),'pluralPascalCaseName':startCase(camelCase(plural(_0x307856)))['replace'](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x307856))},_0x2a4f6e=_0x5f3213+_0x3802ba(0x221)+_0x58aa79+_0x3802ba(0x249);[_0x3802ba(0x1c1),_0x3802ba(0x1c6)]['includes'](_0x2e406a[_0x3802ba(0x209)])?await this[_0x3802ba(0x24d)](_0x2a4f6e,_0x2f032c,_0x2e406a,_0x30e533,_0x252f5a):await this[_0x3802ba(0x214)](_0x2a4f6e,_0x2f032c,_0x2e406a,_0x30e533,_0x252f5a);}async[a0_0x2387fc(0x24d)](_0xaf9ad3,_0x3ace50,_0x1e4efe,_0x2b7185,_0x52bc95){const _0xff0e79=a0_0x2387fc;await this[_0xff0e79(0x20d)](_0xaf9ad3+(_0x3ace50+_0xff0e79(0x1d3)),serviceHistoryIndex,_0x52bc95);let _0x28c671=this[_0xff0e79(0x1c3)](_0x1e4efe,_0x2b7185);await this[_0xff0e79(0x20d)](_0xaf9ad3+(_0x3ace50+'/'+_0x3ace50+_0xff0e79(0x1d6)),_0x28c671,_0x52bc95),await this[_0xff0e79(0x20d)](_0xaf9ad3+(_0x3ace50+'/'+_0x3ace50+'-query.ts'),serviceQuery,_0x52bc95),await this['writeFile'](_0xaf9ad3+(_0x3ace50+'/'+_0x3ace50+_0xff0e79(0x1e6)),serviceMutation,_0x52bc95);let _0x5ca353=this[_0xff0e79(0x1f8)](_0x2b7185);await this[_0xff0e79(0x20d)](_0xaf9ad3+(_0x3ace50+'/'+_0x3ace50+_0xff0e79(0x1fd)),_0x5ca353,_0x52bc95);let _0x590b42=this[_0xff0e79(0x1ed)](_0x1e4efe,_0x2b7185);await this[_0xff0e79(0x20d)](_0xaf9ad3+(_0x3ace50+'/'+_0x3ace50+_0xff0e79(0x1ec)),_0x590b42,_0x52bc95);let _0x1e5f71='';'JSON'==_0x1e4efe[_0xff0e79(0x209)]?(_0x1e5f71=_0xff0e79(0x1da),await this['writeFile'](_0xaf9ad3+(_0x3ace50+'/event-subscriber.ts'),serviceEntitySubscriber,_0x52bc95)):_0x1e5f71='';let _0x1df84b=serviceEntitySubscriber['replace'](/{{entityToJson}}/g,_0x1e5f71);await this[_0xff0e79(0x20d)](_0xaf9ad3+(_0x3ace50+'/event-subscriber.ts'),_0x1df84b,_0x52bc95),await this['writeFile'](_0xaf9ad3+(_0x3ace50+'/'+_0x3ace50+'-history-query.ts'),serviceHistoryQuery,_0x52bc95),await this[_0xff0e79(0x20d)](_0xaf9ad3+(_0x3ace50+'/'+_0x3ace50+_0xff0e79(0x23e)),sereviceHistoryType,_0x52bc95);let _0x2c9f11=_0xaf9ad3+_0xff0e79(0x22c);0x0==await this[_0xff0e79(0x241)](_0x2c9f11)&&await this[_0xff0e79(0x20d)](_0x2c9f11,allIndex,_0x52bc95);let _0x4426e4=await fs['readFileSync'](_0x2c9f11,_0xff0e79(0x1ea));_0x4426e4[_0xff0e79(0x1f1)](_0xff0e79(0x244)+_0x52bc95['name']+'/'+_0x52bc95[_0xff0e79(0x216)]+_0xff0e79(0x1e8))<0x0&&(_0x4426e4=_0x4426e4[_0xff0e79(0x21d)](/\/\* EXPORT ENTITY TYPES \*\//,_0xff0e79(0x1ff)+_0x52bc95[_0xff0e79(0x216)]+'/'+_0x52bc95['name']+_0xff0e79(0x1e8))),_0x4426e4[_0xff0e79(0x1f1)](_0xff0e79(0x244)+_0x52bc95[_0xff0e79(0x216)]+'/'+_0x52bc95[_0xff0e79(0x216)]+'\x27')<0x0&&(_0x4426e4=_0x4426e4[_0xff0e79(0x21d)](/\/\* EXPORT ENTITY TYPES \*\//,_0xff0e79(0x1ff)+_0x52bc95[_0xff0e79(0x216)]+'/'+_0x52bc95[_0xff0e79(0x216)]+'\x27')),_0x4426e4[_0xff0e79(0x1f1)](_0xff0e79(0x1f2)+_0x52bc95[_0xff0e79(0x243)]+_0xff0e79(0x23d)+_0x52bc95['pascalCaseName']+_0xff0e79(0x1d0)+_0x52bc95[_0xff0e79(0x243)]+_0xff0e79(0x245)+_0x52bc95[_0xff0e79(0x216)]+'\x27')<0x0&&(_0x4426e4=_0x4426e4[_0xff0e79(0x21d)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0xff0e79(0x227)+_0x52bc95['pascalCaseName']+_0xff0e79(0x23d)+_0x52bc95[_0xff0e79(0x243)]+_0xff0e79(0x1d0)+_0x52bc95[_0xff0e79(0x243)]+_0xff0e79(0x245)+_0x52bc95[_0xff0e79(0x216)]+'\x27')),_0x4426e4[_0xff0e79(0x1f1)]('...'+_0x52bc95['pascalCaseName']+_0xff0e79(0x1dd))<0x0&&(_0x4426e4=_0x4426e4[_0xff0e79(0x21d)](/\/\* ENTITIES \*\//,_0xff0e79(0x247)+_0x52bc95['pascalCaseName']+_0xff0e79(0x1dd))),_0x4426e4[_0xff0e79(0x1f1)]('...'+_0x52bc95[_0xff0e79(0x243)]+_0xff0e79(0x1ce))<0x0&&(_0x4426e4=_0x4426e4[_0xff0e79(0x21d)](/\/\* RESOLVER CLASSES \*\//,'/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...'+_0x52bc95[_0xff0e79(0x243)]+'Resolvers,')),_0x4426e4[_0xff0e79(0x1f1)](_0xff0e79(0x202)+_0x52bc95[_0xff0e79(0x243)]+'EntitySubscribers,')<0x0&&(_0x4426e4=_0x4426e4[_0xff0e79(0x21d)](/\/\* SUBSCRIBERS \*\//,_0xff0e79(0x1d1)+_0x52bc95[_0xff0e79(0x243)]+'EntitySubscribers,')),await this[_0xff0e79(0x20d)](_0x2c9f11,_0x4426e4,_0x52bc95);}async[a0_0x2387fc(0x214)](_0x5860b4,_0x4c0356,_0x35cfb5,_0x543fec,_0x2678a4){const _0x4cc329=a0_0x2387fc;await this[_0x4cc329(0x20d)](_0x5860b4+(_0x4c0356+'/index.ts'),serviceIndex,_0x2678a4),await this[_0x4cc329(0x20d)](_0x5860b4+(_0x4c0356+'/'+_0x4c0356+_0x4cc329(0x203)),serviceQuery,_0x2678a4),await this[_0x4cc329(0x20d)](_0x5860b4+(_0x4c0356+'/'+_0x4c0356+_0x4cc329(0x1e6)),serviceMutation,_0x2678a4);let _0x2a1963=this['createEntityText'](_0x35cfb5,_0x543fec);await this['writeFile'](_0x5860b4+(_0x4c0356+'/'+_0x4c0356+_0x4cc329(0x1d6)),_0x2a1963,_0x2678a4);let _0x252e1c=this[_0x4cc329(0x1f8)](_0x543fec);await this[_0x4cc329(0x20d)](_0x5860b4+(_0x4c0356+'/'+_0x4c0356+_0x4cc329(0x1fd)),_0x252e1c,_0x2678a4);let _0x122196=_0x5860b4+_0x4cc329(0x22c);0x0==await this['existsPath'](_0x122196)&&await this[_0x4cc329(0x20d)](_0x122196,allIndex,_0x2678a4);let _0x33d3ea=await fs[_0x4cc329(0x218)](_0x122196,_0x4cc329(0x1ea));_0x33d3ea[_0x4cc329(0x1f1)](_0x4cc329(0x244)+_0x2678a4[_0x4cc329(0x216)]+'/'+_0x2678a4[_0x4cc329(0x216)]+'\x27')<0x0&&(_0x33d3ea=_0x33d3ea[_0x4cc329(0x21d)](/\/\* EXPORT ENTITY TYPES \*\//,'/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./'+_0x2678a4[_0x4cc329(0x216)]+'/'+_0x2678a4[_0x4cc329(0x216)]+'\x27')),_0x33d3ea['indexOf'](_0x4cc329(0x1f2)+_0x2678a4[_0x4cc329(0x243)]+_0x4cc329(0x23d)+_0x2678a4[_0x4cc329(0x243)]+_0x4cc329(0x1de)+_0x2678a4[_0x4cc329(0x216)]+'\x27')<0x0&&(_0x33d3ea=_0x33d3ea[_0x4cc329(0x21d)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,'/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20'+_0x2678a4[_0x4cc329(0x243)]+_0x4cc329(0x23d)+_0x2678a4[_0x4cc329(0x243)]+_0x4cc329(0x1de)+_0x2678a4[_0x4cc329(0x216)]+'\x27')),_0x33d3ea['indexOf'](_0x4cc329(0x202)+_0x2678a4[_0x4cc329(0x243)]+_0x4cc329(0x1dd))<0x0&&(_0x33d3ea=_0x33d3ea[_0x4cc329(0x21d)](/\/\* ENTITIES \*\//,_0x4cc329(0x247)+_0x2678a4[_0x4cc329(0x243)]+_0x4cc329(0x1dd))),_0x33d3ea[_0x4cc329(0x1f1)](_0x4cc329(0x202)+_0x2678a4[_0x4cc329(0x243)]+_0x4cc329(0x1ce))<0x0&&(_0x33d3ea=_0x33d3ea[_0x4cc329(0x21d)](/\/\* RESOLVER CLASSES \*\//,_0x4cc329(0x1c2)+_0x2678a4['pascalCaseName']+_0x4cc329(0x1ce))),await this[_0x4cc329(0x20d)](_0x122196,_0x33d3ea,_0x2678a4);}['createTypeText'](_0x19b945){const _0x2693db=a0_0x2387fc;let _0x28bd22=sereviceType,_0x5dff9b=_0x19b945[_0x2693db(0x1c7)](_0x429bd8=>{const _0x44008e=_0x2693db;if('id'==_0x429bd8[_0x44008e(0x216)])return'';if(_0x44008e(0x207)==_0x429bd8[_0x44008e(0x216)])return'';if(_0x44008e(0x23c)==_0x429bd8[_0x44008e(0x216)])return'';if('updated_at'==_0x429bd8[_0x44008e(0x216)])return'';if(_0x44008e(0x20f)==_0x429bd8[_0x44008e(0x216)])return'';if('updater_id'==_0x429bd8[_0x44008e(0x216)])return'';let _0x58bb00=this['getFieldType'](_0x429bd8),_0x3e7807=this[_0x44008e(0x1c5)](_0x429bd8),_0x386212=camelCase(_0x429bd8[_0x44008e(0x216)]);return'\x20\x20'+(_0x44008e(0x200)+(0x0==_0x58bb00[_0x44008e(0x20e)]?'':_0x44008e(0x226)+_0x58bb00+',')+_0x44008e(0x238)+_0x429bd8[_0x44008e(0x1c4)]+_0x44008e(0x205))+_0x44008e(0x1fa)+(''+_0x386212+(_0x429bd8[_0x44008e(0x1c4)]?'?':'')+':\x20'+_0x3e7807)+'\x0a';});_0x28bd22=_0x28bd22[_0x2693db(0x21d)](/{{newTypeColumns}}/g,_0x5dff9b[_0x2693db(0x23b)]('\x0a'));let _0x37072c=_0x19b945[_0x2693db(0x1c7)](_0x451739=>{const _0x5a2461=_0x2693db;if('id'==_0x451739[_0x5a2461(0x216)])return'';if(_0x5a2461(0x207)==_0x451739[_0x5a2461(0x216)])return'';if(_0x5a2461(0x23c)==_0x451739[_0x5a2461(0x216)])return'';if(_0x5a2461(0x1c8)==_0x451739[_0x5a2461(0x216)])return'';if(_0x5a2461(0x20f)==_0x451739['name'])return'';if(_0x5a2461(0x22f)==_0x451739[_0x5a2461(0x216)])return'';let _0x443695=this[_0x5a2461(0x234)](_0x451739),_0x4332e8=this[_0x5a2461(0x1c5)](_0x451739);_0x451739[_0x5a2461(0x1c4)]=!0x0;let _0x2d3567=camelCase(_0x451739['name']);return'\x20\x20'+('@Field('+(0x0==_0x443695[_0x5a2461(0x20e)]?'':'type\x20=>'+_0x443695+',')+'\x20{\x20nullable:\x20'+_0x451739[_0x5a2461(0x1c4)]+_0x5a2461(0x205))+_0x5a2461(0x1fa)+(''+_0x2d3567+(_0x451739[_0x5a2461(0x1c4)]?'?':'')+':\x20'+_0x4332e8)+'\x0a';});return _0x28bd22=_0x28bd22[_0x2693db(0x21d)](/{{patchTypeColumns}}/g,_0x37072c[_0x2693db(0x23b)]('\x0a')),_0x28bd22;}['createEntityText'](_0x49b949,_0x3e21de){const _0x4c6d8a=a0_0x2387fc;let _0x4b5b3e=serviceEntity,_0x59d58c=_0x3e21de[_0x4c6d8a(0x223)](function(_0x4a8832,_0x495662){const _0x3a554e=_0x4c6d8a;return _0x4a8832[_0x3a554e(0x210)]-_0x495662[_0x3a554e(0x210)];})['map'](_0x44e98f=>this['columnToEntityColumn'](_0x44e98f));[_0x4c6d8a(0x1c6),_0x4c6d8a(0x1c1)]['includes'](_0x49b949[_0x4c6d8a(0x209)])&&_0x59d58c[_0x4c6d8a(0x239)]('\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201'),_0x4b5b3e=_0x4b5b3e[_0x4c6d8a(0x21d)](/{{entityColumns}}/g,_0x59d58c[_0x4c6d8a(0x23b)]('\x0a'));let _0x21ee6c='',_0x5d30bb=_0x3e21de[_0x4c6d8a(0x1f5)](_0x4ffa24=>_0x4ffa24[_0x4c6d8a(0x208)]&&_0x4ffa24[_0x4c6d8a(0x208)]>0x0)['sort'](function(_0x59949d,_0x1b4eff){const _0x28e3d1=_0x4c6d8a;return _0x59949d[_0x28e3d1(0x208)]-_0x1b4eff[_0x28e3d1(0x208)];});if(_0x5d30bb[_0x4c6d8a(0x20e)]>0x0){_0x21ee6c='@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})';let _0x2ca90b=_0x5d30bb[_0x4c6d8a(0x1c7)](_0x394f04=>{const _0x1aa995=_0x4c6d8a;let _0x38c959=_0x394f04[_0x1aa995(0x216)];return _0x1aa995(0x207)==_0x394f04[_0x1aa995(0x216)]&&(_0x38c959=_0x1aa995(0x21b)),_0x1aa995(0x20f)==_0x394f04['name']&&(_0x38c959=_0x1aa995(0x1fc)),_0x1aa995(0x22f)==_0x394f04[_0x1aa995(0x216)]&&(_0x38c959=_0x1aa995(0x228)),_0x1aa995(0x22d)+camelCase(_0x38c959);});_0x21ee6c=_0x21ee6c['replace'](/{{indexColumns}}/g,_0x2ca90b[_0x4c6d8a(0x23b)](','));}return _0x4b5b3e=_0x4b5b3e[_0x4c6d8a(0x21d)](/{{indexAnn}}/g,_0x21ee6c),_0x4b5b3e;}['createHistoryEntityText'](_0x5bd667,_0x52d42e){const _0x2c8c7c=a0_0x2387fc;let _0x28d759=_0x2c8c7c(0x1c1)==_0x5bd667[_0x2c8c7c(0x209)]?serviceEntityHistJson:serviceEntityHistCopy,_0x4aa96f=_0x52d42e[_0x2c8c7c(0x223)](function(_0x220d4d,_0x5292b7){const _0x38d684=_0x2c8c7c;return _0x220d4d[_0x38d684(0x210)]-_0x5292b7[_0x38d684(0x210)];})[_0x2c8c7c(0x1c7)](_0x307ac5=>this['columnToEntityColumn'](_0x307ac5));return _0x28d759=_0x28d759[_0x2c8c7c(0x21d)](/{{entityColumns}}/g,_0x4aa96f[_0x2c8c7c(0x23b)]('\x0a')),_0x28d759;}[a0_0x2387fc(0x24a)](_0x2e6b2a){const _0x1d6ea0=a0_0x2387fc;if('id'==_0x2e6b2a[_0x1d6ea0(0x216)])return'';if('domain_id'==_0x2e6b2a['name'])return'';if(_0x1d6ea0(0x23c)==_0x2e6b2a['name'])return'';if(_0x1d6ea0(0x1c8)==_0x2e6b2a[_0x1d6ea0(0x216)])return'';if(_0x1d6ea0(0x20f)==_0x2e6b2a[_0x1d6ea0(0x216)])return'';if(_0x1d6ea0(0x22f)==_0x2e6b2a['name'])return'';let _0x4d05ac=_0x2e6b2a[_0x1d6ea0(0x1e0)];_0x1d6ea0(0x1d7)==_0x2e6b2a[_0x1d6ea0(0x1e0)]&&(_0x4d05ac=_0x1d6ea0(0x229)),'long'==_0x2e6b2a[_0x1d6ea0(0x1e0)]&&(_0x4d05ac=_0x1d6ea0(0x20a)),_0x1d6ea0(0x21c)==_0x2e6b2a[_0x1d6ea0(0x1e0)]&&(_0x4d05ac=_0x1d6ea0(0x1d5)),_0x1d6ea0(0x232)==_0x2e6b2a['colType']&&(_0x4d05ac=_0x1d6ea0(0x225));let _0x28a0e8='';'string'==_0x2e6b2a['colType']&&(_0x28a0e8=_0x2e6b2a['colSize']);let _0x5f3b50=this[_0x1d6ea0(0x234)](_0x2e6b2a),_0xf77f78=this[_0x1d6ea0(0x1c5)](_0x2e6b2a),_0x35b682=camelCase(_0x2e6b2a[_0x1d6ea0(0x216)]);return'\x20\x20'+(_0x1d6ea0(0x1d8)+_0x2e6b2a[_0x1d6ea0(0x216)]+_0x1d6ea0(0x1e4)+_0x4d05ac+_0x1d6ea0(0x201)+_0x2e6b2a[_0x1d6ea0(0x1c4)]+'\x20'+(0x0==_0x28a0e8[_0x1d6ea0(0x20e)]?'':_0x1d6ea0(0x224)+_0x28a0e8)+'\x20})')+_0x1d6ea0(0x1fa)+('@Field('+(0x0==_0x5f3b50[_0x1d6ea0(0x20e)]?'':'type\x20=>'+_0x5f3b50+',')+'\x20{\x20nullable:\x20'+_0x2e6b2a[_0x1d6ea0(0x1c4)]+'\x20})')+_0x1d6ea0(0x1fa)+(''+_0x35b682+(_0x2e6b2a[_0x1d6ea0(0x1c4)]?'?':'')+':\x20'+_0xf77f78)+'\x0a';}[a0_0x2387fc(0x234)](_0x155ce1){const _0x1ad0d3=a0_0x2387fc;let _0x3a67ba='';return _0x1ad0d3(0x1d7)==_0x155ce1[_0x1ad0d3(0x1e0)]&&(_0x3a67ba=_0x1ad0d3(0x1ee)),_0x1ad0d3(0x235)==_0x155ce1['colType']&&(_0x3a67ba=_0x1ad0d3(0x1ee)),_0x1ad0d3(0x1d9)==_0x155ce1[_0x1ad0d3(0x1e0)]&&(_0x3a67ba='Int'),_0x1ad0d3(0x22b)==_0x155ce1[_0x1ad0d3(0x1e0)]&&(_0x3a67ba=_0x1ad0d3(0x1e1)),_0x3a67ba;}[a0_0x2387fc(0x1c5)](_0x57ce4a){const _0x3ade69=a0_0x2387fc;let _0x399296=_0x57ce4a[_0x3ade69(0x1e0)];return'decimal'==_0x57ce4a[_0x3ade69(0x1e0)]&&(_0x399296='number'),_0x3ade69(0x1d7)==_0x57ce4a['colType']&&(_0x399296='number'),'float'==_0x57ce4a['colType']&&(_0x399296='number'),_0x3ade69(0x22b)==_0x57ce4a[_0x3ade69(0x1e0)]&&(_0x399296=_0x3ade69(0x248)),_0x3ade69(0x1d9)==_0x57ce4a[_0x3ade69(0x1e0)]&&(_0x399296='number'),_0x3ade69(0x232)==_0x57ce4a[_0x3ade69(0x1e0)]&&(_0x399296=_0x3ade69(0x212)),_0x3ade69(0x230)==_0x57ce4a['colType']&&(_0x399296=_0x3ade69(0x212)),'text'==_0x57ce4a[_0x3ade69(0x1e0)]&&(_0x399296=_0x3ade69(0x21c)),_0x399296;}async[a0_0x2387fc(0x20d)](_0x5af56e,_0x202556,_0x4a93ba){const _0x16182d=a0_0x2387fc;await fs[_0x16182d(0x1f7)](_0x5af56e,this[_0x16182d(0x231)](_0x202556,_0x4a93ba),_0x16182d(0x1ea));}[a0_0x2387fc(0x231)](_0x19066a,_0x3e832e){const _0x4b1900=a0_0x2387fc;return _0x19066a['replace'](/{{pascalCase name}}/g,_0x3e832e['pascalCaseName'])[_0x4b1900(0x21d)](/{{camelCase name}}/g,_0x3e832e['camelCaseName'])[_0x4b1900(0x21d)](/{{snakeCase name}}/g,_0x3e832e[_0x4b1900(0x1ef)])[_0x4b1900(0x21d)](/{{pluralPascalCase name}}/g,_0x3e832e[_0x4b1900(0x1f6)])[_0x4b1900(0x21d)](/{{pluralCamelCase name}}/g,_0x3e832e['pluralCamelCaseName'])[_0x4b1900(0x21d)](/{{tableName}}/g,_0x3e832e[_0x4b1900(0x20c)])[_0x4b1900(0x21d)](/{{name}}/g,_0x3e832e['name']);}async[a0_0x2387fc(0x217)](_0x2edd8e,_0x31968a,_0x33be18){const _0x867a14=a0_0x2387fc;let _0x3be561=_0x2edd8e+_0x867a14(0x1d4);await this[_0x867a14(0x1ca)](_0x3be561),_0x3be561=_0x3be561+'/'+_0x31968a,await this[_0x867a14(0x1ca)](_0x3be561),_0x3be561+=_0x867a14(0x22e),await this['createDir'](_0x3be561),_0x3be561+='/service',await this[_0x867a14(0x1ca)](_0x3be561),_0x3be561=_0x3be561+'/'+_0x33be18,await this[_0x867a14(0x1ca)](_0x3be561);}[a0_0x2387fc(0x215)](){const _0x1491f2=a0_0x2387fc;let _0x377f78=process[_0x1491f2(0x1c9)][_0x1491f2(0x1e7)][_0x1491f2(0x1fe)]('/'),_0x2c60e7=[];for(let _0x67b9d2=0x0;_0x67b9d2<_0x377f78['length']&&_0x1491f2(0x237)!=_0x377f78[_0x67b9d2];_0x67b9d2++)_0x2c60e7[_0x1491f2(0x239)](_0x377f78[_0x67b9d2]);return _0x2c60e7[_0x1491f2(0x23b)]('/');}async['createDir'](_0xe27c0c){const _0x4b02e1=a0_0x2387fc;0x0==await this[_0x4b02e1(0x241)](_0xe27c0c)&&fs['mkdirSync'](_0xe27c0c);}async[a0_0x2387fc(0x241)](_0x3d34a5){return await fs['existsSync'](_0x3d34a5);}};tslib_1[a0_0x2387fc(0x1cd)]([(0x0,type_graphql_1['Query'])(_0x28f18c=>Boolean,{'description':a0_0x2387fc(0x1cc)}),tslib_1[a0_0x2387fc(0x236)](0x0,(0x0,type_graphql_1[a0_0x2387fc(0x1d2)])('id')),tslib_1[a0_0x2387fc(0x236)](0x1,(0x0,type_graphql_1[a0_0x2387fc(0x24c)])()),tslib_1[a0_0x2387fc(0x242)](a0_0x2387fc(0x21a),Function),tslib_1['__metadata']('design:paramtypes',[String,Object]),tslib_1[a0_0x2387fc(0x242)](a0_0x2387fc(0x21f),Promise)],OperatoToolCreateService[a0_0x2387fc(0x1dc)],'toolCreateService',null),OperatoToolCreateService=tslib_1[a0_0x2387fc(0x1cd)]([(0x0,type_graphql_1[a0_0x2387fc(0x22a)])()],OperatoToolCreateService),exports[a0_0x2387fc(0x1db)]=OperatoToolCreateService;const allIndex=a0_0x2387fc(0x1e5),serviceIndex=a0_0x2387fc(0x21e),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_0x2387fc(0x211),serviceMutation='\x0aimport\x20{\x20Resolver,\x20Mutation,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20In\x20}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20New{{pascalCase\x20name}},\x20{{pascalCase\x20name}}Patch\x20}\x20from\x20\x27./{{name}}-type\x27\x0aimport\x20{\x20getRepository\x20}\x20from\x20\x27@things-factory/shell\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Mutation\x20{\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20create\x20new\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20create{{pascalCase\x20name}}(@Arg(\x27{{camelCase\x20name}}\x27)\x20{{camelCase\x20name}}:\x20New{{pascalCase\x20name}},\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20return\x20await\x20tx.getRepository({{pascalCase\x20name}}).save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20modify\x20{{pascalCase\x20name}}\x20information\x27\x20})\x0a\x20\x20async\x20update{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27id\x27)\x20id:\x20string,\x0a\x20\x20\x20\x20@Arg(\x27patch\x27)\x20patch:\x20{{pascalCase\x20name}}Patch,\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20repository\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20repository.findOne(\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20)\x0a\x0a\x20\x20\x20\x20return\x20await\x20repository.save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20...patch,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20[{{pascalCase\x20name}}],\x20{\x20description:\x20\x22To\x20modify\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20information\x22\x20})\x0a\x20\x20async\x20updateMultiple{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27patches\x27,\x20type\x20=>\x20[{{pascalCase\x20name}}Patch])\x20patches:\x20{{pascalCase\x20name}}Patch[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}[]>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20results\x20=\x20[]\x0a\x20\x20\x20\x20const\x20_createRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27+\x27)\x0a\x20\x20\x20\x20const\x20_updateRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27M\x27)\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}Repo\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x0a\x20\x20\x20\x20if\x20(_createRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_createRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20newRecord\x20=\x20_createRecords[i]\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...newRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27+\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20if\x20(_updateRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_updateRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20updRecord\x20=\x20_updateRecords[i]\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20{{camelCase\x20name}}Repo.findOne({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id:updRecord.id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...updRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27M\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20return\x20results\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20delete{{pascalCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove({\x20domain,\x20id,\x20updater:user\x20})\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20multiple\x20{{camelCase\x20name}}s\x27\x20})\x0a\x20\x20async\x20delete{{pluralPascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27ids\x27,\x20type\x20=>\x20[String])\x20ids:\x20string[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20delEntitis\x20=\x20ids.map(id=>{\x0a\x20\x20\x20\x20\x20\x20return\x20{domain,id,updater:user}\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove(delEntitis)\x0a\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a}\x0a',sereviceType=a0_0x2387fc(0x240),sereviceHistoryType='\x0aimport\x20{\x20ObjectType,\x20Field,\x20InputType,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0a\x0a@ObjectType()\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryList\x20{\x0a\x20\x20@Field(type\x20=>\x20[{{pascalCase\x20name}}History])\x0a\x20\x20items:\x20{{pascalCase\x20name}}History[]\x0a\x0a\x20\x20@Field(type\x20=>\x20Int)\x0a\x20\x20total:\x20number\x0a}\x0a',serviceEntity=a0_0x2387fc(0x1f9),serviceEntityHistCopy=a0_0x2387fc(0x1df),serviceEntityHistJson=a0_0x2387fc(0x23a),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_0x49641c=a0_0x5924;function a0_0x5924(_0x8c3716,_0x494304){const _0x461683=a0_0x4616();return a0_0x5924=function(_0x59246c,_0x700aec){_0x59246c=_0x59246c-0xec;let _0xee1d42=_0x461683[_0x59246c];return _0xee1d42;},a0_0x5924(_0x8c3716,_0x494304);}(function(_0x29c82b,_0x171292){const _0xc22690=a0_0x5924,_0x18aa2d=_0x29c82b();while(!![]){try{const _0x53ac92=-parseInt(_0xc22690(0x106))/0x1+parseInt(_0xc22690(0x10c))/0x2*(parseInt(_0xc22690(0xee))/0x3)+parseInt(_0xc22690(0x10b))/0x4*(-parseInt(_0xc22690(0x104))/0x5)+-parseInt(_0xc22690(0xfe))/0x6+-parseInt(_0xc22690(0x100))/0x7*(parseInt(_0xc22690(0xfa))/0x8)+-parseInt(_0xc22690(0x109))/0x9*(parseInt(_0xc22690(0xef))/0xa)+parseInt(_0xc22690(0x10a))/0xb;if(_0x53ac92===_0x171292)break;else _0x18aa2d['push'](_0x18aa2d['shift']());}catch(_0x3de6ac){_0x18aa2d['push'](_0x18aa2d['shift']());}}}(a0_0x4616,0xf2276));Object[a0_0x49641c(0x103)](exports,a0_0x49641c(0xfb),{'value':!0x0}),exports[a0_0x49641c(0xfd)]=exports[a0_0x49641c(0xf6)]=void 0x0;const operato_license_checker_1=require(a0_0x49641c(0x101)),shell_1=require('@things-factory/shell'),menu_base_1=require(a0_0x49641c(0xfc)),license_error_1=require(a0_0x49641c(0xf1));async function checkStudioPermission(){const _0x23a1f5=a0_0x49641c;let _0x54259e=((0x0,operato_license_checker_1[_0x23a1f5(0xf8)])('Permissions\x20For\x20Tailor\x20Tool')||',')[_0x23a1f5(0xf4)](',')['map'](_0x3ec98f=>_0x3ec98f[_0x23a1f5(0x108)]()),_0x2d3854=!0x1;return _0x54259e[_0x23a1f5(0xf2)](_0x440d9f=>{const _0x2cc95d=_0x23a1f5;_0x440d9f['includes'](_0x2cc95d(0xff))&&(_0x2d3854=!0x0);}),_0x2d3854;}function a0_0x4616(){const _0x4c8cf6=['../../errors/license-error','forEach','INVALID_LICENSE','split','select','checkStudioPermission','checkTarget','getPermission','where','56056UgBEVz','__esModule','@things-factory/menu-base','checkStudioTemplateIsOverLimit','4002468cDzrdx','Studio','1981gpyxRI','@things-factory/operato-license-checker','ERROR_CODES','defineProperty','760UFGqam','getCount','1508308QngGvI','manager','trim','309303QJoQll','68358598VbEArg','28564qhCmSb','2eHUGTb','Menu','menu','createQueryBuilder','id\x20!=\x20:id','from','(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)','4909476EsEARy','470zcwJPZ','LicenseError'];a0_0x4616=function(){return _0x4c8cf6;};return a0_0x4616();}async function checkStudioTemplateIsOverLimit(_0x4a6554,_0x125a56){const _0x147cab=a0_0x49641c;if(0x0==await checkStudioPermission())throw new license_error_1['LicenseError']({'errorCode':_0x125a56['t'](license_error_1[_0x147cab(0xf0)][_0x147cab(0x102)][_0x147cab(0xf3)])});var _0x13216f=0x0;if(_0x13216f=_0x4a6554&&''!=_0x4a6554?await(0x0,shell_1['getRepository'])(menu_base_1[_0x147cab(0x10d)])[_0x147cab(0x107)]['createQueryBuilder']()[_0x147cab(0xf5)](_0x147cab(0x10e))['from'](menu_base_1[_0x147cab(0x10d)],_0x147cab(0x10e))[_0x147cab(0xf9)](_0x147cab(0x110),{'id':_0x4a6554})['andWhere'](_0x147cab(0xed))[_0x147cab(0x105)]()+0x1:await(0x0,shell_1['getRepository'])(menu_base_1[_0x147cab(0x10d)])[_0x147cab(0x107)][_0x147cab(0x10f)]()[_0x147cab(0xf5)]('menu')[_0x147cab(0xec)](menu_base_1[_0x147cab(0x10d)],_0x147cab(0x10e))['where'](_0x147cab(0xed))[_0x147cab(0x105)]()+0x1,!(0x0,operato_license_checker_1[_0x147cab(0xf7)])(_0x13216f))throw new license_error_1['LicenseError']({'errorCode':_0x125a56['t'](license_error_1[_0x147cab(0xf0)]['ERROR_CODES']['OVER_LIMIT'])});return!0x0;}exports[a0_0x49641c(0xf6)]=checkStudioPermission,exports[a0_0x49641c(0xfd)]=checkStudioTemplateIsOverLimit;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';const a0_0x4c3c05=a0_0x4eb9;(function(_0x528232,_0x317ce4){const _0x308ea5=a0_0x4eb9,_0x2dbcbd=_0x528232();while(!![]){try{const _0x402079=parseInt(_0x308ea5(0x1ff))/0x1*(-parseInt(_0x308ea5(0x1f6))/0x2)+-parseInt(_0x308ea5(0x1ea))/0x3+-parseInt(_0x308ea5(0x203))/0x4*(parseInt(_0x308ea5(0x1fb))/0x5)+parseInt(_0x308ea5(0x1ef))/0x6*(-parseInt(_0x308ea5(0x1e9))/0x7)+-parseInt(_0x308ea5(0x1f2))/0x8+parseInt(_0x308ea5(0x1f9))/0x9*(-parseInt(_0x308ea5(0x202))/0xa)+parseInt(_0x308ea5(0x1fc))/0xb;if(_0x402079===_0x317ce4)break;else _0x2dbcbd['push'](_0x2dbcbd['shift']());}catch(_0xf54ab9){_0x2dbcbd['push'](_0x2dbcbd['shift']());}}}(a0_0x11a7,0x75961));function a0_0x4eb9(_0x201ab0,_0x1a792a){const _0x11a7ee=a0_0x11a7();return a0_0x4eb9=function(_0x4eb9ce,_0x45e440){_0x4eb9ce=_0x4eb9ce-0x1e6;let _0x4196d9=_0x11a7ee[_0x4eb9ce];return _0x4196d9;},a0_0x4eb9(_0x201ab0,_0x1a792a);}function a0_0x11a7(){const _0x4863d7=['__esModule','studioTemplateIsOverLimit','678327bAvfqH','checkStudioPermission','checkStudioTemplateIsOverLimit','893710axVZlg','227704pOyvny','design:type','__metadata','__param','778148zZZIck','1170897fdVKdg','design:paramtypes','Resolver','Operato\x20Tool\x20Studio\x20Usage\x20Permissions','Operato\x20Tool\x20Studio\x20Limit\x20check','6XorPLg','design:returntype','prototype','4613152dHQKLE','type-graphql','__decorate','Ctx','2IQexQt','tslib','studioPermission','18vniuAN','Query','65YRthZC','34725317FPFOHd'];a0_0x11a7=function(){return _0x4863d7;};return a0_0x11a7();}Object['defineProperty'](exports,a0_0x4c3c05(0x1fd),{'value':!0x0}),exports['OperatoToolResolver']=void 0x0;const tslib_1=require(a0_0x4c3c05(0x1f7)),type_graphql_1=require(a0_0x4c3c05(0x1f3)),tool_permission_1=require('./tool-permission');let OperatoToolResolver=class{async[a0_0x4c3c05(0x1f8)](_0x4bebaf){const _0x5a453d=a0_0x4c3c05;return(0x0,tool_permission_1[_0x5a453d(0x200)])();}async[a0_0x4c3c05(0x1fe)](_0x18dfd2,_0x3a4d4f){const _0x4440c6=a0_0x4c3c05;return(0x0,tool_permission_1[_0x4440c6(0x201)])(_0x18dfd2,_0x3a4d4f);}};tslib_1[a0_0x4c3c05(0x1f4)]([(0x0,type_graphql_1[a0_0x4c3c05(0x1fa)])(_0x56366f=>Boolean,{'description':a0_0x4c3c05(0x1ed)}),tslib_1[a0_0x4c3c05(0x1e8)](0x0,(0x0,type_graphql_1[a0_0x4c3c05(0x1f5)])()),tslib_1[a0_0x4c3c05(0x1e7)](a0_0x4c3c05(0x1e6),Function),tslib_1['__metadata'](a0_0x4c3c05(0x1eb),[Object]),tslib_1['__metadata'](a0_0x4c3c05(0x1f0),Promise)],OperatoToolResolver['prototype'],a0_0x4c3c05(0x1f8),null),tslib_1[a0_0x4c3c05(0x1f4)]([(0x0,type_graphql_1['Query'])(_0x344aa3=>Boolean,{'description':a0_0x4c3c05(0x1ee)}),tslib_1[a0_0x4c3c05(0x1e8)](0x0,(0x0,type_graphql_1['Arg'])('id')),tslib_1['__param'](0x1,(0x0,type_graphql_1['Ctx'])()),tslib_1['__metadata'](a0_0x4c3c05(0x1e6),Function),tslib_1['__metadata']('design:paramtypes',[String,Object]),tslib_1[a0_0x4c3c05(0x1e7)](a0_0x4c3c05(0x1f0),Promise)],OperatoToolResolver[a0_0x4c3c05(0x1f1)],a0_0x4c3c05(0x1fe),null),OperatoToolResolver=tslib_1[a0_0x4c3c05(0x1f4)]([(0x0,type_graphql_1[a0_0x4c3c05(0x1ec)])()],OperatoToolResolver),exports['OperatoToolResolver']=OperatoToolResolver;
|