@things-factory/operato-tools 6.1.32 → 6.1.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/actions/main.js +1 -1
- package/client/pages/generator/button-config-tab-mixin.js +4 -4
- package/client/pages/generator/column-config-tab-mixin.js +4 -4
- package/client/pages/generator/etc-config-tab-mixin.js +4 -4
- package/client/pages/generator/form-config-tab-mixin.js +4 -4
- package/client/pages/generator/graphql-config-tab-mixin.js +24 -24
- package/client/pages/generator/grid-config-tab-mixin.js +23 -23
- 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 +10 -10
- package/client/pages/generator/search-config-tab-mixin.js +4 -4
- package/client/pages/generator/tab-config-tab-mixin.js +4 -4
- package/client/pages/main.js +4 -4
- package/client/reducers/main.js +1 -1
- package/package.json +3 -3
- package/server/constants/error-code.js +1 -1
- package/server/errors/license-error.js +1 -1
- package/server/routes.js +1 -1
- package/server/service/tool-entity/create-menu.js +1 -1
- package/server/service/tool-entity/create-service.js +1 -1
- package/server/service/tool-secret/tool-permission.js +1 -1
- package/server/service/tool-secret/tool-resolver.js +1 -1
|
@@ -1,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_0x5b0f03=a0_0x4c47;function a0_0x2e5a(){const _0x30ad1c=['integer','params','delete','left','map','deleteRow','param_field','getGristSelectableConfig','getGristGuttersConfig','gutter','tab','2336391dufXOb','push','page_location','333ApqxVs','fetchTabTabHandler','5312688IbzOjD','icon','name','23015eoIwPY','213216jKQJEz','getElementValueById','querySelector','location','rank','tagname','parent_id','viewTabData','menu','routing','getTabConfigTabValues','shadowRoot','sortRecordByRank','center','1528106XlDPcx','display','parent_field','button','tabTabGrist','string','1288975trfocd','tLabel','84vuNJbB','setTabConfigTabValues','7093926qVZztR','tabTabGridConfig','bind','setTabConfigTabConfig'];a0_0x2e5a=function(){return _0x30ad1c;};return a0_0x2e5a();}(function(_0x4e5a98,_0x52bda2){const _0x5ed35b=a0_0x4c47,_0x6fccfa=_0x4e5a98();while(!![]){try{const _0x3e15df=parseInt(_0x5ed35b(0x105))/0x1+-parseInt(_0x5ed35b(0xff))/0x2+-parseInt(_0x5ed35b(0xe8))/0x3+parseInt(_0x5ed35b(0x107))/0x4*(-parseInt(_0x5ed35b(0xf0))/0x5)+-parseInt(_0x5ed35b(0xed))/0x6+parseInt(_0x5ed35b(0x109))/0x7+-parseInt(_0x5ed35b(0xf1))/0x8*(-parseInt(_0x5ed35b(0xeb))/0x9);if(_0x3e15df===_0x52bda2)break;else _0x6fccfa['push'](_0x6fccfa['shift']());}catch(_0x5468e){_0x6fccfa['push'](_0x6fccfa['shift']());}}}(a0_0x2e5a,0xba6a4));function a0_0x4c47(_0x2bd069,_0x392666){const _0x2e5a90=a0_0x2e5a();return a0_0x4c47=function(_0x4c47e3,_0x2a03a2){_0x4c47e3=_0x4c47e3-0xde;let _0x377809=_0x2e5a90[_0x4c47e3];return _0x377809;},a0_0x4c47(_0x2bd069,_0x392666);}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';export const TabConfigTabMixin=_0x1db4b=>class extends _0x1db4b{[a0_0x5b0f03(0x108)](_0x40583d){const _0x376bef=a0_0x5b0f03;let _0x3f25af=_0x40583d?.[_0x376bef(0xe1)]((_0x3859f8,_0x8d51e2)=>{const _0x18d8e5=_0x376bef;let _0x5c096e=_0x8d51e2+0x1,_0x1a4905={};return _0x1a4905['rank']=0xa*_0x5c096e,_0x1a4905['id']=_0x5c096e,_0x1a4905[_0x18d8e5(0xef)]=_0x3859f8[_0x18d8e5(0xef)],_0x1a4905[_0x18d8e5(0x100)]=_0x3859f8[_0x18d8e5(0x100)],_0x1a4905[_0x18d8e5(0xf6)]=_0x3859f8[_0x18d8e5(0xf6)],_0x1a4905[_0x18d8e5(0xee)]=_0x3859f8[_0x18d8e5(0xee)],_0x1a4905[_0x18d8e5(0xf4)]=_0x3859f8[_0x18d8e5(0xf4)],_0x1a4905['parent_field']=_0x3859f8[_0x18d8e5(0x101)],_0x1a4905[_0x18d8e5(0xe3)]=_0x3859f8[_0x18d8e5(0xe3)],_0x1a4905[_0x18d8e5(0xf9)]=_0x3859f8[_0x18d8e5(0xf9)],_0x1a4905;});this[_0x376bef(0xf8)]=_0x3f25af||[],this[_0x376bef(0x103)]?.['fetch']();}[a0_0x5b0f03(0xfb)](){const _0x5e9bac=a0_0x5b0f03;let _0x45f773={'tab':[]},_0x45b329=this[_0x5e9bac(0xf2)]('tab-tab-grid');return this[_0x5e9bac(0xfd)](_0x45b329)?.['forEach'](_0x2319f5=>{const _0x4b9235=_0x5e9bac;var {name:_0x3422e5,display:_0x5991ca,tagname:_0x5556b5,location:_0x3833c0,parent_field:_0x190303,param_field:_0x568311,menu:_0x443de0,icon:_0xcc1d16}=_0x2319f5;_0x3422e5&&_0x5556b5&&_0x3833c0&&_0x443de0&&(_0x5991ca||(_0x5991ca=_0x3422e5),_0x190303||(_0x190303='id'),_0x568311||(_0x568311=_0x4b9235(0xe3)),_0x45f773[_0x4b9235(0xe7)][_0x4b9235(0xe9)]({'name':_0x3422e5,'display':_0x5991ca,'tagname':_0x5556b5,'location':_0x3833c0,'parent_field':_0x190303,'param_field':_0x568311,'menu':_0x443de0,'icon':_0xcc1d16}));}),_0x45f773;}['renderTabConfigTab'](){const _0x4040b6=a0_0x5b0f03;return html`
|
|
2
|
+
<ox-grist auto-fetch id="tab-tab-grid" .config=${this[_0x4040b6(0x10a)]} .mode='GRID'
|
|
3
|
+
.fetchHandler=${this[_0x4040b6(0xec)][_0x4040b6(0x10b)](this)}>
|
|
4
|
+
</ox-grist>`;}get['tabTabGrist'](){const _0x3d6011=a0_0x5b0f03;return this[_0x3d6011(0xfc)][_0x3d6011(0xf3)]('#tab-tab-grid');}async[a0_0x5b0f03(0xec)](){return{'total':0x0,'records':this['viewTabData']||[]};}async[a0_0x5b0f03(0x10c)](){const _0x1cface=a0_0x5b0f03;this[_0x1cface(0x10a)]={'rows':MetaApi[_0x1cface(0xe4)](!0x0),'pagination':{'infinite':!0x0},'sorters':[{'name':_0x1cface(0xf5),'desc':!0x1}],'appendable':!0x0,'columns':[...MetaApi[_0x1cface(0xe5)](!0x1,!0x1),{'type':_0x1cface(0xe6),'gutterName':_0x1cface(0x102),'icon':_0x1cface(0xdf),'handlers':{'click':(_0x3a96d4,_0x3ed496,_0x91678e,_0x44e986,_0xb6780c)=>{const _0x2cbb14=_0x1cface;_0x44e986['id']&&this[_0x2cbb14(0xe2)](this[_0x2cbb14(0x103)],_0x44e986);}}},{'type':_0x1cface(0x104),'name':'id','hidden':!0x0},{'type':_0x1cface(0x10d),'name':_0x1cface(0xf5),'header':TermsUtil['tLabel']('rank'),'sortable':!0x0,'width':0x41,'record':{'align':'right','editable':!0x0,'mandatory':!0x0}},{'type':_0x1cface(0x104),'name':_0x1cface(0xef),'header':TermsUtil[_0x1cface(0x106)](_0x1cface(0xef)),'sortable':!0x1,'width':0x64,'record':{'align':_0x1cface(0xe0),'editable':!0x0,'mandatory':!0x0}},{'type':_0x1cface(0x104),'name':_0x1cface(0x100),'header':TermsUtil[_0x1cface(0x106)](_0x1cface(0x100)),'sortable':!0x1,'width':0x64,'record':{'align':_0x1cface(0xe0),'editable':!0x0,'mandatory':!0x0}},{'type':_0x1cface(0x104),'name':_0x1cface(0xee),'header':TermsUtil['tLabel'](_0x1cface(0xee)),'sortable':!0x0,'width':0x41,'record':{'align':_0x1cface(0xfe),'editable':!0x0,'mandatory':!0x0}},{'type':_0x1cface(0x104),'name':_0x1cface(0xf9),'header':TermsUtil[_0x1cface(0x106)](_0x1cface(0xfa)),'sortable':!0x1,'width':0x64,'record':{'align':'left','editable':!0x0,'mandatory':!0x0}},{'type':_0x1cface(0x104),'name':'tagname','header':TermsUtil[_0x1cface(0x106)]('tag'),'sortable':!0x1,'width':0x96,'record':{'align':_0x1cface(0xe0),'editable':!0x0,'mandatory':!0x0}},{'type':_0x1cface(0x104),'name':_0x1cface(0xf4),'header':TermsUtil[_0x1cface(0x106)](_0x1cface(0xea)),'sortable':!0x1,'width':0x12c,'record':{'align':_0x1cface(0xe0),'editable':!0x0,'mandatory':!0x0}},{'type':_0x1cface(0x104),'name':_0x1cface(0x101),'header':TermsUtil[_0x1cface(0x106)](_0x1cface(0xf7)),'sortable':!0x1,'width':0x64,'record':{'align':'left','editable':!0x0,'mandatory':!0x0}},{'type':'string','name':_0x1cface(0xe3),'header':TermsUtil[_0x1cface(0x106)](_0x1cface(0xde)),'sortable':!0x1,'width':0x64,'record':{'align':'left','editable':!0x0,'mandatory':!0x0}}]};}};
|
package/client/pages/main.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a0_0x5dc53e=a0_0x33a3;function a0_0x35f7(){var _0x3cc936=['55583dNQMdp','operato-tools-main','render','60orGbTa','245012RHXgoC','189fJacTv','680UpaOtD','Operato\x20Tools','19548SguxGd','define','styles','18BzpxwC','3104035zdYimf','47976lJCkYa','1636388vConLK','53cWGvAB','520877wFSZsE','15mpudpg','tText','customElements'];a0_0x35f7=function(){return _0x3cc936;};return a0_0x35f7();}(function(_0x59231a,_0x3f12b2){var _0x1aba5f=a0_0x33a3,_0x3dfc67=_0x59231a();while(!![]){try{var _0xc7b9c1=-parseInt(_0x1aba5f(0x1cc))/0x1*(-parseInt(_0x1aba5f(0x1d9))/0x2)+parseInt(_0x1aba5f(0x1ce))/0x3*(parseInt(_0x1aba5f(0x1d5))/0x4)+parseInt(_0x1aba5f(0x1dd))/0x5+parseInt(_0x1aba5f(0x1dc))/0x6*(-parseInt(_0x1aba5f(0x1cd))/0x7)+parseInt(_0x1aba5f(0x1ca))/0x8*(parseInt(_0x1aba5f(0x1d6))/0x9)+parseInt(_0x1aba5f(0x1d7))/0xa*(-parseInt(_0x1aba5f(0x1d1))/0xb)+parseInt(_0x1aba5f(0x1d4))/0xc*(-parseInt(_0x1aba5f(0x1cb))/0xd);if(_0xc7b9c1===_0x3f12b2)break;else _0x3dfc67['push'](_0x3dfc67['shift']());}catch(_0x13c6db){_0x3dfc67['push'](_0x3dfc67['shift']());}}}(a0_0x35f7,0x5b81e));import{html,css}from'lit-element';import{connect}from'pwa-helpers/connect-mixin.js';import{store,PageView}from'@things-factory/shell';function a0_0x33a3(_0x80c666,_0x2e7eee){var _0x35f7a7=a0_0x35f7();return a0_0x33a3=function(_0x33a302,_0x3de150){_0x33a302=_0x33a302-0x1ca;var _0xa40caa=_0x35f7a7[_0x33a302];return _0xa40caa;},a0_0x33a3(_0x80c666,_0x2e7eee);}import{TermsUtil}from'@things-factory/meta-ui';class OperatoToolsMain extends connect(store)(PageView){static get[a0_0x5dc53e(0x1db)](){return[css`
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
4
|
background-color: var(--main-section-background-color);
|
|
@@ -41,11 +41,11 @@ var a0_0x1c393f=a0_0x2704;(function(_0x56329b,_0x130cc6){var _0x238367=a0_0x2704
|
|
|
41
41
|
display: none;
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
`];}get[
|
|
44
|
+
`];}get['context'](){var _0x578957=a0_0x5dc53e;return{'title':_0x578957(0x1d8),'actions':[]};}[a0_0x5dc53e(0x1d3)](){var _0x4c0d83=a0_0x5dc53e;return html`
|
|
45
45
|
<h2>Operato Tools</h2>
|
|
46
46
|
<p page-description>
|
|
47
|
-
${TermsUtil['
|
|
47
|
+
${TermsUtil[_0x4c0d83(0x1cf)]('tool\x20start\x20msg')}
|
|
48
48
|
</p>
|
|
49
49
|
|
|
50
50
|
<img src="/assets/images/operato-tools.png" />
|
|
51
|
-
`;}}window[
|
|
51
|
+
`;}}window[a0_0x5dc53e(0x1d0)][a0_0x5dc53e(0x1da)](a0_0x5dc53e(0x1d2),OperatoToolsMain);
|
package/client/reducers/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a0_0x2af076=a0_0x562b;function a0_0x4add(){const _0xb82536=['errors','5469MQKBOp','studioPermission','dispatch','35638eGWATg','44PtoTHL','21kIjHRo','12vZytFA','3048525apDxsZ','state','2907780FvMDlE','5057940rBZRnh','type','ABC','UPDATE_OPERATO_TOOLS_PERMISSION','1468mksayy','1110930WGkrdO','220792UsUvNv','11qcaqpb','data'];a0_0x4add=function(){return _0xb82536;};return a0_0x4add();}(function(_0x3abebb,_0x3986e6){const _0x52590b=a0_0x562b,_0x17270e=_0x3abebb();while(!![]){try{const _0x1e88c6=-parseInt(_0x52590b(0x1d1))/0x1*(-parseInt(_0x52590b(0x1d7))/0x2)+parseInt(_0x52590b(0x1d4))/0x3*(parseInt(_0x52590b(0x1ce))/0x4)+parseInt(_0x52590b(0x1cf))/0x5*(-parseInt(_0x52590b(0x1c6))/0x6)+parseInt(_0x52590b(0x1c5))/0x7*(-parseInt(_0x52590b(0x1d0))/0x8)+-parseInt(_0x52590b(0x1c7))/0x9+-parseInt(_0x52590b(0x1ca))/0xa+-parseInt(_0x52590b(0x1d8))/0xb*(-parseInt(_0x52590b(0x1c9))/0xc);if(_0x1e88c6===_0x3986e6)break;else _0x17270e['push'](_0x17270e['shift']());}catch(_0x2368b4){_0x17270e['push'](_0x17270e['shift']());}}}(a0_0x4add,0x70f1e));import a0_0x9c5367 from'graphql-tag';import{i18next}from'@operato/i18n';import{store}from'@operato/shell';import{client,gqlContext}from'@operato/graphql';import{UPDATE_OPERATO_TOOLS}from'../actions/main';function a0_0x562b(_0x4d9b05,_0x53cb3f){const _0x4add23=a0_0x4add();return a0_0x562b=function(_0x562b00,_0x35f9dc){_0x562b00=_0x562b00-0x1c5;let _0x560e38=_0x4add23[_0x562b00];return _0x560e38;},a0_0x562b(_0x4d9b05,_0x53cb3f);}const INITIAL_STATE={'operatoTools':a0_0x2af076(0x1cc),'studioPermission':!0x1};export const UPDATE_OPERATO_TOOLS_PERMISSION=a0_0x2af076(0x1cd);((async()=>{const _0x2eb011=a0_0x2af076;var _0xbea9=await client['query']({'query':a0_0x9c5367`{studioPermission}`});let _0x2ec3b0=!0x1;_0xbea9[_0x2eb011(0x1d3)]||(_0x2ec3b0=_0xbea9[_0x2eb011(0x1d2)][_0x2eb011(0x1d5)]),store[_0x2eb011(0x1d6)]({'type':UPDATE_OPERATO_TOOLS_PERMISSION,'state':{'studioPermission':_0x2ec3b0}});})());const operatoTools=(_0x3b5abd=INITIAL_STATE,_0xdf3534)=>{const _0x56d592=a0_0x2af076;switch(_0xdf3534[_0x56d592(0x1cb)]){case UPDATE_OPERATO_TOOLS:return{..._0x3b5abd};case UPDATE_OPERATO_TOOLS_PERMISSION:return{...INITIAL_STATE,..._0xdf3534[_0x56d592(0x1c8)]};default:return _0x3b5abd;}};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.34",
|
|
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.34",
|
|
33
33
|
"@things-factory/operato-license-checker": "^3.1.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@things-factory/builder": "^6.1.28",
|
|
37
37
|
"@things-factory/meta-ui": "^6.0.0-alpha.6"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "c528685fd0d44a3cc6c67ab105da0a2221f824f8"
|
|
40
40
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a0_0x5b4a03=a0_0x475c;(function(_0x173aad,_0x246c79){var _0x1b4420=a0_0x475c,_0x8ce3dc=_0x173aad();while(!![]){try{var _0x52db89=-parseInt(_0x1b4420(0x74))/0x1+parseInt(_0x1b4420(0x7c))/0x2*(parseInt(_0x1b4420(0x7d))/0x3)+-parseInt(_0x1b4420(0x78))/0x4*(-parseInt(_0x1b4420(0x75))/0x5)+-parseInt(_0x1b4420(0x7b))/0x6*(-parseInt(_0x1b4420(0x7f))/0x7)+parseInt(_0x1b4420(0x80))/0x8*(parseInt(_0x1b4420(0x73))/0x9)+-parseInt(_0x1b4420(0x7a))/0xa*(parseInt(_0x1b4420(0x70))/0xb)+-parseInt(_0x1b4420(0x7e))/0xc;if(_0x52db89===_0x246c79)break;else _0x8ce3dc['push'](_0x8ce3dc['shift']());}catch(_0x386b8a){_0x8ce3dc['push'](_0x8ce3dc['shift']());}}}(a0_0xd190,0x9e20b));function a0_0xd190(){var _0x92f22d=['232240KZKmeY','3ybJpsh','8948880diSnvw','7eGQMes','912pYnnQX','363aRUQtW','error.page\x20count\x20over\x20license\x20limit','OVER_LIMIT','88947rPCTre','186926NLEsnT','5qWRDut','INVALID_LICENSE','__esModule','2757116dNXehH','error.invalid\x20license\x20key','114250RtSkmQ','151926XQacpS'];a0_0xd190=function(){return _0x92f22d;};return a0_0xd190();}function a0_0x475c(_0x497fe1,_0x15a355){var _0xd19028=a0_0xd190();return a0_0x475c=function(_0x475c25,_0x31c707){_0x475c25=_0x475c25-0x70;var _0x2b9055=_0xd19028[_0x475c25];return _0x2b9055;},a0_0x475c(_0x497fe1,_0x15a355);}Object['defineProperty'](exports,a0_0x5b4a03(0x77),{'value':!0x0}),exports[a0_0x5b4a03(0x72)]=exports[a0_0x5b4a03(0x76)]=void 0x0,exports[a0_0x5b4a03(0x76)]=a0_0x5b4a03(0x79),exports[a0_0x5b4a03(0x72)]=a0_0x5b4a03(0x71);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x119437=a0_0x2ae1;(function(_0x1f6afb,_0x55ce4a){const _0x223733=a0_0x2ae1,_0x2aaaae=_0x1f6afb();while(!![]){try{const _0x34c7cf=-parseInt(_0x223733(0x8f))/0x1*(parseInt(_0x223733(0x95))/0x2)+-parseInt(_0x223733(0x8d))/0x3+parseInt(_0x223733(0x9b))/0x4*(-parseInt(_0x223733(0x9c))/0x5)+parseInt(_0x223733(0x98))/0x6+parseInt(_0x223733(0x94))/0x7+parseInt(_0x223733(0x96))/0x8+parseInt(_0x223733(0x91))/0x9;if(_0x34c7cf===_0x55ce4a)break;else _0x2aaaae['push'](_0x2aaaae['shift']());}catch(_0x203263){_0x2aaaae['push'](_0x2aaaae['shift']());}}}(a0_0x207b,0x68d11));function a0_0x2ae1(_0x595e90,_0x198b3e){const _0x207bb1=a0_0x207b();return a0_0x2ae1=function(_0x2ae177,_0xdb5c4){_0x2ae177=_0x2ae177-0x8d;let _0x8ced5d=_0x207bb1[_0x2ae177];return _0x8ced5d;},a0_0x2ae1(_0x595e90,_0x198b3e);}function a0_0x207b(){const _0x2b7d4f=['tslib','__importStar','506730FZvPDb','471374NMdRaA','5413304Onmgul','license-error','3025470KizAZA','defineProperty','LicenseError','21968PToFXH','415UxwZgG','22782uVgmaj','detail','2RiTtCf','../constants/error-code','997515DExOoJ'];a0_0x207b=function(){return _0x2b7d4f;};return a0_0x207b();}Object[a0_0x119437(0x99)](exports,'__esModule',{'value':!0x0}),exports[a0_0x119437(0x9a)]=void 0x0;const tslib_1=require(a0_0x119437(0x92)),ERROR_CODES=tslib_1[a0_0x119437(0x93)](require(a0_0x119437(0x90)));class LicenseError extends Error{static get['ERROR_CODES'](){return Object['assign']({},ERROR_CODES);}constructor({errorCode:_0x59c456,detail:_0x46853e}){const _0x590af9=a0_0x119437;super(_0x59c456),this['name']=_0x590af9(0x97),this['errorCode']=_0x59c456,this[_0x590af9(0x8e)]=_0x46853e;}}exports[a0_0x119437(0x9a)]=LicenseError;
|
package/server/routes.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a0_0x5a3ea8=a0_0x4c4c;function a0_0x4c4c(_0x2a9bb7,_0x44699a){const _0x104c37=a0_0x104c();return a0_0x4c4c=function(_0x4c4ca8,_0x9edff7){_0x4c4ca8=_0x4c4ca8-0xe6;let _0x500735=_0x104c37[_0x4c4ca8];return _0x500735;},a0_0x4c4c(_0x2a9bb7,_0x44699a);}function a0_0x104c(){const _0x3c5762=['2571110zZDmkd','2608FoXUtV','935kEHrKQ','things-factory:operato-tools:routes','bootstrap-module-global-public-route','67830VFHWpk','bootstrap-module-domain-private-route','337378fcGAqS','12uLtvzE','debug','9084UfnCsV','2NHyqGp','33AEyfMy','328404amUAAT','8118yIOUQr','164104aRDruI'];a0_0x104c=function(){return _0x3c5762;};return a0_0x104c();}(function(_0x5c10d2,_0x215da9){const _0x295770=a0_0x4c4c,_0x2b38b2=_0x5c10d2();while(!![]){try{const _0x1d2f41=-parseInt(_0x295770(0xea))/0x1*(-parseInt(_0x295770(0xee))/0x2)+-parseInt(_0x295770(0xeb))/0x3*(-parseInt(_0x295770(0xf2))/0x4)+parseInt(_0x295770(0xf5))/0x5*(-parseInt(_0x295770(0xed))/0x6)+parseInt(_0x295770(0xe8))/0x7+-parseInt(_0x295770(0xf4))/0x8*(-parseInt(_0x295770(0xf1))/0x9)+-parseInt(_0x295770(0xf3))/0xa+parseInt(_0x295770(0xef))/0xb*(-parseInt(_0x295770(0xf0))/0xc);if(_0x1d2f41===_0x215da9)break;else _0x2b38b2['push'](_0x2b38b2['shift']());}catch(_0x34e2f6){_0x2b38b2['push'](_0x2b38b2['shift']());}}}(a0_0x104c,0x2ca6e));const debug=require(a0_0x5a3ea8(0xec))(a0_0x5a3ea8(0xe6));process['on'](a0_0x5a3ea8(0xe7),(_0x3b4c3a,_0x35e64d)=>{}),process['on']('bootstrap-module-global-private-route',(_0x3d955d,_0x1a7f54)=>{}),process['on']('bootstrap-module-domain-public-route',(_0x583098,_0x176f62)=>{}),process['on'](a0_0x5a3ea8(0xe9),(_0x56ecee,_0x555464)=>{});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x4598ac=a0_0x13a9;(function(_0x5887c0,_0x23247c){const _0x15e284=a0_0x13a9,_0x11554d=_0x5887c0();while(!![]){try{const _0x278ee5=parseInt(_0x15e284(0x18f))/0x1*(parseInt(_0x15e284(0x1e2))/0x2)+-parseInt(_0x15e284(0x1ab))/0x3*(parseInt(_0x15e284(0x1d5))/0x4)+parseInt(_0x15e284(0x1a3))/0x5*(-parseInt(_0x15e284(0x1c8))/0x6)+-parseInt(_0x15e284(0x1da))/0x7*(parseInt(_0x15e284(0x1ee))/0x8)+parseInt(_0x15e284(0x1e8))/0x9*(-parseInt(_0x15e284(0x1a8))/0xa)+-parseInt(_0x15e284(0x1f4))/0xb+parseInt(_0x15e284(0x1db))/0xc;if(_0x278ee5===_0x23247c)break;else _0x11554d['push'](_0x11554d['shift']());}catch(_0x1f23f9){_0x11554d['push'](_0x11554d['shift']());}}}(a0_0xa98c,0xcc1c7));function a0_0xa98c(){const _0x2134b7=['hidden','refName',',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22','creator_id','9OmOnzK','\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}','query','__param','default','{\x22type\x22:\x20\x22','48vOUlJz','findOne','replace','Mutation','gridRank','\x22,\x22desc\x22:','8253289cagmnx','Resolver','OperatoToolCreateMenu','./../tool-secret/tool-permission','map','left','length','__decorate','@transaction','rank','COPY','updater_id','template','updated_at','1467gdroSo','meta-grist-page','utf8','createGridColumns','push','h1z0q9i9x7q6','menuType','\x22,\x22width\x22:','design:type','searchOper','{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22','hex','__metadata','filter','stringify','select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27','parent_menu_id','searchRank','getRepository','createCipheriv','65wxQcnV','pluralize','resourceUrl','aes-256-cfb','string','191090kuJjVc','design:returntype','\x27\x20or\x20id\x20=\x20\x27','37050nJlhOv','category','EntityColumn','sortRank','aes-256-ecb','aes-256-ofb','routing','join','createSortCols','\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','updatedAt','\x22,\x22header\x22:\x20\x22','from','enc','assign','Menu','readonly','sort','\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}',',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22','defineProperty','Entity','aes-256-ctr','createSearchCols','state','Directive','updater','\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}','SCREEN','140718dpCNls','aes-256-cfb8','{\x22name\x22:\x20\x22','\x22,\x22hidden\x22:','createMenuData',',\x22mandatory\x22:\x20','{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22','creator','createdAt','\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,\x22name\x22:\x20\x22','design:paramtypes','@things-factory/meta-ui/client/pages/meta-grist-page','108ZnOqIg','dataProp','find','toolCreateMenu','@things-factory/resource-base','1211952etbaHE','31680672cbbwSG','save','name','__importDefault','split','aes-256-cfb1','\x22,\x22operator\x22:\x20\x22','876EXMLBy','scenario'];a0_0xa98c=function(){return _0x2134b7;};return a0_0xa98c();}function a0_0x13a9(_0x5f05d9,_0x55fd88){const _0xa98c6a=a0_0xa98c();return a0_0x13a9=function(_0x13a91b,_0x24041b){_0x13a91b=_0x13a91b-0x188;let _0x1add14=_0xa98c6a[_0x13a91b];return _0x1add14;},a0_0x13a9(_0x5f05d9,_0x55fd88);}Object[a0_0x4598ac(0x1bf)](exports,'__esModule',{'value':!0x0}),exports[a0_0x4598ac(0x1f6)]=void 0x0;const tslib_1=require('tslib'),type_graphql_1=require('type-graphql'),resource_base_1=require(a0_0x4598ac(0x1d9)),menu_base_1=require('@things-factory/menu-base'),tool_permission_1=require(a0_0x4598ac(0x1f7)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require('lodash'),{plural:plural}=require(a0_0x4598ac(0x1a4)),crypto_1=tslib_1[a0_0x4598ac(0x1de)](require('crypto'));let OperatoToolCreateMenu=class{async[a0_0x4598ac(0x1d8)](_0x32a1e4,_0x2a235a,_0x2ca892){const _0x57ebd1=a0_0x4598ac,{domain:_0x27e5fa,user:_0x23b2f8,tx:_0x29cb8a}=_0x2ca892[_0x57ebd1(0x1c3)];await(0x0,tool_permission_1['checkStudioTemplateIsOverLimit'])('',_0x2ca892);const _0x581816=await _0x29cb8a[_0x57ebd1(0x1a1)](resource_base_1[_0x57ebd1(0x1c0)])[_0x57ebd1(0x1ef)]({'where':{'domain':{'id':_0x27e5fa['id']},'id':_0x32a1e4}}),_0x186b30=await _0x29cb8a['getRepository'](resource_base_1[_0x57ebd1(0x1ad)])[_0x57ebd1(0x1d7)]({'where':{'domain':{'id':_0x27e5fa['id']},'entity':{'id':_0x581816['id']}}});let {name:_0x3741ba=''}=_0x581816||{},_0x52bc3e=kebabCase(_0x3741ba),_0x1fbfd8=modelTemplate[_0x57ebd1(0x1f0)](/{{pascalCase name}}/g,startCase(camelCase(_0x3741ba))[_0x57ebd1(0x1f0)](/ /g,''))[_0x57ebd1(0x1f0)](/{{camelCase name}}/g,camelCase(_0x3741ba))['replace'](/{{snakeCase name}}/g,snakeCase(_0x3741ba))[_0x57ebd1(0x1f0)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x3741ba)))[_0x57ebd1(0x1f0)](/ /g,''))[_0x57ebd1(0x1f0)](/{{pluralCamelCase name}}/g,camelCase(plural(_0x3741ba)))[_0x57ebd1(0x1f0)](/{{name}}/g,_0x3741ba),_0x5569da='';'JSON'==_0x581816['dataProp']?_0x5569da='\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':_0x57ebd1(0x18b)==_0x581816[_0x57ebd1(0x1d6)]&&(_0x5569da=_0x57ebd1(0x1d1)),_0x1fbfd8=_0x1fbfd8[_0x57ebd1(0x1f0)](/{{HistoryButton}}/g,_0x5569da);let _0x2a5763=this[_0x57ebd1(0x1b3)](_0x186b30);_0x1fbfd8=_0x1fbfd8[_0x57ebd1(0x1f0)](/{{SortColumns}}/g,_0x2a5763[_0x57ebd1(0x1b2)](','));let _0x29141d=this[_0x57ebd1(0x1c2)](_0x186b30);_0x1fbfd8=_0x1fbfd8['replace'](/{{SearchColumns}}/g,_0x29141d[_0x57ebd1(0x1b2)](','));let _0x29fde3=this['createGridColumns'](_0x186b30);return _0x1fbfd8=_0x1fbfd8['replace'](/{{GridColumns}}/g,_0x29fde3['join'](',')),_0x1fbfd8=this[_0x57ebd1(0x1b8)](_0x1fbfd8),await this[_0x57ebd1(0x1cc)](_0x29cb8a,_0x27e5fa,_0x23b2f8,_0x2a235a,_0x52bc3e,_0x1fbfd8),!0x0;}[a0_0x4598ac(0x192)](_0x17f0ab){const _0x3964be=a0_0x4598ac;return _0x17f0ab[_0x3964be(0x19c)](_0x24e313=>'id'!=_0x24e313[_0x3964be(0x1dd)]&&_0x24e313[_0x3964be(0x1f2)]>0x0)[_0x3964be(0x1bc)](function(_0x1af18e,_0x17c4a8){const _0x5d587f=_0x3964be;return _0x1af18e['gridRank']-_0x17c4a8[_0x5d587f(0x1f2)];})[_0x3964be(0x1f8)](_0x5be364=>{const _0x2f69a8=_0x3964be;let {gridEditor:_0x29565a='string',name:_0x494bb7,term:_0x3b9914,gridWidth:_0x168d41=0x0,gridAlign:_0x3e281c=_0x2f69a8(0x1f9),nullable:_0x1af0b2=!0x1}=_0x5be364;if(null==_0x29565a&&(_0x29565a='string'),null==_0x3e281c&&(_0x3e281c=_0x2f69a8(0x1f9)),'updater_id'==_0x494bb7||_0x2f69a8(0x1e7)==_0x494bb7)return _0x494bb7=_0x2f69a8(0x18c)==_0x494bb7?_0x2f69a8(0x1c5):_0x2f69a8(0x1cf),_0x2f69a8(0x1ce)+_0x494bb7+'\x22,\x22header\x22:\x20\x22'+_0x494bb7+_0x2f69a8(0x1bd);if(_0x2f69a8(0x18e)==_0x494bb7||'created_at'==_0x494bb7)return _0x2f69a8(0x199)+(_0x2f69a8(0x18e)==_0x494bb7?_0x2f69a8(0x1b5):_0x2f69a8(0x1d0))+_0x2f69a8(0x1b6)+_0x494bb7+_0x2f69a8(0x1e9);let _0x102bee=_0x2f69a8(0x1bb)!=_0x29565a&&_0x2f69a8(0x1e4)!=_0x29565a,_0x51a560=_0x2f69a8(0x1e4)==_0x29565a;0x1!=_0x51a560&&0x0!=_0x102bee||(_0x29565a=_0x2f69a8(0x1a7));let _0xbeea8d=_0x2f69a8(0x1ed)+_0x29565a+_0x2f69a8(0x1d2)+camelCase(_0x494bb7)+_0x2f69a8(0x1b6)+_0x3b9914+_0x2f69a8(0x1cb)+_0x51a560+'\x20,\x22editable\x22:\x20'+_0x102bee+_0x2f69a8(0x1cd)+!_0x1af0b2+_0x2f69a8(0x1be)+_0x3e281c+_0x2f69a8(0x196)+_0x168d41+'\x20,\x22exportable\x22:\x20true';return'code'==_0x5be364['refType']&&(_0xbeea8d+=',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22'+_0x5be364[_0x2f69a8(0x1e5)]+'\x22}'),_0x2f69a8(0x1e3)==_0x5be364['refType']&&(_0xbeea8d+=_0x2f69a8(0x1e6)+_0x5be364['refName']+'\x22}'),'entity'==_0x5be364['refType']&&(_0xbeea8d+=',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22'+camelCase(plural(_0x5be364[_0x2f69a8(0x1e5)]))+_0x2f69a8(0x1c6)),_0xbeea8d+='}',_0xbeea8d;});}[a0_0x4598ac(0x1c2)](_0xce4295){const _0x14e029=a0_0x4598ac;return _0xce4295[_0x14e029(0x19c)](_0x6497e7=>_0x6497e7[_0x14e029(0x1a0)]>0x0)[_0x14e029(0x1bc)](function(_0x4c15bb,_0x496796){const _0x4a7ce0=_0x14e029;return _0x4c15bb[_0x4a7ce0(0x1a0)]-_0x496796['searchRank'];})[_0x14e029(0x1f8)](_0x5bc876=>{const _0x2615e3=_0x14e029;let _0x1a96ec=_0x5bc876[_0x2615e3(0x198)];return _0x2615e3(0x19c)==_0x1a96ec?'\x22'+camelCase(_0x5bc876[_0x2615e3(0x1dd)])+'\x22':(_0x1a96ec||(_0x1a96ec='eq'),_0x2615e3(0x1ca)+camelCase(_0x5bc876[_0x2615e3(0x1dd)])+_0x2615e3(0x1e1)+_0x1a96ec+'\x22}');});}['createSortCols'](_0xff9e0c){const _0x638be2=a0_0x4598ac;return _0xff9e0c[_0x638be2(0x19c)](_0x1a04dd=>_0x1a04dd[_0x638be2(0x1ae)]>0x0)[_0x638be2(0x1bc)](function(_0x5d547c,_0x20d8b5){const _0x11d5ca=_0x638be2;return _0x5d547c[_0x11d5ca(0x1ae)]-_0x20d8b5['sortRank'];})[_0x638be2(0x1f8)](_0x76918=>'{\x22name\x22:\x22'+camelCase(_0x76918[_0x638be2(0x1dd)])+_0x638be2(0x1f3)+_0x76918['reverseSort']+'}');}async['createMenuData'](_0x291596,_0x52320d,_0x421182,_0x39095f,_0x2259c5,_0xe6a41d){const _0x18e6a6=a0_0x4598ac;let _0x3d7c9c=await _0x291596['getRepository'](menu_base_1['Menu'])['findOne']({'where':{'domain':{'id':_0x52320d['id']},'id':_0x39095f}}),_0xd45e6c=(await _0x291596[_0x18e6a6(0x1a1)](menu_base_1[_0x18e6a6(0x1ba)])[_0x18e6a6(0x1ea)](_0x18e6a6(0x19e)+_0x39095f+_0x18e6a6(0x1aa)+_0x39095f+'\x27'))[0x0][_0x18e6a6(0x18a)]+0xa,_0x84c9bb=new menu_base_1[(_0x18e6a6(0x1ba))]();_0x84c9bb[_0x18e6a6(0x1dd)]=_0x2259c5,_0x84c9bb[_0x18e6a6(0x195)]=_0x18e6a6(0x1c7),_0x84c9bb[_0x18e6a6(0x1ac)]=_0x18e6a6(0x190),_0x84c9bb['rank']=_0xd45e6c,_0x84c9bb['hiddenFlag']=!0x1,_0x84c9bb[_0x18e6a6(0x1b1)]=_0x2259c5,_0x84c9bb[_0x18e6a6(0x18d)]=_0xe6a41d,_0x84c9bb[_0x18e6a6(0x1a5)]=_0x18e6a6(0x1d4),_0x84c9bb['parent']=_0x3d7c9c,await _0x291596[_0x18e6a6(0x1a1)](menu_base_1[_0x18e6a6(0x1ba)])[_0x18e6a6(0x1dc)](Object[_0x18e6a6(0x1b9)](Object[_0x18e6a6(0x1b9)]({},_0x84c9bb),{'domain':_0x52320d,'creator':_0x421182,'updater':_0x421182}));}['enc'](_0x2231d6){const _0x582707=a0_0x4598ac;let _0x4e9c43=JSON[_0x582707(0x19d)](_0x2231d6)[_0x582707(0x1df)](/(.{100})/)[_0x582707(0x19c)](_0x274576=>_0x274576),_0x13e9e6=[_0x582707(0x1af),'aes-256-cbc',_0x582707(0x1a6),_0x582707(0x1c9),_0x582707(0x1e0),_0x582707(0x1b0),_0x582707(0x1c1),'aes256'],_0x189da4=crypto_1[_0x582707(0x1ec)]['randomBytes'](0x20)['toString'](_0x582707(0x19a)),_0x301c9e=Buffer[_0x582707(0x1b7)](_0x189da4,_0x582707(0x19a)),_0x214d62=_0x189da4['substring'](0x0,0x10),_0x1a8768=['',_0x214d62,_0x214d62,_0x214d62,_0x214d62,_0x214d62,_0x214d62,_0x214d62],_0x21f899=0x0,_0x571b41=[];_0x571b41[_0x582707(0x193)](_0x189da4);for(var _0x29cfdd=0x0;_0x29cfdd<_0x4e9c43[_0x582707(0x1fa)];_0x29cfdd++,_0x21f899++){_0x21f899==_0x13e9e6[_0x582707(0x1fa)]&&(_0x21f899=0x0);let _0x2299c4=crypto_1[_0x582707(0x1ec)][_0x582707(0x1a2)](_0x13e9e6[_0x21f899],_0x301c9e,_0x1a8768[_0x21f899]),_0x543271=_0x2299c4['update'](_0x4e9c43[_0x29cfdd],_0x582707(0x191),_0x582707(0x19a));_0x543271+=_0x2299c4['final']('hex'),_0x571b41[_0x582707(0x193)](_0x543271);}return _0x571b41[_0x582707(0x1b2)](_0x582707(0x194));}};tslib_1[a0_0x4598ac(0x188)]([(0x0,type_graphql_1[a0_0x4598ac(0x1c4)])(a0_0x4598ac(0x189)),(0x0,type_graphql_1[a0_0x4598ac(0x1f1)])(_0x50e058=>Boolean,{'description':'Operato\x20Tool\x20Create\x20Menu'}),tslib_1['__param'](0x0,(0x0,type_graphql_1['Arg'])('id')),tslib_1[a0_0x4598ac(0x1eb)](0x1,(0x0,type_graphql_1['Arg'])(a0_0x4598ac(0x19f))),tslib_1[a0_0x4598ac(0x1eb)](0x2,(0x0,type_graphql_1['Ctx'])()),tslib_1['__metadata'](a0_0x4598ac(0x197),Function),tslib_1['__metadata'](a0_0x4598ac(0x1d3),[String,String,Object]),tslib_1[a0_0x4598ac(0x19b)](a0_0x4598ac(0x1a9),Promise)],OperatoToolCreateMenu['prototype'],a0_0x4598ac(0x1d8),null),OperatoToolCreateMenu=tslib_1[a0_0x4598ac(0x188)]([(0x0,type_graphql_1[a0_0x4598ac(0x1f5)])()],OperatoToolCreateMenu),exports['OperatoToolCreateMenu']=OperatoToolCreateMenu;const modelTemplate=a0_0x4598ac(0x1b4);
|
|
1
|
+
'use strict';const a0_0x1a76fe=a0_0x15c3;(function(_0x1e8167,_0x54941a){const _0x34ae34=a0_0x15c3,_0x1a9b16=_0x1e8167();while(!![]){try{const _0x5f2644=parseInt(_0x34ae34(0x131))/0x1+parseInt(_0x34ae34(0x151))/0x2+-parseInt(_0x34ae34(0x140))/0x3*(parseInt(_0x34ae34(0x166))/0x4)+-parseInt(_0x34ae34(0x174))/0x5*(parseInt(_0x34ae34(0x178))/0x6)+parseInt(_0x34ae34(0x161))/0x7+-parseInt(_0x34ae34(0x169))/0x8*(-parseInt(_0x34ae34(0x13b))/0x9)+parseInt(_0x34ae34(0x16e))/0xa;if(_0x5f2644===_0x54941a)break;else _0x1a9b16['push'](_0x1a9b16['shift']());}catch(_0xb5b229){_0x1a9b16['push'](_0x1a9b16['shift']());}}}(a0_0x59d3,0x69f48));Object[a0_0x1a76fe(0x168)](exports,a0_0x1a76fe(0x182),{'value':!0x0}),exports[a0_0x1a76fe(0x16f)]=void 0x0;const tslib_1=require(a0_0x1a76fe(0x15e)),type_graphql_1=require(a0_0x1a76fe(0x152)),resource_base_1=require(a0_0x1a76fe(0x128)),menu_base_1=require('@things-factory/menu-base'),tool_permission_1=require(a0_0x1a76fe(0x121)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require('lodash'),{plural:plural}=require('pluralize'),crypto_1=tslib_1['__importDefault'](require(a0_0x1a76fe(0x135)));let OperatoToolCreateMenu=class{async[a0_0x1a76fe(0x194)](_0x52b5d2,_0x2b08f9,_0x2331c5){const _0x4d530b=a0_0x1a76fe,{domain:_0x193c1c,user:_0x9dce19,tx:_0x4a1050}=_0x2331c5[_0x4d530b(0x158)];await(0x0,tool_permission_1[_0x4d530b(0x12f)])('',_0x2331c5);const _0x391b67=await _0x4a1050[_0x4d530b(0x129)](resource_base_1[_0x4d530b(0x13d)])[_0x4d530b(0x139)]({'where':{'domain':{'id':_0x193c1c['id']},'id':_0x52b5d2}}),_0x374219=await _0x4a1050['getRepository'](resource_base_1[_0x4d530b(0x144)])['find']({'where':{'domain':{'id':_0x193c1c['id']},'entity':{'id':_0x391b67['id']}}});let {name:_0x253535=''}=_0x391b67||{},_0x2ed915=kebabCase(_0x253535),_0xad552e=modelTemplate[_0x4d530b(0x14a)](/{{pascalCase name}}/g,startCase(camelCase(_0x253535))['replace'](/ /g,''))['replace'](/{{camelCase name}}/g,camelCase(_0x253535))[_0x4d530b(0x14a)](/{{snakeCase name}}/g,snakeCase(_0x253535))[_0x4d530b(0x14a)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x253535)))[_0x4d530b(0x14a)](/ /g,''))[_0x4d530b(0x14a)](/{{pluralCamelCase name}}/g,camelCase(plural(_0x253535)))[_0x4d530b(0x14a)](/{{name}}/g,_0x253535),_0x3944ed='';_0x4d530b(0x16c)==_0x391b67[_0x4d530b(0x170)]?_0x3944ed=_0x4d530b(0x183):_0x4d530b(0x127)==_0x391b67[_0x4d530b(0x170)]&&(_0x3944ed='\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22basic\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22label\x22:\x20\x22data_history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22icon\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22logic\x22:\x20\x22history_copy\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20'),_0xad552e=_0xad552e[_0x4d530b(0x14a)](/{{HistoryButton}}/g,_0x3944ed);let _0x548c63=this[_0x4d530b(0x157)](_0x374219);_0xad552e=_0xad552e[_0x4d530b(0x14a)](/{{SortColumns}}/g,_0x548c63['join'](','));let _0x4c1d4f=this[_0x4d530b(0x12a)](_0x374219);_0xad552e=_0xad552e['replace'](/{{SearchColumns}}/g,_0x4c1d4f[_0x4d530b(0x14e)](','));let _0x29545c=this[_0x4d530b(0x134)](_0x374219);return _0xad552e=_0xad552e[_0x4d530b(0x14a)](/{{GridColumns}}/g,_0x29545c[_0x4d530b(0x14e)](',')),_0xad552e=this['enc'](_0xad552e),await this[_0x4d530b(0x17b)](_0x4a1050,_0x193c1c,_0x9dce19,_0x2b08f9,_0x2ed915,_0xad552e),!0x0;}['createGridColumns'](_0x52a320){const _0x545f76=a0_0x1a76fe;return _0x52a320[_0x545f76(0x156)](_0x4cb96c=>'id'!=_0x4cb96c[_0x545f76(0x16b)]&&_0x4cb96c[_0x545f76(0x12c)]>0x0)[_0x545f76(0x179)](function(_0x5ac98c,_0x10b1ee){const _0x2c47af=_0x545f76;return _0x5ac98c[_0x2c47af(0x12c)]-_0x10b1ee[_0x2c47af(0x12c)];})['map'](_0xc55423=>{const _0x45febd=_0x545f76;let {gridEditor:_0x5c1ffd=_0x45febd(0x17a),name:_0x1a8180,term:_0x4c4829,gridWidth:_0xe377a3=0x0,gridAlign:_0x43b839=_0x45febd(0x15a),nullable:_0x448f3b=!0x1}=_0xc55423;if(null==_0x5c1ffd&&(_0x5c1ffd=_0x45febd(0x17a)),null==_0x43b839&&(_0x43b839=_0x45febd(0x15a)),_0x45febd(0x132)==_0x1a8180||'creator_id'==_0x1a8180)return _0x1a8180='updater_id'==_0x1a8180?_0x45febd(0x16d):_0x45febd(0x142),'{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22'+_0x1a8180+'\x22,\x22header\x22:\x20\x22'+_0x1a8180+_0x45febd(0x126);if(_0x45febd(0x162)==_0x1a8180||_0x45febd(0x195)==_0x1a8180)return _0x45febd(0x184)+('updated_at'==_0x1a8180?'updatedAt':_0x45febd(0x17e))+'\x22,\x22header\x22:\x20\x22'+_0x1a8180+_0x45febd(0x172);let _0x15642d='readonly'!=_0x5c1ffd&&_0x45febd(0x14c)!=_0x5c1ffd,_0x5232fd=_0x45febd(0x14c)==_0x5c1ffd;0x1!=_0x5232fd&&0x0!=_0x15642d||(_0x5c1ffd=_0x45febd(0x17a));let _0x3e9016=_0x45febd(0x146)+_0x5c1ffd+_0x45febd(0x13f)+camelCase(_0x1a8180)+_0x45febd(0x196)+_0x4c4829+_0x45febd(0x12e)+_0x5232fd+_0x45febd(0x15c)+_0x15642d+',\x22mandatory\x22:\x20'+!_0x448f3b+',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22'+_0x43b839+_0x45febd(0x164)+_0xe377a3+_0x45febd(0x153);return _0x45febd(0x141)==_0xc55423['refType']&&(_0x3e9016+=_0x45febd(0x159)+_0xc55423[_0x45febd(0x191)]+'\x22}'),_0x45febd(0x18e)==_0xc55423[_0x45febd(0x145)]&&(_0x3e9016+=',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22'+_0xc55423[_0x45febd(0x191)]+'\x22}'),_0x45febd(0x122)==_0xc55423[_0x45febd(0x145)]&&(_0x3e9016+=_0x45febd(0x18f)+camelCase(plural(_0xc55423[_0x45febd(0x191)]))+_0x45febd(0x173)),_0x3e9016+='}',_0x3e9016;});}['createSearchCols'](_0x2eba01){const _0x4b2945=a0_0x1a76fe;return _0x2eba01['filter'](_0x5b852c=>_0x5b852c[_0x4b2945(0x13e)]>0x0)[_0x4b2945(0x179)](function(_0x107abc,_0x3a22eb){const _0x1cc184=_0x4b2945;return _0x107abc[_0x1cc184(0x13e)]-_0x3a22eb[_0x1cc184(0x13e)];})['map'](_0x4d05ad=>{const _0x1bbb52=_0x4b2945;let _0x20faa6=_0x4d05ad[_0x1bbb52(0x190)];return'filter'==_0x20faa6?'\x22'+camelCase(_0x4d05ad[_0x1bbb52(0x16b)])+'\x22':(_0x20faa6||(_0x20faa6='eq'),_0x1bbb52(0x180)+camelCase(_0x4d05ad[_0x1bbb52(0x16b)])+_0x1bbb52(0x14d)+_0x20faa6+'\x22}');});}[a0_0x1a76fe(0x157)](_0x5c0434){const _0xed98be=a0_0x1a76fe;return _0x5c0434['filter'](_0x5626cc=>_0x5626cc['sortRank']>0x0)[_0xed98be(0x179)](function(_0x30c5e5,_0x1ec2dc){const _0x26bfa8=_0xed98be;return _0x30c5e5['sortRank']-_0x1ec2dc[_0x26bfa8(0x185)];})[_0xed98be(0x193)](_0x1833bd=>_0xed98be(0x154)+camelCase(_0x1833bd[_0xed98be(0x16b)])+_0xed98be(0x125)+_0x1833bd[_0xed98be(0x137)]+'}');}async[a0_0x1a76fe(0x17b)](_0x34dd66,_0x58076e,_0x5584ed,_0x4a827b,_0x37e30e,_0x544335){const _0x23fc0d=a0_0x1a76fe;let _0x56e9ad=await _0x34dd66[_0x23fc0d(0x129)](menu_base_1[_0x23fc0d(0x192)])[_0x23fc0d(0x139)]({'where':{'domain':{'id':_0x58076e['id']},'id':_0x4a827b}}),_0x25fcfb=(await _0x34dd66[_0x23fc0d(0x129)](menu_base_1[_0x23fc0d(0x192)])[_0x23fc0d(0x12b)](_0x23fc0d(0x186)+_0x4a827b+'\x27\x20or\x20id\x20=\x20\x27'+_0x4a827b+'\x27'))[0x0]['rank']+0xa,_0x18cda9=new menu_base_1[(_0x23fc0d(0x192))]();_0x18cda9[_0x23fc0d(0x16b)]=_0x37e30e,_0x18cda9[_0x23fc0d(0x188)]=_0x23fc0d(0x15f),_0x18cda9[_0x23fc0d(0x163)]='meta-grist-page',_0x18cda9[_0x23fc0d(0x16a)]=_0x25fcfb,_0x18cda9[_0x23fc0d(0x143)]=!0x1,_0x18cda9[_0x23fc0d(0x18b)]=_0x37e30e,_0x18cda9[_0x23fc0d(0x14b)]=_0x544335,_0x18cda9['resourceUrl']='@things-factory/meta-ui/client/pages/meta-grist-page',_0x18cda9[_0x23fc0d(0x13c)]=_0x56e9ad,await _0x34dd66[_0x23fc0d(0x129)](menu_base_1[_0x23fc0d(0x192)])['save'](Object[_0x23fc0d(0x148)](Object[_0x23fc0d(0x148)]({},_0x18cda9),{'domain':_0x58076e,'creator':_0x5584ed,'updater':_0x5584ed}));}[a0_0x1a76fe(0x130)](_0x424199){const _0x3cce2e=a0_0x1a76fe;let _0x2f23b5=JSON[_0x3cce2e(0x177)](_0x424199)['split'](/(.{100})/)[_0x3cce2e(0x156)](_0x19b79a=>_0x19b79a),_0x4b249b=[_0x3cce2e(0x136),'aes-256-cbc',_0x3cce2e(0x13a),_0x3cce2e(0x18d),_0x3cce2e(0x165),_0x3cce2e(0x18a),'aes-256-ctr',_0x3cce2e(0x17c)],_0x355597=crypto_1['default'][_0x3cce2e(0x17f)](0x20)[_0x3cce2e(0x12d)]('hex'),_0x6549c3=Buffer[_0x3cce2e(0x189)](_0x355597,_0x3cce2e(0x187)),_0x169630=_0x355597[_0x3cce2e(0x175)](0x0,0x10),_0x4f387c=['',_0x169630,_0x169630,_0x169630,_0x169630,_0x169630,_0x169630,_0x169630],_0x3d02aa=0x0,_0x3b58e3=[];_0x3b58e3[_0x3cce2e(0x133)](_0x355597);for(var _0x3a753b=0x0;_0x3a753b<_0x2f23b5[_0x3cce2e(0x147)];_0x3a753b++,_0x3d02aa++){_0x3d02aa==_0x4b249b[_0x3cce2e(0x147)]&&(_0x3d02aa=0x0);let _0x3de9e1=crypto_1['default'][_0x3cce2e(0x14f)](_0x4b249b[_0x3d02aa],_0x6549c3,_0x4f387c[_0x3d02aa]),_0x4eb114=_0x3de9e1[_0x3cce2e(0x160)](_0x2f23b5[_0x3a753b],_0x3cce2e(0x15b),_0x3cce2e(0x187));_0x4eb114+=_0x3de9e1[_0x3cce2e(0x15d)](_0x3cce2e(0x187)),_0x3b58e3[_0x3cce2e(0x133)](_0x4eb114);}return _0x3b58e3[_0x3cce2e(0x14e)](_0x3cce2e(0x17d));}};function a0_0x15c3(_0x54d41b,_0x325ae0){const _0x59d308=a0_0x59d3();return a0_0x15c3=function(_0x15c385,_0x3b2297){_0x15c385=_0x15c385-0x121;let _0x3b1ee4=_0x59d308[_0x15c385];return _0x3b1ee4;},a0_0x15c3(_0x54d41b,_0x325ae0);}tslib_1[a0_0x1a76fe(0x150)]([(0x0,type_graphql_1['Directive'])(a0_0x1a76fe(0x123)),(0x0,type_graphql_1[a0_0x1a76fe(0x18c)])(_0x4406c4=>Boolean,{'description':'Operato\x20Tool\x20Create\x20Menu'}),tslib_1[a0_0x1a76fe(0x124)](0x0,(0x0,type_graphql_1[a0_0x1a76fe(0x167)])('id')),tslib_1['__param'](0x1,(0x0,type_graphql_1[a0_0x1a76fe(0x167)])(a0_0x1a76fe(0x155))),tslib_1[a0_0x1a76fe(0x124)](0x2,(0x0,type_graphql_1['Ctx'])()),tslib_1['__metadata']('design:type',Function),tslib_1[a0_0x1a76fe(0x138)](a0_0x1a76fe(0x149),[String,String,Object]),tslib_1[a0_0x1a76fe(0x138)](a0_0x1a76fe(0x181),Promise)],OperatoToolCreateMenu['prototype'],a0_0x1a76fe(0x194),null),OperatoToolCreateMenu=tslib_1[a0_0x1a76fe(0x150)]([(0x0,type_graphql_1[a0_0x1a76fe(0x176)])()],OperatoToolCreateMenu),exports[a0_0x1a76fe(0x16f)]=OperatoToolCreateMenu;function a0_0x59d3(){const _0x3e5118=['scenario',',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22','searchOper','refName','Menu','map','toolCreateMenu','created_at','\x22,\x22header\x22:\x20\x22','./../tool-secret/tool-permission','entity','@transaction','__param','\x22,\x22desc\x22:','\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}','COPY','@things-factory/resource-base','getRepository','createSearchCols','query','gridRank','toString','\x22,\x22hidden\x22:','checkStudioTemplateIsOverLimit','enc','751243ffnnNQ','updater_id','push','createGridColumns','crypto','aes-256-ecb','reverseSort','__metadata','findOne','aes-256-cfb','9zneili','parent','Entity','searchRank','\x22,\x22name\x22:\x20\x22','3lwxCTE','code','creator','hiddenFlag','EntityColumn','refType','{\x22type\x22:\x20\x22','length','assign','design:paramtypes','replace','template','hidden','\x22,\x22operator\x22:\x20\x22','join','createCipheriv','__decorate','1406668nWodAI','type-graphql','\x20,\x22exportable\x22:\x20true','{\x22name\x22:\x22','parent_menu_id','filter','createSortCols','state',',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22','left','utf8','\x20,\x22editable\x22:\x20','final','tslib','SCREEN','update','881594VOiAnF','updated_at','category','\x22,\x22width\x22:','aes-256-cfb1','3303268FOebVn','Arg','defineProperty','678192EgYCuW','rank','name','JSON','updater','3442840JtNQPW','OperatoToolCreateMenu','dataProp','\x0a{\x0a\x20\x20\x22menu\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x22title\x22:\x20\x22{{name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22\x22,\x0a\x20\x20\x20\x20\x20\x20\x22desc\x22:\x20\x22\x22\x0a\x20\x20},\x0a\x20\x20\x22gql\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x22query\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22list_func\x22:\x20\x22{{pluralCamelCase\x20name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22find_one_func\x22:\x22{{camelCase\x20name}}\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x22mutation\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22multiple\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22func\x22:\x22updateMultiple{{pascalCase\x20name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22{{pascalCase\x20name}}Patch\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22delete\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22func\x22:\x22delete{{pluralPascalCase\x20name}}\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20},\x0a\x20\x20\x22button\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22export\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22add\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22delete\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22save\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20],\x0a\x20\x20\x22grid_column\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22string\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22id\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22header\x22:\x20\x22id\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22hidden\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22editable\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22mandatory\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22sortable\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22align\x22:\x20\x22left\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22width\x22:\x200,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22exportable\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20},\x0a{{GridColumns}}\x0a\x20\x20],\x0a\x20\x20\x22grid\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22button\x22:[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{{HistoryButton}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22option\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22mobile_mode\x22:\x20\x22LIST\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22desk_mode\x22:\x20\x22GRID\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22use_row_checker\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22pages\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2020,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2050,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20100,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20300\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22view_mode\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22GRID\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22LIST\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22CARD\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22sorters\x22:\x20[\x0a{{SortColumns}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20]\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x22row\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22multiple_select\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22click\x22:\x20\x22select-row-toggle\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20},\x0a\x20\x20\x22search\x22:\x20[\x0a{{SearchColumns}}\x0a\x20\x20]\x0a}\x0a','\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}','\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}','1480TpQZRO','substring','Resolver','stringify','15198tTlblA','sort','string','createMenuData','aes256','h1z0q9i9x7q6','createdAt','randomBytes','{\x22name\x22:\x20\x22','design:returntype','__esModule','\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22basic\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22label\x22:\x20\x22data_history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22icon\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22logic\x22:\x20\x22history_json\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20','{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22','sortRank','select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27','hex','menuType','from','aes-256-ofb','routing','Mutation','aes-256-cfb8'];a0_0x59d3=function(){return _0x3e5118;};return a0_0x59d3();}const modelTemplate=a0_0x1a76fe(0x171);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x5ccbf1=a0_0x20af;function a0_0x20af(_0x2e66ed,_0x254e35){const _0x20669d=a0_0x2066();return a0_0x20af=function(_0x20af04,_0x567e36){_0x20af04=_0x20af04-0x137;let _0x37395a=_0x20669d[_0x20af04];return _0x37395a;},a0_0x20af(_0x2e66ed,_0x254e35);}(function(_0x1630ff,_0x5b1840){const _0x508aab=a0_0x20af,_0x19bd62=_0x1630ff();while(!![]){try{const _0x425aa2=parseInt(_0x508aab(0x1b0))/0x1*(-parseInt(_0x508aab(0x163))/0x2)+parseInt(_0x508aab(0x1a4))/0x3+parseInt(_0x508aab(0x13e))/0x4*(parseInt(_0x508aab(0x150))/0x5)+parseInt(_0x508aab(0x168))/0x6*(-parseInt(_0x508aab(0x1a2))/0x7)+parseInt(_0x508aab(0x1bc))/0x8*(-parseInt(_0x508aab(0x16c))/0x9)+parseInt(_0x508aab(0x14f))/0xa+parseInt(_0x508aab(0x15a))/0xb;if(_0x425aa2===_0x5b1840)break;else _0x19bd62['push'](_0x19bd62['shift']());}catch(_0x914469){_0x19bd62['push'](_0x19bd62['shift']());}}}(a0_0x2066,0xbc97f));Object['defineProperty'](exports,a0_0x5ccbf1(0x1af),{'value':!0x0}),exports[a0_0x5ccbf1(0x18c)]=void 0x0;const tslib_1=require('tslib'),type_graphql_1=require(a0_0x5ccbf1(0x193)),shell_1=require(a0_0x5ccbf1(0x142)),resource_base_1=require('@things-factory/resource-base'),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x5ccbf1(0x149)),{plural:plural}=require(a0_0x5ccbf1(0x140)),fs=require('fs');let OperatoToolCreateService=class{async[a0_0x5ccbf1(0x138)](_0x1f392e,_0xf6b306){const _0x1a4716=a0_0x5ccbf1,{domain:_0x1adba8}=_0xf6b306[_0x1a4716(0x186)],_0x8dce8d=await(0x0,shell_1['getRepository'])(resource_base_1[_0x1a4716(0x17d)])[_0x1a4716(0x1a8)]({'where':{'id':_0x1f392e}}),_0x273fcf=await(0x0,shell_1['getRepository'])(resource_base_1['EntityColumn'])[_0x1a4716(0x13c)]({'where':{'domain':{'id':_0x1adba8['id']},'entity':{'id':_0x8dce8d['id']}}});let {name:_0x50ed80='',bundle:_0x24353e=''}=_0x8dce8d||{},_0x23dd13=this[_0x1a4716(0x16d)](),_0x2c3231=kebabCase(_0x50ed80);return await this[_0x1a4716(0x194)](_0x23dd13,_0x24353e,_0x2c3231),await this['createServiceFiles'](_0x23dd13,_0x24353e,_0x50ed80,_0x2c3231,_0x8dce8d,_0x273fcf),!0x0;}async[a0_0x5ccbf1(0x146)](_0x2b2b31,_0x38dfc0,_0x302df8,_0x2f4554,_0x44107b,_0x5b8a44){const _0x4c902a=a0_0x5ccbf1;let _0x3dc171={'name':_0x2f4554,'tableName':_0x44107b[_0x4c902a(0x180)],'pascalCaseName':startCase(camelCase(_0x302df8))[_0x4c902a(0x182)](/ /g,''),'camelCaseName':camelCase(_0x302df8),'snakeCaseName':snakeCase(_0x302df8),'pluralPascalCaseName':startCase(camelCase(plural(_0x302df8)))['replace'](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x302df8))},_0x3a53a4=_0x2b2b31+_0x4c902a(0x1ad)+_0x38dfc0+_0x4c902a(0x15d);[_0x4c902a(0x190),'COPY']['includes'](_0x44107b['dataProp'])?await this[_0x4c902a(0x1ac)](_0x3a53a4,_0x2f4554,_0x44107b,_0x5b8a44,_0x3dc171):await this[_0x4c902a(0x181)](_0x3a53a4,_0x2f4554,_0x44107b,_0x5b8a44,_0x3dc171);}async[a0_0x5ccbf1(0x1ac)](_0x4ace52,_0x1eb5ff,_0x249211,_0x4ead64,_0x402071){const _0xb14980=a0_0x5ccbf1;await this[_0xb14980(0x154)](_0x4ace52+(_0x1eb5ff+_0xb14980(0x144)),serviceHistoryIndex,_0x402071);let _0x1a5714=this[_0xb14980(0x17e)](_0x249211,_0x4ead64);await this['writeFile'](_0x4ace52+(_0x1eb5ff+'/'+_0x1eb5ff+_0xb14980(0x18b)),_0x1a5714,_0x402071),await this[_0xb14980(0x154)](_0x4ace52+(_0x1eb5ff+'/'+_0x1eb5ff+'-query.ts'),serviceQuery,_0x402071),await this[_0xb14980(0x154)](_0x4ace52+(_0x1eb5ff+'/'+_0x1eb5ff+'-mutation.ts'),serviceMutation,_0x402071);let _0x576ddf=this[_0xb14980(0x171)](_0x4ead64);await this[_0xb14980(0x154)](_0x4ace52+(_0x1eb5ff+'/'+_0x1eb5ff+_0xb14980(0x1b8)),_0x576ddf,_0x402071);let _0x32936a=this[_0xb14980(0x1c1)](_0x249211,_0x4ead64);await this[_0xb14980(0x154)](_0x4ace52+(_0x1eb5ff+'/'+_0x1eb5ff+_0xb14980(0x183)),_0x32936a,_0x402071);let _0x1958bd='';_0xb14980(0x190)==_0x249211[_0xb14980(0x19c)]?(_0x1958bd=_0xb14980(0x14c),await this[_0xb14980(0x154)](_0x4ace52+(_0x1eb5ff+_0xb14980(0x19a)),serviceEntitySubscriber,_0x402071)):_0x1958bd='';let _0x3f2231=serviceEntitySubscriber['replace'](/{{entityToJson}}/g,_0x1958bd);await this[_0xb14980(0x154)](_0x4ace52+(_0x1eb5ff+_0xb14980(0x19a)),_0x3f2231,_0x402071),await this[_0xb14980(0x154)](_0x4ace52+(_0x1eb5ff+'/'+_0x1eb5ff+_0xb14980(0x16b)),serviceHistoryQuery,_0x402071),await this[_0xb14980(0x154)](_0x4ace52+(_0x1eb5ff+'/'+_0x1eb5ff+'-history-type.ts'),sereviceHistoryType,_0x402071);let _0x3b54a6=_0x4ace52+_0xb14980(0x1ae);0x0==await this[_0xb14980(0x1b4)](_0x3b54a6)&&await this[_0xb14980(0x154)](_0x3b54a6,allIndex,_0x402071);let _0x3f017f=await fs['readFileSync'](_0x3b54a6,_0xb14980(0x158));_0x3f017f['indexOf'](_0xb14980(0x1b3)+_0x402071[_0xb14980(0x15b)]+'/'+_0x402071[_0xb14980(0x15b)]+'-history\x27')<0x0&&(_0x3f017f=_0x3f017f['replace'](/\/\* EXPORT ENTITY TYPES \*\//,_0xb14980(0x15c)+_0x402071[_0xb14980(0x15b)]+'/'+_0x402071[_0xb14980(0x15b)]+_0xb14980(0x13b))),_0x3f017f[_0xb14980(0x162)]('export\x20*\x20from\x20\x27./'+_0x402071[_0xb14980(0x15b)]+'/'+_0x402071[_0xb14980(0x15b)]+'\x27')<0x0&&(_0x3f017f=_0x3f017f[_0xb14980(0x182)](/\/\* EXPORT ENTITY TYPES \*\//,_0xb14980(0x15c)+_0x402071['name']+'/'+_0x402071[_0xb14980(0x15b)]+'\x27')),_0x3f017f[_0xb14980(0x162)](_0xb14980(0x176)+_0x402071[_0xb14980(0x1ab)]+'Entities,\x20resolvers\x20as\x20'+_0x402071['pascalCaseName']+_0xb14980(0x18e)+_0x402071[_0xb14980(0x1ab)]+'EntitySubscribers\x20}\x20from\x20\x27./'+_0x402071[_0xb14980(0x15b)]+'\x27')<0x0&&(_0x3f017f=_0x3f017f[_0xb14980(0x182)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,'/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20'+_0x402071['pascalCaseName']+'Entities,\x20resolvers\x20as\x20'+_0x402071['pascalCaseName']+_0xb14980(0x18e)+_0x402071[_0xb14980(0x1ab)]+_0xb14980(0x175)+_0x402071[_0xb14980(0x15b)]+'\x27')),_0x3f017f[_0xb14980(0x162)](_0xb14980(0x148)+_0x402071[_0xb14980(0x1ab)]+_0xb14980(0x184))<0x0&&(_0x3f017f=_0x3f017f[_0xb14980(0x182)](/\/\* ENTITIES \*\//,_0xb14980(0x14d)+_0x402071[_0xb14980(0x1ab)]+'Entities,')),_0x3f017f['indexOf'](_0xb14980(0x148)+_0x402071['pascalCaseName']+_0xb14980(0x188))<0x0&&(_0x3f017f=_0x3f017f[_0xb14980(0x182)](/\/\* RESOLVER CLASSES \*\//,'/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...'+_0x402071[_0xb14980(0x1ab)]+_0xb14980(0x188))),_0x3f017f[_0xb14980(0x162)](_0xb14980(0x148)+_0x402071[_0xb14980(0x1ab)]+'EntitySubscribers,')<0x0&&(_0x3f017f=_0x3f017f[_0xb14980(0x182)](/\/\* SUBSCRIBERS \*\//,_0xb14980(0x189)+_0x402071[_0xb14980(0x1ab)]+_0xb14980(0x159))),await this[_0xb14980(0x154)](_0x3b54a6,_0x3f017f,_0x402071);}async[a0_0x5ccbf1(0x181)](_0xfc60b9,_0x2a50c3,_0x1a4d4a,_0x107884,_0x31d9ad){const _0xac34f9=a0_0x5ccbf1;await this[_0xac34f9(0x154)](_0xfc60b9+(_0x2a50c3+'/index.ts'),serviceIndex,_0x31d9ad),await this[_0xac34f9(0x154)](_0xfc60b9+(_0x2a50c3+'/'+_0x2a50c3+'-query.ts'),serviceQuery,_0x31d9ad),await this[_0xac34f9(0x154)](_0xfc60b9+(_0x2a50c3+'/'+_0x2a50c3+_0xac34f9(0x17c)),serviceMutation,_0x31d9ad);let _0x1493a1=this['createEntityText'](_0x1a4d4a,_0x107884);await this[_0xac34f9(0x154)](_0xfc60b9+(_0x2a50c3+'/'+_0x2a50c3+_0xac34f9(0x18b)),_0x1493a1,_0x31d9ad);let _0x4b20da=this[_0xac34f9(0x171)](_0x107884);await this['writeFile'](_0xfc60b9+(_0x2a50c3+'/'+_0x2a50c3+_0xac34f9(0x1b8)),_0x4b20da,_0x31d9ad);let _0x34cab6=_0xfc60b9+_0xac34f9(0x1ae);0x0==await this[_0xac34f9(0x1b4)](_0x34cab6)&&await this[_0xac34f9(0x154)](_0x34cab6,allIndex,_0x31d9ad);let _0x45b76d=await fs['readFileSync'](_0x34cab6,_0xac34f9(0x158));_0x45b76d[_0xac34f9(0x162)](_0xac34f9(0x1b3)+_0x31d9ad['name']+'/'+_0x31d9ad['name']+'\x27')<0x0&&(_0x45b76d=_0x45b76d[_0xac34f9(0x182)](/\/\* EXPORT ENTITY TYPES \*\//,_0xac34f9(0x15c)+_0x31d9ad[_0xac34f9(0x15b)]+'/'+_0x31d9ad['name']+'\x27')),_0x45b76d['indexOf'](_0xac34f9(0x176)+_0x31d9ad[_0xac34f9(0x1ab)]+_0xac34f9(0x16e)+_0x31d9ad['pascalCaseName']+_0xac34f9(0x179)+_0x31d9ad[_0xac34f9(0x15b)]+'\x27')<0x0&&(_0x45b76d=_0x45b76d[_0xac34f9(0x182)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0xac34f9(0x1b7)+_0x31d9ad[_0xac34f9(0x1ab)]+'Entities,\x20resolvers\x20as\x20'+_0x31d9ad[_0xac34f9(0x1ab)]+_0xac34f9(0x179)+_0x31d9ad[_0xac34f9(0x15b)]+'\x27')),_0x45b76d['indexOf'](_0xac34f9(0x148)+_0x31d9ad['pascalCaseName']+_0xac34f9(0x184))<0x0&&(_0x45b76d=_0x45b76d['replace'](/\/\* ENTITIES \*\//,_0xac34f9(0x14d)+_0x31d9ad[_0xac34f9(0x1ab)]+_0xac34f9(0x184))),_0x45b76d[_0xac34f9(0x162)](_0xac34f9(0x148)+_0x31d9ad['pascalCaseName']+'Resolvers,')<0x0&&(_0x45b76d=_0x45b76d['replace'](/\/\* RESOLVER CLASSES \*\//,_0xac34f9(0x1b1)+_0x31d9ad[_0xac34f9(0x1ab)]+_0xac34f9(0x188))),await this[_0xac34f9(0x154)](_0x34cab6,_0x45b76d,_0x31d9ad);}[a0_0x5ccbf1(0x171)](_0x51c20d){const _0x580085=a0_0x5ccbf1;let _0x17f692=sereviceType,_0x508e5c=_0x51c20d[_0x580085(0x1a5)](_0x19e6f1=>{const _0x2f4f76=_0x580085;if('id'==_0x19e6f1[_0x2f4f76(0x15b)])return'';if('domain_id'==_0x19e6f1[_0x2f4f76(0x15b)])return'';if(_0x2f4f76(0x14a)==_0x19e6f1[_0x2f4f76(0x15b)])return'';if(_0x2f4f76(0x1ba)==_0x19e6f1[_0x2f4f76(0x15b)])return'';if(_0x2f4f76(0x156)==_0x19e6f1[_0x2f4f76(0x15b)])return'';if(_0x2f4f76(0x1b5)==_0x19e6f1['name'])return'';let _0x3c5437=this[_0x2f4f76(0x1b9)](_0x19e6f1),_0x46508a=this[_0x2f4f76(0x147)](_0x19e6f1),_0x538b29=camelCase(_0x19e6f1['name']);return'\x20\x20'+(_0x2f4f76(0x185)+(0x0==_0x3c5437[_0x2f4f76(0x1a3)]?'':'type\x20=>'+_0x3c5437+',')+_0x2f4f76(0x1bf)+_0x19e6f1[_0x2f4f76(0x17a)]+_0x2f4f76(0x143))+_0x2f4f76(0x19d)+(''+_0x538b29+(_0x19e6f1[_0x2f4f76(0x17a)]?'?':'')+':\x20'+_0x46508a)+'\x0a';});_0x17f692=_0x17f692[_0x580085(0x182)](/{{newTypeColumns}}/g,_0x508e5c[_0x580085(0x187)]('\x0a'));let _0x1798eb=_0x51c20d['map'](_0x5b7103=>{const _0xae47c1=_0x580085;if('id'==_0x5b7103[_0xae47c1(0x15b)])return'';if('domain_id'==_0x5b7103['name'])return'';if(_0xae47c1(0x14a)==_0x5b7103[_0xae47c1(0x15b)])return'';if('updated_at'==_0x5b7103[_0xae47c1(0x15b)])return'';if('creator_id'==_0x5b7103[_0xae47c1(0x15b)])return'';if('updater_id'==_0x5b7103[_0xae47c1(0x15b)])return'';let _0x47af3f=this['getFieldType'](_0x5b7103),_0x221cab=this[_0xae47c1(0x147)](_0x5b7103);_0x5b7103[_0xae47c1(0x17a)]=!0x0;let _0x309267=camelCase(_0x5b7103[_0xae47c1(0x15b)]);return'\x20\x20'+(_0xae47c1(0x185)+(0x0==_0x47af3f['length']?'':'type\x20=>'+_0x47af3f+',')+_0xae47c1(0x1bf)+_0x5b7103[_0xae47c1(0x17a)]+_0xae47c1(0x143))+_0xae47c1(0x19d)+(''+_0x309267+(_0x5b7103[_0xae47c1(0x17a)]?'?':'')+':\x20'+_0x221cab)+'\x0a';});return _0x17f692=_0x17f692[_0x580085(0x182)](/{{patchTypeColumns}}/g,_0x1798eb[_0x580085(0x187)]('\x0a')),_0x17f692;}[a0_0x5ccbf1(0x17e)](_0x288431,_0x145595){const _0x329cad=a0_0x5ccbf1;let _0x2ce9ed=serviceEntity,_0x498a89=_0x145595[_0x329cad(0x199)](function(_0x110b80,_0x79a170){const _0x59633e=_0x329cad;return _0x110b80[_0x59633e(0x170)]-_0x79a170[_0x59633e(0x170)];})['map'](_0x26e818=>this[_0x329cad(0x1c0)](_0x26e818));[_0x329cad(0x17b),_0x329cad(0x190)]['includes'](_0x288431[_0x329cad(0x19c)])&&_0x498a89[_0x329cad(0x173)]('\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201'),_0x2ce9ed=_0x2ce9ed['replace'](/{{entityColumns}}/g,_0x498a89[_0x329cad(0x187)]('\x0a'));let _0x17e009='',_0x1f5718=_0x145595['filter'](_0x4188ec=>_0x4188ec[_0x329cad(0x1c4)]&&_0x4188ec[_0x329cad(0x1c4)]>0x0)[_0x329cad(0x199)](function(_0xe5961a,_0x3452cd){const _0x4757bb=_0x329cad;return _0xe5961a['uniqRank']-_0x3452cd[_0x4757bb(0x1c4)];});if(_0x1f5718[_0x329cad(0x1a3)]>0x0){_0x17e009=_0x329cad(0x14b);let _0x504fdc=_0x1f5718[_0x329cad(0x1a5)](_0x130170=>{const _0x32a1a1=_0x329cad;let _0x205941=_0x130170[_0x32a1a1(0x15b)];return _0x32a1a1(0x172)==_0x130170[_0x32a1a1(0x15b)]&&(_0x205941='domain'),_0x32a1a1(0x156)==_0x130170[_0x32a1a1(0x15b)]&&(_0x205941='creator'),_0x32a1a1(0x1b5)==_0x130170['name']&&(_0x205941='updater'),_0x32a1a1(0x137)+camelCase(_0x205941);});_0x17e009=_0x17e009[_0x329cad(0x182)](/{{indexColumns}}/g,_0x504fdc[_0x329cad(0x187)](','));}return _0x2ce9ed=_0x2ce9ed[_0x329cad(0x182)](/{{indexAnn}}/g,_0x17e009),_0x2ce9ed;}[a0_0x5ccbf1(0x1c1)](_0x4378b5,_0x229cb1){const _0x339f4a=a0_0x5ccbf1;let _0x2141b0=_0x339f4a(0x190)==_0x4378b5[_0x339f4a(0x19c)]?serviceEntityHistJson:serviceEntityHistCopy,_0x47e19b=_0x229cb1['sort'](function(_0x362567,_0x1586c6){const _0x1a713b=_0x339f4a;return _0x362567[_0x1a713b(0x170)]-_0x1586c6[_0x1a713b(0x170)];})['map'](_0x14521e=>this[_0x339f4a(0x1c0)](_0x14521e));return _0x2141b0=_0x2141b0[_0x339f4a(0x182)](/{{entityColumns}}/g,_0x47e19b[_0x339f4a(0x187)]('\x0a')),_0x2141b0;}[a0_0x5ccbf1(0x1c0)](_0x42b9a8){const _0x3499e1=a0_0x5ccbf1;if('id'==_0x42b9a8[_0x3499e1(0x15b)])return'';if(_0x3499e1(0x172)==_0x42b9a8['name'])return'';if('created_at'==_0x42b9a8[_0x3499e1(0x15b)])return'';if(_0x3499e1(0x1ba)==_0x42b9a8[_0x3499e1(0x15b)])return'';if(_0x3499e1(0x156)==_0x42b9a8['name'])return'';if(_0x3499e1(0x1b5)==_0x42b9a8[_0x3499e1(0x15b)])return'';let _0x31c533=_0x42b9a8['colType'];_0x3499e1(0x139)==_0x42b9a8[_0x3499e1(0x198)]&&(_0x31c533=_0x3499e1(0x1bd)),_0x3499e1(0x18d)==_0x42b9a8[_0x3499e1(0x198)]&&(_0x31c533=_0x3499e1(0x13a)),_0x3499e1(0x16a)==_0x42b9a8[_0x3499e1(0x198)]&&(_0x31c533='character\x20varying'),_0x3499e1(0x160)==_0x42b9a8[_0x3499e1(0x198)]&&(_0x31c533='timestamp\x20without\x20time\x20zone');let _0x52f9cc='';'string'==_0x42b9a8[_0x3499e1(0x198)]&&(_0x52f9cc=_0x42b9a8[_0x3499e1(0x1bb)]);let _0x3dd68e=this[_0x3499e1(0x1b9)](_0x42b9a8),_0x40e8c1=this[_0x3499e1(0x147)](_0x42b9a8),_0x19f57f=camelCase(_0x42b9a8[_0x3499e1(0x15b)]);return'\x20\x20'+(_0x3499e1(0x15f)+_0x42b9a8[_0x3499e1(0x15b)]+_0x3499e1(0x19b)+_0x31c533+_0x3499e1(0x151)+_0x42b9a8[_0x3499e1(0x17a)]+'\x20'+(0x0==_0x52f9cc[_0x3499e1(0x1a3)]?'':_0x3499e1(0x14e)+_0x52f9cc)+_0x3499e1(0x143))+_0x3499e1(0x19d)+(_0x3499e1(0x185)+(0x0==_0x3dd68e['length']?'':_0x3499e1(0x169)+_0x3dd68e+',')+'\x20{\x20nullable:\x20'+_0x42b9a8[_0x3499e1(0x17a)]+_0x3499e1(0x143))+_0x3499e1(0x19d)+(''+_0x19f57f+(_0x42b9a8[_0x3499e1(0x17a)]?'?':'')+':\x20'+_0x40e8c1)+'\x0a';}[a0_0x5ccbf1(0x1b9)](_0x7cc932){const _0x4af68a=a0_0x5ccbf1;let _0x1a55b4='';return _0x4af68a(0x139)==_0x7cc932[_0x4af68a(0x198)]&&(_0x1a55b4='Float'),_0x4af68a(0x165)==_0x7cc932[_0x4af68a(0x198)]&&(_0x1a55b4=_0x4af68a(0x178)),_0x4af68a(0x18d)==_0x7cc932[_0x4af68a(0x198)]&&(_0x1a55b4=_0x4af68a(0x145)),'integer'==_0x7cc932[_0x4af68a(0x198)]&&(_0x1a55b4=_0x4af68a(0x145)),_0x1a55b4;}[a0_0x5ccbf1(0x147)](_0x2d14b8){const _0x42387c=a0_0x5ccbf1;let _0x488768=_0x2d14b8[_0x42387c(0x198)];return _0x42387c(0x166)==_0x2d14b8[_0x42387c(0x198)]&&(_0x488768=_0x42387c(0x1b2)),_0x42387c(0x139)==_0x2d14b8[_0x42387c(0x198)]&&(_0x488768=_0x42387c(0x1b2)),_0x42387c(0x165)==_0x2d14b8[_0x42387c(0x198)]&&(_0x488768=_0x42387c(0x1b2)),_0x42387c(0x13f)==_0x2d14b8['colType']&&(_0x488768='number'),_0x42387c(0x18d)==_0x2d14b8[_0x42387c(0x198)]&&(_0x488768=_0x42387c(0x1b2)),_0x42387c(0x160)==_0x2d14b8[_0x42387c(0x198)]&&(_0x488768=_0x42387c(0x141)),_0x42387c(0x1be)==_0x2d14b8[_0x42387c(0x198)]&&(_0x488768=_0x42387c(0x141)),_0x42387c(0x1a7)==_0x2d14b8[_0x42387c(0x198)]&&(_0x488768=_0x42387c(0x16a)),_0x488768;}async[a0_0x5ccbf1(0x154)](_0x27eb57,_0x2102d9,_0x100bfe){const _0x51e298=a0_0x5ccbf1;await fs['writeFileSync'](_0x27eb57,this[_0x51e298(0x13d)](_0x2102d9,_0x100bfe),_0x51e298(0x158));}[a0_0x5ccbf1(0x13d)](_0x5606f1,_0x3d325d){const _0x2b07b5=a0_0x5ccbf1;return _0x5606f1['replace'](/{{pascalCase name}}/g,_0x3d325d[_0x2b07b5(0x1ab)])[_0x2b07b5(0x182)](/{{camelCase name}}/g,_0x3d325d['camelCaseName'])[_0x2b07b5(0x182)](/{{snakeCase name}}/g,_0x3d325d[_0x2b07b5(0x19f)])[_0x2b07b5(0x182)](/{{pluralPascalCase name}}/g,_0x3d325d[_0x2b07b5(0x18a)])[_0x2b07b5(0x182)](/{{pluralCamelCase name}}/g,_0x3d325d['pluralCamelCaseName'])[_0x2b07b5(0x182)](/{{tableName}}/g,_0x3d325d[_0x2b07b5(0x180)])[_0x2b07b5(0x182)](/{{name}}/g,_0x3d325d[_0x2b07b5(0x15b)]);}async[a0_0x5ccbf1(0x194)](_0xc213a,_0x449ecd,_0x8fcd3a){const _0x2bfcf8=a0_0x5ccbf1;let _0x15d0b7=_0xc213a+_0x2bfcf8(0x1b6);await this[_0x2bfcf8(0x153)](_0x15d0b7),_0x15d0b7=_0x15d0b7+'/'+_0x449ecd,await this[_0x2bfcf8(0x153)](_0x15d0b7),_0x15d0b7+=_0x2bfcf8(0x1c3),await this[_0x2bfcf8(0x153)](_0x15d0b7),_0x15d0b7+=_0x2bfcf8(0x167),await this[_0x2bfcf8(0x153)](_0x15d0b7),_0x15d0b7=_0x15d0b7+'/'+_0x8fcd3a,await this[_0x2bfcf8(0x153)](_0x15d0b7);}[a0_0x5ccbf1(0x16d)](){const _0x37f6dd=a0_0x5ccbf1;let _0x1750af=process['env'][_0x37f6dd(0x19e)][_0x37f6dd(0x164)]('/'),_0x25807c=[];for(let _0x26f3ef=0x0;_0x26f3ef<_0x1750af[_0x37f6dd(0x1a3)]&&_0x37f6dd(0x155)!=_0x1750af[_0x26f3ef];_0x26f3ef++)_0x25807c[_0x37f6dd(0x173)](_0x1750af[_0x26f3ef]);return _0x25807c[_0x37f6dd(0x187)]('/');}async[a0_0x5ccbf1(0x153)](_0x17704e){const _0xf913cf=a0_0x5ccbf1;0x0==await this[_0xf913cf(0x1b4)](_0x17704e)&&fs['mkdirSync'](_0x17704e);}async[a0_0x5ccbf1(0x1b4)](_0x1f880d){const _0x1ca868=a0_0x5ccbf1;return await fs[_0x1ca868(0x17f)](_0x1f880d);}};function a0_0x2066(){const _0x2a4187=['Resolvers,\x20subscribers\x20as\x20','design:returntype','JSON','Operato\x20Tool\x20Create\x20Service','Arg','type-graphql','createServicePath','\x0aimport\x20{\x20Resolver,\x20Mutation,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20In\x20}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20New{{pascalCase\x20name}},\x20{{pascalCase\x20name}}Patch\x20}\x20from\x20\x27./{{name}}-type\x27\x0aimport\x20{\x20getRepository\x20}\x20from\x20\x27@things-factory/shell\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Mutation\x20{\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20create\x20new\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20create{{pascalCase\x20name}}(@Arg(\x27{{camelCase\x20name}}\x27)\x20{{camelCase\x20name}}:\x20New{{pascalCase\x20name}},\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20return\x20await\x20tx.getRepository({{pascalCase\x20name}}).save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20modify\x20{{pascalCase\x20name}}\x20information\x27\x20})\x0a\x20\x20async\x20update{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27id\x27)\x20id:\x20string,\x0a\x20\x20\x20\x20@Arg(\x27patch\x27)\x20patch:\x20{{pascalCase\x20name}}Patch,\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20repository\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20repository.findOne(\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20)\x0a\x0a\x20\x20\x20\x20return\x20await\x20repository.save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20...patch,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20[{{pascalCase\x20name}}],\x20{\x20description:\x20\x22To\x20modify\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20information\x22\x20})\x0a\x20\x20async\x20updateMultiple{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27patches\x27,\x20type\x20=>\x20[{{pascalCase\x20name}}Patch])\x20patches:\x20{{pascalCase\x20name}}Patch[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}[]>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20results\x20=\x20[]\x0a\x20\x20\x20\x20const\x20_createRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27+\x27)\x0a\x20\x20\x20\x20const\x20_updateRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27M\x27)\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}Repo\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x0a\x20\x20\x20\x20if\x20(_createRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_createRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20newRecord\x20=\x20_createRecords[i]\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...newRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27+\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20if\x20(_updateRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_updateRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20updRecord\x20=\x20_updateRecords[i]\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20{{camelCase\x20name}}Repo.findOne({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id:updRecord.id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...updRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27M\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20return\x20results\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20delete{{pascalCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove({\x20domain,\x20id,\x20updater:user\x20})\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20multiple\x20{{camelCase\x20name}}s\x27\x20})\x0a\x20\x20async\x20delete{{pluralPascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27ids\x27,\x20type\x20=>\x20[String])\x20ids:\x20string[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20delEntitis\x20=\x20ids.map(id=>{\x0a\x20\x20\x20\x20\x20\x20return\x20{domain,id,updater:user}\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove(delEntitis)\x0a\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a}\x0a','\x0aimport\x20{\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','\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','colType','sort','/event-subscriber.ts','\x27,\x20type:\x20\x27','dataProp','\x0a\x20\x20','PWD','snakeCaseName','\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','\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','161eyyWXm','length','709503HJNcTe','map','\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','text','findOne','\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','prototype','pascalCaseName','createHistoryServiceFiles','/packages/','index.ts','__esModule','212FUjTgC','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','number','export\x20*\x20from\x20\x27./','existsPath','updater_id','/packages','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','-type.ts','getFieldType','updated_at','colSize','5439272UidDKG','double\x20precision','date','\x20{\x20nullable:\x20','columnToEntityColumn','createHistoryEntityText','\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','/server','uniqRank','{{camelCase\x20name}}.','toolCreateService','double','bigint','-history\x27','find','replaceNamesMap','8FDWRCo','integer','pluralize','Date','@things-factory/shell','\x20})','/index.ts','Int','createServiceFiles','getColTxtType','...','lodash','created_at','@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})','\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','/*\x20ENTITIES\x20*/\x0a\x09...',',length:','9891170TJDvDw','42530ZuuvFJ','\x27,\x20nullable:\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','createDir','writeFile','packages','creator_id','design:type','utf8','EntitySubscribers,','17706007hstuPx','name','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','/server/service/','__param','@Column({name:\x27','datetime','__decorate','indexOf','8154lVbGdm','split','float','decimal','/service','139710lVRbJY','type\x20=>','string','-history-query.ts','9Nrsnfh','getProjectRootPath','Entities,\x20resolvers\x20as\x20','__metadata','rank','createTypeText','domain_id','push','\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','EntitySubscribers\x20}\x20from\x20\x27./','import\x20{\x20entities\x20as\x20','Ctx','Float','Resolvers\x20}\x20from\x20\x27./','nullable','COPY','-mutation.ts','Entity','createEntityText','existsSync','tableName','createNoHistoryServiceFiels','replace','-history.ts','Entities,','@Field(','state','join','Resolvers,','/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...','pluralPascalCaseName','.ts','OperatoToolCreateService','long'];a0_0x2066=function(){return _0x2a4187;};return a0_0x2066();}tslib_1[a0_0x5ccbf1(0x161)]([(0x0,type_graphql_1['Query'])(_0x516439=>Boolean,{'description':a0_0x5ccbf1(0x191)}),tslib_1[a0_0x5ccbf1(0x15e)](0x0,(0x0,type_graphql_1[a0_0x5ccbf1(0x192)])('id')),tslib_1[a0_0x5ccbf1(0x15e)](0x1,(0x0,type_graphql_1[a0_0x5ccbf1(0x177)])()),tslib_1[a0_0x5ccbf1(0x16f)](a0_0x5ccbf1(0x157),Function),tslib_1[a0_0x5ccbf1(0x16f)]('design:paramtypes',[String,Object]),tslib_1[a0_0x5ccbf1(0x16f)](a0_0x5ccbf1(0x18f),Promise)],OperatoToolCreateService[a0_0x5ccbf1(0x1aa)],a0_0x5ccbf1(0x138),null),OperatoToolCreateService=tslib_1[a0_0x5ccbf1(0x161)]([(0x0,type_graphql_1['Resolver'])()],OperatoToolCreateService),exports[a0_0x5ccbf1(0x18c)]=OperatoToolCreateService;const allIndex=a0_0x5ccbf1(0x1a0),serviceIndex=a0_0x5ccbf1(0x152),serviceHistoryIndex=a0_0x5ccbf1(0x196),serviceQuery=a0_0x5ccbf1(0x1c2),serviceHistoryQuery=a0_0x5ccbf1(0x1a1),serviceMutation=a0_0x5ccbf1(0x195),sereviceType='\x0aimport\x20{\x20ObjectType,\x20Field,\x20InputType,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@InputType()\x0aexport\x20class\x20New{{pascalCase\x20name}}\x20{\x0a{{newTypeColumns}}\x0a}\x0a\x0a@InputType()\x0aexport\x20class\x20{{pascalCase\x20name}}Patch\x20{\x0a\x20\x20@Field(type\x20=>\x20ID,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20id?:\x20string\x0a\x0a{{patchTypeColumns}}\x0a\x0a\x20\x20@Field()\x0a\x20\x20cuFlag:\x20string\x0a}\x0a\x0a@ObjectType()\x0aexport\x20class\x20{{pascalCase\x20name}}List\x20{\x0a\x20\x20@Field(type\x20=>\x20[{{pascalCase\x20name}}])\x0a\x20\x20items:\x20{{pascalCase\x20name}}[]\x0a\x0a\x20\x20@Field(type\x20=>\x20Int)\x0a\x20\x20total:\x20number\x0a}\x0a',sereviceHistoryType=a0_0x5ccbf1(0x197),serviceEntity=a0_0x5ccbf1(0x174),serviceEntityHistCopy='\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a',serviceEntityHistJson=a0_0x5ccbf1(0x1a6),serviceEntitySubscriber=a0_0x5ccbf1(0x1a9);
|
|
1
|
+
'use strict';const a0_0x5b07da=a0_0x1b57;(function(_0x38f996,_0x48934b){const _0x327efc=a0_0x1b57,_0x27fc44=_0x38f996();while(!![]){try{const _0x2e380f=-parseInt(_0x327efc(0x1c5))/0x1+parseInt(_0x327efc(0x1d4))/0x2+parseInt(_0x327efc(0x1ac))/0x3*(parseInt(_0x327efc(0x16a))/0x4)+parseInt(_0x327efc(0x1c8))/0x5+parseInt(_0x327efc(0x1c9))/0x6+parseInt(_0x327efc(0x18b))/0x7*(parseInt(_0x327efc(0x1f1))/0x8)+parseInt(_0x327efc(0x17c))/0x9*(-parseInt(_0x327efc(0x1be))/0xa);if(_0x2e380f===_0x48934b)break;else _0x27fc44['push'](_0x27fc44['shift']());}catch(_0x5d7af3){_0x27fc44['push'](_0x27fc44['shift']());}}}(a0_0x31fb,0xcdbde));function a0_0x31fb(){const _0x4752f1=['createServiceFiles','\x27,\x20type:\x20\x27','Query','PWD','findOne','.ts','replaceNamesMap','774668gkalgb','tableName','tslib','lodash','\x20{\x20nullable:\x20','map','createHistoryEntityText','EntitySubscribers,','getColTxtType','Entity','name','/event-subscriber.ts','__param','state','updater_id','writeFileSync','writeFile','import\x20{\x20entities\x20as\x20','Int','created_at','includes','Entities,\x20resolvers\x20as\x20','domain_id','EntitySubscribers\x20}\x20from\x20\x27./','Arg','Resolvers,','pascalCaseName','creator','JSON','8yBuVhX','creator_id','createDir','\x27,\x20nullable:\x20','292OySyNT','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','replace','split','\x20})','/packages/','createHistoryServiceFiles','dataProp','double','datetime','index.ts','\x0aimport\x20{\x20ObjectType,\x20Field,\x20InputType,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0a\x0a@ObjectType()\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryList\x20{\x0a\x20\x20@Field(type\x20=>\x20[{{pascalCase\x20name}}History])\x0a\x20\x20items:\x20{{pascalCase\x20name}}History[]\x0a\x0a\x20\x20@Field(type\x20=>\x20Int)\x0a\x20\x20total:\x20number\x0a}\x0a','number','pluralCamelCaseName','updater','colType','updated_at','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','1737MLnXcf','...','pluralize','long','text','__metadata','float','push','string','-history\x27','OperatoToolCreateService','COPY','bigint','env','{{camelCase\x20name}}.','9149854QvVSil','existsPath','columnToEntityColumn','Date','\x0a\x20\x20','double\x20precision','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a\x20\x20@Column(\x27simple-json\x27,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20@Field(type\x20=>\x20ScalarObject,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20historyJson?:\x20any\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','getRepository','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','/index.ts','utf8','nullable','pluralPascalCaseName','rank','integer','-history-query.ts','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20Domain\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0a@Entity(\x27{{tableName}}\x27)\x0a{{indexAnn}}\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}\x20{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','type\x20=>','find','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','-query.ts','createEntityText','__esModule','indexOf','date','createServicePath','@Column({name:\x27','readFileSync','export\x20*\x20from\x20\x27./','\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryList\x20}\x20from\x20\x27./{{name}}-history-type\x27\x0a\x0a@Resolver({{pascalCase\x20name}}History)\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryQuery\x20{\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}History,\x20{\x20description:\x20\x27To\x20fetch\x20a\x20{{pascalCase\x20name}}History\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}History(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}History>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20return\x20await\x20getRepository({{pascalCase\x20name}}History).findOne({\x0a\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20}\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}HistoryList,\x20{\x20description:\x20\x27To\x20fetch\x20multiple\x20{{pluralPascalCase\x20name}}History\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}Histories(@Args()\x20params:\x20ListParam,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}HistoryList>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20queryBuilder\x20=\x20getQueryBuilderFromListParams({\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20params,\x0a\x20\x20\x20\x20\x20\x20repository:\x20await\x20getRepository({{pascalCase\x20name}}History)\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20const\x20[items,\x20total]\x20=\x20await\x20queryBuilder.getManyAndCount()\x0a\x0a\x20\x20\x20\x20return\x20{\x20items,\x20total\x20}\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20Domain)\x0a\x20\x20async\x20domain(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<Domain>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(Domain).findOneBy({id:{{camelCase\x20name}}History.domainId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20updater(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}History.updaterId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20creator(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}History.creatorId})\x0a\x20\x20}\x0a}\x0a','packages','\x0aimport\x20{\x20ObjectType,\x20Field,\x20InputType,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@InputType()\x0aexport\x20class\x20New{{pascalCase\x20name}}\x20{\x0a{{newTypeColumns}}\x0a}\x0a\x0a@InputType()\x0aexport\x20class\x20{{pascalCase\x20name}}Patch\x20{\x0a\x20\x20@Field(type\x20=>\x20ID,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20id?:\x20string\x0a\x0a{{patchTypeColumns}}\x0a\x0a\x20\x20@Field()\x0a\x20\x20cuFlag:\x20string\x0a}\x0a\x0a@ObjectType()\x0aexport\x20class\x20{{pascalCase\x20name}}List\x20{\x0a\x20\x20@Field(type\x20=>\x20[{{pascalCase\x20name}}])\x0a\x20\x20items:\x20{{pascalCase\x20name}}[]\x0a\x0a\x20\x20@Field(type\x20=>\x20Int)\x0a\x20\x20total:\x20number\x0a}\x0a','\x0a/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0a\x0a/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0a\x0aexport\x20const\x20entities\x20=\x20[\x20\x20\x0a\x20\x20/*\x20ENTITIES\x20*/\x0a]\x20\x0a\x0a\x0aexport\x20const\x20schema\x20=\x20{\x0a\x20\x20resolverClasses:\x20[\x0a\x20\x20\x20\x20/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x20\x20]\x20\x0a}\x0a\x0aexport\x20const\x20subscribers\x20=\x20[\x0a\x20\x20/*\x20SUBSCRIBERS\x20*/\x0a]\x0a','67002ouzKey','__decorate','createNoHistoryServiceFiels','Entities,','\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}}]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}Mutation]\x0a','createTypeText','@Field(','-mutation.ts','snakeCaseName','@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})','\x0aimport\x20{\x20EventSubscriber\x20}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20HistoryEntitySubscriber\x20}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20getRepository\x20}\x20from\x20\x27@things-factory/shell\x27\x0a\x0a@EventSubscriber()\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryEntitySubscriber\x20extends\x20HistoryEntitySubscriber<{{pascalCase\x20name}},{{pascalCase\x20name}}History>\x20{\x0a\x20\x20public\x20get\x20entity()\x20{\x0a\x20\x20\x20\x20return\x20{{pascalCase\x20name}}\x0a\x20\x20}\x0a\x0a\x20\x20public\x20get\x20historyEntity()\x20{\x0a\x20\x20\x20\x20return\x20{{pascalCase\x20name}}History\x0a\x20\x20}\x0a\x0a\x20\x20{{entityToJson}}\x0a\x0a\x20\x20async\x20beforeRemoveHistory(history:{{pascalCase\x20name}}History,entity:{{pascalCase\x20name}}){\x0a\x20\x20\x20\x20let\x20repo\x20=\x20getRepository({{pascalCase\x20name}}History);\x0a\x20\x20\x20\x20const\x20revNo\x20=\x20await\x20repo.createQueryBuilder()\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.select(\x27max(data_revision_no)\x27,\x20\x27rev_no\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.where(\x27domain_id\x20=\x20:domainId\x27,\x20{\x20domainId:\x20entity.domain.id\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.andWhere(\x27original_id\x20=\x20:originalId\x27,\x20{\x20originalId:\x20entity.id\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.getRawOne()\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20history.dataRevisionNo\x20=\x20revNo\x20?\x20revNo.rev_no\x20+\x201\x20:\x201;\x0a\x20\x20\x20\x20return\x20history;\x0a\x20\x20}\x0a}\x0a','join','Resolvers\x20}\x20from\x20\x27./','uniqRank','toolCreateService','/*\x20ENTITIES\x20*/\x0a\x09...','defineProperty','getFieldType','210190rrTGqq','-type.ts','length','-history.ts','type-graphql','Operato\x20Tool\x20Create\x20Service','colSize','492979QEtlaM','/server/service/','sort','3792355CrCzjL','7854330wKUFuR','Float','\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}List\x20}\x20from\x20\x27./{{name}}-type\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Query\x20{\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20fetch\x20a\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20return\x20await\x20getRepository({{pascalCase\x20name}}).findOne({\x0a\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20}\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}List,\x20{\x20description:\x20\x27To\x20fetch\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{pluralCamelCase\x20name}}(@Args()\x20params:\x20ListParam,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}List>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20queryBuilder\x20=\x20getQueryBuilderFromListParams({\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20params,\x0a\x20\x20\x20\x20\x20\x20repository:\x20await\x20getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20const\x20convertedParams\x20=\x20convertListParams(params,\x20domain.id)\x0a\x20\x20\x20\x20const\x20[items,\x20total]\x20=\x20await\x20queryBuilder.getManyAndCount()\x0a\x0a\x20\x20\x20\x20return\x20{\x20items,\x20total\x20}\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20Domain)\x0a\x20\x20async\x20domain(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<Domain>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(Domain).findOneBy({id:{{camelCase\x20name}}.domainId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20updater(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.updaterId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20creator(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.creatorId})\x0a\x20\x20}\x0a}\x0a','/packages'];a0_0x31fb=function(){return _0x4752f1;};return a0_0x31fb();}Object[a0_0x5b07da(0x1bc)](exports,a0_0x5b07da(0x1a1),{'value':!0x0}),exports[a0_0x5b07da(0x186)]=void 0x0;const tslib_1=require(a0_0x5b07da(0x1d6)),type_graphql_1=require(a0_0x5b07da(0x1c2)),shell_1=require('@things-factory/shell'),resource_base_1=require('@things-factory/resource-base'),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x5b07da(0x1d7)),{plural:plural}=require(a0_0x5b07da(0x17e)),fs=require('fs');function a0_0x1b57(_0x27dcd5,_0x415950){const _0x31fb99=a0_0x31fb();return a0_0x1b57=function(_0x1b5786,_0x2781af){_0x1b5786=_0x1b5786-0x168;let _0x13046e=_0x31fb99[_0x1b5786];return _0x13046e;},a0_0x1b57(_0x27dcd5,_0x415950);}let OperatoToolCreateService=class{async[a0_0x5b07da(0x1ba)](_0x374281,_0x61a4a0){const _0x5a308c=a0_0x5b07da,{domain:_0x3acaca}=_0x61a4a0[_0x5a308c(0x1e1)],_0x516a69=await(0x0,shell_1[_0x5a308c(0x192)])(resource_base_1[_0x5a308c(0x1dd)])[_0x5a308c(0x1d1)]({'where':{'id':_0x374281}}),_0xd970ea=await(0x0,shell_1[_0x5a308c(0x192)])(resource_base_1['EntityColumn'])[_0x5a308c(0x19d)]({'where':{'domain':{'id':_0x3acaca['id']},'entity':{'id':_0x516a69['id']}}});let {name:_0x51e459='',bundle:_0x496e2f=''}=_0x516a69||{},_0x52fdd3=this['getProjectRootPath'](),_0x1a4c29=kebabCase(_0x51e459);return await this[_0x5a308c(0x1a4)](_0x52fdd3,_0x496e2f,_0x1a4c29),await this[_0x5a308c(0x1cd)](_0x52fdd3,_0x496e2f,_0x51e459,_0x1a4c29,_0x516a69,_0xd970ea),!0x0;}async['createServiceFiles'](_0x304b26,_0x6fd151,_0x1cf094,_0x1100f2,_0x45d8b9,_0x433f1c){const _0x6556f0=a0_0x5b07da;let _0xf99a65={'name':_0x1100f2,'tableName':_0x45d8b9[_0x6556f0(0x1d5)],'pascalCaseName':startCase(camelCase(_0x1cf094))['replace'](/ /g,''),'camelCaseName':camelCase(_0x1cf094),'snakeCaseName':snakeCase(_0x1cf094),'pluralPascalCaseName':startCase(camelCase(plural(_0x1cf094)))[_0x6556f0(0x16c)](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x1cf094))},_0x1d5d41=_0x304b26+_0x6556f0(0x16f)+_0x6fd151+_0x6556f0(0x1c6);['JSON',_0x6556f0(0x187)]['includes'](_0x45d8b9[_0x6556f0(0x171)])?await this['createHistoryServiceFiles'](_0x1d5d41,_0x1100f2,_0x45d8b9,_0x433f1c,_0xf99a65):await this['createNoHistoryServiceFiels'](_0x1d5d41,_0x1100f2,_0x45d8b9,_0x433f1c,_0xf99a65);}async[a0_0x5b07da(0x170)](_0x3f9533,_0x1bbbee,_0x714311,_0x443716,_0x334cb1){const _0x386513=a0_0x5b07da;await this[_0x386513(0x1e4)](_0x3f9533+(_0x1bbbee+_0x386513(0x194)),serviceHistoryIndex,_0x334cb1);let _0x4287bf=this[_0x386513(0x1a0)](_0x714311,_0x443716);await this[_0x386513(0x1e4)](_0x3f9533+(_0x1bbbee+'/'+_0x1bbbee+_0x386513(0x1d2)),_0x4287bf,_0x334cb1),await this[_0x386513(0x1e4)](_0x3f9533+(_0x1bbbee+'/'+_0x1bbbee+_0x386513(0x19f)),serviceQuery,_0x334cb1),await this[_0x386513(0x1e4)](_0x3f9533+(_0x1bbbee+'/'+_0x1bbbee+_0x386513(0x1b3)),serviceMutation,_0x334cb1);let _0x29c7de=this[_0x386513(0x1b1)](_0x443716);await this[_0x386513(0x1e4)](_0x3f9533+(_0x1bbbee+'/'+_0x1bbbee+_0x386513(0x1bf)),_0x29c7de,_0x334cb1);let _0x5ded5e=this['createHistoryEntityText'](_0x714311,_0x443716);await this[_0x386513(0x1e4)](_0x3f9533+(_0x1bbbee+'/'+_0x1bbbee+_0x386513(0x1c1)),_0x5ded5e,_0x334cb1);let _0x5b5b45='';'JSON'==_0x714311[_0x386513(0x171)]?(_0x5b5b45='\x0a\x20\x20public\x20createHistoryEntity(manager,\x20entity)\x20{\x0a\x20\x20\x20\x20let\x20history\x20=\x20manager.create(this.historyEntity,\x20entity);\x0a\x20\x20\x20\x20history.historyJson\x20=\x20JSON.stringify(entity);\x0a\x20\x20\x20\x20return\x20history;\x0a\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20',await this[_0x386513(0x1e4)](_0x3f9533+(_0x1bbbee+'/event-subscriber.ts'),serviceEntitySubscriber,_0x334cb1)):_0x5b5b45='';let _0x157496=serviceEntitySubscriber[_0x386513(0x16c)](/{{entityToJson}}/g,_0x5b5b45);await this[_0x386513(0x1e4)](_0x3f9533+(_0x1bbbee+_0x386513(0x1df)),_0x157496,_0x334cb1),await this[_0x386513(0x1e4)](_0x3f9533+(_0x1bbbee+'/'+_0x1bbbee+_0x386513(0x19a)),serviceHistoryQuery,_0x334cb1),await this[_0x386513(0x1e4)](_0x3f9533+(_0x1bbbee+'/'+_0x1bbbee+'-history-type.ts'),sereviceHistoryType,_0x334cb1);let _0x572440=_0x3f9533+_0x386513(0x174);0x0==await this[_0x386513(0x18c)](_0x572440)&&await this[_0x386513(0x1e4)](_0x572440,allIndex,_0x334cb1);let _0x2aaa3c=await fs[_0x386513(0x1a6)](_0x572440,_0x386513(0x195));_0x2aaa3c[_0x386513(0x1a2)](_0x386513(0x1a7)+_0x334cb1[_0x386513(0x1de)]+'/'+_0x334cb1['name']+_0x386513(0x185))<0x0&&(_0x2aaa3c=_0x2aaa3c[_0x386513(0x16c)](/\/\* EXPORT ENTITY TYPES \*\//,_0x386513(0x19e)+_0x334cb1[_0x386513(0x1de)]+'/'+_0x334cb1[_0x386513(0x1de)]+_0x386513(0x185))),_0x2aaa3c[_0x386513(0x1a2)](_0x386513(0x1a7)+_0x334cb1['name']+'/'+_0x334cb1[_0x386513(0x1de)]+'\x27')<0x0&&(_0x2aaa3c=_0x2aaa3c[_0x386513(0x16c)](/\/\* EXPORT ENTITY TYPES \*\//,_0x386513(0x19e)+_0x334cb1[_0x386513(0x1de)]+'/'+_0x334cb1['name']+'\x27')),_0x2aaa3c[_0x386513(0x1a2)](_0x386513(0x1e5)+_0x334cb1[_0x386513(0x1ee)]+'Entities,\x20resolvers\x20as\x20'+_0x334cb1[_0x386513(0x1ee)]+'Resolvers,\x20subscribers\x20as\x20'+_0x334cb1['pascalCaseName']+'EntitySubscribers\x20}\x20from\x20\x27./'+_0x334cb1[_0x386513(0x1de)]+'\x27')<0x0&&(_0x2aaa3c=_0x2aaa3c[_0x386513(0x16c)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x386513(0x193)+_0x334cb1[_0x386513(0x1ee)]+'Entities,\x20resolvers\x20as\x20'+_0x334cb1[_0x386513(0x1ee)]+'Resolvers,\x20subscribers\x20as\x20'+_0x334cb1[_0x386513(0x1ee)]+_0x386513(0x1eb)+_0x334cb1[_0x386513(0x1de)]+'\x27')),_0x2aaa3c['indexOf'](_0x386513(0x17d)+_0x334cb1[_0x386513(0x1ee)]+_0x386513(0x1af))<0x0&&(_0x2aaa3c=_0x2aaa3c['replace'](/\/\* ENTITIES \*\//,_0x386513(0x1bb)+_0x334cb1[_0x386513(0x1ee)]+_0x386513(0x1af))),_0x2aaa3c['indexOf'](_0x386513(0x17d)+_0x334cb1['pascalCaseName']+'Resolvers,')<0x0&&(_0x2aaa3c=_0x2aaa3c[_0x386513(0x16c)](/\/\* RESOLVER CLASSES \*\//,_0x386513(0x16b)+_0x334cb1[_0x386513(0x1ee)]+_0x386513(0x1ed))),_0x2aaa3c[_0x386513(0x1a2)](_0x386513(0x17d)+_0x334cb1[_0x386513(0x1ee)]+_0x386513(0x1db))<0x0&&(_0x2aaa3c=_0x2aaa3c['replace'](/\/\* SUBSCRIBERS \*\//,'/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...'+_0x334cb1['pascalCaseName']+_0x386513(0x1db))),await this[_0x386513(0x1e4)](_0x572440,_0x2aaa3c,_0x334cb1);}async[a0_0x5b07da(0x1ae)](_0x5270fa,_0x515325,_0x5c236d,_0x883a80,_0x3963a1){const _0x5004c9=a0_0x5b07da;await this[_0x5004c9(0x1e4)](_0x5270fa+(_0x515325+_0x5004c9(0x194)),serviceIndex,_0x3963a1),await this[_0x5004c9(0x1e4)](_0x5270fa+(_0x515325+'/'+_0x515325+_0x5004c9(0x19f)),serviceQuery,_0x3963a1),await this['writeFile'](_0x5270fa+(_0x515325+'/'+_0x515325+_0x5004c9(0x1b3)),serviceMutation,_0x3963a1);let _0x537f08=this['createEntityText'](_0x5c236d,_0x883a80);await this[_0x5004c9(0x1e4)](_0x5270fa+(_0x515325+'/'+_0x515325+_0x5004c9(0x1d2)),_0x537f08,_0x3963a1);let _0x19bbab=this[_0x5004c9(0x1b1)](_0x883a80);await this['writeFile'](_0x5270fa+(_0x515325+'/'+_0x515325+'-type.ts'),_0x19bbab,_0x3963a1);let _0xa48d65=_0x5270fa+_0x5004c9(0x174);0x0==await this['existsPath'](_0xa48d65)&&await this[_0x5004c9(0x1e4)](_0xa48d65,allIndex,_0x3963a1);let _0x3c7885=await fs['readFileSync'](_0xa48d65,_0x5004c9(0x195));_0x3c7885[_0x5004c9(0x1a2)]('export\x20*\x20from\x20\x27./'+_0x3963a1[_0x5004c9(0x1de)]+'/'+_0x3963a1[_0x5004c9(0x1de)]+'\x27')<0x0&&(_0x3c7885=_0x3c7885[_0x5004c9(0x16c)](/\/\* EXPORT ENTITY TYPES \*\//,_0x5004c9(0x19e)+_0x3963a1['name']+'/'+_0x3963a1[_0x5004c9(0x1de)]+'\x27')),_0x3c7885[_0x5004c9(0x1a2)](_0x5004c9(0x1e5)+_0x3963a1['pascalCaseName']+_0x5004c9(0x1e9)+_0x3963a1['pascalCaseName']+_0x5004c9(0x1b8)+_0x3963a1[_0x5004c9(0x1de)]+'\x27')<0x0&&(_0x3c7885=_0x3c7885[_0x5004c9(0x16c)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x5004c9(0x193)+_0x3963a1['pascalCaseName']+_0x5004c9(0x1e9)+_0x3963a1['pascalCaseName']+_0x5004c9(0x1b8)+_0x3963a1['name']+'\x27')),_0x3c7885['indexOf'](_0x5004c9(0x17d)+_0x3963a1[_0x5004c9(0x1ee)]+_0x5004c9(0x1af))<0x0&&(_0x3c7885=_0x3c7885[_0x5004c9(0x16c)](/\/\* ENTITIES \*\//,_0x5004c9(0x1bb)+_0x3963a1[_0x5004c9(0x1ee)]+_0x5004c9(0x1af))),_0x3c7885[_0x5004c9(0x1a2)](_0x5004c9(0x17d)+_0x3963a1[_0x5004c9(0x1ee)]+_0x5004c9(0x1ed))<0x0&&(_0x3c7885=_0x3c7885[_0x5004c9(0x16c)](/\/\* RESOLVER CLASSES \*\//,_0x5004c9(0x16b)+_0x3963a1['pascalCaseName']+_0x5004c9(0x1ed))),await this[_0x5004c9(0x1e4)](_0xa48d65,_0x3c7885,_0x3963a1);}[a0_0x5b07da(0x1b1)](_0x258701){const _0x1dcbaa=a0_0x5b07da;let _0x45cafd=sereviceType,_0x4e1966=_0x258701[_0x1dcbaa(0x1d9)](_0x148804=>{const _0x4a497d=_0x1dcbaa;if('id'==_0x148804[_0x4a497d(0x1de)])return'';if(_0x4a497d(0x1ea)==_0x148804[_0x4a497d(0x1de)])return'';if(_0x4a497d(0x1e7)==_0x148804[_0x4a497d(0x1de)])return'';if('updated_at'==_0x148804[_0x4a497d(0x1de)])return'';if(_0x4a497d(0x1f2)==_0x148804['name'])return'';if(_0x4a497d(0x1e2)==_0x148804[_0x4a497d(0x1de)])return'';let _0x5b75c1=this['getFieldType'](_0x148804),_0x3ccfba=this[_0x4a497d(0x1dc)](_0x148804),_0x4084b7=camelCase(_0x148804[_0x4a497d(0x1de)]);return'\x20\x20'+(_0x4a497d(0x1b2)+(0x0==_0x5b75c1[_0x4a497d(0x1c0)]?'':_0x4a497d(0x19c)+_0x5b75c1+',')+_0x4a497d(0x1d8)+_0x148804[_0x4a497d(0x196)]+_0x4a497d(0x16e))+_0x4a497d(0x18f)+(''+_0x4084b7+(_0x148804[_0x4a497d(0x196)]?'?':'')+':\x20'+_0x3ccfba)+'\x0a';});_0x45cafd=_0x45cafd[_0x1dcbaa(0x16c)](/{{newTypeColumns}}/g,_0x4e1966[_0x1dcbaa(0x1b7)]('\x0a'));let _0x33835f=_0x258701['map'](_0x13974d=>{const _0x41eec0=_0x1dcbaa;if('id'==_0x13974d[_0x41eec0(0x1de)])return'';if(_0x41eec0(0x1ea)==_0x13974d[_0x41eec0(0x1de)])return'';if(_0x41eec0(0x1e7)==_0x13974d['name'])return'';if(_0x41eec0(0x17a)==_0x13974d[_0x41eec0(0x1de)])return'';if(_0x41eec0(0x1f2)==_0x13974d['name'])return'';if(_0x41eec0(0x1e2)==_0x13974d[_0x41eec0(0x1de)])return'';let _0x3e6967=this[_0x41eec0(0x1bd)](_0x13974d),_0x401614=this[_0x41eec0(0x1dc)](_0x13974d);_0x13974d[_0x41eec0(0x196)]=!0x0;let _0xa209c7=camelCase(_0x13974d[_0x41eec0(0x1de)]);return'\x20\x20'+(_0x41eec0(0x1b2)+(0x0==_0x3e6967['length']?'':_0x41eec0(0x19c)+_0x3e6967+',')+_0x41eec0(0x1d8)+_0x13974d['nullable']+'\x20})')+_0x41eec0(0x18f)+(''+_0xa209c7+(_0x13974d[_0x41eec0(0x196)]?'?':'')+':\x20'+_0x401614)+'\x0a';});return _0x45cafd=_0x45cafd[_0x1dcbaa(0x16c)](/{{patchTypeColumns}}/g,_0x33835f[_0x1dcbaa(0x1b7)]('\x0a')),_0x45cafd;}[a0_0x5b07da(0x1a0)](_0x2067db,_0x24a215){const _0x11eae5=a0_0x5b07da;let _0x4776ad=serviceEntity,_0x442ad1=_0x24a215[_0x11eae5(0x1c7)](function(_0x495c8d,_0x2cc94d){const _0x2bf4ed=_0x11eae5;return _0x495c8d[_0x2bf4ed(0x198)]-_0x2cc94d[_0x2bf4ed(0x198)];})[_0x11eae5(0x1d9)](_0x487464=>this[_0x11eae5(0x18d)](_0x487464));[_0x11eae5(0x187),'JSON'][_0x11eae5(0x1e8)](_0x2067db['dataProp'])&&_0x442ad1[_0x11eae5(0x183)]('\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201'),_0x4776ad=_0x4776ad[_0x11eae5(0x16c)](/{{entityColumns}}/g,_0x442ad1[_0x11eae5(0x1b7)]('\x0a'));let _0x5b94f8='',_0x323dd6=_0x24a215['filter'](_0x4f6fbb=>_0x4f6fbb[_0x11eae5(0x1b9)]&&_0x4f6fbb['uniqRank']>0x0)[_0x11eae5(0x1c7)](function(_0x223de0,_0x41399c){const _0x3fbda1=_0x11eae5;return _0x223de0[_0x3fbda1(0x1b9)]-_0x41399c[_0x3fbda1(0x1b9)];});if(_0x323dd6[_0x11eae5(0x1c0)]>0x0){_0x5b94f8=_0x11eae5(0x1b5);let _0x3764d7=_0x323dd6[_0x11eae5(0x1d9)](_0x1319f3=>{const _0x2b6ee2=_0x11eae5;let _0x27b0c5=_0x1319f3[_0x2b6ee2(0x1de)];return'domain_id'==_0x1319f3[_0x2b6ee2(0x1de)]&&(_0x27b0c5='domain'),_0x2b6ee2(0x1f2)==_0x1319f3[_0x2b6ee2(0x1de)]&&(_0x27b0c5=_0x2b6ee2(0x1ef)),_0x2b6ee2(0x1e2)==_0x1319f3['name']&&(_0x27b0c5=_0x2b6ee2(0x178)),_0x2b6ee2(0x18a)+camelCase(_0x27b0c5);});_0x5b94f8=_0x5b94f8[_0x11eae5(0x16c)](/{{indexColumns}}/g,_0x3764d7[_0x11eae5(0x1b7)](','));}return _0x4776ad=_0x4776ad['replace'](/{{indexAnn}}/g,_0x5b94f8),_0x4776ad;}[a0_0x5b07da(0x1da)](_0x2d29a7,_0x582fed){const _0x4adb3f=a0_0x5b07da;let _0x1a618f=_0x4adb3f(0x1f0)==_0x2d29a7[_0x4adb3f(0x171)]?serviceEntityHistJson:serviceEntityHistCopy,_0x1528d6=_0x582fed[_0x4adb3f(0x1c7)](function(_0x3344fa,_0x17c137){const _0x5a8e56=_0x4adb3f;return _0x3344fa['rank']-_0x17c137[_0x5a8e56(0x198)];})['map'](_0x59f526=>this[_0x4adb3f(0x18d)](_0x59f526));return _0x1a618f=_0x1a618f[_0x4adb3f(0x16c)](/{{entityColumns}}/g,_0x1528d6[_0x4adb3f(0x1b7)]('\x0a')),_0x1a618f;}[a0_0x5b07da(0x18d)](_0x48dd8e){const _0x182425=a0_0x5b07da;if('id'==_0x48dd8e[_0x182425(0x1de)])return'';if(_0x182425(0x1ea)==_0x48dd8e['name'])return'';if(_0x182425(0x1e7)==_0x48dd8e[_0x182425(0x1de)])return'';if(_0x182425(0x17a)==_0x48dd8e[_0x182425(0x1de)])return'';if(_0x182425(0x1f2)==_0x48dd8e[_0x182425(0x1de)])return'';if('updater_id'==_0x48dd8e[_0x182425(0x1de)])return'';let _0x7ce362=_0x48dd8e['colType'];_0x182425(0x172)==_0x48dd8e[_0x182425(0x179)]&&(_0x7ce362=_0x182425(0x190)),_0x182425(0x17f)==_0x48dd8e[_0x182425(0x179)]&&(_0x7ce362=_0x182425(0x188)),_0x182425(0x184)==_0x48dd8e[_0x182425(0x179)]&&(_0x7ce362='character\x20varying'),_0x182425(0x173)==_0x48dd8e[_0x182425(0x179)]&&(_0x7ce362='timestamp\x20without\x20time\x20zone');let _0x389393='';_0x182425(0x184)==_0x48dd8e[_0x182425(0x179)]&&(_0x389393=_0x48dd8e[_0x182425(0x1c4)]);let _0x2809e5=this[_0x182425(0x1bd)](_0x48dd8e),_0x5e760b=this[_0x182425(0x1dc)](_0x48dd8e),_0x8632dc=camelCase(_0x48dd8e[_0x182425(0x1de)]);return'\x20\x20'+(_0x182425(0x1a5)+_0x48dd8e[_0x182425(0x1de)]+_0x182425(0x1ce)+_0x7ce362+_0x182425(0x169)+_0x48dd8e[_0x182425(0x196)]+'\x20'+(0x0==_0x389393[_0x182425(0x1c0)]?'':',length:'+_0x389393)+_0x182425(0x16e))+_0x182425(0x18f)+(_0x182425(0x1b2)+(0x0==_0x2809e5[_0x182425(0x1c0)]?'':_0x182425(0x19c)+_0x2809e5+',')+_0x182425(0x1d8)+_0x48dd8e[_0x182425(0x196)]+_0x182425(0x16e))+_0x182425(0x18f)+(''+_0x8632dc+(_0x48dd8e['nullable']?'?':'')+':\x20'+_0x5e760b)+'\x0a';}[a0_0x5b07da(0x1bd)](_0x495250){const _0x339f0b=a0_0x5b07da;let _0x169b33='';return _0x339f0b(0x172)==_0x495250[_0x339f0b(0x179)]&&(_0x169b33=_0x339f0b(0x1ca)),_0x339f0b(0x182)==_0x495250['colType']&&(_0x169b33='Float'),_0x339f0b(0x17f)==_0x495250[_0x339f0b(0x179)]&&(_0x169b33=_0x339f0b(0x1e6)),_0x339f0b(0x199)==_0x495250[_0x339f0b(0x179)]&&(_0x169b33=_0x339f0b(0x1e6)),_0x169b33;}['getColTxtType'](_0x18a203){const _0x59932f=a0_0x5b07da;let _0x1f9269=_0x18a203[_0x59932f(0x179)];return'decimal'==_0x18a203[_0x59932f(0x179)]&&(_0x1f9269='number'),_0x59932f(0x172)==_0x18a203[_0x59932f(0x179)]&&(_0x1f9269=_0x59932f(0x176)),'float'==_0x18a203[_0x59932f(0x179)]&&(_0x1f9269=_0x59932f(0x176)),'integer'==_0x18a203[_0x59932f(0x179)]&&(_0x1f9269=_0x59932f(0x176)),_0x59932f(0x17f)==_0x18a203[_0x59932f(0x179)]&&(_0x1f9269='number'),'datetime'==_0x18a203[_0x59932f(0x179)]&&(_0x1f9269='Date'),_0x59932f(0x1a3)==_0x18a203[_0x59932f(0x179)]&&(_0x1f9269=_0x59932f(0x18e)),_0x59932f(0x180)==_0x18a203[_0x59932f(0x179)]&&(_0x1f9269=_0x59932f(0x184)),_0x1f9269;}async[a0_0x5b07da(0x1e4)](_0x26a225,_0x5cbef5,_0x4f74cd){const _0x47f2f1=a0_0x5b07da;await fs[_0x47f2f1(0x1e3)](_0x26a225,this[_0x47f2f1(0x1d3)](_0x5cbef5,_0x4f74cd),'utf8');}[a0_0x5b07da(0x1d3)](_0x25195b,_0x5afa0d){const _0x54e8e4=a0_0x5b07da;return _0x25195b[_0x54e8e4(0x16c)](/{{pascalCase name}}/g,_0x5afa0d[_0x54e8e4(0x1ee)])[_0x54e8e4(0x16c)](/{{camelCase name}}/g,_0x5afa0d['camelCaseName'])[_0x54e8e4(0x16c)](/{{snakeCase name}}/g,_0x5afa0d[_0x54e8e4(0x1b4)])[_0x54e8e4(0x16c)](/{{pluralPascalCase name}}/g,_0x5afa0d[_0x54e8e4(0x197)])[_0x54e8e4(0x16c)](/{{pluralCamelCase name}}/g,_0x5afa0d[_0x54e8e4(0x177)])[_0x54e8e4(0x16c)](/{{tableName}}/g,_0x5afa0d[_0x54e8e4(0x1d5)])[_0x54e8e4(0x16c)](/{{name}}/g,_0x5afa0d[_0x54e8e4(0x1de)]);}async['createServicePath'](_0x11fc2d,_0x19d4d1,_0x306126){const _0x23dba0=a0_0x5b07da;let _0x108852=_0x11fc2d+_0x23dba0(0x1cc);await this['createDir'](_0x108852),_0x108852=_0x108852+'/'+_0x19d4d1,await this[_0x23dba0(0x168)](_0x108852),_0x108852+='/server',await this[_0x23dba0(0x168)](_0x108852),_0x108852+='/service',await this[_0x23dba0(0x168)](_0x108852),_0x108852=_0x108852+'/'+_0x306126,await this[_0x23dba0(0x168)](_0x108852);}['getProjectRootPath'](){const _0x86dc93=a0_0x5b07da;let _0x3e08c5=process[_0x86dc93(0x189)][_0x86dc93(0x1d0)][_0x86dc93(0x16d)]('/'),_0x532a1d=[];for(let _0x5ec014=0x0;_0x5ec014<_0x3e08c5[_0x86dc93(0x1c0)]&&_0x86dc93(0x1a9)!=_0x3e08c5[_0x5ec014];_0x5ec014++)_0x532a1d[_0x86dc93(0x183)](_0x3e08c5[_0x5ec014]);return _0x532a1d['join']('/');}async[a0_0x5b07da(0x168)](_0x364a51){const _0x1757fc=a0_0x5b07da;0x0==await this[_0x1757fc(0x18c)](_0x364a51)&&fs['mkdirSync'](_0x364a51);}async[a0_0x5b07da(0x18c)](_0x13130f){return await fs['existsSync'](_0x13130f);}};tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x5b07da(0x1cf)])(_0x40f861=>Boolean,{'description':a0_0x5b07da(0x1c3)}),tslib_1[a0_0x5b07da(0x1e0)](0x0,(0x0,type_graphql_1[a0_0x5b07da(0x1ec)])('id')),tslib_1[a0_0x5b07da(0x1e0)](0x1,(0x0,type_graphql_1['Ctx'])()),tslib_1[a0_0x5b07da(0x181)]('design:type',Function),tslib_1[a0_0x5b07da(0x181)]('design:paramtypes',[String,Object]),tslib_1[a0_0x5b07da(0x181)]('design:returntype',Promise)],OperatoToolCreateService['prototype'],a0_0x5b07da(0x1ba),null),OperatoToolCreateService=tslib_1[a0_0x5b07da(0x1ad)]([(0x0,type_graphql_1['Resolver'])()],OperatoToolCreateService),exports[a0_0x5b07da(0x186)]=OperatoToolCreateService;const allIndex=a0_0x5b07da(0x1ab),serviceIndex=a0_0x5b07da(0x1b0),serviceHistoryIndex='\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryQuery\x20}\x20from\x20\x27./{{name}}-history-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryEntitySubscriber\x20}\x20from\x20\x27./event-subscriber\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}},\x20{{pascalCase\x20name}}History]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}HistoryQuery,\x20{{pascalCase\x20name}}Mutation]\x0aexport\x20const\x20subscribers\x20=\x20[{{pascalCase\x20name}}HistoryEntitySubscriber]\x0a\x0a',serviceQuery=a0_0x5b07da(0x1cb),serviceHistoryQuery=a0_0x5b07da(0x1a8),serviceMutation='\x0aimport\x20{\x20Resolver,\x20Mutation,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20In\x20}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20New{{pascalCase\x20name}},\x20{{pascalCase\x20name}}Patch\x20}\x20from\x20\x27./{{name}}-type\x27\x0aimport\x20{\x20getRepository\x20}\x20from\x20\x27@things-factory/shell\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Mutation\x20{\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20create\x20new\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20create{{pascalCase\x20name}}(@Arg(\x27{{camelCase\x20name}}\x27)\x20{{camelCase\x20name}}:\x20New{{pascalCase\x20name}},\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20return\x20await\x20tx.getRepository({{pascalCase\x20name}}).save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20modify\x20{{pascalCase\x20name}}\x20information\x27\x20})\x0a\x20\x20async\x20update{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27id\x27)\x20id:\x20string,\x0a\x20\x20\x20\x20@Arg(\x27patch\x27)\x20patch:\x20{{pascalCase\x20name}}Patch,\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20repository\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20repository.findOne(\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20)\x0a\x0a\x20\x20\x20\x20return\x20await\x20repository.save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20...patch,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20[{{pascalCase\x20name}}],\x20{\x20description:\x20\x22To\x20modify\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20information\x22\x20})\x0a\x20\x20async\x20updateMultiple{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27patches\x27,\x20type\x20=>\x20[{{pascalCase\x20name}}Patch])\x20patches:\x20{{pascalCase\x20name}}Patch[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}[]>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20results\x20=\x20[]\x0a\x20\x20\x20\x20const\x20_createRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27+\x27)\x0a\x20\x20\x20\x20const\x20_updateRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27M\x27)\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}Repo\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x0a\x20\x20\x20\x20if\x20(_createRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_createRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20newRecord\x20=\x20_createRecords[i]\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...newRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27+\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20if\x20(_updateRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_updateRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20updRecord\x20=\x20_updateRecords[i]\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20{{camelCase\x20name}}Repo.findOne({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id:updRecord.id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...updRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27M\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20return\x20results\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20delete{{pascalCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove({\x20domain,\x20id,\x20updater:user\x20})\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20multiple\x20{{camelCase\x20name}}s\x27\x20})\x0a\x20\x20async\x20delete{{pluralPascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27ids\x27,\x20type\x20=>\x20[String])\x20ids:\x20string[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20delEntitis\x20=\x20ids.map(id=>{\x0a\x20\x20\x20\x20\x20\x20return\x20{domain,id,updater:user}\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove(delEntitis)\x0a\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a}\x0a',sereviceType=a0_0x5b07da(0x1aa),sereviceHistoryType=a0_0x5b07da(0x175),serviceEntity=a0_0x5b07da(0x19b),serviceEntityHistCopy=a0_0x5b07da(0x17b),serviceEntityHistJson=a0_0x5b07da(0x191),serviceEntitySubscriber=a0_0x5b07da(0x1b6);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x497fc9=a0_0xa7db;function a0_0xa7db(_0x291baf,_0x2a5a6a){const _0x3ffec1=a0_0x3ffe();return a0_0xa7db=function(_0xa7db17,_0x2a24a0){_0xa7db17=_0xa7db17-0x1d9;let _0x100ef5=_0x3ffec1[_0xa7db17];return _0x100ef5;},a0_0xa7db(_0x291baf,_0x2a5a6a);}(function(_0x2f0671,_0x550b5a){const _0x3cf0d1=a0_0xa7db,_0x2eece3=_0x2f0671();while(!![]){try{const _0xc3a5fb=-parseInt(_0x3cf0d1(0x1dd))/0x1+parseInt(_0x3cf0d1(0x1f7))/0x2*(-parseInt(_0x3cf0d1(0x1d9))/0x3)+parseInt(_0x3cf0d1(0x1f5))/0x4+parseInt(_0x3cf0d1(0x1e8))/0x5+parseInt(_0x3cf0d1(0x1e1))/0x6+-parseInt(_0x3cf0d1(0x1e5))/0x7*(-parseInt(_0x3cf0d1(0x1dc))/0x8)+parseInt(_0x3cf0d1(0x1f6))/0x9;if(_0xc3a5fb===_0x550b5a)break;else _0x2eece3['push'](_0x2eece3['shift']());}catch(_0x4ed199){_0x2eece3['push'](_0x2eece3['shift']());}}}(a0_0x3ffe,0xac26c));function a0_0x3ffe(){const _0x2127e0=['defineProperty','checkTarget','(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)','manager','getPermission','createQueryBuilder','getCount','menu','283552APfBpP','2435958aqnGgJ','2CJyIfv','Studio','checkStudioTemplateIsOverLimit','OVER_LIMIT','Menu','1607697uoxFVG','@things-factory/shell','select','8LUKSPF','1178397cNUqAk','from','forEach','where','2672394uftVWM','id\x20!=\x20:id','map','getRepository','2011982cHrHps','includes','checkStudioPermission','6725265WgHQNy','../../errors/license-error','andWhere','LicenseError','split'];a0_0x3ffe=function(){return _0x2127e0;};return a0_0x3ffe();}Object[a0_0x497fc9(0x1ed)](exports,'__esModule',{'value':!0x0}),exports[a0_0x497fc9(0x1f9)]=exports[a0_0x497fc9(0x1e7)]=void 0x0;const operato_license_checker_1=require('@things-factory/operato-license-checker'),shell_1=require(a0_0x497fc9(0x1da)),menu_base_1=require('@things-factory/menu-base'),license_error_1=require(a0_0x497fc9(0x1e9));async function checkStudioPermission(){const _0x1eecb1=a0_0x497fc9;let _0x1c8b8f=((0x0,operato_license_checker_1[_0x1eecb1(0x1f1)])('Permissions\x20For\x20Tailor\x20Tool')||',')[_0x1eecb1(0x1ec)](',')[_0x1eecb1(0x1e3)](_0x2f77b5=>_0x2f77b5['trim']()),_0x211934=!0x1;return _0x1c8b8f[_0x1eecb1(0x1df)](_0x3bc9f5=>{const _0x465da1=_0x1eecb1;_0x3bc9f5[_0x465da1(0x1e6)](_0x465da1(0x1f8))&&(_0x211934=!0x0);}),_0x211934;}async function checkStudioTemplateIsOverLimit(_0x272b20,_0x15814e){const _0x29b10a=a0_0x497fc9;if(0x0==await checkStudioPermission())throw new license_error_1[(_0x29b10a(0x1eb))]({'errorCode':_0x15814e['t'](license_error_1['LicenseError']['ERROR_CODES']['INVALID_LICENSE'])});var _0x4ef646=0x0;if(_0x4ef646=_0x272b20&&''!=_0x272b20?await(0x0,shell_1[_0x29b10a(0x1e4)])(menu_base_1[_0x29b10a(0x1fb)])['manager'][_0x29b10a(0x1f2)]()['select'](_0x29b10a(0x1f4))[_0x29b10a(0x1de)](menu_base_1['Menu'],_0x29b10a(0x1f4))[_0x29b10a(0x1e0)](_0x29b10a(0x1e2),{'id':_0x272b20})[_0x29b10a(0x1ea)](_0x29b10a(0x1ef))[_0x29b10a(0x1f3)]()+0x1:await(0x0,shell_1['getRepository'])(menu_base_1['Menu'])[_0x29b10a(0x1f0)][_0x29b10a(0x1f2)]()[_0x29b10a(0x1db)]('menu')[_0x29b10a(0x1de)](menu_base_1[_0x29b10a(0x1fb)],_0x29b10a(0x1f4))[_0x29b10a(0x1e0)]('(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)')['getCount']()+0x1,!(0x0,operato_license_checker_1[_0x29b10a(0x1ee)])(_0x4ef646))throw new license_error_1[(_0x29b10a(0x1eb))]({'errorCode':_0x15814e['t'](license_error_1[_0x29b10a(0x1eb)]['ERROR_CODES'][_0x29b10a(0x1fa)])});return!0x0;}exports[a0_0x497fc9(0x1e7)]=checkStudioPermission,exports[a0_0x497fc9(0x1f9)]=checkStudioTemplateIsOverLimit;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x4a79f5=a0_0x5171;(function(_0x513061,_0x5b50ab){const _0xaad7cd=a0_0x5171,_0x142b23=_0x513061();while(!![]){try{const _0x5989da=-parseInt(_0xaad7cd(0x188))/0x1*(parseInt(_0xaad7cd(0x17f))/0x2)+-parseInt(_0xaad7cd(0x186))/0x3+parseInt(_0xaad7cd(0x187))/0x4+parseInt(_0xaad7cd(0x18f))/0x5+-parseInt(_0xaad7cd(0x182))/0x6+parseInt(_0xaad7cd(0x183))/0x7+parseInt(_0xaad7cd(0x181))/0x8*(parseInt(_0xaad7cd(0x17b))/0x9);if(_0x5989da===_0x5b50ab)break;else _0x142b23['push'](_0x142b23['shift']());}catch(_0x2f0533){_0x142b23['push'](_0x142b23['shift']());}}}(a0_0x1030,0xd7c43));Object[a0_0x4a79f5(0x191)](exports,a0_0x4a79f5(0x18e),{'value':!0x0}),exports[a0_0x4a79f5(0x180)]=void 0x0;function a0_0x5171(_0x49d545,_0xaad809){const _0x103086=a0_0x1030();return a0_0x5171=function(_0x51713d,_0x267b19){_0x51713d=_0x51713d-0x179;let _0xb72048=_0x103086[_0x51713d];return _0xb72048;},a0_0x5171(_0x49d545,_0xaad809);}const tslib_1=require('tslib'),type_graphql_1=require(a0_0x4a79f5(0x192)),tool_permission_1=require(a0_0x4a79f5(0x190));let OperatoToolResolver=class{async[a0_0x4a79f5(0x18b)](_0x1949fc){const _0x55e484=a0_0x4a79f5;return(0x0,tool_permission_1[_0x55e484(0x17a)])();}async['studioTemplateIsOverLimit'](_0x57de3e,_0x165508){return(0x0,tool_permission_1['checkStudioTemplateIsOverLimit'])(_0x57de3e,_0x165508);}};tslib_1[a0_0x4a79f5(0x193)]([(0x0,type_graphql_1['Query'])(_0x2a786a=>Boolean,{'description':a0_0x4a79f5(0x18d)}),tslib_1[a0_0x4a79f5(0x18a)](0x0,(0x0,type_graphql_1[a0_0x4a79f5(0x179)])()),tslib_1[a0_0x4a79f5(0x17d)]('design:type',Function),tslib_1[a0_0x4a79f5(0x17d)]('design:paramtypes',[Object]),tslib_1['__metadata'](a0_0x4a79f5(0x185),Promise)],OperatoToolResolver['prototype'],'studioPermission',null),tslib_1['__decorate']([(0x0,type_graphql_1['Query'])(_0x5dfe54=>Boolean,{'description':'Operato\x20Tool\x20Studio\x20Limit\x20check'}),tslib_1[a0_0x4a79f5(0x18a)](0x0,(0x0,type_graphql_1[a0_0x4a79f5(0x17e)])('id')),tslib_1[a0_0x4a79f5(0x18a)](0x1,(0x0,type_graphql_1[a0_0x4a79f5(0x179)])()),tslib_1[a0_0x4a79f5(0x17d)](a0_0x4a79f5(0x18c),Function),tslib_1[a0_0x4a79f5(0x17d)]('design:paramtypes',[String,Object]),tslib_1['__metadata'](a0_0x4a79f5(0x185),Promise)],OperatoToolResolver[a0_0x4a79f5(0x184)],a0_0x4a79f5(0x17c),null),OperatoToolResolver=tslib_1[a0_0x4a79f5(0x193)]([(0x0,type_graphql_1[a0_0x4a79f5(0x189)])()],OperatoToolResolver),exports[a0_0x4a79f5(0x180)]=OperatoToolResolver;function a0_0x1030(){const _0x57dc3a=['Ctx','checkStudioPermission','2441277Opoayd','studioTemplateIsOverLimit','__metadata','Arg','2dhrUsi','OperatoToolResolver','48XxnEOh','4479342QPjYlp','3427368aRtWkz','prototype','design:returntype','4158975XzKnOo','4786096cdTUgf','1627544PWvszo','Resolver','__param','studioPermission','design:type','Operato\x20Tool\x20Studio\x20Usage\x20Permissions','__esModule','6652695gRyYeT','./tool-permission','defineProperty','type-graphql','__decorate'];a0_0x1030=function(){return _0x57dc3a;};return a0_0x1030();}
|