@things-factory/operato-tools 6.1.36 → 6.1.37
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 +4 -4
- package/client/pages/generator/tab-config-tab-mixin.js +4 -4
- package/client/pages/main.js +4 -4
- package/client/reducers/main.js +1 -1
- package/package.json +3 -3
- package/server/constants/error-code.js +1 -1
- package/server/errors/license-error.js +1 -1
- package/server/routes.js +1 -1
- package/server/service/tool-entity/create-menu.js +1 -1
- package/server/service/tool-entity/create-service.js +1 -1
- package/server/service/tool-secret/tool-permission.js +1 -1
- package/server/service/tool-secret/tool-resolver.js +1 -1
package/client/pages/main.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a0_0x1f1846=a0_0x45c9;(function(_0x8ef38d,_0x55012f){var _0x263d73=a0_0x45c9,_0x1b2a0e=_0x8ef38d();while(!![]){try{var _0x455ade=parseInt(_0x263d73(0xe3))/0x1+parseInt(_0x263d73(0xe5))/0x2*(parseInt(_0x263d73(0xdc))/0x3)+-parseInt(_0x263d73(0xe7))/0x4+-parseInt(_0x263d73(0xe2))/0x5*(parseInt(_0x263d73(0xda))/0x6)+-parseInt(_0x263d73(0xe8))/0x7+-parseInt(_0x263d73(0xe4))/0x8+parseInt(_0x263d73(0xde))/0x9;if(_0x455ade===_0x55012f)break;else _0x1b2a0e['push'](_0x1b2a0e['shift']());}catch(_0x227c89){_0x1b2a0e['push'](_0x1b2a0e['shift']());}}}(a0_0x4e4b,0x83567));import{html,css}from'lit-element';import{connect}from'pwa-helpers/connect-mixin.js';function a0_0x4e4b(){var _0x4d4eeb=['7084630pYhcOl','customElements','operato-tools-main','6kpBoOr','tText','1575330WaOYXS','define','14099571zUjWux','context','tool\x20start\x20msg','render','2079335hrJouL','657520AGVaxb','1399736VqNyvt','2aqviqO','Operato\x20Tools','2433464faiiWH'];a0_0x4e4b=function(){return _0x4d4eeb;};return a0_0x4e4b();}import{store,PageView}from'@things-factory/shell';import{TermsUtil}from'@things-factory/meta-ui';class OperatoToolsMain extends connect(store)(PageView){static get['styles'](){return[css`
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
4
|
background-color: var(--main-section-background-color);
|
|
@@ -41,11 +41,11 @@ var a0_0x5e1118=a0_0x3e03;(function(_0x17295e,_0x36d3ed){var _0x5413e1=a0_0x3e03
|
|
|
41
41
|
display: none;
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
`];}get[
|
|
44
|
+
`];}get[a0_0x1f1846(0xdf)](){var _0xf43b5e=a0_0x1f1846;return{'title':_0xf43b5e(0xe6),'actions':[]};}[a0_0x1f1846(0xe1)](){var _0x29e68c=a0_0x1f1846;return html`
|
|
45
45
|
<h2>Operato Tools</h2>
|
|
46
46
|
<p page-description>
|
|
47
|
-
${TermsUtil[
|
|
47
|
+
${TermsUtil[_0x29e68c(0xdb)](_0x29e68c(0xe0))}
|
|
48
48
|
</p>
|
|
49
49
|
|
|
50
50
|
<img src="/assets/images/operato-tools.png" />
|
|
51
|
-
`;}}function
|
|
51
|
+
`;}}function a0_0x45c9(_0x1ae11d,_0x5bfd61){var _0x4e4bc6=a0_0x4e4b();return a0_0x45c9=function(_0x45c9a8,_0x1d88c3){_0x45c9a8=_0x45c9a8-0xda;var _0x39f1fa=_0x4e4bc6[_0x45c9a8];return _0x39f1fa;},a0_0x45c9(_0x1ae11d,_0x5bfd61);}window[a0_0x1f1846(0xe9)][a0_0x1f1846(0xdd)](a0_0x1f1846(0xea),OperatoToolsMain);
|
package/client/reducers/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a0_0x54dfb4=a0_0x4566;(function(_0x39d1d2,_0x3db8b2){const _0x478c92=a0_0x4566,_0x350e86=_0x39d1d2();while(!![]){try{const _0xef56bb=parseInt(_0x478c92(0x169))/0x1+parseInt(_0x478c92(0x166))/0x2+-parseInt(_0x478c92(0x171))/0x3+-parseInt(_0x478c92(0x175))/0x4*(parseInt(_0x478c92(0x174))/0x5)+parseInt(_0x478c92(0x173))/0x6+parseInt(_0x478c92(0x16d))/0x7*(parseInt(_0x478c92(0x16a))/0x8)+parseInt(_0x478c92(0x165))/0x9*(-parseInt(_0x478c92(0x170))/0xa);if(_0xef56bb===_0x3db8b2)break;else _0x350e86['push'](_0x350e86['shift']());}catch(_0x522d70){_0x350e86['push'](_0x350e86['shift']());}}}(a0_0x13b0,0xb7122));function a0_0x4566(_0x519661,_0x1cb7cc){const _0x13b025=a0_0x13b0();return a0_0x4566=function(_0x4566fc,_0x3eea2c){_0x4566fc=_0x4566fc-0x164;let _0x4b1b27=_0x13b025[_0x4566fc];return _0x4b1b27;},a0_0x4566(_0x519661,_0x1cb7cc);}import a0_0x5f2cad from'graphql-tag';import{i18next}from'@operato/i18n';import{store}from'@operato/shell';import{client,gqlContext}from'@operato/graphql';import{UPDATE_OPERATO_TOOLS}from'../actions/main';const INITIAL_STATE={'operatoTools':a0_0x54dfb4(0x167),'studioPermission':!0x1};export const UPDATE_OPERATO_TOOLS_PERMISSION=a0_0x54dfb4(0x16f);function a0_0x13b0(){const _0x45281f=['4171350hjoBdw','9740WykMbH','488moqWed','data','101538VRuvdy','1985240kERWvB','ABC','studioPermission','716713KWImhI','40PlYcij','state','dispatch','1205995IexZHK','type','UPDATE_OPERATO_TOOLS_PERMISSION','1290DMEtKX','2469273KOpSlx','errors'];a0_0x13b0=function(){return _0x45281f;};return a0_0x13b0();}((async()=>{const _0x314202=a0_0x54dfb4;var _0x4548e9=await client['query']({'query':a0_0x5f2cad`{studioPermission}`});let _0x396c0c=!0x1;_0x4548e9[_0x314202(0x172)]||(_0x396c0c=_0x4548e9[_0x314202(0x164)][_0x314202(0x168)]),store[_0x314202(0x16c)]({'type':UPDATE_OPERATO_TOOLS_PERMISSION,'state':{'studioPermission':_0x396c0c}});})());const operatoTools=(_0x439061=INITIAL_STATE,_0x3c4584)=>{const _0x54de96=a0_0x54dfb4;switch(_0x3c4584[_0x54de96(0x16e)]){case UPDATE_OPERATO_TOOLS:return{..._0x439061};case UPDATE_OPERATO_TOOLS_PERMISSION:return{...INITIAL_STATE,..._0x3c4584[_0x54de96(0x16b)]};default:return _0x439061;}};export default operatoTools;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/operato-tools",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.37",
|
|
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.37",
|
|
33
33
|
"@things-factory/operato-license-checker": "^3.1.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@things-factory/builder": "^6.1.28",
|
|
37
37
|
"@things-factory/meta-ui": "^6.0.0-alpha.6"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "7077aa445e81f939e15e3415d6d366a297ba6191"
|
|
40
40
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a0_0x322df4=a0_0x395c;function a0_0x395c(_0x3200b1,_0x24cf06){var _0x4549c3=a0_0x4549();return a0_0x395c=function(_0x395c10,_0x375615){_0x395c10=_0x395c10-0xa8;var _0x482fbc=_0x4549c3[_0x395c10];return _0x482fbc;},a0_0x395c(_0x3200b1,_0x24cf06);}(function(_0x54fb75,_0x22db91){var _0x50e9f4=a0_0x395c,_0x432145=_0x54fb75();while(!![]){try{var _0x30f3be=-parseInt(_0x50e9f4(0xad))/0x1*(parseInt(_0x50e9f4(0xae))/0x2)+parseInt(_0x50e9f4(0xab))/0x3*(-parseInt(_0x50e9f4(0xb2))/0x4)+parseInt(_0x50e9f4(0xa8))/0x5*(parseInt(_0x50e9f4(0xa9))/0x6)+-parseInt(_0x50e9f4(0xb6))/0x7+parseInt(_0x50e9f4(0xb4))/0x8+parseInt(_0x50e9f4(0xb5))/0x9*(parseInt(_0x50e9f4(0xb0))/0xa)+-parseInt(_0x50e9f4(0xaa))/0xb*(-parseInt(_0x50e9f4(0xb8))/0xc);if(_0x30f3be===_0x22db91)break;else _0x432145['push'](_0x432145['shift']());}catch(_0x123ae7){_0x432145['push'](_0x432145['shift']());}}}(a0_0x4549,0xb86ae));function a0_0x4549(){var _0x24cc1c=['5248MieKNb','defineProperty','3708328iDlRMG','253026wgqIvS','1683122HKKTEJ','__esModule','12OVzYjy','3955SsyeUP','2298utIQhV','6979434AnSXny','159alvpew','error.invalid\x20license\x20key','363746OfEhrx','2zIovLf','INVALID_LICENSE','10Mlyatx','OVER_LIMIT'];a0_0x4549=function(){return _0x24cc1c;};return a0_0x4549();}Object[a0_0x322df4(0xb3)](exports,a0_0x322df4(0xb7),{'value':!0x0}),exports['OVER_LIMIT']=exports['INVALID_LICENSE']=void 0x0,exports[a0_0x322df4(0xaf)]=a0_0x322df4(0xac),exports[a0_0x322df4(0xb1)]='error.page\x20count\x20over\x20license\x20limit';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';function a0_0x5ee7(_0x4e3075,_0x5b72f7){const _0x2014ad=a0_0x2014();return a0_0x5ee7=function(_0x5ee78e,_0x28704c){_0x5ee78e=_0x5ee78e-0x1cc;let _0x4091ea=_0x2014ad[_0x5ee78e];return _0x4091ea;},a0_0x5ee7(_0x4e3075,_0x5b72f7);}function a0_0x2014(){const _0x182bcf=['1255340ZZIlaj','358650CWJIle','tslib','4UcQgkN','errorCode','176931QtaNNt','675867HkVcBW','747089kaezAh','659ncYukb','11MFQdBn','246rYSgPO','ERROR_CODES','LicenseError','assign','__importStar','detail','../constants/error-code','16TeRGBk','9805420GlDclK','defineProperty'];a0_0x2014=function(){return _0x182bcf;};return a0_0x2014();}const a0_0x3e2cdd=a0_0x5ee7;(function(_0x4085ea,_0x5d6e08){const _0x406da9=a0_0x5ee7,_0x497238=_0x4085ea();while(!![]){try{const _0x27426d=parseInt(_0x406da9(0x1da))/0x1*(-parseInt(_0x406da9(0x1dc))/0x2)+-parseInt(_0x406da9(0x1d8))/0x3*(parseInt(_0x406da9(0x1d5))/0x4)+-parseInt(_0x406da9(0x1d2))/0x5+-parseInt(_0x406da9(0x1d3))/0x6+parseInt(_0x406da9(0x1d9))/0x7*(-parseInt(_0x406da9(0x1cf))/0x8)+-parseInt(_0x406da9(0x1d7))/0x9+-parseInt(_0x406da9(0x1d0))/0xa*(-parseInt(_0x406da9(0x1db))/0xb);if(_0x27426d===_0x5d6e08)break;else _0x497238['push'](_0x497238['shift']());}catch(_0x1b8f82){_0x497238['push'](_0x497238['shift']());}}}(a0_0x2014,0x1fcc0));Object[a0_0x3e2cdd(0x1d1)](exports,'__esModule',{'value':!0x0}),exports[a0_0x3e2cdd(0x1de)]=void 0x0;const tslib_1=require(a0_0x3e2cdd(0x1d4)),ERROR_CODES=tslib_1[a0_0x3e2cdd(0x1cc)](require(a0_0x3e2cdd(0x1ce)));class LicenseError extends Error{static get[a0_0x3e2cdd(0x1dd)](){const _0x3d1fc0=a0_0x3e2cdd;return Object[_0x3d1fc0(0x1df)]({},ERROR_CODES);}constructor({errorCode:_0x5c4d11,detail:_0x42bbc9}){const _0x218f21=a0_0x3e2cdd;super(_0x5c4d11),this['name']='license-error',this[_0x218f21(0x1d6)]=_0x5c4d11,this[_0x218f21(0x1cd)]=_0x42bbc9;}}exports[a0_0x3e2cdd(0x1de)]=LicenseError;
|
package/server/routes.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a0_0x1e4e46=a0_0x290b;(function(_0x26645e,_0x432ba6){const _0x1c61ff=a0_0x290b,_0x7230cb=_0x26645e();while(!![]){try{const _0x564ab6=parseInt(_0x1c61ff(0xc8))/0x1*(parseInt(_0x1c61ff(0xd0))/0x2)+parseInt(_0x1c61ff(0xcf))/0x3+-parseInt(_0x1c61ff(0xc6))/0x4*(-parseInt(_0x1c61ff(0xca))/0x5)+-parseInt(_0x1c61ff(0xcb))/0x6+parseInt(_0x1c61ff(0xce))/0x7*(-parseInt(_0x1c61ff(0xd1))/0x8)+parseInt(_0x1c61ff(0xcd))/0x9+-parseInt(_0x1c61ff(0xc4))/0xa;if(_0x564ab6===_0x432ba6)break;else _0x7230cb['push'](_0x7230cb['shift']());}catch(_0x2b557e){_0x7230cb['push'](_0x7230cb['shift']());}}}(a0_0x30c4,0x40328));function a0_0x30c4(){const _0x35b00f=['debug','2725623vJRGkt','70UqaNsm','1549737WhJQnq','10TvUwkq','229728SmXyfC','5598060LgZyRW','bootstrap-module-domain-public-route','425740GmdyBE','bootstrap-module-domain-private-route','21671ySkgPp','bootstrap-module-global-private-route','20kTDsuj','1461618uilbEj'];a0_0x30c4=function(){return _0x35b00f;};return a0_0x30c4();}const debug=require(a0_0x1e4e46(0xcc))('things-factory:operato-tools:routes');function a0_0x290b(_0x8caef6,_0x507303){const _0x30c41a=a0_0x30c4();return a0_0x290b=function(_0x290bb0,_0x6f4aa3){_0x290bb0=_0x290bb0-0xc4;let _0x340ab7=_0x30c41a[_0x290bb0];return _0x340ab7;},a0_0x290b(_0x8caef6,_0x507303);}process['on']('bootstrap-module-global-public-route',(_0x14bdf8,_0x5f40e6)=>{}),process['on'](a0_0x1e4e46(0xc9),(_0x4867db,_0x2c31ac)=>{}),process['on'](a0_0x1e4e46(0xc5),(_0x3a0411,_0x2d3ced)=>{}),process['on'](a0_0x1e4e46(0xc7),(_0x517c9e,_0x8c81f2)=>{});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x255749=a0_0x3c9d;(function(_0x1b1ec9,_0x418db5){const _0xefb4cf=a0_0x3c9d,_0x38221e=_0x1b1ec9();while(!![]){try{const _0x1b8a45=-parseInt(_0xefb4cf(0x17b))/0x1+parseInt(_0xefb4cf(0x1b1))/0x2+parseInt(_0xefb4cf(0x191))/0x3+-parseInt(_0xefb4cf(0x17e))/0x4+-parseInt(_0xefb4cf(0x18c))/0x5*(parseInt(_0xefb4cf(0x1c8))/0x6)+-parseInt(_0xefb4cf(0x1da))/0x7+-parseInt(_0xefb4cf(0x19a))/0x8*(-parseInt(_0xefb4cf(0x1a0))/0x9);if(_0x1b8a45===_0x418db5)break;else _0x38221e['push'](_0x38221e['shift']());}catch(_0x385d37){_0x38221e['push'](_0x38221e['shift']());}}}(a0_0x450d,0x7dbd7));Object[a0_0x255749(0x18f)](exports,a0_0x255749(0x1a8),{'value':!0x0}),exports[a0_0x255749(0x186)]=void 0x0;const tslib_1=require(a0_0x255749(0x1a7)),type_graphql_1=require(a0_0x255749(0x1e1)),resource_base_1=require(a0_0x255749(0x1f4)),menu_base_1=require(a0_0x255749(0x1d6)),tool_permission_1=require('./../tool-secret/tool-permission'),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x255749(0x17f)),{plural:plural}=require(a0_0x255749(0x1d8)),crypto_1=tslib_1['__importDefault'](require(a0_0x255749(0x19b)));function a0_0x3c9d(_0x78b7e5,_0x59239b){const _0x450da3=a0_0x450d();return a0_0x3c9d=function(_0x3c9dc0,_0x6f6b9f){_0x3c9dc0=_0x3c9dc0-0x179;let _0x3058eb=_0x450da3[_0x3c9dc0];return _0x3058eb;},a0_0x3c9d(_0x78b7e5,_0x59239b);}let OperatoToolCreateMenu=class{async['toolCreateMenu'](_0x100500,_0x15492b,_0x2114d3){const _0x2e9976=a0_0x255749,{domain:_0x3fa924,user:_0x1ac21f,tx:_0x432557}=_0x2114d3[_0x2e9976(0x1be)];await(0x0,tool_permission_1[_0x2e9976(0x1c1)])('',_0x2114d3);const _0x5a2601=await _0x432557[_0x2e9976(0x1ed)](resource_base_1[_0x2e9976(0x1e0)])[_0x2e9976(0x1bc)]({'where':{'domain':{'id':_0x3fa924['id']},'id':_0x100500}}),_0x484514=await _0x432557[_0x2e9976(0x1ed)](resource_base_1[_0x2e9976(0x1ca)])['find']({'where':{'domain':{'id':_0x3fa924['id']},'entity':{'id':_0x5a2601['id']}}});let {name:_0x4d74d4=''}=_0x5a2601||{},_0x31b704=kebabCase(_0x4d74d4),_0x193cd1=modelTemplate[_0x2e9976(0x1aa)](/{{pascalCase name}}/g,startCase(camelCase(_0x4d74d4))[_0x2e9976(0x1aa)](/ /g,''))[_0x2e9976(0x1aa)](/{{camelCase name}}/g,camelCase(_0x4d74d4))['replace'](/{{snakeCase name}}/g,snakeCase(_0x4d74d4))[_0x2e9976(0x1aa)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x4d74d4)))['replace'](/ /g,''))['replace'](/{{pluralCamelCase name}}/g,camelCase(plural(_0x4d74d4)))['replace'](/{{name}}/g,_0x4d74d4),_0x2e21f2='';_0x2e9976(0x1ba)==_0x5a2601[_0x2e9976(0x1c5)]?_0x2e21f2=_0x2e9976(0x1d2):_0x2e9976(0x17a)==_0x5a2601[_0x2e9976(0x1c5)]&&(_0x2e21f2='\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22basic\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22label\x22:\x20\x22data_history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22icon\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22logic\x22:\x20\x22history_copy\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20'),_0x193cd1=_0x193cd1['replace'](/{{HistoryButton}}/g,_0x2e21f2);let _0x41e7b4=this['createSortCols'](_0x484514);_0x193cd1=_0x193cd1[_0x2e9976(0x1aa)](/{{SortColumns}}/g,_0x41e7b4[_0x2e9976(0x197)](','));let _0x1fc8fb=this[_0x2e9976(0x1cb)](_0x484514);_0x193cd1=_0x193cd1[_0x2e9976(0x1aa)](/{{SearchColumns}}/g,_0x1fc8fb[_0x2e9976(0x197)](','));let _0x406474=this[_0x2e9976(0x1ae)](_0x484514);return _0x193cd1=_0x193cd1[_0x2e9976(0x1aa)](/{{GridColumns}}/g,_0x406474[_0x2e9976(0x197)](',')),_0x193cd1=this[_0x2e9976(0x1b7)](_0x193cd1),await this[_0x2e9976(0x1b5)](_0x432557,_0x3fa924,_0x1ac21f,_0x15492b,_0x31b704,_0x193cd1),!0x0;}[a0_0x255749(0x1ae)](_0xd88168){const _0x335848=a0_0x255749;return _0xd88168[_0x335848(0x183)](_0x29c965=>'id'!=_0x29c965[_0x335848(0x1bb)]&&_0x29c965[_0x335848(0x1b0)]>0x0)[_0x335848(0x188)](function(_0x2d65ad,_0x5d1a75){const _0x1f5ae0=_0x335848;return _0x2d65ad[_0x1f5ae0(0x1b0)]-_0x5d1a75['gridRank'];})[_0x335848(0x1f5)](_0x5bf476=>{const _0x4aa7b3=_0x335848;let {gridEditor:_0x4f6d6a=_0x4aa7b3(0x181),name:_0x3c877d,term:_0x569669,gridWidth:_0x342c78=0x0,gridAlign:_0x582a6b=_0x4aa7b3(0x18a),nullable:_0x3dc71b=!0x1}=_0x5bf476;if(null==_0x4f6d6a&&(_0x4f6d6a=_0x4aa7b3(0x181)),null==_0x582a6b&&(_0x582a6b=_0x4aa7b3(0x18a)),'updater_id'==_0x3c877d||'creator_id'==_0x3c877d)return _0x3c877d=_0x4aa7b3(0x195)==_0x3c877d?_0x4aa7b3(0x1b9):'creator',_0x4aa7b3(0x19e)+_0x3c877d+_0x4aa7b3(0x1c4)+_0x3c877d+_0x4aa7b3(0x1b4);if(_0x4aa7b3(0x1b2)==_0x3c877d||_0x4aa7b3(0x196)==_0x3c877d)return _0x4aa7b3(0x187)+(_0x4aa7b3(0x1b2)==_0x3c877d?_0x4aa7b3(0x1df):_0x4aa7b3(0x1e9))+_0x4aa7b3(0x1c4)+_0x3c877d+_0x4aa7b3(0x1a6);let _0x11e6c0=_0x4aa7b3(0x1d3)!=_0x4f6d6a&&'hidden'!=_0x4f6d6a,_0x135818='hidden'==_0x4f6d6a;0x1!=_0x135818&&0x0!=_0x11e6c0||(_0x4f6d6a='string');let _0x43dd5c=_0x4aa7b3(0x1ab)+_0x4f6d6a+_0x4aa7b3(0x1a3)+camelCase(_0x3c877d)+_0x4aa7b3(0x1c4)+_0x569669+'\x22,\x22hidden\x22:'+_0x135818+_0x4aa7b3(0x1e7)+_0x11e6c0+',\x22mandatory\x22:\x20'+!_0x3dc71b+_0x4aa7b3(0x1e8)+_0x582a6b+_0x4aa7b3(0x1de)+_0x342c78+'\x20,\x22exportable\x22:\x20true';return _0x4aa7b3(0x1f3)==_0x5bf476['refType']&&(_0x43dd5c+=_0x4aa7b3(0x1a1)+_0x5bf476[_0x4aa7b3(0x1e4)]+'\x22}'),_0x4aa7b3(0x1c3)==_0x5bf476[_0x4aa7b3(0x1b3)]&&(_0x43dd5c+=_0x4aa7b3(0x194)+_0x5bf476[_0x4aa7b3(0x1e4)]+'\x22}'),'entity'==_0x5bf476[_0x4aa7b3(0x1b3)]&&(_0x43dd5c+=_0x4aa7b3(0x18b)+camelCase(plural(_0x5bf476[_0x4aa7b3(0x1e4)]))+_0x4aa7b3(0x180)),_0x43dd5c+='}',_0x43dd5c;});}[a0_0x255749(0x1cb)](_0x1fa9d8){const _0x51cb1f=a0_0x255749;return _0x1fa9d8[_0x51cb1f(0x183)](_0x7ffd23=>_0x7ffd23[_0x51cb1f(0x1f0)]>0x0)[_0x51cb1f(0x188)](function(_0x4823ab,_0x2a99f8){const _0x10d35d=_0x51cb1f;return _0x4823ab[_0x10d35d(0x1f0)]-_0x2a99f8[_0x10d35d(0x1f0)];})[_0x51cb1f(0x1f5)](_0x481584=>{const _0x362ae4=_0x51cb1f;let _0x29028f=_0x481584[_0x362ae4(0x1b8)];return'filter'==_0x29028f?'\x22'+camelCase(_0x481584[_0x362ae4(0x1bb)])+'\x22':(_0x29028f||(_0x29028f='eq'),_0x362ae4(0x19f)+camelCase(_0x481584['name'])+_0x362ae4(0x17d)+_0x29028f+'\x22}');});}['createSortCols'](_0x1c608f){const _0x21628c=a0_0x255749;return _0x1c608f['filter'](_0x382637=>_0x382637['sortRank']>0x0)[_0x21628c(0x188)](function(_0x2814b8,_0x397f4e){const _0x4efdc3=_0x21628c;return _0x2814b8[_0x4efdc3(0x1c0)]-_0x397f4e[_0x4efdc3(0x1c0)];})[_0x21628c(0x1f5)](_0x104f31=>_0x21628c(0x1a4)+camelCase(_0x104f31[_0x21628c(0x1bb)])+_0x21628c(0x1d7)+_0x104f31[_0x21628c(0x1dd)]+'}');}async[a0_0x255749(0x1b5)](_0x54e7c9,_0x1a0b4a,_0x17fbe6,_0x33daaa,_0x242e9d,_0x2ec46d){const _0x3c76c8=a0_0x255749;let _0x5c5a60=await _0x54e7c9[_0x3c76c8(0x1ed)](menu_base_1[_0x3c76c8(0x1eb)])[_0x3c76c8(0x1bc)]({'where':{'domain':{'id':_0x1a0b4a['id']},'id':_0x33daaa}}),_0xba0a82=(await _0x54e7c9[_0x3c76c8(0x1ed)](menu_base_1[_0x3c76c8(0x1eb)])[_0x3c76c8(0x1bd)](_0x3c76c8(0x1ef)+_0x33daaa+_0x3c76c8(0x1f1)+_0x33daaa+'\x27'))[0x0][_0x3c76c8(0x193)]+0xa,_0xe27beb=new menu_base_1[(_0x3c76c8(0x1eb))]();_0xe27beb[_0x3c76c8(0x1bb)]=_0x242e9d,_0xe27beb['menuType']=_0x3c76c8(0x1ad),_0xe27beb[_0x3c76c8(0x1f2)]='meta-grist-page',_0xe27beb[_0x3c76c8(0x193)]=_0xba0a82,_0xe27beb[_0x3c76c8(0x1dc)]=!0x1,_0xe27beb[_0x3c76c8(0x1cc)]=_0x242e9d,_0xe27beb[_0x3c76c8(0x189)]=_0x2ec46d,_0xe27beb[_0x3c76c8(0x1cd)]='@things-factory/meta-ui/client/pages/meta-grist-page',_0xe27beb[_0x3c76c8(0x1e5)]=_0x5c5a60,await _0x54e7c9['getRepository'](menu_base_1[_0x3c76c8(0x1eb)])[_0x3c76c8(0x1d5)](Object[_0x3c76c8(0x182)](Object[_0x3c76c8(0x182)]({},_0xe27beb),{'domain':_0x1a0b4a,'creator':_0x17fbe6,'updater':_0x17fbe6}));}[a0_0x255749(0x1b7)](_0xbb1f3a){const _0x1af4db=a0_0x255749;let _0x1e6462=JSON[_0x1af4db(0x1ac)](_0xbb1f3a)[_0x1af4db(0x179)](/(.{100})/)[_0x1af4db(0x183)](_0x5ed4cc=>_0x5ed4cc),_0x4630a0=[_0x1af4db(0x1e3),_0x1af4db(0x1c2),_0x1af4db(0x190),'aes-256-cfb8',_0x1af4db(0x1a9),'aes-256-ofb',_0x1af4db(0x1db),_0x1af4db(0x1d1)],_0x549b02=crypto_1[_0x1af4db(0x198)][_0x1af4db(0x1d4)](0x20)[_0x1af4db(0x184)](_0x1af4db(0x1ec)),_0x5ced2a=Buffer[_0x1af4db(0x185)](_0x549b02,_0x1af4db(0x1ec)),_0x45e386=_0x549b02[_0x1af4db(0x18d)](0x0,0x10),_0x39d222=['',_0x45e386,_0x45e386,_0x45e386,_0x45e386,_0x45e386,_0x45e386,_0x45e386],_0x36d715=0x0,_0xde5216=[];_0xde5216[_0x1af4db(0x1a2)](_0x549b02);for(var _0x4004b9=0x0;_0x4004b9<_0x1e6462[_0x1af4db(0x199)];_0x4004b9++,_0x36d715++){_0x36d715==_0x4630a0['length']&&(_0x36d715=0x0);let _0x4cc310=crypto_1[_0x1af4db(0x198)][_0x1af4db(0x1a5)](_0x4630a0[_0x36d715],_0x5ced2a,_0x39d222[_0x36d715]),_0x3c3248=_0x4cc310['update'](_0x1e6462[_0x4004b9],_0x1af4db(0x1bf),_0x1af4db(0x1ec));_0x3c3248+=_0x4cc310[_0x1af4db(0x1c7)](_0x1af4db(0x1ec)),_0xde5216[_0x1af4db(0x1a2)](_0x3c3248);}return _0xde5216[_0x1af4db(0x197)](_0x1af4db(0x17c));}};function a0_0x450d(){const _0x3d5030=['__metadata','EntityColumn','createSearchCols','routing','resourceUrl','__param','Directive','Mutation','aes256','\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22basic\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22label\x22:\x20\x22data_history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22icon\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22logic\x22:\x20\x22history_json\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20','readonly','randomBytes','save','@things-factory/menu-base','\x22,\x22desc\x22:','pluralize','@transaction','6444060GbXyFI','aes-256-ctr','hiddenFlag','reverseSort','\x22,\x22width\x22:','updatedAt','Entity','type-graphql','design:paramtypes','aes-256-ecb','refName','parent','__decorate','\x20,\x22editable\x22:\x20',',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22','createdAt','toolCreateMenu','Menu','hex','getRepository','Arg','select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27','searchRank','\x27\x20or\x20id\x20=\x20\x27','category','code','@things-factory/resource-base','map','split','COPY','673426DBWbnh','h1z0q9i9x7q6','\x22,\x22operator\x22:\x20\x22','1915596vaRieR','lodash','\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}','string','assign','filter','toString','from','OperatoToolCreateMenu','{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22','sort','template','left',',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22','1098145VxTagt','substring','\x0a{\x0a\x20\x20\x22menu\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x22title\x22:\x20\x22{{name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22\x22,\x0a\x20\x20\x20\x20\x20\x20\x22desc\x22:\x20\x22\x22\x0a\x20\x20},\x0a\x20\x20\x22gql\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x22query\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22list_func\x22:\x20\x22{{pluralCamelCase\x20name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22find_one_func\x22:\x22{{camelCase\x20name}}\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x22mutation\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22multiple\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22func\x22:\x22updateMultiple{{pascalCase\x20name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22{{pascalCase\x20name}}Patch\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22delete\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22func\x22:\x22delete{{pluralPascalCase\x20name}}\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20},\x0a\x20\x20\x22button\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22export\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22add\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22delete\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22save\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20],\x0a\x20\x20\x22grid_column\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22string\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22id\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22header\x22:\x20\x22id\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22hidden\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22editable\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22mandatory\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22sortable\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22align\x22:\x20\x22left\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22width\x22:\x200,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22exportable\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20},\x0a{{GridColumns}}\x0a\x20\x20],\x0a\x20\x20\x22grid\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22button\x22:[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{{HistoryButton}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22option\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22mobile_mode\x22:\x20\x22LIST\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22desk_mode\x22:\x20\x22GRID\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22use_row_checker\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22pages\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2020,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2050,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20100,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20300\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22view_mode\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22GRID\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22LIST\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22CARD\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22sorters\x22:\x20[\x0a{{SortColumns}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20]\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x22row\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22multiple_select\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22click\x22:\x20\x22select-row-toggle\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20},\x0a\x20\x20\x22search\x22:\x20[\x0a{{SearchColumns}}\x0a\x20\x20]\x0a}\x0a','defineProperty','aes-256-cfb','402489bvnqrv','Ctx','rank',',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22','updater_id','created_at','join','default','length','7913096rzjcdI','crypto','design:type','Operato\x20Tool\x20Create\x20Menu','{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22','{\x22name\x22:\x20\x22','18OmtFoS',',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22','push','\x22,\x22name\x22:\x20\x22','{\x22name\x22:\x22','createCipheriv','\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}','tslib','__esModule','aes-256-cfb1','replace','{\x22type\x22:\x20\x22','stringify','SCREEN','createGridColumns','design:returntype','gridRank','1829514BUrXRG','updated_at','refType','\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}','createMenuData','prototype','enc','searchOper','updater','JSON','name','findOne','query','state','utf8','sortRank','checkStudioTemplateIsOverLimit','aes-256-cbc','scenario','\x22,\x22header\x22:\x20\x22','dataProp','Resolver','final','12MPMIWF'];a0_0x450d=function(){return _0x3d5030;};return a0_0x450d();}tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x255749(0x1cf)])(a0_0x255749(0x1d9)),(0x0,type_graphql_1[a0_0x255749(0x1d0)])(_0x220402=>Boolean,{'description':a0_0x255749(0x19d)}),tslib_1[a0_0x255749(0x1ce)](0x0,(0x0,type_graphql_1['Arg'])('id')),tslib_1[a0_0x255749(0x1ce)](0x1,(0x0,type_graphql_1[a0_0x255749(0x1ee)])('parent_menu_id')),tslib_1[a0_0x255749(0x1ce)](0x2,(0x0,type_graphql_1[a0_0x255749(0x192)])()),tslib_1[a0_0x255749(0x1c9)](a0_0x255749(0x19c),Function),tslib_1[a0_0x255749(0x1c9)](a0_0x255749(0x1e2),[String,String,Object]),tslib_1['__metadata'](a0_0x255749(0x1af),Promise)],OperatoToolCreateMenu[a0_0x255749(0x1b6)],a0_0x255749(0x1ea),null),OperatoToolCreateMenu=tslib_1[a0_0x255749(0x1e6)]([(0x0,type_graphql_1[a0_0x255749(0x1c6)])()],OperatoToolCreateMenu),exports[a0_0x255749(0x186)]=OperatoToolCreateMenu;const modelTemplate=a0_0x255749(0x18e);
|
|
1
|
+
'use strict';const a0_0x552978=a0_0x4b4d;function a0_0x94c2(){const _0x4b8705=['resourceUrl','parent','JSON','rank','stringify','prototype','__esModule','__importDefault',',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22','join','{\x22name\x22:\x22','searchOper','select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27','\x27\x20or\x20id\x20=\x20\x27','gridRank','enc','sortRank','string','hiddenFlag','randomBytes','OperatoToolCreateMenu','filter','7145NgvXAC','left','state','hidden','3732vxZuHv','292374qoEeBV','aes-256-cfb1','Resolver','menuType','264KOAtOd','pluralize','push','updatedAt','type-graphql','\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}','EntityColumn','toolCreateMenu','defineProperty','query','design:paramtypes','checkStudioTemplateIsOverLimit','COPY',',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22','createGridColumns','name','@things-factory/meta-ui/client/pages/meta-grist-page','\x22,\x22header\x22:\x20\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','./../tool-secret/tool-permission','design:returntype','refType','reverseSort','created_at',',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22','updater','update','category','h1z0q9i9x7q6','creator_id','refName','Arg','__decorate','aes-256-ofb','aes-256-cbc','3742236ZkxlTh',',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22','aes-256-cfb','replace','routing','dataProp','split','400473HBrZvd','readonly','\x22,\x22width\x22:','findOne','\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','\x22,\x22name\x22:\x20\x22','createCipheriv','aes256','createSearchCols','1809642rRMQdy','sort','{\x22name\x22:\x20\x22','\x20,\x22editable\x22:\x20','save','entity','@things-factory/resource-base','__metadata','assign','updater_id','createMenuData','\x20,\x22exportable\x22:\x20true','aes-256-ecb',',\x22mandatory\x22:\x20','Menu','parent_menu_id','getRepository','lodash','__param','\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','utf8','Operato\x20Tool\x20Create\x20Menu','code','\x22,\x22operator\x22:\x20\x22','2373861oLHics','{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22','hex','map','toString','template','scenario','creator','createSortCols','\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}','default','design:type','createdAt','from','updated_at','@things-factory/menu-base','Ctx','1647752ZtiBre'];a0_0x94c2=function(){return _0x4b8705;};return a0_0x94c2();}(function(_0x3b816a,_0x504013){const _0x406519=a0_0x4b4d,_0x4336b9=_0x3b816a();while(!![]){try{const _0x217613=parseInt(_0x406519(0x111))/0x1+parseInt(_0x406519(0xf5))/0x2+parseInt(_0x406519(0xcc))/0x3+parseInt(_0x406519(0xbc))/0x4+parseInt(_0x406519(0x10c))/0x5*(-parseInt(_0x406519(0x110))/0x6)+parseInt(_0x406519(0xe4))/0x7+parseInt(_0x406519(0x115))/0x8*(-parseInt(_0x406519(0xc3))/0x9);if(_0x217613===_0x504013)break;else _0x4336b9['push'](_0x4336b9['shift']());}catch(_0x11eea6){_0x4336b9['push'](_0x4336b9['shift']());}}}(a0_0x94c2,0x9b7eb));Object[a0_0x552978(0x11d)](exports,a0_0x552978(0xfc),{'value':!0x0}),exports[a0_0x552978(0x10a)]=void 0x0;const tslib_1=require('tslib'),type_graphql_1=require(a0_0x552978(0x119)),resource_base_1=require(a0_0x552978(0xd2)),menu_base_1=require(a0_0x552978(0xf3)),tool_permission_1=require(a0_0x552978(0xac)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x552978(0xdd)),{plural:plural}=require(a0_0x552978(0x116)),crypto_1=tslib_1[a0_0x552978(0xfd)](require('crypto'));let OperatoToolCreateMenu=class{async[a0_0x552978(0x11c)](_0x28ba2f,_0x5b8cae,_0x241adb){const _0x49869b=a0_0x552978,{domain:_0x11b468,user:_0x743ac0,tx:_0x59bfb9}=_0x241adb[_0x49869b(0x10e)];await(0x0,tool_permission_1[_0x49869b(0xa4)])('',_0x241adb);const _0xf2aea1=await _0x59bfb9['getRepository'](resource_base_1['Entity'])[_0x49869b(0xc6)]({'where':{'domain':{'id':_0x11b468['id']},'id':_0x28ba2f}}),_0x8e8964=await _0x59bfb9['getRepository'](resource_base_1[_0x49869b(0x11b)])['find']({'where':{'domain':{'id':_0x11b468['id']},'entity':{'id':_0xf2aea1['id']}}});let {name:_0x3e50e5=''}=_0xf2aea1||{},_0x1da59a=kebabCase(_0x3e50e5),_0x59d5ea=modelTemplate[_0x49869b(0xbf)](/{{pascalCase name}}/g,startCase(camelCase(_0x3e50e5))[_0x49869b(0xbf)](/ /g,''))[_0x49869b(0xbf)](/{{camelCase name}}/g,camelCase(_0x3e50e5))[_0x49869b(0xbf)](/{{snakeCase name}}/g,snakeCase(_0x3e50e5))[_0x49869b(0xbf)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x3e50e5)))['replace'](/ /g,''))['replace'](/{{pluralCamelCase name}}/g,camelCase(plural(_0x3e50e5)))[_0x49869b(0xbf)](/{{name}}/g,_0x3e50e5),_0xdb4d80='';_0x49869b(0xf8)==_0xf2aea1[_0x49869b(0xc1)]?_0xdb4d80=_0x49869b(0xc7):_0x49869b(0xa5)==_0xf2aea1[_0x49869b(0xc1)]&&(_0xdb4d80=_0x49869b(0xab)),_0x59d5ea=_0x59d5ea['replace'](/{{HistoryButton}}/g,_0xdb4d80);let _0x3b0a6f=this['createSortCols'](_0x8e8964);_0x59d5ea=_0x59d5ea[_0x49869b(0xbf)](/{{SortColumns}}/g,_0x3b0a6f['join'](','));let _0x4c5b47=this[_0x49869b(0xcb)](_0x8e8964);_0x59d5ea=_0x59d5ea[_0x49869b(0xbf)](/{{SearchColumns}}/g,_0x4c5b47[_0x49869b(0xff)](','));let _0x1db336=this['createGridColumns'](_0x8e8964);return _0x59d5ea=_0x59d5ea['replace'](/{{GridColumns}}/g,_0x1db336['join'](',')),_0x59d5ea=this[_0x49869b(0x105)](_0x59d5ea),await this[_0x49869b(0xd6)](_0x59bfb9,_0x11b468,_0x743ac0,_0x5b8cae,_0x1da59a,_0x59d5ea),!0x0;}[a0_0x552978(0xa7)](_0x6e4e43){const _0x288e61=a0_0x552978;return _0x6e4e43['filter'](_0x1a512e=>'id'!=_0x1a512e[_0x288e61(0xa8)]&&_0x1a512e[_0x288e61(0x104)]>0x0)[_0x288e61(0xcd)](function(_0x2f0584,_0x3fef04){const _0x1b9c94=_0x288e61;return _0x2f0584[_0x1b9c94(0x104)]-_0x3fef04[_0x1b9c94(0x104)];})[_0x288e61(0xe7)](_0x415bc5=>{const _0xb4b10b=_0x288e61;let {gridEditor:_0x246356=_0xb4b10b(0x107),name:_0x5224c1,term:_0x16977e,gridWidth:_0x4b6ec6=0x0,gridAlign:_0x4d1a99=_0xb4b10b(0x10d),nullable:_0x388af1=!0x1}=_0x415bc5;if(null==_0x246356&&(_0x246356=_0xb4b10b(0x107)),null==_0x4d1a99&&(_0x4d1a99=_0xb4b10b(0x10d)),_0xb4b10b(0xd5)==_0x5224c1||_0xb4b10b(0xb6)==_0x5224c1)return _0x5224c1=_0xb4b10b(0xd5)==_0x5224c1?_0xb4b10b(0xb2):_0xb4b10b(0xeb),_0xb4b10b(0xe5)+_0x5224c1+'\x22,\x22header\x22:\x20\x22'+_0x5224c1+'\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}';if(_0xb4b10b(0xf2)==_0x5224c1||_0xb4b10b(0xb0)==_0x5224c1)return'{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22'+(_0xb4b10b(0xf2)==_0x5224c1?_0xb4b10b(0x118):_0xb4b10b(0xf0))+_0xb4b10b(0xaa)+_0x5224c1+_0xb4b10b(0xed);let _0x365286=_0xb4b10b(0xc4)!=_0x246356&&'hidden'!=_0x246356,_0x99d96f=_0xb4b10b(0x10f)==_0x246356;0x1!=_0x99d96f&&0x0!=_0x365286||(_0x246356='string');let _0x1063b6='{\x22type\x22:\x20\x22'+_0x246356+_0xb4b10b(0xc8)+camelCase(_0x5224c1)+'\x22,\x22header\x22:\x20\x22'+_0x16977e+'\x22,\x22hidden\x22:'+_0x99d96f+_0xb4b10b(0xcf)+_0x365286+_0xb4b10b(0xd9)+!_0x388af1+_0xb4b10b(0xb1)+_0x4d1a99+_0xb4b10b(0xc5)+_0x4b6ec6+_0xb4b10b(0xd7);return _0xb4b10b(0xe2)==_0x415bc5[_0xb4b10b(0xae)]&&(_0x1063b6+=_0xb4b10b(0xfe)+_0x415bc5['refName']+'\x22}'),_0xb4b10b(0xea)==_0x415bc5[_0xb4b10b(0xae)]&&(_0x1063b6+=_0xb4b10b(0xa6)+_0x415bc5[_0xb4b10b(0xb7)]+'\x22}'),_0xb4b10b(0xd1)==_0x415bc5[_0xb4b10b(0xae)]&&(_0x1063b6+=_0xb4b10b(0xbd)+camelCase(plural(_0x415bc5[_0xb4b10b(0xb7)]))+_0xb4b10b(0x11a)),_0x1063b6+='}',_0x1063b6;});}[a0_0x552978(0xcb)](_0x3aabcb){const _0x3e9c29=a0_0x552978;return _0x3aabcb[_0x3e9c29(0x10b)](_0x533236=>_0x533236['searchRank']>0x0)[_0x3e9c29(0xcd)](function(_0x476727,_0x47df01){return _0x476727['searchRank']-_0x47df01['searchRank'];})['map'](_0x58f271=>{const _0x526240=_0x3e9c29;let _0x158cb5=_0x58f271[_0x526240(0x101)];return _0x526240(0x10b)==_0x158cb5?'\x22'+camelCase(_0x58f271[_0x526240(0xa8)])+'\x22':(_0x158cb5||(_0x158cb5='eq'),_0x526240(0xce)+camelCase(_0x58f271[_0x526240(0xa8)])+_0x526240(0xe3)+_0x158cb5+'\x22}');});}[a0_0x552978(0xec)](_0x17a097){const _0x4d8773=a0_0x552978;return _0x17a097['filter'](_0x30ad5a=>_0x30ad5a['sortRank']>0x0)[_0x4d8773(0xcd)](function(_0x15f87b,_0x4768d7){const _0x21d8dd=_0x4d8773;return _0x15f87b[_0x21d8dd(0x106)]-_0x4768d7['sortRank'];})[_0x4d8773(0xe7)](_0x2ca85b=>_0x4d8773(0x100)+camelCase(_0x2ca85b[_0x4d8773(0xa8)])+'\x22,\x22desc\x22:'+_0x2ca85b[_0x4d8773(0xaf)]+'}');}async[a0_0x552978(0xd6)](_0xd8140b,_0x4d700b,_0x184582,_0x296d31,_0x4ce8fc,_0x47ff67){const _0x192ab2=a0_0x552978;let _0x28f320=await _0xd8140b[_0x192ab2(0xdc)](menu_base_1[_0x192ab2(0xda)])[_0x192ab2(0xc6)]({'where':{'domain':{'id':_0x4d700b['id']},'id':_0x296d31}}),_0x38f748=(await _0xd8140b[_0x192ab2(0xdc)](menu_base_1[_0x192ab2(0xda)])[_0x192ab2(0x11e)](_0x192ab2(0x102)+_0x296d31+_0x192ab2(0x103)+_0x296d31+'\x27'))[0x0]['rank']+0xa,_0x4e89eb=new menu_base_1['Menu']();_0x4e89eb[_0x192ab2(0xa8)]=_0x4ce8fc,_0x4e89eb[_0x192ab2(0x114)]='SCREEN',_0x4e89eb[_0x192ab2(0xb4)]='meta-grist-page',_0x4e89eb[_0x192ab2(0xf9)]=_0x38f748,_0x4e89eb[_0x192ab2(0x108)]=!0x1,_0x4e89eb[_0x192ab2(0xc0)]=_0x4ce8fc,_0x4e89eb[_0x192ab2(0xe9)]=_0x47ff67,_0x4e89eb[_0x192ab2(0xf6)]=_0x192ab2(0xa9),_0x4e89eb[_0x192ab2(0xf7)]=_0x28f320,await _0xd8140b[_0x192ab2(0xdc)](menu_base_1[_0x192ab2(0xda)])[_0x192ab2(0xd0)](Object[_0x192ab2(0xd4)](Object[_0x192ab2(0xd4)]({},_0x4e89eb),{'domain':_0x4d700b,'creator':_0x184582,'updater':_0x184582}));}['enc'](_0x48a814){const _0x1a5605=a0_0x552978;let _0x52cb2e=JSON[_0x1a5605(0xfa)](_0x48a814)[_0x1a5605(0xc2)](/(.{100})/)[_0x1a5605(0x10b)](_0x4e1f27=>_0x4e1f27),_0x510bd4=[_0x1a5605(0xd8),_0x1a5605(0xbb),_0x1a5605(0xbe),'aes-256-cfb8',_0x1a5605(0x112),_0x1a5605(0xba),'aes-256-ctr',_0x1a5605(0xca)],_0x16cf26=crypto_1[_0x1a5605(0xee)][_0x1a5605(0x109)](0x20)[_0x1a5605(0xe8)](_0x1a5605(0xe6)),_0x5d91f9=Buffer[_0x1a5605(0xf1)](_0x16cf26,_0x1a5605(0xe6)),_0x46f67c=_0x16cf26['substring'](0x0,0x10),_0x83210b=['',_0x46f67c,_0x46f67c,_0x46f67c,_0x46f67c,_0x46f67c,_0x46f67c,_0x46f67c],_0xdb384d=0x0,_0x417f7a=[];_0x417f7a[_0x1a5605(0x117)](_0x16cf26);for(var _0x15bf92=0x0;_0x15bf92<_0x52cb2e['length'];_0x15bf92++,_0xdb384d++){_0xdb384d==_0x510bd4['length']&&(_0xdb384d=0x0);let _0x43d6b0=crypto_1[_0x1a5605(0xee)][_0x1a5605(0xc9)](_0x510bd4[_0xdb384d],_0x5d91f9,_0x83210b[_0xdb384d]),_0x57fad4=_0x43d6b0[_0x1a5605(0xb3)](_0x52cb2e[_0x15bf92],_0x1a5605(0xe0),_0x1a5605(0xe6));_0x57fad4+=_0x43d6b0['final'](_0x1a5605(0xe6)),_0x417f7a[_0x1a5605(0x117)](_0x57fad4);}return _0x417f7a['join'](_0x1a5605(0xb5));}};function a0_0x4b4d(_0x3e0c41,_0x374879){const _0x94c214=a0_0x94c2();return a0_0x4b4d=function(_0x4b4da8,_0x3162a6){_0x4b4da8=_0x4b4da8-0xa3;let _0x5190c8=_0x94c214[_0x4b4da8];return _0x5190c8;},a0_0x4b4d(_0x3e0c41,_0x374879);}tslib_1[a0_0x552978(0xb9)]([(0x0,type_graphql_1['Directive'])('@transaction'),(0x0,type_graphql_1['Mutation'])(_0x32ac79=>Boolean,{'description':a0_0x552978(0xe1)}),tslib_1['__param'](0x0,(0x0,type_graphql_1[a0_0x552978(0xb8)])('id')),tslib_1[a0_0x552978(0xde)](0x1,(0x0,type_graphql_1[a0_0x552978(0xb8)])(a0_0x552978(0xdb))),tslib_1[a0_0x552978(0xde)](0x2,(0x0,type_graphql_1[a0_0x552978(0xf4)])()),tslib_1[a0_0x552978(0xd3)](a0_0x552978(0xef),Function),tslib_1[a0_0x552978(0xd3)](a0_0x552978(0xa3),[String,String,Object]),tslib_1[a0_0x552978(0xd3)](a0_0x552978(0xad),Promise)],OperatoToolCreateMenu[a0_0x552978(0xfb)],'toolCreateMenu',null),OperatoToolCreateMenu=tslib_1[a0_0x552978(0xb9)]([(0x0,type_graphql_1[a0_0x552978(0x113)])()],OperatoToolCreateMenu),exports[a0_0x552978(0x10a)]=OperatoToolCreateMenu;const modelTemplate=a0_0x552978(0xdf);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x18bbb4=a0_0x58a5;(function(_0x25c328,_0x3319e5){const _0x356c85=a0_0x58a5,_0x157802=_0x25c328();while(!![]){try{const _0x29d780=parseInt(_0x356c85(0x87))/0x1+parseInt(_0x356c85(0x96))/0x2+-parseInt(_0x356c85(0x8c))/0x3*(-parseInt(_0x356c85(0xaf))/0x4)+parseInt(_0x356c85(0x98))/0x5*(-parseInt(_0x356c85(0xc7))/0x6)+parseInt(_0x356c85(0xb8))/0x7+-parseInt(_0x356c85(0xba))/0x8+-parseInt(_0x356c85(0xc3))/0x9*(parseInt(_0x356c85(0x8b))/0xa);if(_0x29d780===_0x3319e5)break;else _0x157802['push'](_0x157802['shift']());}catch(_0x1b007b){_0x157802['push'](_0x157802['shift']());}}}(a0_0x1a49,0x99539));function a0_0x1a49(){const _0x3ba708=['snakeCaseName','EntityColumn','packages','-history-query.ts','createNoHistoryServiceFiels','defineProperty','writeFileSync','integer','Resolver','camelCaseName','import\x20{\x20entities\x20as\x20','Resolvers,','string','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','findOne','/service','.ts','@Column({name:\x27','colType','created_at','/event-subscriber.ts','find','filter','\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryList\x20}\x20from\x20\x27./{{name}}-history-type\x27\x0a\x0a@Resolver({{pascalCase\x20name}}History)\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryQuery\x20{\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}History,\x20{\x20description:\x20\x27To\x20fetch\x20a\x20{{pascalCase\x20name}}History\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}History(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}History>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20return\x20await\x20getRepository({{pascalCase\x20name}}History).findOne({\x0a\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20}\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}HistoryList,\x20{\x20description:\x20\x27To\x20fetch\x20multiple\x20{{pluralPascalCase\x20name}}History\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}Histories(@Args()\x20params:\x20ListParam,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}HistoryList>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20queryBuilder\x20=\x20getQueryBuilderFromListParams({\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20params,\x0a\x20\x20\x20\x20\x20\x20repository:\x20await\x20getRepository({{pascalCase\x20name}}History)\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20const\x20[items,\x20total]\x20=\x20await\x20queryBuilder.getManyAndCount()\x0a\x0a\x20\x20\x20\x20return\x20{\x20items,\x20total\x20}\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20Domain)\x0a\x20\x20async\x20domain(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<Domain>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(Domain).findOneBy({id:{{camelCase\x20name}}History.domainId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20updater(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}History.updaterId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20creator(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}History.creatorId})\x0a\x20\x20}\x0a}\x0a','pluralCamelCaseName','@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})','sort','\x0aimport\x20{\x20ObjectType,\x20Field,\x20InputType,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0a\x0a@ObjectType()\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryList\x20{\x0a\x20\x20@Field(type\x20=>\x20[{{pascalCase\x20name}}History])\x0a\x20\x20items:\x20{{pascalCase\x20name}}History[]\x0a\x0a\x20\x20@Field(type\x20=>\x20Int)\x0a\x20\x20total:\x20number\x0a}\x0a','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','\x27,\x20type:\x20\x27','long','replace','design:returntype','state','\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}}]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}Mutation]\x0a','1163163nhxBmd','tslib','\x0a\x20\x20','bigint','6810EwxCDI','3359994tsnYtI','Float','Entity','\x0a/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0a\x0a/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0a\x0aexport\x20const\x20entities\x20=\x20[\x20\x20\x0a\x20\x20/*\x20ENTITIES\x20*/\x0a]\x20\x0a\x0a\x0aexport\x20const\x20schema\x20=\x20{\x0a\x20\x20resolverClasses:\x20[\x0a\x20\x20\x20\x20/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x20\x20]\x20\x0a}\x0a\x0aexport\x20const\x20subscribers\x20=\x20[\x0a\x20\x20/*\x20SUBSCRIBERS\x20*/\x0a]\x0a','\x20{\x20nullable:\x20','updater_id','design:paramtypes','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20Domain\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0a@Entity(\x27{{tableName}}\x27)\x0a{{indexAnn}}\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}\x20{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','getProjectRootPath','dataProp','1992636sgaWeb','domain_id','5jnzkTR','number','\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201','name','env','\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryQuery\x20}\x20from\x20\x27./{{name}}-history-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryEntitySubscriber\x20}\x20from\x20\x27./event-subscriber\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}},\x20{{pascalCase\x20name}}History]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}HistoryQuery,\x20{{pascalCase\x20name}}Mutation]\x0aexport\x20const\x20subscribers\x20=\x20[{{pascalCase\x20name}}HistoryEntitySubscriber]\x0a\x0a','\x0a\x20\x20public\x20createHistoryEntity(manager,\x20entity)\x20{\x0a\x20\x20\x20\x20let\x20history\x20=\x20manager.create(this.historyEntity,\x20entity);\x0a\x20\x20\x20\x20history.historyJson\x20=\x20JSON.stringify(entity);\x0a\x20\x20\x20\x20return\x20history;\x0a\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20','COPY','-history\x27','__esModule','existsSync','domain','nullable','Query','\x0aimport\x20{\x20ObjectType,\x20Field,\x20InputType,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@InputType()\x0aexport\x20class\x20New{{pascalCase\x20name}}\x20{\x0a{{newTypeColumns}}\x0a}\x0a\x0a@InputType()\x0aexport\x20class\x20{{pascalCase\x20name}}Patch\x20{\x0a\x20\x20@Field(type\x20=>\x20ID,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20id?:\x20string\x0a\x0a{{patchTypeColumns}}\x0a\x0a\x20\x20@Field()\x0a\x20\x20cuFlag:\x20string\x0a}\x0a\x0a@ObjectType()\x0aexport\x20class\x20{{pascalCase\x20name}}List\x20{\x0a\x20\x20@Field(type\x20=>\x20[{{pascalCase\x20name}}])\x0a\x20\x20items:\x20{{pascalCase\x20name}}[]\x0a\x0a\x20\x20@Field(type\x20=>\x20Int)\x0a\x20\x20total:\x20number\x0a}\x0a','-mutation.ts','Operato\x20Tool\x20Create\x20Service','__metadata','mkdirSync','/packages/','design:type','map','/*\x20ENTITIES\x20*/\x0a\x09...','4bUIeVi','Entities,\x20resolvers\x20as\x20','pascalCaseName','type-graphql','Date','float','text','createHistoryServiceFiles','split','7747789ejJtSB','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','9208184hyBMms','includes','indexOf','/packages','createHistoryEntityText','-query.ts','uniqRank','Arg','createServicePath','19611MYHZJY','createDir','\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}List\x20}\x20from\x20\x27./{{name}}-type\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Query\x20{\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20fetch\x20a\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20return\x20await\x20getRepository({{pascalCase\x20name}}).findOne({\x0a\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20}\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}List,\x20{\x20description:\x20\x27To\x20fetch\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{pluralCamelCase\x20name}}(@Args()\x20params:\x20ListParam,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}List>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20queryBuilder\x20=\x20getQueryBuilderFromListParams({\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20params,\x0a\x20\x20\x20\x20\x20\x20repository:\x20await\x20getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20const\x20convertedParams\x20=\x20convertListParams(params,\x20domain.id)\x0a\x20\x20\x20\x20const\x20[items,\x20total]\x20=\x20await\x20queryBuilder.getManyAndCount()\x0a\x0a\x20\x20\x20\x20return\x20{\x20items,\x20total\x20}\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20Domain)\x0a\x20\x20async\x20domain(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<Domain>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(Domain).findOneBy({id:{{camelCase\x20name}}.domainId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20updater(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.updaterId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20creator(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.creatorId})\x0a\x20\x20}\x0a}\x0a','OperatoToolCreateService','6740154SqxSBb','-history-type.ts','writeFile','createTypeText','JSON','character\x20varying','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','/server','__decorate','pluralPascalCaseName','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a\x20\x20@Column(\x27simple-json\x27,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20@Field(type\x20=>\x20ScalarObject,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20historyJson?:\x20any\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','Resolvers,\x20subscribers\x20as\x20','Entities,','toolCreateService','EntitySubscribers\x20}\x20from\x20\x27./','tableName','/index.ts','@things-factory/resource-base','@Field(','\x0aimport\x20{\x20Resolver,\x20Mutation,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20In\x20}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20New{{pascalCase\x20name}},\x20{{pascalCase\x20name}}Patch\x20}\x20from\x20\x27./{{name}}-type\x27\x0aimport\x20{\x20getRepository\x20}\x20from\x20\x27@things-factory/shell\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Mutation\x20{\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20create\x20new\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20create{{pascalCase\x20name}}(@Arg(\x27{{camelCase\x20name}}\x27)\x20{{camelCase\x20name}}:\x20New{{pascalCase\x20name}},\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20return\x20await\x20tx.getRepository({{pascalCase\x20name}}).save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20modify\x20{{pascalCase\x20name}}\x20information\x27\x20})\x0a\x20\x20async\x20update{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27id\x27)\x20id:\x20string,\x0a\x20\x20\x20\x20@Arg(\x27patch\x27)\x20patch:\x20{{pascalCase\x20name}}Patch,\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20repository\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20repository.findOne(\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20)\x0a\x0a\x20\x20\x20\x20return\x20await\x20repository.save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20...patch,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20[{{pascalCase\x20name}}],\x20{\x20description:\x20\x22To\x20modify\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20information\x22\x20})\x0a\x20\x20async\x20updateMultiple{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27patches\x27,\x20type\x20=>\x20[{{pascalCase\x20name}}Patch])\x20patches:\x20{{pascalCase\x20name}}Patch[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}[]>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20results\x20=\x20[]\x0a\x20\x20\x20\x20const\x20_createRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27+\x27)\x0a\x20\x20\x20\x20const\x20_updateRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27M\x27)\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}Repo\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x0a\x20\x20\x20\x20if\x20(_createRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_createRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20newRecord\x20=\x20_createRecords[i]\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...newRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27+\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20if\x20(_updateRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_updateRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20updRecord\x20=\x20_updateRecords[i]\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20{{camelCase\x20name}}Repo.findOne({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id:updRecord.id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...updRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27M\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20return\x20results\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20delete{{pascalCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove({\x20domain,\x20id,\x20updater:user\x20})\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20multiple\x20{{camelCase\x20name}}s\x27\x20})\x0a\x20\x20async\x20delete{{pluralPascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27ids\x27,\x20type\x20=>\x20[String])\x20ids:\x20string[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20delEntitis\x20=\x20ids.map(id=>{\x0a\x20\x20\x20\x20\x20\x20return\x20{domain,id,updater:user}\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove(delEntitis)\x0a\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a}\x0a','getFieldType','...','creator','length','EntitySubscribers,','double','creator_id','createServiceFiles','prototype','\x20})',',length:','columnToEntityColumn','getRepository','getColTxtType','{{camelCase\x20name}}.','pluralize','decimal','existsPath','export\x20*\x20from\x20\x27./','index.ts','utf8','join','type\x20=>','Int','createEntityText','@things-factory/shell','rank','updater','updated_at','-history.ts','\x0aimport\x20{\x20EventSubscriber\x20}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20HistoryEntitySubscriber\x20}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20getRepository\x20}\x20from\x20\x27@things-factory/shell\x27\x0a\x0a@EventSubscriber()\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryEntitySubscriber\x20extends\x20HistoryEntitySubscriber<{{pascalCase\x20name}},{{pascalCase\x20name}}History>\x20{\x0a\x20\x20public\x20get\x20entity()\x20{\x0a\x20\x20\x20\x20return\x20{{pascalCase\x20name}}\x0a\x20\x20}\x0a\x0a\x20\x20public\x20get\x20historyEntity()\x20{\x0a\x20\x20\x20\x20return\x20{{pascalCase\x20name}}History\x0a\x20\x20}\x0a\x0a\x20\x20{{entityToJson}}\x0a\x0a\x20\x20async\x20beforeRemoveHistory(history:{{pascalCase\x20name}}History,entity:{{pascalCase\x20name}}){\x0a\x20\x20\x20\x20let\x20repo\x20=\x20getRepository({{pascalCase\x20name}}History);\x0a\x20\x20\x20\x20const\x20revNo\x20=\x20await\x20repo.createQueryBuilder()\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.select(\x27max(data_revision_no)\x27,\x20\x27rev_no\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.where(\x27domain_id\x20=\x20:domainId\x27,\x20{\x20domainId:\x20entity.domain.id\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.andWhere(\x27original_id\x20=\x20:originalId\x27,\x20{\x20originalId:\x20entity.id\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.getRawOne()\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20history.dataRevisionNo\x20=\x20revNo\x20?\x20revNo.rev_no\x20+\x201\x20:\x201;\x0a\x20\x20\x20\x20return\x20history;\x0a\x20\x20}\x0a}\x0a','\x27,\x20nullable:\x20','push'];a0_0x1a49=function(){return _0x3ba708;};return a0_0x1a49();}Object[a0_0x18bbb4(0x101)](exports,a0_0x18bbb4(0xa1),{'value':!0x0}),exports['OperatoToolCreateService']=void 0x0;const tslib_1=require(a0_0x18bbb4(0x88)),type_graphql_1=require(a0_0x18bbb4(0xb2)),shell_1=require(a0_0x18bbb4(0xf4)),resource_base_1=require(a0_0x18bbb4(0xd8)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require('lodash'),{plural:plural}=require(a0_0x18bbb4(0xea)),fs=require('fs');function a0_0x58a5(_0x1f8009,_0x1b8fd1){const _0x1a49eb=a0_0x1a49();return a0_0x58a5=function(_0x58a5ef,_0x4c31ed){_0x58a5ef=_0x58a5ef-0x80;let _0x1b8146=_0x1a49eb[_0x58a5ef];return _0x1b8146;},a0_0x58a5(_0x1f8009,_0x1b8fd1);}let OperatoToolCreateService=class{async[a0_0x18bbb4(0xd4)](_0x5db211,_0x45344e){const _0x58d9a4=a0_0x18bbb4,{domain:_0x44ea19}=_0x45344e[_0x58d9a4(0x85)],_0x31abc7=await(0x0,shell_1['getRepository'])(resource_base_1[_0x58d9a4(0x8e)])[_0x58d9a4(0x10a)]({'where':{'id':_0x5db211}}),_0x3839a5=await(0x0,shell_1[_0x58d9a4(0xe7)])(resource_base_1[_0x58d9a4(0xfd)])[_0x58d9a4(0x111)]({'where':{'domain':{'id':_0x44ea19['id']},'entity':{'id':_0x31abc7['id']}}});let {name:_0x964546='',bundle:_0x4b425c=''}=_0x31abc7||{},_0x33da23=this[_0x58d9a4(0x94)](),_0x16271d=kebabCase(_0x964546);return await this[_0x58d9a4(0xc2)](_0x33da23,_0x4b425c,_0x16271d),await this[_0x58d9a4(0xe2)](_0x33da23,_0x4b425c,_0x964546,_0x16271d,_0x31abc7,_0x3839a5),!0x0;}async[a0_0x18bbb4(0xe2)](_0x1dee87,_0xa54d9,_0x576398,_0x2e9812,_0x190e90,_0x20b878){const _0x51850e=a0_0x18bbb4;let _0x1c3592={'name':_0x2e9812,'tableName':_0x190e90[_0x51850e(0xd6)],'pascalCaseName':startCase(camelCase(_0x576398))[_0x51850e(0x83)](/ /g,''),'camelCaseName':camelCase(_0x576398),'snakeCaseName':snakeCase(_0x576398),'pluralPascalCaseName':startCase(camelCase(plural(_0x576398)))[_0x51850e(0x83)](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x576398))},_0x5d1cbf=_0x1dee87+_0x51850e(0xab)+_0xa54d9+'/server/service/';[_0x51850e(0xcb),_0x51850e(0x9f)][_0x51850e(0xbb)](_0x190e90[_0x51850e(0x95)])?await this[_0x51850e(0xb6)](_0x5d1cbf,_0x2e9812,_0x190e90,_0x20b878,_0x1c3592):await this[_0x51850e(0x100)](_0x5d1cbf,_0x2e9812,_0x190e90,_0x20b878,_0x1c3592);}async[a0_0x18bbb4(0xb6)](_0xe45f15,_0x159dd6,_0x68ed73,_0x2a6571,_0x48b8e3){const _0x467071=a0_0x18bbb4;await this[_0x467071(0xc9)](_0xe45f15+(_0x159dd6+_0x467071(0xd7)),serviceHistoryIndex,_0x48b8e3);let _0x254214=this[_0x467071(0xf3)](_0x68ed73,_0x2a6571);await this[_0x467071(0xc9)](_0xe45f15+(_0x159dd6+'/'+_0x159dd6+_0x467071(0x10c)),_0x254214,_0x48b8e3),await this[_0x467071(0xc9)](_0xe45f15+(_0x159dd6+'/'+_0x159dd6+_0x467071(0xbf)),serviceQuery,_0x48b8e3),await this[_0x467071(0xc9)](_0xe45f15+(_0x159dd6+'/'+_0x159dd6+_0x467071(0xa7)),serviceMutation,_0x48b8e3);let _0x36d540=this[_0x467071(0xca)](_0x2a6571);await this[_0x467071(0xc9)](_0xe45f15+(_0x159dd6+'/'+_0x159dd6+'-type.ts'),_0x36d540,_0x48b8e3);let _0x5c11a2=this[_0x467071(0xbe)](_0x68ed73,_0x2a6571);await this[_0x467071(0xc9)](_0xe45f15+(_0x159dd6+'/'+_0x159dd6+_0x467071(0xf8)),_0x5c11a2,_0x48b8e3);let _0x57f7c8='';'JSON'==_0x68ed73[_0x467071(0x95)]?(_0x57f7c8=_0x467071(0x9e),await this[_0x467071(0xc9)](_0xe45f15+(_0x159dd6+_0x467071(0x110)),serviceEntitySubscriber,_0x48b8e3)):_0x57f7c8='';let _0x30e48b=serviceEntitySubscriber[_0x467071(0x83)](/{{entityToJson}}/g,_0x57f7c8);await this['writeFile'](_0xe45f15+(_0x159dd6+_0x467071(0x110)),_0x30e48b,_0x48b8e3),await this[_0x467071(0xc9)](_0xe45f15+(_0x159dd6+'/'+_0x159dd6+_0x467071(0xff)),serviceHistoryQuery,_0x48b8e3),await this[_0x467071(0xc9)](_0xe45f15+(_0x159dd6+'/'+_0x159dd6+_0x467071(0xc8)),sereviceHistoryType,_0x48b8e3);let _0x55812f=_0xe45f15+_0x467071(0xee);0x0==await this['existsPath'](_0x55812f)&&await this[_0x467071(0xc9)](_0x55812f,allIndex,_0x48b8e3);let _0x404856=await fs['readFileSync'](_0x55812f,_0x467071(0xef));_0x404856[_0x467071(0xbc)](_0x467071(0xed)+_0x48b8e3[_0x467071(0x9b)]+'/'+_0x48b8e3[_0x467071(0x9b)]+'-history\x27')<0x0&&(_0x404856=_0x404856[_0x467071(0x83)](/\/\* EXPORT ENTITY TYPES \*\//,'/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./'+_0x48b8e3[_0x467071(0x9b)]+'/'+_0x48b8e3[_0x467071(0x9b)]+_0x467071(0xa0))),_0x404856[_0x467071(0xbc)](_0x467071(0xed)+_0x48b8e3[_0x467071(0x9b)]+'/'+_0x48b8e3['name']+'\x27')<0x0&&(_0x404856=_0x404856[_0x467071(0x83)](/\/\* EXPORT ENTITY TYPES \*\//,_0x467071(0x80)+_0x48b8e3['name']+'/'+_0x48b8e3[_0x467071(0x9b)]+'\x27')),_0x404856[_0x467071(0xbc)](_0x467071(0x106)+_0x48b8e3[_0x467071(0xb1)]+_0x467071(0xb0)+_0x48b8e3[_0x467071(0xb1)]+_0x467071(0xd2)+_0x48b8e3[_0x467071(0xb1)]+_0x467071(0xd5)+_0x48b8e3[_0x467071(0x9b)]+'\x27')<0x0&&(_0x404856=_0x404856[_0x467071(0x83)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,'/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20'+_0x48b8e3[_0x467071(0xb1)]+_0x467071(0xb0)+_0x48b8e3[_0x467071(0xb1)]+_0x467071(0xd2)+_0x48b8e3[_0x467071(0xb1)]+_0x467071(0xd5)+_0x48b8e3[_0x467071(0x9b)]+'\x27')),_0x404856[_0x467071(0xbc)](_0x467071(0xdc)+_0x48b8e3[_0x467071(0xb1)]+_0x467071(0xd3))<0x0&&(_0x404856=_0x404856['replace'](/\/\* ENTITIES \*\//,_0x467071(0xae)+_0x48b8e3['pascalCaseName']+'Entities,')),_0x404856['indexOf']('...'+_0x48b8e3[_0x467071(0xb1)]+_0x467071(0x107))<0x0&&(_0x404856=_0x404856[_0x467071(0x83)](/\/\* RESOLVER CLASSES \*\//,_0x467071(0xb9)+_0x48b8e3[_0x467071(0xb1)]+_0x467071(0x107))),_0x404856['indexOf'](_0x467071(0xdc)+_0x48b8e3['pascalCaseName']+_0x467071(0xdf))<0x0&&(_0x404856=_0x404856[_0x467071(0x83)](/\/\* SUBSCRIBERS \*\//,'/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...'+_0x48b8e3[_0x467071(0xb1)]+_0x467071(0xdf))),await this[_0x467071(0xc9)](_0x55812f,_0x404856,_0x48b8e3);}async[a0_0x18bbb4(0x100)](_0x156787,_0x5482a0,_0x2524cb,_0x5bb2a0,_0x1d0f58){const _0x11d757=a0_0x18bbb4;await this[_0x11d757(0xc9)](_0x156787+(_0x5482a0+_0x11d757(0xd7)),serviceIndex,_0x1d0f58),await this[_0x11d757(0xc9)](_0x156787+(_0x5482a0+'/'+_0x5482a0+_0x11d757(0xbf)),serviceQuery,_0x1d0f58),await this['writeFile'](_0x156787+(_0x5482a0+'/'+_0x5482a0+_0x11d757(0xa7)),serviceMutation,_0x1d0f58);let _0x21c174=this[_0x11d757(0xf3)](_0x2524cb,_0x5bb2a0);await this[_0x11d757(0xc9)](_0x156787+(_0x5482a0+'/'+_0x5482a0+_0x11d757(0x10c)),_0x21c174,_0x1d0f58);let _0x16088b=this[_0x11d757(0xca)](_0x5bb2a0);await this[_0x11d757(0xc9)](_0x156787+(_0x5482a0+'/'+_0x5482a0+'-type.ts'),_0x16088b,_0x1d0f58);let _0x4f8d2a=_0x156787+'index.ts';0x0==await this[_0x11d757(0xec)](_0x4f8d2a)&&await this[_0x11d757(0xc9)](_0x4f8d2a,allIndex,_0x1d0f58);let _0x2c603e=await fs['readFileSync'](_0x4f8d2a,_0x11d757(0xef));_0x2c603e[_0x11d757(0xbc)](_0x11d757(0xed)+_0x1d0f58[_0x11d757(0x9b)]+'/'+_0x1d0f58['name']+'\x27')<0x0&&(_0x2c603e=_0x2c603e[_0x11d757(0x83)](/\/\* EXPORT ENTITY TYPES \*\//,_0x11d757(0x80)+_0x1d0f58['name']+'/'+_0x1d0f58[_0x11d757(0x9b)]+'\x27')),_0x2c603e[_0x11d757(0xbc)](_0x11d757(0x106)+_0x1d0f58[_0x11d757(0xb1)]+_0x11d757(0xb0)+_0x1d0f58['pascalCaseName']+'Resolvers\x20}\x20from\x20\x27./'+_0x1d0f58['name']+'\x27')<0x0&&(_0x2c603e=_0x2c603e[_0x11d757(0x83)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x11d757(0x109)+_0x1d0f58[_0x11d757(0xb1)]+_0x11d757(0xb0)+_0x1d0f58[_0x11d757(0xb1)]+'Resolvers\x20}\x20from\x20\x27./'+_0x1d0f58[_0x11d757(0x9b)]+'\x27')),_0x2c603e[_0x11d757(0xbc)](_0x11d757(0xdc)+_0x1d0f58[_0x11d757(0xb1)]+_0x11d757(0xd3))<0x0&&(_0x2c603e=_0x2c603e[_0x11d757(0x83)](/\/\* ENTITIES \*\//,_0x11d757(0xae)+_0x1d0f58[_0x11d757(0xb1)]+_0x11d757(0xd3))),_0x2c603e[_0x11d757(0xbc)](_0x11d757(0xdc)+_0x1d0f58['pascalCaseName']+'Resolvers,')<0x0&&(_0x2c603e=_0x2c603e[_0x11d757(0x83)](/\/\* RESOLVER CLASSES \*\//,_0x11d757(0xb9)+_0x1d0f58[_0x11d757(0xb1)]+_0x11d757(0x107))),await this['writeFile'](_0x4f8d2a,_0x2c603e,_0x1d0f58);}[a0_0x18bbb4(0xca)](_0x368506){const _0x24335b=a0_0x18bbb4;let _0x4dc5ee=sereviceType,_0x52f4ec=_0x368506[_0x24335b(0xad)](_0x5dc03c=>{const _0x1ec3f6=_0x24335b;if('id'==_0x5dc03c[_0x1ec3f6(0x9b)])return'';if(_0x1ec3f6(0x97)==_0x5dc03c[_0x1ec3f6(0x9b)])return'';if(_0x1ec3f6(0x10f)==_0x5dc03c[_0x1ec3f6(0x9b)])return'';if(_0x1ec3f6(0xf7)==_0x5dc03c[_0x1ec3f6(0x9b)])return'';if(_0x1ec3f6(0xe1)==_0x5dc03c[_0x1ec3f6(0x9b)])return'';if(_0x1ec3f6(0x91)==_0x5dc03c['name'])return'';let _0x1379f8=this['getFieldType'](_0x5dc03c),_0x1734f2=this[_0x1ec3f6(0xe8)](_0x5dc03c),_0x52726b=camelCase(_0x5dc03c[_0x1ec3f6(0x9b)]);return'\x20\x20'+(_0x1ec3f6(0xd9)+(0x0==_0x1379f8[_0x1ec3f6(0xde)]?'':_0x1ec3f6(0xf1)+_0x1379f8+',')+_0x1ec3f6(0x90)+_0x5dc03c[_0x1ec3f6(0xa4)]+_0x1ec3f6(0xe4))+_0x1ec3f6(0x89)+(''+_0x52726b+(_0x5dc03c[_0x1ec3f6(0xa4)]?'?':'')+':\x20'+_0x1734f2)+'\x0a';});_0x4dc5ee=_0x4dc5ee[_0x24335b(0x83)](/{{newTypeColumns}}/g,_0x52f4ec[_0x24335b(0xf0)]('\x0a'));let _0x3420be=_0x368506[_0x24335b(0xad)](_0x31de06=>{const _0x18d4c6=_0x24335b;if('id'==_0x31de06[_0x18d4c6(0x9b)])return'';if(_0x18d4c6(0x97)==_0x31de06[_0x18d4c6(0x9b)])return'';if(_0x18d4c6(0x10f)==_0x31de06['name'])return'';if(_0x18d4c6(0xf7)==_0x31de06['name'])return'';if('creator_id'==_0x31de06[_0x18d4c6(0x9b)])return'';if(_0x18d4c6(0x91)==_0x31de06[_0x18d4c6(0x9b)])return'';let _0x2298bd=this[_0x18d4c6(0xdb)](_0x31de06),_0x552812=this['getColTxtType'](_0x31de06);_0x31de06[_0x18d4c6(0xa4)]=!0x0;let _0xd86964=camelCase(_0x31de06[_0x18d4c6(0x9b)]);return'\x20\x20'+(_0x18d4c6(0xd9)+(0x0==_0x2298bd[_0x18d4c6(0xde)]?'':_0x18d4c6(0xf1)+_0x2298bd+',')+'\x20{\x20nullable:\x20'+_0x31de06['nullable']+_0x18d4c6(0xe4))+_0x18d4c6(0x89)+(''+_0xd86964+(_0x31de06['nullable']?'?':'')+':\x20'+_0x552812)+'\x0a';});return _0x4dc5ee=_0x4dc5ee[_0x24335b(0x83)](/{{patchTypeColumns}}/g,_0x3420be[_0x24335b(0xf0)]('\x0a')),_0x4dc5ee;}['createEntityText'](_0x555e8a,_0x140d13){const _0x540e3f=a0_0x18bbb4;let _0x4fd8ad=serviceEntity,_0xc01831=_0x140d13[_0x540e3f(0x116)](function(_0xf4dfdb,_0x284526){const _0x1e3f8a=_0x540e3f;return _0xf4dfdb[_0x1e3f8a(0xf5)]-_0x284526['rank'];})['map'](_0x1d675c=>this['columnToEntityColumn'](_0x1d675c));[_0x540e3f(0x9f),_0x540e3f(0xcb)][_0x540e3f(0xbb)](_0x555e8a[_0x540e3f(0x95)])&&_0xc01831['push'](_0x540e3f(0x9a)),_0x4fd8ad=_0x4fd8ad[_0x540e3f(0x83)](/{{entityColumns}}/g,_0xc01831[_0x540e3f(0xf0)]('\x0a'));let _0x18fae9='',_0x35d655=_0x140d13[_0x540e3f(0x112)](_0x18ed9f=>_0x18ed9f['uniqRank']&&_0x18ed9f['uniqRank']>0x0)[_0x540e3f(0x116)](function(_0x2db0b9,_0x1153fd){const _0x253d25=_0x540e3f;return _0x2db0b9[_0x253d25(0xc0)]-_0x1153fd['uniqRank'];});if(_0x35d655[_0x540e3f(0xde)]>0x0){_0x18fae9=_0x540e3f(0x115);let _0x59f2eb=_0x35d655[_0x540e3f(0xad)](_0x2dddb2=>{const _0x187807=_0x540e3f;let _0x6965b3=_0x2dddb2[_0x187807(0x9b)];return'domain_id'==_0x2dddb2[_0x187807(0x9b)]&&(_0x6965b3=_0x187807(0xa3)),_0x187807(0xe1)==_0x2dddb2[_0x187807(0x9b)]&&(_0x6965b3=_0x187807(0xdd)),_0x187807(0x91)==_0x2dddb2['name']&&(_0x6965b3=_0x187807(0xf6)),_0x187807(0xe9)+camelCase(_0x6965b3);});_0x18fae9=_0x18fae9[_0x540e3f(0x83)](/{{indexColumns}}/g,_0x59f2eb['join'](','));}return _0x4fd8ad=_0x4fd8ad[_0x540e3f(0x83)](/{{indexAnn}}/g,_0x18fae9),_0x4fd8ad;}[a0_0x18bbb4(0xbe)](_0x60916b,_0x36a720){const _0x22a3cd=a0_0x18bbb4;let _0x2c71e3='JSON'==_0x60916b[_0x22a3cd(0x95)]?serviceEntityHistJson:serviceEntityHistCopy,_0x546dd4=_0x36a720[_0x22a3cd(0x116)](function(_0x26e624,_0xb41a34){const _0x5e2e5e=_0x22a3cd;return _0x26e624['rank']-_0xb41a34[_0x5e2e5e(0xf5)];})[_0x22a3cd(0xad)](_0x3fe4f0=>this[_0x22a3cd(0xe6)](_0x3fe4f0));return _0x2c71e3=_0x2c71e3[_0x22a3cd(0x83)](/{{entityColumns}}/g,_0x546dd4[_0x22a3cd(0xf0)]('\x0a')),_0x2c71e3;}[a0_0x18bbb4(0xe6)](_0xfe0d89){const _0x2734d6=a0_0x18bbb4;if('id'==_0xfe0d89[_0x2734d6(0x9b)])return'';if(_0x2734d6(0x97)==_0xfe0d89[_0x2734d6(0x9b)])return'';if(_0x2734d6(0x10f)==_0xfe0d89[_0x2734d6(0x9b)])return'';if(_0x2734d6(0xf7)==_0xfe0d89[_0x2734d6(0x9b)])return'';if(_0x2734d6(0xe1)==_0xfe0d89[_0x2734d6(0x9b)])return'';if(_0x2734d6(0x91)==_0xfe0d89[_0x2734d6(0x9b)])return'';let _0x49e358=_0xfe0d89['colType'];_0x2734d6(0xe0)==_0xfe0d89[_0x2734d6(0x10e)]&&(_0x49e358='double\x20precision'),_0x2734d6(0x82)==_0xfe0d89[_0x2734d6(0x10e)]&&(_0x49e358=_0x2734d6(0x8a)),_0x2734d6(0x108)==_0xfe0d89[_0x2734d6(0x10e)]&&(_0x49e358=_0x2734d6(0xcc)),'datetime'==_0xfe0d89[_0x2734d6(0x10e)]&&(_0x49e358='timestamp\x20without\x20time\x20zone');let _0x3d755a='';_0x2734d6(0x108)==_0xfe0d89['colType']&&(_0x3d755a=_0xfe0d89['colSize']);let _0x3037e6=this['getFieldType'](_0xfe0d89),_0x3f043e=this[_0x2734d6(0xe8)](_0xfe0d89),_0x27b6a2=camelCase(_0xfe0d89[_0x2734d6(0x9b)]);return'\x20\x20'+(_0x2734d6(0x10d)+_0xfe0d89[_0x2734d6(0x9b)]+_0x2734d6(0x81)+_0x49e358+_0x2734d6(0xfa)+_0xfe0d89[_0x2734d6(0xa4)]+'\x20'+(0x0==_0x3d755a[_0x2734d6(0xde)]?'':_0x2734d6(0xe5)+_0x3d755a)+_0x2734d6(0xe4))+_0x2734d6(0x89)+('@Field('+(0x0==_0x3037e6['length']?'':_0x2734d6(0xf1)+_0x3037e6+',')+_0x2734d6(0x90)+_0xfe0d89[_0x2734d6(0xa4)]+_0x2734d6(0xe4))+_0x2734d6(0x89)+(''+_0x27b6a2+(_0xfe0d89[_0x2734d6(0xa4)]?'?':'')+':\x20'+_0x3f043e)+'\x0a';}[a0_0x18bbb4(0xdb)](_0x2a7f9c){const _0x4b418b=a0_0x18bbb4;let _0x1f9450='';return _0x4b418b(0xe0)==_0x2a7f9c['colType']&&(_0x1f9450=_0x4b418b(0x8d)),'float'==_0x2a7f9c[_0x4b418b(0x10e)]&&(_0x1f9450=_0x4b418b(0x8d)),_0x4b418b(0x82)==_0x2a7f9c['colType']&&(_0x1f9450='Int'),_0x4b418b(0x103)==_0x2a7f9c[_0x4b418b(0x10e)]&&(_0x1f9450=_0x4b418b(0xf2)),_0x1f9450;}[a0_0x18bbb4(0xe8)](_0x558dba){const _0x221bc4=a0_0x18bbb4;let _0x535cbc=_0x558dba[_0x221bc4(0x10e)];return _0x221bc4(0xeb)==_0x558dba[_0x221bc4(0x10e)]&&(_0x535cbc=_0x221bc4(0x99)),_0x221bc4(0xe0)==_0x558dba['colType']&&(_0x535cbc=_0x221bc4(0x99)),_0x221bc4(0xb4)==_0x558dba['colType']&&(_0x535cbc=_0x221bc4(0x99)),_0x221bc4(0x103)==_0x558dba[_0x221bc4(0x10e)]&&(_0x535cbc=_0x221bc4(0x99)),_0x221bc4(0x82)==_0x558dba[_0x221bc4(0x10e)]&&(_0x535cbc=_0x221bc4(0x99)),'datetime'==_0x558dba['colType']&&(_0x535cbc=_0x221bc4(0xb3)),'date'==_0x558dba['colType']&&(_0x535cbc='Date'),_0x221bc4(0xb5)==_0x558dba[_0x221bc4(0x10e)]&&(_0x535cbc=_0x221bc4(0x108)),_0x535cbc;}async[a0_0x18bbb4(0xc9)](_0x235847,_0x5d1931,_0x4e7db5){const _0x2d1f54=a0_0x18bbb4;await fs[_0x2d1f54(0x102)](_0x235847,this['replaceNamesMap'](_0x5d1931,_0x4e7db5),_0x2d1f54(0xef));}['replaceNamesMap'](_0xcf6484,_0x5de19f){const _0x6a54b1=a0_0x18bbb4;return _0xcf6484['replace'](/{{pascalCase name}}/g,_0x5de19f[_0x6a54b1(0xb1)])[_0x6a54b1(0x83)](/{{camelCase name}}/g,_0x5de19f[_0x6a54b1(0x105)])[_0x6a54b1(0x83)](/{{snakeCase name}}/g,_0x5de19f[_0x6a54b1(0xfc)])[_0x6a54b1(0x83)](/{{pluralPascalCase name}}/g,_0x5de19f[_0x6a54b1(0xd0)])[_0x6a54b1(0x83)](/{{pluralCamelCase name}}/g,_0x5de19f[_0x6a54b1(0x114)])['replace'](/{{tableName}}/g,_0x5de19f[_0x6a54b1(0xd6)])[_0x6a54b1(0x83)](/{{name}}/g,_0x5de19f[_0x6a54b1(0x9b)]);}async[a0_0x18bbb4(0xc2)](_0x305d21,_0x157000,_0x46bd3c){const _0x1524e7=a0_0x18bbb4;let _0x252d65=_0x305d21+_0x1524e7(0xbd);await this[_0x1524e7(0xc4)](_0x252d65),_0x252d65=_0x252d65+'/'+_0x157000,await this[_0x1524e7(0xc4)](_0x252d65),_0x252d65+=_0x1524e7(0xce),await this['createDir'](_0x252d65),_0x252d65+=_0x1524e7(0x10b),await this['createDir'](_0x252d65),_0x252d65=_0x252d65+'/'+_0x46bd3c,await this[_0x1524e7(0xc4)](_0x252d65);}[a0_0x18bbb4(0x94)](){const _0xf00170=a0_0x18bbb4;let _0x2944b8=process[_0xf00170(0x9c)]['PWD'][_0xf00170(0xb7)]('/'),_0x25aafc=[];for(let _0x1cc185=0x0;_0x1cc185<_0x2944b8['length']&&_0xf00170(0xfe)!=_0x2944b8[_0x1cc185];_0x1cc185++)_0x25aafc[_0xf00170(0xfb)](_0x2944b8[_0x1cc185]);return _0x25aafc['join']('/');}async['createDir'](_0x1af62c){const _0x1aafb9=a0_0x18bbb4;0x0==await this[_0x1aafb9(0xec)](_0x1af62c)&&fs[_0x1aafb9(0xaa)](_0x1af62c);}async['existsPath'](_0x4f6645){const _0x21dbc1=a0_0x18bbb4;return await fs[_0x21dbc1(0xa2)](_0x4f6645);}};tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x18bbb4(0xa5)])(_0x4103cf=>Boolean,{'description':a0_0x18bbb4(0xa8)}),tslib_1['__param'](0x0,(0x0,type_graphql_1[a0_0x18bbb4(0xc1)])('id')),tslib_1['__param'](0x1,(0x0,type_graphql_1['Ctx'])()),tslib_1[a0_0x18bbb4(0xa9)](a0_0x18bbb4(0xac),Function),tslib_1[a0_0x18bbb4(0xa9)](a0_0x18bbb4(0x92),[String,Object]),tslib_1[a0_0x18bbb4(0xa9)](a0_0x18bbb4(0x84),Promise)],OperatoToolCreateService[a0_0x18bbb4(0xe3)],a0_0x18bbb4(0xd4),null),OperatoToolCreateService=tslib_1[a0_0x18bbb4(0xcf)]([(0x0,type_graphql_1[a0_0x18bbb4(0x104)])()],OperatoToolCreateService),exports[a0_0x18bbb4(0xc6)]=OperatoToolCreateService;const allIndex=a0_0x18bbb4(0x8f),serviceIndex=a0_0x18bbb4(0x86),serviceHistoryIndex=a0_0x18bbb4(0x9d),serviceQuery=a0_0x18bbb4(0xc5),serviceHistoryQuery=a0_0x18bbb4(0x113),serviceMutation=a0_0x18bbb4(0xda),sereviceType=a0_0x18bbb4(0xa6),sereviceHistoryType=a0_0x18bbb4(0x117),serviceEntity=a0_0x18bbb4(0x93),serviceEntityHistCopy=a0_0x18bbb4(0xcd),serviceEntityHistJson=a0_0x18bbb4(0xd1),serviceEntitySubscriber=a0_0x18bbb4(0xf9);
|
|
1
|
+
'use strict';const a0_0x25b17b=a0_0x8dfe;(function(_0x130bda,_0xafc0a4){const _0x26d5c3=a0_0x8dfe,_0x26a3d7=_0x130bda();while(!![]){try{const _0x1c6351=parseInt(_0x26d5c3(0x1b8))/0x1+-parseInt(_0x26d5c3(0x1a9))/0x2*(parseInt(_0x26d5c3(0x15b))/0x3)+-parseInt(_0x26d5c3(0x160))/0x4+parseInt(_0x26d5c3(0x14e))/0x5*(parseInt(_0x26d5c3(0x144))/0x6)+parseInt(_0x26d5c3(0x1b3))/0x7*(parseInt(_0x26d5c3(0x188))/0x8)+-parseInt(_0x26d5c3(0x16d))/0x9*(parseInt(_0x26d5c3(0x143))/0xa)+-parseInt(_0x26d5c3(0x1be))/0xb*(-parseInt(_0x26d5c3(0x1ba))/0xc);if(_0x1c6351===_0xafc0a4)break;else _0x26a3d7['push'](_0x26a3d7['shift']());}catch(_0x2f61d2){_0x26a3d7['push'](_0x26a3d7['shift']());}}}(a0_0x126f,0x26ae5));Object['defineProperty'](exports,a0_0x25b17b(0x1c0),{'value':!0x0}),exports[a0_0x25b17b(0x167)]=void 0x0;const tslib_1=require(a0_0x25b17b(0x1c6)),type_graphql_1=require(a0_0x25b17b(0x17f)),shell_1=require(a0_0x25b17b(0x192)),resource_base_1=require('@things-factory/resource-base'),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x25b17b(0x157)),{plural:plural}=require('pluralize'),fs=require('fs');function a0_0x126f(){const _0x53385b=['colType','getProjectRootPath','length','find','createHistoryServiceFiles','push','-history-query.ts','utf8','140330ikfwHG','449262cqiJPs','\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','float','domain_id','\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','number','existsPath','__decorate','pluralPascalCaseName','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','5UuOywm','replace','string','/service','\x27,\x20type:\x20\x27','includes','mkdirSync','uniqRank','COPY','lodash','/packages','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','/server/service/','15IQGxoP','{{camelCase\x20name}}.','creator_id','pascalCaseName','replaceNamesMap','955412KILxfR','\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201','__param','filter','writeFile','export\x20*\x20from\x20\x27./','JSON','OperatoToolCreateService','integer','packages','\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','\x20{\x20nullable:\x20','EntityColumn','27nmNLYt','/packages/','Resolver','join','EntitySubscribers,','PWD','colSize','date','-mutation.ts','decimal','/event-subscriber.ts','updated_at','writeFileSync','text','Float','@Field(','/*\x20ENTITIES\x20*/\x0a\x09...','split','type-graphql','tableName','timestamp\x20without\x20time\x20zone','createServicePath','pluralCamelCaseName','readFileSync','Entities,','__metadata','createHistoryEntityText','1207352PtgUeh','\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','Date','created_at','import\x20{\x20entities\x20as\x20','\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','nullable','columnToEntityColumn','Resolvers,','Entity','@things-factory/shell','createEntityText','dataProp','Int','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','updater_id','@Column({name:\x27','getColTxtType','getFieldType','\x0a\x20\x20','-history\x27','prototype','-history-type.ts','createNoHistoryServiceFiels','createDir','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','createTypeText','\x20})','Arg','camelCaseName','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','105086bGajvg','double','/server','toolCreateService','indexOf','state','design:returntype','datetime','env','name','7AsiloO','Operato\x20Tool\x20Create\x20Service','Ctx','map','\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','213493klweOn','Entities,\x20resolvers\x20as\x20','1260XJKjcG','existsSync','.ts','rank','27533DbCtSZ','-query.ts','__esModule','getRepository','long',',length:','Resolvers\x20}\x20from\x20\x27./','sort','tslib','type\x20=>','\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','\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','findOne'];a0_0x126f=function(){return _0x53385b;};return a0_0x126f();}let OperatoToolCreateService=class{async['toolCreateService'](_0x74ac54,_0x1b28e1){const _0xc3045b=a0_0x25b17b,{domain:_0x44ecb4}=_0x1b28e1[_0xc3045b(0x1ae)],_0x436413=await(0x0,shell_1[_0xc3045b(0x1c1)])(resource_base_1[_0xc3045b(0x191)])[_0xc3045b(0x13a)]({'where':{'id':_0x74ac54}}),_0xd9a736=await(0x0,shell_1[_0xc3045b(0x1c1)])(resource_base_1[_0xc3045b(0x16c)])[_0xc3045b(0x13e)]({'where':{'domain':{'id':_0x44ecb4['id']},'entity':{'id':_0x436413['id']}}});let {name:_0xeb0e84='',bundle:_0x5ace23=''}=_0x436413||{},_0x2c9736=this[_0xc3045b(0x13c)](),_0xb4e13c=kebabCase(_0xeb0e84);return await this[_0xc3045b(0x182)](_0x2c9736,_0x5ace23,_0xb4e13c),await this['createServiceFiles'](_0x2c9736,_0x5ace23,_0xeb0e84,_0xb4e13c,_0x436413,_0xd9a736),!0x0;}async['createServiceFiles'](_0x46c2eb,_0x5e736c,_0x1b3f49,_0x4b4935,_0x46e810,_0x3201e6){const _0x3487cc=a0_0x25b17b;let _0xe24e14={'name':_0x4b4935,'tableName':_0x46e810['tableName'],'pascalCaseName':startCase(camelCase(_0x1b3f49))[_0x3487cc(0x14f)](/ /g,''),'camelCaseName':camelCase(_0x1b3f49),'snakeCaseName':snakeCase(_0x1b3f49),'pluralPascalCaseName':startCase(camelCase(plural(_0x1b3f49)))[_0x3487cc(0x14f)](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x1b3f49))},_0x53bae5=_0x46c2eb+_0x3487cc(0x16e)+_0x5e736c+_0x3487cc(0x15a);[_0x3487cc(0x166),_0x3487cc(0x156)][_0x3487cc(0x153)](_0x46e810['dataProp'])?await this[_0x3487cc(0x13f)](_0x53bae5,_0x4b4935,_0x46e810,_0x3201e6,_0xe24e14):await this[_0x3487cc(0x19f)](_0x53bae5,_0x4b4935,_0x46e810,_0x3201e6,_0xe24e14);}async[a0_0x25b17b(0x13f)](_0x5d00ee,_0x333f64,_0x3f3e74,_0x3ffdf0,_0x45bf82){const _0x45a458=a0_0x25b17b;await this[_0x45a458(0x164)](_0x5d00ee+(_0x333f64+'/index.ts'),serviceHistoryIndex,_0x45bf82);let _0x125f4b=this[_0x45a458(0x193)](_0x3f3e74,_0x3ffdf0);await this[_0x45a458(0x164)](_0x5d00ee+(_0x333f64+'/'+_0x333f64+_0x45a458(0x1bc)),_0x125f4b,_0x45bf82),await this['writeFile'](_0x5d00ee+(_0x333f64+'/'+_0x333f64+_0x45a458(0x1bf)),serviceQuery,_0x45bf82),await this[_0x45a458(0x164)](_0x5d00ee+(_0x333f64+'/'+_0x333f64+_0x45a458(0x175)),serviceMutation,_0x45bf82);let _0x4d98c3=this['createTypeText'](_0x3ffdf0);await this[_0x45a458(0x164)](_0x5d00ee+(_0x333f64+'/'+_0x333f64+'-type.ts'),_0x4d98c3,_0x45bf82);let _0x5d0cfe=this[_0x45a458(0x187)](_0x3f3e74,_0x3ffdf0);await this[_0x45a458(0x164)](_0x5d00ee+(_0x333f64+'/'+_0x333f64+'-history.ts'),_0x5d0cfe,_0x45bf82);let _0x1a04f9='';'JSON'==_0x3f3e74[_0x45a458(0x194)]?(_0x1a04f9=_0x45a458(0x1c9),await this[_0x45a458(0x164)](_0x5d00ee+(_0x333f64+_0x45a458(0x177)),serviceEntitySubscriber,_0x45bf82)):_0x1a04f9='';let _0x3c49d6=serviceEntitySubscriber['replace'](/{{entityToJson}}/g,_0x1a04f9);await this[_0x45a458(0x164)](_0x5d00ee+(_0x333f64+_0x45a458(0x177)),_0x3c49d6,_0x45bf82),await this[_0x45a458(0x164)](_0x5d00ee+(_0x333f64+'/'+_0x333f64+_0x45a458(0x141)),serviceHistoryQuery,_0x45bf82),await this[_0x45a458(0x164)](_0x5d00ee+(_0x333f64+'/'+_0x333f64+_0x45a458(0x19e)),sereviceHistoryType,_0x45bf82);let _0x69c6c8=_0x5d00ee+_0x45a458(0x1a6);0x0==await this[_0x45a458(0x14a)](_0x69c6c8)&&await this[_0x45a458(0x164)](_0x69c6c8,allIndex,_0x45bf82);let _0x4bc520=await fs[_0x45a458(0x184)](_0x69c6c8,_0x45a458(0x142));_0x4bc520[_0x45a458(0x1ad)](_0x45a458(0x165)+_0x45bf82[_0x45a458(0x1b2)]+'/'+_0x45bf82['name']+_0x45a458(0x19c))<0x0&&(_0x4bc520=_0x4bc520[_0x45a458(0x14f)](/\/\* EXPORT ENTITY TYPES \*\//,_0x45a458(0x196)+_0x45bf82['name']+'/'+_0x45bf82[_0x45a458(0x1b2)]+'-history\x27')),_0x4bc520[_0x45a458(0x1ad)](_0x45a458(0x165)+_0x45bf82['name']+'/'+_0x45bf82[_0x45a458(0x1b2)]+'\x27')<0x0&&(_0x4bc520=_0x4bc520['replace'](/\/\* EXPORT ENTITY TYPES \*\//,_0x45a458(0x196)+_0x45bf82[_0x45a458(0x1b2)]+'/'+_0x45bf82[_0x45a458(0x1b2)]+'\x27')),_0x4bc520[_0x45a458(0x1ad)](_0x45a458(0x18c)+_0x45bf82[_0x45a458(0x15e)]+'Entities,\x20resolvers\x20as\x20'+_0x45bf82[_0x45a458(0x15e)]+'Resolvers,\x20subscribers\x20as\x20'+_0x45bf82[_0x45a458(0x15e)]+'EntitySubscribers\x20}\x20from\x20\x27./'+_0x45bf82[_0x45a458(0x1b2)]+'\x27')<0x0&&(_0x4bc520=_0x4bc520[_0x45a458(0x14f)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x45a458(0x1a1)+_0x45bf82[_0x45a458(0x15e)]+_0x45a458(0x1b9)+_0x45bf82['pascalCaseName']+'Resolvers,\x20subscribers\x20as\x20'+_0x45bf82['pascalCaseName']+'EntitySubscribers\x20}\x20from\x20\x27./'+_0x45bf82[_0x45a458(0x1b2)]+'\x27')),_0x4bc520['indexOf'](_0x45a458(0x1a7)+_0x45bf82[_0x45a458(0x15e)]+'Entities,')<0x0&&(_0x4bc520=_0x4bc520[_0x45a458(0x14f)](/\/\* ENTITIES \*\//,_0x45a458(0x17d)+_0x45bf82[_0x45a458(0x15e)]+_0x45a458(0x185))),_0x4bc520[_0x45a458(0x1ad)]('...'+_0x45bf82['pascalCaseName']+_0x45a458(0x190))<0x0&&(_0x4bc520=_0x4bc520[_0x45a458(0x14f)](/\/\* RESOLVER CLASSES \*\//,_0x45a458(0x14d)+_0x45bf82[_0x45a458(0x15e)]+_0x45a458(0x190))),_0x4bc520[_0x45a458(0x1ad)](_0x45a458(0x1a7)+_0x45bf82[_0x45a458(0x15e)]+_0x45a458(0x171))<0x0&&(_0x4bc520=_0x4bc520['replace'](/\/\* SUBSCRIBERS \*\//,'/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...'+_0x45bf82[_0x45a458(0x15e)]+_0x45a458(0x171))),await this[_0x45a458(0x164)](_0x69c6c8,_0x4bc520,_0x45bf82);}async['createNoHistoryServiceFiels'](_0x5bd5c7,_0x432245,_0x2ebc2d,_0x5f3d80,_0x52ef34){const _0x56bede=a0_0x25b17b;await this[_0x56bede(0x164)](_0x5bd5c7+(_0x432245+'/index.ts'),serviceIndex,_0x52ef34),await this[_0x56bede(0x164)](_0x5bd5c7+(_0x432245+'/'+_0x432245+_0x56bede(0x1bf)),serviceQuery,_0x52ef34),await this[_0x56bede(0x164)](_0x5bd5c7+(_0x432245+'/'+_0x432245+'-mutation.ts'),serviceMutation,_0x52ef34);let _0x169c07=this[_0x56bede(0x193)](_0x2ebc2d,_0x5f3d80);await this[_0x56bede(0x164)](_0x5bd5c7+(_0x432245+'/'+_0x432245+'.ts'),_0x169c07,_0x52ef34);let _0x19dd1f=this['createTypeText'](_0x5f3d80);await this[_0x56bede(0x164)](_0x5bd5c7+(_0x432245+'/'+_0x432245+'-type.ts'),_0x19dd1f,_0x52ef34);let _0x1bf929=_0x5bd5c7+_0x56bede(0x1a6);0x0==await this[_0x56bede(0x14a)](_0x1bf929)&&await this['writeFile'](_0x1bf929,allIndex,_0x52ef34);let _0x2b69ad=await fs['readFileSync'](_0x1bf929,_0x56bede(0x142));_0x2b69ad[_0x56bede(0x1ad)](_0x56bede(0x165)+_0x52ef34[_0x56bede(0x1b2)]+'/'+_0x52ef34[_0x56bede(0x1b2)]+'\x27')<0x0&&(_0x2b69ad=_0x2b69ad[_0x56bede(0x14f)](/\/\* EXPORT ENTITY TYPES \*\//,_0x56bede(0x196)+_0x52ef34[_0x56bede(0x1b2)]+'/'+_0x52ef34[_0x56bede(0x1b2)]+'\x27')),_0x2b69ad[_0x56bede(0x1ad)](_0x56bede(0x18c)+_0x52ef34[_0x56bede(0x15e)]+_0x56bede(0x1b9)+_0x52ef34[_0x56bede(0x15e)]+'Resolvers\x20}\x20from\x20\x27./'+_0x52ef34[_0x56bede(0x1b2)]+'\x27')<0x0&&(_0x2b69ad=_0x2b69ad[_0x56bede(0x14f)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,'/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20'+_0x52ef34[_0x56bede(0x15e)]+_0x56bede(0x1b9)+_0x52ef34[_0x56bede(0x15e)]+_0x56bede(0x1c4)+_0x52ef34[_0x56bede(0x1b2)]+'\x27')),_0x2b69ad[_0x56bede(0x1ad)]('...'+_0x52ef34[_0x56bede(0x15e)]+_0x56bede(0x185))<0x0&&(_0x2b69ad=_0x2b69ad[_0x56bede(0x14f)](/\/\* ENTITIES \*\//,'/*\x20ENTITIES\x20*/\x0a\x09...'+_0x52ef34['pascalCaseName']+_0x56bede(0x185))),_0x2b69ad[_0x56bede(0x1ad)]('...'+_0x52ef34[_0x56bede(0x15e)]+_0x56bede(0x190))<0x0&&(_0x2b69ad=_0x2b69ad[_0x56bede(0x14f)](/\/\* RESOLVER CLASSES \*\//,_0x56bede(0x14d)+_0x52ef34[_0x56bede(0x15e)]+'Resolvers,')),await this[_0x56bede(0x164)](_0x1bf929,_0x2b69ad,_0x52ef34);}[a0_0x25b17b(0x1a2)](_0x4e9042){const _0x30205c=a0_0x25b17b;let _0x2575f0=sereviceType,_0x2ddfde=_0x4e9042[_0x30205c(0x1b6)](_0x57a6ba=>{const _0x35f440=_0x30205c;if('id'==_0x57a6ba['name'])return'';if(_0x35f440(0x147)==_0x57a6ba['name'])return'';if(_0x35f440(0x18b)==_0x57a6ba[_0x35f440(0x1b2)])return'';if(_0x35f440(0x178)==_0x57a6ba[_0x35f440(0x1b2)])return'';if(_0x35f440(0x15d)==_0x57a6ba[_0x35f440(0x1b2)])return'';if('updater_id'==_0x57a6ba[_0x35f440(0x1b2)])return'';let _0x3cf7ae=this[_0x35f440(0x19a)](_0x57a6ba),_0x32f5b4=this[_0x35f440(0x199)](_0x57a6ba),_0xab89f4=camelCase(_0x57a6ba[_0x35f440(0x1b2)]);return'\x20\x20'+(_0x35f440(0x17c)+(0x0==_0x3cf7ae[_0x35f440(0x13d)]?'':_0x35f440(0x1c7)+_0x3cf7ae+',')+'\x20{\x20nullable:\x20'+_0x57a6ba[_0x35f440(0x18e)]+_0x35f440(0x1a3))+'\x0a\x20\x20'+(''+_0xab89f4+(_0x57a6ba['nullable']?'?':'')+':\x20'+_0x32f5b4)+'\x0a';});_0x2575f0=_0x2575f0[_0x30205c(0x14f)](/{{newTypeColumns}}/g,_0x2ddfde[_0x30205c(0x170)]('\x0a'));let _0x2cb078=_0x4e9042[_0x30205c(0x1b6)](_0x576e8a=>{const _0x4ecffd=_0x30205c;if('id'==_0x576e8a[_0x4ecffd(0x1b2)])return'';if(_0x4ecffd(0x147)==_0x576e8a['name'])return'';if('created_at'==_0x576e8a[_0x4ecffd(0x1b2)])return'';if('updated_at'==_0x576e8a[_0x4ecffd(0x1b2)])return'';if(_0x4ecffd(0x15d)==_0x576e8a['name'])return'';if('updater_id'==_0x576e8a[_0x4ecffd(0x1b2)])return'';let _0x5d09d3=this[_0x4ecffd(0x19a)](_0x576e8a),_0xdab42d=this['getColTxtType'](_0x576e8a);_0x576e8a['nullable']=!0x0;let _0x765e4b=camelCase(_0x576e8a[_0x4ecffd(0x1b2)]);return'\x20\x20'+('@Field('+(0x0==_0x5d09d3['length']?'':_0x4ecffd(0x1c7)+_0x5d09d3+',')+_0x4ecffd(0x16b)+_0x576e8a[_0x4ecffd(0x18e)]+_0x4ecffd(0x1a3))+_0x4ecffd(0x19b)+(''+_0x765e4b+(_0x576e8a[_0x4ecffd(0x18e)]?'?':'')+':\x20'+_0xdab42d)+'\x0a';});return _0x2575f0=_0x2575f0[_0x30205c(0x14f)](/{{patchTypeColumns}}/g,_0x2cb078['join']('\x0a')),_0x2575f0;}['createEntityText'](_0x34667d,_0x3bb447){const _0x4fa231=a0_0x25b17b;let _0x54b011=serviceEntity,_0x21f292=_0x3bb447['sort'](function(_0x1dfa33,_0x28f653){const _0x1e9df3=a0_0x8dfe;return _0x1dfa33[_0x1e9df3(0x1bd)]-_0x28f653[_0x1e9df3(0x1bd)];})['map'](_0x42e717=>this[_0x4fa231(0x18f)](_0x42e717));[_0x4fa231(0x156),_0x4fa231(0x166)][_0x4fa231(0x153)](_0x34667d[_0x4fa231(0x194)])&&_0x21f292[_0x4fa231(0x140)](_0x4fa231(0x161)),_0x54b011=_0x54b011[_0x4fa231(0x14f)](/{{entityColumns}}/g,_0x21f292['join']('\x0a'));let _0x4aa860='',_0x2e4b89=_0x3bb447[_0x4fa231(0x163)](_0x3db1c0=>_0x3db1c0[_0x4fa231(0x155)]&&_0x3db1c0['uniqRank']>0x0)['sort'](function(_0xf9944b,_0xa3e905){const _0x4b4845=_0x4fa231;return _0xf9944b[_0x4b4845(0x155)]-_0xa3e905[_0x4b4845(0x155)];});if(_0x2e4b89[_0x4fa231(0x13d)]>0x0){_0x4aa860='@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})';let _0x131ea7=_0x2e4b89[_0x4fa231(0x1b6)](_0x5294c0=>{const _0x59c26f=_0x4fa231;let _0x739f79=_0x5294c0[_0x59c26f(0x1b2)];return'domain_id'==_0x5294c0[_0x59c26f(0x1b2)]&&(_0x739f79='domain'),'creator_id'==_0x5294c0[_0x59c26f(0x1b2)]&&(_0x739f79='creator'),_0x59c26f(0x197)==_0x5294c0[_0x59c26f(0x1b2)]&&(_0x739f79='updater'),_0x59c26f(0x15c)+camelCase(_0x739f79);});_0x4aa860=_0x4aa860[_0x4fa231(0x14f)](/{{indexColumns}}/g,_0x131ea7['join'](','));}return _0x54b011=_0x54b011[_0x4fa231(0x14f)](/{{indexAnn}}/g,_0x4aa860),_0x54b011;}[a0_0x25b17b(0x187)](_0xb2e167,_0x20c080){const _0x57d101=a0_0x25b17b;let _0x172360=_0x57d101(0x166)==_0xb2e167[_0x57d101(0x194)]?serviceEntityHistJson:serviceEntityHistCopy,_0x1767b5=_0x20c080[_0x57d101(0x1c5)](function(_0x5379c5,_0x2ed4ce){const _0x5b0600=_0x57d101;return _0x5379c5[_0x5b0600(0x1bd)]-_0x2ed4ce[_0x5b0600(0x1bd)];})[_0x57d101(0x1b6)](_0x22c0ec=>this[_0x57d101(0x18f)](_0x22c0ec));return _0x172360=_0x172360[_0x57d101(0x14f)](/{{entityColumns}}/g,_0x1767b5['join']('\x0a')),_0x172360;}['columnToEntityColumn'](_0x2de3a1){const _0x384fb3=a0_0x25b17b;if('id'==_0x2de3a1[_0x384fb3(0x1b2)])return'';if(_0x384fb3(0x147)==_0x2de3a1[_0x384fb3(0x1b2)])return'';if(_0x384fb3(0x18b)==_0x2de3a1[_0x384fb3(0x1b2)])return'';if('updated_at'==_0x2de3a1[_0x384fb3(0x1b2)])return'';if('creator_id'==_0x2de3a1[_0x384fb3(0x1b2)])return'';if('updater_id'==_0x2de3a1[_0x384fb3(0x1b2)])return'';let _0x343445=_0x2de3a1['colType'];_0x384fb3(0x1aa)==_0x2de3a1[_0x384fb3(0x13b)]&&(_0x343445='double\x20precision'),'long'==_0x2de3a1[_0x384fb3(0x13b)]&&(_0x343445='bigint'),_0x384fb3(0x150)==_0x2de3a1['colType']&&(_0x343445='character\x20varying'),_0x384fb3(0x1b0)==_0x2de3a1[_0x384fb3(0x13b)]&&(_0x343445=_0x384fb3(0x181));let _0x2658ce='';_0x384fb3(0x150)==_0x2de3a1[_0x384fb3(0x13b)]&&(_0x2658ce=_0x2de3a1[_0x384fb3(0x173)]);let _0x25b236=this['getFieldType'](_0x2de3a1),_0x177169=this['getColTxtType'](_0x2de3a1),_0x18643d=camelCase(_0x2de3a1[_0x384fb3(0x1b2)]);return'\x20\x20'+(_0x384fb3(0x198)+_0x2de3a1['name']+_0x384fb3(0x152)+_0x343445+'\x27,\x20nullable:\x20'+_0x2de3a1[_0x384fb3(0x18e)]+'\x20'+(0x0==_0x2658ce[_0x384fb3(0x13d)]?'':_0x384fb3(0x1c3)+_0x2658ce)+_0x384fb3(0x1a3))+_0x384fb3(0x19b)+(_0x384fb3(0x17c)+(0x0==_0x25b236['length']?'':'type\x20=>'+_0x25b236+',')+_0x384fb3(0x16b)+_0x2de3a1[_0x384fb3(0x18e)]+_0x384fb3(0x1a3))+'\x0a\x20\x20'+(''+_0x18643d+(_0x2de3a1[_0x384fb3(0x18e)]?'?':'')+':\x20'+_0x177169)+'\x0a';}['getFieldType'](_0x430a24){const _0x3872cf=a0_0x25b17b;let _0x24a1b8='';return _0x3872cf(0x1aa)==_0x430a24[_0x3872cf(0x13b)]&&(_0x24a1b8=_0x3872cf(0x17b)),_0x3872cf(0x146)==_0x430a24[_0x3872cf(0x13b)]&&(_0x24a1b8=_0x3872cf(0x17b)),'long'==_0x430a24['colType']&&(_0x24a1b8=_0x3872cf(0x195)),_0x3872cf(0x168)==_0x430a24['colType']&&(_0x24a1b8=_0x3872cf(0x195)),_0x24a1b8;}[a0_0x25b17b(0x199)](_0x2e264b){const _0x50c1c6=a0_0x25b17b;let _0x3ee71b=_0x2e264b[_0x50c1c6(0x13b)];return _0x50c1c6(0x176)==_0x2e264b['colType']&&(_0x3ee71b=_0x50c1c6(0x149)),'double'==_0x2e264b[_0x50c1c6(0x13b)]&&(_0x3ee71b=_0x50c1c6(0x149)),_0x50c1c6(0x146)==_0x2e264b[_0x50c1c6(0x13b)]&&(_0x3ee71b=_0x50c1c6(0x149)),_0x50c1c6(0x168)==_0x2e264b['colType']&&(_0x3ee71b='number'),_0x50c1c6(0x1c2)==_0x2e264b[_0x50c1c6(0x13b)]&&(_0x3ee71b=_0x50c1c6(0x149)),_0x50c1c6(0x1b0)==_0x2e264b[_0x50c1c6(0x13b)]&&(_0x3ee71b=_0x50c1c6(0x18a)),_0x50c1c6(0x174)==_0x2e264b[_0x50c1c6(0x13b)]&&(_0x3ee71b=_0x50c1c6(0x18a)),_0x50c1c6(0x17a)==_0x2e264b[_0x50c1c6(0x13b)]&&(_0x3ee71b='string'),_0x3ee71b;}async[a0_0x25b17b(0x164)](_0x2cdf3a,_0x2ea0d6,_0x5d8d53){const _0x33ed2e=a0_0x25b17b;await fs[_0x33ed2e(0x179)](_0x2cdf3a,this[_0x33ed2e(0x15f)](_0x2ea0d6,_0x5d8d53),'utf8');}[a0_0x25b17b(0x15f)](_0x46302d,_0x1833c0){const _0x598fcc=a0_0x25b17b;return _0x46302d[_0x598fcc(0x14f)](/{{pascalCase name}}/g,_0x1833c0[_0x598fcc(0x15e)])[_0x598fcc(0x14f)](/{{camelCase name}}/g,_0x1833c0[_0x598fcc(0x1a5)])[_0x598fcc(0x14f)](/{{snakeCase name}}/g,_0x1833c0['snakeCaseName'])['replace'](/{{pluralPascalCase name}}/g,_0x1833c0[_0x598fcc(0x14c)])['replace'](/{{pluralCamelCase name}}/g,_0x1833c0[_0x598fcc(0x183)])[_0x598fcc(0x14f)](/{{tableName}}/g,_0x1833c0[_0x598fcc(0x180)])[_0x598fcc(0x14f)](/{{name}}/g,_0x1833c0['name']);}async[a0_0x25b17b(0x182)](_0x468c43,_0x4fa642,_0x2daeda){const _0x4144de=a0_0x25b17b;let _0x1b6c77=_0x468c43+_0x4144de(0x158);await this['createDir'](_0x1b6c77),_0x1b6c77=_0x1b6c77+'/'+_0x4fa642,await this[_0x4144de(0x1a0)](_0x1b6c77),_0x1b6c77+=_0x4144de(0x1ab),await this[_0x4144de(0x1a0)](_0x1b6c77),_0x1b6c77+=_0x4144de(0x151),await this[_0x4144de(0x1a0)](_0x1b6c77),_0x1b6c77=_0x1b6c77+'/'+_0x2daeda,await this['createDir'](_0x1b6c77);}[a0_0x25b17b(0x13c)](){const _0x23c7ba=a0_0x25b17b;let _0x21cdb0=process[_0x23c7ba(0x1b1)][_0x23c7ba(0x172)][_0x23c7ba(0x17e)]('/'),_0x47cee6=[];for(let _0x47f852=0x0;_0x47f852<_0x21cdb0[_0x23c7ba(0x13d)]&&_0x23c7ba(0x169)!=_0x21cdb0[_0x47f852];_0x47f852++)_0x47cee6[_0x23c7ba(0x140)](_0x21cdb0[_0x47f852]);return _0x47cee6[_0x23c7ba(0x170)]('/');}async['createDir'](_0x216cd3){const _0x55404f=a0_0x25b17b;0x0==await this[_0x55404f(0x14a)](_0x216cd3)&&fs[_0x55404f(0x154)](_0x216cd3);}async[a0_0x25b17b(0x14a)](_0x7636f5){const _0xf41a1c=a0_0x25b17b;return await fs[_0xf41a1c(0x1bb)](_0x7636f5);}};tslib_1[a0_0x25b17b(0x14b)]([(0x0,type_graphql_1['Query'])(_0x19e254=>Boolean,{'description':a0_0x25b17b(0x1b4)}),tslib_1[a0_0x25b17b(0x162)](0x0,(0x0,type_graphql_1[a0_0x25b17b(0x1a4)])('id')),tslib_1[a0_0x25b17b(0x162)](0x1,(0x0,type_graphql_1[a0_0x25b17b(0x1b5)])()),tslib_1[a0_0x25b17b(0x186)]('design:type',Function),tslib_1[a0_0x25b17b(0x186)]('design:paramtypes',[String,Object]),tslib_1[a0_0x25b17b(0x186)](a0_0x25b17b(0x1af),Promise)],OperatoToolCreateService[a0_0x25b17b(0x19d)],a0_0x25b17b(0x1ac),null),OperatoToolCreateService=tslib_1[a0_0x25b17b(0x14b)]([(0x0,type_graphql_1[a0_0x25b17b(0x16f)])()],OperatoToolCreateService),exports[a0_0x25b17b(0x167)]=OperatoToolCreateService;function a0_0x8dfe(_0x5ab59f,_0x578238){const _0x126fe8=a0_0x126f();return a0_0x8dfe=function(_0x8dfe9b,_0x31d260){_0x8dfe9b=_0x8dfe9b-0x13a;let _0x52a8a1=_0x126fe8[_0x8dfe9b];return _0x52a8a1;},a0_0x8dfe(_0x5ab59f,_0x578238);}const allIndex=a0_0x25b17b(0x189),serviceIndex=a0_0x25b17b(0x1c8),serviceHistoryIndex=a0_0x25b17b(0x148),serviceQuery=a0_0x25b17b(0x145),serviceHistoryQuery=a0_0x25b17b(0x1b7),serviceMutation='\x0aimport\x20{\x20Resolver,\x20Mutation,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20In\x20}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20New{{pascalCase\x20name}},\x20{{pascalCase\x20name}}Patch\x20}\x20from\x20\x27./{{name}}-type\x27\x0aimport\x20{\x20getRepository\x20}\x20from\x20\x27@things-factory/shell\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Mutation\x20{\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20create\x20new\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20create{{pascalCase\x20name}}(@Arg(\x27{{camelCase\x20name}}\x27)\x20{{camelCase\x20name}}:\x20New{{pascalCase\x20name}},\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20return\x20await\x20tx.getRepository({{pascalCase\x20name}}).save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20modify\x20{{pascalCase\x20name}}\x20information\x27\x20})\x0a\x20\x20async\x20update{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27id\x27)\x20id:\x20string,\x0a\x20\x20\x20\x20@Arg(\x27patch\x27)\x20patch:\x20{{pascalCase\x20name}}Patch,\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20repository\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20repository.findOne(\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20)\x0a\x0a\x20\x20\x20\x20return\x20await\x20repository.save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20...patch,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20[{{pascalCase\x20name}}],\x20{\x20description:\x20\x22To\x20modify\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20information\x22\x20})\x0a\x20\x20async\x20updateMultiple{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27patches\x27,\x20type\x20=>\x20[{{pascalCase\x20name}}Patch])\x20patches:\x20{{pascalCase\x20name}}Patch[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}[]>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20results\x20=\x20[]\x0a\x20\x20\x20\x20const\x20_createRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27+\x27)\x0a\x20\x20\x20\x20const\x20_updateRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27M\x27)\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}Repo\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x0a\x20\x20\x20\x20if\x20(_createRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_createRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20newRecord\x20=\x20_createRecords[i]\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...newRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27+\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20if\x20(_updateRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_updateRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20updRecord\x20=\x20_updateRecords[i]\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20{{camelCase\x20name}}Repo.findOne({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id:updRecord.id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...updRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27M\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20return\x20results\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20delete{{pascalCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove({\x20domain,\x20id,\x20updater:user\x20})\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20multiple\x20{{camelCase\x20name}}s\x27\x20})\x0a\x20\x20async\x20delete{{pluralPascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27ids\x27,\x20type\x20=>\x20[String])\x20ids:\x20string[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20delEntitis\x20=\x20ids.map(id=>{\x0a\x20\x20\x20\x20\x20\x20return\x20{domain,id,updater:user}\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove(delEntitis)\x0a\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a}\x0a',sereviceType=a0_0x25b17b(0x1a8),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_0x25b17b(0x18d),serviceEntityHistCopy=a0_0x25b17b(0x159),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_0x25b17b(0x16a);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x264352=a0_0x1c9f;(function(_0x3af996,_0x35ca20){const _0x5c1426=a0_0x1c9f,_0x3877fe=_0x3af996();while(!![]){try{const _0x567428=parseInt(_0x5c1426(0xda))/0x1+parseInt(_0x5c1426(0xe4))/0x2+parseInt(_0x5c1426(0xf2))/0x3*(-parseInt(_0x5c1426(0xdf))/0x4)+parseInt(_0x5c1426(0xd8))/0x5*(-parseInt(_0x5c1426(0xd0))/0x6)+parseInt(_0x5c1426(0xe6))/0x7+parseInt(_0x5c1426(0xf0))/0x8*(-parseInt(_0x5c1426(0xd7))/0x9)+parseInt(_0x5c1426(0xee))/0xa;if(_0x567428===_0x35ca20)break;else _0x3877fe['push'](_0x3877fe['shift']());}catch(_0x5446df){_0x3877fe['push'](_0x3877fe['shift']());}}}(a0_0x1817,0x1daca));function a0_0x1817(){const _0x274677=['trim','1615551OBoXUf','split','@things-factory/menu-base','@things-factory/operato-license-checker','getRepository','LicenseError','map','forEach','660170jXWkBn','checkStudioTemplateIsOverLimit','1380696dXfKlD','Menu','510111AwFdIW','getCount','6BahISQ','checkStudioPermission','ERROR_CODES','__esModule','select','../../errors/license-error','Studio','9pFInSr','692225PnBpjK','createQueryBuilder','232489vKudmq','from','manager','@things-factory/shell','OVER_LIMIT','4BdwzIn','menu','checkTarget','INVALID_LICENSE','(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)','146632WswNYR'];a0_0x1817=function(){return _0x274677;};return a0_0x1817();}Object['defineProperty'](exports,a0_0x264352(0xd3),{'value':!0x0}),exports['checkStudioTemplateIsOverLimit']=exports['checkStudioPermission']=void 0x0;const operato_license_checker_1=require(a0_0x264352(0xe9)),shell_1=require(a0_0x264352(0xdd)),menu_base_1=require(a0_0x264352(0xe8)),license_error_1=require(a0_0x264352(0xd5));async function checkStudioPermission(){const _0x5479ea=a0_0x264352;let _0xf2ff=((0x0,operato_license_checker_1['getPermission'])('Permissions\x20For\x20Tailor\x20Tool')||',')[_0x5479ea(0xe7)](',')[_0x5479ea(0xec)](_0x1117a3=>_0x1117a3[_0x5479ea(0xe5)]()),_0x2a00af=!0x1;return _0xf2ff[_0x5479ea(0xed)](_0x5aa745=>{const _0x2b30fc=_0x5479ea;_0x5aa745['includes'](_0x2b30fc(0xd6))&&(_0x2a00af=!0x0);}),_0x2a00af;}async function checkStudioTemplateIsOverLimit(_0x5f0db4,_0x399f7c){const _0x26fa36=a0_0x264352;if(0x0==await checkStudioPermission())throw new license_error_1[(_0x26fa36(0xeb))]({'errorCode':_0x399f7c['t'](license_error_1[_0x26fa36(0xeb)]['ERROR_CODES'][_0x26fa36(0xe2)])});var _0x55c97b=0x0;if(_0x55c97b=_0x5f0db4&&''!=_0x5f0db4?await(0x0,shell_1[_0x26fa36(0xea)])(menu_base_1['Menu'])[_0x26fa36(0xdc)][_0x26fa36(0xd9)]()[_0x26fa36(0xd4)](_0x26fa36(0xe0))[_0x26fa36(0xdb)](menu_base_1[_0x26fa36(0xf1)],_0x26fa36(0xe0))['where']('id\x20!=\x20:id',{'id':_0x5f0db4})['andWhere'](_0x26fa36(0xe3))['getCount']()+0x1:await(0x0,shell_1['getRepository'])(menu_base_1[_0x26fa36(0xf1)])[_0x26fa36(0xdc)][_0x26fa36(0xd9)]()[_0x26fa36(0xd4)](_0x26fa36(0xe0))[_0x26fa36(0xdb)](menu_base_1['Menu'],_0x26fa36(0xe0))['where'](_0x26fa36(0xe3))[_0x26fa36(0xcf)]()+0x1,!(0x0,operato_license_checker_1[_0x26fa36(0xe1)])(_0x55c97b))throw new license_error_1[(_0x26fa36(0xeb))]({'errorCode':_0x399f7c['t'](license_error_1['LicenseError'][_0x26fa36(0xd2)][_0x26fa36(0xde)])});return!0x0;}function a0_0x1c9f(_0x2e45f3,_0x4e91e5){const _0x1817e6=a0_0x1817();return a0_0x1c9f=function(_0x1c9fd2,_0x2e481d){_0x1c9fd2=_0x1c9fd2-0xcf;let _0x3e04b1=_0x1817e6[_0x1c9fd2];return _0x3e04b1;},a0_0x1c9f(_0x2e45f3,_0x4e91e5);}exports[a0_0x264352(0xd1)]=checkStudioPermission,exports[a0_0x264352(0xef)]=checkStudioTemplateIsOverLimit;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x4205be=a0_0x5566;(function(_0x53cdf0,_0x417388){const _0x2137a1=a0_0x5566,_0x132129=_0x53cdf0();while(!![]){try{const _0x183a07=parseInt(_0x2137a1(0x110))/0x1*(parseInt(_0x2137a1(0x11a))/0x2)+-parseInt(_0x2137a1(0x108))/0x3+parseInt(_0x2137a1(0x106))/0x4+-parseInt(_0x2137a1(0x10a))/0x5*(-parseInt(_0x2137a1(0x11c))/0x6)+-parseInt(_0x2137a1(0x114))/0x7+parseInt(_0x2137a1(0x113))/0x8+parseInt(_0x2137a1(0x120))/0x9*(-parseInt(_0x2137a1(0x115))/0xa);if(_0x183a07===_0x417388)break;else _0x132129['push'](_0x132129['shift']());}catch(_0x4997fa){_0x132129['push'](_0x132129['shift']());}}}(a0_0x19c6,0x84772));Object[a0_0x4205be(0x109)](exports,a0_0x4205be(0x119),{'value':!0x0}),exports[a0_0x4205be(0x10c)]=void 0x0;function a0_0x19c6(){const _0xb3b8ce=['studioPermission','__decorate','__param','__esModule','146tkgvPQ','studioTemplateIsOverLimit','3213978anVnxj','Operato\x20Tool\x20Studio\x20Usage\x20Permissions','type-graphql','./tool-permission','7839RlXhcL','checkStudioTemplateIsOverLimit','2207824QzYuAW','design:returntype','1261071UQfHmD','defineProperty','10YknJvb','design:paramtypes','OperatoToolResolver','prototype','__metadata','Query','2539QzSCuM','Ctx','Resolver','1335488vCFhJJ','790209JVmCJy','10330WGygoa'];a0_0x19c6=function(){return _0xb3b8ce;};return a0_0x19c6();}function a0_0x5566(_0x2f4094,_0x184359){const _0x19c6b5=a0_0x19c6();return a0_0x5566=function(_0x55667f,_0x1b408f){_0x55667f=_0x55667f-0x105;let _0x3042fe=_0x19c6b5[_0x55667f];return _0x3042fe;},a0_0x5566(_0x2f4094,_0x184359);}const tslib_1=require('tslib'),type_graphql_1=require(a0_0x4205be(0x11e)),tool_permission_1=require(a0_0x4205be(0x11f));let OperatoToolResolver=class{async[a0_0x4205be(0x116)](_0x3b62c4){return(0x0,tool_permission_1['checkStudioPermission'])();}async[a0_0x4205be(0x11b)](_0x46ae48,_0x3bd4b2){const _0xab9c92=a0_0x4205be;return(0x0,tool_permission_1[_0xab9c92(0x105)])(_0x46ae48,_0x3bd4b2);}};tslib_1[a0_0x4205be(0x117)]([(0x0,type_graphql_1[a0_0x4205be(0x10f)])(_0x3c1074=>Boolean,{'description':a0_0x4205be(0x11d)}),tslib_1[a0_0x4205be(0x118)](0x0,(0x0,type_graphql_1[a0_0x4205be(0x111)])()),tslib_1[a0_0x4205be(0x10e)]('design:type',Function),tslib_1[a0_0x4205be(0x10e)](a0_0x4205be(0x10b),[Object]),tslib_1[a0_0x4205be(0x10e)](a0_0x4205be(0x107),Promise)],OperatoToolResolver['prototype'],a0_0x4205be(0x116),null),tslib_1[a0_0x4205be(0x117)]([(0x0,type_graphql_1[a0_0x4205be(0x10f)])(_0x49f33b=>Boolean,{'description':'Operato\x20Tool\x20Studio\x20Limit\x20check'}),tslib_1['__param'](0x0,(0x0,type_graphql_1['Arg'])('id')),tslib_1[a0_0x4205be(0x118)](0x1,(0x0,type_graphql_1['Ctx'])()),tslib_1[a0_0x4205be(0x10e)]('design:type',Function),tslib_1[a0_0x4205be(0x10e)](a0_0x4205be(0x10b),[String,Object]),tslib_1[a0_0x4205be(0x10e)](a0_0x4205be(0x107),Promise)],OperatoToolResolver[a0_0x4205be(0x10d)],'studioTemplateIsOverLimit',null),OperatoToolResolver=tslib_1[a0_0x4205be(0x117)]([(0x0,type_graphql_1[a0_0x4205be(0x112)])()],OperatoToolResolver),exports[a0_0x4205be(0x10c)]=OperatoToolResolver;
|