@things-factory/operato-tools 6.0.124 → 6.0.126
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 +21 -21
- 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_0x100d2a=a0_0x5a5d;(function(_0x2ff990,_0x1bd4cf){const _0x55b1f9=a0_0x5a5d,_0x3f9881=_0x2ff990();while(!![]){try{const _0x3725a8=parseInt(_0x55b1f9(0x18f))/0x1+-parseInt(_0x55b1f9(0x19a))/0x2+parseInt(_0x55b1f9(0x191))/0x3+parseInt(_0x55b1f9(0x19b))/0x4+parseInt(_0x55b1f9(0x19e))/0x5+-parseInt(_0x55b1f9(0x195))/0x6*(-parseInt(_0x55b1f9(0x190))/0x7)+parseInt(_0x55b1f9(0x194))/0x8*(-parseInt(_0x55b1f9(0x19f))/0x9);if(_0x3725a8===_0x1bd4cf)break;else _0x3f9881['push'](_0x3f9881['shift']());}catch(_0x32f13f){_0x3f9881['push'](_0x3f9881['shift']());}}}(a0_0x10b2,0xe6614));function a0_0x5a5d(_0x5acbe5,_0x503f24){const _0x10b2c7=a0_0x10b2();return a0_0x5a5d=function(_0x5a5d35,_0x57f2eb){_0x5a5d35=_0x5a5d35-0x18c;let _0x69cfb=_0x10b2c7[_0x5a5d35];return _0x69cfb;},a0_0x5a5d(_0x5acbe5,_0x503f24);}Object[a0_0x100d2a(0x192)](exports,'__esModule',{'value':!0x0}),exports[a0_0x100d2a(0x198)]=void 0x0;const tslib_1=require(a0_0x100d2a(0x197)),ERROR_CODES=tslib_1[a0_0x100d2a(0x18d)](require(a0_0x100d2a(0x193)));class LicenseError extends Error{static get[a0_0x100d2a(0x199)](){const _0x115245=a0_0x100d2a;return Object[_0x115245(0x18c)]({},ERROR_CODES);}constructor({errorCode:_0xf4a8b3,detail:_0x4c4ee3}){const _0x2e943b=a0_0x100d2a;super(_0xf4a8b3),this[_0x2e943b(0x196)]=_0x2e943b(0x19d),this[_0x2e943b(0x18e)]=_0xf4a8b3,this[_0x2e943b(0x19c)]=_0x4c4ee3;}}function a0_0x10b2(){const _0x429b9e=['../constants/error-code','5096mcxGKI','607614JkxUmm','name','tslib','LicenseError','ERROR_CODES','1478758yNDdUU','2807300yZtQIZ','detail','license-error','4847295FyNJcE','19539hydlaA','assign','__importStar','errorCode','884756FgRhaC','14jbxftj','922092bImQLr','defineProperty'];a0_0x10b2=function(){return _0x429b9e;};return a0_0x10b2();}exports[a0_0x100d2a(0x198)]=LicenseError;
|
package/server/routes.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a0_0x5ec853=a0_0x4697;(function(_0x4d7e6a,_0x1c51bb){const _0x1295a1=a0_0x4697,_0x3c9412=_0x4d7e6a();while(!![]){try{const _0x49e742=parseInt(_0x1295a1(0x1f3))/0x1*(-parseInt(_0x1295a1(0x1f6))/0x2)+parseInt(_0x1295a1(0x1f0))/0x3+parseInt(_0x1295a1(0x1f2))/0x4*(parseInt(_0x1295a1(0x1f8))/0x5)+-parseInt(_0x1295a1(0x1fa))/0x6+parseInt(_0x1295a1(0x1f4))/0x7*(parseInt(_0x1295a1(0x1f5))/0x8)+parseInt(_0x1295a1(0x1fc))/0x9+-parseInt(_0x1295a1(0x1f9))/0xa;if(_0x49e742===_0x1c51bb)break;else _0x3c9412['push'](_0x3c9412['shift']());}catch(_0x563e28){_0x3c9412['push'](_0x3c9412['shift']());}}}(a0_0x365f,0xd8d3b));function a0_0x4697(_0x549196,_0xc7aa2a){const _0x365fa1=a0_0x365f();return a0_0x4697=function(_0x4697ce,_0x592451){_0x4697ce=_0x4697ce-0x1f0;let _0x4ba6cd=_0x365fa1[_0x4697ce];return _0x4ba6cd;},a0_0x4697(_0x549196,_0xc7aa2a);}function a0_0x365f(){const _0x1103a3=['290646HviKyx','bootstrap-module-global-private-route','2332865pwBjwF','13944390UuSkBv','1728168qwWyJc','bootstrap-module-global-public-route','6412158nlqeoJ','debug','1037541JALtrJ','things-factory:operato-tools:routes','4DxFqJF','1kClLUN','7iZwPTi','9528248anuNbW'];a0_0x365f=function(){return _0x1103a3;};return a0_0x365f();}const debug=require(a0_0x5ec853(0x1fd))(a0_0x5ec853(0x1f1));process['on'](a0_0x5ec853(0x1fb),(_0x4ba074,_0x1c0c69)=>{}),process['on'](a0_0x5ec853(0x1f7),(_0x3d0a9c,_0x12a14c)=>{}),process['on']('bootstrap-module-domain-public-route',(_0x8f7d2,_0x33d98c)=>{}),process['on']('bootstrap-module-domain-private-route',(_0xaa6126,_0x30a5dd)=>{});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x1d12bc=a0_0x59a9;(function(_0x31eeb4,_0x384d65){const _0xf71cd9=a0_0x59a9,_0x2065ea=_0x31eeb4();while(!![]){try{const _0x46920a=parseInt(_0xf71cd9(0x1de))/0x1+-parseInt(_0xf71cd9(0x202))/0x2*(parseInt(_0xf71cd9(0x1f2))/0x3)+parseInt(_0xf71cd9(0x251))/0x4*(parseInt(_0xf71cd9(0x20f))/0x5)+parseInt(_0xf71cd9(0x212))/0x6*(-parseInt(_0xf71cd9(0x1fa))/0x7)+parseInt(_0xf71cd9(0x24b))/0x8*(-parseInt(_0xf71cd9(0x1df))/0x9)+-parseInt(_0xf71cd9(0x217))/0xa*(parseInt(_0xf71cd9(0x22c))/0xb)+parseInt(_0xf71cd9(0x1ef))/0xc;if(_0x46920a===_0x384d65)break;else _0x2065ea['push'](_0x2065ea['shift']());}catch(_0x109fbc){_0x2065ea['push'](_0x2065ea['shift']());}}}(a0_0x57d0,0x1d18b));Object[a0_0x1d12bc(0x22e)](exports,a0_0x1d12bc(0x1e7),{'value':!0x0}),exports[a0_0x1d12bc(0x205)]=void 0x0;function a0_0x57d0(){const _0x26b733=['__esModule','@things-factory/resource-base','replace','updated_at','checkStudioTemplateIsOverLimit',',\x22mandatory\x22:\x20',',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22','{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22','5665164FLmeQy','hiddenFlag','Operato\x20Tool\x20Create\x20Menu','6lXojxQ','menuType','creator','readonly','createdAt','__metadata','type-graphql','scenario','1071TvIpAk','substring','lodash','h1z0q9i9x7q6',',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22','sort','\x22,\x22hidden\x22:','\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}','175724iVoGIs','update','reverseSort','OperatoToolCreateMenu','\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}','searchOper','string','__importDefault','state','design:returntype','SCREEN','refType','./../tool-secret/tool-permission','7415JZSdlE','parent','parent_menu_id','6078fqXpKI','length','\x20,\x22editable\x22:\x20','createGridColumns','enc','10PEaGQt','map','\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','push','prototype','\x22,\x22desc\x22:','\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}','meta-grist-page','randomBytes','dataProp','template','gridRank','Menu','save','join','aes-256-ecb','query','from','searchRank','@transaction','Directive','516021gQtyNi','aes-256-cbc','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','aes256','JSON','pluralize','assign','filter','toString','{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22','updatedAt','Mutation','\x22,\x22operator\x22:\x20\x22','rank','tslib','aes-256-cfb',',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22','find','hidden','@things-factory/meta-ui/client/pages/meta-grist-page','getRepository','EntityColumn','createSearchCols','name','resourceUrl','entity','sortRank','\x20,\x22exportable\x22:\x20true','\x22,\x22header\x22:\x20\x22','\x22,\x22width\x22:','1192544jCkivQ','createSortCols','\x27\x20or\x20id\x20=\x20\x27','category','Entity','@things-factory/menu-base','412nyLzoZ','Arg','hex','default','__decorate','updater','aes-256-ctr','{\x22name\x22:\x22','__param','left','created_at','\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22basic\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22label\x22:\x20\x22data_history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22icon\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22logic\x22:\x20\x22history_json\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20','21025pyAtLg','9aOKLqi','utf8','refName','\x22,\x22name\x22:\x20\x22','aes-256-ofb','final','Ctx','stringify'];a0_0x57d0=function(){return _0x26b733;};return a0_0x57d0();}const tslib_1=require(a0_0x1d12bc(0x23b)),type_graphql_1=require(a0_0x1d12bc(0x1f8)),resource_base_1=require(a0_0x1d12bc(0x1e8)),menu_base_1=require(a0_0x1d12bc(0x250)),tool_permission_1=require(a0_0x1d12bc(0x20e)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x1d12bc(0x1fc)),{plural:plural}=require(a0_0x1d12bc(0x232)),crypto_1=tslib_1[a0_0x1d12bc(0x209)](require('crypto'));function a0_0x59a9(_0x53343f,_0x532808){const _0x57d0e4=a0_0x57d0();return a0_0x59a9=function(_0x59a9ea,_0x4a1a81){_0x59a9ea=_0x59a9ea-0x1dd;let _0x236fe8=_0x57d0e4[_0x59a9ea];return _0x236fe8;},a0_0x59a9(_0x53343f,_0x532808);}let OperatoToolCreateMenu=class{async['toolCreateMenu'](_0x44f8c7,_0x3547d1,_0x158a0e){const _0x567668=a0_0x1d12bc,{domain:_0x3c7adf,user:_0x106b4a,tx:_0x513e7f}=_0x158a0e[_0x567668(0x20a)];await(0x0,tool_permission_1[_0x567668(0x1eb)])('',_0x158a0e);const _0x3d847e=await _0x513e7f['getRepository'](resource_base_1[_0x567668(0x24f)])['findOne']({'where':{'domain':{'id':_0x3c7adf['id']},'id':_0x44f8c7}}),_0x327cb3=await _0x513e7f[_0x567668(0x241)](resource_base_1[_0x567668(0x242)])[_0x567668(0x23e)]({'where':{'domain':{'id':_0x3c7adf['id']},'entity':{'id':_0x3d847e['id']}}});let {name:_0x500208=''}=_0x3d847e||{},_0x4fc5fa=kebabCase(_0x500208),_0x16fe93=modelTemplate[_0x567668(0x1e9)](/{{pascalCase name}}/g,startCase(camelCase(_0x500208))[_0x567668(0x1e9)](/ /g,''))[_0x567668(0x1e9)](/{{camelCase name}}/g,camelCase(_0x500208))['replace'](/{{snakeCase name}}/g,snakeCase(_0x500208))[_0x567668(0x1e9)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x500208)))[_0x567668(0x1e9)](/ /g,''))[_0x567668(0x1e9)](/{{pluralCamelCase name}}/g,camelCase(plural(_0x500208)))[_0x567668(0x1e9)](/{{name}}/g,_0x500208),_0x5a8a21='';_0x567668(0x231)==_0x3d847e[_0x567668(0x220)]?_0x5a8a21=_0x567668(0x1dd):'COPY'==_0x3d847e[_0x567668(0x220)]&&(_0x5a8a21=_0x567668(0x22f)),_0x16fe93=_0x16fe93['replace'](/{{HistoryButton}}/g,_0x5a8a21);let _0x3b6fb6=this[_0x567668(0x24c)](_0x327cb3);_0x16fe93=_0x16fe93[_0x567668(0x1e9)](/{{SortColumns}}/g,_0x3b6fb6[_0x567668(0x225)](','));let _0x345fa6=this['createSearchCols'](_0x327cb3);_0x16fe93=_0x16fe93['replace'](/{{SearchColumns}}/g,_0x345fa6[_0x567668(0x225)](','));let _0x27636f=this[_0x567668(0x215)](_0x327cb3);return _0x16fe93=_0x16fe93['replace'](/{{GridColumns}}/g,_0x27636f[_0x567668(0x225)](',')),_0x16fe93=this['enc'](_0x16fe93),await this['createMenuData'](_0x513e7f,_0x3c7adf,_0x106b4a,_0x3547d1,_0x4fc5fa,_0x16fe93),!0x0;}[a0_0x1d12bc(0x215)](_0x3e9c13){const _0x5a631c=a0_0x1d12bc;return _0x3e9c13['filter'](_0xa0e227=>'id'!=_0xa0e227['name']&&_0xa0e227['gridRank']>0x0)[_0x5a631c(0x1ff)](function(_0x5ee47b,_0x1ed8aa){const _0x27cb6e=_0x5a631c;return _0x5ee47b['gridRank']-_0x1ed8aa[_0x27cb6e(0x222)];})[_0x5a631c(0x218)](_0x59af37=>{const _0x523963=_0x5a631c;let {gridEditor:_0x2b3a72=_0x523963(0x208),name:_0x34b0cd,term:_0x19d290,gridWidth:_0x49d58d=0x0,gridAlign:_0x82a135=_0x523963(0x25a),nullable:_0x5cc4d7=!0x1}=_0x59af37;if(null==_0x2b3a72&&(_0x2b3a72=_0x523963(0x208)),null==_0x82a135&&(_0x82a135=_0x523963(0x25a)),'updater_id'==_0x34b0cd||'creator_id'==_0x34b0cd)return _0x34b0cd='updater_id'==_0x34b0cd?_0x523963(0x256):_0x523963(0x1f4),_0x523963(0x1ee)+_0x34b0cd+'\x22,\x22header\x22:\x20\x22'+_0x34b0cd+_0x523963(0x201);if(_0x523963(0x1ea)==_0x34b0cd||_0x523963(0x25b)==_0x34b0cd)return _0x523963(0x236)+(_0x523963(0x1ea)==_0x34b0cd?_0x523963(0x237):_0x523963(0x1f6))+_0x523963(0x249)+_0x34b0cd+_0x523963(0x206);let _0x2a6fab=_0x523963(0x1f5)!=_0x2b3a72&&_0x523963(0x23f)!=_0x2b3a72,_0x2e8496='hidden'==_0x2b3a72;0x1!=_0x2e8496&&0x0!=_0x2a6fab||(_0x2b3a72='string');let _0x297a5d='{\x22type\x22:\x20\x22'+_0x2b3a72+_0x523963(0x1e2)+camelCase(_0x34b0cd)+_0x523963(0x249)+_0x19d290+_0x523963(0x200)+_0x2e8496+_0x523963(0x214)+_0x2a6fab+_0x523963(0x1ec)+!_0x5cc4d7+_0x523963(0x1ed)+_0x82a135+_0x523963(0x24a)+_0x49d58d+_0x523963(0x248);return'code'==_0x59af37[_0x523963(0x20d)]&&(_0x297a5d+=',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22'+_0x59af37[_0x523963(0x1e1)]+'\x22}'),_0x523963(0x1f9)==_0x59af37[_0x523963(0x20d)]&&(_0x297a5d+=_0x523963(0x23d)+_0x59af37[_0x523963(0x1e1)]+'\x22}'),_0x523963(0x246)==_0x59af37[_0x523963(0x20d)]&&(_0x297a5d+=_0x523963(0x1fe)+camelCase(plural(_0x59af37['refName']))+_0x523963(0x21d)),_0x297a5d+='}',_0x297a5d;});}[a0_0x1d12bc(0x243)](_0x592f33){const _0x1000d6=a0_0x1d12bc;return _0x592f33[_0x1000d6(0x234)](_0xc0eaa0=>_0xc0eaa0[_0x1000d6(0x229)]>0x0)['sort'](function(_0x1b648d,_0x2846bb){const _0x2c9915=_0x1000d6;return _0x1b648d[_0x2c9915(0x229)]-_0x2846bb[_0x2c9915(0x229)];})[_0x1000d6(0x218)](_0x457fa7=>{const _0x4f30b8=_0x1000d6;let _0x74814d=_0x457fa7[_0x4f30b8(0x207)];return _0x4f30b8(0x234)==_0x74814d?'\x22'+camelCase(_0x457fa7[_0x4f30b8(0x244)])+'\x22':(_0x74814d||(_0x74814d='eq'),'{\x22name\x22:\x20\x22'+camelCase(_0x457fa7[_0x4f30b8(0x244)])+_0x4f30b8(0x239)+_0x74814d+'\x22}');});}[a0_0x1d12bc(0x24c)](_0x341421){const _0x1af253=a0_0x1d12bc;return _0x341421[_0x1af253(0x234)](_0x282b6b=>_0x282b6b[_0x1af253(0x247)]>0x0)[_0x1af253(0x1ff)](function(_0xe354d3,_0x2db8e2){const _0x52fad4=_0x1af253;return _0xe354d3[_0x52fad4(0x247)]-_0x2db8e2[_0x52fad4(0x247)];})[_0x1af253(0x218)](_0x292618=>_0x1af253(0x258)+camelCase(_0x292618[_0x1af253(0x244)])+_0x1af253(0x21c)+_0x292618[_0x1af253(0x204)]+'}');}async['createMenuData'](_0x3d9c69,_0x50992f,_0x390d19,_0x26542c,_0x1e5c53,_0x578522){const _0x4fed97=a0_0x1d12bc;let _0x559fb0=await _0x3d9c69[_0x4fed97(0x241)](menu_base_1['Menu'])['findOne']({'where':{'domain':{'id':_0x50992f['id']},'id':_0x26542c}}),_0xbe7150=(await _0x3d9c69[_0x4fed97(0x241)](menu_base_1[_0x4fed97(0x223)])[_0x4fed97(0x227)]('select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27'+_0x26542c+_0x4fed97(0x24d)+_0x26542c+'\x27'))[0x0][_0x4fed97(0x23a)]+0xa,_0x3beb41=new menu_base_1['Menu']();_0x3beb41['name']=_0x1e5c53,_0x3beb41[_0x4fed97(0x1f3)]=_0x4fed97(0x20c),_0x3beb41[_0x4fed97(0x24e)]=_0x4fed97(0x21e),_0x3beb41[_0x4fed97(0x23a)]=_0xbe7150,_0x3beb41[_0x4fed97(0x1f0)]=!0x1,_0x3beb41['routing']=_0x1e5c53,_0x3beb41[_0x4fed97(0x221)]=_0x578522,_0x3beb41[_0x4fed97(0x245)]=_0x4fed97(0x240),_0x3beb41[_0x4fed97(0x210)]=_0x559fb0,await _0x3d9c69[_0x4fed97(0x241)](menu_base_1[_0x4fed97(0x223)])[_0x4fed97(0x224)](Object[_0x4fed97(0x233)](Object[_0x4fed97(0x233)]({},_0x3beb41),{'domain':_0x50992f,'creator':_0x390d19,'updater':_0x390d19}));}[a0_0x1d12bc(0x216)](_0x1c2d22){const _0x4a911a=a0_0x1d12bc;let _0xeff8ff=JSON[_0x4a911a(0x1e6)](_0x1c2d22)['split'](/(.{100})/)[_0x4a911a(0x234)](_0x184742=>_0x184742),_0x4bdde1=[_0x4a911a(0x226),_0x4a911a(0x22d),_0x4a911a(0x23c),'aes-256-cfb8','aes-256-cfb1',_0x4a911a(0x1e3),_0x4a911a(0x257),_0x4a911a(0x230)],_0x58a37e=crypto_1[_0x4a911a(0x254)][_0x4a911a(0x21f)](0x20)[_0x4a911a(0x235)]('hex'),_0x53ecbc=Buffer[_0x4a911a(0x228)](_0x58a37e,'hex'),_0x5bc80d=_0x58a37e[_0x4a911a(0x1fb)](0x0,0x10),_0x170c18=['',_0x5bc80d,_0x5bc80d,_0x5bc80d,_0x5bc80d,_0x5bc80d,_0x5bc80d,_0x5bc80d],_0x54a64e=0x0,_0x3e48fe=[];_0x3e48fe[_0x4a911a(0x21a)](_0x58a37e);for(var _0x151d66=0x0;_0x151d66<_0xeff8ff['length'];_0x151d66++,_0x54a64e++){_0x54a64e==_0x4bdde1[_0x4a911a(0x213)]&&(_0x54a64e=0x0);let _0x4373d8=crypto_1[_0x4a911a(0x254)]['createCipheriv'](_0x4bdde1[_0x54a64e],_0x53ecbc,_0x170c18[_0x54a64e]),_0x2a0ba5=_0x4373d8[_0x4a911a(0x203)](_0xeff8ff[_0x151d66],_0x4a911a(0x1e0),_0x4a911a(0x253));_0x2a0ba5+=_0x4373d8[_0x4a911a(0x1e4)](_0x4a911a(0x253)),_0x3e48fe[_0x4a911a(0x21a)](_0x2a0ba5);}return _0x3e48fe[_0x4a911a(0x225)](_0x4a911a(0x1fd));}};tslib_1[a0_0x1d12bc(0x255)]([(0x0,type_graphql_1[a0_0x1d12bc(0x22b)])(a0_0x1d12bc(0x22a)),(0x0,type_graphql_1[a0_0x1d12bc(0x238)])(_0x57b92a=>Boolean,{'description':a0_0x1d12bc(0x1f1)}),tslib_1[a0_0x1d12bc(0x259)](0x0,(0x0,type_graphql_1[a0_0x1d12bc(0x252)])('id')),tslib_1['__param'](0x1,(0x0,type_graphql_1[a0_0x1d12bc(0x252)])(a0_0x1d12bc(0x211))),tslib_1[a0_0x1d12bc(0x259)](0x2,(0x0,type_graphql_1[a0_0x1d12bc(0x1e5)])()),tslib_1[a0_0x1d12bc(0x1f7)]('design:type',Function),tslib_1[a0_0x1d12bc(0x1f7)]('design:paramtypes',[String,String,Object]),tslib_1['__metadata'](a0_0x1d12bc(0x20b),Promise)],OperatoToolCreateMenu[a0_0x1d12bc(0x21b)],'toolCreateMenu',null),OperatoToolCreateMenu=tslib_1[a0_0x1d12bc(0x255)]([(0x0,type_graphql_1['Resolver'])()],OperatoToolCreateMenu),exports[a0_0x1d12bc(0x205)]=OperatoToolCreateMenu;const modelTemplate=a0_0x1d12bc(0x219);
|
|
1
|
+
'use strict';function a0_0x54b4(_0x5de620,_0x58bab9){const _0x53f72e=a0_0x53f7();return a0_0x54b4=function(_0x54b4a0,_0x3bb09c){_0x54b4a0=_0x54b4a0-0x11a;let _0x3fbb60=_0x53f72e[_0x54b4a0];return _0x3fbb60;},a0_0x54b4(_0x5de620,_0x58bab9);}const a0_0x81dece=a0_0x54b4;(function(_0x1908a4,_0x6426f1){const _0x20cf83=a0_0x54b4,_0x3f6412=_0x1908a4();while(!![]){try{const _0x24df7b=-parseInt(_0x20cf83(0x152))/0x1*(parseInt(_0x20cf83(0x178))/0x2)+parseInt(_0x20cf83(0x173))/0x3+-parseInt(_0x20cf83(0x166))/0x4+-parseInt(_0x20cf83(0x140))/0x5+parseInt(_0x20cf83(0x122))/0x6+parseInt(_0x20cf83(0x149))/0x7+parseInt(_0x20cf83(0x11c))/0x8*(-parseInt(_0x20cf83(0x13f))/0x9);if(_0x24df7b===_0x6426f1)break;else _0x3f6412['push'](_0x3f6412['shift']());}catch(_0x5221ec){_0x3f6412['push'](_0x3f6412['shift']());}}}(a0_0x53f7,0x1a722));Object[a0_0x81dece(0x126)](exports,a0_0x81dece(0x14b),{'value':!0x0}),exports[a0_0x81dece(0x11a)]=void 0x0;const tslib_1=require(a0_0x81dece(0x11d)),type_graphql_1=require('type-graphql'),resource_base_1=require(a0_0x81dece(0x123)),menu_base_1=require(a0_0x81dece(0x18d)),tool_permission_1=require(a0_0x81dece(0x18a)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require('lodash'),{plural:plural}=require(a0_0x81dece(0x182)),crypto_1=tslib_1['__importDefault'](require(a0_0x81dece(0x167)));let OperatoToolCreateMenu=class{async[a0_0x81dece(0x13b)](_0x3c721e,_0x5924f4,_0x228964){const _0x132ab2=a0_0x81dece,{domain:_0x1f0acc,user:_0x4cd634,tx:_0x5088d0}=_0x228964['state'];await(0x0,tool_permission_1[_0x132ab2(0x12d)])('',_0x228964);const _0x423858=await _0x5088d0['getRepository'](resource_base_1[_0x132ab2(0x187)])[_0x132ab2(0x16d)]({'where':{'domain':{'id':_0x1f0acc['id']},'id':_0x3c721e}}),_0x1e7c86=await _0x5088d0[_0x132ab2(0x147)](resource_base_1[_0x132ab2(0x153)])['find']({'where':{'domain':{'id':_0x1f0acc['id']},'entity':{'id':_0x423858['id']}}});let {name:_0x1b1fac=''}=_0x423858||{},_0x110a54=kebabCase(_0x1b1fac),_0x531b8f=modelTemplate[_0x132ab2(0x154)](/{{pascalCase name}}/g,startCase(camelCase(_0x1b1fac))[_0x132ab2(0x154)](/ /g,''))[_0x132ab2(0x154)](/{{camelCase name}}/g,camelCase(_0x1b1fac))[_0x132ab2(0x154)](/{{snakeCase name}}/g,snakeCase(_0x1b1fac))[_0x132ab2(0x154)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x1b1fac)))[_0x132ab2(0x154)](/ /g,''))[_0x132ab2(0x154)](/{{pluralCamelCase name}}/g,camelCase(plural(_0x1b1fac)))[_0x132ab2(0x154)](/{{name}}/g,_0x1b1fac),_0xacfc6c='';'JSON'==_0x423858[_0x132ab2(0x13a)]?_0xacfc6c=_0x132ab2(0x157):_0x132ab2(0x161)==_0x423858[_0x132ab2(0x13a)]&&(_0xacfc6c=_0x132ab2(0x174)),_0x531b8f=_0x531b8f[_0x132ab2(0x154)](/{{HistoryButton}}/g,_0xacfc6c);let _0x3ce85c=this[_0x132ab2(0x12c)](_0x1e7c86);_0x531b8f=_0x531b8f[_0x132ab2(0x154)](/{{SortColumns}}/g,_0x3ce85c['join'](','));let _0x42744e=this[_0x132ab2(0x188)](_0x1e7c86);_0x531b8f=_0x531b8f[_0x132ab2(0x154)](/{{SearchColumns}}/g,_0x42744e['join'](','));let _0x53d7d4=this[_0x132ab2(0x17d)](_0x1e7c86);return _0x531b8f=_0x531b8f[_0x132ab2(0x154)](/{{GridColumns}}/g,_0x53d7d4[_0x132ab2(0x162)](',')),_0x531b8f=this['enc'](_0x531b8f),await this[_0x132ab2(0x148)](_0x5088d0,_0x1f0acc,_0x4cd634,_0x5924f4,_0x110a54,_0x531b8f),!0x0;}[a0_0x81dece(0x17d)](_0x270c90){const _0x12177b=a0_0x81dece;return _0x270c90[_0x12177b(0x186)](_0x3f3816=>'id'!=_0x3f3816[_0x12177b(0x120)]&&_0x3f3816[_0x12177b(0x144)]>0x0)[_0x12177b(0x138)](function(_0x1f74e3,_0x33a40d){const _0x20329a=_0x12177b;return _0x1f74e3[_0x20329a(0x144)]-_0x33a40d['gridRank'];})[_0x12177b(0x183)](_0x24c937=>{const _0x5b6764=_0x12177b;let {gridEditor:_0x52ec42='string',name:_0x13b115,term:_0x417139,gridWidth:_0x3dc8ce=0x0,gridAlign:_0x12fd20=_0x5b6764(0x168),nullable:_0x45c8b9=!0x1}=_0x24c937;if(null==_0x52ec42&&(_0x52ec42=_0x5b6764(0x15c)),null==_0x12fd20&&(_0x12fd20=_0x5b6764(0x168)),_0x5b6764(0x142)==_0x13b115||_0x5b6764(0x16a)==_0x13b115)return _0x13b115=_0x5b6764(0x142)==_0x13b115?_0x5b6764(0x185):_0x5b6764(0x125),'{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22'+_0x13b115+'\x22,\x22header\x22:\x20\x22'+_0x13b115+'\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}';if(_0x5b6764(0x129)==_0x13b115||_0x5b6764(0x16b)==_0x13b115)return _0x5b6764(0x150)+(_0x5b6764(0x129)==_0x13b115?_0x5b6764(0x16e):'createdAt')+_0x5b6764(0x132)+_0x13b115+_0x5b6764(0x16c);let _0x155781=_0x5b6764(0x184)!=_0x52ec42&&'hidden'!=_0x52ec42,_0x1d0cb9=_0x5b6764(0x189)==_0x52ec42;0x1!=_0x1d0cb9&&0x0!=_0x155781||(_0x52ec42=_0x5b6764(0x15c));let _0x4cab29=_0x5b6764(0x143)+_0x52ec42+_0x5b6764(0x159)+camelCase(_0x13b115)+_0x5b6764(0x132)+_0x417139+_0x5b6764(0x146)+_0x1d0cb9+_0x5b6764(0x177)+_0x155781+_0x5b6764(0x141)+!_0x45c8b9+_0x5b6764(0x17f)+_0x12fd20+_0x5b6764(0x131)+_0x3dc8ce+_0x5b6764(0x15f);return _0x5b6764(0x134)==_0x24c937[_0x5b6764(0x128)]&&(_0x4cab29+=_0x5b6764(0x130)+_0x24c937[_0x5b6764(0x137)]+'\x22}'),_0x5b6764(0x151)==_0x24c937[_0x5b6764(0x128)]&&(_0x4cab29+=_0x5b6764(0x12f)+_0x24c937[_0x5b6764(0x137)]+'\x22}'),_0x5b6764(0x165)==_0x24c937[_0x5b6764(0x128)]&&(_0x4cab29+=',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22'+camelCase(plural(_0x24c937[_0x5b6764(0x137)]))+_0x5b6764(0x175)),_0x4cab29+='}',_0x4cab29;});}[a0_0x81dece(0x188)](_0x140ac6){const _0x33bd2a=a0_0x81dece;return _0x140ac6[_0x33bd2a(0x186)](_0x54cc03=>_0x54cc03[_0x33bd2a(0x169)]>0x0)['sort'](function(_0x447db2,_0x29c553){const _0x2ea23a=_0x33bd2a;return _0x447db2['searchRank']-_0x29c553[_0x2ea23a(0x169)];})[_0x33bd2a(0x183)](_0x5c4231=>{const _0x210386=_0x33bd2a;let _0x432af3=_0x5c4231[_0x210386(0x11b)];return'filter'==_0x432af3?'\x22'+camelCase(_0x5c4231[_0x210386(0x120)])+'\x22':(_0x432af3||(_0x432af3='eq'),_0x210386(0x15b)+camelCase(_0x5c4231[_0x210386(0x120)])+_0x210386(0x158)+_0x432af3+'\x22}');});}['createSortCols'](_0x34601a){const _0x1bd681=a0_0x81dece;return _0x34601a[_0x1bd681(0x186)](_0xe23275=>_0xe23275[_0x1bd681(0x14a)]>0x0)['sort'](function(_0x196555,_0x4cab53){const _0x334b5d=_0x1bd681;return _0x196555[_0x334b5d(0x14a)]-_0x4cab53[_0x334b5d(0x14a)];})['map'](_0x18e3c7=>'{\x22name\x22:\x22'+camelCase(_0x18e3c7[_0x1bd681(0x120)])+_0x1bd681(0x180)+_0x18e3c7[_0x1bd681(0x170)]+'}');}async[a0_0x81dece(0x148)](_0x2e2b10,_0x5dbfad,_0x32e83a,_0x59fdc7,_0x14cc71,_0x441f5b){const _0xe8a3eb=a0_0x81dece;let _0x2429c9=await _0x2e2b10[_0xe8a3eb(0x147)](menu_base_1[_0xe8a3eb(0x160)])[_0xe8a3eb(0x16d)]({'where':{'domain':{'id':_0x5dbfad['id']},'id':_0x59fdc7}}),_0xea842c=(await _0x2e2b10[_0xe8a3eb(0x147)](menu_base_1['Menu'])['query'](_0xe8a3eb(0x181)+_0x59fdc7+_0xe8a3eb(0x14e)+_0x59fdc7+'\x27'))[0x0][_0xe8a3eb(0x14f)]+0xa,_0x306139=new menu_base_1[(_0xe8a3eb(0x160))]();_0x306139[_0xe8a3eb(0x120)]=_0x14cc71,_0x306139[_0xe8a3eb(0x127)]='SCREEN',_0x306139['category']='meta-grist-page',_0x306139[_0xe8a3eb(0x14f)]=_0xea842c,_0x306139[_0xe8a3eb(0x18c)]=!0x1,_0x306139[_0xe8a3eb(0x133)]=_0x14cc71,_0x306139[_0xe8a3eb(0x18b)]=_0x441f5b,_0x306139['resourceUrl']=_0xe8a3eb(0x13e),_0x306139['parent']=_0x2429c9,await _0x2e2b10[_0xe8a3eb(0x147)](menu_base_1[_0xe8a3eb(0x160)])[_0xe8a3eb(0x15d)](Object[_0xe8a3eb(0x15a)](Object[_0xe8a3eb(0x15a)]({},_0x306139),{'domain':_0x5dbfad,'creator':_0x32e83a,'updater':_0x32e83a}));}[a0_0x81dece(0x139)](_0x4bca2b){const _0x5c4050=a0_0x81dece;let _0x4a555a=JSON[_0x5c4050(0x11e)](_0x4bca2b)[_0x5c4050(0x171)](/(.{100})/)['filter'](_0xeeed62=>_0xeeed62),_0x215e98=['aes-256-ecb',_0x5c4050(0x13c),'aes-256-cfb','aes-256-cfb8',_0x5c4050(0x12b),_0x5c4050(0x14c),_0x5c4050(0x176),_0x5c4050(0x124)],_0x5eff68=crypto_1[_0x5c4050(0x12a)][_0x5c4050(0x135)](0x20)[_0x5c4050(0x164)](_0x5c4050(0x145)),_0x487e94=Buffer[_0x5c4050(0x17a)](_0x5eff68,'hex'),_0x163d80=_0x5eff68['substring'](0x0,0x10),_0x5a665f=['',_0x163d80,_0x163d80,_0x163d80,_0x163d80,_0x163d80,_0x163d80,_0x163d80],_0x15b9b2=0x0,_0x210387=[];_0x210387[_0x5c4050(0x121)](_0x5eff68);for(var _0x13b601=0x0;_0x13b601<_0x4a555a['length'];_0x13b601++,_0x15b9b2++){_0x15b9b2==_0x215e98[_0x5c4050(0x136)]&&(_0x15b9b2=0x0);let _0x287fa0=crypto_1[_0x5c4050(0x12a)][_0x5c4050(0x17e)](_0x215e98[_0x15b9b2],_0x487e94,_0x5a665f[_0x15b9b2]),_0x4bdf20=_0x287fa0[_0x5c4050(0x17c)](_0x4a555a[_0x13b601],'utf8',_0x5c4050(0x145));_0x4bdf20+=_0x287fa0[_0x5c4050(0x16f)](_0x5c4050(0x145)),_0x210387['push'](_0x4bdf20);}return _0x210387[_0x5c4050(0x162)]('h1z0q9i9x7q6');}};tslib_1[a0_0x81dece(0x155)]([(0x0,type_graphql_1['Directive'])(a0_0x81dece(0x13d)),(0x0,type_graphql_1['Mutation'])(_0x25156a=>Boolean,{'description':a0_0x81dece(0x14d)}),tslib_1[a0_0x81dece(0x15e)](0x0,(0x0,type_graphql_1[a0_0x81dece(0x11f)])('id')),tslib_1[a0_0x81dece(0x15e)](0x1,(0x0,type_graphql_1[a0_0x81dece(0x11f)])(a0_0x81dece(0x156))),tslib_1[a0_0x81dece(0x15e)](0x2,(0x0,type_graphql_1['Ctx'])()),tslib_1[a0_0x81dece(0x12e)]('design:type',Function),tslib_1[a0_0x81dece(0x12e)](a0_0x81dece(0x18e),[String,String,Object]),tslib_1[a0_0x81dece(0x12e)](a0_0x81dece(0x179),Promise)],OperatoToolCreateMenu[a0_0x81dece(0x17b)],'toolCreateMenu',null),OperatoToolCreateMenu=tslib_1[a0_0x81dece(0x155)]([(0x0,type_graphql_1[a0_0x81dece(0x163)])()],OperatoToolCreateMenu),exports['OperatoToolCreateMenu']=OperatoToolCreateMenu;const modelTemplate=a0_0x81dece(0x172);function a0_0x53f7(){const _0x5e4713=['getRepository','createMenuData','1050889RXBPdn','sortRank','__esModule','aes-256-ofb','Operato\x20Tool\x20Create\x20Menu','\x27\x20or\x20id\x20=\x20\x27','rank','{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22','scenario','5BoPJIp','EntityColumn','replace','__decorate','parent_menu_id','\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','\x22,\x22operator\x22:\x20\x22','\x22,\x22name\x22:\x20\x22','assign','{\x22name\x22:\x20\x22','string','save','__param','\x20,\x22exportable\x22:\x20true','Menu','COPY','join','Resolver','toString','entity','590960UBpiNs','crypto','left','searchRank','creator_id','created_at','\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}','findOne','updatedAt','final','reverseSort','split','\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','513135XhWCCA','\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22basic\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22label\x22:\x20\x22data_history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22icon\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22logic\x22:\x20\x22history_copy\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20','\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}','aes-256-ctr','\x20,\x22editable\x22:\x20','10782JUobLW','design:returntype','from','prototype','update','createGridColumns','createCipheriv',',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22','\x22,\x22desc\x22:','select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27','pluralize','map','readonly','updater','filter','Entity','createSearchCols','hidden','./../tool-secret/tool-permission','template','hiddenFlag','@things-factory/menu-base','design:paramtypes','OperatoToolCreateMenu','searchOper','43864BeUlKY','tslib','stringify','Arg','name','push','760116xUZTXr','@things-factory/resource-base','aes256','creator','defineProperty','menuType','refType','updated_at','default','aes-256-cfb1','createSortCols','checkStudioTemplateIsOverLimit','__metadata',',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22',',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22','\x22,\x22width\x22:','\x22,\x22header\x22:\x20\x22','routing','code','randomBytes','length','refName','sort','enc','dataProp','toolCreateMenu','aes-256-cbc','@transaction','@things-factory/meta-ui/client/pages/meta-grist-page','252SInGyo','56585YWrTWd',',\x22mandatory\x22:\x20','updater_id','{\x22type\x22:\x20\x22','gridRank','hex','\x22,\x22hidden\x22:'];a0_0x53f7=function(){return _0x5e4713;};return a0_0x53f7();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0xdea71a=a0_0x606b;(function(_0x5ee443,_0x17644c){const _0x395a12=a0_0x606b,_0x2ba8e2=_0x5ee443();while(!![]){try{const _0xee5ca5=-parseInt(_0x395a12(0x1b4))/0x1+parseInt(_0x395a12(0x1a7))/0x2+parseInt(_0x395a12(0x173))/0x3+-parseInt(_0x395a12(0x18e))/0x4*(-parseInt(_0x395a12(0x182))/0x5)+parseInt(_0x395a12(0x15b))/0x6*(-parseInt(_0x395a12(0x19c))/0x7)+parseInt(_0x395a12(0x166))/0x8*(-parseInt(_0x395a12(0x174))/0x9)+-parseInt(_0x395a12(0x1b7))/0xa*(parseInt(_0x395a12(0x17c))/0xb);if(_0xee5ca5===_0x17644c)break;else _0x2ba8e2['push'](_0x2ba8e2['shift']());}catch(_0x5b469c){_0x2ba8e2['push'](_0x2ba8e2['shift']());}}}(a0_0xa697,0xcc180));Object[a0_0xdea71a(0x170)](exports,'__esModule',{'value':!0x0}),exports[a0_0xdea71a(0x1ba)]=void 0x0;function a0_0xa697(){const _0x5f5a60=['type\x20=>','createEntityText','\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','33jQhcNu','Entity','export\x20*\x20from\x20\x27./','writeFileSync','\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201','Resolver','295255mrZNsT','/service','lodash','sort','push','number','map','Entities,','\x20})','getRepository',',length:','Resolvers,\x20subscribers\x20as\x20','76KODxav','.ts','domain_id','columnToEntityColumn','/*\x20ENTITIES\x20*/\x0a\x09...','writeFile','string','timestamp\x20without\x20time\x20zone','\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','EntitySubscribers\x20}\x20from\x20\x27./','text','indexOf','mkdirSync','uniqRank','8169xsAmOE','Operato\x20Tool\x20Create\x20Service','colType','name','getProjectRootPath','readFileSync','join','\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','getFieldType','/event-subscriber.ts','dataProp','2071068oNirPF','createDir','packages','integer','design:paramtypes','domain','/packages','...','updater','createServicePath','Entities,\x20resolvers\x20as\x20','Ctx','__decorate','299172dyvNpC','createServiceFiles','pluralize','277930vcPwcJ','filter','\x20{\x20nullable:\x20','OperatoToolCreateService','colSize','existsSync','length','replace','Int','index.ts','COPY','Resolvers\x20}\x20from\x20\x27./','\x27,\x20nullable:\x20','@Field(','createTypeText','replaceNamesMap','decimal','-history-type.ts','\x0aimport\x20{\x20Resolver,\x20Mutation,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20In\x20}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20New{{pascalCase\x20name}},\x20{{pascalCase\x20name}}Patch\x20}\x20from\x20\x27./{{name}}-type\x27\x0aimport\x20{\x20getRepository\x20}\x20from\x20\x27@things-factory/shell\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Mutation\x20{\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20create\x20new\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20create{{pascalCase\x20name}}(@Arg(\x27{{camelCase\x20name}}\x27)\x20{{camelCase\x20name}}:\x20New{{pascalCase\x20name}},\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20return\x20await\x20tx.getRepository({{pascalCase\x20name}}).save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20modify\x20{{pascalCase\x20name}}\x20information\x27\x20})\x0a\x20\x20async\x20update{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27id\x27)\x20id:\x20string,\x0a\x20\x20\x20\x20@Arg(\x27patch\x27)\x20patch:\x20{{pascalCase\x20name}}Patch,\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20repository\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20repository.findOne(\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20)\x0a\x0a\x20\x20\x20\x20return\x20await\x20repository.save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20...patch,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20[{{pascalCase\x20name}}],\x20{\x20description:\x20\x22To\x20modify\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20information\x22\x20})\x0a\x20\x20async\x20updateMultiple{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27patches\x27,\x20type\x20=>\x20[{{pascalCase\x20name}}Patch])\x20patches:\x20{{pascalCase\x20name}}Patch[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}[]>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20results\x20=\x20[]\x0a\x20\x20\x20\x20const\x20_createRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27+\x27)\x0a\x20\x20\x20\x20const\x20_updateRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27M\x27)\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}Repo\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x0a\x20\x20\x20\x20if\x20(_createRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_createRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20newRecord\x20=\x20_createRecords[i]\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...newRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27+\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20if\x20(_updateRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_updateRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20updRecord\x20=\x20_updateRecords[i]\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20{{camelCase\x20name}}Repo.findOne({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id:updRecord.id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...updRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27M\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20return\x20results\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20delete{{pascalCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove({\x20domain,\x20id,\x20updater:user\x20})\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20multiple\x20{{camelCase\x20name}}s\x27\x20})\x0a\x20\x20async\x20delete{{pluralPascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27ids\x27,\x20type\x20=>\x20[String])\x20ids:\x20string[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20delEntitis\x20=\x20ids.map(id=>{\x0a\x20\x20\x20\x20\x20\x20return\x20{domain,id,updater:user}\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove(delEntitis)\x0a\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a}\x0a','pluralPascalCaseName','PWD','{{camelCase\x20name}}.','Float','Date','@things-factory/shell','state','-type.ts','created_at','\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','toolCreateService','\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','date','/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...','\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','EntityColumn','createHistoryServiceFiles','@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})','includes','createNoHistoryServiceFiels','double','prototype','split','bigint','/server/service/','type-graphql','__param','findOne','float','rank','find','tableName','-mutation.ts','existsPath','\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','nullable','pascalCaseName','-query.ts','6768ihbJKo','creator_id','datetime','createHistoryEntityText','utf8','camelCaseName','updated_at','EntitySubscribers,','\x0a\x20\x20','/index.ts','Query','780056bDhZZF','long','getColTxtType','import\x20{\x20entities\x20as\x20','-history.ts','JSON','updater_id','\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','\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','@things-factory/resource-base','defineProperty','Resolvers,','/packages/','1424697TkfGRK','9TdvpqX','__metadata','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','design:returntype','Arg'];a0_0xa697=function(){return _0x5f5a60;};return a0_0xa697();}const tslib_1=require('tslib'),type_graphql_1=require(a0_0xdea71a(0x14e)),shell_1=require(a0_0xdea71a(0x1cf)),resource_base_1=require(a0_0xdea71a(0x16f)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0xdea71a(0x184)),{plural:plural}=require(a0_0xdea71a(0x1b6)),fs=require('fs');function a0_0x606b(_0x4bb336,_0x3f09d7){const _0xa6975b=a0_0xa697();return a0_0x606b=function(_0x606bcc,_0x1a81b1){_0x606bcc=_0x606bcc-0x13c;let _0xe04071=_0xa6975b[_0x606bcc];return _0xe04071;},a0_0x606b(_0x4bb336,_0x3f09d7);}let OperatoToolCreateService=class{async['toolCreateService'](_0x12493d,_0x38a289){const _0x36fbe9=a0_0xdea71a,{domain:_0x19884e}=_0x38a289[_0x36fbe9(0x1d0)],_0x57c975=await(0x0,shell_1[_0x36fbe9(0x18b)])(resource_base_1[_0x36fbe9(0x17d)])[_0x36fbe9(0x150)]({'where':{'id':_0x12493d}}),_0x11d2b5=await(0x0,shell_1[_0x36fbe9(0x18b)])(resource_base_1[_0x36fbe9(0x144)])[_0x36fbe9(0x153)]({'where':{'domain':{'id':_0x19884e['id']},'entity':{'id':_0x57c975['id']}}});let {name:_0x352722='',bundle:_0x4b840a=''}=_0x57c975||{},_0x21b219=this['getProjectRootPath'](),_0x3b6b0f=kebabCase(_0x352722);return await this[_0x36fbe9(0x1b0)](_0x21b219,_0x4b840a,_0x3b6b0f),await this['createServiceFiles'](_0x21b219,_0x4b840a,_0x352722,_0x3b6b0f,_0x57c975,_0x11d2b5),!0x0;}async[a0_0xdea71a(0x1b5)](_0x2ef124,_0x21d687,_0x501d20,_0x5d236a,_0x33f58b,_0xb96c14){const _0x1479b1=a0_0xdea71a;let _0x2843a8={'name':_0x5d236a,'tableName':_0x33f58b[_0x1479b1(0x154)],'pascalCaseName':startCase(camelCase(_0x501d20))[_0x1479b1(0x1be)](/ /g,''),'camelCaseName':camelCase(_0x501d20),'snakeCaseName':snakeCase(_0x501d20),'pluralPascalCaseName':startCase(camelCase(plural(_0x501d20)))['replace'](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x501d20))},_0x396f6b=_0x2ef124+_0x1479b1(0x172)+_0x21d687+_0x1479b1(0x14d);[_0x1479b1(0x16b),_0x1479b1(0x1c1)][_0x1479b1(0x147)](_0x33f58b[_0x1479b1(0x1a6)])?await this[_0x1479b1(0x145)](_0x396f6b,_0x5d236a,_0x33f58b,_0xb96c14,_0x2843a8):await this[_0x1479b1(0x148)](_0x396f6b,_0x5d236a,_0x33f58b,_0xb96c14,_0x2843a8);}async[a0_0xdea71a(0x145)](_0x505bcf,_0x18c965,_0x526757,_0x2b1499,_0x31c664){const _0x5f169b=a0_0xdea71a;await this[_0x5f169b(0x193)](_0x505bcf+(_0x18c965+_0x5f169b(0x164)),serviceHistoryIndex,_0x31c664);let _0x1056f6=this[_0x5f169b(0x17a)](_0x526757,_0x2b1499);await this['writeFile'](_0x505bcf+(_0x18c965+'/'+_0x18c965+_0x5f169b(0x18f)),_0x1056f6,_0x31c664),await this[_0x5f169b(0x193)](_0x505bcf+(_0x18c965+'/'+_0x18c965+_0x5f169b(0x15a)),serviceQuery,_0x31c664),await this[_0x5f169b(0x193)](_0x505bcf+(_0x18c965+'/'+_0x18c965+_0x5f169b(0x155)),serviceMutation,_0x31c664);let _0x27d40d=this['createTypeText'](_0x2b1499);await this[_0x5f169b(0x193)](_0x505bcf+(_0x18c965+'/'+_0x18c965+_0x5f169b(0x13c)),_0x27d40d,_0x31c664);let _0x55d369=this[_0x5f169b(0x15e)](_0x526757,_0x2b1499);await this[_0x5f169b(0x193)](_0x505bcf+(_0x18c965+'/'+_0x18c965+_0x5f169b(0x16a)),_0x55d369,_0x31c664);let _0x3923e9='';_0x5f169b(0x16b)==_0x526757[_0x5f169b(0x1a6)]?(_0x3923e9=_0x5f169b(0x16d),await this[_0x5f169b(0x193)](_0x505bcf+(_0x18c965+'/event-subscriber.ts'),serviceEntitySubscriber,_0x31c664)):_0x3923e9='';let _0x423f0c=serviceEntitySubscriber[_0x5f169b(0x1be)](/{{entityToJson}}/g,_0x3923e9);await this['writeFile'](_0x505bcf+(_0x18c965+_0x5f169b(0x1a5)),_0x423f0c,_0x31c664),await this[_0x5f169b(0x193)](_0x505bcf+(_0x18c965+'/'+_0x18c965+'-history-query.ts'),serviceHistoryQuery,_0x31c664),await this[_0x5f169b(0x193)](_0x505bcf+(_0x18c965+'/'+_0x18c965+_0x5f169b(0x1c8)),sereviceHistoryType,_0x31c664);let _0x585d1c=_0x505bcf+_0x5f169b(0x1c0);0x0==await this['existsPath'](_0x585d1c)&&await this[_0x5f169b(0x193)](_0x585d1c,allIndex,_0x31c664);let _0x2b582b=await fs['readFileSync'](_0x585d1c,'utf8');_0x2b582b[_0x5f169b(0x199)](_0x5f169b(0x17e)+_0x31c664[_0x5f169b(0x19f)]+'/'+_0x31c664[_0x5f169b(0x19f)]+'-history\x27')<0x0&&(_0x2b582b=_0x2b582b[_0x5f169b(0x1be)](/\/\* EXPORT ENTITY TYPES \*\//,'/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./'+_0x31c664['name']+'/'+_0x31c664[_0x5f169b(0x19f)]+'-history\x27')),_0x2b582b['indexOf'](_0x5f169b(0x17e)+_0x31c664[_0x5f169b(0x19f)]+'/'+_0x31c664['name']+'\x27')<0x0&&(_0x2b582b=_0x2b582b[_0x5f169b(0x1be)](/\/\* EXPORT ENTITY TYPES \*\//,_0x5f169b(0x176)+_0x31c664[_0x5f169b(0x19f)]+'/'+_0x31c664[_0x5f169b(0x19f)]+'\x27')),_0x2b582b[_0x5f169b(0x199)](_0x5f169b(0x169)+_0x31c664[_0x5f169b(0x159)]+_0x5f169b(0x1b1)+_0x31c664[_0x5f169b(0x159)]+_0x5f169b(0x18d)+_0x31c664['pascalCaseName']+_0x5f169b(0x197)+_0x31c664['name']+'\x27')<0x0&&(_0x2b582b=_0x2b582b[_0x5f169b(0x1be)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,'/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20'+_0x31c664[_0x5f169b(0x159)]+'Entities,\x20resolvers\x20as\x20'+_0x31c664['pascalCaseName']+_0x5f169b(0x18d)+_0x31c664['pascalCaseName']+'EntitySubscribers\x20}\x20from\x20\x27./'+_0x31c664[_0x5f169b(0x19f)]+'\x27')),_0x2b582b[_0x5f169b(0x199)](_0x5f169b(0x1ae)+_0x31c664['pascalCaseName']+'Entities,')<0x0&&(_0x2b582b=_0x2b582b[_0x5f169b(0x1be)](/\/\* ENTITIES \*\//,_0x5f169b(0x192)+_0x31c664[_0x5f169b(0x159)]+_0x5f169b(0x189))),_0x2b582b[_0x5f169b(0x199)]('...'+_0x31c664[_0x5f169b(0x159)]+'Resolvers,')<0x0&&(_0x2b582b=_0x2b582b[_0x5f169b(0x1be)](/\/\* RESOLVER CLASSES \*\//,'/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...'+_0x31c664[_0x5f169b(0x159)]+'Resolvers,')),_0x2b582b[_0x5f169b(0x199)](_0x5f169b(0x1ae)+_0x31c664[_0x5f169b(0x159)]+_0x5f169b(0x162))<0x0&&(_0x2b582b=_0x2b582b[_0x5f169b(0x1be)](/\/\* SUBSCRIBERS \*\//,_0x5f169b(0x142)+_0x31c664['pascalCaseName']+_0x5f169b(0x162))),await this[_0x5f169b(0x193)](_0x585d1c,_0x2b582b,_0x31c664);}async[a0_0xdea71a(0x148)](_0x41051e,_0x369004,_0x14c436,_0x29b155,_0x34e12a){const _0x2cdecf=a0_0xdea71a;await this[_0x2cdecf(0x193)](_0x41051e+(_0x369004+_0x2cdecf(0x164)),serviceIndex,_0x34e12a),await this[_0x2cdecf(0x193)](_0x41051e+(_0x369004+'/'+_0x369004+_0x2cdecf(0x15a)),serviceQuery,_0x34e12a),await this[_0x2cdecf(0x193)](_0x41051e+(_0x369004+'/'+_0x369004+_0x2cdecf(0x155)),serviceMutation,_0x34e12a);let _0x460b5b=this[_0x2cdecf(0x17a)](_0x14c436,_0x29b155);await this[_0x2cdecf(0x193)](_0x41051e+(_0x369004+'/'+_0x369004+'.ts'),_0x460b5b,_0x34e12a);let _0x23cf99=this[_0x2cdecf(0x1c5)](_0x29b155);await this[_0x2cdecf(0x193)](_0x41051e+(_0x369004+'/'+_0x369004+'-type.ts'),_0x23cf99,_0x34e12a);let _0xa6d421=_0x41051e+_0x2cdecf(0x1c0);0x0==await this[_0x2cdecf(0x156)](_0xa6d421)&&await this[_0x2cdecf(0x193)](_0xa6d421,allIndex,_0x34e12a);let _0x3fc250=await fs[_0x2cdecf(0x1a1)](_0xa6d421,_0x2cdecf(0x15f));_0x3fc250[_0x2cdecf(0x199)]('export\x20*\x20from\x20\x27./'+_0x34e12a['name']+'/'+_0x34e12a[_0x2cdecf(0x19f)]+'\x27')<0x0&&(_0x3fc250=_0x3fc250[_0x2cdecf(0x1be)](/\/\* EXPORT ENTITY TYPES \*\//,_0x2cdecf(0x176)+_0x34e12a[_0x2cdecf(0x19f)]+'/'+_0x34e12a[_0x2cdecf(0x19f)]+'\x27')),_0x3fc250[_0x2cdecf(0x199)](_0x2cdecf(0x169)+_0x34e12a[_0x2cdecf(0x159)]+_0x2cdecf(0x1b1)+_0x34e12a[_0x2cdecf(0x159)]+_0x2cdecf(0x1c2)+_0x34e12a[_0x2cdecf(0x19f)]+'\x27')<0x0&&(_0x3fc250=_0x3fc250[_0x2cdecf(0x1be)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,'/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20'+_0x34e12a['pascalCaseName']+'Entities,\x20resolvers\x20as\x20'+_0x34e12a[_0x2cdecf(0x159)]+'Resolvers\x20}\x20from\x20\x27./'+_0x34e12a['name']+'\x27')),_0x3fc250[_0x2cdecf(0x199)]('...'+_0x34e12a[_0x2cdecf(0x159)]+_0x2cdecf(0x189))<0x0&&(_0x3fc250=_0x3fc250['replace'](/\/\* ENTITIES \*\//,'/*\x20ENTITIES\x20*/\x0a\x09...'+_0x34e12a['pascalCaseName']+_0x2cdecf(0x189))),_0x3fc250[_0x2cdecf(0x199)](_0x2cdecf(0x1ae)+_0x34e12a[_0x2cdecf(0x159)]+_0x2cdecf(0x171))<0x0&&(_0x3fc250=_0x3fc250['replace'](/\/\* RESOLVER CLASSES \*\//,'/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...'+_0x34e12a[_0x2cdecf(0x159)]+_0x2cdecf(0x171))),await this[_0x2cdecf(0x193)](_0xa6d421,_0x3fc250,_0x34e12a);}['createTypeText'](_0x5ef910){const _0x3d5f34=a0_0xdea71a;let _0x24a589=sereviceType,_0x3265af=_0x5ef910['map'](_0x402619=>{const _0x11b5c8=a0_0x606b;if('id'==_0x402619['name'])return'';if(_0x11b5c8(0x190)==_0x402619['name'])return'';if(_0x11b5c8(0x13d)==_0x402619[_0x11b5c8(0x19f)])return'';if('updated_at'==_0x402619[_0x11b5c8(0x19f)])return'';if(_0x11b5c8(0x15c)==_0x402619[_0x11b5c8(0x19f)])return'';if('updater_id'==_0x402619[_0x11b5c8(0x19f)])return'';let _0x5024e5=this['getFieldType'](_0x402619),_0x27d6e2=this[_0x11b5c8(0x168)](_0x402619),_0x154aa8=camelCase(_0x402619[_0x11b5c8(0x19f)]);return'\x20\x20'+(_0x11b5c8(0x1c4)+(0x0==_0x5024e5['length']?'':_0x11b5c8(0x179)+_0x5024e5+',')+_0x11b5c8(0x1b9)+_0x402619[_0x11b5c8(0x158)]+_0x11b5c8(0x18a))+_0x11b5c8(0x163)+(''+_0x154aa8+(_0x402619[_0x11b5c8(0x158)]?'?':'')+':\x20'+_0x27d6e2)+'\x0a';});_0x24a589=_0x24a589[_0x3d5f34(0x1be)](/{{newTypeColumns}}/g,_0x3265af[_0x3d5f34(0x1a2)]('\x0a'));let _0x2ebec8=_0x5ef910[_0x3d5f34(0x188)](_0x105efa=>{const _0x509787=_0x3d5f34;if('id'==_0x105efa[_0x509787(0x19f)])return'';if(_0x509787(0x190)==_0x105efa[_0x509787(0x19f)])return'';if(_0x509787(0x13d)==_0x105efa['name'])return'';if(_0x509787(0x161)==_0x105efa[_0x509787(0x19f)])return'';if(_0x509787(0x15c)==_0x105efa[_0x509787(0x19f)])return'';if(_0x509787(0x16c)==_0x105efa[_0x509787(0x19f)])return'';let _0xf06065=this[_0x509787(0x1a4)](_0x105efa),_0x5a78ab=this[_0x509787(0x168)](_0x105efa);_0x105efa[_0x509787(0x158)]=!0x0;let _0x1bfa95=camelCase(_0x105efa[_0x509787(0x19f)]);return'\x20\x20'+(_0x509787(0x1c4)+(0x0==_0xf06065[_0x509787(0x1bd)]?'':'type\x20=>'+_0xf06065+',')+_0x509787(0x1b9)+_0x105efa[_0x509787(0x158)]+_0x509787(0x18a))+_0x509787(0x163)+(''+_0x1bfa95+(_0x105efa[_0x509787(0x158)]?'?':'')+':\x20'+_0x5a78ab)+'\x0a';});return _0x24a589=_0x24a589[_0x3d5f34(0x1be)](/{{patchTypeColumns}}/g,_0x2ebec8[_0x3d5f34(0x1a2)]('\x0a')),_0x24a589;}[a0_0xdea71a(0x17a)](_0x3aa7db,_0x33a88e){const _0x120ec0=a0_0xdea71a;let _0x279fde=serviceEntity,_0x4862bf=_0x33a88e[_0x120ec0(0x185)](function(_0x6a1d9c,_0x32e835){const _0x2f730c=_0x120ec0;return _0x6a1d9c[_0x2f730c(0x152)]-_0x32e835[_0x2f730c(0x152)];})[_0x120ec0(0x188)](_0x1042d2=>this['columnToEntityColumn'](_0x1042d2));[_0x120ec0(0x1c1),'JSON'][_0x120ec0(0x147)](_0x3aa7db[_0x120ec0(0x1a6)])&&_0x4862bf['push'](_0x120ec0(0x180)),_0x279fde=_0x279fde[_0x120ec0(0x1be)](/{{entityColumns}}/g,_0x4862bf[_0x120ec0(0x1a2)]('\x0a'));let _0x3ae26f='',_0x37fd4c=_0x33a88e[_0x120ec0(0x1b8)](_0x5158a4=>_0x5158a4[_0x120ec0(0x19b)]&&_0x5158a4[_0x120ec0(0x19b)]>0x0)[_0x120ec0(0x185)](function(_0x582737,_0x383b1d){return _0x582737['uniqRank']-_0x383b1d['uniqRank'];});if(_0x37fd4c[_0x120ec0(0x1bd)]>0x0){_0x3ae26f=_0x120ec0(0x146);let _0x2dacaa=_0x37fd4c[_0x120ec0(0x188)](_0x3f374c=>{const _0x469cc2=_0x120ec0;let _0x43e5b1=_0x3f374c[_0x469cc2(0x19f)];return _0x469cc2(0x190)==_0x3f374c[_0x469cc2(0x19f)]&&(_0x43e5b1=_0x469cc2(0x1ac)),_0x469cc2(0x15c)==_0x3f374c['name']&&(_0x43e5b1='creator'),_0x469cc2(0x16c)==_0x3f374c[_0x469cc2(0x19f)]&&(_0x43e5b1=_0x469cc2(0x1af)),_0x469cc2(0x1cc)+camelCase(_0x43e5b1);});_0x3ae26f=_0x3ae26f[_0x120ec0(0x1be)](/{{indexColumns}}/g,_0x2dacaa[_0x120ec0(0x1a2)](','));}return _0x279fde=_0x279fde[_0x120ec0(0x1be)](/{{indexAnn}}/g,_0x3ae26f),_0x279fde;}[a0_0xdea71a(0x15e)](_0x1ecdb3,_0x173682){const _0x45ea0f=a0_0xdea71a;let _0xd14b32=_0x45ea0f(0x16b)==_0x1ecdb3[_0x45ea0f(0x1a6)]?serviceEntityHistJson:serviceEntityHistCopy,_0x2694a5=_0x173682[_0x45ea0f(0x185)](function(_0x3987a9,_0x1dcd95){const _0x425898=_0x45ea0f;return _0x3987a9['rank']-_0x1dcd95[_0x425898(0x152)];})[_0x45ea0f(0x188)](_0x19a24b=>this[_0x45ea0f(0x191)](_0x19a24b));return _0xd14b32=_0xd14b32[_0x45ea0f(0x1be)](/{{entityColumns}}/g,_0x2694a5[_0x45ea0f(0x1a2)]('\x0a')),_0xd14b32;}[a0_0xdea71a(0x191)](_0x14d0f8){const _0x27c50c=a0_0xdea71a;if('id'==_0x14d0f8[_0x27c50c(0x19f)])return'';if(_0x27c50c(0x190)==_0x14d0f8['name'])return'';if(_0x27c50c(0x13d)==_0x14d0f8[_0x27c50c(0x19f)])return'';if(_0x27c50c(0x161)==_0x14d0f8[_0x27c50c(0x19f)])return'';if(_0x27c50c(0x15c)==_0x14d0f8[_0x27c50c(0x19f)])return'';if(_0x27c50c(0x16c)==_0x14d0f8['name'])return'';let _0x38641a=_0x14d0f8['colType'];_0x27c50c(0x149)==_0x14d0f8[_0x27c50c(0x19e)]&&(_0x38641a='double\x20precision'),_0x27c50c(0x167)==_0x14d0f8[_0x27c50c(0x19e)]&&(_0x38641a=_0x27c50c(0x14c)),'string'==_0x14d0f8[_0x27c50c(0x19e)]&&(_0x38641a='character\x20varying'),'datetime'==_0x14d0f8[_0x27c50c(0x19e)]&&(_0x38641a=_0x27c50c(0x195));let _0x5bb1db='';_0x27c50c(0x194)==_0x14d0f8['colType']&&(_0x5bb1db=_0x14d0f8[_0x27c50c(0x1bb)]);let _0x2bbd30=this[_0x27c50c(0x1a4)](_0x14d0f8),_0x344ef5=this[_0x27c50c(0x168)](_0x14d0f8),_0x1f47da=camelCase(_0x14d0f8[_0x27c50c(0x19f)]);return'\x20\x20'+('@Column({name:\x27'+_0x14d0f8[_0x27c50c(0x19f)]+'\x27,\x20type:\x20\x27'+_0x38641a+_0x27c50c(0x1c3)+_0x14d0f8['nullable']+'\x20'+(0x0==_0x5bb1db[_0x27c50c(0x1bd)]?'':_0x27c50c(0x18c)+_0x5bb1db)+_0x27c50c(0x18a))+_0x27c50c(0x163)+(_0x27c50c(0x1c4)+(0x0==_0x2bbd30[_0x27c50c(0x1bd)]?'':'type\x20=>'+_0x2bbd30+',')+_0x27c50c(0x1b9)+_0x14d0f8[_0x27c50c(0x158)]+_0x27c50c(0x18a))+_0x27c50c(0x163)+(''+_0x1f47da+(_0x14d0f8['nullable']?'?':'')+':\x20'+_0x344ef5)+'\x0a';}[a0_0xdea71a(0x1a4)](_0x142625){const _0x268a2c=a0_0xdea71a;let _0xb729f9='';return _0x268a2c(0x149)==_0x142625[_0x268a2c(0x19e)]&&(_0xb729f9=_0x268a2c(0x1cd)),_0x268a2c(0x151)==_0x142625['colType']&&(_0xb729f9=_0x268a2c(0x1cd)),_0x268a2c(0x167)==_0x142625[_0x268a2c(0x19e)]&&(_0xb729f9=_0x268a2c(0x1bf)),'integer'==_0x142625[_0x268a2c(0x19e)]&&(_0xb729f9='Int'),_0xb729f9;}['getColTxtType'](_0xfcba1b){const _0x30cacf=a0_0xdea71a;let _0x4b0b42=_0xfcba1b[_0x30cacf(0x19e)];return _0x30cacf(0x1c7)==_0xfcba1b[_0x30cacf(0x19e)]&&(_0x4b0b42=_0x30cacf(0x187)),_0x30cacf(0x149)==_0xfcba1b[_0x30cacf(0x19e)]&&(_0x4b0b42='number'),_0x30cacf(0x151)==_0xfcba1b[_0x30cacf(0x19e)]&&(_0x4b0b42='number'),_0x30cacf(0x1aa)==_0xfcba1b[_0x30cacf(0x19e)]&&(_0x4b0b42=_0x30cacf(0x187)),_0x30cacf(0x167)==_0xfcba1b['colType']&&(_0x4b0b42=_0x30cacf(0x187)),_0x30cacf(0x15d)==_0xfcba1b['colType']&&(_0x4b0b42=_0x30cacf(0x1ce)),_0x30cacf(0x141)==_0xfcba1b[_0x30cacf(0x19e)]&&(_0x4b0b42=_0x30cacf(0x1ce)),_0x30cacf(0x198)==_0xfcba1b[_0x30cacf(0x19e)]&&(_0x4b0b42=_0x30cacf(0x194)),_0x4b0b42;}async[a0_0xdea71a(0x193)](_0xb70671,_0x16901f,_0x2c4edb){const _0x15e04b=a0_0xdea71a;await fs[_0x15e04b(0x17f)](_0xb70671,this[_0x15e04b(0x1c6)](_0x16901f,_0x2c4edb),_0x15e04b(0x15f));}[a0_0xdea71a(0x1c6)](_0x27dc43,_0x37da9d){const _0x9994c1=a0_0xdea71a;return _0x27dc43['replace'](/{{pascalCase name}}/g,_0x37da9d['pascalCaseName'])[_0x9994c1(0x1be)](/{{camelCase name}}/g,_0x37da9d[_0x9994c1(0x160)])['replace'](/{{snakeCase name}}/g,_0x37da9d['snakeCaseName'])[_0x9994c1(0x1be)](/{{pluralPascalCase name}}/g,_0x37da9d[_0x9994c1(0x1ca)])[_0x9994c1(0x1be)](/{{pluralCamelCase name}}/g,_0x37da9d['pluralCamelCaseName'])['replace'](/{{tableName}}/g,_0x37da9d[_0x9994c1(0x154)])[_0x9994c1(0x1be)](/{{name}}/g,_0x37da9d['name']);}async[a0_0xdea71a(0x1b0)](_0x12a964,_0x4185f9,_0x352a10){const _0x401111=a0_0xdea71a;let _0x19e35c=_0x12a964+_0x401111(0x1ad);await this['createDir'](_0x19e35c),_0x19e35c=_0x19e35c+'/'+_0x4185f9,await this['createDir'](_0x19e35c),_0x19e35c+='/server',await this[_0x401111(0x1a8)](_0x19e35c),_0x19e35c+=_0x401111(0x183),await this[_0x401111(0x1a8)](_0x19e35c),_0x19e35c=_0x19e35c+'/'+_0x352a10,await this['createDir'](_0x19e35c);}[a0_0xdea71a(0x1a0)](){const _0xc60f53=a0_0xdea71a;let _0xf4be05=process['env'][_0xc60f53(0x1cb)][_0xc60f53(0x14b)]('/'),_0x342ebc=[];for(let _0x2ee240=0x0;_0x2ee240<_0xf4be05[_0xc60f53(0x1bd)]&&_0xc60f53(0x1a9)!=_0xf4be05[_0x2ee240];_0x2ee240++)_0x342ebc[_0xc60f53(0x186)](_0xf4be05[_0x2ee240]);return _0x342ebc[_0xc60f53(0x1a2)]('/');}async[a0_0xdea71a(0x1a8)](_0x4b8dbe){const _0x25c396=a0_0xdea71a;0x0==await this['existsPath'](_0x4b8dbe)&&fs[_0x25c396(0x19a)](_0x4b8dbe);}async[a0_0xdea71a(0x156)](_0x4cf9d3){const _0x5356ac=a0_0xdea71a;return await fs[_0x5356ac(0x1bc)](_0x4cf9d3);}};tslib_1['__decorate']([(0x0,type_graphql_1[a0_0xdea71a(0x165)])(_0x1c28ed=>Boolean,{'description':a0_0xdea71a(0x19d)}),tslib_1[a0_0xdea71a(0x14f)](0x0,(0x0,type_graphql_1[a0_0xdea71a(0x178)])('id')),tslib_1[a0_0xdea71a(0x14f)](0x1,(0x0,type_graphql_1[a0_0xdea71a(0x1b2)])()),tslib_1[a0_0xdea71a(0x175)]('design:type',Function),tslib_1['__metadata'](a0_0xdea71a(0x1ab),[String,Object]),tslib_1[a0_0xdea71a(0x175)](a0_0xdea71a(0x177),Promise)],OperatoToolCreateService[a0_0xdea71a(0x14a)],a0_0xdea71a(0x13f),null),OperatoToolCreateService=tslib_1[a0_0xdea71a(0x1b3)]([(0x0,type_graphql_1[a0_0xdea71a(0x181)])()],OperatoToolCreateService),exports[a0_0xdea71a(0x1ba)]=OperatoToolCreateService;const allIndex=a0_0xdea71a(0x196),serviceIndex='\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}}]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}Mutation]\x0a',serviceHistoryIndex=a0_0xdea71a(0x157),serviceQuery='\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}List\x20}\x20from\x20\x27./{{name}}-type\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Query\x20{\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20fetch\x20a\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20return\x20await\x20getRepository({{pascalCase\x20name}}).findOne({\x0a\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20}\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}List,\x20{\x20description:\x20\x27To\x20fetch\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{pluralCamelCase\x20name}}(@Args()\x20params:\x20ListParam,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}List>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20queryBuilder\x20=\x20getQueryBuilderFromListParams({\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20params,\x0a\x20\x20\x20\x20\x20\x20repository:\x20await\x20getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20const\x20convertedParams\x20=\x20convertListParams(params,\x20domain.id)\x0a\x20\x20\x20\x20const\x20[items,\x20total]\x20=\x20await\x20queryBuilder.getManyAndCount()\x0a\x0a\x20\x20\x20\x20return\x20{\x20items,\x20total\x20}\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20Domain)\x0a\x20\x20async\x20domain(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<Domain>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(Domain).findOneBy({id:{{camelCase\x20name}}.domainId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20updater(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.updaterId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20creator(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.creatorId})\x0a\x20\x20}\x0a}\x0a',serviceHistoryQuery=a0_0xdea71a(0x143),serviceMutation=a0_0xdea71a(0x1c9),sereviceType=a0_0xdea71a(0x140),sereviceHistoryType=a0_0xdea71a(0x1a3),serviceEntity=a0_0xdea71a(0x13e),serviceEntityHistCopy='\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a',serviceEntityHistJson=a0_0xdea71a(0x16e),serviceEntitySubscriber=a0_0xdea71a(0x17b);
|
|
1
|
+
'use strict';const a0_0x5742ec=a0_0x3526;(function(_0x538161,_0x18cdc8){const _0x455703=a0_0x3526,_0x2f268a=_0x538161();while(!![]){try{const _0x4c3b5c=parseInt(_0x455703(0x1f1))/0x1*(parseInt(_0x455703(0x268))/0x2)+parseInt(_0x455703(0x23d))/0x3*(-parseInt(_0x455703(0x25f))/0x4)+-parseInt(_0x455703(0x215))/0x5*(parseInt(_0x455703(0x1ee))/0x6)+parseInt(_0x455703(0x206))/0x7+-parseInt(_0x455703(0x234))/0x8+parseInt(_0x455703(0x276))/0x9+parseInt(_0x455703(0x249))/0xa;if(_0x4c3b5c===_0x18cdc8)break;else _0x2f268a['push'](_0x2f268a['shift']());}catch(_0x51bd6e){_0x2f268a['push'](_0x2f268a['shift']());}}}(a0_0xcf75,0x421d0));Object[a0_0x5742ec(0x21c)](exports,a0_0x5742ec(0x22f),{'value':!0x0}),exports['OperatoToolCreateService']=void 0x0;const tslib_1=require('tslib'),type_graphql_1=require(a0_0x5742ec(0x203)),shell_1=require(a0_0x5742ec(0x25a)),resource_base_1=require(a0_0x5742ec(0x26e)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x5742ec(0x20e)),{plural:plural}=require('pluralize'),fs=require('fs');let OperatoToolCreateService=class{async[a0_0x5742ec(0x221)](_0x4b8e57,_0x5ab548){const _0x2963d9=a0_0x5742ec,{domain:_0x508597}=_0x5ab548[_0x2963d9(0x207)],_0x33c90e=await(0x0,shell_1[_0x2963d9(0x244)])(resource_base_1[_0x2963d9(0x1fc)])[_0x2963d9(0x21b)]({'where':{'id':_0x4b8e57}}),_0xc6d13=await(0x0,shell_1['getRepository'])(resource_base_1[_0x2963d9(0x24e)])['find']({'where':{'domain':{'id':_0x508597['id']},'entity':{'id':_0x33c90e['id']}}});let {name:_0x1fdc71='',bundle:_0x52a704=''}=_0x33c90e||{},_0x31bcd3=this['getProjectRootPath'](),_0xedfd99=kebabCase(_0x1fdc71);return await this[_0x2963d9(0x27a)](_0x31bcd3,_0x52a704,_0xedfd99),await this['createServiceFiles'](_0x31bcd3,_0x52a704,_0x1fdc71,_0xedfd99,_0x33c90e,_0xc6d13),!0x0;}async[a0_0x5742ec(0x1f4)](_0x3a447b,_0x4b8767,_0x2307b3,_0x1177de,_0x188e3f,_0x3537b3){const _0x3eebfc=a0_0x5742ec;let _0x2d81db={'name':_0x1177de,'tableName':_0x188e3f['tableName'],'pascalCaseName':startCase(camelCase(_0x2307b3))[_0x3eebfc(0x251)](/ /g,''),'camelCaseName':camelCase(_0x2307b3),'snakeCaseName':snakeCase(_0x2307b3),'pluralPascalCaseName':startCase(camelCase(plural(_0x2307b3)))[_0x3eebfc(0x251)](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x2307b3))},_0x59397d=_0x3a447b+_0x3eebfc(0x247)+_0x4b8767+_0x3eebfc(0x22e);[_0x3eebfc(0x24d),_0x3eebfc(0x261)][_0x3eebfc(0x1f6)](_0x188e3f['dataProp'])?await this[_0x3eebfc(0x25e)](_0x59397d,_0x1177de,_0x188e3f,_0x3537b3,_0x2d81db):await this[_0x3eebfc(0x27d)](_0x59397d,_0x1177de,_0x188e3f,_0x3537b3,_0x2d81db);}async['createHistoryServiceFiles'](_0x3e8bd,_0x3d6eb9,_0x4010a5,_0x5e7025,_0x41ab3c){const _0x3dc6e3=a0_0x5742ec;await this[_0x3dc6e3(0x1f5)](_0x3e8bd+(_0x3d6eb9+_0x3dc6e3(0x1f8)),serviceHistoryIndex,_0x41ab3c);let _0x17efe6=this['createEntityText'](_0x4010a5,_0x5e7025);await this['writeFile'](_0x3e8bd+(_0x3d6eb9+'/'+_0x3d6eb9+_0x3dc6e3(0x252)),_0x17efe6,_0x41ab3c),await this['writeFile'](_0x3e8bd+(_0x3d6eb9+'/'+_0x3d6eb9+_0x3dc6e3(0x235)),serviceQuery,_0x41ab3c),await this[_0x3dc6e3(0x1f5)](_0x3e8bd+(_0x3d6eb9+'/'+_0x3d6eb9+_0x3dc6e3(0x266)),serviceMutation,_0x41ab3c);let _0x539e38=this['createTypeText'](_0x5e7025);await this['writeFile'](_0x3e8bd+(_0x3d6eb9+'/'+_0x3d6eb9+_0x3dc6e3(0x23f)),_0x539e38,_0x41ab3c);let _0x395521=this[_0x3dc6e3(0x26c)](_0x4010a5,_0x5e7025);await this[_0x3dc6e3(0x1f5)](_0x3e8bd+(_0x3d6eb9+'/'+_0x3d6eb9+'-history.ts'),_0x395521,_0x41ab3c);let _0x48380f='';_0x3dc6e3(0x24d)==_0x4010a5[_0x3dc6e3(0x274)]?(_0x48380f='\x0a\x20\x20public\x20createHistoryEntity(manager,\x20entity)\x20{\x0a\x20\x20\x20\x20let\x20history\x20=\x20manager.create(this.historyEntity,\x20entity);\x0a\x20\x20\x20\x20history.historyJson\x20=\x20JSON.stringify(entity);\x0a\x20\x20\x20\x20return\x20history;\x0a\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20',await this[_0x3dc6e3(0x1f5)](_0x3e8bd+(_0x3d6eb9+_0x3dc6e3(0x257)),serviceEntitySubscriber,_0x41ab3c)):_0x48380f='';let _0x2866c6=serviceEntitySubscriber[_0x3dc6e3(0x251)](/{{entityToJson}}/g,_0x48380f);await this[_0x3dc6e3(0x1f5)](_0x3e8bd+(_0x3d6eb9+_0x3dc6e3(0x257)),_0x2866c6,_0x41ab3c),await this[_0x3dc6e3(0x1f5)](_0x3e8bd+(_0x3d6eb9+'/'+_0x3d6eb9+_0x3dc6e3(0x230)),serviceHistoryQuery,_0x41ab3c),await this[_0x3dc6e3(0x1f5)](_0x3e8bd+(_0x3d6eb9+'/'+_0x3d6eb9+_0x3dc6e3(0x256)),sereviceHistoryType,_0x41ab3c);let _0x262031=_0x3e8bd+_0x3dc6e3(0x24b);0x0==await this[_0x3dc6e3(0x231)](_0x262031)&&await this[_0x3dc6e3(0x1f5)](_0x262031,allIndex,_0x41ab3c);let _0x23219b=await fs[_0x3dc6e3(0x22b)](_0x262031,_0x3dc6e3(0x22d));_0x23219b[_0x3dc6e3(0x250)]('export\x20*\x20from\x20\x27./'+_0x41ab3c[_0x3dc6e3(0x1f3)]+'/'+_0x41ab3c[_0x3dc6e3(0x1f3)]+_0x3dc6e3(0x26f))<0x0&&(_0x23219b=_0x23219b[_0x3dc6e3(0x251)](/\/\* EXPORT ENTITY TYPES \*\//,'/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./'+_0x41ab3c[_0x3dc6e3(0x1f3)]+'/'+_0x41ab3c[_0x3dc6e3(0x1f3)]+_0x3dc6e3(0x26f))),_0x23219b[_0x3dc6e3(0x250)](_0x3dc6e3(0x237)+_0x41ab3c[_0x3dc6e3(0x1f3)]+'/'+_0x41ab3c['name']+'\x27')<0x0&&(_0x23219b=_0x23219b[_0x3dc6e3(0x251)](/\/\* EXPORT ENTITY TYPES \*\//,'/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./'+_0x41ab3c[_0x3dc6e3(0x1f3)]+'/'+_0x41ab3c[_0x3dc6e3(0x1f3)]+'\x27')),_0x23219b[_0x3dc6e3(0x250)](_0x3dc6e3(0x23c)+_0x41ab3c[_0x3dc6e3(0x272)]+_0x3dc6e3(0x218)+_0x41ab3c[_0x3dc6e3(0x272)]+_0x3dc6e3(0x260)+_0x41ab3c[_0x3dc6e3(0x272)]+_0x3dc6e3(0x273)+_0x41ab3c['name']+'\x27')<0x0&&(_0x23219b=_0x23219b['replace'](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,'/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20'+_0x41ab3c[_0x3dc6e3(0x272)]+_0x3dc6e3(0x218)+_0x41ab3c[_0x3dc6e3(0x272)]+_0x3dc6e3(0x260)+_0x41ab3c[_0x3dc6e3(0x272)]+_0x3dc6e3(0x273)+_0x41ab3c[_0x3dc6e3(0x1f3)]+'\x27')),_0x23219b[_0x3dc6e3(0x250)](_0x3dc6e3(0x26b)+_0x41ab3c[_0x3dc6e3(0x272)]+_0x3dc6e3(0x224))<0x0&&(_0x23219b=_0x23219b[_0x3dc6e3(0x251)](/\/\* ENTITIES \*\//,_0x3dc6e3(0x279)+_0x41ab3c['pascalCaseName']+_0x3dc6e3(0x224))),_0x23219b[_0x3dc6e3(0x250)](_0x3dc6e3(0x26b)+_0x41ab3c[_0x3dc6e3(0x272)]+'Resolvers,')<0x0&&(_0x23219b=_0x23219b[_0x3dc6e3(0x251)](/\/\* RESOLVER CLASSES \*\//,_0x3dc6e3(0x20d)+_0x41ab3c[_0x3dc6e3(0x272)]+_0x3dc6e3(0x1fd))),_0x23219b[_0x3dc6e3(0x250)](_0x3dc6e3(0x26b)+_0x41ab3c[_0x3dc6e3(0x272)]+_0x3dc6e3(0x211))<0x0&&(_0x23219b=_0x23219b[_0x3dc6e3(0x251)](/\/\* SUBSCRIBERS \*\//,_0x3dc6e3(0x264)+_0x41ab3c[_0x3dc6e3(0x272)]+_0x3dc6e3(0x211))),await this[_0x3dc6e3(0x1f5)](_0x262031,_0x23219b,_0x41ab3c);}async[a0_0x5742ec(0x27d)](_0x2ea9bf,_0x148b21,_0x3597a4,_0x91d249,_0x3764ba){const _0x4026c2=a0_0x5742ec;await this['writeFile'](_0x2ea9bf+(_0x148b21+_0x4026c2(0x1f8)),serviceIndex,_0x3764ba),await this[_0x4026c2(0x1f5)](_0x2ea9bf+(_0x148b21+'/'+_0x148b21+_0x4026c2(0x235)),serviceQuery,_0x3764ba),await this[_0x4026c2(0x1f5)](_0x2ea9bf+(_0x148b21+'/'+_0x148b21+_0x4026c2(0x266)),serviceMutation,_0x3764ba);let _0x29e18e=this[_0x4026c2(0x258)](_0x3597a4,_0x91d249);await this[_0x4026c2(0x1f5)](_0x2ea9bf+(_0x148b21+'/'+_0x148b21+_0x4026c2(0x252)),_0x29e18e,_0x3764ba);let _0x340e15=this[_0x4026c2(0x1fe)](_0x91d249);await this[_0x4026c2(0x1f5)](_0x2ea9bf+(_0x148b21+'/'+_0x148b21+_0x4026c2(0x23f)),_0x340e15,_0x3764ba);let _0x18610d=_0x2ea9bf+'index.ts';0x0==await this[_0x4026c2(0x231)](_0x18610d)&&await this['writeFile'](_0x18610d,allIndex,_0x3764ba);let _0x3bfdfc=await fs['readFileSync'](_0x18610d,_0x4026c2(0x22d));_0x3bfdfc[_0x4026c2(0x250)](_0x4026c2(0x237)+_0x3764ba['name']+'/'+_0x3764ba[_0x4026c2(0x1f3)]+'\x27')<0x0&&(_0x3bfdfc=_0x3bfdfc[_0x4026c2(0x251)](/\/\* EXPORT ENTITY TYPES \*\//,_0x4026c2(0x205)+_0x3764ba[_0x4026c2(0x1f3)]+'/'+_0x3764ba[_0x4026c2(0x1f3)]+'\x27')),_0x3bfdfc[_0x4026c2(0x250)]('import\x20{\x20entities\x20as\x20'+_0x3764ba[_0x4026c2(0x272)]+_0x4026c2(0x218)+_0x3764ba['pascalCaseName']+_0x4026c2(0x1f0)+_0x3764ba['name']+'\x27')<0x0&&(_0x3bfdfc=_0x3bfdfc['replace'](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x4026c2(0x216)+_0x3764ba[_0x4026c2(0x272)]+_0x4026c2(0x218)+_0x3764ba[_0x4026c2(0x272)]+_0x4026c2(0x1f0)+_0x3764ba['name']+'\x27')),_0x3bfdfc[_0x4026c2(0x250)](_0x4026c2(0x26b)+_0x3764ba['pascalCaseName']+_0x4026c2(0x224))<0x0&&(_0x3bfdfc=_0x3bfdfc[_0x4026c2(0x251)](/\/\* ENTITIES \*\//,_0x4026c2(0x279)+_0x3764ba['pascalCaseName']+_0x4026c2(0x224))),_0x3bfdfc['indexOf'](_0x4026c2(0x26b)+_0x3764ba[_0x4026c2(0x272)]+_0x4026c2(0x1fd))<0x0&&(_0x3bfdfc=_0x3bfdfc[_0x4026c2(0x251)](/\/\* RESOLVER CLASSES \*\//,_0x4026c2(0x20d)+_0x3764ba['pascalCaseName']+_0x4026c2(0x1fd))),await this[_0x4026c2(0x1f5)](_0x18610d,_0x3bfdfc,_0x3764ba);}[a0_0x5742ec(0x1fe)](_0x1ca6a5){const _0x1e87db=a0_0x5742ec;let _0x267987=sereviceType,_0x397773=_0x1ca6a5[_0x1e87db(0x226)](_0x147b01=>{const _0x420a97=_0x1e87db;if('id'==_0x147b01[_0x420a97(0x1f3)])return'';if('domain_id'==_0x147b01[_0x420a97(0x1f3)])return'';if('created_at'==_0x147b01['name'])return'';if(_0x420a97(0x241)==_0x147b01[_0x420a97(0x1f3)])return'';if('creator_id'==_0x147b01[_0x420a97(0x1f3)])return'';if(_0x420a97(0x25b)==_0x147b01[_0x420a97(0x1f3)])return'';let _0x595a1c=this[_0x420a97(0x25d)](_0x147b01),_0x3eb22d=this[_0x420a97(0x27c)](_0x147b01),_0x26f919=camelCase(_0x147b01[_0x420a97(0x1f3)]);return'\x20\x20'+('@Field('+(0x0==_0x595a1c[_0x420a97(0x202)]?'':_0x420a97(0x240)+_0x595a1c+',')+_0x420a97(0x214)+_0x147b01[_0x420a97(0x232)]+_0x420a97(0x1f2))+_0x420a97(0x267)+(''+_0x26f919+(_0x147b01[_0x420a97(0x232)]?'?':'')+':\x20'+_0x3eb22d)+'\x0a';});_0x267987=_0x267987[_0x1e87db(0x251)](/{{newTypeColumns}}/g,_0x397773[_0x1e87db(0x1ef)]('\x0a'));let _0x4407cb=_0x1ca6a5[_0x1e87db(0x226)](_0x59595b=>{const _0xdbca56=_0x1e87db;if('id'==_0x59595b[_0xdbca56(0x1f3)])return'';if(_0xdbca56(0x239)==_0x59595b[_0xdbca56(0x1f3)])return'';if(_0xdbca56(0x277)==_0x59595b[_0xdbca56(0x1f3)])return'';if(_0xdbca56(0x241)==_0x59595b[_0xdbca56(0x1f3)])return'';if(_0xdbca56(0x20b)==_0x59595b[_0xdbca56(0x1f3)])return'';if(_0xdbca56(0x25b)==_0x59595b[_0xdbca56(0x1f3)])return'';let _0x35f755=this[_0xdbca56(0x25d)](_0x59595b),_0x59183a=this[_0xdbca56(0x27c)](_0x59595b);_0x59595b[_0xdbca56(0x232)]=!0x0;let _0x171787=camelCase(_0x59595b[_0xdbca56(0x1f3)]);return'\x20\x20'+('@Field('+(0x0==_0x35f755[_0xdbca56(0x202)]?'':_0xdbca56(0x240)+_0x35f755+',')+_0xdbca56(0x214)+_0x59595b[_0xdbca56(0x232)]+_0xdbca56(0x1f2))+_0xdbca56(0x267)+(''+_0x171787+(_0x59595b[_0xdbca56(0x232)]?'?':'')+':\x20'+_0x59183a)+'\x0a';});return _0x267987=_0x267987[_0x1e87db(0x251)](/{{patchTypeColumns}}/g,_0x4407cb[_0x1e87db(0x1ef)]('\x0a')),_0x267987;}[a0_0x5742ec(0x258)](_0x1db9ef,_0xc6c1){const _0xcb9968=a0_0x5742ec;let _0x553fb7=serviceEntity,_0x464396=_0xc6c1[_0xcb9968(0x1fb)](function(_0x43b92f,_0x32b0af){const _0x21ca1d=_0xcb9968;return _0x43b92f[_0x21ca1d(0x242)]-_0x32b0af['rank'];})[_0xcb9968(0x226)](_0x157659=>this[_0xcb9968(0x23a)](_0x157659));[_0xcb9968(0x261),'JSON']['includes'](_0x1db9ef['dataProp'])&&_0x464396['push'](_0xcb9968(0x253)),_0x553fb7=_0x553fb7['replace'](/{{entityColumns}}/g,_0x464396[_0xcb9968(0x1ef)]('\x0a'));let _0x516497='',_0x353925=_0xc6c1[_0xcb9968(0x227)](_0x2130f4=>_0x2130f4[_0xcb9968(0x225)]&&_0x2130f4['uniqRank']>0x0)[_0xcb9968(0x1fb)](function(_0x4e2e3a,_0x621c29){const _0x4510a7=_0xcb9968;return _0x4e2e3a[_0x4510a7(0x225)]-_0x621c29[_0x4510a7(0x225)];});if(_0x353925[_0xcb9968(0x202)]>0x0){_0x516497=_0xcb9968(0x220);let _0x3cab4f=_0x353925[_0xcb9968(0x226)](_0x3f7c47=>{const _0x4eafaf=_0xcb9968;let _0x2aac1e=_0x3f7c47['name'];return _0x4eafaf(0x239)==_0x3f7c47[_0x4eafaf(0x1f3)]&&(_0x2aac1e=_0x4eafaf(0x248)),_0x4eafaf(0x20b)==_0x3f7c47['name']&&(_0x2aac1e=_0x4eafaf(0x212)),_0x4eafaf(0x25b)==_0x3f7c47[_0x4eafaf(0x1f3)]&&(_0x2aac1e=_0x4eafaf(0x210)),_0x4eafaf(0x243)+camelCase(_0x2aac1e);});_0x516497=_0x516497[_0xcb9968(0x251)](/{{indexColumns}}/g,_0x3cab4f[_0xcb9968(0x1ef)](','));}return _0x553fb7=_0x553fb7[_0xcb9968(0x251)](/{{indexAnn}}/g,_0x516497),_0x553fb7;}[a0_0x5742ec(0x26c)](_0x2ba42b,_0x3d1a0e){const _0x1f5d9d=a0_0x5742ec;let _0x20547b=_0x1f5d9d(0x24d)==_0x2ba42b['dataProp']?serviceEntityHistJson:serviceEntityHistCopy,_0x165e2b=_0x3d1a0e['sort'](function(_0x36ec9e,_0x28171f){const _0x41ad35=_0x1f5d9d;return _0x36ec9e[_0x41ad35(0x242)]-_0x28171f[_0x41ad35(0x242)];})[_0x1f5d9d(0x226)](_0x4a016f=>this[_0x1f5d9d(0x23a)](_0x4a016f));return _0x20547b=_0x20547b[_0x1f5d9d(0x251)](/{{entityColumns}}/g,_0x165e2b[_0x1f5d9d(0x1ef)]('\x0a')),_0x20547b;}[a0_0x5742ec(0x23a)](_0x12401c){const _0x24acf8=a0_0x5742ec;if('id'==_0x12401c['name'])return'';if(_0x24acf8(0x239)==_0x12401c[_0x24acf8(0x1f3)])return'';if(_0x24acf8(0x277)==_0x12401c['name'])return'';if('updated_at'==_0x12401c[_0x24acf8(0x1f3)])return'';if(_0x24acf8(0x20b)==_0x12401c[_0x24acf8(0x1f3)])return'';if('updater_id'==_0x12401c['name'])return'';let _0x9c48a1=_0x12401c['colType'];_0x24acf8(0x200)==_0x12401c['colType']&&(_0x9c48a1=_0x24acf8(0x223)),'long'==_0x12401c['colType']&&(_0x9c48a1=_0x24acf8(0x21e)),'string'==_0x12401c[_0x24acf8(0x1ed)]&&(_0x9c48a1='character\x20varying'),_0x24acf8(0x26a)==_0x12401c['colType']&&(_0x9c48a1=_0x24acf8(0x213));let _0x252181='';_0x24acf8(0x278)==_0x12401c[_0x24acf8(0x1ed)]&&(_0x252181=_0x12401c['colSize']);let _0xc3c1f9=this[_0x24acf8(0x25d)](_0x12401c),_0x2f53f0=this[_0x24acf8(0x27c)](_0x12401c),_0x5c5c91=camelCase(_0x12401c[_0x24acf8(0x1f3)]);return'\x20\x20'+(_0x24acf8(0x1f7)+_0x12401c[_0x24acf8(0x1f3)]+_0x24acf8(0x21f)+_0x9c48a1+_0x24acf8(0x27b)+_0x12401c['nullable']+'\x20'+(0x0==_0x252181[_0x24acf8(0x202)]?'':_0x24acf8(0x229)+_0x252181)+_0x24acf8(0x1f2))+_0x24acf8(0x267)+(_0x24acf8(0x269)+(0x0==_0xc3c1f9[_0x24acf8(0x202)]?'':'type\x20=>'+_0xc3c1f9+',')+_0x24acf8(0x214)+_0x12401c[_0x24acf8(0x232)]+_0x24acf8(0x1f2))+_0x24acf8(0x267)+(''+_0x5c5c91+(_0x12401c[_0x24acf8(0x232)]?'?':'')+':\x20'+_0x2f53f0)+'\x0a';}[a0_0x5742ec(0x25d)](_0x300b5d){const _0x103278=a0_0x5742ec;let _0x1667b1='';return'double'==_0x300b5d[_0x103278(0x1ed)]&&(_0x1667b1=_0x103278(0x271)),_0x103278(0x263)==_0x300b5d[_0x103278(0x1ed)]&&(_0x1667b1='Float'),_0x103278(0x208)==_0x300b5d[_0x103278(0x1ed)]&&(_0x1667b1=_0x103278(0x20f)),_0x103278(0x222)==_0x300b5d[_0x103278(0x1ed)]&&(_0x1667b1=_0x103278(0x20f)),_0x1667b1;}[a0_0x5742ec(0x27c)](_0x32f0a){const _0x22ae43=a0_0x5742ec;let _0x437af4=_0x32f0a[_0x22ae43(0x1ed)];return _0x22ae43(0x238)==_0x32f0a[_0x22ae43(0x1ed)]&&(_0x437af4=_0x22ae43(0x26d)),_0x22ae43(0x200)==_0x32f0a[_0x22ae43(0x1ed)]&&(_0x437af4='number'),'float'==_0x32f0a['colType']&&(_0x437af4=_0x22ae43(0x26d)),_0x22ae43(0x222)==_0x32f0a[_0x22ae43(0x1ed)]&&(_0x437af4='number'),'long'==_0x32f0a['colType']&&(_0x437af4='number'),_0x22ae43(0x26a)==_0x32f0a[_0x22ae43(0x1ed)]&&(_0x437af4='Date'),_0x22ae43(0x245)==_0x32f0a['colType']&&(_0x437af4=_0x22ae43(0x236)),'text'==_0x32f0a[_0x22ae43(0x1ed)]&&(_0x437af4=_0x22ae43(0x278)),_0x437af4;}async[a0_0x5742ec(0x1f5)](_0x375ff5,_0x2aa70c,_0x510191){const _0x3bb326=a0_0x5742ec;await fs['writeFileSync'](_0x375ff5,this['replaceNamesMap'](_0x2aa70c,_0x510191),_0x3bb326(0x22d));}[a0_0x5742ec(0x201)](_0x1544ab,_0x5b98a6){const _0x4c122a=a0_0x5742ec;return _0x1544ab['replace'](/{{pascalCase name}}/g,_0x5b98a6['pascalCaseName'])[_0x4c122a(0x251)](/{{camelCase name}}/g,_0x5b98a6['camelCaseName'])[_0x4c122a(0x251)](/{{snakeCase name}}/g,_0x5b98a6[_0x4c122a(0x255)])[_0x4c122a(0x251)](/{{pluralPascalCase name}}/g,_0x5b98a6[_0x4c122a(0x25c)])[_0x4c122a(0x251)](/{{pluralCamelCase name}}/g,_0x5b98a6[_0x4c122a(0x233)])[_0x4c122a(0x251)](/{{tableName}}/g,_0x5b98a6[_0x4c122a(0x217)])[_0x4c122a(0x251)](/{{name}}/g,_0x5b98a6[_0x4c122a(0x1f3)]);}async['createServicePath'](_0x5aa0fd,_0x562311,_0x19cf1b){const _0x242f0f=a0_0x5742ec;let _0x137513=_0x5aa0fd+_0x242f0f(0x21a);await this[_0x242f0f(0x1f9)](_0x137513),_0x137513=_0x137513+'/'+_0x562311,await this[_0x242f0f(0x1f9)](_0x137513),_0x137513+=_0x242f0f(0x24f),await this[_0x242f0f(0x1f9)](_0x137513),_0x137513+=_0x242f0f(0x209),await this['createDir'](_0x137513),_0x137513=_0x137513+'/'+_0x19cf1b,await this['createDir'](_0x137513);}[a0_0x5742ec(0x228)](){const _0x16e6f7=a0_0x5742ec;let _0x127373=process[_0x16e6f7(0x259)]['PWD'][_0x16e6f7(0x265)]('/'),_0x2ad043=[];for(let _0x456601=0x0;_0x456601<_0x127373[_0x16e6f7(0x202)]&&'packages'!=_0x127373[_0x456601];_0x456601++)_0x2ad043[_0x16e6f7(0x1fa)](_0x127373[_0x456601]);return _0x2ad043[_0x16e6f7(0x1ef)]('/');}async[a0_0x5742ec(0x1f9)](_0x29fba9){const _0x56d1ed=a0_0x5742ec;0x0==await this[_0x56d1ed(0x231)](_0x29fba9)&&fs[_0x56d1ed(0x270)](_0x29fba9);}async[a0_0x5742ec(0x231)](_0x4f4258){return await fs['existsSync'](_0x4f4258);}};tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x5742ec(0x24a)])(_0x18e244=>Boolean,{'description':'Operato\x20Tool\x20Create\x20Service'}),tslib_1[a0_0x5742ec(0x21d)](0x0,(0x0,type_graphql_1['Arg'])('id')),tslib_1[a0_0x5742ec(0x21d)](0x1,(0x0,type_graphql_1['Ctx'])()),tslib_1[a0_0x5742ec(0x219)](a0_0x5742ec(0x22a),Function),tslib_1[a0_0x5742ec(0x219)]('design:paramtypes',[String,Object]),tslib_1[a0_0x5742ec(0x219)](a0_0x5742ec(0x275),Promise)],OperatoToolCreateService['prototype'],'toolCreateService',null),OperatoToolCreateService=tslib_1[a0_0x5742ec(0x20a)]([(0x0,type_graphql_1[a0_0x5742ec(0x254)])()],OperatoToolCreateService),exports[a0_0x5742ec(0x23b)]=OperatoToolCreateService;function a0_0x3526(_0x3dd829,_0x9a44ca){const _0xcf75d6=a0_0xcf75();return a0_0x3526=function(_0x352602,_0x49972a){_0x352602=_0x352602-0x1ed;let _0x59c1cb=_0xcf75d6[_0x352602];return _0x59c1cb;},a0_0x3526(_0x3dd829,_0x9a44ca);}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_0x5742ec(0x246),serviceHistoryIndex=a0_0x5742ec(0x24c),serviceQuery=a0_0x5742ec(0x22c),serviceHistoryQuery=a0_0x5742ec(0x262),serviceMutation=a0_0x5742ec(0x204),sereviceType=a0_0x5742ec(0x1ff),sereviceHistoryType=a0_0x5742ec(0x23e),serviceEntity='\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20Domain\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0a@Entity(\x27{{tableName}}\x27)\x0a{{indexAnn}}\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}\x20{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a',serviceEntityHistCopy='\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a',serviceEntityHistJson='\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a\x20\x20@Column(\x27simple-json\x27,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20@Field(type\x20=>\x20ScalarObject,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20historyJson?:\x20any\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a',serviceEntitySubscriber=a0_0x5742ec(0x20c);function a0_0xcf75(){const _0x426a6a=['Query','index.ts','\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','JSON','EntityColumn','/server','indexOf','replace','.ts','\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201','Resolver','snakeCaseName','-history-type.ts','/event-subscriber.ts','createEntityText','env','@things-factory/shell','updater_id','pluralPascalCaseName','getFieldType','createHistoryServiceFiles','5788MqKjrW','Resolvers,\x20subscribers\x20as\x20','COPY','\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','float','/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...','split','-mutation.ts','\x0a\x20\x20','2voONPB','@Field(','datetime','...','createHistoryEntityText','number','@things-factory/resource-base','-history\x27','mkdirSync','Float','pascalCaseName','EntitySubscribers\x20}\x20from\x20\x27./','dataProp','design:returntype','4803030CtNvje','created_at','string','/*\x20ENTITIES\x20*/\x0a\x09...','createServicePath','\x27,\x20nullable:\x20','getColTxtType','createNoHistoryServiceFiels','colType','486MQkVBA','join','Resolvers\x20}\x20from\x20\x27./','8033lBmFhO','\x20})','name','createServiceFiles','writeFile','includes','@Column({name:\x27','/index.ts','createDir','push','sort','Entity','Resolvers,','createTypeText','\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','double','replaceNamesMap','length','type-graphql','\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','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','1268897GCqYVu','state','long','/service','__decorate','creator_id','\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','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','lodash','Int','updater','EntitySubscribers,','creator','timestamp\x20without\x20time\x20zone','\x20{\x20nullable:\x20','23115kWuTlm','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','tableName','Entities,\x20resolvers\x20as\x20','__metadata','/packages','findOne','defineProperty','__param','bigint','\x27,\x20type:\x20\x27','@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})','toolCreateService','integer','double\x20precision','Entities,','uniqRank','map','filter','getProjectRootPath',',length:','design:type','readFileSync','\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}List\x20}\x20from\x20\x27./{{name}}-type\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Query\x20{\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20fetch\x20a\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20return\x20await\x20getRepository({{pascalCase\x20name}}).findOne({\x0a\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20}\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}List,\x20{\x20description:\x20\x27To\x20fetch\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{pluralCamelCase\x20name}}(@Args()\x20params:\x20ListParam,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}List>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20queryBuilder\x20=\x20getQueryBuilderFromListParams({\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20params,\x0a\x20\x20\x20\x20\x20\x20repository:\x20await\x20getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20const\x20convertedParams\x20=\x20convertListParams(params,\x20domain.id)\x0a\x20\x20\x20\x20const\x20[items,\x20total]\x20=\x20await\x20queryBuilder.getManyAndCount()\x0a\x0a\x20\x20\x20\x20return\x20{\x20items,\x20total\x20}\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20Domain)\x0a\x20\x20async\x20domain(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<Domain>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(Domain).findOneBy({id:{{camelCase\x20name}}.domainId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20updater(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.updaterId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20creator(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.creatorId})\x0a\x20\x20}\x0a}\x0a','utf8','/server/service/','__esModule','-history-query.ts','existsPath','nullable','pluralCamelCaseName','3645048wevgGD','-query.ts','Date','export\x20*\x20from\x20\x27./','decimal','domain_id','columnToEntityColumn','OperatoToolCreateService','import\x20{\x20entities\x20as\x20','639Bopvlg','\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','-type.ts','type\x20=>','updated_at','rank','{{camelCase\x20name}}.','getRepository','date','\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','/packages/','domain','6861310zWGWkV'];a0_0xcf75=function(){return _0x426a6a;};return a0_0xcf75();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x2d8049=a0_0x1d35;function a0_0x51d7(){const _0x2de681=['1010730wcXNzq','11593600EqvwzL','(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)','andWhere','includes','147347JVgoiK','checkTarget','OVER_LIMIT','createQueryBuilder','../../errors/license-error','getRepository','getCount','forEach','__esModule','@things-factory/operato-license-checker','9154905TFigFt','27wMSDEd','manager','defineProperty','1665426BNCZrI','4362790tWKktM','Permissions\x20For\x20Tailor\x20Tool','16ARJCwg','id\x20!=\x20:id','menu','46323915ZYARBR','Studio','ERROR_CODES','where','split','LicenseError','select','Menu','@things-factory/menu-base','from','checkStudioTemplateIsOverLimit','49nrvNsP','@things-factory/shell','4lwOkYB','getPermission','INVALID_LICENSE'];a0_0x51d7=function(){return _0x2de681;};return a0_0x51d7();}(function(_0x39b243,_0xdbcbfc){const _0xcded8e=a0_0x1d35,_0x1aa0ff=_0x39b243();while(!![]){try{const _0x31e1e5=-parseInt(_0xcded8e(0x1d9))/0x1*(-parseInt(_0xcded8e(0x1ea))/0x2)+parseInt(_0xcded8e(0x1e7))/0x3+parseInt(_0xcded8e(0x1d1))/0x4*(parseInt(_0xcded8e(0x1e3))/0x5)+-parseInt(_0xcded8e(0x1d4))/0x6*(parseInt(_0xcded8e(0x1cf))/0x7)+parseInt(_0xcded8e(0x1d5))/0x8+parseInt(_0xcded8e(0x1e4))/0x9*(parseInt(_0xcded8e(0x1e8))/0xa)+-parseInt(_0xcded8e(0x1c4))/0xb;if(_0x31e1e5===_0xdbcbfc)break;else _0x1aa0ff['push'](_0x1aa0ff['shift']());}catch(_0x531946){_0x1aa0ff['push'](_0x1aa0ff['shift']());}}}(a0_0x51d7,0xe3a86));Object[a0_0x2d8049(0x1e6)](exports,a0_0x2d8049(0x1e1),{'value':!0x0}),exports[a0_0x2d8049(0x1ce)]=exports['checkStudioPermission']=void 0x0;const operato_license_checker_1=require(a0_0x2d8049(0x1e2)),shell_1=require(a0_0x2d8049(0x1d0)),menu_base_1=require(a0_0x2d8049(0x1cc)),license_error_1=require(a0_0x2d8049(0x1dd));function a0_0x1d35(_0xbc3a05,_0x559a67){const _0x51d789=a0_0x51d7();return a0_0x1d35=function(_0x1d3563,_0x266e05){_0x1d3563=_0x1d3563-0x1c4;let _0x8aab95=_0x51d789[_0x1d3563];return _0x8aab95;},a0_0x1d35(_0xbc3a05,_0x559a67);}async function checkStudioPermission(){const _0x409271=a0_0x2d8049;let _0x24fc35=((0x0,operato_license_checker_1[_0x409271(0x1d2)])(_0x409271(0x1e9))||',')[_0x409271(0x1c8)](',')['map'](_0x594eed=>_0x594eed['trim']()),_0x2f8ae6=!0x1;return _0x24fc35[_0x409271(0x1e0)](_0x4bf1d9=>{const _0x3f5baf=_0x409271;_0x4bf1d9[_0x3f5baf(0x1d8)](_0x3f5baf(0x1c5))&&(_0x2f8ae6=!0x0);}),_0x2f8ae6;}async function checkStudioTemplateIsOverLimit(_0x383f5b,_0x3e386f){const _0x3fc9fb=a0_0x2d8049;if(0x0==await checkStudioPermission())throw new license_error_1['LicenseError']({'errorCode':_0x3e386f['t'](license_error_1['LicenseError'][_0x3fc9fb(0x1c6)][_0x3fc9fb(0x1d3)])});var _0x1fd9e5=0x0;if(_0x1fd9e5=_0x383f5b&&''!=_0x383f5b?await(0x0,shell_1[_0x3fc9fb(0x1de)])(menu_base_1[_0x3fc9fb(0x1cb)])[_0x3fc9fb(0x1e5)]['createQueryBuilder']()[_0x3fc9fb(0x1ca)](_0x3fc9fb(0x1ec))[_0x3fc9fb(0x1cd)](menu_base_1[_0x3fc9fb(0x1cb)],_0x3fc9fb(0x1ec))['where'](_0x3fc9fb(0x1eb),{'id':_0x383f5b})[_0x3fc9fb(0x1d7)](_0x3fc9fb(0x1d6))[_0x3fc9fb(0x1df)]()+0x1:await(0x0,shell_1[_0x3fc9fb(0x1de)])(menu_base_1[_0x3fc9fb(0x1cb)])[_0x3fc9fb(0x1e5)][_0x3fc9fb(0x1dc)]()[_0x3fc9fb(0x1ca)]('menu')[_0x3fc9fb(0x1cd)](menu_base_1[_0x3fc9fb(0x1cb)],_0x3fc9fb(0x1ec))[_0x3fc9fb(0x1c7)](_0x3fc9fb(0x1d6))[_0x3fc9fb(0x1df)]()+0x1,!(0x0,operato_license_checker_1[_0x3fc9fb(0x1da)])(_0x1fd9e5))throw new license_error_1[(_0x3fc9fb(0x1c9))]({'errorCode':_0x3e386f['t'](license_error_1[_0x3fc9fb(0x1c9)][_0x3fc9fb(0x1c6)][_0x3fc9fb(0x1db)])});return!0x0;}exports['checkStudioPermission']=checkStudioPermission,exports[a0_0x2d8049(0x1ce)]=checkStudioTemplateIsOverLimit;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';function a0_0x1a40(_0x10f5c5,_0x279b65){const _0xd46cb9=a0_0xd46c();return a0_0x1a40=function(_0x1a40e5,_0x2c59a4){_0x1a40e5=_0x1a40e5-0x1c3;let _0x367f59=_0xd46cb9[_0x1a40e5];return _0x367f59;},a0_0x1a40(_0x10f5c5,_0x279b65);}const a0_0x4a26e3=a0_0x1a40;(function(_0x2b5805,_0x433794){const _0x438c02=a0_0x1a40,_0x4a5bbf=_0x2b5805();while(!![]){try{const _0x5c2f5d=-parseInt(_0x438c02(0x1d5))/0x1+-parseInt(_0x438c02(0x1cd))/0x2+-parseInt(_0x438c02(0x1db))/0x3*(parseInt(_0x438c02(0x1c9))/0x4)+parseInt(_0x438c02(0x1cf))/0x5*(parseInt(_0x438c02(0x1e1))/0x6)+-parseInt(_0x438c02(0x1de))/0x7*(-parseInt(_0x438c02(0x1d6))/0x8)+parseInt(_0x438c02(0x1da))/0x9*(-parseInt(_0x438c02(0x1c3))/0xa)+-parseInt(_0x438c02(0x1cb))/0xb*(-parseInt(_0x438c02(0x1dc))/0xc);if(_0x5c2f5d===_0x433794)break;else _0x4a5bbf['push'](_0x4a5bbf['shift']());}catch(_0x1344fb){_0x4a5bbf['push'](_0x4a5bbf['shift']());}}}(a0_0xd46c,0x60d1a));Object['defineProperty'](exports,a0_0x4a26e3(0x1e2),{'value':!0x0}),exports['OperatoToolResolver']=void 0x0;function a0_0xd46c(){const _0x1b9ff7=['__esModule','170XqNFFb','studioTemplateIsOverLimit','__param','Query','checkStudioPermission','tslib','68EdRkkM','Resolver','33ZPamVQ','./tool-permission','15096oAbWvT','checkStudioTemplateIsOverLimit','5UsnHhD','design:returntype','type-graphql','Operato\x20Tool\x20Studio\x20Usage\x20Permissions','Operato\x20Tool\x20Studio\x20Limit\x20check','__metadata','518009QUMfdw','392944XgImuc','design:paramtypes','prototype','__decorate','23382iaAOUN','16881pWOcMS','3218316gWQKGZ','design:type','14afMLRH','studioPermission','Ctx','954822NzpZFD'];a0_0xd46c=function(){return _0x1b9ff7;};return a0_0xd46c();}const tslib_1=require(a0_0x4a26e3(0x1c8)),type_graphql_1=require(a0_0x4a26e3(0x1d1)),tool_permission_1=require(a0_0x4a26e3(0x1cc));let OperatoToolResolver=class{async[a0_0x4a26e3(0x1df)](_0x12d539){const _0x390a15=a0_0x4a26e3;return(0x0,tool_permission_1[_0x390a15(0x1c7)])();}async[a0_0x4a26e3(0x1c4)](_0x5deb3a,_0x25a04f){const _0x11d519=a0_0x4a26e3;return(0x0,tool_permission_1[_0x11d519(0x1ce)])(_0x5deb3a,_0x25a04f);}};tslib_1[a0_0x4a26e3(0x1d9)]([(0x0,type_graphql_1[a0_0x4a26e3(0x1c6)])(_0x2eb765=>Boolean,{'description':a0_0x4a26e3(0x1d2)}),tslib_1[a0_0x4a26e3(0x1c5)](0x0,(0x0,type_graphql_1['Ctx'])()),tslib_1[a0_0x4a26e3(0x1d4)]('design:type',Function),tslib_1[a0_0x4a26e3(0x1d4)](a0_0x4a26e3(0x1d7),[Object]),tslib_1['__metadata'](a0_0x4a26e3(0x1d0),Promise)],OperatoToolResolver[a0_0x4a26e3(0x1d8)],a0_0x4a26e3(0x1df),null),tslib_1[a0_0x4a26e3(0x1d9)]([(0x0,type_graphql_1['Query'])(_0x554d76=>Boolean,{'description':a0_0x4a26e3(0x1d3)}),tslib_1['__param'](0x0,(0x0,type_graphql_1['Arg'])('id')),tslib_1[a0_0x4a26e3(0x1c5)](0x1,(0x0,type_graphql_1[a0_0x4a26e3(0x1e0)])()),tslib_1[a0_0x4a26e3(0x1d4)](a0_0x4a26e3(0x1dd),Function),tslib_1[a0_0x4a26e3(0x1d4)]('design:paramtypes',[String,Object]),tslib_1[a0_0x4a26e3(0x1d4)](a0_0x4a26e3(0x1d0),Promise)],OperatoToolResolver[a0_0x4a26e3(0x1d8)],'studioTemplateIsOverLimit',null),OperatoToolResolver=tslib_1[a0_0x4a26e3(0x1d9)]([(0x0,type_graphql_1[a0_0x4a26e3(0x1ca)])()],OperatoToolResolver),exports['OperatoToolResolver']=OperatoToolResolver;
|