@things-factory/operato-tools 6.1.52 → 6.1.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/actions/main.js +1 -1
- package/client/pages/generator/button-config-tab-mixin.js +4 -4
- package/client/pages/generator/column-config-tab-mixin.js +4 -4
- package/client/pages/generator/etc-config-tab-mixin.js +4 -4
- package/client/pages/generator/form-config-tab-mixin.js +4 -4
- package/client/pages/generator/graphql-config-tab-mixin.js +23 -23
- package/client/pages/generator/grid-config-tab-mixin.js +22 -22
- package/client/pages/generator/grid-emphasized-config-tab-mixin.js +7 -7
- package/client/pages/generator/menu-config-tab-mixin.js +11 -11
- package/client/pages/generator/meta-generator-page.js +11 -11
- package/client/pages/generator/search-config-tab-mixin.js +4 -4
- package/client/pages/generator/tab-config-tab-mixin.js +4 -4
- package/client/pages/main.js +4 -4
- package/client/reducers/main.js +1 -1
- package/package.json +3 -3
- package/server/constants/error-code.js +1 -1
- package/server/errors/license-error.js +1 -1
- package/server/routes.js +1 -1
- package/server/service/tool-entity/create-menu.js +1 -1
- package/server/service/tool-entity/create-service.js +1 -1
- package/server/service/tool-secret/tool-permission.js +1 -1
- package/server/service/tool-secret/tool-resolver.js +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
2
|
-
<ox-grist auto-fetch id="tab-tab-grid" .config=${this[
|
|
3
|
-
.fetchHandler=${this[
|
|
4
|
-
</ox-grist>`;}get[
|
|
1
|
+
const a0_0x4a8508=a0_0x206a;(function(_0x36c832,_0x533663){const _0x3bd144=a0_0x206a,_0x3a9ce3=_0x36c832();while(!![]){try{const _0x591947=-parseInt(_0x3bd144(0x104))/0x1+-parseInt(_0x3bd144(0xfb))/0x2*(-parseInt(_0x3bd144(0xed))/0x3)+parseInt(_0x3bd144(0xf4))/0x4+parseInt(_0x3bd144(0x105))/0x5*(parseInt(_0x3bd144(0x10c))/0x6)+parseInt(_0x3bd144(0x102))/0x7*(-parseInt(_0x3bd144(0xdf))/0x8)+-parseInt(_0x3bd144(0xf1))/0x9+-parseInt(_0x3bd144(0xff))/0xa*(-parseInt(_0x3bd144(0xe5))/0xb);if(_0x591947===_0x533663)break;else _0x3a9ce3['push'](_0x3a9ce3['shift']());}catch(_0xf3cdb5){_0x3a9ce3['push'](_0x3a9ce3['shift']());}}}(a0_0x27fa,0x837a7));import{html}from'lit-element';import{MetaApi}from'@things-factory/meta-ui/client/utils/meta-api';function a0_0x206a(_0x1a7343,_0x3c2885){const _0x27faaa=a0_0x27fa();return a0_0x206a=function(_0x206a06,_0x34c484){_0x206a06=_0x206a06-0xdd;let _0x3adf2e=_0x27faaa[_0x206a06];return _0x3adf2e;},a0_0x206a(_0x1a7343,_0x3c2885);}import{TermsUtil}from'@things-factory/meta-ui/client/utils/terms-util';function a0_0x27fa(){const _0x333c86=['tagname','958410adMWsi','4225eEedtQ','getGristSelectableConfig','getTabConfigTabValues','deleteRow','string','right','tab-tab-grid','426MOkbPJ','tag','getElementValueById','fetchTabTabHandler','184URbDMs','param_field','gutter','tLabel','parent_field','#tab-tab-grid','271678AVizTW','viewTabData','menu','parent_id','name','location','push','integer','1863447vPWwNe','left','routing','map','144081etkjZB','center','tabTabGrist','3216700GpUUuw','rank','tab','icon','setTabConfigTabValues','page_location','querySelector','2kULIOf','delete','display','params','200fPwtyb','tabTabGridConfig','button','141925JfSFws'];a0_0x27fa=function(){return _0x333c86;};return a0_0x27fa();}export const TabConfigTabMixin=_0x3f42bb=>class extends _0x3f42bb{[a0_0x4a8508(0xf8)](_0x339c72){const _0xf4330=a0_0x4a8508;let _0x2cf2ad=_0x339c72?.[_0xf4330(0xf0)]((_0x38c6ec,_0x47a26d)=>{const _0x4c7267=_0xf4330;let _0x4f1858=_0x47a26d+0x1,_0xe8f8f7={};return _0xe8f8f7['rank']=0xa*_0x4f1858,_0xe8f8f7['id']=_0x4f1858,_0xe8f8f7['name']=_0x38c6ec[_0x4c7267(0xe9)],_0xe8f8f7[_0x4c7267(0xfd)]=_0x38c6ec['display'],_0xe8f8f7[_0x4c7267(0x103)]=_0x38c6ec[_0x4c7267(0x103)],_0xe8f8f7[_0x4c7267(0xf7)]=_0x38c6ec[_0x4c7267(0xf7)],_0xe8f8f7[_0x4c7267(0xea)]=_0x38c6ec[_0x4c7267(0xea)],_0xe8f8f7[_0x4c7267(0xe3)]=_0x38c6ec['parent_field'],_0xe8f8f7[_0x4c7267(0xe0)]=_0x38c6ec[_0x4c7267(0xe0)],_0xe8f8f7[_0x4c7267(0xe7)]=_0x38c6ec[_0x4c7267(0xe7)],_0xe8f8f7;});this[_0xf4330(0xe6)]=_0x2cf2ad||[],this[_0xf4330(0xf3)]?.['fetch']();}[a0_0x4a8508(0x107)](){const _0x5d7760=a0_0x4a8508;let _0x201cda={'tab':[]},_0x409eff=this[_0x5d7760(0xdd)](_0x5d7760(0x10b));return this['sortRecordByRank'](_0x409eff)?.['forEach'](_0xc8ff9a=>{const _0x5a96fd=_0x5d7760;var {name:_0xaf9f5b,display:_0x7ff442,tagname:_0x437d11,location:_0x19b4d1,parent_field:_0x11a13a,param_field:_0x11a107,menu:_0x557caa,icon:_0x39b2ce}=_0xc8ff9a;_0xaf9f5b&&_0x437d11&&_0x19b4d1&&_0x557caa&&(_0x7ff442||(_0x7ff442=_0xaf9f5b),_0x11a13a||(_0x11a13a='id'),_0x11a107||(_0x11a107=_0x5a96fd(0xe0)),_0x201cda[_0x5a96fd(0xf6)][_0x5a96fd(0xeb)]({'name':_0xaf9f5b,'display':_0x7ff442,'tagname':_0x437d11,'location':_0x19b4d1,'parent_field':_0x11a13a,'param_field':_0x11a107,'menu':_0x557caa,'icon':_0x39b2ce}));}),_0x201cda;}['renderTabConfigTab'](){const _0x31dd5f=a0_0x4a8508;return html`
|
|
2
|
+
<ox-grist auto-fetch id="tab-tab-grid" .config=${this[_0x31dd5f(0x100)]} .mode='GRID'
|
|
3
|
+
.fetchHandler=${this['fetchTabTabHandler']['bind'](this)}>
|
|
4
|
+
</ox-grist>`;}get[a0_0x4a8508(0xf3)](){const _0x435849=a0_0x4a8508;return this['shadowRoot'][_0x435849(0xfa)](_0x435849(0xe4));}async[a0_0x4a8508(0xde)](){const _0x26c91b=a0_0x4a8508;return{'total':0x0,'records':this[_0x26c91b(0xe6)]||[]};}async['setTabConfigTabConfig'](){const _0x3d9618=a0_0x4a8508;this[_0x3d9618(0x100)]={'rows':MetaApi[_0x3d9618(0x106)](!0x0),'pagination':{'infinite':!0x0},'sorters':[{'name':_0x3d9618(0xf5),'desc':!0x1}],'appendable':!0x0,'columns':[...MetaApi['getGristGuttersConfig'](!0x1,!0x1),{'type':_0x3d9618(0xe1),'gutterName':_0x3d9618(0x101),'icon':_0x3d9618(0xfc),'handlers':{'click':(_0x1946b8,_0x90a8cd,_0x53bf9e,_0x46143e,_0x423b84)=>{const _0x584c95=_0x3d9618;_0x46143e['id']&&this[_0x584c95(0x108)](this[_0x584c95(0xf3)],_0x46143e);}}},{'type':'string','name':'id','hidden':!0x0},{'type':_0x3d9618(0xec),'name':_0x3d9618(0xf5),'header':TermsUtil['tLabel'](_0x3d9618(0xf5)),'sortable':!0x0,'width':0x41,'record':{'align':_0x3d9618(0x10a),'editable':!0x0,'mandatory':!0x0}},{'type':_0x3d9618(0x109),'name':_0x3d9618(0xe9),'header':TermsUtil[_0x3d9618(0xe2)]('name'),'sortable':!0x1,'width':0x64,'record':{'align':_0x3d9618(0xee),'editable':!0x0,'mandatory':!0x0}},{'type':_0x3d9618(0x109),'name':_0x3d9618(0xfd),'header':TermsUtil[_0x3d9618(0xe2)](_0x3d9618(0xfd)),'sortable':!0x1,'width':0x64,'record':{'align':_0x3d9618(0xee),'editable':!0x0,'mandatory':!0x0}},{'type':'string','name':'icon','header':TermsUtil[_0x3d9618(0xe2)](_0x3d9618(0xf7)),'sortable':!0x0,'width':0x41,'record':{'align':_0x3d9618(0xf2),'editable':!0x0,'mandatory':!0x0}},{'type':'string','name':_0x3d9618(0xe7),'header':TermsUtil[_0x3d9618(0xe2)](_0x3d9618(0xef)),'sortable':!0x1,'width':0x64,'record':{'align':_0x3d9618(0xee),'editable':!0x0,'mandatory':!0x0}},{'type':_0x3d9618(0x109),'name':_0x3d9618(0x103),'header':TermsUtil[_0x3d9618(0xe2)](_0x3d9618(0x10d)),'sortable':!0x1,'width':0x96,'record':{'align':_0x3d9618(0xee),'editable':!0x0,'mandatory':!0x0}},{'type':_0x3d9618(0x109),'name':_0x3d9618(0xea),'header':TermsUtil[_0x3d9618(0xe2)](_0x3d9618(0xf9)),'sortable':!0x1,'width':0x12c,'record':{'align':_0x3d9618(0xee),'editable':!0x0,'mandatory':!0x0}},{'type':_0x3d9618(0x109),'name':'parent_field','header':TermsUtil['tLabel'](_0x3d9618(0xe8)),'sortable':!0x1,'width':0x64,'record':{'align':'left','editable':!0x0,'mandatory':!0x0}},{'type':'string','name':_0x3d9618(0xe0),'header':TermsUtil[_0x3d9618(0xe2)](_0x3d9618(0xfe)),'sortable':!0x1,'width':0x64,'record':{'align':'left','editable':!0x0,'mandatory':!0x0}}]};}};
|
package/client/pages/main.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a0_0x20b9(){var _0x37cb5e=['2aNJKGn','10fYwAuH','13698nskwvB','4907CjIiQf','256892XWgDLX','96890tbhEIv','16487031joajLQ','define','context','styles','render','1413NBGPwv','Operato\x20Tools','426232NlGBIJ','1491972hVEuPh','customElements','359278ayEGnM','operato-tools-main'];a0_0x20b9=function(){return _0x37cb5e;};return a0_0x20b9();}var a0_0x5aed84=a0_0x1b91;function a0_0x1b91(_0x45814d,_0x5af0d3){var _0x20b921=a0_0x20b9();return a0_0x1b91=function(_0x1b91db,_0x561eac){_0x1b91db=_0x1b91db-0x1ec;var _0x468bec=_0x20b921[_0x1b91db];return _0x468bec;},a0_0x1b91(_0x45814d,_0x5af0d3);}(function(_0x229b98,_0x405286){var _0x3d387c=a0_0x1b91,_0xb16646=_0x229b98();while(!![]){try{var _0x1c7665=parseInt(_0x3d387c(0x1fd))/0x1*(-parseInt(_0x3d387c(0x1fb))/0x2)+-parseInt(_0x3d387c(0x1f9))/0x3+-parseInt(_0x3d387c(0x1ef))/0x4*(-parseInt(_0x3d387c(0x1ec))/0x5)+parseInt(_0x3d387c(0x1ed))/0x6*(parseInt(_0x3d387c(0x1ee))/0x7)+parseInt(_0x3d387c(0x1f8))/0x8+parseInt(_0x3d387c(0x1f6))/0x9*(-parseInt(_0x3d387c(0x1f0))/0xa)+parseInt(_0x3d387c(0x1f1))/0xb;if(_0x1c7665===_0x405286)break;else _0xb16646['push'](_0xb16646['shift']());}catch(_0x3f738b){_0xb16646['push'](_0xb16646['shift']());}}}(a0_0x20b9,0xdc7f2));import{html,css}from'lit-element';import{connect}from'pwa-helpers/connect-mixin.js';import{store,PageView}from'@things-factory/shell';import{TermsUtil}from'@things-factory/meta-ui';class OperatoToolsMain extends connect(store)(PageView){static get[a0_0x5aed84(0x1f4)](){return[css`
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
4
|
background-color: var(--main-section-background-color);
|
|
@@ -41,11 +41,11 @@ function a0_0x55fa(){var _0x550763=['31335FoxIvi','42TqVMtv','3aNUstl','10hvVIma
|
|
|
41
41
|
display: none;
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
`];}get[
|
|
44
|
+
`];}get[a0_0x5aed84(0x1f3)](){var _0x5a8490=a0_0x5aed84;return{'title':_0x5a8490(0x1f7),'actions':[]};}[a0_0x5aed84(0x1f5)](){return html`
|
|
45
45
|
<h2>Operato Tools</h2>
|
|
46
46
|
<p page-description>
|
|
47
|
-
${TermsUtil[
|
|
47
|
+
${TermsUtil['tText']('tool\x20start\x20msg')}
|
|
48
48
|
</p>
|
|
49
49
|
|
|
50
50
|
<img src="/assets/images/operato-tools.png" />
|
|
51
|
-
`;}}window[
|
|
51
|
+
`;}}window[a0_0x5aed84(0x1fa)][a0_0x5aed84(0x1f2)](a0_0x5aed84(0x1fc),OperatoToolsMain);
|
package/client/reducers/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a0_0x2a02f1=a0_0x4835;(function(_0x1efd6b,_0x4dcd9e){const _0x2a8bfe=a0_0x4835,_0x4ef10d=_0x1efd6b();while(!![]){try{const _0x41ba01=-parseInt(_0x2a8bfe(0x1e7))/0x1+parseInt(_0x2a8bfe(0x1e5))/0x2*(-parseInt(_0x2a8bfe(0x1ec))/0x3)+parseInt(_0x2a8bfe(0x1ed))/0x4*(parseInt(_0x2a8bfe(0x1ee))/0x5)+parseInt(_0x2a8bfe(0x1ea))/0x6*(parseInt(_0x2a8bfe(0x1ef))/0x7)+-parseInt(_0x2a8bfe(0x1e3))/0x8+parseInt(_0x2a8bfe(0x1e1))/0x9+parseInt(_0x2a8bfe(0x1eb))/0xa*(-parseInt(_0x2a8bfe(0x1e2))/0xb);if(_0x41ba01===_0x4dcd9e)break;else _0x4ef10d['push'](_0x4ef10d['shift']());}catch(_0x4585e2){_0x4ef10d['push'](_0x4ef10d['shift']());}}}(a0_0x27c5,0xe8871));import a0_0x29e299 from'graphql-tag';import{i18next}from'@operato/i18n';import{store}from'@operato/shell';function a0_0x27c5(){const _0x496129=['2756400SZYHRp','UPDATE_OPERATO_TOOLS_PERMISSION','4xZahHj','ABC','883639ozGzAV','state','dispatch','894ymsjUj','260MFndlz','1281687CafOTi','1876920ZSXzio','20StlfwJ','31227tRJwvk','data','type','11574495qqrMiq','335324kfDyKU'];a0_0x27c5=function(){return _0x496129;};return a0_0x27c5();}import{client,gqlContext}from'@operato/graphql';function a0_0x4835(_0x414754,_0x25a6de){const _0x27c5d7=a0_0x27c5();return a0_0x4835=function(_0x483570,_0x5bf771){_0x483570=_0x483570-0x1e1;let _0x54b782=_0x27c5d7[_0x483570];return _0x54b782;},a0_0x4835(_0x414754,_0x25a6de);}import{UPDATE_OPERATO_TOOLS}from'../actions/main';const INITIAL_STATE={'operatoTools':a0_0x2a02f1(0x1e6),'studioPermission':!0x1};export const UPDATE_OPERATO_TOOLS_PERMISSION=a0_0x2a02f1(0x1e4);((async()=>{const _0x5f2287=a0_0x2a02f1;var _0x3443e4=await client['query']({'query':a0_0x29e299`{studioPermission}`});let _0x5d34ae=!0x1;_0x3443e4['errors']||(_0x5d34ae=_0x3443e4[_0x5f2287(0x1f0)]['studioPermission']),store[_0x5f2287(0x1e9)]({'type':UPDATE_OPERATO_TOOLS_PERMISSION,'state':{'studioPermission':_0x5d34ae}});})());const operatoTools=(_0xc6959c=INITIAL_STATE,_0x500889)=>{const _0x9a9e10=a0_0x2a02f1;switch(_0x500889[_0x9a9e10(0x1f1)]){case UPDATE_OPERATO_TOOLS:return{..._0xc6959c};case UPDATE_OPERATO_TOOLS_PERMISSION:return{...INITIAL_STATE,..._0x500889[_0x9a9e10(0x1e8)]};default:return _0xc6959c;}};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.54",
|
|
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.54",
|
|
33
33
|
"@things-factory/operato-license-checker": "^3.1.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@things-factory/builder": "^6.1.48",
|
|
37
37
|
"@things-factory/meta-ui": "^6.0.0-alpha.6"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "0a1dfea2fc8b8a65d91ad16357f4524d0c622bb8"
|
|
40
40
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a0_0x136cf3=a0_0x272e;function a0_0x1e6b(){var _0x3d4151=['INVALID_LICENSE','2JbsfOZ','103146ptZuAu','4240497bkfGhO','46528OWRYfI','344zZdLka','defineProperty','68795FIiBqf','error.page\x20count\x20over\x20license\x20limit','12aEjofb','36582623LHFNoL','189dhXvoe','1512trUdaD','OVER_LIMIT','1762957liYTKL','153460ihsURR','__esModule'];a0_0x1e6b=function(){return _0x3d4151;};return a0_0x1e6b();}function a0_0x272e(_0x583ea3,_0x18e135){var _0x1e6b20=a0_0x1e6b();return a0_0x272e=function(_0x272e63,_0x4006bf){_0x272e63=_0x272e63-0xb7;var _0x19e482=_0x1e6b20[_0x272e63];return _0x19e482;},a0_0x272e(_0x583ea3,_0x18e135);}(function(_0x542698,_0x2bd5c0){var _0x328306=a0_0x272e,_0x3d743c=_0x542698();while(!![]){try{var _0x2898c6=parseInt(_0x328306(0xba))/0x1*(parseInt(_0x328306(0xbe))/0x2)+-parseInt(_0x328306(0xc0))/0x3+parseInt(_0x328306(0xc2))/0x4*(-parseInt(_0x328306(0xc4))/0x5)+-parseInt(_0x328306(0xbf))/0x6+parseInt(_0x328306(0xb8))/0x7*(-parseInt(_0x328306(0xc1))/0x8)+-parseInt(_0x328306(0xb7))/0x9*(parseInt(_0x328306(0xbb))/0xa)+parseInt(_0x328306(0xc7))/0xb*(parseInt(_0x328306(0xc6))/0xc);if(_0x2898c6===_0x2bd5c0)break;else _0x3d743c['push'](_0x3d743c['shift']());}catch(_0x5645be){_0x3d743c['push'](_0x3d743c['shift']());}}}(a0_0x1e6b,0xdaca4));Object[a0_0x136cf3(0xc3)](exports,a0_0x136cf3(0xbc),{'value':!0x0}),exports[a0_0x136cf3(0xb9)]=exports[a0_0x136cf3(0xbd)]=void 0x0,exports['INVALID_LICENSE']='error.invalid\x20license\x20key',exports[a0_0x136cf3(0xb9)]=a0_0x136cf3(0xc5);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x41f964=a0_0x1518;(function(_0x2cc3e1,_0x490da7){const _0x5e8be0=a0_0x1518,_0x248b56=_0x2cc3e1();while(!![]){try{const _0x4703f5=-parseInt(_0x5e8be0(0x79))/0x1+parseInt(_0x5e8be0(0x87))/0x2+-parseInt(_0x5e8be0(0x78))/0x3*(-parseInt(_0x5e8be0(0x7a))/0x4)+parseInt(_0x5e8be0(0x7b))/0x5+parseInt(_0x5e8be0(0x85))/0x6+parseInt(_0x5e8be0(0x7c))/0x7+-parseInt(_0x5e8be0(0x77))/0x8*(parseInt(_0x5e8be0(0x81))/0x9);if(_0x4703f5===_0x490da7)break;else _0x248b56['push'](_0x248b56['shift']());}catch(_0x36a461){_0x248b56['push'](_0x248b56['shift']());}}}(a0_0x4ce1,0xe4ec6));function a0_0x4ce1(){const _0x33b086=['9927498BJFPqe','defineProperty','__importStar','ERROR_CODES','license-error','25999641wWCfoH','tslib','__esModule','errorCode','2350218bpWiTl','LicenseError','2323266aXNtGY','name','assign','8EDwDFk','510PwOtKR','1481786OkXVCe','16560ZDGhBO','8164775uVCdhS'];a0_0x4ce1=function(){return _0x33b086;};return a0_0x4ce1();}Object[a0_0x41f964(0x7d)](exports,a0_0x41f964(0x83),{'value':!0x0}),exports[a0_0x41f964(0x86)]=void 0x0;const tslib_1=require(a0_0x41f964(0x82)),ERROR_CODES=tslib_1[a0_0x41f964(0x7e)](require('../constants/error-code'));function a0_0x1518(_0x29f47b,_0x3e2cbc){const _0x4ce1b9=a0_0x4ce1();return a0_0x1518=function(_0x151871,_0x229b25){_0x151871=_0x151871-0x75;let _0x5ebd59=_0x4ce1b9[_0x151871];return _0x5ebd59;},a0_0x1518(_0x29f47b,_0x3e2cbc);}class LicenseError extends Error{static get[a0_0x41f964(0x7f)](){const _0x1ccd93=a0_0x41f964;return Object[_0x1ccd93(0x76)]({},ERROR_CODES);}constructor({errorCode:_0x50d534,detail:_0x437c33}){const _0x23d8c3=a0_0x41f964;super(_0x50d534),this[_0x23d8c3(0x75)]=_0x23d8c3(0x80),this[_0x23d8c3(0x84)]=_0x50d534,this['detail']=_0x437c33;}}exports[a0_0x41f964(0x86)]=LicenseError;
|
package/server/routes.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a0_0x504126=a0_0x6ec2;(function(_0x314b58,_0x3a1088){const _0x197e30=a0_0x6ec2,_0x39bf66=_0x314b58();while(!![]){try{const _0x15da8c=-parseInt(_0x197e30(0x171))/0x1+parseInt(_0x197e30(0x16f))/0x2+parseInt(_0x197e30(0x173))/0x3*(parseInt(_0x197e30(0x16d))/0x4)+-parseInt(_0x197e30(0x165))/0x5*(-parseInt(_0x197e30(0x16a))/0x6)+parseInt(_0x197e30(0x16c))/0x7+parseInt(_0x197e30(0x170))/0x8*(parseInt(_0x197e30(0x16b))/0x9)+-parseInt(_0x197e30(0x172))/0xa;if(_0x15da8c===_0x3a1088)break;else _0x39bf66['push'](_0x39bf66['shift']());}catch(_0x23fdba){_0x39bf66['push'](_0x39bf66['shift']());}}}(a0_0x24ce,0xe99a3));function a0_0x24ce(){const _0x2a52f9=['40248760OfEXJn','3aTvrXF','17660udLBFT','debug','things-factory:operato-tools:routes','bootstrap-module-domain-private-route','bootstrap-module-domain-public-route','1338eloTDg','15336990aAdPOe','12315639mJeKOG','981272MmcqAJ','bootstrap-module-global-public-route','1055794guzVPh','8TvQesB','42627rQcGlc'];a0_0x24ce=function(){return _0x2a52f9;};return a0_0x24ce();}const debug=require(a0_0x504126(0x166))(a0_0x504126(0x167));function a0_0x6ec2(_0x53a055,_0x3966ca){const _0x24cefc=a0_0x24ce();return a0_0x6ec2=function(_0x6ec2a3,_0x5b9696){_0x6ec2a3=_0x6ec2a3-0x165;let _0x342c32=_0x24cefc[_0x6ec2a3];return _0x342c32;},a0_0x6ec2(_0x53a055,_0x3966ca);}process['on'](a0_0x504126(0x16e),(_0x4f6c8c,_0x1e11f0)=>{}),process['on']('bootstrap-module-global-private-route',(_0xe22650,_0x2e17ec)=>{}),process['on'](a0_0x504126(0x169),(_0x1da32b,_0x517bdb)=>{}),process['on'](a0_0x504126(0x168),(_0x3e857c,_0x1159aa)=>{});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x59f05=a0_0x1a06;(function(_0x2cc65d,_0xfc9eb3){const _0x5f535b=a0_0x1a06,_0x29d36e=_0x2cc65d();while(!![]){try{const _0x418441=parseInt(_0x5f535b(0x1eb))/0x1+parseInt(_0x5f535b(0x258))/0x2*(-parseInt(_0x5f535b(0x253))/0x3)+parseInt(_0x5f535b(0x204))/0x4*(parseInt(_0x5f535b(0x222))/0x5)+parseInt(_0x5f535b(0x1ea))/0x6+parseInt(_0x5f535b(0x1ed))/0x7*(-parseInt(_0x5f535b(0x21d))/0x8)+-parseInt(_0x5f535b(0x25b))/0x9+parseInt(_0x5f535b(0x210))/0xa*(parseInt(_0x5f535b(0x24a))/0xb);if(_0x418441===_0xfc9eb3)break;else _0x29d36e['push'](_0x29d36e['shift']());}catch(_0x30fc7b){_0x29d36e['push'](_0x29d36e['shift']());}}}(a0_0x4909,0x7b016));function a0_0x4909(){const _0x29935a=['Arg','filter','createSortCols','readonly','update','__importDefault','updater_id','default','template','utf8','aes-256-cfb8','aes-256-cfb1','COPY','meta-grist-page','creator_id','8XvIVWO','createGridColumns','\x22,\x22header\x22:\x20\x22','rank',',\x22mandatory\x22:\x20','stringify','createSearchCols','aes-256-ofb','\x22,\x22operator\x22:\x20\x22','creator','createdAt','\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}','19770rofHbD','substring','h1z0q9i9x7q6','hidden','select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27','final','design:paramtypes','{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22','toString','parent','length','Directive','\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','635408YdswTL','find','sortRank','\x20,\x22editable\x22:\x20','OperatoToolCreateMenu','188165PBtjdk','updater','Mutation','entity','aes256','\x22,\x22width\x22:','replace','checkStudioTemplateIsOverLimit','createMenuData','{\x22type\x22:\x20\x22','gridRank','query','aes-256-ecb','enc','join','aes-256-ctr','category','aes-256-cbc','lodash','JSON','randomBytes','assign','@transaction','sort','@things-factory/resource-base','getRepository','__param','split','Menu','updated_at','findOne','resourceUrl','toolCreateMenu','__metadata','prototype','state','EntityColumn','\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}','refType','dataProp','10747HYGdWg','Operato\x20Tool\x20Create\x20Menu',',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22','@things-factory/menu-base','string','hiddenFlag','left','crypto','hex','6keryyU','\x22,\x22name\x22:\x20\x22','SCREEN','__decorate','name','749266JIbLvq','{\x22name\x22:\x20\x22','parent_menu_id','6859215HQLQeV','code','407898MSAOtg','99305DmkvfI','\x20,\x22exportable\x22:\x20true','14tiDCXd','defineProperty','Ctx','Entity','refName','Resolver','searchRank','map'];a0_0x4909=function(){return _0x29935a;};return a0_0x4909();}Object[a0_0x59f05(0x1ee)](exports,'__esModule',{'value':!0x0}),exports[a0_0x59f05(0x221)]=void 0x0;const tslib_1=require('tslib'),type_graphql_1=require('type-graphql'),resource_base_1=require(a0_0x59f05(0x23a)),menu_base_1=require(a0_0x59f05(0x24d)),tool_permission_1=require('./../tool-secret/tool-permission'),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x59f05(0x234)),{plural:plural}=require('pluralize'),crypto_1=tslib_1[a0_0x59f05(0x1fa)](require(a0_0x59f05(0x251)));let OperatoToolCreateMenu=class{async[a0_0x59f05(0x242)](_0x218763,_0x3a646b,_0x39ef2e){const _0x1ec11d=a0_0x59f05,{domain:_0x1783e8,user:_0x86f983,tx:_0x20c40a}=_0x39ef2e[_0x1ec11d(0x245)];await(0x0,tool_permission_1[_0x1ec11d(0x229)])('',_0x39ef2e);const _0x5421a5=await _0x20c40a['getRepository'](resource_base_1[_0x1ec11d(0x1f0)])[_0x1ec11d(0x240)]({'where':{'domain':{'id':_0x1783e8['id']},'id':_0x218763}}),_0x2855cf=await _0x20c40a[_0x1ec11d(0x23b)](resource_base_1[_0x1ec11d(0x246)])[_0x1ec11d(0x21e)]({'where':{'domain':{'id':_0x1783e8['id']},'entity':{'id':_0x5421a5['id']}}});let {name:_0x11dbea=''}=_0x5421a5||{},_0x16dbad=kebabCase(_0x11dbea),_0x7d6d12=modelTemplate[_0x1ec11d(0x228)](/{{pascalCase name}}/g,startCase(camelCase(_0x11dbea))[_0x1ec11d(0x228)](/ /g,''))[_0x1ec11d(0x228)](/{{camelCase name}}/g,camelCase(_0x11dbea))[_0x1ec11d(0x228)](/{{snakeCase name}}/g,snakeCase(_0x11dbea))[_0x1ec11d(0x228)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x11dbea)))[_0x1ec11d(0x228)](/ /g,''))['replace'](/{{pluralCamelCase name}}/g,camelCase(plural(_0x11dbea)))[_0x1ec11d(0x228)](/{{name}}/g,_0x11dbea),_0x1ed2e8='';_0x1ec11d(0x235)==_0x5421a5[_0x1ec11d(0x249)]?_0x1ed2e8='\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':_0x1ec11d(0x201)==_0x5421a5[_0x1ec11d(0x249)]&&(_0x1ed2e8=_0x1ec11d(0x21c)),_0x7d6d12=_0x7d6d12[_0x1ec11d(0x228)](/{{HistoryButton}}/g,_0x1ed2e8);let _0x3afc62=this[_0x1ec11d(0x1f7)](_0x2855cf);_0x7d6d12=_0x7d6d12['replace'](/{{SortColumns}}/g,_0x3afc62[_0x1ec11d(0x230)](','));let _0x3ddaf9=this[_0x1ec11d(0x20a)](_0x2855cf);_0x7d6d12=_0x7d6d12[_0x1ec11d(0x228)](/{{SearchColumns}}/g,_0x3ddaf9[_0x1ec11d(0x230)](','));let _0x4d9e98=this['createGridColumns'](_0x2855cf);return _0x7d6d12=_0x7d6d12['replace'](/{{GridColumns}}/g,_0x4d9e98[_0x1ec11d(0x230)](',')),_0x7d6d12=this['enc'](_0x7d6d12),await this[_0x1ec11d(0x22a)](_0x20c40a,_0x1783e8,_0x86f983,_0x3a646b,_0x16dbad,_0x7d6d12),!0x0;}[a0_0x59f05(0x205)](_0x3d241f){const _0x4b189a=a0_0x59f05;return _0x3d241f[_0x4b189a(0x1f6)](_0x5666bb=>'id'!=_0x5666bb['name']&&_0x5666bb[_0x4b189a(0x22c)]>0x0)[_0x4b189a(0x239)](function(_0x51844e,_0x4bd00c){const _0x5edd2a=_0x4b189a;return _0x51844e[_0x5edd2a(0x22c)]-_0x4bd00c[_0x5edd2a(0x22c)];})['map'](_0x4e3ba3=>{const _0x1616a3=_0x4b189a;let {gridEditor:_0xe17c27=_0x1616a3(0x24e),name:_0x556f31,term:_0x47e3ac,gridWidth:_0x238ad8=0x0,gridAlign:_0x542ce9=_0x1616a3(0x250),nullable:_0x62f42=!0x1}=_0x4e3ba3;if(null==_0xe17c27&&(_0xe17c27=_0x1616a3(0x24e)),null==_0x542ce9&&(_0x542ce9=_0x1616a3(0x250)),_0x1616a3(0x1fb)==_0x556f31||_0x1616a3(0x203)==_0x556f31)return _0x556f31=_0x1616a3(0x1fb)==_0x556f31?_0x1616a3(0x223):_0x1616a3(0x20d),_0x1616a3(0x217)+_0x556f31+_0x1616a3(0x206)+_0x556f31+_0x1616a3(0x20f);if(_0x1616a3(0x23f)==_0x556f31||'created_at'==_0x556f31)return'{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22'+('updated_at'==_0x556f31?'updatedAt':_0x1616a3(0x20e))+_0x1616a3(0x206)+_0x556f31+_0x1616a3(0x247);let _0x530871=_0x1616a3(0x1f8)!=_0xe17c27&&_0x1616a3(0x213)!=_0xe17c27,_0x9a9010=_0x1616a3(0x213)==_0xe17c27;0x1!=_0x9a9010&&0x0!=_0x530871||(_0xe17c27=_0x1616a3(0x24e));let _0x17e584=_0x1616a3(0x22b)+_0xe17c27+_0x1616a3(0x254)+camelCase(_0x556f31)+_0x1616a3(0x206)+_0x47e3ac+'\x22,\x22hidden\x22:'+_0x9a9010+_0x1616a3(0x220)+_0x530871+_0x1616a3(0x208)+!_0x62f42+_0x1616a3(0x24c)+_0x542ce9+_0x1616a3(0x227)+_0x238ad8+_0x1616a3(0x1ec);return _0x1616a3(0x1e9)==_0x4e3ba3[_0x1616a3(0x248)]&&(_0x17e584+=',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22'+_0x4e3ba3[_0x1616a3(0x1f1)]+'\x22}'),'scenario'==_0x4e3ba3[_0x1616a3(0x248)]&&(_0x17e584+=',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22'+_0x4e3ba3['refName']+'\x22}'),_0x1616a3(0x225)==_0x4e3ba3[_0x1616a3(0x248)]&&(_0x17e584+=',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22'+camelCase(plural(_0x4e3ba3['refName']))+'\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}'),_0x17e584+='}',_0x17e584;});}[a0_0x59f05(0x20a)](_0x17f340){const _0x4e6628=a0_0x59f05;return _0x17f340[_0x4e6628(0x1f6)](_0x27de8a=>_0x27de8a[_0x4e6628(0x1f3)]>0x0)[_0x4e6628(0x239)](function(_0x552d7a,_0x24b849){const _0x55c5ff=_0x4e6628;return _0x552d7a[_0x55c5ff(0x1f3)]-_0x24b849[_0x55c5ff(0x1f3)];})[_0x4e6628(0x1f4)](_0x155ae4=>{const _0x6617c6=_0x4e6628;let _0x3be35e=_0x155ae4['searchOper'];return _0x6617c6(0x1f6)==_0x3be35e?'\x22'+camelCase(_0x155ae4['name'])+'\x22':(_0x3be35e||(_0x3be35e='eq'),_0x6617c6(0x259)+camelCase(_0x155ae4['name'])+_0x6617c6(0x20c)+_0x3be35e+'\x22}');});}[a0_0x59f05(0x1f7)](_0x218a0d){const _0x116605=a0_0x59f05;return _0x218a0d[_0x116605(0x1f6)](_0x27d914=>_0x27d914[_0x116605(0x21f)]>0x0)[_0x116605(0x239)](function(_0x18dffa,_0x10899e){const _0x275248=_0x116605;return _0x18dffa['sortRank']-_0x10899e[_0x275248(0x21f)];})[_0x116605(0x1f4)](_0x403566=>'{\x22name\x22:\x22'+camelCase(_0x403566[_0x116605(0x257)])+'\x22,\x22desc\x22:'+_0x403566['reverseSort']+'}');}async[a0_0x59f05(0x22a)](_0x3a7fae,_0x3b8d16,_0x5c0814,_0x4662a9,_0x40f53d,_0x11d285){const _0x547d8b=a0_0x59f05;let _0x56838f=await _0x3a7fae[_0x547d8b(0x23b)](menu_base_1[_0x547d8b(0x23e)])[_0x547d8b(0x240)]({'where':{'domain':{'id':_0x3b8d16['id']},'id':_0x4662a9}}),_0x572fc7=(await _0x3a7fae['getRepository'](menu_base_1[_0x547d8b(0x23e)])[_0x547d8b(0x22d)](_0x547d8b(0x214)+_0x4662a9+'\x27\x20or\x20id\x20=\x20\x27'+_0x4662a9+'\x27'))[0x0][_0x547d8b(0x207)]+0xa,_0x34a366=new menu_base_1['Menu']();_0x34a366[_0x547d8b(0x257)]=_0x40f53d,_0x34a366['menuType']=_0x547d8b(0x255),_0x34a366[_0x547d8b(0x232)]=_0x547d8b(0x202),_0x34a366['rank']=_0x572fc7,_0x34a366[_0x547d8b(0x24f)]=!0x1,_0x34a366['routing']=_0x40f53d,_0x34a366[_0x547d8b(0x1fd)]=_0x11d285,_0x34a366[_0x547d8b(0x241)]='@things-factory/meta-ui/client/pages/meta-grist-page',_0x34a366[_0x547d8b(0x219)]=_0x56838f,await _0x3a7fae['getRepository'](menu_base_1[_0x547d8b(0x23e)])['save'](Object[_0x547d8b(0x237)](Object[_0x547d8b(0x237)]({},_0x34a366),{'domain':_0x3b8d16,'creator':_0x5c0814,'updater':_0x5c0814}));}[a0_0x59f05(0x22f)](_0x46c7e8){const _0xeaac07=a0_0x59f05;let _0x264159=JSON[_0xeaac07(0x209)](_0x46c7e8)[_0xeaac07(0x23d)](/(.{100})/)['filter'](_0x403c13=>_0x403c13),_0x319421=[_0xeaac07(0x22e),_0xeaac07(0x233),'aes-256-cfb',_0xeaac07(0x1ff),_0xeaac07(0x200),_0xeaac07(0x20b),_0xeaac07(0x231),_0xeaac07(0x226)],_0x2b0abc=crypto_1[_0xeaac07(0x1fc)][_0xeaac07(0x236)](0x20)[_0xeaac07(0x218)]('hex'),_0x53d350=Buffer['from'](_0x2b0abc,_0xeaac07(0x252)),_0x3e541e=_0x2b0abc[_0xeaac07(0x211)](0x0,0x10),_0x13477c=['',_0x3e541e,_0x3e541e,_0x3e541e,_0x3e541e,_0x3e541e,_0x3e541e,_0x3e541e],_0x19f7d1=0x0,_0x385079=[];_0x385079['push'](_0x2b0abc);for(var _0x27af3d=0x0;_0x27af3d<_0x264159[_0xeaac07(0x21a)];_0x27af3d++,_0x19f7d1++){_0x19f7d1==_0x319421['length']&&(_0x19f7d1=0x0);let _0x5a4a48=crypto_1[_0xeaac07(0x1fc)]['createCipheriv'](_0x319421[_0x19f7d1],_0x53d350,_0x13477c[_0x19f7d1]),_0x133024=_0x5a4a48[_0xeaac07(0x1f9)](_0x264159[_0x27af3d],_0xeaac07(0x1fe),'hex');_0x133024+=_0x5a4a48[_0xeaac07(0x215)](_0xeaac07(0x252)),_0x385079['push'](_0x133024);}return _0x385079[_0xeaac07(0x230)](_0xeaac07(0x212));}};tslib_1[a0_0x59f05(0x256)]([(0x0,type_graphql_1[a0_0x59f05(0x21b)])(a0_0x59f05(0x238)),(0x0,type_graphql_1[a0_0x59f05(0x224)])(_0x132ce9=>Boolean,{'description':a0_0x59f05(0x24b)}),tslib_1[a0_0x59f05(0x23c)](0x0,(0x0,type_graphql_1[a0_0x59f05(0x1f5)])('id')),tslib_1[a0_0x59f05(0x23c)](0x1,(0x0,type_graphql_1['Arg'])(a0_0x59f05(0x25a))),tslib_1[a0_0x59f05(0x23c)](0x2,(0x0,type_graphql_1[a0_0x59f05(0x1ef)])()),tslib_1[a0_0x59f05(0x243)]('design:type',Function),tslib_1['__metadata'](a0_0x59f05(0x216),[String,String,Object]),tslib_1[a0_0x59f05(0x243)]('design:returntype',Promise)],OperatoToolCreateMenu[a0_0x59f05(0x244)],'toolCreateMenu',null),OperatoToolCreateMenu=tslib_1[a0_0x59f05(0x256)]([(0x0,type_graphql_1[a0_0x59f05(0x1f2)])()],OperatoToolCreateMenu),exports[a0_0x59f05(0x221)]=OperatoToolCreateMenu;function a0_0x1a06(_0x46c2c6,_0x5ab3b2){const _0x490941=a0_0x4909();return a0_0x1a06=function(_0x1a06f4,_0x3bcb48){_0x1a06f4=_0x1a06f4-0x1e9;let _0x36ae83=_0x490941[_0x1a06f4];return _0x36ae83;},a0_0x1a06(_0x46c2c6,_0x5ab3b2);}const modelTemplate='\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';
|
|
1
|
+
'use strict';const a0_0x2f88a3=a0_0x3e84;function a0_0x3e09(){const _0x205cc4=['find','updater_id','aes-256-cfb1','737835gYrpGR','reverseSort','select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27','crypto','\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}','\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}','Menu','design:type','aes-256-cbc','Mutation','scenario','rank','update','filter','findOne','EntityColumn','design:paramtypes','__decorate','10884mKXOez','createMenuData','aes-256-cfb8','\x22,\x22desc\x22:','entity','enc','Directive','\x22,\x22width\x22:','tslib','aes256','8zfFTdH','__metadata','aes-256-ctr','Arg','createdAt','createSortCols','query','116263hJFBOV','save','getRepository','SCREEN','\x22,\x22operator\x22:\x20\x22',',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22','createSearchCols','hex','refType','aes-256-ecb','left','JSON','routing','searchOper','split','{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22','Entity','dataProp','\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','Operato\x20Tool\x20Create\x20Menu','\x20,\x22exportable\x22:\x20true','state','replace','829485EQwjMh','code','144zXCWVn','meta-grist-page','resourceUrl','{\x22type\x22:\x20\x22','join','searchRank','./../tool-secret/tool-permission','1883130WurzUH','4aIysKg','{\x22name\x22:\x22','sortRank','__esModule','createGridColumns','toString','template','length','design:returntype','assign','__param','map','385215cQoAxm','prototype','gridRank','29020pdwxsD',',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22','string','\x20,\x22editable\x22:\x20','type-graphql','sort','push','\x22,\x22header\x22:\x20\x22','{\x22name\x22:\x20\x22','checkStudioTemplateIsOverLimit','__importDefault','627LyOSLK',',\x22mandatory\x22:\x20','creator','\x27\x20or\x20id\x20=\x20\x27','hidden','defineProperty','2sXPWaE','{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22','OperatoToolCreateMenu','parent_menu_id','refName','createCipheriv','default','from','name','toolCreateMenu'];a0_0x3e09=function(){return _0x205cc4;};return a0_0x3e09();}(function(_0x1537c1,_0x553fa8){const _0x37b990=a0_0x3e84,_0x2b83c8=_0x1537c1();while(!![]){try{const _0x672714=-parseInt(_0x37b990(0x180))/0x1*(-parseInt(_0x37b990(0x150))/0x2)+-parseInt(_0x37b990(0x13c))/0x3*(parseInt(_0x37b990(0x130))/0x4)+-parseInt(_0x37b990(0x13f))/0x5*(parseInt(_0x37b990(0x128))/0x6)+parseInt(_0x37b990(0x15d))/0x7*(parseInt(_0x37b990(0x179))/0x8)+-parseInt(_0x37b990(0x126))/0x9+parseInt(_0x37b990(0x12f))/0xa+-parseInt(_0x37b990(0x14a))/0xb*(-parseInt(_0x37b990(0x16f))/0xc);if(_0x672714===_0x553fa8)break;else _0x2b83c8['push'](_0x2b83c8['shift']());}catch(_0x184bd3){_0x2b83c8['push'](_0x2b83c8['shift']());}}}(a0_0x3e09,0x18db6));Object[a0_0x2f88a3(0x14f)](exports,a0_0x2f88a3(0x133),{'value':!0x0}),exports[a0_0x2f88a3(0x152)]=void 0x0;const tslib_1=require(a0_0x2f88a3(0x177)),type_graphql_1=require(a0_0x2f88a3(0x143)),resource_base_1=require('@things-factory/resource-base'),menu_base_1=require('@things-factory/menu-base'),tool_permission_1=require(a0_0x2f88a3(0x12e)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require('lodash'),{plural:plural}=require('pluralize'),crypto_1=tslib_1[a0_0x2f88a3(0x149)](require(a0_0x2f88a3(0x160)));function a0_0x3e84(_0xc590df,_0x3abd9c){const _0x3e09e3=a0_0x3e09();return a0_0x3e84=function(_0x3e840b,_0x4eddd0){_0x3e840b=_0x3e840b-0x126;let _0x5f15cd=_0x3e09e3[_0x3e840b];return _0x5f15cd;},a0_0x3e84(_0xc590df,_0x3abd9c);}let OperatoToolCreateMenu=class{async[a0_0x2f88a3(0x159)](_0x2dc4b7,_0x5634cc,_0x7f9484){const _0x4f6560=a0_0x2f88a3,{domain:_0x55677b,user:_0x20c95b,tx:_0x2f9ffb}=_0x7f9484[_0x4f6560(0x195)];await(0x0,tool_permission_1[_0x4f6560(0x148)])('',_0x7f9484);const _0x2143eb=await _0x2f9ffb['getRepository'](resource_base_1[_0x4f6560(0x190)])[_0x4f6560(0x16b)]({'where':{'domain':{'id':_0x55677b['id']},'id':_0x2dc4b7}}),_0x4f34a3=await _0x2f9ffb[_0x4f6560(0x182)](resource_base_1[_0x4f6560(0x16c)])[_0x4f6560(0x15a)]({'where':{'domain':{'id':_0x55677b['id']},'entity':{'id':_0x2143eb['id']}}});let {name:_0x2632f3=''}=_0x2143eb||{},_0x145f37=kebabCase(_0x2632f3),_0x450a42=modelTemplate['replace'](/{{pascalCase name}}/g,startCase(camelCase(_0x2632f3))[_0x4f6560(0x196)](/ /g,''))[_0x4f6560(0x196)](/{{camelCase name}}/g,camelCase(_0x2632f3))[_0x4f6560(0x196)](/{{snakeCase name}}/g,snakeCase(_0x2632f3))[_0x4f6560(0x196)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x2632f3)))[_0x4f6560(0x196)](/ /g,''))[_0x4f6560(0x196)](/{{pluralCamelCase name}}/g,camelCase(plural(_0x2632f3)))[_0x4f6560(0x196)](/{{name}}/g,_0x2632f3),_0x1a8564='';_0x4f6560(0x18b)==_0x2143eb[_0x4f6560(0x191)]?_0x1a8564=_0x4f6560(0x192):'COPY'==_0x2143eb['dataProp']&&(_0x1a8564='\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'),_0x450a42=_0x450a42[_0x4f6560(0x196)](/{{HistoryButton}}/g,_0x1a8564);let _0x6ae4a7=this['createSortCols'](_0x4f34a3);_0x450a42=_0x450a42[_0x4f6560(0x196)](/{{SortColumns}}/g,_0x6ae4a7[_0x4f6560(0x12c)](','));let _0x6b8952=this['createSearchCols'](_0x4f34a3);_0x450a42=_0x450a42[_0x4f6560(0x196)](/{{SearchColumns}}/g,_0x6b8952[_0x4f6560(0x12c)](','));let _0x34d7ce=this[_0x4f6560(0x134)](_0x4f34a3);return _0x450a42=_0x450a42[_0x4f6560(0x196)](/{{GridColumns}}/g,_0x34d7ce[_0x4f6560(0x12c)](',')),_0x450a42=this['enc'](_0x450a42),await this[_0x4f6560(0x170)](_0x2f9ffb,_0x55677b,_0x20c95b,_0x5634cc,_0x145f37,_0x450a42),!0x0;}[a0_0x2f88a3(0x134)](_0x554790){const _0x532de2=a0_0x2f88a3;return _0x554790[_0x532de2(0x16a)](_0x2f1666=>'id'!=_0x2f1666[_0x532de2(0x158)]&&_0x2f1666[_0x532de2(0x13e)]>0x0)[_0x532de2(0x144)](function(_0x5a188e,_0xf37a3b){const _0x8fb216=_0x532de2;return _0x5a188e[_0x8fb216(0x13e)]-_0xf37a3b['gridRank'];})[_0x532de2(0x13b)](_0x556b19=>{const _0x3c40ca=_0x532de2;let {gridEditor:_0xc21d0e=_0x3c40ca(0x141),name:_0xfc5781,term:_0x3a364c,gridWidth:_0x15ac1e=0x0,gridAlign:_0xeeaa1=_0x3c40ca(0x18a),nullable:_0x497463=!0x1}=_0x556b19;if(null==_0xc21d0e&&(_0xc21d0e=_0x3c40ca(0x141)),null==_0xeeaa1&&(_0xeeaa1=_0x3c40ca(0x18a)),_0x3c40ca(0x15b)==_0xfc5781||'creator_id'==_0xfc5781)return _0xfc5781=_0x3c40ca(0x15b)==_0xfc5781?'updater':_0x3c40ca(0x14c),_0x3c40ca(0x18f)+_0xfc5781+_0x3c40ca(0x146)+_0xfc5781+_0x3c40ca(0x162);if('updated_at'==_0xfc5781||'created_at'==_0xfc5781)return _0x3c40ca(0x151)+('updated_at'==_0xfc5781?'updatedAt':_0x3c40ca(0x17d))+'\x22,\x22header\x22:\x20\x22'+_0xfc5781+'\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}';let _0x537f50='readonly'!=_0xc21d0e&&_0x3c40ca(0x14e)!=_0xc21d0e,_0x1581c2='hidden'==_0xc21d0e;0x1!=_0x1581c2&&0x0!=_0x537f50||(_0xc21d0e='string');let _0x4f774a=_0x3c40ca(0x12b)+_0xc21d0e+'\x22,\x22name\x22:\x20\x22'+camelCase(_0xfc5781)+_0x3c40ca(0x146)+_0x3a364c+'\x22,\x22hidden\x22:'+_0x1581c2+_0x3c40ca(0x142)+_0x537f50+_0x3c40ca(0x14b)+!_0x497463+_0x3c40ca(0x140)+_0xeeaa1+_0x3c40ca(0x176)+_0x15ac1e+_0x3c40ca(0x194);return _0x3c40ca(0x127)==_0x556b19['refType']&&(_0x4f774a+=_0x3c40ca(0x185)+_0x556b19[_0x3c40ca(0x154)]+'\x22}'),_0x3c40ca(0x167)==_0x556b19[_0x3c40ca(0x188)]&&(_0x4f774a+=',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22'+_0x556b19[_0x3c40ca(0x154)]+'\x22}'),_0x3c40ca(0x173)==_0x556b19['refType']&&(_0x4f774a+=',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22'+camelCase(plural(_0x556b19['refName']))+_0x3c40ca(0x161)),_0x4f774a+='}',_0x4f774a;});}[a0_0x2f88a3(0x186)](_0x2a5c25){const _0x5e07f9=a0_0x2f88a3;return _0x2a5c25[_0x5e07f9(0x16a)](_0x475641=>_0x475641[_0x5e07f9(0x12d)]>0x0)[_0x5e07f9(0x144)](function(_0x510db8,_0x25071b){const _0x5d3492=_0x5e07f9;return _0x510db8[_0x5d3492(0x12d)]-_0x25071b[_0x5d3492(0x12d)];})[_0x5e07f9(0x13b)](_0x4f584e=>{const _0xec2ef5=_0x5e07f9;let _0x4db6ca=_0x4f584e[_0xec2ef5(0x18d)];return _0xec2ef5(0x16a)==_0x4db6ca?'\x22'+camelCase(_0x4f584e[_0xec2ef5(0x158)])+'\x22':(_0x4db6ca||(_0x4db6ca='eq'),_0xec2ef5(0x147)+camelCase(_0x4f584e['name'])+_0xec2ef5(0x184)+_0x4db6ca+'\x22}');});}[a0_0x2f88a3(0x17e)](_0x5e24ab){const _0x31e674=a0_0x2f88a3;return _0x5e24ab['filter'](_0x6a1931=>_0x6a1931['sortRank']>0x0)[_0x31e674(0x144)](function(_0x326ceb,_0x1cca4f){const _0x78768d=_0x31e674;return _0x326ceb[_0x78768d(0x132)]-_0x1cca4f[_0x78768d(0x132)];})[_0x31e674(0x13b)](_0x1fcf76=>_0x31e674(0x131)+camelCase(_0x1fcf76[_0x31e674(0x158)])+_0x31e674(0x172)+_0x1fcf76[_0x31e674(0x15e)]+'}');}async[a0_0x2f88a3(0x170)](_0x2170e9,_0x2f5982,_0x3be62f,_0x2c6c41,_0x5a6165,_0x144f38){const _0x2c2261=a0_0x2f88a3;let _0x1f7252=await _0x2170e9[_0x2c2261(0x182)](menu_base_1[_0x2c2261(0x163)])['findOne']({'where':{'domain':{'id':_0x2f5982['id']},'id':_0x2c6c41}}),_0x36afa3=(await _0x2170e9[_0x2c2261(0x182)](menu_base_1[_0x2c2261(0x163)])[_0x2c2261(0x17f)](_0x2c2261(0x15f)+_0x2c6c41+_0x2c2261(0x14d)+_0x2c6c41+'\x27'))[0x0][_0x2c2261(0x168)]+0xa,_0x28ef68=new menu_base_1['Menu']();_0x28ef68['name']=_0x5a6165,_0x28ef68['menuType']=_0x2c2261(0x183),_0x28ef68['category']=_0x2c2261(0x129),_0x28ef68[_0x2c2261(0x168)]=_0x36afa3,_0x28ef68['hiddenFlag']=!0x1,_0x28ef68[_0x2c2261(0x18c)]=_0x5a6165,_0x28ef68[_0x2c2261(0x136)]=_0x144f38,_0x28ef68[_0x2c2261(0x12a)]='@things-factory/meta-ui/client/pages/meta-grist-page',_0x28ef68['parent']=_0x1f7252,await _0x2170e9[_0x2c2261(0x182)](menu_base_1['Menu'])[_0x2c2261(0x181)](Object[_0x2c2261(0x139)](Object[_0x2c2261(0x139)]({},_0x28ef68),{'domain':_0x2f5982,'creator':_0x3be62f,'updater':_0x3be62f}));}[a0_0x2f88a3(0x174)](_0x50fe2e){const _0x575c91=a0_0x2f88a3;let _0xebe5a6=JSON['stringify'](_0x50fe2e)[_0x575c91(0x18e)](/(.{100})/)[_0x575c91(0x16a)](_0x1b4b02=>_0x1b4b02),_0xe4a318=[_0x575c91(0x189),_0x575c91(0x165),'aes-256-cfb',_0x575c91(0x171),_0x575c91(0x15c),'aes-256-ofb',_0x575c91(0x17b),_0x575c91(0x178)],_0x123677=crypto_1['default']['randomBytes'](0x20)[_0x575c91(0x135)](_0x575c91(0x187)),_0x14e49d=Buffer[_0x575c91(0x157)](_0x123677,_0x575c91(0x187)),_0x55b041=_0x123677['substring'](0x0,0x10),_0x361cfc=['',_0x55b041,_0x55b041,_0x55b041,_0x55b041,_0x55b041,_0x55b041,_0x55b041],_0x299f28=0x0,_0x53ea3c=[];_0x53ea3c[_0x575c91(0x145)](_0x123677);for(var _0x5ac1a8=0x0;_0x5ac1a8<_0xebe5a6[_0x575c91(0x137)];_0x5ac1a8++,_0x299f28++){_0x299f28==_0xe4a318[_0x575c91(0x137)]&&(_0x299f28=0x0);let _0x455fea=crypto_1[_0x575c91(0x156)][_0x575c91(0x155)](_0xe4a318[_0x299f28],_0x14e49d,_0x361cfc[_0x299f28]),_0x1515e5=_0x455fea[_0x575c91(0x169)](_0xebe5a6[_0x5ac1a8],'utf8',_0x575c91(0x187));_0x1515e5+=_0x455fea['final'](_0x575c91(0x187)),_0x53ea3c[_0x575c91(0x145)](_0x1515e5);}return _0x53ea3c[_0x575c91(0x12c)]('h1z0q9i9x7q6');}};tslib_1[a0_0x2f88a3(0x16e)]([(0x0,type_graphql_1[a0_0x2f88a3(0x175)])('@transaction'),(0x0,type_graphql_1[a0_0x2f88a3(0x166)])(_0x31c297=>Boolean,{'description':a0_0x2f88a3(0x193)}),tslib_1['__param'](0x0,(0x0,type_graphql_1[a0_0x2f88a3(0x17c)])('id')),tslib_1[a0_0x2f88a3(0x13a)](0x1,(0x0,type_graphql_1['Arg'])(a0_0x2f88a3(0x153))),tslib_1['__param'](0x2,(0x0,type_graphql_1['Ctx'])()),tslib_1[a0_0x2f88a3(0x17a)](a0_0x2f88a3(0x164),Function),tslib_1[a0_0x2f88a3(0x17a)](a0_0x2f88a3(0x16d),[String,String,Object]),tslib_1[a0_0x2f88a3(0x17a)](a0_0x2f88a3(0x138),Promise)],OperatoToolCreateMenu[a0_0x2f88a3(0x13d)],a0_0x2f88a3(0x159),null),OperatoToolCreateMenu=tslib_1[a0_0x2f88a3(0x16e)]([(0x0,type_graphql_1['Resolver'])()],OperatoToolCreateMenu),exports['OperatoToolCreateMenu']=OperatoToolCreateMenu;const modelTemplate='\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';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x35e8ce=a0_0x5670;(function(_0x593c1b,_0x3eec38){const _0x36bedf=a0_0x5670,_0xb58479=_0x593c1b();while(!![]){try{const _0x1b88e0=-parseInt(_0x36bedf(0x199))/0x1*(parseInt(_0x36bedf(0x1c2))/0x2)+-parseInt(_0x36bedf(0x18e))/0x3+parseInt(_0x36bedf(0x152))/0x4+-parseInt(_0x36bedf(0x154))/0x5+-parseInt(_0x36bedf(0x1c6))/0x6*(-parseInt(_0x36bedf(0x18d))/0x7)+-parseInt(_0x36bedf(0x19d))/0x8+parseInt(_0x36bedf(0x186))/0x9*(parseInt(_0x36bedf(0x165))/0xa);if(_0x1b88e0===_0x3eec38)break;else _0xb58479['push'](_0xb58479['shift']());}catch(_0x913468){_0xb58479['push'](_0xb58479['shift']());}}}(a0_0x2b47,0xbda28));function a0_0x5670(_0x57c808,_0x4dc4a8){const _0x2b471d=a0_0x2b47();return a0_0x5670=function(_0x5670c1,_0xc62fee){_0x5670c1=_0x5670c1-0x143;let _0xdb50c1=_0x2b471d[_0x5670c1];return _0xdb50c1;},a0_0x5670(_0x57c808,_0x4dc4a8);}Object[a0_0x35e8ce(0x189)](exports,'__esModule',{'value':!0x0}),exports['OperatoToolCreateService']=void 0x0;function a0_0x2b47(){const _0xe680ca=['rank','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','-history\x27','Entities,','createServiceFiles','\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','Query','\x20{\x20nullable:\x20','\x0aimport\x20{\x20EventSubscriber\x20}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20HistoryEntitySubscriber\x20}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20getRepository\x20}\x20from\x20\x27@things-factory/shell\x27\x0a\x0a@EventSubscriber()\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryEntitySubscriber\x20extends\x20HistoryEntitySubscriber<{{pascalCase\x20name}},{{pascalCase\x20name}}History>\x20{\x0a\x20\x20public\x20get\x20entity()\x20{\x0a\x20\x20\x20\x20return\x20{{pascalCase\x20name}}\x0a\x20\x20}\x0a\x0a\x20\x20public\x20get\x20historyEntity()\x20{\x0a\x20\x20\x20\x20return\x20{{pascalCase\x20name}}History\x0a\x20\x20}\x0a\x0a\x20\x20{{entityToJson}}\x0a\x0a\x20\x20async\x20beforeRemoveHistory(history:{{pascalCase\x20name}}History,entity:{{pascalCase\x20name}}){\x0a\x20\x20\x20\x20let\x20repo\x20=\x20getRepository({{pascalCase\x20name}}History);\x0a\x20\x20\x20\x20const\x20revNo\x20=\x20await\x20repo.createQueryBuilder()\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.select(\x27max(data_revision_no)\x27,\x20\x27rev_no\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.where(\x27domain_id\x20=\x20:domainId\x27,\x20{\x20domainId:\x20entity.domain.id\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.andWhere(\x27original_id\x20=\x20:originalId\x27,\x20{\x20originalId:\x20entity.id\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.getRawOne()\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20history.dataRevisionNo\x20=\x20revNo\x20?\x20revNo.rev_no\x20+\x201\x20:\x201;\x0a\x20\x20\x20\x20return\x20history;\x0a\x20\x20}\x0a}\x0a','/service','type\x20=>','.ts','Resolvers,','...','@Column({name:\x27','Date','EntitySubscribers,','datetime','utf8','Float','\x0a\x20\x20','updated_at','pluralCamelCaseName','-type.ts','design:type','JSON','\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','snakeCaseName','PWD','pluralize','-history-query.ts','2fwduMm','getColTxtType','double','mkdirSync','4398uwAvEX','Resolver','createHistoryEntityText','design:paramtypes','float','name','getFieldType','\x20})','state','/server','OperatoToolCreateService','Int','updater','integer','\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryList\x20}\x20from\x20\x27./{{name}}-history-type\x27\x0a\x0a@Resolver({{pascalCase\x20name}}History)\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryQuery\x20{\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}History,\x20{\x20description:\x20\x27To\x20fetch\x20a\x20{{pascalCase\x20name}}History\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}History(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}History>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20return\x20await\x20getRepository({{pascalCase\x20name}}History).findOne({\x0a\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20}\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}HistoryList,\x20{\x20description:\x20\x27To\x20fetch\x20multiple\x20{{pluralPascalCase\x20name}}History\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}Histories(@Args()\x20params:\x20ListParam,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}HistoryList>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20queryBuilder\x20=\x20getQueryBuilderFromListParams({\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20params,\x0a\x20\x20\x20\x20\x20\x20repository:\x20await\x20getRepository({{pascalCase\x20name}}History)\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20const\x20[items,\x20total]\x20=\x20await\x20queryBuilder.getManyAndCount()\x0a\x0a\x20\x20\x20\x20return\x20{\x20items,\x20total\x20}\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20Domain)\x0a\x20\x20async\x20domain(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<Domain>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(Domain).findOneBy({id:{{camelCase\x20name}}History.domainId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20updater(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}History.updaterId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20creator(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}History.creatorId})\x0a\x20\x20}\x0a}\x0a',',length:','-mutation.ts','map','replaceNamesMap','find','split','Operato\x20Tool\x20Create\x20Service','createServicePath','/packages','pascalCaseName','character\x20varying','4377820qnwQmE','includes','2929165baUJst','getProjectRootPath','colSize','createTypeText','/server/service/','type-graphql','/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...','number','createHistoryServiceFiles','index.ts','toolCreateService','/event-subscriber.ts','push','lodash','text','long','bigint','920jkJCEX','columnToEntityColumn','\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','\x27,\x20nullable:\x20','creator_id','\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}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','creator','updater_id','domain_id','import\x20{\x20entities\x20as\x20','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','dataProp','__param','writeFile','join','EntitySubscribers\x20}\x20from\x20\x27./','uniqRank','createNoHistoryServiceFiels','-history.ts','created_at','prototype','date','decimal','timestamp\x20without\x20time\x20zone','replace','export\x20*\x20from\x20\x27./','getRepository','@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})','indexOf','sort','\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','-query.ts','existsPath','262215CAgAvY','readFileSync','string','defineProperty','createDir','\x27,\x20type:\x20\x27','\x0a/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0a\x0a/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0a\x0aexport\x20const\x20entities\x20=\x20[\x20\x20\x0a\x20\x20/*\x20ENTITIES\x20*/\x0a]\x20\x0a\x0a\x0aexport\x20const\x20schema\x20=\x20{\x0a\x20\x20resolverClasses:\x20[\x0a\x20\x20\x20\x20/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x20\x20]\x20\x0a}\x0a\x0aexport\x20const\x20subscribers\x20=\x20[\x0a\x20\x20/*\x20SUBSCRIBERS\x20*/\x0a]\x0a','1099RwWQHr','3005337lbVrDm','Ctx','length','nullable','colType','__decorate','\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','double\x20precision','__metadata','design:returntype','/*\x20ENTITIES\x20*/\x0a\x09...','1343057rltPRk','filter','domain','Entity','1460344ziqEuS','Entities,\x20resolvers\x20as\x20','Resolvers\x20}\x20from\x20\x27./','@Field(','createEntityText','/index.ts'];a0_0x2b47=function(){return _0xe680ca;};return a0_0x2b47();}const tslib_1=require('tslib'),type_graphql_1=require(a0_0x35e8ce(0x159)),shell_1=require('@things-factory/shell'),resource_base_1=require('@things-factory/resource-base'),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x35e8ce(0x161)),{plural:plural}=require(a0_0x35e8ce(0x1c0)),fs=require('fs');let OperatoToolCreateService=class{async['toolCreateService'](_0x7f900d,_0xe3904a){const _0x1c9f3c=a0_0x35e8ce,{domain:_0x2a7f7e}=_0xe3904a[_0x1c9f3c(0x1ce)],_0x40ffe3=await(0x0,shell_1[_0x1c9f3c(0x17f)])(resource_base_1[_0x1c9f3c(0x19c)])['findOne']({'where':{'id':_0x7f900d}}),_0x5977ce=await(0x0,shell_1[_0x1c9f3c(0x17f)])(resource_base_1['EntityColumn'])[_0x1c9f3c(0x14b)]({'where':{'domain':{'id':_0x2a7f7e['id']},'entity':{'id':_0x40ffe3['id']}}});let {name:_0x174384='',bundle:_0xfb2ca5=''}=_0x40ffe3||{},_0x20628c=this[_0x1c9f3c(0x155)](),_0x1a10cf=kebabCase(_0x174384);return await this[_0x1c9f3c(0x14e)](_0x20628c,_0xfb2ca5,_0x1a10cf),await this[_0x1c9f3c(0x1a7)](_0x20628c,_0xfb2ca5,_0x174384,_0x1a10cf,_0x40ffe3,_0x5977ce),!0x0;}async[a0_0x35e8ce(0x1a7)](_0x2088dd,_0x53fe47,_0x48b67a,_0x4c26fd,_0x55a9c9,_0x472bde){const _0x58bcb0=a0_0x35e8ce;let _0x2bc473={'name':_0x4c26fd,'tableName':_0x55a9c9['tableName'],'pascalCaseName':startCase(camelCase(_0x48b67a))[_0x58bcb0(0x17d)](/ /g,''),'camelCaseName':camelCase(_0x48b67a),'snakeCaseName':snakeCase(_0x48b67a),'pluralPascalCaseName':startCase(camelCase(plural(_0x48b67a)))[_0x58bcb0(0x17d)](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x48b67a))},_0x5c9e23=_0x2088dd+'/packages/'+_0x53fe47+_0x58bcb0(0x158);[_0x58bcb0(0x1bc),'COPY'][_0x58bcb0(0x153)](_0x55a9c9[_0x58bcb0(0x170)])?await this[_0x58bcb0(0x15c)](_0x5c9e23,_0x4c26fd,_0x55a9c9,_0x472bde,_0x2bc473):await this[_0x58bcb0(0x176)](_0x5c9e23,_0x4c26fd,_0x55a9c9,_0x472bde,_0x2bc473);}async[a0_0x35e8ce(0x15c)](_0x40f94c,_0x53fc3e,_0x5321b0,_0x58b0c0,_0x5ec3a2){const _0x1a9b2b=a0_0x35e8ce;await this[_0x1a9b2b(0x172)](_0x40f94c+(_0x53fc3e+_0x1a9b2b(0x1a2)),serviceHistoryIndex,_0x5ec3a2);let _0x5e5089=this['createEntityText'](_0x5321b0,_0x58b0c0);await this['writeFile'](_0x40f94c+(_0x53fc3e+'/'+_0x53fc3e+_0x1a9b2b(0x1ae)),_0x5e5089,_0x5ec3a2),await this[_0x1a9b2b(0x172)](_0x40f94c+(_0x53fc3e+'/'+_0x53fc3e+'-query.ts'),serviceQuery,_0x5ec3a2),await this[_0x1a9b2b(0x172)](_0x40f94c+(_0x53fc3e+'/'+_0x53fc3e+_0x1a9b2b(0x148)),serviceMutation,_0x5ec3a2);let _0x429a1b=this['createTypeText'](_0x58b0c0);await this['writeFile'](_0x40f94c+(_0x53fc3e+'/'+_0x53fc3e+'-type.ts'),_0x429a1b,_0x5ec3a2);let _0x1fba83=this[_0x1a9b2b(0x1c8)](_0x5321b0,_0x58b0c0);await this['writeFile'](_0x40f94c+(_0x53fc3e+'/'+_0x53fc3e+_0x1a9b2b(0x177)),_0x1fba83,_0x5ec3a2);let _0x17de56='';'JSON'==_0x5321b0[_0x1a9b2b(0x170)]?(_0x17de56='\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[_0x1a9b2b(0x172)](_0x40f94c+(_0x53fc3e+_0x1a9b2b(0x15f)),serviceEntitySubscriber,_0x5ec3a2)):_0x17de56='';let _0x10257e=serviceEntitySubscriber[_0x1a9b2b(0x17d)](/{{entityToJson}}/g,_0x17de56);await this[_0x1a9b2b(0x172)](_0x40f94c+(_0x53fc3e+_0x1a9b2b(0x15f)),_0x10257e,_0x5ec3a2),await this[_0x1a9b2b(0x172)](_0x40f94c+(_0x53fc3e+'/'+_0x53fc3e+_0x1a9b2b(0x1c1)),serviceHistoryQuery,_0x5ec3a2),await this[_0x1a9b2b(0x172)](_0x40f94c+(_0x53fc3e+'/'+_0x53fc3e+'-history-type.ts'),sereviceHistoryType,_0x5ec3a2);let _0x12d2d9=_0x40f94c+'index.ts';0x0==await this['existsPath'](_0x12d2d9)&&await this[_0x1a9b2b(0x172)](_0x12d2d9,allIndex,_0x5ec3a2);let _0x253260=await fs[_0x1a9b2b(0x187)](_0x12d2d9,'utf8');_0x253260['indexOf']('export\x20*\x20from\x20\x27./'+_0x5ec3a2['name']+'/'+_0x5ec3a2[_0x1a9b2b(0x1cb)]+_0x1a9b2b(0x1a5))<0x0&&(_0x253260=_0x253260[_0x1a9b2b(0x17d)](/\/\* EXPORT ENTITY TYPES \*\//,_0x1a9b2b(0x16f)+_0x5ec3a2[_0x1a9b2b(0x1cb)]+'/'+_0x5ec3a2['name']+'-history\x27')),_0x253260[_0x1a9b2b(0x181)](_0x1a9b2b(0x17e)+_0x5ec3a2['name']+'/'+_0x5ec3a2['name']+'\x27')<0x0&&(_0x253260=_0x253260[_0x1a9b2b(0x17d)](/\/\* EXPORT ENTITY TYPES \*\//,_0x1a9b2b(0x16f)+_0x5ec3a2[_0x1a9b2b(0x1cb)]+'/'+_0x5ec3a2[_0x1a9b2b(0x1cb)]+'\x27')),_0x253260[_0x1a9b2b(0x181)](_0x1a9b2b(0x16e)+_0x5ec3a2[_0x1a9b2b(0x150)]+_0x1a9b2b(0x19e)+_0x5ec3a2[_0x1a9b2b(0x150)]+'Resolvers,\x20subscribers\x20as\x20'+_0x5ec3a2[_0x1a9b2b(0x150)]+_0x1a9b2b(0x174)+_0x5ec3a2[_0x1a9b2b(0x1cb)]+'\x27')<0x0&&(_0x253260=_0x253260[_0x1a9b2b(0x17d)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,'/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20'+_0x5ec3a2[_0x1a9b2b(0x150)]+'Entities,\x20resolvers\x20as\x20'+_0x5ec3a2[_0x1a9b2b(0x150)]+'Resolvers,\x20subscribers\x20as\x20'+_0x5ec3a2[_0x1a9b2b(0x150)]+_0x1a9b2b(0x174)+_0x5ec3a2['name']+'\x27')),_0x253260[_0x1a9b2b(0x181)]('...'+_0x5ec3a2[_0x1a9b2b(0x150)]+_0x1a9b2b(0x1a6))<0x0&&(_0x253260=_0x253260['replace'](/\/\* ENTITIES \*\//,_0x1a9b2b(0x198)+_0x5ec3a2[_0x1a9b2b(0x150)]+_0x1a9b2b(0x1a6))),_0x253260[_0x1a9b2b(0x181)](_0x1a9b2b(0x1b0)+_0x5ec3a2[_0x1a9b2b(0x150)]+_0x1a9b2b(0x1af))<0x0&&(_0x253260=_0x253260[_0x1a9b2b(0x17d)](/\/\* RESOLVER CLASSES \*\//,_0x1a9b2b(0x1a4)+_0x5ec3a2[_0x1a9b2b(0x150)]+'Resolvers,')),_0x253260['indexOf'](_0x1a9b2b(0x1b0)+_0x5ec3a2['pascalCaseName']+_0x1a9b2b(0x1b3))<0x0&&(_0x253260=_0x253260[_0x1a9b2b(0x17d)](/\/\* SUBSCRIBERS \*\//,_0x1a9b2b(0x15a)+_0x5ec3a2[_0x1a9b2b(0x150)]+'EntitySubscribers,')),await this[_0x1a9b2b(0x172)](_0x12d2d9,_0x253260,_0x5ec3a2);}async[a0_0x35e8ce(0x176)](_0x29c20d,_0x398f18,_0x3d8a48,_0x2d8d2f,_0x261978){const _0x4649eb=a0_0x35e8ce;await this[_0x4649eb(0x172)](_0x29c20d+(_0x398f18+_0x4649eb(0x1a2)),serviceIndex,_0x261978),await this[_0x4649eb(0x172)](_0x29c20d+(_0x398f18+'/'+_0x398f18+_0x4649eb(0x184)),serviceQuery,_0x261978),await this[_0x4649eb(0x172)](_0x29c20d+(_0x398f18+'/'+_0x398f18+'-mutation.ts'),serviceMutation,_0x261978);let _0x2b1b3c=this[_0x4649eb(0x1a1)](_0x3d8a48,_0x2d8d2f);await this[_0x4649eb(0x172)](_0x29c20d+(_0x398f18+'/'+_0x398f18+'.ts'),_0x2b1b3c,_0x261978);let _0x4a560e=this[_0x4649eb(0x157)](_0x2d8d2f);await this[_0x4649eb(0x172)](_0x29c20d+(_0x398f18+'/'+_0x398f18+_0x4649eb(0x1ba)),_0x4a560e,_0x261978);let _0x1797ff=_0x29c20d+_0x4649eb(0x15d);0x0==await this[_0x4649eb(0x185)](_0x1797ff)&&await this['writeFile'](_0x1797ff,allIndex,_0x261978);let _0x165198=await fs[_0x4649eb(0x187)](_0x1797ff,_0x4649eb(0x1b5));_0x165198[_0x4649eb(0x181)](_0x4649eb(0x17e)+_0x261978[_0x4649eb(0x1cb)]+'/'+_0x261978[_0x4649eb(0x1cb)]+'\x27')<0x0&&(_0x165198=_0x165198['replace'](/\/\* EXPORT ENTITY TYPES \*\//,_0x4649eb(0x16f)+_0x261978[_0x4649eb(0x1cb)]+'/'+_0x261978[_0x4649eb(0x1cb)]+'\x27')),_0x165198[_0x4649eb(0x181)](_0x4649eb(0x16e)+_0x261978[_0x4649eb(0x150)]+_0x4649eb(0x19e)+_0x261978['pascalCaseName']+_0x4649eb(0x19f)+_0x261978[_0x4649eb(0x1cb)]+'\x27')<0x0&&(_0x165198=_0x165198[_0x4649eb(0x17d)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,'/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20'+_0x261978['pascalCaseName']+'Entities,\x20resolvers\x20as\x20'+_0x261978[_0x4649eb(0x150)]+_0x4649eb(0x19f)+_0x261978[_0x4649eb(0x1cb)]+'\x27')),_0x165198[_0x4649eb(0x181)](_0x4649eb(0x1b0)+_0x261978['pascalCaseName']+_0x4649eb(0x1a6))<0x0&&(_0x165198=_0x165198[_0x4649eb(0x17d)](/\/\* ENTITIES \*\//,_0x4649eb(0x198)+_0x261978[_0x4649eb(0x150)]+_0x4649eb(0x1a6))),_0x165198['indexOf'](_0x4649eb(0x1b0)+_0x261978[_0x4649eb(0x150)]+_0x4649eb(0x1af))<0x0&&(_0x165198=_0x165198['replace'](/\/\* RESOLVER CLASSES \*\//,_0x4649eb(0x1a4)+_0x261978[_0x4649eb(0x150)]+_0x4649eb(0x1af))),await this[_0x4649eb(0x172)](_0x1797ff,_0x165198,_0x261978);}[a0_0x35e8ce(0x157)](_0x1a2bc4){const _0x1958c7=a0_0x35e8ce;let _0x5e23e6=sereviceType,_0x158dfa=_0x1a2bc4[_0x1958c7(0x149)](_0x4aa79b=>{const _0x2a1f41=_0x1958c7;if('id'==_0x4aa79b['name'])return'';if(_0x2a1f41(0x16d)==_0x4aa79b[_0x2a1f41(0x1cb)])return'';if(_0x2a1f41(0x178)==_0x4aa79b[_0x2a1f41(0x1cb)])return'';if('updated_at'==_0x4aa79b[_0x2a1f41(0x1cb)])return'';if(_0x2a1f41(0x169)==_0x4aa79b[_0x2a1f41(0x1cb)])return'';if(_0x2a1f41(0x16c)==_0x4aa79b[_0x2a1f41(0x1cb)])return'';let _0x564b1f=this[_0x2a1f41(0x1cc)](_0x4aa79b),_0x3a6409=this['getColTxtType'](_0x4aa79b),_0x4ae5e5=camelCase(_0x4aa79b[_0x2a1f41(0x1cb)]);return'\x20\x20'+(_0x2a1f41(0x1a0)+(0x0==_0x564b1f[_0x2a1f41(0x190)]?'':'type\x20=>'+_0x564b1f+',')+'\x20{\x20nullable:\x20'+_0x4aa79b['nullable']+_0x2a1f41(0x1cd))+'\x0a\x20\x20'+(''+_0x4ae5e5+(_0x4aa79b['nullable']?'?':'')+':\x20'+_0x3a6409)+'\x0a';});_0x5e23e6=_0x5e23e6[_0x1958c7(0x17d)](/{{newTypeColumns}}/g,_0x158dfa[_0x1958c7(0x173)]('\x0a'));let _0x1d946b=_0x1a2bc4[_0x1958c7(0x149)](_0x4ae2f7=>{const _0x45f400=_0x1958c7;if('id'==_0x4ae2f7[_0x45f400(0x1cb)])return'';if(_0x45f400(0x16d)==_0x4ae2f7[_0x45f400(0x1cb)])return'';if('created_at'==_0x4ae2f7[_0x45f400(0x1cb)])return'';if(_0x45f400(0x1b8)==_0x4ae2f7['name'])return'';if('creator_id'==_0x4ae2f7[_0x45f400(0x1cb)])return'';if(_0x45f400(0x16c)==_0x4ae2f7[_0x45f400(0x1cb)])return'';let _0x6c74c8=this['getFieldType'](_0x4ae2f7),_0x266106=this[_0x45f400(0x1c3)](_0x4ae2f7);_0x4ae2f7[_0x45f400(0x191)]=!0x0;let _0x16f486=camelCase(_0x4ae2f7[_0x45f400(0x1cb)]);return'\x20\x20'+(_0x45f400(0x1a0)+(0x0==_0x6c74c8[_0x45f400(0x190)]?'':_0x45f400(0x1ad)+_0x6c74c8+',')+'\x20{\x20nullable:\x20'+_0x4ae2f7['nullable']+_0x45f400(0x1cd))+_0x45f400(0x1b7)+(''+_0x16f486+(_0x4ae2f7[_0x45f400(0x191)]?'?':'')+':\x20'+_0x266106)+'\x0a';});return _0x5e23e6=_0x5e23e6[_0x1958c7(0x17d)](/{{patchTypeColumns}}/g,_0x1d946b[_0x1958c7(0x173)]('\x0a')),_0x5e23e6;}[a0_0x35e8ce(0x1a1)](_0x344af4,_0x5aab1e){const _0xd457bb=a0_0x35e8ce;let _0x1c2596=serviceEntity,_0x455e54=_0x5aab1e[_0xd457bb(0x182)](function(_0x23274b,_0x4a2b81){const _0x277bd7=_0xd457bb;return _0x23274b[_0x277bd7(0x1a3)]-_0x4a2b81['rank'];})['map'](_0x1a31f9=>this[_0xd457bb(0x166)](_0x1a31f9));['COPY','JSON'][_0xd457bb(0x153)](_0x344af4[_0xd457bb(0x170)])&&_0x455e54[_0xd457bb(0x160)]('\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201'),_0x1c2596=_0x1c2596[_0xd457bb(0x17d)](/{{entityColumns}}/g,_0x455e54[_0xd457bb(0x173)]('\x0a'));let _0x2b7c79='',_0x314941=_0x5aab1e[_0xd457bb(0x19a)](_0x4ff6cc=>_0x4ff6cc[_0xd457bb(0x175)]&&_0x4ff6cc['uniqRank']>0x0)['sort'](function(_0x452a35,_0x20b401){const _0x51483f=_0xd457bb;return _0x452a35[_0x51483f(0x175)]-_0x20b401[_0x51483f(0x175)];});if(_0x314941[_0xd457bb(0x190)]>0x0){_0x2b7c79=_0xd457bb(0x180);let _0x1f6e35=_0x314941[_0xd457bb(0x149)](_0x253624=>{const _0x472554=_0xd457bb;let _0x2bd5e2=_0x253624[_0x472554(0x1cb)];return'domain_id'==_0x253624[_0x472554(0x1cb)]&&(_0x2bd5e2=_0x472554(0x19b)),_0x472554(0x169)==_0x253624[_0x472554(0x1cb)]&&(_0x2bd5e2=_0x472554(0x16b)),_0x472554(0x16c)==_0x253624[_0x472554(0x1cb)]&&(_0x2bd5e2=_0x472554(0x144)),'{{camelCase\x20name}}.'+camelCase(_0x2bd5e2);});_0x2b7c79=_0x2b7c79[_0xd457bb(0x17d)](/{{indexColumns}}/g,_0x1f6e35[_0xd457bb(0x173)](','));}return _0x1c2596=_0x1c2596[_0xd457bb(0x17d)](/{{indexAnn}}/g,_0x2b7c79),_0x1c2596;}[a0_0x35e8ce(0x1c8)](_0x5d2ef9,_0x38f633){const _0xf09180=a0_0x35e8ce;let _0x1e30a8=_0xf09180(0x1bc)==_0x5d2ef9[_0xf09180(0x170)]?serviceEntityHistJson:serviceEntityHistCopy,_0x1d7a7a=_0x38f633[_0xf09180(0x182)](function(_0x394232,_0x52b3ec){const _0x2d7169=_0xf09180;return _0x394232['rank']-_0x52b3ec[_0x2d7169(0x1a3)];})[_0xf09180(0x149)](_0x584f5d=>this[_0xf09180(0x166)](_0x584f5d));return _0x1e30a8=_0x1e30a8[_0xf09180(0x17d)](/{{entityColumns}}/g,_0x1d7a7a[_0xf09180(0x173)]('\x0a')),_0x1e30a8;}['columnToEntityColumn'](_0x3b62f1){const _0x2d7be4=a0_0x35e8ce;if('id'==_0x3b62f1['name'])return'';if('domain_id'==_0x3b62f1[_0x2d7be4(0x1cb)])return'';if(_0x2d7be4(0x178)==_0x3b62f1[_0x2d7be4(0x1cb)])return'';if(_0x2d7be4(0x1b8)==_0x3b62f1[_0x2d7be4(0x1cb)])return'';if(_0x2d7be4(0x169)==_0x3b62f1['name'])return'';if(_0x2d7be4(0x16c)==_0x3b62f1[_0x2d7be4(0x1cb)])return'';let _0x5d2ee3=_0x3b62f1[_0x2d7be4(0x192)];_0x2d7be4(0x1c4)==_0x3b62f1[_0x2d7be4(0x192)]&&(_0x5d2ee3=_0x2d7be4(0x195)),_0x2d7be4(0x163)==_0x3b62f1[_0x2d7be4(0x192)]&&(_0x5d2ee3=_0x2d7be4(0x164)),_0x2d7be4(0x188)==_0x3b62f1['colType']&&(_0x5d2ee3=_0x2d7be4(0x151)),_0x2d7be4(0x1b4)==_0x3b62f1[_0x2d7be4(0x192)]&&(_0x5d2ee3=_0x2d7be4(0x17c));let _0x2ccd32='';_0x2d7be4(0x188)==_0x3b62f1[_0x2d7be4(0x192)]&&(_0x2ccd32=_0x3b62f1[_0x2d7be4(0x156)]);let _0x252284=this[_0x2d7be4(0x1cc)](_0x3b62f1),_0x32824f=this[_0x2d7be4(0x1c3)](_0x3b62f1),_0x4fdb8a=camelCase(_0x3b62f1[_0x2d7be4(0x1cb)]);return'\x20\x20'+(_0x2d7be4(0x1b1)+_0x3b62f1[_0x2d7be4(0x1cb)]+_0x2d7be4(0x18b)+_0x5d2ee3+_0x2d7be4(0x168)+_0x3b62f1[_0x2d7be4(0x191)]+'\x20'+(0x0==_0x2ccd32[_0x2d7be4(0x190)]?'':_0x2d7be4(0x147)+_0x2ccd32)+_0x2d7be4(0x1cd))+'\x0a\x20\x20'+(_0x2d7be4(0x1a0)+(0x0==_0x252284[_0x2d7be4(0x190)]?'':_0x2d7be4(0x1ad)+_0x252284+',')+_0x2d7be4(0x1aa)+_0x3b62f1[_0x2d7be4(0x191)]+_0x2d7be4(0x1cd))+_0x2d7be4(0x1b7)+(''+_0x4fdb8a+(_0x3b62f1[_0x2d7be4(0x191)]?'?':'')+':\x20'+_0x32824f)+'\x0a';}[a0_0x35e8ce(0x1cc)](_0x4b0cdc){const _0x5c922c=a0_0x35e8ce;let _0x143441='';return _0x5c922c(0x1c4)==_0x4b0cdc[_0x5c922c(0x192)]&&(_0x143441=_0x5c922c(0x1b6)),_0x5c922c(0x1ca)==_0x4b0cdc['colType']&&(_0x143441=_0x5c922c(0x1b6)),'long'==_0x4b0cdc[_0x5c922c(0x192)]&&(_0x143441=_0x5c922c(0x143)),'integer'==_0x4b0cdc[_0x5c922c(0x192)]&&(_0x143441=_0x5c922c(0x143)),_0x143441;}['getColTxtType'](_0x26ebca){const _0x5796cb=a0_0x35e8ce;let _0x178b68=_0x26ebca['colType'];return _0x5796cb(0x17b)==_0x26ebca[_0x5796cb(0x192)]&&(_0x178b68=_0x5796cb(0x15b)),'double'==_0x26ebca['colType']&&(_0x178b68=_0x5796cb(0x15b)),_0x5796cb(0x1ca)==_0x26ebca['colType']&&(_0x178b68=_0x5796cb(0x15b)),_0x5796cb(0x145)==_0x26ebca[_0x5796cb(0x192)]&&(_0x178b68='number'),_0x5796cb(0x163)==_0x26ebca[_0x5796cb(0x192)]&&(_0x178b68=_0x5796cb(0x15b)),'datetime'==_0x26ebca[_0x5796cb(0x192)]&&(_0x178b68=_0x5796cb(0x1b2)),_0x5796cb(0x17a)==_0x26ebca[_0x5796cb(0x192)]&&(_0x178b68=_0x5796cb(0x1b2)),_0x5796cb(0x162)==_0x26ebca[_0x5796cb(0x192)]&&(_0x178b68=_0x5796cb(0x188)),_0x178b68;}async[a0_0x35e8ce(0x172)](_0x4067c5,_0x2b0670,_0x4a2791){const _0x4125a0=a0_0x35e8ce;await fs['writeFileSync'](_0x4067c5,this[_0x4125a0(0x14a)](_0x2b0670,_0x4a2791),_0x4125a0(0x1b5));}[a0_0x35e8ce(0x14a)](_0x2f8240,_0x194889){const _0x292fcd=a0_0x35e8ce;return _0x2f8240[_0x292fcd(0x17d)](/{{pascalCase name}}/g,_0x194889[_0x292fcd(0x150)])[_0x292fcd(0x17d)](/{{camelCase name}}/g,_0x194889['camelCaseName'])[_0x292fcd(0x17d)](/{{snakeCase name}}/g,_0x194889[_0x292fcd(0x1be)])['replace'](/{{pluralPascalCase name}}/g,_0x194889['pluralPascalCaseName'])[_0x292fcd(0x17d)](/{{pluralCamelCase name}}/g,_0x194889[_0x292fcd(0x1b9)])[_0x292fcd(0x17d)](/{{tableName}}/g,_0x194889['tableName'])[_0x292fcd(0x17d)](/{{name}}/g,_0x194889[_0x292fcd(0x1cb)]);}async['createServicePath'](_0x3a5662,_0x158854,_0x22b5e1){const _0x528bd4=a0_0x35e8ce;let _0x2ac91e=_0x3a5662+_0x528bd4(0x14f);await this['createDir'](_0x2ac91e),_0x2ac91e=_0x2ac91e+'/'+_0x158854,await this[_0x528bd4(0x18a)](_0x2ac91e),_0x2ac91e+=_0x528bd4(0x1cf),await this['createDir'](_0x2ac91e),_0x2ac91e+=_0x528bd4(0x1ac),await this[_0x528bd4(0x18a)](_0x2ac91e),_0x2ac91e=_0x2ac91e+'/'+_0x22b5e1,await this[_0x528bd4(0x18a)](_0x2ac91e);}[a0_0x35e8ce(0x155)](){const _0x10b80a=a0_0x35e8ce;let _0x43a254=process['env'][_0x10b80a(0x1bf)][_0x10b80a(0x14c)]('/'),_0x2fc802=[];for(let _0x58e263=0x0;_0x58e263<_0x43a254[_0x10b80a(0x190)]&&'packages'!=_0x43a254[_0x58e263];_0x58e263++)_0x2fc802[_0x10b80a(0x160)](_0x43a254[_0x58e263]);return _0x2fc802[_0x10b80a(0x173)]('/');}async[a0_0x35e8ce(0x18a)](_0x8e12fa){const _0x2b2b32=a0_0x35e8ce;0x0==await this[_0x2b2b32(0x185)](_0x8e12fa)&&fs[_0x2b2b32(0x1c5)](_0x8e12fa);}async['existsPath'](_0xa7ff03){return await fs['existsSync'](_0xa7ff03);}};tslib_1[a0_0x35e8ce(0x193)]([(0x0,type_graphql_1[a0_0x35e8ce(0x1a9)])(_0x1b0487=>Boolean,{'description':a0_0x35e8ce(0x14d)}),tslib_1[a0_0x35e8ce(0x171)](0x0,(0x0,type_graphql_1['Arg'])('id')),tslib_1['__param'](0x1,(0x0,type_graphql_1[a0_0x35e8ce(0x18f)])()),tslib_1[a0_0x35e8ce(0x196)](a0_0x35e8ce(0x1bb),Function),tslib_1[a0_0x35e8ce(0x196)](a0_0x35e8ce(0x1c9),[String,Object]),tslib_1[a0_0x35e8ce(0x196)](a0_0x35e8ce(0x197),Promise)],OperatoToolCreateService[a0_0x35e8ce(0x179)],a0_0x35e8ce(0x15e),null),OperatoToolCreateService=tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x35e8ce(0x1c7)])()],OperatoToolCreateService),exports[a0_0x35e8ce(0x1d0)]=OperatoToolCreateService;const allIndex=a0_0x35e8ce(0x18c),serviceIndex=a0_0x35e8ce(0x16a),serviceHistoryIndex=a0_0x35e8ce(0x183),serviceQuery=a0_0x35e8ce(0x1a8),serviceHistoryQuery=a0_0x35e8ce(0x146),serviceMutation='\x0aimport\x20{\x20Resolver,\x20Mutation,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20In\x20}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20New{{pascalCase\x20name}},\x20{{pascalCase\x20name}}Patch\x20}\x20from\x20\x27./{{name}}-type\x27\x0aimport\x20{\x20getRepository\x20}\x20from\x20\x27@things-factory/shell\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Mutation\x20{\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20create\x20new\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20create{{pascalCase\x20name}}(@Arg(\x27{{camelCase\x20name}}\x27)\x20{{camelCase\x20name}}:\x20New{{pascalCase\x20name}},\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20return\x20await\x20tx.getRepository({{pascalCase\x20name}}).save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20modify\x20{{pascalCase\x20name}}\x20information\x27\x20})\x0a\x20\x20async\x20update{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27id\x27)\x20id:\x20string,\x0a\x20\x20\x20\x20@Arg(\x27patch\x27)\x20patch:\x20{{pascalCase\x20name}}Patch,\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20repository\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20repository.findOne(\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20)\x0a\x0a\x20\x20\x20\x20return\x20await\x20repository.save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20...patch,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20[{{pascalCase\x20name}}],\x20{\x20description:\x20\x22To\x20modify\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20information\x22\x20})\x0a\x20\x20async\x20updateMultiple{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27patches\x27,\x20type\x20=>\x20[{{pascalCase\x20name}}Patch])\x20patches:\x20{{pascalCase\x20name}}Patch[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}[]>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20results\x20=\x20[]\x0a\x20\x20\x20\x20const\x20_createRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27+\x27)\x0a\x20\x20\x20\x20const\x20_updateRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27M\x27)\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}Repo\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x0a\x20\x20\x20\x20if\x20(_createRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_createRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20newRecord\x20=\x20_createRecords[i]\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...newRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27+\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20if\x20(_updateRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_updateRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20updRecord\x20=\x20_updateRecords[i]\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20{{camelCase\x20name}}Repo.findOne({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id:updRecord.id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...updRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27M\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20return\x20results\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20delete{{pascalCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove({\x20domain,\x20id,\x20updater:user\x20})\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20multiple\x20{{camelCase\x20name}}s\x27\x20})\x0a\x20\x20async\x20delete{{pluralPascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27ids\x27,\x20type\x20=>\x20[String])\x20ids:\x20string[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20delEntitis\x20=\x20ids.map(id=>{\x0a\x20\x20\x20\x20\x20\x20return\x20{domain,id,updater:user}\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove(delEntitis)\x0a\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a}\x0a',sereviceType='\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_0x35e8ce(0x194),serviceEntity=a0_0x35e8ce(0x1bd),serviceEntityHistCopy=a0_0x35e8ce(0x167),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_0x35e8ce(0x1ab);
|
|
1
|
+
'use strict';const a0_0x3ee400=a0_0x2210;function a0_0x2210(_0x32c6af,_0x3fb97){const _0x509231=a0_0x5092();return a0_0x2210=function(_0x22100e,_0x2f688f){_0x22100e=_0x22100e-0xc8;let _0x8c578=_0x509231[_0x22100e];return _0x8c578;},a0_0x2210(_0x32c6af,_0x3fb97);}(function(_0xc707a1,_0x7cc321){const _0x1c1de5=a0_0x2210,_0x228f04=_0xc707a1();while(!![]){try{const _0x1d02a9=-parseInt(_0x1c1de5(0xd4))/0x1*(parseInt(_0x1c1de5(0x156))/0x2)+parseInt(_0x1c1de5(0x117))/0x3+-parseInt(_0x1c1de5(0x134))/0x4*(parseInt(_0x1c1de5(0xfb))/0x5)+-parseInt(_0x1c1de5(0xe7))/0x6*(-parseInt(_0x1c1de5(0x137))/0x7)+-parseInt(_0x1c1de5(0xe9))/0x8+parseInt(_0x1c1de5(0xe8))/0x9+parseInt(_0x1c1de5(0x141))/0xa;if(_0x1d02a9===_0x7cc321)break;else _0x228f04['push'](_0x228f04['shift']());}catch(_0x5c4e63){_0x228f04['push'](_0x228f04['shift']());}}}(a0_0x5092,0x7ebb1));Object[a0_0x3ee400(0x14c)](exports,'__esModule',{'value':!0x0}),exports[a0_0x3ee400(0x11b)]=void 0x0;const tslib_1=require('tslib'),type_graphql_1=require(a0_0x3ee400(0xe6)),shell_1=require(a0_0x3ee400(0x145)),resource_base_1=require(a0_0x3ee400(0xed)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x3ee400(0xe2)),{plural:plural}=require(a0_0x3ee400(0xec)),fs=require('fs');function a0_0x5092(){const _0x3649d0=['Date','indexOf','getFieldType','\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','long','Entities,','number','Entities,\x20resolvers\x20as\x20','\x0a/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0a\x0a/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0a\x0aexport\x20const\x20entities\x20=\x20[\x20\x20\x0a\x20\x20/*\x20ENTITIES\x20*/\x0a]\x20\x0a\x0a\x0aexport\x20const\x20schema\x20=\x20{\x0a\x20\x20resolverClasses:\x20[\x0a\x20\x20\x20\x20/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x20\x20]\x20\x0a}\x0a\x0aexport\x20const\x20subscribers\x20=\x20[\x0a\x20\x20/*\x20SUBSCRIBERS\x20*/\x0a]\x0a','\x20{\x20nullable:\x20','getRepository','timestamp\x20without\x20time\x20zone','replaceNamesMap','104yStGHY','createHistoryServiceFiles','nullable','1876kQxbPb','sort','colSize','date','__decorate','packages','\x27,\x20type:\x20\x27','JSON','/index.ts','prototype','7385950dXxdqT','datetime','columnToEntityColumn','createNoHistoryServiceFiels','@things-factory/shell','EntitySubscribers\x20}\x20from\x20\x27./','__param','tableName','existsSync','design:paramtypes','updater_id','defineProperty','createServiceFiles','@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})','Float','Resolvers,','readFileSync','/event-subscriber.ts','\x20})','updated_at','createServicePath','116RARWzk','creator','Int','mkdirSync','\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','double\x20precision','@Field(',',length:','pluralPascalCaseName','...','@Column({name:\x27','double','Query','Ctx','1907zRKfVO','\x0a\x20\x20','filter','EntityColumn','export\x20*\x20from\x20\x27./','.ts','\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201','getColTxtType','length','createEntityText','domain_id','Resolvers,\x20subscribers\x20as\x20','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','uniqRank','lodash','map','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\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','Resolvers\x20}\x20from\x20\x27./','type-graphql','14634FvvKbh','395640MXUAoq','8247896CAHSID','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','\x0aimport\x20{\x20EventSubscriber\x20}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20HistoryEntitySubscriber\x20}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20getRepository\x20}\x20from\x20\x27@things-factory/shell\x27\x0a\x0a@EventSubscriber()\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryEntitySubscriber\x20extends\x20HistoryEntitySubscriber<{{pascalCase\x20name}},{{pascalCase\x20name}}History>\x20{\x0a\x20\x20public\x20get\x20entity()\x20{\x0a\x20\x20\x20\x20return\x20{{pascalCase\x20name}}\x0a\x20\x20}\x0a\x0a\x20\x20public\x20get\x20historyEntity()\x20{\x0a\x20\x20\x20\x20return\x20{{pascalCase\x20name}}History\x0a\x20\x20}\x0a\x0a\x20\x20{{entityToJson}}\x0a\x0a\x20\x20async\x20beforeRemoveHistory(history:{{pascalCase\x20name}}History,entity:{{pascalCase\x20name}}){\x0a\x20\x20\x20\x20let\x20repo\x20=\x20getRepository({{pascalCase\x20name}}History);\x0a\x20\x20\x20\x20const\x20revNo\x20=\x20await\x20repo.createQueryBuilder()\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.select(\x27max(data_revision_no)\x27,\x20\x27rev_no\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.where(\x27domain_id\x20=\x20:domainId\x27,\x20{\x20domainId:\x20entity.domain.id\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.andWhere(\x27original_id\x20=\x20:originalId\x27,\x20{\x20originalId:\x20entity.id\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.getRawOne()\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20history.dataRevisionNo\x20=\x20revNo\x20?\x20revNo.rev_no\x20+\x201\x20:\x201;\x0a\x20\x20\x20\x20return\x20history;\x0a\x20\x20}\x0a}\x0a','pluralize','@things-factory/resource-base','index.ts','\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','-history.ts','rank','name','writeFileSync','colType','type\x20=>','dataProp','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','integer','-type.ts','writeFile','14630JgnVgP','\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','existsPath','pascalCaseName','find','float','join','createHistoryEntityText','createDir','includes','created_at','PWD','split','createTypeText','-query.ts','design:returntype','-mutation.ts','{{camelCase\x20name}}.','\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','getProjectRootPath','\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','decimal','Entity','toolCreateService','replace','utf8','/*\x20ENTITIES\x20*/\x0a\x09...','import\x20{\x20entities\x20as\x20','901653BEFagp','/packages','EntitySubscribers,','/service','OperatoToolCreateService','\x27,\x20nullable:\x20','COPY','__metadata','string','creator_id','text','domain','snakeCaseName','push','findOne','Arg'];a0_0x5092=function(){return _0x3649d0;};return a0_0x5092();}let OperatoToolCreateService=class{async[a0_0x3ee400(0x112)](_0x4c7a44,_0x4ca74d){const _0x2943f0=a0_0x3ee400,{domain:_0x125bf9}=_0x4ca74d['state'],_0x318d64=await(0x0,shell_1[_0x2943f0(0x131)])(resource_base_1[_0x2943f0(0x111)])[_0x2943f0(0x125)]({'where':{'id':_0x4c7a44}}),_0x228e62=await(0x0,shell_1[_0x2943f0(0x131)])(resource_base_1[_0x2943f0(0xd7)])[_0x2943f0(0xff)]({'where':{'domain':{'id':_0x125bf9['id']},'entity':{'id':_0x318d64['id']}}});let {name:_0x52bd31='',bundle:_0x574ab9=''}=_0x318d64||{},_0x930863=this[_0x2943f0(0x10e)](),_0x524dfb=kebabCase(_0x52bd31);return await this['createServicePath'](_0x930863,_0x574ab9,_0x524dfb),await this[_0x2943f0(0x14d)](_0x930863,_0x574ab9,_0x52bd31,_0x524dfb,_0x318d64,_0x228e62),!0x0;}async[a0_0x3ee400(0x14d)](_0x21cba1,_0x1358d2,_0x5e5b77,_0x3f5b47,_0x5833f3,_0x325a6c){const _0x34af2b=a0_0x3ee400;let _0x9ee847={'name':_0x3f5b47,'tableName':_0x5833f3[_0x34af2b(0x148)],'pascalCaseName':startCase(camelCase(_0x5e5b77))[_0x34af2b(0x113)](/ /g,''),'camelCaseName':camelCase(_0x5e5b77),'snakeCaseName':snakeCase(_0x5e5b77),'pluralPascalCaseName':startCase(camelCase(plural(_0x5e5b77)))['replace'](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x5e5b77))},_0x58f390=_0x21cba1+'/packages/'+_0x1358d2+'/server/service/';[_0x34af2b(0x13e),'COPY'][_0x34af2b(0x104)](_0x5833f3['dataProp'])?await this[_0x34af2b(0x135)](_0x58f390,_0x3f5b47,_0x5833f3,_0x325a6c,_0x9ee847):await this[_0x34af2b(0x144)](_0x58f390,_0x3f5b47,_0x5833f3,_0x325a6c,_0x9ee847);}async[a0_0x3ee400(0x135)](_0x4e99c5,_0x5a7cf5,_0xeb0c38,_0x185fe6,_0x3e9885){const _0x2328cb=a0_0x3ee400;await this['writeFile'](_0x4e99c5+(_0x5a7cf5+'/index.ts'),serviceHistoryIndex,_0x3e9885);let _0x31084e=this['createEntityText'](_0xeb0c38,_0x185fe6);await this[_0x2328cb(0xfa)](_0x4e99c5+(_0x5a7cf5+'/'+_0x5a7cf5+_0x2328cb(0xd9)),_0x31084e,_0x3e9885),await this[_0x2328cb(0xfa)](_0x4e99c5+(_0x5a7cf5+'/'+_0x5a7cf5+'-query.ts'),serviceQuery,_0x3e9885),await this[_0x2328cb(0xfa)](_0x4e99c5+(_0x5a7cf5+'/'+_0x5a7cf5+_0x2328cb(0x10b)),serviceMutation,_0x3e9885);let _0x12e0a=this[_0x2328cb(0x108)](_0x185fe6);await this[_0x2328cb(0xfa)](_0x4e99c5+(_0x5a7cf5+'/'+_0x5a7cf5+'-type.ts'),_0x12e0a,_0x3e9885);let _0x21d111=this[_0x2328cb(0x102)](_0xeb0c38,_0x185fe6);await this['writeFile'](_0x4e99c5+(_0x5a7cf5+'/'+_0x5a7cf5+_0x2328cb(0xf0)),_0x21d111,_0x3e9885);let _0x448027='';_0x2328cb(0x13e)==_0xeb0c38[_0x2328cb(0xf6)]?(_0x448027=_0x2328cb(0xfc),await this[_0x2328cb(0xfa)](_0x4e99c5+(_0x5a7cf5+_0x2328cb(0x152)),serviceEntitySubscriber,_0x3e9885)):_0x448027='';let _0x21e533=serviceEntitySubscriber[_0x2328cb(0x113)](/{{entityToJson}}/g,_0x448027);await this[_0x2328cb(0xfa)](_0x4e99c5+(_0x5a7cf5+_0x2328cb(0x152)),_0x21e533,_0x3e9885),await this[_0x2328cb(0xfa)](_0x4e99c5+(_0x5a7cf5+'/'+_0x5a7cf5+'-history-query.ts'),serviceHistoryQuery,_0x3e9885),await this[_0x2328cb(0xfa)](_0x4e99c5+(_0x5a7cf5+'/'+_0x5a7cf5+'-history-type.ts'),sereviceHistoryType,_0x3e9885);let _0x184bae=_0x4e99c5+_0x2328cb(0xee);0x0==await this['existsPath'](_0x184bae)&&await this['writeFile'](_0x184bae,allIndex,_0x3e9885);let _0x278994=await fs[_0x2328cb(0x151)](_0x184bae,'utf8');_0x278994[_0x2328cb(0x128)](_0x2328cb(0xd8)+_0x3e9885[_0x2328cb(0xf2)]+'/'+_0x3e9885['name']+'-history\x27')<0x0&&(_0x278994=_0x278994[_0x2328cb(0x113)](/\/\* EXPORT ENTITY TYPES \*\//,_0x2328cb(0xe0)+_0x3e9885['name']+'/'+_0x3e9885[_0x2328cb(0xf2)]+'-history\x27')),_0x278994[_0x2328cb(0x128)]('export\x20*\x20from\x20\x27./'+_0x3e9885[_0x2328cb(0xf2)]+'/'+_0x3e9885[_0x2328cb(0xf2)]+'\x27')<0x0&&(_0x278994=_0x278994[_0x2328cb(0x113)](/\/\* EXPORT ENTITY TYPES \*\//,_0x2328cb(0xe0)+_0x3e9885[_0x2328cb(0xf2)]+'/'+_0x3e9885['name']+'\x27')),_0x278994[_0x2328cb(0x128)](_0x2328cb(0x116)+_0x3e9885[_0x2328cb(0xfe)]+_0x2328cb(0x12e)+_0x3e9885[_0x2328cb(0xfe)]+_0x2328cb(0xdf)+_0x3e9885[_0x2328cb(0xfe)]+_0x2328cb(0x146)+_0x3e9885[_0x2328cb(0xf2)]+'\x27')<0x0&&(_0x278994=_0x278994['replace'](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x2328cb(0xea)+_0x3e9885[_0x2328cb(0xfe)]+_0x2328cb(0x12e)+_0x3e9885['pascalCaseName']+_0x2328cb(0xdf)+_0x3e9885[_0x2328cb(0xfe)]+_0x2328cb(0x146)+_0x3e9885['name']+'\x27')),_0x278994[_0x2328cb(0x128)]('...'+_0x3e9885[_0x2328cb(0xfe)]+_0x2328cb(0x12c))<0x0&&(_0x278994=_0x278994['replace'](/\/\* ENTITIES \*\//,'/*\x20ENTITIES\x20*/\x0a\x09...'+_0x3e9885[_0x2328cb(0xfe)]+_0x2328cb(0x12c))),_0x278994[_0x2328cb(0x128)](_0x2328cb(0xcf)+_0x3e9885['pascalCaseName']+_0x2328cb(0x150))<0x0&&(_0x278994=_0x278994[_0x2328cb(0x113)](/\/\* RESOLVER CLASSES \*\//,'/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...'+_0x3e9885[_0x2328cb(0xfe)]+_0x2328cb(0x150))),_0x278994[_0x2328cb(0x128)](_0x2328cb(0xcf)+_0x3e9885[_0x2328cb(0xfe)]+_0x2328cb(0x119))<0x0&&(_0x278994=_0x278994[_0x2328cb(0x113)](/\/\* SUBSCRIBERS \*\//,'/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...'+_0x3e9885['pascalCaseName']+_0x2328cb(0x119))),await this['writeFile'](_0x184bae,_0x278994,_0x3e9885);}async[a0_0x3ee400(0x144)](_0x209a61,_0x172200,_0x3265f5,_0x4f17f0,_0x130770){const _0x14e1ee=a0_0x3ee400;await this['writeFile'](_0x209a61+(_0x172200+_0x14e1ee(0x13f)),serviceIndex,_0x130770),await this[_0x14e1ee(0xfa)](_0x209a61+(_0x172200+'/'+_0x172200+_0x14e1ee(0x109)),serviceQuery,_0x130770),await this[_0x14e1ee(0xfa)](_0x209a61+(_0x172200+'/'+_0x172200+'-mutation.ts'),serviceMutation,_0x130770);let _0x4049d3=this['createEntityText'](_0x3265f5,_0x4f17f0);await this[_0x14e1ee(0xfa)](_0x209a61+(_0x172200+'/'+_0x172200+'.ts'),_0x4049d3,_0x130770);let _0x648ab1=this['createTypeText'](_0x4f17f0);await this[_0x14e1ee(0xfa)](_0x209a61+(_0x172200+'/'+_0x172200+_0x14e1ee(0xf9)),_0x648ab1,_0x130770);let _0x58b887=_0x209a61+_0x14e1ee(0xee);0x0==await this[_0x14e1ee(0xfd)](_0x58b887)&&await this[_0x14e1ee(0xfa)](_0x58b887,allIndex,_0x130770);let _0x105cf6=await fs[_0x14e1ee(0x151)](_0x58b887,_0x14e1ee(0x114));_0x105cf6[_0x14e1ee(0x128)](_0x14e1ee(0xd8)+_0x130770[_0x14e1ee(0xf2)]+'/'+_0x130770['name']+'\x27')<0x0&&(_0x105cf6=_0x105cf6[_0x14e1ee(0x113)](/\/\* EXPORT ENTITY TYPES \*\//,_0x14e1ee(0xe0)+_0x130770[_0x14e1ee(0xf2)]+'/'+_0x130770[_0x14e1ee(0xf2)]+'\x27')),_0x105cf6[_0x14e1ee(0x128)](_0x14e1ee(0x116)+_0x130770[_0x14e1ee(0xfe)]+_0x14e1ee(0x12e)+_0x130770[_0x14e1ee(0xfe)]+_0x14e1ee(0xe5)+_0x130770[_0x14e1ee(0xf2)]+'\x27')<0x0&&(_0x105cf6=_0x105cf6[_0x14e1ee(0x113)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,'/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20'+_0x130770['pascalCaseName']+'Entities,\x20resolvers\x20as\x20'+_0x130770[_0x14e1ee(0xfe)]+_0x14e1ee(0xe5)+_0x130770[_0x14e1ee(0xf2)]+'\x27')),_0x105cf6['indexOf'](_0x14e1ee(0xcf)+_0x130770['pascalCaseName']+_0x14e1ee(0x12c))<0x0&&(_0x105cf6=_0x105cf6['replace'](/\/\* ENTITIES \*\//,_0x14e1ee(0x115)+_0x130770[_0x14e1ee(0xfe)]+_0x14e1ee(0x12c))),_0x105cf6[_0x14e1ee(0x128)]('...'+_0x130770[_0x14e1ee(0xfe)]+_0x14e1ee(0x150))<0x0&&(_0x105cf6=_0x105cf6[_0x14e1ee(0x113)](/\/\* RESOLVER CLASSES \*\//,_0x14e1ee(0xf7)+_0x130770[_0x14e1ee(0xfe)]+'Resolvers,')),await this[_0x14e1ee(0xfa)](_0x58b887,_0x105cf6,_0x130770);}[a0_0x3ee400(0x108)](_0x4ebd00){const _0x359a8f=a0_0x3ee400;let _0x3f786c=sereviceType,_0x49046f=_0x4ebd00[_0x359a8f(0xe3)](_0x4186fc=>{const _0xaff100=_0x359a8f;if('id'==_0x4186fc['name'])return'';if('domain_id'==_0x4186fc[_0xaff100(0xf2)])return'';if(_0xaff100(0x105)==_0x4186fc[_0xaff100(0xf2)])return'';if(_0xaff100(0x154)==_0x4186fc['name'])return'';if('creator_id'==_0x4186fc[_0xaff100(0xf2)])return'';if(_0xaff100(0x14b)==_0x4186fc[_0xaff100(0xf2)])return'';let _0x55e61c=this[_0xaff100(0x129)](_0x4186fc),_0x41ecf3=this[_0xaff100(0xdb)](_0x4186fc),_0x4a7541=camelCase(_0x4186fc['name']);return'\x20\x20'+(_0xaff100(0xcc)+(0x0==_0x55e61c[_0xaff100(0xdc)]?'':_0xaff100(0xf5)+_0x55e61c+',')+_0xaff100(0x130)+_0x4186fc[_0xaff100(0x136)]+'\x20})')+'\x0a\x20\x20'+(''+_0x4a7541+(_0x4186fc[_0xaff100(0x136)]?'?':'')+':\x20'+_0x41ecf3)+'\x0a';});_0x3f786c=_0x3f786c[_0x359a8f(0x113)](/{{newTypeColumns}}/g,_0x49046f[_0x359a8f(0x101)]('\x0a'));let _0x206f62=_0x4ebd00[_0x359a8f(0xe3)](_0x1b74de=>{const _0x5d6ed3=_0x359a8f;if('id'==_0x1b74de[_0x5d6ed3(0xf2)])return'';if(_0x5d6ed3(0xde)==_0x1b74de[_0x5d6ed3(0xf2)])return'';if(_0x5d6ed3(0x105)==_0x1b74de['name'])return'';if(_0x5d6ed3(0x154)==_0x1b74de[_0x5d6ed3(0xf2)])return'';if('creator_id'==_0x1b74de[_0x5d6ed3(0xf2)])return'';if(_0x5d6ed3(0x14b)==_0x1b74de[_0x5d6ed3(0xf2)])return'';let _0x1ccc80=this[_0x5d6ed3(0x129)](_0x1b74de),_0x10cdb4=this[_0x5d6ed3(0xdb)](_0x1b74de);_0x1b74de[_0x5d6ed3(0x136)]=!0x0;let _0x408b39=camelCase(_0x1b74de[_0x5d6ed3(0xf2)]);return'\x20\x20'+(_0x5d6ed3(0xcc)+(0x0==_0x1ccc80[_0x5d6ed3(0xdc)]?'':_0x5d6ed3(0xf5)+_0x1ccc80+',')+_0x5d6ed3(0x130)+_0x1b74de[_0x5d6ed3(0x136)]+_0x5d6ed3(0x153))+_0x5d6ed3(0xd5)+(''+_0x408b39+(_0x1b74de[_0x5d6ed3(0x136)]?'?':'')+':\x20'+_0x10cdb4)+'\x0a';});return _0x3f786c=_0x3f786c[_0x359a8f(0x113)](/{{patchTypeColumns}}/g,_0x206f62[_0x359a8f(0x101)]('\x0a')),_0x3f786c;}[a0_0x3ee400(0xdd)](_0x2e9d51,_0x2dafc1){const _0x24f393=a0_0x3ee400;let _0x17f91f=serviceEntity,_0x4692ca=_0x2dafc1['sort'](function(_0x3377b7,_0x389e65){const _0x16190b=a0_0x2210;return _0x3377b7[_0x16190b(0xf1)]-_0x389e65[_0x16190b(0xf1)];})[_0x24f393(0xe3)](_0x3e4eea=>this[_0x24f393(0x143)](_0x3e4eea));[_0x24f393(0x11d),_0x24f393(0x13e)]['includes'](_0x2e9d51['dataProp'])&&_0x4692ca[_0x24f393(0x124)](_0x24f393(0xda)),_0x17f91f=_0x17f91f[_0x24f393(0x113)](/{{entityColumns}}/g,_0x4692ca[_0x24f393(0x101)]('\x0a'));let _0x383088='',_0x5383df=_0x2dafc1[_0x24f393(0xd6)](_0x1ff5d8=>_0x1ff5d8[_0x24f393(0xe1)]&&_0x1ff5d8[_0x24f393(0xe1)]>0x0)[_0x24f393(0x138)](function(_0x488342,_0x62ea67){const _0x3e3988=_0x24f393;return _0x488342[_0x3e3988(0xe1)]-_0x62ea67[_0x3e3988(0xe1)];});if(_0x5383df['length']>0x0){_0x383088=_0x24f393(0x14e);let _0x3e513e=_0x5383df['map'](_0x351be0=>{const _0x17de17=_0x24f393;let _0x1b93be=_0x351be0[_0x17de17(0xf2)];return _0x17de17(0xde)==_0x351be0[_0x17de17(0xf2)]&&(_0x1b93be=_0x17de17(0x122)),_0x17de17(0x120)==_0x351be0['name']&&(_0x1b93be=_0x17de17(0x157)),_0x17de17(0x14b)==_0x351be0[_0x17de17(0xf2)]&&(_0x1b93be='updater'),_0x17de17(0x10c)+camelCase(_0x1b93be);});_0x383088=_0x383088['replace'](/{{indexColumns}}/g,_0x3e513e[_0x24f393(0x101)](','));}return _0x17f91f=_0x17f91f['replace'](/{{indexAnn}}/g,_0x383088),_0x17f91f;}['createHistoryEntityText'](_0x1d58bd,_0x5d39d4){const _0x444a9e=a0_0x3ee400;let _0x499f95='JSON'==_0x1d58bd[_0x444a9e(0xf6)]?serviceEntityHistJson:serviceEntityHistCopy,_0x5ca303=_0x5d39d4[_0x444a9e(0x138)](function(_0x25342e,_0x5556b7){const _0x28a54b=_0x444a9e;return _0x25342e[_0x28a54b(0xf1)]-_0x5556b7[_0x28a54b(0xf1)];})[_0x444a9e(0xe3)](_0x1916e0=>this[_0x444a9e(0x143)](_0x1916e0));return _0x499f95=_0x499f95[_0x444a9e(0x113)](/{{entityColumns}}/g,_0x5ca303['join']('\x0a')),_0x499f95;}['columnToEntityColumn'](_0x20334e){const _0x55c298=a0_0x3ee400;if('id'==_0x20334e[_0x55c298(0xf2)])return'';if('domain_id'==_0x20334e[_0x55c298(0xf2)])return'';if('created_at'==_0x20334e['name'])return'';if('updated_at'==_0x20334e[_0x55c298(0xf2)])return'';if('creator_id'==_0x20334e[_0x55c298(0xf2)])return'';if(_0x55c298(0x14b)==_0x20334e[_0x55c298(0xf2)])return'';let _0x1c0e1e=_0x20334e[_0x55c298(0xf4)];_0x55c298(0xd1)==_0x20334e['colType']&&(_0x1c0e1e=_0x55c298(0xcb)),_0x55c298(0x12b)==_0x20334e['colType']&&(_0x1c0e1e='bigint'),'string'==_0x20334e[_0x55c298(0xf4)]&&(_0x1c0e1e='character\x20varying'),_0x55c298(0x142)==_0x20334e[_0x55c298(0xf4)]&&(_0x1c0e1e=_0x55c298(0x132));let _0x5d9d92='';'string'==_0x20334e[_0x55c298(0xf4)]&&(_0x5d9d92=_0x20334e[_0x55c298(0x139)]);let _0x5f0c16=this[_0x55c298(0x129)](_0x20334e),_0x1ac2b0=this[_0x55c298(0xdb)](_0x20334e),_0x503bd7=camelCase(_0x20334e['name']);return'\x20\x20'+(_0x55c298(0xd0)+_0x20334e[_0x55c298(0xf2)]+_0x55c298(0x13d)+_0x1c0e1e+_0x55c298(0x11c)+_0x20334e[_0x55c298(0x136)]+'\x20'+(0x0==_0x5d9d92[_0x55c298(0xdc)]?'':_0x55c298(0xcd)+_0x5d9d92)+_0x55c298(0x153))+_0x55c298(0xd5)+(_0x55c298(0xcc)+(0x0==_0x5f0c16[_0x55c298(0xdc)]?'':_0x55c298(0xf5)+_0x5f0c16+',')+_0x55c298(0x130)+_0x20334e['nullable']+_0x55c298(0x153))+'\x0a\x20\x20'+(''+_0x503bd7+(_0x20334e[_0x55c298(0x136)]?'?':'')+':\x20'+_0x1ac2b0)+'\x0a';}[a0_0x3ee400(0x129)](_0x15b0b2){const _0x2faa52=a0_0x3ee400;let _0x52ef1c='';return _0x2faa52(0xd1)==_0x15b0b2[_0x2faa52(0xf4)]&&(_0x52ef1c=_0x2faa52(0x14f)),_0x2faa52(0x100)==_0x15b0b2[_0x2faa52(0xf4)]&&(_0x52ef1c=_0x2faa52(0x14f)),_0x2faa52(0x12b)==_0x15b0b2[_0x2faa52(0xf4)]&&(_0x52ef1c=_0x2faa52(0xc8)),_0x2faa52(0xf8)==_0x15b0b2[_0x2faa52(0xf4)]&&(_0x52ef1c=_0x2faa52(0xc8)),_0x52ef1c;}[a0_0x3ee400(0xdb)](_0x526281){const _0xd68213=a0_0x3ee400;let _0x48957b=_0x526281[_0xd68213(0xf4)];return _0xd68213(0x110)==_0x526281[_0xd68213(0xf4)]&&(_0x48957b=_0xd68213(0x12d)),'double'==_0x526281[_0xd68213(0xf4)]&&(_0x48957b=_0xd68213(0x12d)),_0xd68213(0x100)==_0x526281[_0xd68213(0xf4)]&&(_0x48957b=_0xd68213(0x12d)),_0xd68213(0xf8)==_0x526281['colType']&&(_0x48957b=_0xd68213(0x12d)),_0xd68213(0x12b)==_0x526281[_0xd68213(0xf4)]&&(_0x48957b=_0xd68213(0x12d)),_0xd68213(0x142)==_0x526281[_0xd68213(0xf4)]&&(_0x48957b=_0xd68213(0x127)),_0xd68213(0x13a)==_0x526281[_0xd68213(0xf4)]&&(_0x48957b=_0xd68213(0x127)),_0xd68213(0x121)==_0x526281[_0xd68213(0xf4)]&&(_0x48957b=_0xd68213(0x11f)),_0x48957b;}async[a0_0x3ee400(0xfa)](_0x1c881a,_0x1a9a65,_0x5214d6){const _0x414282=a0_0x3ee400;await fs[_0x414282(0xf3)](_0x1c881a,this[_0x414282(0x133)](_0x1a9a65,_0x5214d6),_0x414282(0x114));}[a0_0x3ee400(0x133)](_0x5dc3a0,_0x912861){const _0x364df4=a0_0x3ee400;return _0x5dc3a0[_0x364df4(0x113)](/{{pascalCase name}}/g,_0x912861[_0x364df4(0xfe)])[_0x364df4(0x113)](/{{camelCase name}}/g,_0x912861['camelCaseName'])[_0x364df4(0x113)](/{{snakeCase name}}/g,_0x912861[_0x364df4(0x123)])['replace'](/{{pluralPascalCase name}}/g,_0x912861[_0x364df4(0xce)])[_0x364df4(0x113)](/{{pluralCamelCase name}}/g,_0x912861['pluralCamelCaseName'])[_0x364df4(0x113)](/{{tableName}}/g,_0x912861['tableName'])[_0x364df4(0x113)](/{{name}}/g,_0x912861[_0x364df4(0xf2)]);}async[a0_0x3ee400(0x155)](_0x599afa,_0x4d740b,_0x37c90b){const _0x327e6e=a0_0x3ee400;let _0x40cc15=_0x599afa+_0x327e6e(0x118);await this[_0x327e6e(0x103)](_0x40cc15),_0x40cc15=_0x40cc15+'/'+_0x4d740b,await this[_0x327e6e(0x103)](_0x40cc15),_0x40cc15+='/server',await this['createDir'](_0x40cc15),_0x40cc15+=_0x327e6e(0x11a),await this[_0x327e6e(0x103)](_0x40cc15),_0x40cc15=_0x40cc15+'/'+_0x37c90b,await this[_0x327e6e(0x103)](_0x40cc15);}[a0_0x3ee400(0x10e)](){const _0x13c705=a0_0x3ee400;let _0x210301=process['env'][_0x13c705(0x106)][_0x13c705(0x107)]('/'),_0xc62508=[];for(let _0x20be0a=0x0;_0x20be0a<_0x210301['length']&&_0x13c705(0x13c)!=_0x210301[_0x20be0a];_0x20be0a++)_0xc62508[_0x13c705(0x124)](_0x210301[_0x20be0a]);return _0xc62508['join']('/');}async[a0_0x3ee400(0x103)](_0x24ad65){const _0x73d9e3=a0_0x3ee400;0x0==await this[_0x73d9e3(0xfd)](_0x24ad65)&&fs[_0x73d9e3(0xc9)](_0x24ad65);}async['existsPath'](_0x4785a6){const _0xb40471=a0_0x3ee400;return await fs[_0xb40471(0x149)](_0x4785a6);}};tslib_1[a0_0x3ee400(0x13b)]([(0x0,type_graphql_1[a0_0x3ee400(0xd2)])(_0x191601=>Boolean,{'description':'Operato\x20Tool\x20Create\x20Service'}),tslib_1[a0_0x3ee400(0x147)](0x0,(0x0,type_graphql_1[a0_0x3ee400(0x126)])('id')),tslib_1['__param'](0x1,(0x0,type_graphql_1[a0_0x3ee400(0xd3)])()),tslib_1[a0_0x3ee400(0x11e)]('design:type',Function),tslib_1[a0_0x3ee400(0x11e)](a0_0x3ee400(0x14a),[String,Object]),tslib_1['__metadata'](a0_0x3ee400(0x10a),Promise)],OperatoToolCreateService[a0_0x3ee400(0x140)],'toolCreateService',null),OperatoToolCreateService=tslib_1[a0_0x3ee400(0x13b)]([(0x0,type_graphql_1['Resolver'])()],OperatoToolCreateService),exports['OperatoToolCreateService']=OperatoToolCreateService;const allIndex=a0_0x3ee400(0x12f),serviceIndex=a0_0x3ee400(0x10d),serviceHistoryIndex='\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryQuery\x20}\x20from\x20\x27./{{name}}-history-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryEntitySubscriber\x20}\x20from\x20\x27./event-subscriber\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}},\x20{{pascalCase\x20name}}History]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}HistoryQuery,\x20{{pascalCase\x20name}}Mutation]\x0aexport\x20const\x20subscribers\x20=\x20[{{pascalCase\x20name}}HistoryEntitySubscriber]\x0a\x0a',serviceQuery=a0_0x3ee400(0x10f),serviceHistoryQuery=a0_0x3ee400(0xca),serviceMutation=a0_0x3ee400(0xef),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='\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='\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',serviceEntityHistCopy=a0_0x3ee400(0xe4),serviceEntityHistJson=a0_0x3ee400(0x12a),serviceEntitySubscriber=a0_0x3ee400(0xeb);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';const a0_0x295f4e=a0_0xa38a;(function(_0xa86987,_0x512bc7){const _0x4b6024=a0_0xa38a,_0x144e4a=_0xa86987();while(!![]){try{const _0x50b34e=-parseInt(_0x4b6024(0x1a8))/0x1*(parseInt(_0x4b6024(0x191))/0x2)+parseInt(_0x4b6024(0x197))/0x3*(-parseInt(_0x4b6024(0x199))/0x4)+-parseInt(_0x4b6024(0x19a))/0x5*(parseInt(_0x4b6024(0x19e))/0x6)+-parseInt(_0x4b6024(0x19c))/0x7*(-parseInt(_0x4b6024(0x19d))/0x8)+parseInt(_0x4b6024(0x195))/0x9+-parseInt(_0x4b6024(0x190))/0xa+parseInt(_0x4b6024(0x18b))/0xb;if(_0x50b34e===_0x512bc7)break;else _0x144e4a['push'](_0x144e4a['shift']());}catch(_0x266661){_0x144e4a['push'](_0x144e4a['shift']());}}}(a0_0x49f4,0x5a688));Object[a0_0x295f4e(0x193)](exports,'__esModule',{'value':!0x0}),exports[a0_0x295f4e(0x18a)]=exports[a0_0x295f4e(0x1a6)]=void 0x0;const operato_license_checker_1=require('@things-factory/operato-license-checker'),shell_1=require('@things-factory/shell'),menu_base_1=require('@things-factory/menu-base'),license_error_1=require(a0_0x295f4e(0x1a4));function a0_0x49f4(){const _0x3aa351=['6000840oyczKP','where','3yOQuZR','getCount','2376428DRHbqE','1569385mZFStc','manager','77TZWXVy','152552GLZuAo','6XERGeE','createQueryBuilder','menu','getPermission','(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)','Menu','../../errors/license-error','LicenseError','checkStudioPermission','INVALID_LICENSE','514201qijHfx','checkStudioTemplateIsOverLimit','11880627DustNn','from','Permissions\x20For\x20Tailor\x20Tool','ERROR_CODES','checkTarget','1640790SsppPg','2yyGgmx','trim','defineProperty','getRepository'];a0_0x49f4=function(){return _0x3aa351;};return a0_0x49f4();}function a0_0xa38a(_0x5ced08,_0x318a99){const _0x49f4dd=a0_0x49f4();return a0_0xa38a=function(_0xa38aa9,_0x19b64e){_0xa38aa9=_0xa38aa9-0x18a;let _0x1ad563=_0x49f4dd[_0xa38aa9];return _0x1ad563;},a0_0xa38a(_0x5ced08,_0x318a99);}async function checkStudioPermission(){const _0x29f3e6=a0_0x295f4e;let _0x356a90=((0x0,operato_license_checker_1[_0x29f3e6(0x1a1)])(_0x29f3e6(0x18d))||',')['split'](',')['map'](_0x5bab17=>_0x5bab17[_0x29f3e6(0x192)]()),_0x202d67=!0x1;return _0x356a90['forEach'](_0x15a297=>{_0x15a297['includes']('Studio')&&(_0x202d67=!0x0);}),_0x202d67;}async function checkStudioTemplateIsOverLimit(_0x1358cd,_0x2a3f7a){const _0x100e6a=a0_0x295f4e;if(0x0==await checkStudioPermission())throw new license_error_1[(_0x100e6a(0x1a5))]({'errorCode':_0x2a3f7a['t'](license_error_1[_0x100e6a(0x1a5)][_0x100e6a(0x18e)][_0x100e6a(0x1a7)])});var _0x5f1586=0x0;if(_0x5f1586=_0x1358cd&&''!=_0x1358cd?await(0x0,shell_1['getRepository'])(menu_base_1['Menu'])[_0x100e6a(0x19b)][_0x100e6a(0x19f)]()['select']('menu')['from'](menu_base_1[_0x100e6a(0x1a3)],_0x100e6a(0x1a0))[_0x100e6a(0x196)]('id\x20!=\x20:id',{'id':_0x1358cd})['andWhere'](_0x100e6a(0x1a2))[_0x100e6a(0x198)]()+0x1:await(0x0,shell_1[_0x100e6a(0x194)])(menu_base_1[_0x100e6a(0x1a3)])[_0x100e6a(0x19b)]['createQueryBuilder']()['select'](_0x100e6a(0x1a0))[_0x100e6a(0x18c)](menu_base_1[_0x100e6a(0x1a3)],_0x100e6a(0x1a0))['where']('(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)')[_0x100e6a(0x198)]()+0x1,!(0x0,operato_license_checker_1[_0x100e6a(0x18f)])(_0x5f1586))throw new license_error_1['LicenseError']({'errorCode':_0x2a3f7a['t'](license_error_1[_0x100e6a(0x1a5)][_0x100e6a(0x18e)]['OVER_LIMIT'])});return!0x0;}exports[a0_0x295f4e(0x1a6)]=checkStudioPermission,exports['checkStudioTemplateIsOverLimit']=checkStudioTemplateIsOverLimit;
|