@things-factory/operato-tools 6.0.121 → 6.0.122
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/actions/main.js +1 -1
- package/client/pages/generator/button-config-tab-mixin.js +4 -4
- package/client/pages/generator/column-config-tab-mixin.js +4 -4
- package/client/pages/generator/etc-config-tab-mixin.js +4 -4
- package/client/pages/generator/form-config-tab-mixin.js +4 -4
- package/client/pages/generator/graphql-config-tab-mixin.js +24 -24
- package/client/pages/generator/grid-config-tab-mixin.js +23 -23
- package/client/pages/generator/menu-config-tab-mixin.js +11 -11
- package/client/pages/generator/meta-generator-page.js +11 -11
- package/client/pages/generator/search-config-tab-mixin.js +4 -4
- package/client/pages/generator/tab-config-tab-mixin.js +4 -4
- package/client/pages/main.js +4 -4
- package/client/reducers/main.js +1 -1
- package/package.json +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_0xd97aad=a0_0x36fd;(function(_0x41fad7,_0x5c2648){const _0x15ac11=a0_0x36fd,_0x20b794=_0x41fad7();while(!![]){try{const _0x7abb45=parseInt(_0x15ac11(0x6f))/0x1+parseInt(_0x15ac11(0x73))/0x2+parseInt(_0x15ac11(0x79))/0x3*(-parseInt(_0x15ac11(0x71))/0x4)+parseInt(_0x15ac11(0x7f))/0x5*(-parseInt(_0x15ac11(0x70))/0x6)+-parseInt(_0x15ac11(0x7d))/0x7+-parseInt(_0x15ac11(0x81))/0x8*(parseInt(_0x15ac11(0x77))/0x9)+parseInt(_0x15ac11(0x7c))/0xa*(parseInt(_0x15ac11(0x76))/0xb);if(_0x7abb45===_0x5c2648)break;else _0x20b794['push'](_0x20b794['shift']());}catch(_0x27e482){_0x20b794['push'](_0x20b794['shift']());}}}(a0_0x5852,0x51eeb));Object[a0_0xd97aad(0x7a)](exports,a0_0xd97aad(0x7b),{'value':!0x0}),exports[a0_0xd97aad(0x78)]=void 0x0;function a0_0x36fd(_0x16673e,_0x1f9bb5){const _0x58522a=a0_0x5852();return a0_0x36fd=function(_0x36fd7b,_0x4733c1){_0x36fd7b=_0x36fd7b-0x6e;let _0x332f8f=_0x58522a[_0x36fd7b];return _0x332f8f;},a0_0x36fd(_0x16673e,_0x1f9bb5);}function a0_0x5852(){const _0x394dcb=['2261898rMIvNp','1114592SGdTYa','errorCode','1090774wBkMJo','detail','assign','37807ziHYez','567FtYBFC','LicenseError','6yJLvJF','defineProperty','__esModule','4000eROrVD','4609689USUwtu','ERROR_CODES','5zXRdrM','tslib','5656nIyeTh','../constants/error-code','52755AfKKlN'];a0_0x5852=function(){return _0x394dcb;};return a0_0x5852();}const tslib_1=require(a0_0xd97aad(0x80)),ERROR_CODES=tslib_1['__importStar'](require(a0_0xd97aad(0x6e)));class LicenseError extends Error{static get[a0_0xd97aad(0x7e)](){const _0x49774b=a0_0xd97aad;return Object[_0x49774b(0x75)]({},ERROR_CODES);}constructor({errorCode:_0x2d2eed,detail:_0x4c4f32}){const _0x2a50e0=a0_0xd97aad;super(_0x2d2eed),this['name']='license-error',this[_0x2a50e0(0x72)]=_0x2d2eed,this[_0x2a50e0(0x74)]=_0x4c4f32;}}exports[a0_0xd97aad(0x78)]=LicenseError;
|
package/server/routes.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a0_0x2822e1=a0_0x45d0;function a0_0x45d0(_0x34f2bd,_0x3b6871){const _0x2aa2a1=a0_0x2aa2();return a0_0x45d0=function(_0x45d0f5,_0x6e34a3){_0x45d0f5=_0x45d0f5-0x1d2;let _0x4cc4f9=_0x2aa2a1[_0x45d0f5];return _0x4cc4f9;},a0_0x45d0(_0x34f2bd,_0x3b6871);}(function(_0x1f48a3,_0x5e09ca){const _0x1d6612=a0_0x45d0,_0x244a71=_0x1f48a3();while(!![]){try{const _0x53783e=parseInt(_0x1d6612(0x1d9))/0x1*(-parseInt(_0x1d6612(0x1d7))/0x2)+-parseInt(_0x1d6612(0x1e1))/0x3*(-parseInt(_0x1d6612(0x1d2))/0x4)+parseInt(_0x1d6612(0x1d3))/0x5*(-parseInt(_0x1d6612(0x1e2))/0x6)+-parseInt(_0x1d6612(0x1e0))/0x7+-parseInt(_0x1d6612(0x1df))/0x8*(parseInt(_0x1d6612(0x1da))/0x9)+-parseInt(_0x1d6612(0x1dc))/0xa*(parseInt(_0x1d6612(0x1dd))/0xb)+-parseInt(_0x1d6612(0x1d6))/0xc*(-parseInt(_0x1d6612(0x1d5))/0xd);if(_0x53783e===_0x5e09ca)break;else _0x244a71['push'](_0x244a71['shift']());}catch(_0x41f710){_0x244a71['push'](_0x244a71['shift']());}}}(a0_0x2aa2,0x44c20));function a0_0x2aa2(){const _0x303c80=['bootstrap-module-domain-public-route','8kgzoED','2782472FCEYPu','15CpIOol','180MekjDo','327860ucZnLB','61030YXrfVm','bootstrap-module-global-private-route','39325WyHhVN','3396xJxbxy','8GRbOLc','debug','19081LyYbhd','579654spBewC','bootstrap-module-domain-private-route','20hZBmgm','439241OCMKED'];a0_0x2aa2=function(){return _0x303c80;};return a0_0x2aa2();}const debug=require(a0_0x2822e1(0x1d8))('things-factory:operato-tools:routes');process['on']('bootstrap-module-global-public-route',(_0x1ea6cb,_0x4bb718)=>{}),process['on'](a0_0x2822e1(0x1d4),(_0x5c4d67,_0x5acae4)=>{}),process['on'](a0_0x2822e1(0x1de),(_0xc218af,_0x27816b)=>{}),process['on'](a0_0x2822e1(0x1db),(_0x1b23e9,_0x282d0a)=>{});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0xcfb39a=a0_0x4862;(function(_0xc4b8a4,_0xc112b3){const _0x561b3a=a0_0x4862,_0x317886=_0xc4b8a4();while(!![]){try{const _0x4db5d7=parseInt(_0x561b3a(0xb3))/0x1*(-parseInt(_0x561b3a(0x9d))/0x2)+parseInt(_0x561b3a(0xed))/0x3+-parseInt(_0x561b3a(0xac))/0x4*(parseInt(_0x561b3a(0xfb))/0x5)+-parseInt(_0x561b3a(0xa9))/0x6*(-parseInt(_0x561b3a(0xc6))/0x7)+parseInt(_0x561b3a(0xb2))/0x8*(-parseInt(_0x561b3a(0x9b))/0x9)+parseInt(_0x561b3a(0xf5))/0xa+-parseInt(_0x561b3a(0xeb))/0xb*(-parseInt(_0x561b3a(0xdd))/0xc);if(_0x4db5d7===_0xc112b3)break;else _0x317886['push'](_0x317886['shift']());}catch(_0x5cbe24){_0x317886['push'](_0x317886['shift']());}}}(a0_0x3c0b,0x43e62));function a0_0x3c0b(){const _0xf1150e=['Ctx','checkStudioTemplateIsOverLimit','creator_id','hidden','5DTfJvv','find','\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','aes-256-ctr','createSearchCols','{\x22name\x22:\x20\x22',',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22','\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}','Mutation','gridRank','aes-256-cfb1','hex','scenario','SCREEN','{\x22type\x22:\x20\x22','createGridColumns','split','createMenuData','aes-256-cbc','\x22,\x22header\x22:\x20\x22','crypto','string','hiddenFlag','h1z0q9i9x7q6','31338FiThkK','updatedAt','106fndSwQ','toString','OperatoToolCreateMenu','template','creator','join','Menu','code','select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27','tslib','sort','@things-factory/meta-ui/client/pages/meta-grist-page','301830iHnpRr','name','aes-256-cfb8','119228SErPqe','toolCreateMenu','refName','EntityColumn','parent','parent_menu_id','824LwpWSp','5873bNvmqB','searchRank','\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','created_at','findOne','@things-factory/resource-base','dataProp','updater_id','./../tool-secret/tool-permission','enc','design:returntype','getRepository','lodash','pluralize','__decorate','left','\x20,\x22exportable\x22:\x20true','aes-256-ecb','@transaction','7BpwjHT','__metadata','reverseSort',',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22','Directive','\x22,\x22hidden\x22:','sortRank','category','length','\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}','stringify','\x22,\x22name\x22:\x20\x22','replace','resourceUrl','state','refType','randomBytes','COPY','createCipheriv','update','filter','{\x22name\x22:\x22','\x22,\x22operator\x22:\x20\x22','1972896zteZFq','searchOper','defineProperty','\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22basic\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22label\x22:\x20\x22data_history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22icon\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22logic\x22:\x20\x22history_copy\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20',',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22','menuType','__param','updated_at','__esModule','\x27\x20or\x20id\x20=\x20\x27','Entity','createSortCols','map',',\x22mandatory\x22:\x20','22AzKqwZ','type-graphql','1184460NebfTb','default','save','utf8','entity','aes-256-cfb','readonly','query','2038950MUfPdp',',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22'];a0_0x3c0b=function(){return _0xf1150e;};return a0_0x3c0b();}Object[a0_0xcfb39a(0xdf)](exports,a0_0xcfb39a(0xe5),{'value':!0x0}),exports['OperatoToolCreateMenu']=void 0x0;const tslib_1=require(a0_0xcfb39a(0xa6)),type_graphql_1=require(a0_0xcfb39a(0xec)),resource_base_1=require(a0_0xcfb39a(0xb8)),menu_base_1=require('@things-factory/menu-base'),tool_permission_1=require(a0_0xcfb39a(0xbb)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0xcfb39a(0xbf)),{plural:plural}=require(a0_0xcfb39a(0xc0)),crypto_1=tslib_1['__importDefault'](require(a0_0xcfb39a(0x10f)));let OperatoToolCreateMenu=class{async[a0_0xcfb39a(0xad)](_0x1d0ad5,_0x14ef70,_0x2dc3c6){const _0x3d49c2=a0_0xcfb39a,{domain:_0xb9ac80,user:_0x1f91ba,tx:_0xc047bb}=_0x2dc3c6[_0x3d49c2(0xd4)];await(0x0,tool_permission_1[_0x3d49c2(0xf8)])('',_0x2dc3c6);const _0x1584ea=await _0xc047bb[_0x3d49c2(0xbe)](resource_base_1[_0x3d49c2(0xe7)])[_0x3d49c2(0xb7)]({'where':{'domain':{'id':_0xb9ac80['id']},'id':_0x1d0ad5}}),_0x1dda33=await _0xc047bb[_0x3d49c2(0xbe)](resource_base_1[_0x3d49c2(0xaf)])[_0x3d49c2(0xfc)]({'where':{'domain':{'id':_0xb9ac80['id']},'entity':{'id':_0x1584ea['id']}}});let {name:_0x4dccd4=''}=_0x1584ea||{},_0x4254f5=kebabCase(_0x4dccd4),_0x57e267=modelTemplate[_0x3d49c2(0xd2)](/{{pascalCase name}}/g,startCase(camelCase(_0x4dccd4))[_0x3d49c2(0xd2)](/ /g,''))[_0x3d49c2(0xd2)](/{{camelCase name}}/g,camelCase(_0x4dccd4))[_0x3d49c2(0xd2)](/{{snakeCase name}}/g,snakeCase(_0x4dccd4))['replace'](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x4dccd4)))[_0x3d49c2(0xd2)](/ /g,''))[_0x3d49c2(0xd2)](/{{pluralCamelCase name}}/g,camelCase(plural(_0x4dccd4)))[_0x3d49c2(0xd2)](/{{name}}/g,_0x4dccd4),_0x478f29='';'JSON'==_0x1584ea[_0x3d49c2(0xb9)]?_0x478f29=_0x3d49c2(0xb5):_0x3d49c2(0xd7)==_0x1584ea['dataProp']&&(_0x478f29=_0x3d49c2(0xe0)),_0x57e267=_0x57e267[_0x3d49c2(0xd2)](/{{HistoryButton}}/g,_0x478f29);let _0xe8247f=this[_0x3d49c2(0xe8)](_0x1dda33);_0x57e267=_0x57e267['replace'](/{{SortColumns}}/g,_0xe8247f['join'](','));let _0x596204=this[_0x3d49c2(0xff)](_0x1dda33);_0x57e267=_0x57e267[_0x3d49c2(0xd2)](/{{SearchColumns}}/g,_0x596204[_0x3d49c2(0xa2)](','));let _0x44ed89=this[_0x3d49c2(0x10a)](_0x1dda33);return _0x57e267=_0x57e267[_0x3d49c2(0xd2)](/{{GridColumns}}/g,_0x44ed89[_0x3d49c2(0xa2)](',')),_0x57e267=this[_0x3d49c2(0xbc)](_0x57e267),await this[_0x3d49c2(0x10c)](_0xc047bb,_0xb9ac80,_0x1f91ba,_0x14ef70,_0x4254f5,_0x57e267),!0x0;}[a0_0xcfb39a(0x10a)](_0x43e723){const _0x282ae4=a0_0xcfb39a;return _0x43e723[_0x282ae4(0xda)](_0x12a646=>'id'!=_0x12a646['name']&&_0x12a646[_0x282ae4(0x104)]>0x0)[_0x282ae4(0xa7)](function(_0x1c4170,_0x249a70){const _0x4fc86b=_0x282ae4;return _0x1c4170[_0x4fc86b(0x104)]-_0x249a70['gridRank'];})[_0x282ae4(0xe9)](_0x4eeef3=>{const _0x33c13e=_0x282ae4;let {gridEditor:_0x495fda='string',name:_0x434048,term:_0x9cf279,gridWidth:_0x41393e=0x0,gridAlign:_0x3c006f=_0x33c13e(0xc2),nullable:_0x47b154=!0x1}=_0x4eeef3;if(null==_0x495fda&&(_0x495fda='string'),null==_0x3c006f&&(_0x3c006f=_0x33c13e(0xc2)),_0x33c13e(0xba)==_0x434048||_0x33c13e(0xf9)==_0x434048)return _0x434048='updater_id'==_0x434048?'updater':_0x33c13e(0xa1),'{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22'+_0x434048+_0x33c13e(0x10e)+_0x434048+_0x33c13e(0xcf);if(_0x33c13e(0xe4)==_0x434048||_0x33c13e(0xb6)==_0x434048)return'{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22'+(_0x33c13e(0xe4)==_0x434048?_0x33c13e(0x9c):'createdAt')+_0x33c13e(0x10e)+_0x434048+_0x33c13e(0x102);let _0x2c1384=_0x33c13e(0xf3)!=_0x495fda&&_0x33c13e(0xfa)!=_0x495fda,_0x2f0c42=_0x33c13e(0xfa)==_0x495fda;0x1!=_0x2f0c42&&0x0!=_0x2c1384||(_0x495fda=_0x33c13e(0x98));let _0x41c4f2=_0x33c13e(0x109)+_0x495fda+_0x33c13e(0xd1)+camelCase(_0x434048)+'\x22,\x22header\x22:\x20\x22'+_0x9cf279+_0x33c13e(0xcb)+_0x2f0c42+'\x20,\x22editable\x22:\x20'+_0x2c1384+_0x33c13e(0xea)+!_0x47b154+_0x33c13e(0xf6)+_0x3c006f+'\x22,\x22width\x22:'+_0x41393e+_0x33c13e(0xc3);return _0x33c13e(0xa4)==_0x4eeef3['refType']&&(_0x41c4f2+=_0x33c13e(0x101)+_0x4eeef3[_0x33c13e(0xae)]+'\x22}'),_0x33c13e(0x107)==_0x4eeef3['refType']&&(_0x41c4f2+=_0x33c13e(0xe1)+_0x4eeef3[_0x33c13e(0xae)]+'\x22}'),_0x33c13e(0xf1)==_0x4eeef3[_0x33c13e(0xd5)]&&(_0x41c4f2+=_0x33c13e(0xc9)+camelCase(plural(_0x4eeef3['refName']))+'\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}'),_0x41c4f2+='}',_0x41c4f2;});}[a0_0xcfb39a(0xff)](_0x49847e){const _0x4d0c2d=a0_0xcfb39a;return _0x49847e[_0x4d0c2d(0xda)](_0x2bec38=>_0x2bec38['searchRank']>0x0)[_0x4d0c2d(0xa7)](function(_0x44899c,_0x91cb34){const _0x7c8a4a=_0x4d0c2d;return _0x44899c[_0x7c8a4a(0xb4)]-_0x91cb34['searchRank'];})['map'](_0x5dab1a=>{const _0x520690=_0x4d0c2d;let _0x34d159=_0x5dab1a[_0x520690(0xde)];return _0x520690(0xda)==_0x34d159?'\x22'+camelCase(_0x5dab1a[_0x520690(0xaa)])+'\x22':(_0x34d159||(_0x34d159='eq'),_0x520690(0x100)+camelCase(_0x5dab1a[_0x520690(0xaa)])+_0x520690(0xdc)+_0x34d159+'\x22}');});}[a0_0xcfb39a(0xe8)](_0x1ef35f){const _0xc4c5fe=a0_0xcfb39a;return _0x1ef35f['filter'](_0x43206f=>_0x43206f['sortRank']>0x0)[_0xc4c5fe(0xa7)](function(_0x3168dc,_0x100dde){const _0x47af9d=_0xc4c5fe;return _0x3168dc[_0x47af9d(0xcc)]-_0x100dde[_0x47af9d(0xcc)];})[_0xc4c5fe(0xe9)](_0x4f46fc=>_0xc4c5fe(0xdb)+camelCase(_0x4f46fc[_0xc4c5fe(0xaa)])+'\x22,\x22desc\x22:'+_0x4f46fc[_0xc4c5fe(0xc8)]+'}');}async[a0_0xcfb39a(0x10c)](_0x309a6d,_0x59405e,_0x1fad0d,_0x4e656b,_0x182a84,_0xbfa32b){const _0x401f8c=a0_0xcfb39a;let _0x14bd0f=await _0x309a6d[_0x401f8c(0xbe)](menu_base_1[_0x401f8c(0xa3)])['findOne']({'where':{'domain':{'id':_0x59405e['id']},'id':_0x4e656b}}),_0x3dbcf7=(await _0x309a6d['getRepository'](menu_base_1['Menu'])[_0x401f8c(0xf4)](_0x401f8c(0xa5)+_0x4e656b+_0x401f8c(0xe6)+_0x4e656b+'\x27'))[0x0]['rank']+0xa,_0x3550b5=new menu_base_1['Menu']();_0x3550b5[_0x401f8c(0xaa)]=_0x182a84,_0x3550b5[_0x401f8c(0xe2)]=_0x401f8c(0x108),_0x3550b5[_0x401f8c(0xcd)]='meta-grist-page',_0x3550b5['rank']=_0x3dbcf7,_0x3550b5[_0x401f8c(0x99)]=!0x1,_0x3550b5['routing']=_0x182a84,_0x3550b5[_0x401f8c(0xa0)]=_0xbfa32b,_0x3550b5[_0x401f8c(0xd3)]=_0x401f8c(0xa8),_0x3550b5[_0x401f8c(0xb0)]=_0x14bd0f,await _0x309a6d[_0x401f8c(0xbe)](menu_base_1['Menu'])[_0x401f8c(0xef)](Object['assign'](Object['assign']({},_0x3550b5),{'domain':_0x59405e,'creator':_0x1fad0d,'updater':_0x1fad0d}));}[a0_0xcfb39a(0xbc)](_0x43353b){const _0x1255ca=a0_0xcfb39a;let _0x1dfb8c=JSON[_0x1255ca(0xd0)](_0x43353b)[_0x1255ca(0x10b)](/(.{100})/)[_0x1255ca(0xda)](_0xa9425d=>_0xa9425d),_0x587f5=[_0x1255ca(0xc4),_0x1255ca(0x10d),_0x1255ca(0xf2),_0x1255ca(0xab),_0x1255ca(0x105),'aes-256-ofb',_0x1255ca(0xfe),'aes256'],_0x3c6176=crypto_1[_0x1255ca(0xee)][_0x1255ca(0xd6)](0x20)[_0x1255ca(0x9e)](_0x1255ca(0x106)),_0xcb0c1d=Buffer['from'](_0x3c6176,'hex'),_0x274fbf=_0x3c6176['substring'](0x0,0x10),_0x4660b5=['',_0x274fbf,_0x274fbf,_0x274fbf,_0x274fbf,_0x274fbf,_0x274fbf,_0x274fbf],_0xf6a548=0x0,_0x5ed641=[];_0x5ed641['push'](_0x3c6176);for(var _0x317763=0x0;_0x317763<_0x1dfb8c[_0x1255ca(0xce)];_0x317763++,_0xf6a548++){_0xf6a548==_0x587f5[_0x1255ca(0xce)]&&(_0xf6a548=0x0);let _0x3f26d8=crypto_1['default'][_0x1255ca(0xd8)](_0x587f5[_0xf6a548],_0xcb0c1d,_0x4660b5[_0xf6a548]),_0x5098ea=_0x3f26d8[_0x1255ca(0xd9)](_0x1dfb8c[_0x317763],_0x1255ca(0xf0),'hex');_0x5098ea+=_0x3f26d8['final']('hex'),_0x5ed641['push'](_0x5098ea);}return _0x5ed641['join'](_0x1255ca(0x9a));}};function a0_0x4862(_0x4b7568,_0x464a4c){const _0x3c0b00=a0_0x3c0b();return a0_0x4862=function(_0x486299,_0x268d4b){_0x486299=_0x486299-0x98;let _0x192573=_0x3c0b00[_0x486299];return _0x192573;},a0_0x4862(_0x4b7568,_0x464a4c);}tslib_1[a0_0xcfb39a(0xc1)]([(0x0,type_graphql_1[a0_0xcfb39a(0xca)])(a0_0xcfb39a(0xc5)),(0x0,type_graphql_1[a0_0xcfb39a(0x103)])(_0x28c0af=>Boolean,{'description':'Operato\x20Tool\x20Create\x20Menu'}),tslib_1[a0_0xcfb39a(0xe3)](0x0,(0x0,type_graphql_1['Arg'])('id')),tslib_1['__param'](0x1,(0x0,type_graphql_1['Arg'])(a0_0xcfb39a(0xb1))),tslib_1[a0_0xcfb39a(0xe3)](0x2,(0x0,type_graphql_1[a0_0xcfb39a(0xf7)])()),tslib_1[a0_0xcfb39a(0xc7)]('design:type',Function),tslib_1[a0_0xcfb39a(0xc7)]('design:paramtypes',[String,String,Object]),tslib_1['__metadata'](a0_0xcfb39a(0xbd),Promise)],OperatoToolCreateMenu['prototype'],a0_0xcfb39a(0xad),null),OperatoToolCreateMenu=tslib_1['__decorate']([(0x0,type_graphql_1['Resolver'])()],OperatoToolCreateMenu),exports[a0_0xcfb39a(0x9f)]=OperatoToolCreateMenu;const modelTemplate=a0_0xcfb39a(0xfd);
|
|
1
|
+
'use strict';const a0_0x4306ec=a0_0x1322;(function(_0x212b58,_0x165b59){const _0x4a3cbd=a0_0x1322,_0x258f0d=_0x212b58();while(!![]){try{const _0x2a3164=parseInt(_0x4a3cbd(0xbd))/0x1*(-parseInt(_0x4a3cbd(0xb9))/0x2)+parseInt(_0x4a3cbd(0x98))/0x3*(parseInt(_0x4a3cbd(0xa8))/0x4)+-parseInt(_0x4a3cbd(0xc9))/0x5+-parseInt(_0x4a3cbd(0xb7))/0x6+parseInt(_0x4a3cbd(0x85))/0x7+parseInt(_0x4a3cbd(0xe1))/0x8*(-parseInt(_0x4a3cbd(0xe4))/0x9)+parseInt(_0x4a3cbd(0x83))/0xa;if(_0x2a3164===_0x165b59)break;else _0x258f0d['push'](_0x258f0d['shift']());}catch(_0x1c64a1){_0x258f0d['push'](_0x258f0d['shift']());}}}(a0_0x48f2,0x820df));function a0_0x1322(_0x3936ca,_0x1e4b5e){const _0x48f2eb=a0_0x48f2();return a0_0x1322=function(_0x1322c1,_0x24837a){_0x1322c1=_0x1322c1-0x7b;let _0x1e70ec=_0x48f2eb[_0x1322c1];return _0x1e70ec;},a0_0x1322(_0x3936ca,_0x1e4b5e);}Object[a0_0x4306ec(0xe0)](exports,'__esModule',{'value':!0x0}),exports[a0_0x4306ec(0x7d)]=void 0x0;const tslib_1=require(a0_0x4306ec(0x94)),type_graphql_1=require(a0_0x4306ec(0x8d)),resource_base_1=require(a0_0x4306ec(0x88)),menu_base_1=require(a0_0x4306ec(0x8f)),tool_permission_1=require(a0_0x4306ec(0xe6)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x4306ec(0xda)),{plural:plural}=require(a0_0x4306ec(0x91)),crypto_1=tslib_1['__importDefault'](require(a0_0x4306ec(0xb4)));let OperatoToolCreateMenu=class{async['toolCreateMenu'](_0x5465f5,_0x23e5fc,_0x5e55b6){const _0x4e4efe=a0_0x4306ec,{domain:_0x47087d,user:_0x3ec4ec,tx:_0x4d8fbd}=_0x5e55b6[_0x4e4efe(0x87)];await(0x0,tool_permission_1[_0x4e4efe(0xd6)])('',_0x5e55b6);const _0x1c24dc=await _0x4d8fbd[_0x4e4efe(0x8c)](resource_base_1[_0x4e4efe(0xa0)])[_0x4e4efe(0xe8)]({'where':{'domain':{'id':_0x47087d['id']},'id':_0x5465f5}}),_0x4da5e2=await _0x4d8fbd[_0x4e4efe(0x8c)](resource_base_1['EntityColumn'])['find']({'where':{'domain':{'id':_0x47087d['id']},'entity':{'id':_0x1c24dc['id']}}});let {name:_0x5ce5fb=''}=_0x1c24dc||{},_0x150b23=kebabCase(_0x5ce5fb),_0x1f8570=modelTemplate[_0x4e4efe(0xd5)](/{{pascalCase name}}/g,startCase(camelCase(_0x5ce5fb))[_0x4e4efe(0xd5)](/ /g,''))[_0x4e4efe(0xd5)](/{{camelCase name}}/g,camelCase(_0x5ce5fb))[_0x4e4efe(0xd5)](/{{snakeCase name}}/g,snakeCase(_0x5ce5fb))[_0x4e4efe(0xd5)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x5ce5fb)))[_0x4e4efe(0xd5)](/ /g,''))[_0x4e4efe(0xd5)](/{{pluralCamelCase name}}/g,camelCase(plural(_0x5ce5fb)))[_0x4e4efe(0xd5)](/{{name}}/g,_0x5ce5fb),_0x1a8c27='';'JSON'==_0x1c24dc[_0x4e4efe(0xdd)]?_0x1a8c27=_0x4e4efe(0x7e):_0x4e4efe(0xba)==_0x1c24dc[_0x4e4efe(0xdd)]&&(_0x1a8c27='\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22basic\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22label\x22:\x20\x22data_history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22icon\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22logic\x22:\x20\x22history_copy\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20'),_0x1f8570=_0x1f8570['replace'](/{{HistoryButton}}/g,_0x1a8c27);let _0x1b660c=this[_0x4e4efe(0x9b)](_0x4da5e2);_0x1f8570=_0x1f8570[_0x4e4efe(0xd5)](/{{SortColumns}}/g,_0x1b660c[_0x4e4efe(0xad)](','));let _0x560a3a=this[_0x4e4efe(0xc8)](_0x4da5e2);_0x1f8570=_0x1f8570[_0x4e4efe(0xd5)](/{{SearchColumns}}/g,_0x560a3a[_0x4e4efe(0xad)](','));let _0x2b84dc=this[_0x4e4efe(0x90)](_0x4da5e2);return _0x1f8570=_0x1f8570['replace'](/{{GridColumns}}/g,_0x2b84dc[_0x4e4efe(0xad)](',')),_0x1f8570=this[_0x4e4efe(0xae)](_0x1f8570),await this[_0x4e4efe(0xcc)](_0x4d8fbd,_0x47087d,_0x3ec4ec,_0x23e5fc,_0x150b23,_0x1f8570),!0x0;}[a0_0x4306ec(0x90)](_0x5d1782){const _0x48fdf2=a0_0x4306ec;return _0x5d1782['filter'](_0x4c829c=>'id'!=_0x4c829c[_0x48fdf2(0xde)]&&_0x4c829c[_0x48fdf2(0xce)]>0x0)[_0x48fdf2(0xbc)](function(_0x2d5a5c,_0x295202){const _0x557b97=_0x48fdf2;return _0x2d5a5c[_0x557b97(0xce)]-_0x295202[_0x557b97(0xce)];})['map'](_0x2e2f87=>{const _0x75f1f2=_0x48fdf2;let {gridEditor:_0x3252e1=_0x75f1f2(0xa3),name:_0x116233,term:_0x2aa49b,gridWidth:_0x17edb4=0x0,gridAlign:_0x400da4='left',nullable:_0x404fe5=!0x1}=_0x2e2f87;if(null==_0x3252e1&&(_0x3252e1=_0x75f1f2(0xa3)),null==_0x400da4&&(_0x400da4='left'),'updater_id'==_0x116233||_0x75f1f2(0xd9)==_0x116233)return _0x116233=_0x75f1f2(0xdf)==_0x116233?'updater':_0x75f1f2(0x8a),_0x75f1f2(0x80)+_0x116233+_0x75f1f2(0x92)+_0x116233+_0x75f1f2(0xc1);if(_0x75f1f2(0xe5)==_0x116233||_0x75f1f2(0xc4)==_0x116233)return _0x75f1f2(0x81)+('updated_at'==_0x116233?_0x75f1f2(0xaa):_0x75f1f2(0x9c))+'\x22,\x22header\x22:\x20\x22'+_0x116233+'\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}';let _0x5b146a=_0x75f1f2(0xcb)!=_0x3252e1&&_0x75f1f2(0xac)!=_0x3252e1,_0x2e9707=_0x75f1f2(0xac)==_0x3252e1;0x1!=_0x2e9707&&0x0!=_0x5b146a||(_0x3252e1=_0x75f1f2(0xa3));let _0x57a1bd='{\x22type\x22:\x20\x22'+_0x3252e1+_0x75f1f2(0xc0)+camelCase(_0x116233)+_0x75f1f2(0x92)+_0x2aa49b+'\x22,\x22hidden\x22:'+_0x2e9707+'\x20,\x22editable\x22:\x20'+_0x5b146a+_0x75f1f2(0xc5)+!_0x404fe5+_0x75f1f2(0x7c)+_0x400da4+_0x75f1f2(0xdc)+_0x17edb4+_0x75f1f2(0xb2);return _0x75f1f2(0xc3)==_0x2e2f87[_0x75f1f2(0xd2)]&&(_0x57a1bd+=_0x75f1f2(0xa7)+_0x2e2f87['refName']+'\x22}'),_0x75f1f2(0xe3)==_0x2e2f87[_0x75f1f2(0xd2)]&&(_0x57a1bd+=_0x75f1f2(0x9d)+_0x2e2f87[_0x75f1f2(0xbe)]+'\x22}'),_0x75f1f2(0x84)==_0x2e2f87[_0x75f1f2(0xd2)]&&(_0x57a1bd+=_0x75f1f2(0xa1)+camelCase(plural(_0x2e2f87['refName']))+_0x75f1f2(0xb3)),_0x57a1bd+='}',_0x57a1bd;});}[a0_0x4306ec(0xc8)](_0x34248b){const _0x4d1e11=a0_0x4306ec;return _0x34248b[_0x4d1e11(0x7f)](_0x58eef6=>_0x58eef6[_0x4d1e11(0xdb)]>0x0)[_0x4d1e11(0xbc)](function(_0x521408,_0x25f5b4){const _0x1507f1=_0x4d1e11;return _0x521408[_0x1507f1(0xdb)]-_0x25f5b4['searchRank'];})['map'](_0xa28f69=>{const _0x1b91b6=_0x4d1e11;let _0x627e08=_0xa28f69[_0x1b91b6(0xd8)];return _0x1b91b6(0x7f)==_0x627e08?'\x22'+camelCase(_0xa28f69[_0x1b91b6(0xde)])+'\x22':(_0x627e08||(_0x627e08='eq'),_0x1b91b6(0xa6)+camelCase(_0xa28f69[_0x1b91b6(0xde)])+_0x1b91b6(0x8e)+_0x627e08+'\x22}');});}[a0_0x4306ec(0x9b)](_0x539f1c){const _0x503e1a=a0_0x4306ec;return _0x539f1c['filter'](_0x1e7563=>_0x1e7563['sortRank']>0x0)[_0x503e1a(0xbc)](function(_0x4124fa,_0x592c2b){return _0x4124fa['sortRank']-_0x592c2b['sortRank'];})['map'](_0x48f01b=>'{\x22name\x22:\x22'+camelCase(_0x48f01b['name'])+_0x503e1a(0xc6)+_0x48f01b[_0x503e1a(0xcd)]+'}');}async[a0_0x4306ec(0xcc)](_0x5b5838,_0x562306,_0x187866,_0x382b09,_0x27482b,_0x3bf372){const _0x13de54=a0_0x4306ec;let _0x5d2765=await _0x5b5838[_0x13de54(0x8c)](menu_base_1[_0x13de54(0xd1)])[_0x13de54(0xe8)]({'where':{'domain':{'id':_0x562306['id']},'id':_0x382b09}}),_0x54b6a4=(await _0x5b5838[_0x13de54(0x8c)](menu_base_1['Menu'])[_0x13de54(0xe9)]('select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27'+_0x382b09+'\x27\x20or\x20id\x20=\x20\x27'+_0x382b09+'\x27'))[0x0]['rank']+0xa,_0x2db6be=new menu_base_1['Menu']();_0x2db6be['name']=_0x27482b,_0x2db6be[_0x13de54(0xb6)]=_0x13de54(0xd0),_0x2db6be['category']='meta-grist-page',_0x2db6be[_0x13de54(0xb5)]=_0x54b6a4,_0x2db6be[_0x13de54(0xeb)]=!0x1,_0x2db6be['routing']=_0x27482b,_0x2db6be[_0x13de54(0xbb)]=_0x3bf372,_0x2db6be[_0x13de54(0xc7)]='@things-factory/meta-ui/client/pages/meta-grist-page',_0x2db6be[_0x13de54(0x82)]=_0x5d2765,await _0x5b5838[_0x13de54(0x8c)](menu_base_1[_0x13de54(0xd1)])[_0x13de54(0x9f)](Object[_0x13de54(0xe2)](Object[_0x13de54(0xe2)]({},_0x2db6be),{'domain':_0x562306,'creator':_0x187866,'updater':_0x187866}));}[a0_0x4306ec(0xae)](_0x434889){const _0x4bd80f=a0_0x4306ec;let _0x523f2a=JSON[_0x4bd80f(0xaf)](_0x434889)[_0x4bd80f(0xa9)](/(.{100})/)['filter'](_0x130983=>_0x130983),_0x3e75b1=[_0x4bd80f(0xd7),_0x4bd80f(0x99),'aes-256-cfb','aes-256-cfb8',_0x4bd80f(0x9a),_0x4bd80f(0x96),'aes-256-ctr','aes256'],_0x4804e3=crypto_1[_0x4bd80f(0x7b)][_0x4bd80f(0x9e)](0x20)[_0x4bd80f(0x86)]('hex'),_0x4b8126=Buffer[_0x4bd80f(0xb8)](_0x4804e3,_0x4bd80f(0xd4)),_0x4f2c3b=_0x4804e3[_0x4bd80f(0xb1)](0x0,0x10),_0x410fe0=['',_0x4f2c3b,_0x4f2c3b,_0x4f2c3b,_0x4f2c3b,_0x4f2c3b,_0x4f2c3b,_0x4f2c3b],_0x13fb52=0x0,_0x2a02e4=[];_0x2a02e4['push'](_0x4804e3);for(var _0x2d4e2c=0x0;_0x2d4e2c<_0x523f2a['length'];_0x2d4e2c++,_0x13fb52++){_0x13fb52==_0x3e75b1[_0x4bd80f(0xe7)]&&(_0x13fb52=0x0);let _0x39cd74=crypto_1['default'][_0x4bd80f(0xa2)](_0x3e75b1[_0x13fb52],_0x4b8126,_0x410fe0[_0x13fb52]),_0x3470d4=_0x39cd74[_0x4bd80f(0x8b)](_0x523f2a[_0x2d4e2c],_0x4bd80f(0xc2),_0x4bd80f(0xd4));_0x3470d4+=_0x39cd74[_0x4bd80f(0xa4)]('hex'),_0x2a02e4['push'](_0x3470d4);}return _0x2a02e4[_0x4bd80f(0xad)](_0x4bd80f(0xea));}};tslib_1['__decorate']([(0x0,type_graphql_1['Directive'])('@transaction'),(0x0,type_graphql_1['Mutation'])(_0x5d8ece=>Boolean,{'description':'Operato\x20Tool\x20Create\x20Menu'}),tslib_1[a0_0x4306ec(0x95)](0x0,(0x0,type_graphql_1[a0_0x4306ec(0xa5)])('id')),tslib_1[a0_0x4306ec(0x95)](0x1,(0x0,type_graphql_1[a0_0x4306ec(0xa5)])(a0_0x4306ec(0xd3))),tslib_1[a0_0x4306ec(0x95)](0x2,(0x0,type_graphql_1[a0_0x4306ec(0xca)])()),tslib_1[a0_0x4306ec(0xbf)](a0_0x4306ec(0xb0),Function),tslib_1[a0_0x4306ec(0xbf)]('design:paramtypes',[String,String,Object]),tslib_1[a0_0x4306ec(0xbf)](a0_0x4306ec(0x93),Promise)],OperatoToolCreateMenu[a0_0x4306ec(0xab)],a0_0x4306ec(0x97),null),OperatoToolCreateMenu=tslib_1[a0_0x4306ec(0xcf)]([(0x0,type_graphql_1['Resolver'])()],OperatoToolCreateMenu),exports[a0_0x4306ec(0x7d)]=OperatoToolCreateMenu;const modelTemplate=a0_0x4306ec(0x89);function a0_0x48f2(){const _0x11fde3=['createSearchCols','4377145guxShM','Ctx','readonly','createMenuData','reverseSort','gridRank','__decorate','SCREEN','Menu','refType','parent_menu_id','hex','replace','checkStudioTemplateIsOverLimit','aes-256-ecb','searchOper','creator_id','lodash','searchRank','\x22,\x22width\x22:','dataProp','name','updater_id','defineProperty','8shEyKW','assign','scenario','4835574MjvbiN','updated_at','./../tool-secret/tool-permission','length','findOne','query','h1z0q9i9x7q6','hiddenFlag','default',',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22','OperatoToolCreateMenu','\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22basic\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22label\x22:\x20\x22data_history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22icon\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22logic\x22:\x20\x22history_json\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20','filter','{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22','{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22','parent','16660950IVgyFp','entity','785799tWxmFD','toString','state','@things-factory/resource-base','\x0a{\x0a\x20\x20\x22menu\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x22title\x22:\x20\x22{{name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22\x22,\x0a\x20\x20\x20\x20\x20\x20\x22desc\x22:\x20\x22\x22\x0a\x20\x20},\x0a\x20\x20\x22gql\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x22query\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22list_func\x22:\x20\x22{{pluralCamelCase\x20name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22find_one_func\x22:\x22{{camelCase\x20name}}\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x22mutation\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22multiple\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22func\x22:\x22updateMultiple{{pascalCase\x20name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22{{pascalCase\x20name}}Patch\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22delete\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22func\x22:\x22delete{{pluralPascalCase\x20name}}\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20},\x0a\x20\x20\x22button\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22export\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22add\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22delete\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22save\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20],\x0a\x20\x20\x22grid_column\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22string\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22id\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22header\x22:\x20\x22id\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22hidden\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22editable\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22mandatory\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22sortable\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22align\x22:\x20\x22left\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22width\x22:\x200,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22exportable\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20},\x0a{{GridColumns}}\x0a\x20\x20],\x0a\x20\x20\x22grid\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22button\x22:[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{{HistoryButton}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22option\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22mobile_mode\x22:\x20\x22LIST\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22desk_mode\x22:\x20\x22GRID\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22use_row_checker\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22pages\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2020,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2050,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20100,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20300\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22view_mode\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22GRID\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22LIST\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22CARD\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22sorters\x22:\x20[\x0a{{SortColumns}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20]\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x22row\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22multiple_select\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22click\x22:\x20\x22select-row-toggle\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20},\x0a\x20\x20\x22search\x22:\x20[\x0a{{SearchColumns}}\x0a\x20\x20]\x0a}\x0a','creator','update','getRepository','type-graphql','\x22,\x22operator\x22:\x20\x22','@things-factory/menu-base','createGridColumns','pluralize','\x22,\x22header\x22:\x20\x22','design:returntype','tslib','__param','aes-256-ofb','toolCreateMenu','3nEWkEO','aes-256-cbc','aes-256-cfb1','createSortCols','createdAt',',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22','randomBytes','save','Entity',',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22','createCipheriv','string','final','Arg','{\x22name\x22:\x20\x22',',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22','3863388QHLOYU','split','updatedAt','prototype','hidden','join','enc','stringify','design:type','substring','\x20,\x22exportable\x22:\x20true','\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}','crypto','rank','menuType','556788dTIImp','from','38gxquUt','COPY','template','sort','37157PWhEKl','refName','__metadata','\x22,\x22name\x22:\x20\x22','\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}','utf8','code','created_at',',\x22mandatory\x22:\x20','\x22,\x22desc\x22:','resourceUrl'];a0_0x48f2=function(){return _0x11fde3;};return a0_0x48f2();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x2e26f6=a0_0x5c8d;function a0_0x1a54(){const _0x54c7fe=['dataProp',',length:','\x0a\x20\x20','Operato\x20Tool\x20Create\x20Service','replaceNamesMap','Resolver','existsPath','bigint','state','@Column({name:\x27','EntityColumn','Query','readFileSync','6419394CAQaIG','createTypeText','map','indexOf','mkdirSync','/*\x20ENTITIES\x20*/\x0a\x09...','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20Domain\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0a@Entity(\x27{{tableName}}\x27)\x0a{{indexAnn}}\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}\x20{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','\x0aimport\x20{\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','createServicePath','EntitySubscribers,','find','index.ts','created_at','getRepository','5307185tiTsmB','string','updater_id','updated_at','name','createServiceFiles','getProjectRootPath','.ts','Date','design:returntype','\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','design:paramtypes','replace','toolCreateService','/event-subscriber.ts','EntitySubscribers\x20}\x20from\x20\x27./','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','Resolvers\x20}\x20from\x20\x27./','type-graphql','\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','timestamp\x20without\x20time\x20zone','\x27,\x20nullable:\x20','Int','3434606rIFPBN','number','Entities,','design:type','findOne','double','writeFile','@things-factory/shell','Ctx','Resolvers,','COPY','\x27,\x20type:\x20\x27','/server','decimal','\x20{\x20nullable:\x20','date','integer','domain','JSON','Entities,\x20resolvers\x20as\x20','tableName','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','1116rhvzPn','env','pascalCaseName','float','Resolvers,\x20subscribers\x20as\x20','{{camelCase\x20name}}.','creator','colType','datetime','\x20})','includes','character\x20varying','\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','export\x20*\x20from\x20\x27./','1025170PDfrmv','-history-type.ts','push','getFieldType','createDir','-history\x27','creator_id','@things-factory/resource-base','camelCaseName','\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','-history-query.ts','\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}List\x20}\x20from\x20\x27./{{name}}-type\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Query\x20{\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20fetch\x20a\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20return\x20await\x20getRepository({{pascalCase\x20name}}).findOne({\x0a\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20}\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}List,\x20{\x20description:\x20\x27To\x20fetch\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{pluralCamelCase\x20name}}(@Args()\x20params:\x20ListParam,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}List>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20queryBuilder\x20=\x20getQueryBuilderFromListParams({\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20params,\x0a\x20\x20\x20\x20\x20\x20repository:\x20await\x20getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20const\x20convertedParams\x20=\x20convertListParams(params,\x20domain.id)\x0a\x20\x20\x20\x20const\x20[items,\x20total]\x20=\x20await\x20queryBuilder.getManyAndCount()\x0a\x0a\x20\x20\x20\x20return\x20{\x20items,\x20total\x20}\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20Domain)\x0a\x20\x20async\x20domain(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<Domain>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(Domain).findOneBy({id:{{camelCase\x20name}}.domainId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20updater(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.updaterId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20creator(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.creatorId})\x0a\x20\x20}\x0a}\x0a','join','-type.ts','33452040CJGXfO','\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','/service','pluralCamelCaseName','getColTxtType','split','sort','double\x20precision','type\x20=>','filter','nullable','utf8','-mutation.ts','lodash','\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','createHistoryServiceFiles','Float','OperatoToolCreateService','uniqRank','rank','...','12417fhyYTj','-query.ts','@Field(','626590HGGAUh','createHistoryEntityText','\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','/server/service/','/index.ts','tslib','columnToEntityColumn','createEntityText','length','import\x20{\x20entities\x20as\x20','createNoHistoryServiceFiels','\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','__metadata','long','prototype','__decorate','\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201','pluralPascalCaseName','defineProperty','-history.ts','\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}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'];a0_0x1a54=function(){return _0x54c7fe;};return a0_0x1a54();}function a0_0x5c8d(_0x3ef8fc,_0x4571d3){const _0x1a543f=a0_0x1a54();return a0_0x5c8d=function(_0x5c8d1a,_0x30f408){_0x5c8d1a=_0x5c8d1a-0x1be;let _0x4693c3=_0x1a543f[_0x5c8d1a];return _0x4693c3;},a0_0x5c8d(_0x3ef8fc,_0x4571d3);}(function(_0x5ad149,_0x1ed0cc){const _0x3efa4d=a0_0x5c8d,_0x3e0e15=_0x5ad149();while(!![]){try{const _0x3e041b=-parseInt(_0x3efa4d(0x20c))/0x1+parseInt(_0x3efa4d(0x232))/0x2+parseInt(_0x3efa4d(0x22f))/0x3*(-parseInt(_0x3efa4d(0x1fe))/0x4)+-parseInt(_0x3efa4d(0x1d1))/0x5+-parseInt(_0x3efa4d(0x1c2))/0x6+parseInt(_0x3efa4d(0x1e8))/0x7+parseInt(_0x3efa4d(0x21a))/0x8;if(_0x3e041b===_0x1ed0cc)break;else _0x3e0e15['push'](_0x3e0e15['shift']());}catch(_0x27a19d){_0x3e0e15['push'](_0x3e0e15['shift']());}}}(a0_0x1a54,0xa497b));Object[a0_0x2e26f6(0x244)](exports,'__esModule',{'value':!0x0}),exports[a0_0x2e26f6(0x22b)]=void 0x0;const tslib_1=require(a0_0x2e26f6(0x237)),type_graphql_1=require(a0_0x2e26f6(0x1e3)),shell_1=require(a0_0x2e26f6(0x1ef)),resource_base_1=require(a0_0x2e26f6(0x213)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x2e26f6(0x227)),{plural:plural}=require('pluralize'),fs=require('fs');let OperatoToolCreateService=class{async[a0_0x2e26f6(0x1de)](_0x161492,_0x553763){const _0x52a6ba=a0_0x2e26f6,{domain:_0x2d61a3}=_0x553763[_0x52a6ba(0x24f)],_0xb887e7=await(0x0,shell_1['getRepository'])(resource_base_1['Entity'])[_0x52a6ba(0x1ec)]({'where':{'id':_0x161492}}),_0x51d382=await(0x0,shell_1[_0x52a6ba(0x1d0)])(resource_base_1[_0x52a6ba(0x1bf)])[_0x52a6ba(0x1cd)]({'where':{'domain':{'id':_0x2d61a3['id']},'entity':{'id':_0xb887e7['id']}}});let {name:_0x542387='',bundle:_0x154218=''}=_0xb887e7||{},_0x412143=this[_0x52a6ba(0x1d7)](),_0x578954=kebabCase(_0x542387);return await this[_0x52a6ba(0x1cb)](_0x412143,_0x154218,_0x578954),await this[_0x52a6ba(0x1d6)](_0x412143,_0x154218,_0x542387,_0x578954,_0xb887e7,_0x51d382),!0x0;}async[a0_0x2e26f6(0x1d6)](_0x5c37b0,_0x53d23b,_0x57b20e,_0x52c2dd,_0xfa5b71,_0x25f754){const _0x1f7736=a0_0x2e26f6;let _0x2a4a9d={'name':_0x52c2dd,'tableName':_0xfa5b71[_0x1f7736(0x1fc)],'pascalCaseName':startCase(camelCase(_0x57b20e))['replace'](/ /g,''),'camelCaseName':camelCase(_0x57b20e),'snakeCaseName':snakeCase(_0x57b20e),'pluralPascalCaseName':startCase(camelCase(plural(_0x57b20e)))[_0x1f7736(0x1dd)](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x57b20e))},_0x2b3aea=_0x5c37b0+'/packages/'+_0x53d23b+_0x1f7736(0x235);[_0x1f7736(0x1fa),_0x1f7736(0x1f2)][_0x1f7736(0x208)](_0xfa5b71[_0x1f7736(0x247)])?await this[_0x1f7736(0x229)](_0x2b3aea,_0x52c2dd,_0xfa5b71,_0x25f754,_0x2a4a9d):await this[_0x1f7736(0x23c)](_0x2b3aea,_0x52c2dd,_0xfa5b71,_0x25f754,_0x2a4a9d);}async['createHistoryServiceFiles'](_0xf6707c,_0x4a2c36,_0x12d0fe,_0x1c3574,_0x3a839a){const _0xddf5f8=a0_0x2e26f6;await this[_0xddf5f8(0x1ee)](_0xf6707c+(_0x4a2c36+'/index.ts'),serviceHistoryIndex,_0x3a839a);let _0x59bd5e=this['createEntityText'](_0x12d0fe,_0x1c3574);await this[_0xddf5f8(0x1ee)](_0xf6707c+(_0x4a2c36+'/'+_0x4a2c36+_0xddf5f8(0x1d8)),_0x59bd5e,_0x3a839a),await this[_0xddf5f8(0x1ee)](_0xf6707c+(_0x4a2c36+'/'+_0x4a2c36+_0xddf5f8(0x230)),serviceQuery,_0x3a839a),await this[_0xddf5f8(0x1ee)](_0xf6707c+(_0x4a2c36+'/'+_0x4a2c36+'-mutation.ts'),serviceMutation,_0x3a839a);let _0x567927=this[_0xddf5f8(0x1c3)](_0x1c3574);await this[_0xddf5f8(0x1ee)](_0xf6707c+(_0x4a2c36+'/'+_0x4a2c36+_0xddf5f8(0x219)),_0x567927,_0x3a839a);let _0x3411b7=this['createHistoryEntityText'](_0x12d0fe,_0x1c3574);await this[_0xddf5f8(0x1ee)](_0xf6707c+(_0x4a2c36+'/'+_0x4a2c36+_0xddf5f8(0x245)),_0x3411b7,_0x3a839a);let _0x303784='';_0xddf5f8(0x1fa)==_0x12d0fe[_0xddf5f8(0x247)]?(_0x303784=_0xddf5f8(0x1e4),await this['writeFile'](_0xf6707c+(_0x4a2c36+_0xddf5f8(0x1df)),serviceEntitySubscriber,_0x3a839a)):_0x303784='';let _0x55dc49=serviceEntitySubscriber['replace'](/{{entityToJson}}/g,_0x303784);await this[_0xddf5f8(0x1ee)](_0xf6707c+(_0x4a2c36+_0xddf5f8(0x1df)),_0x55dc49,_0x3a839a),await this[_0xddf5f8(0x1ee)](_0xf6707c+(_0x4a2c36+'/'+_0x4a2c36+_0xddf5f8(0x216)),serviceHistoryQuery,_0x3a839a),await this[_0xddf5f8(0x1ee)](_0xf6707c+(_0x4a2c36+'/'+_0x4a2c36+_0xddf5f8(0x20d)),sereviceHistoryType,_0x3a839a);let _0x166033=_0xf6707c+_0xddf5f8(0x1ce);0x0==await this[_0xddf5f8(0x24d)](_0x166033)&&await this[_0xddf5f8(0x1ee)](_0x166033,allIndex,_0x3a839a);let _0x4b3541=await fs['readFileSync'](_0x166033,_0xddf5f8(0x225));_0x4b3541[_0xddf5f8(0x1c5)](_0xddf5f8(0x20b)+_0x3a839a[_0xddf5f8(0x1d5)]+'/'+_0x3a839a[_0xddf5f8(0x1d5)]+_0xddf5f8(0x211))<0x0&&(_0x4b3541=_0x4b3541[_0xddf5f8(0x1dd)](/\/\* EXPORT ENTITY TYPES \*\//,_0xddf5f8(0x1c8)+_0x3a839a[_0xddf5f8(0x1d5)]+'/'+_0x3a839a[_0xddf5f8(0x1d5)]+'-history\x27')),_0x4b3541[_0xddf5f8(0x1c5)](_0xddf5f8(0x20b)+_0x3a839a[_0xddf5f8(0x1d5)]+'/'+_0x3a839a[_0xddf5f8(0x1d5)]+'\x27')<0x0&&(_0x4b3541=_0x4b3541['replace'](/\/\* EXPORT ENTITY TYPES \*\//,_0xddf5f8(0x1c8)+_0x3a839a['name']+'/'+_0x3a839a[_0xddf5f8(0x1d5)]+'\x27')),_0x4b3541['indexOf'](_0xddf5f8(0x23b)+_0x3a839a['pascalCaseName']+_0xddf5f8(0x1fb)+_0x3a839a[_0xddf5f8(0x200)]+_0xddf5f8(0x202)+_0x3a839a['pascalCaseName']+'EntitySubscribers\x20}\x20from\x20\x27./'+_0x3a839a[_0xddf5f8(0x1d5)]+'\x27')<0x0&&(_0x4b3541=_0x4b3541[_0xddf5f8(0x1dd)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0xddf5f8(0x1e1)+_0x3a839a[_0xddf5f8(0x200)]+_0xddf5f8(0x1fb)+_0x3a839a['pascalCaseName']+_0xddf5f8(0x202)+_0x3a839a[_0xddf5f8(0x200)]+_0xddf5f8(0x1e0)+_0x3a839a[_0xddf5f8(0x1d5)]+'\x27')),_0x4b3541[_0xddf5f8(0x1c5)](_0xddf5f8(0x22e)+_0x3a839a[_0xddf5f8(0x200)]+_0xddf5f8(0x1ea))<0x0&&(_0x4b3541=_0x4b3541[_0xddf5f8(0x1dd)](/\/\* ENTITIES \*\//,_0xddf5f8(0x1c7)+_0x3a839a['pascalCaseName']+_0xddf5f8(0x1ea))),_0x4b3541[_0xddf5f8(0x1c5)](_0xddf5f8(0x22e)+_0x3a839a[_0xddf5f8(0x200)]+_0xddf5f8(0x1f1))<0x0&&(_0x4b3541=_0x4b3541[_0xddf5f8(0x1dd)](/\/\* RESOLVER CLASSES \*\//,_0xddf5f8(0x1fd)+_0x3a839a['pascalCaseName']+'Resolvers,')),_0x4b3541['indexOf']('...'+_0x3a839a[_0xddf5f8(0x200)]+_0xddf5f8(0x1cc))<0x0&&(_0x4b3541=_0x4b3541[_0xddf5f8(0x1dd)](/\/\* SUBSCRIBERS \*\//,'/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...'+_0x3a839a[_0xddf5f8(0x200)]+_0xddf5f8(0x1cc))),await this[_0xddf5f8(0x1ee)](_0x166033,_0x4b3541,_0x3a839a);}async[a0_0x2e26f6(0x23c)](_0x38de2a,_0x23874a,_0x154016,_0x48bba4,_0x1d8e53){const _0x36e169=a0_0x2e26f6;await this[_0x36e169(0x1ee)](_0x38de2a+(_0x23874a+_0x36e169(0x236)),serviceIndex,_0x1d8e53),await this[_0x36e169(0x1ee)](_0x38de2a+(_0x23874a+'/'+_0x23874a+_0x36e169(0x230)),serviceQuery,_0x1d8e53),await this[_0x36e169(0x1ee)](_0x38de2a+(_0x23874a+'/'+_0x23874a+_0x36e169(0x226)),serviceMutation,_0x1d8e53);let _0xfb791c=this[_0x36e169(0x239)](_0x154016,_0x48bba4);await this[_0x36e169(0x1ee)](_0x38de2a+(_0x23874a+'/'+_0x23874a+_0x36e169(0x1d8)),_0xfb791c,_0x1d8e53);let _0x452086=this[_0x36e169(0x1c3)](_0x48bba4);await this[_0x36e169(0x1ee)](_0x38de2a+(_0x23874a+'/'+_0x23874a+'-type.ts'),_0x452086,_0x1d8e53);let _0x4190b6=_0x38de2a+_0x36e169(0x1ce);0x0==await this[_0x36e169(0x24d)](_0x4190b6)&&await this[_0x36e169(0x1ee)](_0x4190b6,allIndex,_0x1d8e53);let _0x59407c=await fs[_0x36e169(0x1c1)](_0x4190b6,'utf8');_0x59407c['indexOf'](_0x36e169(0x20b)+_0x1d8e53[_0x36e169(0x1d5)]+'/'+_0x1d8e53['name']+'\x27')<0x0&&(_0x59407c=_0x59407c[_0x36e169(0x1dd)](/\/\* EXPORT ENTITY TYPES \*\//,_0x36e169(0x1c8)+_0x1d8e53[_0x36e169(0x1d5)]+'/'+_0x1d8e53[_0x36e169(0x1d5)]+'\x27')),_0x59407c[_0x36e169(0x1c5)]('import\x20{\x20entities\x20as\x20'+_0x1d8e53[_0x36e169(0x200)]+_0x36e169(0x1fb)+_0x1d8e53[_0x36e169(0x200)]+_0x36e169(0x1e2)+_0x1d8e53[_0x36e169(0x1d5)]+'\x27')<0x0&&(_0x59407c=_0x59407c[_0x36e169(0x1dd)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,'/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20'+_0x1d8e53[_0x36e169(0x200)]+_0x36e169(0x1fb)+_0x1d8e53[_0x36e169(0x200)]+_0x36e169(0x1e2)+_0x1d8e53[_0x36e169(0x1d5)]+'\x27')),_0x59407c['indexOf'](_0x36e169(0x22e)+_0x1d8e53['pascalCaseName']+'Entities,')<0x0&&(_0x59407c=_0x59407c[_0x36e169(0x1dd)](/\/\* ENTITIES \*\//,_0x36e169(0x1c7)+_0x1d8e53[_0x36e169(0x200)]+'Entities,')),_0x59407c[_0x36e169(0x1c5)](_0x36e169(0x22e)+_0x1d8e53[_0x36e169(0x200)]+_0x36e169(0x1f1))<0x0&&(_0x59407c=_0x59407c[_0x36e169(0x1dd)](/\/\* RESOLVER CLASSES \*\//,_0x36e169(0x1fd)+_0x1d8e53[_0x36e169(0x200)]+_0x36e169(0x1f1))),await this[_0x36e169(0x1ee)](_0x4190b6,_0x59407c,_0x1d8e53);}[a0_0x2e26f6(0x1c3)](_0x4b535f){const _0x127f6f=a0_0x2e26f6;let _0x3e4782=sereviceType,_0x21e6e8=_0x4b535f[_0x127f6f(0x1c4)](_0x58f056=>{const _0x863d05=_0x127f6f;if('id'==_0x58f056['name'])return'';if('domain_id'==_0x58f056['name'])return'';if(_0x863d05(0x1cf)==_0x58f056[_0x863d05(0x1d5)])return'';if('updated_at'==_0x58f056[_0x863d05(0x1d5)])return'';if('creator_id'==_0x58f056[_0x863d05(0x1d5)])return'';if(_0x863d05(0x1d3)==_0x58f056[_0x863d05(0x1d5)])return'';let _0x164143=this[_0x863d05(0x20f)](_0x58f056),_0x55f48e=this[_0x863d05(0x21e)](_0x58f056),_0x1359ef=camelCase(_0x58f056[_0x863d05(0x1d5)]);return'\x20\x20'+(_0x863d05(0x231)+(0x0==_0x164143[_0x863d05(0x23a)]?'':_0x863d05(0x222)+_0x164143+',')+_0x863d05(0x1f6)+_0x58f056[_0x863d05(0x224)]+_0x863d05(0x207))+_0x863d05(0x249)+(''+_0x1359ef+(_0x58f056[_0x863d05(0x224)]?'?':'')+':\x20'+_0x55f48e)+'\x0a';});_0x3e4782=_0x3e4782['replace'](/{{newTypeColumns}}/g,_0x21e6e8[_0x127f6f(0x218)]('\x0a'));let _0x5eb631=_0x4b535f[_0x127f6f(0x1c4)](_0x23d6ce=>{const _0x48208f=_0x127f6f;if('id'==_0x23d6ce[_0x48208f(0x1d5)])return'';if('domain_id'==_0x23d6ce[_0x48208f(0x1d5)])return'';if(_0x48208f(0x1cf)==_0x23d6ce[_0x48208f(0x1d5)])return'';if('updated_at'==_0x23d6ce[_0x48208f(0x1d5)])return'';if(_0x48208f(0x212)==_0x23d6ce[_0x48208f(0x1d5)])return'';if('updater_id'==_0x23d6ce[_0x48208f(0x1d5)])return'';let _0xe78400=this[_0x48208f(0x20f)](_0x23d6ce),_0x1dc590=this[_0x48208f(0x21e)](_0x23d6ce);_0x23d6ce[_0x48208f(0x224)]=!0x0;let _0x4d379d=camelCase(_0x23d6ce[_0x48208f(0x1d5)]);return'\x20\x20'+('@Field('+(0x0==_0xe78400[_0x48208f(0x23a)]?'':'type\x20=>'+_0xe78400+',')+_0x48208f(0x1f6)+_0x23d6ce['nullable']+'\x20})')+_0x48208f(0x249)+(''+_0x4d379d+(_0x23d6ce[_0x48208f(0x224)]?'?':'')+':\x20'+_0x1dc590)+'\x0a';});return _0x3e4782=_0x3e4782['replace'](/{{patchTypeColumns}}/g,_0x5eb631[_0x127f6f(0x218)]('\x0a')),_0x3e4782;}[a0_0x2e26f6(0x239)](_0x29f484,_0x3d4d82){const _0x22c695=a0_0x2e26f6;let _0x24af15=serviceEntity,_0x1a57bb=_0x3d4d82['sort'](function(_0x20f719,_0x37d15a){const _0x85706c=a0_0x5c8d;return _0x20f719['rank']-_0x37d15a[_0x85706c(0x22d)];})[_0x22c695(0x1c4)](_0x3eb76d=>this[_0x22c695(0x238)](_0x3eb76d));[_0x22c695(0x1f2),'JSON'][_0x22c695(0x208)](_0x29f484['dataProp'])&&_0x1a57bb[_0x22c695(0x20e)](_0x22c695(0x242)),_0x24af15=_0x24af15['replace'](/{{entityColumns}}/g,_0x1a57bb[_0x22c695(0x218)]('\x0a'));let _0x14710c='',_0x12e8e7=_0x3d4d82[_0x22c695(0x223)](_0x57d5a3=>_0x57d5a3['uniqRank']&&_0x57d5a3[_0x22c695(0x22c)]>0x0)[_0x22c695(0x220)](function(_0x105efe,_0x1adc74){const _0x2751d0=_0x22c695;return _0x105efe[_0x2751d0(0x22c)]-_0x1adc74[_0x2751d0(0x22c)];});if(_0x12e8e7[_0x22c695(0x23a)]>0x0){_0x14710c='@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})';let _0x1e03d0=_0x12e8e7[_0x22c695(0x1c4)](_0x541270=>{const _0x5dca6b=_0x22c695;let _0x117549=_0x541270[_0x5dca6b(0x1d5)];return'domain_id'==_0x541270[_0x5dca6b(0x1d5)]&&(_0x117549=_0x5dca6b(0x1f9)),'creator_id'==_0x541270[_0x5dca6b(0x1d5)]&&(_0x117549=_0x5dca6b(0x204)),'updater_id'==_0x541270[_0x5dca6b(0x1d5)]&&(_0x117549='updater'),_0x5dca6b(0x203)+camelCase(_0x117549);});_0x14710c=_0x14710c[_0x22c695(0x1dd)](/{{indexColumns}}/g,_0x1e03d0[_0x22c695(0x218)](','));}return _0x24af15=_0x24af15[_0x22c695(0x1dd)](/{{indexAnn}}/g,_0x14710c),_0x24af15;}[a0_0x2e26f6(0x233)](_0x5f4447,_0x6b63df){const _0x422fda=a0_0x2e26f6;let _0x1c0164=_0x422fda(0x1fa)==_0x5f4447['dataProp']?serviceEntityHistJson:serviceEntityHistCopy,_0x577036=_0x6b63df[_0x422fda(0x220)](function(_0x4de3b7,_0x46e7ed){const _0x54c48a=_0x422fda;return _0x4de3b7[_0x54c48a(0x22d)]-_0x46e7ed[_0x54c48a(0x22d)];})[_0x422fda(0x1c4)](_0x28eed3=>this[_0x422fda(0x238)](_0x28eed3));return _0x1c0164=_0x1c0164[_0x422fda(0x1dd)](/{{entityColumns}}/g,_0x577036[_0x422fda(0x218)]('\x0a')),_0x1c0164;}[a0_0x2e26f6(0x238)](_0x21e805){const _0x1d8de8=a0_0x2e26f6;if('id'==_0x21e805['name'])return'';if('domain_id'==_0x21e805[_0x1d8de8(0x1d5)])return'';if(_0x1d8de8(0x1cf)==_0x21e805[_0x1d8de8(0x1d5)])return'';if(_0x1d8de8(0x1d4)==_0x21e805[_0x1d8de8(0x1d5)])return'';if(_0x1d8de8(0x212)==_0x21e805[_0x1d8de8(0x1d5)])return'';if(_0x1d8de8(0x1d3)==_0x21e805[_0x1d8de8(0x1d5)])return'';let _0x4167fb=_0x21e805[_0x1d8de8(0x205)];_0x1d8de8(0x1ed)==_0x21e805[_0x1d8de8(0x205)]&&(_0x4167fb=_0x1d8de8(0x221)),'long'==_0x21e805[_0x1d8de8(0x205)]&&(_0x4167fb=_0x1d8de8(0x24e)),'string'==_0x21e805[_0x1d8de8(0x205)]&&(_0x4167fb=_0x1d8de8(0x209)),'datetime'==_0x21e805['colType']&&(_0x4167fb=_0x1d8de8(0x1e5));let _0x328c00='';_0x1d8de8(0x1d2)==_0x21e805[_0x1d8de8(0x205)]&&(_0x328c00=_0x21e805['colSize']);let _0x244f70=this[_0x1d8de8(0x20f)](_0x21e805),_0x3c3157=this[_0x1d8de8(0x21e)](_0x21e805),_0x2c11df=camelCase(_0x21e805[_0x1d8de8(0x1d5)]);return'\x20\x20'+(_0x1d8de8(0x1be)+_0x21e805['name']+_0x1d8de8(0x1f3)+_0x4167fb+_0x1d8de8(0x1e6)+_0x21e805[_0x1d8de8(0x224)]+'\x20'+(0x0==_0x328c00[_0x1d8de8(0x23a)]?'':_0x1d8de8(0x248)+_0x328c00)+_0x1d8de8(0x207))+'\x0a\x20\x20'+(_0x1d8de8(0x231)+(0x0==_0x244f70[_0x1d8de8(0x23a)]?'':_0x1d8de8(0x222)+_0x244f70+',')+_0x1d8de8(0x1f6)+_0x21e805['nullable']+_0x1d8de8(0x207))+_0x1d8de8(0x249)+(''+_0x2c11df+(_0x21e805['nullable']?'?':'')+':\x20'+_0x3c3157)+'\x0a';}[a0_0x2e26f6(0x20f)](_0x90c86){const _0x4a58c1=a0_0x2e26f6;let _0x755981='';return _0x4a58c1(0x1ed)==_0x90c86[_0x4a58c1(0x205)]&&(_0x755981=_0x4a58c1(0x22a)),_0x4a58c1(0x201)==_0x90c86[_0x4a58c1(0x205)]&&(_0x755981=_0x4a58c1(0x22a)),_0x4a58c1(0x23f)==_0x90c86[_0x4a58c1(0x205)]&&(_0x755981=_0x4a58c1(0x1e7)),_0x4a58c1(0x1f8)==_0x90c86[_0x4a58c1(0x205)]&&(_0x755981=_0x4a58c1(0x1e7)),_0x755981;}[a0_0x2e26f6(0x21e)](_0x22526e){const _0x42f7e7=a0_0x2e26f6;let _0x30656d=_0x22526e[_0x42f7e7(0x205)];return _0x42f7e7(0x1f5)==_0x22526e[_0x42f7e7(0x205)]&&(_0x30656d='number'),_0x42f7e7(0x1ed)==_0x22526e['colType']&&(_0x30656d=_0x42f7e7(0x1e9)),_0x42f7e7(0x201)==_0x22526e[_0x42f7e7(0x205)]&&(_0x30656d=_0x42f7e7(0x1e9)),_0x42f7e7(0x1f8)==_0x22526e[_0x42f7e7(0x205)]&&(_0x30656d=_0x42f7e7(0x1e9)),_0x42f7e7(0x23f)==_0x22526e['colType']&&(_0x30656d='number'),_0x42f7e7(0x206)==_0x22526e['colType']&&(_0x30656d=_0x42f7e7(0x1d9)),_0x42f7e7(0x1f7)==_0x22526e[_0x42f7e7(0x205)]&&(_0x30656d=_0x42f7e7(0x1d9)),'text'==_0x22526e[_0x42f7e7(0x205)]&&(_0x30656d=_0x42f7e7(0x1d2)),_0x30656d;}async['writeFile'](_0x4c2a26,_0x2db511,_0x521348){const _0x4af32e=a0_0x2e26f6;await fs['writeFileSync'](_0x4c2a26,this[_0x4af32e(0x24b)](_0x2db511,_0x521348),_0x4af32e(0x225));}['replaceNamesMap'](_0xd1a9ba,_0x4292c8){const _0x444f4d=a0_0x2e26f6;return _0xd1a9ba[_0x444f4d(0x1dd)](/{{pascalCase name}}/g,_0x4292c8['pascalCaseName'])['replace'](/{{camelCase name}}/g,_0x4292c8[_0x444f4d(0x214)])['replace'](/{{snakeCase name}}/g,_0x4292c8['snakeCaseName'])[_0x444f4d(0x1dd)](/{{pluralPascalCase name}}/g,_0x4292c8[_0x444f4d(0x243)])[_0x444f4d(0x1dd)](/{{pluralCamelCase name}}/g,_0x4292c8[_0x444f4d(0x21d)])[_0x444f4d(0x1dd)](/{{tableName}}/g,_0x4292c8[_0x444f4d(0x1fc)])['replace'](/{{name}}/g,_0x4292c8['name']);}async[a0_0x2e26f6(0x1cb)](_0x14ab67,_0x59d4f2,_0xc02d04){const _0x242c86=a0_0x2e26f6;let _0x21e667=_0x14ab67+'/packages';await this[_0x242c86(0x210)](_0x21e667),_0x21e667=_0x21e667+'/'+_0x59d4f2,await this[_0x242c86(0x210)](_0x21e667),_0x21e667+=_0x242c86(0x1f4),await this['createDir'](_0x21e667),_0x21e667+=_0x242c86(0x21c),await this[_0x242c86(0x210)](_0x21e667),_0x21e667=_0x21e667+'/'+_0xc02d04,await this[_0x242c86(0x210)](_0x21e667);}[a0_0x2e26f6(0x1d7)](){const _0xcf1508=a0_0x2e26f6;let _0x533d26=process[_0xcf1508(0x1ff)]['PWD'][_0xcf1508(0x21f)]('/'),_0x39f7b4=[];for(let _0x49f0e7=0x0;_0x49f0e7<_0x533d26['length']&&'packages'!=_0x533d26[_0x49f0e7];_0x49f0e7++)_0x39f7b4[_0xcf1508(0x20e)](_0x533d26[_0x49f0e7]);return _0x39f7b4['join']('/');}async[a0_0x2e26f6(0x210)](_0x20208e){const _0x3c7fa0=a0_0x2e26f6;0x0==await this['existsPath'](_0x20208e)&&fs[_0x3c7fa0(0x1c6)](_0x20208e);}async[a0_0x2e26f6(0x24d)](_0x3221e4){return await fs['existsSync'](_0x3221e4);}};tslib_1[a0_0x2e26f6(0x241)]([(0x0,type_graphql_1[a0_0x2e26f6(0x1c0)])(_0x3b9c3c=>Boolean,{'description':a0_0x2e26f6(0x24a)}),tslib_1['__param'](0x0,(0x0,type_graphql_1['Arg'])('id')),tslib_1['__param'](0x1,(0x0,type_graphql_1[a0_0x2e26f6(0x1f0)])()),tslib_1[a0_0x2e26f6(0x23e)](a0_0x2e26f6(0x1eb),Function),tslib_1[a0_0x2e26f6(0x23e)](a0_0x2e26f6(0x1dc),[String,Object]),tslib_1['__metadata'](a0_0x2e26f6(0x1da),Promise)],OperatoToolCreateService[a0_0x2e26f6(0x240)],a0_0x2e26f6(0x1de),null),OperatoToolCreateService=tslib_1[a0_0x2e26f6(0x241)]([(0x0,type_graphql_1[a0_0x2e26f6(0x24c)])()],OperatoToolCreateService),exports[a0_0x2e26f6(0x22b)]=OperatoToolCreateService;const allIndex='\x0a/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0a\x0a/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0a\x0aexport\x20const\x20entities\x20=\x20[\x20\x20\x0a\x20\x20/*\x20ENTITIES\x20*/\x0a]\x20\x0a\x0a\x0aexport\x20const\x20schema\x20=\x20{\x0a\x20\x20resolverClasses:\x20[\x0a\x20\x20\x20\x20/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x20\x20]\x20\x0a}\x0a\x0aexport\x20const\x20subscribers\x20=\x20[\x0a\x20\x20/*\x20SUBSCRIBERS\x20*/\x0a]\x0a',serviceIndex=a0_0x2e26f6(0x21b),serviceHistoryIndex=a0_0x2e26f6(0x20a),serviceQuery=a0_0x2e26f6(0x217),serviceHistoryQuery=a0_0x2e26f6(0x246),serviceMutation=a0_0x2e26f6(0x234),sereviceType=a0_0x2e26f6(0x23d),sereviceHistoryType=a0_0x2e26f6(0x215),serviceEntity=a0_0x2e26f6(0x1c9),serviceEntityHistCopy=a0_0x2e26f6(0x1ca),serviceEntityHistJson=a0_0x2e26f6(0x228),serviceEntitySubscriber=a0_0x2e26f6(0x1db);
|
|
1
|
+
'use strict';const a0_0x140de2=a0_0x1415;(function(_0x447531,_0x100fc6){const _0x4469cb=a0_0x1415,_0x3d51dd=_0x447531();while(!![]){try{const _0x2c0361=-parseInt(_0x4469cb(0xf9))/0x1+-parseInt(_0x4469cb(0xf2))/0x2+parseInt(_0x4469cb(0xee))/0x3+-parseInt(_0x4469cb(0x114))/0x4*(-parseInt(_0x4469cb(0xf1))/0x5)+-parseInt(_0x4469cb(0x160))/0x6+parseInt(_0x4469cb(0x123))/0x7*(-parseInt(_0x4469cb(0x166))/0x8)+parseInt(_0x4469cb(0x12b))/0x9;if(_0x2c0361===_0x100fc6)break;else _0x3d51dd['push'](_0x3d51dd['shift']());}catch(_0x2e9337){_0x3d51dd['push'](_0x3d51dd['shift']());}}}(a0_0x5568,0xbd1fa));Object['defineProperty'](exports,a0_0x140de2(0x128),{'value':!0x0}),exports['OperatoToolCreateService']=void 0x0;const tslib_1=require(a0_0x140de2(0xf5)),type_graphql_1=require(a0_0x140de2(0x144)),shell_1=require('@things-factory/shell'),resource_base_1=require('@things-factory/resource-base'),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x140de2(0xfa)),{plural:plural}=require(a0_0x140de2(0x102)),fs=require('fs');let OperatoToolCreateService=class{async[a0_0x140de2(0x110)](_0x15ffb4,_0x3ac5bf){const _0x461db0=a0_0x140de2,{domain:_0x44770e}=_0x3ac5bf[_0x461db0(0x141)],_0x5963dd=await(0x0,shell_1[_0x461db0(0x11d)])(resource_base_1[_0x461db0(0x124)])['findOne']({'where':{'id':_0x15ffb4}}),_0x414e17=await(0x0,shell_1['getRepository'])(resource_base_1[_0x461db0(0x156)])[_0x461db0(0x11b)]({'where':{'domain':{'id':_0x44770e['id']},'entity':{'id':_0x5963dd['id']}}});let {name:_0x84a4a0='',bundle:_0x31f463=''}=_0x5963dd||{},_0xb0e152=this[_0x461db0(0x147)](),_0x528cc5=kebabCase(_0x84a4a0);return await this[_0x461db0(0x12f)](_0xb0e152,_0x31f463,_0x528cc5),await this[_0x461db0(0x12e)](_0xb0e152,_0x31f463,_0x84a4a0,_0x528cc5,_0x5963dd,_0x414e17),!0x0;}async['createServiceFiles'](_0x9c8ef0,_0x1bc516,_0x27357a,_0x20dbc8,_0x2252f7,_0x2a5f20){const _0x42e39d=a0_0x140de2;let _0x5ecb44={'name':_0x20dbc8,'tableName':_0x2252f7[_0x42e39d(0x11f)],'pascalCaseName':startCase(camelCase(_0x27357a))[_0x42e39d(0x117)](/ /g,''),'camelCaseName':camelCase(_0x27357a),'snakeCaseName':snakeCase(_0x27357a),'pluralPascalCaseName':startCase(camelCase(plural(_0x27357a)))[_0x42e39d(0x117)](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x27357a))},_0x325005=_0x9c8ef0+_0x42e39d(0xd9)+_0x1bc516+_0x42e39d(0xe9);['JSON',_0x42e39d(0xff)][_0x42e39d(0xfc)](_0x2252f7[_0x42e39d(0x12d)])?await this[_0x42e39d(0xe3)](_0x325005,_0x20dbc8,_0x2252f7,_0x2a5f20,_0x5ecb44):await this[_0x42e39d(0x16b)](_0x325005,_0x20dbc8,_0x2252f7,_0x2a5f20,_0x5ecb44);}async['createHistoryServiceFiles'](_0x343092,_0x4590f0,_0x1d1711,_0x26921a,_0x456cfe){const _0xa58bb=a0_0x140de2;await this['writeFile'](_0x343092+(_0x4590f0+_0xa58bb(0xfb)),serviceHistoryIndex,_0x456cfe);let _0x5a8ab4=this[_0xa58bb(0x13d)](_0x1d1711,_0x26921a);await this['writeFile'](_0x343092+(_0x4590f0+'/'+_0x4590f0+_0xa58bb(0x132)),_0x5a8ab4,_0x456cfe),await this[_0xa58bb(0xfd)](_0x343092+(_0x4590f0+'/'+_0x4590f0+_0xa58bb(0x16d)),serviceQuery,_0x456cfe),await this[_0xa58bb(0xfd)](_0x343092+(_0x4590f0+'/'+_0x4590f0+_0xa58bb(0x106)),serviceMutation,_0x456cfe);let _0x3797ae=this[_0xa58bb(0x16c)](_0x26921a);await this['writeFile'](_0x343092+(_0x4590f0+'/'+_0x4590f0+'-type.ts'),_0x3797ae,_0x456cfe);let _0xb6a6cc=this[_0xa58bb(0x119)](_0x1d1711,_0x26921a);await this[_0xa58bb(0xfd)](_0x343092+(_0x4590f0+'/'+_0x4590f0+_0xa58bb(0x155)),_0xb6a6cc,_0x456cfe);let _0x2a40b7='';_0xa58bb(0xea)==_0x1d1711[_0xa58bb(0x12d)]?(_0x2a40b7=_0xa58bb(0x120),await this['writeFile'](_0x343092+(_0x4590f0+'/event-subscriber.ts'),serviceEntitySubscriber,_0x456cfe)):_0x2a40b7='';let _0x279124=serviceEntitySubscriber[_0xa58bb(0x117)](/{{entityToJson}}/g,_0x2a40b7);await this[_0xa58bb(0xfd)](_0x343092+(_0x4590f0+_0xa58bb(0x104)),_0x279124,_0x456cfe),await this[_0xa58bb(0xfd)](_0x343092+(_0x4590f0+'/'+_0x4590f0+_0xa58bb(0x139)),serviceHistoryQuery,_0x456cfe),await this['writeFile'](_0x343092+(_0x4590f0+'/'+_0x4590f0+'-history-type.ts'),sereviceHistoryType,_0x456cfe);let _0x340275=_0x343092+_0xa58bb(0x111);0x0==await this[_0xa58bb(0x11c)](_0x340275)&&await this[_0xa58bb(0xfd)](_0x340275,allIndex,_0x456cfe);let _0x30a483=await fs[_0xa58bb(0x150)](_0x340275,_0xa58bb(0xf8));_0x30a483['indexOf']('export\x20*\x20from\x20\x27./'+_0x456cfe[_0xa58bb(0xf4)]+'/'+_0x456cfe['name']+_0xa58bb(0x116))<0x0&&(_0x30a483=_0x30a483[_0xa58bb(0x117)](/\/\* EXPORT ENTITY TYPES \*\//,'/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./'+_0x456cfe['name']+'/'+_0x456cfe[_0xa58bb(0xf4)]+_0xa58bb(0x116))),_0x30a483['indexOf'](_0xa58bb(0x13e)+_0x456cfe[_0xa58bb(0xf4)]+'/'+_0x456cfe[_0xa58bb(0xf4)]+'\x27')<0x0&&(_0x30a483=_0x30a483[_0xa58bb(0x117)](/\/\* EXPORT ENTITY TYPES \*\//,_0xa58bb(0x137)+_0x456cfe[_0xa58bb(0xf4)]+'/'+_0x456cfe[_0xa58bb(0xf4)]+'\x27')),_0x30a483['indexOf'](_0xa58bb(0x121)+_0x456cfe['pascalCaseName']+_0xa58bb(0x14a)+_0x456cfe[_0xa58bb(0x10c)]+'Resolvers,\x20subscribers\x20as\x20'+_0x456cfe[_0xa58bb(0x10c)]+_0xa58bb(0xe7)+_0x456cfe[_0xa58bb(0xf4)]+'\x27')<0x0&&(_0x30a483=_0x30a483['replace'](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0xa58bb(0x107)+_0x456cfe['pascalCaseName']+'Entities,\x20resolvers\x20as\x20'+_0x456cfe[_0xa58bb(0x10c)]+_0xa58bb(0x161)+_0x456cfe[_0xa58bb(0x10c)]+_0xa58bb(0xe7)+_0x456cfe[_0xa58bb(0xf4)]+'\x27')),_0x30a483[_0xa58bb(0xdf)](_0xa58bb(0x127)+_0x456cfe[_0xa58bb(0x10c)]+_0xa58bb(0xdc))<0x0&&(_0x30a483=_0x30a483[_0xa58bb(0x117)](/\/\* ENTITIES \*\//,_0xa58bb(0x162)+_0x456cfe[_0xa58bb(0x10c)]+'Entities,')),_0x30a483[_0xa58bb(0xdf)](_0xa58bb(0x127)+_0x456cfe[_0xa58bb(0x10c)]+_0xa58bb(0xef))<0x0&&(_0x30a483=_0x30a483['replace'](/\/\* RESOLVER CLASSES \*\//,'/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...'+_0x456cfe[_0xa58bb(0x10c)]+_0xa58bb(0xef))),_0x30a483['indexOf'](_0xa58bb(0x127)+_0x456cfe[_0xa58bb(0x10c)]+_0xa58bb(0x133))<0x0&&(_0x30a483=_0x30a483['replace'](/\/\* SUBSCRIBERS \*\//,_0xa58bb(0xde)+_0x456cfe[_0xa58bb(0x10c)]+_0xa58bb(0x133))),await this['writeFile'](_0x340275,_0x30a483,_0x456cfe);}async[a0_0x140de2(0x16b)](_0x1394dc,_0xb12112,_0x4a43f1,_0x621d0f,_0x5f10f4){const _0x208f2b=a0_0x140de2;await this[_0x208f2b(0xfd)](_0x1394dc+(_0xb12112+_0x208f2b(0xfb)),serviceIndex,_0x5f10f4),await this[_0x208f2b(0xfd)](_0x1394dc+(_0xb12112+'/'+_0xb12112+_0x208f2b(0x16d)),serviceQuery,_0x5f10f4),await this[_0x208f2b(0xfd)](_0x1394dc+(_0xb12112+'/'+_0xb12112+'-mutation.ts'),serviceMutation,_0x5f10f4);let _0x5c96ed=this['createEntityText'](_0x4a43f1,_0x621d0f);await this['writeFile'](_0x1394dc+(_0xb12112+'/'+_0xb12112+_0x208f2b(0x132)),_0x5c96ed,_0x5f10f4);let _0x420a7b=this['createTypeText'](_0x621d0f);await this[_0x208f2b(0xfd)](_0x1394dc+(_0xb12112+'/'+_0xb12112+'-type.ts'),_0x420a7b,_0x5f10f4);let _0x21cec0=_0x1394dc+_0x208f2b(0x111);0x0==await this[_0x208f2b(0x11c)](_0x21cec0)&&await this[_0x208f2b(0xfd)](_0x21cec0,allIndex,_0x5f10f4);let _0x3606b5=await fs['readFileSync'](_0x21cec0,_0x208f2b(0xf8));_0x3606b5[_0x208f2b(0xdf)](_0x208f2b(0x13e)+_0x5f10f4[_0x208f2b(0xf4)]+'/'+_0x5f10f4[_0x208f2b(0xf4)]+'\x27')<0x0&&(_0x3606b5=_0x3606b5[_0x208f2b(0x117)](/\/\* EXPORT ENTITY TYPES \*\//,_0x208f2b(0x137)+_0x5f10f4[_0x208f2b(0xf4)]+'/'+_0x5f10f4[_0x208f2b(0xf4)]+'\x27')),_0x3606b5[_0x208f2b(0xdf)](_0x208f2b(0x121)+_0x5f10f4[_0x208f2b(0x10c)]+_0x208f2b(0x14a)+_0x5f10f4[_0x208f2b(0x10c)]+_0x208f2b(0x125)+_0x5f10f4[_0x208f2b(0xf4)]+'\x27')<0x0&&(_0x3606b5=_0x3606b5['replace'](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,'/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20'+_0x5f10f4['pascalCaseName']+_0x208f2b(0x14a)+_0x5f10f4[_0x208f2b(0x10c)]+'Resolvers\x20}\x20from\x20\x27./'+_0x5f10f4[_0x208f2b(0xf4)]+'\x27')),_0x3606b5[_0x208f2b(0xdf)](_0x208f2b(0x127)+_0x5f10f4['pascalCaseName']+_0x208f2b(0xdc))<0x0&&(_0x3606b5=_0x3606b5[_0x208f2b(0x117)](/\/\* ENTITIES \*\//,_0x208f2b(0x162)+_0x5f10f4[_0x208f2b(0x10c)]+_0x208f2b(0xdc))),_0x3606b5[_0x208f2b(0xdf)](_0x208f2b(0x127)+_0x5f10f4['pascalCaseName']+_0x208f2b(0xef))<0x0&&(_0x3606b5=_0x3606b5['replace'](/\/\* RESOLVER CLASSES \*\//,_0x208f2b(0x148)+_0x5f10f4[_0x208f2b(0x10c)]+'Resolvers,')),await this['writeFile'](_0x21cec0,_0x3606b5,_0x5f10f4);}[a0_0x140de2(0x16c)](_0x109823){const _0x2c14d1=a0_0x140de2;let _0x4a328e=sereviceType,_0x19bfe8=_0x109823[_0x2c14d1(0xe4)](_0x4cb1d7=>{const _0xc3a988=_0x2c14d1;if('id'==_0x4cb1d7[_0xc3a988(0xf4)])return'';if(_0xc3a988(0x159)==_0x4cb1d7[_0xc3a988(0xf4)])return'';if('created_at'==_0x4cb1d7[_0xc3a988(0xf4)])return'';if(_0xc3a988(0x100)==_0x4cb1d7[_0xc3a988(0xf4)])return'';if(_0xc3a988(0xeb)==_0x4cb1d7[_0xc3a988(0xf4)])return'';if('updater_id'==_0x4cb1d7['name'])return'';let _0xf18099=this[_0xc3a988(0x112)](_0x4cb1d7),_0x1759f3=this[_0xc3a988(0x11a)](_0x4cb1d7),_0x1dc7f2=camelCase(_0x4cb1d7[_0xc3a988(0xf4)]);return'\x20\x20'+(_0xc3a988(0x168)+(0x0==_0xf18099[_0xc3a988(0xf3)]?'':_0xc3a988(0x13f)+_0xf18099+',')+_0xc3a988(0xe0)+_0x4cb1d7[_0xc3a988(0xf0)]+_0xc3a988(0x16a))+_0xc3a988(0x142)+(''+_0x1dc7f2+(_0x4cb1d7['nullable']?'?':'')+':\x20'+_0x1759f3)+'\x0a';});_0x4a328e=_0x4a328e[_0x2c14d1(0x117)](/{{newTypeColumns}}/g,_0x19bfe8[_0x2c14d1(0x157)]('\x0a'));let _0x29b604=_0x109823[_0x2c14d1(0xe4)](_0x120a1c=>{const _0x49c500=_0x2c14d1;if('id'==_0x120a1c[_0x49c500(0xf4)])return'';if(_0x49c500(0x159)==_0x120a1c['name'])return'';if('created_at'==_0x120a1c['name'])return'';if(_0x49c500(0x100)==_0x120a1c[_0x49c500(0xf4)])return'';if('creator_id'==_0x120a1c['name'])return'';if(_0x49c500(0xdd)==_0x120a1c['name'])return'';let _0x6c72ba=this[_0x49c500(0x112)](_0x120a1c),_0x39d61b=this[_0x49c500(0x11a)](_0x120a1c);_0x120a1c['nullable']=!0x0;let _0x31a5e0=camelCase(_0x120a1c[_0x49c500(0xf4)]);return'\x20\x20'+(_0x49c500(0x168)+(0x0==_0x6c72ba[_0x49c500(0xf3)]?'':_0x49c500(0x13f)+_0x6c72ba+',')+_0x49c500(0xe0)+_0x120a1c[_0x49c500(0xf0)]+_0x49c500(0x16a))+'\x0a\x20\x20'+(''+_0x31a5e0+(_0x120a1c['nullable']?'?':'')+':\x20'+_0x39d61b)+'\x0a';});return _0x4a328e=_0x4a328e[_0x2c14d1(0x117)](/{{patchTypeColumns}}/g,_0x29b604['join']('\x0a')),_0x4a328e;}['createEntityText'](_0x47b72e,_0x1fbe50){const _0x33ba2f=a0_0x140de2;let _0x37170a=serviceEntity,_0x36a8bb=_0x1fbe50['sort'](function(_0x3d2812,_0x232fa7){const _0x1b3c41=a0_0x1415;return _0x3d2812[_0x1b3c41(0x15f)]-_0x232fa7[_0x1b3c41(0x15f)];})[_0x33ba2f(0xe4)](_0x17df64=>this['columnToEntityColumn'](_0x17df64));[_0x33ba2f(0xff),_0x33ba2f(0xea)]['includes'](_0x47b72e[_0x33ba2f(0x12d)])&&_0x36a8bb[_0x33ba2f(0x14f)]('\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201'),_0x37170a=_0x37170a[_0x33ba2f(0x117)](/{{entityColumns}}/g,_0x36a8bb[_0x33ba2f(0x157)]('\x0a'));let _0x47b743='',_0x255cda=_0x1fbe50[_0x33ba2f(0x13c)](_0x1fa756=>_0x1fa756['uniqRank']&&_0x1fa756['uniqRank']>0x0)[_0x33ba2f(0x14d)](function(_0x1ed51a,_0x4bd297){const _0x1c52c2=_0x33ba2f;return _0x1ed51a[_0x1c52c2(0x15d)]-_0x4bd297['uniqRank'];});if(_0x255cda[_0x33ba2f(0xf3)]>0x0){_0x47b743=_0x33ba2f(0x126);let _0x1e4ef9=_0x255cda[_0x33ba2f(0xe4)](_0x58287d=>{const _0x23221e=_0x33ba2f;let _0x4bcaa5=_0x58287d[_0x23221e(0xf4)];return _0x23221e(0x159)==_0x58287d[_0x23221e(0xf4)]&&(_0x4bcaa5=_0x23221e(0x138)),_0x23221e(0xeb)==_0x58287d[_0x23221e(0xf4)]&&(_0x4bcaa5='creator'),_0x23221e(0xdd)==_0x58287d[_0x23221e(0xf4)]&&(_0x4bcaa5=_0x23221e(0x169)),_0x23221e(0x15b)+camelCase(_0x4bcaa5);});_0x47b743=_0x47b743[_0x33ba2f(0x117)](/{{indexColumns}}/g,_0x1e4ef9['join'](','));}return _0x37170a=_0x37170a[_0x33ba2f(0x117)](/{{indexAnn}}/g,_0x47b743),_0x37170a;}[a0_0x140de2(0x119)](_0x5115f8,_0x7b37a4){const _0x2f0f6b=a0_0x140de2;let _0x31d65f=_0x2f0f6b(0xea)==_0x5115f8[_0x2f0f6b(0x12d)]?serviceEntityHistJson:serviceEntityHistCopy,_0x5cd9b2=_0x7b37a4[_0x2f0f6b(0x14d)](function(_0x35263b,_0x116b49){const _0x26b525=_0x2f0f6b;return _0x35263b['rank']-_0x116b49[_0x26b525(0x15f)];})[_0x2f0f6b(0xe4)](_0x2bbb48=>this['columnToEntityColumn'](_0x2bbb48));return _0x31d65f=_0x31d65f[_0x2f0f6b(0x117)](/{{entityColumns}}/g,_0x5cd9b2[_0x2f0f6b(0x157)]('\x0a')),_0x31d65f;}[a0_0x140de2(0x14b)](_0x511fd7){const _0x7acb28=a0_0x140de2;if('id'==_0x511fd7['name'])return'';if(_0x7acb28(0x159)==_0x511fd7[_0x7acb28(0xf4)])return'';if(_0x7acb28(0x10f)==_0x511fd7[_0x7acb28(0xf4)])return'';if('updated_at'==_0x511fd7[_0x7acb28(0xf4)])return'';if('creator_id'==_0x511fd7[_0x7acb28(0xf4)])return'';if('updater_id'==_0x511fd7['name'])return'';let _0x3f80f6=_0x511fd7[_0x7acb28(0x151)];_0x7acb28(0x131)==_0x511fd7[_0x7acb28(0x151)]&&(_0x3f80f6=_0x7acb28(0x103)),'long'==_0x511fd7[_0x7acb28(0x151)]&&(_0x3f80f6=_0x7acb28(0x10b)),_0x7acb28(0x165)==_0x511fd7[_0x7acb28(0x151)]&&(_0x3f80f6=_0x7acb28(0x152)),_0x7acb28(0x108)==_0x511fd7[_0x7acb28(0x151)]&&(_0x3f80f6='timestamp\x20without\x20time\x20zone');let _0x304524='';_0x7acb28(0x165)==_0x511fd7[_0x7acb28(0x151)]&&(_0x304524=_0x511fd7[_0x7acb28(0x15a)]);let _0x1e80bb=this['getFieldType'](_0x511fd7),_0x5a3fb2=this['getColTxtType'](_0x511fd7),_0x552deb=camelCase(_0x511fd7['name']);return'\x20\x20'+(_0x7acb28(0x163)+_0x511fd7[_0x7acb28(0xf4)]+_0x7acb28(0x14c)+_0x3f80f6+_0x7acb28(0xed)+_0x511fd7['nullable']+'\x20'+(0x0==_0x304524[_0x7acb28(0xf3)]?'':_0x7acb28(0xec)+_0x304524)+_0x7acb28(0x16a))+'\x0a\x20\x20'+('@Field('+(0x0==_0x1e80bb[_0x7acb28(0xf3)]?'':'type\x20=>'+_0x1e80bb+',')+_0x7acb28(0xe0)+_0x511fd7['nullable']+_0x7acb28(0x16a))+_0x7acb28(0x142)+(''+_0x552deb+(_0x511fd7['nullable']?'?':'')+':\x20'+_0x5a3fb2)+'\x0a';}[a0_0x140de2(0x112)](_0x32649b){const _0x15d9bc=a0_0x140de2;let _0x4dc849='';return'double'==_0x32649b[_0x15d9bc(0x151)]&&(_0x4dc849=_0x15d9bc(0x135)),'float'==_0x32649b['colType']&&(_0x4dc849=_0x15d9bc(0x135)),_0x15d9bc(0x13a)==_0x32649b[_0x15d9bc(0x151)]&&(_0x4dc849=_0x15d9bc(0x105)),'integer'==_0x32649b['colType']&&(_0x4dc849=_0x15d9bc(0x105)),_0x4dc849;}['getColTxtType'](_0x72ee7e){const _0x473fe6=a0_0x140de2;let _0x2b4579=_0x72ee7e['colType'];return _0x473fe6(0x167)==_0x72ee7e[_0x473fe6(0x151)]&&(_0x2b4579='number'),_0x473fe6(0x131)==_0x72ee7e[_0x473fe6(0x151)]&&(_0x2b4579=_0x473fe6(0x122)),_0x473fe6(0xe8)==_0x72ee7e['colType']&&(_0x2b4579=_0x473fe6(0x122)),'integer'==_0x72ee7e[_0x473fe6(0x151)]&&(_0x2b4579=_0x473fe6(0x122)),'long'==_0x72ee7e[_0x473fe6(0x151)]&&(_0x2b4579=_0x473fe6(0x122)),'datetime'==_0x72ee7e['colType']&&(_0x2b4579=_0x473fe6(0x136)),'date'==_0x72ee7e['colType']&&(_0x2b4579='Date'),_0x473fe6(0xdb)==_0x72ee7e['colType']&&(_0x2b4579=_0x473fe6(0x165)),_0x2b4579;}async[a0_0x140de2(0xfd)](_0x21143d,_0x4446d5,_0x3a2dc1){const _0x2ef18f=a0_0x140de2;await fs['writeFileSync'](_0x21143d,this['replaceNamesMap'](_0x4446d5,_0x3a2dc1),_0x2ef18f(0xf8));}[a0_0x140de2(0xf7)](_0x11f8ac,_0x26a76e){const _0x1df2fe=a0_0x140de2;return _0x11f8ac[_0x1df2fe(0x117)](/{{pascalCase name}}/g,_0x26a76e['pascalCaseName'])['replace'](/{{camelCase name}}/g,_0x26a76e[_0x1df2fe(0x14e)])[_0x1df2fe(0x117)](/{{snakeCase name}}/g,_0x26a76e['snakeCaseName'])[_0x1df2fe(0x117)](/{{pluralPascalCase name}}/g,_0x26a76e[_0x1df2fe(0x143)])[_0x1df2fe(0x117)](/{{pluralCamelCase name}}/g,_0x26a76e[_0x1df2fe(0x101)])[_0x1df2fe(0x117)](/{{tableName}}/g,_0x26a76e[_0x1df2fe(0x11f)])['replace'](/{{name}}/g,_0x26a76e[_0x1df2fe(0xf4)]);}async[a0_0x140de2(0x12f)](_0x434275,_0x39a705,_0x250c4b){const _0x57f06f=a0_0x140de2;let _0xaf25ac=_0x434275+_0x57f06f(0x145);await this['createDir'](_0xaf25ac),_0xaf25ac=_0xaf25ac+'/'+_0x39a705,await this[_0x57f06f(0x10d)](_0xaf25ac),_0xaf25ac+=_0x57f06f(0x109),await this[_0x57f06f(0x10d)](_0xaf25ac),_0xaf25ac+=_0x57f06f(0x146),await this[_0x57f06f(0x10d)](_0xaf25ac),_0xaf25ac=_0xaf25ac+'/'+_0x250c4b,await this['createDir'](_0xaf25ac);}[a0_0x140de2(0x147)](){const _0x383710=a0_0x140de2;let _0x52520c=process[_0x383710(0x149)][_0x383710(0x11e)][_0x383710(0x15c)]('/'),_0x238b8f=[];for(let _0xa9bffc=0x0;_0xa9bffc<_0x52520c['length']&&_0x383710(0x118)!=_0x52520c[_0xa9bffc];_0xa9bffc++)_0x238b8f['push'](_0x52520c[_0xa9bffc]);return _0x238b8f[_0x383710(0x157)]('/');}async[a0_0x140de2(0x10d)](_0x5be3ce){const _0x2cf94f=a0_0x140de2;0x0==await this['existsPath'](_0x5be3ce)&&fs[_0x2cf94f(0xe5)](_0x5be3ce);}async[a0_0x140de2(0x11c)](_0x4ce485){const _0x547af7=a0_0x140de2;return await fs[_0x547af7(0xe1)](_0x4ce485);}};tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x140de2(0x12a)])(_0x544cc3=>Boolean,{'description':'Operato\x20Tool\x20Create\x20Service'}),tslib_1[a0_0x140de2(0x153)](0x0,(0x0,type_graphql_1['Arg'])('id')),tslib_1[a0_0x140de2(0x153)](0x1,(0x0,type_graphql_1['Ctx'])()),tslib_1[a0_0x140de2(0x164)](a0_0x140de2(0xf6),Function),tslib_1[a0_0x140de2(0x164)](a0_0x140de2(0xda),[String,Object]),tslib_1[a0_0x140de2(0x164)](a0_0x140de2(0x10a),Promise)],OperatoToolCreateService[a0_0x140de2(0xfe)],a0_0x140de2(0x110),null),OperatoToolCreateService=tslib_1[a0_0x140de2(0xe2)]([(0x0,type_graphql_1[a0_0x140de2(0x12c)])()],OperatoToolCreateService),exports['OperatoToolCreateService']=OperatoToolCreateService;function a0_0x1415(_0x4642ce,_0x2dfa66){const _0x556883=a0_0x5568();return a0_0x1415=function(_0x1415a2,_0x3d8b2b){_0x1415a2=_0x1415a2-0xd9;let _0x60f031=_0x556883[_0x1415a2];return _0x60f031;},a0_0x1415(_0x4642ce,_0x2dfa66);}function a0_0x5568(){const _0x9a5362=['createHistoryServiceFiles','map','mkdirSync','\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}}]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}Mutation]\x0a','EntitySubscribers\x20}\x20from\x20\x27./','float','/server/service/','JSON','creator_id',',length:','\x27,\x20nullable:\x20','611547wJHxxP','Resolvers,','nullable','895zFRbkb','1513054dSjqUq','length','name','tslib','design:type','replaceNamesMap','utf8','890411FVqGjN','lodash','/index.ts','includes','writeFile','prototype','COPY','updated_at','pluralCamelCaseName','pluralize','double\x20precision','/event-subscriber.ts','Int','-mutation.ts','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','datetime','/server','design:returntype','bigint','pascalCaseName','createDir','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','created_at','toolCreateService','index.ts','getFieldType','\x0aimport\x20{\x20ObjectType,\x20Field,\x20InputType,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0a\x0a@ObjectType()\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryList\x20{\x0a\x20\x20@Field(type\x20=>\x20[{{pascalCase\x20name}}History])\x0a\x20\x20items:\x20{{pascalCase\x20name}}History[]\x0a\x0a\x20\x20@Field(type\x20=>\x20Int)\x0a\x20\x20total:\x20number\x0a}\x0a','23756huoaan','\x0aimport\x20{\x20Resolver,\x20Mutation,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20In\x20}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20New{{pascalCase\x20name}},\x20{{pascalCase\x20name}}Patch\x20}\x20from\x20\x27./{{name}}-type\x27\x0aimport\x20{\x20getRepository\x20}\x20from\x20\x27@things-factory/shell\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Mutation\x20{\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20create\x20new\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20create{{pascalCase\x20name}}(@Arg(\x27{{camelCase\x20name}}\x27)\x20{{camelCase\x20name}}:\x20New{{pascalCase\x20name}},\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20return\x20await\x20tx.getRepository({{pascalCase\x20name}}).save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20modify\x20{{pascalCase\x20name}}\x20information\x27\x20})\x0a\x20\x20async\x20update{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27id\x27)\x20id:\x20string,\x0a\x20\x20\x20\x20@Arg(\x27patch\x27)\x20patch:\x20{{pascalCase\x20name}}Patch,\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20repository\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20repository.findOne(\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20)\x0a\x0a\x20\x20\x20\x20return\x20await\x20repository.save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20...patch,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20[{{pascalCase\x20name}}],\x20{\x20description:\x20\x22To\x20modify\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20information\x22\x20})\x0a\x20\x20async\x20updateMultiple{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27patches\x27,\x20type\x20=>\x20[{{pascalCase\x20name}}Patch])\x20patches:\x20{{pascalCase\x20name}}Patch[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}[]>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20results\x20=\x20[]\x0a\x20\x20\x20\x20const\x20_createRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27+\x27)\x0a\x20\x20\x20\x20const\x20_updateRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27M\x27)\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}Repo\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x0a\x20\x20\x20\x20if\x20(_createRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_createRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20newRecord\x20=\x20_createRecords[i]\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...newRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27+\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20if\x20(_updateRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_updateRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20updRecord\x20=\x20_updateRecords[i]\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20{{camelCase\x20name}}Repo.findOne({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id:updRecord.id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...updRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27M\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20return\x20results\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20delete{{pascalCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove({\x20domain,\x20id,\x20updater:user\x20})\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20multiple\x20{{camelCase\x20name}}s\x27\x20})\x0a\x20\x20async\x20delete{{pluralPascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27ids\x27,\x20type\x20=>\x20[String])\x20ids:\x20string[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20delEntitis\x20=\x20ids.map(id=>{\x0a\x20\x20\x20\x20\x20\x20return\x20{domain,id,updater:user}\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove(delEntitis)\x0a\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a}\x0a','-history\x27','replace','packages','createHistoryEntityText','getColTxtType','find','existsPath','getRepository','PWD','tableName','\x0a\x20\x20public\x20createHistoryEntity(manager,\x20entity)\x20{\x0a\x20\x20\x20\x20let\x20history\x20=\x20manager.create(this.historyEntity,\x20entity);\x0a\x20\x20\x20\x20history.historyJson\x20=\x20JSON.stringify(entity);\x0a\x20\x20\x20\x20return\x20history;\x0a\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20','import\x20{\x20entities\x20as\x20','number','75691HtAPlN','Entity','Resolvers\x20}\x20from\x20\x27./','@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})','...','__esModule','\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}List\x20}\x20from\x20\x27./{{name}}-type\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Query\x20{\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20fetch\x20a\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20return\x20await\x20getRepository({{pascalCase\x20name}}).findOne({\x0a\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20}\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}List,\x20{\x20description:\x20\x27To\x20fetch\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{pluralCamelCase\x20name}}(@Args()\x20params:\x20ListParam,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}List>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20queryBuilder\x20=\x20getQueryBuilderFromListParams({\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20params,\x0a\x20\x20\x20\x20\x20\x20repository:\x20await\x20getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20const\x20convertedParams\x20=\x20convertListParams(params,\x20domain.id)\x0a\x20\x20\x20\x20const\x20[items,\x20total]\x20=\x20await\x20queryBuilder.getManyAndCount()\x0a\x0a\x20\x20\x20\x20return\x20{\x20items,\x20total\x20}\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20Domain)\x0a\x20\x20async\x20domain(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<Domain>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(Domain).findOneBy({id:{{camelCase\x20name}}.domainId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20updater(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.updaterId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20creator(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.creatorId})\x0a\x20\x20}\x0a}\x0a','Query','12883518PLxatZ','Resolver','dataProp','createServiceFiles','createServicePath','\x0a/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0a\x0a/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0a\x0aexport\x20const\x20entities\x20=\x20[\x20\x20\x0a\x20\x20/*\x20ENTITIES\x20*/\x0a]\x20\x0a\x0a\x0aexport\x20const\x20schema\x20=\x20{\x0a\x20\x20resolverClasses:\x20[\x0a\x20\x20\x20\x20/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x20\x20]\x20\x0a}\x0a\x0aexport\x20const\x20subscribers\x20=\x20[\x0a\x20\x20/*\x20SUBSCRIBERS\x20*/\x0a]\x0a','double','.ts','EntitySubscribers,','\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryQuery\x20}\x20from\x20\x27./{{name}}-history-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryEntitySubscriber\x20}\x20from\x20\x27./event-subscriber\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}},\x20{{pascalCase\x20name}}History]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}HistoryQuery,\x20{{pascalCase\x20name}}Mutation]\x0aexport\x20const\x20subscribers\x20=\x20[{{pascalCase\x20name}}HistoryEntitySubscriber]\x0a\x0a','Float','Date','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','domain','-history-query.ts','long','\x0aimport\x20{\x20ObjectType,\x20Field,\x20InputType,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@InputType()\x0aexport\x20class\x20New{{pascalCase\x20name}}\x20{\x0a{{newTypeColumns}}\x0a}\x0a\x0a@InputType()\x0aexport\x20class\x20{{pascalCase\x20name}}Patch\x20{\x0a\x20\x20@Field(type\x20=>\x20ID,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20id?:\x20string\x0a\x0a{{patchTypeColumns}}\x0a\x0a\x20\x20@Field()\x0a\x20\x20cuFlag:\x20string\x0a}\x0a\x0a@ObjectType()\x0aexport\x20class\x20{{pascalCase\x20name}}List\x20{\x0a\x20\x20@Field(type\x20=>\x20[{{pascalCase\x20name}}])\x0a\x20\x20items:\x20{{pascalCase\x20name}}[]\x0a\x0a\x20\x20@Field(type\x20=>\x20Int)\x0a\x20\x20total:\x20number\x0a}\x0a','filter','createEntityText','export\x20*\x20from\x20\x27./','type\x20=>','\x0aimport\x20{\x20EventSubscriber\x20}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20HistoryEntitySubscriber\x20}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20getRepository\x20}\x20from\x20\x27@things-factory/shell\x27\x0a\x0a@EventSubscriber()\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryEntitySubscriber\x20extends\x20HistoryEntitySubscriber<{{pascalCase\x20name}},{{pascalCase\x20name}}History>\x20{\x0a\x20\x20public\x20get\x20entity()\x20{\x0a\x20\x20\x20\x20return\x20{{pascalCase\x20name}}\x0a\x20\x20}\x0a\x0a\x20\x20public\x20get\x20historyEntity()\x20{\x0a\x20\x20\x20\x20return\x20{{pascalCase\x20name}}History\x0a\x20\x20}\x0a\x0a\x20\x20{{entityToJson}}\x0a\x0a\x20\x20async\x20beforeRemoveHistory(history:{{pascalCase\x20name}}History,entity:{{pascalCase\x20name}}){\x0a\x20\x20\x20\x20let\x20repo\x20=\x20getRepository({{pascalCase\x20name}}History);\x0a\x20\x20\x20\x20const\x20revNo\x20=\x20await\x20repo.createQueryBuilder()\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.select(\x27max(data_revision_no)\x27,\x20\x27rev_no\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.where(\x27domain_id\x20=\x20:domainId\x27,\x20{\x20domainId:\x20entity.domain.id\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.andWhere(\x27original_id\x20=\x20:originalId\x27,\x20{\x20originalId:\x20entity.id\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.getRawOne()\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20history.dataRevisionNo\x20=\x20revNo\x20?\x20revNo.rev_no\x20+\x201\x20:\x201;\x0a\x20\x20\x20\x20return\x20history;\x0a\x20\x20}\x0a}\x0a','state','\x0a\x20\x20','pluralPascalCaseName','type-graphql','/packages','/service','getProjectRootPath','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','env','Entities,\x20resolvers\x20as\x20','columnToEntityColumn','\x27,\x20type:\x20\x27','sort','camelCaseName','push','readFileSync','colType','character\x20varying','__param','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a\x20\x20@Column(\x27simple-json\x27,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20@Field(type\x20=>\x20ScalarObject,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20historyJson?:\x20any\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','-history.ts','EntityColumn','join','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20Domain\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0a@Entity(\x27{{tableName}}\x27)\x0a{{indexAnn}}\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}\x20{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','domain_id','colSize','{{camelCase\x20name}}.','split','uniqRank','\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryList\x20}\x20from\x20\x27./{{name}}-history-type\x27\x0a\x0a@Resolver({{pascalCase\x20name}}History)\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryQuery\x20{\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}History,\x20{\x20description:\x20\x27To\x20fetch\x20a\x20{{pascalCase\x20name}}History\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}History(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}History>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20return\x20await\x20getRepository({{pascalCase\x20name}}History).findOne({\x0a\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20}\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}HistoryList,\x20{\x20description:\x20\x27To\x20fetch\x20multiple\x20{{pluralPascalCase\x20name}}History\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}Histories(@Args()\x20params:\x20ListParam,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}HistoryList>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20queryBuilder\x20=\x20getQueryBuilderFromListParams({\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20params,\x0a\x20\x20\x20\x20\x20\x20repository:\x20await\x20getRepository({{pascalCase\x20name}}History)\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20const\x20[items,\x20total]\x20=\x20await\x20queryBuilder.getManyAndCount()\x0a\x0a\x20\x20\x20\x20return\x20{\x20items,\x20total\x20}\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20Domain)\x0a\x20\x20async\x20domain(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<Domain>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(Domain).findOneBy({id:{{camelCase\x20name}}History.domainId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20updater(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}History.updaterId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20creator(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}History.creatorId})\x0a\x20\x20}\x0a}\x0a','rank','1012284TMIQHF','Resolvers,\x20subscribers\x20as\x20','/*\x20ENTITIES\x20*/\x0a\x09...','@Column({name:\x27','__metadata','string','80JaIqvS','decimal','@Field(','updater','\x20})','createNoHistoryServiceFiels','createTypeText','-query.ts','/packages/','design:paramtypes','text','Entities,','updater_id','/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...','indexOf','\x20{\x20nullable:\x20','existsSync','__decorate'];a0_0x5568=function(){return _0x9a5362;};return a0_0x5568();}const allIndex=a0_0x140de2(0x130),serviceIndex=a0_0x140de2(0xe6),serviceHistoryIndex=a0_0x140de2(0x134),serviceQuery=a0_0x140de2(0x129),serviceHistoryQuery=a0_0x140de2(0x15e),serviceMutation=a0_0x140de2(0x115),sereviceType=a0_0x140de2(0x13b),sereviceHistoryType=a0_0x140de2(0x113),serviceEntity=a0_0x140de2(0x158),serviceEntityHistCopy=a0_0x140de2(0x10e),serviceEntityHistJson=a0_0x140de2(0x154),serviceEntitySubscriber=a0_0x140de2(0x140);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x25dfb1=a0_0x47fb;(function(_0x3672,_0x458cac){const _0x342357=a0_0x47fb,_0x384136=_0x3672();while(!![]){try{const _0x3c5e54=parseInt(_0x342357(0xcd))/0x1*(-parseInt(_0x342357(0xbb))/0x2)+-parseInt(_0x342357(0xba))/0x3*(parseInt(_0x342357(0xbf))/0x4)+-parseInt(_0x342357(0xb8))/0x5*(parseInt(_0x342357(0xae))/0x6)+-parseInt(_0x342357(0xc0))/0x7*(-parseInt(_0x342357(0xb4))/0x8)+parseInt(_0x342357(0xcf))/0x9*(parseInt(_0x342357(0xbc))/0xa)+-parseInt(_0x342357(0xc5))/0xb+parseInt(_0x342357(0xce))/0xc;if(_0x3c5e54===_0x458cac)break;else _0x384136['push'](_0x384136['shift']());}catch(_0x2e20){_0x384136['push'](_0x384136['shift']());}}}(a0_0x5ae2,0xb2477));Object[a0_0x25dfb1(0xcc)](exports,'__esModule',{'value':!0x0}),exports[a0_0x25dfb1(0xb7)]=exports['checkStudioPermission']=void 0x0;function a0_0x47fb(_0xdf16ec,_0x5ecd7c){const _0x5ae21c=a0_0x5ae2();return a0_0x47fb=function(_0x47fb87,_0x87b895){_0x47fb87=_0x47fb87-0xad;let _0x3f356d=_0x5ae21c[_0x47fb87];return _0x3f356d;},a0_0x47fb(_0xdf16ec,_0x5ecd7c);}const operato_license_checker_1=require(a0_0x25dfb1(0xc4)),shell_1=require(a0_0x25dfb1(0xca)),menu_base_1=require('@things-factory/menu-base'),license_error_1=require('../../errors/license-error');async function checkStudioPermission(){const _0x42d7dc=a0_0x25dfb1;let _0x1bf209=((0x0,operato_license_checker_1['getPermission'])(_0x42d7dc(0xad))||',')[_0x42d7dc(0xb6)](',')[_0x42d7dc(0xd4)](_0x1728f9=>_0x1728f9[_0x42d7dc(0xc8)]()),_0x4f56e7=!0x1;return _0x1bf209[_0x42d7dc(0xd3)](_0x304031=>{const _0xa8ab02=_0x42d7dc;_0x304031['includes'](_0xa8ab02(0xb0))&&(_0x4f56e7=!0x0);}),_0x4f56e7;}async function checkStudioTemplateIsOverLimit(_0x219690,_0xcd2bef){const _0x93705c=a0_0x25dfb1;if(0x0==await checkStudioPermission())throw new license_error_1[(_0x93705c(0xb3))]({'errorCode':_0xcd2bef['t'](license_error_1[_0x93705c(0xb3)]['ERROR_CODES'][_0x93705c(0xc6)])});var _0x2e5b6c=0x0;if(_0x2e5b6c=_0x219690&&''!=_0x219690?await(0x0,shell_1['getRepository'])(menu_base_1[_0x93705c(0xcb)])[_0x93705c(0xc3)][_0x93705c(0xb2)]()[_0x93705c(0xd0)](_0x93705c(0xc9))['from'](menu_base_1[_0x93705c(0xcb)],_0x93705c(0xc9))[_0x93705c(0xd2)](_0x93705c(0xb9),{'id':_0x219690})[_0x93705c(0xbd)]('(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)')[_0x93705c(0xb5)]()+0x1:await(0x0,shell_1[_0x93705c(0xc1)])(menu_base_1[_0x93705c(0xcb)])[_0x93705c(0xc3)]['createQueryBuilder']()[_0x93705c(0xd0)](_0x93705c(0xc9))[_0x93705c(0xd1)](menu_base_1[_0x93705c(0xcb)],_0x93705c(0xc9))['where'](_0x93705c(0xb1))['getCount']()+0x1,!(0x0,operato_license_checker_1[_0x93705c(0xc2)])(_0x2e5b6c))throw new license_error_1[(_0x93705c(0xb3))]({'errorCode':_0xcd2bef['t'](license_error_1[_0x93705c(0xb3)][_0x93705c(0xaf)][_0x93705c(0xbe)])});return!0x0;}exports[a0_0x25dfb1(0xc7)]=checkStudioPermission,exports[a0_0x25dfb1(0xb7)]=checkStudioTemplateIsOverLimit;function a0_0x5ae2(){const _0x24fee8=['(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)','createQueryBuilder','LicenseError','40jhqeLf','getCount','split','checkStudioTemplateIsOverLimit','639895NKkjws','id\x20!=\x20:id','507smvjtv','2NTAgIj','131290XOJCfm','andWhere','OVER_LIMIT','29720pQSqbk','200809wziSVH','getRepository','checkTarget','manager','@things-factory/operato-license-checker','74800ubwYPH','INVALID_LICENSE','checkStudioPermission','trim','menu','@things-factory/shell','Menu','defineProperty','322797LjwzWe','24291996xdVgav','189LzJOSn','select','from','where','forEach','map','Permissions\x20For\x20Tailor\x20Tool','6zQQRta','ERROR_CODES','Studio'];a0_0x5ae2=function(){return _0x24fee8;};return a0_0x5ae2();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';function a0_0x30b0(){const _0x4dd5ed=['prototype','3764530BpAkbo','Operato\x20Tool\x20Studio\x20Usage\x20Permissions','18GrhrIG','304036gBLyjB','108729ZcgAPd','design:type','__param','OperatoToolResolver','Query','design:paramtypes','561596hjUBjl','__decorate','design:returntype','1931095jCCmBD','Operato\x20Tool\x20Studio\x20Limit\x20check','6267672BDylzM','4Jutyez','192biYGtG','studioTemplateIsOverLimit','Resolver','./tool-permission','Arg','studioPermission','__metadata','defineProperty','36860210zSaZil'];a0_0x30b0=function(){return _0x4dd5ed;};return a0_0x30b0();}const a0_0x531021=a0_0x3466;(function(_0x2bbd8a,_0x4976e9){const _0x16d3d5=a0_0x3466,_0x2e4a67=_0x2bbd8a();while(!![]){try{const _0x4c9aea=-parseInt(_0x16d3d5(0x1c8))/0x1+-parseInt(_0x16d3d5(0x1c1))/0x2*(parseInt(_0x16d3d5(0x1c0))/0x3)+-parseInt(_0x16d3d5(0x1b3))/0x4*(parseInt(_0x16d3d5(0x1cb))/0x5)+-parseInt(_0x16d3d5(0x1b2))/0x6+-parseInt(_0x16d3d5(0x1be))/0x7+-parseInt(_0x16d3d5(0x1b4))/0x8*(-parseInt(_0x16d3d5(0x1c2))/0x9)+parseInt(_0x16d3d5(0x1bc))/0xa;if(_0x4c9aea===_0x4976e9)break;else _0x2e4a67['push'](_0x2e4a67['shift']());}catch(_0x238cf0){_0x2e4a67['push'](_0x2e4a67['shift']());}}}(a0_0x30b0,0x82488));Object[a0_0x531021(0x1bb)](exports,'__esModule',{'value':!0x0}),exports['OperatoToolResolver']=void 0x0;const tslib_1=require('tslib'),type_graphql_1=require('type-graphql'),tool_permission_1=require(a0_0x531021(0x1b7));function a0_0x3466(_0x51e8f3,_0x897008){const _0x30b0ae=a0_0x30b0();return a0_0x3466=function(_0x346684,_0x569c34){_0x346684=_0x346684-0x1b1;let _0x5de703=_0x30b0ae[_0x346684];return _0x5de703;},a0_0x3466(_0x51e8f3,_0x897008);}let OperatoToolResolver=class{async[a0_0x531021(0x1b9)](_0x4296bc){return(0x0,tool_permission_1['checkStudioPermission'])();}async[a0_0x531021(0x1b5)](_0x538cc3,_0x17e800){return(0x0,tool_permission_1['checkStudioTemplateIsOverLimit'])(_0x538cc3,_0x17e800);}};tslib_1[a0_0x531021(0x1c9)]([(0x0,type_graphql_1[a0_0x531021(0x1c6)])(_0xdc08f9=>Boolean,{'description':a0_0x531021(0x1bf)}),tslib_1[a0_0x531021(0x1c4)](0x0,(0x0,type_graphql_1['Ctx'])()),tslib_1[a0_0x531021(0x1ba)](a0_0x531021(0x1c3),Function),tslib_1[a0_0x531021(0x1ba)](a0_0x531021(0x1c7),[Object]),tslib_1[a0_0x531021(0x1ba)]('design:returntype',Promise)],OperatoToolResolver[a0_0x531021(0x1bd)],a0_0x531021(0x1b9),null),tslib_1[a0_0x531021(0x1c9)]([(0x0,type_graphql_1['Query'])(_0x367ace=>Boolean,{'description':a0_0x531021(0x1b1)}),tslib_1[a0_0x531021(0x1c4)](0x0,(0x0,type_graphql_1[a0_0x531021(0x1b8)])('id')),tslib_1[a0_0x531021(0x1c4)](0x1,(0x0,type_graphql_1['Ctx'])()),tslib_1['__metadata']('design:type',Function),tslib_1[a0_0x531021(0x1ba)]('design:paramtypes',[String,Object]),tslib_1[a0_0x531021(0x1ba)](a0_0x531021(0x1ca),Promise)],OperatoToolResolver[a0_0x531021(0x1bd)],'studioTemplateIsOverLimit',null),OperatoToolResolver=tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x531021(0x1b6)])()],OperatoToolResolver),exports[a0_0x531021(0x1c5)]=OperatoToolResolver;
|