@things-factory/operato-tools 6.0.135 → 6.0.140
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 +3 -3
- 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 +3 -3
- package/client/pages/generator/tab-config-tab-mixin.js +4 -4
- package/client/pages/main.js +4 -4
- package/client/reducers/main.js +1 -1
- package/package.json +3 -3
- package/server/constants/error-code.js +1 -1
- package/server/errors/license-error.js +1 -1
- package/server/routes.js +1 -1
- package/server/service/tool-entity/create-menu.js +1 -1
- package/server/service/tool-entity/create-service.js +1 -1
- package/server/service/tool-secret/tool-permission.js +1 -1
- package/server/service/tool-secret/tool-resolver.js +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x466535=a0_0x1372;(function(_0x4b1976,_0x3bf217){const _0x39403a=a0_0x1372,_0x4ddf3e=_0x4b1976();while(!![]){try{const _0x4b66ff=-parseInt(_0x39403a(0xc2))/0x1*(-parseInt(_0x39403a(0xc0))/0x2)+parseInt(_0x39403a(0xc4))/0x3+parseInt(_0x39403a(0xb7))/0x4+-parseInt(_0x39403a(0xbb))/0x5+-parseInt(_0x39403a(0xbe))/0x6+-parseInt(_0x39403a(0xc5))/0x7+-parseInt(_0x39403a(0xb8))/0x8*(parseInt(_0x39403a(0xc1))/0x9);if(_0x4b66ff===_0x3bf217)break;else _0x4ddf3e['push'](_0x4ddf3e['shift']());}catch(_0x3d2e3e){_0x4ddf3e['push'](_0x4ddf3e['shift']());}}}(a0_0x5841,0x3736e));function a0_0x1372(_0x425387,_0x316393){const _0x58415b=a0_0x5841();return a0_0x1372=function(_0x1372a8,_0x3b34d3){_0x1372a8=_0x1372a8-0xb7;let _0x4461fa=_0x58415b[_0x1372a8];return _0x4461fa;},a0_0x1372(_0x425387,_0x316393);}function a0_0x5841(){const _0xed75c6=['1145841pEceoM','797111UuFNEc','../constants/error-code','detail','1599640pMvLat','2888DcCSqJ','assign','defineProperty','1850605eQZTjT','license-error','tslib','613128xzCuiT','__importStar','20LcljgO','5463AOmTKZ','24961GVwIXE','LicenseError'];a0_0x5841=function(){return _0xed75c6;};return a0_0x5841();}Object[a0_0x466535(0xba)](exports,'__esModule',{'value':!0x0}),exports[a0_0x466535(0xc3)]=void 0x0;const tslib_1=require(a0_0x466535(0xbd)),ERROR_CODES=tslib_1[a0_0x466535(0xbf)](require(a0_0x466535(0xc6)));class LicenseError extends Error{static get['ERROR_CODES'](){const _0x4e4b07=a0_0x466535;return Object[_0x4e4b07(0xb9)]({},ERROR_CODES);}constructor({errorCode:_0x58766d,detail:_0x203585}){const _0x247690=a0_0x466535;super(_0x58766d),this['name']=_0x247690(0xbc),this['errorCode']=_0x58766d,this[_0x247690(0xc7)]=_0x203585;}}exports[a0_0x466535(0xc3)]=LicenseError;
|
package/server/routes.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a0_0x338499=a0_0x4d15;(function(_0xf9b8e,_0x5a71c9){const _0x5c2fb2=a0_0x4d15,_0x3981d6=_0xf9b8e();while(!![]){try{const _0x279957=parseInt(_0x5c2fb2(0x1b0))/0x1*(-parseInt(_0x5c2fb2(0x1ab))/0x2)+parseInt(_0x5c2fb2(0x1ae))/0x3+-parseInt(_0x5c2fb2(0x1ac))/0x4+parseInt(_0x5c2fb2(0x1ad))/0x5+-parseInt(_0x5c2fb2(0x1a8))/0x6+-parseInt(_0x5c2fb2(0x1a5))/0x7*(parseInt(_0x5c2fb2(0x1a4))/0x8)+parseInt(_0x5c2fb2(0x1af))/0x9*(parseInt(_0x5c2fb2(0x1a3))/0xa);if(_0x279957===_0x5a71c9)break;else _0x3981d6['push'](_0x3981d6['shift']());}catch(_0x4bdab6){_0x3981d6['push'](_0x3981d6['shift']());}}}(a0_0x1153,0xa4387));const debug=require(a0_0x338499(0x1aa))(a0_0x338499(0x1a6));process['on']('bootstrap-module-global-public-route',(_0x3d4fe9,_0x296b0b)=>{}),process['on']('bootstrap-module-global-private-route',(_0x23fecd,_0x31434e)=>{}),process['on'](a0_0x338499(0x1a7),(_0xcb7161,_0x367b38)=>{}),process['on'](a0_0x338499(0x1a9),(_0x17f07d,_0x17ac34)=>{});function a0_0x4d15(_0x5d64d3,_0x163296){const _0x115397=a0_0x1153();return a0_0x4d15=function(_0x4d158b,_0x105dbd){_0x4d158b=_0x4d158b-0x1a3;let _0x51293f=_0x115397[_0x4d158b];return _0x51293f;},a0_0x4d15(_0x5d64d3,_0x163296);}function a0_0x1153(){const _0x5c3eaa=['bootstrap-module-domain-public-route','7415874wqPDGV','bootstrap-module-domain-private-route','debug','74nswiel','1811540kEvzut','6411500eODAPK','3914667oHPfje','32211eKTiXu','3153MpEUOa','330gIgwPy','22432nkgFDI','567wEyXHE','things-factory:operato-tools:routes'];a0_0x1153=function(){return _0x5c3eaa;};return a0_0x1153();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x399db8=a0_0x43cb;function a0_0x43cb(_0x2de68d,_0x4d1025){const _0x36e33b=a0_0x36e3();return a0_0x43cb=function(_0x43cbdf,_0x45ad99){_0x43cbdf=_0x43cbdf-0xd4;let _0x42d420=_0x36e33b[_0x43cbdf];return _0x42d420;},a0_0x43cb(_0x2de68d,_0x4d1025);}function a0_0x36e3(){const _0x28739b=['\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}','find','gridRank','sort','{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22','COPY',',\x22mandatory\x22:\x20','Resolver','design:type','toString','{\x22name\x22:\x22','dataProp','toolCreateMenu','select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27','aes-256-ecb','hidden','lodash','Directive','335030GMyhrm','./../tool-secret/tool-permission','__importDefault','Operato\x20Tool\x20Create\x20Menu','refType','left','refName','24hjPynN','SCREEN','OperatoToolCreateMenu','rank','entity','\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','string','resourceUrl','createSortCols','updatedAt','\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','readonly',',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22','aes-256-ofb','state',',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22','__param','name','__esModule','parent','design:returntype','{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22','map','substring','utf8','\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','query','filter','updater','{\x22name\x22:\x20\x22','crypto','createSearchCols','pluralize','\x20,\x22editable\x22:\x20','1720033AJmueZ','join','10OEgknZ','updater_id','update','push','@things-factory/meta-ui/client/pages/meta-grist-page','length','creator','18123LAsbqC','findOne','\x22,\x22operator\x22:\x20\x22','save','replace','created_at','EntityColumn','updated_at','618372EmDvev','code','stringify','Menu','\x27\x20or\x20id\x20=\x20\x27','createMenuData','parent_menu_id','\x22,\x22name\x22:\x20\x22','aes-256-cfb',',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22','aes256','Ctx','\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}','sortRank','design:paramtypes','aes-256-cbc','82705IihKaD','default','creator_id','hiddenFlag','aes-256-ctr','__metadata','\x22,\x22hidden\x22:','getRepository','\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}','76kqgUTf','searchRank','checkStudioTemplateIsOverLimit','defineProperty','__decorate','meta-grist-page','6111919gWgQnF','aes-256-cfb8','Arg','hex','1yErMDX','JSON','split','assign','{\x22type\x22:\x20\x22','Mutation','\x22,\x22header\x22:\x20\x22','\x20,\x22exportable\x22:\x20true','reverseSort','2935368mMLgSL'];a0_0x36e3=function(){return _0x28739b;};return a0_0x36e3();}(function(_0x384f04,_0x2fadf7){const _0x4e4eec=a0_0x43cb,_0x23c49d=_0x384f04();while(!![]){try{const _0x408926=-parseInt(_0x4e4eec(0xf7))/0x1*(parseInt(_0x4e4eec(0x113))/0x2)+parseInt(_0x4e4eec(0x145))/0x3*(-parseInt(_0x4e4eec(0xed))/0x4)+parseInt(_0x4e4eec(0xe4))/0x5+parseInt(_0x4e4eec(0x100))/0x6+-parseInt(_0x4e4eec(0x13c))/0x7+parseInt(_0x4e4eec(0x11a))/0x8*(-parseInt(_0x4e4eec(0xd4))/0x9)+-parseInt(_0x4e4eec(0x13e))/0xa*(-parseInt(_0x4e4eec(0xf3))/0xb);if(_0x408926===_0x2fadf7)break;else _0x23c49d['push'](_0x23c49d['shift']());}catch(_0x417d43){_0x23c49d['push'](_0x23c49d['shift']());}}}(a0_0x36e3,0x4fe5d));Object[a0_0x399db8(0xf0)](exports,a0_0x399db8(0x12c),{'value':!0x0}),exports[a0_0x399db8(0x11c)]=void 0x0;const tslib_1=require('tslib'),type_graphql_1=require('type-graphql'),resource_base_1=require('@things-factory/resource-base'),menu_base_1=require('@things-factory/menu-base'),tool_permission_1=require(a0_0x399db8(0x114)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x399db8(0x111)),{plural:plural}=require(a0_0x399db8(0x13a)),crypto_1=tslib_1[a0_0x399db8(0x115)](require(a0_0x399db8(0x138)));let OperatoToolCreateMenu=class{async[a0_0x399db8(0x10d)](_0x359758,_0x44d738,_0x6faae2){const _0x2c1ca6=a0_0x399db8,{domain:_0x2fb2f4,user:_0x5e09ee,tx:_0x5c6ae7}=_0x6faae2[_0x2c1ca6(0x128)];await(0x0,tool_permission_1[_0x2c1ca6(0xef)])('',_0x6faae2);const _0x1dfae6=await _0x5c6ae7[_0x2c1ca6(0xeb)](resource_base_1['Entity'])['findOne']({'where':{'domain':{'id':_0x2fb2f4['id']},'id':_0x359758}}),_0x321c21=await _0x5c6ae7[_0x2c1ca6(0xeb)](resource_base_1[_0x2c1ca6(0x14b)])[_0x2c1ca6(0x102)]({'where':{'domain':{'id':_0x2fb2f4['id']},'entity':{'id':_0x1dfae6['id']}}});let {name:_0x55d971=''}=_0x1dfae6||{},_0x472517=kebabCase(_0x55d971),_0x73e385=modelTemplate[_0x2c1ca6(0x149)](/{{pascalCase name}}/g,startCase(camelCase(_0x55d971))[_0x2c1ca6(0x149)](/ /g,''))['replace'](/{{camelCase name}}/g,camelCase(_0x55d971))['replace'](/{{snakeCase name}}/g,snakeCase(_0x55d971))[_0x2c1ca6(0x149)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x55d971)))[_0x2c1ca6(0x149)](/ /g,''))[_0x2c1ca6(0x149)](/{{pluralCamelCase name}}/g,camelCase(plural(_0x55d971)))[_0x2c1ca6(0x149)](/{{name}}/g,_0x55d971),_0x5db7b1='';_0x2c1ca6(0xf8)==_0x1dfae6[_0x2c1ca6(0x10c)]?_0x5db7b1=_0x2c1ca6(0x11f):_0x2c1ca6(0x106)==_0x1dfae6[_0x2c1ca6(0x10c)]&&(_0x5db7b1=_0x2c1ca6(0x133)),_0x73e385=_0x73e385['replace'](/{{HistoryButton}}/g,_0x5db7b1);let _0x4b95da=this[_0x2c1ca6(0x122)](_0x321c21);_0x73e385=_0x73e385[_0x2c1ca6(0x149)](/{{SortColumns}}/g,_0x4b95da[_0x2c1ca6(0x13d)](','));let _0x521e5b=this[_0x2c1ca6(0x139)](_0x321c21);_0x73e385=_0x73e385[_0x2c1ca6(0x149)](/{{SearchColumns}}/g,_0x521e5b[_0x2c1ca6(0x13d)](','));let _0x90e47c=this['createGridColumns'](_0x321c21);return _0x73e385=_0x73e385['replace'](/{{GridColumns}}/g,_0x90e47c['join'](',')),_0x73e385=this['enc'](_0x73e385),await this[_0x2c1ca6(0xd9)](_0x5c6ae7,_0x2fb2f4,_0x5e09ee,_0x44d738,_0x472517,_0x73e385),!0x0;}['createGridColumns'](_0x499e04){const _0x1df7c6=a0_0x399db8;return _0x499e04[_0x1df7c6(0x135)](_0x2aae23=>'id'!=_0x2aae23[_0x1df7c6(0x12b)]&&_0x2aae23[_0x1df7c6(0x103)]>0x0)[_0x1df7c6(0x104)](function(_0x51fba5,_0x28d333){const _0x27e033=_0x1df7c6;return _0x51fba5[_0x27e033(0x103)]-_0x28d333[_0x27e033(0x103)];})[_0x1df7c6(0x130)](_0x2d0025=>{const _0x2bf0af=_0x1df7c6;let {gridEditor:_0x2a9426='string',name:_0x4ce5b7,term:_0x3bd48f,gridWidth:_0x28057b=0x0,gridAlign:_0x4d9fed='left',nullable:_0x44b7cb=!0x1}=_0x2d0025;if(null==_0x2a9426&&(_0x2a9426='string'),null==_0x4d9fed&&(_0x4d9fed=_0x2bf0af(0x118)),'updater_id'==_0x4ce5b7||_0x2bf0af(0xe6)==_0x4ce5b7)return _0x4ce5b7=_0x2bf0af(0x13f)==_0x4ce5b7?_0x2bf0af(0x136):_0x2bf0af(0x144),_0x2bf0af(0x12f)+_0x4ce5b7+'\x22,\x22header\x22:\x20\x22'+_0x4ce5b7+_0x2bf0af(0xe0);if(_0x2bf0af(0x14c)==_0x4ce5b7||_0x2bf0af(0x14a)==_0x4ce5b7)return _0x2bf0af(0x105)+(_0x2bf0af(0x14c)==_0x4ce5b7?_0x2bf0af(0x123):'createdAt')+_0x2bf0af(0xfd)+_0x4ce5b7+_0x2bf0af(0x101);let _0x411279=_0x2bf0af(0x125)!=_0x2a9426&&_0x2bf0af(0x110)!=_0x2a9426,_0x44f3f3=_0x2bf0af(0x110)==_0x2a9426;0x1!=_0x44f3f3&&0x0!=_0x411279||(_0x2a9426=_0x2bf0af(0x120));let _0x303326=_0x2bf0af(0xfb)+_0x2a9426+_0x2bf0af(0xdb)+camelCase(_0x4ce5b7)+'\x22,\x22header\x22:\x20\x22'+_0x3bd48f+_0x2bf0af(0xea)+_0x44f3f3+_0x2bf0af(0x13b)+_0x411279+_0x2bf0af(0x107)+!_0x44b7cb+',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22'+_0x4d9fed+'\x22,\x22width\x22:'+_0x28057b+_0x2bf0af(0xfe);return _0x2bf0af(0xd5)==_0x2d0025[_0x2bf0af(0x117)]&&(_0x303326+=_0x2bf0af(0x129)+_0x2d0025['refName']+'\x22}'),'scenario'==_0x2d0025[_0x2bf0af(0x117)]&&(_0x303326+=_0x2bf0af(0xdd)+_0x2d0025['refName']+'\x22}'),_0x2bf0af(0x11e)==_0x2d0025[_0x2bf0af(0x117)]&&(_0x303326+=_0x2bf0af(0x126)+camelCase(plural(_0x2d0025[_0x2bf0af(0x119)]))+_0x2bf0af(0xec)),_0x303326+='}',_0x303326;});}[a0_0x399db8(0x139)](_0x5487f5){const _0x1a70a5=a0_0x399db8;return _0x5487f5[_0x1a70a5(0x135)](_0x3817ba=>_0x3817ba[_0x1a70a5(0xee)]>0x0)[_0x1a70a5(0x104)](function(_0x46c79d,_0x4f58d2){const _0xdb3a48=_0x1a70a5;return _0x46c79d[_0xdb3a48(0xee)]-_0x4f58d2[_0xdb3a48(0xee)];})[_0x1a70a5(0x130)](_0x296217=>{const _0x5c2b11=_0x1a70a5;let _0x553fe1=_0x296217['searchOper'];return _0x5c2b11(0x135)==_0x553fe1?'\x22'+camelCase(_0x296217['name'])+'\x22':(_0x553fe1||(_0x553fe1='eq'),_0x5c2b11(0x137)+camelCase(_0x296217[_0x5c2b11(0x12b)])+_0x5c2b11(0x147)+_0x553fe1+'\x22}');});}[a0_0x399db8(0x122)](_0x58acd9){const _0x2e2928=a0_0x399db8;return _0x58acd9[_0x2e2928(0x135)](_0x5619a8=>_0x5619a8['sortRank']>0x0)['sort'](function(_0x52ca72,_0x373a4d){const _0x572c43=_0x2e2928;return _0x52ca72['sortRank']-_0x373a4d[_0x572c43(0xe1)];})[_0x2e2928(0x130)](_0x2c3797=>_0x2e2928(0x10b)+camelCase(_0x2c3797[_0x2e2928(0x12b)])+'\x22,\x22desc\x22:'+_0x2c3797[_0x2e2928(0xff)]+'}');}async[a0_0x399db8(0xd9)](_0x5c4521,_0xa73cc6,_0x337d5e,_0x5502b9,_0x2f83fd,_0x24418f){const _0x1e808c=a0_0x399db8;let _0x497c25=await _0x5c4521[_0x1e808c(0xeb)](menu_base_1[_0x1e808c(0xd7)])[_0x1e808c(0x146)]({'where':{'domain':{'id':_0xa73cc6['id']},'id':_0x5502b9}}),_0x1b7888=(await _0x5c4521['getRepository'](menu_base_1['Menu'])[_0x1e808c(0x134)](_0x1e808c(0x10e)+_0x5502b9+_0x1e808c(0xd8)+_0x5502b9+'\x27'))[0x0][_0x1e808c(0x11d)]+0xa,_0x224e50=new menu_base_1[(_0x1e808c(0xd7))]();_0x224e50['name']=_0x2f83fd,_0x224e50['menuType']=_0x1e808c(0x11b),_0x224e50['category']=_0x1e808c(0xf2),_0x224e50[_0x1e808c(0x11d)]=_0x1b7888,_0x224e50[_0x1e808c(0xe7)]=!0x1,_0x224e50['routing']=_0x2f83fd,_0x224e50['template']=_0x24418f,_0x224e50[_0x1e808c(0x121)]=_0x1e808c(0x142),_0x224e50[_0x1e808c(0x12d)]=_0x497c25,await _0x5c4521[_0x1e808c(0xeb)](menu_base_1['Menu'])[_0x1e808c(0x148)](Object[_0x1e808c(0xfa)](Object[_0x1e808c(0xfa)]({},_0x224e50),{'domain':_0xa73cc6,'creator':_0x337d5e,'updater':_0x337d5e}));}['enc'](_0x19b1b5){const _0x398e8d=a0_0x399db8;let _0x290517=JSON[_0x398e8d(0xd6)](_0x19b1b5)[_0x398e8d(0xf9)](/(.{100})/)[_0x398e8d(0x135)](_0x2002f6=>_0x2002f6),_0x4a1870=[_0x398e8d(0x10f),_0x398e8d(0xe3),_0x398e8d(0xdc),_0x398e8d(0xf4),'aes-256-cfb1',_0x398e8d(0x127),_0x398e8d(0xe8),_0x398e8d(0xde)],_0x359a4e=crypto_1[_0x398e8d(0xe5)]['randomBytes'](0x20)[_0x398e8d(0x10a)](_0x398e8d(0xf6)),_0x3301ed=Buffer['from'](_0x359a4e,_0x398e8d(0xf6)),_0x4ec8c8=_0x359a4e[_0x398e8d(0x131)](0x0,0x10),_0x3385ab=['',_0x4ec8c8,_0x4ec8c8,_0x4ec8c8,_0x4ec8c8,_0x4ec8c8,_0x4ec8c8,_0x4ec8c8],_0x1a8256=0x0,_0x183f58=[];_0x183f58['push'](_0x359a4e);for(var _0x235c00=0x0;_0x235c00<_0x290517[_0x398e8d(0x143)];_0x235c00++,_0x1a8256++){_0x1a8256==_0x4a1870[_0x398e8d(0x143)]&&(_0x1a8256=0x0);let _0x36aa76=crypto_1[_0x398e8d(0xe5)]['createCipheriv'](_0x4a1870[_0x1a8256],_0x3301ed,_0x3385ab[_0x1a8256]),_0x34d981=_0x36aa76[_0x398e8d(0x140)](_0x290517[_0x235c00],_0x398e8d(0x132),_0x398e8d(0xf6));_0x34d981+=_0x36aa76['final']('hex'),_0x183f58[_0x398e8d(0x141)](_0x34d981);}return _0x183f58['join']('h1z0q9i9x7q6');}};tslib_1[a0_0x399db8(0xf1)]([(0x0,type_graphql_1[a0_0x399db8(0x112)])('@transaction'),(0x0,type_graphql_1[a0_0x399db8(0xfc)])(_0x248fb4=>Boolean,{'description':a0_0x399db8(0x116)}),tslib_1[a0_0x399db8(0x12a)](0x0,(0x0,type_graphql_1[a0_0x399db8(0xf5)])('id')),tslib_1[a0_0x399db8(0x12a)](0x1,(0x0,type_graphql_1[a0_0x399db8(0xf5)])(a0_0x399db8(0xda))),tslib_1[a0_0x399db8(0x12a)](0x2,(0x0,type_graphql_1[a0_0x399db8(0xdf)])()),tslib_1[a0_0x399db8(0xe9)](a0_0x399db8(0x109),Function),tslib_1[a0_0x399db8(0xe9)](a0_0x399db8(0xe2),[String,String,Object]),tslib_1[a0_0x399db8(0xe9)](a0_0x399db8(0x12e),Promise)],OperatoToolCreateMenu['prototype'],a0_0x399db8(0x10d),null),OperatoToolCreateMenu=tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x399db8(0x108)])()],OperatoToolCreateMenu),exports[a0_0x399db8(0x11c)]=OperatoToolCreateMenu;const modelTemplate=a0_0x399db8(0x124);
|
|
1
|
+
'use strict';const a0_0x58ef62=a0_0x2c27;(function(_0x54a615,_0x479f3d){const _0x84569b=a0_0x2c27,_0x1df0db=_0x54a615();while(!![]){try{const _0x460593=-parseInt(_0x84569b(0x11e))/0x1+parseInt(_0x84569b(0x10a))/0x2+-parseInt(_0x84569b(0xfa))/0x3+-parseInt(_0x84569b(0xf8))/0x4+parseInt(_0x84569b(0x146))/0x5*(parseInt(_0x84569b(0x13d))/0x6)+-parseInt(_0x84569b(0xea))/0x7*(-parseInt(_0x84569b(0x134))/0x8)+parseInt(_0x84569b(0x111))/0x9;if(_0x460593===_0x479f3d)break;else _0x1df0db['push'](_0x1df0db['shift']());}catch(_0x1b8fa0){_0x1df0db['push'](_0x1df0db['shift']());}}}(a0_0x3001,0x7dd48));Object[a0_0x58ef62(0xe8)](exports,a0_0x58ef62(0x123),{'value':!0x0}),exports[a0_0x58ef62(0xf4)]=void 0x0;const tslib_1=require(a0_0x58ef62(0x104)),type_graphql_1=require(a0_0x58ef62(0x126)),resource_base_1=require(a0_0x58ef62(0x10c)),menu_base_1=require(a0_0x58ef62(0x130)),tool_permission_1=require('./../tool-secret/tool-permission'),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x58ef62(0x124)),{plural:plural}=require('pluralize'),crypto_1=tslib_1[a0_0x58ef62(0xff)](require(a0_0x58ef62(0xef)));function a0_0x2c27(_0x1cc097,_0x323299){const _0x3001a5=a0_0x3001();return a0_0x2c27=function(_0x2c27ef,_0x560ce0){_0x2c27ef=_0x2c27ef-0xd3;let _0x1a99c4=_0x3001a5[_0x2c27ef];return _0x1a99c4;},a0_0x2c27(_0x1cc097,_0x323299);}let OperatoToolCreateMenu=class{async[a0_0x58ef62(0xe1)](_0x227826,_0x297cd4,_0x12af65){const _0xe26d9=a0_0x58ef62,{domain:_0x57f825,user:_0x374276,tx:_0x3cbc9a}=_0x12af65[_0xe26d9(0x136)];await(0x0,tool_permission_1['checkStudioTemplateIsOverLimit'])('',_0x12af65);const _0x144ae6=await _0x3cbc9a['getRepository'](resource_base_1[_0xe26d9(0xf2)])[_0xe26d9(0xf0)]({'where':{'domain':{'id':_0x57f825['id']},'id':_0x227826}}),_0x525bc4=await _0x3cbc9a[_0xe26d9(0xf6)](resource_base_1[_0xe26d9(0xdd)])['find']({'where':{'domain':{'id':_0x57f825['id']},'entity':{'id':_0x144ae6['id']}}});let {name:_0x5ecda9=''}=_0x144ae6||{},_0x478297=kebabCase(_0x5ecda9),_0x48fd62=modelTemplate['replace'](/{{pascalCase name}}/g,startCase(camelCase(_0x5ecda9))[_0xe26d9(0x145)](/ /g,''))[_0xe26d9(0x145)](/{{camelCase name}}/g,camelCase(_0x5ecda9))[_0xe26d9(0x145)](/{{snakeCase name}}/g,snakeCase(_0x5ecda9))['replace'](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x5ecda9)))[_0xe26d9(0x145)](/ /g,''))['replace'](/{{pluralCamelCase name}}/g,camelCase(plural(_0x5ecda9)))['replace'](/{{name}}/g,_0x5ecda9),_0x5acf83='';'JSON'==_0x144ae6[_0xe26d9(0xde)]?_0x5acf83=_0xe26d9(0x129):'COPY'==_0x144ae6[_0xe26d9(0xde)]&&(_0x5acf83='\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'),_0x48fd62=_0x48fd62[_0xe26d9(0x145)](/{{HistoryButton}}/g,_0x5acf83);let _0x16b187=this['createSortCols'](_0x525bc4);_0x48fd62=_0x48fd62[_0xe26d9(0x145)](/{{SortColumns}}/g,_0x16b187['join'](','));let _0x4f5024=this[_0xe26d9(0xda)](_0x525bc4);_0x48fd62=_0x48fd62['replace'](/{{SearchColumns}}/g,_0x4f5024['join'](','));let _0x14e943=this['createGridColumns'](_0x525bc4);return _0x48fd62=_0x48fd62['replace'](/{{GridColumns}}/g,_0x14e943[_0xe26d9(0xd4)](',')),_0x48fd62=this['enc'](_0x48fd62),await this[_0xe26d9(0x11c)](_0x3cbc9a,_0x57f825,_0x374276,_0x297cd4,_0x478297,_0x48fd62),!0x0;}['createGridColumns'](_0x331739){const _0x104a10=a0_0x58ef62;return _0x331739['filter'](_0x2a62cc=>'id'!=_0x2a62cc['name']&&_0x2a62cc[_0x104a10(0x114)]>0x0)['sort'](function(_0x53ae2d,_0x1a6744){const _0x403f3a=_0x104a10;return _0x53ae2d['gridRank']-_0x1a6744[_0x403f3a(0x114)];})[_0x104a10(0x11d)](_0x35f0f8=>{const _0x4a0a74=_0x104a10;let {gridEditor:_0x52c5b3=_0x4a0a74(0x10d),name:_0x44a8e3,term:_0x20b4c4,gridWidth:_0x2feaf4=0x0,gridAlign:_0x3be4a5=_0x4a0a74(0x116),nullable:_0x16b640=!0x1}=_0x35f0f8;if(null==_0x52c5b3&&(_0x52c5b3='string'),null==_0x3be4a5&&(_0x3be4a5=_0x4a0a74(0x116)),_0x4a0a74(0xeb)==_0x44a8e3||_0x4a0a74(0x12d)==_0x44a8e3)return _0x44a8e3=_0x4a0a74(0xeb)==_0x44a8e3?'updater':_0x4a0a74(0x132),_0x4a0a74(0x112)+_0x44a8e3+'\x22,\x22header\x22:\x20\x22'+_0x44a8e3+'\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}';if(_0x4a0a74(0x102)==_0x44a8e3||_0x4a0a74(0xd8)==_0x44a8e3)return _0x4a0a74(0x13c)+('updated_at'==_0x44a8e3?_0x4a0a74(0x107):_0x4a0a74(0x135))+_0x4a0a74(0x13f)+_0x44a8e3+'\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}';let _0xcff515=_0x4a0a74(0xe3)!=_0x52c5b3&&'hidden'!=_0x52c5b3,_0x1f4c38=_0x4a0a74(0x13b)==_0x52c5b3;0x1!=_0x1f4c38&&0x0!=_0xcff515||(_0x52c5b3='string');let _0x331eab=_0x4a0a74(0xec)+_0x52c5b3+_0x4a0a74(0x12c)+camelCase(_0x44a8e3)+_0x4a0a74(0x13f)+_0x20b4c4+_0x4a0a74(0x119)+_0x1f4c38+_0x4a0a74(0xf3)+_0xcff515+_0x4a0a74(0xdf)+!_0x16b640+',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22'+_0x3be4a5+_0x4a0a74(0x13a)+_0x2feaf4+'\x20,\x22exportable\x22:\x20true';return'code'==_0x35f0f8['refType']&&(_0x331eab+=_0x4a0a74(0x117)+_0x35f0f8['refName']+'\x22}'),_0x4a0a74(0x138)==_0x35f0f8['refType']&&(_0x331eab+=_0x4a0a74(0x110)+_0x35f0f8[_0x4a0a74(0xe7)]+'\x22}'),_0x4a0a74(0x12e)==_0x35f0f8[_0x4a0a74(0x10b)]&&(_0x331eab+=_0x4a0a74(0x121)+camelCase(plural(_0x35f0f8[_0x4a0a74(0xe7)]))+_0x4a0a74(0xe4)),_0x331eab+='}',_0x331eab;});}[a0_0x58ef62(0xda)](_0x411d2b){const _0x22b5fa=a0_0x58ef62;return _0x411d2b[_0x22b5fa(0xdb)](_0xba4bee=>_0xba4bee[_0x22b5fa(0x131)]>0x0)[_0x22b5fa(0x139)](function(_0x35744b,_0x29bb03){const _0x11d8f9=_0x22b5fa;return _0x35744b[_0x11d8f9(0x131)]-_0x29bb03[_0x11d8f9(0x131)];})[_0x22b5fa(0x11d)](_0x5b07cc=>{const _0x2db4d9=_0x22b5fa;let _0x5b0031=_0x5b07cc[_0x2db4d9(0x11f)];return _0x2db4d9(0xdb)==_0x5b0031?'\x22'+camelCase(_0x5b07cc['name'])+'\x22':(_0x5b0031||(_0x5b0031='eq'),_0x2db4d9(0x120)+camelCase(_0x5b07cc[_0x2db4d9(0x109)])+_0x2db4d9(0xe0)+_0x5b0031+'\x22}');});}[a0_0x58ef62(0xe5)](_0x4ef232){const _0x2cc0da=a0_0x58ef62;return _0x4ef232[_0x2cc0da(0xdb)](_0x1374e0=>_0x1374e0[_0x2cc0da(0x142)]>0x0)[_0x2cc0da(0x139)](function(_0x45f6a,_0x1c44a2){const _0x478ae4=_0x2cc0da;return _0x45f6a[_0x478ae4(0x142)]-_0x1c44a2['sortRank'];})['map'](_0x100b7d=>'{\x22name\x22:\x22'+camelCase(_0x100b7d[_0x2cc0da(0x109)])+_0x2cc0da(0x113)+_0x100b7d['reverseSort']+'}');}async[a0_0x58ef62(0x11c)](_0x481647,_0x170df9,_0x1070fc,_0x28d9ba,_0x23155b,_0x98340){const _0x5bc693=a0_0x58ef62;let _0x47404f=await _0x481647[_0x5bc693(0xf6)](menu_base_1[_0x5bc693(0xd6)])['findOne']({'where':{'domain':{'id':_0x170df9['id']},'id':_0x28d9ba}}),_0x17fb9b=(await _0x481647[_0x5bc693(0xf6)](menu_base_1[_0x5bc693(0xd6)])[_0x5bc693(0xe9)](_0x5bc693(0xd5)+_0x28d9ba+'\x27\x20or\x20id\x20=\x20\x27'+_0x28d9ba+'\x27'))[0x0]['rank']+0xa,_0x3445c4=new menu_base_1[(_0x5bc693(0xd6))]();_0x3445c4[_0x5bc693(0x109)]=_0x23155b,_0x3445c4[_0x5bc693(0x118)]=_0x5bc693(0xe6),_0x3445c4[_0x5bc693(0x101)]='meta-grist-page',_0x3445c4['rank']=_0x17fb9b,_0x3445c4[_0x5bc693(0xf7)]=!0x1,_0x3445c4[_0x5bc693(0x127)]=_0x23155b,_0x3445c4[_0x5bc693(0x128)]=_0x98340,_0x3445c4[_0x5bc693(0xd9)]=_0x5bc693(0xf1),_0x3445c4[_0x5bc693(0x105)]=_0x47404f,await _0x481647[_0x5bc693(0xf6)](menu_base_1[_0x5bc693(0xd6)])['save'](Object[_0x5bc693(0x133)](Object[_0x5bc693(0x133)]({},_0x3445c4),{'domain':_0x170df9,'creator':_0x1070fc,'updater':_0x1070fc}));}[a0_0x58ef62(0x13e)](_0x285ec4){const _0x89906d=a0_0x58ef62;let _0x19f7b4=JSON[_0x89906d(0x140)](_0x285ec4)[_0x89906d(0x10e)](/(.{100})/)[_0x89906d(0xdb)](_0x58c983=>_0x58c983),_0x496a5e=['aes-256-ecb',_0x89906d(0xdc),_0x89906d(0x122),'aes-256-cfb8','aes-256-cfb1',_0x89906d(0x125),_0x89906d(0x11b),_0x89906d(0x108)],_0x5a0f48=crypto_1[_0x89906d(0xf9)][_0x89906d(0x11a)](0x20)[_0x89906d(0x141)](_0x89906d(0x12a)),_0x315407=Buffer[_0x89906d(0xfb)](_0x5a0f48,'hex'),_0xa0e8b4=_0x5a0f48[_0x89906d(0xfe)](0x0,0x10),_0x252c11=['',_0xa0e8b4,_0xa0e8b4,_0xa0e8b4,_0xa0e8b4,_0xa0e8b4,_0xa0e8b4,_0xa0e8b4],_0x2ab097=0x0,_0x3f7b52=[];_0x3f7b52['push'](_0x5a0f48);for(var _0x3fafa6=0x0;_0x3fafa6<_0x19f7b4[_0x89906d(0x137)];_0x3fafa6++,_0x2ab097++){_0x2ab097==_0x496a5e[_0x89906d(0x137)]&&(_0x2ab097=0x0);let _0x594737=crypto_1['default'][_0x89906d(0xd7)](_0x496a5e[_0x2ab097],_0x315407,_0x252c11[_0x2ab097]),_0x15d672=_0x594737[_0x89906d(0x106)](_0x19f7b4[_0x3fafa6],_0x89906d(0xe2),_0x89906d(0x12a));_0x15d672+=_0x594737['final'](_0x89906d(0x12a)),_0x3f7b52[_0x89906d(0x100)](_0x15d672);}return _0x3f7b52['join']('h1z0q9i9x7q6');}};function a0_0x3001(){const _0x13f5b8=['Directive','design:type','crypto','findOne','@things-factory/meta-ui/client/pages/meta-grist-page','Entity','\x20,\x22editable\x22:\x20','OperatoToolCreateMenu','__metadata','getRepository','hiddenFlag','2527864bbfAAB','default','2504256wCigat','from','Ctx','Mutation','substring','__importDefault','push','category','updated_at','parent_menu_id','tslib','parent','update','updatedAt','aes256','name','758158glguhS','refType','@things-factory/resource-base','string','split','Arg',',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22','1388340qcaASx','{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22','\x22,\x22desc\x22:','gridRank','design:returntype','left',',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22','menuType','\x22,\x22hidden\x22:','randomBytes','aes-256-ctr','createMenuData','map','348861NNYRTS','searchOper','{\x22name\x22:\x20\x22',',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22','aes-256-cfb','__esModule','lodash','aes-256-ofb','type-graphql','routing','template','\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','Resolver','\x22,\x22name\x22:\x20\x22','creator_id','entity','design:paramtypes','@things-factory/menu-base','searchRank','creator','assign','73192FfwvIY','createdAt','state','length','scenario','sort','\x22,\x22width\x22:','hidden','{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22','4912182OGzEBX','enc','\x22,\x22header\x22:\x20\x22','stringify','toString','sortRank','\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','__decorate','replace','5NZoScK','__param','join','select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27','Menu','createCipheriv','created_at','resourceUrl','createSearchCols','filter','aes-256-cbc','EntityColumn','dataProp',',\x22mandatory\x22:\x20','\x22,\x22operator\x22:\x20\x22','toolCreateMenu','utf8','readonly','\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}','createSortCols','SCREEN','refName','defineProperty','query','749TtSWUb','updater_id','{\x22type\x22:\x20\x22'];a0_0x3001=function(){return _0x13f5b8;};return a0_0x3001();}tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x58ef62(0xed)])('@transaction'),(0x0,type_graphql_1[a0_0x58ef62(0xfd)])(_0x8d23db=>Boolean,{'description':'Operato\x20Tool\x20Create\x20Menu'}),tslib_1[a0_0x58ef62(0xd3)](0x0,(0x0,type_graphql_1[a0_0x58ef62(0x10f)])('id')),tslib_1['__param'](0x1,(0x0,type_graphql_1[a0_0x58ef62(0x10f)])(a0_0x58ef62(0x103))),tslib_1[a0_0x58ef62(0xd3)](0x2,(0x0,type_graphql_1[a0_0x58ef62(0xfc)])()),tslib_1['__metadata'](a0_0x58ef62(0xee),Function),tslib_1[a0_0x58ef62(0xf5)](a0_0x58ef62(0x12f),[String,String,Object]),tslib_1[a0_0x58ef62(0xf5)](a0_0x58ef62(0x115),Promise)],OperatoToolCreateMenu['prototype'],a0_0x58ef62(0xe1),null),OperatoToolCreateMenu=tslib_1[a0_0x58ef62(0x144)]([(0x0,type_graphql_1[a0_0x58ef62(0x12b)])()],OperatoToolCreateMenu),exports['OperatoToolCreateMenu']=OperatoToolCreateMenu;const modelTemplate=a0_0x58ef62(0x143);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function a0_0x9b62(){const _0x3d0d66=['length','double','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','createServiceFiles','/server/service/','4oSxiFL','1259106mWREtf','Int','updater','184012mJMIDY','Ctx','pluralPascalCaseName','-history\x27','/server','push','390717yInNJf','.ts','@things-factory/resource-base','Entity','decimal','datetime','createHistoryServiceFiles','mkdirSync','snakeCaseName','createNoHistoryServiceFiels','-history-type.ts','includes','Resolvers,\x20subscribers\x20as\x20','rank','timestamp\x20without\x20time\x20zone','long','198666xzanPG','EntitySubscribers,','\x0a\x20\x20','10qTszMQ','findOne','OperatoToolCreateService','EntityColumn','@Field(','getColTxtType','getRepository','createServicePath','Operato\x20Tool\x20Create\x20Service','nullable','-history.ts','created_at','__metadata','lodash','__param','replaceNamesMap','existsSync','Resolvers,','join','existsPath','creator_id','\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','design:paramtypes','@things-factory/shell','columnToEntityColumn',',length:','createHistoryEntityText','packages','\x20})','Float','createTypeText','type-graphql','Date','\x27,\x20nullable:\x20','writeFile','dataProp','\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','state','getFieldType','-mutation.ts','-type.ts','readFileSync','getProjectRootPath','-history-query.ts','domain','map','replace','export\x20*\x20from\x20\x27./','env','{{camelCase\x20name}}.','integer','\x20{\x20nullable:\x20','\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','\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','text','EntitySubscribers\x20}\x20from\x20\x27./','colType','pascalCaseName','/*\x20ENTITIES\x20*/\x0a\x09...','\x0aimport\x20{\x20ObjectType,\x20Field,\x20InputType,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@InputType()\x0aexport\x20class\x20New{{pascalCase\x20name}}\x20{\x0a{{newTypeColumns}}\x0a}\x0a\x0a@InputType()\x0aexport\x20class\x20{{pascalCase\x20name}}Patch\x20{\x0a\x20\x20@Field(type\x20=>\x20ID,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20id?:\x20string\x0a\x0a{{patchTypeColumns}}\x0a\x0a\x20\x20@Field()\x0a\x20\x20cuFlag:\x20string\x0a}\x0a\x0a@ObjectType()\x0aexport\x20class\x20{{pascalCase\x20name}}List\x20{\x0a\x20\x20@Field(type\x20=>\x20[{{pascalCase\x20name}}])\x0a\x20\x20items:\x20{{pascalCase\x20name}}[]\x0a\x0a\x20\x20@Field(type\x20=>\x20Int)\x0a\x20\x20total:\x20number\x0a}\x0a','\x0aimport\x20{\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','split','toolCreateService','uniqRank','5752itVUbf','__decorate','@Column({name:\x27','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','bigint','double\x20precision','Resolvers\x20}\x20from\x20\x27./','-query.ts','tableName','\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','number','COPY','Entities,\x20resolvers\x20as\x20','sort','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','name','prototype','pluralCamelCaseName','design:returntype','Query','...','createDir','/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...','JSON','domain_id','PWD','writeFileSync','3664030ssjhnp','updated_at','updater_id','utf8','Arg','type\x20=>','\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201','indexOf','/service','index.ts','2653OHDoNC','pluralize','1215009ahObUR','float','createEntityText','Entities,'];a0_0x9b62=function(){return _0x3d0d66;};return a0_0x9b62();}const a0_0x2aa544=a0_0x1e0e;function a0_0x1e0e(_0x153649,_0x2c9c36){const _0x9b62a6=a0_0x9b62();return a0_0x1e0e=function(_0x1e0e8d,_0x24c47c){_0x1e0e8d=_0x1e0e8d-0x1ef;let _0x1e15f1=_0x9b62a6[_0x1e0e8d];return _0x1e15f1;},a0_0x1e0e(_0x153649,_0x2c9c36);}(function(_0x2db941,_0xf67545){const _0x30b0c9=a0_0x1e0e,_0x5da6b7=_0x2db941();while(!![]){try{const _0x2a652d=parseInt(_0x30b0c9(0x26c))/0x1+parseInt(_0x30b0c9(0x256))/0x2+parseInt(_0x30b0c9(0x25c))/0x3*(parseInt(_0x30b0c9(0x252))/0x4)+parseInt(_0x30b0c9(0x26f))/0x5*(-parseInt(_0x30b0c9(0x253))/0x6)+parseInt(_0x30b0c9(0x247))/0x7*(-parseInt(_0x30b0c9(0x222))/0x8)+parseInt(_0x30b0c9(0x249))/0x9+parseInt(_0x30b0c9(0x23d))/0xa;if(_0x2a652d===_0xf67545)break;else _0x5da6b7['push'](_0x5da6b7['shift']());}catch(_0x383c3f){_0x5da6b7['push'](_0x5da6b7['shift']());}}}(a0_0x9b62,0x382e0));Object['defineProperty'](exports,'__esModule',{'value':!0x0}),exports[a0_0x2aa544(0x271)]=void 0x0;const tslib_1=require('tslib'),type_graphql_1=require(a0_0x2aa544(0x201)),shell_1=require(a0_0x2aa544(0x1f9)),resource_base_1=require(a0_0x2aa544(0x25e)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x2aa544(0x1ef)),{plural:plural}=require(a0_0x2aa544(0x248)),fs=require('fs');let OperatoToolCreateService=class{async[a0_0x2aa544(0x220)](_0x2fb3e1,_0xf5f2b7){const _0x16a950=a0_0x2aa544,{domain:_0x58c050}=_0xf5f2b7[_0x16a950(0x207)],_0xc61881=await(0x0,shell_1['getRepository'])(resource_base_1[_0x16a950(0x25f)])[_0x16a950(0x270)]({'where':{'id':_0x2fb3e1}}),_0x4faee9=await(0x0,shell_1[_0x16a950(0x275)])(resource_base_1[_0x16a950(0x272)])['find']({'where':{'domain':{'id':_0x58c050['id']},'entity':{'id':_0xc61881['id']}}});let {name:_0x3c84f5='',bundle:_0x183bbb=''}=_0xc61881||{},_0x36da92=this[_0x16a950(0x20c)](),_0x3b330f=kebabCase(_0x3c84f5);return await this[_0x16a950(0x276)](_0x36da92,_0x183bbb,_0x3b330f),await this['createServiceFiles'](_0x36da92,_0x183bbb,_0x3c84f5,_0x3b330f,_0xc61881,_0x4faee9),!0x0;}async[a0_0x2aa544(0x250)](_0x1e8f02,_0x4e4625,_0x40b243,_0x13200b,_0x383613,_0x133602){const _0x14c19f=a0_0x2aa544;let _0x57a0eb={'name':_0x13200b,'tableName':_0x383613[_0x14c19f(0x22a)],'pascalCaseName':startCase(camelCase(_0x40b243))[_0x14c19f(0x210)](/ /g,''),'camelCaseName':camelCase(_0x40b243),'snakeCaseName':snakeCase(_0x40b243),'pluralPascalCaseName':startCase(camelCase(plural(_0x40b243)))[_0x14c19f(0x210)](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x40b243))},_0x4583a8=_0x1e8f02+'/packages/'+_0x4e4625+_0x14c19f(0x251);[_0x14c19f(0x239),_0x14c19f(0x22d)]['includes'](_0x383613['dataProp'])?await this[_0x14c19f(0x262)](_0x4583a8,_0x13200b,_0x383613,_0x133602,_0x57a0eb):await this[_0x14c19f(0x265)](_0x4583a8,_0x13200b,_0x383613,_0x133602,_0x57a0eb);}async[a0_0x2aa544(0x262)](_0x4459a3,_0x105fd0,_0x599cff,_0x3b7db3,_0x59dd00){const _0x153714=a0_0x2aa544;await this[_0x153714(0x204)](_0x4459a3+(_0x105fd0+'/index.ts'),serviceHistoryIndex,_0x59dd00);let _0x2e6220=this[_0x153714(0x24b)](_0x599cff,_0x3b7db3);await this['writeFile'](_0x4459a3+(_0x105fd0+'/'+_0x105fd0+_0x153714(0x25d)),_0x2e6220,_0x59dd00),await this[_0x153714(0x204)](_0x4459a3+(_0x105fd0+'/'+_0x105fd0+_0x153714(0x229)),serviceQuery,_0x59dd00),await this[_0x153714(0x204)](_0x4459a3+(_0x105fd0+'/'+_0x105fd0+_0x153714(0x209)),serviceMutation,_0x59dd00);let _0x1ef4b4=this['createTypeText'](_0x3b7db3);await this[_0x153714(0x204)](_0x4459a3+(_0x105fd0+'/'+_0x105fd0+_0x153714(0x20a)),_0x1ef4b4,_0x59dd00);let _0x4961ae=this[_0x153714(0x1fc)](_0x599cff,_0x3b7db3);await this[_0x153714(0x204)](_0x4459a3+(_0x105fd0+'/'+_0x105fd0+_0x153714(0x279)),_0x4961ae,_0x59dd00);let _0x3f620b='';_0x153714(0x239)==_0x599cff[_0x153714(0x205)]?(_0x3f620b=_0x153714(0x217),await this[_0x153714(0x204)](_0x4459a3+(_0x105fd0+'/event-subscriber.ts'),serviceEntitySubscriber,_0x59dd00)):_0x3f620b='';let _0x577b66=serviceEntitySubscriber[_0x153714(0x210)](/{{entityToJson}}/g,_0x3f620b);await this[_0x153714(0x204)](_0x4459a3+(_0x105fd0+'/event-subscriber.ts'),_0x577b66,_0x59dd00),await this[_0x153714(0x204)](_0x4459a3+(_0x105fd0+'/'+_0x105fd0+_0x153714(0x20d)),serviceHistoryQuery,_0x59dd00),await this[_0x153714(0x204)](_0x4459a3+(_0x105fd0+'/'+_0x105fd0+_0x153714(0x266)),sereviceHistoryType,_0x59dd00);let _0x472cbc=_0x4459a3+_0x153714(0x246);0x0==await this[_0x153714(0x1f5)](_0x472cbc)&&await this[_0x153714(0x204)](_0x472cbc,allIndex,_0x59dd00);let _0xc8bce6=await fs['readFileSync'](_0x472cbc,_0x153714(0x240));_0xc8bce6['indexOf']('export\x20*\x20from\x20\x27./'+_0x59dd00['name']+'/'+_0x59dd00[_0x153714(0x231)]+_0x153714(0x259))<0x0&&(_0xc8bce6=_0xc8bce6[_0x153714(0x210)](/\/\* EXPORT ENTITY TYPES \*\//,_0x153714(0x230)+_0x59dd00['name']+'/'+_0x59dd00[_0x153714(0x231)]+_0x153714(0x259))),_0xc8bce6[_0x153714(0x244)](_0x153714(0x211)+_0x59dd00[_0x153714(0x231)]+'/'+_0x59dd00['name']+'\x27')<0x0&&(_0xc8bce6=_0xc8bce6[_0x153714(0x210)](/\/\* EXPORT ENTITY TYPES \*\//,_0x153714(0x230)+_0x59dd00['name']+'/'+_0x59dd00[_0x153714(0x231)]+'\x27')),_0xc8bce6[_0x153714(0x244)]('import\x20{\x20entities\x20as\x20'+_0x59dd00[_0x153714(0x21b)]+_0x153714(0x22e)+_0x59dd00['pascalCaseName']+'Resolvers,\x20subscribers\x20as\x20'+_0x59dd00['pascalCaseName']+_0x153714(0x219)+_0x59dd00['name']+'\x27')<0x0&&(_0xc8bce6=_0xc8bce6[_0x153714(0x210)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x153714(0x24f)+_0x59dd00[_0x153714(0x21b)]+'Entities,\x20resolvers\x20as\x20'+_0x59dd00[_0x153714(0x21b)]+_0x153714(0x268)+_0x59dd00[_0x153714(0x21b)]+_0x153714(0x219)+_0x59dd00[_0x153714(0x231)]+'\x27')),_0xc8bce6[_0x153714(0x244)](_0x153714(0x236)+_0x59dd00[_0x153714(0x21b)]+_0x153714(0x24c))<0x0&&(_0xc8bce6=_0xc8bce6[_0x153714(0x210)](/\/\* ENTITIES \*\//,_0x153714(0x21c)+_0x59dd00[_0x153714(0x21b)]+'Entities,')),_0xc8bce6['indexOf'](_0x153714(0x236)+_0x59dd00[_0x153714(0x21b)]+_0x153714(0x1f3))<0x0&&(_0xc8bce6=_0xc8bce6[_0x153714(0x210)](/\/\* RESOLVER CLASSES \*\//,'/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...'+_0x59dd00['pascalCaseName']+'Resolvers,')),_0xc8bce6[_0x153714(0x244)](_0x153714(0x236)+_0x59dd00['pascalCaseName']+_0x153714(0x26d))<0x0&&(_0xc8bce6=_0xc8bce6[_0x153714(0x210)](/\/\* SUBSCRIBERS \*\//,_0x153714(0x238)+_0x59dd00[_0x153714(0x21b)]+_0x153714(0x26d))),await this[_0x153714(0x204)](_0x472cbc,_0xc8bce6,_0x59dd00);}async[a0_0x2aa544(0x265)](_0x4ac0c4,_0x5f3eb4,_0x430e16,_0x2c5e9c,_0x22c66b){const _0x1ae4e2=a0_0x2aa544;await this['writeFile'](_0x4ac0c4+(_0x5f3eb4+'/index.ts'),serviceIndex,_0x22c66b),await this[_0x1ae4e2(0x204)](_0x4ac0c4+(_0x5f3eb4+'/'+_0x5f3eb4+_0x1ae4e2(0x229)),serviceQuery,_0x22c66b),await this[_0x1ae4e2(0x204)](_0x4ac0c4+(_0x5f3eb4+'/'+_0x5f3eb4+'-mutation.ts'),serviceMutation,_0x22c66b);let _0x211ea7=this[_0x1ae4e2(0x24b)](_0x430e16,_0x2c5e9c);await this[_0x1ae4e2(0x204)](_0x4ac0c4+(_0x5f3eb4+'/'+_0x5f3eb4+'.ts'),_0x211ea7,_0x22c66b);let _0x3fc01e=this[_0x1ae4e2(0x200)](_0x2c5e9c);await this[_0x1ae4e2(0x204)](_0x4ac0c4+(_0x5f3eb4+'/'+_0x5f3eb4+_0x1ae4e2(0x20a)),_0x3fc01e,_0x22c66b);let _0x4e9d21=_0x4ac0c4+_0x1ae4e2(0x246);0x0==await this['existsPath'](_0x4e9d21)&&await this['writeFile'](_0x4e9d21,allIndex,_0x22c66b);let _0x2b3820=await fs[_0x1ae4e2(0x20b)](_0x4e9d21,_0x1ae4e2(0x240));_0x2b3820[_0x1ae4e2(0x244)](_0x1ae4e2(0x211)+_0x22c66b[_0x1ae4e2(0x231)]+'/'+_0x22c66b[_0x1ae4e2(0x231)]+'\x27')<0x0&&(_0x2b3820=_0x2b3820[_0x1ae4e2(0x210)](/\/\* EXPORT ENTITY TYPES \*\//,_0x1ae4e2(0x230)+_0x22c66b[_0x1ae4e2(0x231)]+'/'+_0x22c66b[_0x1ae4e2(0x231)]+'\x27')),_0x2b3820[_0x1ae4e2(0x244)]('import\x20{\x20entities\x20as\x20'+_0x22c66b['pascalCaseName']+_0x1ae4e2(0x22e)+_0x22c66b[_0x1ae4e2(0x21b)]+'Resolvers\x20}\x20from\x20\x27./'+_0x22c66b[_0x1ae4e2(0x231)]+'\x27')<0x0&&(_0x2b3820=_0x2b3820[_0x1ae4e2(0x210)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x1ae4e2(0x24f)+_0x22c66b[_0x1ae4e2(0x21b)]+_0x1ae4e2(0x22e)+_0x22c66b[_0x1ae4e2(0x21b)]+_0x1ae4e2(0x228)+_0x22c66b[_0x1ae4e2(0x231)]+'\x27')),_0x2b3820[_0x1ae4e2(0x244)]('...'+_0x22c66b[_0x1ae4e2(0x21b)]+_0x1ae4e2(0x24c))<0x0&&(_0x2b3820=_0x2b3820['replace'](/\/\* ENTITIES \*\//,_0x1ae4e2(0x21c)+_0x22c66b[_0x1ae4e2(0x21b)]+_0x1ae4e2(0x24c))),_0x2b3820[_0x1ae4e2(0x244)](_0x1ae4e2(0x236)+_0x22c66b[_0x1ae4e2(0x21b)]+_0x1ae4e2(0x1f3))<0x0&&(_0x2b3820=_0x2b3820[_0x1ae4e2(0x210)](/\/\* RESOLVER CLASSES \*\//,_0x1ae4e2(0x225)+_0x22c66b[_0x1ae4e2(0x21b)]+_0x1ae4e2(0x1f3))),await this[_0x1ae4e2(0x204)](_0x4e9d21,_0x2b3820,_0x22c66b);}[a0_0x2aa544(0x200)](_0x522331){const _0x4db1da=a0_0x2aa544;let _0x51155a=sereviceType,_0x13b96f=_0x522331['map'](_0x23a485=>{const _0x4f649f=a0_0x1e0e;if('id'==_0x23a485[_0x4f649f(0x231)])return'';if('domain_id'==_0x23a485[_0x4f649f(0x231)])return'';if(_0x4f649f(0x27a)==_0x23a485[_0x4f649f(0x231)])return'';if(_0x4f649f(0x23e)==_0x23a485[_0x4f649f(0x231)])return'';if('creator_id'==_0x23a485[_0x4f649f(0x231)])return'';if('updater_id'==_0x23a485[_0x4f649f(0x231)])return'';let _0x273de1=this[_0x4f649f(0x208)](_0x23a485),_0xcd948=this['getColTxtType'](_0x23a485),_0x111c28=camelCase(_0x23a485[_0x4f649f(0x231)]);return'\x20\x20'+(_0x4f649f(0x273)+(0x0==_0x273de1[_0x4f649f(0x24d)]?'':_0x4f649f(0x242)+_0x273de1+',')+_0x4f649f(0x215)+_0x23a485[_0x4f649f(0x278)]+_0x4f649f(0x1fe))+_0x4f649f(0x26e)+(''+_0x111c28+(_0x23a485[_0x4f649f(0x278)]?'?':'')+':\x20'+_0xcd948)+'\x0a';});_0x51155a=_0x51155a[_0x4db1da(0x210)](/{{newTypeColumns}}/g,_0x13b96f[_0x4db1da(0x1f4)]('\x0a'));let _0x31fa5b=_0x522331['map'](_0x272d81=>{const _0x4aa2f5=_0x4db1da;if('id'==_0x272d81[_0x4aa2f5(0x231)])return'';if(_0x4aa2f5(0x23a)==_0x272d81[_0x4aa2f5(0x231)])return'';if(_0x4aa2f5(0x27a)==_0x272d81[_0x4aa2f5(0x231)])return'';if(_0x4aa2f5(0x23e)==_0x272d81[_0x4aa2f5(0x231)])return'';if(_0x4aa2f5(0x1f6)==_0x272d81[_0x4aa2f5(0x231)])return'';if(_0x4aa2f5(0x23f)==_0x272d81[_0x4aa2f5(0x231)])return'';let _0x2a3f17=this[_0x4aa2f5(0x208)](_0x272d81),_0x4b4304=this[_0x4aa2f5(0x274)](_0x272d81);_0x272d81['nullable']=!0x0;let _0x55e64f=camelCase(_0x272d81[_0x4aa2f5(0x231)]);return'\x20\x20'+(_0x4aa2f5(0x273)+(0x0==_0x2a3f17[_0x4aa2f5(0x24d)]?'':_0x4aa2f5(0x242)+_0x2a3f17+',')+'\x20{\x20nullable:\x20'+_0x272d81[_0x4aa2f5(0x278)]+_0x4aa2f5(0x1fe))+_0x4aa2f5(0x26e)+(''+_0x55e64f+(_0x272d81[_0x4aa2f5(0x278)]?'?':'')+':\x20'+_0x4b4304)+'\x0a';});return _0x51155a=_0x51155a['replace'](/{{patchTypeColumns}}/g,_0x31fa5b[_0x4db1da(0x1f4)]('\x0a')),_0x51155a;}[a0_0x2aa544(0x24b)](_0x43f95a,_0x3cabc4){const _0x22960d=a0_0x2aa544;let _0xfd7dbb=serviceEntity,_0x260572=_0x3cabc4[_0x22960d(0x22f)](function(_0x344164,_0x2f946c){const _0x198758=_0x22960d;return _0x344164[_0x198758(0x269)]-_0x2f946c[_0x198758(0x269)];})['map'](_0x410093=>this[_0x22960d(0x1fa)](_0x410093));[_0x22960d(0x22d),_0x22960d(0x239)][_0x22960d(0x267)](_0x43f95a[_0x22960d(0x205)])&&_0x260572[_0x22960d(0x25b)](_0x22960d(0x243)),_0xfd7dbb=_0xfd7dbb['replace'](/{{entityColumns}}/g,_0x260572[_0x22960d(0x1f4)]('\x0a'));let _0x4cc39d='',_0x31a01c=_0x3cabc4['filter'](_0x3f7793=>_0x3f7793[_0x22960d(0x221)]&&_0x3f7793[_0x22960d(0x221)]>0x0)[_0x22960d(0x22f)](function(_0x240870,_0x1b4db9){const _0x18bbea=_0x22960d;return _0x240870[_0x18bbea(0x221)]-_0x1b4db9['uniqRank'];});if(_0x31a01c[_0x22960d(0x24d)]>0x0){_0x4cc39d='@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})';let _0x162d88=_0x31a01c[_0x22960d(0x20f)](_0x45b49b=>{const _0x5b1519=_0x22960d;let _0x5c1fc7=_0x45b49b['name'];return _0x5b1519(0x23a)==_0x45b49b['name']&&(_0x5c1fc7=_0x5b1519(0x20e)),_0x5b1519(0x1f6)==_0x45b49b['name']&&(_0x5c1fc7='creator'),_0x5b1519(0x23f)==_0x45b49b[_0x5b1519(0x231)]&&(_0x5c1fc7=_0x5b1519(0x255)),_0x5b1519(0x213)+camelCase(_0x5c1fc7);});_0x4cc39d=_0x4cc39d[_0x22960d(0x210)](/{{indexColumns}}/g,_0x162d88[_0x22960d(0x1f4)](','));}return _0xfd7dbb=_0xfd7dbb['replace'](/{{indexAnn}}/g,_0x4cc39d),_0xfd7dbb;}[a0_0x2aa544(0x1fc)](_0x1e7c91,_0x28df40){const _0x2410ee=a0_0x2aa544;let _0x5d3b73=_0x2410ee(0x239)==_0x1e7c91['dataProp']?serviceEntityHistJson:serviceEntityHistCopy,_0x6931d5=_0x28df40[_0x2410ee(0x22f)](function(_0x2b6e6b,_0x110c87){const _0x4c1b62=_0x2410ee;return _0x2b6e6b['rank']-_0x110c87[_0x4c1b62(0x269)];})[_0x2410ee(0x20f)](_0x491022=>this[_0x2410ee(0x1fa)](_0x491022));return _0x5d3b73=_0x5d3b73[_0x2410ee(0x210)](/{{entityColumns}}/g,_0x6931d5[_0x2410ee(0x1f4)]('\x0a')),_0x5d3b73;}[a0_0x2aa544(0x1fa)](_0x4a1be6){const _0x5509c5=a0_0x2aa544;if('id'==_0x4a1be6['name'])return'';if(_0x5509c5(0x23a)==_0x4a1be6[_0x5509c5(0x231)])return'';if(_0x5509c5(0x27a)==_0x4a1be6[_0x5509c5(0x231)])return'';if(_0x5509c5(0x23e)==_0x4a1be6[_0x5509c5(0x231)])return'';if(_0x5509c5(0x1f6)==_0x4a1be6[_0x5509c5(0x231)])return'';if(_0x5509c5(0x23f)==_0x4a1be6[_0x5509c5(0x231)])return'';let _0xe1856f=_0x4a1be6[_0x5509c5(0x21a)];_0x5509c5(0x24e)==_0x4a1be6[_0x5509c5(0x21a)]&&(_0xe1856f=_0x5509c5(0x227)),_0x5509c5(0x26b)==_0x4a1be6[_0x5509c5(0x21a)]&&(_0xe1856f=_0x5509c5(0x226)),'string'==_0x4a1be6[_0x5509c5(0x21a)]&&(_0xe1856f='character\x20varying'),_0x5509c5(0x261)==_0x4a1be6[_0x5509c5(0x21a)]&&(_0xe1856f=_0x5509c5(0x26a));let _0x4b6d6d='';'string'==_0x4a1be6[_0x5509c5(0x21a)]&&(_0x4b6d6d=_0x4a1be6['colSize']);let _0x26060f=this[_0x5509c5(0x208)](_0x4a1be6),_0x22a8e2=this['getColTxtType'](_0x4a1be6),_0x167f41=camelCase(_0x4a1be6[_0x5509c5(0x231)]);return'\x20\x20'+(_0x5509c5(0x224)+_0x4a1be6[_0x5509c5(0x231)]+'\x27,\x20type:\x20\x27'+_0xe1856f+_0x5509c5(0x203)+_0x4a1be6[_0x5509c5(0x278)]+'\x20'+(0x0==_0x4b6d6d[_0x5509c5(0x24d)]?'':_0x5509c5(0x1fb)+_0x4b6d6d)+_0x5509c5(0x1fe))+_0x5509c5(0x26e)+(_0x5509c5(0x273)+(0x0==_0x26060f[_0x5509c5(0x24d)]?'':_0x5509c5(0x242)+_0x26060f+',')+_0x5509c5(0x215)+_0x4a1be6[_0x5509c5(0x278)]+_0x5509c5(0x1fe))+_0x5509c5(0x26e)+(''+_0x167f41+(_0x4a1be6['nullable']?'?':'')+':\x20'+_0x22a8e2)+'\x0a';}[a0_0x2aa544(0x208)](_0x400286){const _0x3eacd7=a0_0x2aa544;let _0x21d578='';return'double'==_0x400286[_0x3eacd7(0x21a)]&&(_0x21d578='Float'),_0x3eacd7(0x24a)==_0x400286[_0x3eacd7(0x21a)]&&(_0x21d578=_0x3eacd7(0x1ff)),_0x3eacd7(0x26b)==_0x400286[_0x3eacd7(0x21a)]&&(_0x21d578=_0x3eacd7(0x254)),'integer'==_0x400286[_0x3eacd7(0x21a)]&&(_0x21d578=_0x3eacd7(0x254)),_0x21d578;}['getColTxtType'](_0x1d047f){const _0x1c4d9a=a0_0x2aa544;let _0x19e36d=_0x1d047f[_0x1c4d9a(0x21a)];return _0x1c4d9a(0x260)==_0x1d047f[_0x1c4d9a(0x21a)]&&(_0x19e36d=_0x1c4d9a(0x22c)),_0x1c4d9a(0x24e)==_0x1d047f['colType']&&(_0x19e36d=_0x1c4d9a(0x22c)),_0x1c4d9a(0x24a)==_0x1d047f[_0x1c4d9a(0x21a)]&&(_0x19e36d=_0x1c4d9a(0x22c)),_0x1c4d9a(0x214)==_0x1d047f[_0x1c4d9a(0x21a)]&&(_0x19e36d=_0x1c4d9a(0x22c)),_0x1c4d9a(0x26b)==_0x1d047f['colType']&&(_0x19e36d=_0x1c4d9a(0x22c)),'datetime'==_0x1d047f[_0x1c4d9a(0x21a)]&&(_0x19e36d='Date'),'date'==_0x1d047f['colType']&&(_0x19e36d=_0x1c4d9a(0x202)),_0x1c4d9a(0x218)==_0x1d047f[_0x1c4d9a(0x21a)]&&(_0x19e36d='string'),_0x19e36d;}async[a0_0x2aa544(0x204)](_0x5236f6,_0x53389f,_0x415b06){const _0x4232ff=a0_0x2aa544;await fs[_0x4232ff(0x23c)](_0x5236f6,this['replaceNamesMap'](_0x53389f,_0x415b06),_0x4232ff(0x240));}[a0_0x2aa544(0x1f1)](_0x1337d4,_0x3ba899){const _0x348fc8=a0_0x2aa544;return _0x1337d4[_0x348fc8(0x210)](/{{pascalCase name}}/g,_0x3ba899[_0x348fc8(0x21b)])['replace'](/{{camelCase name}}/g,_0x3ba899['camelCaseName'])[_0x348fc8(0x210)](/{{snakeCase name}}/g,_0x3ba899[_0x348fc8(0x264)])[_0x348fc8(0x210)](/{{pluralPascalCase name}}/g,_0x3ba899[_0x348fc8(0x258)])['replace'](/{{pluralCamelCase name}}/g,_0x3ba899[_0x348fc8(0x233)])[_0x348fc8(0x210)](/{{tableName}}/g,_0x3ba899[_0x348fc8(0x22a)])[_0x348fc8(0x210)](/{{name}}/g,_0x3ba899[_0x348fc8(0x231)]);}async[a0_0x2aa544(0x276)](_0x216f47,_0x5611c5,_0x18a807){const _0x201112=a0_0x2aa544;let _0x1476c4=_0x216f47+'/packages';await this[_0x201112(0x237)](_0x1476c4),_0x1476c4=_0x1476c4+'/'+_0x5611c5,await this[_0x201112(0x237)](_0x1476c4),_0x1476c4+=_0x201112(0x25a),await this[_0x201112(0x237)](_0x1476c4),_0x1476c4+=_0x201112(0x245),await this[_0x201112(0x237)](_0x1476c4),_0x1476c4=_0x1476c4+'/'+_0x18a807,await this['createDir'](_0x1476c4);}[a0_0x2aa544(0x20c)](){const _0x158bd4=a0_0x2aa544;let _0x19549c=process[_0x158bd4(0x212)][_0x158bd4(0x23b)][_0x158bd4(0x21f)]('/'),_0xbe66f6=[];for(let _0x2fd6ae=0x0;_0x2fd6ae<_0x19549c[_0x158bd4(0x24d)]&&_0x158bd4(0x1fd)!=_0x19549c[_0x2fd6ae];_0x2fd6ae++)_0xbe66f6['push'](_0x19549c[_0x2fd6ae]);return _0xbe66f6[_0x158bd4(0x1f4)]('/');}async[a0_0x2aa544(0x237)](_0x1a08ca){const _0x5525b0=a0_0x2aa544;0x0==await this[_0x5525b0(0x1f5)](_0x1a08ca)&&fs[_0x5525b0(0x263)](_0x1a08ca);}async[a0_0x2aa544(0x1f5)](_0x5b7def){const _0x204f3e=a0_0x2aa544;return await fs[_0x204f3e(0x1f2)](_0x5b7def);}};tslib_1[a0_0x2aa544(0x223)]([(0x0,type_graphql_1[a0_0x2aa544(0x235)])(_0x51611a=>Boolean,{'description':a0_0x2aa544(0x277)}),tslib_1[a0_0x2aa544(0x1f0)](0x0,(0x0,type_graphql_1[a0_0x2aa544(0x241)])('id')),tslib_1[a0_0x2aa544(0x1f0)](0x1,(0x0,type_graphql_1[a0_0x2aa544(0x257)])()),tslib_1[a0_0x2aa544(0x27b)]('design:type',Function),tslib_1[a0_0x2aa544(0x27b)](a0_0x2aa544(0x1f8),[String,Object]),tslib_1['__metadata'](a0_0x2aa544(0x234),Promise)],OperatoToolCreateService[a0_0x2aa544(0x232)],a0_0x2aa544(0x220),null),OperatoToolCreateService=tslib_1[a0_0x2aa544(0x223)]([(0x0,type_graphql_1['Resolver'])()],OperatoToolCreateService),exports['OperatoToolCreateService']=OperatoToolCreateService;const allIndex='\x0a/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0a\x0a/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0a\x0aexport\x20const\x20entities\x20=\x20[\x20\x20\x0a\x20\x20/*\x20ENTITIES\x20*/\x0a]\x20\x0a\x0a\x0aexport\x20const\x20schema\x20=\x20{\x0a\x20\x20resolverClasses:\x20[\x0a\x20\x20\x20\x20/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x20\x20]\x20\x0a}\x0a\x0aexport\x20const\x20subscribers\x20=\x20[\x0a\x20\x20/*\x20SUBSCRIBERS\x20*/\x0a]\x0a',serviceIndex='\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}}]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}Mutation]\x0a',serviceHistoryIndex=a0_0x2aa544(0x1f7),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_0x2aa544(0x216),serviceMutation=a0_0x2aa544(0x22b),sereviceType=a0_0x2aa544(0x21d),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='\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20Domain\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0a@Entity(\x27{{tableName}}\x27)\x0a{{indexAnn}}\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}\x20{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a',serviceEntityHistCopy=a0_0x2aa544(0x206),serviceEntityHistJson='\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',serviceEntitySubscriber=a0_0x2aa544(0x21e);
|
|
1
|
+
'use strict';const a0_0x418395=a0_0x48a2;(function(_0x119722,_0x138656){const _0x3d7907=a0_0x48a2,_0x225d8c=_0x119722();while(!![]){try{const _0x32ef95=parseInt(_0x3d7907(0x113))/0x1*(-parseInt(_0x3d7907(0x17c))/0x2)+parseInt(_0x3d7907(0x19c))/0x3*(parseInt(_0x3d7907(0x185))/0x4)+-parseInt(_0x3d7907(0x132))/0x5+-parseInt(_0x3d7907(0x198))/0x6+parseInt(_0x3d7907(0x13b))/0x7+-parseInt(_0x3d7907(0x178))/0x8+parseInt(_0x3d7907(0x11e))/0x9;if(_0x32ef95===_0x138656)break;else _0x225d8c['push'](_0x225d8c['shift']());}catch(_0x1dbd93){_0x225d8c['push'](_0x225d8c['shift']());}}}(a0_0x4670,0xca9b9));Object[a0_0x418395(0x14d)](exports,a0_0x418395(0x15e),{'value':!0x0}),exports[a0_0x418395(0x196)]=void 0x0;const tslib_1=require(a0_0x418395(0x15f)),type_graphql_1=require('type-graphql'),shell_1=require(a0_0x418395(0x164)),resource_base_1=require('@things-factory/resource-base'),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x418395(0x123)),{plural:plural}=require(a0_0x418395(0x162)),fs=require('fs');function a0_0x4670(){const _0x593b25=['decimal','createServicePath','Entity','\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201','existsPath','-history-type.ts','existsSync','createHistoryEntityText','/server','number','EntitySubscribers,','import\x20{\x20entities\x20as\x20','12310928INkRrS','join','\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','\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','2GKxCMn','createTypeText','Date','string','writeFileSync','push','writeFile','pascalCaseName','columnToEntityColumn','972ywYXHk','-history\x27','\x0a\x20\x20','PWD','Operato\x20Tool\x20Create\x20Service','-type.ts','nullable','design:paramtypes','Int','split','\x0a/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0a\x0a/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0a\x0aexport\x20const\x20entities\x20=\x20[\x20\x20\x0a\x20\x20/*\x20ENTITIES\x20*/\x0a]\x20\x0a\x0a\x0aexport\x20const\x20schema\x20=\x20{\x0a\x20\x20resolverClasses:\x20[\x0a\x20\x20\x20\x20/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x20\x20]\x20\x0a}\x0a\x0aexport\x20const\x20subscribers\x20=\x20[\x0a\x20\x20/*\x20SUBSCRIBERS\x20*/\x0a]\x0a','date','replace','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','colType','/event-subscriber.ts','colSize','OperatoToolCreateService','Ctx','6208422iOEDQT','name','length','getFieldType','2808lQZGZH','\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','__decorate','indexOf','-history-query.ts','findOne','\x20{\x20nullable:\x20','EntitySubscribers\x20}\x20from\x20\x27./','\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','createHistoryServiceFiles','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','591970gYWMsX','/packages','/index.ts','includes','JSON','...','EntityColumn','character\x20varying','updater_id','createEntityText','getRepository','24345396yJrNrU','COPY','\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','state','__metadata','lodash','rank','__param','Resolvers\x20}\x20from\x20\x27./','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','double','export\x20*\x20from\x20\x27./','getProjectRootPath','creator_id','bigint','.ts','replaceNamesMap','createDir','\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','879770lArnhk','/*\x20ENTITIES\x20*/\x0a\x09...','Arg','long','\x27,\x20type:\x20\x27','-query.ts','Entities,\x20resolvers\x20as\x20','Resolvers,\x20subscribers\x20as\x20','design:returntype','8672412wFKFXJ','getColTxtType','updater','integer','readFileSync','Entities,','@Column({name:\x27','/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...','dataProp','createNoHistoryServiceFiels','@Field(','Resolvers,','map','sort','utf8','Resolver','Float','tableName','defineProperty','float','design:type','@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})','env','\x27,\x20nullable:\x20','find',',length:','uniqRank','\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\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','\x20})','createServiceFiles','\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','mkdirSync','domain_id','domain','-history.ts','__esModule','tslib','-mutation.ts','pluralCamelCaseName','pluralize','{{camelCase\x20name}}.','@things-factory/shell','type\x20=>','prototype','created_at','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','toolCreateService','updated_at','double\x20precision'];a0_0x4670=function(){return _0x593b25;};return a0_0x4670();}let OperatoToolCreateService=class{async[a0_0x418395(0x169)](_0x116a29,_0x1f6db7){const _0x5526af=a0_0x418395,{domain:_0x452720}=_0x1f6db7[_0x5526af(0x121)],_0x4b8855=await(0x0,shell_1['getRepository'])(resource_base_1[_0x5526af(0x16e)])[_0x5526af(0x1a1)]({'where':{'id':_0x116a29}}),_0x4bd451=await(0x0,shell_1[_0x5526af(0x11d)])(resource_base_1[_0x5526af(0x119)])[_0x5526af(0x153)]({'where':{'domain':{'id':_0x452720['id']},'entity':{'id':_0x4b8855['id']}}});let {name:_0x3ed538='',bundle:_0x4e4489=''}=_0x4b8855||{},_0xc2a8e=this[_0x5526af(0x12b)](),_0xa4565d=kebabCase(_0x3ed538);return await this[_0x5526af(0x16d)](_0xc2a8e,_0x4e4489,_0xa4565d),await this[_0x5526af(0x158)](_0xc2a8e,_0x4e4489,_0x3ed538,_0xa4565d,_0x4b8855,_0x4bd451),!0x0;}async['createServiceFiles'](_0x55325b,_0x13ab8b,_0x7fc910,_0x3d0d3e,_0xeae847,_0x5550ba){const _0x39b4d0=a0_0x418395;let _0x3d49b3={'name':_0x3d0d3e,'tableName':_0xeae847[_0x39b4d0(0x14c)],'pascalCaseName':startCase(camelCase(_0x7fc910))[_0x39b4d0(0x191)](/ /g,''),'camelCaseName':camelCase(_0x7fc910),'snakeCaseName':snakeCase(_0x7fc910),'pluralPascalCaseName':startCase(camelCase(plural(_0x7fc910)))[_0x39b4d0(0x191)](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x7fc910))},_0x42b088=_0x55325b+'/packages/'+_0x13ab8b+'/server/service/';['JSON',_0x39b4d0(0x11f)][_0x39b4d0(0x116)](_0xeae847['dataProp'])?await this[_0x39b4d0(0x111)](_0x42b088,_0x3d0d3e,_0xeae847,_0x5550ba,_0x3d49b3):await this[_0x39b4d0(0x144)](_0x42b088,_0x3d0d3e,_0xeae847,_0x5550ba,_0x3d49b3);}async['createHistoryServiceFiles'](_0x15a4b3,_0x5a2df5,_0x30a985,_0x49b5af,_0x3b0e54){const _0x3c8c36=a0_0x418395;await this[_0x3c8c36(0x182)](_0x15a4b3+(_0x5a2df5+_0x3c8c36(0x115)),serviceHistoryIndex,_0x3b0e54);let _0x2d286e=this[_0x3c8c36(0x11c)](_0x30a985,_0x49b5af);await this[_0x3c8c36(0x182)](_0x15a4b3+(_0x5a2df5+'/'+_0x5a2df5+_0x3c8c36(0x12e)),_0x2d286e,_0x3b0e54),await this['writeFile'](_0x15a4b3+(_0x5a2df5+'/'+_0x5a2df5+_0x3c8c36(0x137)),serviceQuery,_0x3b0e54),await this[_0x3c8c36(0x182)](_0x15a4b3+(_0x5a2df5+'/'+_0x5a2df5+_0x3c8c36(0x160)),serviceMutation,_0x3b0e54);let _0x450498=this[_0x3c8c36(0x17d)](_0x49b5af);await this['writeFile'](_0x15a4b3+(_0x5a2df5+'/'+_0x5a2df5+_0x3c8c36(0x18a)),_0x450498,_0x3b0e54);let _0x343f49=this[_0x3c8c36(0x173)](_0x30a985,_0x49b5af);await this['writeFile'](_0x15a4b3+(_0x5a2df5+'/'+_0x5a2df5+_0x3c8c36(0x15d)),_0x343f49,_0x3b0e54);let _0x36f923='';_0x3c8c36(0x117)==_0x30a985[_0x3c8c36(0x143)]?(_0x36f923=_0x3c8c36(0x131),await this[_0x3c8c36(0x182)](_0x15a4b3+(_0x5a2df5+_0x3c8c36(0x194)),serviceEntitySubscriber,_0x3b0e54)):_0x36f923='';let _0x26a364=serviceEntitySubscriber[_0x3c8c36(0x191)](/{{entityToJson}}/g,_0x36f923);await this[_0x3c8c36(0x182)](_0x15a4b3+(_0x5a2df5+_0x3c8c36(0x194)),_0x26a364,_0x3b0e54),await this[_0x3c8c36(0x182)](_0x15a4b3+(_0x5a2df5+'/'+_0x5a2df5+_0x3c8c36(0x1a0)),serviceHistoryQuery,_0x3b0e54),await this[_0x3c8c36(0x182)](_0x15a4b3+(_0x5a2df5+'/'+_0x5a2df5+_0x3c8c36(0x171)),sereviceHistoryType,_0x3b0e54);let _0x8a4bff=_0x15a4b3+_0x3c8c36(0x127);0x0==await this[_0x3c8c36(0x170)](_0x8a4bff)&&await this[_0x3c8c36(0x182)](_0x8a4bff,allIndex,_0x3b0e54);let _0x47803e=await fs['readFileSync'](_0x8a4bff,'utf8');_0x47803e[_0x3c8c36(0x19f)](_0x3c8c36(0x12a)+_0x3b0e54[_0x3c8c36(0x199)]+'/'+_0x3b0e54[_0x3c8c36(0x199)]+_0x3c8c36(0x186))<0x0&&(_0x47803e=_0x47803e['replace'](/\/\* EXPORT ENTITY TYPES \*\//,_0x3c8c36(0x168)+_0x3b0e54[_0x3c8c36(0x199)]+'/'+_0x3b0e54['name']+_0x3c8c36(0x186))),_0x47803e['indexOf'](_0x3c8c36(0x12a)+_0x3b0e54[_0x3c8c36(0x199)]+'/'+_0x3b0e54[_0x3c8c36(0x199)]+'\x27')<0x0&&(_0x47803e=_0x47803e[_0x3c8c36(0x191)](/\/\* EXPORT ENTITY TYPES \*\//,_0x3c8c36(0x168)+_0x3b0e54[_0x3c8c36(0x199)]+'/'+_0x3b0e54[_0x3c8c36(0x199)]+'\x27')),_0x47803e[_0x3c8c36(0x19f)]('import\x20{\x20entities\x20as\x20'+_0x3b0e54[_0x3c8c36(0x183)]+'Entities,\x20resolvers\x20as\x20'+_0x3b0e54['pascalCaseName']+'Resolvers,\x20subscribers\x20as\x20'+_0x3b0e54[_0x3c8c36(0x183)]+_0x3c8c36(0x1a3)+_0x3b0e54[_0x3c8c36(0x199)]+'\x27')<0x0&&(_0x47803e=_0x47803e[_0x3c8c36(0x191)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x3c8c36(0x112)+_0x3b0e54[_0x3c8c36(0x183)]+_0x3c8c36(0x138)+_0x3b0e54[_0x3c8c36(0x183)]+_0x3c8c36(0x139)+_0x3b0e54['pascalCaseName']+_0x3c8c36(0x1a3)+_0x3b0e54[_0x3c8c36(0x199)]+'\x27')),_0x47803e['indexOf'](_0x3c8c36(0x118)+_0x3b0e54[_0x3c8c36(0x183)]+_0x3c8c36(0x140))<0x0&&(_0x47803e=_0x47803e[_0x3c8c36(0x191)](/\/\* ENTITIES \*\//,_0x3c8c36(0x133)+_0x3b0e54[_0x3c8c36(0x183)]+_0x3c8c36(0x140))),_0x47803e[_0x3c8c36(0x19f)]('...'+_0x3b0e54[_0x3c8c36(0x183)]+_0x3c8c36(0x146))<0x0&&(_0x47803e=_0x47803e['replace'](/\/\* RESOLVER CLASSES \*\//,'/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...'+_0x3b0e54[_0x3c8c36(0x183)]+_0x3c8c36(0x146))),_0x47803e['indexOf'](_0x3c8c36(0x118)+_0x3b0e54[_0x3c8c36(0x183)]+_0x3c8c36(0x176))<0x0&&(_0x47803e=_0x47803e['replace'](/\/\* SUBSCRIBERS \*\//,_0x3c8c36(0x142)+_0x3b0e54[_0x3c8c36(0x183)]+_0x3c8c36(0x176))),await this[_0x3c8c36(0x182)](_0x8a4bff,_0x47803e,_0x3b0e54);}async[a0_0x418395(0x144)](_0x3c50b6,_0x5a2f0a,_0x59c35e,_0xcd4e81,_0x100424){const _0x2bd584=a0_0x418395;await this[_0x2bd584(0x182)](_0x3c50b6+(_0x5a2f0a+_0x2bd584(0x115)),serviceIndex,_0x100424),await this[_0x2bd584(0x182)](_0x3c50b6+(_0x5a2f0a+'/'+_0x5a2f0a+_0x2bd584(0x137)),serviceQuery,_0x100424),await this[_0x2bd584(0x182)](_0x3c50b6+(_0x5a2f0a+'/'+_0x5a2f0a+_0x2bd584(0x160)),serviceMutation,_0x100424);let _0xa34ec=this[_0x2bd584(0x11c)](_0x59c35e,_0xcd4e81);await this[_0x2bd584(0x182)](_0x3c50b6+(_0x5a2f0a+'/'+_0x5a2f0a+'.ts'),_0xa34ec,_0x100424);let _0x22ba59=this['createTypeText'](_0xcd4e81);await this[_0x2bd584(0x182)](_0x3c50b6+(_0x5a2f0a+'/'+_0x5a2f0a+_0x2bd584(0x18a)),_0x22ba59,_0x100424);let _0x5d67d1=_0x3c50b6+_0x2bd584(0x127);0x0==await this[_0x2bd584(0x170)](_0x5d67d1)&&await this['writeFile'](_0x5d67d1,allIndex,_0x100424);let _0x98f13b=await fs[_0x2bd584(0x13f)](_0x5d67d1,_0x2bd584(0x149));_0x98f13b[_0x2bd584(0x19f)](_0x2bd584(0x12a)+_0x100424[_0x2bd584(0x199)]+'/'+_0x100424[_0x2bd584(0x199)]+'\x27')<0x0&&(_0x98f13b=_0x98f13b[_0x2bd584(0x191)](/\/\* EXPORT ENTITY TYPES \*\//,_0x2bd584(0x168)+_0x100424['name']+'/'+_0x100424['name']+'\x27')),_0x98f13b[_0x2bd584(0x19f)](_0x2bd584(0x177)+_0x100424[_0x2bd584(0x183)]+_0x2bd584(0x138)+_0x100424[_0x2bd584(0x183)]+_0x2bd584(0x126)+_0x100424[_0x2bd584(0x199)]+'\x27')<0x0&&(_0x98f13b=_0x98f13b[_0x2bd584(0x191)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x2bd584(0x112)+_0x100424['pascalCaseName']+_0x2bd584(0x138)+_0x100424[_0x2bd584(0x183)]+_0x2bd584(0x126)+_0x100424['name']+'\x27')),_0x98f13b['indexOf'](_0x2bd584(0x118)+_0x100424[_0x2bd584(0x183)]+_0x2bd584(0x140))<0x0&&(_0x98f13b=_0x98f13b['replace'](/\/\* ENTITIES \*\//,_0x2bd584(0x133)+_0x100424[_0x2bd584(0x183)]+'Entities,')),_0x98f13b['indexOf'](_0x2bd584(0x118)+_0x100424['pascalCaseName']+_0x2bd584(0x146))<0x0&&(_0x98f13b=_0x98f13b[_0x2bd584(0x191)](/\/\* RESOLVER CLASSES \*\//,_0x2bd584(0x192)+_0x100424[_0x2bd584(0x183)]+_0x2bd584(0x146))),await this[_0x2bd584(0x182)](_0x5d67d1,_0x98f13b,_0x100424);}[a0_0x418395(0x17d)](_0x3f8a14){const _0x421a1f=a0_0x418395;let _0x39f56d=sereviceType,_0x2152de=_0x3f8a14[_0x421a1f(0x147)](_0x5bcbd2=>{const _0x41bcb9=_0x421a1f;if('id'==_0x5bcbd2['name'])return'';if(_0x41bcb9(0x15b)==_0x5bcbd2['name'])return'';if(_0x41bcb9(0x167)==_0x5bcbd2['name'])return'';if(_0x41bcb9(0x16a)==_0x5bcbd2[_0x41bcb9(0x199)])return'';if(_0x41bcb9(0x12c)==_0x5bcbd2['name'])return'';if(_0x41bcb9(0x11b)==_0x5bcbd2[_0x41bcb9(0x199)])return'';let _0x3bb98b=this['getFieldType'](_0x5bcbd2),_0x5da619=this[_0x41bcb9(0x13c)](_0x5bcbd2),_0x305873=camelCase(_0x5bcbd2[_0x41bcb9(0x199)]);return'\x20\x20'+(_0x41bcb9(0x145)+(0x0==_0x3bb98b['length']?'':_0x41bcb9(0x165)+_0x3bb98b+',')+'\x20{\x20nullable:\x20'+_0x5bcbd2[_0x41bcb9(0x18b)]+_0x41bcb9(0x157))+_0x41bcb9(0x187)+(''+_0x305873+(_0x5bcbd2[_0x41bcb9(0x18b)]?'?':'')+':\x20'+_0x5da619)+'\x0a';});_0x39f56d=_0x39f56d[_0x421a1f(0x191)](/{{newTypeColumns}}/g,_0x2152de[_0x421a1f(0x179)]('\x0a'));let _0x4c4f02=_0x3f8a14[_0x421a1f(0x147)](_0x368d60=>{const _0xbebc20=_0x421a1f;if('id'==_0x368d60[_0xbebc20(0x199)])return'';if('domain_id'==_0x368d60['name'])return'';if('created_at'==_0x368d60[_0xbebc20(0x199)])return'';if(_0xbebc20(0x16a)==_0x368d60[_0xbebc20(0x199)])return'';if('creator_id'==_0x368d60[_0xbebc20(0x199)])return'';if(_0xbebc20(0x11b)==_0x368d60[_0xbebc20(0x199)])return'';let _0xe8a90f=this[_0xbebc20(0x19b)](_0x368d60),_0x21d352=this[_0xbebc20(0x13c)](_0x368d60);_0x368d60[_0xbebc20(0x18b)]=!0x0;let _0x3a1788=camelCase(_0x368d60['name']);return'\x20\x20'+(_0xbebc20(0x145)+(0x0==_0xe8a90f[_0xbebc20(0x19a)]?'':_0xbebc20(0x165)+_0xe8a90f+',')+_0xbebc20(0x1a2)+_0x368d60[_0xbebc20(0x18b)]+_0xbebc20(0x157))+'\x0a\x20\x20'+(''+_0x3a1788+(_0x368d60[_0xbebc20(0x18b)]?'?':'')+':\x20'+_0x21d352)+'\x0a';});return _0x39f56d=_0x39f56d[_0x421a1f(0x191)](/{{patchTypeColumns}}/g,_0x4c4f02[_0x421a1f(0x179)]('\x0a')),_0x39f56d;}[a0_0x418395(0x11c)](_0x3a40f5,_0x37555f){const _0x4e94ad=a0_0x418395;let _0x4c6dc2=serviceEntity,_0x14827f=_0x37555f[_0x4e94ad(0x148)](function(_0x166e25,_0x70567c){const _0x4b80e5=_0x4e94ad;return _0x166e25[_0x4b80e5(0x124)]-_0x70567c[_0x4b80e5(0x124)];})['map'](_0x58d5e1=>this[_0x4e94ad(0x184)](_0x58d5e1));['COPY',_0x4e94ad(0x117)]['includes'](_0x3a40f5[_0x4e94ad(0x143)])&&_0x14827f['push'](_0x4e94ad(0x16f)),_0x4c6dc2=_0x4c6dc2[_0x4e94ad(0x191)](/{{entityColumns}}/g,_0x14827f['join']('\x0a'));let _0x31ebab='',_0x154e21=_0x37555f['filter'](_0x7e9bc8=>_0x7e9bc8[_0x4e94ad(0x155)]&&_0x7e9bc8[_0x4e94ad(0x155)]>0x0)[_0x4e94ad(0x148)](function(_0x17d163,_0x142aae){const _0x14bccc=_0x4e94ad;return _0x17d163['uniqRank']-_0x142aae[_0x14bccc(0x155)];});if(_0x154e21[_0x4e94ad(0x19a)]>0x0){_0x31ebab=_0x4e94ad(0x150);let _0x2dde38=_0x154e21[_0x4e94ad(0x147)](_0x55439c=>{const _0x3f7176=_0x4e94ad;let _0x10a8cc=_0x55439c[_0x3f7176(0x199)];return _0x3f7176(0x15b)==_0x55439c[_0x3f7176(0x199)]&&(_0x10a8cc=_0x3f7176(0x15c)),_0x3f7176(0x12c)==_0x55439c[_0x3f7176(0x199)]&&(_0x10a8cc='creator'),_0x3f7176(0x11b)==_0x55439c['name']&&(_0x10a8cc=_0x3f7176(0x13d)),_0x3f7176(0x163)+camelCase(_0x10a8cc);});_0x31ebab=_0x31ebab[_0x4e94ad(0x191)](/{{indexColumns}}/g,_0x2dde38[_0x4e94ad(0x179)](','));}return _0x4c6dc2=_0x4c6dc2['replace'](/{{indexAnn}}/g,_0x31ebab),_0x4c6dc2;}[a0_0x418395(0x173)](_0x23fd0d,_0x274712){const _0x21e654=a0_0x418395;let _0x5b9715='JSON'==_0x23fd0d[_0x21e654(0x143)]?serviceEntityHistJson:serviceEntityHistCopy,_0x3c4555=_0x274712[_0x21e654(0x148)](function(_0x10a356,_0x4dbd19){return _0x10a356['rank']-_0x4dbd19['rank'];})[_0x21e654(0x147)](_0x8a4b52=>this[_0x21e654(0x184)](_0x8a4b52));return _0x5b9715=_0x5b9715[_0x21e654(0x191)](/{{entityColumns}}/g,_0x3c4555[_0x21e654(0x179)]('\x0a')),_0x5b9715;}[a0_0x418395(0x184)](_0x56f9a3){const _0x3d695a=a0_0x418395;if('id'==_0x56f9a3[_0x3d695a(0x199)])return'';if(_0x3d695a(0x15b)==_0x56f9a3[_0x3d695a(0x199)])return'';if(_0x3d695a(0x167)==_0x56f9a3[_0x3d695a(0x199)])return'';if('updated_at'==_0x56f9a3[_0x3d695a(0x199)])return'';if(_0x3d695a(0x12c)==_0x56f9a3[_0x3d695a(0x199)])return'';if(_0x3d695a(0x11b)==_0x56f9a3[_0x3d695a(0x199)])return'';let _0x517a55=_0x56f9a3[_0x3d695a(0x193)];_0x3d695a(0x129)==_0x56f9a3[_0x3d695a(0x193)]&&(_0x517a55=_0x3d695a(0x16b)),_0x3d695a(0x135)==_0x56f9a3[_0x3d695a(0x193)]&&(_0x517a55=_0x3d695a(0x12d)),'string'==_0x56f9a3[_0x3d695a(0x193)]&&(_0x517a55=_0x3d695a(0x11a)),'datetime'==_0x56f9a3[_0x3d695a(0x193)]&&(_0x517a55='timestamp\x20without\x20time\x20zone');let _0x208a78='';'string'==_0x56f9a3[_0x3d695a(0x193)]&&(_0x208a78=_0x56f9a3[_0x3d695a(0x195)]);let _0x427d84=this[_0x3d695a(0x19b)](_0x56f9a3),_0x25490f=this[_0x3d695a(0x13c)](_0x56f9a3),_0x3a6a8a=camelCase(_0x56f9a3['name']);return'\x20\x20'+(_0x3d695a(0x141)+_0x56f9a3[_0x3d695a(0x199)]+_0x3d695a(0x136)+_0x517a55+_0x3d695a(0x152)+_0x56f9a3['nullable']+'\x20'+(0x0==_0x208a78[_0x3d695a(0x19a)]?'':_0x3d695a(0x154)+_0x208a78)+_0x3d695a(0x157))+_0x3d695a(0x187)+(_0x3d695a(0x145)+(0x0==_0x427d84['length']?'':_0x3d695a(0x165)+_0x427d84+',')+_0x3d695a(0x1a2)+_0x56f9a3[_0x3d695a(0x18b)]+_0x3d695a(0x157))+_0x3d695a(0x187)+(''+_0x3a6a8a+(_0x56f9a3[_0x3d695a(0x18b)]?'?':'')+':\x20'+_0x25490f)+'\x0a';}['getFieldType'](_0x3dc617){const _0x46e2ad=a0_0x418395;let _0x4640c3='';return _0x46e2ad(0x129)==_0x3dc617[_0x46e2ad(0x193)]&&(_0x4640c3=_0x46e2ad(0x14b)),_0x46e2ad(0x14e)==_0x3dc617[_0x46e2ad(0x193)]&&(_0x4640c3=_0x46e2ad(0x14b)),_0x46e2ad(0x135)==_0x3dc617[_0x46e2ad(0x193)]&&(_0x4640c3=_0x46e2ad(0x18d)),_0x46e2ad(0x13e)==_0x3dc617['colType']&&(_0x4640c3='Int'),_0x4640c3;}[a0_0x418395(0x13c)](_0xba50ca){const _0x267b77=a0_0x418395;let _0x46f046=_0xba50ca[_0x267b77(0x193)];return _0x267b77(0x16c)==_0xba50ca['colType']&&(_0x46f046=_0x267b77(0x175)),_0x267b77(0x129)==_0xba50ca[_0x267b77(0x193)]&&(_0x46f046='number'),_0x267b77(0x14e)==_0xba50ca[_0x267b77(0x193)]&&(_0x46f046=_0x267b77(0x175)),'integer'==_0xba50ca[_0x267b77(0x193)]&&(_0x46f046=_0x267b77(0x175)),_0x267b77(0x135)==_0xba50ca[_0x267b77(0x193)]&&(_0x46f046=_0x267b77(0x175)),'datetime'==_0xba50ca[_0x267b77(0x193)]&&(_0x46f046=_0x267b77(0x17e)),_0x267b77(0x190)==_0xba50ca[_0x267b77(0x193)]&&(_0x46f046=_0x267b77(0x17e)),'text'==_0xba50ca[_0x267b77(0x193)]&&(_0x46f046=_0x267b77(0x17f)),_0x46f046;}async[a0_0x418395(0x182)](_0x5b92d0,_0x27b747,_0x27492a){const _0x191f12=a0_0x418395;await fs[_0x191f12(0x180)](_0x5b92d0,this[_0x191f12(0x12f)](_0x27b747,_0x27492a),'utf8');}[a0_0x418395(0x12f)](_0x2fcdf5,_0x5487ff){const _0x471e08=a0_0x418395;return _0x2fcdf5[_0x471e08(0x191)](/{{pascalCase name}}/g,_0x5487ff[_0x471e08(0x183)])['replace'](/{{camelCase name}}/g,_0x5487ff['camelCaseName'])[_0x471e08(0x191)](/{{snakeCase name}}/g,_0x5487ff['snakeCaseName'])['replace'](/{{pluralPascalCase name}}/g,_0x5487ff['pluralPascalCaseName'])[_0x471e08(0x191)](/{{pluralCamelCase name}}/g,_0x5487ff[_0x471e08(0x161)])[_0x471e08(0x191)](/{{tableName}}/g,_0x5487ff[_0x471e08(0x14c)])[_0x471e08(0x191)](/{{name}}/g,_0x5487ff[_0x471e08(0x199)]);}async[a0_0x418395(0x16d)](_0x4d6efb,_0xd6c87e,_0x3d05d0){const _0x585deb=a0_0x418395;let _0x3f4217=_0x4d6efb+_0x585deb(0x114);await this[_0x585deb(0x130)](_0x3f4217),_0x3f4217=_0x3f4217+'/'+_0xd6c87e,await this[_0x585deb(0x130)](_0x3f4217),_0x3f4217+=_0x585deb(0x174),await this[_0x585deb(0x130)](_0x3f4217),_0x3f4217+='/service',await this[_0x585deb(0x130)](_0x3f4217),_0x3f4217=_0x3f4217+'/'+_0x3d05d0,await this[_0x585deb(0x130)](_0x3f4217);}[a0_0x418395(0x12b)](){const _0x5cf53c=a0_0x418395;let _0x5f10ae=process[_0x5cf53c(0x151)][_0x5cf53c(0x188)][_0x5cf53c(0x18e)]('/'),_0x81c993=[];for(let _0x37f7f5=0x0;_0x37f7f5<_0x5f10ae['length']&&'packages'!=_0x5f10ae[_0x37f7f5];_0x37f7f5++)_0x81c993[_0x5cf53c(0x181)](_0x5f10ae[_0x37f7f5]);return _0x81c993['join']('/');}async['createDir'](_0xb983fe){const _0x202813=a0_0x418395;0x0==await this[_0x202813(0x170)](_0xb983fe)&&fs[_0x202813(0x15a)](_0xb983fe);}async[a0_0x418395(0x170)](_0x742ea0){const _0x5355d4=a0_0x418395;return await fs[_0x5355d4(0x172)](_0x742ea0);}};function a0_0x48a2(_0x34aec2,_0xc9adda){const _0x46704f=a0_0x4670();return a0_0x48a2=function(_0x48a2c0,_0x58ce25){_0x48a2c0=_0x48a2c0-0x111;let _0x1494ac=_0x46704f[_0x48a2c0];return _0x1494ac;},a0_0x48a2(_0x34aec2,_0xc9adda);}tslib_1[a0_0x418395(0x19e)]([(0x0,type_graphql_1['Query'])(_0x604900=>Boolean,{'description':a0_0x418395(0x189)}),tslib_1['__param'](0x0,(0x0,type_graphql_1[a0_0x418395(0x134)])('id')),tslib_1[a0_0x418395(0x125)](0x1,(0x0,type_graphql_1[a0_0x418395(0x197)])()),tslib_1['__metadata'](a0_0x418395(0x14f),Function),tslib_1[a0_0x418395(0x122)](a0_0x418395(0x18c),[String,Object]),tslib_1['__metadata'](a0_0x418395(0x13a),Promise)],OperatoToolCreateService[a0_0x418395(0x166)],a0_0x418395(0x169),null),OperatoToolCreateService=tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x418395(0x14a)])()],OperatoToolCreateService),exports[a0_0x418395(0x196)]=OperatoToolCreateService;const allIndex=a0_0x418395(0x18f),serviceIndex=a0_0x418395(0x1a4),serviceHistoryIndex=a0_0x418395(0x19d),serviceQuery=a0_0x418395(0x156),serviceHistoryQuery=a0_0x418395(0x17a),serviceMutation=a0_0x418395(0x159),sereviceType=a0_0x418395(0x17b),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='\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20Domain\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0a@Entity(\x27{{tableName}}\x27)\x0a{{indexAnn}}\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}\x20{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a',serviceEntityHistCopy=a0_0x418395(0x120),serviceEntityHistJson='\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',serviceEntitySubscriber=a0_0x418395(0x128);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';const a0_0x277ba7=a0_0x35f4;(function(_0xff84b3,_0x254b81){const _0xfa00=a0_0x35f4,_0x5117f1=_0xff84b3();while(!![]){try{const _0x4fd870=-parseInt(_0xfa00(0x190))/0x1*(-parseInt(_0xfa00(0x19c))/0x2)+parseInt(_0xfa00(0x1a7))/0x3*(-parseInt(_0xfa00(0x1b1))/0x4)+-parseInt(_0xfa00(0x18d))/0x5+-parseInt(_0xfa00(0x1a4))/0x6+-parseInt(_0xfa00(0x194))/0x7*(-parseInt(_0xfa00(0x1a3))/0x8)+-parseInt(_0xfa00(0x19d))/0x9*(parseInt(_0xfa00(0x18a))/0xa)+-parseInt(_0xfa00(0x195))/0xb*(-parseInt(_0xfa00(0x1ad))/0xc);if(_0x4fd870===_0x254b81)break;else _0x5117f1['push'](_0x5117f1['shift']());}catch(_0x1517d2){_0x5117f1['push'](_0x5117f1['shift']());}}}(a0_0x55fa,0x6d775));Object[a0_0x277ba7(0x1ab)](exports,'__esModule',{'value':!0x0}),exports[a0_0x277ba7(0x1b0)]=exports[a0_0x277ba7(0x1a9)]=void 0x0;const operato_license_checker_1=require('@things-factory/operato-license-checker'),shell_1=require(a0_0x277ba7(0x18b)),menu_base_1=require(a0_0x277ba7(0x1a0)),license_error_1=require(a0_0x277ba7(0x192));async function checkStudioPermission(){const _0x50c054=a0_0x277ba7;let _0xc2d202=((0x0,operato_license_checker_1[_0x50c054(0x18e)])(_0x50c054(0x199))||',')[_0x50c054(0x193)](',')[_0x50c054(0x1a8)](_0x520649=>_0x520649[_0x50c054(0x1aa)]()),_0x4b5691=!0x1;return _0xc2d202['forEach'](_0xeff7b3=>{const _0x5d940d=_0x50c054;_0xeff7b3[_0x5d940d(0x19f)](_0x5d940d(0x1a6))&&(_0x4b5691=!0x0);}),_0x4b5691;}function a0_0x35f4(_0x5c3c5c,_0x247d21){const _0x55fa46=a0_0x55fa();return a0_0x35f4=function(_0x35f458,_0x1dcea0){_0x35f458=_0x35f458-0x189;let _0x1f6e6b=_0x55fa46[_0x35f458];return _0x1f6e6b;},a0_0x35f4(_0x5c3c5c,_0x247d21);}async function checkStudioTemplateIsOverLimit(_0x25c50d,_0x2232e9){const _0x5a159a=a0_0x277ba7;if(0x0==await checkStudioPermission())throw new license_error_1[(_0x5a159a(0x19b))]({'errorCode':_0x2232e9['t'](license_error_1['LicenseError'][_0x5a159a(0x1ac)][_0x5a159a(0x1a1)])});var _0x5e1301=0x0;if(_0x5e1301=_0x25c50d&&''!=_0x25c50d?await(0x0,shell_1['getRepository'])(menu_base_1['Menu'])['manager']['createQueryBuilder']()[_0x5a159a(0x19a)](_0x5a159a(0x191))['from'](menu_base_1[_0x5a159a(0x18c)],_0x5a159a(0x191))[_0x5a159a(0x197)]('id\x20!=\x20:id',{'id':_0x25c50d})[_0x5a159a(0x189)](_0x5a159a(0x1ae))[_0x5a159a(0x1a5)]()+0x1:await(0x0,shell_1[_0x5a159a(0x1a2)])(menu_base_1['Menu'])[_0x5a159a(0x18f)][_0x5a159a(0x196)]()[_0x5a159a(0x19a)](_0x5a159a(0x191))[_0x5a159a(0x198)](menu_base_1[_0x5a159a(0x18c)],_0x5a159a(0x191))[_0x5a159a(0x197)](_0x5a159a(0x1ae))[_0x5a159a(0x1a5)]()+0x1,!(0x0,operato_license_checker_1[_0x5a159a(0x19e)])(_0x5e1301))throw new license_error_1[(_0x5a159a(0x19b))]({'errorCode':_0x2232e9['t'](license_error_1[_0x5a159a(0x19b)][_0x5a159a(0x1ac)][_0x5a159a(0x1af)])});return!0x0;}function a0_0x55fa(){const _0x4d4065=['Studio','3ESQoMq','map','checkStudioPermission','trim','defineProperty','ERROR_CODES','12VYIMec','(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)','OVER_LIMIT','checkStudioTemplateIsOverLimit','2371060NDLhqF','andWhere','80rDWoHM','@things-factory/shell','Menu','1538190OqzKHT','getPermission','manager','2439IkRefE','menu','../../errors/license-error','split','7wfVDyY','19144532hNoEAw','createQueryBuilder','where','from','Permissions\x20For\x20Tailor\x20Tool','select','LicenseError','40WaNCha','844407YkWdDF','checkTarget','includes','@things-factory/menu-base','INVALID_LICENSE','getRepository','4433512LKjIXt','1464126GOZMfC','getCount'];a0_0x55fa=function(){return _0x4d4065;};return a0_0x55fa();}exports['checkStudioPermission']=checkStudioPermission,exports[a0_0x277ba7(0x1b0)]=checkStudioTemplateIsOverLimit;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x25d2ec=a0_0x16c2;function a0_0x16c2(_0x25d2c2,_0x1db8b1){const _0x3c8706=a0_0x3c87();return a0_0x16c2=function(_0x16c20d,_0x563ec2){_0x16c20d=_0x16c20d-0x10a;let _0x50d844=_0x3c8706[_0x16c20d];return _0x50d844;},a0_0x16c2(_0x25d2c2,_0x1db8b1);}(function(_0xccc349,_0x1523e3){const _0x4ebde5=a0_0x16c2,_0x7d8b07=_0xccc349();while(!![]){try{const _0xeb3f26=parseInt(_0x4ebde5(0x11e))/0x1+parseInt(_0x4ebde5(0x126))/0x2+parseInt(_0x4ebde5(0x10e))/0x3+parseInt(_0x4ebde5(0x112))/0x4*(parseInt(_0x4ebde5(0x115))/0x5)+-parseInt(_0x4ebde5(0x120))/0x6+-parseInt(_0x4ebde5(0x124))/0x7*(parseInt(_0x4ebde5(0x11f))/0x8)+parseInt(_0x4ebde5(0x11b))/0x9*(-parseInt(_0x4ebde5(0x121))/0xa);if(_0xeb3f26===_0x1523e3)break;else _0x7d8b07['push'](_0x7d8b07['shift']());}catch(_0x164fd2){_0x7d8b07['push'](_0x7d8b07['shift']());}}}(a0_0x3c87,0xa1484));function a0_0x3c87(){const _0x222e33=['482980DYAkae','8Fqrsdv','706380EqzPEB','190nmyNCz','__decorate','design:paramtypes','2779553kchEcs','prototype','1118402NtqibU','Arg','Ctx','tslib','__param','1787145dplhyM','Operato\x20Tool\x20Studio\x20Limit\x20check','design:returntype','studioPermission','556044ZeCpxs','checkStudioPermission','OperatoToolResolver','30VlLTYu','__metadata','Query','checkStudioTemplateIsOverLimit','Operato\x20Tool\x20Studio\x20Usage\x20Permissions','studioTemplateIsOverLimit','614151jVaXVm','Resolver','defineProperty'];a0_0x3c87=function(){return _0x222e33;};return a0_0x3c87();}Object[a0_0x25d2ec(0x11d)](exports,'__esModule',{'value':!0x0}),exports[a0_0x25d2ec(0x114)]=void 0x0;const tslib_1=require(a0_0x25d2ec(0x10c)),type_graphql_1=require('type-graphql'),tool_permission_1=require('./tool-permission');let OperatoToolResolver=class{async['studioPermission'](_0x251c93){const _0xf275f1=a0_0x25d2ec;return(0x0,tool_permission_1[_0xf275f1(0x113)])();}async[a0_0x25d2ec(0x11a)](_0x905dc2,_0x3a86a7){const _0x1fa1cc=a0_0x25d2ec;return(0x0,tool_permission_1[_0x1fa1cc(0x118)])(_0x905dc2,_0x3a86a7);}};tslib_1[a0_0x25d2ec(0x122)]([(0x0,type_graphql_1[a0_0x25d2ec(0x117)])(_0x3ce982=>Boolean,{'description':a0_0x25d2ec(0x119)}),tslib_1['__param'](0x0,(0x0,type_graphql_1[a0_0x25d2ec(0x10b)])()),tslib_1['__metadata']('design:type',Function),tslib_1[a0_0x25d2ec(0x116)]('design:paramtypes',[Object]),tslib_1[a0_0x25d2ec(0x116)](a0_0x25d2ec(0x110),Promise)],OperatoToolResolver[a0_0x25d2ec(0x125)],a0_0x25d2ec(0x111),null),tslib_1[a0_0x25d2ec(0x122)]([(0x0,type_graphql_1[a0_0x25d2ec(0x117)])(_0x51d90d=>Boolean,{'description':a0_0x25d2ec(0x10f)}),tslib_1[a0_0x25d2ec(0x10d)](0x0,(0x0,type_graphql_1[a0_0x25d2ec(0x10a)])('id')),tslib_1['__param'](0x1,(0x0,type_graphql_1[a0_0x25d2ec(0x10b)])()),tslib_1[a0_0x25d2ec(0x116)]('design:type',Function),tslib_1['__metadata'](a0_0x25d2ec(0x123),[String,Object]),tslib_1[a0_0x25d2ec(0x116)](a0_0x25d2ec(0x110),Promise)],OperatoToolResolver[a0_0x25d2ec(0x125)],a0_0x25d2ec(0x11a),null),OperatoToolResolver=tslib_1[a0_0x25d2ec(0x122)]([(0x0,type_graphql_1[a0_0x25d2ec(0x11c)])()],OperatoToolResolver),exports[a0_0x25d2ec(0x114)]=OperatoToolResolver;
|