@things-factory/operato-tools 6.1.34 → 6.1.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/actions/main.js +1 -1
- package/client/pages/generator/button-config-tab-mixin.js +4 -4
- package/client/pages/generator/column-config-tab-mixin.js +4 -4
- package/client/pages/generator/etc-config-tab-mixin.js +4 -4
- package/client/pages/generator/form-config-tab-mixin.js +4 -4
- package/client/pages/generator/graphql-config-tab-mixin.js +24 -24
- package/client/pages/generator/grid-config-tab-mixin.js +21 -21
- package/client/pages/generator/grid-emphasized-config-tab-mixin.js +8 -8
- package/client/pages/generator/menu-config-tab-mixin.js +12 -12
- package/client/pages/generator/meta-generator-page.js +11 -11
- package/client/pages/generator/search-config-tab-mixin.js +4 -4
- package/client/pages/generator/tab-config-tab-mixin.js +4 -4
- package/client/pages/main.js +4 -4
- package/client/reducers/main.js +1 -1
- package/package.json +3 -3
- package/server/constants/error-code.js +1 -1
- package/server/errors/license-error.js +1 -1
- package/server/routes.js +1 -1
- package/server/service/tool-entity/create-menu.js +1 -1
- package/server/service/tool-entity/create-service.js +1 -1
- package/server/service/tool-secret/tool-permission.js +1 -1
- package/server/service/tool-secret/tool-resolver.js +1 -1
package/client/pages/main.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a0_0x5e1118=a0_0x3e03;(function(_0x17295e,_0x36d3ed){var _0x5413e1=a0_0x3e03,_0x4b1be4=_0x17295e();while(!![]){try{var _0x4248ac=-parseInt(_0x5413e1(0x8b))/0x1*(-parseInt(_0x5413e1(0x94))/0x2)+-parseInt(_0x5413e1(0x89))/0x3+parseInt(_0x5413e1(0x86))/0x4*(-parseInt(_0x5413e1(0x8c))/0x5)+-parseInt(_0x5413e1(0x87))/0x6+parseInt(_0x5413e1(0x90))/0x7*(-parseInt(_0x5413e1(0x8e))/0x8)+-parseInt(_0x5413e1(0x97))/0x9*(parseInt(_0x5413e1(0x91))/0xa)+parseInt(_0x5413e1(0x92))/0xb;if(_0x4248ac===_0x36d3ed)break;else _0x4b1be4['push'](_0x4b1be4['shift']());}catch(_0x13c303){_0x4b1be4['push'](_0x4b1be4['shift']());}}}(a0_0x8d7b,0x9d076));import{html,css}from'lit-element';import{connect}from'pwa-helpers/connect-mixin.js';import{store,PageView}from'@things-factory/shell';import{TermsUtil}from'@things-factory/meta-ui';class OperatoToolsMain extends connect(store)(PageView){static get[a0_0x5e1118(0x95)](){return[css`
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
4
|
background-color: var(--main-section-background-color);
|
|
@@ -41,11 +41,11 @@ var a0_0x5dc53e=a0_0x33a3;function a0_0x35f7(){var _0x3cc936=['55583dNQMdp','ope
|
|
|
41
41
|
display: none;
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
`];}get[
|
|
44
|
+
`];}get[a0_0x5e1118(0x8d)](){var _0x15b8f7=a0_0x5e1118;return{'title':_0x15b8f7(0x8a),'actions':[]};}[a0_0x5e1118(0x93)](){var _0x3bffc3=a0_0x5e1118;return html`
|
|
45
45
|
<h2>Operato Tools</h2>
|
|
46
46
|
<p page-description>
|
|
47
|
-
${TermsUtil[
|
|
47
|
+
${TermsUtil[_0x3bffc3(0x8f)](_0x3bffc3(0x98))}
|
|
48
48
|
</p>
|
|
49
49
|
|
|
50
50
|
<img src="/assets/images/operato-tools.png" />
|
|
51
|
-
`;}}
|
|
51
|
+
`;}}function a0_0x8d7b(){var _0x31f0d8=['110fbMmiu','45530045ZgtFbl','render','117422wDauMS','styles','operato-tools-main','577377GuSpLK','tool\x20start\x20msg','4748956huyHBE','7584642GntmfW','define','333378tVwUuK','Operato\x20Tools','6EMSdkT','5NEXrxe','context','290008SShiOz','tText','112oREahR'];a0_0x8d7b=function(){return _0x31f0d8;};return a0_0x8d7b();}function a0_0x3e03(_0x5c0b0d,_0x22692c){var _0x8d7b78=a0_0x8d7b();return a0_0x3e03=function(_0x3e0379,_0x2e014a){_0x3e0379=_0x3e0379-0x86;var _0x666bfc=_0x8d7b78[_0x3e0379];return _0x666bfc;},a0_0x3e03(_0x5c0b0d,_0x22692c);}window['customElements'][a0_0x5e1118(0x88)](a0_0x5e1118(0x96),OperatoToolsMain);
|
package/client/reducers/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a0_0x24ca7e=a0_0x5ac0;(function(_0x1df313,_0x378e7a){const _0x4876f2=a0_0x5ac0,_0x3bc767=_0x1df313();while(!![]){try{const _0xa0dcff=-parseInt(_0x4876f2(0x148))/0x1+parseInt(_0x4876f2(0x14a))/0x2+-parseInt(_0x4876f2(0x147))/0x3+-parseInt(_0x4876f2(0x146))/0x4+parseInt(_0x4876f2(0x144))/0x5*(parseInt(_0x4876f2(0x13a))/0x6)+parseInt(_0x4876f2(0x13e))/0x7+parseInt(_0x4876f2(0x142))/0x8*(parseInt(_0x4876f2(0x149))/0x9);if(_0xa0dcff===_0x378e7a)break;else _0x3bc767['push'](_0x3bc767['shift']());}catch(_0x15bf6f){_0x3bc767['push'](_0x3bc767['shift']());}}}(a0_0xdb30,0x715eb));import a0_0x2876bb from'graphql-tag';function a0_0x5ac0(_0x44553c,_0x2a49a0){const _0xdb305e=a0_0xdb30();return a0_0x5ac0=function(_0x5ac04a,_0x557dda){_0x5ac04a=_0x5ac04a-0x13a;let _0x34eaaf=_0xdb305e[_0x5ac04a];return _0x34eaaf;},a0_0x5ac0(_0x44553c,_0x2a49a0);}import{i18next}from'@operato/i18n';function a0_0xdb30(){const _0x4912d4=['query','dispatch','data','43992ZAjlDx','errors','784165aTBRbL','type','196288hNakQy','1877898tyazXX','231419LLsvlJ','837hYPHzy','39784pSGNPP','6lOqKyQ','UPDATE_OPERATO_TOOLS_PERMISSION','ABC','studioPermission','4778816ABeVbS'];a0_0xdb30=function(){return _0x4912d4;};return a0_0xdb30();}import{store}from'@operato/shell';import{client,gqlContext}from'@operato/graphql';import{UPDATE_OPERATO_TOOLS}from'../actions/main';const INITIAL_STATE={'operatoTools':a0_0x24ca7e(0x13c),'studioPermission':!0x1};export const UPDATE_OPERATO_TOOLS_PERMISSION=a0_0x24ca7e(0x13b);((async()=>{const _0x360032=a0_0x24ca7e;var _0x491540=await client[_0x360032(0x13f)]({'query':a0_0x2876bb`{studioPermission}`});let _0x110fb0=!0x1;_0x491540[_0x360032(0x143)]||(_0x110fb0=_0x491540[_0x360032(0x141)][_0x360032(0x13d)]),store[_0x360032(0x140)]({'type':UPDATE_OPERATO_TOOLS_PERMISSION,'state':{'studioPermission':_0x110fb0}});})());const operatoTools=(_0x33f571=INITIAL_STATE,_0xf1f21)=>{const _0x200a5e=a0_0x24ca7e;switch(_0xf1f21[_0x200a5e(0x145)]){case UPDATE_OPERATO_TOOLS:return{..._0x33f571};case UPDATE_OPERATO_TOOLS_PERMISSION:return{...INITIAL_STATE,..._0xf1f21['state']};default:return _0x33f571;}};export default operatoTools;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/operato-tools",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.36",
|
|
4
4
|
"main": "server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -29,12 +29,12 @@
|
|
|
29
29
|
"docker:run": "docker run -it -p 4000:3000 hatiolab/operato-tools:latest"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@things-factory/meta-ui": "^6.1.
|
|
32
|
+
"@things-factory/meta-ui": "^6.1.36",
|
|
33
33
|
"@things-factory/operato-license-checker": "^3.1.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@things-factory/builder": "^6.1.28",
|
|
37
37
|
"@things-factory/meta-ui": "^6.0.0-alpha.6"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "ee0c07804730615fe91dc92d83f388de9e8412ed"
|
|
40
40
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a0_0x306988=a0_0x594c;(function(_0x541af4,_0x3239d7){var _0x1254a3=a0_0x594c,_0x5b4432=_0x541af4();while(!![]){try{var _0x315d63=-parseInt(_0x1254a3(0x1f9))/0x1*(-parseInt(_0x1254a3(0x1f7))/0x2)+-parseInt(_0x1254a3(0x1fc))/0x3*(parseInt(_0x1254a3(0x1f2))/0x4)+parseInt(_0x1254a3(0x1fe))/0x5*(parseInt(_0x1254a3(0x1ee))/0x6)+parseInt(_0x1254a3(0x1f1))/0x7*(-parseInt(_0x1254a3(0x1fa))/0x8)+parseInt(_0x1254a3(0x1fb))/0x9*(-parseInt(_0x1254a3(0x1f3))/0xa)+parseInt(_0x1254a3(0x1f8))/0xb*(-parseInt(_0x1254a3(0x1f0))/0xc)+parseInt(_0x1254a3(0x1ed))/0xd;if(_0x315d63===_0x3239d7)break;else _0x5b4432['push'](_0x5b4432['shift']());}catch(_0x282d2b){_0x5b4432['push'](_0x5b4432['shift']());}}}(a0_0x2ce0,0x24def));Object['defineProperty'](exports,a0_0x306988(0x1fd),{'value':!0x0}),exports[a0_0x306988(0x1ef)]=exports['INVALID_LICENSE']=void 0x0,exports[a0_0x306988(0x1f4)]=a0_0x306988(0x1f5),exports[a0_0x306988(0x1ef)]=a0_0x306988(0x1f6);function a0_0x594c(_0x2e24c9,_0xe1d815){var _0x2ce056=a0_0x2ce0();return a0_0x594c=function(_0x594c6b,_0x5a7b89){_0x594c6b=_0x594c6b-0x1ed;var _0x3203b8=_0x2ce056[_0x594c6b];return _0x3203b8;},a0_0x594c(_0x2e24c9,_0xe1d815);}function a0_0x2ce0(){var _0x3cb6d9=['2972DTVihH','488785dHpuuE','29HaIWGV','10096ZeeeEP','56034VPqWpU','60SgBcnz','__esModule','5085lmRnOX','5847283PKsdmv','1386jOwgkm','OVER_LIMIT','12lPVdAJ','1183ByGBom','43892THhVdQ','160hLkGME','INVALID_LICENSE','error.invalid\x20license\x20key','error.page\x20count\x20over\x20license\x20limit'];a0_0x2ce0=function(){return _0x3cb6d9;};return a0_0x2ce0();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';function a0_0xb263(){const _0x5aa2a6=['../constants/error-code','detail','77LTeLBq','LicenseError','3907008sPQvGI','defineProperty','ERROR_CODES','78mgYHQO','90774AiAMzQ','license-error','1783384rixNUq','40nwfttR','20yucdfD','534326uXLPWr','tslib','__esModule','81604TBgsex','assign','260435EWFFzi','183110BJAxDX'];a0_0xb263=function(){return _0x5aa2a6;};return a0_0xb263();}const a0_0x3cd956=a0_0x3ad7;(function(_0x32ab27,_0x928ec5){const _0x1d15ae=a0_0x3ad7,_0x21dd0e=_0x32ab27();while(!![]){try{const _0x417426=parseInt(_0x1d15ae(0x169))/0x1+parseInt(_0x1d15ae(0x166))/0x2+parseInt(_0x1d15ae(0x163))/0x3*(-parseInt(_0x1d15ae(0x16c))/0x4)+-parseInt(_0x1d15ae(0x168))/0x5*(-parseInt(_0x1d15ae(0x164))/0x6)+-parseInt(_0x1d15ae(0x16e))/0x7*(parseInt(_0x1d15ae(0x167))/0x8)+-parseInt(_0x1d15ae(0x160))/0x9+parseInt(_0x1d15ae(0x16f))/0xa*(parseInt(_0x1d15ae(0x172))/0xb);if(_0x417426===_0x928ec5)break;else _0x21dd0e['push'](_0x21dd0e['shift']());}catch(_0x23a124){_0x21dd0e['push'](_0x21dd0e['shift']());}}}(a0_0xb263,0x71514));Object[a0_0x3cd956(0x161)](exports,a0_0x3cd956(0x16b),{'value':!0x0}),exports[a0_0x3cd956(0x173)]=void 0x0;function a0_0x3ad7(_0x2b39d3,_0x5ec0f7){const _0xb263b9=a0_0xb263();return a0_0x3ad7=function(_0x3ad73d,_0xe7792d){_0x3ad73d=_0x3ad73d-0x160;let _0x2ccb93=_0xb263b9[_0x3ad73d];return _0x2ccb93;},a0_0x3ad7(_0x2b39d3,_0x5ec0f7);}const tslib_1=require(a0_0x3cd956(0x16a)),ERROR_CODES=tslib_1['__importStar'](require(a0_0x3cd956(0x170)));class LicenseError extends Error{static get[a0_0x3cd956(0x162)](){const _0x24d183=a0_0x3cd956;return Object[_0x24d183(0x16d)]({},ERROR_CODES);}constructor({errorCode:_0x253f83,detail:_0x14e398}){const _0x59457c=a0_0x3cd956;super(_0x253f83),this['name']=_0x59457c(0x165),this['errorCode']=_0x253f83,this[_0x59457c(0x171)]=_0x14e398;}}exports['LicenseError']=LicenseError;
|
package/server/routes.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a0_0x24ab5f=a0_0x1a51;function a0_0x1a51(_0x3bb89e,_0x10bd48){const _0x3b7946=a0_0x3b79();return a0_0x1a51=function(_0x1a5114,_0x1991ec){_0x1a5114=_0x1a5114-0x6e;let _0x43e7dd=_0x3b7946[_0x1a5114];return _0x43e7dd;},a0_0x1a51(_0x3bb89e,_0x10bd48);}(function(_0xbf3e9f,_0x55745b){const _0x18f4fc=a0_0x1a51,_0x6ce9cd=_0xbf3e9f();while(!![]){try{const _0x372f0e=parseInt(_0x18f4fc(0x6e))/0x1*(parseInt(_0x18f4fc(0x74))/0x2)+parseInt(_0x18f4fc(0x7e))/0x3*(parseInt(_0x18f4fc(0x7d))/0x4)+parseInt(_0x18f4fc(0x6f))/0x5+parseInt(_0x18f4fc(0x79))/0x6*(parseInt(_0x18f4fc(0x72))/0x7)+-parseInt(_0x18f4fc(0x7c))/0x8*(parseInt(_0x18f4fc(0x75))/0x9)+parseInt(_0x18f4fc(0x76))/0xa*(parseInt(_0x18f4fc(0x70))/0xb)+-parseInt(_0x18f4fc(0x7a))/0xc*(parseInt(_0x18f4fc(0x78))/0xd);if(_0x372f0e===_0x55745b)break;else _0x6ce9cd['push'](_0x6ce9cd['shift']());}catch(_0x2337e3){_0x6ce9cd['push'](_0x6ce9cd['shift']());}}}(a0_0x3b79,0x8bd34));function a0_0x3b79(){const _0x155d63=['1961108ijaPSe','6fZTreY','283wefRMj','3810890mfBxqg','1903svqZan','bootstrap-module-domain-private-route','1346401dgIXbg','bootstrap-module-domain-public-route','3248pJoLUW','16776wZfQYO','19430eLjYRG','debug','9752041dETGeo','24COFoAk','36gWXkuK','things-factory:operato-tools:routes','2080gmtFYb'];a0_0x3b79=function(){return _0x155d63;};return a0_0x3b79();}const debug=require(a0_0x24ab5f(0x77))(a0_0x24ab5f(0x7b));process['on']('bootstrap-module-global-public-route',(_0x13b48d,_0x171e66)=>{}),process['on']('bootstrap-module-global-private-route',(_0x489d50,_0x11c884)=>{}),process['on'](a0_0x24ab5f(0x73),(_0x1148a5,_0x4123c5)=>{}),process['on'](a0_0x24ab5f(0x71),(_0x2f63a5,_0x3668c8)=>{});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x1a76fe=a0_0x15c3;(function(_0x1e8167,_0x54941a){const _0x34ae34=a0_0x15c3,_0x1a9b16=_0x1e8167();while(!![]){try{const _0x5f2644=parseInt(_0x34ae34(0x131))/0x1+parseInt(_0x34ae34(0x151))/0x2+-parseInt(_0x34ae34(0x140))/0x3*(parseInt(_0x34ae34(0x166))/0x4)+-parseInt(_0x34ae34(0x174))/0x5*(parseInt(_0x34ae34(0x178))/0x6)+parseInt(_0x34ae34(0x161))/0x7+-parseInt(_0x34ae34(0x169))/0x8*(-parseInt(_0x34ae34(0x13b))/0x9)+parseInt(_0x34ae34(0x16e))/0xa;if(_0x5f2644===_0x54941a)break;else _0x1a9b16['push'](_0x1a9b16['shift']());}catch(_0xb5b229){_0x1a9b16['push'](_0x1a9b16['shift']());}}}(a0_0x59d3,0x69f48));Object[a0_0x1a76fe(0x168)](exports,a0_0x1a76fe(0x182),{'value':!0x0}),exports[a0_0x1a76fe(0x16f)]=void 0x0;const tslib_1=require(a0_0x1a76fe(0x15e)),type_graphql_1=require(a0_0x1a76fe(0x152)),resource_base_1=require(a0_0x1a76fe(0x128)),menu_base_1=require('@things-factory/menu-base'),tool_permission_1=require(a0_0x1a76fe(0x121)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require('lodash'),{plural:plural}=require('pluralize'),crypto_1=tslib_1['__importDefault'](require(a0_0x1a76fe(0x135)));let OperatoToolCreateMenu=class{async[a0_0x1a76fe(0x194)](_0x52b5d2,_0x2b08f9,_0x2331c5){const _0x4d530b=a0_0x1a76fe,{domain:_0x193c1c,user:_0x9dce19,tx:_0x4a1050}=_0x2331c5[_0x4d530b(0x158)];await(0x0,tool_permission_1[_0x4d530b(0x12f)])('',_0x2331c5);const _0x391b67=await _0x4a1050[_0x4d530b(0x129)](resource_base_1[_0x4d530b(0x13d)])[_0x4d530b(0x139)]({'where':{'domain':{'id':_0x193c1c['id']},'id':_0x52b5d2}}),_0x374219=await _0x4a1050['getRepository'](resource_base_1[_0x4d530b(0x144)])['find']({'where':{'domain':{'id':_0x193c1c['id']},'entity':{'id':_0x391b67['id']}}});let {name:_0x253535=''}=_0x391b67||{},_0x2ed915=kebabCase(_0x253535),_0xad552e=modelTemplate[_0x4d530b(0x14a)](/{{pascalCase name}}/g,startCase(camelCase(_0x253535))['replace'](/ /g,''))['replace'](/{{camelCase name}}/g,camelCase(_0x253535))[_0x4d530b(0x14a)](/{{snakeCase name}}/g,snakeCase(_0x253535))[_0x4d530b(0x14a)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x253535)))[_0x4d530b(0x14a)](/ /g,''))[_0x4d530b(0x14a)](/{{pluralCamelCase name}}/g,camelCase(plural(_0x253535)))[_0x4d530b(0x14a)](/{{name}}/g,_0x253535),_0x3944ed='';_0x4d530b(0x16c)==_0x391b67[_0x4d530b(0x170)]?_0x3944ed=_0x4d530b(0x183):_0x4d530b(0x127)==_0x391b67[_0x4d530b(0x170)]&&(_0x3944ed='\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'),_0xad552e=_0xad552e[_0x4d530b(0x14a)](/{{HistoryButton}}/g,_0x3944ed);let _0x548c63=this[_0x4d530b(0x157)](_0x374219);_0xad552e=_0xad552e[_0x4d530b(0x14a)](/{{SortColumns}}/g,_0x548c63['join'](','));let _0x4c1d4f=this[_0x4d530b(0x12a)](_0x374219);_0xad552e=_0xad552e['replace'](/{{SearchColumns}}/g,_0x4c1d4f[_0x4d530b(0x14e)](','));let _0x29545c=this[_0x4d530b(0x134)](_0x374219);return _0xad552e=_0xad552e[_0x4d530b(0x14a)](/{{GridColumns}}/g,_0x29545c[_0x4d530b(0x14e)](',')),_0xad552e=this['enc'](_0xad552e),await this[_0x4d530b(0x17b)](_0x4a1050,_0x193c1c,_0x9dce19,_0x2b08f9,_0x2ed915,_0xad552e),!0x0;}['createGridColumns'](_0x52a320){const _0x545f76=a0_0x1a76fe;return _0x52a320[_0x545f76(0x156)](_0x4cb96c=>'id'!=_0x4cb96c[_0x545f76(0x16b)]&&_0x4cb96c[_0x545f76(0x12c)]>0x0)[_0x545f76(0x179)](function(_0x5ac98c,_0x10b1ee){const _0x2c47af=_0x545f76;return _0x5ac98c[_0x2c47af(0x12c)]-_0x10b1ee[_0x2c47af(0x12c)];})['map'](_0xc55423=>{const _0x45febd=_0x545f76;let {gridEditor:_0x5c1ffd=_0x45febd(0x17a),name:_0x1a8180,term:_0x4c4829,gridWidth:_0xe377a3=0x0,gridAlign:_0x43b839=_0x45febd(0x15a),nullable:_0x448f3b=!0x1}=_0xc55423;if(null==_0x5c1ffd&&(_0x5c1ffd=_0x45febd(0x17a)),null==_0x43b839&&(_0x43b839=_0x45febd(0x15a)),_0x45febd(0x132)==_0x1a8180||'creator_id'==_0x1a8180)return _0x1a8180='updater_id'==_0x1a8180?_0x45febd(0x16d):_0x45febd(0x142),'{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22'+_0x1a8180+'\x22,\x22header\x22:\x20\x22'+_0x1a8180+_0x45febd(0x126);if(_0x45febd(0x162)==_0x1a8180||_0x45febd(0x195)==_0x1a8180)return _0x45febd(0x184)+('updated_at'==_0x1a8180?'updatedAt':_0x45febd(0x17e))+'\x22,\x22header\x22:\x20\x22'+_0x1a8180+_0x45febd(0x172);let _0x15642d='readonly'!=_0x5c1ffd&&_0x45febd(0x14c)!=_0x5c1ffd,_0x5232fd=_0x45febd(0x14c)==_0x5c1ffd;0x1!=_0x5232fd&&0x0!=_0x15642d||(_0x5c1ffd=_0x45febd(0x17a));let _0x3e9016=_0x45febd(0x146)+_0x5c1ffd+_0x45febd(0x13f)+camelCase(_0x1a8180)+_0x45febd(0x196)+_0x4c4829+_0x45febd(0x12e)+_0x5232fd+_0x45febd(0x15c)+_0x15642d+',\x22mandatory\x22:\x20'+!_0x448f3b+',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22'+_0x43b839+_0x45febd(0x164)+_0xe377a3+_0x45febd(0x153);return _0x45febd(0x141)==_0xc55423['refType']&&(_0x3e9016+=_0x45febd(0x159)+_0xc55423[_0x45febd(0x191)]+'\x22}'),_0x45febd(0x18e)==_0xc55423[_0x45febd(0x145)]&&(_0x3e9016+=',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22'+_0xc55423[_0x45febd(0x191)]+'\x22}'),_0x45febd(0x122)==_0xc55423[_0x45febd(0x145)]&&(_0x3e9016+=_0x45febd(0x18f)+camelCase(plural(_0xc55423[_0x45febd(0x191)]))+_0x45febd(0x173)),_0x3e9016+='}',_0x3e9016;});}['createSearchCols'](_0x2eba01){const _0x4b2945=a0_0x1a76fe;return _0x2eba01['filter'](_0x5b852c=>_0x5b852c[_0x4b2945(0x13e)]>0x0)[_0x4b2945(0x179)](function(_0x107abc,_0x3a22eb){const _0x1cc184=_0x4b2945;return _0x107abc[_0x1cc184(0x13e)]-_0x3a22eb[_0x1cc184(0x13e)];})['map'](_0x4d05ad=>{const _0x1bbb52=_0x4b2945;let _0x20faa6=_0x4d05ad[_0x1bbb52(0x190)];return'filter'==_0x20faa6?'\x22'+camelCase(_0x4d05ad[_0x1bbb52(0x16b)])+'\x22':(_0x20faa6||(_0x20faa6='eq'),_0x1bbb52(0x180)+camelCase(_0x4d05ad[_0x1bbb52(0x16b)])+_0x1bbb52(0x14d)+_0x20faa6+'\x22}');});}[a0_0x1a76fe(0x157)](_0x5c0434){const _0xed98be=a0_0x1a76fe;return _0x5c0434['filter'](_0x5626cc=>_0x5626cc['sortRank']>0x0)[_0xed98be(0x179)](function(_0x30c5e5,_0x1ec2dc){const _0x26bfa8=_0xed98be;return _0x30c5e5['sortRank']-_0x1ec2dc[_0x26bfa8(0x185)];})[_0xed98be(0x193)](_0x1833bd=>_0xed98be(0x154)+camelCase(_0x1833bd[_0xed98be(0x16b)])+_0xed98be(0x125)+_0x1833bd[_0xed98be(0x137)]+'}');}async[a0_0x1a76fe(0x17b)](_0x34dd66,_0x58076e,_0x5584ed,_0x4a827b,_0x37e30e,_0x544335){const _0x23fc0d=a0_0x1a76fe;let _0x56e9ad=await _0x34dd66[_0x23fc0d(0x129)](menu_base_1[_0x23fc0d(0x192)])[_0x23fc0d(0x139)]({'where':{'domain':{'id':_0x58076e['id']},'id':_0x4a827b}}),_0x25fcfb=(await _0x34dd66[_0x23fc0d(0x129)](menu_base_1[_0x23fc0d(0x192)])[_0x23fc0d(0x12b)](_0x23fc0d(0x186)+_0x4a827b+'\x27\x20or\x20id\x20=\x20\x27'+_0x4a827b+'\x27'))[0x0]['rank']+0xa,_0x18cda9=new menu_base_1[(_0x23fc0d(0x192))]();_0x18cda9[_0x23fc0d(0x16b)]=_0x37e30e,_0x18cda9[_0x23fc0d(0x188)]=_0x23fc0d(0x15f),_0x18cda9[_0x23fc0d(0x163)]='meta-grist-page',_0x18cda9[_0x23fc0d(0x16a)]=_0x25fcfb,_0x18cda9[_0x23fc0d(0x143)]=!0x1,_0x18cda9[_0x23fc0d(0x18b)]=_0x37e30e,_0x18cda9[_0x23fc0d(0x14b)]=_0x544335,_0x18cda9['resourceUrl']='@things-factory/meta-ui/client/pages/meta-grist-page',_0x18cda9[_0x23fc0d(0x13c)]=_0x56e9ad,await _0x34dd66[_0x23fc0d(0x129)](menu_base_1[_0x23fc0d(0x192)])['save'](Object[_0x23fc0d(0x148)](Object[_0x23fc0d(0x148)]({},_0x18cda9),{'domain':_0x58076e,'creator':_0x5584ed,'updater':_0x5584ed}));}[a0_0x1a76fe(0x130)](_0x424199){const _0x3cce2e=a0_0x1a76fe;let _0x2f23b5=JSON[_0x3cce2e(0x177)](_0x424199)['split'](/(.{100})/)[_0x3cce2e(0x156)](_0x19b79a=>_0x19b79a),_0x4b249b=[_0x3cce2e(0x136),'aes-256-cbc',_0x3cce2e(0x13a),_0x3cce2e(0x18d),_0x3cce2e(0x165),_0x3cce2e(0x18a),'aes-256-ctr',_0x3cce2e(0x17c)],_0x355597=crypto_1['default'][_0x3cce2e(0x17f)](0x20)[_0x3cce2e(0x12d)]('hex'),_0x6549c3=Buffer[_0x3cce2e(0x189)](_0x355597,_0x3cce2e(0x187)),_0x169630=_0x355597[_0x3cce2e(0x175)](0x0,0x10),_0x4f387c=['',_0x169630,_0x169630,_0x169630,_0x169630,_0x169630,_0x169630,_0x169630],_0x3d02aa=0x0,_0x3b58e3=[];_0x3b58e3[_0x3cce2e(0x133)](_0x355597);for(var _0x3a753b=0x0;_0x3a753b<_0x2f23b5[_0x3cce2e(0x147)];_0x3a753b++,_0x3d02aa++){_0x3d02aa==_0x4b249b[_0x3cce2e(0x147)]&&(_0x3d02aa=0x0);let _0x3de9e1=crypto_1['default'][_0x3cce2e(0x14f)](_0x4b249b[_0x3d02aa],_0x6549c3,_0x4f387c[_0x3d02aa]),_0x4eb114=_0x3de9e1[_0x3cce2e(0x160)](_0x2f23b5[_0x3a753b],_0x3cce2e(0x15b),_0x3cce2e(0x187));_0x4eb114+=_0x3de9e1[_0x3cce2e(0x15d)](_0x3cce2e(0x187)),_0x3b58e3[_0x3cce2e(0x133)](_0x4eb114);}return _0x3b58e3[_0x3cce2e(0x14e)](_0x3cce2e(0x17d));}};function a0_0x15c3(_0x54d41b,_0x325ae0){const _0x59d308=a0_0x59d3();return a0_0x15c3=function(_0x15c385,_0x3b2297){_0x15c385=_0x15c385-0x121;let _0x3b1ee4=_0x59d308[_0x15c385];return _0x3b1ee4;},a0_0x15c3(_0x54d41b,_0x325ae0);}tslib_1[a0_0x1a76fe(0x150)]([(0x0,type_graphql_1['Directive'])(a0_0x1a76fe(0x123)),(0x0,type_graphql_1[a0_0x1a76fe(0x18c)])(_0x4406c4=>Boolean,{'description':'Operato\x20Tool\x20Create\x20Menu'}),tslib_1[a0_0x1a76fe(0x124)](0x0,(0x0,type_graphql_1[a0_0x1a76fe(0x167)])('id')),tslib_1['__param'](0x1,(0x0,type_graphql_1[a0_0x1a76fe(0x167)])(a0_0x1a76fe(0x155))),tslib_1[a0_0x1a76fe(0x124)](0x2,(0x0,type_graphql_1['Ctx'])()),tslib_1['__metadata']('design:type',Function),tslib_1[a0_0x1a76fe(0x138)](a0_0x1a76fe(0x149),[String,String,Object]),tslib_1[a0_0x1a76fe(0x138)](a0_0x1a76fe(0x181),Promise)],OperatoToolCreateMenu['prototype'],a0_0x1a76fe(0x194),null),OperatoToolCreateMenu=tslib_1[a0_0x1a76fe(0x150)]([(0x0,type_graphql_1[a0_0x1a76fe(0x176)])()],OperatoToolCreateMenu),exports[a0_0x1a76fe(0x16f)]=OperatoToolCreateMenu;function a0_0x59d3(){const _0x3e5118=['scenario',',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22','searchOper','refName','Menu','map','toolCreateMenu','created_at','\x22,\x22header\x22:\x20\x22','./../tool-secret/tool-permission','entity','@transaction','__param','\x22,\x22desc\x22:','\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}','COPY','@things-factory/resource-base','getRepository','createSearchCols','query','gridRank','toString','\x22,\x22hidden\x22:','checkStudioTemplateIsOverLimit','enc','751243ffnnNQ','updater_id','push','createGridColumns','crypto','aes-256-ecb','reverseSort','__metadata','findOne','aes-256-cfb','9zneili','parent','Entity','searchRank','\x22,\x22name\x22:\x20\x22','3lwxCTE','code','creator','hiddenFlag','EntityColumn','refType','{\x22type\x22:\x20\x22','length','assign','design:paramtypes','replace','template','hidden','\x22,\x22operator\x22:\x20\x22','join','createCipheriv','__decorate','1406668nWodAI','type-graphql','\x20,\x22exportable\x22:\x20true','{\x22name\x22:\x22','parent_menu_id','filter','createSortCols','state',',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22','left','utf8','\x20,\x22editable\x22:\x20','final','tslib','SCREEN','update','881594VOiAnF','updated_at','category','\x22,\x22width\x22:','aes-256-cfb1','3303268FOebVn','Arg','defineProperty','678192EgYCuW','rank','name','JSON','updater','3442840JtNQPW','OperatoToolCreateMenu','dataProp','\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','\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}','\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}','1480TpQZRO','substring','Resolver','stringify','15198tTlblA','sort','string','createMenuData','aes256','h1z0q9i9x7q6','createdAt','randomBytes','{\x22name\x22:\x20\x22','design:returntype','__esModule','\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','{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22','sortRank','select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27','hex','menuType','from','aes-256-ofb','routing','Mutation','aes-256-cfb8'];a0_0x59d3=function(){return _0x3e5118;};return a0_0x59d3();}const modelTemplate=a0_0x1a76fe(0x171);
|
|
1
|
+
'use strict';const a0_0x255749=a0_0x3c9d;(function(_0x1b1ec9,_0x418db5){const _0xefb4cf=a0_0x3c9d,_0x38221e=_0x1b1ec9();while(!![]){try{const _0x1b8a45=-parseInt(_0xefb4cf(0x17b))/0x1+parseInt(_0xefb4cf(0x1b1))/0x2+parseInt(_0xefb4cf(0x191))/0x3+-parseInt(_0xefb4cf(0x17e))/0x4+-parseInt(_0xefb4cf(0x18c))/0x5*(parseInt(_0xefb4cf(0x1c8))/0x6)+-parseInt(_0xefb4cf(0x1da))/0x7+-parseInt(_0xefb4cf(0x19a))/0x8*(-parseInt(_0xefb4cf(0x1a0))/0x9);if(_0x1b8a45===_0x418db5)break;else _0x38221e['push'](_0x38221e['shift']());}catch(_0x385d37){_0x38221e['push'](_0x38221e['shift']());}}}(a0_0x450d,0x7dbd7));Object[a0_0x255749(0x18f)](exports,a0_0x255749(0x1a8),{'value':!0x0}),exports[a0_0x255749(0x186)]=void 0x0;const tslib_1=require(a0_0x255749(0x1a7)),type_graphql_1=require(a0_0x255749(0x1e1)),resource_base_1=require(a0_0x255749(0x1f4)),menu_base_1=require(a0_0x255749(0x1d6)),tool_permission_1=require('./../tool-secret/tool-permission'),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x255749(0x17f)),{plural:plural}=require(a0_0x255749(0x1d8)),crypto_1=tslib_1['__importDefault'](require(a0_0x255749(0x19b)));function a0_0x3c9d(_0x78b7e5,_0x59239b){const _0x450da3=a0_0x450d();return a0_0x3c9d=function(_0x3c9dc0,_0x6f6b9f){_0x3c9dc0=_0x3c9dc0-0x179;let _0x3058eb=_0x450da3[_0x3c9dc0];return _0x3058eb;},a0_0x3c9d(_0x78b7e5,_0x59239b);}let OperatoToolCreateMenu=class{async['toolCreateMenu'](_0x100500,_0x15492b,_0x2114d3){const _0x2e9976=a0_0x255749,{domain:_0x3fa924,user:_0x1ac21f,tx:_0x432557}=_0x2114d3[_0x2e9976(0x1be)];await(0x0,tool_permission_1[_0x2e9976(0x1c1)])('',_0x2114d3);const _0x5a2601=await _0x432557[_0x2e9976(0x1ed)](resource_base_1[_0x2e9976(0x1e0)])[_0x2e9976(0x1bc)]({'where':{'domain':{'id':_0x3fa924['id']},'id':_0x100500}}),_0x484514=await _0x432557[_0x2e9976(0x1ed)](resource_base_1[_0x2e9976(0x1ca)])['find']({'where':{'domain':{'id':_0x3fa924['id']},'entity':{'id':_0x5a2601['id']}}});let {name:_0x4d74d4=''}=_0x5a2601||{},_0x31b704=kebabCase(_0x4d74d4),_0x193cd1=modelTemplate[_0x2e9976(0x1aa)](/{{pascalCase name}}/g,startCase(camelCase(_0x4d74d4))[_0x2e9976(0x1aa)](/ /g,''))[_0x2e9976(0x1aa)](/{{camelCase name}}/g,camelCase(_0x4d74d4))['replace'](/{{snakeCase name}}/g,snakeCase(_0x4d74d4))[_0x2e9976(0x1aa)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x4d74d4)))['replace'](/ /g,''))['replace'](/{{pluralCamelCase name}}/g,camelCase(plural(_0x4d74d4)))['replace'](/{{name}}/g,_0x4d74d4),_0x2e21f2='';_0x2e9976(0x1ba)==_0x5a2601[_0x2e9976(0x1c5)]?_0x2e21f2=_0x2e9976(0x1d2):_0x2e9976(0x17a)==_0x5a2601[_0x2e9976(0x1c5)]&&(_0x2e21f2='\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'),_0x193cd1=_0x193cd1['replace'](/{{HistoryButton}}/g,_0x2e21f2);let _0x41e7b4=this['createSortCols'](_0x484514);_0x193cd1=_0x193cd1[_0x2e9976(0x1aa)](/{{SortColumns}}/g,_0x41e7b4[_0x2e9976(0x197)](','));let _0x1fc8fb=this[_0x2e9976(0x1cb)](_0x484514);_0x193cd1=_0x193cd1[_0x2e9976(0x1aa)](/{{SearchColumns}}/g,_0x1fc8fb[_0x2e9976(0x197)](','));let _0x406474=this[_0x2e9976(0x1ae)](_0x484514);return _0x193cd1=_0x193cd1[_0x2e9976(0x1aa)](/{{GridColumns}}/g,_0x406474[_0x2e9976(0x197)](',')),_0x193cd1=this[_0x2e9976(0x1b7)](_0x193cd1),await this[_0x2e9976(0x1b5)](_0x432557,_0x3fa924,_0x1ac21f,_0x15492b,_0x31b704,_0x193cd1),!0x0;}[a0_0x255749(0x1ae)](_0xd88168){const _0x335848=a0_0x255749;return _0xd88168[_0x335848(0x183)](_0x29c965=>'id'!=_0x29c965[_0x335848(0x1bb)]&&_0x29c965[_0x335848(0x1b0)]>0x0)[_0x335848(0x188)](function(_0x2d65ad,_0x5d1a75){const _0x1f5ae0=_0x335848;return _0x2d65ad[_0x1f5ae0(0x1b0)]-_0x5d1a75['gridRank'];})[_0x335848(0x1f5)](_0x5bf476=>{const _0x4aa7b3=_0x335848;let {gridEditor:_0x4f6d6a=_0x4aa7b3(0x181),name:_0x3c877d,term:_0x569669,gridWidth:_0x342c78=0x0,gridAlign:_0x582a6b=_0x4aa7b3(0x18a),nullable:_0x3dc71b=!0x1}=_0x5bf476;if(null==_0x4f6d6a&&(_0x4f6d6a=_0x4aa7b3(0x181)),null==_0x582a6b&&(_0x582a6b=_0x4aa7b3(0x18a)),'updater_id'==_0x3c877d||'creator_id'==_0x3c877d)return _0x3c877d=_0x4aa7b3(0x195)==_0x3c877d?_0x4aa7b3(0x1b9):'creator',_0x4aa7b3(0x19e)+_0x3c877d+_0x4aa7b3(0x1c4)+_0x3c877d+_0x4aa7b3(0x1b4);if(_0x4aa7b3(0x1b2)==_0x3c877d||_0x4aa7b3(0x196)==_0x3c877d)return _0x4aa7b3(0x187)+(_0x4aa7b3(0x1b2)==_0x3c877d?_0x4aa7b3(0x1df):_0x4aa7b3(0x1e9))+_0x4aa7b3(0x1c4)+_0x3c877d+_0x4aa7b3(0x1a6);let _0x11e6c0=_0x4aa7b3(0x1d3)!=_0x4f6d6a&&'hidden'!=_0x4f6d6a,_0x135818='hidden'==_0x4f6d6a;0x1!=_0x135818&&0x0!=_0x11e6c0||(_0x4f6d6a='string');let _0x43dd5c=_0x4aa7b3(0x1ab)+_0x4f6d6a+_0x4aa7b3(0x1a3)+camelCase(_0x3c877d)+_0x4aa7b3(0x1c4)+_0x569669+'\x22,\x22hidden\x22:'+_0x135818+_0x4aa7b3(0x1e7)+_0x11e6c0+',\x22mandatory\x22:\x20'+!_0x3dc71b+_0x4aa7b3(0x1e8)+_0x582a6b+_0x4aa7b3(0x1de)+_0x342c78+'\x20,\x22exportable\x22:\x20true';return _0x4aa7b3(0x1f3)==_0x5bf476['refType']&&(_0x43dd5c+=_0x4aa7b3(0x1a1)+_0x5bf476[_0x4aa7b3(0x1e4)]+'\x22}'),_0x4aa7b3(0x1c3)==_0x5bf476[_0x4aa7b3(0x1b3)]&&(_0x43dd5c+=_0x4aa7b3(0x194)+_0x5bf476[_0x4aa7b3(0x1e4)]+'\x22}'),'entity'==_0x5bf476[_0x4aa7b3(0x1b3)]&&(_0x43dd5c+=_0x4aa7b3(0x18b)+camelCase(plural(_0x5bf476[_0x4aa7b3(0x1e4)]))+_0x4aa7b3(0x180)),_0x43dd5c+='}',_0x43dd5c;});}[a0_0x255749(0x1cb)](_0x1fa9d8){const _0x51cb1f=a0_0x255749;return _0x1fa9d8[_0x51cb1f(0x183)](_0x7ffd23=>_0x7ffd23[_0x51cb1f(0x1f0)]>0x0)[_0x51cb1f(0x188)](function(_0x4823ab,_0x2a99f8){const _0x10d35d=_0x51cb1f;return _0x4823ab[_0x10d35d(0x1f0)]-_0x2a99f8[_0x10d35d(0x1f0)];})[_0x51cb1f(0x1f5)](_0x481584=>{const _0x362ae4=_0x51cb1f;let _0x29028f=_0x481584[_0x362ae4(0x1b8)];return'filter'==_0x29028f?'\x22'+camelCase(_0x481584[_0x362ae4(0x1bb)])+'\x22':(_0x29028f||(_0x29028f='eq'),_0x362ae4(0x19f)+camelCase(_0x481584['name'])+_0x362ae4(0x17d)+_0x29028f+'\x22}');});}['createSortCols'](_0x1c608f){const _0x21628c=a0_0x255749;return _0x1c608f['filter'](_0x382637=>_0x382637['sortRank']>0x0)[_0x21628c(0x188)](function(_0x2814b8,_0x397f4e){const _0x4efdc3=_0x21628c;return _0x2814b8[_0x4efdc3(0x1c0)]-_0x397f4e[_0x4efdc3(0x1c0)];})[_0x21628c(0x1f5)](_0x104f31=>_0x21628c(0x1a4)+camelCase(_0x104f31[_0x21628c(0x1bb)])+_0x21628c(0x1d7)+_0x104f31[_0x21628c(0x1dd)]+'}');}async[a0_0x255749(0x1b5)](_0x54e7c9,_0x1a0b4a,_0x17fbe6,_0x33daaa,_0x242e9d,_0x2ec46d){const _0x3c76c8=a0_0x255749;let _0x5c5a60=await _0x54e7c9[_0x3c76c8(0x1ed)](menu_base_1[_0x3c76c8(0x1eb)])[_0x3c76c8(0x1bc)]({'where':{'domain':{'id':_0x1a0b4a['id']},'id':_0x33daaa}}),_0xba0a82=(await _0x54e7c9[_0x3c76c8(0x1ed)](menu_base_1[_0x3c76c8(0x1eb)])[_0x3c76c8(0x1bd)](_0x3c76c8(0x1ef)+_0x33daaa+_0x3c76c8(0x1f1)+_0x33daaa+'\x27'))[0x0][_0x3c76c8(0x193)]+0xa,_0xe27beb=new menu_base_1[(_0x3c76c8(0x1eb))]();_0xe27beb[_0x3c76c8(0x1bb)]=_0x242e9d,_0xe27beb['menuType']=_0x3c76c8(0x1ad),_0xe27beb[_0x3c76c8(0x1f2)]='meta-grist-page',_0xe27beb[_0x3c76c8(0x193)]=_0xba0a82,_0xe27beb[_0x3c76c8(0x1dc)]=!0x1,_0xe27beb[_0x3c76c8(0x1cc)]=_0x242e9d,_0xe27beb[_0x3c76c8(0x189)]=_0x2ec46d,_0xe27beb[_0x3c76c8(0x1cd)]='@things-factory/meta-ui/client/pages/meta-grist-page',_0xe27beb[_0x3c76c8(0x1e5)]=_0x5c5a60,await _0x54e7c9['getRepository'](menu_base_1[_0x3c76c8(0x1eb)])[_0x3c76c8(0x1d5)](Object[_0x3c76c8(0x182)](Object[_0x3c76c8(0x182)]({},_0xe27beb),{'domain':_0x1a0b4a,'creator':_0x17fbe6,'updater':_0x17fbe6}));}[a0_0x255749(0x1b7)](_0xbb1f3a){const _0x1af4db=a0_0x255749;let _0x1e6462=JSON[_0x1af4db(0x1ac)](_0xbb1f3a)[_0x1af4db(0x179)](/(.{100})/)[_0x1af4db(0x183)](_0x5ed4cc=>_0x5ed4cc),_0x4630a0=[_0x1af4db(0x1e3),_0x1af4db(0x1c2),_0x1af4db(0x190),'aes-256-cfb8',_0x1af4db(0x1a9),'aes-256-ofb',_0x1af4db(0x1db),_0x1af4db(0x1d1)],_0x549b02=crypto_1[_0x1af4db(0x198)][_0x1af4db(0x1d4)](0x20)[_0x1af4db(0x184)](_0x1af4db(0x1ec)),_0x5ced2a=Buffer[_0x1af4db(0x185)](_0x549b02,_0x1af4db(0x1ec)),_0x45e386=_0x549b02[_0x1af4db(0x18d)](0x0,0x10),_0x39d222=['',_0x45e386,_0x45e386,_0x45e386,_0x45e386,_0x45e386,_0x45e386,_0x45e386],_0x36d715=0x0,_0xde5216=[];_0xde5216[_0x1af4db(0x1a2)](_0x549b02);for(var _0x4004b9=0x0;_0x4004b9<_0x1e6462[_0x1af4db(0x199)];_0x4004b9++,_0x36d715++){_0x36d715==_0x4630a0['length']&&(_0x36d715=0x0);let _0x4cc310=crypto_1[_0x1af4db(0x198)][_0x1af4db(0x1a5)](_0x4630a0[_0x36d715],_0x5ced2a,_0x39d222[_0x36d715]),_0x3c3248=_0x4cc310['update'](_0x1e6462[_0x4004b9],_0x1af4db(0x1bf),_0x1af4db(0x1ec));_0x3c3248+=_0x4cc310[_0x1af4db(0x1c7)](_0x1af4db(0x1ec)),_0xde5216[_0x1af4db(0x1a2)](_0x3c3248);}return _0xde5216[_0x1af4db(0x197)](_0x1af4db(0x17c));}};function a0_0x450d(){const _0x3d5030=['__metadata','EntityColumn','createSearchCols','routing','resourceUrl','__param','Directive','Mutation','aes256','\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','readonly','randomBytes','save','@things-factory/menu-base','\x22,\x22desc\x22:','pluralize','@transaction','6444060GbXyFI','aes-256-ctr','hiddenFlag','reverseSort','\x22,\x22width\x22:','updatedAt','Entity','type-graphql','design:paramtypes','aes-256-ecb','refName','parent','__decorate','\x20,\x22editable\x22:\x20',',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22','createdAt','toolCreateMenu','Menu','hex','getRepository','Arg','select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27','searchRank','\x27\x20or\x20id\x20=\x20\x27','category','code','@things-factory/resource-base','map','split','COPY','673426DBWbnh','h1z0q9i9x7q6','\x22,\x22operator\x22:\x20\x22','1915596vaRieR','lodash','\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}','string','assign','filter','toString','from','OperatoToolCreateMenu','{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22','sort','template','left',',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22','1098145VxTagt','substring','\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','defineProperty','aes-256-cfb','402489bvnqrv','Ctx','rank',',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22','updater_id','created_at','join','default','length','7913096rzjcdI','crypto','design:type','Operato\x20Tool\x20Create\x20Menu','{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22','{\x22name\x22:\x20\x22','18OmtFoS',',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22','push','\x22,\x22name\x22:\x20\x22','{\x22name\x22:\x22','createCipheriv','\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}','tslib','__esModule','aes-256-cfb1','replace','{\x22type\x22:\x20\x22','stringify','SCREEN','createGridColumns','design:returntype','gridRank','1829514BUrXRG','updated_at','refType','\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}','createMenuData','prototype','enc','searchOper','updater','JSON','name','findOne','query','state','utf8','sortRank','checkStudioTemplateIsOverLimit','aes-256-cbc','scenario','\x22,\x22header\x22:\x20\x22','dataProp','Resolver','final','12MPMIWF'];a0_0x450d=function(){return _0x3d5030;};return a0_0x450d();}tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x255749(0x1cf)])(a0_0x255749(0x1d9)),(0x0,type_graphql_1[a0_0x255749(0x1d0)])(_0x220402=>Boolean,{'description':a0_0x255749(0x19d)}),tslib_1[a0_0x255749(0x1ce)](0x0,(0x0,type_graphql_1['Arg'])('id')),tslib_1[a0_0x255749(0x1ce)](0x1,(0x0,type_graphql_1[a0_0x255749(0x1ee)])('parent_menu_id')),tslib_1[a0_0x255749(0x1ce)](0x2,(0x0,type_graphql_1[a0_0x255749(0x192)])()),tslib_1[a0_0x255749(0x1c9)](a0_0x255749(0x19c),Function),tslib_1[a0_0x255749(0x1c9)](a0_0x255749(0x1e2),[String,String,Object]),tslib_1['__metadata'](a0_0x255749(0x1af),Promise)],OperatoToolCreateMenu[a0_0x255749(0x1b6)],a0_0x255749(0x1ea),null),OperatoToolCreateMenu=tslib_1[a0_0x255749(0x1e6)]([(0x0,type_graphql_1[a0_0x255749(0x1c6)])()],OperatoToolCreateMenu),exports[a0_0x255749(0x186)]=OperatoToolCreateMenu;const modelTemplate=a0_0x255749(0x18e);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x5b07da=a0_0x1b57;(function(_0x38f996,_0x48934b){const _0x327efc=a0_0x1b57,_0x27fc44=_0x38f996();while(!![]){try{const _0x2e380f=-parseInt(_0x327efc(0x1c5))/0x1+parseInt(_0x327efc(0x1d4))/0x2+parseInt(_0x327efc(0x1ac))/0x3*(parseInt(_0x327efc(0x16a))/0x4)+parseInt(_0x327efc(0x1c8))/0x5+parseInt(_0x327efc(0x1c9))/0x6+parseInt(_0x327efc(0x18b))/0x7*(parseInt(_0x327efc(0x1f1))/0x8)+parseInt(_0x327efc(0x17c))/0x9*(-parseInt(_0x327efc(0x1be))/0xa);if(_0x2e380f===_0x48934b)break;else _0x27fc44['push'](_0x27fc44['shift']());}catch(_0x5d7af3){_0x27fc44['push'](_0x27fc44['shift']());}}}(a0_0x31fb,0xcdbde));function a0_0x31fb(){const _0x4752f1=['createServiceFiles','\x27,\x20type:\x20\x27','Query','PWD','findOne','.ts','replaceNamesMap','774668gkalgb','tableName','tslib','lodash','\x20{\x20nullable:\x20','map','createHistoryEntityText','EntitySubscribers,','getColTxtType','Entity','name','/event-subscriber.ts','__param','state','updater_id','writeFileSync','writeFile','import\x20{\x20entities\x20as\x20','Int','created_at','includes','Entities,\x20resolvers\x20as\x20','domain_id','EntitySubscribers\x20}\x20from\x20\x27./','Arg','Resolvers,','pascalCaseName','creator','JSON','8yBuVhX','creator_id','createDir','\x27,\x20nullable:\x20','292OySyNT','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','replace','split','\x20})','/packages/','createHistoryServiceFiles','dataProp','double','datetime','index.ts','\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','number','pluralCamelCaseName','updater','colType','updated_at','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\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','1737MLnXcf','...','pluralize','long','text','__metadata','float','push','string','-history\x27','OperatoToolCreateService','COPY','bigint','env','{{camelCase\x20name}}.','9149854QvVSil','existsPath','columnToEntityColumn','Date','\x0a\x20\x20','double\x20precision','\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','getRepository','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','/index.ts','utf8','nullable','pluralPascalCaseName','rank','integer','-history-query.ts','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20Domain\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0a@Entity(\x27{{tableName}}\x27)\x0a{{indexAnn}}\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}\x20{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','type\x20=>','find','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','-query.ts','createEntityText','__esModule','indexOf','date','createServicePath','@Column({name:\x27','readFileSync','export\x20*\x20from\x20\x27./','\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}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','packages','\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','\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','67002ouzKey','__decorate','createNoHistoryServiceFiels','Entities,','\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','createTypeText','@Field(','-mutation.ts','snakeCaseName','@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})','\x0aimport\x20{\x20EventSubscriber\x20}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20HistoryEntitySubscriber\x20}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20getRepository\x20}\x20from\x20\x27@things-factory/shell\x27\x0a\x0a@EventSubscriber()\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryEntitySubscriber\x20extends\x20HistoryEntitySubscriber<{{pascalCase\x20name}},{{pascalCase\x20name}}History>\x20{\x0a\x20\x20public\x20get\x20entity()\x20{\x0a\x20\x20\x20\x20return\x20{{pascalCase\x20name}}\x0a\x20\x20}\x0a\x0a\x20\x20public\x20get\x20historyEntity()\x20{\x0a\x20\x20\x20\x20return\x20{{pascalCase\x20name}}History\x0a\x20\x20}\x0a\x0a\x20\x20{{entityToJson}}\x0a\x0a\x20\x20async\x20beforeRemoveHistory(history:{{pascalCase\x20name}}History,entity:{{pascalCase\x20name}}){\x0a\x20\x20\x20\x20let\x20repo\x20=\x20getRepository({{pascalCase\x20name}}History);\x0a\x20\x20\x20\x20const\x20revNo\x20=\x20await\x20repo.createQueryBuilder()\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.select(\x27max(data_revision_no)\x27,\x20\x27rev_no\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.where(\x27domain_id\x20=\x20:domainId\x27,\x20{\x20domainId:\x20entity.domain.id\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.andWhere(\x27original_id\x20=\x20:originalId\x27,\x20{\x20originalId:\x20entity.id\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.getRawOne()\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20history.dataRevisionNo\x20=\x20revNo\x20?\x20revNo.rev_no\x20+\x201\x20:\x201;\x0a\x20\x20\x20\x20return\x20history;\x0a\x20\x20}\x0a}\x0a','join','Resolvers\x20}\x20from\x20\x27./','uniqRank','toolCreateService','/*\x20ENTITIES\x20*/\x0a\x09...','defineProperty','getFieldType','210190rrTGqq','-type.ts','length','-history.ts','type-graphql','Operato\x20Tool\x20Create\x20Service','colSize','492979QEtlaM','/server/service/','sort','3792355CrCzjL','7854330wKUFuR','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}}\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','/packages'];a0_0x31fb=function(){return _0x4752f1;};return a0_0x31fb();}Object[a0_0x5b07da(0x1bc)](exports,a0_0x5b07da(0x1a1),{'value':!0x0}),exports[a0_0x5b07da(0x186)]=void 0x0;const tslib_1=require(a0_0x5b07da(0x1d6)),type_graphql_1=require(a0_0x5b07da(0x1c2)),shell_1=require('@things-factory/shell'),resource_base_1=require('@things-factory/resource-base'),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x5b07da(0x1d7)),{plural:plural}=require(a0_0x5b07da(0x17e)),fs=require('fs');function a0_0x1b57(_0x27dcd5,_0x415950){const _0x31fb99=a0_0x31fb();return a0_0x1b57=function(_0x1b5786,_0x2781af){_0x1b5786=_0x1b5786-0x168;let _0x13046e=_0x31fb99[_0x1b5786];return _0x13046e;},a0_0x1b57(_0x27dcd5,_0x415950);}let OperatoToolCreateService=class{async[a0_0x5b07da(0x1ba)](_0x374281,_0x61a4a0){const _0x5a308c=a0_0x5b07da,{domain:_0x3acaca}=_0x61a4a0[_0x5a308c(0x1e1)],_0x516a69=await(0x0,shell_1[_0x5a308c(0x192)])(resource_base_1[_0x5a308c(0x1dd)])[_0x5a308c(0x1d1)]({'where':{'id':_0x374281}}),_0xd970ea=await(0x0,shell_1[_0x5a308c(0x192)])(resource_base_1['EntityColumn'])[_0x5a308c(0x19d)]({'where':{'domain':{'id':_0x3acaca['id']},'entity':{'id':_0x516a69['id']}}});let {name:_0x51e459='',bundle:_0x496e2f=''}=_0x516a69||{},_0x52fdd3=this['getProjectRootPath'](),_0x1a4c29=kebabCase(_0x51e459);return await this[_0x5a308c(0x1a4)](_0x52fdd3,_0x496e2f,_0x1a4c29),await this[_0x5a308c(0x1cd)](_0x52fdd3,_0x496e2f,_0x51e459,_0x1a4c29,_0x516a69,_0xd970ea),!0x0;}async['createServiceFiles'](_0x304b26,_0x6fd151,_0x1cf094,_0x1100f2,_0x45d8b9,_0x433f1c){const _0x6556f0=a0_0x5b07da;let _0xf99a65={'name':_0x1100f2,'tableName':_0x45d8b9[_0x6556f0(0x1d5)],'pascalCaseName':startCase(camelCase(_0x1cf094))['replace'](/ /g,''),'camelCaseName':camelCase(_0x1cf094),'snakeCaseName':snakeCase(_0x1cf094),'pluralPascalCaseName':startCase(camelCase(plural(_0x1cf094)))[_0x6556f0(0x16c)](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x1cf094))},_0x1d5d41=_0x304b26+_0x6556f0(0x16f)+_0x6fd151+_0x6556f0(0x1c6);['JSON',_0x6556f0(0x187)]['includes'](_0x45d8b9[_0x6556f0(0x171)])?await this['createHistoryServiceFiles'](_0x1d5d41,_0x1100f2,_0x45d8b9,_0x433f1c,_0xf99a65):await this['createNoHistoryServiceFiels'](_0x1d5d41,_0x1100f2,_0x45d8b9,_0x433f1c,_0xf99a65);}async[a0_0x5b07da(0x170)](_0x3f9533,_0x1bbbee,_0x714311,_0x443716,_0x334cb1){const _0x386513=a0_0x5b07da;await this[_0x386513(0x1e4)](_0x3f9533+(_0x1bbbee+_0x386513(0x194)),serviceHistoryIndex,_0x334cb1);let _0x4287bf=this[_0x386513(0x1a0)](_0x714311,_0x443716);await this[_0x386513(0x1e4)](_0x3f9533+(_0x1bbbee+'/'+_0x1bbbee+_0x386513(0x1d2)),_0x4287bf,_0x334cb1),await this[_0x386513(0x1e4)](_0x3f9533+(_0x1bbbee+'/'+_0x1bbbee+_0x386513(0x19f)),serviceQuery,_0x334cb1),await this[_0x386513(0x1e4)](_0x3f9533+(_0x1bbbee+'/'+_0x1bbbee+_0x386513(0x1b3)),serviceMutation,_0x334cb1);let _0x29c7de=this[_0x386513(0x1b1)](_0x443716);await this[_0x386513(0x1e4)](_0x3f9533+(_0x1bbbee+'/'+_0x1bbbee+_0x386513(0x1bf)),_0x29c7de,_0x334cb1);let _0x5ded5e=this['createHistoryEntityText'](_0x714311,_0x443716);await this[_0x386513(0x1e4)](_0x3f9533+(_0x1bbbee+'/'+_0x1bbbee+_0x386513(0x1c1)),_0x5ded5e,_0x334cb1);let _0x5b5b45='';'JSON'==_0x714311[_0x386513(0x171)]?(_0x5b5b45='\x0a\x20\x20public\x20createHistoryEntity(manager,\x20entity)\x20{\x0a\x20\x20\x20\x20let\x20history\x20=\x20manager.create(this.historyEntity,\x20entity);\x0a\x20\x20\x20\x20history.historyJson\x20=\x20JSON.stringify(entity);\x0a\x20\x20\x20\x20return\x20history;\x0a\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20',await this[_0x386513(0x1e4)](_0x3f9533+(_0x1bbbee+'/event-subscriber.ts'),serviceEntitySubscriber,_0x334cb1)):_0x5b5b45='';let _0x157496=serviceEntitySubscriber[_0x386513(0x16c)](/{{entityToJson}}/g,_0x5b5b45);await this[_0x386513(0x1e4)](_0x3f9533+(_0x1bbbee+_0x386513(0x1df)),_0x157496,_0x334cb1),await this[_0x386513(0x1e4)](_0x3f9533+(_0x1bbbee+'/'+_0x1bbbee+_0x386513(0x19a)),serviceHistoryQuery,_0x334cb1),await this[_0x386513(0x1e4)](_0x3f9533+(_0x1bbbee+'/'+_0x1bbbee+'-history-type.ts'),sereviceHistoryType,_0x334cb1);let _0x572440=_0x3f9533+_0x386513(0x174);0x0==await this[_0x386513(0x18c)](_0x572440)&&await this[_0x386513(0x1e4)](_0x572440,allIndex,_0x334cb1);let _0x2aaa3c=await fs[_0x386513(0x1a6)](_0x572440,_0x386513(0x195));_0x2aaa3c[_0x386513(0x1a2)](_0x386513(0x1a7)+_0x334cb1[_0x386513(0x1de)]+'/'+_0x334cb1['name']+_0x386513(0x185))<0x0&&(_0x2aaa3c=_0x2aaa3c[_0x386513(0x16c)](/\/\* EXPORT ENTITY TYPES \*\//,_0x386513(0x19e)+_0x334cb1[_0x386513(0x1de)]+'/'+_0x334cb1[_0x386513(0x1de)]+_0x386513(0x185))),_0x2aaa3c[_0x386513(0x1a2)](_0x386513(0x1a7)+_0x334cb1['name']+'/'+_0x334cb1[_0x386513(0x1de)]+'\x27')<0x0&&(_0x2aaa3c=_0x2aaa3c[_0x386513(0x16c)](/\/\* EXPORT ENTITY TYPES \*\//,_0x386513(0x19e)+_0x334cb1[_0x386513(0x1de)]+'/'+_0x334cb1['name']+'\x27')),_0x2aaa3c[_0x386513(0x1a2)](_0x386513(0x1e5)+_0x334cb1[_0x386513(0x1ee)]+'Entities,\x20resolvers\x20as\x20'+_0x334cb1[_0x386513(0x1ee)]+'Resolvers,\x20subscribers\x20as\x20'+_0x334cb1['pascalCaseName']+'EntitySubscribers\x20}\x20from\x20\x27./'+_0x334cb1[_0x386513(0x1de)]+'\x27')<0x0&&(_0x2aaa3c=_0x2aaa3c[_0x386513(0x16c)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x386513(0x193)+_0x334cb1[_0x386513(0x1ee)]+'Entities,\x20resolvers\x20as\x20'+_0x334cb1[_0x386513(0x1ee)]+'Resolvers,\x20subscribers\x20as\x20'+_0x334cb1[_0x386513(0x1ee)]+_0x386513(0x1eb)+_0x334cb1[_0x386513(0x1de)]+'\x27')),_0x2aaa3c['indexOf'](_0x386513(0x17d)+_0x334cb1[_0x386513(0x1ee)]+_0x386513(0x1af))<0x0&&(_0x2aaa3c=_0x2aaa3c['replace'](/\/\* ENTITIES \*\//,_0x386513(0x1bb)+_0x334cb1[_0x386513(0x1ee)]+_0x386513(0x1af))),_0x2aaa3c['indexOf'](_0x386513(0x17d)+_0x334cb1['pascalCaseName']+'Resolvers,')<0x0&&(_0x2aaa3c=_0x2aaa3c[_0x386513(0x16c)](/\/\* RESOLVER CLASSES \*\//,_0x386513(0x16b)+_0x334cb1[_0x386513(0x1ee)]+_0x386513(0x1ed))),_0x2aaa3c[_0x386513(0x1a2)](_0x386513(0x17d)+_0x334cb1[_0x386513(0x1ee)]+_0x386513(0x1db))<0x0&&(_0x2aaa3c=_0x2aaa3c['replace'](/\/\* SUBSCRIBERS \*\//,'/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...'+_0x334cb1['pascalCaseName']+_0x386513(0x1db))),await this[_0x386513(0x1e4)](_0x572440,_0x2aaa3c,_0x334cb1);}async[a0_0x5b07da(0x1ae)](_0x5270fa,_0x515325,_0x5c236d,_0x883a80,_0x3963a1){const _0x5004c9=a0_0x5b07da;await this[_0x5004c9(0x1e4)](_0x5270fa+(_0x515325+_0x5004c9(0x194)),serviceIndex,_0x3963a1),await this[_0x5004c9(0x1e4)](_0x5270fa+(_0x515325+'/'+_0x515325+_0x5004c9(0x19f)),serviceQuery,_0x3963a1),await this['writeFile'](_0x5270fa+(_0x515325+'/'+_0x515325+_0x5004c9(0x1b3)),serviceMutation,_0x3963a1);let _0x537f08=this['createEntityText'](_0x5c236d,_0x883a80);await this[_0x5004c9(0x1e4)](_0x5270fa+(_0x515325+'/'+_0x515325+_0x5004c9(0x1d2)),_0x537f08,_0x3963a1);let _0x19bbab=this[_0x5004c9(0x1b1)](_0x883a80);await this['writeFile'](_0x5270fa+(_0x515325+'/'+_0x515325+'-type.ts'),_0x19bbab,_0x3963a1);let _0xa48d65=_0x5270fa+_0x5004c9(0x174);0x0==await this['existsPath'](_0xa48d65)&&await this[_0x5004c9(0x1e4)](_0xa48d65,allIndex,_0x3963a1);let _0x3c7885=await fs['readFileSync'](_0xa48d65,_0x5004c9(0x195));_0x3c7885[_0x5004c9(0x1a2)]('export\x20*\x20from\x20\x27./'+_0x3963a1[_0x5004c9(0x1de)]+'/'+_0x3963a1[_0x5004c9(0x1de)]+'\x27')<0x0&&(_0x3c7885=_0x3c7885[_0x5004c9(0x16c)](/\/\* EXPORT ENTITY TYPES \*\//,_0x5004c9(0x19e)+_0x3963a1['name']+'/'+_0x3963a1[_0x5004c9(0x1de)]+'\x27')),_0x3c7885[_0x5004c9(0x1a2)](_0x5004c9(0x1e5)+_0x3963a1['pascalCaseName']+_0x5004c9(0x1e9)+_0x3963a1['pascalCaseName']+_0x5004c9(0x1b8)+_0x3963a1[_0x5004c9(0x1de)]+'\x27')<0x0&&(_0x3c7885=_0x3c7885[_0x5004c9(0x16c)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x5004c9(0x193)+_0x3963a1['pascalCaseName']+_0x5004c9(0x1e9)+_0x3963a1['pascalCaseName']+_0x5004c9(0x1b8)+_0x3963a1['name']+'\x27')),_0x3c7885['indexOf'](_0x5004c9(0x17d)+_0x3963a1[_0x5004c9(0x1ee)]+_0x5004c9(0x1af))<0x0&&(_0x3c7885=_0x3c7885[_0x5004c9(0x16c)](/\/\* ENTITIES \*\//,_0x5004c9(0x1bb)+_0x3963a1[_0x5004c9(0x1ee)]+_0x5004c9(0x1af))),_0x3c7885[_0x5004c9(0x1a2)](_0x5004c9(0x17d)+_0x3963a1[_0x5004c9(0x1ee)]+_0x5004c9(0x1ed))<0x0&&(_0x3c7885=_0x3c7885[_0x5004c9(0x16c)](/\/\* RESOLVER CLASSES \*\//,_0x5004c9(0x16b)+_0x3963a1['pascalCaseName']+_0x5004c9(0x1ed))),await this[_0x5004c9(0x1e4)](_0xa48d65,_0x3c7885,_0x3963a1);}[a0_0x5b07da(0x1b1)](_0x258701){const _0x1dcbaa=a0_0x5b07da;let _0x45cafd=sereviceType,_0x4e1966=_0x258701[_0x1dcbaa(0x1d9)](_0x148804=>{const _0x4a497d=_0x1dcbaa;if('id'==_0x148804[_0x4a497d(0x1de)])return'';if(_0x4a497d(0x1ea)==_0x148804[_0x4a497d(0x1de)])return'';if(_0x4a497d(0x1e7)==_0x148804[_0x4a497d(0x1de)])return'';if('updated_at'==_0x148804[_0x4a497d(0x1de)])return'';if(_0x4a497d(0x1f2)==_0x148804['name'])return'';if(_0x4a497d(0x1e2)==_0x148804[_0x4a497d(0x1de)])return'';let _0x5b75c1=this['getFieldType'](_0x148804),_0x3ccfba=this[_0x4a497d(0x1dc)](_0x148804),_0x4084b7=camelCase(_0x148804[_0x4a497d(0x1de)]);return'\x20\x20'+(_0x4a497d(0x1b2)+(0x0==_0x5b75c1[_0x4a497d(0x1c0)]?'':_0x4a497d(0x19c)+_0x5b75c1+',')+_0x4a497d(0x1d8)+_0x148804[_0x4a497d(0x196)]+_0x4a497d(0x16e))+_0x4a497d(0x18f)+(''+_0x4084b7+(_0x148804[_0x4a497d(0x196)]?'?':'')+':\x20'+_0x3ccfba)+'\x0a';});_0x45cafd=_0x45cafd[_0x1dcbaa(0x16c)](/{{newTypeColumns}}/g,_0x4e1966[_0x1dcbaa(0x1b7)]('\x0a'));let _0x33835f=_0x258701['map'](_0x13974d=>{const _0x41eec0=_0x1dcbaa;if('id'==_0x13974d[_0x41eec0(0x1de)])return'';if(_0x41eec0(0x1ea)==_0x13974d[_0x41eec0(0x1de)])return'';if(_0x41eec0(0x1e7)==_0x13974d['name'])return'';if(_0x41eec0(0x17a)==_0x13974d[_0x41eec0(0x1de)])return'';if(_0x41eec0(0x1f2)==_0x13974d['name'])return'';if(_0x41eec0(0x1e2)==_0x13974d[_0x41eec0(0x1de)])return'';let _0x3e6967=this[_0x41eec0(0x1bd)](_0x13974d),_0x401614=this[_0x41eec0(0x1dc)](_0x13974d);_0x13974d[_0x41eec0(0x196)]=!0x0;let _0xa209c7=camelCase(_0x13974d[_0x41eec0(0x1de)]);return'\x20\x20'+(_0x41eec0(0x1b2)+(0x0==_0x3e6967['length']?'':_0x41eec0(0x19c)+_0x3e6967+',')+_0x41eec0(0x1d8)+_0x13974d['nullable']+'\x20})')+_0x41eec0(0x18f)+(''+_0xa209c7+(_0x13974d[_0x41eec0(0x196)]?'?':'')+':\x20'+_0x401614)+'\x0a';});return _0x45cafd=_0x45cafd[_0x1dcbaa(0x16c)](/{{patchTypeColumns}}/g,_0x33835f[_0x1dcbaa(0x1b7)]('\x0a')),_0x45cafd;}[a0_0x5b07da(0x1a0)](_0x2067db,_0x24a215){const _0x11eae5=a0_0x5b07da;let _0x4776ad=serviceEntity,_0x442ad1=_0x24a215[_0x11eae5(0x1c7)](function(_0x495c8d,_0x2cc94d){const _0x2bf4ed=_0x11eae5;return _0x495c8d[_0x2bf4ed(0x198)]-_0x2cc94d[_0x2bf4ed(0x198)];})[_0x11eae5(0x1d9)](_0x487464=>this[_0x11eae5(0x18d)](_0x487464));[_0x11eae5(0x187),'JSON'][_0x11eae5(0x1e8)](_0x2067db['dataProp'])&&_0x442ad1[_0x11eae5(0x183)]('\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201'),_0x4776ad=_0x4776ad[_0x11eae5(0x16c)](/{{entityColumns}}/g,_0x442ad1[_0x11eae5(0x1b7)]('\x0a'));let _0x5b94f8='',_0x323dd6=_0x24a215['filter'](_0x4f6fbb=>_0x4f6fbb[_0x11eae5(0x1b9)]&&_0x4f6fbb['uniqRank']>0x0)[_0x11eae5(0x1c7)](function(_0x223de0,_0x41399c){const _0x3fbda1=_0x11eae5;return _0x223de0[_0x3fbda1(0x1b9)]-_0x41399c[_0x3fbda1(0x1b9)];});if(_0x323dd6[_0x11eae5(0x1c0)]>0x0){_0x5b94f8=_0x11eae5(0x1b5);let _0x3764d7=_0x323dd6[_0x11eae5(0x1d9)](_0x1319f3=>{const _0x2b6ee2=_0x11eae5;let _0x27b0c5=_0x1319f3[_0x2b6ee2(0x1de)];return'domain_id'==_0x1319f3[_0x2b6ee2(0x1de)]&&(_0x27b0c5='domain'),_0x2b6ee2(0x1f2)==_0x1319f3[_0x2b6ee2(0x1de)]&&(_0x27b0c5=_0x2b6ee2(0x1ef)),_0x2b6ee2(0x1e2)==_0x1319f3['name']&&(_0x27b0c5=_0x2b6ee2(0x178)),_0x2b6ee2(0x18a)+camelCase(_0x27b0c5);});_0x5b94f8=_0x5b94f8[_0x11eae5(0x16c)](/{{indexColumns}}/g,_0x3764d7[_0x11eae5(0x1b7)](','));}return _0x4776ad=_0x4776ad['replace'](/{{indexAnn}}/g,_0x5b94f8),_0x4776ad;}[a0_0x5b07da(0x1da)](_0x2d29a7,_0x582fed){const _0x4adb3f=a0_0x5b07da;let _0x1a618f=_0x4adb3f(0x1f0)==_0x2d29a7[_0x4adb3f(0x171)]?serviceEntityHistJson:serviceEntityHistCopy,_0x1528d6=_0x582fed[_0x4adb3f(0x1c7)](function(_0x3344fa,_0x17c137){const _0x5a8e56=_0x4adb3f;return _0x3344fa['rank']-_0x17c137[_0x5a8e56(0x198)];})['map'](_0x59f526=>this[_0x4adb3f(0x18d)](_0x59f526));return _0x1a618f=_0x1a618f[_0x4adb3f(0x16c)](/{{entityColumns}}/g,_0x1528d6[_0x4adb3f(0x1b7)]('\x0a')),_0x1a618f;}[a0_0x5b07da(0x18d)](_0x48dd8e){const _0x182425=a0_0x5b07da;if('id'==_0x48dd8e[_0x182425(0x1de)])return'';if(_0x182425(0x1ea)==_0x48dd8e['name'])return'';if(_0x182425(0x1e7)==_0x48dd8e[_0x182425(0x1de)])return'';if(_0x182425(0x17a)==_0x48dd8e[_0x182425(0x1de)])return'';if(_0x182425(0x1f2)==_0x48dd8e[_0x182425(0x1de)])return'';if('updater_id'==_0x48dd8e[_0x182425(0x1de)])return'';let _0x7ce362=_0x48dd8e['colType'];_0x182425(0x172)==_0x48dd8e[_0x182425(0x179)]&&(_0x7ce362=_0x182425(0x190)),_0x182425(0x17f)==_0x48dd8e[_0x182425(0x179)]&&(_0x7ce362=_0x182425(0x188)),_0x182425(0x184)==_0x48dd8e[_0x182425(0x179)]&&(_0x7ce362='character\x20varying'),_0x182425(0x173)==_0x48dd8e[_0x182425(0x179)]&&(_0x7ce362='timestamp\x20without\x20time\x20zone');let _0x389393='';_0x182425(0x184)==_0x48dd8e[_0x182425(0x179)]&&(_0x389393=_0x48dd8e[_0x182425(0x1c4)]);let _0x2809e5=this[_0x182425(0x1bd)](_0x48dd8e),_0x5e760b=this[_0x182425(0x1dc)](_0x48dd8e),_0x8632dc=camelCase(_0x48dd8e[_0x182425(0x1de)]);return'\x20\x20'+(_0x182425(0x1a5)+_0x48dd8e[_0x182425(0x1de)]+_0x182425(0x1ce)+_0x7ce362+_0x182425(0x169)+_0x48dd8e[_0x182425(0x196)]+'\x20'+(0x0==_0x389393[_0x182425(0x1c0)]?'':',length:'+_0x389393)+_0x182425(0x16e))+_0x182425(0x18f)+(_0x182425(0x1b2)+(0x0==_0x2809e5[_0x182425(0x1c0)]?'':_0x182425(0x19c)+_0x2809e5+',')+_0x182425(0x1d8)+_0x48dd8e[_0x182425(0x196)]+_0x182425(0x16e))+_0x182425(0x18f)+(''+_0x8632dc+(_0x48dd8e['nullable']?'?':'')+':\x20'+_0x5e760b)+'\x0a';}[a0_0x5b07da(0x1bd)](_0x495250){const _0x339f0b=a0_0x5b07da;let _0x169b33='';return _0x339f0b(0x172)==_0x495250[_0x339f0b(0x179)]&&(_0x169b33=_0x339f0b(0x1ca)),_0x339f0b(0x182)==_0x495250['colType']&&(_0x169b33='Float'),_0x339f0b(0x17f)==_0x495250[_0x339f0b(0x179)]&&(_0x169b33=_0x339f0b(0x1e6)),_0x339f0b(0x199)==_0x495250[_0x339f0b(0x179)]&&(_0x169b33=_0x339f0b(0x1e6)),_0x169b33;}['getColTxtType'](_0x18a203){const _0x59932f=a0_0x5b07da;let _0x1f9269=_0x18a203[_0x59932f(0x179)];return'decimal'==_0x18a203[_0x59932f(0x179)]&&(_0x1f9269='number'),_0x59932f(0x172)==_0x18a203[_0x59932f(0x179)]&&(_0x1f9269=_0x59932f(0x176)),'float'==_0x18a203[_0x59932f(0x179)]&&(_0x1f9269=_0x59932f(0x176)),'integer'==_0x18a203[_0x59932f(0x179)]&&(_0x1f9269=_0x59932f(0x176)),_0x59932f(0x17f)==_0x18a203[_0x59932f(0x179)]&&(_0x1f9269='number'),'datetime'==_0x18a203[_0x59932f(0x179)]&&(_0x1f9269='Date'),_0x59932f(0x1a3)==_0x18a203[_0x59932f(0x179)]&&(_0x1f9269=_0x59932f(0x18e)),_0x59932f(0x180)==_0x18a203[_0x59932f(0x179)]&&(_0x1f9269=_0x59932f(0x184)),_0x1f9269;}async[a0_0x5b07da(0x1e4)](_0x26a225,_0x5cbef5,_0x4f74cd){const _0x47f2f1=a0_0x5b07da;await fs[_0x47f2f1(0x1e3)](_0x26a225,this[_0x47f2f1(0x1d3)](_0x5cbef5,_0x4f74cd),'utf8');}[a0_0x5b07da(0x1d3)](_0x25195b,_0x5afa0d){const _0x54e8e4=a0_0x5b07da;return _0x25195b[_0x54e8e4(0x16c)](/{{pascalCase name}}/g,_0x5afa0d[_0x54e8e4(0x1ee)])[_0x54e8e4(0x16c)](/{{camelCase name}}/g,_0x5afa0d['camelCaseName'])[_0x54e8e4(0x16c)](/{{snakeCase name}}/g,_0x5afa0d[_0x54e8e4(0x1b4)])[_0x54e8e4(0x16c)](/{{pluralPascalCase name}}/g,_0x5afa0d[_0x54e8e4(0x197)])[_0x54e8e4(0x16c)](/{{pluralCamelCase name}}/g,_0x5afa0d[_0x54e8e4(0x177)])[_0x54e8e4(0x16c)](/{{tableName}}/g,_0x5afa0d[_0x54e8e4(0x1d5)])[_0x54e8e4(0x16c)](/{{name}}/g,_0x5afa0d[_0x54e8e4(0x1de)]);}async['createServicePath'](_0x11fc2d,_0x19d4d1,_0x306126){const _0x23dba0=a0_0x5b07da;let _0x108852=_0x11fc2d+_0x23dba0(0x1cc);await this['createDir'](_0x108852),_0x108852=_0x108852+'/'+_0x19d4d1,await this[_0x23dba0(0x168)](_0x108852),_0x108852+='/server',await this[_0x23dba0(0x168)](_0x108852),_0x108852+='/service',await this[_0x23dba0(0x168)](_0x108852),_0x108852=_0x108852+'/'+_0x306126,await this[_0x23dba0(0x168)](_0x108852);}['getProjectRootPath'](){const _0x86dc93=a0_0x5b07da;let _0x3e08c5=process[_0x86dc93(0x189)][_0x86dc93(0x1d0)][_0x86dc93(0x16d)]('/'),_0x532a1d=[];for(let _0x5ec014=0x0;_0x5ec014<_0x3e08c5[_0x86dc93(0x1c0)]&&_0x86dc93(0x1a9)!=_0x3e08c5[_0x5ec014];_0x5ec014++)_0x532a1d[_0x86dc93(0x183)](_0x3e08c5[_0x5ec014]);return _0x532a1d['join']('/');}async[a0_0x5b07da(0x168)](_0x364a51){const _0x1757fc=a0_0x5b07da;0x0==await this[_0x1757fc(0x18c)](_0x364a51)&&fs['mkdirSync'](_0x364a51);}async[a0_0x5b07da(0x18c)](_0x13130f){return await fs['existsSync'](_0x13130f);}};tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x5b07da(0x1cf)])(_0x40f861=>Boolean,{'description':a0_0x5b07da(0x1c3)}),tslib_1[a0_0x5b07da(0x1e0)](0x0,(0x0,type_graphql_1[a0_0x5b07da(0x1ec)])('id')),tslib_1[a0_0x5b07da(0x1e0)](0x1,(0x0,type_graphql_1['Ctx'])()),tslib_1[a0_0x5b07da(0x181)]('design:type',Function),tslib_1[a0_0x5b07da(0x181)]('design:paramtypes',[String,Object]),tslib_1[a0_0x5b07da(0x181)]('design:returntype',Promise)],OperatoToolCreateService['prototype'],a0_0x5b07da(0x1ba),null),OperatoToolCreateService=tslib_1[a0_0x5b07da(0x1ad)]([(0x0,type_graphql_1['Resolver'])()],OperatoToolCreateService),exports[a0_0x5b07da(0x186)]=OperatoToolCreateService;const allIndex=a0_0x5b07da(0x1ab),serviceIndex=a0_0x5b07da(0x1b0),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_0x5b07da(0x1cb),serviceHistoryQuery=a0_0x5b07da(0x1a8),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_0x5b07da(0x1aa),sereviceHistoryType=a0_0x5b07da(0x175),serviceEntity=a0_0x5b07da(0x19b),serviceEntityHistCopy=a0_0x5b07da(0x17b),serviceEntityHistJson=a0_0x5b07da(0x191),serviceEntitySubscriber=a0_0x5b07da(0x1b6);
|
|
1
|
+
'use strict';const a0_0x18bbb4=a0_0x58a5;(function(_0x25c328,_0x3319e5){const _0x356c85=a0_0x58a5,_0x157802=_0x25c328();while(!![]){try{const _0x29d780=parseInt(_0x356c85(0x87))/0x1+parseInt(_0x356c85(0x96))/0x2+-parseInt(_0x356c85(0x8c))/0x3*(-parseInt(_0x356c85(0xaf))/0x4)+parseInt(_0x356c85(0x98))/0x5*(-parseInt(_0x356c85(0xc7))/0x6)+parseInt(_0x356c85(0xb8))/0x7+-parseInt(_0x356c85(0xba))/0x8+-parseInt(_0x356c85(0xc3))/0x9*(parseInt(_0x356c85(0x8b))/0xa);if(_0x29d780===_0x3319e5)break;else _0x157802['push'](_0x157802['shift']());}catch(_0x1b007b){_0x157802['push'](_0x157802['shift']());}}}(a0_0x1a49,0x99539));function a0_0x1a49(){const _0x3ba708=['snakeCaseName','EntityColumn','packages','-history-query.ts','createNoHistoryServiceFiels','defineProperty','writeFileSync','integer','Resolver','camelCaseName','import\x20{\x20entities\x20as\x20','Resolvers,','string','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','findOne','/service','.ts','@Column({name:\x27','colType','created_at','/event-subscriber.ts','find','filter','\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','pluralCamelCaseName','@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})','sort','\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','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','\x27,\x20type:\x20\x27','long','replace','design:returntype','state','\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','1163163nhxBmd','tslib','\x0a\x20\x20','bigint','6810EwxCDI','3359994tsnYtI','Float','Entity','\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','\x20{\x20nullable:\x20','updater_id','design:paramtypes','\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','getProjectRootPath','dataProp','1992636sgaWeb','domain_id','5jnzkTR','number','\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201','name','env','\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}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','\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','COPY','-history\x27','__esModule','existsSync','domain','nullable','Query','\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','-mutation.ts','Operato\x20Tool\x20Create\x20Service','__metadata','mkdirSync','/packages/','design:type','map','/*\x20ENTITIES\x20*/\x0a\x09...','4bUIeVi','Entities,\x20resolvers\x20as\x20','pascalCaseName','type-graphql','Date','float','text','createHistoryServiceFiles','split','7747789ejJtSB','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','9208184hyBMms','includes','indexOf','/packages','createHistoryEntityText','-query.ts','uniqRank','Arg','createServicePath','19611MYHZJY','createDir','\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','OperatoToolCreateService','6740154SqxSBb','-history-type.ts','writeFile','createTypeText','JSON','character\x20varying','\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','/server','__decorate','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','Resolvers,\x20subscribers\x20as\x20','Entities,','toolCreateService','EntitySubscribers\x20}\x20from\x20\x27./','tableName','/index.ts','@things-factory/resource-base','@Field(','\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','getFieldType','...','creator','length','EntitySubscribers,','double','creator_id','createServiceFiles','prototype','\x20})',',length:','columnToEntityColumn','getRepository','getColTxtType','{{camelCase\x20name}}.','pluralize','decimal','existsPath','export\x20*\x20from\x20\x27./','index.ts','utf8','join','type\x20=>','Int','createEntityText','@things-factory/shell','rank','updater','updated_at','-history.ts','\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','\x27,\x20nullable:\x20','push'];a0_0x1a49=function(){return _0x3ba708;};return a0_0x1a49();}Object[a0_0x18bbb4(0x101)](exports,a0_0x18bbb4(0xa1),{'value':!0x0}),exports['OperatoToolCreateService']=void 0x0;const tslib_1=require(a0_0x18bbb4(0x88)),type_graphql_1=require(a0_0x18bbb4(0xb2)),shell_1=require(a0_0x18bbb4(0xf4)),resource_base_1=require(a0_0x18bbb4(0xd8)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require('lodash'),{plural:plural}=require(a0_0x18bbb4(0xea)),fs=require('fs');function a0_0x58a5(_0x1f8009,_0x1b8fd1){const _0x1a49eb=a0_0x1a49();return a0_0x58a5=function(_0x58a5ef,_0x4c31ed){_0x58a5ef=_0x58a5ef-0x80;let _0x1b8146=_0x1a49eb[_0x58a5ef];return _0x1b8146;},a0_0x58a5(_0x1f8009,_0x1b8fd1);}let OperatoToolCreateService=class{async[a0_0x18bbb4(0xd4)](_0x5db211,_0x45344e){const _0x58d9a4=a0_0x18bbb4,{domain:_0x44ea19}=_0x45344e[_0x58d9a4(0x85)],_0x31abc7=await(0x0,shell_1['getRepository'])(resource_base_1[_0x58d9a4(0x8e)])[_0x58d9a4(0x10a)]({'where':{'id':_0x5db211}}),_0x3839a5=await(0x0,shell_1[_0x58d9a4(0xe7)])(resource_base_1[_0x58d9a4(0xfd)])[_0x58d9a4(0x111)]({'where':{'domain':{'id':_0x44ea19['id']},'entity':{'id':_0x31abc7['id']}}});let {name:_0x964546='',bundle:_0x4b425c=''}=_0x31abc7||{},_0x33da23=this[_0x58d9a4(0x94)](),_0x16271d=kebabCase(_0x964546);return await this[_0x58d9a4(0xc2)](_0x33da23,_0x4b425c,_0x16271d),await this[_0x58d9a4(0xe2)](_0x33da23,_0x4b425c,_0x964546,_0x16271d,_0x31abc7,_0x3839a5),!0x0;}async[a0_0x18bbb4(0xe2)](_0x1dee87,_0xa54d9,_0x576398,_0x2e9812,_0x190e90,_0x20b878){const _0x51850e=a0_0x18bbb4;let _0x1c3592={'name':_0x2e9812,'tableName':_0x190e90[_0x51850e(0xd6)],'pascalCaseName':startCase(camelCase(_0x576398))[_0x51850e(0x83)](/ /g,''),'camelCaseName':camelCase(_0x576398),'snakeCaseName':snakeCase(_0x576398),'pluralPascalCaseName':startCase(camelCase(plural(_0x576398)))[_0x51850e(0x83)](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x576398))},_0x5d1cbf=_0x1dee87+_0x51850e(0xab)+_0xa54d9+'/server/service/';[_0x51850e(0xcb),_0x51850e(0x9f)][_0x51850e(0xbb)](_0x190e90[_0x51850e(0x95)])?await this[_0x51850e(0xb6)](_0x5d1cbf,_0x2e9812,_0x190e90,_0x20b878,_0x1c3592):await this[_0x51850e(0x100)](_0x5d1cbf,_0x2e9812,_0x190e90,_0x20b878,_0x1c3592);}async[a0_0x18bbb4(0xb6)](_0xe45f15,_0x159dd6,_0x68ed73,_0x2a6571,_0x48b8e3){const _0x467071=a0_0x18bbb4;await this[_0x467071(0xc9)](_0xe45f15+(_0x159dd6+_0x467071(0xd7)),serviceHistoryIndex,_0x48b8e3);let _0x254214=this[_0x467071(0xf3)](_0x68ed73,_0x2a6571);await this[_0x467071(0xc9)](_0xe45f15+(_0x159dd6+'/'+_0x159dd6+_0x467071(0x10c)),_0x254214,_0x48b8e3),await this[_0x467071(0xc9)](_0xe45f15+(_0x159dd6+'/'+_0x159dd6+_0x467071(0xbf)),serviceQuery,_0x48b8e3),await this[_0x467071(0xc9)](_0xe45f15+(_0x159dd6+'/'+_0x159dd6+_0x467071(0xa7)),serviceMutation,_0x48b8e3);let _0x36d540=this[_0x467071(0xca)](_0x2a6571);await this[_0x467071(0xc9)](_0xe45f15+(_0x159dd6+'/'+_0x159dd6+'-type.ts'),_0x36d540,_0x48b8e3);let _0x5c11a2=this[_0x467071(0xbe)](_0x68ed73,_0x2a6571);await this[_0x467071(0xc9)](_0xe45f15+(_0x159dd6+'/'+_0x159dd6+_0x467071(0xf8)),_0x5c11a2,_0x48b8e3);let _0x57f7c8='';'JSON'==_0x68ed73[_0x467071(0x95)]?(_0x57f7c8=_0x467071(0x9e),await this[_0x467071(0xc9)](_0xe45f15+(_0x159dd6+_0x467071(0x110)),serviceEntitySubscriber,_0x48b8e3)):_0x57f7c8='';let _0x30e48b=serviceEntitySubscriber[_0x467071(0x83)](/{{entityToJson}}/g,_0x57f7c8);await this['writeFile'](_0xe45f15+(_0x159dd6+_0x467071(0x110)),_0x30e48b,_0x48b8e3),await this[_0x467071(0xc9)](_0xe45f15+(_0x159dd6+'/'+_0x159dd6+_0x467071(0xff)),serviceHistoryQuery,_0x48b8e3),await this[_0x467071(0xc9)](_0xe45f15+(_0x159dd6+'/'+_0x159dd6+_0x467071(0xc8)),sereviceHistoryType,_0x48b8e3);let _0x55812f=_0xe45f15+_0x467071(0xee);0x0==await this['existsPath'](_0x55812f)&&await this[_0x467071(0xc9)](_0x55812f,allIndex,_0x48b8e3);let _0x404856=await fs['readFileSync'](_0x55812f,_0x467071(0xef));_0x404856[_0x467071(0xbc)](_0x467071(0xed)+_0x48b8e3[_0x467071(0x9b)]+'/'+_0x48b8e3[_0x467071(0x9b)]+'-history\x27')<0x0&&(_0x404856=_0x404856[_0x467071(0x83)](/\/\* EXPORT ENTITY TYPES \*\//,'/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./'+_0x48b8e3[_0x467071(0x9b)]+'/'+_0x48b8e3[_0x467071(0x9b)]+_0x467071(0xa0))),_0x404856[_0x467071(0xbc)](_0x467071(0xed)+_0x48b8e3[_0x467071(0x9b)]+'/'+_0x48b8e3['name']+'\x27')<0x0&&(_0x404856=_0x404856[_0x467071(0x83)](/\/\* EXPORT ENTITY TYPES \*\//,_0x467071(0x80)+_0x48b8e3['name']+'/'+_0x48b8e3[_0x467071(0x9b)]+'\x27')),_0x404856[_0x467071(0xbc)](_0x467071(0x106)+_0x48b8e3[_0x467071(0xb1)]+_0x467071(0xb0)+_0x48b8e3[_0x467071(0xb1)]+_0x467071(0xd2)+_0x48b8e3[_0x467071(0xb1)]+_0x467071(0xd5)+_0x48b8e3[_0x467071(0x9b)]+'\x27')<0x0&&(_0x404856=_0x404856[_0x467071(0x83)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,'/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20'+_0x48b8e3[_0x467071(0xb1)]+_0x467071(0xb0)+_0x48b8e3[_0x467071(0xb1)]+_0x467071(0xd2)+_0x48b8e3[_0x467071(0xb1)]+_0x467071(0xd5)+_0x48b8e3[_0x467071(0x9b)]+'\x27')),_0x404856[_0x467071(0xbc)](_0x467071(0xdc)+_0x48b8e3[_0x467071(0xb1)]+_0x467071(0xd3))<0x0&&(_0x404856=_0x404856['replace'](/\/\* ENTITIES \*\//,_0x467071(0xae)+_0x48b8e3['pascalCaseName']+'Entities,')),_0x404856['indexOf']('...'+_0x48b8e3[_0x467071(0xb1)]+_0x467071(0x107))<0x0&&(_0x404856=_0x404856[_0x467071(0x83)](/\/\* RESOLVER CLASSES \*\//,_0x467071(0xb9)+_0x48b8e3[_0x467071(0xb1)]+_0x467071(0x107))),_0x404856['indexOf'](_0x467071(0xdc)+_0x48b8e3['pascalCaseName']+_0x467071(0xdf))<0x0&&(_0x404856=_0x404856[_0x467071(0x83)](/\/\* SUBSCRIBERS \*\//,'/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...'+_0x48b8e3[_0x467071(0xb1)]+_0x467071(0xdf))),await this[_0x467071(0xc9)](_0x55812f,_0x404856,_0x48b8e3);}async[a0_0x18bbb4(0x100)](_0x156787,_0x5482a0,_0x2524cb,_0x5bb2a0,_0x1d0f58){const _0x11d757=a0_0x18bbb4;await this[_0x11d757(0xc9)](_0x156787+(_0x5482a0+_0x11d757(0xd7)),serviceIndex,_0x1d0f58),await this[_0x11d757(0xc9)](_0x156787+(_0x5482a0+'/'+_0x5482a0+_0x11d757(0xbf)),serviceQuery,_0x1d0f58),await this['writeFile'](_0x156787+(_0x5482a0+'/'+_0x5482a0+_0x11d757(0xa7)),serviceMutation,_0x1d0f58);let _0x21c174=this[_0x11d757(0xf3)](_0x2524cb,_0x5bb2a0);await this[_0x11d757(0xc9)](_0x156787+(_0x5482a0+'/'+_0x5482a0+_0x11d757(0x10c)),_0x21c174,_0x1d0f58);let _0x16088b=this[_0x11d757(0xca)](_0x5bb2a0);await this[_0x11d757(0xc9)](_0x156787+(_0x5482a0+'/'+_0x5482a0+'-type.ts'),_0x16088b,_0x1d0f58);let _0x4f8d2a=_0x156787+'index.ts';0x0==await this[_0x11d757(0xec)](_0x4f8d2a)&&await this[_0x11d757(0xc9)](_0x4f8d2a,allIndex,_0x1d0f58);let _0x2c603e=await fs['readFileSync'](_0x4f8d2a,_0x11d757(0xef));_0x2c603e[_0x11d757(0xbc)](_0x11d757(0xed)+_0x1d0f58[_0x11d757(0x9b)]+'/'+_0x1d0f58['name']+'\x27')<0x0&&(_0x2c603e=_0x2c603e[_0x11d757(0x83)](/\/\* EXPORT ENTITY TYPES \*\//,_0x11d757(0x80)+_0x1d0f58['name']+'/'+_0x1d0f58[_0x11d757(0x9b)]+'\x27')),_0x2c603e[_0x11d757(0xbc)](_0x11d757(0x106)+_0x1d0f58[_0x11d757(0xb1)]+_0x11d757(0xb0)+_0x1d0f58['pascalCaseName']+'Resolvers\x20}\x20from\x20\x27./'+_0x1d0f58['name']+'\x27')<0x0&&(_0x2c603e=_0x2c603e[_0x11d757(0x83)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x11d757(0x109)+_0x1d0f58[_0x11d757(0xb1)]+_0x11d757(0xb0)+_0x1d0f58[_0x11d757(0xb1)]+'Resolvers\x20}\x20from\x20\x27./'+_0x1d0f58[_0x11d757(0x9b)]+'\x27')),_0x2c603e[_0x11d757(0xbc)](_0x11d757(0xdc)+_0x1d0f58[_0x11d757(0xb1)]+_0x11d757(0xd3))<0x0&&(_0x2c603e=_0x2c603e[_0x11d757(0x83)](/\/\* ENTITIES \*\//,_0x11d757(0xae)+_0x1d0f58[_0x11d757(0xb1)]+_0x11d757(0xd3))),_0x2c603e[_0x11d757(0xbc)](_0x11d757(0xdc)+_0x1d0f58['pascalCaseName']+'Resolvers,')<0x0&&(_0x2c603e=_0x2c603e[_0x11d757(0x83)](/\/\* RESOLVER CLASSES \*\//,_0x11d757(0xb9)+_0x1d0f58[_0x11d757(0xb1)]+_0x11d757(0x107))),await this['writeFile'](_0x4f8d2a,_0x2c603e,_0x1d0f58);}[a0_0x18bbb4(0xca)](_0x368506){const _0x24335b=a0_0x18bbb4;let _0x4dc5ee=sereviceType,_0x52f4ec=_0x368506[_0x24335b(0xad)](_0x5dc03c=>{const _0x1ec3f6=_0x24335b;if('id'==_0x5dc03c[_0x1ec3f6(0x9b)])return'';if(_0x1ec3f6(0x97)==_0x5dc03c[_0x1ec3f6(0x9b)])return'';if(_0x1ec3f6(0x10f)==_0x5dc03c[_0x1ec3f6(0x9b)])return'';if(_0x1ec3f6(0xf7)==_0x5dc03c[_0x1ec3f6(0x9b)])return'';if(_0x1ec3f6(0xe1)==_0x5dc03c[_0x1ec3f6(0x9b)])return'';if(_0x1ec3f6(0x91)==_0x5dc03c['name'])return'';let _0x1379f8=this['getFieldType'](_0x5dc03c),_0x1734f2=this[_0x1ec3f6(0xe8)](_0x5dc03c),_0x52726b=camelCase(_0x5dc03c[_0x1ec3f6(0x9b)]);return'\x20\x20'+(_0x1ec3f6(0xd9)+(0x0==_0x1379f8[_0x1ec3f6(0xde)]?'':_0x1ec3f6(0xf1)+_0x1379f8+',')+_0x1ec3f6(0x90)+_0x5dc03c[_0x1ec3f6(0xa4)]+_0x1ec3f6(0xe4))+_0x1ec3f6(0x89)+(''+_0x52726b+(_0x5dc03c[_0x1ec3f6(0xa4)]?'?':'')+':\x20'+_0x1734f2)+'\x0a';});_0x4dc5ee=_0x4dc5ee[_0x24335b(0x83)](/{{newTypeColumns}}/g,_0x52f4ec[_0x24335b(0xf0)]('\x0a'));let _0x3420be=_0x368506[_0x24335b(0xad)](_0x31de06=>{const _0x18d4c6=_0x24335b;if('id'==_0x31de06[_0x18d4c6(0x9b)])return'';if(_0x18d4c6(0x97)==_0x31de06[_0x18d4c6(0x9b)])return'';if(_0x18d4c6(0x10f)==_0x31de06['name'])return'';if(_0x18d4c6(0xf7)==_0x31de06['name'])return'';if('creator_id'==_0x31de06[_0x18d4c6(0x9b)])return'';if(_0x18d4c6(0x91)==_0x31de06[_0x18d4c6(0x9b)])return'';let _0x2298bd=this[_0x18d4c6(0xdb)](_0x31de06),_0x552812=this['getColTxtType'](_0x31de06);_0x31de06[_0x18d4c6(0xa4)]=!0x0;let _0xd86964=camelCase(_0x31de06[_0x18d4c6(0x9b)]);return'\x20\x20'+(_0x18d4c6(0xd9)+(0x0==_0x2298bd[_0x18d4c6(0xde)]?'':_0x18d4c6(0xf1)+_0x2298bd+',')+'\x20{\x20nullable:\x20'+_0x31de06['nullable']+_0x18d4c6(0xe4))+_0x18d4c6(0x89)+(''+_0xd86964+(_0x31de06['nullable']?'?':'')+':\x20'+_0x552812)+'\x0a';});return _0x4dc5ee=_0x4dc5ee[_0x24335b(0x83)](/{{patchTypeColumns}}/g,_0x3420be[_0x24335b(0xf0)]('\x0a')),_0x4dc5ee;}['createEntityText'](_0x555e8a,_0x140d13){const _0x540e3f=a0_0x18bbb4;let _0x4fd8ad=serviceEntity,_0xc01831=_0x140d13[_0x540e3f(0x116)](function(_0xf4dfdb,_0x284526){const _0x1e3f8a=_0x540e3f;return _0xf4dfdb[_0x1e3f8a(0xf5)]-_0x284526['rank'];})['map'](_0x1d675c=>this['columnToEntityColumn'](_0x1d675c));[_0x540e3f(0x9f),_0x540e3f(0xcb)][_0x540e3f(0xbb)](_0x555e8a[_0x540e3f(0x95)])&&_0xc01831['push'](_0x540e3f(0x9a)),_0x4fd8ad=_0x4fd8ad[_0x540e3f(0x83)](/{{entityColumns}}/g,_0xc01831[_0x540e3f(0xf0)]('\x0a'));let _0x18fae9='',_0x35d655=_0x140d13[_0x540e3f(0x112)](_0x18ed9f=>_0x18ed9f['uniqRank']&&_0x18ed9f['uniqRank']>0x0)[_0x540e3f(0x116)](function(_0x2db0b9,_0x1153fd){const _0x253d25=_0x540e3f;return _0x2db0b9[_0x253d25(0xc0)]-_0x1153fd['uniqRank'];});if(_0x35d655[_0x540e3f(0xde)]>0x0){_0x18fae9=_0x540e3f(0x115);let _0x59f2eb=_0x35d655[_0x540e3f(0xad)](_0x2dddb2=>{const _0x187807=_0x540e3f;let _0x6965b3=_0x2dddb2[_0x187807(0x9b)];return'domain_id'==_0x2dddb2[_0x187807(0x9b)]&&(_0x6965b3=_0x187807(0xa3)),_0x187807(0xe1)==_0x2dddb2[_0x187807(0x9b)]&&(_0x6965b3=_0x187807(0xdd)),_0x187807(0x91)==_0x2dddb2['name']&&(_0x6965b3=_0x187807(0xf6)),_0x187807(0xe9)+camelCase(_0x6965b3);});_0x18fae9=_0x18fae9[_0x540e3f(0x83)](/{{indexColumns}}/g,_0x59f2eb['join'](','));}return _0x4fd8ad=_0x4fd8ad[_0x540e3f(0x83)](/{{indexAnn}}/g,_0x18fae9),_0x4fd8ad;}[a0_0x18bbb4(0xbe)](_0x60916b,_0x36a720){const _0x22a3cd=a0_0x18bbb4;let _0x2c71e3='JSON'==_0x60916b[_0x22a3cd(0x95)]?serviceEntityHistJson:serviceEntityHistCopy,_0x546dd4=_0x36a720[_0x22a3cd(0x116)](function(_0x26e624,_0xb41a34){const _0x5e2e5e=_0x22a3cd;return _0x26e624['rank']-_0xb41a34[_0x5e2e5e(0xf5)];})[_0x22a3cd(0xad)](_0x3fe4f0=>this[_0x22a3cd(0xe6)](_0x3fe4f0));return _0x2c71e3=_0x2c71e3[_0x22a3cd(0x83)](/{{entityColumns}}/g,_0x546dd4[_0x22a3cd(0xf0)]('\x0a')),_0x2c71e3;}[a0_0x18bbb4(0xe6)](_0xfe0d89){const _0x2734d6=a0_0x18bbb4;if('id'==_0xfe0d89[_0x2734d6(0x9b)])return'';if(_0x2734d6(0x97)==_0xfe0d89[_0x2734d6(0x9b)])return'';if(_0x2734d6(0x10f)==_0xfe0d89[_0x2734d6(0x9b)])return'';if(_0x2734d6(0xf7)==_0xfe0d89[_0x2734d6(0x9b)])return'';if(_0x2734d6(0xe1)==_0xfe0d89[_0x2734d6(0x9b)])return'';if(_0x2734d6(0x91)==_0xfe0d89[_0x2734d6(0x9b)])return'';let _0x49e358=_0xfe0d89['colType'];_0x2734d6(0xe0)==_0xfe0d89[_0x2734d6(0x10e)]&&(_0x49e358='double\x20precision'),_0x2734d6(0x82)==_0xfe0d89[_0x2734d6(0x10e)]&&(_0x49e358=_0x2734d6(0x8a)),_0x2734d6(0x108)==_0xfe0d89[_0x2734d6(0x10e)]&&(_0x49e358=_0x2734d6(0xcc)),'datetime'==_0xfe0d89[_0x2734d6(0x10e)]&&(_0x49e358='timestamp\x20without\x20time\x20zone');let _0x3d755a='';_0x2734d6(0x108)==_0xfe0d89['colType']&&(_0x3d755a=_0xfe0d89['colSize']);let _0x3037e6=this['getFieldType'](_0xfe0d89),_0x3f043e=this[_0x2734d6(0xe8)](_0xfe0d89),_0x27b6a2=camelCase(_0xfe0d89[_0x2734d6(0x9b)]);return'\x20\x20'+(_0x2734d6(0x10d)+_0xfe0d89[_0x2734d6(0x9b)]+_0x2734d6(0x81)+_0x49e358+_0x2734d6(0xfa)+_0xfe0d89[_0x2734d6(0xa4)]+'\x20'+(0x0==_0x3d755a[_0x2734d6(0xde)]?'':_0x2734d6(0xe5)+_0x3d755a)+_0x2734d6(0xe4))+_0x2734d6(0x89)+('@Field('+(0x0==_0x3037e6['length']?'':_0x2734d6(0xf1)+_0x3037e6+',')+_0x2734d6(0x90)+_0xfe0d89[_0x2734d6(0xa4)]+_0x2734d6(0xe4))+_0x2734d6(0x89)+(''+_0x27b6a2+(_0xfe0d89[_0x2734d6(0xa4)]?'?':'')+':\x20'+_0x3f043e)+'\x0a';}[a0_0x18bbb4(0xdb)](_0x2a7f9c){const _0x4b418b=a0_0x18bbb4;let _0x1f9450='';return _0x4b418b(0xe0)==_0x2a7f9c['colType']&&(_0x1f9450=_0x4b418b(0x8d)),'float'==_0x2a7f9c[_0x4b418b(0x10e)]&&(_0x1f9450=_0x4b418b(0x8d)),_0x4b418b(0x82)==_0x2a7f9c['colType']&&(_0x1f9450='Int'),_0x4b418b(0x103)==_0x2a7f9c[_0x4b418b(0x10e)]&&(_0x1f9450=_0x4b418b(0xf2)),_0x1f9450;}[a0_0x18bbb4(0xe8)](_0x558dba){const _0x221bc4=a0_0x18bbb4;let _0x535cbc=_0x558dba[_0x221bc4(0x10e)];return _0x221bc4(0xeb)==_0x558dba[_0x221bc4(0x10e)]&&(_0x535cbc=_0x221bc4(0x99)),_0x221bc4(0xe0)==_0x558dba['colType']&&(_0x535cbc=_0x221bc4(0x99)),_0x221bc4(0xb4)==_0x558dba['colType']&&(_0x535cbc=_0x221bc4(0x99)),_0x221bc4(0x103)==_0x558dba[_0x221bc4(0x10e)]&&(_0x535cbc=_0x221bc4(0x99)),_0x221bc4(0x82)==_0x558dba[_0x221bc4(0x10e)]&&(_0x535cbc=_0x221bc4(0x99)),'datetime'==_0x558dba['colType']&&(_0x535cbc=_0x221bc4(0xb3)),'date'==_0x558dba['colType']&&(_0x535cbc='Date'),_0x221bc4(0xb5)==_0x558dba[_0x221bc4(0x10e)]&&(_0x535cbc=_0x221bc4(0x108)),_0x535cbc;}async[a0_0x18bbb4(0xc9)](_0x235847,_0x5d1931,_0x4e7db5){const _0x2d1f54=a0_0x18bbb4;await fs[_0x2d1f54(0x102)](_0x235847,this['replaceNamesMap'](_0x5d1931,_0x4e7db5),_0x2d1f54(0xef));}['replaceNamesMap'](_0xcf6484,_0x5de19f){const _0x6a54b1=a0_0x18bbb4;return _0xcf6484['replace'](/{{pascalCase name}}/g,_0x5de19f[_0x6a54b1(0xb1)])[_0x6a54b1(0x83)](/{{camelCase name}}/g,_0x5de19f[_0x6a54b1(0x105)])[_0x6a54b1(0x83)](/{{snakeCase name}}/g,_0x5de19f[_0x6a54b1(0xfc)])[_0x6a54b1(0x83)](/{{pluralPascalCase name}}/g,_0x5de19f[_0x6a54b1(0xd0)])[_0x6a54b1(0x83)](/{{pluralCamelCase name}}/g,_0x5de19f[_0x6a54b1(0x114)])['replace'](/{{tableName}}/g,_0x5de19f[_0x6a54b1(0xd6)])[_0x6a54b1(0x83)](/{{name}}/g,_0x5de19f[_0x6a54b1(0x9b)]);}async[a0_0x18bbb4(0xc2)](_0x305d21,_0x157000,_0x46bd3c){const _0x1524e7=a0_0x18bbb4;let _0x252d65=_0x305d21+_0x1524e7(0xbd);await this[_0x1524e7(0xc4)](_0x252d65),_0x252d65=_0x252d65+'/'+_0x157000,await this[_0x1524e7(0xc4)](_0x252d65),_0x252d65+=_0x1524e7(0xce),await this['createDir'](_0x252d65),_0x252d65+=_0x1524e7(0x10b),await this['createDir'](_0x252d65),_0x252d65=_0x252d65+'/'+_0x46bd3c,await this[_0x1524e7(0xc4)](_0x252d65);}[a0_0x18bbb4(0x94)](){const _0xf00170=a0_0x18bbb4;let _0x2944b8=process[_0xf00170(0x9c)]['PWD'][_0xf00170(0xb7)]('/'),_0x25aafc=[];for(let _0x1cc185=0x0;_0x1cc185<_0x2944b8['length']&&_0xf00170(0xfe)!=_0x2944b8[_0x1cc185];_0x1cc185++)_0x25aafc[_0xf00170(0xfb)](_0x2944b8[_0x1cc185]);return _0x25aafc['join']('/');}async['createDir'](_0x1af62c){const _0x1aafb9=a0_0x18bbb4;0x0==await this[_0x1aafb9(0xec)](_0x1af62c)&&fs[_0x1aafb9(0xaa)](_0x1af62c);}async['existsPath'](_0x4f6645){const _0x21dbc1=a0_0x18bbb4;return await fs[_0x21dbc1(0xa2)](_0x4f6645);}};tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x18bbb4(0xa5)])(_0x4103cf=>Boolean,{'description':a0_0x18bbb4(0xa8)}),tslib_1['__param'](0x0,(0x0,type_graphql_1[a0_0x18bbb4(0xc1)])('id')),tslib_1['__param'](0x1,(0x0,type_graphql_1['Ctx'])()),tslib_1[a0_0x18bbb4(0xa9)](a0_0x18bbb4(0xac),Function),tslib_1[a0_0x18bbb4(0xa9)](a0_0x18bbb4(0x92),[String,Object]),tslib_1[a0_0x18bbb4(0xa9)](a0_0x18bbb4(0x84),Promise)],OperatoToolCreateService[a0_0x18bbb4(0xe3)],a0_0x18bbb4(0xd4),null),OperatoToolCreateService=tslib_1[a0_0x18bbb4(0xcf)]([(0x0,type_graphql_1[a0_0x18bbb4(0x104)])()],OperatoToolCreateService),exports[a0_0x18bbb4(0xc6)]=OperatoToolCreateService;const allIndex=a0_0x18bbb4(0x8f),serviceIndex=a0_0x18bbb4(0x86),serviceHistoryIndex=a0_0x18bbb4(0x9d),serviceQuery=a0_0x18bbb4(0xc5),serviceHistoryQuery=a0_0x18bbb4(0x113),serviceMutation=a0_0x18bbb4(0xda),sereviceType=a0_0x18bbb4(0xa6),sereviceHistoryType=a0_0x18bbb4(0x117),serviceEntity=a0_0x18bbb4(0x93),serviceEntityHistCopy=a0_0x18bbb4(0xcd),serviceEntityHistJson=a0_0x18bbb4(0xd1),serviceEntitySubscriber=a0_0x18bbb4(0xf9);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x4fc372=a0_0x2659;(function(_0x5987f8,_0x39de5f){const _0x57e287=a0_0x2659,_0x4011ff=_0x5987f8();while(!![]){try{const _0x85f92a=parseInt(_0x57e287(0x8f))/0x1*(parseInt(_0x57e287(0x89))/0x2)+-parseInt(_0x57e287(0xa0))/0x3*(parseInt(_0x57e287(0x92))/0x4)+-parseInt(_0x57e287(0x9b))/0x5*(parseInt(_0x57e287(0x9f))/0x6)+parseInt(_0x57e287(0x8a))/0x7+parseInt(_0x57e287(0x95))/0x8+-parseInt(_0x57e287(0x93))/0x9*(-parseInt(_0x57e287(0x96))/0xa)+-parseInt(_0x57e287(0x9a))/0xb*(parseInt(_0x57e287(0x9e))/0xc);if(_0x85f92a===_0x39de5f)break;else _0x4011ff['push'](_0x4011ff['shift']());}catch(_0x334b06){_0x4011ff['push'](_0x4011ff['shift']());}}}(a0_0x5953,0xa8b9d));function a0_0x2659(_0x535855,_0x522640){const _0x595372=a0_0x5953();return a0_0x2659=function(_0x26594e,_0x1e34a2){_0x26594e=_0x26594e-0x82;let _0x6ce90f=_0x595372[_0x26594e];return _0x6ce90f;},a0_0x2659(_0x535855,_0x522640);}Object[a0_0x4fc372(0xa2)](exports,a0_0x4fc372(0x94),{'value':!0x0}),exports['checkStudioTemplateIsOverLimit']=exports[a0_0x4fc372(0x98)]=void 0x0;function a0_0x5953(){const _0x52d3dd=['450AooELz','1530921FBHPzO','where','Permissions\x20For\x20Tailor\x20Tool','checkTarget','getPermission','5641uKqPwf','ERROR_CODES','LicenseError','1795492DPRgQS','32904BwImmD','__esModule','6284056cNGpdg','1640XUlySo','includes','checkStudioPermission','Menu','33vFpbmi','1163145NbrPjv','manager','andWhere','2410680uskFrN','6dmUqyE','9rlyGxb','Studio','defineProperty','getCount','menu','split','@things-factory/menu-base','id\x20!=\x20:id','@things-factory/operato-license-checker','INVALID_LICENSE','../../errors/license-error','getRepository','(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)','forEach','from','checkStudioTemplateIsOverLimit','@things-factory/shell'];a0_0x5953=function(){return _0x52d3dd;};return a0_0x5953();}const operato_license_checker_1=require(a0_0x4fc372(0xa8)),shell_1=require(a0_0x4fc372(0x88)),menu_base_1=require(a0_0x4fc372(0xa6)),license_error_1=require(a0_0x4fc372(0x82));async function checkStudioPermission(){const _0x27bbf2=a0_0x4fc372;let _0x48e77c=((0x0,operato_license_checker_1[_0x27bbf2(0x8e)])(_0x27bbf2(0x8c))||',')[_0x27bbf2(0xa5)](',')['map'](_0x2844a7=>_0x2844a7['trim']()),_0x548437=!0x1;return _0x48e77c[_0x27bbf2(0x85)](_0x2c8e4a=>{const _0x37fe2e=_0x27bbf2;_0x2c8e4a[_0x37fe2e(0x97)](_0x37fe2e(0xa1))&&(_0x548437=!0x0);}),_0x548437;}async function checkStudioTemplateIsOverLimit(_0x4bba1a,_0x3d60ea){const _0x2cf288=a0_0x4fc372;if(0x0==await checkStudioPermission())throw new license_error_1['LicenseError']({'errorCode':_0x3d60ea['t'](license_error_1[_0x2cf288(0x91)][_0x2cf288(0x90)][_0x2cf288(0xa9)])});var _0x10cbb5=0x0;if(_0x10cbb5=_0x4bba1a&&''!=_0x4bba1a?await(0x0,shell_1[_0x2cf288(0x83)])(menu_base_1[_0x2cf288(0x99)])['manager']['createQueryBuilder']()['select'](_0x2cf288(0xa4))[_0x2cf288(0x86)](menu_base_1[_0x2cf288(0x99)],_0x2cf288(0xa4))[_0x2cf288(0x8b)](_0x2cf288(0xa7),{'id':_0x4bba1a})[_0x2cf288(0x9d)]('(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)')['getCount']()+0x1:await(0x0,shell_1[_0x2cf288(0x83)])(menu_base_1[_0x2cf288(0x99)])[_0x2cf288(0x9c)]['createQueryBuilder']()['select'](_0x2cf288(0xa4))[_0x2cf288(0x86)](menu_base_1['Menu'],_0x2cf288(0xa4))[_0x2cf288(0x8b)](_0x2cf288(0x84))[_0x2cf288(0xa3)]()+0x1,!(0x0,operato_license_checker_1[_0x2cf288(0x8d)])(_0x10cbb5))throw new license_error_1['LicenseError']({'errorCode':_0x3d60ea['t'](license_error_1[_0x2cf288(0x91)]['ERROR_CODES']['OVER_LIMIT'])});return!0x0;}exports['checkStudioPermission']=checkStudioPermission,exports[a0_0x4fc372(0x87)]=checkStudioTemplateIsOverLimit;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x5aedbf=a0_0x5a23;(function(_0x16e2f7,_0x1b1cac){const _0x306ad7=a0_0x5a23,_0x14496c=_0x16e2f7();while(!![]){try{const _0x5b4d6c=-parseInt(_0x306ad7(0x19d))/0x1+parseInt(_0x306ad7(0x19f))/0x2*(parseInt(_0x306ad7(0x183))/0x3)+-parseInt(_0x306ad7(0x18e))/0x4+-parseInt(_0x306ad7(0x18a))/0x5+-parseInt(_0x306ad7(0x19c))/0x6*(-parseInt(_0x306ad7(0x19a))/0x7)+-parseInt(_0x306ad7(0x192))/0x8+parseInt(_0x306ad7(0x188))/0x9*(parseInt(_0x306ad7(0x189))/0xa);if(_0x5b4d6c===_0x1b1cac)break;else _0x14496c['push'](_0x14496c['shift']());}catch(_0x479dcd){_0x14496c['push'](_0x14496c['shift']());}}}(a0_0x28a2,0xc2888));function a0_0x5a23(_0x33966d,_0x41aa85){const _0x28a20a=a0_0x28a2();return a0_0x5a23=function(_0x5a23ca,_0x41944e){_0x5a23ca=_0x5a23ca-0x180;let _0x47d985=_0x28a20a[_0x5a23ca];return _0x47d985;},a0_0x5a23(_0x33966d,_0x41aa85);}Object[a0_0x5aedbf(0x18c)](exports,a0_0x5aedbf(0x18d),{'value':!0x0}),exports[a0_0x5aedbf(0x193)]=void 0x0;function a0_0x28a2(){const _0x488d9a=['OperatoToolResolver','design:returntype','Query','Ctx','design:type','__decorate','Operato\x20Tool\x20Studio\x20Limit\x20check','19796uvdigd','Arg','1188hGpcTP','229750diOEUs','prototype','26FqjdMc','studioTemplateIsOverLimit','checkStudioTemplateIsOverLimit','__param','92541tbWXRE','studioPermission','Operato\x20Tool\x20Studio\x20Usage\x20Permissions','./tool-permission','type-graphql','9zAtBsq','21425230kApVrl','927955MDVQhc','Resolver','defineProperty','__esModule','5029780ZsqWNO','design:paramtypes','checkStudioPermission','__metadata','5071072hrVhie'];a0_0x28a2=function(){return _0x488d9a;};return a0_0x28a2();}const tslib_1=require('tslib'),type_graphql_1=require(a0_0x5aedbf(0x187)),tool_permission_1=require(a0_0x5aedbf(0x186));let OperatoToolResolver=class{async[a0_0x5aedbf(0x184)](_0x536d0f){const _0x107285=a0_0x5aedbf;return(0x0,tool_permission_1[_0x107285(0x190)])();}async[a0_0x5aedbf(0x180)](_0x3fc77b,_0x745855){const _0x2f4c39=a0_0x5aedbf;return(0x0,tool_permission_1[_0x2f4c39(0x181)])(_0x3fc77b,_0x745855);}};tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x5aedbf(0x195)])(_0x450cc0=>Boolean,{'description':a0_0x5aedbf(0x185)}),tslib_1[a0_0x5aedbf(0x182)](0x0,(0x0,type_graphql_1[a0_0x5aedbf(0x196)])()),tslib_1['__metadata'](a0_0x5aedbf(0x197),Function),tslib_1['__metadata']('design:paramtypes',[Object]),tslib_1['__metadata'](a0_0x5aedbf(0x194),Promise)],OperatoToolResolver[a0_0x5aedbf(0x19e)],a0_0x5aedbf(0x184),null),tslib_1[a0_0x5aedbf(0x198)]([(0x0,type_graphql_1['Query'])(_0x1b4b91=>Boolean,{'description':a0_0x5aedbf(0x199)}),tslib_1['__param'](0x0,(0x0,type_graphql_1[a0_0x5aedbf(0x19b)])('id')),tslib_1[a0_0x5aedbf(0x182)](0x1,(0x0,type_graphql_1['Ctx'])()),tslib_1[a0_0x5aedbf(0x191)](a0_0x5aedbf(0x197),Function),tslib_1[a0_0x5aedbf(0x191)](a0_0x5aedbf(0x18f),[String,Object]),tslib_1[a0_0x5aedbf(0x191)](a0_0x5aedbf(0x194),Promise)],OperatoToolResolver['prototype'],a0_0x5aedbf(0x180),null),OperatoToolResolver=tslib_1[a0_0x5aedbf(0x198)]([(0x0,type_graphql_1[a0_0x5aedbf(0x18b)])()],OperatoToolResolver),exports['OperatoToolResolver']=OperatoToolResolver;
|