@things-factory/operato-tools 6.0.102 → 6.0.103
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/actions/main.js +1 -1
- package/client/pages/generator/button-config-tab-mixin.js +4 -4
- package/client/pages/generator/column-config-tab-mixin.js +4 -4
- package/client/pages/generator/etc-config-tab-mixin.js +3 -3
- package/client/pages/generator/form-config-tab-mixin.js +4 -4
- package/client/pages/generator/graphql-config-tab-mixin.js +24 -24
- package/client/pages/generator/grid-config-tab-mixin.js +23 -23
- package/client/pages/generator/menu-config-tab-mixin.js +11 -11
- package/client/pages/generator/meta-generator-page.js +10 -10
- package/client/pages/generator/search-config-tab-mixin.js +4 -4
- package/client/pages/generator/tab-config-tab-mixin.js +4 -4
- package/client/pages/main.js +4 -4
- package/client/reducers/main.js +1 -1
- package/package.json +3 -3
- package/server/constants/error-code.js +1 -1
- package/server/errors/license-error.js +1 -1
- package/server/routes.js +1 -1
- package/server/service/tool-entity/create-menu.js +1 -1
- package/server/service/tool-entity/create-service.js +1 -1
- package/server/service/tool-secret/tool-permission.js +1 -1
- package/server/service/tool-secret/tool-resolver.js +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';const a0_0x13d331=a0_0x1823;(function(_0x3eb4d8,_0x564cfb){const _0x46136b=a0_0x1823,_0x3e24c3=_0x3eb4d8();while(!![]){try{const _0x199188=-parseInt(_0x46136b(0x79))/0x1+parseInt(_0x46136b(0x7f))/0x2+parseInt(_0x46136b(0x77))/0x3*(parseInt(_0x46136b(0x75))/0x4)+parseInt(_0x46136b(0x72))/0x5*(-parseInt(_0x46136b(0x80))/0x6)+-parseInt(_0x46136b(0x82))/0x7*(parseInt(_0x46136b(0x73))/0x8)+-parseInt(_0x46136b(0x81))/0x9*(-parseInt(_0x46136b(0x78))/0xa)+-parseInt(_0x46136b(0x7a))/0xb*(-parseInt(_0x46136b(0x74))/0xc);if(_0x199188===_0x564cfb)break;else _0x3e24c3['push'](_0x3e24c3['shift']());}catch(_0x6055bd){_0x3e24c3['push'](_0x3e24c3['shift']());}}}(a0_0x4b59,0x3020f));function a0_0x1823(_0x42e32d,_0x5c6201){const _0x4b5910=a0_0x4b59();return a0_0x1823=function(_0x182398,_0x18b2f9){_0x182398=_0x182398-0x71;let _0x4655ed=_0x4b5910[_0x182398];return _0x4655ed;},a0_0x1823(_0x42e32d,_0x5c6201);}function a0_0x4b59(){const _0x3944b1=['173906wEkEyP','12pfoTol','207KIBOfm','28ahCrdX','assign','__importStar','865550PIbWxC','675568GUSEmM','1484688YvNxyH','380DXEaiC','ERROR_CODES','8961uFwdGM','9730TQqYNp','130578nTTaFK','55dEaaez','name','__esModule','defineProperty','errorCode'];a0_0x4b59=function(){return _0x3944b1;};return a0_0x4b59();}Object[a0_0x13d331(0x7d)](exports,a0_0x13d331(0x7c),{'value':!0x0}),exports['LicenseError']=void 0x0;const tslib_1=require('tslib'),ERROR_CODES=tslib_1[a0_0x13d331(0x71)](require('../constants/error-code'));class LicenseError extends Error{static get[a0_0x13d331(0x76)](){const _0x25eb72=a0_0x13d331;return Object[_0x25eb72(0x83)]({},ERROR_CODES);}constructor({errorCode:_0xf8fd94,detail:_0x1ff064}){const _0x301abc=a0_0x13d331;super(_0xf8fd94),this[_0x301abc(0x7b)]='license-error',this[_0x301abc(0x7e)]=_0xf8fd94,this['detail']=_0x1ff064;}}exports['LicenseError']=LicenseError;
|
package/server/routes.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a0_0x3137(){const _0x39520e=['things-factory:operato-tools:routes','29732tsCsmJ','bootstrap-module-global-private-route','3625461xJXZQb','453LCemoU','2758115CsJStc','1603590iLWbjl','2959383dCxWlZ','bootstrap-module-domain-public-route','bootstrap-module-global-public-route','4PaIdGm','bootstrap-module-domain-private-route','421918juTzQZ','6OQPEuh','debug','5296170pKWUDB','8lZAgzc'];a0_0x3137=function(){return _0x39520e;};return a0_0x3137();}const a0_0x573019=a0_0x4b77;(function(_0x3abd88,_0x36f001){const _0x9b4995=a0_0x4b77,_0x5e49a5=_0x3abd88();while(!![]){try{const _0x38463d=parseInt(_0x9b4995(0x132))/0x1*(parseInt(_0x9b4995(0x134))/0x2)+-parseInt(_0x9b4995(0x12c))/0x3*(parseInt(_0x9b4995(0x129))/0x4)+-parseInt(_0x9b4995(0x12d))/0x5*(-parseInt(_0x9b4995(0x135))/0x6)+parseInt(_0x9b4995(0x12f))/0x7+-parseInt(_0x9b4995(0x138))/0x8*(parseInt(_0x9b4995(0x12b))/0x9)+-parseInt(_0x9b4995(0x12e))/0xa+parseInt(_0x9b4995(0x137))/0xb;if(_0x38463d===_0x36f001)break;else _0x5e49a5['push'](_0x5e49a5['shift']());}catch(_0x40b84d){_0x5e49a5['push'](_0x5e49a5['shift']());}}}(a0_0x3137,0x95eef));function a0_0x4b77(_0x18e414,_0x36b4fa){const _0x313795=a0_0x3137();return a0_0x4b77=function(_0x4b77a4,_0x168c1f){_0x4b77a4=_0x4b77a4-0x129;let _0x327887=_0x313795[_0x4b77a4];return _0x327887;},a0_0x4b77(_0x18e414,_0x36b4fa);}const debug=require(a0_0x573019(0x136))(a0_0x573019(0x139));process['on'](a0_0x573019(0x131),(_0x3056c4,_0x5c9e70)=>{}),process['on'](a0_0x573019(0x12a),(_0x554a88,_0x2cd490)=>{}),process['on'](a0_0x573019(0x130),(_0x3a971d,_0x324b55)=>{}),process['on'](a0_0x573019(0x133),(_0x54f1b6,_0x28f5b7)=>{});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function a0_0x52b6(_0x2ee835,_0x43c410){const _0x242169=a0_0x2421();return a0_0x52b6=function(_0x52b65d,_0x4cbde9){_0x52b65d=_0x52b65d-0x107;let _0x3d680c=_0x242169[_0x52b65d];return _0x3d680c;},a0_0x52b6(_0x2ee835,_0x43c410);}const a0_0x17e133=a0_0x52b6;(function(_0x58f334,_0x4a981b){const _0x27f4a6=a0_0x52b6,_0x350968=_0x58f334();while(!![]){try{const _0x24e91f=-parseInt(_0x27f4a6(0x172))/0x1*(-parseInt(_0x27f4a6(0x109))/0x2)+-parseInt(_0x27f4a6(0x15d))/0x3+-parseInt(_0x27f4a6(0x17a))/0x4+-parseInt(_0x27f4a6(0x126))/0x5+-parseInt(_0x27f4a6(0x15a))/0x6+-parseInt(_0x27f4a6(0x17e))/0x7+-parseInt(_0x27f4a6(0x151))/0x8*(-parseInt(_0x27f4a6(0x12a))/0x9);if(_0x24e91f===_0x4a981b)break;else _0x350968['push'](_0x350968['shift']());}catch(_0x1ee74a){_0x350968['push'](_0x350968['shift']());}}}(a0_0x2421,0x7f883));function a0_0x2421(){const _0x1effcb=['select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27','enc','filter','category','SCREEN','hiddenFlag','COPY','crypto','__decorate','Menu','{\x22name\x22:\x22','creator','Mutation','2371290XUfLKS','refType','join','./../tool-secret/tool-permission','11119887llbydr','aes-256-cfb1','utf8','\x22,\x22header\x22:\x20\x22','h1z0q9i9x7q6','gridRank','stringify','string','Arg','{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22','checkStudioTemplateIsOverLimit','push','updatedAt',',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22','createGridColumns','createSearchCols','creator_id','Ctx','@things-factory/meta-ui/client/pages/meta-grist-page','@things-factory/resource-base','defineProperty','left','__metadata','substring','{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22','resourceUrl','parent','createdAt','from','default','refName','\x22,\x22width\x22:','createCipheriv','findOne','code',',\x22mandatory\x22:\x20','\x20,\x22editable\x22:\x20','@transaction','EntityColumn','24yPSgyL','hex','toString','assign','updater_id','find','Directive','\x22,\x22operator\x22:\x20\x22','hidden','3423168QiudCT','reverseSort','{\x22type\x22:\x20\x22','2199552nBSKBB','sortRank','state','createMenuData','aes-256-cbc','sort','design:type','__importDefault','\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}','dataProp','Resolver','pluralize','\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}','created_at','\x22,\x22desc\x22:','update','\x27\x20or\x20id\x20=\x20\x27','scenario','map','searchRank','OperatoToolCreateMenu','6SoVymU','rank','name','length','entity','__esModule','prototype','type-graphql','3369292wadbnb','\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','design:paramtypes','query','4422649CeBGnv','toolCreateMenu','searchOper','\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','Operato\x20Tool\x20Create\x20Menu','22614OeabGt','aes-256-ecb','createSortCols','getRepository','menuType','meta-grist-page','template','routing','{\x22name\x22:\x20\x22','updated_at','\x22,\x22hidden\x22:','replace',',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22','__param','aes-256-ctr','save'];a0_0x2421=function(){return _0x1effcb;};return a0_0x2421();}Object[a0_0x17e133(0x13e)](exports,a0_0x17e133(0x177),{'value':!0x0}),exports[a0_0x17e133(0x171)]=void 0x0;const tslib_1=require('tslib'),type_graphql_1=require(a0_0x17e133(0x179)),resource_base_1=require(a0_0x17e133(0x13d)),menu_base_1=require('@things-factory/menu-base'),tool_permission_1=require(a0_0x17e133(0x129)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require('lodash'),{plural:plural}=require(a0_0x17e133(0x168)),crypto_1=tslib_1[a0_0x17e133(0x164)](require(a0_0x17e133(0x120)));let OperatoToolCreateMenu=class{async[a0_0x17e133(0x17f)](_0x1fa3ba,_0x20f9fa,_0x4bb8d9){const _0x3d653d=a0_0x17e133,{domain:_0x116e3a,user:_0x190320,tx:_0x297c23}=_0x4bb8d9[_0x3d653d(0x15f)];await(0x0,tool_permission_1[_0x3d653d(0x134)])('',_0x4bb8d9);const _0x530942=await _0x297c23[_0x3d653d(0x10c)](resource_base_1['Entity'])[_0x3d653d(0x14b)]({'where':{'domain':{'id':_0x116e3a['id']},'id':_0x1fa3ba}}),_0x43b8c9=await _0x297c23[_0x3d653d(0x10c)](resource_base_1[_0x3d653d(0x150)])[_0x3d653d(0x156)]({'where':{'domain':{'id':_0x116e3a['id']},'entity':{'id':_0x530942['id']}}});let {name:_0x3bfe82=''}=_0x530942||{},_0x8d945c=kebabCase(_0x3bfe82),_0x1d21ab=modelTemplate[_0x3d653d(0x114)](/{{pascalCase name}}/g,startCase(camelCase(_0x3bfe82))[_0x3d653d(0x114)](/ /g,''))[_0x3d653d(0x114)](/{{camelCase name}}/g,camelCase(_0x3bfe82))[_0x3d653d(0x114)](/{{snakeCase name}}/g,snakeCase(_0x3bfe82))['replace'](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x3bfe82)))[_0x3d653d(0x114)](/ /g,''))[_0x3d653d(0x114)](/{{pluralCamelCase name}}/g,camelCase(plural(_0x3bfe82)))[_0x3d653d(0x114)](/{{name}}/g,_0x3bfe82),_0x3d246a='';'JSON'==_0x530942['dataProp']?_0x3d246a='\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':_0x3d653d(0x11f)==_0x530942[_0x3d653d(0x166)]&&(_0x3d246a=_0x3d653d(0x107)),_0x1d21ab=_0x1d21ab['replace'](/{{HistoryButton}}/g,_0x3d246a);let _0x3087e9=this[_0x3d653d(0x10b)](_0x43b8c9);_0x1d21ab=_0x1d21ab[_0x3d653d(0x114)](/{{SortColumns}}/g,_0x3087e9[_0x3d653d(0x128)](','));let _0x440671=this['createSearchCols'](_0x43b8c9);_0x1d21ab=_0x1d21ab[_0x3d653d(0x114)](/{{SearchColumns}}/g,_0x440671[_0x3d653d(0x128)](','));let _0x3d0570=this[_0x3d653d(0x138)](_0x43b8c9);return _0x1d21ab=_0x1d21ab[_0x3d653d(0x114)](/{{GridColumns}}/g,_0x3d0570[_0x3d653d(0x128)](',')),_0x1d21ab=this[_0x3d653d(0x11a)](_0x1d21ab),await this[_0x3d653d(0x160)](_0x297c23,_0x116e3a,_0x190320,_0x20f9fa,_0x8d945c,_0x1d21ab),!0x0;}[a0_0x17e133(0x138)](_0x5c723c){const _0x9ac1f9=a0_0x17e133;return _0x5c723c[_0x9ac1f9(0x11b)](_0x2c22c6=>'id'!=_0x2c22c6[_0x9ac1f9(0x174)]&&_0x2c22c6[_0x9ac1f9(0x12f)]>0x0)['sort'](function(_0x5c1cd1,_0x18c4b5){const _0xdd260c=_0x9ac1f9;return _0x5c1cd1[_0xdd260c(0x12f)]-_0x18c4b5[_0xdd260c(0x12f)];})['map'](_0x57204e=>{const _0x28ed74=_0x9ac1f9;let {gridEditor:_0x42aa32='string',name:_0x42331f,term:_0x3ee863,gridWidth:_0x322e00=0x0,gridAlign:_0x1a7252=_0x28ed74(0x13f),nullable:_0x27dfef=!0x1}=_0x57204e;if(null==_0x42aa32&&(_0x42aa32=_0x28ed74(0x131)),null==_0x1a7252&&(_0x1a7252=_0x28ed74(0x13f)),'updater_id'==_0x42331f||_0x28ed74(0x13a)==_0x42331f)return _0x42331f=_0x28ed74(0x155)==_0x42331f?'updater':_0x28ed74(0x124),_0x28ed74(0x142)+_0x42331f+_0x28ed74(0x12d)+_0x42331f+_0x28ed74(0x169);if(_0x28ed74(0x112)==_0x42331f||_0x28ed74(0x16a)==_0x42331f)return _0x28ed74(0x133)+(_0x28ed74(0x112)==_0x42331f?_0x28ed74(0x136):_0x28ed74(0x145))+'\x22,\x22header\x22:\x20\x22'+_0x42331f+_0x28ed74(0x165);let _0x5b3185='readonly'!=_0x42aa32&&_0x28ed74(0x159)!=_0x42aa32,_0x3caa49=_0x28ed74(0x159)==_0x42aa32;0x1!=_0x3caa49&&0x0!=_0x5b3185||(_0x42aa32='string');let _0x43adf3=_0x28ed74(0x15c)+_0x42aa32+'\x22,\x22name\x22:\x20\x22'+camelCase(_0x42331f)+_0x28ed74(0x12d)+_0x3ee863+_0x28ed74(0x113)+_0x3caa49+_0x28ed74(0x14e)+_0x5b3185+_0x28ed74(0x14d)+!_0x27dfef+',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22'+_0x1a7252+_0x28ed74(0x149)+_0x322e00+'\x20,\x22exportable\x22:\x20true';return _0x28ed74(0x14c)==_0x57204e[_0x28ed74(0x127)]&&(_0x43adf3+=',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22'+_0x57204e['refName']+'\x22}'),_0x28ed74(0x16e)==_0x57204e[_0x28ed74(0x127)]&&(_0x43adf3+=_0x28ed74(0x115)+_0x57204e[_0x28ed74(0x148)]+'\x22}'),_0x28ed74(0x176)==_0x57204e[_0x28ed74(0x127)]&&(_0x43adf3+=_0x28ed74(0x137)+camelCase(plural(_0x57204e[_0x28ed74(0x148)]))+'\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}'),_0x43adf3+='}',_0x43adf3;});}[a0_0x17e133(0x139)](_0x3c306d){const _0x1db39b=a0_0x17e133;return _0x3c306d[_0x1db39b(0x11b)](_0x45effb=>_0x45effb[_0x1db39b(0x170)]>0x0)[_0x1db39b(0x162)](function(_0x4135ae,_0x46f96a){const _0x37c2e5=_0x1db39b;return _0x4135ae['searchRank']-_0x46f96a[_0x37c2e5(0x170)];})[_0x1db39b(0x16f)](_0x555116=>{const _0x4c2143=_0x1db39b;let _0x5c0ede=_0x555116[_0x4c2143(0x180)];return _0x4c2143(0x11b)==_0x5c0ede?'\x22'+camelCase(_0x555116['name'])+'\x22':(_0x5c0ede||(_0x5c0ede='eq'),_0x4c2143(0x111)+camelCase(_0x555116[_0x4c2143(0x174)])+_0x4c2143(0x158)+_0x5c0ede+'\x22}');});}['createSortCols'](_0x5396c9){const _0x29f8c7=a0_0x17e133;return _0x5396c9[_0x29f8c7(0x11b)](_0x2168b5=>_0x2168b5[_0x29f8c7(0x15e)]>0x0)[_0x29f8c7(0x162)](function(_0x348cf7,_0x11f70d){const _0x1d857f=_0x29f8c7;return _0x348cf7[_0x1d857f(0x15e)]-_0x11f70d[_0x1d857f(0x15e)];})['map'](_0x56e3b8=>_0x29f8c7(0x123)+camelCase(_0x56e3b8['name'])+_0x29f8c7(0x16b)+_0x56e3b8[_0x29f8c7(0x15b)]+'}');}async[a0_0x17e133(0x160)](_0x5f2ef1,_0x316695,_0x4f0fb2,_0x5d7e04,_0x39a463,_0xaed0ac){const _0xdfd38e=a0_0x17e133;let _0x1410c1=await _0x5f2ef1[_0xdfd38e(0x10c)](menu_base_1[_0xdfd38e(0x122)])['findOne']({'where':{'domain':{'id':_0x316695['id']},'id':_0x5d7e04}}),_0x39b8d4=(await _0x5f2ef1['getRepository'](menu_base_1[_0xdfd38e(0x122)])[_0xdfd38e(0x17d)](_0xdfd38e(0x119)+_0x5d7e04+_0xdfd38e(0x16d)+_0x5d7e04+'\x27'))[0x0][_0xdfd38e(0x173)]+0xa,_0x159b64=new menu_base_1[(_0xdfd38e(0x122))]();_0x159b64[_0xdfd38e(0x174)]=_0x39a463,_0x159b64[_0xdfd38e(0x10d)]=_0xdfd38e(0x11d),_0x159b64[_0xdfd38e(0x11c)]=_0xdfd38e(0x10e),_0x159b64['rank']=_0x39b8d4,_0x159b64[_0xdfd38e(0x11e)]=!0x1,_0x159b64[_0xdfd38e(0x110)]=_0x39a463,_0x159b64[_0xdfd38e(0x10f)]=_0xaed0ac,_0x159b64[_0xdfd38e(0x143)]=_0xdfd38e(0x13c),_0x159b64[_0xdfd38e(0x144)]=_0x1410c1,await _0x5f2ef1[_0xdfd38e(0x10c)](menu_base_1[_0xdfd38e(0x122)])[_0xdfd38e(0x118)](Object[_0xdfd38e(0x154)](Object[_0xdfd38e(0x154)]({},_0x159b64),{'domain':_0x316695,'creator':_0x4f0fb2,'updater':_0x4f0fb2}));}[a0_0x17e133(0x11a)](_0x139a04){const _0x29a2d2=a0_0x17e133;let _0x80ece7=JSON[_0x29a2d2(0x130)](_0x139a04)['split'](/(.{100})/)[_0x29a2d2(0x11b)](_0x2f5aea=>_0x2f5aea),_0x42d4a0=[_0x29a2d2(0x10a),_0x29a2d2(0x161),'aes-256-cfb','aes-256-cfb8',_0x29a2d2(0x12b),'aes-256-ofb',_0x29a2d2(0x117),'aes256'],_0x362746=crypto_1[_0x29a2d2(0x147)]['randomBytes'](0x20)[_0x29a2d2(0x153)](_0x29a2d2(0x152)),_0x2fe5b5=Buffer[_0x29a2d2(0x146)](_0x362746,'hex'),_0x3a500a=_0x362746[_0x29a2d2(0x141)](0x0,0x10),_0x50c25c=['',_0x3a500a,_0x3a500a,_0x3a500a,_0x3a500a,_0x3a500a,_0x3a500a,_0x3a500a],_0x4a0962=0x0,_0x14ad56=[];_0x14ad56[_0x29a2d2(0x135)](_0x362746);for(var _0x345dbb=0x0;_0x345dbb<_0x80ece7[_0x29a2d2(0x175)];_0x345dbb++,_0x4a0962++){_0x4a0962==_0x42d4a0[_0x29a2d2(0x175)]&&(_0x4a0962=0x0);let _0x4d662a=crypto_1[_0x29a2d2(0x147)][_0x29a2d2(0x14a)](_0x42d4a0[_0x4a0962],_0x2fe5b5,_0x50c25c[_0x4a0962]),_0x252fbb=_0x4d662a[_0x29a2d2(0x16c)](_0x80ece7[_0x345dbb],_0x29a2d2(0x12c),'hex');_0x252fbb+=_0x4d662a['final'](_0x29a2d2(0x152)),_0x14ad56[_0x29a2d2(0x135)](_0x252fbb);}return _0x14ad56[_0x29a2d2(0x128)](_0x29a2d2(0x12e));}};tslib_1[a0_0x17e133(0x121)]([(0x0,type_graphql_1[a0_0x17e133(0x157)])(a0_0x17e133(0x14f)),(0x0,type_graphql_1[a0_0x17e133(0x125)])(_0x5f033d=>Boolean,{'description':a0_0x17e133(0x108)}),tslib_1[a0_0x17e133(0x116)](0x0,(0x0,type_graphql_1[a0_0x17e133(0x132)])('id')),tslib_1[a0_0x17e133(0x116)](0x1,(0x0,type_graphql_1[a0_0x17e133(0x132)])('parent_menu_id')),tslib_1[a0_0x17e133(0x116)](0x2,(0x0,type_graphql_1[a0_0x17e133(0x13b)])()),tslib_1[a0_0x17e133(0x140)](a0_0x17e133(0x163),Function),tslib_1['__metadata'](a0_0x17e133(0x17c),[String,String,Object]),tslib_1['__metadata']('design:returntype',Promise)],OperatoToolCreateMenu[a0_0x17e133(0x178)],a0_0x17e133(0x17f),null),OperatoToolCreateMenu=tslib_1[a0_0x17e133(0x121)]([(0x0,type_graphql_1[a0_0x17e133(0x167)])()],OperatoToolCreateMenu),exports[a0_0x17e133(0x171)]=OperatoToolCreateMenu;const modelTemplate=a0_0x17e133(0x17b);
|
|
1
|
+
'use strict';const a0_0x96c89d=a0_0x42a6;function a0_0x42a6(_0x33a483,_0x4491f8){const _0x1b00e7=a0_0x1b00();return a0_0x42a6=function(_0x42a6d9,_0x5b7b0){_0x42a6d9=_0x42a6d9-0xc7;let _0x396b5f=_0x1b00e7[_0x42a6d9];return _0x396b5f;},a0_0x42a6(_0x33a483,_0x4491f8);}(function(_0x3f5f73,_0x4f0c92){const _0x1e01cc=a0_0x42a6,_0x1dd612=_0x3f5f73();while(!![]){try{const _0x2d2d60=parseInt(_0x1e01cc(0x135))/0x1+-parseInt(_0x1e01cc(0x12c))/0x2*(-parseInt(_0x1e01cc(0x10f))/0x3)+parseInt(_0x1e01cc(0xdb))/0x4*(parseInt(_0x1e01cc(0xef))/0x5)+-parseInt(_0x1e01cc(0x108))/0x6*(-parseInt(_0x1e01cc(0xd7))/0x7)+parseInt(_0x1e01cc(0xda))/0x8+parseInt(_0x1e01cc(0xf6))/0x9+-parseInt(_0x1e01cc(0x139))/0xa*(parseInt(_0x1e01cc(0xf2))/0xb);if(_0x2d2d60===_0x4f0c92)break;else _0x1dd612['push'](_0x1dd612['shift']());}catch(_0x2db9a3){_0x1dd612['push'](_0x1dd612['shift']());}}}(a0_0x1b00,0x2283c));Object[a0_0x96c89d(0x118)](exports,a0_0x96c89d(0x10b),{'value':!0x0}),exports['OperatoToolCreateMenu']=void 0x0;function a0_0x1b00(){const _0x328e08=['dataProp','select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27','Ctx','\x20,\x22exportable\x22:\x20true','aes256','createSortCols','readonly','1459446bKmDnH','randomBytes',',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22','__esModule','__param','default','createMenuData','462249asWEpA','{\x22name\x22:\x20\x22','h1z0q9i9x7q6','push','updater_id','refName','createSearchCols','update','searchRank','defineProperty','assign','toString','aes-256-ofb','updatedAt','createCipheriv','parent','\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','state',',\x22mandatory\x22:\x20','__metadata','tslib','\x27\x20or\x20id\x20=\x20\x27','prototype','save','Arg','aes-256-cfb8',',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22','map','COPY','2edNamL','JSON','template','stringify','creator','filter','string','crypto','code','262711urnXoX','meta-grist-page','final','hex','3390ywJTRP','getRepository','created_at','pluralize',',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22','toolCreateMenu','design:paramtypes','./../tool-secret/tool-permission','@things-factory/resource-base','menuType','\x22,\x22hidden\x22:','\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}','EntityColumn','Directive','rank','updated_at','enc','find','join','sort','7XGfScz','\x22,\x22desc\x22:','query','386648YkBeBJ','9372iKTteH','Mutation','sortRank','routing','substring','split','replace','Menu','createdAt','\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','name','{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22','gridRank','Operato\x20Tool\x20Create\x20Menu','aes-256-cfb1','left','reverseSort','resourceUrl','aes-256-cfb','type-graphql','95KywWhY','\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}','createGridColumns','23001EckSfC','hidden','{\x22type\x22:\x20\x22','length','876042rtvhBU','\x22,\x22name\x22:\x20\x22','findOne','\x22,\x22header\x22:\x20\x22','Entity',',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22','refType','design:returntype','utf8','{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22','scenario'];a0_0x1b00=function(){return _0x328e08;};return a0_0x1b00();}const tslib_1=require(a0_0x96c89d(0x123)),type_graphql_1=require(a0_0x96c89d(0xee)),resource_base_1=require(a0_0x96c89d(0xcb)),menu_base_1=require('@things-factory/menu-base'),tool_permission_1=require(a0_0x96c89d(0xca)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require('lodash'),{plural:plural}=require(a0_0x96c89d(0x13c)),crypto_1=tslib_1['__importDefault'](require(a0_0x96c89d(0x133)));let OperatoToolCreateMenu=class{async[a0_0x96c89d(0xc8)](_0x5e8137,_0x391556,_0x4a0976){const _0x4bb5f3=a0_0x96c89d,{domain:_0x3bda18,user:_0xf651d8,tx:_0x472643}=_0x4a0976[_0x4bb5f3(0x120)];await(0x0,tool_permission_1['checkStudioTemplateIsOverLimit'])('',_0x4a0976);const _0x37c19d=await _0x472643['getRepository'](resource_base_1[_0x4bb5f3(0xfa)])[_0x4bb5f3(0xf8)]({'where':{'domain':{'id':_0x3bda18['id']},'id':_0x5e8137}}),_0x670b08=await _0x472643[_0x4bb5f3(0x13a)](resource_base_1[_0x4bb5f3(0xcf)])[_0x4bb5f3(0xd4)]({'where':{'domain':{'id':_0x3bda18['id']},'entity':{'id':_0x37c19d['id']}}});let {name:_0x5db6d5=''}=_0x37c19d||{},_0x300c91=kebabCase(_0x5db6d5),_0x183691=modelTemplate[_0x4bb5f3(0xe1)](/{{pascalCase name}}/g,startCase(camelCase(_0x5db6d5))[_0x4bb5f3(0xe1)](/ /g,''))[_0x4bb5f3(0xe1)](/{{camelCase name}}/g,camelCase(_0x5db6d5))['replace'](/{{snakeCase name}}/g,snakeCase(_0x5db6d5))[_0x4bb5f3(0xe1)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x5db6d5)))['replace'](/ /g,''))[_0x4bb5f3(0xe1)](/{{pluralCamelCase name}}/g,camelCase(plural(_0x5db6d5)))['replace'](/{{name}}/g,_0x5db6d5),_0xe7c714='';_0x4bb5f3(0x12d)==_0x37c19d['dataProp']?_0xe7c714='\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':_0x4bb5f3(0x12b)==_0x37c19d[_0x4bb5f3(0x101)]&&(_0xe7c714=_0x4bb5f3(0x11f)),_0x183691=_0x183691['replace'](/{{HistoryButton}}/g,_0xe7c714);let _0x1fa72a=this['createSortCols'](_0x670b08);_0x183691=_0x183691[_0x4bb5f3(0xe1)](/{{SortColumns}}/g,_0x1fa72a['join'](','));let _0x3b6475=this['createSearchCols'](_0x670b08);_0x183691=_0x183691[_0x4bb5f3(0xe1)](/{{SearchColumns}}/g,_0x3b6475[_0x4bb5f3(0xd5)](','));let _0x1601ac=this[_0x4bb5f3(0xf1)](_0x670b08);return _0x183691=_0x183691[_0x4bb5f3(0xe1)](/{{GridColumns}}/g,_0x1601ac['join'](',')),_0x183691=this['enc'](_0x183691),await this[_0x4bb5f3(0x10e)](_0x472643,_0x3bda18,_0xf651d8,_0x391556,_0x300c91,_0x183691),!0x0;}[a0_0x96c89d(0xf1)](_0x1b679e){const _0x5d0e29=a0_0x96c89d;return _0x1b679e[_0x5d0e29(0x131)](_0x4d2ddd=>'id'!=_0x4d2ddd['name']&&_0x4d2ddd['gridRank']>0x0)[_0x5d0e29(0xd6)](function(_0x20efd3,_0x3fcea6){const _0x2c6be6=_0x5d0e29;return _0x20efd3[_0x2c6be6(0xe7)]-_0x3fcea6[_0x2c6be6(0xe7)];})[_0x5d0e29(0x12a)](_0x4ba24e=>{const _0x1ad622=_0x5d0e29;let {gridEditor:_0x371326='string',name:_0x201dc6,term:_0x2325da,gridWidth:_0x430ed3=0x0,gridAlign:_0x267181=_0x1ad622(0xea),nullable:_0x3ae4d1=!0x1}=_0x4ba24e;if(null==_0x371326&&(_0x371326='string'),null==_0x267181&&(_0x267181=_0x1ad622(0xea)),_0x1ad622(0x113)==_0x201dc6||'creator_id'==_0x201dc6)return _0x201dc6=_0x1ad622(0x113)==_0x201dc6?'updater':_0x1ad622(0x130),_0x1ad622(0xe6)+_0x201dc6+_0x1ad622(0xf9)+_0x201dc6+_0x1ad622(0xce);if(_0x1ad622(0xd2)==_0x201dc6||_0x1ad622(0x13b)==_0x201dc6)return _0x1ad622(0xff)+(_0x1ad622(0xd2)==_0x201dc6?_0x1ad622(0x11c):_0x1ad622(0xe3))+_0x1ad622(0xf9)+_0x201dc6+_0x1ad622(0xf0);let _0x42b4d8=_0x1ad622(0x107)!=_0x371326&&_0x1ad622(0xf3)!=_0x371326,_0x1f1d0f='hidden'==_0x371326;0x1!=_0x1f1d0f&&0x0!=_0x42b4d8||(_0x371326=_0x1ad622(0x132));let _0x422131=_0x1ad622(0xf4)+_0x371326+_0x1ad622(0xf7)+camelCase(_0x201dc6)+'\x22,\x22header\x22:\x20\x22'+_0x2325da+_0x1ad622(0xcd)+_0x1f1d0f+'\x20,\x22editable\x22:\x20'+_0x42b4d8+_0x1ad622(0x121)+!_0x3ae4d1+_0x1ad622(0xfb)+_0x267181+'\x22,\x22width\x22:'+_0x430ed3+_0x1ad622(0x104);return _0x1ad622(0x134)==_0x4ba24e[_0x1ad622(0xfc)]&&(_0x422131+=_0x1ad622(0xc7)+_0x4ba24e[_0x1ad622(0x114)]+'\x22}'),_0x1ad622(0x100)==_0x4ba24e[_0x1ad622(0xfc)]&&(_0x422131+=_0x1ad622(0x10a)+_0x4ba24e[_0x1ad622(0x114)]+'\x22}'),'entity'==_0x4ba24e[_0x1ad622(0xfc)]&&(_0x422131+=_0x1ad622(0x129)+camelCase(plural(_0x4ba24e[_0x1ad622(0x114)]))+'\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}'),_0x422131+='}',_0x422131;});}[a0_0x96c89d(0x115)](_0x2dbc8f){const _0x159ba5=a0_0x96c89d;return _0x2dbc8f[_0x159ba5(0x131)](_0x563ba5=>_0x563ba5['searchRank']>0x0)[_0x159ba5(0xd6)](function(_0xe1e388,_0x14d6a1){const _0x353768=_0x159ba5;return _0xe1e388[_0x353768(0x117)]-_0x14d6a1[_0x353768(0x117)];})['map'](_0x2e2239=>{const _0x5a3b12=_0x159ba5;let _0x1a989d=_0x2e2239['searchOper'];return'filter'==_0x1a989d?'\x22'+camelCase(_0x2e2239[_0x5a3b12(0xe5)])+'\x22':(_0x1a989d||(_0x1a989d='eq'),_0x5a3b12(0x110)+camelCase(_0x2e2239[_0x5a3b12(0xe5)])+'\x22,\x22operator\x22:\x20\x22'+_0x1a989d+'\x22}');});}[a0_0x96c89d(0x106)](_0x283488){const _0x126180=a0_0x96c89d;return _0x283488[_0x126180(0x131)](_0x22968c=>_0x22968c[_0x126180(0xdd)]>0x0)[_0x126180(0xd6)](function(_0x492e6d,_0xa13393){const _0x221f42=_0x126180;return _0x492e6d['sortRank']-_0xa13393[_0x221f42(0xdd)];})['map'](_0x111d5a=>'{\x22name\x22:\x22'+camelCase(_0x111d5a[_0x126180(0xe5)])+_0x126180(0xd8)+_0x111d5a[_0x126180(0xeb)]+'}');}async[a0_0x96c89d(0x10e)](_0xd8b17a,_0x4bb7e7,_0x5cfbd2,_0x205bc0,_0x57be82,_0x1fb588){const _0x3b9674=a0_0x96c89d;let _0x4af9a0=await _0xd8b17a[_0x3b9674(0x13a)](menu_base_1['Menu'])[_0x3b9674(0xf8)]({'where':{'domain':{'id':_0x4bb7e7['id']},'id':_0x205bc0}}),_0x5c4b45=(await _0xd8b17a[_0x3b9674(0x13a)](menu_base_1[_0x3b9674(0xe2)])[_0x3b9674(0xd9)](_0x3b9674(0x102)+_0x205bc0+_0x3b9674(0x124)+_0x205bc0+'\x27'))[0x0][_0x3b9674(0xd1)]+0xa,_0x227194=new menu_base_1[(_0x3b9674(0xe2))]();_0x227194[_0x3b9674(0xe5)]=_0x57be82,_0x227194[_0x3b9674(0xcc)]='SCREEN',_0x227194['category']=_0x3b9674(0x136),_0x227194[_0x3b9674(0xd1)]=_0x5c4b45,_0x227194['hiddenFlag']=!0x1,_0x227194[_0x3b9674(0xde)]=_0x57be82,_0x227194[_0x3b9674(0x12e)]=_0x1fb588,_0x227194[_0x3b9674(0xec)]='@things-factory/meta-ui/client/pages/meta-grist-page',_0x227194[_0x3b9674(0x11e)]=_0x4af9a0,await _0xd8b17a[_0x3b9674(0x13a)](menu_base_1[_0x3b9674(0xe2)])[_0x3b9674(0x126)](Object[_0x3b9674(0x119)](Object[_0x3b9674(0x119)]({},_0x227194),{'domain':_0x4bb7e7,'creator':_0x5cfbd2,'updater':_0x5cfbd2}));}[a0_0x96c89d(0xd3)](_0xf31c25){const _0x356f2a=a0_0x96c89d;let _0x1fa6f9=JSON[_0x356f2a(0x12f)](_0xf31c25)[_0x356f2a(0xe0)](/(.{100})/)['filter'](_0x34097d=>_0x34097d),_0x1969e9=['aes-256-ecb','aes-256-cbc',_0x356f2a(0xed),_0x356f2a(0x128),_0x356f2a(0xe9),_0x356f2a(0x11b),'aes-256-ctr',_0x356f2a(0x105)],_0x83579c=crypto_1['default'][_0x356f2a(0x109)](0x20)[_0x356f2a(0x11a)](_0x356f2a(0x138)),_0x1de8c6=Buffer['from'](_0x83579c,'hex'),_0x1e5058=_0x83579c[_0x356f2a(0xdf)](0x0,0x10),_0x4801ae=['',_0x1e5058,_0x1e5058,_0x1e5058,_0x1e5058,_0x1e5058,_0x1e5058,_0x1e5058],_0x63310e=0x0,_0x12b2ca=[];_0x12b2ca[_0x356f2a(0x112)](_0x83579c);for(var _0x433e11=0x0;_0x433e11<_0x1fa6f9[_0x356f2a(0xf5)];_0x433e11++,_0x63310e++){_0x63310e==_0x1969e9['length']&&(_0x63310e=0x0);let _0x21052b=crypto_1[_0x356f2a(0x10d)][_0x356f2a(0x11d)](_0x1969e9[_0x63310e],_0x1de8c6,_0x4801ae[_0x63310e]),_0x51e39f=_0x21052b[_0x356f2a(0x116)](_0x1fa6f9[_0x433e11],_0x356f2a(0xfe),'hex');_0x51e39f+=_0x21052b[_0x356f2a(0x137)](_0x356f2a(0x138)),_0x12b2ca[_0x356f2a(0x112)](_0x51e39f);}return _0x12b2ca['join'](_0x356f2a(0x111));}};tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x96c89d(0xd0)])('@transaction'),(0x0,type_graphql_1[a0_0x96c89d(0xdc)])(_0x4aa713=>Boolean,{'description':a0_0x96c89d(0xe8)}),tslib_1[a0_0x96c89d(0x10c)](0x0,(0x0,type_graphql_1[a0_0x96c89d(0x127)])('id')),tslib_1[a0_0x96c89d(0x10c)](0x1,(0x0,type_graphql_1[a0_0x96c89d(0x127)])('parent_menu_id')),tslib_1[a0_0x96c89d(0x10c)](0x2,(0x0,type_graphql_1[a0_0x96c89d(0x103)])()),tslib_1[a0_0x96c89d(0x122)]('design:type',Function),tslib_1['__metadata'](a0_0x96c89d(0xc9),[String,String,Object]),tslib_1['__metadata'](a0_0x96c89d(0xfd),Promise)],OperatoToolCreateMenu[a0_0x96c89d(0x125)],'toolCreateMenu',null),OperatoToolCreateMenu=tslib_1['__decorate']([(0x0,type_graphql_1['Resolver'])()],OperatoToolCreateMenu),exports['OperatoToolCreateMenu']=OperatoToolCreateMenu;const modelTemplate=a0_0x96c89d(0xe4);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x435ef5=a0_0x3497;(function(_0x448d0b,_0x3787db){const _0x3b9288=a0_0x3497,_0x9cccd5=_0x448d0b();while(!![]){try{const _0x335448=-parseInt(_0x3b9288(0x273))/0x1+parseInt(_0x3b9288(0x1ec))/0x2*(parseInt(_0x3b9288(0x1fe))/0x3)+-parseInt(_0x3b9288(0x1ee))/0x4+parseInt(_0x3b9288(0x1e9))/0x5+parseInt(_0x3b9288(0x258))/0x6*(parseInt(_0x3b9288(0x24e))/0x7)+parseInt(_0x3b9288(0x1fb))/0x8+parseInt(_0x3b9288(0x222))/0x9;if(_0x335448===_0x3787db)break;else _0x9cccd5['push'](_0x9cccd5['shift']());}catch(_0x1131ae){_0x9cccd5['push'](_0x9cccd5['shift']());}}}(a0_0x1a2d,0x61d4e));function a0_0x1a2d(){const _0x2ea3ea=['\x27,\x20type:\x20\x27','Ctx','\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','export\x20*\x20from\x20\x27./','indexOf','-history-query.ts','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','createTypeText','integer','nullable','created_at','character\x20varying','/event-subscriber.ts','EntitySubscribers\x20}\x20from\x20\x27./','7ZyPFFs','/index.ts','getFieldType','-history\x27','createEntityText','length','lodash',',length:','writeFileSync','tslib','2655186ifmNJc','Entities,\x20resolvers\x20as\x20','createHistoryEntityText','-mutation.ts','COPY','creator','__esModule','rank','creator_id','__param','mkdirSync','\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}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','Resolvers,\x20subscribers\x20as\x20','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','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\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','long','Query','writeFile','join','-history-type.ts','createHistoryServiceFiles','prototype','createServiceFiles','@Field(','\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','-type.ts','785687wdbfWi','getRepository','EntitySubscribers,','text','\x20})','Entity','1827990kmKmVB','defineProperty','design:returntype','28506ecinma','toolCreateService','1598684KLYpow','type-graphql','updated_at','find','env','colType','\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','.ts','PWD','string','double','Entities,','Arg','1213720UkHNRi','replaceNamesMap','columnToEntityColumn','15QBboEJ','datetime','push','-query.ts','@Column({name:\x27','sort','\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','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','uniqRank','OperatoToolCreateService','design:type','\x0a\x20\x20','pascalCaseName','design:paramtypes','includes','domain_id','\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','dataProp','/service','@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})','tableName','createDir','Resolvers,','\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','\x20{\x20nullable:\x20','EntityColumn','Resolvers\x20}\x20from\x20\x27./','createServicePath','/server/service/','@things-factory/resource-base','/server','double\x20precision','map','existsPath','__metadata','getProjectRootPath','4994703tWvcuX','type\x20=>','Operato\x20Tool\x20Create\x20Service','Resolver','bigint','date','...','index.ts','/packages/','createNoHistoryServiceFiels','\x0a\x20\x20public\x20createHistoryEntity(manager,\x20entity)\x20{\x0a\x20\x20\x20\x20let\x20history\x20=\x20manager.create(this.historyEntity,\x20entity);\x0a\x20\x20\x20\x20history.historyJson\x20=\x20JSON.stringify(entity);\x0a\x20\x20\x20\x20return\x20history;\x0a\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20','\x0aimport\x20{\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','JSON','pluralCamelCaseName','utf8','readFileSync','getColTxtType','\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','replace','@things-factory/shell','name','colSize','\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','\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201','/packages','Date','Int','packages','updater_id','number'];a0_0x1a2d=function(){return _0x2ea3ea;};return a0_0x1a2d();}Object[a0_0x435ef5(0x1ea)](exports,a0_0x435ef5(0x25e),{'value':!0x0}),exports[a0_0x435ef5(0x207)]=void 0x0;const tslib_1=require(a0_0x435ef5(0x257)),type_graphql_1=require(a0_0x435ef5(0x1ef)),shell_1=require(a0_0x435ef5(0x235)),resource_base_1=require(a0_0x435ef5(0x21b)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x435ef5(0x254)),{plural:plural}=require('pluralize'),fs=require('fs');function a0_0x3497(_0x37e7d4,_0x5e3ad0){const _0x1a2db0=a0_0x1a2d();return a0_0x3497=function(_0x34976f,_0x45202e){_0x34976f=_0x34976f-0x1e6;let _0xdc1e1d=_0x1a2db0[_0x34976f];return _0xdc1e1d;},a0_0x3497(_0x37e7d4,_0x5e3ad0);}let OperatoToolCreateService=class{async[a0_0x435ef5(0x1ed)](_0x4f9748,_0xf7f09c){const _0x4d99dc=a0_0x435ef5,{domain:_0x15d42f}=_0xf7f09c['state'],_0x47244d=await(0x0,shell_1[_0x4d99dc(0x274)])(resource_base_1[_0x4d99dc(0x1e8)])['findOne']({'where':{'id':_0x4f9748}}),_0x4af661=await(0x0,shell_1[_0x4d99dc(0x274)])(resource_base_1[_0x4d99dc(0x217)])[_0x4d99dc(0x1f1)]({'where':{'domain':{'id':_0x15d42f['id']},'entity':{'id':_0x47244d['id']}}});let {name:_0x74c15d='',bundle:_0x22d571=''}=_0x47244d||{},_0xbdf183=this[_0x4d99dc(0x221)](),_0x1a5765=kebabCase(_0x74c15d);return await this['createServicePath'](_0xbdf183,_0x22d571,_0x1a5765),await this['createServiceFiles'](_0xbdf183,_0x22d571,_0x74c15d,_0x1a5765,_0x47244d,_0x4af661),!0x0;}async[a0_0x435ef5(0x26f)](_0x2faa6b,_0x49cc0d,_0x4a5d51,_0x4c26d0,_0x4dd104,_0x50f1ee){const _0x366f7f=a0_0x435ef5;let _0x39a795={'name':_0x4c26d0,'tableName':_0x4dd104[_0x366f7f(0x212)],'pascalCaseName':startCase(camelCase(_0x4a5d51))[_0x366f7f(0x234)](/ /g,''),'camelCaseName':camelCase(_0x4a5d51),'snakeCaseName':snakeCase(_0x4a5d51),'pluralPascalCaseName':startCase(camelCase(plural(_0x4a5d51)))[_0x366f7f(0x234)](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x4a5d51))},_0x40c449=_0x2faa6b+_0x366f7f(0x22a)+_0x49cc0d+_0x366f7f(0x21a);[_0x366f7f(0x22e),_0x366f7f(0x25c)][_0x366f7f(0x20c)](_0x4dd104[_0x366f7f(0x20f)])?await this[_0x366f7f(0x26d)](_0x40c449,_0x4c26d0,_0x4dd104,_0x50f1ee,_0x39a795):await this[_0x366f7f(0x22b)](_0x40c449,_0x4c26d0,_0x4dd104,_0x50f1ee,_0x39a795);}async[a0_0x435ef5(0x26d)](_0x4df9a6,_0x1cb22d,_0x36dfce,_0x576973,_0x5edaee){const _0x3d3559=a0_0x435ef5;await this[_0x3d3559(0x26a)](_0x4df9a6+(_0x1cb22d+_0x3d3559(0x24f)),serviceHistoryIndex,_0x5edaee);let _0x44d276=this[_0x3d3559(0x252)](_0x36dfce,_0x576973);await this['writeFile'](_0x4df9a6+(_0x1cb22d+'/'+_0x1cb22d+'.ts'),_0x44d276,_0x5edaee),await this['writeFile'](_0x4df9a6+(_0x1cb22d+'/'+_0x1cb22d+_0x3d3559(0x201)),serviceQuery,_0x5edaee),await this[_0x3d3559(0x26a)](_0x4df9a6+(_0x1cb22d+'/'+_0x1cb22d+_0x3d3559(0x25b)),serviceMutation,_0x5edaee);let _0x398b1d=this[_0x3d3559(0x247)](_0x576973);await this['writeFile'](_0x4df9a6+(_0x1cb22d+'/'+_0x1cb22d+'-type.ts'),_0x398b1d,_0x5edaee);let _0xeb5fbb=this['createHistoryEntityText'](_0x36dfce,_0x576973);await this[_0x3d3559(0x26a)](_0x4df9a6+(_0x1cb22d+'/'+_0x1cb22d+'-history.ts'),_0xeb5fbb,_0x5edaee);let _0x327b12='';_0x3d3559(0x22e)==_0x36dfce[_0x3d3559(0x20f)]?(_0x327b12=_0x3d3559(0x22c),await this[_0x3d3559(0x26a)](_0x4df9a6+(_0x1cb22d+'/event-subscriber.ts'),serviceEntitySubscriber,_0x5edaee)):_0x327b12='';let _0x191b80=serviceEntitySubscriber[_0x3d3559(0x234)](/{{entityToJson}}/g,_0x327b12);await this[_0x3d3559(0x26a)](_0x4df9a6+(_0x1cb22d+_0x3d3559(0x24c)),_0x191b80,_0x5edaee),await this[_0x3d3559(0x26a)](_0x4df9a6+(_0x1cb22d+'/'+_0x1cb22d+_0x3d3559(0x245)),serviceHistoryQuery,_0x5edaee),await this[_0x3d3559(0x26a)](_0x4df9a6+(_0x1cb22d+'/'+_0x1cb22d+_0x3d3559(0x26c)),sereviceHistoryType,_0x5edaee);let _0x161e2f=_0x4df9a6+'index.ts';0x0==await this['existsPath'](_0x161e2f)&&await this[_0x3d3559(0x26a)](_0x161e2f,allIndex,_0x5edaee);let _0x5d50a2=await fs[_0x3d3559(0x231)](_0x161e2f,_0x3d3559(0x230));_0x5d50a2[_0x3d3559(0x244)](_0x3d3559(0x243)+_0x5edaee['name']+'/'+_0x5edaee[_0x3d3559(0x236)]+_0x3d3559(0x251))<0x0&&(_0x5d50a2=_0x5d50a2['replace'](/\/\* EXPORT ENTITY TYPES \*\//,_0x3d3559(0x265)+_0x5edaee['name']+'/'+_0x5edaee['name']+'-history\x27')),_0x5d50a2[_0x3d3559(0x244)](_0x3d3559(0x243)+_0x5edaee[_0x3d3559(0x236)]+'/'+_0x5edaee[_0x3d3559(0x236)]+'\x27')<0x0&&(_0x5d50a2=_0x5d50a2[_0x3d3559(0x234)](/\/\* EXPORT ENTITY TYPES \*\//,_0x3d3559(0x265)+_0x5edaee[_0x3d3559(0x236)]+'/'+_0x5edaee[_0x3d3559(0x236)]+'\x27')),_0x5d50a2['indexOf']('import\x20{\x20entities\x20as\x20'+_0x5edaee[_0x3d3559(0x20a)]+_0x3d3559(0x259)+_0x5edaee['pascalCaseName']+'Resolvers,\x20subscribers\x20as\x20'+_0x5edaee['pascalCaseName']+_0x3d3559(0x24d)+_0x5edaee[_0x3d3559(0x236)]+'\x27')<0x0&&(_0x5d50a2=_0x5d50a2[_0x3d3559(0x234)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x3d3559(0x205)+_0x5edaee[_0x3d3559(0x20a)]+_0x3d3559(0x259)+_0x5edaee[_0x3d3559(0x20a)]+_0x3d3559(0x264)+_0x5edaee[_0x3d3559(0x20a)]+_0x3d3559(0x24d)+_0x5edaee[_0x3d3559(0x236)]+'\x27')),_0x5d50a2[_0x3d3559(0x244)](_0x3d3559(0x228)+_0x5edaee[_0x3d3559(0x20a)]+_0x3d3559(0x1f9))<0x0&&(_0x5d50a2=_0x5d50a2[_0x3d3559(0x234)](/\/\* ENTITIES \*\//,'/*\x20ENTITIES\x20*/\x0a\x09...'+_0x5edaee['pascalCaseName']+_0x3d3559(0x1f9))),_0x5d50a2[_0x3d3559(0x244)](_0x3d3559(0x228)+_0x5edaee['pascalCaseName']+_0x3d3559(0x214))<0x0&&(_0x5d50a2=_0x5d50a2[_0x3d3559(0x234)](/\/\* RESOLVER CLASSES \*\//,_0x3d3559(0x246)+_0x5edaee[_0x3d3559(0x20a)]+_0x3d3559(0x214))),_0x5d50a2[_0x3d3559(0x244)](_0x3d3559(0x228)+_0x5edaee[_0x3d3559(0x20a)]+_0x3d3559(0x275))<0x0&&(_0x5d50a2=_0x5d50a2['replace'](/\/\* SUBSCRIBERS \*\//,'/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...'+_0x5edaee['pascalCaseName']+_0x3d3559(0x275))),await this['writeFile'](_0x161e2f,_0x5d50a2,_0x5edaee);}async['createNoHistoryServiceFiels'](_0x334b6c,_0x409c4c,_0x16f30c,_0x4b23d5,_0x455d4a){const _0x1fe10e=a0_0x435ef5;await this[_0x1fe10e(0x26a)](_0x334b6c+(_0x409c4c+'/index.ts'),serviceIndex,_0x455d4a),await this[_0x1fe10e(0x26a)](_0x334b6c+(_0x409c4c+'/'+_0x409c4c+'-query.ts'),serviceQuery,_0x455d4a),await this[_0x1fe10e(0x26a)](_0x334b6c+(_0x409c4c+'/'+_0x409c4c+_0x1fe10e(0x25b)),serviceMutation,_0x455d4a);let _0x30a7ba=this[_0x1fe10e(0x252)](_0x16f30c,_0x4b23d5);await this['writeFile'](_0x334b6c+(_0x409c4c+'/'+_0x409c4c+_0x1fe10e(0x1f5)),_0x30a7ba,_0x455d4a);let _0x15be65=this[_0x1fe10e(0x247)](_0x4b23d5);await this[_0x1fe10e(0x26a)](_0x334b6c+(_0x409c4c+'/'+_0x409c4c+_0x1fe10e(0x272)),_0x15be65,_0x455d4a);let _0x22c0bc=_0x334b6c+_0x1fe10e(0x229);0x0==await this[_0x1fe10e(0x21f)](_0x22c0bc)&&await this[_0x1fe10e(0x26a)](_0x22c0bc,allIndex,_0x455d4a);let _0x5a8385=await fs[_0x1fe10e(0x231)](_0x22c0bc,_0x1fe10e(0x230));_0x5a8385['indexOf'](_0x1fe10e(0x243)+_0x455d4a['name']+'/'+_0x455d4a[_0x1fe10e(0x236)]+'\x27')<0x0&&(_0x5a8385=_0x5a8385['replace'](/\/\* EXPORT ENTITY TYPES \*\//,'/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./'+_0x455d4a[_0x1fe10e(0x236)]+'/'+_0x455d4a['name']+'\x27')),_0x5a8385[_0x1fe10e(0x244)]('import\x20{\x20entities\x20as\x20'+_0x455d4a['pascalCaseName']+_0x1fe10e(0x259)+_0x455d4a[_0x1fe10e(0x20a)]+_0x1fe10e(0x218)+_0x455d4a[_0x1fe10e(0x236)]+'\x27')<0x0&&(_0x5a8385=_0x5a8385[_0x1fe10e(0x234)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,'/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20'+_0x455d4a[_0x1fe10e(0x20a)]+_0x1fe10e(0x259)+_0x455d4a[_0x1fe10e(0x20a)]+_0x1fe10e(0x218)+_0x455d4a[_0x1fe10e(0x236)]+'\x27')),_0x5a8385[_0x1fe10e(0x244)](_0x1fe10e(0x228)+_0x455d4a[_0x1fe10e(0x20a)]+_0x1fe10e(0x1f9))<0x0&&(_0x5a8385=_0x5a8385[_0x1fe10e(0x234)](/\/\* ENTITIES \*\//,'/*\x20ENTITIES\x20*/\x0a\x09...'+_0x455d4a[_0x1fe10e(0x20a)]+_0x1fe10e(0x1f9))),_0x5a8385['indexOf'](_0x1fe10e(0x228)+_0x455d4a[_0x1fe10e(0x20a)]+_0x1fe10e(0x214))<0x0&&(_0x5a8385=_0x5a8385[_0x1fe10e(0x234)](/\/\* RESOLVER CLASSES \*\//,_0x1fe10e(0x246)+_0x455d4a[_0x1fe10e(0x20a)]+_0x1fe10e(0x214))),await this[_0x1fe10e(0x26a)](_0x22c0bc,_0x5a8385,_0x455d4a);}[a0_0x435ef5(0x247)](_0x5f2883){const _0x2d350e=a0_0x435ef5;let _0x4887d1=sereviceType,_0x23af70=_0x5f2883[_0x2d350e(0x21e)](_0x2d4dcb=>{const _0x18c56=_0x2d350e;if('id'==_0x2d4dcb['name'])return'';if('domain_id'==_0x2d4dcb[_0x18c56(0x236)])return'';if('created_at'==_0x2d4dcb['name'])return'';if('updated_at'==_0x2d4dcb['name'])return'';if(_0x18c56(0x260)==_0x2d4dcb[_0x18c56(0x236)])return'';if('updater_id'==_0x2d4dcb[_0x18c56(0x236)])return'';let _0x105f94=this[_0x18c56(0x250)](_0x2d4dcb),_0x59970f=this[_0x18c56(0x232)](_0x2d4dcb),_0x5bfa7f=camelCase(_0x2d4dcb[_0x18c56(0x236)]);return'\x20\x20'+('@Field('+(0x0==_0x105f94[_0x18c56(0x253)]?'':_0x18c56(0x223)+_0x105f94+',')+_0x18c56(0x216)+_0x2d4dcb[_0x18c56(0x249)]+_0x18c56(0x1e7))+_0x18c56(0x209)+(''+_0x5bfa7f+(_0x2d4dcb[_0x18c56(0x249)]?'?':'')+':\x20'+_0x59970f)+'\x0a';});_0x4887d1=_0x4887d1[_0x2d350e(0x234)](/{{newTypeColumns}}/g,_0x23af70[_0x2d350e(0x26b)]('\x0a'));let _0x31d58e=_0x5f2883[_0x2d350e(0x21e)](_0x1e0049=>{const _0x464960=_0x2d350e;if('id'==_0x1e0049[_0x464960(0x236)])return'';if(_0x464960(0x20d)==_0x1e0049[_0x464960(0x236)])return'';if(_0x464960(0x24a)==_0x1e0049[_0x464960(0x236)])return'';if(_0x464960(0x1f0)==_0x1e0049['name'])return'';if('creator_id'==_0x1e0049[_0x464960(0x236)])return'';if(_0x464960(0x23e)==_0x1e0049['name'])return'';let _0x1aa467=this[_0x464960(0x250)](_0x1e0049),_0x630370=this['getColTxtType'](_0x1e0049);_0x1e0049[_0x464960(0x249)]=!0x0;let _0x4bea2f=camelCase(_0x1e0049[_0x464960(0x236)]);return'\x20\x20'+(_0x464960(0x270)+(0x0==_0x1aa467[_0x464960(0x253)]?'':_0x464960(0x223)+_0x1aa467+',')+_0x464960(0x216)+_0x1e0049['nullable']+_0x464960(0x1e7))+_0x464960(0x209)+(''+_0x4bea2f+(_0x1e0049[_0x464960(0x249)]?'?':'')+':\x20'+_0x630370)+'\x0a';});return _0x4887d1=_0x4887d1['replace'](/{{patchTypeColumns}}/g,_0x31d58e[_0x2d350e(0x26b)]('\x0a')),_0x4887d1;}[a0_0x435ef5(0x252)](_0x5cd08c,_0x34d7f0){const _0xbfad0a=a0_0x435ef5;let _0x16e693=serviceEntity,_0x4b51d7=_0x34d7f0[_0xbfad0a(0x203)](function(_0x1cef14,_0x3a97a2){const _0x2c95f9=_0xbfad0a;return _0x1cef14[_0x2c95f9(0x25f)]-_0x3a97a2[_0x2c95f9(0x25f)];})[_0xbfad0a(0x21e)](_0x502f53=>this[_0xbfad0a(0x1fd)](_0x502f53));[_0xbfad0a(0x25c),_0xbfad0a(0x22e)][_0xbfad0a(0x20c)](_0x5cd08c[_0xbfad0a(0x20f)])&&_0x4b51d7[_0xbfad0a(0x200)](_0xbfad0a(0x239)),_0x16e693=_0x16e693[_0xbfad0a(0x234)](/{{entityColumns}}/g,_0x4b51d7[_0xbfad0a(0x26b)]('\x0a'));let _0x525a38='',_0x496d2f=_0x34d7f0['filter'](_0x3f4ee0=>_0x3f4ee0['uniqRank']&&_0x3f4ee0[_0xbfad0a(0x206)]>0x0)[_0xbfad0a(0x203)](function(_0x56ebbf,_0x55f161){const _0x5d5c2d=_0xbfad0a;return _0x56ebbf[_0x5d5c2d(0x206)]-_0x55f161[_0x5d5c2d(0x206)];});if(_0x496d2f[_0xbfad0a(0x253)]>0x0){_0x525a38=_0xbfad0a(0x211);let _0x102542=_0x496d2f['map'](_0x2c5b03=>{const _0x2260ec=_0xbfad0a;let _0x263d08=_0x2c5b03[_0x2260ec(0x236)];return _0x2260ec(0x20d)==_0x2c5b03['name']&&(_0x263d08='domain'),_0x2260ec(0x260)==_0x2c5b03[_0x2260ec(0x236)]&&(_0x263d08=_0x2260ec(0x25d)),_0x2260ec(0x23e)==_0x2c5b03['name']&&(_0x263d08='updater'),'{{camelCase\x20name}}.'+camelCase(_0x263d08);});_0x525a38=_0x525a38[_0xbfad0a(0x234)](/{{indexColumns}}/g,_0x102542[_0xbfad0a(0x26b)](','));}return _0x16e693=_0x16e693[_0xbfad0a(0x234)](/{{indexAnn}}/g,_0x525a38),_0x16e693;}[a0_0x435ef5(0x25a)](_0x8966c3,_0x391fc4){const _0x56bf02=a0_0x435ef5;let _0x35eb86=_0x56bf02(0x22e)==_0x8966c3[_0x56bf02(0x20f)]?serviceEntityHistJson:serviceEntityHistCopy,_0x2b401e=_0x391fc4[_0x56bf02(0x203)](function(_0x327a9e,_0x4c5e4c){const _0x3c4dc8=_0x56bf02;return _0x327a9e[_0x3c4dc8(0x25f)]-_0x4c5e4c['rank'];})[_0x56bf02(0x21e)](_0x1c976b=>this['columnToEntityColumn'](_0x1c976b));return _0x35eb86=_0x35eb86['replace'](/{{entityColumns}}/g,_0x2b401e['join']('\x0a')),_0x35eb86;}[a0_0x435ef5(0x1fd)](_0x43d253){const _0x4a1c32=a0_0x435ef5;if('id'==_0x43d253[_0x4a1c32(0x236)])return'';if(_0x4a1c32(0x20d)==_0x43d253[_0x4a1c32(0x236)])return'';if(_0x4a1c32(0x24a)==_0x43d253[_0x4a1c32(0x236)])return'';if(_0x4a1c32(0x1f0)==_0x43d253[_0x4a1c32(0x236)])return'';if(_0x4a1c32(0x260)==_0x43d253[_0x4a1c32(0x236)])return'';if('updater_id'==_0x43d253[_0x4a1c32(0x236)])return'';let _0x13608e=_0x43d253['colType'];_0x4a1c32(0x1f8)==_0x43d253[_0x4a1c32(0x1f3)]&&(_0x13608e=_0x4a1c32(0x21d)),_0x4a1c32(0x268)==_0x43d253[_0x4a1c32(0x1f3)]&&(_0x13608e=_0x4a1c32(0x226)),_0x4a1c32(0x1f7)==_0x43d253[_0x4a1c32(0x1f3)]&&(_0x13608e=_0x4a1c32(0x24b)),_0x4a1c32(0x1ff)==_0x43d253[_0x4a1c32(0x1f3)]&&(_0x13608e='timestamp\x20without\x20time\x20zone');let _0x3203a5='';'string'==_0x43d253[_0x4a1c32(0x1f3)]&&(_0x3203a5=_0x43d253[_0x4a1c32(0x237)]);let _0x5b7fde=this[_0x4a1c32(0x250)](_0x43d253),_0x397b50=this[_0x4a1c32(0x232)](_0x43d253),_0x1b59e0=camelCase(_0x43d253[_0x4a1c32(0x236)]);return'\x20\x20'+(_0x4a1c32(0x202)+_0x43d253[_0x4a1c32(0x236)]+_0x4a1c32(0x240)+_0x13608e+'\x27,\x20nullable:\x20'+_0x43d253['nullable']+'\x20'+(0x0==_0x3203a5[_0x4a1c32(0x253)]?'':_0x4a1c32(0x255)+_0x3203a5)+_0x4a1c32(0x1e7))+_0x4a1c32(0x209)+(_0x4a1c32(0x270)+(0x0==_0x5b7fde[_0x4a1c32(0x253)]?'':_0x4a1c32(0x223)+_0x5b7fde+',')+_0x4a1c32(0x216)+_0x43d253['nullable']+_0x4a1c32(0x1e7))+_0x4a1c32(0x209)+(''+_0x1b59e0+(_0x43d253[_0x4a1c32(0x249)]?'?':'')+':\x20'+_0x397b50)+'\x0a';}[a0_0x435ef5(0x250)](_0x1e43dd){const _0x16f0fa=a0_0x435ef5;let _0xe82db5='';return _0x16f0fa(0x1f8)==_0x1e43dd[_0x16f0fa(0x1f3)]&&(_0xe82db5='Float'),'float'==_0x1e43dd[_0x16f0fa(0x1f3)]&&(_0xe82db5='Float'),'long'==_0x1e43dd[_0x16f0fa(0x1f3)]&&(_0xe82db5=_0x16f0fa(0x23c)),_0x16f0fa(0x248)==_0x1e43dd[_0x16f0fa(0x1f3)]&&(_0xe82db5=_0x16f0fa(0x23c)),_0xe82db5;}['getColTxtType'](_0x57db9b){const _0xd819e6=a0_0x435ef5;let _0x18b380=_0x57db9b[_0xd819e6(0x1f3)];return'decimal'==_0x57db9b[_0xd819e6(0x1f3)]&&(_0x18b380='number'),_0xd819e6(0x1f8)==_0x57db9b[_0xd819e6(0x1f3)]&&(_0x18b380=_0xd819e6(0x23f)),'float'==_0x57db9b[_0xd819e6(0x1f3)]&&(_0x18b380=_0xd819e6(0x23f)),_0xd819e6(0x248)==_0x57db9b[_0xd819e6(0x1f3)]&&(_0x18b380='number'),_0xd819e6(0x268)==_0x57db9b['colType']&&(_0x18b380='number'),'datetime'==_0x57db9b[_0xd819e6(0x1f3)]&&(_0x18b380=_0xd819e6(0x23b)),_0xd819e6(0x227)==_0x57db9b[_0xd819e6(0x1f3)]&&(_0x18b380='Date'),_0xd819e6(0x1e6)==_0x57db9b[_0xd819e6(0x1f3)]&&(_0x18b380=_0xd819e6(0x1f7)),_0x18b380;}async[a0_0x435ef5(0x26a)](_0x5c71d0,_0x3b97a8,_0x52017a){const _0x432be8=a0_0x435ef5;await fs[_0x432be8(0x256)](_0x5c71d0,this[_0x432be8(0x1fc)](_0x3b97a8,_0x52017a),_0x432be8(0x230));}['replaceNamesMap'](_0x4ef0c9,_0x135592){const _0xcd950e=a0_0x435ef5;return _0x4ef0c9[_0xcd950e(0x234)](/{{pascalCase name}}/g,_0x135592[_0xcd950e(0x20a)])[_0xcd950e(0x234)](/{{camelCase name}}/g,_0x135592['camelCaseName'])[_0xcd950e(0x234)](/{{snakeCase name}}/g,_0x135592['snakeCaseName'])[_0xcd950e(0x234)](/{{pluralPascalCase name}}/g,_0x135592[_0xcd950e(0x266)])[_0xcd950e(0x234)](/{{pluralCamelCase name}}/g,_0x135592[_0xcd950e(0x22f)])[_0xcd950e(0x234)](/{{tableName}}/g,_0x135592['tableName'])[_0xcd950e(0x234)](/{{name}}/g,_0x135592[_0xcd950e(0x236)]);}async[a0_0x435ef5(0x219)](_0x4ee2db,_0x592cb8,_0x35a41d){const _0x70bf8f=a0_0x435ef5;let _0x349ba9=_0x4ee2db+_0x70bf8f(0x23a);await this[_0x70bf8f(0x213)](_0x349ba9),_0x349ba9=_0x349ba9+'/'+_0x592cb8,await this[_0x70bf8f(0x213)](_0x349ba9),_0x349ba9+=_0x70bf8f(0x21c),await this[_0x70bf8f(0x213)](_0x349ba9),_0x349ba9+=_0x70bf8f(0x210),await this['createDir'](_0x349ba9),_0x349ba9=_0x349ba9+'/'+_0x35a41d,await this[_0x70bf8f(0x213)](_0x349ba9);}[a0_0x435ef5(0x221)](){const _0x5c8589=a0_0x435ef5;let _0x232469=process[_0x5c8589(0x1f2)][_0x5c8589(0x1f6)]['split']('/'),_0x3749a1=[];for(let _0x47a3de=0x0;_0x47a3de<_0x232469[_0x5c8589(0x253)]&&_0x5c8589(0x23d)!=_0x232469[_0x47a3de];_0x47a3de++)_0x3749a1['push'](_0x232469[_0x47a3de]);return _0x3749a1['join']('/');}async['createDir'](_0x4ca483){const _0x132dbb=a0_0x435ef5;0x0==await this[_0x132dbb(0x21f)](_0x4ca483)&&fs[_0x132dbb(0x262)](_0x4ca483);}async[a0_0x435ef5(0x21f)](_0x2104ff){return await fs['existsSync'](_0x2104ff);}};tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x435ef5(0x269)])(_0x5f3995=>Boolean,{'description':a0_0x435ef5(0x224)}),tslib_1[a0_0x435ef5(0x261)](0x0,(0x0,type_graphql_1[a0_0x435ef5(0x1fa)])('id')),tslib_1[a0_0x435ef5(0x261)](0x1,(0x0,type_graphql_1[a0_0x435ef5(0x241)])()),tslib_1['__metadata'](a0_0x435ef5(0x208),Function),tslib_1[a0_0x435ef5(0x220)](a0_0x435ef5(0x20b),[String,Object]),tslib_1[a0_0x435ef5(0x220)](a0_0x435ef5(0x1eb),Promise)],OperatoToolCreateService[a0_0x435ef5(0x26e)],a0_0x435ef5(0x1ed),null),OperatoToolCreateService=tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x435ef5(0x225)])()],OperatoToolCreateService),exports['OperatoToolCreateService']=OperatoToolCreateService;const allIndex=a0_0x435ef5(0x238),serviceIndex=a0_0x435ef5(0x215),serviceHistoryIndex=a0_0x435ef5(0x263),serviceQuery=a0_0x435ef5(0x22d),serviceHistoryQuery=a0_0x435ef5(0x233),serviceMutation=a0_0x435ef5(0x20e),sereviceType='\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',sereviceHistoryType=a0_0x435ef5(0x242),serviceEntity=a0_0x435ef5(0x1f4),serviceEntityHistCopy=a0_0x435ef5(0x271),serviceEntityHistJson=a0_0x435ef5(0x267),serviceEntitySubscriber=a0_0x435ef5(0x204);
|
|
1
|
+
'use strict';function a0_0x3ed3(){const _0x14a5d0=['includes','push','Resolvers,\x20subscribers\x20as\x20','type-graphql','13604YZgwkW','\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','lodash','decimal','PWD','createTypeText','design:returntype','number','/server','state','colType','__metadata','domain_id','export\x20*\x20from\x20\x27./','-type.ts','-history-query.ts','creator_id','updated_at','.ts','toolCreateService','5BZIvmK','bigint','\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','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','createHistoryServiceFiles','/server/service/','sort','Float','JSON','\x20})','writeFile','created_at','...','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','getFieldType','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','createServiceFiles','/*\x20ENTITIES\x20*/\x0a\x09...','__param','findOne','Int','__esModule','string','15645333LDpkfN','replace','/packages','updater_id','\x0aimport\x20{\x20EventSubscriber\x20}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20HistoryEntitySubscriber\x20}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20getRepository\x20}\x20from\x20\x27@things-factory/shell\x27\x0a\x0a@EventSubscriber()\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryEntitySubscriber\x20extends\x20HistoryEntitySubscriber<{{pascalCase\x20name}},{{pascalCase\x20name}}History>\x20{\x0a\x20\x20public\x20get\x20entity()\x20{\x0a\x20\x20\x20\x20return\x20{{pascalCase\x20name}}\x0a\x20\x20}\x0a\x0a\x20\x20public\x20get\x20historyEntity()\x20{\x0a\x20\x20\x20\x20return\x20{{pascalCase\x20name}}History\x0a\x20\x20}\x0a\x0a\x20\x20{{entityToJson}}\x0a\x0a\x20\x20async\x20beforeRemoveHistory(history:{{pascalCase\x20name}}History,entity:{{pascalCase\x20name}}){\x0a\x20\x20\x20\x20let\x20repo\x20=\x20getRepository({{pascalCase\x20name}}History);\x0a\x20\x20\x20\x20const\x20revNo\x20=\x20await\x20repo.createQueryBuilder()\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.select(\x27max(data_revision_no)\x27,\x20\x27rev_no\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.where(\x27domain_id\x20=\x20:domainId\x27,\x20{\x20domainId:\x20entity.domain.id\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.andWhere(\x27original_id\x20=\x20:originalId\x27,\x20{\x20originalId:\x20entity.id\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.getRawOne()\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20history.dataRevisionNo\x20=\x20revNo\x20?\x20revNo.rev_no\x20+\x201\x20:\x201;\x0a\x20\x20\x20\x20return\x20history;\x0a\x20\x20}\x0a}\x0a','createNoHistoryServiceFiels','length','@things-factory/shell','-mutation.ts','6465534BeOEdm','COPY','existsSync','Resolvers,','\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','Date','createHistoryEntityText','map','pascalCaseName','find','tableName','tslib','colSize','pluralize','defineProperty','\x0a\x20\x20','indexOf','uniqRank','character\x20varying','getRepository','\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','-history\x27','packages','@Column({name:\x27','domain','__decorate','\x20{\x20nullable:\x20','-query.ts','Resolvers\x20}\x20from\x20\x27./','9GTnRDj','replaceNamesMap','\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201','writeFileSync','Query','createDir','date','utf8','camelCaseName','join','rank','datetime','@Field(','env','text','-history.ts','@things-factory/resource-base','/index.ts','EntityColumn','/packages/','import\x20{\x20entities\x20as\x20','index.ts','3848ZSoUBZ','462ItETmP','1652666YYgvvv','379007tAghCP','updater','name','EntitySubscribers\x20}\x20from\x20\x27./','/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...','Ctx','/service','EntitySubscribers,','nullable','double\x20precision','design:type','createEntityText','integer','existsPath','19733mvfZpZ','filter','376300HDDEfv','long','getColTxtType','type\x20=>','pluralPascalCaseName','dataProp','readFileSync','float','\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','columnToEntityColumn','timestamp\x20without\x20time\x20zone','double','getProjectRootPath','Entities,\x20resolvers\x20as\x20','createServicePath','/event-subscriber.ts','OperatoToolCreateService','\x27,\x20nullable:\x20',',length:','Entities,','\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'];a0_0x3ed3=function(){return _0x14a5d0;};return a0_0x3ed3();}const a0_0x4710ff=a0_0x3e4e;(function(_0x5aabb9,_0x3e6fae){const _0x89ffe1=a0_0x3e4e,_0x25bba0=_0x5aabb9();while(!![]){try{const _0x2595af=-parseInt(_0x89ffe1(0x139))/0x1+-parseInt(_0x89ffe1(0x138))/0x2+parseInt(_0x89ffe1(0x137))/0x3*(parseInt(_0x89ffe1(0x162))/0x4)+parseInt(_0x89ffe1(0x176))/0x5*(-parseInt(_0x89ffe1(0x196))/0x6)+parseInt(_0x89ffe1(0x147))/0x7*(parseInt(_0x89ffe1(0x136))/0x8)+parseInt(_0x89ffe1(0x120))/0x9*(-parseInt(_0x89ffe1(0x149))/0xa)+parseInt(_0x89ffe1(0x18d))/0xb;if(_0x2595af===_0x3e6fae)break;else _0x25bba0['push'](_0x25bba0['shift']());}catch(_0x506221){_0x25bba0['push'](_0x25bba0['shift']());}}}(a0_0x3ed3,0xef9bd));Object[a0_0x4710ff(0x111)](exports,a0_0x4710ff(0x18b),{'value':!0x0}),exports['OperatoToolCreateService']=void 0x0;function a0_0x3e4e(_0x48a570,_0x3385fe){const _0x3ed3ed=a0_0x3ed3();return a0_0x3e4e=function(_0x3e4e86,_0x72922c){_0x3e4e86=_0x3e4e86-0x10f;let _0x2af251=_0x3ed3ed[_0x3e4e86];return _0x2af251;},a0_0x3e4e(_0x48a570,_0x3385fe);}const tslib_1=require(a0_0x4710ff(0x1a1)),type_graphql_1=require(a0_0x4710ff(0x161)),shell_1=require(a0_0x4710ff(0x194)),resource_base_1=require(a0_0x4710ff(0x130)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x4710ff(0x164)),{plural:plural}=require(a0_0x4710ff(0x110)),fs=require('fs');let OperatoToolCreateService=class{async[a0_0x4710ff(0x175)](_0x3cc9f7,_0x398349){const _0x5e9a50=a0_0x4710ff,{domain:_0x380af9}=_0x398349[_0x5e9a50(0x16b)],_0x55496b=await(0x0,shell_1[_0x5e9a50(0x116)])(resource_base_1['Entity'])[_0x5e9a50(0x189)]({'where':{'id':_0x3cc9f7}}),_0x317d63=await(0x0,shell_1[_0x5e9a50(0x116)])(resource_base_1[_0x5e9a50(0x132)])[_0x5e9a50(0x19f)]({'where':{'domain':{'id':_0x380af9['id']},'entity':{'id':_0x55496b['id']}}});let {name:_0x376d6d='',bundle:_0x1252b7=''}=_0x55496b||{},_0x224d64=this[_0x5e9a50(0x155)](),_0x267cce=kebabCase(_0x376d6d);return await this[_0x5e9a50(0x157)](_0x224d64,_0x1252b7,_0x267cce),await this[_0x5e9a50(0x186)](_0x224d64,_0x1252b7,_0x376d6d,_0x267cce,_0x55496b,_0x317d63),!0x0;}async[a0_0x4710ff(0x186)](_0x576402,_0x28fd32,_0x4959b8,_0x1c574e,_0x52e825,_0x3f183b){const _0x8a3401=a0_0x4710ff;let _0x515529={'name':_0x1c574e,'tableName':_0x52e825[_0x8a3401(0x1a0)],'pascalCaseName':startCase(camelCase(_0x4959b8))[_0x8a3401(0x18e)](/ /g,''),'camelCaseName':camelCase(_0x4959b8),'snakeCaseName':snakeCase(_0x4959b8),'pluralPascalCaseName':startCase(camelCase(plural(_0x4959b8)))[_0x8a3401(0x18e)](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x4959b8))},_0x264943=_0x576402+_0x8a3401(0x133)+_0x28fd32+_0x8a3401(0x17b);['JSON','COPY'][_0x8a3401(0x15e)](_0x52e825[_0x8a3401(0x14e)])?await this[_0x8a3401(0x17a)](_0x264943,_0x1c574e,_0x52e825,_0x3f183b,_0x515529):await this['createNoHistoryServiceFiels'](_0x264943,_0x1c574e,_0x52e825,_0x3f183b,_0x515529);}async[a0_0x4710ff(0x17a)](_0x33d92a,_0x3a7630,_0x560a8d,_0x129ed7,_0x3649c4){const _0x5bb31d=a0_0x4710ff;await this['writeFile'](_0x33d92a+(_0x3a7630+_0x5bb31d(0x131)),serviceHistoryIndex,_0x3649c4);let _0x51e06d=this['createEntityText'](_0x560a8d,_0x129ed7);await this['writeFile'](_0x33d92a+(_0x3a7630+'/'+_0x3a7630+_0x5bb31d(0x174)),_0x51e06d,_0x3649c4),await this[_0x5bb31d(0x180)](_0x33d92a+(_0x3a7630+'/'+_0x3a7630+_0x5bb31d(0x11e)),serviceQuery,_0x3649c4),await this['writeFile'](_0x33d92a+(_0x3a7630+'/'+_0x3a7630+_0x5bb31d(0x195)),serviceMutation,_0x3649c4);let _0x330835=this['createTypeText'](_0x129ed7);await this['writeFile'](_0x33d92a+(_0x3a7630+'/'+_0x3a7630+_0x5bb31d(0x170)),_0x330835,_0x3649c4);let _0x499965=this['createHistoryEntityText'](_0x560a8d,_0x129ed7);await this['writeFile'](_0x33d92a+(_0x3a7630+'/'+_0x3a7630+_0x5bb31d(0x12f)),_0x499965,_0x3649c4);let _0x58199f='';_0x5bb31d(0x17e)==_0x560a8d[_0x5bb31d(0x14e)]?(_0x58199f=_0x5bb31d(0x178),await this[_0x5bb31d(0x180)](_0x33d92a+(_0x3a7630+_0x5bb31d(0x158)),serviceEntitySubscriber,_0x3649c4)):_0x58199f='';let _0x31f84b=serviceEntitySubscriber['replace'](/{{entityToJson}}/g,_0x58199f);await this['writeFile'](_0x33d92a+(_0x3a7630+_0x5bb31d(0x158)),_0x31f84b,_0x3649c4),await this[_0x5bb31d(0x180)](_0x33d92a+(_0x3a7630+'/'+_0x3a7630+_0x5bb31d(0x171)),serviceHistoryQuery,_0x3649c4),await this[_0x5bb31d(0x180)](_0x33d92a+(_0x3a7630+'/'+_0x3a7630+'-history-type.ts'),sereviceHistoryType,_0x3649c4);let _0x88d853=_0x33d92a+_0x5bb31d(0x135);0x0==await this[_0x5bb31d(0x146)](_0x88d853)&&await this['writeFile'](_0x88d853,allIndex,_0x3649c4);let _0x342dc5=await fs['readFileSync'](_0x88d853,_0x5bb31d(0x127));_0x342dc5['indexOf'](_0x5bb31d(0x16f)+_0x3649c4[_0x5bb31d(0x13b)]+'/'+_0x3649c4[_0x5bb31d(0x13b)]+_0x5bb31d(0x118))<0x0&&(_0x342dc5=_0x342dc5['replace'](/\/\* EXPORT ENTITY TYPES \*\//,_0x5bb31d(0x183)+_0x3649c4[_0x5bb31d(0x13b)]+'/'+_0x3649c4[_0x5bb31d(0x13b)]+_0x5bb31d(0x118))),_0x342dc5[_0x5bb31d(0x113)]('export\x20*\x20from\x20\x27./'+_0x3649c4[_0x5bb31d(0x13b)]+'/'+_0x3649c4[_0x5bb31d(0x13b)]+'\x27')<0x0&&(_0x342dc5=_0x342dc5[_0x5bb31d(0x18e)](/\/\* EXPORT ENTITY TYPES \*\//,_0x5bb31d(0x183)+_0x3649c4[_0x5bb31d(0x13b)]+'/'+_0x3649c4[_0x5bb31d(0x13b)]+'\x27')),_0x342dc5[_0x5bb31d(0x113)]('import\x20{\x20entities\x20as\x20'+_0x3649c4[_0x5bb31d(0x19e)]+_0x5bb31d(0x156)+_0x3649c4[_0x5bb31d(0x19e)]+_0x5bb31d(0x160)+_0x3649c4[_0x5bb31d(0x19e)]+_0x5bb31d(0x13c)+_0x3649c4['name']+'\x27')<0x0&&(_0x342dc5=_0x342dc5[_0x5bb31d(0x18e)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x5bb31d(0x185)+_0x3649c4[_0x5bb31d(0x19e)]+'Entities,\x20resolvers\x20as\x20'+_0x3649c4['pascalCaseName']+_0x5bb31d(0x160)+_0x3649c4[_0x5bb31d(0x19e)]+'EntitySubscribers\x20}\x20from\x20\x27./'+_0x3649c4['name']+'\x27')),_0x342dc5[_0x5bb31d(0x113)](_0x5bb31d(0x182)+_0x3649c4[_0x5bb31d(0x19e)]+_0x5bb31d(0x15c))<0x0&&(_0x342dc5=_0x342dc5[_0x5bb31d(0x18e)](/\/\* ENTITIES \*\//,_0x5bb31d(0x187)+_0x3649c4['pascalCaseName']+'Entities,')),_0x342dc5[_0x5bb31d(0x113)]('...'+_0x3649c4['pascalCaseName']+'Resolvers,')<0x0&&(_0x342dc5=_0x342dc5[_0x5bb31d(0x18e)](/\/\* RESOLVER CLASSES \*\//,_0x5bb31d(0x179)+_0x3649c4['pascalCaseName']+_0x5bb31d(0x199))),_0x342dc5[_0x5bb31d(0x113)](_0x5bb31d(0x182)+_0x3649c4['pascalCaseName']+_0x5bb31d(0x140))<0x0&&(_0x342dc5=_0x342dc5[_0x5bb31d(0x18e)](/\/\* SUBSCRIBERS \*\//,_0x5bb31d(0x13d)+_0x3649c4[_0x5bb31d(0x19e)]+_0x5bb31d(0x140))),await this[_0x5bb31d(0x180)](_0x88d853,_0x342dc5,_0x3649c4);}async[a0_0x4710ff(0x192)](_0x842f1b,_0x51d126,_0xc68174,_0x4cf6d6,_0x2ec8da){const _0x39a91e=a0_0x4710ff;await this[_0x39a91e(0x180)](_0x842f1b+(_0x51d126+'/index.ts'),serviceIndex,_0x2ec8da),await this[_0x39a91e(0x180)](_0x842f1b+(_0x51d126+'/'+_0x51d126+_0x39a91e(0x11e)),serviceQuery,_0x2ec8da),await this[_0x39a91e(0x180)](_0x842f1b+(_0x51d126+'/'+_0x51d126+_0x39a91e(0x195)),serviceMutation,_0x2ec8da);let _0x400fce=this[_0x39a91e(0x144)](_0xc68174,_0x4cf6d6);await this[_0x39a91e(0x180)](_0x842f1b+(_0x51d126+'/'+_0x51d126+_0x39a91e(0x174)),_0x400fce,_0x2ec8da);let _0xda0f94=this[_0x39a91e(0x167)](_0x4cf6d6);await this['writeFile'](_0x842f1b+(_0x51d126+'/'+_0x51d126+_0x39a91e(0x170)),_0xda0f94,_0x2ec8da);let _0x1c5288=_0x842f1b+_0x39a91e(0x135);0x0==await this['existsPath'](_0x1c5288)&&await this[_0x39a91e(0x180)](_0x1c5288,allIndex,_0x2ec8da);let _0x4579c3=await fs[_0x39a91e(0x14f)](_0x1c5288,_0x39a91e(0x127));_0x4579c3['indexOf']('export\x20*\x20from\x20\x27./'+_0x2ec8da['name']+'/'+_0x2ec8da[_0x39a91e(0x13b)]+'\x27')<0x0&&(_0x4579c3=_0x4579c3[_0x39a91e(0x18e)](/\/\* EXPORT ENTITY TYPES \*\//,_0x39a91e(0x183)+_0x2ec8da['name']+'/'+_0x2ec8da[_0x39a91e(0x13b)]+'\x27')),_0x4579c3[_0x39a91e(0x113)](_0x39a91e(0x134)+_0x2ec8da[_0x39a91e(0x19e)]+_0x39a91e(0x156)+_0x2ec8da[_0x39a91e(0x19e)]+'Resolvers\x20}\x20from\x20\x27./'+_0x2ec8da[_0x39a91e(0x13b)]+'\x27')<0x0&&(_0x4579c3=_0x4579c3[_0x39a91e(0x18e)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x39a91e(0x185)+_0x2ec8da['pascalCaseName']+_0x39a91e(0x156)+_0x2ec8da['pascalCaseName']+_0x39a91e(0x11f)+_0x2ec8da[_0x39a91e(0x13b)]+'\x27')),_0x4579c3[_0x39a91e(0x113)](_0x39a91e(0x182)+_0x2ec8da['pascalCaseName']+'Entities,')<0x0&&(_0x4579c3=_0x4579c3[_0x39a91e(0x18e)](/\/\* ENTITIES \*\//,_0x39a91e(0x187)+_0x2ec8da[_0x39a91e(0x19e)]+_0x39a91e(0x15c))),_0x4579c3[_0x39a91e(0x113)]('...'+_0x2ec8da['pascalCaseName']+'Resolvers,')<0x0&&(_0x4579c3=_0x4579c3['replace'](/\/\* RESOLVER CLASSES \*\//,'/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...'+_0x2ec8da[_0x39a91e(0x19e)]+_0x39a91e(0x199))),await this[_0x39a91e(0x180)](_0x1c5288,_0x4579c3,_0x2ec8da);}[a0_0x4710ff(0x167)](_0x53add0){const _0x5d02b1=a0_0x4710ff;let _0x347e35=sereviceType,_0x1b47f8=_0x53add0['map'](_0x1f29da=>{const _0x49a307=a0_0x3e4e;if('id'==_0x1f29da[_0x49a307(0x13b)])return'';if(_0x49a307(0x16e)==_0x1f29da[_0x49a307(0x13b)])return'';if(_0x49a307(0x181)==_0x1f29da[_0x49a307(0x13b)])return'';if(_0x49a307(0x173)==_0x1f29da[_0x49a307(0x13b)])return'';if(_0x49a307(0x172)==_0x1f29da[_0x49a307(0x13b)])return'';if('updater_id'==_0x1f29da[_0x49a307(0x13b)])return'';let _0x11e830=this[_0x49a307(0x184)](_0x1f29da),_0x3c0ad1=this[_0x49a307(0x14b)](_0x1f29da),_0x46d961=camelCase(_0x1f29da[_0x49a307(0x13b)]);return'\x20\x20'+(_0x49a307(0x12c)+(0x0==_0x11e830[_0x49a307(0x193)]?'':_0x49a307(0x14c)+_0x11e830+',')+_0x49a307(0x11d)+_0x1f29da[_0x49a307(0x141)]+_0x49a307(0x17f))+_0x49a307(0x112)+(''+_0x46d961+(_0x1f29da[_0x49a307(0x141)]?'?':'')+':\x20'+_0x3c0ad1)+'\x0a';});_0x347e35=_0x347e35[_0x5d02b1(0x18e)](/{{newTypeColumns}}/g,_0x1b47f8[_0x5d02b1(0x129)]('\x0a'));let _0x18b3b4=_0x53add0[_0x5d02b1(0x19d)](_0x296726=>{const _0x4223fe=_0x5d02b1;if('id'==_0x296726[_0x4223fe(0x13b)])return'';if(_0x4223fe(0x16e)==_0x296726[_0x4223fe(0x13b)])return'';if(_0x4223fe(0x181)==_0x296726['name'])return'';if(_0x4223fe(0x173)==_0x296726[_0x4223fe(0x13b)])return'';if(_0x4223fe(0x172)==_0x296726[_0x4223fe(0x13b)])return'';if(_0x4223fe(0x190)==_0x296726[_0x4223fe(0x13b)])return'';let _0x581e33=this[_0x4223fe(0x184)](_0x296726),_0x3a64fa=this[_0x4223fe(0x14b)](_0x296726);_0x296726['nullable']=!0x0;let _0x4a46f5=camelCase(_0x296726[_0x4223fe(0x13b)]);return'\x20\x20'+(_0x4223fe(0x12c)+(0x0==_0x581e33[_0x4223fe(0x193)]?'':_0x4223fe(0x14c)+_0x581e33+',')+_0x4223fe(0x11d)+_0x296726[_0x4223fe(0x141)]+'\x20})')+_0x4223fe(0x112)+(''+_0x4a46f5+(_0x296726[_0x4223fe(0x141)]?'?':'')+':\x20'+_0x3a64fa)+'\x0a';});return _0x347e35=_0x347e35[_0x5d02b1(0x18e)](/{{patchTypeColumns}}/g,_0x18b3b4[_0x5d02b1(0x129)]('\x0a')),_0x347e35;}[a0_0x4710ff(0x144)](_0x1430cb,_0x55a35b){const _0x33fd4e=a0_0x4710ff;let _0x34a754=serviceEntity,_0x1407a8=_0x55a35b['sort'](function(_0x4c4edb,_0x262422){const _0x3aff9c=a0_0x3e4e;return _0x4c4edb[_0x3aff9c(0x12a)]-_0x262422[_0x3aff9c(0x12a)];})[_0x33fd4e(0x19d)](_0x4f3a54=>this[_0x33fd4e(0x152)](_0x4f3a54));[_0x33fd4e(0x197),'JSON']['includes'](_0x1430cb['dataProp'])&&_0x1407a8[_0x33fd4e(0x15f)](_0x33fd4e(0x122)),_0x34a754=_0x34a754[_0x33fd4e(0x18e)](/{{entityColumns}}/g,_0x1407a8[_0x33fd4e(0x129)]('\x0a'));let _0x30f70b='',_0x5e523d=_0x55a35b[_0x33fd4e(0x148)](_0x31e343=>_0x31e343[_0x33fd4e(0x114)]&&_0x31e343[_0x33fd4e(0x114)]>0x0)[_0x33fd4e(0x17c)](function(_0x35e7f3,_0x5ae83){const _0x54b867=_0x33fd4e;return _0x35e7f3[_0x54b867(0x114)]-_0x5ae83['uniqRank'];});if(_0x5e523d[_0x33fd4e(0x193)]>0x0){_0x30f70b='@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})';let _0xf7dac8=_0x5e523d[_0x33fd4e(0x19d)](_0x3f4567=>{const _0x11bbb7=_0x33fd4e;let _0x195c99=_0x3f4567[_0x11bbb7(0x13b)];return'domain_id'==_0x3f4567[_0x11bbb7(0x13b)]&&(_0x195c99=_0x11bbb7(0x11b)),_0x11bbb7(0x172)==_0x3f4567['name']&&(_0x195c99='creator'),_0x11bbb7(0x190)==_0x3f4567[_0x11bbb7(0x13b)]&&(_0x195c99=_0x11bbb7(0x13a)),'{{camelCase\x20name}}.'+camelCase(_0x195c99);});_0x30f70b=_0x30f70b[_0x33fd4e(0x18e)](/{{indexColumns}}/g,_0xf7dac8['join'](','));}return _0x34a754=_0x34a754[_0x33fd4e(0x18e)](/{{indexAnn}}/g,_0x30f70b),_0x34a754;}[a0_0x4710ff(0x19c)](_0xe80cb9,_0x34bc95){const _0x94dc82=a0_0x4710ff;let _0x590673=_0x94dc82(0x17e)==_0xe80cb9[_0x94dc82(0x14e)]?serviceEntityHistJson:serviceEntityHistCopy,_0x40df87=_0x34bc95[_0x94dc82(0x17c)](function(_0x718a2d,_0x39c35e){const _0x197df7=_0x94dc82;return _0x718a2d[_0x197df7(0x12a)]-_0x39c35e[_0x197df7(0x12a)];})[_0x94dc82(0x19d)](_0x4e897c=>this[_0x94dc82(0x152)](_0x4e897c));return _0x590673=_0x590673[_0x94dc82(0x18e)](/{{entityColumns}}/g,_0x40df87['join']('\x0a')),_0x590673;}[a0_0x4710ff(0x152)](_0x963f10){const _0x1976bf=a0_0x4710ff;if('id'==_0x963f10[_0x1976bf(0x13b)])return'';if(_0x1976bf(0x16e)==_0x963f10[_0x1976bf(0x13b)])return'';if(_0x1976bf(0x181)==_0x963f10[_0x1976bf(0x13b)])return'';if(_0x1976bf(0x173)==_0x963f10['name'])return'';if(_0x1976bf(0x172)==_0x963f10['name'])return'';if(_0x1976bf(0x190)==_0x963f10[_0x1976bf(0x13b)])return'';let _0x266fd5=_0x963f10['colType'];_0x1976bf(0x154)==_0x963f10[_0x1976bf(0x16c)]&&(_0x266fd5=_0x1976bf(0x142)),'long'==_0x963f10[_0x1976bf(0x16c)]&&(_0x266fd5=_0x1976bf(0x177)),'string'==_0x963f10[_0x1976bf(0x16c)]&&(_0x266fd5=_0x1976bf(0x115)),_0x1976bf(0x12b)==_0x963f10[_0x1976bf(0x16c)]&&(_0x266fd5=_0x1976bf(0x153));let _0x2ce3a9='';'string'==_0x963f10[_0x1976bf(0x16c)]&&(_0x2ce3a9=_0x963f10[_0x1976bf(0x10f)]);let _0x4324f8=this[_0x1976bf(0x184)](_0x963f10),_0x3fcd52=this[_0x1976bf(0x14b)](_0x963f10),_0x6be08d=camelCase(_0x963f10['name']);return'\x20\x20'+(_0x1976bf(0x11a)+_0x963f10[_0x1976bf(0x13b)]+'\x27,\x20type:\x20\x27'+_0x266fd5+_0x1976bf(0x15a)+_0x963f10[_0x1976bf(0x141)]+'\x20'+(0x0==_0x2ce3a9[_0x1976bf(0x193)]?'':_0x1976bf(0x15b)+_0x2ce3a9)+_0x1976bf(0x17f))+_0x1976bf(0x112)+(_0x1976bf(0x12c)+(0x0==_0x4324f8[_0x1976bf(0x193)]?'':_0x1976bf(0x14c)+_0x4324f8+',')+'\x20{\x20nullable:\x20'+_0x963f10[_0x1976bf(0x141)]+_0x1976bf(0x17f))+'\x0a\x20\x20'+(''+_0x6be08d+(_0x963f10[_0x1976bf(0x141)]?'?':'')+':\x20'+_0x3fcd52)+'\x0a';}[a0_0x4710ff(0x184)](_0x55c0dc){const _0x5a72c5=a0_0x4710ff;let _0x5ce11e='';return _0x5a72c5(0x154)==_0x55c0dc[_0x5a72c5(0x16c)]&&(_0x5ce11e='Float'),_0x5a72c5(0x150)==_0x55c0dc['colType']&&(_0x5ce11e=_0x5a72c5(0x17d)),_0x5a72c5(0x14a)==_0x55c0dc['colType']&&(_0x5ce11e=_0x5a72c5(0x18a)),_0x5a72c5(0x145)==_0x55c0dc[_0x5a72c5(0x16c)]&&(_0x5ce11e=_0x5a72c5(0x18a)),_0x5ce11e;}[a0_0x4710ff(0x14b)](_0x279f34){const _0x295e28=a0_0x4710ff;let _0x36dc47=_0x279f34['colType'];return _0x295e28(0x165)==_0x279f34['colType']&&(_0x36dc47='number'),_0x295e28(0x154)==_0x279f34['colType']&&(_0x36dc47=_0x295e28(0x169)),'float'==_0x279f34['colType']&&(_0x36dc47=_0x295e28(0x169)),_0x295e28(0x145)==_0x279f34[_0x295e28(0x16c)]&&(_0x36dc47=_0x295e28(0x169)),_0x295e28(0x14a)==_0x279f34[_0x295e28(0x16c)]&&(_0x36dc47=_0x295e28(0x169)),'datetime'==_0x279f34[_0x295e28(0x16c)]&&(_0x36dc47=_0x295e28(0x19b)),_0x295e28(0x126)==_0x279f34[_0x295e28(0x16c)]&&(_0x36dc47=_0x295e28(0x19b)),_0x295e28(0x12e)==_0x279f34[_0x295e28(0x16c)]&&(_0x36dc47=_0x295e28(0x18c)),_0x36dc47;}async[a0_0x4710ff(0x180)](_0x870236,_0x1a8a5e,_0xe57e77){const _0x54e200=a0_0x4710ff;await fs[_0x54e200(0x123)](_0x870236,this['replaceNamesMap'](_0x1a8a5e,_0xe57e77),_0x54e200(0x127));}[a0_0x4710ff(0x121)](_0x341a67,_0x337dd9){const _0x1c3fe1=a0_0x4710ff;return _0x341a67['replace'](/{{pascalCase name}}/g,_0x337dd9[_0x1c3fe1(0x19e)])[_0x1c3fe1(0x18e)](/{{camelCase name}}/g,_0x337dd9[_0x1c3fe1(0x128)])[_0x1c3fe1(0x18e)](/{{snakeCase name}}/g,_0x337dd9['snakeCaseName'])[_0x1c3fe1(0x18e)](/{{pluralPascalCase name}}/g,_0x337dd9[_0x1c3fe1(0x14d)])[_0x1c3fe1(0x18e)](/{{pluralCamelCase name}}/g,_0x337dd9['pluralCamelCaseName'])[_0x1c3fe1(0x18e)](/{{tableName}}/g,_0x337dd9[_0x1c3fe1(0x1a0)])[_0x1c3fe1(0x18e)](/{{name}}/g,_0x337dd9[_0x1c3fe1(0x13b)]);}async[a0_0x4710ff(0x157)](_0xcdce35,_0x4b1cea,_0x1bff7a){const _0x4b43cf=a0_0x4710ff;let _0x5cb14c=_0xcdce35+_0x4b43cf(0x18f);await this[_0x4b43cf(0x125)](_0x5cb14c),_0x5cb14c=_0x5cb14c+'/'+_0x4b1cea,await this[_0x4b43cf(0x125)](_0x5cb14c),_0x5cb14c+=_0x4b43cf(0x16a),await this[_0x4b43cf(0x125)](_0x5cb14c),_0x5cb14c+=_0x4b43cf(0x13f),await this[_0x4b43cf(0x125)](_0x5cb14c),_0x5cb14c=_0x5cb14c+'/'+_0x1bff7a,await this['createDir'](_0x5cb14c);}[a0_0x4710ff(0x155)](){const _0x19eb6a=a0_0x4710ff;let _0x14ef9a=process[_0x19eb6a(0x12d)][_0x19eb6a(0x166)]['split']('/'),_0x5d1f32=[];for(let _0x4cc5f5=0x0;_0x4cc5f5<_0x14ef9a['length']&&_0x19eb6a(0x119)!=_0x14ef9a[_0x4cc5f5];_0x4cc5f5++)_0x5d1f32[_0x19eb6a(0x15f)](_0x14ef9a[_0x4cc5f5]);return _0x5d1f32[_0x19eb6a(0x129)]('/');}async[a0_0x4710ff(0x125)](_0x1b09b7){const _0x5cfa02=a0_0x4710ff;0x0==await this[_0x5cfa02(0x146)](_0x1b09b7)&&fs['mkdirSync'](_0x1b09b7);}async[a0_0x4710ff(0x146)](_0x235674){const _0x26571e=a0_0x4710ff;return await fs[_0x26571e(0x198)](_0x235674);}};tslib_1[a0_0x4710ff(0x11c)]([(0x0,type_graphql_1[a0_0x4710ff(0x124)])(_0x191d02=>Boolean,{'description':'Operato\x20Tool\x20Create\x20Service'}),tslib_1['__param'](0x0,(0x0,type_graphql_1['Arg'])('id')),tslib_1[a0_0x4710ff(0x188)](0x1,(0x0,type_graphql_1[a0_0x4710ff(0x13e)])()),tslib_1[a0_0x4710ff(0x16d)](a0_0x4710ff(0x143),Function),tslib_1[a0_0x4710ff(0x16d)]('design:paramtypes',[String,Object]),tslib_1['__metadata'](a0_0x4710ff(0x168),Promise)],OperatoToolCreateService['prototype'],a0_0x4710ff(0x175),null),OperatoToolCreateService=tslib_1[a0_0x4710ff(0x11c)]([(0x0,type_graphql_1['Resolver'])()],OperatoToolCreateService),exports[a0_0x4710ff(0x159)]=OperatoToolCreateService;const allIndex=a0_0x4710ff(0x15d),serviceIndex='\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}}]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}Mutation]\x0a',serviceHistoryIndex='\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',serviceQuery=a0_0x4710ff(0x163),serviceHistoryQuery=a0_0x4710ff(0x151),serviceMutation='\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',sereviceType=a0_0x4710ff(0x117),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=a0_0x4710ff(0x19a),serviceEntityHistCopy='\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a',serviceEntityHistJson='\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a\x20\x20@Column(\x27simple-json\x27,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20@Field(type\x20=>\x20ScalarObject,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20historyJson?:\x20any\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a',serviceEntitySubscriber=a0_0x4710ff(0x191);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';function a0_0x56c1(_0x56abef,_0x3d2e17){const _0x32c72e=a0_0x32c7();return a0_0x56c1=function(_0x56c179,_0x2b6d49){_0x56c179=_0x56c179-0xe6;let _0x3ae0f2=_0x32c72e[_0x56c179];return _0x3ae0f2;},a0_0x56c1(_0x56abef,_0x3d2e17);}const a0_0x16af74=a0_0x56c1;(function(_0x302f70,_0x212f1d){const _0x4ca2c2=a0_0x56c1,_0x5cbe6e=_0x302f70();while(!![]){try{const _0x5264ad=-parseInt(_0x4ca2c2(0xf2))/0x1*(parseInt(_0x4ca2c2(0x10b))/0x2)+parseInt(_0x4ca2c2(0x101))/0x3*(-parseInt(_0x4ca2c2(0xe9))/0x4)+parseInt(_0x4ca2c2(0xed))/0x5*(parseInt(_0x4ca2c2(0xfc))/0x6)+-parseInt(_0x4ca2c2(0xf7))/0x7*(parseInt(_0x4ca2c2(0x106))/0x8)+parseInt(_0x4ca2c2(0x10d))/0x9*(parseInt(_0x4ca2c2(0x10a))/0xa)+parseInt(_0x4ca2c2(0x100))/0xb+parseInt(_0x4ca2c2(0xf0))/0xc;if(_0x5264ad===_0x212f1d)break;else _0x5cbe6e['push'](_0x5cbe6e['shift']());}catch(_0x2f400a){_0x5cbe6e['push'](_0x5cbe6e['shift']());}}}(a0_0x32c7,0x29357));Object[a0_0x16af74(0xfd)](exports,a0_0x16af74(0xf5),{'value':!0x0}),exports[a0_0x16af74(0x107)]=exports[a0_0x16af74(0xfe)]=void 0x0;const operato_license_checker_1=require(a0_0x16af74(0xee)),shell_1=require('@things-factory/shell'),menu_base_1=require(a0_0x16af74(0xff)),license_error_1=require(a0_0x16af74(0x10e));async function checkStudioPermission(){const _0x225a26=a0_0x16af74;let _0x9c21a4=((0x0,operato_license_checker_1['getPermission'])(_0x225a26(0xe6))||',')['split'](',')[_0x225a26(0xf4)](_0x2f1ec6=>_0x2f1ec6[_0x225a26(0xef)]()),_0x16a944=!0x1;return _0x9c21a4[_0x225a26(0xf8)](_0x2f3d23=>{const _0x185dba=_0x225a26;_0x2f3d23[_0x185dba(0xf1)](_0x185dba(0x108))&&(_0x16a944=!0x0);}),_0x16a944;}async function checkStudioTemplateIsOverLimit(_0xfe55d7,_0x111dee){const _0x58135e=a0_0x16af74;if(0x0==await checkStudioPermission())throw new license_error_1[(_0x58135e(0x104))]({'errorCode':_0x111dee['t'](license_error_1[_0x58135e(0x104)][_0x58135e(0x103)][_0x58135e(0x102)])});var _0x289266=0x0;if(_0x289266=_0xfe55d7&&''!=_0xfe55d7?await(0x0,shell_1[_0x58135e(0xe7)])(menu_base_1[_0x58135e(0xe8)])['manager']['createQueryBuilder']()[_0x58135e(0xfb)](_0x58135e(0x109))['from'](menu_base_1[_0x58135e(0xe8)],_0x58135e(0x109))[_0x58135e(0xeb)](_0x58135e(0xf3),{'id':_0xfe55d7})[_0x58135e(0xea)](_0x58135e(0xec))[_0x58135e(0xf9)]()+0x1:await(0x0,shell_1['getRepository'])(menu_base_1[_0x58135e(0xe8)])[_0x58135e(0x10c)]['createQueryBuilder']()[_0x58135e(0xfb)](_0x58135e(0x109))[_0x58135e(0xf6)](menu_base_1[_0x58135e(0xe8)],_0x58135e(0x109))[_0x58135e(0xeb)](_0x58135e(0xec))['getCount']()+0x1,!(0x0,operato_license_checker_1[_0x58135e(0xfa)])(_0x289266))throw new license_error_1['LicenseError']({'errorCode':_0x111dee['t'](license_error_1[_0x58135e(0x104)][_0x58135e(0x103)][_0x58135e(0x105)])});return!0x0;}function a0_0x32c7(){const _0x49b022=['6lEpRyk','defineProperty','checkStudioPermission','@things-factory/menu-base','1088923iEClaP','25008tUvuTz','INVALID_LICENSE','ERROR_CODES','LicenseError','OVER_LIMIT','842216CuXBtn','checkStudioTemplateIsOverLimit','Studio','menu','510GXdsaV','288188omMKvd','manager','45xbmygl','../../errors/license-error','Permissions\x20For\x20Tailor\x20Tool','getRepository','Menu','52hQFygA','andWhere','where','(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)','1173365aNsDeN','@things-factory/operato-license-checker','trim','2311308KlQrzG','includes','1srOFOk','id\x20!=\x20:id','map','__esModule','from','7AyJGUp','forEach','getCount','checkTarget','select'];a0_0x32c7=function(){return _0x49b022;};return a0_0x32c7();}exports['checkStudioPermission']=checkStudioPermission,exports[a0_0x16af74(0x107)]=checkStudioTemplateIsOverLimit;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';function a0_0xbfd8(){const _0x46b089=['Operato\x20Tool\x20Studio\x20Usage\x20Permissions','__param','design:type','defineProperty','checkStudioTemplateIsOverLimit','__metadata','OperatoToolResolver','60592vpnSCC','Query','5911829OxQntD','design:paramtypes','Operato\x20Tool\x20Studio\x20Limit\x20check','Resolver','1LhySBC','__esModule','6uXBCte','2892537RLwSwp','639819dqxqjY','./tool-permission','1204974jucfJO','studioTemplateIsOverLimit','prototype','tslib','Ctx','__decorate','design:returntype','852815XIffVF','studioPermission','397176DtFVKJ','Arg'];a0_0xbfd8=function(){return _0x46b089;};return a0_0xbfd8();}const a0_0xd741bd=a0_0x27e3;(function(_0x3c7541,_0x2b039f){const _0x1db7cd=a0_0x27e3,_0x1e8508=_0x3c7541();while(!![]){try{const _0x338975=-parseInt(_0x1db7cd(0x1fb))/0x1*(-parseInt(_0x1db7cd(0x201))/0x2)+parseInt(_0x1db7cd(0x1ff))/0x3+parseInt(_0x1db7cd(0x1f5))/0x4+parseInt(_0x1db7cd(0x1ea))/0x5+parseInt(_0x1db7cd(0x1fd))/0x6*(-parseInt(_0x1db7cd(0x1f7))/0x7)+-parseInt(_0x1db7cd(0x1ec))/0x8+parseInt(_0x1db7cd(0x1fe))/0x9;if(_0x338975===_0x2b039f)break;else _0x1e8508['push'](_0x1e8508['shift']());}catch(_0x269332){_0x1e8508['push'](_0x1e8508['shift']());}}}(a0_0xbfd8,0x68a7e));function a0_0x27e3(_0xb2e3b9,_0x195023){const _0xbfd880=a0_0xbfd8();return a0_0x27e3=function(_0x27e3d3,_0x57728c){_0x27e3d3=_0x27e3d3-0x1e8;let _0xd7bab4=_0xbfd880[_0x27e3d3];return _0xd7bab4;},a0_0x27e3(_0xb2e3b9,_0x195023);}Object[a0_0xd741bd(0x1f1)](exports,a0_0xd741bd(0x1fc),{'value':!0x0}),exports[a0_0xd741bd(0x1f4)]=void 0x0;const tslib_1=require(a0_0xd741bd(0x204)),type_graphql_1=require('type-graphql'),tool_permission_1=require(a0_0xd741bd(0x200));let OperatoToolResolver=class{async[a0_0xd741bd(0x1eb)](_0x2c921){return(0x0,tool_permission_1['checkStudioPermission'])();}async[a0_0xd741bd(0x202)](_0x1869c0,_0x2d0459){const _0x259be8=a0_0xd741bd;return(0x0,tool_permission_1[_0x259be8(0x1f2)])(_0x1869c0,_0x2d0459);}};tslib_1[a0_0xd741bd(0x1e8)]([(0x0,type_graphql_1[a0_0xd741bd(0x1f6)])(_0x3baa10=>Boolean,{'description':a0_0xd741bd(0x1ee)}),tslib_1[a0_0xd741bd(0x1ef)](0x0,(0x0,type_graphql_1[a0_0xd741bd(0x205)])()),tslib_1['__metadata'](a0_0xd741bd(0x1f0),Function),tslib_1[a0_0xd741bd(0x1f3)](a0_0xd741bd(0x1f8),[Object]),tslib_1[a0_0xd741bd(0x1f3)](a0_0xd741bd(0x1e9),Promise)],OperatoToolResolver[a0_0xd741bd(0x203)],'studioPermission',null),tslib_1['__decorate']([(0x0,type_graphql_1[a0_0xd741bd(0x1f6)])(_0x27b003=>Boolean,{'description':a0_0xd741bd(0x1f9)}),tslib_1[a0_0xd741bd(0x1ef)](0x0,(0x0,type_graphql_1[a0_0xd741bd(0x1ed)])('id')),tslib_1[a0_0xd741bd(0x1ef)](0x1,(0x0,type_graphql_1[a0_0xd741bd(0x205)])()),tslib_1[a0_0xd741bd(0x1f3)](a0_0xd741bd(0x1f0),Function),tslib_1['__metadata'](a0_0xd741bd(0x1f8),[String,Object]),tslib_1[a0_0xd741bd(0x1f3)](a0_0xd741bd(0x1e9),Promise)],OperatoToolResolver['prototype'],'studioTemplateIsOverLimit',null),OperatoToolResolver=tslib_1[a0_0xd741bd(0x1e8)]([(0x0,type_graphql_1[a0_0xd741bd(0x1fa)])()],OperatoToolResolver),exports[a0_0xd741bd(0x1f4)]=OperatoToolResolver;
|