@things-factory/operato-tools 6.1.24 → 6.1.26
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 +23 -23
- 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 +11 -11
- package/client/pages/generator/meta-generator-page.js +11 -11
- package/client/pages/generator/search-config-tab-mixin.js +4 -4
- package/client/pages/generator/tab-config-tab-mixin.js +4 -4
- package/client/pages/main.js +4 -4
- package/client/reducers/main.js +1 -1
- package/package.json +3 -3
- package/server/constants/error-code.js +1 -1
- package/server/errors/license-error.js +1 -1
- package/server/routes.js +1 -1
- package/server/service/tool-entity/create-menu.js +1 -1
- package/server/service/tool-entity/create-service.js +1 -1
- package/server/service/tool-secret/tool-permission.js +1 -1
- package/server/service/tool-secret/tool-resolver.js +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
2
|
-
<ox-grist auto-fetch id="tab-tab-grid" .config=${this[
|
|
3
|
-
.fetchHandler=${this[
|
|
4
|
-
</ox-grist>`;}get[
|
|
1
|
+
const a0_0x16ea67=a0_0x4a38;(function(_0x4a49a8,_0x9b8d0d){const _0x3f98d4=a0_0x4a38,_0x1c680a=_0x4a49a8();while(!![]){try{const _0x1463b9=parseInt(_0x3f98d4(0x143))/0x1+-parseInt(_0x3f98d4(0x137))/0x2+-parseInt(_0x3f98d4(0x146))/0x3*(parseInt(_0x3f98d4(0x133))/0x4)+parseInt(_0x3f98d4(0x145))/0x5*(-parseInt(_0x3f98d4(0x141))/0x6)+-parseInt(_0x3f98d4(0x122))/0x7+parseInt(_0x3f98d4(0x123))/0x8+parseInt(_0x3f98d4(0x126))/0x9*(parseInt(_0x3f98d4(0x14f))/0xa);if(_0x1463b9===_0x9b8d0d)break;else _0x1c680a['push'](_0x1c680a['shift']());}catch(_0x3ef24a){_0x1c680a['push'](_0x1c680a['shift']());}}}(a0_0x1196,0x61a94));import{html}from'lit-element';import{MetaApi}from'@things-factory/meta-ui/client/utils/meta-api';import{TermsUtil}from'@things-factory/meta-ui/client/utils/terms-util';function a0_0x4a38(_0x5d0f67,_0x144731){const _0x11960b=a0_0x1196();return a0_0x4a38=function(_0x4a38c1,_0x124eb2){_0x4a38c1=_0x4a38c1-0x122;let _0x6387f5=_0x11960b[_0x4a38c1];return _0x6387f5;},a0_0x4a38(_0x5d0f67,_0x144731);}export const TabConfigTabMixin=_0x1b6c11=>class extends _0x1b6c11{[a0_0x16ea67(0x156)](_0x41fcec){const _0xbfe00a=a0_0x16ea67;let _0x1ba187=_0x41fcec?.[_0xbfe00a(0x134)]((_0xf0e25d,_0x648ac)=>{const _0x503bbe=_0xbfe00a;let _0x2e7925=_0x648ac+0x1,_0x3f8d4b={};return _0x3f8d4b[_0x503bbe(0x12e)]=0xa*_0x2e7925,_0x3f8d4b['id']=_0x2e7925,_0x3f8d4b[_0x503bbe(0x136)]=_0xf0e25d[_0x503bbe(0x136)],_0x3f8d4b[_0x503bbe(0x14b)]=_0xf0e25d[_0x503bbe(0x14b)],_0x3f8d4b[_0x503bbe(0x142)]=_0xf0e25d[_0x503bbe(0x142)],_0x3f8d4b['icon']=_0xf0e25d[_0x503bbe(0x139)],_0x3f8d4b[_0x503bbe(0x130)]=_0xf0e25d[_0x503bbe(0x130)],_0x3f8d4b[_0x503bbe(0x135)]=_0xf0e25d['parent_field'],_0x3f8d4b[_0x503bbe(0x12d)]=_0xf0e25d[_0x503bbe(0x12d)],_0x3f8d4b[_0x503bbe(0x13c)]=_0xf0e25d[_0x503bbe(0x13c)],_0x3f8d4b;});this[_0xbfe00a(0x127)]=_0x1ba187||[],this[_0xbfe00a(0x13d)]?.[_0xbfe00a(0x12b)]();}[a0_0x16ea67(0x138)](){const _0x115818=a0_0x16ea67;let _0x5e55bb={'tab':[]},_0xfd0b08=this[_0x115818(0x148)](_0x115818(0x132));return this[_0x115818(0x150)](_0xfd0b08)?.[_0x115818(0x12a)](_0x22b9de=>{const _0x4687be=_0x115818;var {name:_0x30a677,display:_0x374b41,tagname:_0x43275a,location:_0x283f57,parent_field:_0x468594,param_field:_0x252fc8,menu:_0x23cf2b,icon:_0x78dd27}=_0x22b9de;_0x30a677&&_0x43275a&&_0x283f57&&_0x23cf2b&&(_0x374b41||(_0x374b41=_0x30a677),_0x468594||(_0x468594='id'),_0x252fc8||(_0x252fc8=_0x4687be(0x12d)),_0x5e55bb[_0x4687be(0x140)][_0x4687be(0x129)]({'name':_0x30a677,'display':_0x374b41,'tagname':_0x43275a,'location':_0x283f57,'parent_field':_0x468594,'param_field':_0x252fc8,'menu':_0x23cf2b,'icon':_0x78dd27}));}),_0x5e55bb;}[a0_0x16ea67(0x128)](){const _0x943455=a0_0x16ea67;return html`
|
|
2
|
+
<ox-grist auto-fetch id="tab-tab-grid" .config=${this[_0x943455(0x153)]} .mode='GRID'
|
|
3
|
+
.fetchHandler=${this['fetchTabTabHandler']['bind'](this)}>
|
|
4
|
+
</ox-grist>`;}get[a0_0x16ea67(0x13d)](){const _0x683758=a0_0x16ea67;return this[_0x683758(0x14a)][_0x683758(0x13e)](_0x683758(0x144));}async[a0_0x16ea67(0x13a)](){return{'total':0x0,'records':this['viewTabData']||[]};}async['setTabConfigTabConfig'](){const _0x459274=a0_0x16ea67;this['tabTabGridConfig']={'rows':MetaApi[_0x459274(0x125)](!0x0),'pagination':{'infinite':!0x0},'sorters':[{'name':_0x459274(0x12e),'desc':!0x1}],'appendable':!0x0,'columns':[...MetaApi[_0x459274(0x147)](!0x1,!0x1),{'type':'gutter','gutterName':_0x459274(0x152),'icon':_0x459274(0x149),'handlers':{'click':(_0x4d20a7,_0x35dd25,_0x507f30,_0x3ea252,_0x231c83)=>{const _0x5264fe=_0x459274;_0x3ea252['id']&&this[_0x5264fe(0x14e)](this[_0x5264fe(0x13d)],_0x3ea252);}}},{'type':_0x459274(0x13b),'name':'id','hidden':!0x0},{'type':_0x459274(0x155),'name':'rank','header':TermsUtil[_0x459274(0x13f)](_0x459274(0x12e)),'sortable':!0x0,'width':0x41,'record':{'align':_0x459274(0x14c),'editable':!0x0,'mandatory':!0x0}},{'type':_0x459274(0x13b),'name':_0x459274(0x136),'header':TermsUtil[_0x459274(0x13f)](_0x459274(0x136)),'sortable':!0x1,'width':0x64,'record':{'align':_0x459274(0x12c),'editable':!0x0,'mandatory':!0x0}},{'type':_0x459274(0x13b),'name':_0x459274(0x14b),'header':TermsUtil[_0x459274(0x13f)](_0x459274(0x14b)),'sortable':!0x1,'width':0x64,'record':{'align':'left','editable':!0x0,'mandatory':!0x0}},{'type':_0x459274(0x13b),'name':_0x459274(0x139),'header':TermsUtil[_0x459274(0x13f)](_0x459274(0x139)),'sortable':!0x0,'width':0x41,'record':{'align':_0x459274(0x124),'editable':!0x0,'mandatory':!0x0}},{'type':_0x459274(0x13b),'name':_0x459274(0x13c),'header':TermsUtil[_0x459274(0x13f)](_0x459274(0x131)),'sortable':!0x1,'width':0x64,'record':{'align':'left','editable':!0x0,'mandatory':!0x0}},{'type':_0x459274(0x13b),'name':_0x459274(0x142),'header':TermsUtil['tLabel'](_0x459274(0x154)),'sortable':!0x1,'width':0x96,'record':{'align':_0x459274(0x12c),'editable':!0x0,'mandatory':!0x0}},{'type':'string','name':_0x459274(0x130),'header':TermsUtil['tLabel'](_0x459274(0x151)),'sortable':!0x1,'width':0x12c,'record':{'align':'left','editable':!0x0,'mandatory':!0x0}},{'type':_0x459274(0x13b),'name':_0x459274(0x135),'header':TermsUtil['tLabel'](_0x459274(0x14d)),'sortable':!0x1,'width':0x64,'record':{'align':_0x459274(0x12c),'editable':!0x0,'mandatory':!0x0}},{'type':_0x459274(0x13b),'name':'param_field','header':TermsUtil['tLabel'](_0x459274(0x12f)),'sortable':!0x1,'width':0x64,'record':{'align':'left','editable':!0x0,'mandatory':!0x0}}]};}};function a0_0x1196(){const _0x281dc7=['button','tabTabGridConfig','tag','integer','setTabConfigTabValues','4831911BzgtLZ','6058928hBmofg','center','getGristSelectableConfig','4365rmmeUE','viewTabData','renderTabConfigTab','push','forEach','fetch','left','param_field','rank','params','location','routing','tab-tab-grid','32rXHmqV','map','parent_field','name','849098MryERN','getTabConfigTabValues','icon','fetchTabTabHandler','string','menu','tabTabGrist','querySelector','tLabel','tab','18tCZNea','tagname','135140jbbHtD','#tab-tab-grid','1306395xWsfle','49047HWwSSu','getGristGuttersConfig','getElementValueById','delete','shadowRoot','display','right','parent_id','deleteRow','31690hVwFxr','sortRecordByRank','page_location'];a0_0x1196=function(){return _0x281dc7;};return a0_0x1196();}
|
package/client/pages/main.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
function a0_0x520c(_0x7c8969,_0x3c7d22){var _0x2e7bf1=a0_0x2e7b();return a0_0x520c=function(_0x520c7f,_0x95d3f3){_0x520c7f=_0x520c7f-0x8e;var _0x164c36=_0x2e7bf1[_0x520c7f];return _0x164c36;},a0_0x520c(_0x7c8969,_0x3c7d22);}function a0_0x2e7b(){var _0x560494=['28802NwDwai','tool\x20start\x20msg','1535455hYRmZK','7676988qvYdTf','549577ZoiKHe','define','tText','1888596JLZGQg','4WntuAa','55YPMuZU','2868701mtlYXH','render','operato-tools-main','customElements','10AStVLf','styles','context','12jcftdy','40bgJash','1423344nfCVTw'];a0_0x2e7b=function(){return _0x560494;};return a0_0x2e7b();}var a0_0x397a6a=a0_0x520c;(function(_0x2cb31d,_0x59e878){var _0x10bc0b=a0_0x520c,_0x58568d=_0x2cb31d();while(!![]){try{var _0x10fb39=-parseInt(_0x10bc0b(0x97))/0x1*(parseInt(_0x10bc0b(0x8e))/0x2)+parseInt(_0x10bc0b(0xa1))/0x3*(parseInt(_0x10bc0b(0x96))/0x4)+-parseInt(_0x10bc0b(0x90))/0x5*(-parseInt(_0x10bc0b(0x9f))/0x6)+parseInt(_0x10bc0b(0x92))/0x7*(-parseInt(_0x10bc0b(0xa0))/0x8)+parseInt(_0x10bc0b(0x95))/0x9+-parseInt(_0x10bc0b(0x9c))/0xa*(parseInt(_0x10bc0b(0x98))/0xb)+parseInt(_0x10bc0b(0x91))/0xc;if(_0x10fb39===_0x59e878)break;else _0x58568d['push'](_0x58568d['shift']());}catch(_0x23c76c){_0x58568d['push'](_0x58568d['shift']());}}}(a0_0x2e7b,0x78516));import{html,css}from'lit-element';import{connect}from'pwa-helpers/connect-mixin.js';import{store,PageView}from'@things-factory/shell';import{TermsUtil}from'@things-factory/meta-ui';class OperatoToolsMain extends connect(store)(PageView){static get[a0_0x397a6a(0x9d)](){return[css`
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
4
|
background-color: var(--main-section-background-color);
|
|
@@ -41,11 +41,11 @@ var a0_0x4a260a=a0_0x411e;function a0_0x411e(_0x5d6ff1,_0x120b87){var _0x1a613e=
|
|
|
41
41
|
display: none;
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
`];}get[
|
|
44
|
+
`];}get[a0_0x397a6a(0x9e)](){return{'title':'Operato\x20Tools','actions':[]};}[a0_0x397a6a(0x99)](){var _0x56f356=a0_0x397a6a;return html`
|
|
45
45
|
<h2>Operato Tools</h2>
|
|
46
46
|
<p page-description>
|
|
47
|
-
${TermsUtil[
|
|
47
|
+
${TermsUtil[_0x56f356(0x94)](_0x56f356(0x8f))}
|
|
48
48
|
</p>
|
|
49
49
|
|
|
50
50
|
<img src="/assets/images/operato-tools.png" />
|
|
51
|
-
`;}}window[
|
|
51
|
+
`;}}window[a0_0x397a6a(0x9b)][a0_0x397a6a(0x93)](a0_0x397a6a(0x9a),OperatoToolsMain);
|
package/client/reducers/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a0_0x5ad4f4=a0_0x5cd2;(function(_0xd5fcbc,_0x4cce7d){const _0x481414=a0_0x5cd2,_0x341ae7=_0xd5fcbc();while(!![]){try{const _0x17f60d=-parseInt(_0x481414(0x1c1))/0x1*(parseInt(_0x481414(0x1c7))/0x2)+parseInt(_0x481414(0x1c2))/0x3+-parseInt(_0x481414(0x1c9))/0x4+parseInt(_0x481414(0x1c3))/0x5+parseInt(_0x481414(0x1c8))/0x6*(-parseInt(_0x481414(0x1c6))/0x7)+parseInt(_0x481414(0x1c4))/0x8*(parseInt(_0x481414(0x1c5))/0x9)+parseInt(_0x481414(0x1cd))/0xa;if(_0x17f60d===_0x4cce7d)break;else _0x341ae7['push'](_0x341ae7['shift']());}catch(_0x11b7cc){_0x341ae7['push'](_0x341ae7['shift']());}}}(a0_0x2290,0xef884));import a0_0x5458ff from'graphql-tag';import{i18next}from'@operato/i18n';import{store}from'@operato/shell';import{client,gqlContext}from'@operato/graphql';function a0_0x5cd2(_0x535200,_0x3cffba){const _0x229024=a0_0x2290();return a0_0x5cd2=function(_0x5cd282,_0x35f7ad){_0x5cd282=_0x5cd282-0x1bf;let _0x4f1adc=_0x229024[_0x5cd282];return _0x4f1adc;},a0_0x5cd2(_0x535200,_0x3cffba);}import{UPDATE_OPERATO_TOOLS}from'../actions/main';const INITIAL_STATE={'operatoTools':a0_0x5ad4f4(0x1ca),'studioPermission':!0x1};export const UPDATE_OPERATO_TOOLS_PERMISSION='UPDATE_OPERATO_TOOLS_PERMISSION';function a0_0x2290(){const _0x1e4e1e=['studioPermission','16365200vwgaqQ','type','dispatch','14776IhmpSW','4478523xkVKpP','390645QGEWQj','12931192LMbbGj','9IUKFUR','336tszUbv','188kdjejO','164772WyZWDl','4542580LKpfpL','ABC','data'];a0_0x2290=function(){return _0x1e4e1e;};return a0_0x2290();}((async()=>{const _0x31bd04=a0_0x5ad4f4;var _0x3842cd=await client['query']({'query':a0_0x5458ff`{studioPermission}`});let _0x2b7bf2=!0x1;_0x3842cd['errors']||(_0x2b7bf2=_0x3842cd[_0x31bd04(0x1cb)][_0x31bd04(0x1cc)]),store[_0x31bd04(0x1c0)]({'type':UPDATE_OPERATO_TOOLS_PERMISSION,'state':{'studioPermission':_0x2b7bf2}});})());const operatoTools=(_0x27bf12=INITIAL_STATE,_0x2a238e)=>{const _0x58eaf0=a0_0x5ad4f4;switch(_0x2a238e[_0x58eaf0(0x1bf)]){case UPDATE_OPERATO_TOOLS:return{..._0x27bf12};case UPDATE_OPERATO_TOOLS_PERMISSION:return{...INITIAL_STATE,..._0x2a238e['state']};default:return _0x27bf12;}};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.26",
|
|
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.26",
|
|
33
33
|
"@things-factory/operato-license-checker": "^3.1.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@things-factory/builder": "^6.1.23",
|
|
37
37
|
"@things-factory/meta-ui": "^6.0.0-alpha.6"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "a445124d23efdba90aedcce0eea5297d2f11c81c"
|
|
40
40
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';var a0_0x15b69d=a0_0x2183;function a0_0x2183(_0x31ee45,_0x4629d1){var _0x46de23=a0_0x46de();return a0_0x2183=function(_0x218390,_0xb41e5d){_0x218390=_0x218390-0x101;var _0x59e813=_0x46de23[_0x218390];return _0x59e813;},a0_0x2183(_0x31ee45,_0x4629d1);}(function(_0x1a7eaa,_0x126201){var _0x3337f5=a0_0x2183,_0x36c13e=_0x1a7eaa();while(!![]){try{var _0x3ce11f=-parseInt(_0x3337f5(0x108))/0x1+-parseInt(_0x3337f5(0x10b))/0x2*(parseInt(_0x3337f5(0x103))/0x3)+-parseInt(_0x3337f5(0x10a))/0x4*(parseInt(_0x3337f5(0x101))/0x5)+parseInt(_0x3337f5(0x109))/0x6+parseInt(_0x3337f5(0x10c))/0x7+parseInt(_0x3337f5(0x104))/0x8+-parseInt(_0x3337f5(0x107))/0x9;if(_0x3ce11f===_0x126201)break;else _0x36c13e['push'](_0x36c13e['shift']());}catch(_0x415ce4){_0x36c13e['push'](_0x36c13e['shift']());}}}(a0_0x46de,0x87d65));function a0_0x46de(){var _0x5eeef0=['INVALID_LICENSE','OVER_LIMIT','5927121UgZsuJ','197407ciLlxt','5673690SzWDEb','883780teGypQ','46mvTsOU','4186609pUADGl','defineProperty','5Cwigik','__esModule','96648fyHhyp','6644608LQaSwQ'];a0_0x46de=function(){return _0x5eeef0;};return a0_0x46de();}Object[a0_0x15b69d(0x10d)](exports,a0_0x15b69d(0x102),{'value':!0x0}),exports['OVER_LIMIT']=exports['INVALID_LICENSE']=void 0x0,exports[a0_0x15b69d(0x105)]='error.invalid\x20license\x20key',exports[a0_0x15b69d(0x106)]='error.page\x20count\x20over\x20license\x20limit';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x16fe50=a0_0x384a;(function(_0x42598d,_0x16d07d){const _0x91c100=a0_0x384a,_0x538655=_0x42598d();while(!![]){try{const _0xd29894=-parseInt(_0x91c100(0x1e1))/0x1*(parseInt(_0x91c100(0x1dc))/0x2)+parseInt(_0x91c100(0x1d4))/0x3+-parseInt(_0x91c100(0x1d7))/0x4*(-parseInt(_0x91c100(0x1da))/0x5)+-parseInt(_0x91c100(0x1db))/0x6*(-parseInt(_0x91c100(0x1dd))/0x7)+parseInt(_0x91c100(0x1e4))/0x8+parseInt(_0x91c100(0x1e2))/0x9+parseInt(_0x91c100(0x1e3))/0xa*(-parseInt(_0x91c100(0x1d2))/0xb);if(_0xd29894===_0x16d07d)break;else _0x538655['push'](_0x538655['shift']());}catch(_0x4606df){_0x538655['push'](_0x538655['shift']());}}}(a0_0x5a94,0xf1bc6));Object[a0_0x16fe50(0x1d5)](exports,a0_0x16fe50(0x1d6),{'value':!0x0}),exports[a0_0x16fe50(0x1d3)]=void 0x0;const tslib_1=require(a0_0x16fe50(0x1df)),ERROR_CODES=tslib_1['__importStar'](require('../constants/error-code'));function a0_0x5a94(){const _0x203ed0=['780PHiKID','7254992zahrBm','560362aeEeIe','LicenseError','3404298QkVUam','defineProperty','__esModule','27844JKKgcA','detail','ERROR_CODES','685XQzCeL','114zFmZPb','2GLmrCC','454517CffmYP','errorCode','tslib','license-error','309779hDXgPZ','9399771tngpps'];a0_0x5a94=function(){return _0x203ed0;};return a0_0x5a94();}function a0_0x384a(_0x433a69,_0x245d19){const _0x5a94da=a0_0x5a94();return a0_0x384a=function(_0x384a5e,_0x34c858){_0x384a5e=_0x384a5e-0x1d2;let _0x308e27=_0x5a94da[_0x384a5e];return _0x308e27;},a0_0x384a(_0x433a69,_0x245d19);}class LicenseError extends Error{static get[a0_0x16fe50(0x1d9)](){return Object['assign']({},ERROR_CODES);}constructor({errorCode:_0x130477,detail:_0x35bedd}){const _0x487d68=a0_0x16fe50;super(_0x130477),this['name']=_0x487d68(0x1e0),this[_0x487d68(0x1de)]=_0x130477,this[_0x487d68(0x1d8)]=_0x35bedd;}}exports[a0_0x16fe50(0x1d3)]=LicenseError;
|
package/server/routes.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a0_0x139a(){const _0x48e2f1=['things-factory:operato-tools:routes','738aQNrOH','bootstrap-module-domain-private-route','bootstrap-module-domain-public-route','3024000kQydYJ','1245IQqxRz','1421092quUCwI','423297ehYLYJ','13455000aKfWtw','7086uwmQMj','518744YVQFZB','7ahJuko','1555qqKlQX'];a0_0x139a=function(){return _0x48e2f1;};return a0_0x139a();}function a0_0x3abd(_0x418c6c,_0x433eb2){const _0x139a9e=a0_0x139a();return a0_0x3abd=function(_0x3abd61,_0x420644){_0x3abd61=_0x3abd61-0x19a;let _0x5ab673=_0x139a9e[_0x3abd61];return _0x5ab673;},a0_0x3abd(_0x418c6c,_0x433eb2);}const a0_0x374f44=a0_0x3abd;(function(_0x2759b3,_0x1de4de){const _0x3ca9be=a0_0x3abd,_0x1c9536=_0x2759b3();while(!![]){try{const _0x43725d=parseInt(_0x3ca9be(0x1a2))/0x1+parseInt(_0x3ca9be(0x19c))/0x2*(parseInt(_0x3ca9be(0x1a0))/0x3)+parseInt(_0x3ca9be(0x1a1))/0x4+-parseInt(_0x3ca9be(0x19a))/0x5*(-parseInt(_0x3ca9be(0x1a4))/0x6)+parseInt(_0x3ca9be(0x1a6))/0x7*(-parseInt(_0x3ca9be(0x1a5))/0x8)+parseInt(_0x3ca9be(0x19f))/0x9+-parseInt(_0x3ca9be(0x1a3))/0xa;if(_0x43725d===_0x1de4de)break;else _0x1c9536['push'](_0x1c9536['shift']());}catch(_0x12126c){_0x1c9536['push'](_0x1c9536['shift']());}}}(a0_0x139a,0x36d8d));const debug=require('debug')(a0_0x374f44(0x19b));process['on']('bootstrap-module-global-public-route',(_0x26d74d,_0xc233c5)=>{}),process['on']('bootstrap-module-global-private-route',(_0x38f6fb,_0x227c5f)=>{}),process['on'](a0_0x374f44(0x19e),(_0x36ce0e,_0x35cad2)=>{}),process['on'](a0_0x374f44(0x19d),(_0x48598a,_0x33212a)=>{});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function a0_0x383f(){const _0xa19063=['283789uHbsMl','aes-256-ecb','name','assign','category',',\x22mandatory\x22:\x20','createGridColumns','h1z0q9i9x7q6','refType','replace','default','final','{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22','Resolver','createMenuData','enc','dataProp','COPY','48kFwAiJ','\x22,\x22desc\x22:','reverseSort','762363mRGgNC','find','code','\x20,\x22editable\x22:\x20','\x0a{\x0a\x20\x20\x22menu\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x22title\x22:\x20\x22{{name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22\x22,\x0a\x20\x20\x20\x20\x20\x20\x22desc\x22:\x20\x22\x22\x0a\x20\x20},\x0a\x20\x20\x22gql\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x22query\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22list_func\x22:\x20\x22{{pluralCamelCase\x20name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22find_one_func\x22:\x22{{camelCase\x20name}}\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x22mutation\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22multiple\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22func\x22:\x22updateMultiple{{pascalCase\x20name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22{{pascalCase\x20name}}Patch\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22delete\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22func\x22:\x22delete{{pluralPascalCase\x20name}}\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20},\x0a\x20\x20\x22button\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22export\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22add\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22delete\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22save\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20],\x0a\x20\x20\x22grid_column\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22string\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22id\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22header\x22:\x20\x22id\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22hidden\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22editable\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22mandatory\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22sortable\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22align\x22:\x20\x22left\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22width\x22:\x200,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22exportable\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20},\x0a{{GridColumns}}\x0a\x20\x20],\x0a\x20\x20\x22grid\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22button\x22:[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{{HistoryButton}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22option\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22mobile_mode\x22:\x20\x22LIST\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22desk_mode\x22:\x20\x22GRID\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22use_row_checker\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22pages\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2020,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2050,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20100,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20300\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22view_mode\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22GRID\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22LIST\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22CARD\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22sorters\x22:\x20[\x0a{{SortColumns}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20]\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x22row\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22multiple_select\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22click\x22:\x20\x22select-row-toggle\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20},\x0a\x20\x20\x22search\x22:\x20[\x0a{{SearchColumns}}\x0a\x20\x20]\x0a}\x0a','checkStudioTemplateIsOverLimit','hidden','JSON','\x20,\x22exportable\x22:\x20true','@things-factory/meta-ui/client/pages/meta-grist-page','length','sort','design:returntype','creator','\x22,\x22operator\x22:\x20\x22','gridRank','join','EntityColumn','resourceUrl','map','aes-256-ofb','4008918xPNOkL','3252XMqNti','findOne','19390ZPRTQY','routing','refName','{\x22name\x22:\x22',',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22','select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27','parent','Arg','utf8','\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}','{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22','885929fsziHe','2185050hkevdU','tslib','__importDefault','@transaction','Menu','Directive','stringify','rank','update','3645uDDMFK','pluralize','OperatoToolCreateMenu','creator_id','template','save','design:paramtypes','Mutation','aes256','\x22,\x22header\x22:\x20\x22','updatedAt','left','randomBytes','toolCreateMenu','substring','{\x22type\x22:\x20\x22','scenario','aes-256-cbc','createCipheriv','\x22,\x22name\x22:\x20\x22','push','aes-256-ctr','\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','split',',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22','aes-256-cfb8','./../tool-secret/tool-permission','createSortCols','__param','__decorate','prototype','14ghrTSU','getRepository','query','aes-256-cfb1','string','@things-factory/resource-base','sortRank','filter','meta-grist-page','updated_at','createSearchCols','toString','updater_id','state','__metadata','menuType','1930LyeZzC','\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\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_json\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20','hex','searchRank'];a0_0x383f=function(){return _0xa19063;};return a0_0x383f();}const a0_0x22a47a=a0_0x1687;(function(_0x54ae6f,_0x45ca43){const _0x23a385=a0_0x1687,_0x368676=_0x54ae6f();while(!![]){try{const _0xf30271=-parseInt(_0x23a385(0x13d))/0x1+parseInt(_0x23a385(0x132))/0x2+-parseInt(_0x23a385(0x1a5))/0x3+-parseInt(_0x23a385(0x130))/0x4*(parseInt(_0x23a385(0x147))/0x5)+-parseInt(_0x23a385(0x13e))/0x6*(parseInt(_0x23a385(0x166))/0x7)+parseInt(_0x23a385(0x18d))/0x8*(-parseInt(_0x23a385(0x190))/0x9)+parseInt(_0x23a385(0x176))/0xa*(parseInt(_0x23a385(0x17b))/0xb);if(_0xf30271===_0x45ca43)break;else _0x368676['push'](_0x368676['shift']());}catch(_0x2f18c3){_0x368676['push'](_0x368676['shift']());}}}(a0_0x383f,0xe4db6));Object['defineProperty'](exports,'__esModule',{'value':!0x0}),exports[a0_0x22a47a(0x149)]=void 0x0;const tslib_1=require(a0_0x22a47a(0x13f)),type_graphql_1=require('type-graphql'),resource_base_1=require(a0_0x22a47a(0x16b)),menu_base_1=require('@things-factory/menu-base'),tool_permission_1=require(a0_0x22a47a(0x161)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require('lodash'),{plural:plural}=require(a0_0x22a47a(0x148)),crypto_1=tslib_1[a0_0x22a47a(0x140)](require('crypto'));let OperatoToolCreateMenu=class{async[a0_0x22a47a(0x154)](_0x3f25b9,_0x158b78,_0x5c1abe){const _0x299317=a0_0x22a47a,{domain:_0x2a970e,user:_0x423a5c,tx:_0x36da75}=_0x5c1abe[_0x299317(0x173)];await(0x0,tool_permission_1[_0x299317(0x195)])('',_0x5c1abe);const _0x402cd6=await _0x36da75[_0x299317(0x167)](resource_base_1['Entity'])[_0x299317(0x131)]({'where':{'domain':{'id':_0x2a970e['id']},'id':_0x3f25b9}}),_0x8cf53a=await _0x36da75[_0x299317(0x167)](resource_base_1[_0x299317(0x1a1)])[_0x299317(0x191)]({'where':{'domain':{'id':_0x2a970e['id']},'entity':{'id':_0x402cd6['id']}}});let {name:_0x195ad6=''}=_0x402cd6||{},_0x14cc68=kebabCase(_0x195ad6),_0x4792c9=modelTemplate[_0x299317(0x184)](/{{pascalCase name}}/g,startCase(camelCase(_0x195ad6))['replace'](/ /g,''))[_0x299317(0x184)](/{{camelCase name}}/g,camelCase(_0x195ad6))[_0x299317(0x184)](/{{snakeCase name}}/g,snakeCase(_0x195ad6))[_0x299317(0x184)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x195ad6)))['replace'](/ /g,''))[_0x299317(0x184)](/{{pluralCamelCase name}}/g,camelCase(plural(_0x195ad6)))['replace'](/{{name}}/g,_0x195ad6),_0xb1f728='';_0x299317(0x197)==_0x402cd6[_0x299317(0x18b)]?_0xb1f728=_0x299317(0x178):_0x299317(0x18c)==_0x402cd6['dataProp']&&(_0xb1f728=_0x299317(0x15d)),_0x4792c9=_0x4792c9['replace'](/{{HistoryButton}}/g,_0xb1f728);let _0x7cad2c=this[_0x299317(0x162)](_0x8cf53a);_0x4792c9=_0x4792c9[_0x299317(0x184)](/{{SortColumns}}/g,_0x7cad2c['join'](','));let _0x23651d=this[_0x299317(0x170)](_0x8cf53a);_0x4792c9=_0x4792c9[_0x299317(0x184)](/{{SearchColumns}}/g,_0x23651d[_0x299317(0x1a0)](','));let _0x2e2eb8=this[_0x299317(0x181)](_0x8cf53a);return _0x4792c9=_0x4792c9[_0x299317(0x184)](/{{GridColumns}}/g,_0x2e2eb8[_0x299317(0x1a0)](',')),_0x4792c9=this['enc'](_0x4792c9),await this[_0x299317(0x189)](_0x36da75,_0x2a970e,_0x423a5c,_0x158b78,_0x14cc68,_0x4792c9),!0x0;}[a0_0x22a47a(0x181)](_0x2b7951){const _0x4cb31c=a0_0x22a47a;return _0x2b7951[_0x4cb31c(0x16d)](_0x522293=>'id'!=_0x522293[_0x4cb31c(0x17d)]&&_0x522293[_0x4cb31c(0x19f)]>0x0)['sort'](function(_0x307448,_0x32ffd8){return _0x307448['gridRank']-_0x32ffd8['gridRank'];})['map'](_0x169c9f=>{const _0x3d71fa=_0x4cb31c;let {gridEditor:_0x15783d=_0x3d71fa(0x16a),name:_0x19fa30,term:_0x39b4aa,gridWidth:_0x32e3e5=0x0,gridAlign:_0x11c96c=_0x3d71fa(0x152),nullable:_0x4f1ec3=!0x1}=_0x169c9f;if(null==_0x15783d&&(_0x15783d='string'),null==_0x11c96c&&(_0x11c96c='left'),_0x3d71fa(0x172)==_0x19fa30||_0x3d71fa(0x14a)==_0x19fa30)return _0x19fa30=_0x3d71fa(0x172)==_0x19fa30?'updater':_0x3d71fa(0x19d),_0x3d71fa(0x13c)+_0x19fa30+_0x3d71fa(0x150)+_0x19fa30+_0x3d71fa(0x13b);if(_0x3d71fa(0x16f)==_0x19fa30||'created_at'==_0x19fa30)return _0x3d71fa(0x187)+(_0x3d71fa(0x16f)==_0x19fa30?_0x3d71fa(0x151):'createdAt')+_0x3d71fa(0x150)+_0x19fa30+'\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}';let _0x4ecc84='readonly'!=_0x15783d&&_0x3d71fa(0x196)!=_0x15783d,_0x53352c=_0x3d71fa(0x196)==_0x15783d;0x1!=_0x53352c&&0x0!=_0x4ecc84||(_0x15783d='string');let _0x15322c=_0x3d71fa(0x156)+_0x15783d+_0x3d71fa(0x15a)+camelCase(_0x19fa30)+_0x3d71fa(0x150)+_0x39b4aa+'\x22,\x22hidden\x22:'+_0x53352c+_0x3d71fa(0x193)+_0x4ecc84+_0x3d71fa(0x180)+!_0x4f1ec3+',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22'+_0x11c96c+'\x22,\x22width\x22:'+_0x32e3e5+_0x3d71fa(0x198);return _0x3d71fa(0x192)==_0x169c9f[_0x3d71fa(0x183)]&&(_0x15322c+=_0x3d71fa(0x136)+_0x169c9f['refName']+'\x22}'),_0x3d71fa(0x157)==_0x169c9f[_0x3d71fa(0x183)]&&(_0x15322c+=',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22'+_0x169c9f[_0x3d71fa(0x134)]+'\x22}'),'entity'==_0x169c9f[_0x3d71fa(0x183)]&&(_0x15322c+=_0x3d71fa(0x15f)+camelCase(plural(_0x169c9f[_0x3d71fa(0x134)]))+_0x3d71fa(0x177)),_0x15322c+='}',_0x15322c;});}[a0_0x22a47a(0x170)](_0x3ccf8b){const _0x1f824f=a0_0x22a47a;return _0x3ccf8b['filter'](_0x492c59=>_0x492c59[_0x1f824f(0x17a)]>0x0)[_0x1f824f(0x19b)](function(_0x4346da,_0x39ad60){const _0x4015cd=_0x1f824f;return _0x4346da[_0x4015cd(0x17a)]-_0x39ad60[_0x4015cd(0x17a)];})[_0x1f824f(0x1a3)](_0x4d5111=>{const _0x386099=_0x1f824f;let _0x4e83c2=_0x4d5111['searchOper'];return _0x386099(0x16d)==_0x4e83c2?'\x22'+camelCase(_0x4d5111[_0x386099(0x17d)])+'\x22':(_0x4e83c2||(_0x4e83c2='eq'),'{\x22name\x22:\x20\x22'+camelCase(_0x4d5111[_0x386099(0x17d)])+_0x386099(0x19e)+_0x4e83c2+'\x22}');});}[a0_0x22a47a(0x162)](_0x315523){const _0x2b8597=a0_0x22a47a;return _0x315523[_0x2b8597(0x16d)](_0x4a5153=>_0x4a5153[_0x2b8597(0x16c)]>0x0)[_0x2b8597(0x19b)](function(_0x1704ec,_0x482571){const _0x1b5be6=_0x2b8597;return _0x1704ec['sortRank']-_0x482571[_0x1b5be6(0x16c)];})['map'](_0x46b834=>_0x2b8597(0x135)+camelCase(_0x46b834[_0x2b8597(0x17d)])+_0x2b8597(0x18e)+_0x46b834[_0x2b8597(0x18f)]+'}');}async[a0_0x22a47a(0x189)](_0x15c6c1,_0x97ac65,_0x20eaf0,_0x2827c6,_0x792746,_0x4dae45){const _0xdf2d4b=a0_0x22a47a;let _0x243995=await _0x15c6c1[_0xdf2d4b(0x167)](menu_base_1[_0xdf2d4b(0x142)])['findOne']({'where':{'domain':{'id':_0x97ac65['id']},'id':_0x2827c6}}),_0x52f9e3=(await _0x15c6c1[_0xdf2d4b(0x167)](menu_base_1[_0xdf2d4b(0x142)])[_0xdf2d4b(0x168)](_0xdf2d4b(0x137)+_0x2827c6+'\x27\x20or\x20id\x20=\x20\x27'+_0x2827c6+'\x27'))[0x0][_0xdf2d4b(0x145)]+0xa,_0x53e540=new menu_base_1[(_0xdf2d4b(0x142))]();_0x53e540[_0xdf2d4b(0x17d)]=_0x792746,_0x53e540[_0xdf2d4b(0x175)]='SCREEN',_0x53e540[_0xdf2d4b(0x17f)]=_0xdf2d4b(0x16e),_0x53e540[_0xdf2d4b(0x145)]=_0x52f9e3,_0x53e540['hiddenFlag']=!0x1,_0x53e540[_0xdf2d4b(0x133)]=_0x792746,_0x53e540[_0xdf2d4b(0x14b)]=_0x4dae45,_0x53e540[_0xdf2d4b(0x1a2)]=_0xdf2d4b(0x199),_0x53e540[_0xdf2d4b(0x138)]=_0x243995,await _0x15c6c1[_0xdf2d4b(0x167)](menu_base_1[_0xdf2d4b(0x142)])[_0xdf2d4b(0x14c)](Object[_0xdf2d4b(0x17e)](Object['assign']({},_0x53e540),{'domain':_0x97ac65,'creator':_0x20eaf0,'updater':_0x20eaf0}));}[a0_0x22a47a(0x18a)](_0x3de373){const _0x33f9aa=a0_0x22a47a;let _0x2e275b=JSON[_0x33f9aa(0x144)](_0x3de373)[_0x33f9aa(0x15e)](/(.{100})/)['filter'](_0x34e0f7=>_0x34e0f7),_0x2fe12b=[_0x33f9aa(0x17c),_0x33f9aa(0x158),'aes-256-cfb',_0x33f9aa(0x160),_0x33f9aa(0x169),_0x33f9aa(0x1a4),_0x33f9aa(0x15c),_0x33f9aa(0x14f)],_0x40c226=crypto_1[_0x33f9aa(0x185)][_0x33f9aa(0x153)](0x20)[_0x33f9aa(0x171)](_0x33f9aa(0x179)),_0x391a1d=Buffer['from'](_0x40c226,_0x33f9aa(0x179)),_0xc5cec6=_0x40c226[_0x33f9aa(0x155)](0x0,0x10),_0x3f1224=['',_0xc5cec6,_0xc5cec6,_0xc5cec6,_0xc5cec6,_0xc5cec6,_0xc5cec6,_0xc5cec6],_0x10224e=0x0,_0x470006=[];_0x470006[_0x33f9aa(0x15b)](_0x40c226);for(var _0x480ba8=0x0;_0x480ba8<_0x2e275b[_0x33f9aa(0x19a)];_0x480ba8++,_0x10224e++){_0x10224e==_0x2fe12b['length']&&(_0x10224e=0x0);let _0x4f7f35=crypto_1[_0x33f9aa(0x185)][_0x33f9aa(0x159)](_0x2fe12b[_0x10224e],_0x391a1d,_0x3f1224[_0x10224e]),_0x51cc15=_0x4f7f35[_0x33f9aa(0x146)](_0x2e275b[_0x480ba8],_0x33f9aa(0x13a),'hex');_0x51cc15+=_0x4f7f35[_0x33f9aa(0x186)](_0x33f9aa(0x179)),_0x470006['push'](_0x51cc15);}return _0x470006[_0x33f9aa(0x1a0)](_0x33f9aa(0x182));}};tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x22a47a(0x143)])(a0_0x22a47a(0x141)),(0x0,type_graphql_1[a0_0x22a47a(0x14e)])(_0x56fd88=>Boolean,{'description':'Operato\x20Tool\x20Create\x20Menu'}),tslib_1[a0_0x22a47a(0x163)](0x0,(0x0,type_graphql_1[a0_0x22a47a(0x139)])('id')),tslib_1[a0_0x22a47a(0x163)](0x1,(0x0,type_graphql_1['Arg'])('parent_menu_id')),tslib_1[a0_0x22a47a(0x163)](0x2,(0x0,type_graphql_1['Ctx'])()),tslib_1[a0_0x22a47a(0x174)]('design:type',Function),tslib_1[a0_0x22a47a(0x174)](a0_0x22a47a(0x14d),[String,String,Object]),tslib_1[a0_0x22a47a(0x174)](a0_0x22a47a(0x19c),Promise)],OperatoToolCreateMenu[a0_0x22a47a(0x165)],a0_0x22a47a(0x154),null),OperatoToolCreateMenu=tslib_1[a0_0x22a47a(0x164)]([(0x0,type_graphql_1[a0_0x22a47a(0x188)])()],OperatoToolCreateMenu),exports[a0_0x22a47a(0x149)]=OperatoToolCreateMenu;function a0_0x1687(_0x18557f,_0x3a4747){const _0x383f89=a0_0x383f();return a0_0x1687=function(_0x168732,_0xcc14e1){_0x168732=_0x168732-0x130;let _0x37458b=_0x383f89[_0x168732];return _0x37458b;},a0_0x1687(_0x18557f,_0x3a4747);}const modelTemplate=a0_0x22a47a(0x194);
|
|
1
|
+
'use strict';const a0_0x1d1781=a0_0xf3cc;(function(_0xbe495d,_0x213e8c){const _0x2f0996=a0_0xf3cc,_0x36e16e=_0xbe495d();while(!![]){try{const _0x1d93d5=parseInt(_0x2f0996(0x81))/0x1+parseInt(_0x2f0996(0xd7))/0x2+parseInt(_0x2f0996(0x76))/0x3+parseInt(_0x2f0996(0x82))/0x4+-parseInt(_0x2f0996(0xa2))/0x5+parseInt(_0x2f0996(0x87))/0x6+-parseInt(_0x2f0996(0x94))/0x7;if(_0x1d93d5===_0x213e8c)break;else _0x36e16e['push'](_0x36e16e['shift']());}catch(_0xaad77){_0x36e16e['push'](_0x36e16e['shift']());}}}(a0_0x57b9,0x453bd));Object[a0_0x1d1781(0x72)](exports,a0_0x1d1781(0x89),{'value':!0x0}),exports['OperatoToolCreateMenu']=void 0x0;function a0_0x57b9(){const _0x53336b=['sortRank',',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22','JSON','meta-grist-page','OperatoToolCreateMenu','defineProperty','tslib','refName','\x22,\x22header\x22:\x20\x22','111321CpyTDy','getRepository','refType','\x22,\x22name\x22:\x20\x22','split','\x22,\x22width\x22:','design:type','Arg','h1z0q9i9x7q6','hidden','category','550183YkTGEz','1624304VASBaJ','hiddenFlag','__decorate','push','findOne','3052590ENMgax','updatedAt','__esModule','enc','readonly','rank','creator_id','toolCreateMenu','sort','parent','searchRank','resourceUrl','Mutation','6123614OWImyj','createSortCols','parent_menu_id','default','\x22,\x22hidden\x22:','./../tool-secret/tool-permission',',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22','\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}','searchOper','SCREEN','save','{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22','substring','createGridColumns','2319955bRWurK','type-graphql','updated_at','\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}','Operato\x20Tool\x20Create\x20Menu','code','final','\x22,\x22operator\x22:\x20\x22','{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22',',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22','assign','design:paramtypes','aes-256-cfb8','Ctx','aes-256-ofb','@things-factory/menu-base','updater_id','created_at','createSearchCols','aes256','aes-256-cfb','EntityColumn','design:returntype','name','\x20,\x22exportable\x22:\x20true','pluralize','left','creator','\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','COPY','string','aes-256-ctr','replace','map','\x27\x20or\x20id\x20=\x20\x27','aes-256-cfb1','\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22basic\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22label\x22:\x20\x22data_history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22icon\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22logic\x22:\x20\x22history_copy\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20','\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}','__metadata','filter','__param','join','Menu','length','stringify','\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','createdAt','checkStudioTemplateIsOverLimit','Entity',',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22','@things-factory/meta-ui/client/pages/meta-grist-page','\x20,\x22editable\x22:\x20','state','240486ZIUdvK','hex','find','{\x22name\x22:\x22','query','gridRank'];a0_0x57b9=function(){return _0x53336b;};return a0_0x57b9();}const tslib_1=require(a0_0x1d1781(0x73)),type_graphql_1=require(a0_0x1d1781(0xa3)),resource_base_1=require('@things-factory/resource-base'),menu_base_1=require(a0_0x1d1781(0xb1)),tool_permission_1=require(a0_0x1d1781(0x99)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require('lodash'),{plural:plural}=require(a0_0x1d1781(0xbb)),crypto_1=tslib_1['__importDefault'](require('crypto'));let OperatoToolCreateMenu=class{async[a0_0x1d1781(0x8e)](_0x1b1b19,_0x429ce0,_0x5c6bcc){const _0x5eae37=a0_0x1d1781,{domain:_0xd67e52,user:_0x19843a,tx:_0x283c9f}=_0x5c6bcc[_0x5eae37(0xd6)];await(0x0,tool_permission_1[_0x5eae37(0xd1)])('',_0x5c6bcc);const _0x5af024=await _0x283c9f['getRepository'](resource_base_1[_0x5eae37(0xd2)])['findOne']({'where':{'domain':{'id':_0xd67e52['id']},'id':_0x1b1b19}}),_0x36e522=await _0x283c9f[_0x5eae37(0x77)](resource_base_1[_0x5eae37(0xb7)])[_0x5eae37(0xd9)]({'where':{'domain':{'id':_0xd67e52['id']},'entity':{'id':_0x5af024['id']}}});let {name:_0x2cc764=''}=_0x5af024||{},_0x479a08=kebabCase(_0x2cc764),_0x53faab=modelTemplate[_0x5eae37(0xc2)](/{{pascalCase name}}/g,startCase(camelCase(_0x2cc764))['replace'](/ /g,''))[_0x5eae37(0xc2)](/{{camelCase name}}/g,camelCase(_0x2cc764))['replace'](/{{snakeCase name}}/g,snakeCase(_0x2cc764))['replace'](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x2cc764)))[_0x5eae37(0xc2)](/ /g,''))[_0x5eae37(0xc2)](/{{pluralCamelCase name}}/g,camelCase(plural(_0x2cc764)))[_0x5eae37(0xc2)](/{{name}}/g,_0x2cc764),_0x1e7b90='';_0x5eae37(0x6f)==_0x5af024['dataProp']?_0x1e7b90=_0x5eae37(0xcf):_0x5eae37(0xbf)==_0x5af024['dataProp']&&(_0x1e7b90=_0x5eae37(0xc6)),_0x53faab=_0x53faab[_0x5eae37(0xc2)](/{{HistoryButton}}/g,_0x1e7b90);let _0x45c653=this[_0x5eae37(0x95)](_0x36e522);_0x53faab=_0x53faab[_0x5eae37(0xc2)](/{{SortColumns}}/g,_0x45c653[_0x5eae37(0xcb)](','));let _0x131bf7=this[_0x5eae37(0xb4)](_0x36e522);_0x53faab=_0x53faab[_0x5eae37(0xc2)](/{{SearchColumns}}/g,_0x131bf7[_0x5eae37(0xcb)](','));let _0x1085c1=this[_0x5eae37(0xa1)](_0x36e522);return _0x53faab=_0x53faab['replace'](/{{GridColumns}}/g,_0x1085c1['join'](',')),_0x53faab=this[_0x5eae37(0x8a)](_0x53faab),await this['createMenuData'](_0x283c9f,_0xd67e52,_0x19843a,_0x429ce0,_0x479a08,_0x53faab),!0x0;}[a0_0x1d1781(0xa1)](_0xf38ad8){const _0x11ec3b=a0_0x1d1781;return _0xf38ad8['filter'](_0x1c4a3d=>'id'!=_0x1c4a3d[_0x11ec3b(0xb9)]&&_0x1c4a3d[_0x11ec3b(0xdc)]>0x0)[_0x11ec3b(0x8f)](function(_0x570b0f,_0x1b87e8){const _0x53f568=_0x11ec3b;return _0x570b0f[_0x53f568(0xdc)]-_0x1b87e8['gridRank'];})['map'](_0x4cf1e4=>{const _0x46199e=_0x11ec3b;let {gridEditor:_0x43adb7=_0x46199e(0xc0),name:_0x461f2c,term:_0x32852a,gridWidth:_0x4d9a6f=0x0,gridAlign:_0x5b3893='left',nullable:_0x20799d=!0x1}=_0x4cf1e4;if(null==_0x43adb7&&(_0x43adb7='string'),null==_0x5b3893&&(_0x5b3893=_0x46199e(0xbc)),'updater_id'==_0x461f2c||_0x46199e(0x8d)==_0x461f2c)return _0x461f2c=_0x46199e(0xb2)==_0x461f2c?'updater':_0x46199e(0xbd),_0x46199e(0x9f)+_0x461f2c+_0x46199e(0x75)+_0x461f2c+_0x46199e(0xc7);if(_0x46199e(0xa4)==_0x461f2c||_0x46199e(0xb3)==_0x461f2c)return _0x46199e(0xaa)+(_0x46199e(0xa4)==_0x461f2c?_0x46199e(0x88):_0x46199e(0xd0))+_0x46199e(0x75)+_0x461f2c+_0x46199e(0x9b);let _0x1b38c0=_0x46199e(0x8b)!=_0x43adb7&&_0x46199e(0x7f)!=_0x43adb7,_0x439b75=_0x46199e(0x7f)==_0x43adb7;0x1!=_0x439b75&&0x0!=_0x1b38c0||(_0x43adb7=_0x46199e(0xc0));let _0xa14125='{\x22type\x22:\x20\x22'+_0x43adb7+_0x46199e(0x79)+camelCase(_0x461f2c)+_0x46199e(0x75)+_0x32852a+_0x46199e(0x98)+_0x439b75+_0x46199e(0xd5)+_0x1b38c0+',\x22mandatory\x22:\x20'+!_0x20799d+_0x46199e(0xab)+_0x5b3893+_0x46199e(0x7b)+_0x4d9a6f+_0x46199e(0xba);return _0x46199e(0xa7)==_0x4cf1e4[_0x46199e(0x78)]&&(_0xa14125+=_0x46199e(0x6e)+_0x4cf1e4[_0x46199e(0x74)]+'\x22}'),'scenario'==_0x4cf1e4[_0x46199e(0x78)]&&(_0xa14125+=_0x46199e(0xd3)+_0x4cf1e4[_0x46199e(0x74)]+'\x22}'),'entity'==_0x4cf1e4[_0x46199e(0x78)]&&(_0xa14125+=_0x46199e(0x9a)+camelCase(plural(_0x4cf1e4[_0x46199e(0x74)]))+_0x46199e(0xa5)),_0xa14125+='}',_0xa14125;});}[a0_0x1d1781(0xb4)](_0x56b833){const _0x59bb67=a0_0x1d1781;return _0x56b833[_0x59bb67(0xc9)](_0x4aefac=>_0x4aefac['searchRank']>0x0)[_0x59bb67(0x8f)](function(_0x30636c,_0x6d3778){const _0x521a9e=_0x59bb67;return _0x30636c[_0x521a9e(0x91)]-_0x6d3778[_0x521a9e(0x91)];})[_0x59bb67(0xc3)](_0x5420f7=>{const _0x38b1b7=_0x59bb67;let _0x1fbfa4=_0x5420f7[_0x38b1b7(0x9c)];return _0x38b1b7(0xc9)==_0x1fbfa4?'\x22'+camelCase(_0x5420f7['name'])+'\x22':(_0x1fbfa4||(_0x1fbfa4='eq'),'{\x22name\x22:\x20\x22'+camelCase(_0x5420f7['name'])+_0x38b1b7(0xa9)+_0x1fbfa4+'\x22}');});}[a0_0x1d1781(0x95)](_0x1fa1d8){const _0x10965b=a0_0x1d1781;return _0x1fa1d8[_0x10965b(0xc9)](_0x517492=>_0x517492['sortRank']>0x0)[_0x10965b(0x8f)](function(_0x550285,_0x204f03){const _0x2324c3=_0x10965b;return _0x550285[_0x2324c3(0xdd)]-_0x204f03[_0x2324c3(0xdd)];})[_0x10965b(0xc3)](_0x354cfb=>_0x10965b(0xda)+camelCase(_0x354cfb['name'])+'\x22,\x22desc\x22:'+_0x354cfb['reverseSort']+'}');}async['createMenuData'](_0x400094,_0xebe963,_0x551605,_0x440605,_0x56aba4,_0x135f17){const _0x252464=a0_0x1d1781;let _0x355105=await _0x400094['getRepository'](menu_base_1[_0x252464(0xcc)])[_0x252464(0x86)]({'where':{'domain':{'id':_0xebe963['id']},'id':_0x440605}}),_0x36097d=(await _0x400094[_0x252464(0x77)](menu_base_1[_0x252464(0xcc)])[_0x252464(0xdb)]('select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27'+_0x440605+_0x252464(0xc4)+_0x440605+'\x27'))[0x0]['rank']+0xa,_0x4f9521=new menu_base_1['Menu']();_0x4f9521['name']=_0x56aba4,_0x4f9521['menuType']=_0x252464(0x9d),_0x4f9521[_0x252464(0x80)]=_0x252464(0x70),_0x4f9521[_0x252464(0x8c)]=_0x36097d,_0x4f9521[_0x252464(0x83)]=!0x1,_0x4f9521['routing']=_0x56aba4,_0x4f9521['template']=_0x135f17,_0x4f9521[_0x252464(0x92)]=_0x252464(0xd4),_0x4f9521[_0x252464(0x90)]=_0x355105,await _0x400094[_0x252464(0x77)](menu_base_1[_0x252464(0xcc)])[_0x252464(0x9e)](Object[_0x252464(0xac)](Object[_0x252464(0xac)]({},_0x4f9521),{'domain':_0xebe963,'creator':_0x551605,'updater':_0x551605}));}[a0_0x1d1781(0x8a)](_0x1647bb){const _0x1e51f9=a0_0x1d1781;let _0x566d00=JSON[_0x1e51f9(0xce)](_0x1647bb)[_0x1e51f9(0x7a)](/(.{100})/)[_0x1e51f9(0xc9)](_0x560eba=>_0x560eba),_0x522a7b=['aes-256-ecb','aes-256-cbc',_0x1e51f9(0xb6),_0x1e51f9(0xae),_0x1e51f9(0xc5),_0x1e51f9(0xb0),_0x1e51f9(0xc1),_0x1e51f9(0xb5)],_0x3d2fe4=crypto_1[_0x1e51f9(0x97)]['randomBytes'](0x20)['toString'](_0x1e51f9(0xd8)),_0x105aaa=Buffer['from'](_0x3d2fe4,_0x1e51f9(0xd8)),_0x2e7ef4=_0x3d2fe4[_0x1e51f9(0xa0)](0x0,0x10),_0xac8846=['',_0x2e7ef4,_0x2e7ef4,_0x2e7ef4,_0x2e7ef4,_0x2e7ef4,_0x2e7ef4,_0x2e7ef4],_0x28d22f=0x0,_0x4f7eee=[];_0x4f7eee[_0x1e51f9(0x85)](_0x3d2fe4);for(var _0x4761a8=0x0;_0x4761a8<_0x566d00[_0x1e51f9(0xcd)];_0x4761a8++,_0x28d22f++){_0x28d22f==_0x522a7b['length']&&(_0x28d22f=0x0);let _0x160ba9=crypto_1[_0x1e51f9(0x97)]['createCipheriv'](_0x522a7b[_0x28d22f],_0x105aaa,_0xac8846[_0x28d22f]),_0x3ae911=_0x160ba9['update'](_0x566d00[_0x4761a8],'utf8',_0x1e51f9(0xd8));_0x3ae911+=_0x160ba9[_0x1e51f9(0xa8)](_0x1e51f9(0xd8)),_0x4f7eee[_0x1e51f9(0x85)](_0x3ae911);}return _0x4f7eee['join'](_0x1e51f9(0x7e));}};tslib_1[a0_0x1d1781(0x84)]([(0x0,type_graphql_1['Directive'])('@transaction'),(0x0,type_graphql_1[a0_0x1d1781(0x93)])(_0x2dae6e=>Boolean,{'description':a0_0x1d1781(0xa6)}),tslib_1[a0_0x1d1781(0xca)](0x0,(0x0,type_graphql_1[a0_0x1d1781(0x7d)])('id')),tslib_1[a0_0x1d1781(0xca)](0x1,(0x0,type_graphql_1[a0_0x1d1781(0x7d)])(a0_0x1d1781(0x96))),tslib_1[a0_0x1d1781(0xca)](0x2,(0x0,type_graphql_1[a0_0x1d1781(0xaf)])()),tslib_1[a0_0x1d1781(0xc8)](a0_0x1d1781(0x7c),Function),tslib_1[a0_0x1d1781(0xc8)](a0_0x1d1781(0xad),[String,String,Object]),tslib_1['__metadata'](a0_0x1d1781(0xb8),Promise)],OperatoToolCreateMenu['prototype'],a0_0x1d1781(0x8e),null),OperatoToolCreateMenu=tslib_1[a0_0x1d1781(0x84)]([(0x0,type_graphql_1['Resolver'])()],OperatoToolCreateMenu),exports[a0_0x1d1781(0x71)]=OperatoToolCreateMenu;function a0_0xf3cc(_0x5e0eab,_0x3363b3){const _0x57b90e=a0_0x57b9();return a0_0xf3cc=function(_0xf3ccc2,_0x3cebf9){_0xf3ccc2=_0xf3ccc2-0x6e;let _0x56afaf=_0x57b90e[_0xf3ccc2];return _0x56afaf;},a0_0xf3cc(_0x5e0eab,_0x3363b3);}const modelTemplate=a0_0x1d1781(0xbe);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x429f8b=a0_0x48ab;(function(_0xdcdc85,_0x2ea852){const _0x1902f1=a0_0x48ab,_0x4dc604=_0xdcdc85();while(!![]){try{const _0xc0ceab=parseInt(_0x1902f1(0xe2))/0x1*(parseInt(_0x1902f1(0x105))/0x2)+parseInt(_0x1902f1(0xf9))/0x3+parseInt(_0x1902f1(0xeb))/0x4+-parseInt(_0x1902f1(0xdb))/0x5*(-parseInt(_0x1902f1(0xa5))/0x6)+-parseInt(_0x1902f1(0xe8))/0x7*(-parseInt(_0x1902f1(0x111))/0x8)+parseInt(_0x1902f1(0xaa))/0x9*(parseInt(_0x1902f1(0xdf))/0xa)+-parseInt(_0x1902f1(0xfc))/0xb*(parseInt(_0x1902f1(0xba))/0xc);if(_0xc0ceab===_0x2ea852)break;else _0x4dc604['push'](_0x4dc604['shift']());}catch(_0x5e934c){_0x4dc604['push'](_0x4dc604['shift']());}}}(a0_0x1639,0x1a49c));Object['defineProperty'](exports,a0_0x429f8b(0x101),{'value':!0x0}),exports[a0_0x429f8b(0x10e)]=void 0x0;const tslib_1=require(a0_0x429f8b(0x129)),type_graphql_1=require(a0_0x429f8b(0xe1)),shell_1=require(a0_0x429f8b(0x110)),resource_base_1=require(a0_0x429f8b(0xee)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x429f8b(0xfd)),{plural:plural}=require(a0_0x429f8b(0xf3)),fs=require('fs');let OperatoToolCreateService=class{async['toolCreateService'](_0x2172a5,_0x5888b6){const _0x3963fb=a0_0x429f8b,{domain:_0x57a004}=_0x5888b6['state'],_0x459e1e=await(0x0,shell_1[_0x3963fb(0xd1)])(resource_base_1[_0x3963fb(0xdc)])[_0x3963fb(0xbc)]({'where':{'id':_0x2172a5}}),_0x42b457=await(0x0,shell_1[_0x3963fb(0xd1)])(resource_base_1[_0x3963fb(0xe3)])[_0x3963fb(0xa4)]({'where':{'domain':{'id':_0x57a004['id']},'entity':{'id':_0x459e1e['id']}}});let {name:_0x56d635='',bundle:_0x580bd8=''}=_0x459e1e||{},_0x3221c0=this[_0x3963fb(0xc3)](),_0x1a31ca=kebabCase(_0x56d635);return await this['createServicePath'](_0x3221c0,_0x580bd8,_0x1a31ca),await this['createServiceFiles'](_0x3221c0,_0x580bd8,_0x56d635,_0x1a31ca,_0x459e1e,_0x42b457),!0x0;}async[a0_0x429f8b(0x11d)](_0x3a6700,_0x4faebb,_0x817f2,_0x14a15d,_0x58c1df,_0x4f45e0){const _0x176041=a0_0x429f8b;let _0x3f7c21={'name':_0x14a15d,'tableName':_0x58c1df['tableName'],'pascalCaseName':startCase(camelCase(_0x817f2))['replace'](/ /g,''),'camelCaseName':camelCase(_0x817f2),'snakeCaseName':snakeCase(_0x817f2),'pluralPascalCaseName':startCase(camelCase(plural(_0x817f2)))['replace'](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x817f2))},_0x20b8ed=_0x3a6700+_0x176041(0xa1)+_0x4faebb+'/server/service/';[_0x176041(0x109),_0x176041(0x134)][_0x176041(0xc8)](_0x58c1df['dataProp'])?await this[_0x176041(0xfe)](_0x20b8ed,_0x14a15d,_0x58c1df,_0x4f45e0,_0x3f7c21):await this[_0x176041(0xd5)](_0x20b8ed,_0x14a15d,_0x58c1df,_0x4f45e0,_0x3f7c21);}async[a0_0x429f8b(0xfe)](_0x155a41,_0x2c4a08,_0x18bfb1,_0x23a7df,_0x11e703){const _0x2b21d9=a0_0x429f8b;await this[_0x2b21d9(0x10c)](_0x155a41+(_0x2c4a08+_0x2b21d9(0xbe)),serviceHistoryIndex,_0x11e703);let _0x1fbdb4=this[_0x2b21d9(0xb5)](_0x18bfb1,_0x23a7df);await this[_0x2b21d9(0x10c)](_0x155a41+(_0x2c4a08+'/'+_0x2c4a08+'.ts'),_0x1fbdb4,_0x11e703),await this[_0x2b21d9(0x10c)](_0x155a41+(_0x2c4a08+'/'+_0x2c4a08+_0x2b21d9(0xb7)),serviceQuery,_0x11e703),await this[_0x2b21d9(0x10c)](_0x155a41+(_0x2c4a08+'/'+_0x2c4a08+'-mutation.ts'),serviceMutation,_0x11e703);let _0x2fc824=this[_0x2b21d9(0xb1)](_0x23a7df);await this['writeFile'](_0x155a41+(_0x2c4a08+'/'+_0x2c4a08+_0x2b21d9(0xfa)),_0x2fc824,_0x11e703);let _0x4871c7=this[_0x2b21d9(0xf7)](_0x18bfb1,_0x23a7df);await this[_0x2b21d9(0x10c)](_0x155a41+(_0x2c4a08+'/'+_0x2c4a08+_0x2b21d9(0xf4)),_0x4871c7,_0x11e703);let _0x309d43='';_0x2b21d9(0x109)==_0x18bfb1[_0x2b21d9(0xe0)]?(_0x309d43=_0x2b21d9(0x10d),await this[_0x2b21d9(0x10c)](_0x155a41+(_0x2c4a08+_0x2b21d9(0xcb)),serviceEntitySubscriber,_0x11e703)):_0x309d43='';let _0x4ff688=serviceEntitySubscriber['replace'](/{{entityToJson}}/g,_0x309d43);await this[_0x2b21d9(0x10c)](_0x155a41+(_0x2c4a08+_0x2b21d9(0xcb)),_0x4ff688,_0x11e703),await this[_0x2b21d9(0x10c)](_0x155a41+(_0x2c4a08+'/'+_0x2c4a08+_0x2b21d9(0x114)),serviceHistoryQuery,_0x11e703),await this[_0x2b21d9(0x10c)](_0x155a41+(_0x2c4a08+'/'+_0x2c4a08+_0x2b21d9(0xaf)),sereviceHistoryType,_0x11e703);let _0x4e4430=_0x155a41+'index.ts';0x0==await this[_0x2b21d9(0x11f)](_0x4e4430)&&await this[_0x2b21d9(0x10c)](_0x4e4430,allIndex,_0x11e703);let _0x5c1f89=await fs['readFileSync'](_0x4e4430,_0x2b21d9(0x11e));_0x5c1f89[_0x2b21d9(0x9f)](_0x2b21d9(0xf6)+_0x11e703[_0x2b21d9(0xcf)]+'/'+_0x11e703[_0x2b21d9(0xcf)]+_0x2b21d9(0x12b))<0x0&&(_0x5c1f89=_0x5c1f89[_0x2b21d9(0xc6)](/\/\* EXPORT ENTITY TYPES \*\//,_0x2b21d9(0xda)+_0x11e703['name']+'/'+_0x11e703[_0x2b21d9(0xcf)]+_0x2b21d9(0x12b))),_0x5c1f89[_0x2b21d9(0x9f)](_0x2b21d9(0xf6)+_0x11e703[_0x2b21d9(0xcf)]+'/'+_0x11e703[_0x2b21d9(0xcf)]+'\x27')<0x0&&(_0x5c1f89=_0x5c1f89['replace'](/\/\* EXPORT ENTITY TYPES \*\//,_0x2b21d9(0xda)+_0x11e703['name']+'/'+_0x11e703[_0x2b21d9(0xcf)]+'\x27')),_0x5c1f89[_0x2b21d9(0x9f)](_0x2b21d9(0xf1)+_0x11e703[_0x2b21d9(0xb0)]+_0x2b21d9(0x112)+_0x11e703[_0x2b21d9(0xb0)]+'Resolvers,\x20subscribers\x20as\x20'+_0x11e703[_0x2b21d9(0xb0)]+'EntitySubscribers\x20}\x20from\x20\x27./'+_0x11e703['name']+'\x27')<0x0&&(_0x5c1f89=_0x5c1f89[_0x2b21d9(0xc6)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x2b21d9(0xf0)+_0x11e703[_0x2b21d9(0xb0)]+_0x2b21d9(0x112)+_0x11e703[_0x2b21d9(0xb0)]+'Resolvers,\x20subscribers\x20as\x20'+_0x11e703[_0x2b21d9(0xb0)]+_0x2b21d9(0xe4)+_0x11e703[_0x2b21d9(0xcf)]+'\x27')),_0x5c1f89[_0x2b21d9(0x9f)](_0x2b21d9(0x133)+_0x11e703[_0x2b21d9(0xb0)]+'Entities,')<0x0&&(_0x5c1f89=_0x5c1f89[_0x2b21d9(0xc6)](/\/\* ENTITIES \*\//,_0x2b21d9(0x122)+_0x11e703[_0x2b21d9(0xb0)]+'Entities,')),_0x5c1f89[_0x2b21d9(0x9f)](_0x2b21d9(0x133)+_0x11e703[_0x2b21d9(0xb0)]+_0x2b21d9(0x115))<0x0&&(_0x5c1f89=_0x5c1f89[_0x2b21d9(0xc6)](/\/\* RESOLVER CLASSES \*\//,_0x2b21d9(0x128)+_0x11e703[_0x2b21d9(0xb0)]+_0x2b21d9(0x115))),_0x5c1f89[_0x2b21d9(0x9f)]('...'+_0x11e703['pascalCaseName']+'EntitySubscribers,')<0x0&&(_0x5c1f89=_0x5c1f89[_0x2b21d9(0xc6)](/\/\* SUBSCRIBERS \*\//,_0x2b21d9(0x123)+_0x11e703[_0x2b21d9(0xb0)]+'EntitySubscribers,')),await this[_0x2b21d9(0x10c)](_0x4e4430,_0x5c1f89,_0x11e703);}async[a0_0x429f8b(0xd5)](_0x488ef6,_0x5d55fa,_0x11e38e,_0x2698a9,_0x28bda0){const _0x876875=a0_0x429f8b;await this['writeFile'](_0x488ef6+(_0x5d55fa+_0x876875(0xbe)),serviceIndex,_0x28bda0),await this['writeFile'](_0x488ef6+(_0x5d55fa+'/'+_0x5d55fa+'-query.ts'),serviceQuery,_0x28bda0),await this['writeFile'](_0x488ef6+(_0x5d55fa+'/'+_0x5d55fa+'-mutation.ts'),serviceMutation,_0x28bda0);let _0x24e50a=this['createEntityText'](_0x11e38e,_0x2698a9);await this[_0x876875(0x10c)](_0x488ef6+(_0x5d55fa+'/'+_0x5d55fa+_0x876875(0xa7)),_0x24e50a,_0x28bda0);let _0x1729da=this[_0x876875(0xb1)](_0x2698a9);await this[_0x876875(0x10c)](_0x488ef6+(_0x5d55fa+'/'+_0x5d55fa+'-type.ts'),_0x1729da,_0x28bda0);let _0x20d232=_0x488ef6+_0x876875(0x12f);0x0==await this[_0x876875(0x11f)](_0x20d232)&&await this[_0x876875(0x10c)](_0x20d232,allIndex,_0x28bda0);let _0x50fe7b=await fs[_0x876875(0x12c)](_0x20d232,_0x876875(0x11e));_0x50fe7b[_0x876875(0x9f)](_0x876875(0xf6)+_0x28bda0['name']+'/'+_0x28bda0[_0x876875(0xcf)]+'\x27')<0x0&&(_0x50fe7b=_0x50fe7b[_0x876875(0xc6)](/\/\* EXPORT ENTITY TYPES \*\//,_0x876875(0xda)+_0x28bda0[_0x876875(0xcf)]+'/'+_0x28bda0['name']+'\x27')),_0x50fe7b['indexOf']('import\x20{\x20entities\x20as\x20'+_0x28bda0['pascalCaseName']+_0x876875(0x112)+_0x28bda0[_0x876875(0xb0)]+_0x876875(0xd6)+_0x28bda0[_0x876875(0xcf)]+'\x27')<0x0&&(_0x50fe7b=_0x50fe7b[_0x876875(0xc6)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x876875(0xf0)+_0x28bda0[_0x876875(0xb0)]+_0x876875(0x112)+_0x28bda0['pascalCaseName']+_0x876875(0xd6)+_0x28bda0['name']+'\x27')),_0x50fe7b[_0x876875(0x9f)]('...'+_0x28bda0[_0x876875(0xb0)]+'Entities,')<0x0&&(_0x50fe7b=_0x50fe7b['replace'](/\/\* ENTITIES \*\//,_0x876875(0x122)+_0x28bda0[_0x876875(0xb0)]+_0x876875(0xd8))),_0x50fe7b[_0x876875(0x9f)](_0x876875(0x133)+_0x28bda0[_0x876875(0xb0)]+_0x876875(0x115))<0x0&&(_0x50fe7b=_0x50fe7b[_0x876875(0xc6)](/\/\* RESOLVER CLASSES \*\//,_0x876875(0x128)+_0x28bda0[_0x876875(0xb0)]+_0x876875(0x115))),await this[_0x876875(0x10c)](_0x20d232,_0x50fe7b,_0x28bda0);}[a0_0x429f8b(0xb1)](_0x4bc41b){const _0x2491a5=a0_0x429f8b;let _0x3a2d02=sereviceType,_0x303961=_0x4bc41b['map'](_0x578db1=>{const _0x5b9d76=a0_0x48ab;if('id'==_0x578db1[_0x5b9d76(0xcf)])return'';if(_0x5b9d76(0xe6)==_0x578db1[_0x5b9d76(0xcf)])return'';if(_0x5b9d76(0x12a)==_0x578db1['name'])return'';if(_0x5b9d76(0xc9)==_0x578db1[_0x5b9d76(0xcf)])return'';if('creator_id'==_0x578db1[_0x5b9d76(0xcf)])return'';if(_0x5b9d76(0xca)==_0x578db1['name'])return'';let _0x47225e=this[_0x5b9d76(0x117)](_0x578db1),_0x2f0221=this[_0x5b9d76(0xc2)](_0x578db1),_0x3be077=camelCase(_0x578db1[_0x5b9d76(0xcf)]);return'\x20\x20'+(_0x5b9d76(0xfb)+(0x0==_0x47225e[_0x5b9d76(0x11a)]?'':_0x5b9d76(0xd7)+_0x47225e+',')+_0x5b9d76(0xd0)+_0x578db1[_0x5b9d76(0x120)]+'\x20})')+_0x5b9d76(0xd2)+(''+_0x3be077+(_0x578db1[_0x5b9d76(0x120)]?'?':'')+':\x20'+_0x2f0221)+'\x0a';});_0x3a2d02=_0x3a2d02[_0x2491a5(0xc6)](/{{newTypeColumns}}/g,_0x303961['join']('\x0a'));let _0x42c6b0=_0x4bc41b[_0x2491a5(0x11c)](_0x34e21b=>{const _0xf58f=_0x2491a5;if('id'==_0x34e21b[_0xf58f(0xcf)])return'';if('domain_id'==_0x34e21b[_0xf58f(0xcf)])return'';if(_0xf58f(0x12a)==_0x34e21b[_0xf58f(0xcf)])return'';if(_0xf58f(0xc9)==_0x34e21b[_0xf58f(0xcf)])return'';if('creator_id'==_0x34e21b[_0xf58f(0xcf)])return'';if(_0xf58f(0xca)==_0x34e21b[_0xf58f(0xcf)])return'';let _0xd23d7b=this[_0xf58f(0x117)](_0x34e21b),_0x47beb7=this['getColTxtType'](_0x34e21b);_0x34e21b[_0xf58f(0x120)]=!0x0;let _0x2e85ce=camelCase(_0x34e21b['name']);return'\x20\x20'+('@Field('+(0x0==_0xd23d7b['length']?'':_0xf58f(0xd7)+_0xd23d7b+',')+_0xf58f(0xd0)+_0x34e21b[_0xf58f(0x120)]+'\x20})')+_0xf58f(0xd2)+(''+_0x2e85ce+(_0x34e21b[_0xf58f(0x120)]?'?':'')+':\x20'+_0x47beb7)+'\x0a';});return _0x3a2d02=_0x3a2d02['replace'](/{{patchTypeColumns}}/g,_0x42c6b0[_0x2491a5(0xb3)]('\x0a')),_0x3a2d02;}['createEntityText'](_0x40bd80,_0x3a5419){const _0x51d039=a0_0x429f8b;let _0x19f374=serviceEntity,_0x9d473a=_0x3a5419[_0x51d039(0xd4)](function(_0x1f96e7,_0x36b62e){const _0xff3a05=_0x51d039;return _0x1f96e7['rank']-_0x36b62e[_0xff3a05(0xad)];})['map'](_0x5d219a=>this[_0x51d039(0xd3)](_0x5d219a));[_0x51d039(0x134),'JSON'][_0x51d039(0xc8)](_0x40bd80[_0x51d039(0xe0)])&&_0x9d473a[_0x51d039(0xa3)](_0x51d039(0xa6)),_0x19f374=_0x19f374[_0x51d039(0xc6)](/{{entityColumns}}/g,_0x9d473a[_0x51d039(0xb3)]('\x0a'));let _0x161d9f='',_0x2bd568=_0x3a5419[_0x51d039(0xdd)](_0x33aa7e=>_0x33aa7e[_0x51d039(0xb4)]&&_0x33aa7e[_0x51d039(0xb4)]>0x0)[_0x51d039(0xd4)](function(_0x51eb28,_0x43e559){const _0x38ce90=_0x51d039;return _0x51eb28[_0x38ce90(0xb4)]-_0x43e559[_0x38ce90(0xb4)];});if(_0x2bd568[_0x51d039(0x11a)]>0x0){_0x161d9f=_0x51d039(0xce);let _0x174398=_0x2bd568[_0x51d039(0x11c)](_0x5457ef=>{const _0x50db50=_0x51d039;let _0x485d29=_0x5457ef[_0x50db50(0xcf)];return _0x50db50(0xe6)==_0x5457ef['name']&&(_0x485d29=_0x50db50(0xcc)),_0x50db50(0x126)==_0x5457ef[_0x50db50(0xcf)]&&(_0x485d29=_0x50db50(0x10a)),'updater_id'==_0x5457ef['name']&&(_0x485d29='updater'),_0x50db50(0xed)+camelCase(_0x485d29);});_0x161d9f=_0x161d9f['replace'](/{{indexColumns}}/g,_0x174398[_0x51d039(0xb3)](','));}return _0x19f374=_0x19f374[_0x51d039(0xc6)](/{{indexAnn}}/g,_0x161d9f),_0x19f374;}[a0_0x429f8b(0xf7)](_0x11a998,_0x52e752){const _0x447146=a0_0x429f8b;let _0x101f17=_0x447146(0x109)==_0x11a998['dataProp']?serviceEntityHistJson:serviceEntityHistCopy,_0x83d775=_0x52e752[_0x447146(0xd4)](function(_0x5d4533,_0x5af547){const _0x5cf9a4=_0x447146;return _0x5d4533['rank']-_0x5af547[_0x5cf9a4(0xad)];})[_0x447146(0x11c)](_0x473fd2=>this[_0x447146(0xd3)](_0x473fd2));return _0x101f17=_0x101f17[_0x447146(0xc6)](/{{entityColumns}}/g,_0x83d775['join']('\x0a')),_0x101f17;}[a0_0x429f8b(0xd3)](_0x122b64){const _0x251916=a0_0x429f8b;if('id'==_0x122b64[_0x251916(0xcf)])return'';if(_0x251916(0xe6)==_0x122b64[_0x251916(0xcf)])return'';if(_0x251916(0x12a)==_0x122b64[_0x251916(0xcf)])return'';if('updated_at'==_0x122b64[_0x251916(0xcf)])return'';if(_0x251916(0x126)==_0x122b64[_0x251916(0xcf)])return'';if(_0x251916(0xca)==_0x122b64[_0x251916(0xcf)])return'';let _0x1e5155=_0x122b64[_0x251916(0xac)];'double'==_0x122b64[_0x251916(0xac)]&&(_0x1e5155=_0x251916(0xbb)),'long'==_0x122b64['colType']&&(_0x1e5155=_0x251916(0xe7)),'string'==_0x122b64[_0x251916(0xac)]&&(_0x1e5155=_0x251916(0x119)),'datetime'==_0x122b64[_0x251916(0xac)]&&(_0x1e5155=_0x251916(0x12d));let _0xe52f02='';_0x251916(0xc5)==_0x122b64[_0x251916(0xac)]&&(_0xe52f02=_0x122b64[_0x251916(0xea)]);let _0x164236=this['getFieldType'](_0x122b64),_0x19fb22=this[_0x251916(0xc2)](_0x122b64),_0x3ea2c3=camelCase(_0x122b64[_0x251916(0xcf)]);return'\x20\x20'+(_0x251916(0xbd)+_0x122b64[_0x251916(0xcf)]+_0x251916(0x100)+_0x1e5155+_0x251916(0xae)+_0x122b64['nullable']+'\x20'+(0x0==_0xe52f02['length']?'':_0x251916(0xe5)+_0xe52f02)+_0x251916(0x103))+_0x251916(0xd2)+('@Field('+(0x0==_0x164236[_0x251916(0x11a)]?'':_0x251916(0xd7)+_0x164236+',')+_0x251916(0xd0)+_0x122b64[_0x251916(0x120)]+_0x251916(0x103))+'\x0a\x20\x20'+(''+_0x3ea2c3+(_0x122b64[_0x251916(0x120)]?'?':'')+':\x20'+_0x19fb22)+'\x0a';}[a0_0x429f8b(0x117)](_0x54a90f){const _0x30a77a=a0_0x429f8b;let _0x5e9ded='';return _0x30a77a(0xa2)==_0x54a90f[_0x30a77a(0xac)]&&(_0x5e9ded=_0x30a77a(0x106)),_0x30a77a(0xc0)==_0x54a90f[_0x30a77a(0xac)]&&(_0x5e9ded=_0x30a77a(0x106)),_0x30a77a(0xff)==_0x54a90f[_0x30a77a(0xac)]&&(_0x5e9ded='Int'),_0x30a77a(0xb8)==_0x54a90f['colType']&&(_0x5e9ded=_0x30a77a(0x9c)),_0x5e9ded;}['getColTxtType'](_0x4340da){const _0x55a66f=a0_0x429f8b;let _0x315899=_0x4340da[_0x55a66f(0xac)];return _0x55a66f(0x107)==_0x4340da['colType']&&(_0x315899=_0x55a66f(0xc7)),'double'==_0x4340da[_0x55a66f(0xac)]&&(_0x315899='number'),_0x55a66f(0xc0)==_0x4340da[_0x55a66f(0xac)]&&(_0x315899=_0x55a66f(0xc7)),_0x55a66f(0xb8)==_0x4340da[_0x55a66f(0xac)]&&(_0x315899=_0x55a66f(0xc7)),'long'==_0x4340da['colType']&&(_0x315899=_0x55a66f(0xc7)),_0x55a66f(0xc1)==_0x4340da[_0x55a66f(0xac)]&&(_0x315899=_0x55a66f(0xc4)),'date'==_0x4340da[_0x55a66f(0xac)]&&(_0x315899=_0x55a66f(0xc4)),_0x55a66f(0xf5)==_0x4340da['colType']&&(_0x315899='string'),_0x315899;}async['writeFile'](_0x26417b,_0x2c1942,_0xff8c57){const _0x2145f3=a0_0x429f8b;await fs[_0x2145f3(0x118)](_0x26417b,this[_0x2145f3(0x108)](_0x2c1942,_0xff8c57),_0x2145f3(0x11e));}[a0_0x429f8b(0x108)](_0x5de1a7,_0x17dd85){const _0x9121ec=a0_0x429f8b;return _0x5de1a7[_0x9121ec(0xc6)](/{{pascalCase name}}/g,_0x17dd85['pascalCaseName'])['replace'](/{{camelCase name}}/g,_0x17dd85['camelCaseName'])['replace'](/{{snakeCase name}}/g,_0x17dd85[_0x9121ec(0x12e)])[_0x9121ec(0xc6)](/{{pluralPascalCase name}}/g,_0x17dd85[_0x9121ec(0xcd)])[_0x9121ec(0xc6)](/{{pluralCamelCase name}}/g,_0x17dd85[_0x9121ec(0xf2)])['replace'](/{{tableName}}/g,_0x17dd85[_0x9121ec(0x116)])[_0x9121ec(0xc6)](/{{name}}/g,_0x17dd85[_0x9121ec(0xcf)]);}async[a0_0x429f8b(0x121)](_0x3931f9,_0x1c80c1,_0x9bf23d){const _0x1e28c2=a0_0x429f8b;let _0x3570d5=_0x3931f9+_0x1e28c2(0x125);await this['createDir'](_0x3570d5),_0x3570d5=_0x3570d5+'/'+_0x1c80c1,await this[_0x1e28c2(0x132)](_0x3570d5),_0x3570d5+=_0x1e28c2(0x10b),await this['createDir'](_0x3570d5),_0x3570d5+=_0x1e28c2(0xb2),await this['createDir'](_0x3570d5),_0x3570d5=_0x3570d5+'/'+_0x9bf23d,await this[_0x1e28c2(0x132)](_0x3570d5);}[a0_0x429f8b(0xc3)](){const _0x5ae8bc=a0_0x429f8b;let _0x4c5fa9=process[_0x5ae8bc(0xa9)][_0x5ae8bc(0xa8)][_0x5ae8bc(0x127)]('/'),_0x14a364=[];for(let _0x47c2a8=0x0;_0x47c2a8<_0x4c5fa9[_0x5ae8bc(0x11a)]&&'packages'!=_0x4c5fa9[_0x47c2a8];_0x47c2a8++)_0x14a364['push'](_0x4c5fa9[_0x47c2a8]);return _0x14a364[_0x5ae8bc(0xb3)]('/');}async[a0_0x429f8b(0x132)](_0x270ea8){const _0x193b28=a0_0x429f8b;0x0==await this['existsPath'](_0x270ea8)&&fs[_0x193b28(0xb9)](_0x270ea8);}async[a0_0x429f8b(0x11f)](_0x10de6f){return await fs['existsSync'](_0x10de6f);}};function a0_0x1639(){const _0x5790c0=['/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','import\x20{\x20entities\x20as\x20','pluralCamelCaseName','pluralize','-history.ts','text','export\x20*\x20from\x20\x27./','createHistoryEntityText','\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','251421OrrlNz','-type.ts','@Field(','13673eHbMYV','lodash','createHistoryServiceFiles','long','\x27,\x20type:\x20\x27','__esModule','prototype','\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','11854bpMgvw','Float','decimal','replaceNamesMap','JSON','creator','/server','writeFile','\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','OperatoToolCreateService','\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','@things-factory/shell','38672mGxERw','Entities,\x20resolvers\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\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','-history-query.ts','Resolvers,','tableName','getFieldType','writeFileSync','character\x20varying','length','\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','map','createServiceFiles','utf8','existsPath','nullable','createServicePath','/*\x20ENTITIES\x20*/\x0a\x09...','/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...','\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','/packages','creator_id','split','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','tslib','created_at','-history\x27','readFileSync','timestamp\x20without\x20time\x20zone','snakeCaseName','index.ts','toolCreateService','design:type','createDir','...','COPY','Int','design:paramtypes','__metadata','indexOf','\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','/packages/','double','push','find','258RmGCtC','\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201','.ts','PWD','env','9819MzcBJj','Resolver','colType','rank','\x27,\x20nullable:\x20','-history-type.ts','pascalCaseName','createTypeText','/service','join','uniqRank','createEntityText','Arg','-query.ts','integer','mkdirSync','3252tXWiVk','double\x20precision','findOne','@Column({name:\x27','/index.ts','__param','float','datetime','getColTxtType','getProjectRootPath','Date','string','replace','number','includes','updated_at','updater_id','/event-subscriber.ts','domain','pluralPascalCaseName','@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})','name','\x20{\x20nullable:\x20','getRepository','\x0a\x20\x20','columnToEntityColumn','sort','createNoHistoryServiceFiels','Resolvers\x20}\x20from\x20\x27./','type\x20=>','Entities,','\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}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','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','10565oIKUlY','Entity','filter','__decorate','70EAIxnC','dataProp','type-graphql','27fSljpN','EntityColumn','EntitySubscribers\x20}\x20from\x20\x27./',',length:','domain_id','bigint','7RhWLFd','Operato\x20Tool\x20Create\x20Service','colSize','389452FnNYwm','Query','{{camelCase\x20name}}.','@things-factory/resource-base','design:returntype'];a0_0x1639=function(){return _0x5790c0;};return a0_0x1639();}function a0_0x48ab(_0x3d1db8,_0x3c5d1a){const _0x1639ca=a0_0x1639();return a0_0x48ab=function(_0x48abc9,_0x5d4a83){_0x48abc9=_0x48abc9-0x9c;let _0x202b3b=_0x1639ca[_0x48abc9];return _0x202b3b;},a0_0x48ab(_0x3d1db8,_0x3c5d1a);}tslib_1[a0_0x429f8b(0xde)]([(0x0,type_graphql_1[a0_0x429f8b(0xec)])(_0x436b26=>Boolean,{'description':a0_0x429f8b(0xe9)}),tslib_1[a0_0x429f8b(0xbf)](0x0,(0x0,type_graphql_1[a0_0x429f8b(0xb6)])('id')),tslib_1[a0_0x429f8b(0xbf)](0x1,(0x0,type_graphql_1['Ctx'])()),tslib_1['__metadata'](a0_0x429f8b(0x131),Function),tslib_1[a0_0x429f8b(0x9e)](a0_0x429f8b(0x9d),[String,Object]),tslib_1[a0_0x429f8b(0x9e)](a0_0x429f8b(0xef),Promise)],OperatoToolCreateService[a0_0x429f8b(0x102)],a0_0x429f8b(0x130),null),OperatoToolCreateService=tslib_1[a0_0x429f8b(0xde)]([(0x0,type_graphql_1[a0_0x429f8b(0xab)])()],OperatoToolCreateService),exports[a0_0x429f8b(0x10e)]=OperatoToolCreateService;const allIndex='\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',serviceIndex=a0_0x429f8b(0x104),serviceHistoryIndex=a0_0x429f8b(0xd9),serviceQuery='\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}List\x20}\x20from\x20\x27./{{name}}-type\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Query\x20{\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20fetch\x20a\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20return\x20await\x20getRepository({{pascalCase\x20name}}).findOne({\x0a\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20}\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}List,\x20{\x20description:\x20\x27To\x20fetch\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{pluralCamelCase\x20name}}(@Args()\x20params:\x20ListParam,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}List>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20queryBuilder\x20=\x20getQueryBuilderFromListParams({\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20params,\x0a\x20\x20\x20\x20\x20\x20repository:\x20await\x20getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20const\x20convertedParams\x20=\x20convertListParams(params,\x20domain.id)\x0a\x20\x20\x20\x20const\x20[items,\x20total]\x20=\x20await\x20queryBuilder.getManyAndCount()\x0a\x0a\x20\x20\x20\x20return\x20{\x20items,\x20total\x20}\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20Domain)\x0a\x20\x20async\x20domain(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<Domain>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(Domain).findOneBy({id:{{camelCase\x20name}}.domainId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20updater(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.updaterId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20creator(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.creatorId})\x0a\x20\x20}\x0a}\x0a',serviceHistoryQuery='\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryList\x20}\x20from\x20\x27./{{name}}-history-type\x27\x0a\x0a@Resolver({{pascalCase\x20name}}History)\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryQuery\x20{\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}History,\x20{\x20description:\x20\x27To\x20fetch\x20a\x20{{pascalCase\x20name}}History\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}History(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}History>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20return\x20await\x20getRepository({{pascalCase\x20name}}History).findOne({\x0a\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20}\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}HistoryList,\x20{\x20description:\x20\x27To\x20fetch\x20multiple\x20{{pluralPascalCase\x20name}}History\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}Histories(@Args()\x20params:\x20ListParam,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}HistoryList>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20queryBuilder\x20=\x20getQueryBuilderFromListParams({\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20params,\x0a\x20\x20\x20\x20\x20\x20repository:\x20await\x20getRepository({{pascalCase\x20name}}History)\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20const\x20[items,\x20total]\x20=\x20await\x20queryBuilder.getManyAndCount()\x0a\x0a\x20\x20\x20\x20return\x20{\x20items,\x20total\x20}\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20Domain)\x0a\x20\x20async\x20domain(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<Domain>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(Domain).findOneBy({id:{{camelCase\x20name}}History.domainId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20updater(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}History.updaterId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20creator(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}History.creatorId})\x0a\x20\x20}\x0a}\x0a',serviceMutation=a0_0x429f8b(0x124),sereviceType=a0_0x429f8b(0x11b),sereviceHistoryType=a0_0x429f8b(0xa0),serviceEntity=a0_0x429f8b(0xf8),serviceEntityHistCopy=a0_0x429f8b(0x113),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_0x429f8b(0x10f);
|
|
1
|
+
'use strict';const a0_0x573f8b=a0_0x1d93;(function(_0x1cccc5,_0x526b18){const _0x2ed907=a0_0x1d93,_0x285b83=_0x1cccc5();while(!![]){try{const _0x9036fc=parseInt(_0x2ed907(0x1c3))/0x1+-parseInt(_0x2ed907(0x1ee))/0x2+parseInt(_0x2ed907(0x1a8))/0x3*(-parseInt(_0x2ed907(0x163))/0x4)+-parseInt(_0x2ed907(0x17a))/0x5*(parseInt(_0x2ed907(0x1bf))/0x6)+parseInt(_0x2ed907(0x1b2))/0x7+parseInt(_0x2ed907(0x193))/0x8+parseInt(_0x2ed907(0x1d9))/0x9;if(_0x9036fc===_0x526b18)break;else _0x285b83['push'](_0x285b83['shift']());}catch(_0x3563f1){_0x285b83['push'](_0x285b83['shift']());}}}(a0_0x12ad,0x78bbc));function a0_0x1d93(_0x3de4a8,_0x59f0f0){const _0x12ad15=a0_0x12ad();return a0_0x1d93=function(_0x1d930c,_0x33574c){_0x1d930c=_0x1d930c-0x15f;let _0x535809=_0x12ad15[_0x1d930c];return _0x535809;},a0_0x1d93(_0x3de4a8,_0x59f0f0);}Object[a0_0x573f8b(0x1d4)](exports,'__esModule',{'value':!0x0}),exports[a0_0x573f8b(0x17f)]=void 0x0;function a0_0x12ad(){const _0x8b07ca=['\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','__param','\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','split','Resolver','Operato\x20Tool\x20Create\x20Service','map','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','/packages','Resolvers,','text','\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','createNoHistoryServiceFiels','/service','utf8','\x20{\x20nullable:\x20','\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}List\x20}\x20from\x20\x27./{{name}}-type\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Query\x20{\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20fetch\x20a\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20return\x20await\x20getRepository({{pascalCase\x20name}}).findOne({\x0a\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20}\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}List,\x20{\x20description:\x20\x27To\x20fetch\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{pluralCamelCase\x20name}}(@Args()\x20params:\x20ListParam,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}List>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20queryBuilder\x20=\x20getQueryBuilderFromListParams({\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20params,\x0a\x20\x20\x20\x20\x20\x20repository:\x20await\x20getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20const\x20convertedParams\x20=\x20convertListParams(params,\x20domain.id)\x0a\x20\x20\x20\x20const\x20[items,\x20total]\x20=\x20await\x20queryBuilder.getManyAndCount()\x0a\x0a\x20\x20\x20\x20return\x20{\x20items,\x20total\x20}\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20Domain)\x0a\x20\x20async\x20domain(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<Domain>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(Domain).findOneBy({id:{{camelCase\x20name}}.domainId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20updater(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.updaterId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20creator(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.creatorId})\x0a\x20\x20}\x0a}\x0a','/packages/','1308104WEQppu',',length:','camelCaseName','type\x20=>','nullable','float','236OTiVud','\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','/index.ts','Float','-query.ts','-mutation.ts','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\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','.ts','created_at','getFieldType','character\x20varying','...','lodash','pluralCamelCaseName','replace','/server','sort','uniqRank','existsPath','design:returntype','Int','replaceNamesMap','state','165ZxpoiY','__decorate','\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','Arg','index.ts','OperatoToolCreateService','-type.ts','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','creator_id','timestamp\x20without\x20time\x20zone','long','createHistoryEntityText','double','number','updater_id','toolCreateService','domain_id','domain','import\x20{\x20entities\x20as\x20','\x20})','pascalCaseName','Date','date','-history-type.ts','@things-factory/resource-base','3509048utPHdA','snakeCaseName','tslib','string','type-graphql','decimal','-history\x27','filter','includes','push','columnToEntityColumn','createDir','@Column({name:\x27','\x27,\x20nullable:\x20','createServicePath','Query','tableName','Resolvers\x20}\x20from\x20\x27./','\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','datetime','writeFile','13461eBuZdS','EntityColumn','creator','createEntityText','mkdirSync','writeFileSync','export\x20*\x20from\x20\x27./','EntitySubscribers\x20}\x20from\x20\x27./','findOne','colType','6731410mkTrOE','\x27,\x20type:\x20\x27','Resolvers,\x20subscribers\x20as\x20','design:paramtypes','Entity','JSON','env','Entities,','__metadata','find','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','createTypeText','indexOf','150882iggDnw','getRepository','updated_at','length','208584VKFKyE','@Field(','/server/service/','dataProp','packages','existsSync','EntitySubscribers,','prototype','pluralize','join','createHistoryServiceFiles','\x0a\x20\x20','integer','\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','Entities,\x20resolvers\x20as\x20','rank','{{camelCase\x20name}}.','defineProperty','COPY','\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201','PWD','getColTxtType','5708835rGdcnb','colSize','name'];a0_0x12ad=function(){return _0x8b07ca;};return a0_0x12ad();}const tslib_1=require(a0_0x573f8b(0x195)),type_graphql_1=require(a0_0x573f8b(0x197)),shell_1=require('@things-factory/shell'),resource_base_1=require(a0_0x573f8b(0x192)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x573f8b(0x16f)),{plural:plural}=require(a0_0x573f8b(0x1cb)),fs=require('fs');let OperatoToolCreateService=class{async['toolCreateService'](_0xc0692c,_0x5bf932){const _0x13dc5=a0_0x573f8b,{domain:_0x3b3383}=_0x5bf932[_0x13dc5(0x179)],_0x5ceaec=await(0x0,shell_1[_0x13dc5(0x1c0)])(resource_base_1[_0x13dc5(0x1b6)])[_0x13dc5(0x1b0)]({'where':{'id':_0xc0692c}}),_0x305baf=await(0x0,shell_1[_0x13dc5(0x1c0)])(resource_base_1[_0x13dc5(0x1a9)])[_0x13dc5(0x1bb)]({'where':{'domain':{'id':_0x3b3383['id']},'entity':{'id':_0x5ceaec['id']}}});let {name:_0x1f5bd1='',bundle:_0x4e854a=''}=_0x5ceaec||{},_0x498e35=this['getProjectRootPath'](),_0x4cc719=kebabCase(_0x1f5bd1);return await this['createServicePath'](_0x498e35,_0x4e854a,_0x4cc719),await this['createServiceFiles'](_0x498e35,_0x4e854a,_0x1f5bd1,_0x4cc719,_0x5ceaec,_0x305baf),!0x0;}async['createServiceFiles'](_0x284993,_0x3e58ef,_0x12b607,_0x4fb467,_0x4c2e57,_0x2d9bfc){const _0x10d0ae=a0_0x573f8b;let _0x579962={'name':_0x4fb467,'tableName':_0x4c2e57[_0x10d0ae(0x1a3)],'pascalCaseName':startCase(camelCase(_0x12b607))['replace'](/ /g,''),'camelCaseName':camelCase(_0x12b607),'snakeCaseName':snakeCase(_0x12b607),'pluralPascalCaseName':startCase(camelCase(plural(_0x12b607)))[_0x10d0ae(0x171)](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x12b607))},_0x351e11=_0x284993+_0x10d0ae(0x1ed)+_0x3e58ef+_0x10d0ae(0x1c5);[_0x10d0ae(0x1b7),_0x10d0ae(0x1d5)][_0x10d0ae(0x19b)](_0x4c2e57[_0x10d0ae(0x1c6)])?await this[_0x10d0ae(0x1cd)](_0x351e11,_0x4fb467,_0x4c2e57,_0x2d9bfc,_0x579962):await this[_0x10d0ae(0x1e8)](_0x351e11,_0x4fb467,_0x4c2e57,_0x2d9bfc,_0x579962);}async[a0_0x573f8b(0x1cd)](_0x1b4248,_0x1ef9f4,_0x4f2174,_0x49db0b,_0x424084){const _0x5d1678=a0_0x573f8b;await this['writeFile'](_0x1b4248+(_0x1ef9f4+'/index.ts'),serviceHistoryIndex,_0x424084);let _0x421080=this[_0x5d1678(0x1ab)](_0x4f2174,_0x49db0b);await this[_0x5d1678(0x1a7)](_0x1b4248+(_0x1ef9f4+'/'+_0x1ef9f4+_0x5d1678(0x16a)),_0x421080,_0x424084),await this[_0x5d1678(0x1a7)](_0x1b4248+(_0x1ef9f4+'/'+_0x1ef9f4+_0x5d1678(0x167)),serviceQuery,_0x424084),await this[_0x5d1678(0x1a7)](_0x1b4248+(_0x1ef9f4+'/'+_0x1ef9f4+_0x5d1678(0x168)),serviceMutation,_0x424084);let _0x1918ab=this['createTypeText'](_0x49db0b);await this[_0x5d1678(0x1a7)](_0x1b4248+(_0x1ef9f4+'/'+_0x1ef9f4+_0x5d1678(0x180)),_0x1918ab,_0x424084);let _0x23a994=this[_0x5d1678(0x185)](_0x4f2174,_0x49db0b);await this[_0x5d1678(0x1a7)](_0x1b4248+(_0x1ef9f4+'/'+_0x1ef9f4+'-history.ts'),_0x23a994,_0x424084);let _0x106990='';'JSON'==_0x4f2174[_0x5d1678(0x1c6)]?(_0x106990='\x0a\x20\x20public\x20createHistoryEntity(manager,\x20entity)\x20{\x0a\x20\x20\x20\x20let\x20history\x20=\x20manager.create(this.historyEntity,\x20entity);\x0a\x20\x20\x20\x20history.historyJson\x20=\x20JSON.stringify(entity);\x0a\x20\x20\x20\x20return\x20history;\x0a\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20',await this[_0x5d1678(0x1a7)](_0x1b4248+(_0x1ef9f4+'/event-subscriber.ts'),serviceEntitySubscriber,_0x424084)):_0x106990='';let _0x25da3b=serviceEntitySubscriber['replace'](/{{entityToJson}}/g,_0x106990);await this[_0x5d1678(0x1a7)](_0x1b4248+(_0x1ef9f4+'/event-subscriber.ts'),_0x25da3b,_0x424084),await this['writeFile'](_0x1b4248+(_0x1ef9f4+'/'+_0x1ef9f4+'-history-query.ts'),serviceHistoryQuery,_0x424084),await this[_0x5d1678(0x1a7)](_0x1b4248+(_0x1ef9f4+'/'+_0x1ef9f4+_0x5d1678(0x191)),sereviceHistoryType,_0x424084);let _0x31220d=_0x1b4248+_0x5d1678(0x17e);0x0==await this[_0x5d1678(0x175)](_0x31220d)&&await this[_0x5d1678(0x1a7)](_0x31220d,allIndex,_0x424084);let _0x4f9e02=await fs['readFileSync'](_0x31220d,'utf8');_0x4f9e02[_0x5d1678(0x1be)](_0x5d1678(0x1ae)+_0x424084[_0x5d1678(0x1db)]+'/'+_0x424084[_0x5d1678(0x1db)]+'-history\x27')<0x0&&(_0x4f9e02=_0x4f9e02[_0x5d1678(0x171)](/\/\* EXPORT ENTITY TYPES \*\//,_0x5d1678(0x1e3)+_0x424084[_0x5d1678(0x1db)]+'/'+_0x424084['name']+_0x5d1678(0x199))),_0x4f9e02[_0x5d1678(0x1be)](_0x5d1678(0x1ae)+_0x424084[_0x5d1678(0x1db)]+'/'+_0x424084[_0x5d1678(0x1db)]+'\x27')<0x0&&(_0x4f9e02=_0x4f9e02[_0x5d1678(0x171)](/\/\* EXPORT ENTITY TYPES \*\//,_0x5d1678(0x1e3)+_0x424084[_0x5d1678(0x1db)]+'/'+_0x424084[_0x5d1678(0x1db)]+'\x27')),_0x4f9e02['indexOf'](_0x5d1678(0x18c)+_0x424084[_0x5d1678(0x18e)]+'Entities,\x20resolvers\x20as\x20'+_0x424084[_0x5d1678(0x18e)]+'Resolvers,\x20subscribers\x20as\x20'+_0x424084[_0x5d1678(0x18e)]+'EntitySubscribers\x20}\x20from\x20\x27./'+_0x424084['name']+'\x27')<0x0&&(_0x4f9e02=_0x4f9e02['replace'](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x5d1678(0x1bc)+_0x424084[_0x5d1678(0x18e)]+_0x5d1678(0x1d1)+_0x424084[_0x5d1678(0x18e)]+_0x5d1678(0x1b4)+_0x424084[_0x5d1678(0x18e)]+_0x5d1678(0x1af)+_0x424084[_0x5d1678(0x1db)]+'\x27')),_0x4f9e02[_0x5d1678(0x1be)]('...'+_0x424084[_0x5d1678(0x18e)]+'Entities,')<0x0&&(_0x4f9e02=_0x4f9e02['replace'](/\/\* ENTITIES \*\//,'/*\x20ENTITIES\x20*/\x0a\x09...'+_0x424084[_0x5d1678(0x18e)]+'Entities,')),_0x4f9e02[_0x5d1678(0x1be)](_0x5d1678(0x16e)+_0x424084[_0x5d1678(0x18e)]+_0x5d1678(0x1e5))<0x0&&(_0x4f9e02=_0x4f9e02[_0x5d1678(0x171)](/\/\* RESOLVER CLASSES \*\//,_0x5d1678(0x181)+_0x424084[_0x5d1678(0x18e)]+'Resolvers,')),_0x4f9e02[_0x5d1678(0x1be)](_0x5d1678(0x16e)+_0x424084['pascalCaseName']+_0x5d1678(0x1c9))<0x0&&(_0x4f9e02=_0x4f9e02[_0x5d1678(0x171)](/\/\* SUBSCRIBERS \*\//,'/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...'+_0x424084[_0x5d1678(0x18e)]+_0x5d1678(0x1c9))),await this['writeFile'](_0x31220d,_0x4f9e02,_0x424084);}async[a0_0x573f8b(0x1e8)](_0x582d6c,_0x5c4323,_0x4b3230,_0x8ee814,_0x5cf4f2){const _0x389322=a0_0x573f8b;await this[_0x389322(0x1a7)](_0x582d6c+(_0x5c4323+_0x389322(0x165)),serviceIndex,_0x5cf4f2),await this[_0x389322(0x1a7)](_0x582d6c+(_0x5c4323+'/'+_0x5c4323+'-query.ts'),serviceQuery,_0x5cf4f2),await this[_0x389322(0x1a7)](_0x582d6c+(_0x5c4323+'/'+_0x5c4323+_0x389322(0x168)),serviceMutation,_0x5cf4f2);let _0x54b419=this[_0x389322(0x1ab)](_0x4b3230,_0x8ee814);await this[_0x389322(0x1a7)](_0x582d6c+(_0x5c4323+'/'+_0x5c4323+_0x389322(0x16a)),_0x54b419,_0x5cf4f2);let _0x52a62c=this[_0x389322(0x1bd)](_0x8ee814);await this[_0x389322(0x1a7)](_0x582d6c+(_0x5c4323+'/'+_0x5c4323+_0x389322(0x180)),_0x52a62c,_0x5cf4f2);let _0x1b9107=_0x582d6c+_0x389322(0x17e);0x0==await this['existsPath'](_0x1b9107)&&await this[_0x389322(0x1a7)](_0x1b9107,allIndex,_0x5cf4f2);let _0x2c37b0=await fs['readFileSync'](_0x1b9107,_0x389322(0x1ea));_0x2c37b0[_0x389322(0x1be)]('export\x20*\x20from\x20\x27./'+_0x5cf4f2[_0x389322(0x1db)]+'/'+_0x5cf4f2['name']+'\x27')<0x0&&(_0x2c37b0=_0x2c37b0['replace'](/\/\* EXPORT ENTITY TYPES \*\//,_0x389322(0x1e3)+_0x5cf4f2['name']+'/'+_0x5cf4f2[_0x389322(0x1db)]+'\x27')),_0x2c37b0[_0x389322(0x1be)]('import\x20{\x20entities\x20as\x20'+_0x5cf4f2[_0x389322(0x18e)]+_0x389322(0x1d1)+_0x5cf4f2[_0x389322(0x18e)]+_0x389322(0x1a4)+_0x5cf4f2[_0x389322(0x1db)]+'\x27')<0x0&&(_0x2c37b0=_0x2c37b0['replace'](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,'/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20'+_0x5cf4f2[_0x389322(0x18e)]+_0x389322(0x1d1)+_0x5cf4f2[_0x389322(0x18e)]+'Resolvers\x20}\x20from\x20\x27./'+_0x5cf4f2[_0x389322(0x1db)]+'\x27')),_0x2c37b0[_0x389322(0x1be)]('...'+_0x5cf4f2['pascalCaseName']+_0x389322(0x1b9))<0x0&&(_0x2c37b0=_0x2c37b0[_0x389322(0x171)](/\/\* ENTITIES \*\//,'/*\x20ENTITIES\x20*/\x0a\x09...'+_0x5cf4f2[_0x389322(0x18e)]+_0x389322(0x1b9))),_0x2c37b0[_0x389322(0x1be)](_0x389322(0x16e)+_0x5cf4f2[_0x389322(0x18e)]+'Resolvers,')<0x0&&(_0x2c37b0=_0x2c37b0['replace'](/\/\* RESOLVER CLASSES \*\//,'/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...'+_0x5cf4f2['pascalCaseName']+'Resolvers,')),await this['writeFile'](_0x1b9107,_0x2c37b0,_0x5cf4f2);}[a0_0x573f8b(0x1bd)](_0x4548d8){const _0x4c5301=a0_0x573f8b;let _0x28810a=sereviceType,_0x17b17c=_0x4548d8['map'](_0x2bc70c=>{const _0x145096=a0_0x1d93;if('id'==_0x2bc70c[_0x145096(0x1db)])return'';if(_0x145096(0x18a)==_0x2bc70c[_0x145096(0x1db)])return'';if(_0x145096(0x16b)==_0x2bc70c[_0x145096(0x1db)])return'';if(_0x145096(0x1c1)==_0x2bc70c[_0x145096(0x1db)])return'';if(_0x145096(0x182)==_0x2bc70c['name'])return'';if(_0x145096(0x188)==_0x2bc70c[_0x145096(0x1db)])return'';let _0x41ed63=this['getFieldType'](_0x2bc70c),_0x5d3f9c=this['getColTxtType'](_0x2bc70c),_0x54627a=camelCase(_0x2bc70c['name']);return'\x20\x20'+('@Field('+(0x0==_0x41ed63[_0x145096(0x1c2)]?'':_0x145096(0x160)+_0x41ed63+',')+_0x145096(0x1eb)+_0x2bc70c['nullable']+_0x145096(0x18d))+_0x145096(0x1ce)+(''+_0x54627a+(_0x2bc70c[_0x145096(0x161)]?'?':'')+':\x20'+_0x5d3f9c)+'\x0a';});_0x28810a=_0x28810a['replace'](/{{newTypeColumns}}/g,_0x17b17c[_0x4c5301(0x1cc)]('\x0a'));let _0xb0efd8=_0x4548d8[_0x4c5301(0x1e2)](_0x3774e2=>{const _0x58d5c0=_0x4c5301;if('id'==_0x3774e2[_0x58d5c0(0x1db)])return'';if(_0x58d5c0(0x18a)==_0x3774e2[_0x58d5c0(0x1db)])return'';if('created_at'==_0x3774e2[_0x58d5c0(0x1db)])return'';if(_0x58d5c0(0x1c1)==_0x3774e2[_0x58d5c0(0x1db)])return'';if(_0x58d5c0(0x182)==_0x3774e2['name'])return'';if(_0x58d5c0(0x188)==_0x3774e2[_0x58d5c0(0x1db)])return'';let _0x411119=this[_0x58d5c0(0x16c)](_0x3774e2),_0x4e444b=this[_0x58d5c0(0x1d8)](_0x3774e2);_0x3774e2[_0x58d5c0(0x161)]=!0x0;let _0x1005b0=camelCase(_0x3774e2['name']);return'\x20\x20'+(_0x58d5c0(0x1c4)+(0x0==_0x411119[_0x58d5c0(0x1c2)]?'':'type\x20=>'+_0x411119+',')+_0x58d5c0(0x1eb)+_0x3774e2['nullable']+_0x58d5c0(0x18d))+_0x58d5c0(0x1ce)+(''+_0x1005b0+(_0x3774e2[_0x58d5c0(0x161)]?'?':'')+':\x20'+_0x4e444b)+'\x0a';});return _0x28810a=_0x28810a[_0x4c5301(0x171)](/{{patchTypeColumns}}/g,_0xb0efd8[_0x4c5301(0x1cc)]('\x0a')),_0x28810a;}[a0_0x573f8b(0x1ab)](_0x228cc0,_0x3a1f1d){const _0x101910=a0_0x573f8b;let _0x983302=serviceEntity,_0x2f7b2c=_0x3a1f1d[_0x101910(0x173)](function(_0x1c9017,_0x4431b2){const _0x53abd0=_0x101910;return _0x1c9017[_0x53abd0(0x1d2)]-_0x4431b2['rank'];})[_0x101910(0x1e2)](_0x474800=>this['columnToEntityColumn'](_0x474800));[_0x101910(0x1d5),_0x101910(0x1b7)][_0x101910(0x19b)](_0x228cc0['dataProp'])&&_0x2f7b2c[_0x101910(0x19c)](_0x101910(0x1d6)),_0x983302=_0x983302[_0x101910(0x171)](/{{entityColumns}}/g,_0x2f7b2c[_0x101910(0x1cc)]('\x0a'));let _0x258896='',_0x3fc81e=_0x3a1f1d[_0x101910(0x19a)](_0x2b7301=>_0x2b7301[_0x101910(0x174)]&&_0x2b7301[_0x101910(0x174)]>0x0)[_0x101910(0x173)](function(_0x5ec5c5,_0x43f98f){const _0x845f1f=_0x101910;return _0x5ec5c5[_0x845f1f(0x174)]-_0x43f98f['uniqRank'];});if(_0x3fc81e['length']>0x0){_0x258896='@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})';let _0x42128f=_0x3fc81e[_0x101910(0x1e2)](_0x22d2ea=>{const _0x378a1d=_0x101910;let _0x5e7565=_0x22d2ea[_0x378a1d(0x1db)];return _0x378a1d(0x18a)==_0x22d2ea[_0x378a1d(0x1db)]&&(_0x5e7565=_0x378a1d(0x18b)),_0x378a1d(0x182)==_0x22d2ea[_0x378a1d(0x1db)]&&(_0x5e7565=_0x378a1d(0x1aa)),'updater_id'==_0x22d2ea['name']&&(_0x5e7565='updater'),_0x378a1d(0x1d3)+camelCase(_0x5e7565);});_0x258896=_0x258896[_0x101910(0x171)](/{{indexColumns}}/g,_0x42128f[_0x101910(0x1cc)](','));}return _0x983302=_0x983302[_0x101910(0x171)](/{{indexAnn}}/g,_0x258896),_0x983302;}[a0_0x573f8b(0x185)](_0x4db105,_0x5d7747){const _0x3ae569=a0_0x573f8b;let _0x177364=_0x3ae569(0x1b7)==_0x4db105['dataProp']?serviceEntityHistJson:serviceEntityHistCopy,_0x70edfe=_0x5d7747[_0x3ae569(0x173)](function(_0x2961e1,_0x43ddae){const _0x241ff7=_0x3ae569;return _0x2961e1[_0x241ff7(0x1d2)]-_0x43ddae['rank'];})[_0x3ae569(0x1e2)](_0x447ae2=>this[_0x3ae569(0x19d)](_0x447ae2));return _0x177364=_0x177364[_0x3ae569(0x171)](/{{entityColumns}}/g,_0x70edfe[_0x3ae569(0x1cc)]('\x0a')),_0x177364;}['columnToEntityColumn'](_0x5a67d5){const _0x3f60fb=a0_0x573f8b;if('id'==_0x5a67d5['name'])return'';if('domain_id'==_0x5a67d5['name'])return'';if(_0x3f60fb(0x16b)==_0x5a67d5[_0x3f60fb(0x1db)])return'';if(_0x3f60fb(0x1c1)==_0x5a67d5[_0x3f60fb(0x1db)])return'';if(_0x3f60fb(0x182)==_0x5a67d5['name'])return'';if('updater_id'==_0x5a67d5['name'])return'';let _0x210565=_0x5a67d5[_0x3f60fb(0x1b1)];_0x3f60fb(0x186)==_0x5a67d5[_0x3f60fb(0x1b1)]&&(_0x210565='double\x20precision'),_0x3f60fb(0x184)==_0x5a67d5[_0x3f60fb(0x1b1)]&&(_0x210565='bigint'),_0x3f60fb(0x196)==_0x5a67d5[_0x3f60fb(0x1b1)]&&(_0x210565=_0x3f60fb(0x16d)),'datetime'==_0x5a67d5[_0x3f60fb(0x1b1)]&&(_0x210565=_0x3f60fb(0x183));let _0x511ce5='';_0x3f60fb(0x196)==_0x5a67d5[_0x3f60fb(0x1b1)]&&(_0x511ce5=_0x5a67d5[_0x3f60fb(0x1da)]);let _0x2a6c8e=this['getFieldType'](_0x5a67d5),_0x47f5fe=this['getColTxtType'](_0x5a67d5),_0x6a63ca=camelCase(_0x5a67d5[_0x3f60fb(0x1db)]);return'\x20\x20'+(_0x3f60fb(0x19f)+_0x5a67d5[_0x3f60fb(0x1db)]+_0x3f60fb(0x1b3)+_0x210565+_0x3f60fb(0x1a0)+_0x5a67d5['nullable']+'\x20'+(0x0==_0x511ce5[_0x3f60fb(0x1c2)]?'':_0x3f60fb(0x1ef)+_0x511ce5)+_0x3f60fb(0x18d))+_0x3f60fb(0x1ce)+(_0x3f60fb(0x1c4)+(0x0==_0x2a6c8e['length']?'':'type\x20=>'+_0x2a6c8e+',')+_0x3f60fb(0x1eb)+_0x5a67d5[_0x3f60fb(0x161)]+_0x3f60fb(0x18d))+_0x3f60fb(0x1ce)+(''+_0x6a63ca+(_0x5a67d5[_0x3f60fb(0x161)]?'?':'')+':\x20'+_0x47f5fe)+'\x0a';}[a0_0x573f8b(0x16c)](_0x136163){const _0x1a6d59=a0_0x573f8b;let _0x5eccfa='';return _0x1a6d59(0x186)==_0x136163[_0x1a6d59(0x1b1)]&&(_0x5eccfa='Float'),_0x1a6d59(0x162)==_0x136163[_0x1a6d59(0x1b1)]&&(_0x5eccfa=_0x1a6d59(0x166)),'long'==_0x136163[_0x1a6d59(0x1b1)]&&(_0x5eccfa='Int'),_0x1a6d59(0x1cf)==_0x136163[_0x1a6d59(0x1b1)]&&(_0x5eccfa=_0x1a6d59(0x177)),_0x5eccfa;}[a0_0x573f8b(0x1d8)](_0x389a89){const _0x4950f5=a0_0x573f8b;let _0x49f6db=_0x389a89['colType'];return _0x4950f5(0x198)==_0x389a89[_0x4950f5(0x1b1)]&&(_0x49f6db=_0x4950f5(0x187)),_0x4950f5(0x186)==_0x389a89[_0x4950f5(0x1b1)]&&(_0x49f6db='number'),_0x4950f5(0x162)==_0x389a89['colType']&&(_0x49f6db=_0x4950f5(0x187)),_0x4950f5(0x1cf)==_0x389a89[_0x4950f5(0x1b1)]&&(_0x49f6db=_0x4950f5(0x187)),_0x4950f5(0x184)==_0x389a89[_0x4950f5(0x1b1)]&&(_0x49f6db=_0x4950f5(0x187)),_0x4950f5(0x1a6)==_0x389a89['colType']&&(_0x49f6db=_0x4950f5(0x18f)),_0x4950f5(0x190)==_0x389a89['colType']&&(_0x49f6db=_0x4950f5(0x18f)),_0x4950f5(0x1e6)==_0x389a89[_0x4950f5(0x1b1)]&&(_0x49f6db='string'),_0x49f6db;}async['writeFile'](_0xbbad47,_0x47540c,_0x4545ed){const _0xdea269=a0_0x573f8b;await fs[_0xdea269(0x1ad)](_0xbbad47,this[_0xdea269(0x178)](_0x47540c,_0x4545ed),_0xdea269(0x1ea));}[a0_0x573f8b(0x178)](_0x2c2518,_0x3bf07b){const _0x1092b3=a0_0x573f8b;return _0x2c2518[_0x1092b3(0x171)](/{{pascalCase name}}/g,_0x3bf07b['pascalCaseName'])['replace'](/{{camelCase name}}/g,_0x3bf07b[_0x1092b3(0x15f)])[_0x1092b3(0x171)](/{{snakeCase name}}/g,_0x3bf07b[_0x1092b3(0x194)])[_0x1092b3(0x171)](/{{pluralPascalCase name}}/g,_0x3bf07b['pluralPascalCaseName'])[_0x1092b3(0x171)](/{{pluralCamelCase name}}/g,_0x3bf07b[_0x1092b3(0x170)])[_0x1092b3(0x171)](/{{tableName}}/g,_0x3bf07b[_0x1092b3(0x1a3)])[_0x1092b3(0x171)](/{{name}}/g,_0x3bf07b[_0x1092b3(0x1db)]);}async[a0_0x573f8b(0x1a1)](_0x591e6a,_0x1d569b,_0x32dd8e){const _0xe4a17e=a0_0x573f8b;let _0x45aca9=_0x591e6a+_0xe4a17e(0x1e4);await this[_0xe4a17e(0x19e)](_0x45aca9),_0x45aca9=_0x45aca9+'/'+_0x1d569b,await this[_0xe4a17e(0x19e)](_0x45aca9),_0x45aca9+=_0xe4a17e(0x172),await this['createDir'](_0x45aca9),_0x45aca9+=_0xe4a17e(0x1e9),await this[_0xe4a17e(0x19e)](_0x45aca9),_0x45aca9=_0x45aca9+'/'+_0x32dd8e,await this[_0xe4a17e(0x19e)](_0x45aca9);}['getProjectRootPath'](){const _0x2c8da8=a0_0x573f8b;let _0x3d3094=process[_0x2c8da8(0x1b8)][_0x2c8da8(0x1d7)][_0x2c8da8(0x1df)]('/'),_0x32808b=[];for(let _0x468e23=0x0;_0x468e23<_0x3d3094[_0x2c8da8(0x1c2)]&&_0x2c8da8(0x1c7)!=_0x3d3094[_0x468e23];_0x468e23++)_0x32808b[_0x2c8da8(0x19c)](_0x3d3094[_0x468e23]);return _0x32808b[_0x2c8da8(0x1cc)]('/');}async[a0_0x573f8b(0x19e)](_0x48bc13){const _0x5dc2ea=a0_0x573f8b;0x0==await this['existsPath'](_0x48bc13)&&fs[_0x5dc2ea(0x1ac)](_0x48bc13);}async[a0_0x573f8b(0x175)](_0x18daef){const _0x2b7a5f=a0_0x573f8b;return await fs[_0x2b7a5f(0x1c8)](_0x18daef);}};tslib_1[a0_0x573f8b(0x17b)]([(0x0,type_graphql_1[a0_0x573f8b(0x1a2)])(_0x4ebc8b=>Boolean,{'description':a0_0x573f8b(0x1e1)}),tslib_1[a0_0x573f8b(0x1dd)](0x0,(0x0,type_graphql_1[a0_0x573f8b(0x17d)])('id')),tslib_1[a0_0x573f8b(0x1dd)](0x1,(0x0,type_graphql_1['Ctx'])()),tslib_1[a0_0x573f8b(0x1ba)]('design:type',Function),tslib_1[a0_0x573f8b(0x1ba)](a0_0x573f8b(0x1b5),[String,Object]),tslib_1[a0_0x573f8b(0x1ba)](a0_0x573f8b(0x176),Promise)],OperatoToolCreateService[a0_0x573f8b(0x1ca)],a0_0x573f8b(0x189),null),OperatoToolCreateService=tslib_1[a0_0x573f8b(0x17b)]([(0x0,type_graphql_1[a0_0x573f8b(0x1e0)])()],OperatoToolCreateService),exports['OperatoToolCreateService']=OperatoToolCreateService;const allIndex=a0_0x573f8b(0x17c),serviceIndex='\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}}]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}Mutation]\x0a',serviceHistoryIndex='\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryQuery\x20}\x20from\x20\x27./{{name}}-history-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryEntitySubscriber\x20}\x20from\x20\x27./event-subscriber\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}},\x20{{pascalCase\x20name}}History]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}HistoryQuery,\x20{{pascalCase\x20name}}Mutation]\x0aexport\x20const\x20subscribers\x20=\x20[{{pascalCase\x20name}}HistoryEntitySubscriber]\x0a\x0a',serviceQuery=a0_0x573f8b(0x1ec),serviceHistoryQuery=a0_0x573f8b(0x1d0),serviceMutation=a0_0x573f8b(0x164),sereviceType=a0_0x573f8b(0x1dc),sereviceHistoryType=a0_0x573f8b(0x1de),serviceEntity=a0_0x573f8b(0x1e7),serviceEntityHistCopy=a0_0x573f8b(0x169),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_0x573f8b(0x1a5);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x2ffc11=a0_0x4cc8;function a0_0x5d2d(){const _0x155f52=['(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)','12osiMtA','@things-factory/operato-license-checker','trim','2632488wpYERV','Menu','id\x20!=\x20:id','defineProperty','6701700sMJNhz','2580VVjnam','805GouvGV','getRepository','getPermission','manager','select','from','1904GInxaS','64634gWRgXJ','checkTarget','6137856YrhGBr','868896SPwEEt','OVER_LIMIT','getCount','LicenseError','21308GHHlHq','33XlmTez','forEach','INVALID_LICENSE','map','checkStudioTemplateIsOverLimit','menu','Permissions\x20For\x20Tailor\x20Tool','createQueryBuilder','where','ERROR_CODES','andWhere'];a0_0x5d2d=function(){return _0x155f52;};return a0_0x5d2d();}(function(_0x10832e,_0x49804f){const _0x1bb669=a0_0x4cc8,_0x11d950=_0x10832e();while(!![]){try{const _0x210855=-parseInt(_0x1bb669(0xac))/0x1*(parseInt(_0x1bb669(0xbc))/0x2)+-parseInt(_0x1bb669(0xaf))/0x3+-parseInt(_0x1bb669(0xc3))/0x4*(parseInt(_0x1bb669(0xb5))/0x5)+parseInt(_0x1bb669(0xb4))/0x6*(-parseInt(_0x1bb669(0xbb))/0x7)+parseInt(_0x1bb669(0xbe))/0x8+-parseInt(_0x1bb669(0xbf))/0x9+-parseInt(_0x1bb669(0xb3))/0xa*(-parseInt(_0x1bb669(0xc4))/0xb);if(_0x210855===_0x49804f)break;else _0x11d950['push'](_0x11d950['shift']());}catch(_0x5de789){_0x11d950['push'](_0x11d950['shift']());}}}(a0_0x5d2d,0x6bbcb));function a0_0x4cc8(_0x36c363,_0x38374d){const _0x5d2d30=a0_0x5d2d();return a0_0x4cc8=function(_0x4cc865,_0xc97308){_0x4cc865=_0x4cc865-0xa5;let _0x4b1f6f=_0x5d2d30[_0x4cc865];return _0x4b1f6f;},a0_0x4cc8(_0x36c363,_0x38374d);}Object[a0_0x2ffc11(0xb2)](exports,'__esModule',{'value':!0x0}),exports[a0_0x2ffc11(0xc8)]=exports['checkStudioPermission']=void 0x0;const operato_license_checker_1=require(a0_0x2ffc11(0xad)),shell_1=require('@things-factory/shell'),menu_base_1=require('@things-factory/menu-base'),license_error_1=require('../../errors/license-error');async function checkStudioPermission(){const _0x494f74=a0_0x2ffc11;let _0x262632=((0x0,operato_license_checker_1[_0x494f74(0xb7)])(_0x494f74(0xa6))||',')['split'](',')[_0x494f74(0xc7)](_0x553618=>_0x553618[_0x494f74(0xae)]()),_0x29d823=!0x1;return _0x262632[_0x494f74(0xc5)](_0x1a5f73=>{_0x1a5f73['includes']('Studio')&&(_0x29d823=!0x0);}),_0x29d823;}async function checkStudioTemplateIsOverLimit(_0x254ddc,_0x43eb68){const _0x32c43e=a0_0x2ffc11;if(0x0==await checkStudioPermission())throw new license_error_1['LicenseError']({'errorCode':_0x43eb68['t'](license_error_1['LicenseError'][_0x32c43e(0xa9)][_0x32c43e(0xc6)])});var _0x5358f7=0x0;if(_0x5358f7=_0x254ddc&&''!=_0x254ddc?await(0x0,shell_1[_0x32c43e(0xb6)])(menu_base_1['Menu'])['manager'][_0x32c43e(0xa7)]()[_0x32c43e(0xb9)](_0x32c43e(0xa5))[_0x32c43e(0xba)](menu_base_1[_0x32c43e(0xb0)],_0x32c43e(0xa5))[_0x32c43e(0xa8)](_0x32c43e(0xb1),{'id':_0x254ddc})[_0x32c43e(0xaa)](_0x32c43e(0xab))[_0x32c43e(0xc1)]()+0x1:await(0x0,shell_1['getRepository'])(menu_base_1['Menu'])[_0x32c43e(0xb8)][_0x32c43e(0xa7)]()[_0x32c43e(0xb9)](_0x32c43e(0xa5))[_0x32c43e(0xba)](menu_base_1[_0x32c43e(0xb0)],_0x32c43e(0xa5))[_0x32c43e(0xa8)](_0x32c43e(0xab))[_0x32c43e(0xc1)]()+0x1,!(0x0,operato_license_checker_1[_0x32c43e(0xbd)])(_0x5358f7))throw new license_error_1[(_0x32c43e(0xc2))]({'errorCode':_0x43eb68['t'](license_error_1[_0x32c43e(0xc2)][_0x32c43e(0xa9)][_0x32c43e(0xc0)])});return!0x0;}exports['checkStudioPermission']=checkStudioPermission,exports[a0_0x2ffc11(0xc8)]=checkStudioTemplateIsOverLimit;
|