@things-factory/operato-tools 6.1.40 → 6.1.42
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 +3 -3
- package/client/pages/generator/graphql-config-tab-mixin.js +23 -23
- package/client/pages/generator/grid-config-tab-mixin.js +22 -22
- package/client/pages/generator/grid-emphasized-config-tab-mixin.js +8 -8
- package/client/pages/generator/menu-config-tab-mixin.js +12 -12
- package/client/pages/generator/meta-generator-page.js +11 -11
- package/client/pages/generator/search-config-tab-mixin.js +4 -4
- package/client/pages/generator/tab-config-tab-mixin.js +4 -4
- package/client/pages/main.js +4 -4
- package/client/reducers/main.js +1 -1
- package/package.json +3 -3
- package/server/constants/error-code.js +1 -1
- package/server/errors/license-error.js +1 -1
- package/server/routes.js +1 -1
- package/server/service/tool-entity/create-menu.js +1 -1
- package/server/service/tool-entity/create-service.js +1 -1
- package/server/service/tool-secret/tool-permission.js +1 -1
- package/server/service/tool-secret/tool-resolver.js +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function
|
|
2
|
-
<ox-grist auto-fetch id="tab-tab-grid" .config=${this[
|
|
3
|
-
.fetchHandler=${this[
|
|
4
|
-
</ox-grist>`;}get[
|
|
1
|
+
const a0_0x2fb83a=a0_0x4369;(function(_0x512fce,_0x26ddb4){const _0x590b1c=a0_0x4369,_0x2a79a8=_0x512fce();while(!![]){try{const _0xf073bc=parseInt(_0x590b1c(0x112))/0x1*(-parseInt(_0x590b1c(0xf2))/0x2)+parseInt(_0x590b1c(0xf7))/0x3+-parseInt(_0x590b1c(0x10c))/0x4+-parseInt(_0x590b1c(0x114))/0x5+-parseInt(_0x590b1c(0xfd))/0x6*(-parseInt(_0x590b1c(0xfc))/0x7)+-parseInt(_0x590b1c(0x113))/0x8*(-parseInt(_0x590b1c(0xf6))/0x9)+-parseInt(_0x590b1c(0x10a))/0xa*(parseInt(_0x590b1c(0x107))/0xb);if(_0xf073bc===_0x26ddb4)break;else _0x2a79a8['push'](_0x2a79a8['shift']());}catch(_0x1146b2){_0x2a79a8['push'](_0x2a79a8['shift']());}}}(a0_0x5c49,0x9982a));import{html}from'lit-element';function a0_0x5c49(){const _0x3dd9fd=['string','menu','left','viewTabData','getGristGuttersConfig','page_location','parent_field','1012hjHZtw','tag','getElementValueById','12770SdywUD','map','1658800jntTWS','display','bind','tagname','right','tab','3119wesfop','421088urhMlD','3338725lVcogy','center','tLabel','parent_id','rank','tabTabGrist','location','setTabConfigTabConfig','tabTabGridConfig','integer','querySelector','forEach','name','506tcsooU','setTabConfigTabValues','icon','delete','72tKVzjr','3032748ZwopIk','getGristSelectableConfig','gutter','tab-tab-grid','sortRecordByRank','21lBQHjj','2371620iizymL','renderTabConfigTab','param_field'];a0_0x5c49=function(){return _0x3dd9fd;};return a0_0x5c49();}function a0_0x4369(_0x486bb5,_0x245175){const _0x5c4920=a0_0x5c49();return a0_0x4369=function(_0x436944,_0x263ace){_0x436944=_0x436944-0xee;let _0x58657f=_0x5c4920[_0x436944];return _0x58657f;},a0_0x4369(_0x486bb5,_0x245175);}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=_0x18a452=>class extends _0x18a452{[a0_0x2fb83a(0xf3)](_0x5c8ce4){const _0x31e58a=a0_0x2fb83a;let _0x33e4b0=_0x5c8ce4?.[_0x31e58a(0x10b)]((_0x3bc863,_0x2254bf)=>{const _0x28ad33=_0x31e58a;let _0x9c92d0=_0x2254bf+0x1,_0x160926={};return _0x160926['rank']=0xa*_0x9c92d0,_0x160926['id']=_0x9c92d0,_0x160926['name']=_0x3bc863[_0x28ad33(0xf1)],_0x160926[_0x28ad33(0x10d)]=_0x3bc863[_0x28ad33(0x10d)],_0x160926[_0x28ad33(0x10f)]=_0x3bc863['tagname'],_0x160926[_0x28ad33(0xf4)]=_0x3bc863[_0x28ad33(0xf4)],_0x160926[_0x28ad33(0x11a)]=_0x3bc863[_0x28ad33(0x11a)],_0x160926[_0x28ad33(0x106)]=_0x3bc863[_0x28ad33(0x106)],_0x160926[_0x28ad33(0xff)]=_0x3bc863[_0x28ad33(0xff)],_0x160926[_0x28ad33(0x101)]=_0x3bc863[_0x28ad33(0x101)],_0x160926;});this[_0x31e58a(0x103)]=_0x33e4b0||[],this[_0x31e58a(0x119)]?.['fetch']();}['getTabConfigTabValues'](){const _0x5c42bd=a0_0x2fb83a;let _0x125dec={'tab':[]},_0x2df48e=this[_0x5c42bd(0x109)](_0x5c42bd(0xfa));return this[_0x5c42bd(0xfb)](_0x2df48e)?.[_0x5c42bd(0xf0)](_0x24ce2f=>{const _0x303bea=_0x5c42bd;var {name:_0x5b7ef6,display:_0x1c8ea7,tagname:_0x48b85b,location:_0x34353b,parent_field:_0xa118ea,param_field:_0x1081d0,menu:_0x90e383,icon:_0x4cd75a}=_0x24ce2f;_0x5b7ef6&&_0x48b85b&&_0x34353b&&_0x90e383&&(_0x1c8ea7||(_0x1c8ea7=_0x5b7ef6),_0xa118ea||(_0xa118ea='id'),_0x1081d0||(_0x1081d0=_0x303bea(0xff)),_0x125dec[_0x303bea(0x111)]['push']({'name':_0x5b7ef6,'display':_0x1c8ea7,'tagname':_0x48b85b,'location':_0x34353b,'parent_field':_0xa118ea,'param_field':_0x1081d0,'menu':_0x90e383,'icon':_0x4cd75a}));}),_0x125dec;}[a0_0x2fb83a(0xfe)](){const _0x4e38c5=a0_0x2fb83a;return html`
|
|
2
|
+
<ox-grist auto-fetch id="tab-tab-grid" .config=${this[_0x4e38c5(0x11c)]} .mode='GRID'
|
|
3
|
+
.fetchHandler=${this['fetchTabTabHandler'][_0x4e38c5(0x10e)](this)}>
|
|
4
|
+
</ox-grist>`;}get['tabTabGrist'](){const _0x323c15=a0_0x2fb83a;return this['shadowRoot'][_0x323c15(0xef)]('#tab-tab-grid');}async['fetchTabTabHandler'](){const _0x3622b8=a0_0x2fb83a;return{'total':0x0,'records':this[_0x3622b8(0x103)]||[]};}async[a0_0x2fb83a(0x11b)](){const _0x54c68c=a0_0x2fb83a;this[_0x54c68c(0x11c)]={'rows':MetaApi[_0x54c68c(0xf8)](!0x0),'pagination':{'infinite':!0x0},'sorters':[{'name':_0x54c68c(0x118),'desc':!0x1}],'appendable':!0x0,'columns':[...MetaApi[_0x54c68c(0x104)](!0x1,!0x1),{'type':_0x54c68c(0xf9),'gutterName':'button','icon':_0x54c68c(0xf5),'handlers':{'click':(_0x5eda16,_0x15ee52,_0x389360,_0x205ac9,_0x5c73b4)=>{const _0x3ce7b5=_0x54c68c;_0x205ac9['id']&&this['deleteRow'](this[_0x3ce7b5(0x119)],_0x205ac9);}}},{'type':'string','name':'id','hidden':!0x0},{'type':_0x54c68c(0xee),'name':_0x54c68c(0x118),'header':TermsUtil[_0x54c68c(0x116)]('rank'),'sortable':!0x0,'width':0x41,'record':{'align':_0x54c68c(0x110),'editable':!0x0,'mandatory':!0x0}},{'type':_0x54c68c(0x100),'name':'name','header':TermsUtil[_0x54c68c(0x116)](_0x54c68c(0xf1)),'sortable':!0x1,'width':0x64,'record':{'align':_0x54c68c(0x102),'editable':!0x0,'mandatory':!0x0}},{'type':_0x54c68c(0x100),'name':_0x54c68c(0x10d),'header':TermsUtil[_0x54c68c(0x116)](_0x54c68c(0x10d)),'sortable':!0x1,'width':0x64,'record':{'align':'left','editable':!0x0,'mandatory':!0x0}},{'type':_0x54c68c(0x100),'name':_0x54c68c(0xf4),'header':TermsUtil[_0x54c68c(0x116)]('icon'),'sortable':!0x0,'width':0x41,'record':{'align':_0x54c68c(0x115),'editable':!0x0,'mandatory':!0x0}},{'type':'string','name':_0x54c68c(0x101),'header':TermsUtil[_0x54c68c(0x116)]('routing'),'sortable':!0x1,'width':0x64,'record':{'align':_0x54c68c(0x102),'editable':!0x0,'mandatory':!0x0}},{'type':'string','name':'tagname','header':TermsUtil['tLabel'](_0x54c68c(0x108)),'sortable':!0x1,'width':0x96,'record':{'align':'left','editable':!0x0,'mandatory':!0x0}},{'type':_0x54c68c(0x100),'name':_0x54c68c(0x11a),'header':TermsUtil['tLabel'](_0x54c68c(0x105)),'sortable':!0x1,'width':0x12c,'record':{'align':_0x54c68c(0x102),'editable':!0x0,'mandatory':!0x0}},{'type':_0x54c68c(0x100),'name':_0x54c68c(0x106),'header':TermsUtil[_0x54c68c(0x116)](_0x54c68c(0x117)),'sortable':!0x1,'width':0x64,'record':{'align':_0x54c68c(0x102),'editable':!0x0,'mandatory':!0x0}},{'type':_0x54c68c(0x100),'name':_0x54c68c(0xff),'header':TermsUtil['tLabel']('params'),'sortable':!0x1,'width':0x64,'record':{'align':_0x54c68c(0x102),'editable':!0x0,'mandatory':!0x0}}]};}};
|
package/client/pages/main.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a0_0x4c4046=a0_0x1f83;(function(_0x5cb833,_0x4d80d9){var _0xc70087=a0_0x1f83,_0x59f475=_0x5cb833();while(!![]){try{var _0x43a0ad=-parseInt(_0xc70087(0x76))/0x1*(-parseInt(_0xc70087(0x81))/0x2)+parseInt(_0xc70087(0x7c))/0x3+parseInt(_0xc70087(0x82))/0x4+-parseInt(_0xc70087(0x77))/0x5*(-parseInt(_0xc70087(0x7e))/0x6)+-parseInt(_0xc70087(0x84))/0x7+parseInt(_0xc70087(0x79))/0x8*(-parseInt(_0xc70087(0x7d))/0x9)+-parseInt(_0xc70087(0x78))/0xa;if(_0x43a0ad===_0x4d80d9)break;else _0x59f475['push'](_0x59f475['shift']());}catch(_0x472d18){_0x59f475['push'](_0x59f475['shift']());}}}(a0_0x3190,0x52a84));import{html,css}from'lit-element';import{connect}from'pwa-helpers/connect-mixin.js';function a0_0x1f83(_0x3fe70a,_0x5e7a06){var _0x319035=a0_0x3190();return a0_0x1f83=function(_0x1f8383,_0xd3fd80){_0x1f8383=_0x1f8383-0x76;var _0x7df22b=_0x319035[_0x1f8383];return _0x7df22b;},a0_0x1f83(_0x3fe70a,_0x5e7a06);}import{store,PageView}from'@things-factory/shell';import{TermsUtil}from'@things-factory/meta-ui';class OperatoToolsMain extends connect(store)(PageView){static get[a0_0x4c4046(0x83)](){return[css`
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
4
|
background-color: var(--main-section-background-color);
|
|
@@ -41,11 +41,11 @@ var a0_0x4bc5c7=a0_0x25b7;(function(_0x118052,_0x36e5da){var _0x3376b3=a0_0x25b7
|
|
|
41
41
|
display: none;
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
`];}get[
|
|
44
|
+
`];}get[a0_0x4c4046(0x7a)](){return{'title':'Operato\x20Tools','actions':[]};}[a0_0x4c4046(0x7b)](){var _0x1c160d=a0_0x4c4046;return html`
|
|
45
45
|
<h2>Operato Tools</h2>
|
|
46
46
|
<p page-description>
|
|
47
|
-
${TermsUtil[
|
|
47
|
+
${TermsUtil[_0x1c160d(0x86)](_0x1c160d(0x80))}
|
|
48
48
|
</p>
|
|
49
49
|
|
|
50
50
|
<img src="/assets/images/operato-tools.png" />
|
|
51
|
-
`;}}
|
|
51
|
+
`;}}function a0_0x3190(){var _0x59ed82=['tool\x20start\x20msg','2618olLAIO','1773096HfYfsl','styles','3319624itAlbt','define','tText','358MbbfCx','5EKcJBY','8379930hjvruW','31256pUyThG','context','render','1096137lswiCk','639dneUPT','3905466BjgrbN','customElements'];a0_0x3190=function(){return _0x59ed82;};return a0_0x3190();}window[a0_0x4c4046(0x7f)][a0_0x4c4046(0x85)]('operato-tools-main',OperatoToolsMain);
|
package/client/reducers/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a0_0x29c1b1=a0_0x1307;(function(_0x169aaf,_0x272c04){const _0x3bb161=a0_0x1307,_0x5e3051=_0x169aaf();while(!![]){try{const _0x324014=-parseInt(_0x3bb161(0x194))/0x1*(-parseInt(_0x3bb161(0x19b))/0x2)+parseInt(_0x3bb161(0x192))/0x3*(parseInt(_0x3bb161(0x19d))/0x4)+-parseInt(_0x3bb161(0x19a))/0x5*(parseInt(_0x3bb161(0x1a3))/0x6)+parseInt(_0x3bb161(0x19e))/0x7+parseInt(_0x3bb161(0x19f))/0x8+-parseInt(_0x3bb161(0x197))/0x9+-parseInt(_0x3bb161(0x1a2))/0xa;if(_0x324014===_0x272c04)break;else _0x5e3051['push'](_0x5e3051['shift']());}catch(_0x535983){_0x5e3051['push'](_0x5e3051['shift']());}}}(a0_0x4d05,0x24b6b));import a0_0x55df04 from'graphql-tag';import{i18next}from'@operato/i18n';import{store}from'@operato/shell';import{client,gqlContext}from'@operato/graphql';function a0_0x1307(_0x8c0158,_0x228bc2){const _0x4d05ce=a0_0x4d05();return a0_0x1307=function(_0x130710,_0xb6f54e){_0x130710=_0x130710-0x192;let _0x3e638c=_0x4d05ce[_0x130710];return _0x3e638c;},a0_0x1307(_0x8c0158,_0x228bc2);}function a0_0x4d05(){const _0x90b70c=['dispatch','data','420020waBjqA','617832FXxePP','857523cclGRg','query','17btJewu','errors','ABC','585603hqcSyg','state','UPDATE_OPERATO_TOOLS_PERMISSION','5dLdrUc','1474DZqBhz','studioPermission','4mRZVns','142583dbhOSK','333448CdsmUc'];a0_0x4d05=function(){return _0x90b70c;};return a0_0x4d05();}import{UPDATE_OPERATO_TOOLS}from'../actions/main';const INITIAL_STATE={'operatoTools':a0_0x29c1b1(0x196),'studioPermission':!0x1};export const UPDATE_OPERATO_TOOLS_PERMISSION=a0_0x29c1b1(0x199);((async()=>{const _0x3b3ea3=a0_0x29c1b1;var _0x44fc17=await client[_0x3b3ea3(0x193)]({'query':a0_0x55df04`{studioPermission}`});let _0x3ff7bd=!0x1;_0x44fc17[_0x3b3ea3(0x195)]||(_0x3ff7bd=_0x44fc17[_0x3b3ea3(0x1a1)][_0x3b3ea3(0x19c)]),store[_0x3b3ea3(0x1a0)]({'type':UPDATE_OPERATO_TOOLS_PERMISSION,'state':{'studioPermission':_0x3ff7bd}});})());const operatoTools=(_0x341b83=INITIAL_STATE,_0x4adc7a)=>{const _0x3bc2de=a0_0x29c1b1;switch(_0x4adc7a['type']){case UPDATE_OPERATO_TOOLS:return{..._0x341b83};case UPDATE_OPERATO_TOOLS_PERMISSION:return{...INITIAL_STATE,..._0x4adc7a[_0x3bc2de(0x198)]};default:return _0x341b83;}};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.42",
|
|
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.42",
|
|
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": "0ae1a81f73b3defbd2966c528e867a6840d978c5"
|
|
40
40
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a0_0x951ca1=a0_0xb01f;function a0_0xb01f(_0x274d6f,_0xa302de){var _0x3f5363=a0_0x3f53();return a0_0xb01f=function(_0xb01f69,_0x32cee2){_0xb01f69=_0xb01f69-0x136;var _0xced115=_0x3f5363[_0xb01f69];return _0xced115;},a0_0xb01f(_0x274d6f,_0xa302de);}(function(_0x206720,_0x2be6e1){var _0x21a3c5=a0_0xb01f,_0x110aaa=_0x206720();while(!![]){try{var _0x367509=-parseInt(_0x21a3c5(0x143))/0x1*(-parseInt(_0x21a3c5(0x136))/0x2)+-parseInt(_0x21a3c5(0x141))/0x3+-parseInt(_0x21a3c5(0x13d))/0x4+-parseInt(_0x21a3c5(0x142))/0x5*(parseInt(_0x21a3c5(0x138))/0x6)+-parseInt(_0x21a3c5(0x137))/0x7+-parseInt(_0x21a3c5(0x13b))/0x8+parseInt(_0x21a3c5(0x13e))/0x9;if(_0x367509===_0x2be6e1)break;else _0x110aaa['push'](_0x110aaa['shift']());}catch(_0x5cc7c){_0x110aaa['push'](_0x110aaa['shift']());}}}(a0_0x3f53,0x23b2d));function a0_0x3f53(){var _0x33b333=['error.page\x20count\x20over\x20license\x20limit','49136GFcdYJ','5640552iEpUOk','__esModule','OVER_LIMIT','169266CdXuFj','5xFuFYw','98110SeEdru','INVALID_LICENSE','4gbndEa','1752618lxFQKq','573018KFVVMp','defineProperty','error.invalid\x20license\x20key','2097152YhdRmI'];a0_0x3f53=function(){return _0x33b333;};return a0_0x3f53();}Object[a0_0x951ca1(0x139)](exports,a0_0x951ca1(0x13f),{'value':!0x0}),exports[a0_0x951ca1(0x140)]=exports['INVALID_LICENSE']=void 0x0,exports[a0_0x951ca1(0x144)]=a0_0x951ca1(0x13a),exports[a0_0x951ca1(0x140)]=a0_0x951ca1(0x13c);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';const a0_0x4720d7=a0_0x5790;(function(_0x2fca05,_0xd944a4){const _0x4ceda2=a0_0x5790,_0x10414a=_0x2fca05();while(!![]){try{const _0x101d11=-parseInt(_0x4ceda2(0x8c))/0x1*(parseInt(_0x4ceda2(0x89))/0x2)+parseInt(_0x4ceda2(0x97))/0x3*(-parseInt(_0x4ceda2(0x9a))/0x4)+parseInt(_0x4ceda2(0x8d))/0x5*(parseInt(_0x4ceda2(0x9d))/0x6)+-parseInt(_0x4ceda2(0x99))/0x7*(-parseInt(_0x4ceda2(0x92))/0x8)+parseInt(_0x4ceda2(0x94))/0x9+parseInt(_0x4ceda2(0x98))/0xa+parseInt(_0x4ceda2(0x8b))/0xb*(-parseInt(_0x4ceda2(0x95))/0xc);if(_0x101d11===_0xd944a4)break;else _0x10414a['push'](_0x10414a['shift']());}catch(_0x47a88a){_0x10414a['push'](_0x10414a['shift']());}}}(a0_0x3596,0x9a4b1));function a0_0x5790(_0x21c05a,_0xbbe6f6){const _0x359650=a0_0x3596();return a0_0x5790=function(_0x579023,_0x5d1729){_0x579023=_0x579023-0x89;let _0x5a1a2c=_0x359650[_0x579023];return _0x5a1a2c;},a0_0x5790(_0x21c05a,_0xbbe6f6);}Object[a0_0x4720d7(0x8a)](exports,a0_0x4720d7(0x91),{'value':!0x0}),exports[a0_0x4720d7(0x90)]=void 0x0;function a0_0x3596(){const _0x2deb5b=['2YnvYQj','defineProperty','55oNEqer','71593RkIZjP','15cpgaST','errorCode','license-error','LicenseError','__esModule','8YTsLbB','ERROR_CODES','3131622bWpopg','38328VHtqCe','detail','498tcjTLN','7766390njpgBZ','1649410rTsLpH','23588QjKXvs','assign','__importStar','676446xgFYDP'];a0_0x3596=function(){return _0x2deb5b;};return a0_0x3596();}const tslib_1=require('tslib'),ERROR_CODES=tslib_1[a0_0x4720d7(0x9c)](require('../constants/error-code'));class LicenseError extends Error{static get[a0_0x4720d7(0x93)](){const _0x574df1=a0_0x4720d7;return Object[_0x574df1(0x9b)]({},ERROR_CODES);}constructor({errorCode:_0x310a8b,detail:_0x13b376}){const _0x678dfb=a0_0x4720d7;super(_0x310a8b),this['name']=_0x678dfb(0x8f),this[_0x678dfb(0x8e)]=_0x310a8b,this[_0x678dfb(0x96)]=_0x13b376;}}exports['LicenseError']=LicenseError;
|
package/server/routes.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a0_0x173854=a0_0x26b7;function a0_0x26b7(_0x83950,_0x3b5995){const _0x575cd7=a0_0x575c();return a0_0x26b7=function(_0x26b7ee,_0x40d2be){_0x26b7ee=_0x26b7ee-0x93;let _0x4769ae=_0x575cd7[_0x26b7ee];return _0x4769ae;},a0_0x26b7(_0x83950,_0x3b5995);}(function(_0x58714b,_0x47ad3b){const _0x3202d2=a0_0x26b7,_0x2e2ee1=_0x58714b();while(!![]){try{const _0xf17b11=-parseInt(_0x3202d2(0x9a))/0x1+-parseInt(_0x3202d2(0x99))/0x2*(parseInt(_0x3202d2(0xa1))/0x3)+-parseInt(_0x3202d2(0x9d))/0x4+-parseInt(_0x3202d2(0x95))/0x5*(parseInt(_0x3202d2(0x96))/0x6)+parseInt(_0x3202d2(0x98))/0x7+-parseInt(_0x3202d2(0x93))/0x8*(parseInt(_0x3202d2(0x9f))/0x9)+parseInt(_0x3202d2(0x9c))/0xa*(parseInt(_0x3202d2(0x9e))/0xb);if(_0xf17b11===_0x47ad3b)break;else _0x2e2ee1['push'](_0x2e2ee1['shift']());}catch(_0x316e51){_0x2e2ee1['push'](_0x2e2ee1['shift']());}}}(a0_0x575c,0xd2362));const debug=require(a0_0x173854(0x97))(a0_0x173854(0x9b));process['on']('bootstrap-module-global-public-route',(_0x10a527,_0x50cbc2)=>{}),process['on'](a0_0x173854(0xa2),(_0x46ea49,_0x515335)=>{}),process['on'](a0_0x173854(0x94),(_0x4228d5,_0x4aedaf)=>{}),process['on'](a0_0x173854(0xa0),(_0x322a97,_0x1562c7)=>{});function a0_0x575c(){const _0x373a67=['bootstrap-module-global-private-route','2447096peXMWF','bootstrap-module-domain-public-route','1655hDkGMv','8826WMDimA','debug','9319009SEcLXc','74PpwidI','1592853qxaoPb','things-factory:operato-tools:routes','130vJkOCk','1739708kyGlUF','3567575cKNlPv','18RHWwPm','bootstrap-module-domain-private-route','126489SCEBMw'];a0_0x575c=function(){return _0x373a67;};return a0_0x575c();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x4f23ce=a0_0x4cfb;(function(_0x1ad0af,_0x396600){const _0x4f1155=a0_0x4cfb,_0x12b2bf=_0x1ad0af();while(!![]){try{const _0x1e5dc1=-parseInt(_0x4f1155(0x17c))/0x1+-parseInt(_0x4f1155(0x196))/0x2+parseInt(_0x4f1155(0x1db))/0x3+-parseInt(_0x4f1155(0x19c))/0x4+-parseInt(_0x4f1155(0x19e))/0x5*(parseInt(_0x4f1155(0x194))/0x6)+-parseInt(_0x4f1155(0x1a4))/0x7+parseInt(_0x4f1155(0x1ac))/0x8*(parseInt(_0x4f1155(0x18b))/0x9);if(_0x1e5dc1===_0x396600)break;else _0x12b2bf['push'](_0x12b2bf['shift']());}catch(_0x2b253b){_0x12b2bf['push'](_0x12b2bf['shift']());}}}(a0_0x2900,0x5ed59));function a0_0x4cfb(_0x4673e0,_0x841c76){const _0x290029=a0_0x2900();return a0_0x4cfb=function(_0x4cfb03,_0x120223){_0x4cfb03=_0x4cfb03-0x178;let _0x467c28=_0x290029[_0x4cfb03];return _0x467c28;},a0_0x4cfb(_0x4673e0,_0x841c76);}Object['defineProperty'](exports,a0_0x4f23ce(0x1c9),{'value':!0x0}),exports[a0_0x4f23ce(0x1a2)]=void 0x0;const tslib_1=require('tslib'),type_graphql_1=require(a0_0x4f23ce(0x193)),resource_base_1=require(a0_0x4f23ce(0x18a)),menu_base_1=require(a0_0x4f23ce(0x18d)),tool_permission_1=require(a0_0x4f23ce(0x1a0)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require('lodash'),{plural:plural}=require(a0_0x4f23ce(0x195)),crypto_1=tslib_1[a0_0x4f23ce(0x1c2)](require('crypto'));let OperatoToolCreateMenu=class{async['toolCreateMenu'](_0x14be24,_0x188e7a,_0x370f1e){const _0x40e750=a0_0x4f23ce,{domain:_0x38b3de,user:_0x894b80,tx:_0x311f13}=_0x370f1e[_0x40e750(0x1a1)];await(0x0,tool_permission_1[_0x40e750(0x17b)])('',_0x370f1e);const _0x8a83af=await _0x311f13['getRepository'](resource_base_1[_0x40e750(0x1c3)])[_0x40e750(0x1cf)]({'where':{'domain':{'id':_0x38b3de['id']},'id':_0x14be24}}),_0x206af1=await _0x311f13['getRepository'](resource_base_1['EntityColumn'])[_0x40e750(0x191)]({'where':{'domain':{'id':_0x38b3de['id']},'entity':{'id':_0x8a83af['id']}}});let {name:_0x1fd671=''}=_0x8a83af||{},_0x223f48=kebabCase(_0x1fd671),_0x527121=modelTemplate['replace'](/{{pascalCase name}}/g,startCase(camelCase(_0x1fd671))[_0x40e750(0x1a3)](/ /g,''))['replace'](/{{camelCase name}}/g,camelCase(_0x1fd671))[_0x40e750(0x1a3)](/{{snakeCase name}}/g,snakeCase(_0x1fd671))[_0x40e750(0x1a3)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x1fd671)))[_0x40e750(0x1a3)](/ /g,''))['replace'](/{{pluralCamelCase name}}/g,camelCase(plural(_0x1fd671)))[_0x40e750(0x1a3)](/{{name}}/g,_0x1fd671),_0x1847a8='';_0x40e750(0x1dd)==_0x8a83af['dataProp']?_0x1847a8=_0x40e750(0x1d0):_0x40e750(0x1ad)==_0x8a83af[_0x40e750(0x19d)]&&(_0x1847a8=_0x40e750(0x1df)),_0x527121=_0x527121[_0x40e750(0x1a3)](/{{HistoryButton}}/g,_0x1847a8);let _0x560576=this[_0x40e750(0x1c7)](_0x206af1);_0x527121=_0x527121[_0x40e750(0x1a3)](/{{SortColumns}}/g,_0x560576[_0x40e750(0x186)](','));let _0x2e9f7f=this['createSearchCols'](_0x206af1);_0x527121=_0x527121['replace'](/{{SearchColumns}}/g,_0x2e9f7f[_0x40e750(0x186)](','));let _0x1d403d=this['createGridColumns'](_0x206af1);return _0x527121=_0x527121[_0x40e750(0x1a3)](/{{GridColumns}}/g,_0x1d403d[_0x40e750(0x186)](',')),_0x527121=this['enc'](_0x527121),await this[_0x40e750(0x17e)](_0x311f13,_0x38b3de,_0x894b80,_0x188e7a,_0x223f48,_0x527121),!0x0;}['createGridColumns'](_0x56787c){const _0x4f5a5c=a0_0x4f23ce;return _0x56787c[_0x4f5a5c(0x1bf)](_0x343aa1=>'id'!=_0x343aa1['name']&&_0x343aa1[_0x4f5a5c(0x1aa)]>0x0)[_0x4f5a5c(0x19f)](function(_0x3ea2cf,_0x4132bf){const _0x314a56=_0x4f5a5c;return _0x3ea2cf[_0x314a56(0x1aa)]-_0x4132bf[_0x314a56(0x1aa)];})[_0x4f5a5c(0x1b8)](_0x205d98=>{const _0xa6270c=_0x4f5a5c;let {gridEditor:_0x488894=_0xa6270c(0x1d9),name:_0x3bde09,term:_0x3e51f4,gridWidth:_0x2ecc5f=0x0,gridAlign:_0x3e9338='left',nullable:_0x2ad2ed=!0x1}=_0x205d98;if(null==_0x488894&&(_0x488894='string'),null==_0x3e9338&&(_0x3e9338=_0xa6270c(0x1be)),'updater_id'==_0x3bde09||'creator_id'==_0x3bde09)return _0x3bde09=_0xa6270c(0x19b)==_0x3bde09?_0xa6270c(0x1b1):_0xa6270c(0x185),_0xa6270c(0x17a)+_0x3bde09+_0xa6270c(0x182)+_0x3bde09+'\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}';if(_0xa6270c(0x1c8)==_0x3bde09||_0xa6270c(0x1af)==_0x3bde09)return _0xa6270c(0x184)+('updated_at'==_0x3bde09?_0xa6270c(0x1e4):_0xa6270c(0x1c0))+_0xa6270c(0x182)+_0x3bde09+_0xa6270c(0x198);let _0x7ef7c3=_0xa6270c(0x1a6)!=_0x488894&&_0xa6270c(0x18e)!=_0x488894,_0x17ed53=_0xa6270c(0x18e)==_0x488894;0x1!=_0x17ed53&&0x0!=_0x7ef7c3||(_0x488894='string');let _0x4bd2ed=_0xa6270c(0x1c4)+_0x488894+'\x22,\x22name\x22:\x20\x22'+camelCase(_0x3bde09)+_0xa6270c(0x182)+_0x3e51f4+'\x22,\x22hidden\x22:'+_0x17ed53+_0xa6270c(0x18f)+_0x7ef7c3+',\x22mandatory\x22:\x20'+!_0x2ad2ed+',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22'+_0x3e9338+'\x22,\x22width\x22:'+_0x2ecc5f+_0xa6270c(0x1b9);return _0xa6270c(0x1b6)==_0x205d98[_0xa6270c(0x1d3)]&&(_0x4bd2ed+=_0xa6270c(0x1c5)+_0x205d98[_0xa6270c(0x180)]+'\x22}'),'scenario'==_0x205d98[_0xa6270c(0x1d3)]&&(_0x4bd2ed+=_0xa6270c(0x178)+_0x205d98['refName']+'\x22}'),_0xa6270c(0x1e1)==_0x205d98[_0xa6270c(0x1d3)]&&(_0x4bd2ed+=_0xa6270c(0x18c)+camelCase(plural(_0x205d98[_0xa6270c(0x180)]))+_0xa6270c(0x1cd)),_0x4bd2ed+='}',_0x4bd2ed;});}[a0_0x4f23ce(0x199)](_0x33a9ab){const _0x564858=a0_0x4f23ce;return _0x33a9ab[_0x564858(0x1bf)](_0x536e8e=>_0x536e8e[_0x564858(0x187)]>0x0)['sort'](function(_0x416d66,_0x1608bc){const _0xebd2f0=_0x564858;return _0x416d66[_0xebd2f0(0x187)]-_0x1608bc['searchRank'];})[_0x564858(0x1b8)](_0x47a84b=>{const _0x3d7ce5=_0x564858;let _0x3d00fd=_0x47a84b[_0x3d7ce5(0x1d8)];return _0x3d7ce5(0x1bf)==_0x3d00fd?'\x22'+camelCase(_0x47a84b[_0x3d7ce5(0x1ca)])+'\x22':(_0x3d00fd||(_0x3d00fd='eq'),_0x3d7ce5(0x1da)+camelCase(_0x47a84b['name'])+_0x3d7ce5(0x1b5)+_0x3d00fd+'\x22}');});}['createSortCols'](_0x2bbcb2){const _0x53468f=a0_0x4f23ce;return _0x2bbcb2[_0x53468f(0x1bf)](_0x52c563=>_0x52c563[_0x53468f(0x1ab)]>0x0)[_0x53468f(0x19f)](function(_0xc7ce45,_0x19a09){const _0x5a8506=_0x53468f;return _0xc7ce45[_0x5a8506(0x1ab)]-_0x19a09[_0x5a8506(0x1ab)];})['map'](_0x295db6=>'{\x22name\x22:\x22'+camelCase(_0x295db6[_0x53468f(0x1ca)])+'\x22,\x22desc\x22:'+_0x295db6[_0x53468f(0x1b2)]+'}');}async[a0_0x4f23ce(0x17e)](_0x51b3ee,_0x334174,_0x24a6fc,_0x2e01ff,_0x3c5d1c,_0xaf78a2){const _0x3d40b5=a0_0x4f23ce;let _0x32ced7=await _0x51b3ee[_0x3d40b5(0x188)](menu_base_1[_0x3d40b5(0x1dc)])[_0x3d40b5(0x1cf)]({'where':{'domain':{'id':_0x334174['id']},'id':_0x2e01ff}}),_0x9a3a5c=(await _0x51b3ee[_0x3d40b5(0x188)](menu_base_1[_0x3d40b5(0x1dc)])[_0x3d40b5(0x190)]('select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27'+_0x2e01ff+_0x3d40b5(0x1bb)+_0x2e01ff+'\x27'))[0x0]['rank']+0xa,_0x13c0b4=new menu_base_1[(_0x3d40b5(0x1dc))]();_0x13c0b4[_0x3d40b5(0x1ca)]=_0x3c5d1c,_0x13c0b4[_0x3d40b5(0x1e2)]=_0x3d40b5(0x1ce),_0x13c0b4[_0x3d40b5(0x1d1)]='meta-grist-page',_0x13c0b4[_0x3d40b5(0x1a7)]=_0x9a3a5c,_0x13c0b4['hiddenFlag']=!0x1,_0x13c0b4[_0x3d40b5(0x1ba)]=_0x3c5d1c,_0x13c0b4['template']=_0xaf78a2,_0x13c0b4[_0x3d40b5(0x17d)]='@things-factory/meta-ui/client/pages/meta-grist-page',_0x13c0b4[_0x3d40b5(0x1cb)]=_0x32ced7,await _0x51b3ee['getRepository'](menu_base_1[_0x3d40b5(0x1dc)])[_0x3d40b5(0x1de)](Object['assign'](Object[_0x3d40b5(0x1e3)]({},_0x13c0b4),{'domain':_0x334174,'creator':_0x24a6fc,'updater':_0x24a6fc}));}[a0_0x4f23ce(0x1a5)](_0x5265c4){const _0x395ad8=a0_0x4f23ce;let _0x84799c=JSON['stringify'](_0x5265c4)['split'](/(.{100})/)[_0x395ad8(0x1bf)](_0x3a5ae5=>_0x3a5ae5),_0xcf1005=[_0x395ad8(0x181),'aes-256-cbc','aes-256-cfb',_0x395ad8(0x1c6),_0x395ad8(0x1b3),_0x395ad8(0x1d4),_0x395ad8(0x1d6),_0x395ad8(0x1e0)],_0x173050=crypto_1[_0x395ad8(0x189)][_0x395ad8(0x1d2)](0x20)['toString'](_0x395ad8(0x197)),_0x43af3d=Buffer[_0x395ad8(0x1bd)](_0x173050,_0x395ad8(0x197)),_0x4da078=_0x173050['substring'](0x0,0x10),_0x52dc09=['',_0x4da078,_0x4da078,_0x4da078,_0x4da078,_0x4da078,_0x4da078,_0x4da078],_0x2e2416=0x0,_0x16a5b2=[];_0x16a5b2[_0x395ad8(0x19a)](_0x173050);for(var _0x968b76=0x0;_0x968b76<_0x84799c[_0x395ad8(0x1b4)];_0x968b76++,_0x2e2416++){_0x2e2416==_0xcf1005['length']&&(_0x2e2416=0x0);let _0x1e4c6e=crypto_1[_0x395ad8(0x189)][_0x395ad8(0x1b7)](_0xcf1005[_0x2e2416],_0x43af3d,_0x52dc09[_0x2e2416]),_0x3fdea4=_0x1e4c6e[_0x395ad8(0x1a8)](_0x84799c[_0x968b76],'utf8','hex');_0x3fdea4+=_0x1e4c6e[_0x395ad8(0x1bc)](_0x395ad8(0x197)),_0x16a5b2[_0x395ad8(0x19a)](_0x3fdea4);}return _0x16a5b2[_0x395ad8(0x186)](_0x395ad8(0x1c1));}};function a0_0x2900(){const _0xf09838=['932262wMIZwk','Menu','JSON','save','\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','aes256','entity','menuType','assign','updatedAt',',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22','__decorate','{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22','checkStudioTemplateIsOverLimit','488296DPrjEl','resourceUrl','createMenuData','__param','refName','aes-256-ecb','\x22,\x22header\x22:\x20\x22','Operato\x20Tool\x20Create\x20Menu','{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22','creator','join','searchRank','getRepository','default','@things-factory/resource-base','702gghviS',',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22','@things-factory/menu-base','hidden','\x20,\x22editable\x22:\x20','query','find','__metadata','type-graphql','6AiLYbX','pluralize','1210506eSWFCE','hex','\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}','createSearchCols','push','updater_id','818700RfGtOS','dataProp','2190040cLlRrX','sort','./../tool-secret/tool-permission','state','OperatoToolCreateMenu','replace','4750543ShjWoI','enc','readonly','rank','update','design:returntype','gridRank','sortRank','255648wytoof','COPY','Arg','created_at','@transaction','updater','reverseSort','aes-256-cfb1','length','\x22,\x22operator\x22:\x20\x22','code','createCipheriv','map','\x20,\x22exportable\x22:\x20true','routing','\x27\x20or\x20id\x20=\x20\x27','final','from','left','filter','createdAt','h1z0q9i9x7q6','__importDefault','Entity','{\x22type\x22:\x20\x22',',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22','aes-256-cfb8','createSortCols','updated_at','__esModule','name','parent','\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,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}','SCREEN','findOne','\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22basic\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22label\x22:\x20\x22data_history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22icon\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22logic\x22:\x20\x22history_json\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20','category','randomBytes','refType','aes-256-ofb','toolCreateMenu','aes-256-ctr','Resolver','searchOper','string','{\x22name\x22:\x20\x22'];a0_0x2900=function(){return _0xf09838;};return a0_0x2900();}tslib_1[a0_0x4f23ce(0x179)]([(0x0,type_graphql_1['Directive'])(a0_0x4f23ce(0x1b0)),(0x0,type_graphql_1['Mutation'])(_0x3a394c=>Boolean,{'description':a0_0x4f23ce(0x183)}),tslib_1[a0_0x4f23ce(0x17f)](0x0,(0x0,type_graphql_1[a0_0x4f23ce(0x1ae)])('id')),tslib_1['__param'](0x1,(0x0,type_graphql_1['Arg'])('parent_menu_id')),tslib_1[a0_0x4f23ce(0x17f)](0x2,(0x0,type_graphql_1['Ctx'])()),tslib_1[a0_0x4f23ce(0x192)]('design:type',Function),tslib_1['__metadata']('design:paramtypes',[String,String,Object]),tslib_1['__metadata'](a0_0x4f23ce(0x1a9),Promise)],OperatoToolCreateMenu['prototype'],a0_0x4f23ce(0x1d5),null),OperatoToolCreateMenu=tslib_1[a0_0x4f23ce(0x179)]([(0x0,type_graphql_1[a0_0x4f23ce(0x1d7)])()],OperatoToolCreateMenu),exports['OperatoToolCreateMenu']=OperatoToolCreateMenu;const modelTemplate=a0_0x4f23ce(0x1cc);
|
|
1
|
+
'use strict';const a0_0x3095ad=a0_0x32dd;(function(_0x36ae0f,_0x4a8d83){const _0x55825d=a0_0x32dd,_0x4e2522=_0x36ae0f();while(!![]){try{const _0x508234=parseInt(_0x55825d(0xdf))/0x1+parseInt(_0x55825d(0x87))/0x2*(parseInt(_0x55825d(0x7f))/0x3)+-parseInt(_0x55825d(0xca))/0x4+parseInt(_0x55825d(0x9d))/0x5+parseInt(_0x55825d(0xc1))/0x6*(-parseInt(_0x55825d(0xdb))/0x7)+-parseInt(_0x55825d(0x81))/0x8*(parseInt(_0x55825d(0xc4))/0x9)+parseInt(_0x55825d(0xd6))/0xa;if(_0x508234===_0x4a8d83)break;else _0x4e2522['push'](_0x4e2522['shift']());}catch(_0x509b43){_0x4e2522['push'](_0x4e2522['shift']());}}}(a0_0x1c8a,0xc379e));function a0_0x32dd(_0x276fd5,_0x53e716){const _0x1c8ae2=a0_0x1c8a();return a0_0x32dd=function(_0x32dd49,_0x1e94a5){_0x32dd49=_0x32dd49-0x72;let _0x14d9af=_0x1c8ae2[_0x32dd49];return _0x14d9af;},a0_0x32dd(_0x276fd5,_0x53e716);}function a0_0x1c8a(){const _0x32aeda=['hidden','design:paramtypes','\x22,\x22width\x22:','\x22,\x22operator\x22:\x20\x22','\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22basic\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22label\x22:\x20\x22data_history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22icon\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22logic\x22:\x20\x22history_copy\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20','from','rank','searchRank','\x22,\x22header\x22:\x20\x22','createGridColumns','{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22','36sVjCsZ','\x20,\x22exportable\x22:\x20true','prototype','3816cwvnyd','toString','\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','refType','gridRank','Menu','5918456OnkluU','__decorate','OperatoToolCreateMenu','query','{\x22name\x22:\x22','Entity','getRepository','replace',',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22','aes-256-cfb1','string','createSearchCols','22496060hbvfXc','filter','final','parent','\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}','1726746YYsvex','enc','__esModule','aes-256-ecb','383109jxpHTo','assign','map','aes-256-cfb','hex','save','JSON','reverseSort','find','defineProperty','\x20,\x22editable\x22:\x20','lodash','randomBytes','stringify','sort','COPY','substring','48681oVhnGX','readonly','11168zCpXsP','{\x22type\x22:\x20\x22','SCREEN','\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}','createMenuData','parent_menu_id','22IknGXx','\x22,\x22name\x22:\x20\x22','sortRank','toolCreateMenu','crypto',',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22','EntityColumn','design:type','__metadata','meta-grist-page','resourceUrl','Operato\x20Tool\x20Create\x20Menu','hiddenFlag','Mutation','\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}','searchOper','category','update','dataProp','Arg','pluralize','join','7705220ZArkxy','state','left','refName','__param','utf8','push','{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22','template','updatedAt','createSortCols','@things-factory/meta-ui/client/pages/meta-grist-page','findOne','design:returntype','updater_id','select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27','length','@things-factory/resource-base','\x22,\x22hidden\x22:','split','name','h1z0q9i9x7q6','default','scenario','updated_at'];a0_0x1c8a=function(){return _0x32aeda;};return a0_0x1c8a();}Object[a0_0x3095ad(0x77)](exports,a0_0x3095ad(0xdd),{'value':!0x0}),exports[a0_0x3095ad(0xcc)]=void 0x0;const tslib_1=require('tslib'),type_graphql_1=require('type-graphql'),resource_base_1=require(a0_0x3095ad(0xae)),menu_base_1=require('@things-factory/menu-base'),tool_permission_1=require('./../tool-secret/tool-permission'),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x3095ad(0x79)),{plural:plural}=require(a0_0x3095ad(0x9b)),crypto_1=tslib_1['__importDefault'](require(a0_0x3095ad(0x8b)));let OperatoToolCreateMenu=class{async[a0_0x3095ad(0x8a)](_0x14d18e,_0x79d83b,_0x14e086){const _0x6ca6ff=a0_0x3095ad,{domain:_0x4a5ace,user:_0x403f8d,tx:_0x470823}=_0x14e086[_0x6ca6ff(0x9e)];await(0x0,tool_permission_1['checkStudioTemplateIsOverLimit'])('',_0x14e086);const _0xcc2392=await _0x470823[_0x6ca6ff(0xd0)](resource_base_1[_0x6ca6ff(0xcf)])[_0x6ca6ff(0xa9)]({'where':{'domain':{'id':_0x4a5ace['id']},'id':_0x14d18e}}),_0x5f4c47=await _0x470823[_0x6ca6ff(0xd0)](resource_base_1[_0x6ca6ff(0x8d)])[_0x6ca6ff(0x76)]({'where':{'domain':{'id':_0x4a5ace['id']},'entity':{'id':_0xcc2392['id']}}});let {name:_0x1405c=''}=_0xcc2392||{},_0x120b5f=kebabCase(_0x1405c),_0x4b2dd2=modelTemplate['replace'](/{{pascalCase name}}/g,startCase(camelCase(_0x1405c))[_0x6ca6ff(0xd1)](/ /g,''))[_0x6ca6ff(0xd1)](/{{camelCase name}}/g,camelCase(_0x1405c))[_0x6ca6ff(0xd1)](/{{snakeCase name}}/g,snakeCase(_0x1405c))[_0x6ca6ff(0xd1)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x1405c)))[_0x6ca6ff(0xd1)](/ /g,''))[_0x6ca6ff(0xd1)](/{{pluralCamelCase name}}/g,camelCase(plural(_0x1405c)))[_0x6ca6ff(0xd1)](/{{name}}/g,_0x1405c),_0x129f10='';_0x6ca6ff(0x74)==_0xcc2392[_0x6ca6ff(0x99)]?_0x129f10='\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':_0x6ca6ff(0x7d)==_0xcc2392[_0x6ca6ff(0x99)]&&(_0x129f10=_0x6ca6ff(0xba)),_0x4b2dd2=_0x4b2dd2[_0x6ca6ff(0xd1)](/{{HistoryButton}}/g,_0x129f10);let _0x1da3a9=this[_0x6ca6ff(0xa7)](_0x5f4c47);_0x4b2dd2=_0x4b2dd2['replace'](/{{SortColumns}}/g,_0x1da3a9[_0x6ca6ff(0x9c)](','));let _0x55ac94=this[_0x6ca6ff(0xd5)](_0x5f4c47);_0x4b2dd2=_0x4b2dd2[_0x6ca6ff(0xd1)](/{{SearchColumns}}/g,_0x55ac94['join'](','));let _0x240726=this[_0x6ca6ff(0xbf)](_0x5f4c47);return _0x4b2dd2=_0x4b2dd2[_0x6ca6ff(0xd1)](/{{GridColumns}}/g,_0x240726['join'](',')),_0x4b2dd2=this[_0x6ca6ff(0xdc)](_0x4b2dd2),await this[_0x6ca6ff(0x85)](_0x470823,_0x4a5ace,_0x403f8d,_0x79d83b,_0x120b5f,_0x4b2dd2),!0x0;}[a0_0x3095ad(0xbf)](_0x11d31d){const _0x48c105=a0_0x3095ad;return _0x11d31d[_0x48c105(0xd7)](_0x2fa7c3=>'id'!=_0x2fa7c3[_0x48c105(0xb1)]&&_0x2fa7c3[_0x48c105(0xc8)]>0x0)[_0x48c105(0x7c)](function(_0x310055,_0x2567e2){const _0x2e81ce=_0x48c105;return _0x310055[_0x2e81ce(0xc8)]-_0x2567e2[_0x2e81ce(0xc8)];})['map'](_0x231c7a=>{const _0x492f32=_0x48c105;let {gridEditor:_0x5cc202=_0x492f32(0xd4),name:_0x51996d,term:_0x513acd,gridWidth:_0x14cf7a=0x0,gridAlign:_0x57c03a=_0x492f32(0x9f),nullable:_0x2cce0c=!0x1}=_0x231c7a;if(null==_0x5cc202&&(_0x5cc202=_0x492f32(0xd4)),null==_0x57c03a&&(_0x57c03a=_0x492f32(0x9f)),_0x492f32(0xab)==_0x51996d||'creator_id'==_0x51996d)return _0x51996d='updater_id'==_0x51996d?'updater':'creator',_0x492f32(0xc0)+_0x51996d+_0x492f32(0xbe)+_0x51996d+_0x492f32(0x95);if(_0x492f32(0xb5)==_0x51996d||'created_at'==_0x51996d)return _0x492f32(0xa4)+(_0x492f32(0xb5)==_0x51996d?_0x492f32(0xa6):'createdAt')+_0x492f32(0xbe)+_0x51996d+_0x492f32(0xda);let _0x2bda62=_0x492f32(0x80)!=_0x5cc202&&_0x492f32(0xb6)!=_0x5cc202,_0x57b116='hidden'==_0x5cc202;0x1!=_0x57b116&&0x0!=_0x2bda62||(_0x5cc202=_0x492f32(0xd4));let _0x591811=_0x492f32(0x82)+_0x5cc202+_0x492f32(0x88)+camelCase(_0x51996d)+_0x492f32(0xbe)+_0x513acd+_0x492f32(0xaf)+_0x57b116+_0x492f32(0x78)+_0x2bda62+',\x22mandatory\x22:\x20'+!_0x2cce0c+_0x492f32(0xd2)+_0x57c03a+_0x492f32(0xb8)+_0x14cf7a+_0x492f32(0xc2);return'code'==_0x231c7a[_0x492f32(0xc7)]&&(_0x591811+=',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22'+_0x231c7a['refName']+'\x22}'),_0x492f32(0xb4)==_0x231c7a[_0x492f32(0xc7)]&&(_0x591811+=_0x492f32(0x8c)+_0x231c7a['refName']+'\x22}'),'entity'==_0x231c7a['refType']&&(_0x591811+=',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22'+camelCase(plural(_0x231c7a[_0x492f32(0xa0)]))+_0x492f32(0x84)),_0x591811+='}',_0x591811;});}[a0_0x3095ad(0xd5)](_0x203b7d){const _0x1df245=a0_0x3095ad;return _0x203b7d[_0x1df245(0xd7)](_0x7e2326=>_0x7e2326[_0x1df245(0xbd)]>0x0)[_0x1df245(0x7c)](function(_0x2e44cb,_0x523507){const _0x1cc4c9=_0x1df245;return _0x2e44cb[_0x1cc4c9(0xbd)]-_0x523507['searchRank'];})[_0x1df245(0xe1)](_0x38957d=>{const _0x5ebb7b=_0x1df245;let _0x260004=_0x38957d[_0x5ebb7b(0x96)];return'filter'==_0x260004?'\x22'+camelCase(_0x38957d[_0x5ebb7b(0xb1)])+'\x22':(_0x260004||(_0x260004='eq'),'{\x22name\x22:\x20\x22'+camelCase(_0x38957d[_0x5ebb7b(0xb1)])+_0x5ebb7b(0xb9)+_0x260004+'\x22}');});}['createSortCols'](_0x31a2a5){const _0xcdca4f=a0_0x3095ad;return _0x31a2a5['filter'](_0x3b975e=>_0x3b975e[_0xcdca4f(0x89)]>0x0)[_0xcdca4f(0x7c)](function(_0x5ceffc,_0x52254c){const _0x3e37f5=_0xcdca4f;return _0x5ceffc[_0x3e37f5(0x89)]-_0x52254c['sortRank'];})['map'](_0x186490=>_0xcdca4f(0xce)+camelCase(_0x186490[_0xcdca4f(0xb1)])+'\x22,\x22desc\x22:'+_0x186490[_0xcdca4f(0x75)]+'}');}async[a0_0x3095ad(0x85)](_0xe3f6b4,_0x326a7f,_0x416a4d,_0x239cff,_0x30a4e9,_0x94cd68){const _0x527d0a=a0_0x3095ad;let _0x442ad5=await _0xe3f6b4[_0x527d0a(0xd0)](menu_base_1[_0x527d0a(0xc9)])[_0x527d0a(0xa9)]({'where':{'domain':{'id':_0x326a7f['id']},'id':_0x239cff}}),_0x15c37b=(await _0xe3f6b4[_0x527d0a(0xd0)](menu_base_1['Menu'])[_0x527d0a(0xcd)](_0x527d0a(0xac)+_0x239cff+'\x27\x20or\x20id\x20=\x20\x27'+_0x239cff+'\x27'))[0x0]['rank']+0xa,_0x3f2c1a=new menu_base_1[(_0x527d0a(0xc9))]();_0x3f2c1a[_0x527d0a(0xb1)]=_0x30a4e9,_0x3f2c1a['menuType']=_0x527d0a(0x83),_0x3f2c1a[_0x527d0a(0x97)]=_0x527d0a(0x90),_0x3f2c1a[_0x527d0a(0xbc)]=_0x15c37b,_0x3f2c1a[_0x527d0a(0x93)]=!0x1,_0x3f2c1a['routing']=_0x30a4e9,_0x3f2c1a[_0x527d0a(0xa5)]=_0x94cd68,_0x3f2c1a[_0x527d0a(0x91)]=_0x527d0a(0xa8),_0x3f2c1a[_0x527d0a(0xd9)]=_0x442ad5,await _0xe3f6b4['getRepository'](menu_base_1[_0x527d0a(0xc9)])[_0x527d0a(0x73)](Object[_0x527d0a(0xe0)](Object[_0x527d0a(0xe0)]({},_0x3f2c1a),{'domain':_0x326a7f,'creator':_0x416a4d,'updater':_0x416a4d}));}['enc'](_0x38e43a){const _0x28fc9a=a0_0x3095ad;let _0xc243ce=JSON[_0x28fc9a(0x7b)](_0x38e43a)[_0x28fc9a(0xb0)](/(.{100})/)[_0x28fc9a(0xd7)](_0x50b44e=>_0x50b44e),_0x346d54=[_0x28fc9a(0xde),'aes-256-cbc',_0x28fc9a(0xe2),'aes-256-cfb8',_0x28fc9a(0xd3),'aes-256-ofb','aes-256-ctr','aes256'],_0x584932=crypto_1[_0x28fc9a(0xb3)][_0x28fc9a(0x7a)](0x20)[_0x28fc9a(0xc5)](_0x28fc9a(0x72)),_0x172fbf=Buffer[_0x28fc9a(0xbb)](_0x584932,_0x28fc9a(0x72)),_0x421d23=_0x584932[_0x28fc9a(0x7e)](0x0,0x10),_0x2628f1=['',_0x421d23,_0x421d23,_0x421d23,_0x421d23,_0x421d23,_0x421d23,_0x421d23],_0x26765c=0x0,_0x2162a2=[];_0x2162a2[_0x28fc9a(0xa3)](_0x584932);for(var _0x28571e=0x0;_0x28571e<_0xc243ce['length'];_0x28571e++,_0x26765c++){_0x26765c==_0x346d54[_0x28fc9a(0xad)]&&(_0x26765c=0x0);let _0x1739b2=crypto_1[_0x28fc9a(0xb3)]['createCipheriv'](_0x346d54[_0x26765c],_0x172fbf,_0x2628f1[_0x26765c]),_0x1c8569=_0x1739b2[_0x28fc9a(0x98)](_0xc243ce[_0x28571e],_0x28fc9a(0xa2),_0x28fc9a(0x72));_0x1c8569+=_0x1739b2[_0x28fc9a(0xd8)](_0x28fc9a(0x72)),_0x2162a2[_0x28fc9a(0xa3)](_0x1c8569);}return _0x2162a2['join'](_0x28fc9a(0xb2));}};tslib_1[a0_0x3095ad(0xcb)]([(0x0,type_graphql_1['Directive'])('@transaction'),(0x0,type_graphql_1[a0_0x3095ad(0x94)])(_0x32e829=>Boolean,{'description':a0_0x3095ad(0x92)}),tslib_1[a0_0x3095ad(0xa1)](0x0,(0x0,type_graphql_1['Arg'])('id')),tslib_1[a0_0x3095ad(0xa1)](0x1,(0x0,type_graphql_1[a0_0x3095ad(0x9a)])(a0_0x3095ad(0x86))),tslib_1[a0_0x3095ad(0xa1)](0x2,(0x0,type_graphql_1['Ctx'])()),tslib_1[a0_0x3095ad(0x8f)](a0_0x3095ad(0x8e),Function),tslib_1['__metadata'](a0_0x3095ad(0xb7),[String,String,Object]),tslib_1[a0_0x3095ad(0x8f)](a0_0x3095ad(0xaa),Promise)],OperatoToolCreateMenu[a0_0x3095ad(0xc3)],a0_0x3095ad(0x8a),null),OperatoToolCreateMenu=tslib_1[a0_0x3095ad(0xcb)]([(0x0,type_graphql_1['Resolver'])()],OperatoToolCreateMenu),exports[a0_0x3095ad(0xcc)]=OperatoToolCreateMenu;const modelTemplate=a0_0x3095ad(0xc6);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x474fd6=a0_0x2160;(function(_0x35db32,_0x1c9644){const _0x4a033b=a0_0x2160,_0x21e337=_0x35db32();while(!![]){try{const _0x1e302e=parseInt(_0x4a033b(0x178))/0x1*(-parseInt(_0x4a033b(0x190))/0x2)+-parseInt(_0x4a033b(0x15b))/0x3*(parseInt(_0x4a033b(0x132))/0x4)+-parseInt(_0x4a033b(0x16b))/0x5+-parseInt(_0x4a033b(0x18b))/0x6*(parseInt(_0x4a033b(0x18e))/0x7)+-parseInt(_0x4a033b(0x134))/0x8*(parseInt(_0x4a033b(0x139))/0x9)+-parseInt(_0x4a033b(0x144))/0xa*(parseInt(_0x4a033b(0x19b))/0xb)+parseInt(_0x4a033b(0x143))/0xc*(parseInt(_0x4a033b(0x11d))/0xd);if(_0x1e302e===_0x1c9644)break;else _0x21e337['push'](_0x21e337['shift']());}catch(_0x5ff9d6){_0x21e337['push'](_0x21e337['shift']());}}}(a0_0xd096,0x510b5));Object[a0_0x474fd6(0x125)](exports,a0_0x474fd6(0x141),{'value':!0x0}),exports[a0_0x474fd6(0x14f)]=void 0x0;function a0_0xd096(){const _0x1ba52d=['columnToEntityColumn','export\x20*\x20from\x20\x27./','\x27,\x20type:\x20\x27','\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','EntityColumn','defineProperty','packages','import\x20{\x20entities\x20as\x20','\x0a\x20\x20','createTypeText','pascalCaseName','date','Resolvers,','mkdirSync','env','/event-subscriber.ts','pluralCamelCaseName','Ctx','8eeFQip','design:type','50376JwumXc','/packages','float','existsPath','-type.ts','243GwgsEu','utf8','decimal','/service','map','/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...','{{camelCase\x20name}}.','...','__esModule','createHistoryServiceFiles','2316bFJGrg','3470EWJGwW','length','lodash','type\x20=>','createHistoryEntityText','\x0aimport\x20{\x20ObjectType,\x20Field,\x20InputType,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0a\x0a@ObjectType()\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryList\x20{\x0a\x20\x20@Field(type\x20=>\x20[{{pascalCase\x20name}}History])\x0a\x20\x20items:\x20{{pascalCase\x20name}}History[]\x0a\x0a\x20\x20@Field(type\x20=>\x20Int)\x0a\x20\x20total:\x20number\x0a}\x0a','/packages/','PWD','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','indexOf','-history-type.ts','OperatoToolCreateService','\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','replaceNamesMap','__metadata','Arg','prototype','__param','index.ts','creator','rank','JSON','Resolvers\x20}\x20from\x20\x27./','891060mXQZWr','@Column({name:\x27','split','\x20})','string','includes','createEntityText','/index.ts','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','timestamp\x20without\x20time\x20zone','updated_at','find','sort','creator_id','number','\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','616570SktYES','createServiceFiles','toolCreateService','Operato\x20Tool\x20Create\x20Service','readFileSync','-query.ts','\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201','join','EntitySubscribers\x20}\x20from\x20\x27./','datetime','/server/service/','__decorate','\x20{\x20nullable:\x20','24FKAsjY','\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','name','\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','findOne','double\x20precision','updater_id','Entities,','getRepository','dataProp','integer','@Field(','double','state','getProjectRootPath','text','\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','-mutation.ts','push','6bvedpK','nullable','Resolvers,\x20subscribers\x20as\x20','157871VxUyRZ','.ts','11758DVNQVR','Int','design:paramtypes','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','\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','\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','createDir','replace','getFieldType','created_at','COPY','20669OrVbZa','writeFileSync','createServicePath','colSize','Entity','getColTxtType','colType','uniqRank','-history\x27','pluralPascalCaseName','domain_id','writeFile','tableName','@things-factory/resource-base','character\x20varying','snakeCaseName','Resolver','long','createNoHistoryServiceFiels','domain','EntitySubscribers,','137072iQByKr','Float','Entities,\x20resolvers\x20as\x20'];a0_0xd096=function(){return _0x1ba52d;};return a0_0xd096();}const tslib_1=require('tslib'),type_graphql_1=require('type-graphql'),shell_1=require('@things-factory/shell'),resource_base_1=require(a0_0x474fd6(0x1a8)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x474fd6(0x146)),{plural:plural}=require('pluralize'),fs=require('fs');let OperatoToolCreateService=class{async[a0_0x474fd6(0x16d)](_0x4d2b4c,_0x32495b){const _0x4c43a9=a0_0x474fd6,{domain:_0x569297}=_0x32495b[_0x4c43a9(0x185)],_0x1dd8e9=await(0x0,shell_1[_0x4c43a9(0x180)])(resource_base_1[_0x4c43a9(0x19f)])[_0x4c43a9(0x17c)]({'where':{'id':_0x4d2b4c}}),_0x1818a0=await(0x0,shell_1['getRepository'])(resource_base_1[_0x4c43a9(0x124)])[_0x4c43a9(0x166)]({'where':{'domain':{'id':_0x569297['id']},'entity':{'id':_0x1dd8e9['id']}}});let {name:_0x48ec84='',bundle:_0x22fbb2=''}=_0x1dd8e9||{},_0x41a789=this[_0x4c43a9(0x186)](),_0x5a8a53=kebabCase(_0x48ec84);return await this[_0x4c43a9(0x19d)](_0x41a789,_0x22fbb2,_0x5a8a53),await this[_0x4c43a9(0x16c)](_0x41a789,_0x22fbb2,_0x48ec84,_0x5a8a53,_0x1dd8e9,_0x1818a0),!0x0;}async[a0_0x474fd6(0x16c)](_0x952680,_0x5409af,_0x23887f,_0x48b2f9,_0x2f419f,_0x444a67){const _0x485ac8=a0_0x474fd6;let _0x3d37d9={'name':_0x48b2f9,'tableName':_0x2f419f[_0x485ac8(0x1a7)],'pascalCaseName':startCase(camelCase(_0x23887f))[_0x485ac8(0x197)](/ /g,''),'camelCaseName':camelCase(_0x23887f),'snakeCaseName':snakeCase(_0x23887f),'pluralPascalCaseName':startCase(camelCase(plural(_0x23887f)))[_0x485ac8(0x197)](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x23887f))},_0x137199=_0x952680+_0x485ac8(0x14a)+_0x5409af+_0x485ac8(0x175);[_0x485ac8(0x159),_0x485ac8(0x19a)][_0x485ac8(0x160)](_0x2f419f[_0x485ac8(0x181)])?await this[_0x485ac8(0x142)](_0x137199,_0x48b2f9,_0x2f419f,_0x444a67,_0x3d37d9):await this['createNoHistoryServiceFiels'](_0x137199,_0x48b2f9,_0x2f419f,_0x444a67,_0x3d37d9);}async[a0_0x474fd6(0x142)](_0x1aff92,_0x28f31d,_0x4ad789,_0x4ecdb4,_0x4eead2){const _0x7957d=a0_0x474fd6;await this['writeFile'](_0x1aff92+(_0x28f31d+_0x7957d(0x162)),serviceHistoryIndex,_0x4eead2);let _0x172713=this[_0x7957d(0x161)](_0x4ad789,_0x4ecdb4);await this['writeFile'](_0x1aff92+(_0x28f31d+'/'+_0x28f31d+_0x7957d(0x18f)),_0x172713,_0x4eead2),await this[_0x7957d(0x1a6)](_0x1aff92+(_0x28f31d+'/'+_0x28f31d+_0x7957d(0x170)),serviceQuery,_0x4eead2),await this['writeFile'](_0x1aff92+(_0x28f31d+'/'+_0x28f31d+'-mutation.ts'),serviceMutation,_0x4eead2);let _0x1c7214=this['createTypeText'](_0x4ecdb4);await this[_0x7957d(0x1a6)](_0x1aff92+(_0x28f31d+'/'+_0x28f31d+_0x7957d(0x138)),_0x1c7214,_0x4eead2);let _0x550ad5=this[_0x7957d(0x148)](_0x4ad789,_0x4ecdb4);await this[_0x7957d(0x1a6)](_0x1aff92+(_0x28f31d+'/'+_0x28f31d+'-history.ts'),_0x550ad5,_0x4eead2);let _0x313087='';_0x7957d(0x159)==_0x4ad789[_0x7957d(0x181)]?(_0x313087=_0x7957d(0x195),await this[_0x7957d(0x1a6)](_0x1aff92+(_0x28f31d+'/event-subscriber.ts'),serviceEntitySubscriber,_0x4eead2)):_0x313087='';let _0x2b1142=serviceEntitySubscriber['replace'](/{{entityToJson}}/g,_0x313087);await this['writeFile'](_0x1aff92+(_0x28f31d+_0x7957d(0x12f)),_0x2b1142,_0x4eead2),await this[_0x7957d(0x1a6)](_0x1aff92+(_0x28f31d+'/'+_0x28f31d+'-history-query.ts'),serviceHistoryQuery,_0x4eead2),await this[_0x7957d(0x1a6)](_0x1aff92+(_0x28f31d+'/'+_0x28f31d+_0x7957d(0x14e)),sereviceHistoryType,_0x4eead2);let _0xab39fe=_0x1aff92+_0x7957d(0x156);0x0==await this['existsPath'](_0xab39fe)&&await this[_0x7957d(0x1a6)](_0xab39fe,allIndex,_0x4eead2);let _0x52ec37=await fs[_0x7957d(0x16f)](_0xab39fe,_0x7957d(0x13a));_0x52ec37[_0x7957d(0x14d)]('export\x20*\x20from\x20\x27./'+_0x4eead2[_0x7957d(0x17a)]+'/'+_0x4eead2[_0x7957d(0x17a)]+'-history\x27')<0x0&&(_0x52ec37=_0x52ec37[_0x7957d(0x197)](/\/\* EXPORT ENTITY TYPES \*\//,_0x7957d(0x163)+_0x4eead2[_0x7957d(0x17a)]+'/'+_0x4eead2[_0x7957d(0x17a)]+_0x7957d(0x1a3))),_0x52ec37[_0x7957d(0x14d)](_0x7957d(0x121)+_0x4eead2['name']+'/'+_0x4eead2[_0x7957d(0x17a)]+'\x27')<0x0&&(_0x52ec37=_0x52ec37['replace'](/\/\* EXPORT ENTITY TYPES \*\//,'/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./'+_0x4eead2['name']+'/'+_0x4eead2['name']+'\x27')),_0x52ec37[_0x7957d(0x14d)](_0x7957d(0x127)+_0x4eead2[_0x7957d(0x12a)]+_0x7957d(0x11f)+_0x4eead2[_0x7957d(0x12a)]+_0x7957d(0x18d)+_0x4eead2[_0x7957d(0x12a)]+_0x7957d(0x173)+_0x4eead2['name']+'\x27')<0x0&&(_0x52ec37=_0x52ec37[_0x7957d(0x197)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x7957d(0x14c)+_0x4eead2['pascalCaseName']+'Entities,\x20resolvers\x20as\x20'+_0x4eead2[_0x7957d(0x12a)]+'Resolvers,\x20subscribers\x20as\x20'+_0x4eead2[_0x7957d(0x12a)]+_0x7957d(0x173)+_0x4eead2[_0x7957d(0x17a)]+'\x27')),_0x52ec37[_0x7957d(0x14d)](_0x7957d(0x140)+_0x4eead2[_0x7957d(0x12a)]+_0x7957d(0x17f))<0x0&&(_0x52ec37=_0x52ec37['replace'](/\/\* ENTITIES \*\//,'/*\x20ENTITIES\x20*/\x0a\x09...'+_0x4eead2[_0x7957d(0x12a)]+_0x7957d(0x17f))),_0x52ec37[_0x7957d(0x14d)](_0x7957d(0x140)+_0x4eead2[_0x7957d(0x12a)]+'Resolvers,')<0x0&&(_0x52ec37=_0x52ec37[_0x7957d(0x197)](/\/\* RESOLVER CLASSES \*\//,_0x7957d(0x193)+_0x4eead2[_0x7957d(0x12a)]+_0x7957d(0x12c))),_0x52ec37['indexOf'](_0x7957d(0x140)+_0x4eead2[_0x7957d(0x12a)]+_0x7957d(0x11c))<0x0&&(_0x52ec37=_0x52ec37['replace'](/\/\* SUBSCRIBERS \*\//,_0x7957d(0x13e)+_0x4eead2[_0x7957d(0x12a)]+_0x7957d(0x11c))),await this[_0x7957d(0x1a6)](_0xab39fe,_0x52ec37,_0x4eead2);}async[a0_0x474fd6(0x11a)](_0x4316e3,_0x4606a1,_0x4ece9f,_0x38e9dd,_0x203c02){const _0x493f22=a0_0x474fd6;await this[_0x493f22(0x1a6)](_0x4316e3+(_0x4606a1+_0x493f22(0x162)),serviceIndex,_0x203c02),await this[_0x493f22(0x1a6)](_0x4316e3+(_0x4606a1+'/'+_0x4606a1+_0x493f22(0x170)),serviceQuery,_0x203c02),await this[_0x493f22(0x1a6)](_0x4316e3+(_0x4606a1+'/'+_0x4606a1+_0x493f22(0x189)),serviceMutation,_0x203c02);let _0x558913=this[_0x493f22(0x161)](_0x4ece9f,_0x38e9dd);await this['writeFile'](_0x4316e3+(_0x4606a1+'/'+_0x4606a1+_0x493f22(0x18f)),_0x558913,_0x203c02);let _0x2cc3d4=this[_0x493f22(0x129)](_0x38e9dd);await this[_0x493f22(0x1a6)](_0x4316e3+(_0x4606a1+'/'+_0x4606a1+_0x493f22(0x138)),_0x2cc3d4,_0x203c02);let _0x196666=_0x4316e3+_0x493f22(0x156);0x0==await this[_0x493f22(0x137)](_0x196666)&&await this[_0x493f22(0x1a6)](_0x196666,allIndex,_0x203c02);let _0x4c587a=await fs[_0x493f22(0x16f)](_0x196666,_0x493f22(0x13a));_0x4c587a[_0x493f22(0x14d)](_0x493f22(0x121)+_0x203c02['name']+'/'+_0x203c02[_0x493f22(0x17a)]+'\x27')<0x0&&(_0x4c587a=_0x4c587a[_0x493f22(0x197)](/\/\* EXPORT ENTITY TYPES \*\//,'/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./'+_0x203c02[_0x493f22(0x17a)]+'/'+_0x203c02[_0x493f22(0x17a)]+'\x27')),_0x4c587a[_0x493f22(0x14d)](_0x493f22(0x127)+_0x203c02[_0x493f22(0x12a)]+_0x493f22(0x11f)+_0x203c02['pascalCaseName']+_0x493f22(0x15a)+_0x203c02[_0x493f22(0x17a)]+'\x27')<0x0&&(_0x4c587a=_0x4c587a[_0x493f22(0x197)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,'/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20'+_0x203c02[_0x493f22(0x12a)]+_0x493f22(0x11f)+_0x203c02[_0x493f22(0x12a)]+_0x493f22(0x15a)+_0x203c02[_0x493f22(0x17a)]+'\x27')),_0x4c587a[_0x493f22(0x14d)](_0x493f22(0x140)+_0x203c02[_0x493f22(0x12a)]+_0x493f22(0x17f))<0x0&&(_0x4c587a=_0x4c587a[_0x493f22(0x197)](/\/\* ENTITIES \*\//,'/*\x20ENTITIES\x20*/\x0a\x09...'+_0x203c02[_0x493f22(0x12a)]+_0x493f22(0x17f))),_0x4c587a[_0x493f22(0x14d)]('...'+_0x203c02[_0x493f22(0x12a)]+_0x493f22(0x12c))<0x0&&(_0x4c587a=_0x4c587a[_0x493f22(0x197)](/\/\* RESOLVER CLASSES \*\//,_0x493f22(0x193)+_0x203c02[_0x493f22(0x12a)]+_0x493f22(0x12c))),await this[_0x493f22(0x1a6)](_0x196666,_0x4c587a,_0x203c02);}[a0_0x474fd6(0x129)](_0xc23bcc){const _0x4cde20=a0_0x474fd6;let _0x1aeab3=sereviceType,_0x521be1=_0xc23bcc[_0x4cde20(0x13d)](_0x5a00e0=>{const _0xbbf23=_0x4cde20;if('id'==_0x5a00e0[_0xbbf23(0x17a)])return'';if(_0xbbf23(0x1a5)==_0x5a00e0[_0xbbf23(0x17a)])return'';if('created_at'==_0x5a00e0[_0xbbf23(0x17a)])return'';if(_0xbbf23(0x165)==_0x5a00e0['name'])return'';if('creator_id'==_0x5a00e0[_0xbbf23(0x17a)])return'';if(_0xbbf23(0x17e)==_0x5a00e0[_0xbbf23(0x17a)])return'';let _0x14fd55=this[_0xbbf23(0x198)](_0x5a00e0),_0x1aab9c=this[_0xbbf23(0x1a0)](_0x5a00e0),_0x3ed216=camelCase(_0x5a00e0[_0xbbf23(0x17a)]);return'\x20\x20'+(_0xbbf23(0x183)+(0x0==_0x14fd55['length']?'':'type\x20=>'+_0x14fd55+',')+_0xbbf23(0x177)+_0x5a00e0['nullable']+_0xbbf23(0x15e))+_0xbbf23(0x128)+(''+_0x3ed216+(_0x5a00e0['nullable']?'?':'')+':\x20'+_0x1aab9c)+'\x0a';});_0x1aeab3=_0x1aeab3[_0x4cde20(0x197)](/{{newTypeColumns}}/g,_0x521be1['join']('\x0a'));let _0x477f3e=_0xc23bcc['map'](_0x292e39=>{const _0x1a8af1=_0x4cde20;if('id'==_0x292e39[_0x1a8af1(0x17a)])return'';if(_0x1a8af1(0x1a5)==_0x292e39[_0x1a8af1(0x17a)])return'';if('created_at'==_0x292e39[_0x1a8af1(0x17a)])return'';if(_0x1a8af1(0x165)==_0x292e39[_0x1a8af1(0x17a)])return'';if(_0x1a8af1(0x168)==_0x292e39[_0x1a8af1(0x17a)])return'';if(_0x1a8af1(0x17e)==_0x292e39['name'])return'';let _0x18fd73=this[_0x1a8af1(0x198)](_0x292e39),_0x171858=this[_0x1a8af1(0x1a0)](_0x292e39);_0x292e39[_0x1a8af1(0x18c)]=!0x0;let _0x1e1739=camelCase(_0x292e39['name']);return'\x20\x20'+(_0x1a8af1(0x183)+(0x0==_0x18fd73[_0x1a8af1(0x145)]?'':_0x1a8af1(0x147)+_0x18fd73+',')+'\x20{\x20nullable:\x20'+_0x292e39[_0x1a8af1(0x18c)]+_0x1a8af1(0x15e))+_0x1a8af1(0x128)+(''+_0x1e1739+(_0x292e39[_0x1a8af1(0x18c)]?'?':'')+':\x20'+_0x171858)+'\x0a';});return _0x1aeab3=_0x1aeab3[_0x4cde20(0x197)](/{{patchTypeColumns}}/g,_0x477f3e[_0x4cde20(0x172)]('\x0a')),_0x1aeab3;}[a0_0x474fd6(0x161)](_0x1fc539,_0x3fe295){const _0x60e69a=a0_0x474fd6;let _0xbc08f4=serviceEntity,_0x3873e8=_0x3fe295[_0x60e69a(0x167)](function(_0x5b5869,_0x4e055e){return _0x5b5869['rank']-_0x4e055e['rank'];})[_0x60e69a(0x13d)](_0xcc6844=>this[_0x60e69a(0x120)](_0xcc6844));['COPY',_0x60e69a(0x159)][_0x60e69a(0x160)](_0x1fc539[_0x60e69a(0x181)])&&_0x3873e8[_0x60e69a(0x18a)](_0x60e69a(0x171)),_0xbc08f4=_0xbc08f4[_0x60e69a(0x197)](/{{entityColumns}}/g,_0x3873e8[_0x60e69a(0x172)]('\x0a'));let _0x1434fc='',_0x302000=_0x3fe295['filter'](_0x3c1ff8=>_0x3c1ff8['uniqRank']&&_0x3c1ff8[_0x60e69a(0x1a2)]>0x0)[_0x60e69a(0x167)](function(_0x4d7b23,_0x24bfff){const _0x1169c9=_0x60e69a;return _0x4d7b23[_0x1169c9(0x1a2)]-_0x24bfff['uniqRank'];});if(_0x302000[_0x60e69a(0x145)]>0x0){_0x1434fc='@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})';let _0x535d90=_0x302000[_0x60e69a(0x13d)](_0x52130d=>{const _0x4df7bd=_0x60e69a;let _0x15d547=_0x52130d[_0x4df7bd(0x17a)];return _0x4df7bd(0x1a5)==_0x52130d[_0x4df7bd(0x17a)]&&(_0x15d547=_0x4df7bd(0x11b)),_0x4df7bd(0x168)==_0x52130d[_0x4df7bd(0x17a)]&&(_0x15d547=_0x4df7bd(0x157)),'updater_id'==_0x52130d[_0x4df7bd(0x17a)]&&(_0x15d547='updater'),_0x4df7bd(0x13f)+camelCase(_0x15d547);});_0x1434fc=_0x1434fc[_0x60e69a(0x197)](/{{indexColumns}}/g,_0x535d90['join'](','));}return _0xbc08f4=_0xbc08f4[_0x60e69a(0x197)](/{{indexAnn}}/g,_0x1434fc),_0xbc08f4;}[a0_0x474fd6(0x148)](_0x28e517,_0x48745d){const _0x58fda7=a0_0x474fd6;let _0x3a0124='JSON'==_0x28e517[_0x58fda7(0x181)]?serviceEntityHistJson:serviceEntityHistCopy,_0x7634ec=_0x48745d[_0x58fda7(0x167)](function(_0x146bb5,_0x422390){const _0x3b27e4=_0x58fda7;return _0x146bb5[_0x3b27e4(0x158)]-_0x422390[_0x3b27e4(0x158)];})[_0x58fda7(0x13d)](_0x3d7b95=>this[_0x58fda7(0x120)](_0x3d7b95));return _0x3a0124=_0x3a0124[_0x58fda7(0x197)](/{{entityColumns}}/g,_0x7634ec[_0x58fda7(0x172)]('\x0a')),_0x3a0124;}[a0_0x474fd6(0x120)](_0x1855dd){const _0xce48af=a0_0x474fd6;if('id'==_0x1855dd[_0xce48af(0x17a)])return'';if('domain_id'==_0x1855dd['name'])return'';if(_0xce48af(0x199)==_0x1855dd['name'])return'';if(_0xce48af(0x165)==_0x1855dd['name'])return'';if('creator_id'==_0x1855dd[_0xce48af(0x17a)])return'';if(_0xce48af(0x17e)==_0x1855dd[_0xce48af(0x17a)])return'';let _0x38f577=_0x1855dd[_0xce48af(0x1a1)];'double'==_0x1855dd[_0xce48af(0x1a1)]&&(_0x38f577=_0xce48af(0x17d)),_0xce48af(0x1ac)==_0x1855dd['colType']&&(_0x38f577='bigint'),_0xce48af(0x15f)==_0x1855dd['colType']&&(_0x38f577=_0xce48af(0x1a9)),_0xce48af(0x174)==_0x1855dd[_0xce48af(0x1a1)]&&(_0x38f577=_0xce48af(0x164));let _0x39b6f4='';_0xce48af(0x15f)==_0x1855dd['colType']&&(_0x39b6f4=_0x1855dd[_0xce48af(0x19e)]);let _0x572446=this[_0xce48af(0x198)](_0x1855dd),_0x20ff33=this[_0xce48af(0x1a0)](_0x1855dd),_0x417bab=camelCase(_0x1855dd[_0xce48af(0x17a)]);return'\x20\x20'+(_0xce48af(0x15c)+_0x1855dd[_0xce48af(0x17a)]+_0xce48af(0x122)+_0x38f577+'\x27,\x20nullable:\x20'+_0x1855dd[_0xce48af(0x18c)]+'\x20'+(0x0==_0x39b6f4[_0xce48af(0x145)]?'':',length:'+_0x39b6f4)+'\x20})')+_0xce48af(0x128)+('@Field('+(0x0==_0x572446[_0xce48af(0x145)]?'':_0xce48af(0x147)+_0x572446+',')+_0xce48af(0x177)+_0x1855dd['nullable']+_0xce48af(0x15e))+_0xce48af(0x128)+(''+_0x417bab+(_0x1855dd[_0xce48af(0x18c)]?'?':'')+':\x20'+_0x20ff33)+'\x0a';}[a0_0x474fd6(0x198)](_0x25200b){const _0xc21824=a0_0x474fd6;let _0x3405a1='';return _0xc21824(0x184)==_0x25200b[_0xc21824(0x1a1)]&&(_0x3405a1=_0xc21824(0x11e)),_0xc21824(0x136)==_0x25200b[_0xc21824(0x1a1)]&&(_0x3405a1=_0xc21824(0x11e)),'long'==_0x25200b[_0xc21824(0x1a1)]&&(_0x3405a1='Int'),_0xc21824(0x182)==_0x25200b['colType']&&(_0x3405a1=_0xc21824(0x191)),_0x3405a1;}['getColTxtType'](_0x51c4ab){const _0x59591a=a0_0x474fd6;let _0xe0fd61=_0x51c4ab[_0x59591a(0x1a1)];return _0x59591a(0x13b)==_0x51c4ab['colType']&&(_0xe0fd61=_0x59591a(0x169)),_0x59591a(0x184)==_0x51c4ab[_0x59591a(0x1a1)]&&(_0xe0fd61=_0x59591a(0x169)),_0x59591a(0x136)==_0x51c4ab[_0x59591a(0x1a1)]&&(_0xe0fd61=_0x59591a(0x169)),_0x59591a(0x182)==_0x51c4ab[_0x59591a(0x1a1)]&&(_0xe0fd61=_0x59591a(0x169)),_0x59591a(0x1ac)==_0x51c4ab[_0x59591a(0x1a1)]&&(_0xe0fd61=_0x59591a(0x169)),_0x59591a(0x174)==_0x51c4ab[_0x59591a(0x1a1)]&&(_0xe0fd61='Date'),_0x59591a(0x12b)==_0x51c4ab[_0x59591a(0x1a1)]&&(_0xe0fd61='Date'),_0x59591a(0x187)==_0x51c4ab[_0x59591a(0x1a1)]&&(_0xe0fd61=_0x59591a(0x15f)),_0xe0fd61;}async['writeFile'](_0x116196,_0x121409,_0x5efcbf){const _0x39f6f6=a0_0x474fd6;await fs[_0x39f6f6(0x19c)](_0x116196,this[_0x39f6f6(0x151)](_0x121409,_0x5efcbf),'utf8');}[a0_0x474fd6(0x151)](_0x527e2f,_0x3e280f){const _0x32c455=a0_0x474fd6;return _0x527e2f[_0x32c455(0x197)](/{{pascalCase name}}/g,_0x3e280f[_0x32c455(0x12a)])['replace'](/{{camelCase name}}/g,_0x3e280f['camelCaseName'])[_0x32c455(0x197)](/{{snakeCase name}}/g,_0x3e280f[_0x32c455(0x1aa)])['replace'](/{{pluralPascalCase name}}/g,_0x3e280f[_0x32c455(0x1a4)])[_0x32c455(0x197)](/{{pluralCamelCase name}}/g,_0x3e280f[_0x32c455(0x130)])['replace'](/{{tableName}}/g,_0x3e280f[_0x32c455(0x1a7)])[_0x32c455(0x197)](/{{name}}/g,_0x3e280f['name']);}async[a0_0x474fd6(0x19d)](_0x2ff717,_0x4a5ae2,_0x44293b){const _0x21b029=a0_0x474fd6;let _0x47e934=_0x2ff717+_0x21b029(0x135);await this[_0x21b029(0x196)](_0x47e934),_0x47e934=_0x47e934+'/'+_0x4a5ae2,await this['createDir'](_0x47e934),_0x47e934+='/server',await this['createDir'](_0x47e934),_0x47e934+=_0x21b029(0x13c),await this['createDir'](_0x47e934),_0x47e934=_0x47e934+'/'+_0x44293b,await this['createDir'](_0x47e934);}[a0_0x474fd6(0x186)](){const _0x5ae696=a0_0x474fd6;let _0x427dd4=process[_0x5ae696(0x12e)][_0x5ae696(0x14b)][_0x5ae696(0x15d)]('/'),_0x2dbef9=[];for(let _0x3aaac1=0x0;_0x3aaac1<_0x427dd4['length']&&_0x5ae696(0x126)!=_0x427dd4[_0x3aaac1];_0x3aaac1++)_0x2dbef9['push'](_0x427dd4[_0x3aaac1]);return _0x2dbef9[_0x5ae696(0x172)]('/');}async['createDir'](_0x507393){const _0x186b3c=a0_0x474fd6;0x0==await this['existsPath'](_0x507393)&&fs[_0x186b3c(0x12d)](_0x507393);}async[a0_0x474fd6(0x137)](_0x147e67){return await fs['existsSync'](_0x147e67);}};function a0_0x2160(_0x236d32,_0x29d9ec){const _0xd0966b=a0_0xd096();return a0_0x2160=function(_0x216078,_0x548e73){_0x216078=_0x216078-0x11a;let _0x2abec2=_0xd0966b[_0x216078];return _0x2abec2;},a0_0x2160(_0x236d32,_0x29d9ec);}tslib_1[a0_0x474fd6(0x176)]([(0x0,type_graphql_1['Query'])(_0x500363=>Boolean,{'description':a0_0x474fd6(0x16e)}),tslib_1[a0_0x474fd6(0x155)](0x0,(0x0,type_graphql_1[a0_0x474fd6(0x153)])('id')),tslib_1[a0_0x474fd6(0x155)](0x1,(0x0,type_graphql_1[a0_0x474fd6(0x131)])()),tslib_1[a0_0x474fd6(0x152)](a0_0x474fd6(0x133),Function),tslib_1[a0_0x474fd6(0x152)](a0_0x474fd6(0x192),[String,Object]),tslib_1[a0_0x474fd6(0x152)]('design:returntype',Promise)],OperatoToolCreateService[a0_0x474fd6(0x154)],a0_0x474fd6(0x16d),null),OperatoToolCreateService=tslib_1[a0_0x474fd6(0x176)]([(0x0,type_graphql_1[a0_0x474fd6(0x1ab)])()],OperatoToolCreateService),exports[a0_0x474fd6(0x14f)]=OperatoToolCreateService;const allIndex=a0_0x474fd6(0x150),serviceIndex=a0_0x474fd6(0x179),serviceHistoryIndex='\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryQuery\x20}\x20from\x20\x27./{{name}}-history-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryEntitySubscriber\x20}\x20from\x20\x27./event-subscriber\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}},\x20{{pascalCase\x20name}}History]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}HistoryQuery,\x20{{pascalCase\x20name}}Mutation]\x0aexport\x20const\x20subscribers\x20=\x20[{{pascalCase\x20name}}HistoryEntitySubscriber]\x0a\x0a',serviceQuery='\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}List\x20}\x20from\x20\x27./{{name}}-type\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Query\x20{\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20fetch\x20a\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20return\x20await\x20getRepository({{pascalCase\x20name}}).findOne({\x0a\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20}\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}List,\x20{\x20description:\x20\x27To\x20fetch\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{pluralCamelCase\x20name}}(@Args()\x20params:\x20ListParam,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}List>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20queryBuilder\x20=\x20getQueryBuilderFromListParams({\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20params,\x0a\x20\x20\x20\x20\x20\x20repository:\x20await\x20getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20const\x20convertedParams\x20=\x20convertListParams(params,\x20domain.id)\x0a\x20\x20\x20\x20const\x20[items,\x20total]\x20=\x20await\x20queryBuilder.getManyAndCount()\x0a\x0a\x20\x20\x20\x20return\x20{\x20items,\x20total\x20}\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20Domain)\x0a\x20\x20async\x20domain(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<Domain>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(Domain).findOneBy({id:{{camelCase\x20name}}.domainId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20updater(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.updaterId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20creator(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.creatorId})\x0a\x20\x20}\x0a}\x0a',serviceHistoryQuery=a0_0x474fd6(0x194),serviceMutation=a0_0x474fd6(0x17b),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_0x474fd6(0x149),serviceEntity=a0_0x474fd6(0x123),serviceEntityHistCopy=a0_0x474fd6(0x16a),serviceEntityHistJson='\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a\x20\x20@Column(\x27simple-json\x27,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20@Field(type\x20=>\x20ScalarObject,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20historyJson?:\x20any\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a',serviceEntitySubscriber=a0_0x474fd6(0x188);
|
|
1
|
+
'use strict';const a0_0x8dae72=a0_0x882d;(function(_0x1946b0,_0x583f39){const _0x4f0ed8=a0_0x882d,_0x34f5dd=_0x1946b0();while(!![]){try{const _0x3bb181=parseInt(_0x4f0ed8(0x205))/0x1+-parseInt(_0x4f0ed8(0x216))/0x2+-parseInt(_0x4f0ed8(0x1fe))/0x3+-parseInt(_0x4f0ed8(0x244))/0x4+parseInt(_0x4f0ed8(0x227))/0x5*(-parseInt(_0x4f0ed8(0x237))/0x6)+-parseInt(_0x4f0ed8(0x1f7))/0x7*(parseInt(_0x4f0ed8(0x277))/0x8)+parseInt(_0x4f0ed8(0x20b))/0x9;if(_0x3bb181===_0x583f39)break;else _0x34f5dd['push'](_0x34f5dd['shift']());}catch(_0x3f043d){_0x34f5dd['push'](_0x34f5dd['shift']());}}}(a0_0x3a4d,0x1eb2f));function a0_0x882d(_0x2a3221,_0x4d2fc5){const _0x3a4d48=a0_0x3a4d();return a0_0x882d=function(_0x882d04,_0x1072f2){_0x882d04=_0x882d04-0x1f4;let _0x1fc587=_0x3a4d48[_0x882d04];return _0x1fc587;},a0_0x882d(_0x2a3221,_0x4d2fc5);}Object[a0_0x8dae72(0x24c)](exports,a0_0x8dae72(0x21c),{'value':!0x0}),exports[a0_0x8dae72(0x21f)]=void 0x0;const tslib_1=require(a0_0x8dae72(0x27f)),type_graphql_1=require(a0_0x8dae72(0x209)),shell_1=require(a0_0x8dae72(0x240)),resource_base_1=require('@things-factory/resource-base'),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x8dae72(0x22f)),{plural:plural}=require(a0_0x8dae72(0x215)),fs=require('fs');function a0_0x3a4d(){const _0x887c64=['tslib','\x20{\x20nullable:\x20','JSON','getFieldType','Arg','length','existsPath','text','createHistoryEntityText','...','createHistoryServiceFiles','220577yOamlk','creator','getRepository','double\x20precision','__decorate','EntityColumn','Int','549813VsPIih','-history-type.ts','created_at','design:returntype','number','/event-subscriber.ts','toolCreateService','61497tsdkAl','env','createServiceFiles','-history-query.ts','type-graphql','Entities,','8857854oEBJjG','long','updater_id','-query.ts','push','tableName','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','createDir','rank','includes','pluralize','255638LHmjNa','date','COPY','replaceNamesMap','findOne','design:type','__esModule','/*\x20ENTITIES\x20*/\x0a\x09...','domain','OperatoToolCreateService',',length:','\x0a/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0a\x0a/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0a\x0aexport\x20const\x20entities\x20=\x20[\x20\x20\x0a\x20\x20/*\x20ENTITIES\x20*/\x0a]\x20\x0a\x0a\x0aexport\x20const\x20schema\x20=\x20{\x0a\x20\x20resolverClasses:\x20[\x0a\x20\x20\x20\x20/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x20\x20]\x20\x0a}\x0a\x0aexport\x20const\x20subscribers\x20=\x20[\x0a\x20\x20/*\x20SUBSCRIBERS\x20*/\x0a]\x0a','\x20})','bigint','\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','Entity','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','380870CKWeHs','join','export\x20*\x20from\x20\x27./','index.ts','updated_at','utf8','prototype','/packages/','lodash','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\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','packages','\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','readFileSync','Operato\x20Tool\x20Create\x20Service','\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','EntitySubscribers,','12ksLVFS','getColTxtType','camelCaseName','name','\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','\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','datetime','-type.ts','Resolver','@things-factory/shell','\x27,\x20type:\x20\x27','@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})','Date','943780mNFqCU','columnToEntityColumn','Ctx','createEntityText','createTypeText','type\x20=>','filter','getProjectRootPath','defineProperty','float','character\x20varying','__metadata','map','uniqRank','creator_id','dataProp','\x0a\x20\x20','find','\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','{{camelCase\x20name}}.','decimal','pascalCaseName','domain_id','writeFile','indexOf','createNoHistoryServiceFiels','Query','split','/packages','Resolvers\x20}\x20from\x20\x27./','updater','writeFileSync','__param','\x27,\x20nullable:\x20','.ts','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','replace','@Field(','colType','nullable','Resolvers,','string','integer','EntitySubscribers\x20}\x20from\x20\x27./','timestamp\x20without\x20time\x20zone','-history\x27','state','snakeCaseName','createServicePath','sort','Float','56uiqBny','existsSync','import\x20{\x20entities\x20as\x20','mkdirSync','\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','@Column({name:\x27','/index.ts','-mutation.ts'];a0_0x3a4d=function(){return _0x887c64;};return a0_0x3a4d();}let OperatoToolCreateService=class{async[a0_0x8dae72(0x204)](_0x3b92e1,_0x499a00){const _0x311771=a0_0x8dae72,{domain:_0x1b9c7e}=_0x499a00[_0x311771(0x272)],_0x592847=await(0x0,shell_1[_0x311771(0x1f9)])(resource_base_1[_0x311771(0x225)])[_0x311771(0x21a)]({'where':{'id':_0x3b92e1}}),_0x29a621=await(0x0,shell_1[_0x311771(0x1f9)])(resource_base_1[_0x311771(0x1fc)])[_0x311771(0x255)]({'where':{'domain':{'id':_0x1b9c7e['id']},'entity':{'id':_0x592847['id']}}});let {name:_0x4d3bde='',bundle:_0x1b2fd5=''}=_0x592847||{},_0x5058f0=this[_0x311771(0x24b)](),_0x4a1cb9=kebabCase(_0x4d3bde);return await this[_0x311771(0x274)](_0x5058f0,_0x1b2fd5,_0x4a1cb9),await this['createServiceFiles'](_0x5058f0,_0x1b2fd5,_0x4d3bde,_0x4a1cb9,_0x592847,_0x29a621),!0x0;}async[a0_0x8dae72(0x207)](_0x20ee4a,_0x41077d,_0x16f6db,_0x4ec2ea,_0x2d023a,_0x5e3dca){const _0xc430e5=a0_0x8dae72;let _0x39833e={'name':_0x4ec2ea,'tableName':_0x2d023a[_0xc430e5(0x210)],'pascalCaseName':startCase(camelCase(_0x16f6db))['replace'](/ /g,''),'camelCaseName':camelCase(_0x16f6db),'snakeCaseName':snakeCase(_0x16f6db),'pluralPascalCaseName':startCase(camelCase(plural(_0x16f6db)))[_0xc430e5(0x268)](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x16f6db))},_0x2f802e=_0x20ee4a+_0xc430e5(0x22e)+_0x41077d+'/server/service/';['JSON',_0xc430e5(0x218)][_0xc430e5(0x214)](_0x2d023a['dataProp'])?await this[_0xc430e5(0x1f6)](_0x2f802e,_0x4ec2ea,_0x2d023a,_0x5e3dca,_0x39833e):await this[_0xc430e5(0x25d)](_0x2f802e,_0x4ec2ea,_0x2d023a,_0x5e3dca,_0x39833e);}async[a0_0x8dae72(0x1f6)](_0x2474ba,_0x5c1b1a,_0x570a98,_0x351d8d,_0x32999c){const _0x5eb60e=a0_0x8dae72;await this[_0x5eb60e(0x25b)](_0x2474ba+(_0x5c1b1a+_0x5eb60e(0x27d)),serviceHistoryIndex,_0x32999c);let _0x15a197=this[_0x5eb60e(0x247)](_0x570a98,_0x351d8d);await this[_0x5eb60e(0x25b)](_0x2474ba+(_0x5c1b1a+'/'+_0x5c1b1a+_0x5eb60e(0x266)),_0x15a197,_0x32999c),await this['writeFile'](_0x2474ba+(_0x5c1b1a+'/'+_0x5c1b1a+_0x5eb60e(0x20e)),serviceQuery,_0x32999c),await this['writeFile'](_0x2474ba+(_0x5c1b1a+'/'+_0x5c1b1a+'-mutation.ts'),serviceMutation,_0x32999c);let _0x1ec6ba=this[_0x5eb60e(0x248)](_0x351d8d);await this[_0x5eb60e(0x25b)](_0x2474ba+(_0x5c1b1a+'/'+_0x5c1b1a+'-type.ts'),_0x1ec6ba,_0x32999c);let _0x34ba0b=this[_0x5eb60e(0x1f4)](_0x570a98,_0x351d8d);await this[_0x5eb60e(0x25b)](_0x2474ba+(_0x5c1b1a+'/'+_0x5c1b1a+'-history.ts'),_0x34ba0b,_0x32999c);let _0x3d3a09='';_0x5eb60e(0x281)==_0x570a98['dataProp']?(_0x3d3a09='\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['writeFile'](_0x2474ba+(_0x5c1b1a+'/event-subscriber.ts'),serviceEntitySubscriber,_0x32999c)):_0x3d3a09='';let _0x47d649=serviceEntitySubscriber[_0x5eb60e(0x268)](/{{entityToJson}}/g,_0x3d3a09);await this[_0x5eb60e(0x25b)](_0x2474ba+(_0x5c1b1a+_0x5eb60e(0x203)),_0x47d649,_0x32999c),await this['writeFile'](_0x2474ba+(_0x5c1b1a+'/'+_0x5c1b1a+_0x5eb60e(0x208)),serviceHistoryQuery,_0x32999c),await this[_0x5eb60e(0x25b)](_0x2474ba+(_0x5c1b1a+'/'+_0x5c1b1a+_0x5eb60e(0x1ff)),sereviceHistoryType,_0x32999c);let _0x5ed14d=_0x2474ba+'index.ts';0x0==await this[_0x5eb60e(0x285)](_0x5ed14d)&&await this[_0x5eb60e(0x25b)](_0x5ed14d,allIndex,_0x32999c);let _0x9122ac=await fs[_0x5eb60e(0x233)](_0x5ed14d,_0x5eb60e(0x22c));_0x9122ac[_0x5eb60e(0x25c)]('export\x20*\x20from\x20\x27./'+_0x32999c[_0x5eb60e(0x23a)]+'/'+_0x32999c[_0x5eb60e(0x23a)]+'-history\x27')<0x0&&(_0x9122ac=_0x9122ac[_0x5eb60e(0x268)](/\/\* EXPORT ENTITY TYPES \*\//,'/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./'+_0x32999c[_0x5eb60e(0x23a)]+'/'+_0x32999c[_0x5eb60e(0x23a)]+_0x5eb60e(0x271))),_0x9122ac[_0x5eb60e(0x25c)](_0x5eb60e(0x229)+_0x32999c[_0x5eb60e(0x23a)]+'/'+_0x32999c[_0x5eb60e(0x23a)]+'\x27')<0x0&&(_0x9122ac=_0x9122ac['replace'](/\/\* EXPORT ENTITY TYPES \*\//,_0x5eb60e(0x267)+_0x32999c[_0x5eb60e(0x23a)]+'/'+_0x32999c['name']+'\x27')),_0x9122ac[_0x5eb60e(0x25c)]('import\x20{\x20entities\x20as\x20'+_0x32999c[_0x5eb60e(0x259)]+'Entities,\x20resolvers\x20as\x20'+_0x32999c[_0x5eb60e(0x259)]+'Resolvers,\x20subscribers\x20as\x20'+_0x32999c['pascalCaseName']+_0x5eb60e(0x26f)+_0x32999c['name']+'\x27')<0x0&&(_0x9122ac=_0x9122ac['replace'](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,'/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20'+_0x32999c[_0x5eb60e(0x259)]+'Entities,\x20resolvers\x20as\x20'+_0x32999c[_0x5eb60e(0x259)]+'Resolvers,\x20subscribers\x20as\x20'+_0x32999c[_0x5eb60e(0x259)]+'EntitySubscribers\x20}\x20from\x20\x27./'+_0x32999c[_0x5eb60e(0x23a)]+'\x27')),_0x9122ac['indexOf'](_0x5eb60e(0x1f5)+_0x32999c[_0x5eb60e(0x259)]+_0x5eb60e(0x20a))<0x0&&(_0x9122ac=_0x9122ac[_0x5eb60e(0x268)](/\/\* ENTITIES \*\//,_0x5eb60e(0x21d)+_0x32999c['pascalCaseName']+_0x5eb60e(0x20a))),_0x9122ac['indexOf'](_0x5eb60e(0x1f5)+_0x32999c['pascalCaseName']+_0x5eb60e(0x26c))<0x0&&(_0x9122ac=_0x9122ac['replace'](/\/\* RESOLVER CLASSES \*\//,_0x5eb60e(0x226)+_0x32999c[_0x5eb60e(0x259)]+_0x5eb60e(0x26c))),_0x9122ac[_0x5eb60e(0x25c)](_0x5eb60e(0x1f5)+_0x32999c[_0x5eb60e(0x259)]+_0x5eb60e(0x236))<0x0&&(_0x9122ac=_0x9122ac[_0x5eb60e(0x268)](/\/\* SUBSCRIBERS \*\//,'/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...'+_0x32999c[_0x5eb60e(0x259)]+_0x5eb60e(0x236))),await this['writeFile'](_0x5ed14d,_0x9122ac,_0x32999c);}async[a0_0x8dae72(0x25d)](_0x57e8a0,_0x10fbd0,_0x24ee0f,_0x1a3ff7,_0x46a077){const _0x1fd558=a0_0x8dae72;await this['writeFile'](_0x57e8a0+(_0x10fbd0+_0x1fd558(0x27d)),serviceIndex,_0x46a077),await this['writeFile'](_0x57e8a0+(_0x10fbd0+'/'+_0x10fbd0+_0x1fd558(0x20e)),serviceQuery,_0x46a077),await this[_0x1fd558(0x25b)](_0x57e8a0+(_0x10fbd0+'/'+_0x10fbd0+_0x1fd558(0x27e)),serviceMutation,_0x46a077);let _0x4589c0=this[_0x1fd558(0x247)](_0x24ee0f,_0x1a3ff7);await this['writeFile'](_0x57e8a0+(_0x10fbd0+'/'+_0x10fbd0+_0x1fd558(0x266)),_0x4589c0,_0x46a077);let _0x4f872d=this[_0x1fd558(0x248)](_0x1a3ff7);await this[_0x1fd558(0x25b)](_0x57e8a0+(_0x10fbd0+'/'+_0x10fbd0+_0x1fd558(0x23e)),_0x4f872d,_0x46a077);let _0x4d99c3=_0x57e8a0+_0x1fd558(0x22a);0x0==await this[_0x1fd558(0x285)](_0x4d99c3)&&await this[_0x1fd558(0x25b)](_0x4d99c3,allIndex,_0x46a077);let _0xc205e=await fs['readFileSync'](_0x4d99c3,'utf8');_0xc205e[_0x1fd558(0x25c)]('export\x20*\x20from\x20\x27./'+_0x46a077[_0x1fd558(0x23a)]+'/'+_0x46a077[_0x1fd558(0x23a)]+'\x27')<0x0&&(_0xc205e=_0xc205e['replace'](/\/\* EXPORT ENTITY TYPES \*\//,_0x1fd558(0x267)+_0x46a077[_0x1fd558(0x23a)]+'/'+_0x46a077['name']+'\x27')),_0xc205e[_0x1fd558(0x25c)](_0x1fd558(0x279)+_0x46a077[_0x1fd558(0x259)]+'Entities,\x20resolvers\x20as\x20'+_0x46a077[_0x1fd558(0x259)]+'Resolvers\x20}\x20from\x20\x27./'+_0x46a077[_0x1fd558(0x23a)]+'\x27')<0x0&&(_0xc205e=_0xc205e[_0x1fd558(0x268)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x1fd558(0x211)+_0x46a077[_0x1fd558(0x259)]+'Entities,\x20resolvers\x20as\x20'+_0x46a077[_0x1fd558(0x259)]+_0x1fd558(0x261)+_0x46a077[_0x1fd558(0x23a)]+'\x27')),_0xc205e[_0x1fd558(0x25c)](_0x1fd558(0x1f5)+_0x46a077['pascalCaseName']+_0x1fd558(0x20a))<0x0&&(_0xc205e=_0xc205e[_0x1fd558(0x268)](/\/\* ENTITIES \*\//,'/*\x20ENTITIES\x20*/\x0a\x09...'+_0x46a077[_0x1fd558(0x259)]+_0x1fd558(0x20a))),_0xc205e[_0x1fd558(0x25c)](_0x1fd558(0x1f5)+_0x46a077[_0x1fd558(0x259)]+_0x1fd558(0x26c))<0x0&&(_0xc205e=_0xc205e['replace'](/\/\* RESOLVER CLASSES \*\//,'/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...'+_0x46a077[_0x1fd558(0x259)]+_0x1fd558(0x26c))),await this[_0x1fd558(0x25b)](_0x4d99c3,_0xc205e,_0x46a077);}[a0_0x8dae72(0x248)](_0x4c4bb6){const _0xaddf06=a0_0x8dae72;let _0x299967=sereviceType,_0x2f5609=_0x4c4bb6[_0xaddf06(0x250)](_0x27662a=>{const _0x2ca57c=_0xaddf06;if('id'==_0x27662a[_0x2ca57c(0x23a)])return'';if(_0x2ca57c(0x25a)==_0x27662a[_0x2ca57c(0x23a)])return'';if('created_at'==_0x27662a['name'])return'';if('updated_at'==_0x27662a['name'])return'';if(_0x2ca57c(0x252)==_0x27662a[_0x2ca57c(0x23a)])return'';if(_0x2ca57c(0x20d)==_0x27662a[_0x2ca57c(0x23a)])return'';let _0x23effc=this[_0x2ca57c(0x282)](_0x27662a),_0x4c88c2=this[_0x2ca57c(0x238)](_0x27662a),_0x8ce92f=camelCase(_0x27662a[_0x2ca57c(0x23a)]);return'\x20\x20'+(_0x2ca57c(0x269)+(0x0==_0x23effc[_0x2ca57c(0x284)]?'':_0x2ca57c(0x249)+_0x23effc+',')+_0x2ca57c(0x280)+_0x27662a[_0x2ca57c(0x26b)]+_0x2ca57c(0x222))+_0x2ca57c(0x254)+(''+_0x8ce92f+(_0x27662a['nullable']?'?':'')+':\x20'+_0x4c88c2)+'\x0a';});_0x299967=_0x299967['replace'](/{{newTypeColumns}}/g,_0x2f5609[_0xaddf06(0x228)]('\x0a'));let _0x1f2f75=_0x4c4bb6[_0xaddf06(0x250)](_0x341cea=>{const _0x4558b5=_0xaddf06;if('id'==_0x341cea[_0x4558b5(0x23a)])return'';if(_0x4558b5(0x25a)==_0x341cea[_0x4558b5(0x23a)])return'';if('created_at'==_0x341cea[_0x4558b5(0x23a)])return'';if('updated_at'==_0x341cea[_0x4558b5(0x23a)])return'';if('creator_id'==_0x341cea[_0x4558b5(0x23a)])return'';if(_0x4558b5(0x20d)==_0x341cea[_0x4558b5(0x23a)])return'';let _0x45b14a=this['getFieldType'](_0x341cea),_0x4e1167=this[_0x4558b5(0x238)](_0x341cea);_0x341cea['nullable']=!0x0;let _0x27e8d3=camelCase(_0x341cea[_0x4558b5(0x23a)]);return'\x20\x20'+(_0x4558b5(0x269)+(0x0==_0x45b14a[_0x4558b5(0x284)]?'':_0x4558b5(0x249)+_0x45b14a+',')+_0x4558b5(0x280)+_0x341cea['nullable']+_0x4558b5(0x222))+_0x4558b5(0x254)+(''+_0x27e8d3+(_0x341cea[_0x4558b5(0x26b)]?'?':'')+':\x20'+_0x4e1167)+'\x0a';});return _0x299967=_0x299967[_0xaddf06(0x268)](/{{patchTypeColumns}}/g,_0x1f2f75[_0xaddf06(0x228)]('\x0a')),_0x299967;}['createEntityText'](_0x5047d1,_0x83682f){const _0x2a9732=a0_0x8dae72;let _0x93ebc5=serviceEntity,_0x5436c2=_0x83682f[_0x2a9732(0x275)](function(_0x4d911b,_0x5cbbcc){const _0xe967d0=_0x2a9732;return _0x4d911b[_0xe967d0(0x213)]-_0x5cbbcc[_0xe967d0(0x213)];})[_0x2a9732(0x250)](_0x389c26=>this[_0x2a9732(0x245)](_0x389c26));[_0x2a9732(0x218),_0x2a9732(0x281)][_0x2a9732(0x214)](_0x5047d1[_0x2a9732(0x253)])&&_0x5436c2[_0x2a9732(0x20f)]('\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201'),_0x93ebc5=_0x93ebc5[_0x2a9732(0x268)](/{{entityColumns}}/g,_0x5436c2[_0x2a9732(0x228)]('\x0a'));let _0x3f6a4f='',_0x1acaab=_0x83682f[_0x2a9732(0x24a)](_0x55ec88=>_0x55ec88[_0x2a9732(0x251)]&&_0x55ec88['uniqRank']>0x0)[_0x2a9732(0x275)](function(_0x293f85,_0x3102cc){const _0x5674a8=_0x2a9732;return _0x293f85['uniqRank']-_0x3102cc[_0x5674a8(0x251)];});if(_0x1acaab['length']>0x0){_0x3f6a4f=_0x2a9732(0x242);let _0x5c1fb4=_0x1acaab[_0x2a9732(0x250)](_0x102a4e=>{const _0x4683eb=_0x2a9732;let _0x21bbd4=_0x102a4e[_0x4683eb(0x23a)];return _0x4683eb(0x25a)==_0x102a4e['name']&&(_0x21bbd4=_0x4683eb(0x21e)),_0x4683eb(0x252)==_0x102a4e[_0x4683eb(0x23a)]&&(_0x21bbd4=_0x4683eb(0x1f8)),_0x4683eb(0x20d)==_0x102a4e[_0x4683eb(0x23a)]&&(_0x21bbd4=_0x4683eb(0x262)),_0x4683eb(0x257)+camelCase(_0x21bbd4);});_0x3f6a4f=_0x3f6a4f[_0x2a9732(0x268)](/{{indexColumns}}/g,_0x5c1fb4[_0x2a9732(0x228)](','));}return _0x93ebc5=_0x93ebc5[_0x2a9732(0x268)](/{{indexAnn}}/g,_0x3f6a4f),_0x93ebc5;}[a0_0x8dae72(0x1f4)](_0x4371a0,_0x4b60be){const _0x4612fe=a0_0x8dae72;let _0x32079e=_0x4612fe(0x281)==_0x4371a0['dataProp']?serviceEntityHistJson:serviceEntityHistCopy,_0x531607=_0x4b60be[_0x4612fe(0x275)](function(_0x4f2d9e,_0x1ad19f){const _0x2d965f=_0x4612fe;return _0x4f2d9e[_0x2d965f(0x213)]-_0x1ad19f['rank'];})['map'](_0x510aff=>this[_0x4612fe(0x245)](_0x510aff));return _0x32079e=_0x32079e['replace'](/{{entityColumns}}/g,_0x531607[_0x4612fe(0x228)]('\x0a')),_0x32079e;}['columnToEntityColumn'](_0x47af91){const _0x26e256=a0_0x8dae72;if('id'==_0x47af91[_0x26e256(0x23a)])return'';if(_0x26e256(0x25a)==_0x47af91['name'])return'';if(_0x26e256(0x200)==_0x47af91['name'])return'';if(_0x26e256(0x22b)==_0x47af91[_0x26e256(0x23a)])return'';if(_0x26e256(0x252)==_0x47af91['name'])return'';if(_0x26e256(0x20d)==_0x47af91[_0x26e256(0x23a)])return'';let _0x54fe54=_0x47af91['colType'];'double'==_0x47af91[_0x26e256(0x26a)]&&(_0x54fe54=_0x26e256(0x1fa)),'long'==_0x47af91[_0x26e256(0x26a)]&&(_0x54fe54=_0x26e256(0x223)),_0x26e256(0x26d)==_0x47af91[_0x26e256(0x26a)]&&(_0x54fe54=_0x26e256(0x24e)),'datetime'==_0x47af91['colType']&&(_0x54fe54=_0x26e256(0x270));let _0x3f2791='';_0x26e256(0x26d)==_0x47af91[_0x26e256(0x26a)]&&(_0x3f2791=_0x47af91['colSize']);let _0x408626=this[_0x26e256(0x282)](_0x47af91),_0xe680e9=this[_0x26e256(0x238)](_0x47af91),_0x4ce479=camelCase(_0x47af91[_0x26e256(0x23a)]);return'\x20\x20'+(_0x26e256(0x27c)+_0x47af91['name']+_0x26e256(0x241)+_0x54fe54+_0x26e256(0x265)+_0x47af91[_0x26e256(0x26b)]+'\x20'+(0x0==_0x3f2791[_0x26e256(0x284)]?'':_0x26e256(0x220)+_0x3f2791)+'\x20})')+'\x0a\x20\x20'+('@Field('+(0x0==_0x408626[_0x26e256(0x284)]?'':_0x26e256(0x249)+_0x408626+',')+_0x26e256(0x280)+_0x47af91[_0x26e256(0x26b)]+_0x26e256(0x222))+'\x0a\x20\x20'+(''+_0x4ce479+(_0x47af91[_0x26e256(0x26b)]?'?':'')+':\x20'+_0xe680e9)+'\x0a';}[a0_0x8dae72(0x282)](_0x19c0f3){const _0x4e1f23=a0_0x8dae72;let _0x553ec6='';return'double'==_0x19c0f3[_0x4e1f23(0x26a)]&&(_0x553ec6=_0x4e1f23(0x276)),_0x4e1f23(0x24d)==_0x19c0f3[_0x4e1f23(0x26a)]&&(_0x553ec6='Float'),_0x4e1f23(0x20c)==_0x19c0f3['colType']&&(_0x553ec6='Int'),_0x4e1f23(0x26e)==_0x19c0f3['colType']&&(_0x553ec6=_0x4e1f23(0x1fd)),_0x553ec6;}[a0_0x8dae72(0x238)](_0x3143c3){const _0xda5b5f=a0_0x8dae72;let _0x3fdd9=_0x3143c3[_0xda5b5f(0x26a)];return _0xda5b5f(0x258)==_0x3143c3[_0xda5b5f(0x26a)]&&(_0x3fdd9='number'),'double'==_0x3143c3['colType']&&(_0x3fdd9=_0xda5b5f(0x202)),_0xda5b5f(0x24d)==_0x3143c3[_0xda5b5f(0x26a)]&&(_0x3fdd9=_0xda5b5f(0x202)),'integer'==_0x3143c3[_0xda5b5f(0x26a)]&&(_0x3fdd9=_0xda5b5f(0x202)),'long'==_0x3143c3[_0xda5b5f(0x26a)]&&(_0x3fdd9=_0xda5b5f(0x202)),_0xda5b5f(0x23d)==_0x3143c3[_0xda5b5f(0x26a)]&&(_0x3fdd9=_0xda5b5f(0x243)),_0xda5b5f(0x217)==_0x3143c3[_0xda5b5f(0x26a)]&&(_0x3fdd9=_0xda5b5f(0x243)),_0xda5b5f(0x286)==_0x3143c3[_0xda5b5f(0x26a)]&&(_0x3fdd9='string'),_0x3fdd9;}async['writeFile'](_0xc91069,_0x77b62d,_0x392762){const _0xb0f1d2=a0_0x8dae72;await fs[_0xb0f1d2(0x263)](_0xc91069,this[_0xb0f1d2(0x219)](_0x77b62d,_0x392762),_0xb0f1d2(0x22c));}[a0_0x8dae72(0x219)](_0x11bc20,_0x1f178){const _0x25e50c=a0_0x8dae72;return _0x11bc20[_0x25e50c(0x268)](/{{pascalCase name}}/g,_0x1f178[_0x25e50c(0x259)])[_0x25e50c(0x268)](/{{camelCase name}}/g,_0x1f178[_0x25e50c(0x239)])[_0x25e50c(0x268)](/{{snakeCase name}}/g,_0x1f178[_0x25e50c(0x273)])[_0x25e50c(0x268)](/{{pluralPascalCase name}}/g,_0x1f178['pluralPascalCaseName'])[_0x25e50c(0x268)](/{{pluralCamelCase name}}/g,_0x1f178['pluralCamelCaseName'])[_0x25e50c(0x268)](/{{tableName}}/g,_0x1f178[_0x25e50c(0x210)])['replace'](/{{name}}/g,_0x1f178[_0x25e50c(0x23a)]);}async[a0_0x8dae72(0x274)](_0x24ab70,_0x2e141f,_0x473184){const _0x423b32=a0_0x8dae72;let _0x4b9cb7=_0x24ab70+_0x423b32(0x260);await this[_0x423b32(0x212)](_0x4b9cb7),_0x4b9cb7=_0x4b9cb7+'/'+_0x2e141f,await this[_0x423b32(0x212)](_0x4b9cb7),_0x4b9cb7+='/server',await this[_0x423b32(0x212)](_0x4b9cb7),_0x4b9cb7+='/service',await this[_0x423b32(0x212)](_0x4b9cb7),_0x4b9cb7=_0x4b9cb7+'/'+_0x473184,await this[_0x423b32(0x212)](_0x4b9cb7);}[a0_0x8dae72(0x24b)](){const _0x58cd4f=a0_0x8dae72;let _0x2394f6=process[_0x58cd4f(0x206)]['PWD'][_0x58cd4f(0x25f)]('/'),_0x3c60fb=[];for(let _0x4880be=0x0;_0x4880be<_0x2394f6['length']&&_0x58cd4f(0x231)!=_0x2394f6[_0x4880be];_0x4880be++)_0x3c60fb[_0x58cd4f(0x20f)](_0x2394f6[_0x4880be]);return _0x3c60fb[_0x58cd4f(0x228)]('/');}async[a0_0x8dae72(0x212)](_0x438d1a){const _0x53a0f0=a0_0x8dae72;0x0==await this['existsPath'](_0x438d1a)&&fs[_0x53a0f0(0x27a)](_0x438d1a);}async['existsPath'](_0x2c192a){const _0x35a281=a0_0x8dae72;return await fs[_0x35a281(0x278)](_0x2c192a);}};tslib_1[a0_0x8dae72(0x1fb)]([(0x0,type_graphql_1[a0_0x8dae72(0x25e)])(_0x3301c1=>Boolean,{'description':a0_0x8dae72(0x234)}),tslib_1[a0_0x8dae72(0x264)](0x0,(0x0,type_graphql_1[a0_0x8dae72(0x283)])('id')),tslib_1[a0_0x8dae72(0x264)](0x1,(0x0,type_graphql_1[a0_0x8dae72(0x246)])()),tslib_1[a0_0x8dae72(0x24f)](a0_0x8dae72(0x21b),Function),tslib_1[a0_0x8dae72(0x24f)]('design:paramtypes',[String,Object]),tslib_1[a0_0x8dae72(0x24f)](a0_0x8dae72(0x201),Promise)],OperatoToolCreateService[a0_0x8dae72(0x22d)],a0_0x8dae72(0x204),null),OperatoToolCreateService=tslib_1[a0_0x8dae72(0x1fb)]([(0x0,type_graphql_1[a0_0x8dae72(0x23f)])()],OperatoToolCreateService),exports['OperatoToolCreateService']=OperatoToolCreateService;const allIndex=a0_0x8dae72(0x221),serviceIndex=a0_0x8dae72(0x224),serviceHistoryIndex=a0_0x8dae72(0x27b),serviceQuery='\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}List\x20}\x20from\x20\x27./{{name}}-type\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Query\x20{\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20fetch\x20a\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20return\x20await\x20getRepository({{pascalCase\x20name}}).findOne({\x0a\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20}\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}List,\x20{\x20description:\x20\x27To\x20fetch\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{pluralCamelCase\x20name}}(@Args()\x20params:\x20ListParam,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}List>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20queryBuilder\x20=\x20getQueryBuilderFromListParams({\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20params,\x0a\x20\x20\x20\x20\x20\x20repository:\x20await\x20getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20const\x20convertedParams\x20=\x20convertListParams(params,\x20domain.id)\x0a\x20\x20\x20\x20const\x20[items,\x20total]\x20=\x20await\x20queryBuilder.getManyAndCount()\x0a\x0a\x20\x20\x20\x20return\x20{\x20items,\x20total\x20}\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20Domain)\x0a\x20\x20async\x20domain(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<Domain>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(Domain).findOneBy({id:{{camelCase\x20name}}.domainId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20updater(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.updaterId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20creator(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.creatorId})\x0a\x20\x20}\x0a}\x0a',serviceHistoryQuery=a0_0x8dae72(0x232),serviceMutation=a0_0x8dae72(0x235),sereviceType=a0_0x8dae72(0x256),sereviceHistoryType='\x0aimport\x20{\x20ObjectType,\x20Field,\x20InputType,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0a\x0a@ObjectType()\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryList\x20{\x0a\x20\x20@Field(type\x20=>\x20[{{pascalCase\x20name}}History])\x0a\x20\x20items:\x20{{pascalCase\x20name}}History[]\x0a\x0a\x20\x20@Field(type\x20=>\x20Int)\x0a\x20\x20total:\x20number\x0a}\x0a',serviceEntity=a0_0x8dae72(0x230),serviceEntityHistCopy=a0_0x8dae72(0x23c),serviceEntityHistJson='\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a\x20\x20@Column(\x27simple-json\x27,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20@Field(type\x20=>\x20ScalarObject,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20historyJson?:\x20any\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a',serviceEntitySubscriber=a0_0x8dae72(0x23b);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';const a0_0x23524d=a0_0x2be7;(function(_0x2e9c59,_0xfac4f3){const _0x2e6a17=a0_0x2be7,_0x468560=_0x2e9c59();while(!![]){try{const _0x513ed2=parseInt(_0x2e6a17(0xe6))/0x1*(parseInt(_0x2e6a17(0xe9))/0x2)+parseInt(_0x2e6a17(0xf3))/0x3*(-parseInt(_0x2e6a17(0xe8))/0x4)+parseInt(_0x2e6a17(0xf5))/0x5+-parseInt(_0x2e6a17(0xf8))/0x6+-parseInt(_0x2e6a17(0xe0))/0x7*(parseInt(_0x2e6a17(0xf6))/0x8)+-parseInt(_0x2e6a17(0xdc))/0x9+parseInt(_0x2e6a17(0xe3))/0xa;if(_0x513ed2===_0xfac4f3)break;else _0x468560['push'](_0x468560['shift']());}catch(_0x2b2079){_0x468560['push'](_0x468560['shift']());}}}(a0_0x89c4,0xbf687));Object['defineProperty'](exports,'__esModule',{'value':!0x0}),exports[a0_0x23524d(0xf1)]=exports['checkStudioPermission']=void 0x0;const operato_license_checker_1=require('@things-factory/operato-license-checker'),shell_1=require(a0_0x23524d(0xe5)),menu_base_1=require(a0_0x23524d(0xea)),license_error_1=require(a0_0x23524d(0xf0));async function checkStudioPermission(){const _0x21b056=a0_0x23524d;let _0x235aa2=((0x0,operato_license_checker_1['getPermission'])('Permissions\x20For\x20Tailor\x20Tool')||',')[_0x21b056(0xf2)](',')[_0x21b056(0xf7)](_0x55735e=>_0x55735e[_0x21b056(0xec)]()),_0x30740d=!0x1;return _0x235aa2['forEach'](_0x5760fd=>{_0x5760fd['includes']('Studio')&&(_0x30740d=!0x0);}),_0x30740d;}async function checkStudioTemplateIsOverLimit(_0x6972dc,_0x46a44b){const _0x393ce5=a0_0x23524d;if(0x0==await checkStudioPermission())throw new license_error_1[(_0x393ce5(0xfb))]({'errorCode':_0x46a44b['t'](license_error_1['LicenseError']['ERROR_CODES']['INVALID_LICENSE'])});var _0x402a2b=0x0;if(_0x402a2b=_0x6972dc&&''!=_0x6972dc?await(0x0,shell_1[_0x393ce5(0xee)])(menu_base_1[_0x393ce5(0xeb)])[_0x393ce5(0xdf)][_0x393ce5(0xdb)]()[_0x393ce5(0xed)](_0x393ce5(0xf4))['from'](menu_base_1[_0x393ce5(0xeb)],_0x393ce5(0xf4))[_0x393ce5(0xe1)](_0x393ce5(0xe4),{'id':_0x6972dc})[_0x393ce5(0xde)](_0x393ce5(0xfa))[_0x393ce5(0xdd)]()+0x1:await(0x0,shell_1[_0x393ce5(0xee)])(menu_base_1[_0x393ce5(0xeb)])[_0x393ce5(0xdf)][_0x393ce5(0xdb)]()[_0x393ce5(0xed)](_0x393ce5(0xf4))[_0x393ce5(0xe7)](menu_base_1[_0x393ce5(0xeb)],_0x393ce5(0xf4))[_0x393ce5(0xe1)](_0x393ce5(0xfa))[_0x393ce5(0xdd)]()+0x1,!(0x0,operato_license_checker_1[_0x393ce5(0xef)])(_0x402a2b))throw new license_error_1[(_0x393ce5(0xfb))]({'errorCode':_0x46a44b['t'](license_error_1['LicenseError']['ERROR_CODES'][_0x393ce5(0xf9)])});return!0x0;}function a0_0x2be7(_0x2b7202,_0x5aae81){const _0x89c404=a0_0x89c4();return a0_0x2be7=function(_0x2be779,_0x10fe44){_0x2be779=_0x2be779-0xdb;let _0x5167e7=_0x89c404[_0x2be779];return _0x5167e7;},a0_0x2be7(_0x2b7202,_0x5aae81);}function a0_0x89c4(){const _0x32877a=['16YLEwUc','map','1538208xkwIlo','OVER_LIMIT','(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)','LicenseError','createQueryBuilder','10105479puVWfs','getCount','andWhere','manager','2102898TAjJZx','where','checkStudioPermission','34327430lOGdmK','id\x20!=\x20:id','@things-factory/shell','3422mTNBDi','from','1044932dpTGHY','8McgCkO','@things-factory/menu-base','Menu','trim','select','getRepository','checkTarget','../../errors/license-error','checkStudioTemplateIsOverLimit','split','15SdJwjm','menu','3118840nnyQAn'];a0_0x89c4=function(){return _0x32877a;};return a0_0x89c4();}exports[a0_0x23524d(0xe2)]=checkStudioPermission,exports[a0_0x23524d(0xf1)]=checkStudioTemplateIsOverLimit;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';function a0_0x5223(_0x389cb7,_0x545c7b){const _0x222634=a0_0x2226();return a0_0x5223=function(_0x522318,_0x33fb64){_0x522318=_0x522318-0x1a2;let _0x37c291=_0x222634[_0x522318];return _0x37c291;},a0_0x5223(_0x389cb7,_0x545c7b);}const a0_0xe4cc82=a0_0x5223;(function(_0x12f720,_0x1b1e39){const _0x4509c3=a0_0x5223,_0x1ca448=_0x12f720();while(!![]){try{const _0x59b171=parseInt(_0x4509c3(0x1bf))/0x1+parseInt(_0x4509c3(0x1a9))/0x2+parseInt(_0x4509c3(0x1b4))/0x3*(-parseInt(_0x4509c3(0x1b2))/0x4)+-parseInt(_0x4509c3(0x1a5))/0x5*(-parseInt(_0x4509c3(0x1be))/0x6)+-parseInt(_0x4509c3(0x1ba))/0x7*(parseInt(_0x4509c3(0x1c1))/0x8)+-parseInt(_0x4509c3(0x1aa))/0x9*(parseInt(_0x4509c3(0x1b3))/0xa)+-parseInt(_0x4509c3(0x1b1))/0xb*(parseInt(_0x4509c3(0x1ac))/0xc);if(_0x59b171===_0x1b1e39)break;else _0x1ca448['push'](_0x1ca448['shift']());}catch(_0x18c5a0){_0x1ca448['push'](_0x1ca448['shift']());}}}(a0_0x2226,0xc915b));Object[a0_0xe4cc82(0x1b7)](exports,a0_0xe4cc82(0x1a7),{'value':!0x0}),exports[a0_0xe4cc82(0x1ad)]=void 0x0;const tslib_1=require(a0_0xe4cc82(0x1a6)),type_graphql_1=require(a0_0xe4cc82(0x1a2)),tool_permission_1=require(a0_0xe4cc82(0x1bd));let OperatoToolResolver=class{async[a0_0xe4cc82(0x1b6)](_0xf9edb7){const _0x4614b9=a0_0xe4cc82;return(0x0,tool_permission_1[_0x4614b9(0x1af)])();}async[a0_0xe4cc82(0x1a4)](_0x46c53f,_0x4803ba){return(0x0,tool_permission_1['checkStudioTemplateIsOverLimit'])(_0x46c53f,_0x4803ba);}};tslib_1[a0_0xe4cc82(0x1c2)]([(0x0,type_graphql_1[a0_0xe4cc82(0x1b5)])(_0x54ecfc=>Boolean,{'description':a0_0xe4cc82(0x1c0)}),tslib_1['__param'](0x0,(0x0,type_graphql_1[a0_0xe4cc82(0x1bc)])()),tslib_1[a0_0xe4cc82(0x1b0)](a0_0xe4cc82(0x1b9),Function),tslib_1['__metadata'](a0_0xe4cc82(0x1a3),[Object]),tslib_1[a0_0xe4cc82(0x1b0)](a0_0xe4cc82(0x1b8),Promise)],OperatoToolResolver[a0_0xe4cc82(0x1ae)],a0_0xe4cc82(0x1b6),null),tslib_1[a0_0xe4cc82(0x1c2)]([(0x0,type_graphql_1[a0_0xe4cc82(0x1b5)])(_0x4ddf94=>Boolean,{'description':'Operato\x20Tool\x20Studio\x20Limit\x20check'}),tslib_1[a0_0xe4cc82(0x1a8)](0x0,(0x0,type_graphql_1[a0_0xe4cc82(0x1bb)])('id')),tslib_1[a0_0xe4cc82(0x1a8)](0x1,(0x0,type_graphql_1[a0_0xe4cc82(0x1bc)])()),tslib_1['__metadata']('design:type',Function),tslib_1[a0_0xe4cc82(0x1b0)](a0_0xe4cc82(0x1a3),[String,Object]),tslib_1[a0_0xe4cc82(0x1b0)](a0_0xe4cc82(0x1b8),Promise)],OperatoToolResolver[a0_0xe4cc82(0x1ae)],a0_0xe4cc82(0x1a4),null),OperatoToolResolver=tslib_1['__decorate']([(0x0,type_graphql_1[a0_0xe4cc82(0x1ab)])()],OperatoToolResolver),exports[a0_0xe4cc82(0x1ad)]=OperatoToolResolver;function a0_0x2226(){const _0x2f386b=['1105611UVSToT','Query','studioPermission','defineProperty','design:returntype','design:type','8519VwLXII','Arg','Ctx','./tool-permission','18TKSQjd','1603310UpVVjl','Operato\x20Tool\x20Studio\x20Usage\x20Permissions','184CvniPz','__decorate','type-graphql','design:paramtypes','studioTemplateIsOverLimit','1265800aTKvfG','tslib','__esModule','__param','1263160WMrMYd','434637zywStw','Resolver','3636nbChKo','OperatoToolResolver','prototype','checkStudioPermission','__metadata','45771NYEuTP','8GbEIJP','30GipeHg'];a0_0x2226=function(){return _0x2f386b;};return a0_0x2226();}
|