@things-factory/operato-tools 6.0.151 → 6.0.153
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/actions/main.js +1 -1
- package/client/pages/generator/button-config-tab-mixin.js +4 -4
- package/client/pages/generator/column-config-tab-mixin.js +4 -4
- package/client/pages/generator/etc-config-tab-mixin.js +4 -4
- package/client/pages/generator/form-config-tab-mixin.js +4 -4
- package/client/pages/generator/graphql-config-tab-mixin.js +24 -24
- package/client/pages/generator/grid-config-tab-mixin.js +21 -21
- package/client/pages/generator/menu-config-tab-mixin.js +11 -11
- package/client/pages/generator/meta-generator-page.js +11 -11
- package/client/pages/generator/search-config-tab-mixin.js +4 -4
- package/client/pages/generator/tab-config-tab-mixin.js +4 -4
- package/client/pages/main.js +4 -4
- package/client/reducers/main.js +1 -1
- package/package.json +3 -3
- package/server/constants/error-code.js +1 -1
- package/server/errors/license-error.js +1 -1
- package/server/routes.js +1 -1
- package/server/service/tool-entity/create-menu.js +1 -1
- package/server/service/tool-entity/create-service.js +1 -1
- package/server/service/tool-secret/tool-permission.js +1 -1
- package/server/service/tool-secret/tool-resolver.js +1 -1
- package/translations/en.json +2 -1
- package/translations/ko.json +2 -1
- package/translations/ms.json +2 -1
- package/translations/zh.json +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x3edf84=a0_0x2cf1;(function(_0x1bf9ac,_0x20763a){const _0x56859c=a0_0x2cf1,_0x26f6c9=_0x1bf9ac();while(!![]){try{const _0x178d1d=parseInt(_0x56859c(0x1f5))/0x1*(parseInt(_0x56859c(0x200))/0x2)+-parseInt(_0x56859c(0x1f7))/0x3+-parseInt(_0x56859c(0x1fc))/0x4*(parseInt(_0x56859c(0x1f9))/0x5)+parseInt(_0x56859c(0x202))/0x6+-parseInt(_0x56859c(0x1fd))/0x7+-parseInt(_0x56859c(0x201))/0x8+-parseInt(_0x56859c(0x1fb))/0x9*(-parseInt(_0x56859c(0x1f4))/0xa);if(_0x178d1d===_0x20763a)break;else _0x26f6c9['push'](_0x26f6c9['shift']());}catch(_0xa8f292){_0x26f6c9['push'](_0x26f6c9['shift']());}}}(a0_0x3f82,0x704d4));Object[a0_0x3edf84(0x204)](exports,a0_0x3edf84(0x205),{'value':!0x0}),exports[a0_0x3edf84(0x1f3)]=void 0x0;const tslib_1=require(a0_0x3edf84(0x1f8)),ERROR_CODES=tslib_1[a0_0x3edf84(0x1ff)](require(a0_0x3edf84(0x1f6)));class LicenseError extends Error{static get['ERROR_CODES'](){return Object['assign']({},ERROR_CODES);}constructor({errorCode:_0x2752d5,detail:_0x101cad}){const _0xfa2261=a0_0x3edf84;super(_0x2752d5),this[_0xfa2261(0x203)]=_0xfa2261(0x1fa),this[_0xfa2261(0x1fe)]=_0x2752d5,this['detail']=_0x101cad;}}function a0_0x2cf1(_0x4571ed,_0x4724b6){const _0x3f8221=a0_0x3f82();return a0_0x2cf1=function(_0x2cf1c2,_0x5ea20f){_0x2cf1c2=_0x2cf1c2-0x1f3;let _0x474a2d=_0x3f8221[_0x2cf1c2];return _0x474a2d;},a0_0x2cf1(_0x4571ed,_0x4724b6);}exports[a0_0x3edf84(0x1f3)]=LicenseError;function a0_0x3f82(){const _0x48fe7e=['4487028JHAaiX','name','defineProperty','__esModule','LicenseError','400eKfarY','1391QzeuIP','../constants/error-code','2675091IoCwvP','tslib','2145xaECWJ','license-error','324783MPVJGq','3444gYXVhW','772590TVkANA','errorCode','__importStar','566AuCCTW','6028376tBMIrr'];a0_0x3f82=function(){return _0x48fe7e;};return a0_0x3f82();}
|
package/server/routes.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a0_0x1dd65d=a0_0x4bb8;(function(_0x2bfeef,_0x316bae){const _0x4d3583=a0_0x4bb8,_0x5d590a=_0x2bfeef();while(!![]){try{const _0xa7531a=-parseInt(_0x4d3583(0x1ad))/0x1*(-parseInt(_0x4d3583(0x1b1))/0x2)+-parseInt(_0x4d3583(0x1b0))/0x3*(-parseInt(_0x4d3583(0x1b6))/0x4)+parseInt(_0x4d3583(0x1af))/0x5+parseInt(_0x4d3583(0x1ac))/0x6+parseInt(_0x4d3583(0x1b7))/0x7*(parseInt(_0x4d3583(0x1b5))/0x8)+-parseInt(_0x4d3583(0x1b4))/0x9+-parseInt(_0x4d3583(0x1ae))/0xa;if(_0xa7531a===_0x316bae)break;else _0x5d590a['push'](_0x5d590a['shift']());}catch(_0x1af5d7){_0x5d590a['push'](_0x5d590a['shift']());}}}(a0_0x1607,0x2ddca));function a0_0x1607(){const _0x212651=['things-factory:operato-tools:routes','bootstrap-module-domain-private-route','2723049fUQGiu','8VUhSHc','4OlSQKs','879347xQLRWH','1795266PqqFAN','1Ppsczo','618850rHtoHz','247280Qojaqa','194853BFVmsp','26114ABRNfh'];a0_0x1607=function(){return _0x212651;};return a0_0x1607();}function a0_0x4bb8(_0x47a726,_0x170d51){const _0x1607af=a0_0x1607();return a0_0x4bb8=function(_0x4bb8f0,_0x2fce31){_0x4bb8f0=_0x4bb8f0-0x1ac;let _0x136f59=_0x1607af[_0x4bb8f0];return _0x136f59;},a0_0x4bb8(_0x47a726,_0x170d51);}const debug=require('debug')(a0_0x1dd65d(0x1b2));process['on']('bootstrap-module-global-public-route',(_0x47cf1d,_0x28367d)=>{}),process['on']('bootstrap-module-global-private-route',(_0x452b91,_0x2a9d13)=>{}),process['on']('bootstrap-module-domain-public-route',(_0xe9e2c2,_0x4f7c5f)=>{}),process['on'](a0_0x1dd65d(0x1b3),(_0x19b3c0,_0x4193a6)=>{});
|
|
@@ -1 +1 @@
|
|
|
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
|
+
'use strict';const a0_0x19577b=a0_0x5a26;(function(_0x5bdb8e,_0x69f70e){const _0x14e4ee=a0_0x5a26,_0x58495f=_0x5bdb8e();while(!![]){try{const _0x140099=-parseInt(_0x14e4ee(0x19e))/0x1+-parseInt(_0x14e4ee(0x16c))/0x2*(parseInt(_0x14e4ee(0x187))/0x3)+-parseInt(_0x14e4ee(0x196))/0x4+-parseInt(_0x14e4ee(0x156))/0x5*(parseInt(_0x14e4ee(0x165))/0x6)+parseInt(_0x14e4ee(0x189))/0x7+-parseInt(_0x14e4ee(0x172))/0x8*(-parseInt(_0x14e4ee(0x155))/0x9)+parseInt(_0x14e4ee(0x16b))/0xa*(parseInt(_0x14e4ee(0x188))/0xb);if(_0x140099===_0x69f70e)break;else _0x58495f['push'](_0x58495f['shift']());}catch(_0x2493ed){_0x58495f['push'](_0x58495f['shift']());}}}(a0_0xf2bd,0x35814));function a0_0xf2bd(){const _0x3dd3b2=['EntityColumn','createSortCols','gridRank','routing','query','36fyiEoh','2846855bdNnCe','2404444xnDlSD','hex','lodash','aes-256-cfb','push','updater','filter','\x22,\x22hidden\x22:','left','refType','reverseSort','__importDefault','\x22,\x22width\x22:','843332EguWYK','string','{\x22name\x22:\x20\x22','getRepository','\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}','update','\x22,\x22header\x22:\x20\x22','@transaction','177915zEsQyR','pluralize','SCREEN','parent_menu_id','name','\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}','defineProperty',',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22','readonly','from','\x22,\x22operator\x22:\x20\x22','Resolver','design:returntype','aes256','aes-256-ecb','rank','toolCreateMenu','template','createSearchCols','design:paramtypes','hiddenFlag','find','\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22basic\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22label\x22:\x20\x22data_history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22icon\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22logic\x22:\x20\x22history_copy\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20','Mutation','length','creator','Operato\x20Tool\x20Create\x20Menu','\x27\x20or\x20id\x20=\x20\x27','final','state','\x20,\x22exportable\x22:\x20true','Directive','refName','OperatoToolCreateMenu','split','checkStudioTemplateIsOverLimit','enc','Entity','prototype','substring','9VuKgCH','5gkeVCs',',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22','__metadata','resourceUrl','replace','design:type','updatedAt','assign','join','searchRank','\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}','__param','default',',\x22mandatory\x22:\x20','@things-factory/resource-base','1149324exjtKz','aes-256-ctr','./../tool-secret/tool-permission','stringify','updater_id','Menu','10alBLvE','1022rRDcOZ','crypto','select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27','Arg','hidden','sort','1626344yEjXyD','createCipheriv','sortRank','toString','updated_at','aes-256-ofb','{\x22name\x22:\x22','h1z0q9i9x7q6','utf8','searchOper','createGridColumns','aes-256-cbc','randomBytes','__decorate','created_at','\x22,\x22name\x22:\x20\x22'];a0_0xf2bd=function(){return _0x3dd3b2;};return a0_0xf2bd();}Object[a0_0x19577b(0x1a4)](exports,'__esModule',{'value':!0x0}),exports[a0_0x19577b(0x14e)]=void 0x0;function a0_0x5a26(_0x55b948,_0x52858a){const _0xf2bd48=a0_0xf2bd();return a0_0x5a26=function(_0x5a26a5,_0x9d291d){_0x5a26a5=_0x5a26a5-0x146;let _0x4f82f4=_0xf2bd48[_0x5a26a5];return _0x4f82f4;},a0_0x5a26(_0x55b948,_0x52858a);}const tslib_1=require('tslib'),type_graphql_1=require('type-graphql'),resource_base_1=require(a0_0x19577b(0x164)),menu_base_1=require('@things-factory/menu-base'),tool_permission_1=require(a0_0x19577b(0x167)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x19577b(0x18b)),{plural:plural}=require(a0_0x19577b(0x19f)),crypto_1=tslib_1[a0_0x19577b(0x194)](require(a0_0x19577b(0x16d)));let OperatoToolCreateMenu=class{async[a0_0x19577b(0x1ae)](_0x4f8a4e,_0x572bf5,_0x275bc3){const _0x3ab605=a0_0x19577b,{domain:_0x2ca341,user:_0xa2fb5f,tx:_0x1fc7fd}=_0x275bc3[_0x3ab605(0x14a)];await(0x0,tool_permission_1[_0x3ab605(0x150)])('',_0x275bc3);const _0x4f6ddf=await _0x1fc7fd[_0x3ab605(0x199)](resource_base_1[_0x3ab605(0x152)])['findOne']({'where':{'domain':{'id':_0x2ca341['id']},'id':_0x4f8a4e}}),_0x48da34=await _0x1fc7fd['getRepository'](resource_base_1[_0x3ab605(0x182)])[_0x3ab605(0x1b3)]({'where':{'domain':{'id':_0x2ca341['id']},'entity':{'id':_0x4f6ddf['id']}}});let {name:_0x4d6869=''}=_0x4f6ddf||{},_0xb390df=kebabCase(_0x4d6869),_0x35a557=modelTemplate[_0x3ab605(0x15a)](/{{pascalCase name}}/g,startCase(camelCase(_0x4d6869))['replace'](/ /g,''))['replace'](/{{camelCase name}}/g,camelCase(_0x4d6869))[_0x3ab605(0x15a)](/{{snakeCase name}}/g,snakeCase(_0x4d6869))[_0x3ab605(0x15a)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x4d6869)))[_0x3ab605(0x15a)](/ /g,''))[_0x3ab605(0x15a)](/{{pluralCamelCase name}}/g,camelCase(plural(_0x4d6869)))['replace'](/{{name}}/g,_0x4d6869),_0x519f66='';'JSON'==_0x4f6ddf['dataProp']?_0x519f66='\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':'COPY'==_0x4f6ddf['dataProp']&&(_0x519f66=_0x3ab605(0x1b4)),_0x35a557=_0x35a557[_0x3ab605(0x15a)](/{{HistoryButton}}/g,_0x519f66);let _0x39dea1=this['createSortCols'](_0x48da34);_0x35a557=_0x35a557[_0x3ab605(0x15a)](/{{SortColumns}}/g,_0x39dea1[_0x3ab605(0x15e)](','));let _0x297033=this['createSearchCols'](_0x48da34);_0x35a557=_0x35a557[_0x3ab605(0x15a)](/{{SearchColumns}}/g,_0x297033['join'](','));let _0x4fb33d=this[_0x3ab605(0x17c)](_0x48da34);return _0x35a557=_0x35a557[_0x3ab605(0x15a)](/{{GridColumns}}/g,_0x4fb33d['join'](',')),_0x35a557=this[_0x3ab605(0x151)](_0x35a557),await this['createMenuData'](_0x1fc7fd,_0x2ca341,_0xa2fb5f,_0x572bf5,_0xb390df,_0x35a557),!0x0;}[a0_0x19577b(0x17c)](_0x335be6){const _0x463efc=a0_0x19577b;return _0x335be6[_0x463efc(0x18f)](_0x2b75f6=>'id'!=_0x2b75f6['name']&&_0x2b75f6[_0x463efc(0x184)]>0x0)[_0x463efc(0x171)](function(_0x25ec70,_0x1c6bf7){const _0x115ef3=_0x463efc;return _0x25ec70[_0x115ef3(0x184)]-_0x1c6bf7[_0x115ef3(0x184)];})['map'](_0x1e5ed8=>{const _0x1090ab=_0x463efc;let {gridEditor:_0x246775='string',name:_0x1b3f20,term:_0x5a6bf6,gridWidth:_0x208642=0x0,gridAlign:_0x212f89=_0x1090ab(0x191),nullable:_0x58e1d6=!0x1}=_0x1e5ed8;if(null==_0x246775&&(_0x246775=_0x1090ab(0x197)),null==_0x212f89&&(_0x212f89=_0x1090ab(0x191)),_0x1090ab(0x169)==_0x1b3f20||'creator_id'==_0x1b3f20)return _0x1b3f20='updater_id'==_0x1b3f20?_0x1090ab(0x18e):_0x1090ab(0x146),'{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22'+_0x1b3f20+_0x1090ab(0x19c)+_0x1b3f20+_0x1090ab(0x160);if(_0x1090ab(0x176)==_0x1b3f20||_0x1090ab(0x180)==_0x1b3f20)return'{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22'+('updated_at'==_0x1b3f20?_0x1090ab(0x15c):'createdAt')+_0x1090ab(0x19c)+_0x1b3f20+_0x1090ab(0x19a);let _0x363a61=_0x1090ab(0x1a6)!=_0x246775&&_0x1090ab(0x170)!=_0x246775,_0x33388c='hidden'==_0x246775;0x1!=_0x33388c&&0x0!=_0x363a61||(_0x246775=_0x1090ab(0x197));let _0x3a8c28='{\x22type\x22:\x20\x22'+_0x246775+_0x1090ab(0x181)+camelCase(_0x1b3f20)+_0x1090ab(0x19c)+_0x5a6bf6+_0x1090ab(0x190)+_0x33388c+'\x20,\x22editable\x22:\x20'+_0x363a61+_0x1090ab(0x163)+!_0x58e1d6+_0x1090ab(0x157)+_0x212f89+_0x1090ab(0x195)+_0x208642+_0x1090ab(0x14b);return'code'==_0x1e5ed8[_0x1090ab(0x192)]&&(_0x3a8c28+=_0x1090ab(0x1a5)+_0x1e5ed8[_0x1090ab(0x14d)]+'\x22}'),'scenario'==_0x1e5ed8[_0x1090ab(0x192)]&&(_0x3a8c28+=',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22'+_0x1e5ed8['refName']+'\x22}'),'entity'==_0x1e5ed8[_0x1090ab(0x192)]&&(_0x3a8c28+=',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22'+camelCase(plural(_0x1e5ed8[_0x1090ab(0x14d)]))+_0x1090ab(0x1a3)),_0x3a8c28+='}',_0x3a8c28;});}[a0_0x19577b(0x1b0)](_0x4c6645){const _0x4d384e=a0_0x19577b;return _0x4c6645[_0x4d384e(0x18f)](_0x59a9b1=>_0x59a9b1['searchRank']>0x0)[_0x4d384e(0x171)](function(_0x44f11f,_0x239aa9){const _0x1fc600=_0x4d384e;return _0x44f11f[_0x1fc600(0x15f)]-_0x239aa9[_0x1fc600(0x15f)];})['map'](_0x3e7256=>{const _0x355140=_0x4d384e;let _0x411405=_0x3e7256[_0x355140(0x17b)];return _0x355140(0x18f)==_0x411405?'\x22'+camelCase(_0x3e7256[_0x355140(0x1a2)])+'\x22':(_0x411405||(_0x411405='eq'),_0x355140(0x198)+camelCase(_0x3e7256['name'])+_0x355140(0x1a8)+_0x411405+'\x22}');});}[a0_0x19577b(0x183)](_0xb3cad6){const _0x2803c3=a0_0x19577b;return _0xb3cad6[_0x2803c3(0x18f)](_0x142f10=>_0x142f10[_0x2803c3(0x174)]>0x0)[_0x2803c3(0x171)](function(_0x555246,_0x12a078){const _0x4c2df8=_0x2803c3;return _0x555246[_0x4c2df8(0x174)]-_0x12a078[_0x4c2df8(0x174)];})['map'](_0x788d6e=>_0x2803c3(0x178)+camelCase(_0x788d6e[_0x2803c3(0x1a2)])+'\x22,\x22desc\x22:'+_0x788d6e[_0x2803c3(0x193)]+'}');}async['createMenuData'](_0x30e1a7,_0x3dfa98,_0x4eab51,_0x189f0b,_0x3f70f0,_0x54d092){const _0xb720c9=a0_0x19577b;let _0x1d58c3=await _0x30e1a7[_0xb720c9(0x199)](menu_base_1['Menu'])['findOne']({'where':{'domain':{'id':_0x3dfa98['id']},'id':_0x189f0b}}),_0x5ee579=(await _0x30e1a7[_0xb720c9(0x199)](menu_base_1[_0xb720c9(0x16a)])[_0xb720c9(0x186)](_0xb720c9(0x16e)+_0x189f0b+_0xb720c9(0x148)+_0x189f0b+'\x27'))[0x0][_0xb720c9(0x1ad)]+0xa,_0x2adc55=new menu_base_1[(_0xb720c9(0x16a))]();_0x2adc55[_0xb720c9(0x1a2)]=_0x3f70f0,_0x2adc55['menuType']=_0xb720c9(0x1a0),_0x2adc55['category']='meta-grist-page',_0x2adc55[_0xb720c9(0x1ad)]=_0x5ee579,_0x2adc55[_0xb720c9(0x1b2)]=!0x1,_0x2adc55[_0xb720c9(0x185)]=_0x3f70f0,_0x2adc55[_0xb720c9(0x1af)]=_0x54d092,_0x2adc55[_0xb720c9(0x159)]='@things-factory/meta-ui/client/pages/meta-grist-page',_0x2adc55['parent']=_0x1d58c3,await _0x30e1a7[_0xb720c9(0x199)](menu_base_1[_0xb720c9(0x16a)])['save'](Object[_0xb720c9(0x15d)](Object[_0xb720c9(0x15d)]({},_0x2adc55),{'domain':_0x3dfa98,'creator':_0x4eab51,'updater':_0x4eab51}));}['enc'](_0x1335ed){const _0x13f50f=a0_0x19577b;let _0x23fc18=JSON[_0x13f50f(0x168)](_0x1335ed)[_0x13f50f(0x14f)](/(.{100})/)['filter'](_0x49ae49=>_0x49ae49),_0x383654=[_0x13f50f(0x1ac),_0x13f50f(0x17d),_0x13f50f(0x18c),'aes-256-cfb8','aes-256-cfb1',_0x13f50f(0x177),_0x13f50f(0x166),_0x13f50f(0x1ab)],_0x56594d=crypto_1[_0x13f50f(0x162)][_0x13f50f(0x17e)](0x20)[_0x13f50f(0x175)](_0x13f50f(0x18a)),_0x931a1d=Buffer[_0x13f50f(0x1a7)](_0x56594d,_0x13f50f(0x18a)),_0x50f3bc=_0x56594d[_0x13f50f(0x154)](0x0,0x10),_0x38a30f=['',_0x50f3bc,_0x50f3bc,_0x50f3bc,_0x50f3bc,_0x50f3bc,_0x50f3bc,_0x50f3bc],_0x5728b4=0x0,_0x5300ca=[];_0x5300ca[_0x13f50f(0x18d)](_0x56594d);for(var _0x180525=0x0;_0x180525<_0x23fc18[_0x13f50f(0x1b6)];_0x180525++,_0x5728b4++){_0x5728b4==_0x383654['length']&&(_0x5728b4=0x0);let _0x94525f=crypto_1[_0x13f50f(0x162)][_0x13f50f(0x173)](_0x383654[_0x5728b4],_0x931a1d,_0x38a30f[_0x5728b4]),_0x533cef=_0x94525f[_0x13f50f(0x19b)](_0x23fc18[_0x180525],_0x13f50f(0x17a),_0x13f50f(0x18a));_0x533cef+=_0x94525f[_0x13f50f(0x149)](_0x13f50f(0x18a)),_0x5300ca[_0x13f50f(0x18d)](_0x533cef);}return _0x5300ca['join'](_0x13f50f(0x179));}};tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x19577b(0x14c)])(a0_0x19577b(0x19d)),(0x0,type_graphql_1[a0_0x19577b(0x1b5)])(_0x5572fe=>Boolean,{'description':a0_0x19577b(0x147)}),tslib_1[a0_0x19577b(0x161)](0x0,(0x0,type_graphql_1[a0_0x19577b(0x16f)])('id')),tslib_1[a0_0x19577b(0x161)](0x1,(0x0,type_graphql_1[a0_0x19577b(0x16f)])(a0_0x19577b(0x1a1))),tslib_1[a0_0x19577b(0x161)](0x2,(0x0,type_graphql_1['Ctx'])()),tslib_1['__metadata'](a0_0x19577b(0x15b),Function),tslib_1[a0_0x19577b(0x158)](a0_0x19577b(0x1b1),[String,String,Object]),tslib_1[a0_0x19577b(0x158)](a0_0x19577b(0x1aa),Promise)],OperatoToolCreateMenu[a0_0x19577b(0x153)],a0_0x19577b(0x1ae),null),OperatoToolCreateMenu=tslib_1[a0_0x19577b(0x17f)]([(0x0,type_graphql_1[a0_0x19577b(0x1a9)])()],OperatoToolCreateMenu),exports[a0_0x19577b(0x14e)]=OperatoToolCreateMenu;const modelTemplate='\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';
|
|
@@ -1 +1 @@
|
|
|
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
|
+
'use strict';function a0_0x224c(_0x8c6a47,_0x7750bb){const _0x1079c4=a0_0x1079();return a0_0x224c=function(_0x224cd6,_0x5d1617){_0x224cd6=_0x224cd6-0xb3;let _0x45a9c5=_0x1079c4[_0x224cd6];return _0x45a9c5;},a0_0x224c(_0x8c6a47,_0x7750bb);}const a0_0x36a4a4=a0_0x224c;(function(_0x3b98a4,_0x139fa9){const _0x4b1e9c=a0_0x224c,_0x1825a1=_0x3b98a4();while(!![]){try{const _0x14edcf=-parseInt(_0x4b1e9c(0xd4))/0x1+parseInt(_0x4b1e9c(0xe6))/0x2+-parseInt(_0x4b1e9c(0xe7))/0x3+-parseInt(_0x4b1e9c(0xe5))/0x4+-parseInt(_0x4b1e9c(0xf4))/0x5*(parseInt(_0x4b1e9c(0xf3))/0x6)+-parseInt(_0x4b1e9c(0x13d))/0x7+parseInt(_0x4b1e9c(0xf6))/0x8;if(_0x14edcf===_0x139fa9)break;else _0x1825a1['push'](_0x1825a1['shift']());}catch(_0x44c91b){_0x1825a1['push'](_0x1825a1['shift']());}}}(a0_0x1079,0xe3994));function a0_0x1079(){const _0x4aa13b=['colType','/server','design:returntype','\x0aimport\x20{\x20EventSubscriber\x20}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20HistoryEntitySubscriber\x20}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20getRepository\x20}\x20from\x20\x27@things-factory/shell\x27\x0a\x0a@EventSubscriber()\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryEntitySubscriber\x20extends\x20HistoryEntitySubscriber<{{pascalCase\x20name}},{{pascalCase\x20name}}History>\x20{\x0a\x20\x20public\x20get\x20entity()\x20{\x0a\x20\x20\x20\x20return\x20{{pascalCase\x20name}}\x0a\x20\x20}\x0a\x0a\x20\x20public\x20get\x20historyEntity()\x20{\x0a\x20\x20\x20\x20return\x20{{pascalCase\x20name}}History\x0a\x20\x20}\x0a\x0a\x20\x20{{entityToJson}}\x0a\x0a\x20\x20async\x20beforeRemoveHistory(history:{{pascalCase\x20name}}History,entity:{{pascalCase\x20name}}){\x0a\x20\x20\x20\x20let\x20repo\x20=\x20getRepository({{pascalCase\x20name}}History);\x0a\x20\x20\x20\x20const\x20revNo\x20=\x20await\x20repo.createQueryBuilder()\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.select(\x27max(data_revision_no)\x27,\x20\x27rev_no\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.where(\x27domain_id\x20=\x20:domainId\x27,\x20{\x20domainId:\x20entity.domain.id\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.andWhere(\x27original_id\x20=\x20:originalId\x27,\x20{\x20originalId:\x20entity.id\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.getRawOne()\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20history.dataRevisionNo\x20=\x20revNo\x20?\x20revNo.rev_no\x20+\x201\x20:\x201;\x0a\x20\x20\x20\x20return\x20history;\x0a\x20\x20}\x0a}\x0a','18XiGZSa','541690etmGPJ','__decorate','23336120Dkhzzk','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryList\x20}\x20from\x20\x27./{{name}}-history-type\x27\x0a\x0a@Resolver({{pascalCase\x20name}}History)\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryQuery\x20{\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}History,\x20{\x20description:\x20\x27To\x20fetch\x20a\x20{{pascalCase\x20name}}History\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}History(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}History>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20return\x20await\x20getRepository({{pascalCase\x20name}}History).findOne({\x0a\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20}\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}HistoryList,\x20{\x20description:\x20\x27To\x20fetch\x20multiple\x20{{pluralPascalCase\x20name}}History\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}Histories(@Args()\x20params:\x20ListParam,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}HistoryList>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20queryBuilder\x20=\x20getQueryBuilderFromListParams({\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20params,\x0a\x20\x20\x20\x20\x20\x20repository:\x20await\x20getRepository({{pascalCase\x20name}}History)\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20const\x20[items,\x20total]\x20=\x20await\x20queryBuilder.getManyAndCount()\x0a\x0a\x20\x20\x20\x20return\x20{\x20items,\x20total\x20}\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20Domain)\x0a\x20\x20async\x20domain(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<Domain>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(Domain).findOneBy({id:{{camelCase\x20name}}History.domainId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20updater(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}History.updaterId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20creator(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}History.creatorId})\x0a\x20\x20}\x0a}\x0a','.ts','lodash','\x20})','utf8','/*\x20ENTITIES\x20*/\x0a\x09...','\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','Resolvers,\x20subscribers\x20as\x20','double','Entity','bigint','Entities,','replace','double\x20precision','\x0a\x20\x20','getRepository','\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','string','createHistoryServiceFiles','/server/service/','Operato\x20Tool\x20Create\x20Service','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','...','updater','toolCreateService','__metadata','find','pluralCamelCaseName','snakeCaseName','writeFileSync','float','readFileSync','join','Resolvers,','EntitySubscribers,','packages','createServicePath','existsPath','OperatoToolCreateService','creator_id','updated_at','-query.ts','sort','timestamp\x20without\x20time\x20zone','camelCaseName','prototype','Ctx','getProjectRootPath','\x27,\x20type:\x20\x27','\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','type\x20=>','push','import\x20{\x20entities\x20as\x20','length','pascalCaseName','createEntityText','writeFile','updater_id','\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201','createDir','createServiceFiles','\x0aimport\x20{\x20Resolver,\x20Mutation,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20In\x20}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20New{{pascalCase\x20name}},\x20{{pascalCase\x20name}}Patch\x20}\x20from\x20\x27./{{name}}-type\x27\x0aimport\x20{\x20getRepository\x20}\x20from\x20\x27@things-factory/shell\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Mutation\x20{\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20create\x20new\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20create{{pascalCase\x20name}}(@Arg(\x27{{camelCase\x20name}}\x27)\x20{{camelCase\x20name}}:\x20New{{pascalCase\x20name}},\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20return\x20await\x20tx.getRepository({{pascalCase\x20name}}).save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20modify\x20{{pascalCase\x20name}}\x20information\x27\x20})\x0a\x20\x20async\x20update{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27id\x27)\x20id:\x20string,\x0a\x20\x20\x20\x20@Arg(\x27patch\x27)\x20patch:\x20{{pascalCase\x20name}}Patch,\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20repository\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20repository.findOne(\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20)\x0a\x0a\x20\x20\x20\x20return\x20await\x20repository.save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20...patch,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20[{{pascalCase\x20name}}],\x20{\x20description:\x20\x22To\x20modify\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20information\x22\x20})\x0a\x20\x20async\x20updateMultiple{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27patches\x27,\x20type\x20=>\x20[{{pascalCase\x20name}}Patch])\x20patches:\x20{{pascalCase\x20name}}Patch[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}[]>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20results\x20=\x20[]\x0a\x20\x20\x20\x20const\x20_createRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27+\x27)\x0a\x20\x20\x20\x20const\x20_updateRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27M\x27)\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}Repo\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x0a\x20\x20\x20\x20if\x20(_createRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_createRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20newRecord\x20=\x20_createRecords[i]\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...newRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27+\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20if\x20(_updateRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_updateRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20updRecord\x20=\x20_updateRecords[i]\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20{{camelCase\x20name}}Repo.findOne({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id:updRecord.id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...updRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27M\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20return\x20results\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20delete{{pascalCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove({\x20domain,\x20id,\x20updater:user\x20})\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20multiple\x20{{camelCase\x20name}}s\x27\x20})\x0a\x20\x20async\x20delete{{pluralPascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27ids\x27,\x20type\x20=>\x20[String])\x20ids:\x20string[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20delEntitis\x20=\x20ids.map(id=>{\x0a\x20\x20\x20\x20\x20\x20return\x20{domain,id,updater:user}\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove(delEntitis)\x0a\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a}\x0a','\x20{\x20nullable:\x20','/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...','@Column({name:\x27','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','env','\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}}]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}Mutation]\x0a','replaceNamesMap','8779085EYZmiK','rank','pluralPascalCaseName','\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','@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})','/packages','-type.ts','existsSync','__esModule','text','Date','indexOf','findOne','/packages/','Entities,\x20resolvers\x20as\x20','getColTxtType','getFieldType','/index.ts','-mutation.ts','\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryQuery\x20}\x20from\x20\x27./{{name}}-history-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryEntitySubscriber\x20}\x20from\x20\x27./event-subscriber\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}},\x20{{pascalCase\x20name}}History]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}HistoryQuery,\x20{{pascalCase\x20name}}Mutation]\x0aexport\x20const\x20subscribers\x20=\x20[{{pascalCase\x20name}}HistoryEntitySubscriber]\x0a\x0a','EntitySubscribers\x20}\x20from\x20\x27./','export\x20*\x20from\x20\x27./','datetime','JSON','map','columnToEntityColumn','pluralize','/service','__param','uniqRank','design:type','created_at','tableName','dataProp','@things-factory/resource-base','\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','long','domain_id','91765rsNSTd','defineProperty','mkdirSync','COPY','number','createTypeText','Float','PWD','index.ts','name','Arg','-history\x27','state','\x27,\x20nullable:\x20','decimal','tslib','-history.ts','5876128KLiGbV','2806854Ypiebj','744696nDxFNI','Int','createNoHistoryServiceFiels','@Field(','nullable','character\x20varying','/event-subscriber.ts','Resolvers\x20}\x20from\x20\x27./'];a0_0x1079=function(){return _0x4aa13b;};return a0_0x1079();}Object[a0_0x36a4a4(0xd5)](exports,a0_0x36a4a4(0xb6),{'value':!0x0}),exports[a0_0x36a4a4(0x11e)]=void 0x0;const tslib_1=require(a0_0x36a4a4(0xe3)),type_graphql_1=require('type-graphql'),shell_1=require('@things-factory/shell'),resource_base_1=require(a0_0x36a4a4(0xd0)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x36a4a4(0xfa)),{plural:plural}=require(a0_0x36a4a4(0xc8)),fs=require('fs');let OperatoToolCreateService=class{async[a0_0x36a4a4(0x110)](_0x593076,_0x2f0e12){const _0x239cd1=a0_0x36a4a4,{domain:_0x20357c}=_0x2f0e12[_0x239cd1(0xe0)],_0x38f01c=await(0x0,shell_1[_0x239cd1(0x107)])(resource_base_1[_0x239cd1(0x101)])[_0x239cd1(0xba)]({'where':{'id':_0x593076}}),_0xb0f946=await(0x0,shell_1[_0x239cd1(0x107)])(resource_base_1['EntityColumn'])[_0x239cd1(0x112)]({'where':{'domain':{'id':_0x20357c['id']},'entity':{'id':_0x38f01c['id']}}});let {name:_0x4a2bfd='',bundle:_0x175bb0=''}=_0x38f01c||{},_0x36942b=this[_0x239cd1(0x127)](),_0x5b7261=kebabCase(_0x4a2bfd);return await this[_0x239cd1(0x11c)](_0x36942b,_0x175bb0,_0x5b7261),await this[_0x239cd1(0x134)](_0x36942b,_0x175bb0,_0x4a2bfd,_0x5b7261,_0x38f01c,_0xb0f946),!0x0;}async['createServiceFiles'](_0x179873,_0x3cd5b4,_0x291427,_0xe4c820,_0x4ed6d1,_0x4e344c){const _0xe7eb74=a0_0x36a4a4;let _0x4f6272={'name':_0xe4c820,'tableName':_0x4ed6d1['tableName'],'pascalCaseName':startCase(camelCase(_0x291427))[_0xe7eb74(0x104)](/ /g,''),'camelCaseName':camelCase(_0x291427),'snakeCaseName':snakeCase(_0x291427),'pluralPascalCaseName':startCase(camelCase(plural(_0x291427)))['replace'](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x291427))},_0x2bbb7f=_0x179873+_0xe7eb74(0xbb)+_0x3cd5b4+_0xe7eb74(0x10b);['JSON',_0xe7eb74(0xd7)]['includes'](_0x4ed6d1[_0xe7eb74(0xcf)])?await this[_0xe7eb74(0x10a)](_0x2bbb7f,_0xe4c820,_0x4ed6d1,_0x4e344c,_0x4f6272):await this[_0xe7eb74(0xe9)](_0x2bbb7f,_0xe4c820,_0x4ed6d1,_0x4e344c,_0x4f6272);}async['createHistoryServiceFiles'](_0x29a357,_0x1ea5d4,_0x6d7899,_0x8651bb,_0x400d55){const _0x222bb9=a0_0x36a4a4;await this[_0x222bb9(0x130)](_0x29a357+(_0x1ea5d4+_0x222bb9(0xbf)),serviceHistoryIndex,_0x400d55);let _0x23938c=this['createEntityText'](_0x6d7899,_0x8651bb);await this['writeFile'](_0x29a357+(_0x1ea5d4+'/'+_0x1ea5d4+_0x222bb9(0xf9)),_0x23938c,_0x400d55),await this[_0x222bb9(0x130)](_0x29a357+(_0x1ea5d4+'/'+_0x1ea5d4+_0x222bb9(0x121)),serviceQuery,_0x400d55),await this[_0x222bb9(0x130)](_0x29a357+(_0x1ea5d4+'/'+_0x1ea5d4+_0x222bb9(0xc0)),serviceMutation,_0x400d55);let _0xf9be5f=this['createTypeText'](_0x8651bb);await this[_0x222bb9(0x130)](_0x29a357+(_0x1ea5d4+'/'+_0x1ea5d4+_0x222bb9(0xb4)),_0xf9be5f,_0x400d55);let _0x587772=this['createHistoryEntityText'](_0x6d7899,_0x8651bb);await this[_0x222bb9(0x130)](_0x29a357+(_0x1ea5d4+'/'+_0x1ea5d4+_0x222bb9(0xe4)),_0x587772,_0x400d55);let _0x274950='';_0x222bb9(0xc5)==_0x6d7899[_0x222bb9(0xcf)]?(_0x274950='\x0a\x20\x20public\x20createHistoryEntity(manager,\x20entity)\x20{\x0a\x20\x20\x20\x20let\x20history\x20=\x20manager.create(this.historyEntity,\x20entity);\x0a\x20\x20\x20\x20history.historyJson\x20=\x20JSON.stringify(entity);\x0a\x20\x20\x20\x20return\x20history;\x0a\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20',await this['writeFile'](_0x29a357+(_0x1ea5d4+'/event-subscriber.ts'),serviceEntitySubscriber,_0x400d55)):_0x274950='';let _0x11e2a7=serviceEntitySubscriber[_0x222bb9(0x104)](/{{entityToJson}}/g,_0x274950);await this['writeFile'](_0x29a357+(_0x1ea5d4+_0x222bb9(0xed)),_0x11e2a7,_0x400d55),await this['writeFile'](_0x29a357+(_0x1ea5d4+'/'+_0x1ea5d4+'-history-query.ts'),serviceHistoryQuery,_0x400d55),await this['writeFile'](_0x29a357+(_0x1ea5d4+'/'+_0x1ea5d4+'-history-type.ts'),sereviceHistoryType,_0x400d55);let _0x4d9456=_0x29a357+'index.ts';0x0==await this[_0x222bb9(0x11d)](_0x4d9456)&&await this['writeFile'](_0x4d9456,allIndex,_0x400d55);let _0x437250=await fs[_0x222bb9(0x117)](_0x4d9456,_0x222bb9(0xfc));_0x437250[_0x222bb9(0xb9)](_0x222bb9(0xc3)+_0x400d55[_0x222bb9(0xdd)]+'/'+_0x400d55[_0x222bb9(0xdd)]+_0x222bb9(0xdf))<0x0&&(_0x437250=_0x437250[_0x222bb9(0x104)](/\/\* EXPORT ENTITY TYPES \*\//,_0x222bb9(0x10d)+_0x400d55[_0x222bb9(0xdd)]+'/'+_0x400d55[_0x222bb9(0xdd)]+'-history\x27')),_0x437250[_0x222bb9(0xb9)](_0x222bb9(0xc3)+_0x400d55[_0x222bb9(0xdd)]+'/'+_0x400d55['name']+'\x27')<0x0&&(_0x437250=_0x437250[_0x222bb9(0x104)](/\/\* EXPORT ENTITY TYPES \*\//,'/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./'+_0x400d55[_0x222bb9(0xdd)]+'/'+_0x400d55[_0x222bb9(0xdd)]+'\x27')),_0x437250['indexOf'](_0x222bb9(0x12c)+_0x400d55[_0x222bb9(0x12e)]+_0x222bb9(0xbc)+_0x400d55[_0x222bb9(0x12e)]+_0x222bb9(0xff)+_0x400d55[_0x222bb9(0x12e)]+_0x222bb9(0xc2)+_0x400d55[_0x222bb9(0xdd)]+'\x27')<0x0&&(_0x437250=_0x437250[_0x222bb9(0x104)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x222bb9(0x139)+_0x400d55['pascalCaseName']+_0x222bb9(0xbc)+_0x400d55[_0x222bb9(0x12e)]+_0x222bb9(0xff)+_0x400d55['pascalCaseName']+_0x222bb9(0xc2)+_0x400d55['name']+'\x27')),_0x437250[_0x222bb9(0xb9)](_0x222bb9(0x10e)+_0x400d55['pascalCaseName']+'Entities,')<0x0&&(_0x437250=_0x437250['replace'](/\/\* ENTITIES \*\//,_0x222bb9(0xfd)+_0x400d55[_0x222bb9(0x12e)]+_0x222bb9(0x103))),_0x437250['indexOf'](_0x222bb9(0x10e)+_0x400d55[_0x222bb9(0x12e)]+_0x222bb9(0x119))<0x0&&(_0x437250=_0x437250[_0x222bb9(0x104)](/\/\* RESOLVER CLASSES \*\//,_0x222bb9(0xf7)+_0x400d55['pascalCaseName']+'Resolvers,')),_0x437250['indexOf'](_0x222bb9(0x10e)+_0x400d55[_0x222bb9(0x12e)]+'EntitySubscribers,')<0x0&&(_0x437250=_0x437250[_0x222bb9(0x104)](/\/\* SUBSCRIBERS \*\//,_0x222bb9(0x137)+_0x400d55[_0x222bb9(0x12e)]+_0x222bb9(0x11a))),await this[_0x222bb9(0x130)](_0x4d9456,_0x437250,_0x400d55);}async['createNoHistoryServiceFiels'](_0x3ecba4,_0x34bf65,_0x1fe16d,_0x663650,_0x1dcec8){const _0x2d540f=a0_0x36a4a4;await this[_0x2d540f(0x130)](_0x3ecba4+(_0x34bf65+'/index.ts'),serviceIndex,_0x1dcec8),await this[_0x2d540f(0x130)](_0x3ecba4+(_0x34bf65+'/'+_0x34bf65+_0x2d540f(0x121)),serviceQuery,_0x1dcec8),await this['writeFile'](_0x3ecba4+(_0x34bf65+'/'+_0x34bf65+_0x2d540f(0xc0)),serviceMutation,_0x1dcec8);let _0x4b4139=this['createEntityText'](_0x1fe16d,_0x663650);await this[_0x2d540f(0x130)](_0x3ecba4+(_0x34bf65+'/'+_0x34bf65+_0x2d540f(0xf9)),_0x4b4139,_0x1dcec8);let _0x2cb7bc=this[_0x2d540f(0xd9)](_0x663650);await this[_0x2d540f(0x130)](_0x3ecba4+(_0x34bf65+'/'+_0x34bf65+_0x2d540f(0xb4)),_0x2cb7bc,_0x1dcec8);let _0x232908=_0x3ecba4+_0x2d540f(0xdc);0x0==await this[_0x2d540f(0x11d)](_0x232908)&&await this[_0x2d540f(0x130)](_0x232908,allIndex,_0x1dcec8);let _0x2a2c53=await fs[_0x2d540f(0x117)](_0x232908,_0x2d540f(0xfc));_0x2a2c53[_0x2d540f(0xb9)]('export\x20*\x20from\x20\x27./'+_0x1dcec8[_0x2d540f(0xdd)]+'/'+_0x1dcec8['name']+'\x27')<0x0&&(_0x2a2c53=_0x2a2c53[_0x2d540f(0x104)](/\/\* EXPORT ENTITY TYPES \*\//,_0x2d540f(0x10d)+_0x1dcec8[_0x2d540f(0xdd)]+'/'+_0x1dcec8[_0x2d540f(0xdd)]+'\x27')),_0x2a2c53[_0x2d540f(0xb9)](_0x2d540f(0x12c)+_0x1dcec8[_0x2d540f(0x12e)]+_0x2d540f(0xbc)+_0x1dcec8[_0x2d540f(0x12e)]+'Resolvers\x20}\x20from\x20\x27./'+_0x1dcec8['name']+'\x27')<0x0&&(_0x2a2c53=_0x2a2c53[_0x2d540f(0x104)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x2d540f(0x139)+_0x1dcec8['pascalCaseName']+_0x2d540f(0xbc)+_0x1dcec8[_0x2d540f(0x12e)]+_0x2d540f(0xee)+_0x1dcec8[_0x2d540f(0xdd)]+'\x27')),_0x2a2c53[_0x2d540f(0xb9)](_0x2d540f(0x10e)+_0x1dcec8['pascalCaseName']+'Entities,')<0x0&&(_0x2a2c53=_0x2a2c53['replace'](/\/\* ENTITIES \*\//,_0x2d540f(0xfd)+_0x1dcec8[_0x2d540f(0x12e)]+_0x2d540f(0x103))),_0x2a2c53[_0x2d540f(0xb9)]('...'+_0x1dcec8['pascalCaseName']+_0x2d540f(0x119))<0x0&&(_0x2a2c53=_0x2a2c53[_0x2d540f(0x104)](/\/\* RESOLVER CLASSES \*\//,'/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...'+_0x1dcec8[_0x2d540f(0x12e)]+_0x2d540f(0x119))),await this[_0x2d540f(0x130)](_0x232908,_0x2a2c53,_0x1dcec8);}[a0_0x36a4a4(0xd9)](_0x1dd8a1){const _0x4bded3=a0_0x36a4a4;let _0x6b3f65=sereviceType,_0x40798b=_0x1dd8a1[_0x4bded3(0xc6)](_0x5b5b93=>{const _0x1643dc=_0x4bded3;if('id'==_0x5b5b93[_0x1643dc(0xdd)])return'';if(_0x1643dc(0xd3)==_0x5b5b93[_0x1643dc(0xdd)])return'';if(_0x1643dc(0xcd)==_0x5b5b93[_0x1643dc(0xdd)])return'';if('updated_at'==_0x5b5b93[_0x1643dc(0xdd)])return'';if('creator_id'==_0x5b5b93[_0x1643dc(0xdd)])return'';if('updater_id'==_0x5b5b93[_0x1643dc(0xdd)])return'';let _0x199798=this[_0x1643dc(0xbe)](_0x5b5b93),_0x79b9ce=this[_0x1643dc(0xbd)](_0x5b5b93),_0xee086d=camelCase(_0x5b5b93[_0x1643dc(0xdd)]);return'\x20\x20'+(_0x1643dc(0xea)+(0x0==_0x199798[_0x1643dc(0x12d)]?'':_0x1643dc(0x12a)+_0x199798+',')+_0x1643dc(0x136)+_0x5b5b93[_0x1643dc(0xeb)]+'\x20})')+_0x1643dc(0x106)+(''+_0xee086d+(_0x5b5b93['nullable']?'?':'')+':\x20'+_0x79b9ce)+'\x0a';});_0x6b3f65=_0x6b3f65[_0x4bded3(0x104)](/{{newTypeColumns}}/g,_0x40798b['join']('\x0a'));let _0x293e36=_0x1dd8a1['map'](_0x369228=>{const _0x48560f=_0x4bded3;if('id'==_0x369228['name'])return'';if(_0x48560f(0xd3)==_0x369228[_0x48560f(0xdd)])return'';if(_0x48560f(0xcd)==_0x369228[_0x48560f(0xdd)])return'';if(_0x48560f(0x120)==_0x369228[_0x48560f(0xdd)])return'';if(_0x48560f(0x11f)==_0x369228[_0x48560f(0xdd)])return'';if('updater_id'==_0x369228[_0x48560f(0xdd)])return'';let _0x35028d=this['getFieldType'](_0x369228),_0x20e690=this[_0x48560f(0xbd)](_0x369228);_0x369228[_0x48560f(0xeb)]=!0x0;let _0x520476=camelCase(_0x369228[_0x48560f(0xdd)]);return'\x20\x20'+(_0x48560f(0xea)+(0x0==_0x35028d[_0x48560f(0x12d)]?'':_0x48560f(0x12a)+_0x35028d+',')+'\x20{\x20nullable:\x20'+_0x369228[_0x48560f(0xeb)]+_0x48560f(0xfb))+'\x0a\x20\x20'+(''+_0x520476+(_0x369228['nullable']?'?':'')+':\x20'+_0x20e690)+'\x0a';});return _0x6b3f65=_0x6b3f65['replace'](/{{patchTypeColumns}}/g,_0x293e36[_0x4bded3(0x118)]('\x0a')),_0x6b3f65;}[a0_0x36a4a4(0x12f)](_0x4e9041,_0xad0226){const _0x829182=a0_0x36a4a4;let _0x4e622e=serviceEntity,_0x4dd029=_0xad0226[_0x829182(0x122)](function(_0x4f13a8,_0x198840){const _0x301085=_0x829182;return _0x4f13a8[_0x301085(0x13e)]-_0x198840['rank'];})[_0x829182(0xc6)](_0x2e9479=>this['columnToEntityColumn'](_0x2e9479));[_0x829182(0xd7),_0x829182(0xc5)]['includes'](_0x4e9041['dataProp'])&&_0x4dd029[_0x829182(0x12b)](_0x829182(0x132)),_0x4e622e=_0x4e622e[_0x829182(0x104)](/{{entityColumns}}/g,_0x4dd029[_0x829182(0x118)]('\x0a'));let _0x4b418d='',_0x1c7d37=_0xad0226['filter'](_0x561668=>_0x561668[_0x829182(0xcb)]&&_0x561668[_0x829182(0xcb)]>0x0)[_0x829182(0x122)](function(_0x5522f9,_0x352063){const _0x34f650=_0x829182;return _0x5522f9[_0x34f650(0xcb)]-_0x352063[_0x34f650(0xcb)];});if(_0x1c7d37[_0x829182(0x12d)]>0x0){_0x4b418d=_0x829182(0x141);let _0x2d62b5=_0x1c7d37[_0x829182(0xc6)](_0x3454e3=>{const _0x4701dc=_0x829182;let _0x5dd992=_0x3454e3[_0x4701dc(0xdd)];return _0x4701dc(0xd3)==_0x3454e3['name']&&(_0x5dd992='domain'),_0x4701dc(0x11f)==_0x3454e3['name']&&(_0x5dd992='creator'),_0x4701dc(0x131)==_0x3454e3['name']&&(_0x5dd992=_0x4701dc(0x10f)),'{{camelCase\x20name}}.'+camelCase(_0x5dd992);});_0x4b418d=_0x4b418d[_0x829182(0x104)](/{{indexColumns}}/g,_0x2d62b5[_0x829182(0x118)](','));}return _0x4e622e=_0x4e622e[_0x829182(0x104)](/{{indexAnn}}/g,_0x4b418d),_0x4e622e;}['createHistoryEntityText'](_0x42c489,_0x5466aa){const _0xfa48a4=a0_0x36a4a4;let _0x45b2a8=_0xfa48a4(0xc5)==_0x42c489[_0xfa48a4(0xcf)]?serviceEntityHistJson:serviceEntityHistCopy,_0x1161c4=_0x5466aa[_0xfa48a4(0x122)](function(_0x4ecf36,_0x47a29b){return _0x4ecf36['rank']-_0x47a29b['rank'];})[_0xfa48a4(0xc6)](_0x54b6c4=>this[_0xfa48a4(0xc7)](_0x54b6c4));return _0x45b2a8=_0x45b2a8[_0xfa48a4(0x104)](/{{entityColumns}}/g,_0x1161c4[_0xfa48a4(0x118)]('\x0a')),_0x45b2a8;}['columnToEntityColumn'](_0x5b41f3){const _0x5eb5b1=a0_0x36a4a4;if('id'==_0x5b41f3[_0x5eb5b1(0xdd)])return'';if(_0x5eb5b1(0xd3)==_0x5b41f3[_0x5eb5b1(0xdd)])return'';if(_0x5eb5b1(0xcd)==_0x5b41f3['name'])return'';if(_0x5eb5b1(0x120)==_0x5b41f3[_0x5eb5b1(0xdd)])return'';if('creator_id'==_0x5b41f3[_0x5eb5b1(0xdd)])return'';if('updater_id'==_0x5b41f3[_0x5eb5b1(0xdd)])return'';let _0x414e27=_0x5b41f3[_0x5eb5b1(0xef)];_0x5eb5b1(0x100)==_0x5b41f3[_0x5eb5b1(0xef)]&&(_0x414e27=_0x5eb5b1(0x105)),_0x5eb5b1(0xd2)==_0x5b41f3[_0x5eb5b1(0xef)]&&(_0x414e27=_0x5eb5b1(0x102)),'string'==_0x5b41f3[_0x5eb5b1(0xef)]&&(_0x414e27=_0x5eb5b1(0xec)),_0x5eb5b1(0xc4)==_0x5b41f3['colType']&&(_0x414e27=_0x5eb5b1(0x123));let _0x5f25ca='';_0x5eb5b1(0x109)==_0x5b41f3['colType']&&(_0x5f25ca=_0x5b41f3['colSize']);let _0x329293=this[_0x5eb5b1(0xbe)](_0x5b41f3),_0x4f16e6=this[_0x5eb5b1(0xbd)](_0x5b41f3),_0x40e1d0=camelCase(_0x5b41f3[_0x5eb5b1(0xdd)]);return'\x20\x20'+(_0x5eb5b1(0x138)+_0x5b41f3[_0x5eb5b1(0xdd)]+_0x5eb5b1(0x128)+_0x414e27+_0x5eb5b1(0xe1)+_0x5b41f3[_0x5eb5b1(0xeb)]+'\x20'+(0x0==_0x5f25ca[_0x5eb5b1(0x12d)]?'':',length:'+_0x5f25ca)+_0x5eb5b1(0xfb))+'\x0a\x20\x20'+(_0x5eb5b1(0xea)+(0x0==_0x329293[_0x5eb5b1(0x12d)]?'':_0x5eb5b1(0x12a)+_0x329293+',')+_0x5eb5b1(0x136)+_0x5b41f3[_0x5eb5b1(0xeb)]+_0x5eb5b1(0xfb))+_0x5eb5b1(0x106)+(''+_0x40e1d0+(_0x5b41f3[_0x5eb5b1(0xeb)]?'?':'')+':\x20'+_0x4f16e6)+'\x0a';}[a0_0x36a4a4(0xbe)](_0x403fb2){const _0x3bb7e5=a0_0x36a4a4;let _0x5e0052='';return'double'==_0x403fb2['colType']&&(_0x5e0052='Float'),_0x3bb7e5(0x116)==_0x403fb2[_0x3bb7e5(0xef)]&&(_0x5e0052=_0x3bb7e5(0xda)),_0x3bb7e5(0xd2)==_0x403fb2['colType']&&(_0x5e0052=_0x3bb7e5(0xe8)),'integer'==_0x403fb2[_0x3bb7e5(0xef)]&&(_0x5e0052=_0x3bb7e5(0xe8)),_0x5e0052;}[a0_0x36a4a4(0xbd)](_0x2144a5){const _0x5817bf=a0_0x36a4a4;let _0x302a2e=_0x2144a5[_0x5817bf(0xef)];return _0x5817bf(0xe2)==_0x2144a5[_0x5817bf(0xef)]&&(_0x302a2e=_0x5817bf(0xd8)),_0x5817bf(0x100)==_0x2144a5[_0x5817bf(0xef)]&&(_0x302a2e='number'),_0x5817bf(0x116)==_0x2144a5[_0x5817bf(0xef)]&&(_0x302a2e='number'),'integer'==_0x2144a5['colType']&&(_0x302a2e=_0x5817bf(0xd8)),_0x5817bf(0xd2)==_0x2144a5[_0x5817bf(0xef)]&&(_0x302a2e=_0x5817bf(0xd8)),_0x5817bf(0xc4)==_0x2144a5[_0x5817bf(0xef)]&&(_0x302a2e=_0x5817bf(0xb8)),'date'==_0x2144a5[_0x5817bf(0xef)]&&(_0x302a2e=_0x5817bf(0xb8)),_0x5817bf(0xb7)==_0x2144a5['colType']&&(_0x302a2e=_0x5817bf(0x109)),_0x302a2e;}async['writeFile'](_0x5758dd,_0x5397ec,_0x52fbaa){const _0x194c81=a0_0x36a4a4;await fs[_0x194c81(0x115)](_0x5758dd,this[_0x194c81(0x13c)](_0x5397ec,_0x52fbaa),'utf8');}['replaceNamesMap'](_0xef7cbd,_0x518630){const _0x5cf156=a0_0x36a4a4;return _0xef7cbd[_0x5cf156(0x104)](/{{pascalCase name}}/g,_0x518630[_0x5cf156(0x12e)])[_0x5cf156(0x104)](/{{camelCase name}}/g,_0x518630[_0x5cf156(0x124)])[_0x5cf156(0x104)](/{{snakeCase name}}/g,_0x518630[_0x5cf156(0x114)])['replace'](/{{pluralPascalCase name}}/g,_0x518630[_0x5cf156(0x13f)])[_0x5cf156(0x104)](/{{pluralCamelCase name}}/g,_0x518630[_0x5cf156(0x113)])[_0x5cf156(0x104)](/{{tableName}}/g,_0x518630[_0x5cf156(0xce)])[_0x5cf156(0x104)](/{{name}}/g,_0x518630[_0x5cf156(0xdd)]);}async[a0_0x36a4a4(0x11c)](_0x412036,_0x1b6074,_0xd1687d){const _0x193517=a0_0x36a4a4;let _0x17fae1=_0x412036+_0x193517(0xb3);await this[_0x193517(0x133)](_0x17fae1),_0x17fae1=_0x17fae1+'/'+_0x1b6074,await this[_0x193517(0x133)](_0x17fae1),_0x17fae1+=_0x193517(0xf0),await this[_0x193517(0x133)](_0x17fae1),_0x17fae1+=_0x193517(0xc9),await this[_0x193517(0x133)](_0x17fae1),_0x17fae1=_0x17fae1+'/'+_0xd1687d,await this['createDir'](_0x17fae1);}[a0_0x36a4a4(0x127)](){const _0xc887f0=a0_0x36a4a4;let _0xba381f=process[_0xc887f0(0x13a)][_0xc887f0(0xdb)]['split']('/'),_0x1318c9=[];for(let _0x275e43=0x0;_0x275e43<_0xba381f[_0xc887f0(0x12d)]&&_0xc887f0(0x11b)!=_0xba381f[_0x275e43];_0x275e43++)_0x1318c9['push'](_0xba381f[_0x275e43]);return _0x1318c9[_0xc887f0(0x118)]('/');}async[a0_0x36a4a4(0x133)](_0x2a829b){const _0x2e8574=a0_0x36a4a4;0x0==await this[_0x2e8574(0x11d)](_0x2a829b)&&fs[_0x2e8574(0xd6)](_0x2a829b);}async[a0_0x36a4a4(0x11d)](_0x9c5ed4){const _0xf3e361=a0_0x36a4a4;return await fs[_0xf3e361(0xb5)](_0x9c5ed4);}};tslib_1[a0_0x36a4a4(0xf5)]([(0x0,type_graphql_1['Query'])(_0x40a933=>Boolean,{'description':a0_0x36a4a4(0x10c)}),tslib_1[a0_0x36a4a4(0xca)](0x0,(0x0,type_graphql_1[a0_0x36a4a4(0xde)])('id')),tslib_1['__param'](0x1,(0x0,type_graphql_1[a0_0x36a4a4(0x126)])()),tslib_1[a0_0x36a4a4(0x111)](a0_0x36a4a4(0xcc),Function),tslib_1[a0_0x36a4a4(0x111)]('design:paramtypes',[String,Object]),tslib_1[a0_0x36a4a4(0x111)](a0_0x36a4a4(0xf1),Promise)],OperatoToolCreateService[a0_0x36a4a4(0x125)],a0_0x36a4a4(0x110),null),OperatoToolCreateService=tslib_1['__decorate']([(0x0,type_graphql_1['Resolver'])()],OperatoToolCreateService),exports[a0_0x36a4a4(0x11e)]=OperatoToolCreateService;const allIndex=a0_0x36a4a4(0xfe),serviceIndex=a0_0x36a4a4(0x13b),serviceHistoryIndex=a0_0x36a4a4(0xc1),serviceQuery=a0_0x36a4a4(0x129),serviceHistoryQuery=a0_0x36a4a4(0xf8),serviceMutation=a0_0x36a4a4(0x135),sereviceType=a0_0x36a4a4(0xd1),sereviceHistoryType='\x0aimport\x20{\x20ObjectType,\x20Field,\x20InputType,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0a\x0a@ObjectType()\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryList\x20{\x0a\x20\x20@Field(type\x20=>\x20[{{pascalCase\x20name}}History])\x0a\x20\x20items:\x20{{pascalCase\x20name}}History[]\x0a\x0a\x20\x20@Field(type\x20=>\x20Int)\x0a\x20\x20total:\x20number\x0a}\x0a',serviceEntity='\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20Domain\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0a@Entity(\x27{{tableName}}\x27)\x0a{{indexAnn}}\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}\x20{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a',serviceEntityHistCopy=a0_0x36a4a4(0x140),serviceEntityHistJson=a0_0x36a4a4(0x108),serviceEntitySubscriber=a0_0x36a4a4(0xf2);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0xea7a12=a0_0x39f0;(function(_0x52e67a,_0x5b45ce){const _0x2e6201=a0_0x39f0,_0x5724af=_0x52e67a();while(!![]){try{const _0xa26ae1=-parseInt(_0x2e6201(0xd3))/0x1+-parseInt(_0x2e6201(0xcc))/0x2*(-parseInt(_0x2e6201(0xc0))/0x3)+-parseInt(_0x2e6201(0xc5))/0x4*(parseInt(_0x2e6201(0xd4))/0x5)+parseInt(_0x2e6201(0xe3))/0x6*(parseInt(_0x2e6201(0xd1))/0x7)+parseInt(_0x2e6201(0xc7))/0x8*(-parseInt(_0x2e6201(0xc6))/0x9)+-parseInt(_0x2e6201(0xe1))/0xa+-parseInt(_0x2e6201(0xbf))/0xb*(-parseInt(_0x2e6201(0xca))/0xc);if(_0xa26ae1===_0x5b45ce)break;else _0x5724af['push'](_0x5724af['shift']());}catch(_0x264c1e){_0x5724af['push'](_0x5724af['shift']());}}}(a0_0x469a,0xef3d1));function a0_0x39f0(_0x3caa1c,_0x261b54){const _0x469ae3=a0_0x469a();return a0_0x39f0=function(_0x39f01e,_0x276230){_0x39f01e=_0x39f01e-0xbe;let _0x33ee48=_0x469ae3[_0x39f01e];return _0x33ee48;},a0_0x39f0(_0x3caa1c,_0x261b54);}Object[a0_0xea7a12(0xd9)](exports,a0_0xea7a12(0xd5),{'value':!0x0}),exports['checkStudioTemplateIsOverLimit']=exports[a0_0xea7a12(0xde)]=void 0x0;const operato_license_checker_1=require('@things-factory/operato-license-checker'),shell_1=require(a0_0xea7a12(0xc1)),menu_base_1=require(a0_0xea7a12(0xe4)),license_error_1=require('../../errors/license-error');async function checkStudioPermission(){const _0x48cccf=a0_0xea7a12;let _0x4f97d9=((0x0,operato_license_checker_1['getPermission'])(_0x48cccf(0xe5))||',')[_0x48cccf(0xd8)](',')[_0x48cccf(0xcf)](_0x1252a3=>_0x1252a3[_0x48cccf(0xdd)]()),_0x3ddd6c=!0x1;return _0x4f97d9[_0x48cccf(0xc8)](_0x3464c9=>{const _0x324c14=_0x48cccf;_0x3464c9[_0x324c14(0xbe)](_0x324c14(0xce))&&(_0x3ddd6c=!0x0);}),_0x3ddd6c;}function a0_0x469a(){const _0x51b71a=['@things-factory/menu-base','Permissions\x20For\x20Tailor\x20Tool','INVALID_LICENSE','includes','31267841DZUaAb','890811gjbLEG','@things-factory/shell','getRepository','(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)','Menu','550404uFTmlX','9XfjcBa','5012920Qqytfs','forEach','manager','12kOCjMl','from','2aDmgYN','getCount','Studio','map','select','7ROwnjz','ERROR_CODES','1736818PZsCiv','55udvoSL','__esModule','where','LicenseError','split','defineProperty','checkStudioTemplateIsOverLimit','id\x20!=\x20:id','createQueryBuilder','trim','checkStudioPermission','menu','andWhere','2365240yZpWVr','OVER_LIMIT','11724126BjSbaV'];a0_0x469a=function(){return _0x51b71a;};return a0_0x469a();}async function checkStudioTemplateIsOverLimit(_0x453cb6,_0x434819){const _0x53e683=a0_0xea7a12;if(0x0==await checkStudioPermission())throw new license_error_1[(_0x53e683(0xd7))]({'errorCode':_0x434819['t'](license_error_1[_0x53e683(0xd7)][_0x53e683(0xd2)][_0x53e683(0xe6)])});var _0x2603b7=0x0;if(_0x2603b7=_0x453cb6&&''!=_0x453cb6?await(0x0,shell_1['getRepository'])(menu_base_1[_0x53e683(0xc4)])[_0x53e683(0xc9)][_0x53e683(0xdc)]()[_0x53e683(0xd0)](_0x53e683(0xdf))['from'](menu_base_1['Menu'],'menu')[_0x53e683(0xd6)](_0x53e683(0xdb),{'id':_0x453cb6})[_0x53e683(0xe0)]('(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)')[_0x53e683(0xcd)]()+0x1:await(0x0,shell_1[_0x53e683(0xc2)])(menu_base_1[_0x53e683(0xc4)])[_0x53e683(0xc9)][_0x53e683(0xdc)]()[_0x53e683(0xd0)](_0x53e683(0xdf))[_0x53e683(0xcb)](menu_base_1[_0x53e683(0xc4)],_0x53e683(0xdf))['where'](_0x53e683(0xc3))[_0x53e683(0xcd)]()+0x1,!(0x0,operato_license_checker_1['checkTarget'])(_0x2603b7))throw new license_error_1['LicenseError']({'errorCode':_0x434819['t'](license_error_1[_0x53e683(0xd7)][_0x53e683(0xd2)][_0x53e683(0xe2)])});return!0x0;}exports[a0_0xea7a12(0xde)]=checkStudioPermission,exports[a0_0xea7a12(0xda)]=checkStudioTemplateIsOverLimit;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';function a0_0x4e9c(){const _0xc77048=['3934630EbiBsl','__param','Query','checkStudioTemplateIsOverLimit','Ctx','35PUCHYq','1525638zCYbxt','design:paramtypes','748010FHaLIB','prototype','OperatoToolResolver','design:returntype','Operato\x20Tool\x20Studio\x20Usage\x20Permissions','type-graphql','616665cLifVs','defineProperty','tslib','design:type','./tool-permission','698484jUncDv','3Zsnkzp','__metadata','Arg','4911592SUBgot','436542dgOral','studioTemplateIsOverLimit','__decorate','18wTSaZH'];a0_0x4e9c=function(){return _0xc77048;};return a0_0x4e9c();}const a0_0x3d156d=a0_0x522a;(function(_0x5a2e5a,_0x4ab99d){const _0xe7d2b0=a0_0x522a,_0x6ed395=_0x5a2e5a();while(!![]){try{const _0x13416f=parseInt(_0xe7d2b0(0x11a))/0x1+parseInt(_0xe7d2b0(0x12e))/0x2*(-parseInt(_0xe7d2b0(0x120))/0x3)+-parseInt(_0xe7d2b0(0x11f))/0x4+parseInt(_0xe7d2b0(0x12d))/0x5*(parseInt(_0xe7d2b0(0x124))/0x6)+-parseInt(_0xe7d2b0(0x128))/0x7+parseInt(_0xe7d2b0(0x123))/0x8+-parseInt(_0xe7d2b0(0x127))/0x9*(-parseInt(_0xe7d2b0(0x130))/0xa);if(_0x13416f===_0x4ab99d)break;else _0x6ed395['push'](_0x6ed395['shift']());}catch(_0x22dd96){_0x6ed395['push'](_0x6ed395['shift']());}}}(a0_0x4e9c,0x5f361));Object[a0_0x3d156d(0x11b)](exports,'__esModule',{'value':!0x0}),exports[a0_0x3d156d(0x132)]=void 0x0;const tslib_1=require(a0_0x3d156d(0x11c)),type_graphql_1=require(a0_0x3d156d(0x119)),tool_permission_1=require(a0_0x3d156d(0x11e));let OperatoToolResolver=class{async['studioPermission'](_0x2e3bb6){return(0x0,tool_permission_1['checkStudioPermission'])();}async[a0_0x3d156d(0x125)](_0x140d64,_0x32defe){const _0x3fa1c3=a0_0x3d156d;return(0x0,tool_permission_1[_0x3fa1c3(0x12b)])(_0x140d64,_0x32defe);}};function a0_0x522a(_0x46b25f,_0x1a6686){const _0x4e9c61=a0_0x4e9c();return a0_0x522a=function(_0x522aad,_0x2feac8){_0x522aad=_0x522aad-0x119;let _0x1bb9df=_0x4e9c61[_0x522aad];return _0x1bb9df;},a0_0x522a(_0x46b25f,_0x1a6686);}tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x3d156d(0x12a)])(_0x7b63a0=>Boolean,{'description':a0_0x3d156d(0x134)}),tslib_1[a0_0x3d156d(0x129)](0x0,(0x0,type_graphql_1[a0_0x3d156d(0x12c)])()),tslib_1['__metadata'](a0_0x3d156d(0x11d),Function),tslib_1['__metadata'](a0_0x3d156d(0x12f),[Object]),tslib_1['__metadata']('design:returntype',Promise)],OperatoToolResolver[a0_0x3d156d(0x131)],'studioPermission',null),tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x3d156d(0x12a)])(_0x479a55=>Boolean,{'description':'Operato\x20Tool\x20Studio\x20Limit\x20check'}),tslib_1[a0_0x3d156d(0x129)](0x0,(0x0,type_graphql_1[a0_0x3d156d(0x122)])('id')),tslib_1['__param'](0x1,(0x0,type_graphql_1[a0_0x3d156d(0x12c)])()),tslib_1[a0_0x3d156d(0x121)]('design:type',Function),tslib_1[a0_0x3d156d(0x121)](a0_0x3d156d(0x12f),[String,Object]),tslib_1['__metadata'](a0_0x3d156d(0x133),Promise)],OperatoToolResolver['prototype'],'studioTemplateIsOverLimit',null),OperatoToolResolver=tslib_1[a0_0x3d156d(0x126)]([(0x0,type_graphql_1['Resolver'])()],OperatoToolResolver),exports[a0_0x3d156d(0x132)]=OperatoToolResolver;
|
package/translations/en.json
CHANGED
package/translations/ko.json
CHANGED
package/translations/ms.json
CHANGED