@things-factory/operato-tools 6.1.80 → 6.1.82
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/actions/main.js +1 -1
- package/client/pages/generator/button-config-tab-mixin.js +4 -4
- package/client/pages/generator/column-config-tab-mixin.js +4 -4
- package/client/pages/generator/etc-config-tab-mixin.js +4 -4
- package/client/pages/generator/form-config-tab-mixin.js +4 -4
- package/client/pages/generator/graphql-config-tab-mixin.js +24 -24
- package/client/pages/generator/grid-config-tab-mixin.js +22 -22
- package/client/pages/generator/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 +2 -2
- 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/client/themes/grist-theme.css +2 -0
- 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_0x443e99=a0_0x5927;(function(_0x3da14a,_0x29ed68){var _0xc8e277=a0_0x5927,_0xaedaee=_0x3da14a();while(!![]){try{var _0x20275a=-parseInt(_0xc8e277(0xbb))/0x1+-parseInt(_0xc8e277(0xb8))/0x2+parseInt(_0xc8e277(0xb9))/0x3+parseInt(_0xc8e277(0xba))/0x4+-parseInt(_0xc8e277(0xb0))/0x5+parseInt(_0xc8e277(0xb6))/0x6*(-parseInt(_0xc8e277(0xb7))/0x7)+parseInt(_0xc8e277(0xb2))/0x8;if(_0x20275a===_0x29ed68)break;else _0xaedaee['push'](_0xaedaee['shift']());}catch(_0x1d1ca6){_0xaedaee['push'](_0xaedaee['shift']());}}}(a0_0x234c,0x82296));import{html,css}from'lit-element';function a0_0x234c(){var _0x271b37=['tText','24906904AMsysi','operato-tools-main','tool\x20start\x20msg','styles','4714266TNUczi','7lzYsXK','2099600aSHKkF','2005248rQZWKF','284792IQrHEl','888672xNFYiq','context','2978260YVpVqJ'];a0_0x234c=function(){return _0x271b37;};return a0_0x234c();}import{connect}from'pwa-helpers/connect-mixin.js';function a0_0x5927(_0x5fd1c6,_0x4472be){var _0x234ca7=a0_0x234c();return a0_0x5927=function(_0x592786,_0x596af4){_0x592786=_0x592786-0xb0;var _0x1e7ea0=_0x234ca7[_0x592786];return _0x1e7ea0;},a0_0x5927(_0x5fd1c6,_0x4472be);}import{store,PageView}from'@things-factory/shell';import{TermsUtil}from'@things-factory/meta-ui';class OperatoToolsMain extends connect(store)(PageView){static get[a0_0x443e99(0xb5)](){return[css`
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
4
|
background-color: var(--main-section-background-color);
|
|
@@ -41,11 +41,11 @@ var a0_0x3d2ef9=a0_0x5e58;(function(_0x3b6613,_0x587673){var _0xf7c03b=a0_0x5e58
|
|
|
41
41
|
display: none;
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
`];}get[
|
|
44
|
+
`];}get[a0_0x443e99(0xbc)](){return{'title':'Operato\x20Tools','actions':[]};}['render'](){var _0x1503ae=a0_0x443e99;return html`
|
|
45
45
|
<h2>Operato Tools</h2>
|
|
46
46
|
<p page-description>
|
|
47
|
-
${TermsUtil[
|
|
47
|
+
${TermsUtil[_0x1503ae(0xb1)](_0x1503ae(0xb4))}
|
|
48
48
|
</p>
|
|
49
49
|
|
|
50
50
|
<img src="/assets/images/operato-tools.png" />
|
|
51
|
-
`;}}window[
|
|
51
|
+
`;}}window['customElements']['define'](a0_0x443e99(0xb3),OperatoToolsMain);
|
package/client/reducers/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a0_0x3fdf69=a0_0xda06;(function(_0x2a1eca,_0x3859d0){const _0x4f5107=a0_0xda06,_0x5bb62f=_0x2a1eca();while(!![]){try{const _0x56f995=parseInt(_0x4f5107(0x17a))/0x1+parseInt(_0x4f5107(0x180))/0x2+-parseInt(_0x4f5107(0x17f))/0x3+parseInt(_0x4f5107(0x178))/0x4+parseInt(_0x4f5107(0x17c))/0x5*(parseInt(_0x4f5107(0x17b))/0x6)+parseInt(_0x4f5107(0x174))/0x7*(parseInt(_0x4f5107(0x179))/0x8)+-parseInt(_0x4f5107(0x181))/0x9;if(_0x56f995===_0x3859d0)break;else _0x5bb62f['push'](_0x5bb62f['shift']());}catch(_0x45bf21){_0x5bb62f['push'](_0x5bb62f['shift']());}}}(a0_0x3b53,0xed337));import a0_0x5de706 from'graphql-tag';import{i18next}from'@operato/i18n';import{store}from'@operato/shell';function a0_0x3b53(){const _0x2f5d91=['21015837XwkdDT','type','7AnJyOS','studioPermission','data','dispatch','114132JjCZqT','11562040GqQDwK','1782006xZkORI','18cCfYfk','828950uWOkFF','errors','UPDATE_OPERATO_TOOLS_PERMISSION','2277105SZQeuW','625078CqIOuD'];a0_0x3b53=function(){return _0x2f5d91;};return a0_0x3b53();}import{client,gqlContext}from'@operato/graphql';import{UPDATE_OPERATO_TOOLS}from'../actions/main';const INITIAL_STATE={'operatoTools':'ABC','studioPermission':!0x1};export const UPDATE_OPERATO_TOOLS_PERMISSION=a0_0x3fdf69(0x17e);((async()=>{const _0x4cf058=a0_0x3fdf69;var _0x2cd2b8=await client['query']({'query':a0_0x5de706`{studioPermission}`});let _0x4d8fbd=!0x1;_0x2cd2b8[_0x4cf058(0x17d)]||(_0x4d8fbd=_0x2cd2b8[_0x4cf058(0x176)][_0x4cf058(0x175)]),store[_0x4cf058(0x177)]({'type':UPDATE_OPERATO_TOOLS_PERMISSION,'state':{'studioPermission':_0x4d8fbd}});})());function a0_0xda06(_0x4a37d7,_0x4a4a9d){const _0x3b5332=a0_0x3b53();return a0_0xda06=function(_0xda065a,_0x438172){_0xda065a=_0xda065a-0x173;let _0x306373=_0x3b5332[_0xda065a];return _0x306373;},a0_0xda06(_0x4a37d7,_0x4a4a9d);}const operatoTools=(_0x2f1a46=INITIAL_STATE,_0x38f989)=>{const _0x1f801d=a0_0x3fdf69;switch(_0x38f989[_0x1f801d(0x173)]){case UPDATE_OPERATO_TOOLS:return{..._0x2f1a46};case UPDATE_OPERATO_TOOLS_PERMISSION:return{...INITIAL_STATE,..._0x38f989['state']};default:return _0x2f1a46;}};export default operatoTools;
|
|
@@ -36,6 +36,8 @@ body {
|
|
|
36
36
|
--grid-header-filter-title-font: normal 12px var(--theme-font);
|
|
37
37
|
--grid-header-filter-title-icon-color: var(--primary-color);
|
|
38
38
|
|
|
39
|
+
--grid-gutter-padding:var(--padding-default) 0;
|
|
40
|
+
|
|
39
41
|
--grid-record-background-color: var(--theme-white-color);
|
|
40
42
|
--grid-record-odd-background-color: rgba(255, 255, 255, 0.4);
|
|
41
43
|
--grid-record-padding: 0 0 0 var(--padding-default);
|
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.82",
|
|
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.82",
|
|
33
33
|
"@things-factory/operato-license-checker": "^3.1.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@things-factory/builder": "^6.1.79",
|
|
37
37
|
"@things-factory/meta-ui": "^6.0.0-alpha.6"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "49c8b7dec7d37aa762baf228bfe75045803cef2d"
|
|
40
40
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';function a0_0x5c67(_0x54492f,_0x45d626){var _0x328eea=a0_0x328e();return a0_0x5c67=function(_0x5c67a1,_0x140b2d){_0x5c67a1=_0x5c67a1-0x167;var _0x41b829=_0x328eea[_0x5c67a1];return _0x41b829;},a0_0x5c67(_0x54492f,_0x45d626);}var a0_0x417d3f=a0_0x5c67;function a0_0x328e(){var _0x5b91e3=['8288VKgfiS','2917476bomlIb','543448HKuBKN','52690wFvNWA','126ucEgnB','70714prSkgK','90xVZJke','__esModule','1033140KlosbK','error.page\x20count\x20over\x20license\x20limit','7723050RzlMFH','OVER_LIMIT','3560twdZqX','315DIyRHF','error.invalid\x20license\x20key'];a0_0x328e=function(){return _0x5b91e3;};return a0_0x328e();}(function(_0x14e973,_0x24c3ec){var _0x400b29=a0_0x5c67,_0x4999c3=_0x14e973();while(!![]){try{var _0x6ca0c0=parseInt(_0x400b29(0x16d))/0x1+parseInt(_0x400b29(0x16a))/0x2*(parseInt(_0x400b29(0x16b))/0x3)+parseInt(_0x400b29(0x174))/0x4*(parseInt(_0x400b29(0x172))/0x5)+parseInt(_0x400b29(0x16f))/0x6+parseInt(_0x400b29(0x169))/0x7*(-parseInt(_0x400b29(0x167))/0x8)+parseInt(_0x400b29(0x175))/0x9+parseInt(_0x400b29(0x171))/0xa*(-parseInt(_0x400b29(0x168))/0xb);if(_0x6ca0c0===_0x24c3ec)break;else _0x4999c3['push'](_0x4999c3['shift']());}catch(_0x4d2a64){_0x4999c3['push'](_0x4999c3['shift']());}}}(a0_0x328e,0xdd9cf));Object['defineProperty'](exports,a0_0x417d3f(0x16c),{'value':!0x0}),exports['OVER_LIMIT']=exports['INVALID_LICENSE']=void 0x0,exports['INVALID_LICENSE']=a0_0x417d3f(0x173),exports[a0_0x417d3f(0x170)]=a0_0x417d3f(0x16e);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';const a0_0xd25192=a0_0x11b0;(function(_0x215f26,_0x220b54){const _0x14cf18=a0_0x11b0,_0xb9e759=_0x215f26();while(!![]){try{const _0x4a95ca=-parseInt(_0x14cf18(0x1d0))/0x1*(parseInt(_0x14cf18(0x1da))/0x2)+-parseInt(_0x14cf18(0x1dd))/0x3+parseInt(_0x14cf18(0x1de))/0x4*(parseInt(_0x14cf18(0x1cc))/0x5)+-parseInt(_0x14cf18(0x1d4))/0x6*(-parseInt(_0x14cf18(0x1d8))/0x7)+-parseInt(_0x14cf18(0x1d5))/0x8*(parseInt(_0x14cf18(0x1d7))/0x9)+-parseInt(_0x14cf18(0x1d2))/0xa*(parseInt(_0x14cf18(0x1d3))/0xb)+parseInt(_0x14cf18(0x1ce))/0xc;if(_0x4a95ca===_0x220b54)break;else _0xb9e759['push'](_0xb9e759['shift']());}catch(_0x594ffd){_0xb9e759['push'](_0xb9e759['shift']());}}}(a0_0x1ea8,0x5d256));function a0_0x1ea8(){const _0xfd950e=['42378rScSvT','88OMTnBZ','../constants/error-code','450153wssSfD','203NSYQXk','tslib','2TlhMpJ','LicenseError','ERROR_CODES','666213NcdmKq','2832304UhGUtS','errorCode','5vXgUcP','detail','8947452oaEOOp','name','389362ObyHfP','defineProperty','20JUSrXq','634579XkZFkD'];a0_0x1ea8=function(){return _0xfd950e;};return a0_0x1ea8();}function a0_0x11b0(_0x2d7463,_0x58fe35){const _0x1ea877=a0_0x1ea8();return a0_0x11b0=function(_0x11b04a,_0x5cf22a){_0x11b04a=_0x11b04a-0x1cc;let _0xbc856d=_0x1ea877[_0x11b04a];return _0xbc856d;},a0_0x11b0(_0x2d7463,_0x58fe35);}Object[a0_0xd25192(0x1d1)](exports,'__esModule',{'value':!0x0}),exports['LicenseError']=void 0x0;const tslib_1=require(a0_0xd25192(0x1d9)),ERROR_CODES=tslib_1['__importStar'](require(a0_0xd25192(0x1d6)));class LicenseError extends Error{static get[a0_0xd25192(0x1dc)](){return Object['assign']({},ERROR_CODES);}constructor({errorCode:_0x3f3707,detail:_0xaae050}){const _0x41d5ce=a0_0xd25192;super(_0x3f3707),this[_0x41d5ce(0x1cf)]='license-error',this[_0x41d5ce(0x1df)]=_0x3f3707,this[_0x41d5ce(0x1cd)]=_0xaae050;}}exports[a0_0xd25192(0x1db)]=LicenseError;
|
package/server/routes.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a0_0x5ad0(){const _0x3418f8=['bootstrap-module-global-public-route','bootstrap-module-domain-private-route','11661824pUozkB','bootstrap-module-global-private-route','3ylKzQB','379997ZmYENC','bootstrap-module-domain-public-route','63gFnEzn','debug','things-factory:operato-tools:routes','4496524SJOUSY','6819015DhBEMD','30597192EABLLU','168036SQyeNP','2156210GnKgxC'];a0_0x5ad0=function(){return _0x3418f8;};return a0_0x5ad0();}const a0_0x50eb3f=a0_0x2a73;function a0_0x2a73(_0x54c8b0,_0x10fa03){const _0x5ad0d8=a0_0x5ad0();return a0_0x2a73=function(_0x2a7338,_0x564b67){_0x2a7338=_0x2a7338-0xb1;let _0x1472de=_0x5ad0d8[_0x2a7338];return _0x1472de;},a0_0x2a73(_0x54c8b0,_0x10fa03);}(function(_0x4f0760,_0xf81ae4){const _0x1f0eb3=a0_0x2a73,_0x581a4c=_0x4f0760();while(!![]){try{const _0x37747b=parseInt(_0x1f0eb3(0xb1))/0x1+-parseInt(_0x1f0eb3(0xba))/0x2+parseInt(_0x1f0eb3(0xbf))/0x3*(parseInt(_0x1f0eb3(0xb6))/0x4)+-parseInt(_0x1f0eb3(0xb7))/0x5+parseInt(_0x1f0eb3(0xb9))/0x6*(-parseInt(_0x1f0eb3(0xb3))/0x7)+-parseInt(_0x1f0eb3(0xbd))/0x8+parseInt(_0x1f0eb3(0xb8))/0x9;if(_0x37747b===_0xf81ae4)break;else _0x581a4c['push'](_0x581a4c['shift']());}catch(_0x48d3f1){_0x581a4c['push'](_0x581a4c['shift']());}}}(a0_0x5ad0,0xb79fe));const debug=require(a0_0x50eb3f(0xb4))(a0_0x50eb3f(0xb5));process['on'](a0_0x50eb3f(0xbb),(_0x18a265,_0x53a7c4)=>{}),process['on'](a0_0x50eb3f(0xbe),(_0x51e79c,_0x4e0736)=>{}),process['on'](a0_0x50eb3f(0xb2),(_0x15a624,_0x38ec2d)=>{}),process['on'](a0_0x50eb3f(0xbc),(_0x561883,_0x2218fe)=>{});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x33f1ba=a0_0x4c20;(function(_0x7f0c5e,_0xae9b89){const _0x2d32ba=a0_0x4c20,_0x3ab57e=_0x7f0c5e();while(!![]){try{const _0x2332f3=parseInt(_0x2d32ba(0x21a))/0x1*(parseInt(_0x2d32ba(0x232))/0x2)+-parseInt(_0x2d32ba(0x23d))/0x3+parseInt(_0x2d32ba(0x1f9))/0x4+parseInt(_0x2d32ba(0x202))/0x5+parseInt(_0x2d32ba(0x1e2))/0x6+parseInt(_0x2d32ba(0x1fd))/0x7*(parseInt(_0x2d32ba(0x1f8))/0x8)+-parseInt(_0x2d32ba(0x1ea))/0x9;if(_0x2332f3===_0xae9b89)break;else _0x3ab57e['push'](_0x3ab57e['shift']());}catch(_0x13ba10){_0x3ab57e['push'](_0x3ab57e['shift']());}}}(a0_0x2d54,0x97364));Object[a0_0x33f1ba(0x1fa)](exports,'__esModule',{'value':!0x0}),exports[a0_0x33f1ba(0x238)]=void 0x0;function a0_0x4c20(_0x5b0170,_0x751623){const _0x2d54be=a0_0x2d54();return a0_0x4c20=function(_0x4c2080,_0x2cadac){_0x4c2080=_0x4c2080-0x1df;let _0xcc5501=_0x2d54be[_0x4c2080];return _0xcc5501;},a0_0x4c20(_0x5b0170,_0x751623);}const tslib_1=require(a0_0x33f1ba(0x1fe)),type_graphql_1=require(a0_0x33f1ba(0x22e)),resource_base_1=require(a0_0x33f1ba(0x21b)),menu_base_1=require(a0_0x33f1ba(0x22a)),tool_permission_1=require(a0_0x33f1ba(0x205)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x33f1ba(0x239)),{plural:plural}=require(a0_0x33f1ba(0x244)),crypto_1=tslib_1[a0_0x33f1ba(0x1e0)](require('crypto'));let OperatoToolCreateMenu=class{async[a0_0x33f1ba(0x1f3)](_0x51a00d,_0x15c60a,_0x1a2cbf){const _0x4dd885=a0_0x33f1ba,{domain:_0x350ce7,user:_0x15cfd4,tx:_0x8569e2}=_0x1a2cbf['state'];await(0x0,tool_permission_1[_0x4dd885(0x1e4)])('',_0x1a2cbf);const _0x3f464c=await _0x8569e2[_0x4dd885(0x1fc)](resource_base_1[_0x4dd885(0x21d)])['findOne']({'where':{'domain':{'id':_0x350ce7['id']},'id':_0x51a00d}}),_0x155e32=await _0x8569e2[_0x4dd885(0x1fc)](resource_base_1['EntityColumn'])[_0x4dd885(0x218)]({'where':{'domain':{'id':_0x350ce7['id']},'entity':{'id':_0x3f464c['id']}}});let {name:_0x149538=''}=_0x3f464c||{},_0x3537b0=kebabCase(_0x149538),_0x2e0e17=modelTemplate['replace'](/{{pascalCase name}}/g,startCase(camelCase(_0x149538))[_0x4dd885(0x222)](/ /g,''))[_0x4dd885(0x222)](/{{camelCase name}}/g,camelCase(_0x149538))[_0x4dd885(0x222)](/{{snakeCase name}}/g,snakeCase(_0x149538))['replace'](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x149538)))[_0x4dd885(0x222)](/ /g,''))[_0x4dd885(0x222)](/{{pluralCamelCase name}}/g,camelCase(plural(_0x149538)))[_0x4dd885(0x222)](/{{name}}/g,_0x149538),_0x65acf1='';_0x4dd885(0x1f0)==_0x3f464c[_0x4dd885(0x1f4)]?_0x65acf1='\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':_0x4dd885(0x236)==_0x3f464c[_0x4dd885(0x1f4)]&&(_0x65acf1='\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'),_0x2e0e17=_0x2e0e17['replace'](/{{HistoryButton}}/g,_0x65acf1);let _0x589e57=this[_0x4dd885(0x208)](_0x155e32);_0x2e0e17=_0x2e0e17[_0x4dd885(0x222)](/{{SortColumns}}/g,_0x589e57[_0x4dd885(0x226)](','));let _0x3b370c=this[_0x4dd885(0x234)](_0x155e32);_0x2e0e17=_0x2e0e17[_0x4dd885(0x222)](/{{SearchColumns}}/g,_0x3b370c[_0x4dd885(0x226)](','));let _0xd3e201=this[_0x4dd885(0x21e)](_0x155e32);return _0x2e0e17=_0x2e0e17[_0x4dd885(0x222)](/{{GridColumns}}/g,_0xd3e201['join'](',')),_0x2e0e17=this[_0x4dd885(0x1f5)](_0x2e0e17),await this[_0x4dd885(0x22f)](_0x8569e2,_0x350ce7,_0x15cfd4,_0x15c60a,_0x3537b0,_0x2e0e17),!0x0;}['createGridColumns'](_0x29139e){const _0x37406c=a0_0x33f1ba;return _0x29139e[_0x37406c(0x215)](_0x4ee7a0=>'id'!=_0x4ee7a0[_0x37406c(0x219)]&&_0x4ee7a0[_0x37406c(0x248)]>0x0)[_0x37406c(0x23f)](function(_0x1751c3,_0x5a56eb){const _0x22a216=_0x37406c;return _0x1751c3[_0x22a216(0x248)]-_0x5a56eb[_0x22a216(0x248)];})[_0x37406c(0x1eb)](_0x192e13=>{const _0x1a9ab2=_0x37406c;let {gridEditor:_0x28edc9='string',name:_0x536706,term:_0x41fa3c,gridWidth:_0x4bd2c7=0x0,gridAlign:_0x2f7748=_0x1a9ab2(0x229),nullable:_0xccc00d=!0x1}=_0x192e13;if(null==_0x28edc9&&(_0x28edc9=_0x1a9ab2(0x216)),null==_0x2f7748&&(_0x2f7748=_0x1a9ab2(0x229)),'updater_id'==_0x536706||_0x1a9ab2(0x211)==_0x536706)return _0x536706=_0x1a9ab2(0x20d)==_0x536706?_0x1a9ab2(0x233):_0x1a9ab2(0x245),_0x1a9ab2(0x1ed)+_0x536706+'\x22,\x22header\x22:\x20\x22'+_0x536706+_0x1a9ab2(0x20a);if(_0x1a9ab2(0x1e9)==_0x536706||'created_at'==_0x536706)return'{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22'+(_0x1a9ab2(0x1e9)==_0x536706?_0x1a9ab2(0x20e):_0x1a9ab2(0x1e1))+_0x1a9ab2(0x224)+_0x536706+_0x1a9ab2(0x249);let _0x4bacb3='readonly'!=_0x28edc9&&_0x1a9ab2(0x221)!=_0x28edc9,_0xc8e5c4=_0x1a9ab2(0x221)==_0x28edc9;0x1!=_0xc8e5c4&&0x0!=_0x4bacb3||(_0x28edc9=_0x1a9ab2(0x216));let _0x3bcb09='{\x22type\x22:\x20\x22'+_0x28edc9+_0x1a9ab2(0x20f)+camelCase(_0x536706)+_0x1a9ab2(0x224)+_0x41fa3c+_0x1a9ab2(0x1ff)+_0xc8e5c4+_0x1a9ab2(0x235)+_0x4bacb3+',\x22mandatory\x22:\x20'+!_0xccc00d+',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22'+_0x2f7748+'\x22,\x22width\x22:'+_0x4bd2c7+_0x1a9ab2(0x200);return _0x1a9ab2(0x1e6)==_0x192e13['refType']&&(_0x3bcb09+=_0x1a9ab2(0x217)+_0x192e13[_0x1a9ab2(0x22b)]+'\x22}'),'scenario'==_0x192e13[_0x1a9ab2(0x201)]&&(_0x3bcb09+=_0x1a9ab2(0x206)+_0x192e13[_0x1a9ab2(0x22b)]+'\x22}'),_0x1a9ab2(0x23b)==_0x192e13[_0x1a9ab2(0x201)]&&(_0x3bcb09+=',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22'+camelCase(plural(_0x192e13['refName']))+'\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}'),_0x3bcb09+='}',_0x3bcb09;});}[a0_0x33f1ba(0x234)](_0x3ea990){const _0x32fee9=a0_0x33f1ba;return _0x3ea990[_0x32fee9(0x215)](_0x234d86=>_0x234d86[_0x32fee9(0x1f7)]>0x0)[_0x32fee9(0x23f)](function(_0xd6afc1,_0x1d2b28){const _0x216e0f=_0x32fee9;return _0xd6afc1[_0x216e0f(0x1f7)]-_0x1d2b28['searchRank'];})[_0x32fee9(0x1eb)](_0x488e06=>{const _0x1d11ed=_0x32fee9;let _0x5d57a1=_0x488e06[_0x1d11ed(0x1ef)];return'filter'==_0x5d57a1?'\x22'+camelCase(_0x488e06['name'])+'\x22':(_0x5d57a1||(_0x5d57a1='eq'),_0x1d11ed(0x203)+camelCase(_0x488e06['name'])+_0x1d11ed(0x22d)+_0x5d57a1+'\x22}');});}[a0_0x33f1ba(0x208)](_0x521a53){const _0x1d04ff=a0_0x33f1ba;return _0x521a53['filter'](_0x1450b7=>_0x1450b7['sortRank']>0x0)[_0x1d04ff(0x23f)](function(_0x1daea0,_0x22e10e){const _0x2dbff6=_0x1d04ff;return _0x1daea0[_0x2dbff6(0x247)]-_0x22e10e[_0x2dbff6(0x247)];})[_0x1d04ff(0x1eb)](_0x343596=>'{\x22name\x22:\x22'+camelCase(_0x343596[_0x1d04ff(0x219)])+_0x1d04ff(0x1e7)+_0x343596['reverseSort']+'}');}async[a0_0x33f1ba(0x22f)](_0x4b040f,_0xb7db9f,_0x34c8e9,_0x4af6e4,_0x38c38a,_0xdc4254){const _0x4941df=a0_0x33f1ba;let _0x33abe2=await _0x4b040f[_0x4941df(0x1fc)](menu_base_1[_0x4941df(0x1f1)])['findOne']({'where':{'domain':{'id':_0xb7db9f['id']},'id':_0x4af6e4}}),_0x1167f3=(await _0x4b040f['getRepository'](menu_base_1[_0x4941df(0x1f1)])[_0x4941df(0x21c)](_0x4941df(0x220)+_0x4af6e4+'\x27\x20or\x20id\x20=\x20\x27'+_0x4af6e4+'\x27'))[0x0][_0x4941df(0x209)]+0xa,_0x34a444=new menu_base_1['Menu']();_0x34a444[_0x4941df(0x219)]=_0x38c38a,_0x34a444['menuType']=_0x4941df(0x20b),_0x34a444[_0x4941df(0x207)]=_0x4941df(0x240),_0x34a444[_0x4941df(0x209)]=_0x1167f3,_0x34a444[_0x4941df(0x1df)]=!0x1,_0x34a444[_0x4941df(0x1e5)]=_0x38c38a,_0x34a444['template']=_0xdc4254,_0x34a444['resourceUrl']='@things-factory/meta-ui/client/pages/meta-grist-page',_0x34a444['parent']=_0x33abe2,await _0x4b040f[_0x4941df(0x1fc)](menu_base_1[_0x4941df(0x1f1)])[_0x4941df(0x22c)](Object[_0x4941df(0x213)](Object['assign']({},_0x34a444),{'domain':_0xb7db9f,'creator':_0x34c8e9,'updater':_0x34c8e9}));}[a0_0x33f1ba(0x1f5)](_0x5bc8d1){const _0x5d2413=a0_0x33f1ba;let _0x54f828=JSON[_0x5d2413(0x1fb)](_0x5bc8d1)[_0x5d2413(0x223)](/(.{100})/)[_0x5d2413(0x215)](_0x413a38=>_0x413a38),_0x242ab9=[_0x5d2413(0x231),_0x5d2413(0x24a),'aes-256-cfb',_0x5d2413(0x212),_0x5d2413(0x204),_0x5d2413(0x23e),_0x5d2413(0x1e8),'aes256'],_0xd466ad=crypto_1['default']['randomBytes'](0x20)[_0x5d2413(0x20c)](_0x5d2413(0x241)),_0x48e409=Buffer['from'](_0xd466ad,'hex'),_0x3cfba4=_0xd466ad[_0x5d2413(0x243)](0x0,0x10),_0x4c5b3c=['',_0x3cfba4,_0x3cfba4,_0x3cfba4,_0x3cfba4,_0x3cfba4,_0x3cfba4,_0x3cfba4],_0x192e19=0x0,_0x2dc0dc=[];_0x2dc0dc['push'](_0xd466ad);for(var _0x5d1f62=0x0;_0x5d1f62<_0x54f828[_0x5d2413(0x24b)];_0x5d1f62++,_0x192e19++){_0x192e19==_0x242ab9[_0x5d2413(0x24b)]&&(_0x192e19=0x0);let _0x41e86b=crypto_1['default'][_0x5d2413(0x21f)](_0x242ab9[_0x192e19],_0x48e409,_0x4c5b3c[_0x192e19]),_0xcc3a56=_0x41e86b['update'](_0x54f828[_0x5d1f62],_0x5d2413(0x230),_0x5d2413(0x241));_0xcc3a56+=_0x41e86b[_0x5d2413(0x1f6)](_0x5d2413(0x241)),_0x2dc0dc['push'](_0xcc3a56);}return _0x2dc0dc['join'](_0x5d2413(0x228));}};tslib_1[a0_0x33f1ba(0x1ec)]([(0x0,type_graphql_1['Directive'])(a0_0x33f1ba(0x242)),(0x0,type_graphql_1[a0_0x33f1ba(0x1ee)])(_0x1d6878=>Boolean,{'description':a0_0x33f1ba(0x23a)}),tslib_1['__param'](0x0,(0x0,type_graphql_1[a0_0x33f1ba(0x227)])('id')),tslib_1[a0_0x33f1ba(0x214)](0x1,(0x0,type_graphql_1['Arg'])(a0_0x33f1ba(0x246))),tslib_1[a0_0x33f1ba(0x214)](0x2,(0x0,type_graphql_1['Ctx'])()),tslib_1[a0_0x33f1ba(0x1e3)](a0_0x33f1ba(0x1f2),Function),tslib_1[a0_0x33f1ba(0x1e3)](a0_0x33f1ba(0x210),[String,String,Object]),tslib_1[a0_0x33f1ba(0x1e3)]('design:returntype',Promise)],OperatoToolCreateMenu[a0_0x33f1ba(0x225)],a0_0x33f1ba(0x1f3),null),OperatoToolCreateMenu=tslib_1[a0_0x33f1ba(0x1ec)]([(0x0,type_graphql_1[a0_0x33f1ba(0x23c)])()],OperatoToolCreateMenu),exports[a0_0x33f1ba(0x238)]=OperatoToolCreateMenu;const modelTemplate=a0_0x33f1ba(0x237);function a0_0x2d54(){const _0x6008f7=[',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22','find','name','37979fKwExP','@things-factory/resource-base','query','Entity','createGridColumns','createCipheriv','select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27','hidden','replace','split','\x22,\x22header\x22:\x20\x22','prototype','join','Arg','h1z0q9i9x7q6','left','@things-factory/menu-base','refName','save','\x22,\x22operator\x22:\x20\x22','type-graphql','createMenuData','utf8','aes-256-ecb','2AHWTaD','updater','createSearchCols','\x20,\x22editable\x22:\x20','COPY','\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','OperatoToolCreateMenu','lodash','Operato\x20Tool\x20Create\x20Menu','entity','Resolver','3331989jaoFOB','aes-256-ofb','sort','meta-grist-page','hex','@transaction','substring','pluralize','creator','parent_menu_id','sortRank','gridRank','\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}','aes-256-cbc','length','hiddenFlag','__importDefault','createdAt','5088666LdrEBf','__metadata','checkStudioTemplateIsOverLimit','routing','code','\x22,\x22desc\x22:','aes-256-ctr','updated_at','7639686TeCnWp','map','__decorate','{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22','Mutation','searchOper','JSON','Menu','design:type','toolCreateMenu','dataProp','enc','final','searchRank','48MiWXoB','3510144nQYFuN','defineProperty','stringify','getRepository','171815MemJXl','tslib','\x22,\x22hidden\x22:','\x20,\x22exportable\x22:\x20true','refType','3339925DDvTFZ','{\x22name\x22:\x20\x22','aes-256-cfb1','./../tool-secret/tool-permission',',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22','category','createSortCols','rank','\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}','SCREEN','toString','updater_id','updatedAt','\x22,\x22name\x22:\x20\x22','design:paramtypes','creator_id','aes-256-cfb8','assign','__param','filter','string'];a0_0x2d54=function(){return _0x6008f7;};return a0_0x2d54();}
|
|
1
|
+
'use strict';const a0_0x4b6842=a0_0x53b6;(function(_0x57dcca,_0x58b881){const _0x53639c=a0_0x53b6,_0x5151ff=_0x57dcca();while(!![]){try{const _0x4e6c7c=-parseInt(_0x53639c(0x20c))/0x1*(parseInt(_0x53639c(0x1b4))/0x2)+-parseInt(_0x53639c(0x1be))/0x3+parseInt(_0x53639c(0x1bd))/0x4+parseInt(_0x53639c(0x1fb))/0x5*(parseInt(_0x53639c(0x1f5))/0x6)+parseInt(_0x53639c(0x1d4))/0x7*(parseInt(_0x53639c(0x1d1))/0x8)+-parseInt(_0x53639c(0x1fe))/0x9+parseInt(_0x53639c(0x1f4))/0xa;if(_0x4e6c7c===_0x58b881)break;else _0x5151ff['push'](_0x5151ff['shift']());}catch(_0xd8f4d2){_0x5151ff['push'](_0x5151ff['shift']());}}}(a0_0x2682,0xc2033));function a0_0x2682(){const _0x31d511=['Directive','__esModule',',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22','map','updatedAt','\x22,\x22desc\x22:','refType','gridRank','design:returntype','sortRank','searchOper','final','dataProp','lodash','\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}','updater_id','aes-256-ofb',',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22','@things-factory/menu-base','find','\x27\x20or\x20id\x20=\x20\x27','crypto','7118jQSnZq','toString','type-graphql','refName','Mutation','\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','parent_menu_id','@transaction','\x20,\x22editable\x22:\x20','4916348RuGreX','1803792BmtBwH','searchRank','{\x22name\x22:\x22','sort','getRepository','scenario','query',',\x22mandatory\x22:\x20','left','\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}','created_at','\x22,\x22header\x22:\x20\x22','@things-factory/resource-base','default','name','replace','pluralize','design:type','select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27','10417296XRCBPb','{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22','menuType','7MVEMYB','tslib','__metadata','updated_at','design:paramtypes','enc','update','{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22','Entity','{\x22name\x22:\x20\x22','\x22,\x22name\x22:\x20\x22','hidden','\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}','\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22basic\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22label\x22:\x20\x22data_history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22icon\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22logic\x22:\x20\x22history_copy\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20','\x22,\x22width\x22:','save','assign','createSortCols','category','checkStudioTemplateIsOverLimit','\x20,\x22exportable\x22:\x20true','__importDefault','aes256','createCipheriv','push','findOne','COPY','defineProperty','routing','join','length','randomBytes','3820660QTQGYe','330bxmkwX','rank','OperatoToolCreateMenu','stringify','aes-256-ctr','createMenuData','95585eWOSwC','aes-256-cfb','substring','9602217SKLgNY','__decorate','reverseSort','meta-grist-page','parent','./../tool-secret/tool-permission','createGridColumns','\x22,\x22hidden\x22:','prototype','EntityColumn','string','creator_id','__param','Ctx','422ChQbnw',',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22','aes-256-cfb1','aes-256-ecb','Arg','@things-factory/meta-ui/client/pages/meta-grist-page','filter','{\x22type\x22:\x20\x22','updater','toolCreateMenu','aes-256-cfb8','Menu','aes-256-cbc','hex','hiddenFlag','Operato\x20Tool\x20Create\x20Menu'];a0_0x2682=function(){return _0x31d511;};return a0_0x2682();}function a0_0x53b6(_0x28abe9,_0x43c432){const _0x26826a=a0_0x2682();return a0_0x53b6=function(_0x53b697,_0x5c30da){_0x53b697=_0x53b697-0x194;let _0x1f9453=_0x26826a[_0x53b697];return _0x1f9453;},a0_0x53b6(_0x28abe9,_0x43c432);}Object[a0_0x4b6842(0x1ef)](exports,a0_0x4b6842(0x19f),{'value':!0x0}),exports[a0_0x4b6842(0x1f7)]=void 0x0;const tslib_1=require(a0_0x4b6842(0x1d5)),type_graphql_1=require(a0_0x4b6842(0x1b6)),resource_base_1=require(a0_0x4b6842(0x1ca)),menu_base_1=require(a0_0x4b6842(0x1b0)),tool_permission_1=require(a0_0x4b6842(0x203)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x4b6842(0x1ab)),{plural:plural}=require(a0_0x4b6842(0x1ce)),crypto_1=tslib_1[a0_0x4b6842(0x1e9)](require(a0_0x4b6842(0x1b3)));let OperatoToolCreateMenu=class{async[a0_0x4b6842(0x197)](_0x215386,_0x47a029,_0x4a5ea7){const _0x39cf43=a0_0x4b6842,{domain:_0x5aa7dd,user:_0xd50829,tx:_0x5717aa}=_0x4a5ea7['state'];await(0x0,tool_permission_1[_0x39cf43(0x1e7)])('',_0x4a5ea7);const _0x47eb84=await _0x5717aa[_0x39cf43(0x1c2)](resource_base_1[_0x39cf43(0x1dc)])[_0x39cf43(0x1ed)]({'where':{'domain':{'id':_0x5aa7dd['id']},'id':_0x215386}}),_0x7c612c=await _0x5717aa[_0x39cf43(0x1c2)](resource_base_1[_0x39cf43(0x207)])[_0x39cf43(0x1b1)]({'where':{'domain':{'id':_0x5aa7dd['id']},'entity':{'id':_0x47eb84['id']}}});let {name:_0x31a8b4=''}=_0x47eb84||{},_0xbc1eef=kebabCase(_0x31a8b4),_0x3c44c1=modelTemplate[_0x39cf43(0x1cd)](/{{pascalCase name}}/g,startCase(camelCase(_0x31a8b4))['replace'](/ /g,''))[_0x39cf43(0x1cd)](/{{camelCase name}}/g,camelCase(_0x31a8b4))[_0x39cf43(0x1cd)](/{{snakeCase name}}/g,snakeCase(_0x31a8b4))[_0x39cf43(0x1cd)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x31a8b4)))['replace'](/ /g,''))[_0x39cf43(0x1cd)](/{{pluralCamelCase name}}/g,camelCase(plural(_0x31a8b4)))[_0x39cf43(0x1cd)](/{{name}}/g,_0x31a8b4),_0x5b5911='';'JSON'==_0x47eb84[_0x39cf43(0x1aa)]?_0x5b5911='\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':_0x39cf43(0x1ee)==_0x47eb84['dataProp']&&(_0x5b5911=_0x39cf43(0x1e1)),_0x3c44c1=_0x3c44c1[_0x39cf43(0x1cd)](/{{HistoryButton}}/g,_0x5b5911);let _0x4ae15b=this[_0x39cf43(0x1e5)](_0x7c612c);_0x3c44c1=_0x3c44c1[_0x39cf43(0x1cd)](/{{SortColumns}}/g,_0x4ae15b[_0x39cf43(0x1f1)](','));let _0x175014=this['createSearchCols'](_0x7c612c);_0x3c44c1=_0x3c44c1[_0x39cf43(0x1cd)](/{{SearchColumns}}/g,_0x175014[_0x39cf43(0x1f1)](','));let _0x115fdd=this[_0x39cf43(0x204)](_0x7c612c);return _0x3c44c1=_0x3c44c1[_0x39cf43(0x1cd)](/{{GridColumns}}/g,_0x115fdd[_0x39cf43(0x1f1)](',')),_0x3c44c1=this[_0x39cf43(0x1d9)](_0x3c44c1),await this['createMenuData'](_0x5717aa,_0x5aa7dd,_0xd50829,_0x47a029,_0xbc1eef,_0x3c44c1),!0x0;}[a0_0x4b6842(0x204)](_0x377309){const _0x3aacf7=a0_0x4b6842;return _0x377309['filter'](_0x47fceb=>'id'!=_0x47fceb['name']&&_0x47fceb[_0x3aacf7(0x1a5)]>0x0)[_0x3aacf7(0x1c1)](function(_0x8bc2cb,_0x1e495c){const _0x1d94f4=_0x3aacf7;return _0x8bc2cb[_0x1d94f4(0x1a5)]-_0x1e495c[_0x1d94f4(0x1a5)];})[_0x3aacf7(0x1a1)](_0x344ae9=>{const _0x5e9ea4=_0x3aacf7;let {gridEditor:_0x4cd72c='string',name:_0x48ecd5,term:_0x1d0697,gridWidth:_0x3c4ace=0x0,gridAlign:_0x50ac8a='left',nullable:_0x5074f1=!0x1}=_0x344ae9;if(null==_0x4cd72c&&(_0x4cd72c='string'),null==_0x50ac8a&&(_0x50ac8a=_0x5e9ea4(0x1c6)),'updater_id'==_0x48ecd5||_0x5e9ea4(0x209)==_0x48ecd5)return _0x48ecd5=_0x5e9ea4(0x1ad)==_0x48ecd5?_0x5e9ea4(0x196):'creator',_0x5e9ea4(0x1db)+_0x48ecd5+_0x5e9ea4(0x1c9)+_0x48ecd5+_0x5e9ea4(0x1c7);if('updated_at'==_0x48ecd5||_0x5e9ea4(0x1c8)==_0x48ecd5)return _0x5e9ea4(0x1d2)+(_0x5e9ea4(0x1d7)==_0x48ecd5?_0x5e9ea4(0x1a2):'createdAt')+_0x5e9ea4(0x1c9)+_0x48ecd5+_0x5e9ea4(0x1e0);let _0x5919ee='readonly'!=_0x4cd72c&&_0x5e9ea4(0x1df)!=_0x4cd72c,_0x152bd9=_0x5e9ea4(0x1df)==_0x4cd72c;0x1!=_0x152bd9&&0x0!=_0x5919ee||(_0x4cd72c=_0x5e9ea4(0x208));let _0x158c10=_0x5e9ea4(0x195)+_0x4cd72c+_0x5e9ea4(0x1de)+camelCase(_0x48ecd5)+_0x5e9ea4(0x1c9)+_0x1d0697+_0x5e9ea4(0x205)+_0x152bd9+_0x5e9ea4(0x1bc)+_0x5919ee+_0x5e9ea4(0x1c5)+!_0x5074f1+_0x5e9ea4(0x1a0)+_0x50ac8a+_0x5e9ea4(0x1e2)+_0x3c4ace+_0x5e9ea4(0x1e8);return'code'==_0x344ae9[_0x5e9ea4(0x1a4)]&&(_0x158c10+=',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22'+_0x344ae9['refName']+'\x22}'),_0x5e9ea4(0x1c3)==_0x344ae9[_0x5e9ea4(0x1a4)]&&(_0x158c10+=_0x5e9ea4(0x1af)+_0x344ae9[_0x5e9ea4(0x1b7)]+'\x22}'),'entity'==_0x344ae9[_0x5e9ea4(0x1a4)]&&(_0x158c10+=_0x5e9ea4(0x20d)+camelCase(plural(_0x344ae9[_0x5e9ea4(0x1b7)]))+_0x5e9ea4(0x1ac)),_0x158c10+='}',_0x158c10;});}['createSearchCols'](_0x1b1d51){const _0x9d9b80=a0_0x4b6842;return _0x1b1d51[_0x9d9b80(0x194)](_0x48a7c0=>_0x48a7c0[_0x9d9b80(0x1bf)]>0x0)[_0x9d9b80(0x1c1)](function(_0x20edff,_0x382a90){const _0xcf7125=_0x9d9b80;return _0x20edff[_0xcf7125(0x1bf)]-_0x382a90['searchRank'];})[_0x9d9b80(0x1a1)](_0x2b6516=>{const _0x4f9456=_0x9d9b80;let _0x1e37de=_0x2b6516[_0x4f9456(0x1a8)];return _0x4f9456(0x194)==_0x1e37de?'\x22'+camelCase(_0x2b6516['name'])+'\x22':(_0x1e37de||(_0x1e37de='eq'),_0x4f9456(0x1dd)+camelCase(_0x2b6516['name'])+'\x22,\x22operator\x22:\x20\x22'+_0x1e37de+'\x22}');});}['createSortCols'](_0x233d8d){const _0x1bfb62=a0_0x4b6842;return _0x233d8d['filter'](_0x205943=>_0x205943[_0x1bfb62(0x1a7)]>0x0)[_0x1bfb62(0x1c1)](function(_0x36649b,_0x2cfbbc){const _0x5eb9a6=_0x1bfb62;return _0x36649b[_0x5eb9a6(0x1a7)]-_0x2cfbbc[_0x5eb9a6(0x1a7)];})['map'](_0x2bfd73=>_0x1bfb62(0x1c0)+camelCase(_0x2bfd73[_0x1bfb62(0x1cc)])+_0x1bfb62(0x1a3)+_0x2bfd73[_0x1bfb62(0x200)]+'}');}async[a0_0x4b6842(0x1fa)](_0x4536af,_0x39e7b7,_0x3aee1d,_0x111781,_0xc9e88b,_0x1f5455){const _0xe7da9=a0_0x4b6842;let _0x583837=await _0x4536af[_0xe7da9(0x1c2)](menu_base_1['Menu'])[_0xe7da9(0x1ed)]({'where':{'domain':{'id':_0x39e7b7['id']},'id':_0x111781}}),_0x1482d5=(await _0x4536af[_0xe7da9(0x1c2)](menu_base_1[_0xe7da9(0x199)])[_0xe7da9(0x1c4)](_0xe7da9(0x1d0)+_0x111781+_0xe7da9(0x1b2)+_0x111781+'\x27'))[0x0][_0xe7da9(0x1f6)]+0xa,_0x5aa9b=new menu_base_1[(_0xe7da9(0x199))]();_0x5aa9b[_0xe7da9(0x1cc)]=_0xc9e88b,_0x5aa9b[_0xe7da9(0x1d3)]='SCREEN',_0x5aa9b[_0xe7da9(0x1e6)]=_0xe7da9(0x201),_0x5aa9b[_0xe7da9(0x1f6)]=_0x1482d5,_0x5aa9b[_0xe7da9(0x19c)]=!0x1,_0x5aa9b[_0xe7da9(0x1f0)]=_0xc9e88b,_0x5aa9b['template']=_0x1f5455,_0x5aa9b['resourceUrl']=_0xe7da9(0x211),_0x5aa9b[_0xe7da9(0x202)]=_0x583837,await _0x4536af['getRepository'](menu_base_1[_0xe7da9(0x199)])[_0xe7da9(0x1e3)](Object['assign'](Object[_0xe7da9(0x1e4)]({},_0x5aa9b),{'domain':_0x39e7b7,'creator':_0x3aee1d,'updater':_0x3aee1d}));}[a0_0x4b6842(0x1d9)](_0x9213ee){const _0x48a65c=a0_0x4b6842;let _0x134025=JSON[_0x48a65c(0x1f8)](_0x9213ee)['split'](/(.{100})/)[_0x48a65c(0x194)](_0x2cd974=>_0x2cd974),_0x5310a3=[_0x48a65c(0x20f),_0x48a65c(0x19a),_0x48a65c(0x1fc),_0x48a65c(0x198),_0x48a65c(0x20e),_0x48a65c(0x1ae),_0x48a65c(0x1f9),_0x48a65c(0x1ea)],_0x5465c5=crypto_1[_0x48a65c(0x1cb)][_0x48a65c(0x1f3)](0x20)[_0x48a65c(0x1b5)]('hex'),_0x219c00=Buffer['from'](_0x5465c5,_0x48a65c(0x19b)),_0x4f461c=_0x5465c5[_0x48a65c(0x1fd)](0x0,0x10),_0x3a3e55=['',_0x4f461c,_0x4f461c,_0x4f461c,_0x4f461c,_0x4f461c,_0x4f461c,_0x4f461c],_0x2bc50d=0x0,_0x2d8f0b=[];_0x2d8f0b[_0x48a65c(0x1ec)](_0x5465c5);for(var _0x3f46f7=0x0;_0x3f46f7<_0x134025[_0x48a65c(0x1f2)];_0x3f46f7++,_0x2bc50d++){_0x2bc50d==_0x5310a3[_0x48a65c(0x1f2)]&&(_0x2bc50d=0x0);let _0x416930=crypto_1[_0x48a65c(0x1cb)][_0x48a65c(0x1eb)](_0x5310a3[_0x2bc50d],_0x219c00,_0x3a3e55[_0x2bc50d]),_0x312016=_0x416930[_0x48a65c(0x1da)](_0x134025[_0x3f46f7],'utf8',_0x48a65c(0x19b));_0x312016+=_0x416930[_0x48a65c(0x1a9)](_0x48a65c(0x19b)),_0x2d8f0b[_0x48a65c(0x1ec)](_0x312016);}return _0x2d8f0b[_0x48a65c(0x1f1)]('h1z0q9i9x7q6');}};tslib_1[a0_0x4b6842(0x1ff)]([(0x0,type_graphql_1[a0_0x4b6842(0x19e)])(a0_0x4b6842(0x1bb)),(0x0,type_graphql_1[a0_0x4b6842(0x1b8)])(_0x171718=>Boolean,{'description':a0_0x4b6842(0x19d)}),tslib_1[a0_0x4b6842(0x20a)](0x0,(0x0,type_graphql_1[a0_0x4b6842(0x210)])('id')),tslib_1[a0_0x4b6842(0x20a)](0x1,(0x0,type_graphql_1[a0_0x4b6842(0x210)])(a0_0x4b6842(0x1ba))),tslib_1[a0_0x4b6842(0x20a)](0x2,(0x0,type_graphql_1[a0_0x4b6842(0x20b)])()),tslib_1[a0_0x4b6842(0x1d6)](a0_0x4b6842(0x1cf),Function),tslib_1[a0_0x4b6842(0x1d6)](a0_0x4b6842(0x1d8),[String,String,Object]),tslib_1[a0_0x4b6842(0x1d6)](a0_0x4b6842(0x1a6),Promise)],OperatoToolCreateMenu[a0_0x4b6842(0x206)],a0_0x4b6842(0x197),null),OperatoToolCreateMenu=tslib_1[a0_0x4b6842(0x1ff)]([(0x0,type_graphql_1['Resolver'])()],OperatoToolCreateMenu),exports[a0_0x4b6842(0x1f7)]=OperatoToolCreateMenu;const modelTemplate=a0_0x4b6842(0x1b9);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x5a722c=a0_0x2769;(function(_0x25eff6,_0x5219dc){const _0x734b9=a0_0x2769,_0x2c992a=_0x25eff6();while(!![]){try{const _0x333733=-parseInt(_0x734b9(0x187))/0x1+-parseInt(_0x734b9(0x152))/0x2*(-parseInt(_0x734b9(0x181))/0x3)+-parseInt(_0x734b9(0x130))/0x4+parseInt(_0x734b9(0x149))/0x5*(parseInt(_0x734b9(0x133))/0x6)+-parseInt(_0x734b9(0x199))/0x7+-parseInt(_0x734b9(0x150))/0x8+parseInt(_0x734b9(0x12f))/0x9*(parseInt(_0x734b9(0x13d))/0xa);if(_0x333733===_0x5219dc)break;else _0x2c992a['push'](_0x2c992a['shift']());}catch(_0x14f710){_0x2c992a['push'](_0x2c992a['shift']());}}}(a0_0x58bc,0xb8f6d));function a0_0x58bc(){const _0x1e5c33=['creator','bigint','updated_at','sort','join','utf8','creator_id','/server','push','split','5898494lQhXRo','createHistoryServiceFiles','Float','.ts','getColTxtType','rank','packages','createNoHistoryServiceFiels','import\x20{\x20entities\x20as\x20','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','\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','integer','{{camelCase\x20name}}.','__decorate','uniqRank','createEntityText','\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','/event-subscriber.ts','pascalCaseName','@Column({name:\x27','camelCaseName','type\x20=>','/packages','__esModule','OperatoToolCreateService','Query','__metadata','createServiceFiles','JSON','pluralCamelCaseName','domain','datetime','filter','state','date','colSize','export\x20*\x20from\x20\x27./','COPY','updater_id','type-graphql','36xUSiyV','1020464BnAUYg','Resolver','colType','154488HINIwC','/server/service/','/packages/','timestamp\x20without\x20time\x20zone','@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})','\x20{\x20nullable:\x20','\x20})','Entity','toolCreateService','-history\x27','464180ygfZCM','-mutation.ts','/*\x20ENTITIES\x20*/\x0a\x09...','Entities,\x20resolvers\x20as\x20','/service','@things-factory/resource-base','getProjectRootPath','getFieldType','name','map','Entities,','pluralPascalCaseName','165tQMbLW','snakeCaseName','\x27,\x20type:\x20\x27','/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...','mkdirSync','EntitySubscribers,','Date','4360040elILuM','-history-query.ts','18rdDPZf','character\x20varying','Ctx','Operato\x20Tool\x20Create\x20Service','__param','columnToEntityColumn','Int','findOne','length','EntityColumn','createDir','double','\x0a\x20\x20','\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','\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','float','domain_id','Resolvers,','writeFileSync','\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','-type.ts','@things-factory/shell','updater','existsPath','replaceNamesMap','@Field(','string','\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201','design:type','pluralize','existsSync','dataProp','created_at','readFileSync','\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','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','Resolvers,\x20subscribers\x20as\x20','replace','createTypeText',',length:','-query.ts','index.ts','...','number','nullable','tableName','getRepository','481137bdhnyi','writeFile','Resolvers\x20}\x20from\x20\x27./','EntitySubscribers\x20}\x20from\x20\x27./','prototype','createHistoryEntityText','78391NISMJh','Arg','indexOf','lodash','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','/index.ts','createServicePath','long'];a0_0x58bc=function(){return _0x1e5c33;};return a0_0x58bc();}Object['defineProperty'](exports,a0_0x5a722c(0x11e),{'value':!0x0}),exports[a0_0x5a722c(0x11f)]=void 0x0;const tslib_1=require('tslib'),type_graphql_1=require(a0_0x5a722c(0x12e)),shell_1=require(a0_0x5a722c(0x167)),resource_base_1=require(a0_0x5a722c(0x142)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x5a722c(0x18a)),{plural:plural}=require(a0_0x5a722c(0x16f)),fs=require('fs');function a0_0x2769(_0x3c9a86,_0xb92d6d){const _0x58bcde=a0_0x58bc();return a0_0x2769=function(_0x276926,_0x895a58){_0x276926=_0x276926-0x119;let _0x50e415=_0x58bcde[_0x276926];return _0x50e415;},a0_0x2769(_0x3c9a86,_0xb92d6d);}let OperatoToolCreateService=class{async[a0_0x5a722c(0x13b)](_0x4064b6,_0x1d43dc){const _0x2ffca7=a0_0x5a722c,{domain:_0x59deb7}=_0x1d43dc[_0x2ffca7(0x128)],_0x1dae57=await(0x0,shell_1[_0x2ffca7(0x180)])(resource_base_1[_0x2ffca7(0x13a)])[_0x2ffca7(0x159)]({'where':{'id':_0x4064b6}}),_0x5459c8=await(0x0,shell_1[_0x2ffca7(0x180)])(resource_base_1[_0x2ffca7(0x15b)])['find']({'where':{'domain':{'id':_0x59deb7['id']},'entity':{'id':_0x1dae57['id']}}});let {name:_0x56b9fc='',bundle:_0x467945=''}=_0x1dae57||{},_0x4cca9d=this['getProjectRootPath'](),_0x3f4341=kebabCase(_0x56b9fc);return await this[_0x2ffca7(0x18d)](_0x4cca9d,_0x467945,_0x3f4341),await this[_0x2ffca7(0x122)](_0x4cca9d,_0x467945,_0x56b9fc,_0x3f4341,_0x1dae57,_0x5459c8),!0x0;}async['createServiceFiles'](_0x513848,_0x2193d7,_0x379d0f,_0x5d9203,_0x1ec969,_0x2a018f){const _0x2288c6=a0_0x5a722c;let _0x2244fd={'name':_0x5d9203,'tableName':_0x1ec969[_0x2288c6(0x17f)],'pascalCaseName':startCase(camelCase(_0x379d0f))[_0x2288c6(0x177)](/ /g,''),'camelCaseName':camelCase(_0x379d0f),'snakeCaseName':snakeCase(_0x379d0f),'pluralPascalCaseName':startCase(camelCase(plural(_0x379d0f)))[_0x2288c6(0x177)](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x379d0f))},_0x53fc5b=_0x513848+_0x2288c6(0x135)+_0x2193d7+_0x2288c6(0x134);['JSON',_0x2288c6(0x12c)]['includes'](_0x1ec969['dataProp'])?await this[_0x2288c6(0x19a)](_0x53fc5b,_0x5d9203,_0x1ec969,_0x2a018f,_0x2244fd):await this[_0x2288c6(0x1a0)](_0x53fc5b,_0x5d9203,_0x1ec969,_0x2a018f,_0x2244fd);}async['createHistoryServiceFiles'](_0xe53c5f,_0x1c1029,_0x275f77,_0x40dee5,_0x446f6e){const _0x364429=a0_0x5a722c;await this[_0x364429(0x182)](_0xe53c5f+(_0x1c1029+_0x364429(0x18c)),serviceHistoryIndex,_0x446f6e);let _0x15cde0=this['createEntityText'](_0x275f77,_0x40dee5);await this[_0x364429(0x182)](_0xe53c5f+(_0x1c1029+'/'+_0x1c1029+_0x364429(0x19c)),_0x15cde0,_0x446f6e),await this[_0x364429(0x182)](_0xe53c5f+(_0x1c1029+'/'+_0x1c1029+_0x364429(0x17a)),serviceQuery,_0x446f6e),await this[_0x364429(0x182)](_0xe53c5f+(_0x1c1029+'/'+_0x1c1029+_0x364429(0x13e)),serviceMutation,_0x446f6e);let _0x5529a5=this['createTypeText'](_0x40dee5);await this[_0x364429(0x182)](_0xe53c5f+(_0x1c1029+'/'+_0x1c1029+_0x364429(0x166)),_0x5529a5,_0x446f6e);let _0x18e82e=this[_0x364429(0x186)](_0x275f77,_0x40dee5);await this[_0x364429(0x182)](_0xe53c5f+(_0x1c1029+'/'+_0x1c1029+'-history.ts'),_0x18e82e,_0x446f6e);let _0x357f39='';_0x364429(0x123)==_0x275f77[_0x364429(0x171)]?(_0x357f39=_0x364429(0x165),await this['writeFile'](_0xe53c5f+(_0x1c1029+_0x364429(0x1aa)),serviceEntitySubscriber,_0x446f6e)):_0x357f39='';let _0x2f739c=serviceEntitySubscriber[_0x364429(0x177)](/{{entityToJson}}/g,_0x357f39);await this[_0x364429(0x182)](_0xe53c5f+(_0x1c1029+_0x364429(0x1aa)),_0x2f739c,_0x446f6e),await this[_0x364429(0x182)](_0xe53c5f+(_0x1c1029+'/'+_0x1c1029+_0x364429(0x151)),serviceHistoryQuery,_0x446f6e),await this[_0x364429(0x182)](_0xe53c5f+(_0x1c1029+'/'+_0x1c1029+'-history-type.ts'),sereviceHistoryType,_0x446f6e);let _0x1aec19=_0xe53c5f+_0x364429(0x17b);0x0==await this[_0x364429(0x169)](_0x1aec19)&&await this[_0x364429(0x182)](_0x1aec19,allIndex,_0x446f6e);let _0x51ce85=await fs[_0x364429(0x173)](_0x1aec19,_0x364429(0x194));_0x51ce85[_0x364429(0x189)](_0x364429(0x12b)+_0x446f6e['name']+'/'+_0x446f6e[_0x364429(0x145)]+_0x364429(0x13c))<0x0&&(_0x51ce85=_0x51ce85['replace'](/\/\* EXPORT ENTITY TYPES \*\//,_0x364429(0x1a2)+_0x446f6e[_0x364429(0x145)]+'/'+_0x446f6e[_0x364429(0x145)]+_0x364429(0x13c))),_0x51ce85['indexOf']('export\x20*\x20from\x20\x27./'+_0x446f6e[_0x364429(0x145)]+'/'+_0x446f6e['name']+'\x27')<0x0&&(_0x51ce85=_0x51ce85[_0x364429(0x177)](/\/\* EXPORT ENTITY TYPES \*\//,_0x364429(0x1a2)+_0x446f6e[_0x364429(0x145)]+'/'+_0x446f6e[_0x364429(0x145)]+'\x27')),_0x51ce85[_0x364429(0x189)](_0x364429(0x1a1)+_0x446f6e[_0x364429(0x119)]+'Entities,\x20resolvers\x20as\x20'+_0x446f6e[_0x364429(0x119)]+_0x364429(0x176)+_0x446f6e[_0x364429(0x119)]+_0x364429(0x184)+_0x446f6e[_0x364429(0x145)]+'\x27')<0x0&&(_0x51ce85=_0x51ce85['replace'](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,'/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20'+_0x446f6e[_0x364429(0x119)]+_0x364429(0x140)+_0x446f6e[_0x364429(0x119)]+_0x364429(0x176)+_0x446f6e[_0x364429(0x119)]+_0x364429(0x184)+_0x446f6e[_0x364429(0x145)]+'\x27')),_0x51ce85[_0x364429(0x189)](_0x364429(0x17c)+_0x446f6e[_0x364429(0x119)]+_0x364429(0x147))<0x0&&(_0x51ce85=_0x51ce85[_0x364429(0x177)](/\/\* ENTITIES \*\//,_0x364429(0x13f)+_0x446f6e[_0x364429(0x119)]+_0x364429(0x147))),_0x51ce85[_0x364429(0x189)](_0x364429(0x17c)+_0x446f6e[_0x364429(0x119)]+_0x364429(0x163))<0x0&&(_0x51ce85=_0x51ce85[_0x364429(0x177)](/\/\* RESOLVER CLASSES \*\//,'/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...'+_0x446f6e['pascalCaseName']+'Resolvers,')),_0x51ce85[_0x364429(0x189)](_0x364429(0x17c)+_0x446f6e[_0x364429(0x119)]+_0x364429(0x14e))<0x0&&(_0x51ce85=_0x51ce85[_0x364429(0x177)](/\/\* SUBSCRIBERS \*\//,_0x364429(0x14c)+_0x446f6e['pascalCaseName']+_0x364429(0x14e))),await this[_0x364429(0x182)](_0x1aec19,_0x51ce85,_0x446f6e);}async[a0_0x5a722c(0x1a0)](_0x458b3a,_0x17a5f8,_0x3bf7a6,_0x354247,_0x14b853){const _0xbed06c=a0_0x5a722c;await this[_0xbed06c(0x182)](_0x458b3a+(_0x17a5f8+_0xbed06c(0x18c)),serviceIndex,_0x14b853),await this[_0xbed06c(0x182)](_0x458b3a+(_0x17a5f8+'/'+_0x17a5f8+_0xbed06c(0x17a)),serviceQuery,_0x14b853),await this[_0xbed06c(0x182)](_0x458b3a+(_0x17a5f8+'/'+_0x17a5f8+_0xbed06c(0x13e)),serviceMutation,_0x14b853);let _0x3f0b56=this[_0xbed06c(0x1a8)](_0x3bf7a6,_0x354247);await this['writeFile'](_0x458b3a+(_0x17a5f8+'/'+_0x17a5f8+_0xbed06c(0x19c)),_0x3f0b56,_0x14b853);let _0x25b350=this[_0xbed06c(0x178)](_0x354247);await this[_0xbed06c(0x182)](_0x458b3a+(_0x17a5f8+'/'+_0x17a5f8+_0xbed06c(0x166)),_0x25b350,_0x14b853);let _0x1f08c4=_0x458b3a+'index.ts';0x0==await this[_0xbed06c(0x169)](_0x1f08c4)&&await this[_0xbed06c(0x182)](_0x1f08c4,allIndex,_0x14b853);let _0x2a66c7=await fs['readFileSync'](_0x1f08c4,'utf8');_0x2a66c7[_0xbed06c(0x189)]('export\x20*\x20from\x20\x27./'+_0x14b853['name']+'/'+_0x14b853[_0xbed06c(0x145)]+'\x27')<0x0&&(_0x2a66c7=_0x2a66c7[_0xbed06c(0x177)](/\/\* EXPORT ENTITY TYPES \*\//,_0xbed06c(0x1a2)+_0x14b853['name']+'/'+_0x14b853[_0xbed06c(0x145)]+'\x27')),_0x2a66c7['indexOf'](_0xbed06c(0x1a1)+_0x14b853[_0xbed06c(0x119)]+'Entities,\x20resolvers\x20as\x20'+_0x14b853[_0xbed06c(0x119)]+_0xbed06c(0x183)+_0x14b853[_0xbed06c(0x145)]+'\x27')<0x0&&(_0x2a66c7=_0x2a66c7[_0xbed06c(0x177)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,'/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20'+_0x14b853[_0xbed06c(0x119)]+_0xbed06c(0x140)+_0x14b853[_0xbed06c(0x119)]+_0xbed06c(0x183)+_0x14b853[_0xbed06c(0x145)]+'\x27')),_0x2a66c7['indexOf']('...'+_0x14b853[_0xbed06c(0x119)]+_0xbed06c(0x147))<0x0&&(_0x2a66c7=_0x2a66c7[_0xbed06c(0x177)](/\/\* ENTITIES \*\//,_0xbed06c(0x13f)+_0x14b853['pascalCaseName']+_0xbed06c(0x147))),_0x2a66c7[_0xbed06c(0x189)](_0xbed06c(0x17c)+_0x14b853[_0xbed06c(0x119)]+'Resolvers,')<0x0&&(_0x2a66c7=_0x2a66c7[_0xbed06c(0x177)](/\/\* RESOLVER CLASSES \*\//,_0xbed06c(0x175)+_0x14b853[_0xbed06c(0x119)]+_0xbed06c(0x163))),await this[_0xbed06c(0x182)](_0x1f08c4,_0x2a66c7,_0x14b853);}[a0_0x5a722c(0x178)](_0x19d34a){const _0x31f734=a0_0x5a722c;let _0x469daf=sereviceType,_0x188cb7=_0x19d34a[_0x31f734(0x146)](_0x72a996=>{const _0xdac875=_0x31f734;if('id'==_0x72a996[_0xdac875(0x145)])return'';if(_0xdac875(0x162)==_0x72a996[_0xdac875(0x145)])return'';if('created_at'==_0x72a996[_0xdac875(0x145)])return'';if('updated_at'==_0x72a996[_0xdac875(0x145)])return'';if(_0xdac875(0x195)==_0x72a996[_0xdac875(0x145)])return'';if(_0xdac875(0x12d)==_0x72a996['name'])return'';let _0x6ea0da=this[_0xdac875(0x144)](_0x72a996),_0x5d5dd5=this['getColTxtType'](_0x72a996),_0x3c6b5c=camelCase(_0x72a996[_0xdac875(0x145)]);return'\x20\x20'+(_0xdac875(0x16b)+(0x0==_0x6ea0da[_0xdac875(0x15a)]?'':_0xdac875(0x11c)+_0x6ea0da+',')+_0xdac875(0x138)+_0x72a996[_0xdac875(0x17e)]+_0xdac875(0x139))+'\x0a\x20\x20'+(''+_0x3c6b5c+(_0x72a996[_0xdac875(0x17e)]?'?':'')+':\x20'+_0x5d5dd5)+'\x0a';});_0x469daf=_0x469daf[_0x31f734(0x177)](/{{newTypeColumns}}/g,_0x188cb7[_0x31f734(0x193)]('\x0a'));let _0x5e1950=_0x19d34a[_0x31f734(0x146)](_0x129d02=>{const _0x294336=_0x31f734;if('id'==_0x129d02[_0x294336(0x145)])return'';if(_0x294336(0x162)==_0x129d02[_0x294336(0x145)])return'';if(_0x294336(0x172)==_0x129d02[_0x294336(0x145)])return'';if('updated_at'==_0x129d02[_0x294336(0x145)])return'';if(_0x294336(0x195)==_0x129d02['name'])return'';if(_0x294336(0x12d)==_0x129d02[_0x294336(0x145)])return'';let _0x3d574c=this[_0x294336(0x144)](_0x129d02),_0x2a5993=this[_0x294336(0x19d)](_0x129d02);_0x129d02[_0x294336(0x17e)]=!0x0;let _0x426632=camelCase(_0x129d02[_0x294336(0x145)]);return'\x20\x20'+(_0x294336(0x16b)+(0x0==_0x3d574c['length']?'':_0x294336(0x11c)+_0x3d574c+',')+_0x294336(0x138)+_0x129d02[_0x294336(0x17e)]+_0x294336(0x139))+'\x0a\x20\x20'+(''+_0x426632+(_0x129d02[_0x294336(0x17e)]?'?':'')+':\x20'+_0x2a5993)+'\x0a';});return _0x469daf=_0x469daf[_0x31f734(0x177)](/{{patchTypeColumns}}/g,_0x5e1950['join']('\x0a')),_0x469daf;}[a0_0x5a722c(0x1a8)](_0x3b0ff3,_0x4057ab){const _0x310d32=a0_0x5a722c;let _0x8efd43=serviceEntity,_0x3a588e=_0x4057ab[_0x310d32(0x192)](function(_0x7bf16d,_0x442019){const _0x11e5b5=_0x310d32;return _0x7bf16d['rank']-_0x442019[_0x11e5b5(0x19e)];})['map'](_0x43f93e=>this[_0x310d32(0x157)](_0x43f93e));['COPY',_0x310d32(0x123)]['includes'](_0x3b0ff3[_0x310d32(0x171)])&&_0x3a588e[_0x310d32(0x197)](_0x310d32(0x16d)),_0x8efd43=_0x8efd43[_0x310d32(0x177)](/{{entityColumns}}/g,_0x3a588e[_0x310d32(0x193)]('\x0a'));let _0x5ac543='',_0x3e7a12=_0x4057ab[_0x310d32(0x127)](_0x57889e=>_0x57889e[_0x310d32(0x1a7)]&&_0x57889e[_0x310d32(0x1a7)]>0x0)['sort'](function(_0x5e0968,_0xbd3718){const _0x4b5fd4=_0x310d32;return _0x5e0968[_0x4b5fd4(0x1a7)]-_0xbd3718[_0x4b5fd4(0x1a7)];});if(_0x3e7a12[_0x310d32(0x15a)]>0x0){_0x5ac543=_0x310d32(0x137);let _0x5af892=_0x3e7a12[_0x310d32(0x146)](_0x540ae5=>{const _0x21a52d=_0x310d32;let _0x30431b=_0x540ae5[_0x21a52d(0x145)];return _0x21a52d(0x162)==_0x540ae5['name']&&(_0x30431b=_0x21a52d(0x125)),'creator_id'==_0x540ae5[_0x21a52d(0x145)]&&(_0x30431b=_0x21a52d(0x18f)),'updater_id'==_0x540ae5['name']&&(_0x30431b=_0x21a52d(0x168)),_0x21a52d(0x1a5)+camelCase(_0x30431b);});_0x5ac543=_0x5ac543[_0x310d32(0x177)](/{{indexColumns}}/g,_0x5af892[_0x310d32(0x193)](','));}return _0x8efd43=_0x8efd43[_0x310d32(0x177)](/{{indexAnn}}/g,_0x5ac543),_0x8efd43;}[a0_0x5a722c(0x186)](_0xe31eab,_0x110a89){const _0x582a72=a0_0x5a722c;let _0x195b30=_0x582a72(0x123)==_0xe31eab[_0x582a72(0x171)]?serviceEntityHistJson:serviceEntityHistCopy,_0xf0ec55=_0x110a89[_0x582a72(0x192)](function(_0x3e2aed,_0x132cf9){const _0x2761ff=_0x582a72;return _0x3e2aed[_0x2761ff(0x19e)]-_0x132cf9[_0x2761ff(0x19e)];})[_0x582a72(0x146)](_0x21d439=>this[_0x582a72(0x157)](_0x21d439));return _0x195b30=_0x195b30[_0x582a72(0x177)](/{{entityColumns}}/g,_0xf0ec55[_0x582a72(0x193)]('\x0a')),_0x195b30;}['columnToEntityColumn'](_0x23c1c7){const _0x3896a0=a0_0x5a722c;if('id'==_0x23c1c7[_0x3896a0(0x145)])return'';if(_0x3896a0(0x162)==_0x23c1c7[_0x3896a0(0x145)])return'';if(_0x3896a0(0x172)==_0x23c1c7[_0x3896a0(0x145)])return'';if(_0x3896a0(0x191)==_0x23c1c7[_0x3896a0(0x145)])return'';if(_0x3896a0(0x195)==_0x23c1c7[_0x3896a0(0x145)])return'';if('updater_id'==_0x23c1c7[_0x3896a0(0x145)])return'';let _0x2ba9de=_0x23c1c7[_0x3896a0(0x132)];_0x3896a0(0x15d)==_0x23c1c7[_0x3896a0(0x132)]&&(_0x2ba9de='double\x20precision'),_0x3896a0(0x18e)==_0x23c1c7['colType']&&(_0x2ba9de=_0x3896a0(0x190)),_0x3896a0(0x16c)==_0x23c1c7[_0x3896a0(0x132)]&&(_0x2ba9de=_0x3896a0(0x153)),_0x3896a0(0x126)==_0x23c1c7['colType']&&(_0x2ba9de=_0x3896a0(0x136));let _0x375905='';'string'==_0x23c1c7[_0x3896a0(0x132)]&&(_0x375905=_0x23c1c7[_0x3896a0(0x12a)]);let _0x6aa3bd=this[_0x3896a0(0x144)](_0x23c1c7),_0x346610=this[_0x3896a0(0x19d)](_0x23c1c7),_0x44c103=camelCase(_0x23c1c7['name']);return'\x20\x20'+(_0x3896a0(0x11a)+_0x23c1c7[_0x3896a0(0x145)]+_0x3896a0(0x14b)+_0x2ba9de+'\x27,\x20nullable:\x20'+_0x23c1c7[_0x3896a0(0x17e)]+'\x20'+(0x0==_0x375905['length']?'':_0x3896a0(0x179)+_0x375905)+_0x3896a0(0x139))+_0x3896a0(0x15e)+(_0x3896a0(0x16b)+(0x0==_0x6aa3bd[_0x3896a0(0x15a)]?'':_0x3896a0(0x11c)+_0x6aa3bd+',')+'\x20{\x20nullable:\x20'+_0x23c1c7['nullable']+_0x3896a0(0x139))+_0x3896a0(0x15e)+(''+_0x44c103+(_0x23c1c7[_0x3896a0(0x17e)]?'?':'')+':\x20'+_0x346610)+'\x0a';}['getFieldType'](_0x29ccfa){const _0x4786c1=a0_0x5a722c;let _0x29cd40='';return _0x4786c1(0x15d)==_0x29ccfa['colType']&&(_0x29cd40='Float'),_0x4786c1(0x161)==_0x29ccfa[_0x4786c1(0x132)]&&(_0x29cd40=_0x4786c1(0x19b)),_0x4786c1(0x18e)==_0x29ccfa['colType']&&(_0x29cd40=_0x4786c1(0x158)),_0x4786c1(0x1a4)==_0x29ccfa[_0x4786c1(0x132)]&&(_0x29cd40=_0x4786c1(0x158)),_0x29cd40;}[a0_0x5a722c(0x19d)](_0x266734){const _0x19e350=a0_0x5a722c;let _0x4bb192=_0x266734[_0x19e350(0x132)];return'decimal'==_0x266734['colType']&&(_0x4bb192=_0x19e350(0x17d)),'double'==_0x266734[_0x19e350(0x132)]&&(_0x4bb192=_0x19e350(0x17d)),_0x19e350(0x161)==_0x266734[_0x19e350(0x132)]&&(_0x4bb192=_0x19e350(0x17d)),_0x19e350(0x1a4)==_0x266734['colType']&&(_0x4bb192=_0x19e350(0x17d)),_0x19e350(0x18e)==_0x266734[_0x19e350(0x132)]&&(_0x4bb192=_0x19e350(0x17d)),'datetime'==_0x266734[_0x19e350(0x132)]&&(_0x4bb192=_0x19e350(0x14f)),_0x19e350(0x129)==_0x266734[_0x19e350(0x132)]&&(_0x4bb192=_0x19e350(0x14f)),'text'==_0x266734[_0x19e350(0x132)]&&(_0x4bb192=_0x19e350(0x16c)),_0x4bb192;}async[a0_0x5a722c(0x182)](_0x402302,_0x31e7b0,_0x53c50a){const _0x5885ae=a0_0x5a722c;await fs[_0x5885ae(0x164)](_0x402302,this[_0x5885ae(0x16a)](_0x31e7b0,_0x53c50a),_0x5885ae(0x194));}[a0_0x5a722c(0x16a)](_0xf06bdd,_0xde3479){const _0x40d9b9=a0_0x5a722c;return _0xf06bdd[_0x40d9b9(0x177)](/{{pascalCase name}}/g,_0xde3479[_0x40d9b9(0x119)])[_0x40d9b9(0x177)](/{{camelCase name}}/g,_0xde3479[_0x40d9b9(0x11b)])[_0x40d9b9(0x177)](/{{snakeCase name}}/g,_0xde3479[_0x40d9b9(0x14a)])[_0x40d9b9(0x177)](/{{pluralPascalCase name}}/g,_0xde3479[_0x40d9b9(0x148)])[_0x40d9b9(0x177)](/{{pluralCamelCase name}}/g,_0xde3479[_0x40d9b9(0x124)])[_0x40d9b9(0x177)](/{{tableName}}/g,_0xde3479['tableName'])[_0x40d9b9(0x177)](/{{name}}/g,_0xde3479[_0x40d9b9(0x145)]);}async[a0_0x5a722c(0x18d)](_0x1a4302,_0x5c0d20,_0x352003){const _0x1510ff=a0_0x5a722c;let _0xe870fb=_0x1a4302+_0x1510ff(0x11d);await this['createDir'](_0xe870fb),_0xe870fb=_0xe870fb+'/'+_0x5c0d20,await this[_0x1510ff(0x15c)](_0xe870fb),_0xe870fb+=_0x1510ff(0x196),await this['createDir'](_0xe870fb),_0xe870fb+=_0x1510ff(0x141),await this[_0x1510ff(0x15c)](_0xe870fb),_0xe870fb=_0xe870fb+'/'+_0x352003,await this['createDir'](_0xe870fb);}[a0_0x5a722c(0x143)](){const _0x53ddc2=a0_0x5a722c;let _0x3d4801=process['env']['PWD'][_0x53ddc2(0x198)]('/'),_0x3f21ea=[];for(let _0x48f70f=0x0;_0x48f70f<_0x3d4801[_0x53ddc2(0x15a)]&&_0x53ddc2(0x19f)!=_0x3d4801[_0x48f70f];_0x48f70f++)_0x3f21ea['push'](_0x3d4801[_0x48f70f]);return _0x3f21ea[_0x53ddc2(0x193)]('/');}async[a0_0x5a722c(0x15c)](_0x1502c6){const _0x28962c=a0_0x5a722c;0x0==await this[_0x28962c(0x169)](_0x1502c6)&&fs[_0x28962c(0x14d)](_0x1502c6);}async[a0_0x5a722c(0x169)](_0x1cb90a){const _0x5a76a4=a0_0x5a722c;return await fs[_0x5a76a4(0x170)](_0x1cb90a);}};tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x5a722c(0x120)])(_0x73ebbd=>Boolean,{'description':a0_0x5a722c(0x155)}),tslib_1[a0_0x5a722c(0x156)](0x0,(0x0,type_graphql_1[a0_0x5a722c(0x188)])('id')),tslib_1['__param'](0x1,(0x0,type_graphql_1[a0_0x5a722c(0x154)])()),tslib_1[a0_0x5a722c(0x121)](a0_0x5a722c(0x16e),Function),tslib_1[a0_0x5a722c(0x121)]('design:paramtypes',[String,Object]),tslib_1['__metadata']('design:returntype',Promise)],OperatoToolCreateService[a0_0x5a722c(0x185)],'toolCreateService',null),OperatoToolCreateService=tslib_1[a0_0x5a722c(0x1a6)]([(0x0,type_graphql_1[a0_0x5a722c(0x131)])()],OperatoToolCreateService),exports['OperatoToolCreateService']=OperatoToolCreateService;const allIndex=a0_0x5a722c(0x1a3),serviceIndex='\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}}]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}Mutation]\x0a',serviceHistoryIndex='\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryQuery\x20}\x20from\x20\x27./{{name}}-history-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryEntitySubscriber\x20}\x20from\x20\x27./event-subscriber\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}},\x20{{pascalCase\x20name}}History]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}HistoryQuery,\x20{{pascalCase\x20name}}Mutation]\x0aexport\x20const\x20subscribers\x20=\x20[{{pascalCase\x20name}}HistoryEntitySubscriber]\x0a\x0a',serviceQuery='\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}List\x20}\x20from\x20\x27./{{name}}-type\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Query\x20{\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20fetch\x20a\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20return\x20await\x20getRepository({{pascalCase\x20name}}).findOne({\x0a\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20}\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}List,\x20{\x20description:\x20\x27To\x20fetch\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{pluralCamelCase\x20name}}(@Args()\x20params:\x20ListParam,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}List>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20queryBuilder\x20=\x20getQueryBuilderFromListParams({\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20params,\x0a\x20\x20\x20\x20\x20\x20repository:\x20await\x20getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20const\x20convertedParams\x20=\x20convertListParams(params,\x20domain.id)\x0a\x20\x20\x20\x20const\x20[items,\x20total]\x20=\x20await\x20queryBuilder.getManyAndCount()\x0a\x0a\x20\x20\x20\x20return\x20{\x20items,\x20total\x20}\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20Domain)\x0a\x20\x20async\x20domain(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<Domain>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(Domain).findOneBy({id:{{camelCase\x20name}}.domainId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20updater(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.updaterId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20creator(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.creatorId})\x0a\x20\x20}\x0a}\x0a',serviceHistoryQuery='\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',serviceMutation=a0_0x5a722c(0x15f),sereviceType=a0_0x5a722c(0x174),sereviceHistoryType='\x0aimport\x20{\x20ObjectType,\x20Field,\x20InputType,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0a\x0a@ObjectType()\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryList\x20{\x0a\x20\x20@Field(type\x20=>\x20[{{pascalCase\x20name}}History])\x0a\x20\x20items:\x20{{pascalCase\x20name}}History[]\x0a\x0a\x20\x20@Field(type\x20=>\x20Int)\x0a\x20\x20total:\x20number\x0a}\x0a',serviceEntity=a0_0x5a722c(0x1a9),serviceEntityHistCopy=a0_0x5a722c(0x18b),serviceEntityHistJson='\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a\x20\x20@Column(\x27simple-json\x27,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20@Field(type\x20=>\x20ScalarObject,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20historyJson?:\x20any\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a',serviceEntitySubscriber=a0_0x5a722c(0x160);
|
|
1
|
+
'use strict';const a0_0x26432e=a0_0x204a;(function(_0x5ee31f,_0x364f50){const _0x188680=a0_0x204a,_0x1c7947=_0x5ee31f();while(!![]){try{const _0x26233d=-parseInt(_0x188680(0x1a2))/0x1*(parseInt(_0x188680(0x17d))/0x2)+parseInt(_0x188680(0x17f))/0x3*(parseInt(_0x188680(0x1d1))/0x4)+-parseInt(_0x188680(0x1e2))/0x5+-parseInt(_0x188680(0x157))/0x6*(-parseInt(_0x188680(0x162))/0x7)+-parseInt(_0x188680(0x19e))/0x8+parseInt(_0x188680(0x154))/0x9*(parseInt(_0x188680(0x16d))/0xa)+-parseInt(_0x188680(0x169))/0xb;if(_0x26233d===_0x364f50)break;else _0x1c7947['push'](_0x1c7947['shift']());}catch(_0xd2e2b8){_0x1c7947['push'](_0x1c7947['shift']());}}}(a0_0x21a9,0xd3c56));function a0_0x204a(_0x290630,_0xfa4321){const _0x21a9c1=a0_0x21a9();return a0_0x204a=function(_0x204a4f,_0x395d51){_0x204a4f=_0x204a4f-0x14e;let _0x3b3cfb=_0x21a9c1[_0x204a4f];return _0x3b3cfb;},a0_0x204a(_0x290630,_0xfa4321);}Object[a0_0x26432e(0x1cd)](exports,a0_0x26432e(0x167),{'value':!0x0}),exports[a0_0x26432e(0x1c4)]=void 0x0;const tslib_1=require(a0_0x26432e(0x1cc)),type_graphql_1=require(a0_0x26432e(0x16f)),shell_1=require(a0_0x26432e(0x1ba)),resource_base_1=require(a0_0x26432e(0x182)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x26432e(0x15b)),{plural:plural}=require(a0_0x26432e(0x1a6)),fs=require('fs');function a0_0x21a9(){const _0x28f153=['creator','uniqRank','\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','__esModule','pascalCaseName','1512148OYJGRL','existsPath','Date','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','104230eklefv','design:paramtypes','type-graphql','writeFile','Resolvers,\x20subscribers\x20as\x20','decimal','creator_id','Ctx','filter','findOne','prototype','long','\x20})','createDir','-mutation.ts','__param','82DOBAVg','\x20{\x20nullable:\x20','38442vFiknw','type\x20=>','createServicePath','@things-factory/resource-base','updater_id','\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','getProjectRootPath','domain_id','nullable','EntitySubscribers\x20}\x20from\x20\x27./','\x0a\x20\x20','EntitySubscribers,','Resolver','createTypeText','Arg','Resolvers\x20}\x20from\x20\x27./','name','__decorate','writeFileSync','includes','JSON','double','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\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','length','colType','/packages','createEntityText','createHistoryServiceFiles','-history\x27','Float','8636152BFWEol','Operato\x20Tool\x20Create\x20Service','getRepository','camelCaseName','24379OyJBRT','\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','tableName','dataProp','pluralize','__metadata','index.ts','push','rank','domain','toolCreateService','getColTxtType','replaceNamesMap','createServiceFiles','\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','\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','export\x20*\x20from\x20\x27./','createHistoryEntityText','sort','Entity','/event-subscriber.ts','.ts','state','-history-query.ts','@things-factory/shell','/server','Entities,\x20resolvers\x20as\x20','Entities,','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','...','created_at','COPY','Query','getFieldType','OperatoToolCreateService','/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...','-history.ts','/index.ts','\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','createNoHistoryServiceFiels','string','mkdirSync','tslib','defineProperty','find','Int','integer','524BuLUzF','timestamp\x20without\x20time\x20zone','character\x20varying','design:type','PWD','-type.ts','existsSync','\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','join','\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','bigint','import\x20{\x20entities\x20as\x20','readFileSync','number','@Field(','packages','\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','1292570JPsVBm','Resolvers,','columnToEntityColumn','utf8','\x0aimport\x20{\x20Resolver,\x20Mutation,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20In\x20}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20New{{pascalCase\x20name}},\x20{{pascalCase\x20name}}Patch\x20}\x20from\x20\x27./{{name}}-type\x27\x0aimport\x20{\x20getRepository\x20}\x20from\x20\x27@things-factory/shell\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Mutation\x20{\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20create\x20new\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20create{{pascalCase\x20name}}(@Arg(\x27{{camelCase\x20name}}\x27)\x20{{camelCase\x20name}}:\x20New{{pascalCase\x20name}},\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20return\x20await\x20tx.getRepository({{pascalCase\x20name}}).save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20modify\x20{{pascalCase\x20name}}\x20information\x27\x20})\x0a\x20\x20async\x20update{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27id\x27)\x20id:\x20string,\x0a\x20\x20\x20\x20@Arg(\x27patch\x27)\x20patch:\x20{{pascalCase\x20name}}Patch,\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20repository\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20repository.findOne(\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20)\x0a\x0a\x20\x20\x20\x20return\x20await\x20repository.save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20...patch,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20[{{pascalCase\x20name}}],\x20{\x20description:\x20\x22To\x20modify\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20information\x22\x20})\x0a\x20\x20async\x20updateMultiple{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27patches\x27,\x20type\x20=>\x20[{{pascalCase\x20name}}Patch])\x20patches:\x20{{pascalCase\x20name}}Patch[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}[]>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20results\x20=\x20[]\x0a\x20\x20\x20\x20const\x20_createRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27+\x27)\x0a\x20\x20\x20\x20const\x20_updateRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27M\x27)\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}Repo\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x0a\x20\x20\x20\x20if\x20(_createRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_createRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20newRecord\x20=\x20_createRecords[i]\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...newRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27+\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20if\x20(_updateRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_updateRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20updRecord\x20=\x20_updateRecords[i]\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20{{camelCase\x20name}}Repo.findOne({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id:updRecord.id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...updRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27M\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20return\x20results\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20delete{{pascalCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove({\x20domain,\x20id,\x20updater:user\x20})\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20multiple\x20{{camelCase\x20name}}s\x27\x20})\x0a\x20\x20async\x20delete{{pluralPascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27ids\x27,\x20type\x20=>\x20[String])\x20ids:\x20string[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20delEntitis\x20=\x20ids.map(id=>{\x0a\x20\x20\x20\x20\x20\x20return\x20{domain,id,updater:user}\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove(delEntitis)\x0a\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a}\x0a','/server/service/','env','replace','datetime','1161tMFdaZ','updated_at','float','66hOxCKi','colSize','indexOf','{{camelCase\x20name}}.','lodash','-history-type.ts','EntityColumn','-query.ts','design:returntype','double\x20precision','\x27,\x20type:\x20\x27','203161MoAlsk','map'];a0_0x21a9=function(){return _0x28f153;};return a0_0x21a9();}let OperatoToolCreateService=class{async[a0_0x26432e(0x1ac)](_0xcdd6b5,_0x8e0280){const _0x303e8d=a0_0x26432e,{domain:_0x3026e6}=_0x8e0280[_0x303e8d(0x1b8)],_0x544f60=await(0x0,shell_1[_0x303e8d(0x1a0)])(resource_base_1[_0x303e8d(0x1b5)])[_0x303e8d(0x176)]({'where':{'id':_0xcdd6b5}}),_0x47d7b8=await(0x0,shell_1[_0x303e8d(0x1a0)])(resource_base_1[_0x303e8d(0x15d)])[_0x303e8d(0x1ce)]({'where':{'domain':{'id':_0x3026e6['id']},'entity':{'id':_0x544f60['id']}}});let {name:_0x47fd62='',bundle:_0x2b5a66=''}=_0x544f60||{},_0x7c6340=this[_0x303e8d(0x185)](),_0x219088=kebabCase(_0x47fd62);return await this['createServicePath'](_0x7c6340,_0x2b5a66,_0x219088),await this[_0x303e8d(0x1af)](_0x7c6340,_0x2b5a66,_0x47fd62,_0x219088,_0x544f60,_0x47d7b8),!0x0;}async[a0_0x26432e(0x1af)](_0x4455bb,_0x4d67fe,_0x4d01cf,_0xa18a40,_0x4b05be,_0x520bbd){const _0x1e22bf=a0_0x26432e;let _0xb4bce7={'name':_0xa18a40,'tableName':_0x4b05be[_0x1e22bf(0x1a4)],'pascalCaseName':startCase(camelCase(_0x4d01cf))['replace'](/ /g,''),'camelCaseName':camelCase(_0x4d01cf),'snakeCaseName':snakeCase(_0x4d01cf),'pluralPascalCaseName':startCase(camelCase(plural(_0x4d01cf)))[_0x1e22bf(0x152)](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x4d01cf))},_0x5527a1=_0x4455bb+'/packages/'+_0x4d67fe+_0x1e22bf(0x150);[_0x1e22bf(0x193),_0x1e22bf(0x1c1)][_0x1e22bf(0x192)](_0x4b05be[_0x1e22bf(0x1a5)])?await this[_0x1e22bf(0x19b)](_0x5527a1,_0xa18a40,_0x4b05be,_0x520bbd,_0xb4bce7):await this[_0x1e22bf(0x1c9)](_0x5527a1,_0xa18a40,_0x4b05be,_0x520bbd,_0xb4bce7);}async[a0_0x26432e(0x19b)](_0x37c0aa,_0x54fe49,_0x2ea87f,_0xf5ade4,_0x2a2876){const _0x5b2ce9=a0_0x26432e;await this[_0x5b2ce9(0x170)](_0x37c0aa+(_0x54fe49+_0x5b2ce9(0x1c7)),serviceHistoryIndex,_0x2a2876);let _0x1ece3e=this['createEntityText'](_0x2ea87f,_0xf5ade4);await this[_0x5b2ce9(0x170)](_0x37c0aa+(_0x54fe49+'/'+_0x54fe49+_0x5b2ce9(0x1b7)),_0x1ece3e,_0x2a2876),await this[_0x5b2ce9(0x170)](_0x37c0aa+(_0x54fe49+'/'+_0x54fe49+_0x5b2ce9(0x15e)),serviceQuery,_0x2a2876),await this[_0x5b2ce9(0x170)](_0x37c0aa+(_0x54fe49+'/'+_0x54fe49+'-mutation.ts'),serviceMutation,_0x2a2876);let _0x3c0e64=this['createTypeText'](_0xf5ade4);await this['writeFile'](_0x37c0aa+(_0x54fe49+'/'+_0x54fe49+_0x5b2ce9(0x1d6)),_0x3c0e64,_0x2a2876);let _0x417383=this[_0x5b2ce9(0x1b3)](_0x2ea87f,_0xf5ade4);await this[_0x5b2ce9(0x170)](_0x37c0aa+(_0x54fe49+'/'+_0x54fe49+_0x5b2ce9(0x1c6)),_0x417383,_0x2a2876);let _0x457282='';_0x5b2ce9(0x193)==_0x2ea87f[_0x5b2ce9(0x1a5)]?(_0x457282=_0x5b2ce9(0x166),await this[_0x5b2ce9(0x170)](_0x37c0aa+(_0x54fe49+_0x5b2ce9(0x1b6)),serviceEntitySubscriber,_0x2a2876)):_0x457282='';let _0x42b437=serviceEntitySubscriber[_0x5b2ce9(0x152)](/{{entityToJson}}/g,_0x457282);await this['writeFile'](_0x37c0aa+(_0x54fe49+_0x5b2ce9(0x1b6)),_0x42b437,_0x2a2876),await this[_0x5b2ce9(0x170)](_0x37c0aa+(_0x54fe49+'/'+_0x54fe49+_0x5b2ce9(0x1b9)),serviceHistoryQuery,_0x2a2876),await this[_0x5b2ce9(0x170)](_0x37c0aa+(_0x54fe49+'/'+_0x54fe49+_0x5b2ce9(0x15c)),sereviceHistoryType,_0x2a2876);let _0x28d00c=_0x37c0aa+_0x5b2ce9(0x1a8);0x0==await this[_0x5b2ce9(0x16a)](_0x28d00c)&&await this['writeFile'](_0x28d00c,allIndex,_0x2a2876);let _0x3e13d1=await fs['readFileSync'](_0x28d00c,_0x5b2ce9(0x14e));_0x3e13d1[_0x5b2ce9(0x159)]('export\x20*\x20from\x20\x27./'+_0x2a2876[_0x5b2ce9(0x18f)]+'/'+_0x2a2876[_0x5b2ce9(0x18f)]+'-history\x27')<0x0&&(_0x3e13d1=_0x3e13d1[_0x5b2ce9(0x152)](/\/\* EXPORT ENTITY TYPES \*\//,_0x5b2ce9(0x1be)+_0x2a2876[_0x5b2ce9(0x18f)]+'/'+_0x2a2876[_0x5b2ce9(0x18f)]+_0x5b2ce9(0x19c))),_0x3e13d1[_0x5b2ce9(0x159)](_0x5b2ce9(0x1b2)+_0x2a2876[_0x5b2ce9(0x18f)]+'/'+_0x2a2876['name']+'\x27')<0x0&&(_0x3e13d1=_0x3e13d1[_0x5b2ce9(0x152)](/\/\* EXPORT ENTITY TYPES \*\//,_0x5b2ce9(0x1be)+_0x2a2876[_0x5b2ce9(0x18f)]+'/'+_0x2a2876[_0x5b2ce9(0x18f)]+'\x27')),_0x3e13d1[_0x5b2ce9(0x159)](_0x5b2ce9(0x1dc)+_0x2a2876[_0x5b2ce9(0x168)]+'Entities,\x20resolvers\x20as\x20'+_0x2a2876[_0x5b2ce9(0x168)]+_0x5b2ce9(0x171)+_0x2a2876[_0x5b2ce9(0x168)]+_0x5b2ce9(0x188)+_0x2a2876['name']+'\x27')<0x0&&(_0x3e13d1=_0x3e13d1['replace'](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x5b2ce9(0x195)+_0x2a2876[_0x5b2ce9(0x168)]+_0x5b2ce9(0x1bc)+_0x2a2876[_0x5b2ce9(0x168)]+_0x5b2ce9(0x171)+_0x2a2876['pascalCaseName']+_0x5b2ce9(0x188)+_0x2a2876[_0x5b2ce9(0x18f)]+'\x27')),_0x3e13d1[_0x5b2ce9(0x159)](_0x5b2ce9(0x1bf)+_0x2a2876[_0x5b2ce9(0x168)]+_0x5b2ce9(0x1bd))<0x0&&(_0x3e13d1=_0x3e13d1[_0x5b2ce9(0x152)](/\/\* ENTITIES \*\//,'/*\x20ENTITIES\x20*/\x0a\x09...'+_0x2a2876[_0x5b2ce9(0x168)]+_0x5b2ce9(0x1bd))),_0x3e13d1['indexOf']('...'+_0x2a2876[_0x5b2ce9(0x168)]+_0x5b2ce9(0x1e3))<0x0&&(_0x3e13d1=_0x3e13d1[_0x5b2ce9(0x152)](/\/\* RESOLVER CLASSES \*\//,_0x5b2ce9(0x16c)+_0x2a2876[_0x5b2ce9(0x168)]+'Resolvers,')),_0x3e13d1[_0x5b2ce9(0x159)](_0x5b2ce9(0x1bf)+_0x2a2876[_0x5b2ce9(0x168)]+_0x5b2ce9(0x18a))<0x0&&(_0x3e13d1=_0x3e13d1[_0x5b2ce9(0x152)](/\/\* SUBSCRIBERS \*\//,_0x5b2ce9(0x1c5)+_0x2a2876['pascalCaseName']+'EntitySubscribers,')),await this[_0x5b2ce9(0x170)](_0x28d00c,_0x3e13d1,_0x2a2876);}async[a0_0x26432e(0x1c9)](_0x3ea037,_0x3fbd28,_0x26786c,_0x356346,_0x57b677){const _0x15d480=a0_0x26432e;await this['writeFile'](_0x3ea037+(_0x3fbd28+_0x15d480(0x1c7)),serviceIndex,_0x57b677),await this['writeFile'](_0x3ea037+(_0x3fbd28+'/'+_0x3fbd28+_0x15d480(0x15e)),serviceQuery,_0x57b677),await this['writeFile'](_0x3ea037+(_0x3fbd28+'/'+_0x3fbd28+_0x15d480(0x17b)),serviceMutation,_0x57b677);let _0x4c3a63=this[_0x15d480(0x19a)](_0x26786c,_0x356346);await this[_0x15d480(0x170)](_0x3ea037+(_0x3fbd28+'/'+_0x3fbd28+_0x15d480(0x1b7)),_0x4c3a63,_0x57b677);let _0xa96f3a=this['createTypeText'](_0x356346);await this[_0x15d480(0x170)](_0x3ea037+(_0x3fbd28+'/'+_0x3fbd28+_0x15d480(0x1d6)),_0xa96f3a,_0x57b677);let _0x52b7c3=_0x3ea037+_0x15d480(0x1a8);0x0==await this['existsPath'](_0x52b7c3)&&await this[_0x15d480(0x170)](_0x52b7c3,allIndex,_0x57b677);let _0x5a1ca2=await fs[_0x15d480(0x1dd)](_0x52b7c3,'utf8');_0x5a1ca2['indexOf'](_0x15d480(0x1b2)+_0x57b677['name']+'/'+_0x57b677[_0x15d480(0x18f)]+'\x27')<0x0&&(_0x5a1ca2=_0x5a1ca2[_0x15d480(0x152)](/\/\* EXPORT ENTITY TYPES \*\//,_0x15d480(0x1be)+_0x57b677[_0x15d480(0x18f)]+'/'+_0x57b677[_0x15d480(0x18f)]+'\x27')),_0x5a1ca2[_0x15d480(0x159)](_0x15d480(0x1dc)+_0x57b677['pascalCaseName']+_0x15d480(0x1bc)+_0x57b677[_0x15d480(0x168)]+_0x15d480(0x18e)+_0x57b677[_0x15d480(0x18f)]+'\x27')<0x0&&(_0x5a1ca2=_0x5a1ca2[_0x15d480(0x152)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x15d480(0x195)+_0x57b677['pascalCaseName']+_0x15d480(0x1bc)+_0x57b677[_0x15d480(0x168)]+'Resolvers\x20}\x20from\x20\x27./'+_0x57b677[_0x15d480(0x18f)]+'\x27')),_0x5a1ca2['indexOf']('...'+_0x57b677[_0x15d480(0x168)]+_0x15d480(0x1bd))<0x0&&(_0x5a1ca2=_0x5a1ca2[_0x15d480(0x152)](/\/\* ENTITIES \*\//,'/*\x20ENTITIES\x20*/\x0a\x09...'+_0x57b677[_0x15d480(0x168)]+'Entities,')),_0x5a1ca2[_0x15d480(0x159)]('...'+_0x57b677['pascalCaseName']+'Resolvers,')<0x0&&(_0x5a1ca2=_0x5a1ca2[_0x15d480(0x152)](/\/\* RESOLVER CLASSES \*\//,_0x15d480(0x16c)+_0x57b677[_0x15d480(0x168)]+'Resolvers,')),await this['writeFile'](_0x52b7c3,_0x5a1ca2,_0x57b677);}[a0_0x26432e(0x18c)](_0x48cf29){const _0x51fb3f=a0_0x26432e;let _0x55d48f=sereviceType,_0x562ddc=_0x48cf29['map'](_0x5909ca=>{const _0x33ab21=a0_0x204a;if('id'==_0x5909ca[_0x33ab21(0x18f)])return'';if(_0x33ab21(0x186)==_0x5909ca[_0x33ab21(0x18f)])return'';if(_0x33ab21(0x1c0)==_0x5909ca[_0x33ab21(0x18f)])return'';if('updated_at'==_0x5909ca[_0x33ab21(0x18f)])return'';if(_0x33ab21(0x173)==_0x5909ca['name'])return'';if(_0x33ab21(0x183)==_0x5909ca[_0x33ab21(0x18f)])return'';let _0x2e9eb6=this['getFieldType'](_0x5909ca),_0x2e29c2=this[_0x33ab21(0x1ad)](_0x5909ca),_0x393de9=camelCase(_0x5909ca[_0x33ab21(0x18f)]);return'\x20\x20'+(_0x33ab21(0x1df)+(0x0==_0x2e9eb6['length']?'':_0x33ab21(0x180)+_0x2e9eb6+',')+_0x33ab21(0x17e)+_0x5909ca[_0x33ab21(0x187)]+_0x33ab21(0x179))+_0x33ab21(0x189)+(''+_0x393de9+(_0x5909ca[_0x33ab21(0x187)]?'?':'')+':\x20'+_0x2e29c2)+'\x0a';});_0x55d48f=_0x55d48f['replace'](/{{newTypeColumns}}/g,_0x562ddc[_0x51fb3f(0x1d9)]('\x0a'));let _0x304cbf=_0x48cf29['map'](_0x49f0fe=>{const _0x882e15=_0x51fb3f;if('id'==_0x49f0fe[_0x882e15(0x18f)])return'';if(_0x882e15(0x186)==_0x49f0fe[_0x882e15(0x18f)])return'';if(_0x882e15(0x1c0)==_0x49f0fe[_0x882e15(0x18f)])return'';if(_0x882e15(0x155)==_0x49f0fe[_0x882e15(0x18f)])return'';if(_0x882e15(0x173)==_0x49f0fe[_0x882e15(0x18f)])return'';if(_0x882e15(0x183)==_0x49f0fe[_0x882e15(0x18f)])return'';let _0x4ae6e4=this[_0x882e15(0x1c3)](_0x49f0fe),_0x2429e0=this['getColTxtType'](_0x49f0fe);_0x49f0fe[_0x882e15(0x187)]=!0x0;let _0x4182c8=camelCase(_0x49f0fe['name']);return'\x20\x20'+(_0x882e15(0x1df)+(0x0==_0x4ae6e4['length']?'':'type\x20=>'+_0x4ae6e4+',')+_0x882e15(0x17e)+_0x49f0fe['nullable']+_0x882e15(0x179))+'\x0a\x20\x20'+(''+_0x4182c8+(_0x49f0fe['nullable']?'?':'')+':\x20'+_0x2429e0)+'\x0a';});return _0x55d48f=_0x55d48f[_0x51fb3f(0x152)](/{{patchTypeColumns}}/g,_0x304cbf[_0x51fb3f(0x1d9)]('\x0a')),_0x55d48f;}[a0_0x26432e(0x19a)](_0x5f05e0,_0x151d94){const _0x3bf81b=a0_0x26432e;let _0x98e40c=serviceEntity,_0x3c7e27=_0x151d94[_0x3bf81b(0x1b4)](function(_0x497abd,_0x20acc3){const _0x579586=_0x3bf81b;return _0x497abd['rank']-_0x20acc3[_0x579586(0x1aa)];})[_0x3bf81b(0x163)](_0x2aca81=>this['columnToEntityColumn'](_0x2aca81));[_0x3bf81b(0x1c1),'JSON'][_0x3bf81b(0x192)](_0x5f05e0[_0x3bf81b(0x1a5)])&&_0x3c7e27[_0x3bf81b(0x1a9)]('\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201'),_0x98e40c=_0x98e40c['replace'](/{{entityColumns}}/g,_0x3c7e27['join']('\x0a'));let _0x23e22e='',_0x5a9eeb=_0x151d94[_0x3bf81b(0x175)](_0x3eb3d0=>_0x3eb3d0[_0x3bf81b(0x165)]&&_0x3eb3d0[_0x3bf81b(0x165)]>0x0)[_0x3bf81b(0x1b4)](function(_0x4d7f1e,_0x387f8d){const _0x511b78=_0x3bf81b;return _0x4d7f1e['uniqRank']-_0x387f8d[_0x511b78(0x165)];});if(_0x5a9eeb['length']>0x0){_0x23e22e='@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})';let _0x2ec2fd=_0x5a9eeb[_0x3bf81b(0x163)](_0x23cc8e=>{const _0x80f47c=_0x3bf81b;let _0x5f6fc4=_0x23cc8e[_0x80f47c(0x18f)];return _0x80f47c(0x186)==_0x23cc8e[_0x80f47c(0x18f)]&&(_0x5f6fc4=_0x80f47c(0x1ab)),_0x80f47c(0x173)==_0x23cc8e[_0x80f47c(0x18f)]&&(_0x5f6fc4=_0x80f47c(0x164)),'updater_id'==_0x23cc8e[_0x80f47c(0x18f)]&&(_0x5f6fc4='updater'),_0x80f47c(0x15a)+camelCase(_0x5f6fc4);});_0x23e22e=_0x23e22e[_0x3bf81b(0x152)](/{{indexColumns}}/g,_0x2ec2fd[_0x3bf81b(0x1d9)](','));}return _0x98e40c=_0x98e40c['replace'](/{{indexAnn}}/g,_0x23e22e),_0x98e40c;}[a0_0x26432e(0x1b3)](_0x30240b,_0x216589){const _0x5dcde2=a0_0x26432e;let _0x163739='JSON'==_0x30240b[_0x5dcde2(0x1a5)]?serviceEntityHistJson:serviceEntityHistCopy,_0x5783eb=_0x216589[_0x5dcde2(0x1b4)](function(_0x5c0661,_0x2f9dc2){const _0x135cc8=_0x5dcde2;return _0x5c0661[_0x135cc8(0x1aa)]-_0x2f9dc2['rank'];})['map'](_0x4c9e52=>this[_0x5dcde2(0x1e4)](_0x4c9e52));return _0x163739=_0x163739[_0x5dcde2(0x152)](/{{entityColumns}}/g,_0x5783eb['join']('\x0a')),_0x163739;}[a0_0x26432e(0x1e4)](_0x415377){const _0x29de95=a0_0x26432e;if('id'==_0x415377[_0x29de95(0x18f)])return'';if(_0x29de95(0x186)==_0x415377[_0x29de95(0x18f)])return'';if(_0x29de95(0x1c0)==_0x415377[_0x29de95(0x18f)])return'';if('updated_at'==_0x415377[_0x29de95(0x18f)])return'';if(_0x29de95(0x173)==_0x415377[_0x29de95(0x18f)])return'';if(_0x29de95(0x183)==_0x415377[_0x29de95(0x18f)])return'';let _0x261569=_0x415377['colType'];_0x29de95(0x194)==_0x415377[_0x29de95(0x198)]&&(_0x261569=_0x29de95(0x160)),'long'==_0x415377['colType']&&(_0x261569=_0x29de95(0x1db)),_0x29de95(0x1ca)==_0x415377[_0x29de95(0x198)]&&(_0x261569=_0x29de95(0x1d3)),_0x29de95(0x153)==_0x415377['colType']&&(_0x261569=_0x29de95(0x1d2));let _0x48413d='';'string'==_0x415377['colType']&&(_0x48413d=_0x415377[_0x29de95(0x158)]);let _0xb08cec=this[_0x29de95(0x1c3)](_0x415377),_0x2b4680=this['getColTxtType'](_0x415377),_0x211838=camelCase(_0x415377[_0x29de95(0x18f)]);return'\x20\x20'+('@Column({name:\x27'+_0x415377[_0x29de95(0x18f)]+_0x29de95(0x161)+_0x261569+'\x27,\x20nullable:\x20'+_0x415377[_0x29de95(0x187)]+'\x20'+(0x0==_0x48413d[_0x29de95(0x197)]?'':',length:'+_0x48413d)+'\x20})')+'\x0a\x20\x20'+(_0x29de95(0x1df)+(0x0==_0xb08cec['length']?'':_0x29de95(0x180)+_0xb08cec+',')+_0x29de95(0x17e)+_0x415377[_0x29de95(0x187)]+_0x29de95(0x179))+_0x29de95(0x189)+(''+_0x211838+(_0x415377[_0x29de95(0x187)]?'?':'')+':\x20'+_0x2b4680)+'\x0a';}[a0_0x26432e(0x1c3)](_0x57fae7){const _0x1b36f0=a0_0x26432e;let _0x16a1ec='';return'double'==_0x57fae7[_0x1b36f0(0x198)]&&(_0x16a1ec=_0x1b36f0(0x19d)),_0x1b36f0(0x156)==_0x57fae7[_0x1b36f0(0x198)]&&(_0x16a1ec=_0x1b36f0(0x19d)),_0x1b36f0(0x178)==_0x57fae7['colType']&&(_0x16a1ec=_0x1b36f0(0x1cf)),'integer'==_0x57fae7[_0x1b36f0(0x198)]&&(_0x16a1ec='Int'),_0x16a1ec;}[a0_0x26432e(0x1ad)](_0x3348c3){const _0x439176=a0_0x26432e;let _0x5191e2=_0x3348c3[_0x439176(0x198)];return _0x439176(0x172)==_0x3348c3[_0x439176(0x198)]&&(_0x5191e2=_0x439176(0x1de)),_0x439176(0x194)==_0x3348c3['colType']&&(_0x5191e2=_0x439176(0x1de)),'float'==_0x3348c3[_0x439176(0x198)]&&(_0x5191e2=_0x439176(0x1de)),_0x439176(0x1d0)==_0x3348c3['colType']&&(_0x5191e2='number'),_0x439176(0x178)==_0x3348c3['colType']&&(_0x5191e2=_0x439176(0x1de)),_0x439176(0x153)==_0x3348c3['colType']&&(_0x5191e2=_0x439176(0x16b)),'date'==_0x3348c3['colType']&&(_0x5191e2=_0x439176(0x16b)),'text'==_0x3348c3['colType']&&(_0x5191e2=_0x439176(0x1ca)),_0x5191e2;}async[a0_0x26432e(0x170)](_0x2ddf73,_0x289802,_0x35e0eb){const _0x88f289=a0_0x26432e;await fs[_0x88f289(0x191)](_0x2ddf73,this[_0x88f289(0x1ae)](_0x289802,_0x35e0eb),_0x88f289(0x14e));}[a0_0x26432e(0x1ae)](_0x2a0d0c,_0x29b777){const _0x2471e6=a0_0x26432e;return _0x2a0d0c[_0x2471e6(0x152)](/{{pascalCase name}}/g,_0x29b777[_0x2471e6(0x168)])[_0x2471e6(0x152)](/{{camelCase name}}/g,_0x29b777[_0x2471e6(0x1a1)])[_0x2471e6(0x152)](/{{snakeCase name}}/g,_0x29b777['snakeCaseName'])[_0x2471e6(0x152)](/{{pluralPascalCase name}}/g,_0x29b777['pluralPascalCaseName'])[_0x2471e6(0x152)](/{{pluralCamelCase name}}/g,_0x29b777['pluralCamelCaseName'])[_0x2471e6(0x152)](/{{tableName}}/g,_0x29b777[_0x2471e6(0x1a4)])[_0x2471e6(0x152)](/{{name}}/g,_0x29b777[_0x2471e6(0x18f)]);}async[a0_0x26432e(0x181)](_0x2a205d,_0x28dcfa,_0x94a86c){const _0x11a67e=a0_0x26432e;let _0x14b90e=_0x2a205d+_0x11a67e(0x199);await this[_0x11a67e(0x17a)](_0x14b90e),_0x14b90e=_0x14b90e+'/'+_0x28dcfa,await this[_0x11a67e(0x17a)](_0x14b90e),_0x14b90e+=_0x11a67e(0x1bb),await this[_0x11a67e(0x17a)](_0x14b90e),_0x14b90e+='/service',await this['createDir'](_0x14b90e),_0x14b90e=_0x14b90e+'/'+_0x94a86c,await this[_0x11a67e(0x17a)](_0x14b90e);}['getProjectRootPath'](){const _0x19bd7d=a0_0x26432e;let _0x5cd4fb=process[_0x19bd7d(0x151)][_0x19bd7d(0x1d5)]['split']('/'),_0x26e16e=[];for(let _0x40e571=0x0;_0x40e571<_0x5cd4fb['length']&&_0x19bd7d(0x1e0)!=_0x5cd4fb[_0x40e571];_0x40e571++)_0x26e16e[_0x19bd7d(0x1a9)](_0x5cd4fb[_0x40e571]);return _0x26e16e['join']('/');}async[a0_0x26432e(0x17a)](_0x1f8344){const _0x203333=a0_0x26432e;0x0==await this[_0x203333(0x16a)](_0x1f8344)&&fs[_0x203333(0x1cb)](_0x1f8344);}async[a0_0x26432e(0x16a)](_0x489f16){const _0x5b8bba=a0_0x26432e;return await fs[_0x5b8bba(0x1d7)](_0x489f16);}};tslib_1[a0_0x26432e(0x190)]([(0x0,type_graphql_1[a0_0x26432e(0x1c2)])(_0x3af5a0=>Boolean,{'description':a0_0x26432e(0x19f)}),tslib_1['__param'](0x0,(0x0,type_graphql_1[a0_0x26432e(0x18d)])('id')),tslib_1[a0_0x26432e(0x17c)](0x1,(0x0,type_graphql_1[a0_0x26432e(0x174)])()),tslib_1['__metadata'](a0_0x26432e(0x1d4),Function),tslib_1[a0_0x26432e(0x1a7)](a0_0x26432e(0x16e),[String,Object]),tslib_1[a0_0x26432e(0x1a7)](a0_0x26432e(0x15f),Promise)],OperatoToolCreateService[a0_0x26432e(0x177)],a0_0x26432e(0x1ac),null),OperatoToolCreateService=tslib_1[a0_0x26432e(0x190)]([(0x0,type_graphql_1[a0_0x26432e(0x18b)])()],OperatoToolCreateService),exports[a0_0x26432e(0x1c4)]=OperatoToolCreateService;const allIndex=a0_0x26432e(0x1e1),serviceIndex=a0_0x26432e(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='\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}List\x20}\x20from\x20\x27./{{name}}-type\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Query\x20{\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20fetch\x20a\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20return\x20await\x20getRepository({{pascalCase\x20name}}).findOne({\x0a\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20}\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}List,\x20{\x20description:\x20\x27To\x20fetch\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{pluralCamelCase\x20name}}(@Args()\x20params:\x20ListParam,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}List>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20queryBuilder\x20=\x20getQueryBuilderFromListParams({\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20params,\x0a\x20\x20\x20\x20\x20\x20repository:\x20await\x20getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20const\x20convertedParams\x20=\x20convertListParams(params,\x20domain.id)\x0a\x20\x20\x20\x20const\x20[items,\x20total]\x20=\x20await\x20queryBuilder.getManyAndCount()\x0a\x0a\x20\x20\x20\x20return\x20{\x20items,\x20total\x20}\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20Domain)\x0a\x20\x20async\x20domain(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<Domain>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(Domain).findOneBy({id:{{camelCase\x20name}}.domainId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20updater(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.updaterId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20creator(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.creatorId})\x0a\x20\x20}\x0a}\x0a',serviceHistoryQuery=a0_0x26432e(0x1da),serviceMutation=a0_0x26432e(0x14f),sereviceType=a0_0x26432e(0x1c8),sereviceHistoryType=a0_0x26432e(0x184),serviceEntity=a0_0x26432e(0x1a3),serviceEntityHistCopy=a0_0x26432e(0x1b1),serviceEntityHistJson=a0_0x26432e(0x1d8),serviceEntitySubscriber=a0_0x26432e(0x196);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x4daaec=a0_0x1ae6;(function(_0x50f7e7,_0xcab79b){const _0x4f33c6=a0_0x1ae6,_0x34b1b0=_0x50f7e7();while(!![]){try{const _0x381fe6=-parseInt(_0x4f33c6(0x1c4))/0x1*(-parseInt(_0x4f33c6(0x1c2))/0x2)+parseInt(_0x4f33c6(0x1aa))/0x3+parseInt(_0x4f33c6(0x1bc))/0x4+parseInt(_0x4f33c6(0x1a1))/0x5+-parseInt(_0x4f33c6(0x1bf))/0x6*(parseInt(_0x4f33c6(0x1c3))/0x7)+parseInt(_0x4f33c6(0x1a5))/0x8*(-parseInt(_0x4f33c6(0x1a4))/0x9)+parseInt(_0x4f33c6(0x1b7))/0xa*(parseInt(_0x4f33c6(0x1a8))/0xb);if(_0x381fe6===_0xcab79b)break;else _0x34b1b0['push'](_0x34b1b0['shift']());}catch(_0x32b317){_0x34b1b0['push'](_0x34b1b0['shift']());}}}(a0_0x2abc,0x1bf7d));function a0_0x1ae6(_0x25ca34,_0x3f261b){const _0x2abcb7=a0_0x2abc();return a0_0x1ae6=function(_0x1ae6ef,_0x4c6853){_0x1ae6ef=_0x1ae6ef-0x1a0;let _0x2c089b=_0x2abcb7[_0x1ae6ef];return _0x2c089b;},a0_0x1ae6(_0x25ca34,_0x3f261b);}Object[a0_0x4daaec(0x1a6)](exports,'__esModule',{'value':!0x0}),exports[a0_0x4daaec(0x1ac)]=exports[a0_0x4daaec(0x1a2)]=void 0x0;const operato_license_checker_1=require('@things-factory/operato-license-checker'),shell_1=require(a0_0x4daaec(0x1a7)),menu_base_1=require(a0_0x4daaec(0x1a3)),license_error_1=require(a0_0x4daaec(0x1bd));async function checkStudioPermission(){const _0x3d8e01=a0_0x4daaec;let _0x2db444=((0x0,operato_license_checker_1['getPermission'])(_0x3d8e01(0x1be))||',')['split'](',')[_0x3d8e01(0x1af)](_0xbe8296=>_0xbe8296['trim']()),_0x49df5d=!0x1;return _0x2db444[_0x3d8e01(0x1b3)](_0x1d2c4c=>{const _0x5aa0a6=_0x3d8e01;_0x1d2c4c[_0x5aa0a6(0x1ab)](_0x5aa0a6(0x1c1))&&(_0x49df5d=!0x0);}),_0x49df5d;}function a0_0x2abc(){const _0x15d088=['Studio','51528KTPtEw','456302QDTOrF','3ZoMUgO','OVER_LIMIT','491875cAXhFo','checkStudioPermission','@things-factory/menu-base','112311kkVTlX','88RnICiY','defineProperty','@things-factory/shell','232463nSydRc','getCount','611907vvBIUa','includes','checkStudioTemplateIsOverLimit','LicenseError','where','map','Menu','id\x20!=\x20:id','checkTarget','forEach','ERROR_CODES','createQueryBuilder','getRepository','10LBjQIh','(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)','manager','menu','select','186460XUuhRr','../../errors/license-error','Permissions\x20For\x20Tailor\x20Tool','18rehfTA','from'];a0_0x2abc=function(){return _0x15d088;};return a0_0x2abc();}async function checkStudioTemplateIsOverLimit(_0xa8ec17,_0x1f2497){const _0x5d9024=a0_0x4daaec;if(0x0==await checkStudioPermission())throw new license_error_1[(_0x5d9024(0x1ad))]({'errorCode':_0x1f2497['t'](license_error_1[_0x5d9024(0x1ad)]['ERROR_CODES']['INVALID_LICENSE'])});var _0x3a840e=0x0;if(_0x3a840e=_0xa8ec17&&''!=_0xa8ec17?await(0x0,shell_1[_0x5d9024(0x1b6)])(menu_base_1[_0x5d9024(0x1b0)])[_0x5d9024(0x1b9)]['createQueryBuilder']()[_0x5d9024(0x1bb)](_0x5d9024(0x1ba))[_0x5d9024(0x1c0)](menu_base_1['Menu'],_0x5d9024(0x1ba))[_0x5d9024(0x1ae)](_0x5d9024(0x1b1),{'id':_0xa8ec17})['andWhere'](_0x5d9024(0x1b8))[_0x5d9024(0x1a9)]()+0x1:await(0x0,shell_1[_0x5d9024(0x1b6)])(menu_base_1[_0x5d9024(0x1b0)])[_0x5d9024(0x1b9)][_0x5d9024(0x1b5)]()[_0x5d9024(0x1bb)](_0x5d9024(0x1ba))[_0x5d9024(0x1c0)](menu_base_1[_0x5d9024(0x1b0)],'menu')['where'](_0x5d9024(0x1b8))[_0x5d9024(0x1a9)]()+0x1,!(0x0,operato_license_checker_1[_0x5d9024(0x1b2)])(_0x3a840e))throw new license_error_1['LicenseError']({'errorCode':_0x1f2497['t'](license_error_1[_0x5d9024(0x1ad)][_0x5d9024(0x1b4)][_0x5d9024(0x1a0)])});return!0x0;}exports[a0_0x4daaec(0x1a2)]=checkStudioPermission,exports['checkStudioTemplateIsOverLimit']=checkStudioTemplateIsOverLimit;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x71765e=a0_0x1e01;(function(_0x5b52a5,_0x47c108){const _0x94cc48=a0_0x1e01,_0x471244=_0x5b52a5();while(!![]){try{const _0x25fdec=-parseInt(_0x94cc48(0x10d))/0x1+parseInt(_0x94cc48(0x103))/0x2+parseInt(_0x94cc48(0x107))/0x3*(parseInt(_0x94cc48(0x118))/0x4)+-parseInt(_0x94cc48(0x119))/0x5+-parseInt(_0x94cc48(0x101))/0x6*(parseInt(_0x94cc48(0x108))/0x7)+-parseInt(_0x94cc48(0x116))/0x8*(parseInt(_0x94cc48(0x111))/0x9)+-parseInt(_0x94cc48(0xfd))/0xa*(-parseInt(_0x94cc48(0x117))/0xb);if(_0x25fdec===_0x47c108)break;else _0x471244['push'](_0x471244['shift']());}catch(_0x4b5df8){_0x471244['push'](_0x471244['shift']());}}}(a0_0x5c68,0xa7a12));Object[a0_0x71765e(0xfa)](exports,a0_0x71765e(0xff),{'value':!0x0}),exports[a0_0x71765e(0x115)]=void 0x0;function a0_0x5c68(){const _0x49e364=['Arg','design:type','checkStudioTemplateIsOverLimit','897811xAHezD','tslib','design:returntype','prototype','28629nZnbvq','studioTemplateIsOverLimit','studioPermission','Ctx','OperatoToolResolver','2824lWAJpJ','3883diDeHP','8rgyXfU','3064100mKMxdE','defineProperty','__decorate','Operato\x20Tool\x20Studio\x20Usage\x20Permissions','86290ndNOXZ','__param','__esModule','design:paramtypes','6xLidqo','Resolver','1101444KryhBg','Operato\x20Tool\x20Studio\x20Limit\x20check','Query','__metadata','1572696xDNGnt','9275623tDheBR','checkStudioPermission'];a0_0x5c68=function(){return _0x49e364;};return a0_0x5c68();}function a0_0x1e01(_0x5bd16d,_0x113da0){const _0x5c68c9=a0_0x5c68();return a0_0x1e01=function(_0x1e01b4,_0x36e674){_0x1e01b4=_0x1e01b4-0xfa;let _0x57b0f3=_0x5c68c9[_0x1e01b4];return _0x57b0f3;},a0_0x1e01(_0x5bd16d,_0x113da0);}const tslib_1=require(a0_0x71765e(0x10e)),type_graphql_1=require('type-graphql'),tool_permission_1=require('./tool-permission');let OperatoToolResolver=class{async[a0_0x71765e(0x113)](_0x338e2f){const _0x2f0b31=a0_0x71765e;return(0x0,tool_permission_1[_0x2f0b31(0x109)])();}async[a0_0x71765e(0x112)](_0x24fb76,_0x1d0892){const _0x4cb308=a0_0x71765e;return(0x0,tool_permission_1[_0x4cb308(0x10c)])(_0x24fb76,_0x1d0892);}};tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x71765e(0x105)])(_0xce251b=>Boolean,{'description':a0_0x71765e(0xfc)}),tslib_1[a0_0x71765e(0xfe)](0x0,(0x0,type_graphql_1['Ctx'])()),tslib_1[a0_0x71765e(0x106)](a0_0x71765e(0x10b),Function),tslib_1[a0_0x71765e(0x106)](a0_0x71765e(0x100),[Object]),tslib_1[a0_0x71765e(0x106)](a0_0x71765e(0x10f),Promise)],OperatoToolResolver[a0_0x71765e(0x110)],a0_0x71765e(0x113),null),tslib_1[a0_0x71765e(0xfb)]([(0x0,type_graphql_1[a0_0x71765e(0x105)])(_0x231218=>Boolean,{'description':a0_0x71765e(0x104)}),tslib_1[a0_0x71765e(0xfe)](0x0,(0x0,type_graphql_1[a0_0x71765e(0x10a)])('id')),tslib_1[a0_0x71765e(0xfe)](0x1,(0x0,type_graphql_1[a0_0x71765e(0x114)])()),tslib_1['__metadata']('design:type',Function),tslib_1[a0_0x71765e(0x106)](a0_0x71765e(0x100),[String,Object]),tslib_1['__metadata'](a0_0x71765e(0x10f),Promise)],OperatoToolResolver[a0_0x71765e(0x110)],a0_0x71765e(0x112),null),OperatoToolResolver=tslib_1[a0_0x71765e(0xfb)]([(0x0,type_graphql_1[a0_0x71765e(0x102)])()],OperatoToolResolver),exports[a0_0x71765e(0x115)]=OperatoToolResolver;
|