@things-factory/operato-tools 6.0.149 → 6.0.151
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/actions/main.js +1 -1
- package/client/pages/generator/button-config-tab-mixin.js +4 -4
- package/client/pages/generator/column-config-tab-mixin.js +4 -4
- package/client/pages/generator/etc-config-tab-mixin.js +4 -4
- package/client/pages/generator/form-config-tab-mixin.js +4 -4
- package/client/pages/generator/graphql-config-tab-mixin.js +24 -24
- package/client/pages/generator/grid-config-tab-mixin.js +22 -22
- package/client/pages/generator/menu-config-tab-mixin.js +11 -11
- package/client/pages/generator/meta-generator-page.js +11 -11
- package/client/pages/generator/search-config-tab-mixin.js +4 -4
- package/client/pages/generator/tab-config-tab-mixin.js +4 -4
- package/client/pages/main.js +4 -4
- package/client/reducers/main.js +1 -1
- package/package.json +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_0x37c593=a0_0x3a23;(function(_0x3148c2,_0xf8f48d){const _0x9bfd0d=a0_0x3a23,_0x4e2243=_0x3148c2();while(!![]){try{const _0x57d90e=-parseInt(_0x9bfd0d(0xc5))/0x1+parseInt(_0x9bfd0d(0xc7))/0x2+parseInt(_0x9bfd0d(0xca))/0x3+parseInt(_0x9bfd0d(0xd0))/0x4+parseInt(_0x9bfd0d(0xcb))/0x5*(-parseInt(_0x9bfd0d(0xcc))/0x6)+-parseInt(_0x9bfd0d(0xd3))/0x7*(-parseInt(_0x9bfd0d(0xce))/0x8)+-parseInt(_0x9bfd0d(0xd6))/0x9*(parseInt(_0x9bfd0d(0xd1))/0xa);if(_0x57d90e===_0xf8f48d)break;else _0x4e2243['push'](_0x4e2243['shift']());}catch(_0x5e4473){_0x4e2243['push'](_0x4e2243['shift']());}}}(a0_0x1e69,0x45bf0));Object[a0_0x37c593(0xcf)](exports,a0_0x37c593(0xd2),{'value':!0x0}),exports[a0_0x37c593(0xc8)]=void 0x0;const tslib_1=require(a0_0x37c593(0xd5)),ERROR_CODES=tslib_1[a0_0x37c593(0xc6)](require('../constants/error-code'));function a0_0x3a23(_0x541408,_0x4ac231){const _0x1e694f=a0_0x1e69();return a0_0x3a23=function(_0x3a2355,_0x2ec5c7){_0x3a2355=_0x3a2355-0xc5;let _0x599721=_0x1e694f[_0x3a2355];return _0x599721;},a0_0x3a23(_0x541408,_0x4ac231);}class LicenseError extends Error{static get[a0_0x37c593(0xcd)](){const _0x1b5a72=a0_0x37c593;return Object[_0x1b5a72(0xc9)]({},ERROR_CODES);}constructor({errorCode:_0x42b932,detail:_0x1d41ae}){const _0x1e7f51=a0_0x37c593;super(_0x42b932),this['name']='license-error',this['errorCode']=_0x42b932,this[_0x1e7f51(0xd4)]=_0x1d41ae;}}function a0_0x1e69(){const _0x2b2bb8=['580VHdAui','__esModule','483399qFNTdh','detail','tslib','73341XQaDJE','543069jLWsdh','__importStar','838080OgiTZX','LicenseError','assign','1112736fGHWGP','125470QahOFu','120TXNfJN','ERROR_CODES','56yCgWla','defineProperty','2119680kAoLNr'];a0_0x1e69=function(){return _0x2b2bb8;};return a0_0x1e69();}exports['LicenseError']=LicenseError;
|
package/server/routes.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a0_0x37aa(){const _0x4b05d4=['things-factory:operato-tools:routes','bootstrap-module-domain-private-route','6391vCCqhg','1402722VZbOxy','debug','150xdJFsf','bootstrap-module-global-private-route','1xTgely','302346GyQIMN','7neYNAN','1155104SuJCjT','6840LblTwu','2884290Jczswg','2209704IkdDST','6668HYGeFR','bootstrap-module-domain-public-route','9SDAnew','bootstrap-module-global-public-route'];a0_0x37aa=function(){return _0x4b05d4;};return a0_0x37aa();}const a0_0x531de5=a0_0x1011;(function(_0x256eb3,_0x1bc855){const _0x4fd77f=a0_0x1011,_0x4d7672=_0x256eb3();while(!![]){try{const _0x371cdc=-parseInt(_0x4fd77f(0x1f2))/0x1*(-parseInt(_0x4fd77f(0x1f5))/0x2)+-parseInt(_0x4fd77f(0x1f3))/0x3+-parseInt(_0x4fd77f(0x1f9))/0x4*(parseInt(_0x4fd77f(0x1f0))/0x5)+parseInt(_0x4fd77f(0x200))/0x6*(-parseInt(_0x4fd77f(0x1f4))/0x7)+parseInt(_0x4fd77f(0x1f8))/0x8*(parseInt(_0x4fd77f(0x1fb))/0x9)+parseInt(_0x4fd77f(0x1f7))/0xa+parseInt(_0x4fd77f(0x1ff))/0xb*(-parseInt(_0x4fd77f(0x1f6))/0xc);if(_0x371cdc===_0x1bc855)break;else _0x4d7672['push'](_0x4d7672['shift']());}catch(_0x5b8b11){_0x4d7672['push'](_0x4d7672['shift']());}}}(a0_0x37aa,0x681cd));function a0_0x1011(_0x333fa0,_0x3273ba){const _0x37aa2e=a0_0x37aa();return a0_0x1011=function(_0x1011f3,_0x105677){_0x1011f3=_0x1011f3-0x1ef;let _0x545606=_0x37aa2e[_0x1011f3];return _0x545606;},a0_0x1011(_0x333fa0,_0x3273ba);}const debug=require(a0_0x531de5(0x1ef))(a0_0x531de5(0x1fd));process['on'](a0_0x531de5(0x1fc),(_0x75e79f,_0xfd3e97)=>{}),process['on'](a0_0x531de5(0x1f1),(_0x5018e1,_0x2f0a1d)=>{}),process['on'](a0_0x531de5(0x1fa),(_0x5e72e4,_0x4f3999)=>{}),process['on'](a0_0x531de5(0x1fe),(_0x29eb98,_0x2db944)=>{});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x16e7f1=a0_0x2f2d;function a0_0x5eb0(){const _0x50dbe0=['Operato\x20Tool\x20Create\x20Menu','\x22,\x22name\x22:\x20\x22','from',',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22','16892469akAiCz','gridRank','dataProp','Mutation','find','getRepository','createSortCols','EntityColumn','\x27\x20or\x20id\x20=\x20\x27','7138488GRLtyF','aes-256-cfb','lodash','772689RwcJcf','select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27','@things-factory/meta-ui/client/pages/meta-grist-page','menuType','\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}','__importDefault','hex','category','./../tool-secret/tool-permission','string','stringify','parent','__esModule','push','name','utf8','left','{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22','COPY','searchOper','design:returntype','\x22,\x22desc\x22:','aes256','380eTphVZ','Resolver','randomBytes','h1z0q9i9x7q6','createSearchCols',',\x22mandatory\x22:\x20','pluralize','aes-256-cbc','\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','JSON','Arg','creator','hiddenFlag','\x20,\x22exportable\x22:\x20true','template','entity','Directive','\x0a{\x0a\x20\x20\x22menu\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x22title\x22:\x20\x22{{name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22\x22,\x0a\x20\x20\x20\x20\x20\x20\x22desc\x22:\x20\x22\x22\x0a\x20\x20},\x0a\x20\x20\x22gql\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x22query\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22list_func\x22:\x20\x22{{pluralCamelCase\x20name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22find_one_func\x22:\x22{{camelCase\x20name}}\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x22mutation\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22multiple\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22func\x22:\x22updateMultiple{{pascalCase\x20name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22{{pascalCase\x20name}}Patch\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22delete\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22func\x22:\x22delete{{pluralPascalCase\x20name}}\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20},\x0a\x20\x20\x22button\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22export\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22add\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22delete\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22save\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20],\x0a\x20\x20\x22grid_column\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22string\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22id\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22header\x22:\x20\x22id\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22hidden\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22editable\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22mandatory\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22sortable\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22align\x22:\x20\x22left\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22width\x22:\x200,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22exportable\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20},\x0a{{GridColumns}}\x0a\x20\x20],\x0a\x20\x20\x22grid\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22button\x22:[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{{HistoryButton}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22option\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22mobile_mode\x22:\x20\x22LIST\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22desk_mode\x22:\x20\x22GRID\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22use_row_checker\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22pages\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2020,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2050,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20100,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20300\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22view_mode\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22GRID\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22LIST\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22CARD\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22sorters\x22:\x20[\x0a{{SortColumns}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20]\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x22row\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22multiple_select\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22click\x22:\x20\x22select-row-toggle\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20},\x0a\x20\x20\x22search\x22:\x20[\x0a{{SearchColumns}}\x0a\x20\x20]\x0a}\x0a','checkStudioTemplateIsOverLimit','length','\x22,\x22operator\x22:\x20\x22','save','prototype','refName','\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}','sortRank','\x22,\x22header\x22:\x20\x22','176ICBvII','aes-256-ecb','__param','hidden','resourceUrl','rank','update','__metadata','toolCreateMenu','creator_id','aes-256-ctr','query','createGridColumns','enc','reverseSort','1351Zpakfm','design:type','{\x22name\x22:\x22','\x20,\x22editable\x22:\x20','\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}','__decorate','\x22,\x22width\x22:','9eyJouh','\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','join','updater_id','state',',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22','24vfNvrI','parent_menu_id','OperatoToolCreateMenu','default','49048WRyIbK','{\x22type\x22:\x20\x22','184086dnBNWX','findOne','aes-256-cfb1','tslib',',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22','type-graphql','Entity','986786OAKmpD','routing','updated_at','replace','crypto','searchRank','75730LKjfgD','\x22,\x22hidden\x22:','createdAt','meta-grist-page','map',',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22','aes-256-cfb8','sort','split','substring','createMenuData','Menu','assign','filter','createCipheriv'];a0_0x5eb0=function(){return _0x50dbe0;};return a0_0x5eb0();}(function(_0x40ff21,_0x261741){const _0x69b742=a0_0x2f2d,_0x234f26=_0x40ff21();while(!![]){try{const _0x20aa54=-parseInt(_0x69b742(0xcf))/0x1+parseInt(_0x69b742(0xaa))/0x2*(-parseInt(_0x69b742(0x97))/0x3)+parseInt(_0x69b742(0x101))/0x4*(-parseInt(_0x69b742(0xb0))/0x5)+parseInt(_0x69b742(0xcc))/0x6+parseInt(_0x69b742(0x110))/0x7*(-parseInt(_0x69b742(0xa1))/0x8)+parseInt(_0x69b742(0xa3))/0x9*(parseInt(_0x69b742(0xe6))/0xa)+parseInt(_0x69b742(0xc3))/0xb*(parseInt(_0x69b742(0x9d))/0xc);if(_0x20aa54===_0x261741)break;else _0x234f26['push'](_0x234f26['shift']());}catch(_0x45e4da){_0x234f26['push'](_0x234f26['shift']());}}}(a0_0x5eb0,0xe4767));function a0_0x2f2d(_0x7d72fd,_0x5cd623){const _0x5eb060=a0_0x5eb0();return a0_0x2f2d=function(_0x2f2d22,_0x581f52){_0x2f2d22=_0x2f2d22-0x96;let _0x1f9000=_0x5eb060[_0x2f2d22];return _0x1f9000;},a0_0x2f2d(_0x7d72fd,_0x5cd623);}Object['defineProperty'](exports,a0_0x16e7f1(0xdb),{'value':!0x0}),exports[a0_0x16e7f1(0x9f)]=void 0x0;const tslib_1=require(a0_0x16e7f1(0xa6)),type_graphql_1=require(a0_0x16e7f1(0xa8)),resource_base_1=require('@things-factory/resource-base'),menu_base_1=require('@things-factory/menu-base'),tool_permission_1=require(a0_0x16e7f1(0xd7)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x16e7f1(0xce)),{plural:plural}=require(a0_0x16e7f1(0xec)),crypto_1=tslib_1[a0_0x16e7f1(0xd4)](require(a0_0x16e7f1(0xae)));let OperatoToolCreateMenu=class{async['toolCreateMenu'](_0x1934ae,_0x2a6c84,_0x57c516){const _0x4aeb39=a0_0x16e7f1,{domain:_0x1e52ae,user:_0xd15113,tx:_0x4606b9}=_0x57c516[_0x4aeb39(0x9b)];await(0x0,tool_permission_1[_0x4aeb39(0xf8)])('',_0x57c516);const _0x36ff80=await _0x4606b9[_0x4aeb39(0xc8)](resource_base_1[_0x4aeb39(0xa9)])[_0x4aeb39(0xa4)]({'where':{'domain':{'id':_0x1e52ae['id']},'id':_0x1934ae}}),_0x47be12=await _0x4606b9['getRepository'](resource_base_1[_0x4aeb39(0xca)])[_0x4aeb39(0xc7)]({'where':{'domain':{'id':_0x1e52ae['id']},'entity':{'id':_0x36ff80['id']}}});let {name:_0x58333=''}=_0x36ff80||{},_0x20e13a=kebabCase(_0x58333),_0x44e9c3=modelTemplate[_0x4aeb39(0xad)](/{{pascalCase name}}/g,startCase(camelCase(_0x58333))[_0x4aeb39(0xad)](/ /g,''))[_0x4aeb39(0xad)](/{{camelCase name}}/g,camelCase(_0x58333))[_0x4aeb39(0xad)](/{{snakeCase name}}/g,snakeCase(_0x58333))[_0x4aeb39(0xad)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x58333)))[_0x4aeb39(0xad)](/ /g,''))[_0x4aeb39(0xad)](/{{pluralCamelCase name}}/g,camelCase(plural(_0x58333)))[_0x4aeb39(0xad)](/{{name}}/g,_0x58333),_0x580775='';_0x4aeb39(0xef)==_0x36ff80[_0x4aeb39(0xc5)]?_0x580775=_0x4aeb39(0xee):_0x4aeb39(0xe1)==_0x36ff80['dataProp']&&(_0x580775=_0x4aeb39(0x98)),_0x44e9c3=_0x44e9c3[_0x4aeb39(0xad)](/{{HistoryButton}}/g,_0x580775);let _0x4119d4=this[_0x4aeb39(0xc9)](_0x47be12);_0x44e9c3=_0x44e9c3[_0x4aeb39(0xad)](/{{SortColumns}}/g,_0x4119d4[_0x4aeb39(0x99)](','));let _0x322d7d=this[_0x4aeb39(0xea)](_0x47be12);_0x44e9c3=_0x44e9c3['replace'](/{{SearchColumns}}/g,_0x322d7d[_0x4aeb39(0x99)](','));let _0x439fe9=this['createGridColumns'](_0x47be12);return _0x44e9c3=_0x44e9c3[_0x4aeb39(0xad)](/{{GridColumns}}/g,_0x439fe9[_0x4aeb39(0x99)](',')),_0x44e9c3=this['enc'](_0x44e9c3),await this[_0x4aeb39(0xba)](_0x4606b9,_0x1e52ae,_0xd15113,_0x2a6c84,_0x20e13a,_0x44e9c3),!0x0;}[a0_0x16e7f1(0x10d)](_0x38ece0){const _0xa3f799=a0_0x16e7f1;return _0x38ece0[_0xa3f799(0xbd)](_0x1fd7cb=>'id'!=_0x1fd7cb[_0xa3f799(0xdd)]&&_0x1fd7cb[_0xa3f799(0xc4)]>0x0)[_0xa3f799(0xb7)](function(_0x2b9514,_0x461160){const _0x1d3d6b=_0xa3f799;return _0x2b9514[_0x1d3d6b(0xc4)]-_0x461160[_0x1d3d6b(0xc4)];})['map'](_0x33c56d=>{const _0x1be121=_0xa3f799;let {gridEditor:_0x2c9e47=_0x1be121(0xd8),name:_0x53a5d1,term:_0x196ef4,gridWidth:_0x21fd72=0x0,gridAlign:_0x2544d9=_0x1be121(0xdf),nullable:_0x47636b=!0x1}=_0x33c56d;if(null==_0x2c9e47&&(_0x2c9e47='string'),null==_0x2544d9&&(_0x2544d9=_0x1be121(0xdf)),_0x1be121(0x9a)==_0x53a5d1||_0x1be121(0x10a)==_0x53a5d1)return _0x53a5d1='updater_id'==_0x53a5d1?'updater':_0x1be121(0xf1),'{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22'+_0x53a5d1+_0x1be121(0x100)+_0x53a5d1+_0x1be121(0x114);if(_0x1be121(0xac)==_0x53a5d1||'created_at'==_0x53a5d1)return _0x1be121(0xe0)+(_0x1be121(0xac)==_0x53a5d1?'updatedAt':_0x1be121(0xb2))+_0x1be121(0x100)+_0x53a5d1+_0x1be121(0xfe);let _0xb3d9e3='readonly'!=_0x2c9e47&&'hidden'!=_0x2c9e47,_0x22a939=_0x1be121(0x104)==_0x2c9e47;0x1!=_0x22a939&&0x0!=_0xb3d9e3||(_0x2c9e47='string');let _0x202323=_0x1be121(0xa2)+_0x2c9e47+_0x1be121(0xc0)+camelCase(_0x53a5d1)+_0x1be121(0x100)+_0x196ef4+_0x1be121(0xb1)+_0x22a939+_0x1be121(0x113)+_0xb3d9e3+_0x1be121(0xeb)+!_0x47636b+_0x1be121(0x9c)+_0x2544d9+_0x1be121(0x96)+_0x21fd72+_0x1be121(0xf3);return'code'==_0x33c56d['refType']&&(_0x202323+=_0x1be121(0xb5)+_0x33c56d['refName']+'\x22}'),'scenario'==_0x33c56d['refType']&&(_0x202323+=_0x1be121(0xa7)+_0x33c56d[_0x1be121(0xfd)]+'\x22}'),_0x1be121(0xf5)==_0x33c56d['refType']&&(_0x202323+=_0x1be121(0xc2)+camelCase(plural(_0x33c56d[_0x1be121(0xfd)]))+_0x1be121(0xd3)),_0x202323+='}',_0x202323;});}[a0_0x16e7f1(0xea)](_0x37626b){const _0x312092=a0_0x16e7f1;return _0x37626b['filter'](_0x51a207=>_0x51a207[_0x312092(0xaf)]>0x0)[_0x312092(0xb7)](function(_0x11ad6f,_0x2382e7){return _0x11ad6f['searchRank']-_0x2382e7['searchRank'];})[_0x312092(0xb4)](_0xa682b4=>{const _0x11dc9d=_0x312092;let _0x2a4bc7=_0xa682b4[_0x11dc9d(0xe2)];return'filter'==_0x2a4bc7?'\x22'+camelCase(_0xa682b4[_0x11dc9d(0xdd)])+'\x22':(_0x2a4bc7||(_0x2a4bc7='eq'),'{\x22name\x22:\x20\x22'+camelCase(_0xa682b4['name'])+_0x11dc9d(0xfa)+_0x2a4bc7+'\x22}');});}[a0_0x16e7f1(0xc9)](_0x3e2668){const _0x4886cf=a0_0x16e7f1;return _0x3e2668[_0x4886cf(0xbd)](_0x128683=>_0x128683[_0x4886cf(0xff)]>0x0)['sort'](function(_0x5f23d0,_0x386452){const _0x441e=_0x4886cf;return _0x5f23d0[_0x441e(0xff)]-_0x386452[_0x441e(0xff)];})['map'](_0xbaf4cf=>_0x4886cf(0x112)+camelCase(_0xbaf4cf[_0x4886cf(0xdd)])+_0x4886cf(0xe4)+_0xbaf4cf[_0x4886cf(0x10f)]+'}');}async[a0_0x16e7f1(0xba)](_0x522fc6,_0x323263,_0x512ce4,_0x4036dd,_0xddee8f,_0x1d2eea){const _0x5a925f=a0_0x16e7f1;let _0x16c16b=await _0x522fc6[_0x5a925f(0xc8)](menu_base_1[_0x5a925f(0xbb)])[_0x5a925f(0xa4)]({'where':{'domain':{'id':_0x323263['id']},'id':_0x4036dd}}),_0x3585db=(await _0x522fc6['getRepository'](menu_base_1[_0x5a925f(0xbb)])[_0x5a925f(0x10c)](_0x5a925f(0xd0)+_0x4036dd+_0x5a925f(0xcb)+_0x4036dd+'\x27'))[0x0][_0x5a925f(0x106)]+0xa,_0x37bc3a=new menu_base_1[(_0x5a925f(0xbb))]();_0x37bc3a['name']=_0xddee8f,_0x37bc3a[_0x5a925f(0xd2)]='SCREEN',_0x37bc3a[_0x5a925f(0xd6)]=_0x5a925f(0xb3),_0x37bc3a['rank']=_0x3585db,_0x37bc3a[_0x5a925f(0xf2)]=!0x1,_0x37bc3a[_0x5a925f(0xab)]=_0xddee8f,_0x37bc3a[_0x5a925f(0xf4)]=_0x1d2eea,_0x37bc3a[_0x5a925f(0x105)]=_0x5a925f(0xd1),_0x37bc3a[_0x5a925f(0xda)]=_0x16c16b,await _0x522fc6[_0x5a925f(0xc8)](menu_base_1['Menu'])[_0x5a925f(0xfb)](Object[_0x5a925f(0xbc)](Object[_0x5a925f(0xbc)]({},_0x37bc3a),{'domain':_0x323263,'creator':_0x512ce4,'updater':_0x512ce4}));}[a0_0x16e7f1(0x10e)](_0x15b842){const _0x34c8c3=a0_0x16e7f1;let _0x46f6f9=JSON[_0x34c8c3(0xd9)](_0x15b842)[_0x34c8c3(0xb8)](/(.{100})/)[_0x34c8c3(0xbd)](_0x82572d=>_0x82572d),_0x1f3d25=[_0x34c8c3(0x102),_0x34c8c3(0xed),_0x34c8c3(0xcd),_0x34c8c3(0xb6),_0x34c8c3(0xa5),'aes-256-ofb',_0x34c8c3(0x10b),_0x34c8c3(0xe5)],_0xcc001f=crypto_1[_0x34c8c3(0xa0)][_0x34c8c3(0xe8)](0x20)['toString']('hex'),_0x3831d6=Buffer[_0x34c8c3(0xc1)](_0xcc001f,_0x34c8c3(0xd5)),_0x308a61=_0xcc001f[_0x34c8c3(0xb9)](0x0,0x10),_0xdcd424=['',_0x308a61,_0x308a61,_0x308a61,_0x308a61,_0x308a61,_0x308a61,_0x308a61],_0xfeaa41=0x0,_0x2fb2da=[];_0x2fb2da['push'](_0xcc001f);for(var _0xfbbe23=0x0;_0xfbbe23<_0x46f6f9['length'];_0xfbbe23++,_0xfeaa41++){_0xfeaa41==_0x1f3d25[_0x34c8c3(0xf9)]&&(_0xfeaa41=0x0);let _0xbd6a8=crypto_1[_0x34c8c3(0xa0)][_0x34c8c3(0xbe)](_0x1f3d25[_0xfeaa41],_0x3831d6,_0xdcd424[_0xfeaa41]),_0x183b86=_0xbd6a8[_0x34c8c3(0x107)](_0x46f6f9[_0xfbbe23],_0x34c8c3(0xde),'hex');_0x183b86+=_0xbd6a8['final']('hex'),_0x2fb2da[_0x34c8c3(0xdc)](_0x183b86);}return _0x2fb2da[_0x34c8c3(0x99)](_0x34c8c3(0xe9));}};tslib_1[a0_0x16e7f1(0x115)]([(0x0,type_graphql_1[a0_0x16e7f1(0xf6)])('@transaction'),(0x0,type_graphql_1[a0_0x16e7f1(0xc6)])(_0x5c044d=>Boolean,{'description':a0_0x16e7f1(0xbf)}),tslib_1[a0_0x16e7f1(0x103)](0x0,(0x0,type_graphql_1['Arg'])('id')),tslib_1[a0_0x16e7f1(0x103)](0x1,(0x0,type_graphql_1[a0_0x16e7f1(0xf0)])(a0_0x16e7f1(0x9e))),tslib_1[a0_0x16e7f1(0x103)](0x2,(0x0,type_graphql_1['Ctx'])()),tslib_1['__metadata'](a0_0x16e7f1(0x111),Function),tslib_1[a0_0x16e7f1(0x108)]('design:paramtypes',[String,String,Object]),tslib_1[a0_0x16e7f1(0x108)](a0_0x16e7f1(0xe3),Promise)],OperatoToolCreateMenu[a0_0x16e7f1(0xfc)],a0_0x16e7f1(0x109),null),OperatoToolCreateMenu=tslib_1[a0_0x16e7f1(0x115)]([(0x0,type_graphql_1[a0_0x16e7f1(0xe7)])()],OperatoToolCreateMenu),exports[a0_0x16e7f1(0x9f)]=OperatoToolCreateMenu;const modelTemplate=a0_0x16e7f1(0xf7);
|
|
1
|
+
'use strict';function a0_0x5ad4(){const _0x5d1ffc=['h1z0q9i9x7q6','\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','\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','prototype','{\x22name\x22:\x22',',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22','createGridColumns','{\x22type\x22:\x20\x22','Resolver','556689GDQPSd','gridRank','createCipheriv','aes-256-cfb','1205754RvGgwr','pluralize','updatedAt','Arg','{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22','reverseSort','category','findOne','\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}','rank','createdAt','entity','\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}','find','85746fJFchf','checkStudioTemplateIsOverLimit','__metadata','205aeiHRy','refName','sort','join','getRepository','6bnaGnp','\x22,\x22operator\x22:\x20\x22','updater','__param','\x22,\x22header\x22:\x20\x22','push','hex','5428512lFRcOQ','substring','createSearchCols','EntityColumn','hidden','randomBytes','dataProp','lodash','Directive','map','@transaction','updated_at','updater_id',',\x22mandatory\x22:\x20','length','__importDefault',',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22','2488CvKcpu','update','@things-factory/menu-base','query','64433jTExnJ','stringify','split','\x22,\x22width\x22:','__esModule','Mutation','\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}','searchRank','name','menuType','createMenuData','SCREEN','Menu','replace',',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22','filter','645ClCjxs','created_at','aes-256-ecb','tslib','design:paramtypes','code','select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27','\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','{\x22name\x22:\x20\x22','routing','toolCreateMenu','aes-256-ofb','aes-256-ctr','parent','\x22,\x22hidden\x22:','refType','aes256','crypto','design:type','hiddenFlag','createSortCols','enc','design:returntype','4613520EDoXMi','default','resourceUrl','string','./../tool-secret/tool-permission','assign','\x27\x20or\x20id\x20=\x20\x27','__decorate','sortRank','OperatoToolCreateMenu','final','creator','utf8','30wQJxRr','left'];a0_0x5ad4=function(){return _0x5d1ffc;};return a0_0x5ad4();}const a0_0x17a8da=a0_0x364e;(function(_0x5e368b,_0x2c5335){const _0x1e8fce=a0_0x364e,_0x1f680a=_0x5e368b();while(!![]){try{const _0x1e2ca5=parseInt(_0x1e8fce(0x1c7))/0x1*(parseInt(_0x1e8fce(0x1ab))/0x2)+-parseInt(_0x1e8fce(0x1d7))/0x3*(-parseInt(_0x1e8fce(0x1c3))/0x4)+-parseInt(_0x1e8fce(0x1a6))/0x5*(-parseInt(_0x1e8fce(0x218))/0x6)+parseInt(_0x1e8fce(0x206))/0x7+parseInt(_0x1e8fce(0x1ee))/0x8+-parseInt(_0x1e8fce(0x1b2))/0x9+parseInt(_0x1e8fce(0x1fb))/0xa*(-parseInt(_0x1e8fce(0x20a))/0xb);if(_0x1e2ca5===_0x2c5335)break;else _0x1f680a['push'](_0x1f680a['shift']());}catch(_0x2bab52){_0x1f680a['push'](_0x1f680a['shift']());}}}(a0_0x5ad4,0x9b8ef));function a0_0x364e(_0x429855,_0x44b7f3){const _0x5ad452=a0_0x5ad4();return a0_0x364e=function(_0x364eab,_0x27a79d){_0x364eab=_0x364eab-0x1a6;let _0x3dfde6=_0x5ad452[_0x364eab];return _0x3dfde6;},a0_0x364e(_0x429855,_0x44b7f3);}Object['defineProperty'](exports,a0_0x17a8da(0x1cb),{'value':!0x0}),exports[a0_0x17a8da(0x1f7)]=void 0x0;const tslib_1=require(a0_0x17a8da(0x1da)),type_graphql_1=require('type-graphql'),resource_base_1=require('@things-factory/resource-base'),menu_base_1=require(a0_0x17a8da(0x1c5)),tool_permission_1=require(a0_0x17a8da(0x1f2)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x17a8da(0x1b9)),{plural:plural}=require(a0_0x17a8da(0x20b)),crypto_1=tslib_1[a0_0x17a8da(0x1c1)](require(a0_0x17a8da(0x1e8)));let OperatoToolCreateMenu=class{async[a0_0x17a8da(0x1e1)](_0x57c693,_0x4dd520,_0x27ebd4){const _0x443520=a0_0x17a8da,{domain:_0x3e09d7,user:_0x344d88,tx:_0x27cb2a}=_0x27ebd4['state'];await(0x0,tool_permission_1[_0x443520(0x219)])('',_0x27ebd4);const _0x1038ce=await _0x27cb2a[_0x443520(0x1aa)](resource_base_1['Entity'])[_0x443520(0x211)]({'where':{'domain':{'id':_0x3e09d7['id']},'id':_0x57c693}}),_0x1acd85=await _0x27cb2a['getRepository'](resource_base_1[_0x443520(0x1b5)])[_0x443520(0x217)]({'where':{'domain':{'id':_0x3e09d7['id']},'entity':{'id':_0x1038ce['id']}}});let {name:_0x46ed65=''}=_0x1038ce||{},_0x562ad5=kebabCase(_0x46ed65),_0x5c698c=modelTemplate[_0x443520(0x1d4)](/{{pascalCase name}}/g,startCase(camelCase(_0x46ed65))[_0x443520(0x1d4)](/ /g,''))[_0x443520(0x1d4)](/{{camelCase name}}/g,camelCase(_0x46ed65))['replace'](/{{snakeCase name}}/g,snakeCase(_0x46ed65))[_0x443520(0x1d4)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x46ed65)))['replace'](/ /g,''))[_0x443520(0x1d4)](/{{pluralCamelCase name}}/g,camelCase(plural(_0x46ed65)))['replace'](/{{name}}/g,_0x46ed65),_0x483c44='';'JSON'==_0x1038ce[_0x443520(0x1b8)]?_0x483c44=_0x443520(0x1fe):'COPY'==_0x1038ce[_0x443520(0x1b8)]&&(_0x483c44=_0x443520(0x1de)),_0x5c698c=_0x5c698c[_0x443520(0x1d4)](/{{HistoryButton}}/g,_0x483c44);let _0x2b2484=this[_0x443520(0x1eb)](_0x1acd85);_0x5c698c=_0x5c698c[_0x443520(0x1d4)](/{{SortColumns}}/g,_0x2b2484[_0x443520(0x1a9)](','));let _0x5980ae=this[_0x443520(0x1b4)](_0x1acd85);_0x5c698c=_0x5c698c[_0x443520(0x1d4)](/{{SearchColumns}}/g,_0x5980ae[_0x443520(0x1a9)](','));let _0x584709=this[_0x443520(0x203)](_0x1acd85);return _0x5c698c=_0x5c698c[_0x443520(0x1d4)](/{{GridColumns}}/g,_0x584709[_0x443520(0x1a9)](',')),_0x5c698c=this[_0x443520(0x1ec)](_0x5c698c),await this[_0x443520(0x1d1)](_0x27cb2a,_0x3e09d7,_0x344d88,_0x4dd520,_0x562ad5,_0x5c698c),!0x0;}[a0_0x17a8da(0x203)](_0x38986c){const _0x576094=a0_0x17a8da;return _0x38986c['filter'](_0x18a36a=>'id'!=_0x18a36a[_0x576094(0x1cf)]&&_0x18a36a[_0x576094(0x207)]>0x0)[_0x576094(0x1a8)](function(_0x5a9a87,_0x17e163){const _0x4e1f87=_0x576094;return _0x5a9a87[_0x4e1f87(0x207)]-_0x17e163[_0x4e1f87(0x207)];})[_0x576094(0x1bb)](_0x5b9438=>{const _0x23dc7c=_0x576094;let {gridEditor:_0x1d743e=_0x23dc7c(0x1f1),name:_0x1d6737,term:_0x80e133,gridWidth:_0x3a517a=0x0,gridAlign:_0x1cc53=_0x23dc7c(0x1fc),nullable:_0x593dbd=!0x1}=_0x5b9438;if(null==_0x1d743e&&(_0x1d743e=_0x23dc7c(0x1f1)),null==_0x1cc53&&(_0x1cc53='left'),_0x23dc7c(0x1be)==_0x1d6737||'creator_id'==_0x1d6737)return _0x1d6737=_0x23dc7c(0x1be)==_0x1d6737?_0x23dc7c(0x1ad):_0x23dc7c(0x1f9),_0x23dc7c(0x20e)+_0x1d6737+_0x23dc7c(0x1af)+_0x1d6737+_0x23dc7c(0x212);if(_0x23dc7c(0x1bd)==_0x1d6737||_0x23dc7c(0x1d8)==_0x1d6737)return'{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22'+(_0x23dc7c(0x1bd)==_0x1d6737?_0x23dc7c(0x20c):_0x23dc7c(0x214))+'\x22,\x22header\x22:\x20\x22'+_0x1d6737+_0x23dc7c(0x216);let _0x4277f6='readonly'!=_0x1d743e&&'hidden'!=_0x1d743e,_0x119708=_0x23dc7c(0x1b6)==_0x1d743e;0x1!=_0x119708&&0x0!=_0x4277f6||(_0x1d743e=_0x23dc7c(0x1f1));let _0x37b314=_0x23dc7c(0x204)+_0x1d743e+'\x22,\x22name\x22:\x20\x22'+camelCase(_0x1d6737)+_0x23dc7c(0x1af)+_0x80e133+_0x23dc7c(0x1e5)+_0x119708+'\x20,\x22editable\x22:\x20'+_0x4277f6+_0x23dc7c(0x1bf)+!_0x593dbd+_0x23dc7c(0x1d5)+_0x1cc53+_0x23dc7c(0x1ca)+_0x3a517a+'\x20,\x22exportable\x22:\x20true';return _0x23dc7c(0x1dc)==_0x5b9438[_0x23dc7c(0x1e6)]&&(_0x37b314+=_0x23dc7c(0x1c2)+_0x5b9438[_0x23dc7c(0x1a7)]+'\x22}'),'scenario'==_0x5b9438[_0x23dc7c(0x1e6)]&&(_0x37b314+=_0x23dc7c(0x202)+_0x5b9438['refName']+'\x22}'),_0x23dc7c(0x215)==_0x5b9438[_0x23dc7c(0x1e6)]&&(_0x37b314+=',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22'+camelCase(plural(_0x5b9438[_0x23dc7c(0x1a7)]))+_0x23dc7c(0x1cd)),_0x37b314+='}',_0x37b314;});}[a0_0x17a8da(0x1b4)](_0x5da176){const _0x5d992f=a0_0x17a8da;return _0x5da176[_0x5d992f(0x1d6)](_0x3d8ab9=>_0x3d8ab9[_0x5d992f(0x1ce)]>0x0)[_0x5d992f(0x1a8)](function(_0x1ad43d,_0x276048){const _0x3519c2=_0x5d992f;return _0x1ad43d[_0x3519c2(0x1ce)]-_0x276048[_0x3519c2(0x1ce)];})[_0x5d992f(0x1bb)](_0x2dfcf9=>{const _0x116343=_0x5d992f;let _0x1a5ae2=_0x2dfcf9['searchOper'];return _0x116343(0x1d6)==_0x1a5ae2?'\x22'+camelCase(_0x2dfcf9[_0x116343(0x1cf)])+'\x22':(_0x1a5ae2||(_0x1a5ae2='eq'),_0x116343(0x1df)+camelCase(_0x2dfcf9[_0x116343(0x1cf)])+_0x116343(0x1ac)+_0x1a5ae2+'\x22}');});}[a0_0x17a8da(0x1eb)](_0x377e0f){const _0x4bba75=a0_0x17a8da;return _0x377e0f['filter'](_0x203e7c=>_0x203e7c[_0x4bba75(0x1f6)]>0x0)['sort'](function(_0x14127d,_0x1777e9){const _0x4a2e17=_0x4bba75;return _0x14127d[_0x4a2e17(0x1f6)]-_0x1777e9[_0x4a2e17(0x1f6)];})[_0x4bba75(0x1bb)](_0x3fdc43=>_0x4bba75(0x201)+camelCase(_0x3fdc43[_0x4bba75(0x1cf)])+'\x22,\x22desc\x22:'+_0x3fdc43[_0x4bba75(0x20f)]+'}');}async[a0_0x17a8da(0x1d1)](_0x272f16,_0x2f201e,_0x15c958,_0x45b975,_0x4be071,_0x49038b){const _0x448a8c=a0_0x17a8da;let _0x38e4d7=await _0x272f16[_0x448a8c(0x1aa)](menu_base_1[_0x448a8c(0x1d3)])['findOne']({'where':{'domain':{'id':_0x2f201e['id']},'id':_0x45b975}}),_0x5323a7=(await _0x272f16['getRepository'](menu_base_1['Menu'])[_0x448a8c(0x1c6)](_0x448a8c(0x1dd)+_0x45b975+_0x448a8c(0x1f4)+_0x45b975+'\x27'))[0x0][_0x448a8c(0x213)]+0xa,_0x176d60=new menu_base_1[(_0x448a8c(0x1d3))]();_0x176d60[_0x448a8c(0x1cf)]=_0x4be071,_0x176d60[_0x448a8c(0x1d0)]=_0x448a8c(0x1d2),_0x176d60[_0x448a8c(0x210)]='meta-grist-page',_0x176d60[_0x448a8c(0x213)]=_0x5323a7,_0x176d60[_0x448a8c(0x1ea)]=!0x1,_0x176d60[_0x448a8c(0x1e0)]=_0x4be071,_0x176d60['template']=_0x49038b,_0x176d60[_0x448a8c(0x1f0)]='@things-factory/meta-ui/client/pages/meta-grist-page',_0x176d60[_0x448a8c(0x1e4)]=_0x38e4d7,await _0x272f16[_0x448a8c(0x1aa)](menu_base_1['Menu'])['save'](Object['assign'](Object[_0x448a8c(0x1f3)]({},_0x176d60),{'domain':_0x2f201e,'creator':_0x15c958,'updater':_0x15c958}));}[a0_0x17a8da(0x1ec)](_0x14e50c){const _0x12309e=a0_0x17a8da;let _0x495100=JSON[_0x12309e(0x1c8)](_0x14e50c)[_0x12309e(0x1c9)](/(.{100})/)['filter'](_0x2847b6=>_0x2847b6),_0x378ca4=[_0x12309e(0x1d9),'aes-256-cbc',_0x12309e(0x209),'aes-256-cfb8','aes-256-cfb1',_0x12309e(0x1e2),_0x12309e(0x1e3),_0x12309e(0x1e7)],_0x3352f5=crypto_1[_0x12309e(0x1ef)][_0x12309e(0x1b7)](0x20)['toString']('hex'),_0x5459d2=Buffer['from'](_0x3352f5,_0x12309e(0x1b1)),_0x21cdab=_0x3352f5[_0x12309e(0x1b3)](0x0,0x10),_0x5df0a5=['',_0x21cdab,_0x21cdab,_0x21cdab,_0x21cdab,_0x21cdab,_0x21cdab,_0x21cdab],_0x1766a4=0x0,_0x718e4f=[];_0x718e4f[_0x12309e(0x1b0)](_0x3352f5);for(var _0xebc5cc=0x0;_0xebc5cc<_0x495100[_0x12309e(0x1c0)];_0xebc5cc++,_0x1766a4++){_0x1766a4==_0x378ca4[_0x12309e(0x1c0)]&&(_0x1766a4=0x0);let _0x1fc67e=crypto_1[_0x12309e(0x1ef)][_0x12309e(0x208)](_0x378ca4[_0x1766a4],_0x5459d2,_0x5df0a5[_0x1766a4]),_0x4d59e9=_0x1fc67e[_0x12309e(0x1c4)](_0x495100[_0xebc5cc],_0x12309e(0x1fa),'hex');_0x4d59e9+=_0x1fc67e[_0x12309e(0x1f8)]('hex'),_0x718e4f[_0x12309e(0x1b0)](_0x4d59e9);}return _0x718e4f[_0x12309e(0x1a9)](_0x12309e(0x1fd));}};tslib_1[a0_0x17a8da(0x1f5)]([(0x0,type_graphql_1[a0_0x17a8da(0x1ba)])(a0_0x17a8da(0x1bc)),(0x0,type_graphql_1[a0_0x17a8da(0x1cc)])(_0xe7d63b=>Boolean,{'description':'Operato\x20Tool\x20Create\x20Menu'}),tslib_1[a0_0x17a8da(0x1ae)](0x0,(0x0,type_graphql_1[a0_0x17a8da(0x20d)])('id')),tslib_1[a0_0x17a8da(0x1ae)](0x1,(0x0,type_graphql_1['Arg'])('parent_menu_id')),tslib_1[a0_0x17a8da(0x1ae)](0x2,(0x0,type_graphql_1['Ctx'])()),tslib_1['__metadata'](a0_0x17a8da(0x1e9),Function),tslib_1[a0_0x17a8da(0x21a)](a0_0x17a8da(0x1db),[String,String,Object]),tslib_1[a0_0x17a8da(0x21a)](a0_0x17a8da(0x1ed),Promise)],OperatoToolCreateMenu[a0_0x17a8da(0x200)],a0_0x17a8da(0x1e1),null),OperatoToolCreateMenu=tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x17a8da(0x205)])()],OperatoToolCreateMenu),exports[a0_0x17a8da(0x1f7)]=OperatoToolCreateMenu;const modelTemplate=a0_0x17a8da(0x1ff);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x134395=a0_0x5dbd;(function(_0x5f3a86,_0x25f0b1){const _0x20afc1=a0_0x5dbd,_0x5699d0=_0x5f3a86();while(!![]){try{const _0x9e2665=-parseInt(_0x20afc1(0x133))/0x1+parseInt(_0x20afc1(0x110))/0x2+-parseInt(_0x20afc1(0x16d))/0x3*(-parseInt(_0x20afc1(0x14b))/0x4)+parseInt(_0x20afc1(0x12c))/0x5*(parseInt(_0x20afc1(0x104))/0x6)+parseInt(_0x20afc1(0x154))/0x7+parseInt(_0x20afc1(0x13f))/0x8*(-parseInt(_0x20afc1(0x15d))/0x9)+-parseInt(_0x20afc1(0x13a))/0xa*(parseInt(_0x20afc1(0x14d))/0xb);if(_0x9e2665===_0x25f0b1)break;else _0x5699d0['push'](_0x5699d0['shift']());}catch(_0xbfa360){_0x5699d0['push'](_0x5699d0['shift']());}}}(a0_0x2209,0xe5519));function a0_0x5dbd(_0x2e1798,_0x364dfb){const _0x22095e=a0_0x2209();return a0_0x5dbd=function(_0x5dbd96,_0x1d72e3){_0x5dbd96=_0x5dbd96-0xfc;let _0x310936=_0x22095e[_0x5dbd96];return _0x310936;},a0_0x5dbd(_0x2e1798,_0x364dfb);}Object[a0_0x134395(0x16c)](exports,a0_0x134395(0x163),{'value':!0x0}),exports[a0_0x134395(0x149)]=void 0x0;const tslib_1=require('tslib'),type_graphql_1=require(a0_0x134395(0x178)),shell_1=require(a0_0x134395(0x123)),resource_base_1=require(a0_0x134395(0x14f)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x134395(0x15f)),{plural:plural}=require(a0_0x134395(0x156)),fs=require('fs');let OperatoToolCreateService=class{async['toolCreateService'](_0x4dd271,_0x553746){const _0x314ddf=a0_0x134395,{domain:_0x114d3c}=_0x553746[_0x314ddf(0x13d)],_0x2aebce=await(0x0,shell_1[_0x314ddf(0x108)])(resource_base_1[_0x314ddf(0x124)])[_0x314ddf(0x109)]({'where':{'id':_0x4dd271}}),_0x503c6d=await(0x0,shell_1[_0x314ddf(0x108)])(resource_base_1[_0x314ddf(0x12f)])[_0x314ddf(0x125)]({'where':{'domain':{'id':_0x114d3c['id']},'entity':{'id':_0x2aebce['id']}}});let {name:_0x3dae49='',bundle:_0x9c32ef=''}=_0x2aebce||{},_0x50407e=this[_0x314ddf(0x11e)](),_0x2a88fc=kebabCase(_0x3dae49);return await this[_0x314ddf(0xfe)](_0x50407e,_0x9c32ef,_0x2a88fc),await this[_0x314ddf(0x10b)](_0x50407e,_0x9c32ef,_0x3dae49,_0x2a88fc,_0x2aebce,_0x503c6d),!0x0;}async[a0_0x134395(0x10b)](_0x11397f,_0x49ee76,_0x20a4b5,_0x364ded,_0x1a347a,_0x3d956f){const _0x4f7873=a0_0x134395;let _0xb47734={'name':_0x364ded,'tableName':_0x1a347a[_0x4f7873(0x11a)],'pascalCaseName':startCase(camelCase(_0x20a4b5))[_0x4f7873(0x130)](/ /g,''),'camelCaseName':camelCase(_0x20a4b5),'snakeCaseName':snakeCase(_0x20a4b5),'pluralPascalCaseName':startCase(camelCase(plural(_0x20a4b5)))[_0x4f7873(0x130)](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x20a4b5))},_0x21bcbe=_0x11397f+_0x4f7873(0x148)+_0x49ee76+_0x4f7873(0x107);['JSON','COPY'][_0x4f7873(0x100)](_0x1a347a['dataProp'])?await this[_0x4f7873(0x14a)](_0x21bcbe,_0x364ded,_0x1a347a,_0x3d956f,_0xb47734):await this[_0x4f7873(0x18a)](_0x21bcbe,_0x364ded,_0x1a347a,_0x3d956f,_0xb47734);}async[a0_0x134395(0x14a)](_0x1e75d0,_0x5b8d78,_0x41bda8,_0x4a6c05,_0x283ffe){const _0xbdce41=a0_0x134395;await this[_0xbdce41(0x12b)](_0x1e75d0+(_0x5b8d78+_0xbdce41(0x102)),serviceHistoryIndex,_0x283ffe);let _0x317560=this['createEntityText'](_0x41bda8,_0x4a6c05);await this[_0xbdce41(0x12b)](_0x1e75d0+(_0x5b8d78+'/'+_0x5b8d78+_0xbdce41(0x159)),_0x317560,_0x283ffe),await this[_0xbdce41(0x12b)](_0x1e75d0+(_0x5b8d78+'/'+_0x5b8d78+_0xbdce41(0x13c)),serviceQuery,_0x283ffe),await this[_0xbdce41(0x12b)](_0x1e75d0+(_0x5b8d78+'/'+_0x5b8d78+_0xbdce41(0x16b)),serviceMutation,_0x283ffe);let _0x4a2d43=this[_0xbdce41(0x138)](_0x4a6c05);await this[_0xbdce41(0x12b)](_0x1e75d0+(_0x5b8d78+'/'+_0x5b8d78+_0xbdce41(0x145)),_0x4a2d43,_0x283ffe);let _0x462923=this['createHistoryEntityText'](_0x41bda8,_0x4a6c05);await this[_0xbdce41(0x12b)](_0x1e75d0+(_0x5b8d78+'/'+_0x5b8d78+'-history.ts'),_0x462923,_0x283ffe);let _0x37fc9e='';_0xbdce41(0x18f)==_0x41bda8[_0xbdce41(0x175)]?(_0x37fc9e=_0xbdce41(0x15e),await this[_0xbdce41(0x12b)](_0x1e75d0+(_0x5b8d78+_0xbdce41(0x18c)),serviceEntitySubscriber,_0x283ffe)):_0x37fc9e='';let _0xead802=serviceEntitySubscriber['replace'](/{{entityToJson}}/g,_0x37fc9e);await this[_0xbdce41(0x12b)](_0x1e75d0+(_0x5b8d78+'/event-subscriber.ts'),_0xead802,_0x283ffe),await this[_0xbdce41(0x12b)](_0x1e75d0+(_0x5b8d78+'/'+_0x5b8d78+_0xbdce41(0x11d)),serviceHistoryQuery,_0x283ffe),await this[_0xbdce41(0x12b)](_0x1e75d0+(_0x5b8d78+'/'+_0x5b8d78+_0xbdce41(0x12e)),sereviceHistoryType,_0x283ffe);let _0xb2766c=_0x1e75d0+'index.ts';0x0==await this[_0xbdce41(0x166)](_0xb2766c)&&await this[_0xbdce41(0x12b)](_0xb2766c,allIndex,_0x283ffe);let _0x5d5348=await fs['readFileSync'](_0xb2766c,'utf8');_0x5d5348[_0xbdce41(0x152)](_0xbdce41(0x151)+_0x283ffe[_0xbdce41(0x10e)]+'/'+_0x283ffe['name']+_0xbdce41(0x189))<0x0&&(_0x5d5348=_0x5d5348['replace'](/\/\* EXPORT ENTITY TYPES \*\//,'/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./'+_0x283ffe[_0xbdce41(0x10e)]+'/'+_0x283ffe['name']+'-history\x27')),_0x5d5348[_0xbdce41(0x152)](_0xbdce41(0x151)+_0x283ffe[_0xbdce41(0x10e)]+'/'+_0x283ffe[_0xbdce41(0x10e)]+'\x27')<0x0&&(_0x5d5348=_0x5d5348[_0xbdce41(0x130)](/\/\* EXPORT ENTITY TYPES \*\//,'/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./'+_0x283ffe[_0xbdce41(0x10e)]+'/'+_0x283ffe[_0xbdce41(0x10e)]+'\x27')),_0x5d5348[_0xbdce41(0x152)](_0xbdce41(0x16f)+_0x283ffe[_0xbdce41(0x160)]+_0xbdce41(0xfd)+_0x283ffe['pascalCaseName']+_0xbdce41(0x168)+_0x283ffe['pascalCaseName']+_0xbdce41(0x114)+_0x283ffe[_0xbdce41(0x10e)]+'\x27')<0x0&&(_0x5d5348=_0x5d5348['replace'](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0xbdce41(0x17b)+_0x283ffe[_0xbdce41(0x160)]+_0xbdce41(0xfd)+_0x283ffe[_0xbdce41(0x160)]+_0xbdce41(0x168)+_0x283ffe['pascalCaseName']+_0xbdce41(0x114)+_0x283ffe[_0xbdce41(0x10e)]+'\x27')),_0x5d5348['indexOf'](_0xbdce41(0x14c)+_0x283ffe['pascalCaseName']+_0xbdce41(0x129))<0x0&&(_0x5d5348=_0x5d5348[_0xbdce41(0x130)](/\/\* ENTITIES \*\//,_0xbdce41(0x10a)+_0x283ffe[_0xbdce41(0x160)]+_0xbdce41(0x129))),_0x5d5348[_0xbdce41(0x152)](_0xbdce41(0x14c)+_0x283ffe[_0xbdce41(0x160)]+'Resolvers,')<0x0&&(_0x5d5348=_0x5d5348[_0xbdce41(0x130)](/\/\* RESOLVER CLASSES \*\//,'/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...'+_0x283ffe['pascalCaseName']+_0xbdce41(0x11f))),_0x5d5348['indexOf'](_0xbdce41(0x14c)+_0x283ffe[_0xbdce41(0x160)]+_0xbdce41(0x131))<0x0&&(_0x5d5348=_0x5d5348[_0xbdce41(0x130)](/\/\* SUBSCRIBERS \*\//,_0xbdce41(0x15c)+_0x283ffe['pascalCaseName']+_0xbdce41(0x131))),await this['writeFile'](_0xb2766c,_0x5d5348,_0x283ffe);}async[a0_0x134395(0x18a)](_0x4109cb,_0x3d5a7a,_0x7bb817,_0x57da40,_0x14c967){const _0x2c07b6=a0_0x134395;await this[_0x2c07b6(0x12b)](_0x4109cb+(_0x3d5a7a+'/index.ts'),serviceIndex,_0x14c967),await this[_0x2c07b6(0x12b)](_0x4109cb+(_0x3d5a7a+'/'+_0x3d5a7a+_0x2c07b6(0x13c)),serviceQuery,_0x14c967),await this[_0x2c07b6(0x12b)](_0x4109cb+(_0x3d5a7a+'/'+_0x3d5a7a+_0x2c07b6(0x16b)),serviceMutation,_0x14c967);let _0x401ecf=this[_0x2c07b6(0x180)](_0x7bb817,_0x57da40);await this[_0x2c07b6(0x12b)](_0x4109cb+(_0x3d5a7a+'/'+_0x3d5a7a+'.ts'),_0x401ecf,_0x14c967);let _0x2b8c93=this[_0x2c07b6(0x138)](_0x57da40);await this[_0x2c07b6(0x12b)](_0x4109cb+(_0x3d5a7a+'/'+_0x3d5a7a+_0x2c07b6(0x145)),_0x2b8c93,_0x14c967);let _0x410ea4=_0x4109cb+_0x2c07b6(0x137);0x0==await this[_0x2c07b6(0x166)](_0x410ea4)&&await this['writeFile'](_0x410ea4,allIndex,_0x14c967);let _0x499bae=await fs[_0x2c07b6(0x174)](_0x410ea4,_0x2c07b6(0x17e));_0x499bae[_0x2c07b6(0x152)](_0x2c07b6(0x151)+_0x14c967[_0x2c07b6(0x10e)]+'/'+_0x14c967[_0x2c07b6(0x10e)]+'\x27')<0x0&&(_0x499bae=_0x499bae['replace'](/\/\* EXPORT ENTITY TYPES \*\//,_0x2c07b6(0x139)+_0x14c967['name']+'/'+_0x14c967[_0x2c07b6(0x10e)]+'\x27')),_0x499bae[_0x2c07b6(0x152)](_0x2c07b6(0x16f)+_0x14c967['pascalCaseName']+'Entities,\x20resolvers\x20as\x20'+_0x14c967['pascalCaseName']+'Resolvers\x20}\x20from\x20\x27./'+_0x14c967['name']+'\x27')<0x0&&(_0x499bae=_0x499bae['replace'](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,'/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20'+_0x14c967[_0x2c07b6(0x160)]+_0x2c07b6(0xfd)+_0x14c967[_0x2c07b6(0x160)]+_0x2c07b6(0x10f)+_0x14c967['name']+'\x27')),_0x499bae[_0x2c07b6(0x152)]('...'+_0x14c967['pascalCaseName']+_0x2c07b6(0x129))<0x0&&(_0x499bae=_0x499bae['replace'](/\/\* ENTITIES \*\//,_0x2c07b6(0x10a)+_0x14c967[_0x2c07b6(0x160)]+_0x2c07b6(0x129))),_0x499bae[_0x2c07b6(0x152)](_0x2c07b6(0x14c)+_0x14c967['pascalCaseName']+'Resolvers,')<0x0&&(_0x499bae=_0x499bae[_0x2c07b6(0x130)](/\/\* RESOLVER CLASSES \*\//,_0x2c07b6(0x177)+_0x14c967['pascalCaseName']+_0x2c07b6(0x11f))),await this['writeFile'](_0x410ea4,_0x499bae,_0x14c967);}['createTypeText'](_0x3dbe91){const _0x33fdd8=a0_0x134395;let _0x463596=sereviceType,_0x25999d=_0x3dbe91['map'](_0x33da6f=>{const _0x242c1c=a0_0x5dbd;if('id'==_0x33da6f[_0x242c1c(0x10e)])return'';if('domain_id'==_0x33da6f[_0x242c1c(0x10e)])return'';if(_0x242c1c(0x15a)==_0x33da6f[_0x242c1c(0x10e)])return'';if('updated_at'==_0x33da6f[_0x242c1c(0x10e)])return'';if(_0x242c1c(0x169)==_0x33da6f[_0x242c1c(0x10e)])return'';if(_0x242c1c(0x181)==_0x33da6f['name'])return'';let _0xe344ba=this[_0x242c1c(0x157)](_0x33da6f),_0x4efc69=this[_0x242c1c(0x188)](_0x33da6f),_0x25671f=camelCase(_0x33da6f[_0x242c1c(0x10e)]);return'\x20\x20'+(_0x242c1c(0x135)+(0x0==_0xe344ba[_0x242c1c(0x11c)]?'':_0x242c1c(0x147)+_0xe344ba+',')+_0x242c1c(0x16a)+_0x33da6f[_0x242c1c(0x18b)]+_0x242c1c(0x17a))+_0x242c1c(0x18d)+(''+_0x25671f+(_0x33da6f[_0x242c1c(0x18b)]?'?':'')+':\x20'+_0x4efc69)+'\x0a';});_0x463596=_0x463596['replace'](/{{newTypeColumns}}/g,_0x25999d[_0x33fdd8(0x120)]('\x0a'));let _0x2755c9=_0x3dbe91[_0x33fdd8(0x162)](_0x54ed60=>{const _0xac4ee1=_0x33fdd8;if('id'==_0x54ed60[_0xac4ee1(0x10e)])return'';if('domain_id'==_0x54ed60[_0xac4ee1(0x10e)])return'';if(_0xac4ee1(0x15a)==_0x54ed60[_0xac4ee1(0x10e)])return'';if(_0xac4ee1(0x153)==_0x54ed60['name'])return'';if(_0xac4ee1(0x169)==_0x54ed60[_0xac4ee1(0x10e)])return'';if(_0xac4ee1(0x181)==_0x54ed60['name'])return'';let _0x43549c=this[_0xac4ee1(0x157)](_0x54ed60),_0x2004c2=this[_0xac4ee1(0x188)](_0x54ed60);_0x54ed60[_0xac4ee1(0x18b)]=!0x0;let _0x4b0238=camelCase(_0x54ed60['name']);return'\x20\x20'+(_0xac4ee1(0x135)+(0x0==_0x43549c[_0xac4ee1(0x11c)]?'':_0xac4ee1(0x147)+_0x43549c+',')+_0xac4ee1(0x16a)+_0x54ed60[_0xac4ee1(0x18b)]+'\x20})')+_0xac4ee1(0x18d)+(''+_0x4b0238+(_0x54ed60[_0xac4ee1(0x18b)]?'?':'')+':\x20'+_0x2004c2)+'\x0a';});return _0x463596=_0x463596[_0x33fdd8(0x130)](/{{patchTypeColumns}}/g,_0x2755c9[_0x33fdd8(0x120)]('\x0a')),_0x463596;}['createEntityText'](_0x3821c3,_0x32c453){const _0x13a990=a0_0x134395;let _0x6af12d=serviceEntity,_0x136d29=_0x32c453['sort'](function(_0x3b623e,_0x2499f0){const _0x3f66da=a0_0x5dbd;return _0x3b623e['rank']-_0x2499f0[_0x3f66da(0x10d)];})['map'](_0x3dbbb0=>this[_0x13a990(0x10c)](_0x3dbbb0));[_0x13a990(0x158),'JSON'][_0x13a990(0x100)](_0x3821c3[_0x13a990(0x175)])&&_0x136d29[_0x13a990(0x191)]('\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201'),_0x6af12d=_0x6af12d[_0x13a990(0x130)](/{{entityColumns}}/g,_0x136d29[_0x13a990(0x120)]('\x0a'));let _0x4dcec8='',_0x5c99fc=_0x32c453['filter'](_0x2e96d9=>_0x2e96d9['uniqRank']&&_0x2e96d9['uniqRank']>0x0)['sort'](function(_0x48c76e,_0x6984d6){const _0x533393=_0x13a990;return _0x48c76e[_0x533393(0x155)]-_0x6984d6[_0x533393(0x155)];});if(_0x5c99fc['length']>0x0){_0x4dcec8=_0x13a990(0x140);let _0x1f0fff=_0x5c99fc[_0x13a990(0x162)](_0x20e1d7=>{const _0x313072=_0x13a990;let _0x2fdcf3=_0x20e1d7[_0x313072(0x10e)];return'domain_id'==_0x20e1d7['name']&&(_0x2fdcf3=_0x313072(0x184)),'creator_id'==_0x20e1d7[_0x313072(0x10e)]&&(_0x2fdcf3=_0x313072(0x144)),_0x313072(0x181)==_0x20e1d7[_0x313072(0x10e)]&&(_0x2fdcf3=_0x313072(0x122)),_0x313072(0x182)+camelCase(_0x2fdcf3);});_0x4dcec8=_0x4dcec8['replace'](/{{indexColumns}}/g,_0x1f0fff['join'](','));}return _0x6af12d=_0x6af12d[_0x13a990(0x130)](/{{indexAnn}}/g,_0x4dcec8),_0x6af12d;}['createHistoryEntityText'](_0x1dd780,_0xfe7d30){const _0x317d8f=a0_0x134395;let _0x144d66=_0x317d8f(0x18f)==_0x1dd780[_0x317d8f(0x175)]?serviceEntityHistJson:serviceEntityHistCopy,_0x1024b4=_0xfe7d30['sort'](function(_0x19e9eb,_0x4fa6dd){const _0x475829=_0x317d8f;return _0x19e9eb[_0x475829(0x10d)]-_0x4fa6dd['rank'];})[_0x317d8f(0x162)](_0x126300=>this[_0x317d8f(0x10c)](_0x126300));return _0x144d66=_0x144d66[_0x317d8f(0x130)](/{{entityColumns}}/g,_0x1024b4[_0x317d8f(0x120)]('\x0a')),_0x144d66;}[a0_0x134395(0x10c)](_0xd6880){const _0x3479c0=a0_0x134395;if('id'==_0xd6880[_0x3479c0(0x10e)])return'';if(_0x3479c0(0x13b)==_0xd6880[_0x3479c0(0x10e)])return'';if(_0x3479c0(0x15a)==_0xd6880[_0x3479c0(0x10e)])return'';if('updated_at'==_0xd6880['name'])return'';if(_0x3479c0(0x169)==_0xd6880['name'])return'';if(_0x3479c0(0x181)==_0xd6880[_0x3479c0(0x10e)])return'';let _0x3b7297=_0xd6880[_0x3479c0(0x186)];_0x3479c0(0x136)==_0xd6880['colType']&&(_0x3b7297=_0x3479c0(0x167)),'long'==_0xd6880[_0x3479c0(0x186)]&&(_0x3b7297=_0x3479c0(0x17d)),_0x3479c0(0x173)==_0xd6880[_0x3479c0(0x186)]&&(_0x3b7297=_0x3479c0(0xff)),_0x3479c0(0x117)==_0xd6880['colType']&&(_0x3b7297=_0x3479c0(0x119));let _0x2202d9='';_0x3479c0(0x173)==_0xd6880['colType']&&(_0x2202d9=_0xd6880[_0x3479c0(0x111)]);let _0x36e181=this[_0x3479c0(0x157)](_0xd6880),_0x1a726d=this[_0x3479c0(0x188)](_0xd6880),_0x5e78d6=camelCase(_0xd6880[_0x3479c0(0x10e)]);return'\x20\x20'+(_0x3479c0(0x12d)+_0xd6880['name']+'\x27,\x20type:\x20\x27'+_0x3b7297+_0x3479c0(0x134)+_0xd6880['nullable']+'\x20'+(0x0==_0x2202d9[_0x3479c0(0x11c)]?'':',length:'+_0x2202d9)+_0x3479c0(0x17a))+_0x3479c0(0x18d)+(_0x3479c0(0x135)+(0x0==_0x36e181[_0x3479c0(0x11c)]?'':_0x3479c0(0x147)+_0x36e181+',')+_0x3479c0(0x16a)+_0xd6880[_0x3479c0(0x18b)]+_0x3479c0(0x17a))+_0x3479c0(0x18d)+(''+_0x5e78d6+(_0xd6880['nullable']?'?':'')+':\x20'+_0x1a726d)+'\x0a';}['getFieldType'](_0x5d083a){const _0x59d123=a0_0x134395;let _0x2b6af2='';return _0x59d123(0x136)==_0x5d083a[_0x59d123(0x186)]&&(_0x2b6af2=_0x59d123(0x150)),'float'==_0x5d083a[_0x59d123(0x186)]&&(_0x2b6af2=_0x59d123(0x150)),'long'==_0x5d083a[_0x59d123(0x186)]&&(_0x2b6af2=_0x59d123(0x190)),_0x59d123(0x18e)==_0x5d083a['colType']&&(_0x2b6af2=_0x59d123(0x190)),_0x2b6af2;}[a0_0x134395(0x188)](_0x3cecc2){const _0x3b38d0=a0_0x134395;let _0x2b9385=_0x3cecc2[_0x3b38d0(0x186)];return _0x3b38d0(0x17f)==_0x3cecc2[_0x3b38d0(0x186)]&&(_0x2b9385=_0x3b38d0(0x172)),'double'==_0x3cecc2[_0x3b38d0(0x186)]&&(_0x2b9385=_0x3b38d0(0x172)),_0x3b38d0(0x141)==_0x3cecc2[_0x3b38d0(0x186)]&&(_0x2b9385='number'),_0x3b38d0(0x18e)==_0x3cecc2[_0x3b38d0(0x186)]&&(_0x2b9385=_0x3b38d0(0x172)),_0x3b38d0(0x176)==_0x3cecc2[_0x3b38d0(0x186)]&&(_0x2b9385='number'),_0x3b38d0(0x117)==_0x3cecc2[_0x3b38d0(0x186)]&&(_0x2b9385=_0x3b38d0(0x13e)),_0x3b38d0(0x14e)==_0x3cecc2[_0x3b38d0(0x186)]&&(_0x2b9385=_0x3b38d0(0x13e)),_0x3b38d0(0x132)==_0x3cecc2[_0x3b38d0(0x186)]&&(_0x2b9385=_0x3b38d0(0x173)),_0x2b9385;}async[a0_0x134395(0x12b)](_0x47045c,_0x24fd08,_0x13cc5f){const _0x27643b=a0_0x134395;await fs['writeFileSync'](_0x47045c,this['replaceNamesMap'](_0x24fd08,_0x13cc5f),_0x27643b(0x17e));}[a0_0x134395(0x128)](_0x3242ee,_0x57a09c){const _0x2be42b=a0_0x134395;return _0x3242ee[_0x2be42b(0x130)](/{{pascalCase name}}/g,_0x57a09c['pascalCaseName'])['replace'](/{{camelCase name}}/g,_0x57a09c[_0x2be42b(0x142)])[_0x2be42b(0x130)](/{{snakeCase name}}/g,_0x57a09c[_0x2be42b(0x118)])['replace'](/{{pluralPascalCase name}}/g,_0x57a09c['pluralPascalCaseName'])[_0x2be42b(0x130)](/{{pluralCamelCase name}}/g,_0x57a09c['pluralCamelCaseName'])[_0x2be42b(0x130)](/{{tableName}}/g,_0x57a09c[_0x2be42b(0x11a)])[_0x2be42b(0x130)](/{{name}}/g,_0x57a09c[_0x2be42b(0x10e)]);}async[a0_0x134395(0xfe)](_0x39c496,_0x4e6935,_0x25c02c){const _0x1649f9=a0_0x134395;let _0x2edc9e=_0x39c496+'/packages';await this[_0x1649f9(0x187)](_0x2edc9e),_0x2edc9e=_0x2edc9e+'/'+_0x4e6935,await this[_0x1649f9(0x187)](_0x2edc9e),_0x2edc9e+='/server',await this[_0x1649f9(0x187)](_0x2edc9e),_0x2edc9e+=_0x1649f9(0x179),await this[_0x1649f9(0x187)](_0x2edc9e),_0x2edc9e=_0x2edc9e+'/'+_0x25c02c,await this[_0x1649f9(0x187)](_0x2edc9e);}[a0_0x134395(0x11e)](){const _0x18fb7f=a0_0x134395;let _0x15bb65=process['env'][_0x18fb7f(0x185)][_0x18fb7f(0x115)]('/'),_0x396381=[];for(let _0x8b407a=0x0;_0x8b407a<_0x15bb65[_0x18fb7f(0x11c)]&&_0x18fb7f(0x11b)!=_0x15bb65[_0x8b407a];_0x8b407a++)_0x396381[_0x18fb7f(0x191)](_0x15bb65[_0x8b407a]);return _0x396381[_0x18fb7f(0x120)]('/');}async[a0_0x134395(0x187)](_0xec1fba){const _0x2c9200=a0_0x134395;0x0==await this[_0x2c9200(0x166)](_0xec1fba)&&fs[_0x2c9200(0x183)](_0xec1fba);}async['existsPath'](_0x1b3d5a){return await fs['existsSync'](_0x1b3d5a);}};tslib_1[a0_0x134395(0x101)]([(0x0,type_graphql_1[a0_0x134395(0x16e)])(_0x501f25=>Boolean,{'description':a0_0x134395(0x121)}),tslib_1['__param'](0x0,(0x0,type_graphql_1['Arg'])('id')),tslib_1[a0_0x134395(0x170)](0x1,(0x0,type_graphql_1[a0_0x134395(0x171)])()),tslib_1[a0_0x134395(0x105)]('design:type',Function),tslib_1[a0_0x134395(0x105)](a0_0x134395(0x15b),[String,Object]),tslib_1[a0_0x134395(0x105)](a0_0x134395(0x161),Promise)],OperatoToolCreateService[a0_0x134395(0x116)],a0_0x134395(0x164),null),OperatoToolCreateService=tslib_1[a0_0x134395(0x101)]([(0x0,type_graphql_1[a0_0x134395(0x146)])()],OperatoToolCreateService),exports[a0_0x134395(0x149)]=OperatoToolCreateService;const allIndex=a0_0x134395(0x17c),serviceIndex=a0_0x134395(0xfc),serviceHistoryIndex=a0_0x134395(0x126),serviceQuery=a0_0x134395(0x127),serviceHistoryQuery=a0_0x134395(0x165),serviceMutation=a0_0x134395(0x143),sereviceType=a0_0x134395(0x106),sereviceHistoryType=a0_0x134395(0x12a),serviceEntity=a0_0x134395(0x103),serviceEntityHistCopy=a0_0x134395(0x112),serviceEntityHistJson=a0_0x134395(0x113),serviceEntitySubscriber=a0_0x134395(0x192);function a0_0x2209(){const _0x499208=['Query','import\x20{\x20entities\x20as\x20','__param','Ctx','number','string','readFileSync','dataProp','long','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','type-graphql','/service','\x20})','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','\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','bigint','utf8','decimal','createEntityText','updater_id','{{camelCase\x20name}}.','mkdirSync','domain','PWD','colType','createDir','getColTxtType','-history\x27','createNoHistoryServiceFiels','nullable','/event-subscriber.ts','\x0a\x20\x20','integer','JSON','Int','push','\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','\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','Entities,\x20resolvers\x20as\x20','createServicePath','character\x20varying','includes','__decorate','/index.ts','\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','9066pcstol','__metadata','\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','/server/service/','getRepository','findOne','/*\x20ENTITIES\x20*/\x0a\x09...','createServiceFiles','columnToEntityColumn','rank','name','Resolvers\x20}\x20from\x20\x27./','1604292WRxMXV','colSize','\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','\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','EntitySubscribers\x20}\x20from\x20\x27./','split','prototype','datetime','snakeCaseName','timestamp\x20without\x20time\x20zone','tableName','packages','length','-history-query.ts','getProjectRootPath','Resolvers,','join','Operato\x20Tool\x20Create\x20Service','updater','@things-factory/shell','Entity','find','\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','\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','replaceNamesMap','Entities,','\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','writeFile','4270jNGnlL','@Column({name:\x27','-history-type.ts','EntityColumn','replace','EntitySubscribers,','text','94089ESvHZS','\x27,\x20nullable:\x20','@Field(','double','index.ts','createTypeText','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','4341010jCOWhF','domain_id','-query.ts','state','Date','1576DloLrg','@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})','float','camelCaseName','\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','creator','-type.ts','Resolver','type\x20=>','/packages/','OperatoToolCreateService','createHistoryServiceFiles','484gVykQo','...','66EOgaTw','date','@things-factory/resource-base','Float','export\x20*\x20from\x20\x27./','indexOf','updated_at','5448149ACiECJ','uniqRank','pluralize','getFieldType','COPY','.ts','created_at','design:paramtypes','/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...','22941XQWVyy','\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','lodash','pascalCaseName','design:returntype','map','__esModule','toolCreateService','\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','existsPath','double\x20precision','Resolvers,\x20subscribers\x20as\x20','creator_id','\x20{\x20nullable:\x20','-mutation.ts','defineProperty','31470pexSYI'];a0_0x2209=function(){return _0x499208;};return a0_0x2209();}
|
|
1
|
+
'use strict';const a0_0x20ebbe=a0_0x423a;function a0_0x423a(_0x37029a,_0x32f849){const _0x16a47b=a0_0x16a4();return a0_0x423a=function(_0x423a81,_0x296a15){_0x423a81=_0x423a81-0x111;let _0xdb1134=_0x16a47b[_0x423a81];return _0xdb1134;},a0_0x423a(_0x37029a,_0x32f849);}(function(_0x2ce2cd,_0x1c7831){const _0x3e30ce=a0_0x423a,_0x2007bd=_0x2ce2cd();while(!![]){try{const _0x11ab0e=parseInt(_0x3e30ce(0x129))/0x1*(-parseInt(_0x3e30ce(0x19e))/0x2)+-parseInt(_0x3e30ce(0x18f))/0x3*(-parseInt(_0x3e30ce(0x173))/0x4)+parseInt(_0x3e30ce(0x12d))/0x5+parseInt(_0x3e30ce(0x183))/0x6+-parseInt(_0x3e30ce(0x198))/0x7+-parseInt(_0x3e30ce(0x12c))/0x8+parseInt(_0x3e30ce(0x125))/0x9;if(_0x11ab0e===_0x1c7831)break;else _0x2007bd['push'](_0x2007bd['shift']());}catch(_0x284aab){_0x2007bd['push'](_0x2007bd['shift']());}}}(a0_0x16a4,0x816bf));Object[a0_0x20ebbe(0x138)](exports,a0_0x20ebbe(0x143),{'value':!0x0}),exports[a0_0x20ebbe(0x16d)]=void 0x0;const tslib_1=require(a0_0x20ebbe(0x172)),type_graphql_1=require('type-graphql'),shell_1=require('@things-factory/shell'),resource_base_1=require(a0_0x20ebbe(0x184)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x20ebbe(0x159)),{plural:plural}=require(a0_0x20ebbe(0x150)),fs=require('fs');let OperatoToolCreateService=class{async[a0_0x20ebbe(0x16a)](_0x4716ca,_0x24cf30){const _0x450c15=a0_0x20ebbe,{domain:_0x2f28a4}=_0x24cf30[_0x450c15(0x191)],_0x96089c=await(0x0,shell_1['getRepository'])(resource_base_1[_0x450c15(0x19a)])['findOne']({'where':{'id':_0x4716ca}}),_0x258c7a=await(0x0,shell_1[_0x450c15(0x145)])(resource_base_1['EntityColumn'])[_0x450c15(0x11a)]({'where':{'domain':{'id':_0x2f28a4['id']},'entity':{'id':_0x96089c['id']}}});let {name:_0x59f0f2='',bundle:_0x646842=''}=_0x96089c||{},_0x113596=this[_0x450c15(0x171)](),_0x1f033c=kebabCase(_0x59f0f2);return await this[_0x450c15(0x123)](_0x113596,_0x646842,_0x1f033c),await this[_0x450c15(0x165)](_0x113596,_0x646842,_0x59f0f2,_0x1f033c,_0x96089c,_0x258c7a),!0x0;}async[a0_0x20ebbe(0x165)](_0x3ea73f,_0x4f32c8,_0x1ddd40,_0x44a8a7,_0x53dd27,_0x3f1afc){const _0x3f2a84=a0_0x20ebbe;let _0x588ded={'name':_0x44a8a7,'tableName':_0x53dd27[_0x3f2a84(0x130)],'pascalCaseName':startCase(camelCase(_0x1ddd40))[_0x3f2a84(0x167)](/ /g,''),'camelCaseName':camelCase(_0x1ddd40),'snakeCaseName':snakeCase(_0x1ddd40),'pluralPascalCaseName':startCase(camelCase(plural(_0x1ddd40)))[_0x3f2a84(0x167)](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x1ddd40))},_0x516728=_0x3ea73f+'/packages/'+_0x4f32c8+_0x3f2a84(0x117);[_0x3f2a84(0x11c),_0x3f2a84(0x118)][_0x3f2a84(0x17d)](_0x53dd27[_0x3f2a84(0x161)])?await this[_0x3f2a84(0x14e)](_0x516728,_0x44a8a7,_0x53dd27,_0x3f1afc,_0x588ded):await this[_0x3f2a84(0x17e)](_0x516728,_0x44a8a7,_0x53dd27,_0x3f1afc,_0x588ded);}async[a0_0x20ebbe(0x14e)](_0x577528,_0x4ecf05,_0x2167e8,_0x6a2608,_0x4dea81){const _0x4c9993=a0_0x20ebbe;await this[_0x4c9993(0x192)](_0x577528+(_0x4ecf05+_0x4c9993(0x146)),serviceHistoryIndex,_0x4dea81);let _0x3c6581=this[_0x4c9993(0x148)](_0x2167e8,_0x6a2608);await this[_0x4c9993(0x192)](_0x577528+(_0x4ecf05+'/'+_0x4ecf05+'.ts'),_0x3c6581,_0x4dea81),await this[_0x4c9993(0x192)](_0x577528+(_0x4ecf05+'/'+_0x4ecf05+_0x4c9993(0x127)),serviceQuery,_0x4dea81),await this['writeFile'](_0x577528+(_0x4ecf05+'/'+_0x4ecf05+_0x4c9993(0x195)),serviceMutation,_0x4dea81);let _0xb54859=this[_0x4c9993(0x179)](_0x6a2608);await this[_0x4c9993(0x192)](_0x577528+(_0x4ecf05+'/'+_0x4ecf05+_0x4c9993(0x168)),_0xb54859,_0x4dea81);let _0x1fb3d9=this[_0x4c9993(0x18c)](_0x2167e8,_0x6a2608);await this[_0x4c9993(0x192)](_0x577528+(_0x4ecf05+'/'+_0x4ecf05+'-history.ts'),_0x1fb3d9,_0x4dea81);let _0x265329='';'JSON'==_0x2167e8[_0x4c9993(0x161)]?(_0x265329=_0x4c9993(0x12e),await this[_0x4c9993(0x192)](_0x577528+(_0x4ecf05+_0x4c9993(0x126)),serviceEntitySubscriber,_0x4dea81)):_0x265329='';let _0xe4ffc5=serviceEntitySubscriber['replace'](/{{entityToJson}}/g,_0x265329);await this[_0x4c9993(0x192)](_0x577528+(_0x4ecf05+'/event-subscriber.ts'),_0xe4ffc5,_0x4dea81),await this[_0x4c9993(0x192)](_0x577528+(_0x4ecf05+'/'+_0x4ecf05+_0x4c9993(0x139)),serviceHistoryQuery,_0x4dea81),await this[_0x4c9993(0x192)](_0x577528+(_0x4ecf05+'/'+_0x4ecf05+_0x4c9993(0x156)),sereviceHistoryType,_0x4dea81);let _0x28c5e5=_0x577528+_0x4c9993(0x112);0x0==await this[_0x4c9993(0x141)](_0x28c5e5)&&await this[_0x4c9993(0x192)](_0x28c5e5,allIndex,_0x4dea81);let _0x48bfa5=await fs['readFileSync'](_0x28c5e5,_0x4c9993(0x188));_0x48bfa5[_0x4c9993(0x199)](_0x4c9993(0x194)+_0x4dea81[_0x4c9993(0x12a)]+'/'+_0x4dea81[_0x4c9993(0x12a)]+_0x4c9993(0x16f))<0x0&&(_0x48bfa5=_0x48bfa5['replace'](/\/\* EXPORT ENTITY TYPES \*\//,_0x4c9993(0x14a)+_0x4dea81['name']+'/'+_0x4dea81['name']+'-history\x27')),_0x48bfa5[_0x4c9993(0x199)]('export\x20*\x20from\x20\x27./'+_0x4dea81[_0x4c9993(0x12a)]+'/'+_0x4dea81[_0x4c9993(0x12a)]+'\x27')<0x0&&(_0x48bfa5=_0x48bfa5[_0x4c9993(0x167)](/\/\* EXPORT ENTITY TYPES \*\//,'/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./'+_0x4dea81[_0x4c9993(0x12a)]+'/'+_0x4dea81[_0x4c9993(0x12a)]+'\x27')),_0x48bfa5[_0x4c9993(0x199)]('import\x20{\x20entities\x20as\x20'+_0x4dea81[_0x4c9993(0x140)]+_0x4c9993(0x158)+_0x4dea81['pascalCaseName']+_0x4c9993(0x174)+_0x4dea81[_0x4c9993(0x140)]+_0x4c9993(0x182)+_0x4dea81[_0x4c9993(0x12a)]+'\x27')<0x0&&(_0x48bfa5=_0x48bfa5[_0x4c9993(0x167)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x4c9993(0x11e)+_0x4dea81[_0x4c9993(0x140)]+_0x4c9993(0x158)+_0x4dea81['pascalCaseName']+_0x4c9993(0x174)+_0x4dea81[_0x4c9993(0x140)]+_0x4c9993(0x182)+_0x4dea81[_0x4c9993(0x12a)]+'\x27')),_0x48bfa5[_0x4c9993(0x199)](_0x4c9993(0x176)+_0x4dea81[_0x4c9993(0x140)]+_0x4c9993(0x15a))<0x0&&(_0x48bfa5=_0x48bfa5[_0x4c9993(0x167)](/\/\* ENTITIES \*\//,_0x4c9993(0x19f)+_0x4dea81[_0x4c9993(0x140)]+'Entities,')),_0x48bfa5[_0x4c9993(0x199)](_0x4c9993(0x176)+_0x4dea81[_0x4c9993(0x140)]+'Resolvers,')<0x0&&(_0x48bfa5=_0x48bfa5[_0x4c9993(0x167)](/\/\* RESOLVER CLASSES \*\//,_0x4c9993(0x132)+_0x4dea81[_0x4c9993(0x140)]+_0x4c9993(0x16b))),_0x48bfa5[_0x4c9993(0x199)](_0x4c9993(0x176)+_0x4dea81[_0x4c9993(0x140)]+_0x4c9993(0x13c))<0x0&&(_0x48bfa5=_0x48bfa5[_0x4c9993(0x167)](/\/\* SUBSCRIBERS \*\//,_0x4c9993(0x111)+_0x4dea81[_0x4c9993(0x140)]+'EntitySubscribers,')),await this[_0x4c9993(0x192)](_0x28c5e5,_0x48bfa5,_0x4dea81);}async[a0_0x20ebbe(0x17e)](_0x16de5e,_0x32376f,_0x3ab6ab,_0x1202b1,_0x491f43){const _0x13374f=a0_0x20ebbe;await this['writeFile'](_0x16de5e+(_0x32376f+_0x13374f(0x146)),serviceIndex,_0x491f43),await this[_0x13374f(0x192)](_0x16de5e+(_0x32376f+'/'+_0x32376f+_0x13374f(0x127)),serviceQuery,_0x491f43),await this[_0x13374f(0x192)](_0x16de5e+(_0x32376f+'/'+_0x32376f+_0x13374f(0x195)),serviceMutation,_0x491f43);let _0xd6983a=this['createEntityText'](_0x3ab6ab,_0x1202b1);await this['writeFile'](_0x16de5e+(_0x32376f+'/'+_0x32376f+'.ts'),_0xd6983a,_0x491f43);let _0x3696a1=this[_0x13374f(0x179)](_0x1202b1);await this['writeFile'](_0x16de5e+(_0x32376f+'/'+_0x32376f+_0x13374f(0x168)),_0x3696a1,_0x491f43);let _0x675e00=_0x16de5e+_0x13374f(0x112);0x0==await this[_0x13374f(0x141)](_0x675e00)&&await this[_0x13374f(0x192)](_0x675e00,allIndex,_0x491f43);let _0x4fa5b2=await fs[_0x13374f(0x124)](_0x675e00,_0x13374f(0x188));_0x4fa5b2[_0x13374f(0x199)](_0x13374f(0x194)+_0x491f43[_0x13374f(0x12a)]+'/'+_0x491f43[_0x13374f(0x12a)]+'\x27')<0x0&&(_0x4fa5b2=_0x4fa5b2['replace'](/\/\* EXPORT ENTITY TYPES \*\//,'/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./'+_0x491f43[_0x13374f(0x12a)]+'/'+_0x491f43[_0x13374f(0x12a)]+'\x27')),_0x4fa5b2[_0x13374f(0x199)](_0x13374f(0x193)+_0x491f43[_0x13374f(0x140)]+_0x13374f(0x158)+_0x491f43[_0x13374f(0x140)]+_0x13374f(0x16e)+_0x491f43[_0x13374f(0x12a)]+'\x27')<0x0&&(_0x4fa5b2=_0x4fa5b2['replace'](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,'/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20'+_0x491f43['pascalCaseName']+_0x13374f(0x158)+_0x491f43[_0x13374f(0x140)]+'Resolvers\x20}\x20from\x20\x27./'+_0x491f43['name']+'\x27')),_0x4fa5b2['indexOf'](_0x13374f(0x176)+_0x491f43[_0x13374f(0x140)]+_0x13374f(0x15a))<0x0&&(_0x4fa5b2=_0x4fa5b2[_0x13374f(0x167)](/\/\* ENTITIES \*\//,_0x13374f(0x19f)+_0x491f43[_0x13374f(0x140)]+_0x13374f(0x15a))),_0x4fa5b2[_0x13374f(0x199)](_0x13374f(0x176)+_0x491f43[_0x13374f(0x140)]+_0x13374f(0x16b))<0x0&&(_0x4fa5b2=_0x4fa5b2['replace'](/\/\* RESOLVER CLASSES \*\//,'/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...'+_0x491f43['pascalCaseName']+_0x13374f(0x16b))),await this[_0x13374f(0x192)](_0x675e00,_0x4fa5b2,_0x491f43);}[a0_0x20ebbe(0x179)](_0x2609b9){const _0x35b7bd=a0_0x20ebbe;let _0x584c19=sereviceType,_0x25256d=_0x2609b9[_0x35b7bd(0x17f)](_0x348dc1=>{const _0x5e0a9c=_0x35b7bd;if('id'==_0x348dc1[_0x5e0a9c(0x12a)])return'';if(_0x5e0a9c(0x163)==_0x348dc1['name'])return'';if(_0x5e0a9c(0x13d)==_0x348dc1[_0x5e0a9c(0x12a)])return'';if('updated_at'==_0x348dc1[_0x5e0a9c(0x12a)])return'';if(_0x5e0a9c(0x12f)==_0x348dc1['name'])return'';if(_0x5e0a9c(0x155)==_0x348dc1[_0x5e0a9c(0x12a)])return'';let _0x18810d=this['getFieldType'](_0x348dc1),_0x3303f0=this['getColTxtType'](_0x348dc1),_0x3effe8=camelCase(_0x348dc1[_0x5e0a9c(0x12a)]);return'\x20\x20'+(_0x5e0a9c(0x15d)+(0x0==_0x18810d['length']?'':_0x5e0a9c(0x160)+_0x18810d+',')+_0x5e0a9c(0x166)+_0x348dc1['nullable']+_0x5e0a9c(0x18e))+'\x0a\x20\x20'+(''+_0x3effe8+(_0x348dc1[_0x5e0a9c(0x1a0)]?'?':'')+':\x20'+_0x3303f0)+'\x0a';});_0x584c19=_0x584c19[_0x35b7bd(0x167)](/{{newTypeColumns}}/g,_0x25256d['join']('\x0a'));let _0x55ccea=_0x2609b9['map'](_0x4efc31=>{const _0x1864a2=_0x35b7bd;if('id'==_0x4efc31[_0x1864a2(0x12a)])return'';if('domain_id'==_0x4efc31[_0x1864a2(0x12a)])return'';if(_0x1864a2(0x13d)==_0x4efc31[_0x1864a2(0x12a)])return'';if(_0x1864a2(0x154)==_0x4efc31[_0x1864a2(0x12a)])return'';if(_0x1864a2(0x12f)==_0x4efc31['name'])return'';if('updater_id'==_0x4efc31['name'])return'';let _0x1b5176=this[_0x1864a2(0x15b)](_0x4efc31),_0x559bd2=this[_0x1864a2(0x11d)](_0x4efc31);_0x4efc31[_0x1864a2(0x1a0)]=!0x0;let _0x2ab914=camelCase(_0x4efc31[_0x1864a2(0x12a)]);return'\x20\x20'+(_0x1864a2(0x15d)+(0x0==_0x1b5176[_0x1864a2(0x144)]?'':_0x1864a2(0x160)+_0x1b5176+',')+_0x1864a2(0x166)+_0x4efc31[_0x1864a2(0x1a0)]+_0x1864a2(0x18e))+_0x1864a2(0x151)+(''+_0x2ab914+(_0x4efc31[_0x1864a2(0x1a0)]?'?':'')+':\x20'+_0x559bd2)+'\x0a';});return _0x584c19=_0x584c19[_0x35b7bd(0x167)](/{{patchTypeColumns}}/g,_0x55ccea['join']('\x0a')),_0x584c19;}[a0_0x20ebbe(0x148)](_0x5e130a,_0x161f8e){const _0x35fbb9=a0_0x20ebbe;let _0x1c1d6e=serviceEntity,_0x3f3731=_0x161f8e[_0x35fbb9(0x133)](function(_0x4ccc05,_0x201125){const _0x9dc22f=_0x35fbb9;return _0x4ccc05[_0x9dc22f(0x152)]-_0x201125[_0x9dc22f(0x152)];})[_0x35fbb9(0x17f)](_0xe9739e=>this[_0x35fbb9(0x149)](_0xe9739e));[_0x35fbb9(0x118),_0x35fbb9(0x11c)][_0x35fbb9(0x17d)](_0x5e130a[_0x35fbb9(0x161)])&&_0x3f3731[_0x35fbb9(0x17a)](_0x35fbb9(0x157)),_0x1c1d6e=_0x1c1d6e[_0x35fbb9(0x167)](/{{entityColumns}}/g,_0x3f3731['join']('\x0a'));let _0x23105e='',_0x2a0155=_0x161f8e[_0x35fbb9(0x142)](_0x3130b5=>_0x3130b5['uniqRank']&&_0x3130b5['uniqRank']>0x0)[_0x35fbb9(0x133)](function(_0x3d3810,_0x220cf5){const _0x609551=_0x35fbb9;return _0x3d3810[_0x609551(0x120)]-_0x220cf5[_0x609551(0x120)];});if(_0x2a0155['length']>0x0){_0x23105e=_0x35fbb9(0x13a);let _0x30a2ce=_0x2a0155[_0x35fbb9(0x17f)](_0x10018a=>{const _0x57597e=_0x35fbb9;let _0x248cd8=_0x10018a[_0x57597e(0x12a)];return _0x57597e(0x163)==_0x10018a[_0x57597e(0x12a)]&&(_0x248cd8=_0x57597e(0x175)),_0x57597e(0x12f)==_0x10018a[_0x57597e(0x12a)]&&(_0x248cd8=_0x57597e(0x128)),_0x57597e(0x155)==_0x10018a[_0x57597e(0x12a)]&&(_0x248cd8=_0x57597e(0x147)),'{{camelCase\x20name}}.'+camelCase(_0x248cd8);});_0x23105e=_0x23105e[_0x35fbb9(0x167)](/{{indexColumns}}/g,_0x30a2ce['join'](','));}return _0x1c1d6e=_0x1c1d6e['replace'](/{{indexAnn}}/g,_0x23105e),_0x1c1d6e;}['createHistoryEntityText'](_0x37dd35,_0x445f35){const _0x21c4cb=a0_0x20ebbe;let _0x47d6fe=_0x21c4cb(0x11c)==_0x37dd35[_0x21c4cb(0x161)]?serviceEntityHistJson:serviceEntityHistCopy,_0x5a6fa4=_0x445f35[_0x21c4cb(0x133)](function(_0x464197,_0x685cec){const _0x1bbbf7=_0x21c4cb;return _0x464197[_0x1bbbf7(0x152)]-_0x685cec[_0x1bbbf7(0x152)];})[_0x21c4cb(0x17f)](_0x3bab59=>this[_0x21c4cb(0x149)](_0x3bab59));return _0x47d6fe=_0x47d6fe['replace'](/{{entityColumns}}/g,_0x5a6fa4[_0x21c4cb(0x11b)]('\x0a')),_0x47d6fe;}[a0_0x20ebbe(0x149)](_0x1e70d1){const _0x1c98a4=a0_0x20ebbe;if('id'==_0x1e70d1[_0x1c98a4(0x12a)])return'';if(_0x1c98a4(0x163)==_0x1e70d1['name'])return'';if(_0x1c98a4(0x13d)==_0x1e70d1[_0x1c98a4(0x12a)])return'';if('updated_at'==_0x1e70d1[_0x1c98a4(0x12a)])return'';if(_0x1c98a4(0x12f)==_0x1e70d1[_0x1c98a4(0x12a)])return'';if('updater_id'==_0x1e70d1[_0x1c98a4(0x12a)])return'';let _0x1cbc58=_0x1e70d1[_0x1c98a4(0x134)];_0x1c98a4(0x197)==_0x1e70d1[_0x1c98a4(0x134)]&&(_0x1cbc58=_0x1c98a4(0x119)),'long'==_0x1e70d1[_0x1c98a4(0x134)]&&(_0x1cbc58=_0x1c98a4(0x19d)),_0x1c98a4(0x14c)==_0x1e70d1[_0x1c98a4(0x134)]&&(_0x1cbc58=_0x1c98a4(0x170)),_0x1c98a4(0x178)==_0x1e70d1[_0x1c98a4(0x134)]&&(_0x1cbc58=_0x1c98a4(0x190));let _0x334580='';_0x1c98a4(0x14c)==_0x1e70d1[_0x1c98a4(0x134)]&&(_0x334580=_0x1e70d1[_0x1c98a4(0x114)]);let _0x436149=this['getFieldType'](_0x1e70d1),_0x359509=this['getColTxtType'](_0x1e70d1),_0x24d6a1=camelCase(_0x1e70d1['name']);return'\x20\x20'+(_0x1c98a4(0x122)+_0x1e70d1[_0x1c98a4(0x12a)]+_0x1c98a4(0x153)+_0x1cbc58+_0x1c98a4(0x11f)+_0x1e70d1[_0x1c98a4(0x1a0)]+'\x20'+(0x0==_0x334580[_0x1c98a4(0x144)]?'':',length:'+_0x334580)+_0x1c98a4(0x18e))+_0x1c98a4(0x151)+(_0x1c98a4(0x15d)+(0x0==_0x436149['length']?'':_0x1c98a4(0x160)+_0x436149+',')+'\x20{\x20nullable:\x20'+_0x1e70d1[_0x1c98a4(0x1a0)]+_0x1c98a4(0x18e))+_0x1c98a4(0x151)+(''+_0x24d6a1+(_0x1e70d1[_0x1c98a4(0x1a0)]?'?':'')+':\x20'+_0x359509)+'\x0a';}['getFieldType'](_0x5c9119){const _0x134994=a0_0x20ebbe;let _0x2a28b5='';return'double'==_0x5c9119['colType']&&(_0x2a28b5='Float'),'float'==_0x5c9119[_0x134994(0x134)]&&(_0x2a28b5=_0x134994(0x180)),'long'==_0x5c9119['colType']&&(_0x2a28b5=_0x134994(0x18b)),'integer'==_0x5c9119['colType']&&(_0x2a28b5=_0x134994(0x18b)),_0x2a28b5;}[a0_0x20ebbe(0x11d)](_0xb80c06){const _0x10406c=a0_0x20ebbe;let _0x1357d3=_0xb80c06[_0x10406c(0x134)];return'decimal'==_0xb80c06[_0x10406c(0x134)]&&(_0x1357d3=_0x10406c(0x177)),_0x10406c(0x197)==_0xb80c06[_0x10406c(0x134)]&&(_0x1357d3='number'),'float'==_0xb80c06['colType']&&(_0x1357d3=_0x10406c(0x177)),_0x10406c(0x16c)==_0xb80c06[_0x10406c(0x134)]&&(_0x1357d3=_0x10406c(0x177)),_0x10406c(0x13e)==_0xb80c06[_0x10406c(0x134)]&&(_0x1357d3=_0x10406c(0x177)),_0x10406c(0x178)==_0xb80c06[_0x10406c(0x134)]&&(_0x1357d3=_0x10406c(0x12b)),'date'==_0xb80c06['colType']&&(_0x1357d3=_0x10406c(0x12b)),'text'==_0xb80c06[_0x10406c(0x134)]&&(_0x1357d3=_0x10406c(0x14c)),_0x1357d3;}async[a0_0x20ebbe(0x192)](_0x49ba26,_0x372f79,_0x2845a2){const _0x4e4ca4=a0_0x20ebbe;await fs[_0x4e4ca4(0x19c)](_0x49ba26,this['replaceNamesMap'](_0x372f79,_0x2845a2),_0x4e4ca4(0x188));}[a0_0x20ebbe(0x19b)](_0x1f4f57,_0x6996bd){const _0x1a080f=a0_0x20ebbe;return _0x1f4f57['replace'](/{{pascalCase name}}/g,_0x6996bd['pascalCaseName'])[_0x1a080f(0x167)](/{{camelCase name}}/g,_0x6996bd['camelCaseName'])[_0x1a080f(0x167)](/{{snakeCase name}}/g,_0x6996bd[_0x1a080f(0x17c)])[_0x1a080f(0x167)](/{{pluralPascalCase name}}/g,_0x6996bd['pluralPascalCaseName'])[_0x1a080f(0x167)](/{{pluralCamelCase name}}/g,_0x6996bd['pluralCamelCaseName'])[_0x1a080f(0x167)](/{{tableName}}/g,_0x6996bd[_0x1a080f(0x130)])[_0x1a080f(0x167)](/{{name}}/g,_0x6996bd[_0x1a080f(0x12a)]);}async[a0_0x20ebbe(0x123)](_0xc3d518,_0x28c5f2,_0x2db718){const _0x189165=a0_0x20ebbe;let _0x71ad2f=_0xc3d518+_0x189165(0x137);await this[_0x189165(0x15e)](_0x71ad2f),_0x71ad2f=_0x71ad2f+'/'+_0x28c5f2,await this[_0x189165(0x15e)](_0x71ad2f),_0x71ad2f+='/server',await this[_0x189165(0x15e)](_0x71ad2f),_0x71ad2f+=_0x189165(0x185),await this[_0x189165(0x15e)](_0x71ad2f),_0x71ad2f=_0x71ad2f+'/'+_0x2db718,await this[_0x189165(0x15e)](_0x71ad2f);}[a0_0x20ebbe(0x171)](){const _0x236efb=a0_0x20ebbe;let _0x12d2da=process[_0x236efb(0x14d)][_0x236efb(0x186)][_0x236efb(0x113)]('/'),_0x2ed37a=[];for(let _0x30ceab=0x0;_0x30ceab<_0x12d2da[_0x236efb(0x144)]&&_0x236efb(0x14b)!=_0x12d2da[_0x30ceab];_0x30ceab++)_0x2ed37a[_0x236efb(0x17a)](_0x12d2da[_0x30ceab]);return _0x2ed37a[_0x236efb(0x11b)]('/');}async[a0_0x20ebbe(0x15e)](_0x2f12ab){const _0x3c6e31=a0_0x20ebbe;0x0==await this[_0x3c6e31(0x141)](_0x2f12ab)&&fs['mkdirSync'](_0x2f12ab);}async[a0_0x20ebbe(0x141)](_0x19fd00){const _0x387381=a0_0x20ebbe;return await fs[_0x387381(0x13f)](_0x19fd00);}};function a0_0x16a4(){const _0x2729af=['EntitySubscribers,','created_at','long','existsSync','pascalCaseName','existsPath','filter','__esModule','length','getRepository','/index.ts','updater','createEntityText','columnToEntityColumn','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','packages','string','env','createHistoryServiceFiles','\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','pluralize','\x0a\x20\x20','rank','\x27,\x20type:\x20\x27','updated_at','updater_id','-history-type.ts','\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201','Entities,\x20resolvers\x20as\x20','lodash','Entities,','getFieldType','\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','@Field(','createDir','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\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','type\x20=>','dataProp','__metadata','domain_id','__decorate','createServiceFiles','\x20{\x20nullable:\x20','replace','-type.ts','\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','toolCreateService','Resolvers,','integer','OperatoToolCreateService','Resolvers\x20}\x20from\x20\x27./','-history\x27','character\x20varying','getProjectRootPath','tslib','1298180ajmAYk','Resolvers,\x20subscribers\x20as\x20','domain','...','number','datetime','createTypeText','push','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\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','snakeCaseName','includes','createNoHistoryServiceFiels','map','Float','\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','EntitySubscribers\x20}\x20from\x20\x27./','3818652wJomBY','@things-factory/resource-base','/service','PWD','\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','utf8','__param','design:type','Int','createHistoryEntityText','Query','\x20})','3lJZlTa','timestamp\x20without\x20time\x20zone','state','writeFile','import\x20{\x20entities\x20as\x20','export\x20*\x20from\x20\x27./','-mutation.ts','Arg','double','913780DzmyNE','indexOf','Entity','replaceNamesMap','writeFileSync','bigint','2nKckab','/*\x20ENTITIES\x20*/\x0a\x09...','nullable','design:paramtypes','/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...','index.ts','split','colSize','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20Domain\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0a@Entity(\x27{{tableName}}\x27)\x0a{{indexAnn}}\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}\x20{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','\x0aimport\x20{\x20Resolver,\x20Mutation,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20In\x20}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20New{{pascalCase\x20name}},\x20{{pascalCase\x20name}}Patch\x20}\x20from\x20\x27./{{name}}-type\x27\x0aimport\x20{\x20getRepository\x20}\x20from\x20\x27@things-factory/shell\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Mutation\x20{\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20create\x20new\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20create{{pascalCase\x20name}}(@Arg(\x27{{camelCase\x20name}}\x27)\x20{{camelCase\x20name}}:\x20New{{pascalCase\x20name}},\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20return\x20await\x20tx.getRepository({{pascalCase\x20name}}).save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20modify\x20{{pascalCase\x20name}}\x20information\x27\x20})\x0a\x20\x20async\x20update{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27id\x27)\x20id:\x20string,\x0a\x20\x20\x20\x20@Arg(\x27patch\x27)\x20patch:\x20{{pascalCase\x20name}}Patch,\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20repository\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20repository.findOne(\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20)\x0a\x0a\x20\x20\x20\x20return\x20await\x20repository.save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20...patch,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20[{{pascalCase\x20name}}],\x20{\x20description:\x20\x22To\x20modify\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20information\x22\x20})\x0a\x20\x20async\x20updateMultiple{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27patches\x27,\x20type\x20=>\x20[{{pascalCase\x20name}}Patch])\x20patches:\x20{{pascalCase\x20name}}Patch[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}[]>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20results\x20=\x20[]\x0a\x20\x20\x20\x20const\x20_createRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27+\x27)\x0a\x20\x20\x20\x20const\x20_updateRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27M\x27)\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}Repo\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x0a\x20\x20\x20\x20if\x20(_createRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_createRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20newRecord\x20=\x20_createRecords[i]\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...newRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27+\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20if\x20(_updateRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_updateRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20updRecord\x20=\x20_updateRecords[i]\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20{{camelCase\x20name}}Repo.findOne({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id:updRecord.id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...updRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27M\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20return\x20results\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20delete{{pascalCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove({\x20domain,\x20id,\x20updater:user\x20})\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20multiple\x20{{camelCase\x20name}}s\x27\x20})\x0a\x20\x20async\x20delete{{pluralPascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27ids\x27,\x20type\x20=>\x20[String])\x20ids:\x20string[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20delEntitis\x20=\x20ids.map(id=>{\x0a\x20\x20\x20\x20\x20\x20return\x20{domain,id,updater:user}\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove(delEntitis)\x0a\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a}\x0a','/server/service/','COPY','double\x20precision','find','join','JSON','getColTxtType','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','\x27,\x20nullable:\x20','uniqRank','\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','@Column({name:\x27','createServicePath','readFileSync','6700725MAXlJS','/event-subscriber.ts','-query.ts','creator','1026407qJKDSQ','name','Date','5004464lSWYkE','3035520DofLYp','\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','creator_id','tableName','Operato\x20Tool\x20Create\x20Service','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','sort','colType','\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','Ctx','/packages','defineProperty','-history-query.ts','@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})','\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryList\x20}\x20from\x20\x27./{{name}}-history-type\x27\x0a\x0a@Resolver({{pascalCase\x20name}}History)\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryQuery\x20{\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}History,\x20{\x20description:\x20\x27To\x20fetch\x20a\x20{{pascalCase\x20name}}History\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}History(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}History>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20return\x20await\x20getRepository({{pascalCase\x20name}}History).findOne({\x0a\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20}\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}HistoryList,\x20{\x20description:\x20\x27To\x20fetch\x20multiple\x20{{pluralPascalCase\x20name}}History\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}Histories(@Args()\x20params:\x20ListParam,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}HistoryList>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20queryBuilder\x20=\x20getQueryBuilderFromListParams({\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20params,\x0a\x20\x20\x20\x20\x20\x20repository:\x20await\x20getRepository({{pascalCase\x20name}}History)\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20const\x20[items,\x20total]\x20=\x20await\x20queryBuilder.getManyAndCount()\x0a\x0a\x20\x20\x20\x20return\x20{\x20items,\x20total\x20}\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20Domain)\x0a\x20\x20async\x20domain(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<Domain>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(Domain).findOneBy({id:{{camelCase\x20name}}History.domainId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20updater(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}History.updaterId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20creator(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}History.creatorId})\x0a\x20\x20}\x0a}\x0a'];a0_0x16a4=function(){return _0x2729af;};return a0_0x16a4();}tslib_1[a0_0x20ebbe(0x164)]([(0x0,type_graphql_1[a0_0x20ebbe(0x18d)])(_0x409a57=>Boolean,{'description':a0_0x20ebbe(0x131)}),tslib_1[a0_0x20ebbe(0x189)](0x0,(0x0,type_graphql_1[a0_0x20ebbe(0x196)])('id')),tslib_1[a0_0x20ebbe(0x189)](0x1,(0x0,type_graphql_1[a0_0x20ebbe(0x136)])()),tslib_1[a0_0x20ebbe(0x162)](a0_0x20ebbe(0x18a),Function),tslib_1[a0_0x20ebbe(0x162)](a0_0x20ebbe(0x1a1),[String,Object]),tslib_1[a0_0x20ebbe(0x162)]('design:returntype',Promise)],OperatoToolCreateService['prototype'],'toolCreateService',null),OperatoToolCreateService=tslib_1[a0_0x20ebbe(0x164)]([(0x0,type_graphql_1['Resolver'])()],OperatoToolCreateService),exports[a0_0x20ebbe(0x16d)]=OperatoToolCreateService;const allIndex=a0_0x20ebbe(0x169),serviceIndex=a0_0x20ebbe(0x14f),serviceHistoryIndex=a0_0x20ebbe(0x187),serviceQuery=a0_0x20ebbe(0x15c),serviceHistoryQuery=a0_0x20ebbe(0x13b),serviceMutation=a0_0x20ebbe(0x116),sereviceType=a0_0x20ebbe(0x135),sereviceHistoryType=a0_0x20ebbe(0x121),serviceEntity=a0_0x20ebbe(0x115),serviceEntityHistCopy=a0_0x20ebbe(0x17b),serviceEntityHistJson=a0_0x20ebbe(0x15f),serviceEntitySubscriber=a0_0x20ebbe(0x181);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x43e15a=a0_0x5add;(function(_0x373797,_0x6ed304){const _0x3445e=a0_0x5add,_0x3edcda=_0x373797();while(!![]){try{const _0x489e3d=parseInt(_0x3445e(0x188))/0x1*(-parseInt(_0x3445e(0x18b))/0x2)+-parseInt(_0x3445e(0x17f))/0x3+parseInt(_0x3445e(0x17d))/0x4+-parseInt(_0x3445e(0x184))/0x5+parseInt(_0x3445e(0x17b))/0x6*(parseInt(_0x3445e(0x192))/0x7)+parseInt(_0x3445e(0x18d))/0x8+parseInt(_0x3445e(0x181))/0x9*(-parseInt(_0x3445e(0x193))/0xa);if(_0x489e3d===_0x6ed304)break;else _0x3edcda['push'](_0x3edcda['shift']());}catch(_0x203952){_0x3edcda['push'](_0x3edcda['shift']());}}}(a0_0x2c2f,0x5e4ef));Object['defineProperty'](exports,a0_0x43e15a(0x189),{'value':!0x0}),exports[a0_0x43e15a(0x18f)]=exports[a0_0x43e15a(0x191)]=void 0x0;const operato_license_checker_1=require(a0_0x43e15a(0x17e)),shell_1=require(a0_0x43e15a(0x183)),menu_base_1=require(a0_0x43e15a(0x186)),license_error_1=require(a0_0x43e15a(0x195));function a0_0x2c2f(){const _0xa3643a=['menu','checkStudioPermission','642271DKkiOj','340PNYsCo','manager','../../errors/license-error','OVER_LIMIT','where','getCount','includes','forEach','Menu','(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)','select','12MQlttf','Permissions\x20For\x20Tailor\x20Tool','1241940tceVeB','@things-factory/operato-license-checker','562845cdMjvW','LicenseError','3555LzIuUI','ERROR_CODES','@things-factory/shell','1473725ARlfrd','map','@things-factory/menu-base','from','2TNBqLd','__esModule','trim','247990sYkaUr','createQueryBuilder','5088608BOERus','split','checkStudioTemplateIsOverLimit'];a0_0x2c2f=function(){return _0xa3643a;};return a0_0x2c2f();}async function checkStudioPermission(){const _0x14360d=a0_0x43e15a;let _0x3d2f7f=((0x0,operato_license_checker_1['getPermission'])(_0x14360d(0x17c))||',')[_0x14360d(0x18e)](',')[_0x14360d(0x185)](_0x2cbebb=>_0x2cbebb[_0x14360d(0x18a)]()),_0x1feee9=!0x1;return _0x3d2f7f[_0x14360d(0x177)](_0x3d6847=>{const _0x127f01=_0x14360d;_0x3d6847[_0x127f01(0x176)]('Studio')&&(_0x1feee9=!0x0);}),_0x1feee9;}async function checkStudioTemplateIsOverLimit(_0x5bfc60,_0x448287){const _0x26e06b=a0_0x43e15a;if(0x0==await checkStudioPermission())throw new license_error_1[(_0x26e06b(0x180))]({'errorCode':_0x448287['t'](license_error_1[_0x26e06b(0x180)]['ERROR_CODES']['INVALID_LICENSE'])});var _0x1fc6f3=0x0;if(_0x1fc6f3=_0x5bfc60&&''!=_0x5bfc60?await(0x0,shell_1['getRepository'])(menu_base_1[_0x26e06b(0x178)])[_0x26e06b(0x194)][_0x26e06b(0x18c)]()[_0x26e06b(0x17a)]('menu')['from'](menu_base_1[_0x26e06b(0x178)],'menu')[_0x26e06b(0x197)]('id\x20!=\x20:id',{'id':_0x5bfc60})['andWhere'](_0x26e06b(0x179))[_0x26e06b(0x198)]()+0x1:await(0x0,shell_1['getRepository'])(menu_base_1[_0x26e06b(0x178)])['manager']['createQueryBuilder']()[_0x26e06b(0x17a)](_0x26e06b(0x190))[_0x26e06b(0x187)](menu_base_1[_0x26e06b(0x178)],_0x26e06b(0x190))[_0x26e06b(0x197)](_0x26e06b(0x179))['getCount']()+0x1,!(0x0,operato_license_checker_1['checkTarget'])(_0x1fc6f3))throw new license_error_1['LicenseError']({'errorCode':_0x448287['t'](license_error_1[_0x26e06b(0x180)][_0x26e06b(0x182)][_0x26e06b(0x196)])});return!0x0;}function a0_0x5add(_0x4e0418,_0x13a4c9){const _0x2c2fe6=a0_0x2c2f();return a0_0x5add=function(_0x5add4f,_0xa23ce4){_0x5add4f=_0x5add4f-0x176;let _0x308d04=_0x2c2fe6[_0x5add4f];return _0x308d04;},a0_0x5add(_0x4e0418,_0x13a4c9);}exports['checkStudioPermission']=checkStudioPermission,exports['checkStudioTemplateIsOverLimit']=checkStudioTemplateIsOverLimit;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';function a0_0x1384(_0x29969e,_0x4536b7){const _0x156777=a0_0x1567();return a0_0x1384=function(_0x1384dd,_0x2cf761){_0x1384dd=_0x1384dd-0x1ea;let _0x35ef5d=_0x156777[_0x1384dd];return _0x35ef5d;},a0_0x1384(_0x29969e,_0x4536b7);}function a0_0x1567(){const _0x4ae5e5=['design:type','1042196ArxUNb','24347520xPOtmP','Resolver','116468JoTKoh','168440CxWUxq','Query','checkStudioPermission','design:returntype','3727269FSWBHB','9688302pnzPHV','OperatoToolResolver','checkStudioTemplateIsOverLimit','Operato\x20Tool\x20Studio\x20Limit\x20check','design:paramtypes','145XdEZBs','tslib','2upqzML','studioTemplateIsOverLimit','5350218kPIGGj','__decorate','prototype','Ctx','./tool-permission','497PUfBRa','__param','type-graphql','Arg','studioPermission','__metadata','__esModule'];a0_0x1567=function(){return _0x4ae5e5;};return a0_0x1567();}const a0_0x25d2ad=a0_0x1384;(function(_0x4d36f1,_0x5cd106){const _0x214daf=a0_0x1384,_0x11a652=_0x4d36f1();while(!![]){try{const _0x164f68=-parseInt(_0x214daf(0x1f0))/0x1*(-parseInt(_0x214daf(0x200))/0x2)+parseInt(_0x214daf(0x202))/0x3+-parseInt(_0x214daf(0x1f3))/0x4*(parseInt(_0x214daf(0x1fe))/0x5)+-parseInt(_0x214daf(0x1f9))/0x6+-parseInt(_0x214daf(0x207))/0x7*(parseInt(_0x214daf(0x1f4))/0x8)+-parseInt(_0x214daf(0x1f8))/0x9+parseInt(_0x214daf(0x1f1))/0xa;if(_0x164f68===_0x5cd106)break;else _0x11a652['push'](_0x11a652['shift']());}catch(_0x345c74){_0x11a652['push'](_0x11a652['shift']());}}}(a0_0x1567,0xd9d26));Object['defineProperty'](exports,a0_0x25d2ad(0x1ee),{'value':!0x0}),exports[a0_0x25d2ad(0x1fa)]=void 0x0;const tslib_1=require(a0_0x25d2ad(0x1ff)),type_graphql_1=require(a0_0x25d2ad(0x1ea)),tool_permission_1=require(a0_0x25d2ad(0x206));let OperatoToolResolver=class{async[a0_0x25d2ad(0x1ec)](_0xa10a08){const _0x61eb1e=a0_0x25d2ad;return(0x0,tool_permission_1[_0x61eb1e(0x1f6)])();}async[a0_0x25d2ad(0x201)](_0x704f74,_0x192c33){const _0x27c612=a0_0x25d2ad;return(0x0,tool_permission_1[_0x27c612(0x1fb)])(_0x704f74,_0x192c33);}};tslib_1[a0_0x25d2ad(0x203)]([(0x0,type_graphql_1['Query'])(_0x268325=>Boolean,{'description':'Operato\x20Tool\x20Studio\x20Usage\x20Permissions'}),tslib_1[a0_0x25d2ad(0x208)](0x0,(0x0,type_graphql_1['Ctx'])()),tslib_1[a0_0x25d2ad(0x1ed)]('design:type',Function),tslib_1[a0_0x25d2ad(0x1ed)](a0_0x25d2ad(0x1fd),[Object]),tslib_1[a0_0x25d2ad(0x1ed)]('design:returntype',Promise)],OperatoToolResolver['prototype'],'studioPermission',null),tslib_1[a0_0x25d2ad(0x203)]([(0x0,type_graphql_1[a0_0x25d2ad(0x1f5)])(_0x15213c=>Boolean,{'description':a0_0x25d2ad(0x1fc)}),tslib_1[a0_0x25d2ad(0x208)](0x0,(0x0,type_graphql_1[a0_0x25d2ad(0x1eb)])('id')),tslib_1[a0_0x25d2ad(0x208)](0x1,(0x0,type_graphql_1[a0_0x25d2ad(0x205)])()),tslib_1[a0_0x25d2ad(0x1ed)](a0_0x25d2ad(0x1ef),Function),tslib_1[a0_0x25d2ad(0x1ed)](a0_0x25d2ad(0x1fd),[String,Object]),tslib_1['__metadata'](a0_0x25d2ad(0x1f7),Promise)],OperatoToolResolver[a0_0x25d2ad(0x204)],'studioTemplateIsOverLimit',null),OperatoToolResolver=tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x25d2ad(0x1f2)])()],OperatoToolResolver),exports[a0_0x25d2ad(0x1fa)]=OperatoToolResolver;
|