@things-factory/operato-tools 6.1.37 → 6.1.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/actions/main.js +1 -1
- package/client/pages/generator/button-config-tab-mixin.js +4 -4
- package/client/pages/generator/column-config-tab-mixin.js +4 -4
- package/client/pages/generator/etc-config-tab-mixin.js +4 -4
- package/client/pages/generator/form-config-tab-mixin.js +4 -4
- package/client/pages/generator/graphql-config-tab-mixin.js +24 -24
- package/client/pages/generator/grid-config-tab-mixin.js +22 -22
- package/client/pages/generator/grid-emphasized-config-tab-mixin.js +8 -8
- package/client/pages/generator/menu-config-tab-mixin.js +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
package/client/pages/main.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
function a0_0x5481(_0x41f57,_0x3f6198){var _0x3b4b40=a0_0x3b4b();return a0_0x5481=function(_0x548159,_0x2d889a){_0x548159=_0x548159-0x1af;var _0x2ab9b3=_0x3b4b40[_0x548159];return _0x2ab9b3;},a0_0x5481(_0x41f57,_0x3f6198);}var a0_0x4530e1=a0_0x5481;(function(_0x1cf196,_0x22d92c){var _0xc8c3b3=a0_0x5481,_0x234627=_0x1cf196();while(!![]){try{var _0x132fa5=-parseInt(_0xc8c3b3(0x1bd))/0x1*(parseInt(_0xc8c3b3(0x1b4))/0x2)+-parseInt(_0xc8c3b3(0x1be))/0x3+parseInt(_0xc8c3b3(0x1ba))/0x4+parseInt(_0xc8c3b3(0x1b6))/0x5*(-parseInt(_0xc8c3b3(0x1bb))/0x6)+parseInt(_0xc8c3b3(0x1b5))/0x7+parseInt(_0xc8c3b3(0x1b9))/0x8+parseInt(_0xc8c3b3(0x1bc))/0x9;if(_0x132fa5===_0x22d92c)break;else _0x234627['push'](_0x234627['shift']());}catch(_0x50985a){_0x234627['push'](_0x234627['shift']());}}}(a0_0x3b4b,0x43ab6));import{html,css}from'lit-element';import{connect}from'pwa-helpers/connect-mixin.js';import{store,PageView}from'@things-factory/shell';function a0_0x3b4b(){var _0x5115ec=['4qyLmXS','2497425YDHpDO','1114620EojUVj','styles','define','3084776xotAQY','2104564tUOByb','12UBDUKu','106623efnTPW','89519DcdMcx','1134900xOyQXD','operato-tools-main','customElements','render','context','tText'];a0_0x3b4b=function(){return _0x5115ec;};return a0_0x3b4b();}import{TermsUtil}from'@things-factory/meta-ui';class OperatoToolsMain extends connect(store)(PageView){static get[a0_0x4530e1(0x1b7)](){return[css`
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
4
|
background-color: var(--main-section-background-color);
|
|
@@ -41,11 +41,11 @@ var a0_0x1f1846=a0_0x45c9;(function(_0x8ef38d,_0x55012f){var _0x263d73=a0_0x45c9
|
|
|
41
41
|
display: none;
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
`];}get[
|
|
44
|
+
`];}get[a0_0x4530e1(0x1b2)](){return{'title':'Operato\x20Tools','actions':[]};}[a0_0x4530e1(0x1b1)](){var _0x8d40e=a0_0x4530e1;return html`
|
|
45
45
|
<h2>Operato Tools</h2>
|
|
46
46
|
<p page-description>
|
|
47
|
-
${TermsUtil[
|
|
47
|
+
${TermsUtil[_0x8d40e(0x1b3)]('tool\x20start\x20msg')}
|
|
48
48
|
</p>
|
|
49
49
|
|
|
50
50
|
<img src="/assets/images/operato-tools.png" />
|
|
51
|
-
`;}}
|
|
51
|
+
`;}}window[a0_0x4530e1(0x1b0)][a0_0x4530e1(0x1b8)](a0_0x4530e1(0x1af),OperatoToolsMain);
|
package/client/reducers/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a0_0x43ddc3=a0_0x3857;(function(_0x36f46f,_0x213985){const _0x5460ea=a0_0x3857,_0x51080c=_0x36f46f();while(!![]){try{const _0x2adc67=-parseInt(_0x5460ea(0x152))/0x1*(parseInt(_0x5460ea(0x156))/0x2)+-parseInt(_0x5460ea(0x14d))/0x3+parseInt(_0x5460ea(0x154))/0x4*(parseInt(_0x5460ea(0x14e))/0x5)+-parseInt(_0x5460ea(0x150))/0x6+parseInt(_0x5460ea(0x149))/0x7*(parseInt(_0x5460ea(0x151))/0x8)+-parseInt(_0x5460ea(0x157))/0x9+-parseInt(_0x5460ea(0x155))/0xa*(-parseInt(_0x5460ea(0x14b))/0xb);if(_0x2adc67===_0x213985)break;else _0x51080c['push'](_0x51080c['shift']());}catch(_0x2d239f){_0x51080c['push'](_0x51080c['shift']());}}}(a0_0x4caf,0x2c191));import a0_0x2beaed from'graphql-tag';function a0_0x3857(_0x386728,_0x211afd){const _0x4caf81=a0_0x4caf();return a0_0x3857=function(_0x3857f8,_0x5382b7){_0x3857f8=_0x3857f8-0x147;let _0x5ca578=_0x4caf81[_0x3857f8];return _0x5ca578;},a0_0x3857(_0x386728,_0x211afd);}import{i18next}from'@operato/i18n';import{store}from'@operato/shell';import{client,gqlContext}from'@operato/graphql';import{UPDATE_OPERATO_TOOLS}from'../actions/main';const INITIAL_STATE={'operatoTools':a0_0x43ddc3(0x14f),'studioPermission':!0x1};export const UPDATE_OPERATO_TOOLS_PERMISSION=a0_0x43ddc3(0x147);((async()=>{const _0x1837b8=a0_0x43ddc3;var _0x319e0f=await client['query']({'query':a0_0x2beaed`{studioPermission}`});let _0x4f0a6f=!0x1;_0x319e0f[_0x1837b8(0x153)]||(_0x4f0a6f=_0x319e0f['data'][_0x1837b8(0x14c)]),store['dispatch']({'type':UPDATE_OPERATO_TOOLS_PERMISSION,'state':{'studioPermission':_0x4f0a6f}});})());const operatoTools=(_0xbf91ba=INITIAL_STATE,_0x2a8b01)=>{const _0x4af473=a0_0x43ddc3;switch(_0x2a8b01[_0x4af473(0x148)]){case UPDATE_OPERATO_TOOLS:return{..._0xbf91ba};case UPDATE_OPERATO_TOOLS_PERMISSION:return{...INITIAL_STATE,..._0x2a8b01[_0x4af473(0x14a)]};default:return _0xbf91ba;}};export default operatoTools;function a0_0x4caf(){const _0x46c956=['1136440KaoEde','48470WSCYzf','116QiyeEm','354312rXxqCR','UPDATE_OPERATO_TOOLS_PERMISSION','type','2459611KqYQMQ','state','341jcuCtu','studioPermission','675120wcIwCd','5aenteU','ABC','548190iUkYFC','8sbCAlg','4299WcYdGO','errors'];a0_0x4caf=function(){return _0x46c956;};return a0_0x4caf();}
|
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.39",
|
|
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.39",
|
|
33
33
|
"@things-factory/operato-license-checker": "^3.1.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@things-factory/builder": "^6.1.28",
|
|
37
37
|
"@things-factory/meta-ui": "^6.0.0-alpha.6"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "a596141c2db1970bc5dd3fb1693af57ad93ea07a"
|
|
40
40
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a0_0x4cf477=a0_0x193f;(function(_0x46d46f,_0x239c77){var _0x3718b9=a0_0x193f,_0x3c9fec=_0x46d46f();while(!![]){try{var _0xf70bd5=-parseInt(_0x3718b9(0x6b))/0x1+parseInt(_0x3718b9(0x68))/0x2*(-parseInt(_0x3718b9(0x6f))/0x3)+parseInt(_0x3718b9(0x67))/0x4*(-parseInt(_0x3718b9(0x65))/0x5)+-parseInt(_0x3718b9(0x66))/0x6+-parseInt(_0x3718b9(0x69))/0x7+-parseInt(_0x3718b9(0x70))/0x8*(-parseInt(_0x3718b9(0x71))/0x9)+parseInt(_0x3718b9(0x64))/0xa;if(_0xf70bd5===_0x239c77)break;else _0x3c9fec['push'](_0x3c9fec['shift']());}catch(_0x245097){_0x3c9fec['push'](_0x3c9fec['shift']());}}}(a0_0xf39f,0x9aef0));function a0_0xf39f(){var _0x3b6c35=['__esModule','84291PjcLeR','INVALID_LICENSE','defineProperty','error.page\x20count\x20over\x20license\x20limit','58863QtVYOm','8iyMfXO','1976589SibNOI','OVER_LIMIT','error.invalid\x20license\x20key','26402260sDXlbE','45670OpkfoU','724104MhLUBs','228RoUwOs','38MsfVne','7887789GUHlvK'];a0_0xf39f=function(){return _0x3b6c35;};return a0_0xf39f();}function a0_0x193f(_0x180788,_0x136499){var _0xf39f86=a0_0xf39f();return a0_0x193f=function(_0x193f9c,_0x3ef18b){_0x193f9c=_0x193f9c-0x64;var _0x4b3800=_0xf39f86[_0x193f9c];return _0x4b3800;},a0_0x193f(_0x180788,_0x136499);}Object[a0_0x4cf477(0x6d)](exports,a0_0x4cf477(0x6a),{'value':!0x0}),exports[a0_0x4cf477(0x72)]=exports[a0_0x4cf477(0x6c)]=void 0x0,exports[a0_0x4cf477(0x6c)]=a0_0x4cf477(0x73),exports[a0_0x4cf477(0x72)]=a0_0x4cf477(0x6e);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';function a0_0x52b3(){const _0x45a38f=['22415xrxqZX','errorCode','LicenseError','__esModule','2BKpuJc','12764770JiHbds','tslib','license-error','3945648sfoxaq','534MuepmF','416flWyTG','name','1944684RWnHQo','64741ghkAUo','defineProperty','43515AjyJPv','24213cNJKFa','assign','__importStar'];a0_0x52b3=function(){return _0x45a38f;};return a0_0x52b3();}const a0_0x30bcb1=a0_0x3670;(function(_0x1f0655,_0x440014){const _0x40c12b=a0_0x3670,_0x2184cb=_0x1f0655();while(!![]){try{const _0x363fdb=parseInt(_0x40c12b(0xb6))/0x1*(parseInt(_0x40c12b(0xad))/0x2)+-parseInt(_0x40c12b(0xb8))/0x3+-parseInt(_0x40c12b(0xb3))/0x4*(parseInt(_0x40c12b(0xa9))/0x5)+-parseInt(_0x40c12b(0xb2))/0x6*(parseInt(_0x40c12b(0xb9))/0x7)+-parseInt(_0x40c12b(0xb1))/0x8+parseInt(_0x40c12b(0xb5))/0x9+parseInt(_0x40c12b(0xae))/0xa;if(_0x363fdb===_0x440014)break;else _0x2184cb['push'](_0x2184cb['shift']());}catch(_0x14c4d7){_0x2184cb['push'](_0x2184cb['shift']());}}}(a0_0x52b3,0x4342c));Object[a0_0x30bcb1(0xb7)](exports,a0_0x30bcb1(0xac),{'value':!0x0}),exports[a0_0x30bcb1(0xab)]=void 0x0;function a0_0x3670(_0x918635,_0x189812){const _0x52b3cd=a0_0x52b3();return a0_0x3670=function(_0x367053,_0x3868c0){_0x367053=_0x367053-0xa9;let _0x35b19c=_0x52b3cd[_0x367053];return _0x35b19c;},a0_0x3670(_0x918635,_0x189812);}const tslib_1=require(a0_0x30bcb1(0xaf)),ERROR_CODES=tslib_1[a0_0x30bcb1(0xbb)](require('../constants/error-code'));class LicenseError extends Error{static get['ERROR_CODES'](){const _0x6ec7=a0_0x30bcb1;return Object[_0x6ec7(0xba)]({},ERROR_CODES);}constructor({errorCode:_0x1b3597,detail:_0x1d2509}){const _0x54630c=a0_0x30bcb1;super(_0x1b3597),this[_0x54630c(0xb4)]=_0x54630c(0xb0),this[_0x54630c(0xaa)]=_0x1b3597,this['detail']=_0x1d2509;}}exports['LicenseError']=LicenseError;
|
package/server/routes.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a0_0x26b25a=a0_0x538f;(function(_0x17c52d,_0x2cabc9){const _0x4d3a76=a0_0x538f,_0x3c5cbe=_0x17c52d();while(!![]){try{const _0x4c1cad=parseInt(_0x4d3a76(0x110))/0x1*(-parseInt(_0x4d3a76(0x10b))/0x2)+-parseInt(_0x4d3a76(0x108))/0x3+parseInt(_0x4d3a76(0x10c))/0x4+parseInt(_0x4d3a76(0x113))/0x5+parseInt(_0x4d3a76(0x112))/0x6*(-parseInt(_0x4d3a76(0x109))/0x7)+-parseInt(_0x4d3a76(0x10f))/0x8+parseInt(_0x4d3a76(0x10d))/0x9;if(_0x4c1cad===_0x2cabc9)break;else _0x3c5cbe['push'](_0x3c5cbe['shift']());}catch(_0xfb2f88){_0x3c5cbe['push'](_0x3c5cbe['shift']());}}}(a0_0x34cb,0x9563e));function a0_0x538f(_0x337c20,_0x1fbf21){const _0x34cb5a=a0_0x34cb();return a0_0x538f=function(_0x538f57,_0x3543f7){_0x538f57=_0x538f57-0x108;let _0xa2063f=_0x34cb5a[_0x538f57];return _0xa2063f;},a0_0x538f(_0x337c20,_0x1fbf21);}const debug=require(a0_0x26b25a(0x114))(a0_0x26b25a(0x10e));process['on'](a0_0x26b25a(0x111),(_0x2b8597,_0x2620a0)=>{}),process['on']('bootstrap-module-global-private-route',(_0xf364ca,_0x21381c)=>{}),process['on'](a0_0x26b25a(0x10a),(_0xf05091,_0x3bd0c7)=>{}),process['on'](a0_0x26b25a(0x115),(_0x37f489,_0x44bade)=>{});function a0_0x34cb(){const _0x3f6ca4=['bootstrap-module-global-public-route','475788HQuKie','1585660VbvquF','debug','bootstrap-module-domain-private-route','3100302MWhwAK','77HkzetN','bootstrap-module-domain-public-route','774538KabKQA','2107688xzIaQL','32277447RCvMEE','things-factory:operato-tools:routes','9106280SRITGe','2RlAXfG'];a0_0x34cb=function(){return _0x3f6ca4;};return a0_0x34cb();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x552978=a0_0x4b4d;function a0_0x94c2(){const _0x4b8705=['resourceUrl','parent','JSON','rank','stringify','prototype','__esModule','__importDefault',',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22','join','{\x22name\x22:\x22','searchOper','select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27','\x27\x20or\x20id\x20=\x20\x27','gridRank','enc','sortRank','string','hiddenFlag','randomBytes','OperatoToolCreateMenu','filter','7145NgvXAC','left','state','hidden','3732vxZuHv','292374qoEeBV','aes-256-cfb1','Resolver','menuType','264KOAtOd','pluralize','push','updatedAt','type-graphql','\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}','EntityColumn','toolCreateMenu','defineProperty','query','design:paramtypes','checkStudioTemplateIsOverLimit','COPY',',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22','createGridColumns','name','@things-factory/meta-ui/client/pages/meta-grist-page','\x22,\x22header\x22:\x20\x22','\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22basic\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22label\x22:\x20\x22data_history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22icon\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22logic\x22:\x20\x22history_copy\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20','./../tool-secret/tool-permission','design:returntype','refType','reverseSort','created_at',',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22','updater','update','category','h1z0q9i9x7q6','creator_id','refName','Arg','__decorate','aes-256-ofb','aes-256-cbc','3742236ZkxlTh',',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22','aes-256-cfb','replace','routing','dataProp','split','400473HBrZvd','readonly','\x22,\x22width\x22:','findOne','\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22basic\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22label\x22:\x20\x22data_history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22icon\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22logic\x22:\x20\x22history_json\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20','\x22,\x22name\x22:\x20\x22','createCipheriv','aes256','createSearchCols','1809642rRMQdy','sort','{\x22name\x22:\x20\x22','\x20,\x22editable\x22:\x20','save','entity','@things-factory/resource-base','__metadata','assign','updater_id','createMenuData','\x20,\x22exportable\x22:\x20true','aes-256-ecb',',\x22mandatory\x22:\x20','Menu','parent_menu_id','getRepository','lodash','__param','\x0a{\x0a\x20\x20\x22menu\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x22title\x22:\x20\x22{{name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22\x22,\x0a\x20\x20\x20\x20\x20\x20\x22desc\x22:\x20\x22\x22\x0a\x20\x20},\x0a\x20\x20\x22gql\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x22query\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22list_func\x22:\x20\x22{{pluralCamelCase\x20name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22find_one_func\x22:\x22{{camelCase\x20name}}\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x22mutation\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22multiple\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22func\x22:\x22updateMultiple{{pascalCase\x20name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22{{pascalCase\x20name}}Patch\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22delete\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22func\x22:\x22delete{{pluralPascalCase\x20name}}\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20},\x0a\x20\x20\x22button\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22export\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22add\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22delete\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22save\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20],\x0a\x20\x20\x22grid_column\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22string\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22id\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22header\x22:\x20\x22id\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22hidden\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22editable\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22mandatory\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22sortable\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22align\x22:\x20\x22left\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22width\x22:\x200,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22exportable\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20},\x0a{{GridColumns}}\x0a\x20\x20],\x0a\x20\x20\x22grid\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22button\x22:[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{{HistoryButton}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22option\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22mobile_mode\x22:\x20\x22LIST\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22desk_mode\x22:\x20\x22GRID\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22use_row_checker\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22pages\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2020,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2050,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20100,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20300\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22view_mode\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22GRID\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22LIST\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22CARD\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22sorters\x22:\x20[\x0a{{SortColumns}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20]\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x22row\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22multiple_select\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22click\x22:\x20\x22select-row-toggle\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20},\x0a\x20\x20\x22search\x22:\x20[\x0a{{SearchColumns}}\x0a\x20\x20]\x0a}\x0a','utf8','Operato\x20Tool\x20Create\x20Menu','code','\x22,\x22operator\x22:\x20\x22','2373861oLHics','{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22','hex','map','toString','template','scenario','creator','createSortCols','\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}','default','design:type','createdAt','from','updated_at','@things-factory/menu-base','Ctx','1647752ZtiBre'];a0_0x94c2=function(){return _0x4b8705;};return a0_0x94c2();}(function(_0x3b816a,_0x504013){const _0x406519=a0_0x4b4d,_0x4336b9=_0x3b816a();while(!![]){try{const _0x217613=parseInt(_0x406519(0x111))/0x1+parseInt(_0x406519(0xf5))/0x2+parseInt(_0x406519(0xcc))/0x3+parseInt(_0x406519(0xbc))/0x4+parseInt(_0x406519(0x10c))/0x5*(-parseInt(_0x406519(0x110))/0x6)+parseInt(_0x406519(0xe4))/0x7+parseInt(_0x406519(0x115))/0x8*(-parseInt(_0x406519(0xc3))/0x9);if(_0x217613===_0x504013)break;else _0x4336b9['push'](_0x4336b9['shift']());}catch(_0x11eea6){_0x4336b9['push'](_0x4336b9['shift']());}}}(a0_0x94c2,0x9b7eb));Object[a0_0x552978(0x11d)](exports,a0_0x552978(0xfc),{'value':!0x0}),exports[a0_0x552978(0x10a)]=void 0x0;const tslib_1=require('tslib'),type_graphql_1=require(a0_0x552978(0x119)),resource_base_1=require(a0_0x552978(0xd2)),menu_base_1=require(a0_0x552978(0xf3)),tool_permission_1=require(a0_0x552978(0xac)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x552978(0xdd)),{plural:plural}=require(a0_0x552978(0x116)),crypto_1=tslib_1[a0_0x552978(0xfd)](require('crypto'));let OperatoToolCreateMenu=class{async[a0_0x552978(0x11c)](_0x28ba2f,_0x5b8cae,_0x241adb){const _0x49869b=a0_0x552978,{domain:_0x11b468,user:_0x743ac0,tx:_0x59bfb9}=_0x241adb[_0x49869b(0x10e)];await(0x0,tool_permission_1[_0x49869b(0xa4)])('',_0x241adb);const _0xf2aea1=await _0x59bfb9['getRepository'](resource_base_1['Entity'])[_0x49869b(0xc6)]({'where':{'domain':{'id':_0x11b468['id']},'id':_0x28ba2f}}),_0x8e8964=await _0x59bfb9['getRepository'](resource_base_1[_0x49869b(0x11b)])['find']({'where':{'domain':{'id':_0x11b468['id']},'entity':{'id':_0xf2aea1['id']}}});let {name:_0x3e50e5=''}=_0xf2aea1||{},_0x1da59a=kebabCase(_0x3e50e5),_0x59d5ea=modelTemplate[_0x49869b(0xbf)](/{{pascalCase name}}/g,startCase(camelCase(_0x3e50e5))[_0x49869b(0xbf)](/ /g,''))[_0x49869b(0xbf)](/{{camelCase name}}/g,camelCase(_0x3e50e5))[_0x49869b(0xbf)](/{{snakeCase name}}/g,snakeCase(_0x3e50e5))[_0x49869b(0xbf)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x3e50e5)))['replace'](/ /g,''))['replace'](/{{pluralCamelCase name}}/g,camelCase(plural(_0x3e50e5)))[_0x49869b(0xbf)](/{{name}}/g,_0x3e50e5),_0xdb4d80='';_0x49869b(0xf8)==_0xf2aea1[_0x49869b(0xc1)]?_0xdb4d80=_0x49869b(0xc7):_0x49869b(0xa5)==_0xf2aea1[_0x49869b(0xc1)]&&(_0xdb4d80=_0x49869b(0xab)),_0x59d5ea=_0x59d5ea['replace'](/{{HistoryButton}}/g,_0xdb4d80);let _0x3b0a6f=this['createSortCols'](_0x8e8964);_0x59d5ea=_0x59d5ea[_0x49869b(0xbf)](/{{SortColumns}}/g,_0x3b0a6f['join'](','));let _0x4c5b47=this[_0x49869b(0xcb)](_0x8e8964);_0x59d5ea=_0x59d5ea[_0x49869b(0xbf)](/{{SearchColumns}}/g,_0x4c5b47[_0x49869b(0xff)](','));let _0x1db336=this['createGridColumns'](_0x8e8964);return _0x59d5ea=_0x59d5ea['replace'](/{{GridColumns}}/g,_0x1db336['join'](',')),_0x59d5ea=this[_0x49869b(0x105)](_0x59d5ea),await this[_0x49869b(0xd6)](_0x59bfb9,_0x11b468,_0x743ac0,_0x5b8cae,_0x1da59a,_0x59d5ea),!0x0;}[a0_0x552978(0xa7)](_0x6e4e43){const _0x288e61=a0_0x552978;return _0x6e4e43['filter'](_0x1a512e=>'id'!=_0x1a512e[_0x288e61(0xa8)]&&_0x1a512e[_0x288e61(0x104)]>0x0)[_0x288e61(0xcd)](function(_0x2f0584,_0x3fef04){const _0x1b9c94=_0x288e61;return _0x2f0584[_0x1b9c94(0x104)]-_0x3fef04[_0x1b9c94(0x104)];})[_0x288e61(0xe7)](_0x415bc5=>{const _0xb4b10b=_0x288e61;let {gridEditor:_0x246356=_0xb4b10b(0x107),name:_0x5224c1,term:_0x16977e,gridWidth:_0x4b6ec6=0x0,gridAlign:_0x4d1a99=_0xb4b10b(0x10d),nullable:_0x388af1=!0x1}=_0x415bc5;if(null==_0x246356&&(_0x246356=_0xb4b10b(0x107)),null==_0x4d1a99&&(_0x4d1a99=_0xb4b10b(0x10d)),_0xb4b10b(0xd5)==_0x5224c1||_0xb4b10b(0xb6)==_0x5224c1)return _0x5224c1=_0xb4b10b(0xd5)==_0x5224c1?_0xb4b10b(0xb2):_0xb4b10b(0xeb),_0xb4b10b(0xe5)+_0x5224c1+'\x22,\x22header\x22:\x20\x22'+_0x5224c1+'\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}';if(_0xb4b10b(0xf2)==_0x5224c1||_0xb4b10b(0xb0)==_0x5224c1)return'{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22'+(_0xb4b10b(0xf2)==_0x5224c1?_0xb4b10b(0x118):_0xb4b10b(0xf0))+_0xb4b10b(0xaa)+_0x5224c1+_0xb4b10b(0xed);let _0x365286=_0xb4b10b(0xc4)!=_0x246356&&'hidden'!=_0x246356,_0x99d96f=_0xb4b10b(0x10f)==_0x246356;0x1!=_0x99d96f&&0x0!=_0x365286||(_0x246356='string');let _0x1063b6='{\x22type\x22:\x20\x22'+_0x246356+_0xb4b10b(0xc8)+camelCase(_0x5224c1)+'\x22,\x22header\x22:\x20\x22'+_0x16977e+'\x22,\x22hidden\x22:'+_0x99d96f+_0xb4b10b(0xcf)+_0x365286+_0xb4b10b(0xd9)+!_0x388af1+_0xb4b10b(0xb1)+_0x4d1a99+_0xb4b10b(0xc5)+_0x4b6ec6+_0xb4b10b(0xd7);return _0xb4b10b(0xe2)==_0x415bc5[_0xb4b10b(0xae)]&&(_0x1063b6+=_0xb4b10b(0xfe)+_0x415bc5['refName']+'\x22}'),_0xb4b10b(0xea)==_0x415bc5[_0xb4b10b(0xae)]&&(_0x1063b6+=_0xb4b10b(0xa6)+_0x415bc5[_0xb4b10b(0xb7)]+'\x22}'),_0xb4b10b(0xd1)==_0x415bc5[_0xb4b10b(0xae)]&&(_0x1063b6+=_0xb4b10b(0xbd)+camelCase(plural(_0x415bc5[_0xb4b10b(0xb7)]))+_0xb4b10b(0x11a)),_0x1063b6+='}',_0x1063b6;});}[a0_0x552978(0xcb)](_0x3aabcb){const _0x3e9c29=a0_0x552978;return _0x3aabcb[_0x3e9c29(0x10b)](_0x533236=>_0x533236['searchRank']>0x0)[_0x3e9c29(0xcd)](function(_0x476727,_0x47df01){return _0x476727['searchRank']-_0x47df01['searchRank'];})['map'](_0x58f271=>{const _0x526240=_0x3e9c29;let _0x158cb5=_0x58f271[_0x526240(0x101)];return _0x526240(0x10b)==_0x158cb5?'\x22'+camelCase(_0x58f271[_0x526240(0xa8)])+'\x22':(_0x158cb5||(_0x158cb5='eq'),_0x526240(0xce)+camelCase(_0x58f271[_0x526240(0xa8)])+_0x526240(0xe3)+_0x158cb5+'\x22}');});}[a0_0x552978(0xec)](_0x17a097){const _0x4d8773=a0_0x552978;return _0x17a097['filter'](_0x30ad5a=>_0x30ad5a['sortRank']>0x0)[_0x4d8773(0xcd)](function(_0x15f87b,_0x4768d7){const _0x21d8dd=_0x4d8773;return _0x15f87b[_0x21d8dd(0x106)]-_0x4768d7['sortRank'];})[_0x4d8773(0xe7)](_0x2ca85b=>_0x4d8773(0x100)+camelCase(_0x2ca85b[_0x4d8773(0xa8)])+'\x22,\x22desc\x22:'+_0x2ca85b[_0x4d8773(0xaf)]+'}');}async[a0_0x552978(0xd6)](_0xd8140b,_0x4d700b,_0x184582,_0x296d31,_0x4ce8fc,_0x47ff67){const _0x192ab2=a0_0x552978;let _0x28f320=await _0xd8140b[_0x192ab2(0xdc)](menu_base_1[_0x192ab2(0xda)])[_0x192ab2(0xc6)]({'where':{'domain':{'id':_0x4d700b['id']},'id':_0x296d31}}),_0x38f748=(await _0xd8140b[_0x192ab2(0xdc)](menu_base_1[_0x192ab2(0xda)])[_0x192ab2(0x11e)](_0x192ab2(0x102)+_0x296d31+_0x192ab2(0x103)+_0x296d31+'\x27'))[0x0]['rank']+0xa,_0x4e89eb=new menu_base_1['Menu']();_0x4e89eb[_0x192ab2(0xa8)]=_0x4ce8fc,_0x4e89eb[_0x192ab2(0x114)]='SCREEN',_0x4e89eb[_0x192ab2(0xb4)]='meta-grist-page',_0x4e89eb[_0x192ab2(0xf9)]=_0x38f748,_0x4e89eb[_0x192ab2(0x108)]=!0x1,_0x4e89eb[_0x192ab2(0xc0)]=_0x4ce8fc,_0x4e89eb[_0x192ab2(0xe9)]=_0x47ff67,_0x4e89eb[_0x192ab2(0xf6)]=_0x192ab2(0xa9),_0x4e89eb[_0x192ab2(0xf7)]=_0x28f320,await _0xd8140b[_0x192ab2(0xdc)](menu_base_1[_0x192ab2(0xda)])[_0x192ab2(0xd0)](Object[_0x192ab2(0xd4)](Object[_0x192ab2(0xd4)]({},_0x4e89eb),{'domain':_0x4d700b,'creator':_0x184582,'updater':_0x184582}));}['enc'](_0x48a814){const _0x1a5605=a0_0x552978;let _0x52cb2e=JSON[_0x1a5605(0xfa)](_0x48a814)[_0x1a5605(0xc2)](/(.{100})/)[_0x1a5605(0x10b)](_0x4e1f27=>_0x4e1f27),_0x510bd4=[_0x1a5605(0xd8),_0x1a5605(0xbb),_0x1a5605(0xbe),'aes-256-cfb8',_0x1a5605(0x112),_0x1a5605(0xba),'aes-256-ctr',_0x1a5605(0xca)],_0x16cf26=crypto_1[_0x1a5605(0xee)][_0x1a5605(0x109)](0x20)[_0x1a5605(0xe8)](_0x1a5605(0xe6)),_0x5d91f9=Buffer[_0x1a5605(0xf1)](_0x16cf26,_0x1a5605(0xe6)),_0x46f67c=_0x16cf26['substring'](0x0,0x10),_0x83210b=['',_0x46f67c,_0x46f67c,_0x46f67c,_0x46f67c,_0x46f67c,_0x46f67c,_0x46f67c],_0xdb384d=0x0,_0x417f7a=[];_0x417f7a[_0x1a5605(0x117)](_0x16cf26);for(var _0x15bf92=0x0;_0x15bf92<_0x52cb2e['length'];_0x15bf92++,_0xdb384d++){_0xdb384d==_0x510bd4['length']&&(_0xdb384d=0x0);let _0x43d6b0=crypto_1[_0x1a5605(0xee)][_0x1a5605(0xc9)](_0x510bd4[_0xdb384d],_0x5d91f9,_0x83210b[_0xdb384d]),_0x57fad4=_0x43d6b0[_0x1a5605(0xb3)](_0x52cb2e[_0x15bf92],_0x1a5605(0xe0),_0x1a5605(0xe6));_0x57fad4+=_0x43d6b0['final'](_0x1a5605(0xe6)),_0x417f7a[_0x1a5605(0x117)](_0x57fad4);}return _0x417f7a['join'](_0x1a5605(0xb5));}};function a0_0x4b4d(_0x3e0c41,_0x374879){const _0x94c214=a0_0x94c2();return a0_0x4b4d=function(_0x4b4da8,_0x3162a6){_0x4b4da8=_0x4b4da8-0xa3;let _0x5190c8=_0x94c214[_0x4b4da8];return _0x5190c8;},a0_0x4b4d(_0x3e0c41,_0x374879);}tslib_1[a0_0x552978(0xb9)]([(0x0,type_graphql_1['Directive'])('@transaction'),(0x0,type_graphql_1['Mutation'])(_0x32ac79=>Boolean,{'description':a0_0x552978(0xe1)}),tslib_1['__param'](0x0,(0x0,type_graphql_1[a0_0x552978(0xb8)])('id')),tslib_1[a0_0x552978(0xde)](0x1,(0x0,type_graphql_1[a0_0x552978(0xb8)])(a0_0x552978(0xdb))),tslib_1[a0_0x552978(0xde)](0x2,(0x0,type_graphql_1[a0_0x552978(0xf4)])()),tslib_1[a0_0x552978(0xd3)](a0_0x552978(0xef),Function),tslib_1[a0_0x552978(0xd3)](a0_0x552978(0xa3),[String,String,Object]),tslib_1[a0_0x552978(0xd3)](a0_0x552978(0xad),Promise)],OperatoToolCreateMenu[a0_0x552978(0xfb)],'toolCreateMenu',null),OperatoToolCreateMenu=tslib_1[a0_0x552978(0xb9)]([(0x0,type_graphql_1[a0_0x552978(0x113)])()],OperatoToolCreateMenu),exports[a0_0x552978(0x10a)]=OperatoToolCreateMenu;const modelTemplate=a0_0x552978(0xdf);
|
|
1
|
+
'use strict';const a0_0x16fb82=a0_0x35bd;(function(_0x8a8323,_0x3b653f){const _0x4feffc=a0_0x35bd,_0x5dd3bb=_0x8a8323();while(!![]){try{const _0x4a41f1=-parseInt(_0x4feffc(0x203))/0x1+parseInt(_0x4feffc(0x218))/0x2*(-parseInt(_0x4feffc(0x265))/0x3)+parseInt(_0x4feffc(0x254))/0x4*(parseInt(_0x4feffc(0x264))/0x5)+parseInt(_0x4feffc(0x228))/0x6+parseInt(_0x4feffc(0x263))/0x7*(-parseInt(_0x4feffc(0x20c))/0x8)+parseInt(_0x4feffc(0x248))/0x9+parseInt(_0x4feffc(0x200))/0xa;if(_0x4a41f1===_0x3b653f)break;else _0x5dd3bb['push'](_0x5dd3bb['shift']());}catch(_0x17fbea){_0x5dd3bb['push'](_0x5dd3bb['shift']());}}}(a0_0x3403,0x9db0f));Object['defineProperty'](exports,a0_0x16fb82(0x250),{'value':!0x0}),exports[a0_0x16fb82(0x25d)]=void 0x0;function a0_0x3403(){const _0x2ca7c8=['creator_id','\x22,\x22width\x22:','meta-grist-page','hidden','find','Entity','toString','createSearchCols','parent','creator','from','name','Menu','\x22,\x22header\x22:\x20\x22','utf8','Directive','createdAt','358191RpYYvT','getRepository',',\x22mandatory\x22:\x20','gridRank','\x22,\x22name\x22:\x20\x22','./../tool-secret/tool-permission','@transaction','SCREEN','__esModule','\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22basic\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22label\x22:\x20\x22data_history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22icon\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22logic\x22:\x20\x22history_copy\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20','rank','hex','4262744NnlHzn','routing','{\x22name\x22:\x20\x22','length','stringify','Operato\x20Tool\x20Create\x20Menu','template','__importDefault','\x27\x20or\x20id\x20=\x20\x27','OperatoToolCreateMenu','scenario',',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22','sortRank','final','{\x22name\x22:\x22','3095533UMpJpW','5TMJkEh','498REAqxj','checkStudioTemplateIsOverLimit','design:paramtypes',',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22','update','searchOper','__metadata','design:type','lodash','select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27','{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22','\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','randomBytes',',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22','join','entity','{\x22type\x22:\x20\x22','2484870ZSrOZd','\x20,\x22exportable\x22:\x20true','default','567939DdvIDt','\x22,\x22hidden\x22:','parent_menu_id','\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}','@things-factory/menu-base','aes-256-cfb8','design:returntype','updater_id','map','8xEEgmi','Mutation','aes-256-cbc','\x22,\x22operator\x22:\x20\x22','hiddenFlag','state','category','\x20,\x22editable\x22:\x20','updated_at','__decorate','reverseSort','updatedAt','1426miPKfL',',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22','filter','refType','sort','replace','enc','dataProp','__param','searchRank','Arg','findOne','split','aes-256-ecb','{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22','updater','2522682hcfauk','h1z0q9i9x7q6','save','createMenuData','string','toolCreateMenu','left','aes-256-cfb','assign','refName','\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','@things-factory/meta-ui/client/pages/meta-grist-page','EntityColumn','aes256','crypto'];a0_0x3403=function(){return _0x2ca7c8;};return a0_0x3403();}function a0_0x35bd(_0x339d1a,_0x2390d3){const _0x34038d=a0_0x3403();return a0_0x35bd=function(_0x35bdbe,_0x18264b){_0x35bdbe=_0x35bdbe-0x1f0;let _0x17046a=_0x34038d[_0x35bdbe];return _0x17046a;},a0_0x35bd(_0x339d1a,_0x2390d3);}const tslib_1=require('tslib'),type_graphql_1=require('type-graphql'),resource_base_1=require('@things-factory/resource-base'),menu_base_1=require(a0_0x16fb82(0x207)),tool_permission_1=require(a0_0x16fb82(0x24d)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x16fb82(0x1f7)),{plural:plural}=require('pluralize'),crypto_1=tslib_1[a0_0x16fb82(0x25b)](require(a0_0x16fb82(0x236)));let OperatoToolCreateMenu=class{async[a0_0x16fb82(0x22d)](_0x977e47,_0x253d2c,_0x2b6f2a){const _0x534add=a0_0x16fb82,{domain:_0x5dd678,user:_0x2b94b9,tx:_0x4f9ae1}=_0x2b6f2a[_0x534add(0x211)];await(0x0,tool_permission_1[_0x534add(0x1f0)])('',_0x2b6f2a);const _0x43c500=await _0x4f9ae1['getRepository'](resource_base_1[_0x534add(0x23c)])[_0x534add(0x223)]({'where':{'domain':{'id':_0x5dd678['id']},'id':_0x977e47}}),_0x842501=await _0x4f9ae1[_0x534add(0x249)](resource_base_1[_0x534add(0x234)])[_0x534add(0x23b)]({'where':{'domain':{'id':_0x5dd678['id']},'entity':{'id':_0x43c500['id']}}});let {name:_0x33f7f7=''}=_0x43c500||{},_0x2d0bdf=kebabCase(_0x33f7f7),_0x43ca4c=modelTemplate[_0x534add(0x21d)](/{{pascalCase name}}/g,startCase(camelCase(_0x33f7f7))[_0x534add(0x21d)](/ /g,''))[_0x534add(0x21d)](/{{camelCase name}}/g,camelCase(_0x33f7f7))[_0x534add(0x21d)](/{{snakeCase name}}/g,snakeCase(_0x33f7f7))[_0x534add(0x21d)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x33f7f7)))[_0x534add(0x21d)](/ /g,''))[_0x534add(0x21d)](/{{pluralCamelCase name}}/g,camelCase(plural(_0x33f7f7)))[_0x534add(0x21d)](/{{name}}/g,_0x33f7f7),_0x4d8af0='';'JSON'==_0x43c500[_0x534add(0x21f)]?_0x4d8af0=_0x534add(0x232):'COPY'==_0x43c500[_0x534add(0x21f)]&&(_0x4d8af0=_0x534add(0x251)),_0x43ca4c=_0x43ca4c[_0x534add(0x21d)](/{{HistoryButton}}/g,_0x4d8af0);let _0x3893ac=this['createSortCols'](_0x842501);_0x43ca4c=_0x43ca4c[_0x534add(0x21d)](/{{SortColumns}}/g,_0x3893ac['join'](','));let _0x303c0f=this[_0x534add(0x23e)](_0x842501);_0x43ca4c=_0x43ca4c[_0x534add(0x21d)](/{{SearchColumns}}/g,_0x303c0f['join'](','));let _0x2d614e=this['createGridColumns'](_0x842501);return _0x43ca4c=_0x43ca4c[_0x534add(0x21d)](/{{GridColumns}}/g,_0x2d614e[_0x534add(0x1fd)](',')),_0x43ca4c=this[_0x534add(0x21e)](_0x43ca4c),await this[_0x534add(0x22b)](_0x4f9ae1,_0x5dd678,_0x2b94b9,_0x253d2c,_0x2d0bdf,_0x43ca4c),!0x0;}['createGridColumns'](_0x3988a5){const _0x2e61c3=a0_0x16fb82;return _0x3988a5[_0x2e61c3(0x21a)](_0x56ba4a=>'id'!=_0x56ba4a[_0x2e61c3(0x242)]&&_0x56ba4a[_0x2e61c3(0x24b)]>0x0)[_0x2e61c3(0x21c)](function(_0x8214a7,_0x53d6b9){const _0x11d8af=_0x2e61c3;return _0x8214a7['gridRank']-_0x53d6b9[_0x11d8af(0x24b)];})[_0x2e61c3(0x20b)](_0x28ad81=>{const _0x94a06c=_0x2e61c3;let {gridEditor:_0x247fa7=_0x94a06c(0x22c),name:_0x38606b,term:_0x21aa7c,gridWidth:_0x52e563=0x0,gridAlign:_0x29f862=_0x94a06c(0x22e),nullable:_0x5592dc=!0x1}=_0x28ad81;if(null==_0x247fa7&&(_0x247fa7=_0x94a06c(0x22c)),null==_0x29f862&&(_0x29f862='left'),'updater_id'==_0x38606b||_0x94a06c(0x237)==_0x38606b)return _0x38606b=_0x94a06c(0x20a)==_0x38606b?_0x94a06c(0x227):_0x94a06c(0x240),_0x94a06c(0x1f9)+_0x38606b+'\x22,\x22header\x22:\x20\x22'+_0x38606b+_0x94a06c(0x206);if(_0x94a06c(0x214)==_0x38606b||'created_at'==_0x38606b)return _0x94a06c(0x226)+(_0x94a06c(0x214)==_0x38606b?_0x94a06c(0x217):_0x94a06c(0x247))+_0x94a06c(0x244)+_0x38606b+'\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}';let _0x3a164f='readonly'!=_0x247fa7&&'hidden'!=_0x247fa7,_0x4e3822=_0x94a06c(0x23a)==_0x247fa7;0x1!=_0x4e3822&&0x0!=_0x3a164f||(_0x247fa7=_0x94a06c(0x22c));let _0x2bc63a=_0x94a06c(0x1ff)+_0x247fa7+_0x94a06c(0x24c)+camelCase(_0x38606b)+_0x94a06c(0x244)+_0x21aa7c+_0x94a06c(0x204)+_0x4e3822+_0x94a06c(0x213)+_0x3a164f+_0x94a06c(0x24a)+!_0x5592dc+_0x94a06c(0x25f)+_0x29f862+_0x94a06c(0x238)+_0x52e563+_0x94a06c(0x201);return'code'==_0x28ad81[_0x94a06c(0x21b)]&&(_0x2bc63a+=_0x94a06c(0x219)+_0x28ad81[_0x94a06c(0x231)]+'\x22}'),_0x94a06c(0x25e)==_0x28ad81[_0x94a06c(0x21b)]&&(_0x2bc63a+=_0x94a06c(0x1fc)+_0x28ad81[_0x94a06c(0x231)]+'\x22}'),_0x94a06c(0x1fe)==_0x28ad81[_0x94a06c(0x21b)]&&(_0x2bc63a+=_0x94a06c(0x1f2)+camelCase(plural(_0x28ad81[_0x94a06c(0x231)]))+'\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}'),_0x2bc63a+='}',_0x2bc63a;});}['createSearchCols'](_0x1f9fc2){const _0x22497f=a0_0x16fb82;return _0x1f9fc2[_0x22497f(0x21a)](_0x9a8167=>_0x9a8167[_0x22497f(0x221)]>0x0)[_0x22497f(0x21c)](function(_0x18ddc5,_0x4efa12){const _0x103c7d=_0x22497f;return _0x18ddc5[_0x103c7d(0x221)]-_0x4efa12[_0x103c7d(0x221)];})[_0x22497f(0x20b)](_0x4cb160=>{const _0x244fdd=_0x22497f;let _0xefcbab=_0x4cb160[_0x244fdd(0x1f4)];return _0x244fdd(0x21a)==_0xefcbab?'\x22'+camelCase(_0x4cb160[_0x244fdd(0x242)])+'\x22':(_0xefcbab||(_0xefcbab='eq'),_0x244fdd(0x256)+camelCase(_0x4cb160[_0x244fdd(0x242)])+_0x244fdd(0x20f)+_0xefcbab+'\x22}');});}['createSortCols'](_0x20c15f){const _0x1dd0cb=a0_0x16fb82;return _0x20c15f[_0x1dd0cb(0x21a)](_0x3bbda6=>_0x3bbda6['sortRank']>0x0)[_0x1dd0cb(0x21c)](function(_0x511732,_0x19e08c){const _0x1a392b=_0x1dd0cb;return _0x511732[_0x1a392b(0x260)]-_0x19e08c[_0x1a392b(0x260)];})[_0x1dd0cb(0x20b)](_0x346acb=>_0x1dd0cb(0x262)+camelCase(_0x346acb[_0x1dd0cb(0x242)])+'\x22,\x22desc\x22:'+_0x346acb[_0x1dd0cb(0x216)]+'}');}async[a0_0x16fb82(0x22b)](_0x420d97,_0x2d35b7,_0x1ad413,_0x5cac5a,_0x168249,_0x5b91f9){const _0x39e6e4=a0_0x16fb82;let _0x3ff292=await _0x420d97[_0x39e6e4(0x249)](menu_base_1[_0x39e6e4(0x243)])['findOne']({'where':{'domain':{'id':_0x2d35b7['id']},'id':_0x5cac5a}}),_0x3e48c7=(await _0x420d97[_0x39e6e4(0x249)](menu_base_1[_0x39e6e4(0x243)])['query'](_0x39e6e4(0x1f8)+_0x5cac5a+_0x39e6e4(0x25c)+_0x5cac5a+'\x27'))[0x0]['rank']+0xa,_0x5526f3=new menu_base_1['Menu']();_0x5526f3[_0x39e6e4(0x242)]=_0x168249,_0x5526f3['menuType']=_0x39e6e4(0x24f),_0x5526f3[_0x39e6e4(0x212)]=_0x39e6e4(0x239),_0x5526f3[_0x39e6e4(0x252)]=_0x3e48c7,_0x5526f3[_0x39e6e4(0x210)]=!0x1,_0x5526f3[_0x39e6e4(0x255)]=_0x168249,_0x5526f3[_0x39e6e4(0x25a)]=_0x5b91f9,_0x5526f3['resourceUrl']=_0x39e6e4(0x233),_0x5526f3[_0x39e6e4(0x23f)]=_0x3ff292,await _0x420d97[_0x39e6e4(0x249)](menu_base_1[_0x39e6e4(0x243)])[_0x39e6e4(0x22a)](Object['assign'](Object[_0x39e6e4(0x230)]({},_0x5526f3),{'domain':_0x2d35b7,'creator':_0x1ad413,'updater':_0x1ad413}));}['enc'](_0x1698e2){const _0x5ade5d=a0_0x16fb82;let _0x47362a=JSON[_0x5ade5d(0x258)](_0x1698e2)[_0x5ade5d(0x224)](/(.{100})/)['filter'](_0x5b48de=>_0x5b48de),_0x24556b=[_0x5ade5d(0x225),_0x5ade5d(0x20e),_0x5ade5d(0x22f),_0x5ade5d(0x208),'aes-256-cfb1','aes-256-ofb','aes-256-ctr',_0x5ade5d(0x235)],_0x22b30c=crypto_1[_0x5ade5d(0x202)][_0x5ade5d(0x1fb)](0x20)[_0x5ade5d(0x23d)](_0x5ade5d(0x253)),_0x2f7d9c=Buffer[_0x5ade5d(0x241)](_0x22b30c,_0x5ade5d(0x253)),_0x270734=_0x22b30c['substring'](0x0,0x10),_0x582076=['',_0x270734,_0x270734,_0x270734,_0x270734,_0x270734,_0x270734,_0x270734],_0x240cfe=0x0,_0x39ee4a=[];_0x39ee4a['push'](_0x22b30c);for(var _0x41db51=0x0;_0x41db51<_0x47362a[_0x5ade5d(0x257)];_0x41db51++,_0x240cfe++){_0x240cfe==_0x24556b[_0x5ade5d(0x257)]&&(_0x240cfe=0x0);let _0x478a2e=crypto_1['default']['createCipheriv'](_0x24556b[_0x240cfe],_0x2f7d9c,_0x582076[_0x240cfe]),_0x46ef77=_0x478a2e[_0x5ade5d(0x1f3)](_0x47362a[_0x41db51],_0x5ade5d(0x245),_0x5ade5d(0x253));_0x46ef77+=_0x478a2e[_0x5ade5d(0x261)]('hex'),_0x39ee4a['push'](_0x46ef77);}return _0x39ee4a[_0x5ade5d(0x1fd)](_0x5ade5d(0x229));}};tslib_1[a0_0x16fb82(0x215)]([(0x0,type_graphql_1[a0_0x16fb82(0x246)])(a0_0x16fb82(0x24e)),(0x0,type_graphql_1[a0_0x16fb82(0x20d)])(_0x42bf22=>Boolean,{'description':a0_0x16fb82(0x259)}),tslib_1[a0_0x16fb82(0x220)](0x0,(0x0,type_graphql_1['Arg'])('id')),tslib_1['__param'](0x1,(0x0,type_graphql_1[a0_0x16fb82(0x222)])(a0_0x16fb82(0x205))),tslib_1[a0_0x16fb82(0x220)](0x2,(0x0,type_graphql_1['Ctx'])()),tslib_1['__metadata'](a0_0x16fb82(0x1f6),Function),tslib_1[a0_0x16fb82(0x1f5)](a0_0x16fb82(0x1f1),[String,String,Object]),tslib_1[a0_0x16fb82(0x1f5)](a0_0x16fb82(0x209),Promise)],OperatoToolCreateMenu['prototype'],'toolCreateMenu',null),OperatoToolCreateMenu=tslib_1[a0_0x16fb82(0x215)]([(0x0,type_graphql_1['Resolver'])()],OperatoToolCreateMenu),exports['OperatoToolCreateMenu']=OperatoToolCreateMenu;const modelTemplate=a0_0x16fb82(0x1fa);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x25b17b=a0_0x8dfe;(function(_0x130bda,_0xafc0a4){const _0x26d5c3=a0_0x8dfe,_0x26a3d7=_0x130bda();while(!![]){try{const _0x1c6351=parseInt(_0x26d5c3(0x1b8))/0x1+-parseInt(_0x26d5c3(0x1a9))/0x2*(parseInt(_0x26d5c3(0x15b))/0x3)+-parseInt(_0x26d5c3(0x160))/0x4+parseInt(_0x26d5c3(0x14e))/0x5*(parseInt(_0x26d5c3(0x144))/0x6)+parseInt(_0x26d5c3(0x1b3))/0x7*(parseInt(_0x26d5c3(0x188))/0x8)+-parseInt(_0x26d5c3(0x16d))/0x9*(parseInt(_0x26d5c3(0x143))/0xa)+-parseInt(_0x26d5c3(0x1be))/0xb*(-parseInt(_0x26d5c3(0x1ba))/0xc);if(_0x1c6351===_0xafc0a4)break;else _0x26a3d7['push'](_0x26a3d7['shift']());}catch(_0x2f61d2){_0x26a3d7['push'](_0x26a3d7['shift']());}}}(a0_0x126f,0x26ae5));Object['defineProperty'](exports,a0_0x25b17b(0x1c0),{'value':!0x0}),exports[a0_0x25b17b(0x167)]=void 0x0;const tslib_1=require(a0_0x25b17b(0x1c6)),type_graphql_1=require(a0_0x25b17b(0x17f)),shell_1=require(a0_0x25b17b(0x192)),resource_base_1=require('@things-factory/resource-base'),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x25b17b(0x157)),{plural:plural}=require('pluralize'),fs=require('fs');function a0_0x126f(){const _0x53385b=['colType','getProjectRootPath','length','find','createHistoryServiceFiles','push','-history-query.ts','utf8','140330ikfwHG','449262cqiJPs','\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}List\x20}\x20from\x20\x27./{{name}}-type\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Query\x20{\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20fetch\x20a\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20return\x20await\x20getRepository({{pascalCase\x20name}}).findOne({\x0a\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20}\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}List,\x20{\x20description:\x20\x27To\x20fetch\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{pluralCamelCase\x20name}}(@Args()\x20params:\x20ListParam,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}List>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20queryBuilder\x20=\x20getQueryBuilderFromListParams({\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20params,\x0a\x20\x20\x20\x20\x20\x20repository:\x20await\x20getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20const\x20convertedParams\x20=\x20convertListParams(params,\x20domain.id)\x0a\x20\x20\x20\x20const\x20[items,\x20total]\x20=\x20await\x20queryBuilder.getManyAndCount()\x0a\x0a\x20\x20\x20\x20return\x20{\x20items,\x20total\x20}\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20Domain)\x0a\x20\x20async\x20domain(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<Domain>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(Domain).findOneBy({id:{{camelCase\x20name}}.domainId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20updater(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.updaterId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20creator(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.creatorId})\x0a\x20\x20}\x0a}\x0a','float','domain_id','\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryQuery\x20}\x20from\x20\x27./{{name}}-history-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryEntitySubscriber\x20}\x20from\x20\x27./event-subscriber\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}},\x20{{pascalCase\x20name}}History]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}HistoryQuery,\x20{{pascalCase\x20name}}Mutation]\x0aexport\x20const\x20subscribers\x20=\x20[{{pascalCase\x20name}}HistoryEntitySubscriber]\x0a\x0a','number','existsPath','__decorate','pluralPascalCaseName','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','5UuOywm','replace','string','/service','\x27,\x20type:\x20\x27','includes','mkdirSync','uniqRank','COPY','lodash','/packages','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','/server/service/','15IQGxoP','{{camelCase\x20name}}.','creator_id','pascalCaseName','replaceNamesMap','955412KILxfR','\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201','__param','filter','writeFile','export\x20*\x20from\x20\x27./','JSON','OperatoToolCreateService','integer','packages','\x0aimport\x20{\x20EventSubscriber\x20}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20HistoryEntitySubscriber\x20}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20getRepository\x20}\x20from\x20\x27@things-factory/shell\x27\x0a\x0a@EventSubscriber()\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryEntitySubscriber\x20extends\x20HistoryEntitySubscriber<{{pascalCase\x20name}},{{pascalCase\x20name}}History>\x20{\x0a\x20\x20public\x20get\x20entity()\x20{\x0a\x20\x20\x20\x20return\x20{{pascalCase\x20name}}\x0a\x20\x20}\x0a\x0a\x20\x20public\x20get\x20historyEntity()\x20{\x0a\x20\x20\x20\x20return\x20{{pascalCase\x20name}}History\x0a\x20\x20}\x0a\x0a\x20\x20{{entityToJson}}\x0a\x0a\x20\x20async\x20beforeRemoveHistory(history:{{pascalCase\x20name}}History,entity:{{pascalCase\x20name}}){\x0a\x20\x20\x20\x20let\x20repo\x20=\x20getRepository({{pascalCase\x20name}}History);\x0a\x20\x20\x20\x20const\x20revNo\x20=\x20await\x20repo.createQueryBuilder()\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.select(\x27max(data_revision_no)\x27,\x20\x27rev_no\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.where(\x27domain_id\x20=\x20:domainId\x27,\x20{\x20domainId:\x20entity.domain.id\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.andWhere(\x27original_id\x20=\x20:originalId\x27,\x20{\x20originalId:\x20entity.id\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.getRawOne()\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20history.dataRevisionNo\x20=\x20revNo\x20?\x20revNo.rev_no\x20+\x201\x20:\x201;\x0a\x20\x20\x20\x20return\x20history;\x0a\x20\x20}\x0a}\x0a','\x20{\x20nullable:\x20','EntityColumn','27nmNLYt','/packages/','Resolver','join','EntitySubscribers,','PWD','colSize','date','-mutation.ts','decimal','/event-subscriber.ts','updated_at','writeFileSync','text','Float','@Field(','/*\x20ENTITIES\x20*/\x0a\x09...','split','type-graphql','tableName','timestamp\x20without\x20time\x20zone','createServicePath','pluralCamelCaseName','readFileSync','Entities,','__metadata','createHistoryEntityText','1207352PtgUeh','\x0a/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0a\x0a/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0a\x0aexport\x20const\x20entities\x20=\x20[\x20\x20\x0a\x20\x20/*\x20ENTITIES\x20*/\x0a]\x20\x0a\x0a\x0aexport\x20const\x20schema\x20=\x20{\x0a\x20\x20resolverClasses:\x20[\x0a\x20\x20\x20\x20/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x20\x20]\x20\x0a}\x0a\x0aexport\x20const\x20subscribers\x20=\x20[\x0a\x20\x20/*\x20SUBSCRIBERS\x20*/\x0a]\x0a','Date','created_at','import\x20{\x20entities\x20as\x20','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20Domain\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0a@Entity(\x27{{tableName}}\x27)\x0a{{indexAnn}}\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}\x20{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','nullable','columnToEntityColumn','Resolvers,','Entity','@things-factory/shell','createEntityText','dataProp','Int','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','updater_id','@Column({name:\x27','getColTxtType','getFieldType','\x0a\x20\x20','-history\x27','prototype','-history-type.ts','createNoHistoryServiceFiels','createDir','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','createTypeText','\x20})','Arg','camelCaseName','index.ts','...','\x0aimport\x20{\x20ObjectType,\x20Field,\x20InputType,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@InputType()\x0aexport\x20class\x20New{{pascalCase\x20name}}\x20{\x0a{{newTypeColumns}}\x0a}\x0a\x0a@InputType()\x0aexport\x20class\x20{{pascalCase\x20name}}Patch\x20{\x0a\x20\x20@Field(type\x20=>\x20ID,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20id?:\x20string\x0a\x0a{{patchTypeColumns}}\x0a\x0a\x20\x20@Field()\x0a\x20\x20cuFlag:\x20string\x0a}\x0a\x0a@ObjectType()\x0aexport\x20class\x20{{pascalCase\x20name}}List\x20{\x0a\x20\x20@Field(type\x20=>\x20[{{pascalCase\x20name}}])\x0a\x20\x20items:\x20{{pascalCase\x20name}}[]\x0a\x0a\x20\x20@Field(type\x20=>\x20Int)\x0a\x20\x20total:\x20number\x0a}\x0a','105086bGajvg','double','/server','toolCreateService','indexOf','state','design:returntype','datetime','env','name','7AsiloO','Operato\x20Tool\x20Create\x20Service','Ctx','map','\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryList\x20}\x20from\x20\x27./{{name}}-history-type\x27\x0a\x0a@Resolver({{pascalCase\x20name}}History)\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryQuery\x20{\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}History,\x20{\x20description:\x20\x27To\x20fetch\x20a\x20{{pascalCase\x20name}}History\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}History(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}History>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20return\x20await\x20getRepository({{pascalCase\x20name}}History).findOne({\x0a\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20}\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}HistoryList,\x20{\x20description:\x20\x27To\x20fetch\x20multiple\x20{{pluralPascalCase\x20name}}History\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}Histories(@Args()\x20params:\x20ListParam,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}HistoryList>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20queryBuilder\x20=\x20getQueryBuilderFromListParams({\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20params,\x0a\x20\x20\x20\x20\x20\x20repository:\x20await\x20getRepository({{pascalCase\x20name}}History)\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20const\x20[items,\x20total]\x20=\x20await\x20queryBuilder.getManyAndCount()\x0a\x0a\x20\x20\x20\x20return\x20{\x20items,\x20total\x20}\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20Domain)\x0a\x20\x20async\x20domain(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<Domain>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(Domain).findOneBy({id:{{camelCase\x20name}}History.domainId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20updater(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}History.updaterId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20creator(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}History.creatorId})\x0a\x20\x20}\x0a}\x0a','213493klweOn','Entities,\x20resolvers\x20as\x20','1260XJKjcG','existsSync','.ts','rank','27533DbCtSZ','-query.ts','__esModule','getRepository','long',',length:','Resolvers\x20}\x20from\x20\x27./','sort','tslib','type\x20=>','\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}}]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}Mutation]\x0a','\x0a\x20\x20public\x20createHistoryEntity(manager,\x20entity)\x20{\x0a\x20\x20\x20\x20let\x20history\x20=\x20manager.create(this.historyEntity,\x20entity);\x0a\x20\x20\x20\x20history.historyJson\x20=\x20JSON.stringify(entity);\x0a\x20\x20\x20\x20return\x20history;\x0a\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20','findOne'];a0_0x126f=function(){return _0x53385b;};return a0_0x126f();}let OperatoToolCreateService=class{async['toolCreateService'](_0x74ac54,_0x1b28e1){const _0xc3045b=a0_0x25b17b,{domain:_0x44ecb4}=_0x1b28e1[_0xc3045b(0x1ae)],_0x436413=await(0x0,shell_1[_0xc3045b(0x1c1)])(resource_base_1[_0xc3045b(0x191)])[_0xc3045b(0x13a)]({'where':{'id':_0x74ac54}}),_0xd9a736=await(0x0,shell_1[_0xc3045b(0x1c1)])(resource_base_1[_0xc3045b(0x16c)])[_0xc3045b(0x13e)]({'where':{'domain':{'id':_0x44ecb4['id']},'entity':{'id':_0x436413['id']}}});let {name:_0xeb0e84='',bundle:_0x5ace23=''}=_0x436413||{},_0x2c9736=this[_0xc3045b(0x13c)](),_0xb4e13c=kebabCase(_0xeb0e84);return await this[_0xc3045b(0x182)](_0x2c9736,_0x5ace23,_0xb4e13c),await this['createServiceFiles'](_0x2c9736,_0x5ace23,_0xeb0e84,_0xb4e13c,_0x436413,_0xd9a736),!0x0;}async['createServiceFiles'](_0x46c2eb,_0x5e736c,_0x1b3f49,_0x4b4935,_0x46e810,_0x3201e6){const _0x3487cc=a0_0x25b17b;let _0xe24e14={'name':_0x4b4935,'tableName':_0x46e810['tableName'],'pascalCaseName':startCase(camelCase(_0x1b3f49))[_0x3487cc(0x14f)](/ /g,''),'camelCaseName':camelCase(_0x1b3f49),'snakeCaseName':snakeCase(_0x1b3f49),'pluralPascalCaseName':startCase(camelCase(plural(_0x1b3f49)))[_0x3487cc(0x14f)](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x1b3f49))},_0x53bae5=_0x46c2eb+_0x3487cc(0x16e)+_0x5e736c+_0x3487cc(0x15a);[_0x3487cc(0x166),_0x3487cc(0x156)][_0x3487cc(0x153)](_0x46e810['dataProp'])?await this[_0x3487cc(0x13f)](_0x53bae5,_0x4b4935,_0x46e810,_0x3201e6,_0xe24e14):await this[_0x3487cc(0x19f)](_0x53bae5,_0x4b4935,_0x46e810,_0x3201e6,_0xe24e14);}async[a0_0x25b17b(0x13f)](_0x5d00ee,_0x333f64,_0x3f3e74,_0x3ffdf0,_0x45bf82){const _0x45a458=a0_0x25b17b;await this[_0x45a458(0x164)](_0x5d00ee+(_0x333f64+'/index.ts'),serviceHistoryIndex,_0x45bf82);let _0x125f4b=this[_0x45a458(0x193)](_0x3f3e74,_0x3ffdf0);await this[_0x45a458(0x164)](_0x5d00ee+(_0x333f64+'/'+_0x333f64+_0x45a458(0x1bc)),_0x125f4b,_0x45bf82),await this['writeFile'](_0x5d00ee+(_0x333f64+'/'+_0x333f64+_0x45a458(0x1bf)),serviceQuery,_0x45bf82),await this[_0x45a458(0x164)](_0x5d00ee+(_0x333f64+'/'+_0x333f64+_0x45a458(0x175)),serviceMutation,_0x45bf82);let _0x4d98c3=this['createTypeText'](_0x3ffdf0);await this[_0x45a458(0x164)](_0x5d00ee+(_0x333f64+'/'+_0x333f64+'-type.ts'),_0x4d98c3,_0x45bf82);let _0x5d0cfe=this[_0x45a458(0x187)](_0x3f3e74,_0x3ffdf0);await this[_0x45a458(0x164)](_0x5d00ee+(_0x333f64+'/'+_0x333f64+'-history.ts'),_0x5d0cfe,_0x45bf82);let _0x1a04f9='';'JSON'==_0x3f3e74[_0x45a458(0x194)]?(_0x1a04f9=_0x45a458(0x1c9),await this[_0x45a458(0x164)](_0x5d00ee+(_0x333f64+_0x45a458(0x177)),serviceEntitySubscriber,_0x45bf82)):_0x1a04f9='';let _0x3c49d6=serviceEntitySubscriber['replace'](/{{entityToJson}}/g,_0x1a04f9);await this[_0x45a458(0x164)](_0x5d00ee+(_0x333f64+_0x45a458(0x177)),_0x3c49d6,_0x45bf82),await this[_0x45a458(0x164)](_0x5d00ee+(_0x333f64+'/'+_0x333f64+_0x45a458(0x141)),serviceHistoryQuery,_0x45bf82),await this[_0x45a458(0x164)](_0x5d00ee+(_0x333f64+'/'+_0x333f64+_0x45a458(0x19e)),sereviceHistoryType,_0x45bf82);let _0x69c6c8=_0x5d00ee+_0x45a458(0x1a6);0x0==await this[_0x45a458(0x14a)](_0x69c6c8)&&await this[_0x45a458(0x164)](_0x69c6c8,allIndex,_0x45bf82);let _0x4bc520=await fs[_0x45a458(0x184)](_0x69c6c8,_0x45a458(0x142));_0x4bc520[_0x45a458(0x1ad)](_0x45a458(0x165)+_0x45bf82[_0x45a458(0x1b2)]+'/'+_0x45bf82['name']+_0x45a458(0x19c))<0x0&&(_0x4bc520=_0x4bc520[_0x45a458(0x14f)](/\/\* EXPORT ENTITY TYPES \*\//,_0x45a458(0x196)+_0x45bf82['name']+'/'+_0x45bf82[_0x45a458(0x1b2)]+'-history\x27')),_0x4bc520[_0x45a458(0x1ad)](_0x45a458(0x165)+_0x45bf82['name']+'/'+_0x45bf82[_0x45a458(0x1b2)]+'\x27')<0x0&&(_0x4bc520=_0x4bc520['replace'](/\/\* EXPORT ENTITY TYPES \*\//,_0x45a458(0x196)+_0x45bf82[_0x45a458(0x1b2)]+'/'+_0x45bf82[_0x45a458(0x1b2)]+'\x27')),_0x4bc520[_0x45a458(0x1ad)](_0x45a458(0x18c)+_0x45bf82[_0x45a458(0x15e)]+'Entities,\x20resolvers\x20as\x20'+_0x45bf82[_0x45a458(0x15e)]+'Resolvers,\x20subscribers\x20as\x20'+_0x45bf82[_0x45a458(0x15e)]+'EntitySubscribers\x20}\x20from\x20\x27./'+_0x45bf82[_0x45a458(0x1b2)]+'\x27')<0x0&&(_0x4bc520=_0x4bc520[_0x45a458(0x14f)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x45a458(0x1a1)+_0x45bf82[_0x45a458(0x15e)]+_0x45a458(0x1b9)+_0x45bf82['pascalCaseName']+'Resolvers,\x20subscribers\x20as\x20'+_0x45bf82['pascalCaseName']+'EntitySubscribers\x20}\x20from\x20\x27./'+_0x45bf82[_0x45a458(0x1b2)]+'\x27')),_0x4bc520['indexOf'](_0x45a458(0x1a7)+_0x45bf82[_0x45a458(0x15e)]+'Entities,')<0x0&&(_0x4bc520=_0x4bc520[_0x45a458(0x14f)](/\/\* ENTITIES \*\//,_0x45a458(0x17d)+_0x45bf82[_0x45a458(0x15e)]+_0x45a458(0x185))),_0x4bc520[_0x45a458(0x1ad)]('...'+_0x45bf82['pascalCaseName']+_0x45a458(0x190))<0x0&&(_0x4bc520=_0x4bc520[_0x45a458(0x14f)](/\/\* RESOLVER CLASSES \*\//,_0x45a458(0x14d)+_0x45bf82[_0x45a458(0x15e)]+_0x45a458(0x190))),_0x4bc520[_0x45a458(0x1ad)](_0x45a458(0x1a7)+_0x45bf82[_0x45a458(0x15e)]+_0x45a458(0x171))<0x0&&(_0x4bc520=_0x4bc520['replace'](/\/\* SUBSCRIBERS \*\//,'/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...'+_0x45bf82[_0x45a458(0x15e)]+_0x45a458(0x171))),await this[_0x45a458(0x164)](_0x69c6c8,_0x4bc520,_0x45bf82);}async['createNoHistoryServiceFiels'](_0x5bd5c7,_0x432245,_0x2ebc2d,_0x5f3d80,_0x52ef34){const _0x56bede=a0_0x25b17b;await this[_0x56bede(0x164)](_0x5bd5c7+(_0x432245+'/index.ts'),serviceIndex,_0x52ef34),await this[_0x56bede(0x164)](_0x5bd5c7+(_0x432245+'/'+_0x432245+_0x56bede(0x1bf)),serviceQuery,_0x52ef34),await this[_0x56bede(0x164)](_0x5bd5c7+(_0x432245+'/'+_0x432245+'-mutation.ts'),serviceMutation,_0x52ef34);let _0x169c07=this[_0x56bede(0x193)](_0x2ebc2d,_0x5f3d80);await this[_0x56bede(0x164)](_0x5bd5c7+(_0x432245+'/'+_0x432245+'.ts'),_0x169c07,_0x52ef34);let _0x19dd1f=this['createTypeText'](_0x5f3d80);await this[_0x56bede(0x164)](_0x5bd5c7+(_0x432245+'/'+_0x432245+'-type.ts'),_0x19dd1f,_0x52ef34);let _0x1bf929=_0x5bd5c7+_0x56bede(0x1a6);0x0==await this[_0x56bede(0x14a)](_0x1bf929)&&await this['writeFile'](_0x1bf929,allIndex,_0x52ef34);let _0x2b69ad=await fs['readFileSync'](_0x1bf929,_0x56bede(0x142));_0x2b69ad[_0x56bede(0x1ad)](_0x56bede(0x165)+_0x52ef34[_0x56bede(0x1b2)]+'/'+_0x52ef34[_0x56bede(0x1b2)]+'\x27')<0x0&&(_0x2b69ad=_0x2b69ad[_0x56bede(0x14f)](/\/\* EXPORT ENTITY TYPES \*\//,_0x56bede(0x196)+_0x52ef34[_0x56bede(0x1b2)]+'/'+_0x52ef34[_0x56bede(0x1b2)]+'\x27')),_0x2b69ad[_0x56bede(0x1ad)](_0x56bede(0x18c)+_0x52ef34[_0x56bede(0x15e)]+_0x56bede(0x1b9)+_0x52ef34[_0x56bede(0x15e)]+'Resolvers\x20}\x20from\x20\x27./'+_0x52ef34[_0x56bede(0x1b2)]+'\x27')<0x0&&(_0x2b69ad=_0x2b69ad[_0x56bede(0x14f)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,'/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20'+_0x52ef34[_0x56bede(0x15e)]+_0x56bede(0x1b9)+_0x52ef34[_0x56bede(0x15e)]+_0x56bede(0x1c4)+_0x52ef34[_0x56bede(0x1b2)]+'\x27')),_0x2b69ad[_0x56bede(0x1ad)]('...'+_0x52ef34[_0x56bede(0x15e)]+_0x56bede(0x185))<0x0&&(_0x2b69ad=_0x2b69ad[_0x56bede(0x14f)](/\/\* ENTITIES \*\//,'/*\x20ENTITIES\x20*/\x0a\x09...'+_0x52ef34['pascalCaseName']+_0x56bede(0x185))),_0x2b69ad[_0x56bede(0x1ad)]('...'+_0x52ef34[_0x56bede(0x15e)]+_0x56bede(0x190))<0x0&&(_0x2b69ad=_0x2b69ad[_0x56bede(0x14f)](/\/\* RESOLVER CLASSES \*\//,_0x56bede(0x14d)+_0x52ef34[_0x56bede(0x15e)]+'Resolvers,')),await this[_0x56bede(0x164)](_0x1bf929,_0x2b69ad,_0x52ef34);}[a0_0x25b17b(0x1a2)](_0x4e9042){const _0x30205c=a0_0x25b17b;let _0x2575f0=sereviceType,_0x2ddfde=_0x4e9042[_0x30205c(0x1b6)](_0x57a6ba=>{const _0x35f440=_0x30205c;if('id'==_0x57a6ba['name'])return'';if(_0x35f440(0x147)==_0x57a6ba['name'])return'';if(_0x35f440(0x18b)==_0x57a6ba[_0x35f440(0x1b2)])return'';if(_0x35f440(0x178)==_0x57a6ba[_0x35f440(0x1b2)])return'';if(_0x35f440(0x15d)==_0x57a6ba[_0x35f440(0x1b2)])return'';if('updater_id'==_0x57a6ba[_0x35f440(0x1b2)])return'';let _0x3cf7ae=this[_0x35f440(0x19a)](_0x57a6ba),_0x32f5b4=this[_0x35f440(0x199)](_0x57a6ba),_0xab89f4=camelCase(_0x57a6ba[_0x35f440(0x1b2)]);return'\x20\x20'+(_0x35f440(0x17c)+(0x0==_0x3cf7ae[_0x35f440(0x13d)]?'':_0x35f440(0x1c7)+_0x3cf7ae+',')+'\x20{\x20nullable:\x20'+_0x57a6ba[_0x35f440(0x18e)]+_0x35f440(0x1a3))+'\x0a\x20\x20'+(''+_0xab89f4+(_0x57a6ba['nullable']?'?':'')+':\x20'+_0x32f5b4)+'\x0a';});_0x2575f0=_0x2575f0[_0x30205c(0x14f)](/{{newTypeColumns}}/g,_0x2ddfde[_0x30205c(0x170)]('\x0a'));let _0x2cb078=_0x4e9042[_0x30205c(0x1b6)](_0x576e8a=>{const _0x4ecffd=_0x30205c;if('id'==_0x576e8a[_0x4ecffd(0x1b2)])return'';if(_0x4ecffd(0x147)==_0x576e8a['name'])return'';if('created_at'==_0x576e8a[_0x4ecffd(0x1b2)])return'';if('updated_at'==_0x576e8a[_0x4ecffd(0x1b2)])return'';if(_0x4ecffd(0x15d)==_0x576e8a['name'])return'';if('updater_id'==_0x576e8a[_0x4ecffd(0x1b2)])return'';let _0x5d09d3=this[_0x4ecffd(0x19a)](_0x576e8a),_0xdab42d=this['getColTxtType'](_0x576e8a);_0x576e8a['nullable']=!0x0;let _0x765e4b=camelCase(_0x576e8a[_0x4ecffd(0x1b2)]);return'\x20\x20'+('@Field('+(0x0==_0x5d09d3['length']?'':_0x4ecffd(0x1c7)+_0x5d09d3+',')+_0x4ecffd(0x16b)+_0x576e8a[_0x4ecffd(0x18e)]+_0x4ecffd(0x1a3))+_0x4ecffd(0x19b)+(''+_0x765e4b+(_0x576e8a[_0x4ecffd(0x18e)]?'?':'')+':\x20'+_0xdab42d)+'\x0a';});return _0x2575f0=_0x2575f0[_0x30205c(0x14f)](/{{patchTypeColumns}}/g,_0x2cb078['join']('\x0a')),_0x2575f0;}['createEntityText'](_0x34667d,_0x3bb447){const _0x4fa231=a0_0x25b17b;let _0x54b011=serviceEntity,_0x21f292=_0x3bb447['sort'](function(_0x1dfa33,_0x28f653){const _0x1e9df3=a0_0x8dfe;return _0x1dfa33[_0x1e9df3(0x1bd)]-_0x28f653[_0x1e9df3(0x1bd)];})['map'](_0x42e717=>this[_0x4fa231(0x18f)](_0x42e717));[_0x4fa231(0x156),_0x4fa231(0x166)][_0x4fa231(0x153)](_0x34667d[_0x4fa231(0x194)])&&_0x21f292[_0x4fa231(0x140)](_0x4fa231(0x161)),_0x54b011=_0x54b011[_0x4fa231(0x14f)](/{{entityColumns}}/g,_0x21f292['join']('\x0a'));let _0x4aa860='',_0x2e4b89=_0x3bb447[_0x4fa231(0x163)](_0x3db1c0=>_0x3db1c0[_0x4fa231(0x155)]&&_0x3db1c0['uniqRank']>0x0)['sort'](function(_0xf9944b,_0xa3e905){const _0x4b4845=_0x4fa231;return _0xf9944b[_0x4b4845(0x155)]-_0xa3e905[_0x4b4845(0x155)];});if(_0x2e4b89[_0x4fa231(0x13d)]>0x0){_0x4aa860='@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})';let _0x131ea7=_0x2e4b89[_0x4fa231(0x1b6)](_0x5294c0=>{const _0x59c26f=_0x4fa231;let _0x739f79=_0x5294c0[_0x59c26f(0x1b2)];return'domain_id'==_0x5294c0[_0x59c26f(0x1b2)]&&(_0x739f79='domain'),'creator_id'==_0x5294c0[_0x59c26f(0x1b2)]&&(_0x739f79='creator'),_0x59c26f(0x197)==_0x5294c0[_0x59c26f(0x1b2)]&&(_0x739f79='updater'),_0x59c26f(0x15c)+camelCase(_0x739f79);});_0x4aa860=_0x4aa860[_0x4fa231(0x14f)](/{{indexColumns}}/g,_0x131ea7['join'](','));}return _0x54b011=_0x54b011[_0x4fa231(0x14f)](/{{indexAnn}}/g,_0x4aa860),_0x54b011;}[a0_0x25b17b(0x187)](_0xb2e167,_0x20c080){const _0x57d101=a0_0x25b17b;let _0x172360=_0x57d101(0x166)==_0xb2e167[_0x57d101(0x194)]?serviceEntityHistJson:serviceEntityHistCopy,_0x1767b5=_0x20c080[_0x57d101(0x1c5)](function(_0x5379c5,_0x2ed4ce){const _0x5b0600=_0x57d101;return _0x5379c5[_0x5b0600(0x1bd)]-_0x2ed4ce[_0x5b0600(0x1bd)];})[_0x57d101(0x1b6)](_0x22c0ec=>this[_0x57d101(0x18f)](_0x22c0ec));return _0x172360=_0x172360[_0x57d101(0x14f)](/{{entityColumns}}/g,_0x1767b5['join']('\x0a')),_0x172360;}['columnToEntityColumn'](_0x2de3a1){const _0x384fb3=a0_0x25b17b;if('id'==_0x2de3a1[_0x384fb3(0x1b2)])return'';if(_0x384fb3(0x147)==_0x2de3a1[_0x384fb3(0x1b2)])return'';if(_0x384fb3(0x18b)==_0x2de3a1[_0x384fb3(0x1b2)])return'';if('updated_at'==_0x2de3a1[_0x384fb3(0x1b2)])return'';if('creator_id'==_0x2de3a1[_0x384fb3(0x1b2)])return'';if('updater_id'==_0x2de3a1[_0x384fb3(0x1b2)])return'';let _0x343445=_0x2de3a1['colType'];_0x384fb3(0x1aa)==_0x2de3a1[_0x384fb3(0x13b)]&&(_0x343445='double\x20precision'),'long'==_0x2de3a1[_0x384fb3(0x13b)]&&(_0x343445='bigint'),_0x384fb3(0x150)==_0x2de3a1['colType']&&(_0x343445='character\x20varying'),_0x384fb3(0x1b0)==_0x2de3a1[_0x384fb3(0x13b)]&&(_0x343445=_0x384fb3(0x181));let _0x2658ce='';_0x384fb3(0x150)==_0x2de3a1[_0x384fb3(0x13b)]&&(_0x2658ce=_0x2de3a1[_0x384fb3(0x173)]);let _0x25b236=this['getFieldType'](_0x2de3a1),_0x177169=this['getColTxtType'](_0x2de3a1),_0x18643d=camelCase(_0x2de3a1[_0x384fb3(0x1b2)]);return'\x20\x20'+(_0x384fb3(0x198)+_0x2de3a1['name']+_0x384fb3(0x152)+_0x343445+'\x27,\x20nullable:\x20'+_0x2de3a1[_0x384fb3(0x18e)]+'\x20'+(0x0==_0x2658ce[_0x384fb3(0x13d)]?'':_0x384fb3(0x1c3)+_0x2658ce)+_0x384fb3(0x1a3))+_0x384fb3(0x19b)+(_0x384fb3(0x17c)+(0x0==_0x25b236['length']?'':'type\x20=>'+_0x25b236+',')+_0x384fb3(0x16b)+_0x2de3a1[_0x384fb3(0x18e)]+_0x384fb3(0x1a3))+'\x0a\x20\x20'+(''+_0x18643d+(_0x2de3a1[_0x384fb3(0x18e)]?'?':'')+':\x20'+_0x177169)+'\x0a';}['getFieldType'](_0x430a24){const _0x3872cf=a0_0x25b17b;let _0x24a1b8='';return _0x3872cf(0x1aa)==_0x430a24[_0x3872cf(0x13b)]&&(_0x24a1b8=_0x3872cf(0x17b)),_0x3872cf(0x146)==_0x430a24[_0x3872cf(0x13b)]&&(_0x24a1b8=_0x3872cf(0x17b)),'long'==_0x430a24['colType']&&(_0x24a1b8=_0x3872cf(0x195)),_0x3872cf(0x168)==_0x430a24['colType']&&(_0x24a1b8=_0x3872cf(0x195)),_0x24a1b8;}[a0_0x25b17b(0x199)](_0x2e264b){const _0x50c1c6=a0_0x25b17b;let _0x3ee71b=_0x2e264b[_0x50c1c6(0x13b)];return _0x50c1c6(0x176)==_0x2e264b['colType']&&(_0x3ee71b=_0x50c1c6(0x149)),'double'==_0x2e264b[_0x50c1c6(0x13b)]&&(_0x3ee71b=_0x50c1c6(0x149)),_0x50c1c6(0x146)==_0x2e264b[_0x50c1c6(0x13b)]&&(_0x3ee71b=_0x50c1c6(0x149)),_0x50c1c6(0x168)==_0x2e264b['colType']&&(_0x3ee71b='number'),_0x50c1c6(0x1c2)==_0x2e264b[_0x50c1c6(0x13b)]&&(_0x3ee71b=_0x50c1c6(0x149)),_0x50c1c6(0x1b0)==_0x2e264b[_0x50c1c6(0x13b)]&&(_0x3ee71b=_0x50c1c6(0x18a)),_0x50c1c6(0x174)==_0x2e264b[_0x50c1c6(0x13b)]&&(_0x3ee71b=_0x50c1c6(0x18a)),_0x50c1c6(0x17a)==_0x2e264b[_0x50c1c6(0x13b)]&&(_0x3ee71b='string'),_0x3ee71b;}async[a0_0x25b17b(0x164)](_0x2cdf3a,_0x2ea0d6,_0x5d8d53){const _0x33ed2e=a0_0x25b17b;await fs[_0x33ed2e(0x179)](_0x2cdf3a,this[_0x33ed2e(0x15f)](_0x2ea0d6,_0x5d8d53),'utf8');}[a0_0x25b17b(0x15f)](_0x46302d,_0x1833c0){const _0x598fcc=a0_0x25b17b;return _0x46302d[_0x598fcc(0x14f)](/{{pascalCase name}}/g,_0x1833c0[_0x598fcc(0x15e)])[_0x598fcc(0x14f)](/{{camelCase name}}/g,_0x1833c0[_0x598fcc(0x1a5)])[_0x598fcc(0x14f)](/{{snakeCase name}}/g,_0x1833c0['snakeCaseName'])['replace'](/{{pluralPascalCase name}}/g,_0x1833c0[_0x598fcc(0x14c)])['replace'](/{{pluralCamelCase name}}/g,_0x1833c0[_0x598fcc(0x183)])[_0x598fcc(0x14f)](/{{tableName}}/g,_0x1833c0[_0x598fcc(0x180)])[_0x598fcc(0x14f)](/{{name}}/g,_0x1833c0['name']);}async[a0_0x25b17b(0x182)](_0x468c43,_0x4fa642,_0x2daeda){const _0x4144de=a0_0x25b17b;let _0x1b6c77=_0x468c43+_0x4144de(0x158);await this['createDir'](_0x1b6c77),_0x1b6c77=_0x1b6c77+'/'+_0x4fa642,await this[_0x4144de(0x1a0)](_0x1b6c77),_0x1b6c77+=_0x4144de(0x1ab),await this[_0x4144de(0x1a0)](_0x1b6c77),_0x1b6c77+=_0x4144de(0x151),await this[_0x4144de(0x1a0)](_0x1b6c77),_0x1b6c77=_0x1b6c77+'/'+_0x2daeda,await this['createDir'](_0x1b6c77);}[a0_0x25b17b(0x13c)](){const _0x23c7ba=a0_0x25b17b;let _0x21cdb0=process[_0x23c7ba(0x1b1)][_0x23c7ba(0x172)][_0x23c7ba(0x17e)]('/'),_0x47cee6=[];for(let _0x47f852=0x0;_0x47f852<_0x21cdb0[_0x23c7ba(0x13d)]&&_0x23c7ba(0x169)!=_0x21cdb0[_0x47f852];_0x47f852++)_0x47cee6[_0x23c7ba(0x140)](_0x21cdb0[_0x47f852]);return _0x47cee6[_0x23c7ba(0x170)]('/');}async['createDir'](_0x216cd3){const _0x55404f=a0_0x25b17b;0x0==await this[_0x55404f(0x14a)](_0x216cd3)&&fs[_0x55404f(0x154)](_0x216cd3);}async[a0_0x25b17b(0x14a)](_0x7636f5){const _0xf41a1c=a0_0x25b17b;return await fs[_0xf41a1c(0x1bb)](_0x7636f5);}};tslib_1[a0_0x25b17b(0x14b)]([(0x0,type_graphql_1['Query'])(_0x19e254=>Boolean,{'description':a0_0x25b17b(0x1b4)}),tslib_1[a0_0x25b17b(0x162)](0x0,(0x0,type_graphql_1[a0_0x25b17b(0x1a4)])('id')),tslib_1[a0_0x25b17b(0x162)](0x1,(0x0,type_graphql_1[a0_0x25b17b(0x1b5)])()),tslib_1[a0_0x25b17b(0x186)]('design:type',Function),tslib_1[a0_0x25b17b(0x186)]('design:paramtypes',[String,Object]),tslib_1[a0_0x25b17b(0x186)](a0_0x25b17b(0x1af),Promise)],OperatoToolCreateService[a0_0x25b17b(0x19d)],a0_0x25b17b(0x1ac),null),OperatoToolCreateService=tslib_1[a0_0x25b17b(0x14b)]([(0x0,type_graphql_1[a0_0x25b17b(0x16f)])()],OperatoToolCreateService),exports[a0_0x25b17b(0x167)]=OperatoToolCreateService;function a0_0x8dfe(_0x5ab59f,_0x578238){const _0x126fe8=a0_0x126f();return a0_0x8dfe=function(_0x8dfe9b,_0x31d260){_0x8dfe9b=_0x8dfe9b-0x13a;let _0x52a8a1=_0x126fe8[_0x8dfe9b];return _0x52a8a1;},a0_0x8dfe(_0x5ab59f,_0x578238);}const allIndex=a0_0x25b17b(0x189),serviceIndex=a0_0x25b17b(0x1c8),serviceHistoryIndex=a0_0x25b17b(0x148),serviceQuery=a0_0x25b17b(0x145),serviceHistoryQuery=a0_0x25b17b(0x1b7),serviceMutation='\x0aimport\x20{\x20Resolver,\x20Mutation,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20In\x20}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20New{{pascalCase\x20name}},\x20{{pascalCase\x20name}}Patch\x20}\x20from\x20\x27./{{name}}-type\x27\x0aimport\x20{\x20getRepository\x20}\x20from\x20\x27@things-factory/shell\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Mutation\x20{\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20create\x20new\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20create{{pascalCase\x20name}}(@Arg(\x27{{camelCase\x20name}}\x27)\x20{{camelCase\x20name}}:\x20New{{pascalCase\x20name}},\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20return\x20await\x20tx.getRepository({{pascalCase\x20name}}).save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20modify\x20{{pascalCase\x20name}}\x20information\x27\x20})\x0a\x20\x20async\x20update{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27id\x27)\x20id:\x20string,\x0a\x20\x20\x20\x20@Arg(\x27patch\x27)\x20patch:\x20{{pascalCase\x20name}}Patch,\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20repository\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20repository.findOne(\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20)\x0a\x0a\x20\x20\x20\x20return\x20await\x20repository.save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20...patch,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20[{{pascalCase\x20name}}],\x20{\x20description:\x20\x22To\x20modify\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20information\x22\x20})\x0a\x20\x20async\x20updateMultiple{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27patches\x27,\x20type\x20=>\x20[{{pascalCase\x20name}}Patch])\x20patches:\x20{{pascalCase\x20name}}Patch[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}[]>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20results\x20=\x20[]\x0a\x20\x20\x20\x20const\x20_createRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27+\x27)\x0a\x20\x20\x20\x20const\x20_updateRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27M\x27)\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}Repo\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x0a\x20\x20\x20\x20if\x20(_createRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_createRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20newRecord\x20=\x20_createRecords[i]\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...newRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27+\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20if\x20(_updateRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_updateRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20updRecord\x20=\x20_updateRecords[i]\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20{{camelCase\x20name}}Repo.findOne({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id:updRecord.id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...updRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27M\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20return\x20results\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20delete{{pascalCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove({\x20domain,\x20id,\x20updater:user\x20})\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20multiple\x20{{camelCase\x20name}}s\x27\x20})\x0a\x20\x20async\x20delete{{pluralPascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27ids\x27,\x20type\x20=>\x20[String])\x20ids:\x20string[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20delEntitis\x20=\x20ids.map(id=>{\x0a\x20\x20\x20\x20\x20\x20return\x20{domain,id,updater:user}\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove(delEntitis)\x0a\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a}\x0a',sereviceType=a0_0x25b17b(0x1a8),sereviceHistoryType='\x0aimport\x20{\x20ObjectType,\x20Field,\x20InputType,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0a\x0a@ObjectType()\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryList\x20{\x0a\x20\x20@Field(type\x20=>\x20[{{pascalCase\x20name}}History])\x0a\x20\x20items:\x20{{pascalCase\x20name}}History[]\x0a\x0a\x20\x20@Field(type\x20=>\x20Int)\x0a\x20\x20total:\x20number\x0a}\x0a',serviceEntity=a0_0x25b17b(0x18d),serviceEntityHistCopy=a0_0x25b17b(0x159),serviceEntityHistJson='\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a\x20\x20@Column(\x27simple-json\x27,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20@Field(type\x20=>\x20ScalarObject,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20historyJson?:\x20any\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a',serviceEntitySubscriber=a0_0x25b17b(0x16a);
|
|
1
|
+
'use strict';const a0_0x2e4089=a0_0x56c9;(function(_0x2cb769,_0x440224){const _0x2f7e63=a0_0x56c9,_0x3a3651=_0x2cb769();while(!![]){try{const _0x3dc47a=parseInt(_0x2f7e63(0x1a8))/0x1*(parseInt(_0x2f7e63(0x176))/0x2)+parseInt(_0x2f7e63(0x183))/0x3+-parseInt(_0x2f7e63(0x1b4))/0x4+-parseInt(_0x2f7e63(0x1a5))/0x5*(-parseInt(_0x2f7e63(0x188))/0x6)+parseInt(_0x2f7e63(0x1f1))/0x7+parseInt(_0x2f7e63(0x186))/0x8*(parseInt(_0x2f7e63(0x18d))/0x9)+-parseInt(_0x2f7e63(0x1e9))/0xa;if(_0x3dc47a===_0x440224)break;else _0x3a3651['push'](_0x3a3651['shift']());}catch(_0x46a231){_0x3a3651['push'](_0x3a3651['shift']());}}}(a0_0x44bc,0x80bbd));Object[a0_0x2e4089(0x17a)](exports,a0_0x2e4089(0x1f3),{'value':!0x0}),exports[a0_0x2e4089(0x185)]=void 0x0;const tslib_1=require(a0_0x2e4089(0x173)),type_graphql_1=require('type-graphql'),shell_1=require(a0_0x2e4089(0x17c)),resource_base_1=require('@things-factory/resource-base'),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x2e4089(0x1f8)),{plural:plural}=require(a0_0x2e4089(0x1c2)),fs=require('fs');let OperatoToolCreateService=class{async[a0_0x2e4089(0x1bb)](_0x21b15f,_0xc4cb5d){const _0x5f03e3=a0_0x2e4089,{domain:_0x3842ac}=_0xc4cb5d['state'],_0x597193=await(0x0,shell_1[_0x5f03e3(0x1c5)])(resource_base_1[_0x5f03e3(0x1c4)])[_0x5f03e3(0x1af)]({'where':{'id':_0x21b15f}}),_0x484371=await(0x0,shell_1[_0x5f03e3(0x1c5)])(resource_base_1[_0x5f03e3(0x175)])['find']({'where':{'domain':{'id':_0x3842ac['id']},'entity':{'id':_0x597193['id']}}});let {name:_0x6ad6d2='',bundle:_0x224cf7=''}=_0x597193||{},_0x359acc=this[_0x5f03e3(0x1c8)](),_0x24e134=kebabCase(_0x6ad6d2);return await this['createServicePath'](_0x359acc,_0x224cf7,_0x24e134),await this[_0x5f03e3(0x1d2)](_0x359acc,_0x224cf7,_0x6ad6d2,_0x24e134,_0x597193,_0x484371),!0x0;}async[a0_0x2e4089(0x1d2)](_0x3d6636,_0x201a4c,_0x960849,_0x1b19d4,_0x40e9a9,_0x17b1ee){const _0x584776=a0_0x2e4089;let _0x50cefa={'name':_0x1b19d4,'tableName':_0x40e9a9[_0x584776(0x1d0)],'pascalCaseName':startCase(camelCase(_0x960849))[_0x584776(0x1ea)](/ /g,''),'camelCaseName':camelCase(_0x960849),'snakeCaseName':snakeCase(_0x960849),'pluralPascalCaseName':startCase(camelCase(plural(_0x960849)))['replace'](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x960849))},_0xbc1ebd=_0x3d6636+'/packages/'+_0x201a4c+_0x584776(0x191);[_0x584776(0x1e6),'COPY'][_0x584776(0x19a)](_0x40e9a9[_0x584776(0x1d9)])?await this['createHistoryServiceFiles'](_0xbc1ebd,_0x1b19d4,_0x40e9a9,_0x17b1ee,_0x50cefa):await this['createNoHistoryServiceFiels'](_0xbc1ebd,_0x1b19d4,_0x40e9a9,_0x17b1ee,_0x50cefa);}async[a0_0x2e4089(0x1f2)](_0x5848fb,_0x2952b0,_0x79f66f,_0x389949,_0x2a6226){const _0x41589d=a0_0x2e4089;await this['writeFile'](_0x5848fb+(_0x2952b0+'/index.ts'),serviceHistoryIndex,_0x2a6226);let _0x3ae477=this[_0x41589d(0x1b2)](_0x79f66f,_0x389949);await this['writeFile'](_0x5848fb+(_0x2952b0+'/'+_0x2952b0+_0x41589d(0x1e0)),_0x3ae477,_0x2a6226),await this[_0x41589d(0x18f)](_0x5848fb+(_0x2952b0+'/'+_0x2952b0+_0x41589d(0x1da)),serviceQuery,_0x2a6226),await this[_0x41589d(0x18f)](_0x5848fb+(_0x2952b0+'/'+_0x2952b0+'-mutation.ts'),serviceMutation,_0x2a6226);let _0xab99d6=this[_0x41589d(0x1ed)](_0x389949);await this[_0x41589d(0x18f)](_0x5848fb+(_0x2952b0+'/'+_0x2952b0+'-type.ts'),_0xab99d6,_0x2a6226);let _0x5bf28e=this[_0x41589d(0x1c9)](_0x79f66f,_0x389949);await this[_0x41589d(0x18f)](_0x5848fb+(_0x2952b0+'/'+_0x2952b0+'-history.ts'),_0x5bf28e,_0x2a6226);let _0x52b960='';_0x41589d(0x1e6)==_0x79f66f[_0x41589d(0x1d9)]?(_0x52b960=_0x41589d(0x1e5),await this[_0x41589d(0x18f)](_0x5848fb+(_0x2952b0+_0x41589d(0x187)),serviceEntitySubscriber,_0x2a6226)):_0x52b960='';let _0x29c9a1=serviceEntitySubscriber[_0x41589d(0x1ea)](/{{entityToJson}}/g,_0x52b960);await this[_0x41589d(0x18f)](_0x5848fb+(_0x2952b0+'/event-subscriber.ts'),_0x29c9a1,_0x2a6226),await this['writeFile'](_0x5848fb+(_0x2952b0+'/'+_0x2952b0+_0x41589d(0x17d)),serviceHistoryQuery,_0x2a6226),await this[_0x41589d(0x18f)](_0x5848fb+(_0x2952b0+'/'+_0x2952b0+_0x41589d(0x200)),sereviceHistoryType,_0x2a6226);let _0x1fd3dd=_0x5848fb+'index.ts';0x0==await this['existsPath'](_0x1fd3dd)&&await this[_0x41589d(0x18f)](_0x1fd3dd,allIndex,_0x2a6226);let _0x1f4baf=await fs[_0x41589d(0x18c)](_0x1fd3dd,_0x41589d(0x180));_0x1f4baf[_0x41589d(0x1be)](_0x41589d(0x192)+_0x2a6226[_0x41589d(0x1eb)]+'/'+_0x2a6226[_0x41589d(0x1eb)]+_0x41589d(0x1b6))<0x0&&(_0x1f4baf=_0x1f4baf['replace'](/\/\* EXPORT ENTITY TYPES \*\//,_0x41589d(0x1dc)+_0x2a6226[_0x41589d(0x1eb)]+'/'+_0x2a6226[_0x41589d(0x1eb)]+_0x41589d(0x1b6))),_0x1f4baf['indexOf'](_0x41589d(0x192)+_0x2a6226['name']+'/'+_0x2a6226[_0x41589d(0x1eb)]+'\x27')<0x0&&(_0x1f4baf=_0x1f4baf[_0x41589d(0x1ea)](/\/\* EXPORT ENTITY TYPES \*\//,'/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./'+_0x2a6226[_0x41589d(0x1eb)]+'/'+_0x2a6226[_0x41589d(0x1eb)]+'\x27')),_0x1f4baf[_0x41589d(0x1be)](_0x41589d(0x19c)+_0x2a6226[_0x41589d(0x1f7)]+_0x41589d(0x1cf)+_0x2a6226[_0x41589d(0x1f7)]+_0x41589d(0x201)+_0x2a6226[_0x41589d(0x1f7)]+_0x41589d(0x17b)+_0x2a6226[_0x41589d(0x1eb)]+'\x27')<0x0&&(_0x1f4baf=_0x1f4baf['replace'](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x41589d(0x1ec)+_0x2a6226[_0x41589d(0x1f7)]+_0x41589d(0x1cf)+_0x2a6226[_0x41589d(0x1f7)]+_0x41589d(0x201)+_0x2a6226[_0x41589d(0x1f7)]+_0x41589d(0x17b)+_0x2a6226['name']+'\x27')),_0x1f4baf[_0x41589d(0x1be)](_0x41589d(0x1fb)+_0x2a6226[_0x41589d(0x1f7)]+_0x41589d(0x1ee))<0x0&&(_0x1f4baf=_0x1f4baf['replace'](/\/\* ENTITIES \*\//,'/*\x20ENTITIES\x20*/\x0a\x09...'+_0x2a6226[_0x41589d(0x1f7)]+_0x41589d(0x1ee))),_0x1f4baf['indexOf'](_0x41589d(0x1fb)+_0x2a6226[_0x41589d(0x1f7)]+'Resolvers,')<0x0&&(_0x1f4baf=_0x1f4baf['replace'](/\/\* RESOLVER CLASSES \*\//,_0x41589d(0x1bd)+_0x2a6226[_0x41589d(0x1f7)]+_0x41589d(0x1c3))),_0x1f4baf[_0x41589d(0x1be)](_0x41589d(0x1fb)+_0x2a6226['pascalCaseName']+_0x41589d(0x181))<0x0&&(_0x1f4baf=_0x1f4baf[_0x41589d(0x1ea)](/\/\* SUBSCRIBERS \*\//,'/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...'+_0x2a6226[_0x41589d(0x1f7)]+_0x41589d(0x181))),await this[_0x41589d(0x18f)](_0x1fd3dd,_0x1f4baf,_0x2a6226);}async[a0_0x2e4089(0x1cc)](_0x3aaf5a,_0xe31231,_0x24f223,_0x2f5332,_0x22c7ff){const _0x4cb82b=a0_0x2e4089;await this[_0x4cb82b(0x18f)](_0x3aaf5a+(_0xe31231+_0x4cb82b(0x189)),serviceIndex,_0x22c7ff),await this[_0x4cb82b(0x18f)](_0x3aaf5a+(_0xe31231+'/'+_0xe31231+_0x4cb82b(0x1da)),serviceQuery,_0x22c7ff),await this[_0x4cb82b(0x18f)](_0x3aaf5a+(_0xe31231+'/'+_0xe31231+_0x4cb82b(0x1dd)),serviceMutation,_0x22c7ff);let _0x244d35=this[_0x4cb82b(0x1b2)](_0x24f223,_0x2f5332);await this[_0x4cb82b(0x18f)](_0x3aaf5a+(_0xe31231+'/'+_0xe31231+_0x4cb82b(0x1e0)),_0x244d35,_0x22c7ff);let _0x53d6f0=this[_0x4cb82b(0x1ed)](_0x2f5332);await this[_0x4cb82b(0x18f)](_0x3aaf5a+(_0xe31231+'/'+_0xe31231+_0x4cb82b(0x1b3)),_0x53d6f0,_0x22c7ff);let _0x2c7501=_0x3aaf5a+_0x4cb82b(0x1bf);0x0==await this['existsPath'](_0x2c7501)&&await this[_0x4cb82b(0x18f)](_0x2c7501,allIndex,_0x22c7ff);let _0x371afb=await fs[_0x4cb82b(0x18c)](_0x2c7501,_0x4cb82b(0x180));_0x371afb['indexOf'](_0x4cb82b(0x192)+_0x22c7ff['name']+'/'+_0x22c7ff[_0x4cb82b(0x1eb)]+'\x27')<0x0&&(_0x371afb=_0x371afb[_0x4cb82b(0x1ea)](/\/\* EXPORT ENTITY TYPES \*\//,'/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./'+_0x22c7ff[_0x4cb82b(0x1eb)]+'/'+_0x22c7ff['name']+'\x27')),_0x371afb['indexOf']('import\x20{\x20entities\x20as\x20'+_0x22c7ff[_0x4cb82b(0x1f7)]+_0x4cb82b(0x1cf)+_0x22c7ff[_0x4cb82b(0x1f7)]+_0x4cb82b(0x1ff)+_0x22c7ff[_0x4cb82b(0x1eb)]+'\x27')<0x0&&(_0x371afb=_0x371afb[_0x4cb82b(0x1ea)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x4cb82b(0x1ec)+_0x22c7ff[_0x4cb82b(0x1f7)]+_0x4cb82b(0x1cf)+_0x22c7ff[_0x4cb82b(0x1f7)]+_0x4cb82b(0x1ff)+_0x22c7ff[_0x4cb82b(0x1eb)]+'\x27')),_0x371afb[_0x4cb82b(0x1be)](_0x4cb82b(0x1fb)+_0x22c7ff[_0x4cb82b(0x1f7)]+_0x4cb82b(0x1ee))<0x0&&(_0x371afb=_0x371afb['replace'](/\/\* ENTITIES \*\//,'/*\x20ENTITIES\x20*/\x0a\x09...'+_0x22c7ff[_0x4cb82b(0x1f7)]+_0x4cb82b(0x1ee))),_0x371afb['indexOf']('...'+_0x22c7ff['pascalCaseName']+_0x4cb82b(0x1c3))<0x0&&(_0x371afb=_0x371afb[_0x4cb82b(0x1ea)](/\/\* RESOLVER CLASSES \*\//,_0x4cb82b(0x1bd)+_0x22c7ff[_0x4cb82b(0x1f7)]+_0x4cb82b(0x1c3))),await this[_0x4cb82b(0x18f)](_0x2c7501,_0x371afb,_0x22c7ff);}[a0_0x2e4089(0x1ed)](_0x40baee){const _0x557423=a0_0x2e4089;let _0x108ce5=sereviceType,_0x5159e4=_0x40baee[_0x557423(0x199)](_0x345a00=>{const _0x228bb0=_0x557423;if('id'==_0x345a00[_0x228bb0(0x1eb)])return'';if(_0x228bb0(0x1e1)==_0x345a00[_0x228bb0(0x1eb)])return'';if(_0x228bb0(0x1d6)==_0x345a00['name'])return'';if('updated_at'==_0x345a00[_0x228bb0(0x1eb)])return'';if(_0x228bb0(0x1d4)==_0x345a00['name'])return'';if(_0x228bb0(0x1d5)==_0x345a00[_0x228bb0(0x1eb)])return'';let _0x340342=this[_0x228bb0(0x1a3)](_0x345a00),_0x11f86d=this[_0x228bb0(0x19f)](_0x345a00),_0x4da158=camelCase(_0x345a00[_0x228bb0(0x1eb)]);return'\x20\x20'+(_0x228bb0(0x1b8)+(0x0==_0x340342[_0x228bb0(0x196)]?'':_0x228bb0(0x1ce)+_0x340342+',')+_0x228bb0(0x194)+_0x345a00[_0x228bb0(0x1f4)]+_0x228bb0(0x178))+_0x228bb0(0x1c0)+(''+_0x4da158+(_0x345a00[_0x228bb0(0x1f4)]?'?':'')+':\x20'+_0x11f86d)+'\x0a';});_0x108ce5=_0x108ce5[_0x557423(0x1ea)](/{{newTypeColumns}}/g,_0x5159e4[_0x557423(0x1bc)]('\x0a'));let _0x119b61=_0x40baee['map'](_0x2e09f4=>{const _0x4141bf=_0x557423;if('id'==_0x2e09f4['name'])return'';if(_0x4141bf(0x1e1)==_0x2e09f4[_0x4141bf(0x1eb)])return'';if('created_at'==_0x2e09f4[_0x4141bf(0x1eb)])return'';if('updated_at'==_0x2e09f4['name'])return'';if(_0x4141bf(0x1d4)==_0x2e09f4[_0x4141bf(0x1eb)])return'';if(_0x4141bf(0x1d5)==_0x2e09f4[_0x4141bf(0x1eb)])return'';let _0x2243c6=this[_0x4141bf(0x1a3)](_0x2e09f4),_0x332a8c=this['getColTxtType'](_0x2e09f4);_0x2e09f4[_0x4141bf(0x1f4)]=!0x0;let _0x1197d5=camelCase(_0x2e09f4[_0x4141bf(0x1eb)]);return'\x20\x20'+(_0x4141bf(0x1b8)+(0x0==_0x2243c6[_0x4141bf(0x196)]?'':_0x4141bf(0x1ce)+_0x2243c6+',')+'\x20{\x20nullable:\x20'+_0x2e09f4['nullable']+_0x4141bf(0x178))+'\x0a\x20\x20'+(''+_0x1197d5+(_0x2e09f4[_0x4141bf(0x1f4)]?'?':'')+':\x20'+_0x332a8c)+'\x0a';});return _0x108ce5=_0x108ce5[_0x557423(0x1ea)](/{{patchTypeColumns}}/g,_0x119b61[_0x557423(0x1bc)]('\x0a')),_0x108ce5;}[a0_0x2e4089(0x1b2)](_0x2d1b84,_0x2e5b94){const _0x30da31=a0_0x2e4089;let _0x4f851a=serviceEntity,_0x1c2a5c=_0x2e5b94[_0x30da31(0x19d)](function(_0x48d290,_0x1792b0){const _0x407f7a=_0x30da31;return _0x48d290[_0x407f7a(0x1f9)]-_0x1792b0[_0x407f7a(0x1f9)];})[_0x30da31(0x199)](_0x3c7d3e=>this[_0x30da31(0x1fe)](_0x3c7d3e));[_0x30da31(0x1e8),_0x30da31(0x1e6)]['includes'](_0x2d1b84['dataProp'])&&_0x1c2a5c[_0x30da31(0x1b0)](_0x30da31(0x1b5)),_0x4f851a=_0x4f851a[_0x30da31(0x1ea)](/{{entityColumns}}/g,_0x1c2a5c[_0x30da31(0x1bc)]('\x0a'));let _0x4fc01d='',_0x31acf3=_0x2e5b94[_0x30da31(0x1e2)](_0x18de37=>_0x18de37[_0x30da31(0x1d8)]&&_0x18de37[_0x30da31(0x1d8)]>0x0)[_0x30da31(0x19d)](function(_0x3a1b1a,_0x28a9fb){const _0x2d9858=_0x30da31;return _0x3a1b1a[_0x2d9858(0x1d8)]-_0x28a9fb[_0x2d9858(0x1d8)];});if(_0x31acf3[_0x30da31(0x196)]>0x0){_0x4fc01d=_0x30da31(0x1ca);let _0x14c476=_0x31acf3[_0x30da31(0x199)](_0x3ac485=>{const _0x2d5ac4=_0x30da31;let _0x29bd24=_0x3ac485[_0x2d5ac4(0x1eb)];return _0x2d5ac4(0x1e1)==_0x3ac485[_0x2d5ac4(0x1eb)]&&(_0x29bd24=_0x2d5ac4(0x1c1)),_0x2d5ac4(0x1d4)==_0x3ac485[_0x2d5ac4(0x1eb)]&&(_0x29bd24=_0x2d5ac4(0x1c7)),_0x2d5ac4(0x1d5)==_0x3ac485[_0x2d5ac4(0x1eb)]&&(_0x29bd24=_0x2d5ac4(0x1ae)),'{{camelCase\x20name}}.'+camelCase(_0x29bd24);});_0x4fc01d=_0x4fc01d[_0x30da31(0x1ea)](/{{indexColumns}}/g,_0x14c476[_0x30da31(0x1bc)](','));}return _0x4f851a=_0x4f851a['replace'](/{{indexAnn}}/g,_0x4fc01d),_0x4f851a;}[a0_0x2e4089(0x1c9)](_0xa6d15f,_0x41ed75){const _0x283b07=a0_0x2e4089;let _0x4637be=_0x283b07(0x1e6)==_0xa6d15f[_0x283b07(0x1d9)]?serviceEntityHistJson:serviceEntityHistCopy,_0x3c661a=_0x41ed75[_0x283b07(0x19d)](function(_0x7f66ef,_0x3edf83){const _0x3b2a1c=_0x283b07;return _0x7f66ef[_0x3b2a1c(0x1f9)]-_0x3edf83[_0x3b2a1c(0x1f9)];})[_0x283b07(0x199)](_0x3a9068=>this['columnToEntityColumn'](_0x3a9068));return _0x4637be=_0x4637be[_0x283b07(0x1ea)](/{{entityColumns}}/g,_0x3c661a[_0x283b07(0x1bc)]('\x0a')),_0x4637be;}[a0_0x2e4089(0x1fe)](_0x3f5b14){const _0x4c1f6d=a0_0x2e4089;if('id'==_0x3f5b14[_0x4c1f6d(0x1eb)])return'';if(_0x4c1f6d(0x1e1)==_0x3f5b14[_0x4c1f6d(0x1eb)])return'';if(_0x4c1f6d(0x1d6)==_0x3f5b14['name'])return'';if(_0x4c1f6d(0x1d1)==_0x3f5b14[_0x4c1f6d(0x1eb)])return'';if(_0x4c1f6d(0x1d4)==_0x3f5b14[_0x4c1f6d(0x1eb)])return'';if(_0x4c1f6d(0x1d5)==_0x3f5b14[_0x4c1f6d(0x1eb)])return'';let _0x3918d1=_0x3f5b14['colType'];_0x4c1f6d(0x1ad)==_0x3f5b14[_0x4c1f6d(0x1cd)]&&(_0x3918d1=_0x4c1f6d(0x1d7)),'long'==_0x3f5b14['colType']&&(_0x3918d1='bigint'),_0x4c1f6d(0x1a2)==_0x3f5b14[_0x4c1f6d(0x1cd)]&&(_0x3918d1=_0x4c1f6d(0x1a7)),_0x4c1f6d(0x1ac)==_0x3f5b14[_0x4c1f6d(0x1cd)]&&(_0x3918d1=_0x4c1f6d(0x1ab));let _0x4ddbc1='';_0x4c1f6d(0x1a2)==_0x3f5b14['colType']&&(_0x4ddbc1=_0x3f5b14[_0x4c1f6d(0x1e7)]);let _0x5513e4=this[_0x4c1f6d(0x1a3)](_0x3f5b14),_0x299bce=this[_0x4c1f6d(0x19f)](_0x3f5b14),_0x5aa2d3=camelCase(_0x3f5b14[_0x4c1f6d(0x1eb)]);return'\x20\x20'+(_0x4c1f6d(0x1b9)+_0x3f5b14[_0x4c1f6d(0x1eb)]+_0x4c1f6d(0x195)+_0x3918d1+_0x4c1f6d(0x202)+_0x3f5b14[_0x4c1f6d(0x1f4)]+'\x20'+(0x0==_0x4ddbc1['length']?'':',length:'+_0x4ddbc1)+'\x20})')+'\x0a\x20\x20'+(_0x4c1f6d(0x1b8)+(0x0==_0x5513e4[_0x4c1f6d(0x196)]?'':'type\x20=>'+_0x5513e4+',')+_0x4c1f6d(0x194)+_0x3f5b14[_0x4c1f6d(0x1f4)]+'\x20})')+_0x4c1f6d(0x1c0)+(''+_0x5aa2d3+(_0x3f5b14[_0x4c1f6d(0x1f4)]?'?':'')+':\x20'+_0x299bce)+'\x0a';}[a0_0x2e4089(0x1a3)](_0x2c5bc0){const _0x6759fe=a0_0x2e4089;let _0x36f6bf='';return _0x6759fe(0x1ad)==_0x2c5bc0['colType']&&(_0x36f6bf=_0x6759fe(0x174)),_0x6759fe(0x1b1)==_0x2c5bc0[_0x6759fe(0x1cd)]&&(_0x36f6bf=_0x6759fe(0x174)),'long'==_0x2c5bc0[_0x6759fe(0x1cd)]&&(_0x36f6bf=_0x6759fe(0x1f0)),'integer'==_0x2c5bc0[_0x6759fe(0x1cd)]&&(_0x36f6bf=_0x6759fe(0x1f0)),_0x36f6bf;}[a0_0x2e4089(0x19f)](_0x4f0289){const _0x298ac4=a0_0x2e4089;let _0x3989c0=_0x4f0289[_0x298ac4(0x1cd)];return _0x298ac4(0x18a)==_0x4f0289['colType']&&(_0x3989c0=_0x298ac4(0x193)),'double'==_0x4f0289[_0x298ac4(0x1cd)]&&(_0x3989c0=_0x298ac4(0x193)),'float'==_0x4f0289[_0x298ac4(0x1cd)]&&(_0x3989c0=_0x298ac4(0x193)),'integer'==_0x4f0289[_0x298ac4(0x1cd)]&&(_0x3989c0=_0x298ac4(0x193)),'long'==_0x4f0289[_0x298ac4(0x1cd)]&&(_0x3989c0=_0x298ac4(0x193)),_0x298ac4(0x1ac)==_0x4f0289[_0x298ac4(0x1cd)]&&(_0x3989c0=_0x298ac4(0x177)),_0x298ac4(0x1fc)==_0x4f0289[_0x298ac4(0x1cd)]&&(_0x3989c0=_0x298ac4(0x177)),_0x298ac4(0x18b)==_0x4f0289['colType']&&(_0x3989c0=_0x298ac4(0x1a2)),_0x3989c0;}async['writeFile'](_0x1b6886,_0x589f98,_0x3103f6){const _0x4900e0=a0_0x2e4089;await fs[_0x4900e0(0x17f)](_0x1b6886,this[_0x4900e0(0x1cb)](_0x589f98,_0x3103f6),_0x4900e0(0x180));}[a0_0x2e4089(0x1cb)](_0x2c0e30,_0x571fa8){const _0x14cf4d=a0_0x2e4089;return _0x2c0e30['replace'](/{{pascalCase name}}/g,_0x571fa8[_0x14cf4d(0x1f7)])[_0x14cf4d(0x1ea)](/{{camelCase name}}/g,_0x571fa8[_0x14cf4d(0x190)])[_0x14cf4d(0x1ea)](/{{snakeCase name}}/g,_0x571fa8['snakeCaseName'])[_0x14cf4d(0x1ea)](/{{pluralPascalCase name}}/g,_0x571fa8[_0x14cf4d(0x182)])[_0x14cf4d(0x1ea)](/{{pluralCamelCase name}}/g,_0x571fa8[_0x14cf4d(0x19b)])[_0x14cf4d(0x1ea)](/{{tableName}}/g,_0x571fa8[_0x14cf4d(0x1d0)])['replace'](/{{name}}/g,_0x571fa8[_0x14cf4d(0x1eb)]);}async['createServicePath'](_0x1a71c2,_0xeff484,_0x5eac69){const _0x209aae=a0_0x2e4089;let _0x4090b1=_0x1a71c2+_0x209aae(0x18e);await this[_0x209aae(0x1fd)](_0x4090b1),_0x4090b1=_0x4090b1+'/'+_0xeff484,await this['createDir'](_0x4090b1),_0x4090b1+=_0x209aae(0x1d3),await this[_0x209aae(0x1fd)](_0x4090b1),_0x4090b1+='/service',await this[_0x209aae(0x1fd)](_0x4090b1),_0x4090b1=_0x4090b1+'/'+_0x5eac69,await this[_0x209aae(0x1fd)](_0x4090b1);}[a0_0x2e4089(0x1c8)](){const _0xcccdf9=a0_0x2e4089;let _0x4bc8c1=process['env']['PWD'][_0xcccdf9(0x1fa)]('/'),_0x1c35b6=[];for(let _0x450eee=0x0;_0x450eee<_0x4bc8c1[_0xcccdf9(0x196)]&&'packages'!=_0x4bc8c1[_0x450eee];_0x450eee++)_0x1c35b6[_0xcccdf9(0x1b0)](_0x4bc8c1[_0x450eee]);return _0x1c35b6['join']('/');}async['createDir'](_0x5ac7bb){const _0x236956=a0_0x2e4089;0x0==await this[_0x236956(0x19e)](_0x5ac7bb)&&fs[_0x236956(0x1df)](_0x5ac7bb);}async['existsPath'](_0xd94e66){const _0x4d1553=a0_0x2e4089;return await fs[_0x4d1553(0x1ba)](_0xd94e66);}};tslib_1[a0_0x2e4089(0x179)]([(0x0,type_graphql_1[a0_0x2e4089(0x1a4)])(_0x395d21=>Boolean,{'description':a0_0x2e4089(0x1f6)}),tslib_1[a0_0x2e4089(0x198)](0x0,(0x0,type_graphql_1[a0_0x2e4089(0x184)])('id')),tslib_1[a0_0x2e4089(0x198)](0x1,(0x0,type_graphql_1[a0_0x2e4089(0x1db)])()),tslib_1[a0_0x2e4089(0x1c6)](a0_0x2e4089(0x197),Function),tslib_1[a0_0x2e4089(0x1c6)](a0_0x2e4089(0x1e4),[String,Object]),tslib_1['__metadata']('design:returntype',Promise)],OperatoToolCreateService[a0_0x2e4089(0x1a6)],a0_0x2e4089(0x1bb),null),OperatoToolCreateService=tslib_1[a0_0x2e4089(0x179)]([(0x0,type_graphql_1['Resolver'])()],OperatoToolCreateService),exports[a0_0x2e4089(0x185)]=OperatoToolCreateService;const allIndex='\x0a/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0a\x0a/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0a\x0aexport\x20const\x20entities\x20=\x20[\x20\x20\x0a\x20\x20/*\x20ENTITIES\x20*/\x0a]\x20\x0a\x0a\x0aexport\x20const\x20schema\x20=\x20{\x0a\x20\x20resolverClasses:\x20[\x0a\x20\x20\x20\x20/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x20\x20]\x20\x0a}\x0a\x0aexport\x20const\x20subscribers\x20=\x20[\x0a\x20\x20/*\x20SUBSCRIBERS\x20*/\x0a]\x0a',serviceIndex=a0_0x2e4089(0x1ef),serviceHistoryIndex=a0_0x2e4089(0x1a0),serviceQuery=a0_0x2e4089(0x1a9),serviceHistoryQuery=a0_0x2e4089(0x1aa),serviceMutation=a0_0x2e4089(0x1b7),sereviceType=a0_0x2e4089(0x17e),sereviceHistoryType='\x0aimport\x20{\x20ObjectType,\x20Field,\x20InputType,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0a\x0a@ObjectType()\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryList\x20{\x0a\x20\x20@Field(type\x20=>\x20[{{pascalCase\x20name}}History])\x0a\x20\x20items:\x20{{pascalCase\x20name}}History[]\x0a\x0a\x20\x20@Field(type\x20=>\x20Int)\x0a\x20\x20total:\x20number\x0a}\x0a',serviceEntity=a0_0x2e4089(0x1a1),serviceEntityHistCopy=a0_0x2e4089(0x1de),serviceEntityHistJson=a0_0x2e4089(0x1f5),serviceEntitySubscriber=a0_0x2e4089(0x1e3);function a0_0x56c9(_0x34a314,_0x27f40c){const _0x44bc52=a0_0x44bc();return a0_0x56c9=function(_0x56c9a2,_0xa19165){_0x56c9a2=_0x56c9a2-0x173;let _0x2e82ee=_0x44bc52[_0x56c9a2];return _0x2e82ee;},a0_0x56c9(_0x34a314,_0x27f40c);}function a0_0x44bc(){const _0x246c0d=['@Field(','@Column({name:\x27','existsSync','toolCreateService','join','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','indexOf','index.ts','\x0a\x20\x20','domain','pluralize','Resolvers,','Entity','getRepository','__metadata','creator','getProjectRootPath','createHistoryEntityText','@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})','replaceNamesMap','createNoHistoryServiceFiels','colType','type\x20=>','Entities,\x20resolvers\x20as\x20','tableName','updated_at','createServiceFiles','/server','creator_id','updater_id','created_at','double\x20precision','uniqRank','dataProp','-query.ts','Ctx','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','-mutation.ts','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','mkdirSync','.ts','domain_id','filter','\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','design:paramtypes','\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','JSON','colSize','COPY','17722750dpQTRr','replace','name','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','createTypeText','Entities,','\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}}]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}Mutation]\x0a','Int','3701222KGsDPa','createHistoryServiceFiles','__esModule','nullable','\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','Operato\x20Tool\x20Create\x20Service','pascalCaseName','lodash','rank','split','...','date','createDir','columnToEntityColumn','Resolvers\x20}\x20from\x20\x27./','-history-type.ts','Resolvers,\x20subscribers\x20as\x20','\x27,\x20nullable:\x20','tslib','Float','EntityColumn','1812QDvgOm','Date','\x20})','__decorate','defineProperty','EntitySubscribers\x20}\x20from\x20\x27./','@things-factory/shell','-history-query.ts','\x0aimport\x20{\x20ObjectType,\x20Field,\x20InputType,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@InputType()\x0aexport\x20class\x20New{{pascalCase\x20name}}\x20{\x0a{{newTypeColumns}}\x0a}\x0a\x0a@InputType()\x0aexport\x20class\x20{{pascalCase\x20name}}Patch\x20{\x0a\x20\x20@Field(type\x20=>\x20ID,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20id?:\x20string\x0a\x0a{{patchTypeColumns}}\x0a\x0a\x20\x20@Field()\x0a\x20\x20cuFlag:\x20string\x0a}\x0a\x0a@ObjectType()\x0aexport\x20class\x20{{pascalCase\x20name}}List\x20{\x0a\x20\x20@Field(type\x20=>\x20[{{pascalCase\x20name}}])\x0a\x20\x20items:\x20{{pascalCase\x20name}}[]\x0a\x0a\x20\x20@Field(type\x20=>\x20Int)\x0a\x20\x20total:\x20number\x0a}\x0a','writeFileSync','utf8','EntitySubscribers,','pluralPascalCaseName','2803758vHTWkd','Arg','OperatoToolCreateService','4037744ppgDfT','/event-subscriber.ts','2502ltenar','/index.ts','decimal','text','readFileSync','9bLOuZS','/packages','writeFile','camelCaseName','/server/service/','export\x20*\x20from\x20\x27./','number','\x20{\x20nullable:\x20','\x27,\x20type:\x20\x27','length','design:type','__param','map','includes','pluralCamelCaseName','import\x20{\x20entities\x20as\x20','sort','existsPath','getColTxtType','\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryQuery\x20}\x20from\x20\x27./{{name}}-history-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryEntitySubscriber\x20}\x20from\x20\x27./event-subscriber\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}},\x20{{pascalCase\x20name}}History]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}HistoryQuery,\x20{{pascalCase\x20name}}Mutation]\x0aexport\x20const\x20subscribers\x20=\x20[{{pascalCase\x20name}}HistoryEntitySubscriber]\x0a\x0a','\x0aimport\x20{\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','string','getFieldType','Query','10330FzyTFo','prototype','character\x20varying','71ZoaciD','\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','\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','timestamp\x20without\x20time\x20zone','datetime','double','updater','findOne','push','float','createEntityText','-type.ts','2377320pPFDnn','\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201','-history\x27','\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'];a0_0x44bc=function(){return _0x246c0d;};return a0_0x44bc();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x5660fb=a0_0x4603;(function(_0x1673b6,_0x47efdd){const _0x2b457d=a0_0x4603,_0x165e14=_0x1673b6();while(!![]){try{const _0x470e15=parseInt(_0x2b457d(0x162))/0x1+-parseInt(_0x2b457d(0x15d))/0x2+-parseInt(_0x2b457d(0x170))/0x3+-parseInt(_0x2b457d(0x163))/0x4+parseInt(_0x2b457d(0x166))/0x5*(-parseInt(_0x2b457d(0x15c))/0x6)+parseInt(_0x2b457d(0x179))/0x7+parseInt(_0x2b457d(0x16c))/0x8;if(_0x470e15===_0x47efdd)break;else _0x165e14['push'](_0x165e14['shift']());}catch(_0x1cda96){_0x165e14['push'](_0x165e14['shift']());}}}(a0_0x2d37,0xd6b06));function a0_0x4603(_0xab0822,_0x166ba2){const _0x2d37dc=a0_0x2d37();return a0_0x4603=function(_0x4603fb,_0x47ffb3){_0x4603fb=_0x4603fb-0x15c;let _0x1b2b70=_0x2d37dc[_0x4603fb];return _0x1b2b70;},a0_0x4603(_0xab0822,_0x166ba2);}Object[a0_0x5660fb(0x175)](exports,a0_0x5660fb(0x16e),{'value':!0x0}),exports[a0_0x5660fb(0x172)]=exports[a0_0x5660fb(0x177)]=void 0x0;const operato_license_checker_1=require(a0_0x5660fb(0x15e)),shell_1=require(a0_0x5660fb(0x16f)),menu_base_1=require(a0_0x5660fb(0x17c)),license_error_1=require(a0_0x5660fb(0x178));function a0_0x2d37(){const _0x1a397b=['checkStudioTemplateIsOverLimit','(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)','LicenseError','defineProperty','getRepository','checkStudioPermission','../../errors/license-error','6482350ITVShW','ERROR_CODES','getCount','@things-factory/menu-base','OVER_LIMIT','menu','3049296clrNIs','2664824ZLFGnx','@things-factory/operato-license-checker','forEach','createQueryBuilder','Permissions\x20For\x20Tailor\x20Tool','1710316rqzBxK','3074448xrgPUE','map','includes','5bCdHrc','where','select','trim','INVALID_LICENSE','andWhere','13544152EXTRuP','manager','__esModule','@things-factory/shell','2522337uQABEb','Menu'];a0_0x2d37=function(){return _0x1a397b;};return a0_0x2d37();}async function checkStudioPermission(){const _0x5781b6=a0_0x5660fb;let _0x3283e7=((0x0,operato_license_checker_1['getPermission'])(_0x5781b6(0x161))||',')['split'](',')[_0x5781b6(0x164)](_0x2dc239=>_0x2dc239[_0x5781b6(0x169)]()),_0x5ebefa=!0x1;return _0x3283e7[_0x5781b6(0x15f)](_0xbc8f56=>{const _0x1aeba4=_0x5781b6;_0xbc8f56[_0x1aeba4(0x165)]('Studio')&&(_0x5ebefa=!0x0);}),_0x5ebefa;}async function checkStudioTemplateIsOverLimit(_0x43f3c1,_0xaffa1){const _0x2d00df=a0_0x5660fb;if(0x0==await checkStudioPermission())throw new license_error_1['LicenseError']({'errorCode':_0xaffa1['t'](license_error_1[_0x2d00df(0x174)][_0x2d00df(0x17a)][_0x2d00df(0x16a)])});var _0x51d56f=0x0;if(_0x51d56f=_0x43f3c1&&''!=_0x43f3c1?await(0x0,shell_1[_0x2d00df(0x176)])(menu_base_1[_0x2d00df(0x171)])[_0x2d00df(0x16d)][_0x2d00df(0x160)]()[_0x2d00df(0x168)](_0x2d00df(0x17e))['from'](menu_base_1['Menu'],_0x2d00df(0x17e))[_0x2d00df(0x167)]('id\x20!=\x20:id',{'id':_0x43f3c1})[_0x2d00df(0x16b)](_0x2d00df(0x173))[_0x2d00df(0x17b)]()+0x1:await(0x0,shell_1[_0x2d00df(0x176)])(menu_base_1['Menu'])[_0x2d00df(0x16d)][_0x2d00df(0x160)]()[_0x2d00df(0x168)](_0x2d00df(0x17e))['from'](menu_base_1[_0x2d00df(0x171)],_0x2d00df(0x17e))[_0x2d00df(0x167)](_0x2d00df(0x173))[_0x2d00df(0x17b)]()+0x1,!(0x0,operato_license_checker_1['checkTarget'])(_0x51d56f))throw new license_error_1['LicenseError']({'errorCode':_0xaffa1['t'](license_error_1[_0x2d00df(0x174)][_0x2d00df(0x17a)][_0x2d00df(0x17d)])});return!0x0;}exports[a0_0x5660fb(0x177)]=checkStudioPermission,exports[a0_0x5660fb(0x172)]=checkStudioTemplateIsOverLimit;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x2216c9=a0_0x361c;(function(_0x94cf15,_0x46f92a){const _0xbd2391=a0_0x361c,_0x193e8a=_0x94cf15();while(!![]){try{const _0x3ae6a1=parseInt(_0xbd2391(0x14c))/0x1+-parseInt(_0xbd2391(0x141))/0x2*(parseInt(_0xbd2391(0x13d))/0x3)+-parseInt(_0xbd2391(0x148))/0x4+-parseInt(_0xbd2391(0x14a))/0x5+-parseInt(_0xbd2391(0x146))/0x6+-parseInt(_0xbd2391(0x145))/0x7*(-parseInt(_0xbd2391(0x139))/0x8)+-parseInt(_0xbd2391(0x149))/0x9*(-parseInt(_0xbd2391(0x14b))/0xa);if(_0x3ae6a1===_0x46f92a)break;else _0x193e8a['push'](_0x193e8a['shift']());}catch(_0x6a71f5){_0x193e8a['push'](_0x193e8a['shift']());}}}(a0_0x458b,0x639ec));Object['defineProperty'](exports,a0_0x2216c9(0x14e),{'value':!0x0}),exports[a0_0x2216c9(0x13f)]=void 0x0;const tslib_1=require(a0_0x2216c9(0x138)),type_graphql_1=require(a0_0x2216c9(0x144)),tool_permission_1=require(a0_0x2216c9(0x13e));function a0_0x361c(_0x40c7e9,_0x5281ef){const _0x458b28=a0_0x458b();return a0_0x361c=function(_0x361cab,_0x4d013d){_0x361cab=_0x361cab-0x137;let _0x177fc2=_0x458b28[_0x361cab];return _0x177fc2;},a0_0x361c(_0x40c7e9,_0x5281ef);}let OperatoToolResolver=class{async['studioPermission'](_0x14bab3){return(0x0,tool_permission_1['checkStudioPermission'])();}async[a0_0x2216c9(0x13c)](_0x10dcdb,_0x1f6c91){const _0x9a8183=a0_0x2216c9;return(0x0,tool_permission_1[_0x9a8183(0x150)])(_0x10dcdb,_0x1f6c91);}};tslib_1[a0_0x2216c9(0x151)]([(0x0,type_graphql_1['Query'])(_0x17d564=>Boolean,{'description':a0_0x2216c9(0x147)}),tslib_1[a0_0x2216c9(0x14f)](0x0,(0x0,type_graphql_1[a0_0x2216c9(0x13b)])()),tslib_1[a0_0x2216c9(0x142)](a0_0x2216c9(0x13a),Function),tslib_1[a0_0x2216c9(0x142)]('design:paramtypes',[Object]),tslib_1[a0_0x2216c9(0x142)]('design:returntype',Promise)],OperatoToolResolver[a0_0x2216c9(0x140)],'studioPermission',null),tslib_1[a0_0x2216c9(0x151)]([(0x0,type_graphql_1[a0_0x2216c9(0x14d)])(_0x2cb40a=>Boolean,{'description':'Operato\x20Tool\x20Studio\x20Limit\x20check'}),tslib_1[a0_0x2216c9(0x14f)](0x0,(0x0,type_graphql_1[a0_0x2216c9(0x137)])('id')),tslib_1[a0_0x2216c9(0x14f)](0x1,(0x0,type_graphql_1[a0_0x2216c9(0x13b)])()),tslib_1[a0_0x2216c9(0x142)](a0_0x2216c9(0x13a),Function),tslib_1[a0_0x2216c9(0x142)](a0_0x2216c9(0x143),[String,Object]),tslib_1[a0_0x2216c9(0x142)]('design:returntype',Promise)],OperatoToolResolver[a0_0x2216c9(0x140)],a0_0x2216c9(0x13c),null),OperatoToolResolver=tslib_1[a0_0x2216c9(0x151)]([(0x0,type_graphql_1['Resolver'])()],OperatoToolResolver),exports['OperatoToolResolver']=OperatoToolResolver;function a0_0x458b(){const _0x293dfb=['__metadata','design:paramtypes','type-graphql','2196047ejjpci','131238oZSvQl','Operato\x20Tool\x20Studio\x20Usage\x20Permissions','731068lmFgEo','18JDYisE','2354370KkzTAI','3535810ZuXSuZ','30191ValcdV','Query','__esModule','__param','checkStudioTemplateIsOverLimit','__decorate','Arg','tslib','16RzeVrp','design:type','Ctx','studioTemplateIsOverLimit','843711gpNygL','./tool-permission','OperatoToolResolver','prototype','2OKjSrZ'];a0_0x458b=function(){return _0x293dfb;};return a0_0x458b();}
|