@things-factory/operato-tools 6.1.35 → 6.1.36
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 +7 -7
- package/client/pages/generator/menu-config-tab-mixin.js +12 -12
- package/client/pages/generator/meta-generator-page.js +11 -11
- package/client/pages/generator/search-config-tab-mixin.js +4 -4
- package/client/pages/generator/tab-config-tab-mixin.js +4 -4
- package/client/pages/main.js +4 -4
- package/client/reducers/main.js +1 -1
- package/package.json +3 -3
- package/server/constants/error-code.js +1 -1
- package/server/errors/license-error.js +1 -1
- package/server/routes.js +1 -1
- package/server/service/tool-entity/create-menu.js +1 -1
- package/server/service/tool-entity/create-service.js +1 -1
- package/server/service/tool-secret/tool-permission.js +1 -1
- package/server/service/tool-secret/tool-resolver.js +1 -1
package/client/pages/main.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a0_0x5e1118=a0_0x3e03;(function(_0x17295e,_0x36d3ed){var _0x5413e1=a0_0x3e03,_0x4b1be4=_0x17295e();while(!![]){try{var _0x4248ac=-parseInt(_0x5413e1(0x8b))/0x1*(-parseInt(_0x5413e1(0x94))/0x2)+-parseInt(_0x5413e1(0x89))/0x3+parseInt(_0x5413e1(0x86))/0x4*(-parseInt(_0x5413e1(0x8c))/0x5)+-parseInt(_0x5413e1(0x87))/0x6+parseInt(_0x5413e1(0x90))/0x7*(-parseInt(_0x5413e1(0x8e))/0x8)+-parseInt(_0x5413e1(0x97))/0x9*(parseInt(_0x5413e1(0x91))/0xa)+parseInt(_0x5413e1(0x92))/0xb;if(_0x4248ac===_0x36d3ed)break;else _0x4b1be4['push'](_0x4b1be4['shift']());}catch(_0x13c303){_0x4b1be4['push'](_0x4b1be4['shift']());}}}(a0_0x8d7b,0x9d076));import{html,css}from'lit-element';import{connect}from'pwa-helpers/connect-mixin.js';import{store,PageView}from'@things-factory/shell';import{TermsUtil}from'@things-factory/meta-ui';class OperatoToolsMain extends connect(store)(PageView){static get[a0_0x5e1118(0x95)](){return[css`
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
4
|
background-color: var(--main-section-background-color);
|
|
@@ -41,11 +41,11 @@ var a0_0x118d6e=a0_0x6175;(function(_0x254ac7,_0x55b17e){var _0x752245=a0_0x6175
|
|
|
41
41
|
display: none;
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
`];}get[
|
|
44
|
+
`];}get[a0_0x5e1118(0x8d)](){var _0x15b8f7=a0_0x5e1118;return{'title':_0x15b8f7(0x8a),'actions':[]};}[a0_0x5e1118(0x93)](){var _0x3bffc3=a0_0x5e1118;return html`
|
|
45
45
|
<h2>Operato Tools</h2>
|
|
46
46
|
<p page-description>
|
|
47
|
-
${TermsUtil[
|
|
47
|
+
${TermsUtil[_0x3bffc3(0x8f)](_0x3bffc3(0x98))}
|
|
48
48
|
</p>
|
|
49
49
|
|
|
50
50
|
<img src="/assets/images/operato-tools.png" />
|
|
51
|
-
`;}}
|
|
51
|
+
`;}}function a0_0x8d7b(){var _0x31f0d8=['110fbMmiu','45530045ZgtFbl','render','117422wDauMS','styles','operato-tools-main','577377GuSpLK','tool\x20start\x20msg','4748956huyHBE','7584642GntmfW','define','333378tVwUuK','Operato\x20Tools','6EMSdkT','5NEXrxe','context','290008SShiOz','tText','112oREahR'];a0_0x8d7b=function(){return _0x31f0d8;};return a0_0x8d7b();}function a0_0x3e03(_0x5c0b0d,_0x22692c){var _0x8d7b78=a0_0x8d7b();return a0_0x3e03=function(_0x3e0379,_0x2e014a){_0x3e0379=_0x3e0379-0x86;var _0x666bfc=_0x8d7b78[_0x3e0379];return _0x666bfc;},a0_0x3e03(_0x5c0b0d,_0x22692c);}window['customElements'][a0_0x5e1118(0x88)](a0_0x5e1118(0x96),OperatoToolsMain);
|
package/client/reducers/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a0_0x24ca7e=a0_0x5ac0;(function(_0x1df313,_0x378e7a){const _0x4876f2=a0_0x5ac0,_0x3bc767=_0x1df313();while(!![]){try{const _0xa0dcff=-parseInt(_0x4876f2(0x148))/0x1+parseInt(_0x4876f2(0x14a))/0x2+-parseInt(_0x4876f2(0x147))/0x3+-parseInt(_0x4876f2(0x146))/0x4+parseInt(_0x4876f2(0x144))/0x5*(parseInt(_0x4876f2(0x13a))/0x6)+parseInt(_0x4876f2(0x13e))/0x7+parseInt(_0x4876f2(0x142))/0x8*(parseInt(_0x4876f2(0x149))/0x9);if(_0xa0dcff===_0x378e7a)break;else _0x3bc767['push'](_0x3bc767['shift']());}catch(_0x15bf6f){_0x3bc767['push'](_0x3bc767['shift']());}}}(a0_0xdb30,0x715eb));import a0_0x2876bb from'graphql-tag';function a0_0x5ac0(_0x44553c,_0x2a49a0){const _0xdb305e=a0_0xdb30();return a0_0x5ac0=function(_0x5ac04a,_0x557dda){_0x5ac04a=_0x5ac04a-0x13a;let _0x34eaaf=_0xdb305e[_0x5ac04a];return _0x34eaaf;},a0_0x5ac0(_0x44553c,_0x2a49a0);}import{i18next}from'@operato/i18n';function a0_0xdb30(){const _0x4912d4=['query','dispatch','data','43992ZAjlDx','errors','784165aTBRbL','type','196288hNakQy','1877898tyazXX','231419LLsvlJ','837hYPHzy','39784pSGNPP','6lOqKyQ','UPDATE_OPERATO_TOOLS_PERMISSION','ABC','studioPermission','4778816ABeVbS'];a0_0xdb30=function(){return _0x4912d4;};return a0_0xdb30();}import{store}from'@operato/shell';import{client,gqlContext}from'@operato/graphql';import{UPDATE_OPERATO_TOOLS}from'../actions/main';const INITIAL_STATE={'operatoTools':a0_0x24ca7e(0x13c),'studioPermission':!0x1};export const UPDATE_OPERATO_TOOLS_PERMISSION=a0_0x24ca7e(0x13b);((async()=>{const _0x360032=a0_0x24ca7e;var _0x491540=await client[_0x360032(0x13f)]({'query':a0_0x2876bb`{studioPermission}`});let _0x110fb0=!0x1;_0x491540[_0x360032(0x143)]||(_0x110fb0=_0x491540[_0x360032(0x141)][_0x360032(0x13d)]),store[_0x360032(0x140)]({'type':UPDATE_OPERATO_TOOLS_PERMISSION,'state':{'studioPermission':_0x110fb0}});})());const operatoTools=(_0x33f571=INITIAL_STATE,_0xf1f21)=>{const _0x200a5e=a0_0x24ca7e;switch(_0xf1f21[_0x200a5e(0x145)]){case UPDATE_OPERATO_TOOLS:return{..._0x33f571};case UPDATE_OPERATO_TOOLS_PERMISSION:return{...INITIAL_STATE,..._0xf1f21['state']};default:return _0x33f571;}};export default operatoTools;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/operato-tools",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.36",
|
|
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.36",
|
|
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": "ee0c07804730615fe91dc92d83f388de9e8412ed"
|
|
40
40
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a0_0x306988=a0_0x594c;(function(_0x541af4,_0x3239d7){var _0x1254a3=a0_0x594c,_0x5b4432=_0x541af4();while(!![]){try{var _0x315d63=-parseInt(_0x1254a3(0x1f9))/0x1*(-parseInt(_0x1254a3(0x1f7))/0x2)+-parseInt(_0x1254a3(0x1fc))/0x3*(parseInt(_0x1254a3(0x1f2))/0x4)+parseInt(_0x1254a3(0x1fe))/0x5*(parseInt(_0x1254a3(0x1ee))/0x6)+parseInt(_0x1254a3(0x1f1))/0x7*(-parseInt(_0x1254a3(0x1fa))/0x8)+parseInt(_0x1254a3(0x1fb))/0x9*(-parseInt(_0x1254a3(0x1f3))/0xa)+parseInt(_0x1254a3(0x1f8))/0xb*(-parseInt(_0x1254a3(0x1f0))/0xc)+parseInt(_0x1254a3(0x1ed))/0xd;if(_0x315d63===_0x3239d7)break;else _0x5b4432['push'](_0x5b4432['shift']());}catch(_0x282d2b){_0x5b4432['push'](_0x5b4432['shift']());}}}(a0_0x2ce0,0x24def));Object['defineProperty'](exports,a0_0x306988(0x1fd),{'value':!0x0}),exports[a0_0x306988(0x1ef)]=exports['INVALID_LICENSE']=void 0x0,exports[a0_0x306988(0x1f4)]=a0_0x306988(0x1f5),exports[a0_0x306988(0x1ef)]=a0_0x306988(0x1f6);function a0_0x594c(_0x2e24c9,_0xe1d815){var _0x2ce056=a0_0x2ce0();return a0_0x594c=function(_0x594c6b,_0x5a7b89){_0x594c6b=_0x594c6b-0x1ed;var _0x3203b8=_0x2ce056[_0x594c6b];return _0x3203b8;},a0_0x594c(_0x2e24c9,_0xe1d815);}function a0_0x2ce0(){var _0x3cb6d9=['2972DTVihH','488785dHpuuE','29HaIWGV','10096ZeeeEP','56034VPqWpU','60SgBcnz','__esModule','5085lmRnOX','5847283PKsdmv','1386jOwgkm','OVER_LIMIT','12lPVdAJ','1183ByGBom','43892THhVdQ','160hLkGME','INVALID_LICENSE','error.invalid\x20license\x20key','error.page\x20count\x20over\x20license\x20limit'];a0_0x2ce0=function(){return _0x3cb6d9;};return a0_0x2ce0();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';function a0_0xb263(){const _0x5aa2a6=['../constants/error-code','detail','77LTeLBq','LicenseError','3907008sPQvGI','defineProperty','ERROR_CODES','78mgYHQO','90774AiAMzQ','license-error','1783384rixNUq','40nwfttR','20yucdfD','534326uXLPWr','tslib','__esModule','81604TBgsex','assign','260435EWFFzi','183110BJAxDX'];a0_0xb263=function(){return _0x5aa2a6;};return a0_0xb263();}const a0_0x3cd956=a0_0x3ad7;(function(_0x32ab27,_0x928ec5){const _0x1d15ae=a0_0x3ad7,_0x21dd0e=_0x32ab27();while(!![]){try{const _0x417426=parseInt(_0x1d15ae(0x169))/0x1+parseInt(_0x1d15ae(0x166))/0x2+parseInt(_0x1d15ae(0x163))/0x3*(-parseInt(_0x1d15ae(0x16c))/0x4)+-parseInt(_0x1d15ae(0x168))/0x5*(-parseInt(_0x1d15ae(0x164))/0x6)+-parseInt(_0x1d15ae(0x16e))/0x7*(parseInt(_0x1d15ae(0x167))/0x8)+-parseInt(_0x1d15ae(0x160))/0x9+parseInt(_0x1d15ae(0x16f))/0xa*(parseInt(_0x1d15ae(0x172))/0xb);if(_0x417426===_0x928ec5)break;else _0x21dd0e['push'](_0x21dd0e['shift']());}catch(_0x23a124){_0x21dd0e['push'](_0x21dd0e['shift']());}}}(a0_0xb263,0x71514));Object[a0_0x3cd956(0x161)](exports,a0_0x3cd956(0x16b),{'value':!0x0}),exports[a0_0x3cd956(0x173)]=void 0x0;function a0_0x3ad7(_0x2b39d3,_0x5ec0f7){const _0xb263b9=a0_0xb263();return a0_0x3ad7=function(_0x3ad73d,_0xe7792d){_0x3ad73d=_0x3ad73d-0x160;let _0x2ccb93=_0xb263b9[_0x3ad73d];return _0x2ccb93;},a0_0x3ad7(_0x2b39d3,_0x5ec0f7);}const tslib_1=require(a0_0x3cd956(0x16a)),ERROR_CODES=tslib_1['__importStar'](require(a0_0x3cd956(0x170)));class LicenseError extends Error{static get[a0_0x3cd956(0x162)](){const _0x24d183=a0_0x3cd956;return Object[_0x24d183(0x16d)]({},ERROR_CODES);}constructor({errorCode:_0x253f83,detail:_0x14e398}){const _0x59457c=a0_0x3cd956;super(_0x253f83),this['name']=_0x59457c(0x165),this['errorCode']=_0x253f83,this[_0x59457c(0x171)]=_0x14e398;}}exports['LicenseError']=LicenseError;
|
package/server/routes.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a0_0x24ab5f=a0_0x1a51;function a0_0x1a51(_0x3bb89e,_0x10bd48){const _0x3b7946=a0_0x3b79();return a0_0x1a51=function(_0x1a5114,_0x1991ec){_0x1a5114=_0x1a5114-0x6e;let _0x43e7dd=_0x3b7946[_0x1a5114];return _0x43e7dd;},a0_0x1a51(_0x3bb89e,_0x10bd48);}(function(_0xbf3e9f,_0x55745b){const _0x18f4fc=a0_0x1a51,_0x6ce9cd=_0xbf3e9f();while(!![]){try{const _0x372f0e=parseInt(_0x18f4fc(0x6e))/0x1*(parseInt(_0x18f4fc(0x74))/0x2)+parseInt(_0x18f4fc(0x7e))/0x3*(parseInt(_0x18f4fc(0x7d))/0x4)+parseInt(_0x18f4fc(0x6f))/0x5+parseInt(_0x18f4fc(0x79))/0x6*(parseInt(_0x18f4fc(0x72))/0x7)+-parseInt(_0x18f4fc(0x7c))/0x8*(parseInt(_0x18f4fc(0x75))/0x9)+parseInt(_0x18f4fc(0x76))/0xa*(parseInt(_0x18f4fc(0x70))/0xb)+-parseInt(_0x18f4fc(0x7a))/0xc*(parseInt(_0x18f4fc(0x78))/0xd);if(_0x372f0e===_0x55745b)break;else _0x6ce9cd['push'](_0x6ce9cd['shift']());}catch(_0x2337e3){_0x6ce9cd['push'](_0x6ce9cd['shift']());}}}(a0_0x3b79,0x8bd34));function a0_0x3b79(){const _0x155d63=['1961108ijaPSe','6fZTreY','283wefRMj','3810890mfBxqg','1903svqZan','bootstrap-module-domain-private-route','1346401dgIXbg','bootstrap-module-domain-public-route','3248pJoLUW','16776wZfQYO','19430eLjYRG','debug','9752041dETGeo','24COFoAk','36gWXkuK','things-factory:operato-tools:routes','2080gmtFYb'];a0_0x3b79=function(){return _0x155d63;};return a0_0x3b79();}const debug=require(a0_0x24ab5f(0x77))(a0_0x24ab5f(0x7b));process['on']('bootstrap-module-global-public-route',(_0x13b48d,_0x171e66)=>{}),process['on']('bootstrap-module-global-private-route',(_0x489d50,_0x11c884)=>{}),process['on'](a0_0x24ab5f(0x73),(_0x1148a5,_0x4123c5)=>{}),process['on'](a0_0x24ab5f(0x71),(_0x2f63a5,_0x3668c8)=>{});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x1cfde9=a0_0x2c47;(function(_0x323d3e,_0xab22f5){const _0x3025fc=a0_0x2c47,_0x2bcb44=_0x323d3e();while(!![]){try{const _0x3f811b=parseInt(_0x3025fc(0x156))/0x1+-parseInt(_0x3025fc(0x197))/0x2+parseInt(_0x3025fc(0x184))/0x3+parseInt(_0x3025fc(0x170))/0x4*(-parseInt(_0x3025fc(0x1a1))/0x5)+parseInt(_0x3025fc(0x1ab))/0x6+-parseInt(_0x3025fc(0x1c7))/0x7*(-parseInt(_0x3025fc(0x1c2))/0x8)+parseInt(_0x3025fc(0x1b9))/0x9*(parseInt(_0x3025fc(0x1b5))/0xa);if(_0x3f811b===_0xab22f5)break;else _0x2bcb44['push'](_0x2bcb44['shift']());}catch(_0x23f199){_0x2bcb44['push'](_0x2bcb44['shift']());}}}(a0_0x1343,0xe0515));function a0_0x1343(){const _0xa475e3=['findOne','meta-grist-page','Directive','@things-factory/resource-base','40nyvqlP','createMenuData','updatedAt','created_at','\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}','1302091MwgfFh','randomBytes','{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22','{\x22name\x22:\x20\x22','reverseSort','final','enc','push','template','map','\x22,\x22operator\x22:\x20\x22','COPY','EntityColumn','creator','634798jHqYAn','\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}','join','{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22','prototype','JSON','@transaction','category','createGridColumns','parent','update','rank','aes-256-cfb1','hidden','Ctx','sort','replace','creator_id','length','toolCreateMenu','getRepository','assign','refType','__metadata','Menu','\x22,\x22width\x22:','3368whKrLp','readonly','__param','lodash','\x22,\x22header\x22:\x20\x22','searchRank','dataProp','query','design:returntype','pluralize','left',',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22','searchOper','default','state','type-graphql','utf8','{\x22name\x22:\x22','save','parent_menu_id','2672481QLyjDL','routing','createSortCols','name','from','crypto','aes-256-ecb','substring','design:type','string','updater_id','__importDefault','resourceUrl','createSearchCols','aes-256-ofb','\x22,\x22desc\x22:','\x20,\x22exportable\x22:\x20true','find','scenario','2267680ylJGnj','sortRank','gridRank','aes-256-cfb8','\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','createdAt','Mutation','SCREEN','aes-256-cfb',',\x22mandatory\x22:\x20','5865KHaVCQ','tslib','Entity','entity','hiddenFlag','refName',',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22',',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22','defineProperty','\x22,\x22name\x22:\x20\x22','905136PwrLHy','Resolver','select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27','\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','\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}','updated_at','OperatoToolCreateMenu','\x20,\x22editable\x22:\x20','filter','4337650qwfIOP',',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22','hex','h1z0q9i9x7q6','9JeAzuL','__esModule','aes-256-ctr','@things-factory/menu-base','Arg'];a0_0x1343=function(){return _0xa475e3;};return a0_0x1343();}function a0_0x2c47(_0x56f737,_0x35635a){const _0x13433b=a0_0x1343();return a0_0x2c47=function(_0x2c47ec,_0x3f3102){_0x2c47ec=_0x2c47ec-0x156;let _0x308c3f=_0x13433b[_0x2c47ec];return _0x308c3f;},a0_0x2c47(_0x56f737,_0x35635a);}Object[a0_0x1cfde9(0x1a9)](exports,a0_0x1cfde9(0x1ba),{'value':!0x0}),exports['OperatoToolCreateMenu']=void 0x0;const tslib_1=require(a0_0x1cfde9(0x1a2)),type_graphql_1=require(a0_0x1cfde9(0x17f)),resource_base_1=require(a0_0x1cfde9(0x1c1)),menu_base_1=require(a0_0x1cfde9(0x1bc)),tool_permission_1=require('./../tool-secret/tool-permission'),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x1cfde9(0x173)),{plural:plural}=require(a0_0x1cfde9(0x179)),crypto_1=tslib_1[a0_0x1cfde9(0x18f)](require(a0_0x1cfde9(0x189)));let OperatoToolCreateMenu=class{async[a0_0x1cfde9(0x169)](_0x1dc4d9,_0x5bc984,_0x11f7a7){const _0x324b28=a0_0x1cfde9,{domain:_0x3bc5db,user:_0x4802d8,tx:_0x5720ad}=_0x11f7a7[_0x324b28(0x17e)];await(0x0,tool_permission_1['checkStudioTemplateIsOverLimit'])('',_0x11f7a7);const _0x363d8d=await _0x5720ad['getRepository'](resource_base_1[_0x324b28(0x1a3)])['findOne']({'where':{'domain':{'id':_0x3bc5db['id']},'id':_0x1dc4d9}}),_0x45c092=await _0x5720ad[_0x324b28(0x16a)](resource_base_1[_0x324b28(0x1d3)])[_0x324b28(0x195)]({'where':{'domain':{'id':_0x3bc5db['id']},'entity':{'id':_0x363d8d['id']}}});let {name:_0x2c890c=''}=_0x363d8d||{},_0x4043f2=kebabCase(_0x2c890c),_0x196a71=modelTemplate[_0x324b28(0x166)](/{{pascalCase name}}/g,startCase(camelCase(_0x2c890c))[_0x324b28(0x166)](/ /g,''))['replace'](/{{camelCase name}}/g,camelCase(_0x2c890c))[_0x324b28(0x166)](/{{snakeCase name}}/g,snakeCase(_0x2c890c))[_0x324b28(0x166)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x2c890c)))[_0x324b28(0x166)](/ /g,''))['replace'](/{{pluralCamelCase name}}/g,camelCase(plural(_0x2c890c)))[_0x324b28(0x166)](/{{name}}/g,_0x2c890c),_0x8f153e='';_0x324b28(0x15b)==_0x363d8d['dataProp']?_0x8f153e=_0x324b28(0x1ae):_0x324b28(0x1d2)==_0x363d8d[_0x324b28(0x176)]&&(_0x8f153e=_0x324b28(0x19b)),_0x196a71=_0x196a71[_0x324b28(0x166)](/{{HistoryButton}}/g,_0x8f153e);let _0x2a81b=this[_0x324b28(0x186)](_0x45c092);_0x196a71=_0x196a71[_0x324b28(0x166)](/{{SortColumns}}/g,_0x2a81b[_0x324b28(0x158)](','));let _0x4ece0c=this[_0x324b28(0x191)](_0x45c092);_0x196a71=_0x196a71[_0x324b28(0x166)](/{{SearchColumns}}/g,_0x4ece0c[_0x324b28(0x158)](','));let _0x3f55a9=this[_0x324b28(0x15e)](_0x45c092);return _0x196a71=_0x196a71[_0x324b28(0x166)](/{{GridColumns}}/g,_0x3f55a9[_0x324b28(0x158)](',')),_0x196a71=this[_0x324b28(0x1cd)](_0x196a71),await this[_0x324b28(0x1c3)](_0x5720ad,_0x3bc5db,_0x4802d8,_0x5bc984,_0x4043f2,_0x196a71),!0x0;}[a0_0x1cfde9(0x15e)](_0x381856){const _0x51abe0=a0_0x1cfde9;return _0x381856[_0x51abe0(0x1b4)](_0x240ff8=>'id'!=_0x240ff8[_0x51abe0(0x187)]&&_0x240ff8[_0x51abe0(0x199)]>0x0)[_0x51abe0(0x165)](function(_0x206aff,_0x4ed5cb){const _0x31321f=_0x51abe0;return _0x206aff[_0x31321f(0x199)]-_0x4ed5cb['gridRank'];})[_0x51abe0(0x1d0)](_0x3733f1=>{const _0x9a665d=_0x51abe0;let {gridEditor:_0x1fe7c1='string',name:_0x1c460c,term:_0x4a776a,gridWidth:_0x43d0a4=0x0,gridAlign:_0x1e0c1a='left',nullable:_0x167ab9=!0x1}=_0x3733f1;if(null==_0x1fe7c1&&(_0x1fe7c1=_0x9a665d(0x18d)),null==_0x1e0c1a&&(_0x1e0c1a=_0x9a665d(0x17a)),_0x9a665d(0x18e)==_0x1c460c||_0x9a665d(0x167)==_0x1c460c)return _0x1c460c=_0x9a665d(0x18e)==_0x1c460c?'updater':_0x9a665d(0x1d4),_0x9a665d(0x1c9)+_0x1c460c+_0x9a665d(0x174)+_0x1c460c+_0x9a665d(0x157);if(_0x9a665d(0x1b1)==_0x1c460c||_0x9a665d(0x1c5)==_0x1c460c)return _0x9a665d(0x159)+(_0x9a665d(0x1b1)==_0x1c460c?_0x9a665d(0x1c4):_0x9a665d(0x19c))+_0x9a665d(0x174)+_0x1c460c+_0x9a665d(0x1c6);let _0x2a765e=_0x9a665d(0x171)!=_0x1fe7c1&&_0x9a665d(0x163)!=_0x1fe7c1,_0x4fb2fc=_0x9a665d(0x163)==_0x1fe7c1;0x1!=_0x4fb2fc&&0x0!=_0x2a765e||(_0x1fe7c1=_0x9a665d(0x18d));let _0x507534='{\x22type\x22:\x20\x22'+_0x1fe7c1+_0x9a665d(0x1aa)+camelCase(_0x1c460c)+'\x22,\x22header\x22:\x20\x22'+_0x4a776a+'\x22,\x22hidden\x22:'+_0x4fb2fc+_0x9a665d(0x1b3)+_0x2a765e+_0x9a665d(0x1a0)+!_0x167ab9+_0x9a665d(0x1a7)+_0x1e0c1a+_0x9a665d(0x16f)+_0x43d0a4+_0x9a665d(0x194);return'code'==_0x3733f1[_0x9a665d(0x16c)]&&(_0x507534+=_0x9a665d(0x17b)+_0x3733f1['refName']+'\x22}'),_0x9a665d(0x196)==_0x3733f1['refType']&&(_0x507534+=_0x9a665d(0x1b6)+_0x3733f1[_0x9a665d(0x1a6)]+'\x22}'),_0x9a665d(0x1a4)==_0x3733f1[_0x9a665d(0x16c)]&&(_0x507534+=_0x9a665d(0x1a8)+camelCase(plural(_0x3733f1[_0x9a665d(0x1a6)]))+_0x9a665d(0x1b0)),_0x507534+='}',_0x507534;});}[a0_0x1cfde9(0x191)](_0x433737){const _0x73bd22=a0_0x1cfde9;return _0x433737[_0x73bd22(0x1b4)](_0xddbafb=>_0xddbafb[_0x73bd22(0x175)]>0x0)[_0x73bd22(0x165)](function(_0x2ef3c2,_0x3bd5cb){const _0x591cf3=_0x73bd22;return _0x2ef3c2['searchRank']-_0x3bd5cb[_0x591cf3(0x175)];})[_0x73bd22(0x1d0)](_0x25b412=>{const _0x427c97=_0x73bd22;let _0x83e37e=_0x25b412[_0x427c97(0x17c)];return _0x427c97(0x1b4)==_0x83e37e?'\x22'+camelCase(_0x25b412[_0x427c97(0x187)])+'\x22':(_0x83e37e||(_0x83e37e='eq'),_0x427c97(0x1ca)+camelCase(_0x25b412[_0x427c97(0x187)])+_0x427c97(0x1d1)+_0x83e37e+'\x22}');});}[a0_0x1cfde9(0x186)](_0x1c8e6a){const _0x3e34f9=a0_0x1cfde9;return _0x1c8e6a[_0x3e34f9(0x1b4)](_0x123902=>_0x123902['sortRank']>0x0)[_0x3e34f9(0x165)](function(_0xad4c1e,_0x3142ac){const _0x324dd1=_0x3e34f9;return _0xad4c1e[_0x324dd1(0x198)]-_0x3142ac[_0x324dd1(0x198)];})[_0x3e34f9(0x1d0)](_0x20d7de=>_0x3e34f9(0x181)+camelCase(_0x20d7de[_0x3e34f9(0x187)])+_0x3e34f9(0x193)+_0x20d7de[_0x3e34f9(0x1cb)]+'}');}async[a0_0x1cfde9(0x1c3)](_0x9ac72c,_0x2fc9cd,_0x48e9dd,_0x2cc09d,_0x1c0c87,_0x5b91f9){const _0x1de317=a0_0x1cfde9;let _0x124e88=await _0x9ac72c[_0x1de317(0x16a)](menu_base_1[_0x1de317(0x16e)])[_0x1de317(0x1be)]({'where':{'domain':{'id':_0x2fc9cd['id']},'id':_0x2cc09d}}),_0x5de221=(await _0x9ac72c[_0x1de317(0x16a)](menu_base_1[_0x1de317(0x16e)])[_0x1de317(0x177)](_0x1de317(0x1ad)+_0x2cc09d+'\x27\x20or\x20id\x20=\x20\x27'+_0x2cc09d+'\x27'))[0x0][_0x1de317(0x161)]+0xa,_0x38a566=new menu_base_1[(_0x1de317(0x16e))]();_0x38a566['name']=_0x1c0c87,_0x38a566['menuType']=_0x1de317(0x19e),_0x38a566[_0x1de317(0x15d)]=_0x1de317(0x1bf),_0x38a566['rank']=_0x5de221,_0x38a566[_0x1de317(0x1a5)]=!0x1,_0x38a566[_0x1de317(0x185)]=_0x1c0c87,_0x38a566[_0x1de317(0x1cf)]=_0x5b91f9,_0x38a566[_0x1de317(0x190)]=_0x1de317(0x1af),_0x38a566[_0x1de317(0x15f)]=_0x124e88,await _0x9ac72c[_0x1de317(0x16a)](menu_base_1['Menu'])[_0x1de317(0x182)](Object[_0x1de317(0x16b)](Object[_0x1de317(0x16b)]({},_0x38a566),{'domain':_0x2fc9cd,'creator':_0x48e9dd,'updater':_0x48e9dd}));}[a0_0x1cfde9(0x1cd)](_0x2eac01){const _0xa62e37=a0_0x1cfde9;let _0xed45ee=JSON['stringify'](_0x2eac01)['split'](/(.{100})/)[_0xa62e37(0x1b4)](_0x7683cd=>_0x7683cd),_0x5aa834=[_0xa62e37(0x18a),'aes-256-cbc',_0xa62e37(0x19f),_0xa62e37(0x19a),_0xa62e37(0x162),_0xa62e37(0x192),_0xa62e37(0x1bb),'aes256'],_0x35fb3c=crypto_1[_0xa62e37(0x17d)][_0xa62e37(0x1c8)](0x20)['toString'](_0xa62e37(0x1b7)),_0x385f89=Buffer[_0xa62e37(0x188)](_0x35fb3c,'hex'),_0x4a5d9a=_0x35fb3c[_0xa62e37(0x18b)](0x0,0x10),_0xa0dfd5=['',_0x4a5d9a,_0x4a5d9a,_0x4a5d9a,_0x4a5d9a,_0x4a5d9a,_0x4a5d9a,_0x4a5d9a],_0x33a02a=0x0,_0x274d62=[];_0x274d62[_0xa62e37(0x1ce)](_0x35fb3c);for(var _0x5da3a9=0x0;_0x5da3a9<_0xed45ee[_0xa62e37(0x168)];_0x5da3a9++,_0x33a02a++){_0x33a02a==_0x5aa834['length']&&(_0x33a02a=0x0);let _0x137cb8=crypto_1[_0xa62e37(0x17d)]['createCipheriv'](_0x5aa834[_0x33a02a],_0x385f89,_0xa0dfd5[_0x33a02a]),_0x511dd4=_0x137cb8[_0xa62e37(0x160)](_0xed45ee[_0x5da3a9],_0xa62e37(0x180),_0xa62e37(0x1b7));_0x511dd4+=_0x137cb8[_0xa62e37(0x1cc)](_0xa62e37(0x1b7)),_0x274d62[_0xa62e37(0x1ce)](_0x511dd4);}return _0x274d62['join'](_0xa62e37(0x1b8));}};tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x1cfde9(0x1c0)])(a0_0x1cfde9(0x15c)),(0x0,type_graphql_1[a0_0x1cfde9(0x19d)])(_0x52d7c0=>Boolean,{'description':'Operato\x20Tool\x20Create\x20Menu'}),tslib_1[a0_0x1cfde9(0x172)](0x0,(0x0,type_graphql_1[a0_0x1cfde9(0x1bd)])('id')),tslib_1[a0_0x1cfde9(0x172)](0x1,(0x0,type_graphql_1[a0_0x1cfde9(0x1bd)])(a0_0x1cfde9(0x183))),tslib_1[a0_0x1cfde9(0x172)](0x2,(0x0,type_graphql_1[a0_0x1cfde9(0x164)])()),tslib_1['__metadata'](a0_0x1cfde9(0x18c),Function),tslib_1[a0_0x1cfde9(0x16d)]('design:paramtypes',[String,String,Object]),tslib_1['__metadata'](a0_0x1cfde9(0x178),Promise)],OperatoToolCreateMenu[a0_0x1cfde9(0x15a)],a0_0x1cfde9(0x169),null),OperatoToolCreateMenu=tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x1cfde9(0x1ac)])()],OperatoToolCreateMenu),exports[a0_0x1cfde9(0x1b2)]=OperatoToolCreateMenu;const modelTemplate='\x0a{\x0a\x20\x20\x22menu\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x22title\x22:\x20\x22{{name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22\x22,\x0a\x20\x20\x20\x20\x20\x20\x22desc\x22:\x20\x22\x22\x0a\x20\x20},\x0a\x20\x20\x22gql\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x22query\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22list_func\x22:\x20\x22{{pluralCamelCase\x20name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22find_one_func\x22:\x22{{camelCase\x20name}}\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x22mutation\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22multiple\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22func\x22:\x22updateMultiple{{pascalCase\x20name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22{{pascalCase\x20name}}Patch\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22delete\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22func\x22:\x22delete{{pluralPascalCase\x20name}}\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20},\x0a\x20\x20\x22button\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22export\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22add\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22delete\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22save\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20],\x0a\x20\x20\x22grid_column\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22string\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22id\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22header\x22:\x20\x22id\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22hidden\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22editable\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22mandatory\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22sortable\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22align\x22:\x20\x22left\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22width\x22:\x200,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22exportable\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20},\x0a{{GridColumns}}\x0a\x20\x20],\x0a\x20\x20\x22grid\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22button\x22:[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{{HistoryButton}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22option\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22mobile_mode\x22:\x20\x22LIST\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22desk_mode\x22:\x20\x22GRID\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22use_row_checker\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22pages\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2020,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2050,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20100,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20300\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22view_mode\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22GRID\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22LIST\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22CARD\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22sorters\x22:\x20[\x0a{{SortColumns}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20]\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x22row\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22multiple_select\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22click\x22:\x20\x22select-row-toggle\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20},\x0a\x20\x20\x22search\x22:\x20[\x0a{{SearchColumns}}\x0a\x20\x20]\x0a}\x0a';
|
|
1
|
+
'use strict';const a0_0x255749=a0_0x3c9d;(function(_0x1b1ec9,_0x418db5){const _0xefb4cf=a0_0x3c9d,_0x38221e=_0x1b1ec9();while(!![]){try{const _0x1b8a45=-parseInt(_0xefb4cf(0x17b))/0x1+parseInt(_0xefb4cf(0x1b1))/0x2+parseInt(_0xefb4cf(0x191))/0x3+-parseInt(_0xefb4cf(0x17e))/0x4+-parseInt(_0xefb4cf(0x18c))/0x5*(parseInt(_0xefb4cf(0x1c8))/0x6)+-parseInt(_0xefb4cf(0x1da))/0x7+-parseInt(_0xefb4cf(0x19a))/0x8*(-parseInt(_0xefb4cf(0x1a0))/0x9);if(_0x1b8a45===_0x418db5)break;else _0x38221e['push'](_0x38221e['shift']());}catch(_0x385d37){_0x38221e['push'](_0x38221e['shift']());}}}(a0_0x450d,0x7dbd7));Object[a0_0x255749(0x18f)](exports,a0_0x255749(0x1a8),{'value':!0x0}),exports[a0_0x255749(0x186)]=void 0x0;const tslib_1=require(a0_0x255749(0x1a7)),type_graphql_1=require(a0_0x255749(0x1e1)),resource_base_1=require(a0_0x255749(0x1f4)),menu_base_1=require(a0_0x255749(0x1d6)),tool_permission_1=require('./../tool-secret/tool-permission'),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x255749(0x17f)),{plural:plural}=require(a0_0x255749(0x1d8)),crypto_1=tslib_1['__importDefault'](require(a0_0x255749(0x19b)));function a0_0x3c9d(_0x78b7e5,_0x59239b){const _0x450da3=a0_0x450d();return a0_0x3c9d=function(_0x3c9dc0,_0x6f6b9f){_0x3c9dc0=_0x3c9dc0-0x179;let _0x3058eb=_0x450da3[_0x3c9dc0];return _0x3058eb;},a0_0x3c9d(_0x78b7e5,_0x59239b);}let OperatoToolCreateMenu=class{async['toolCreateMenu'](_0x100500,_0x15492b,_0x2114d3){const _0x2e9976=a0_0x255749,{domain:_0x3fa924,user:_0x1ac21f,tx:_0x432557}=_0x2114d3[_0x2e9976(0x1be)];await(0x0,tool_permission_1[_0x2e9976(0x1c1)])('',_0x2114d3);const _0x5a2601=await _0x432557[_0x2e9976(0x1ed)](resource_base_1[_0x2e9976(0x1e0)])[_0x2e9976(0x1bc)]({'where':{'domain':{'id':_0x3fa924['id']},'id':_0x100500}}),_0x484514=await _0x432557[_0x2e9976(0x1ed)](resource_base_1[_0x2e9976(0x1ca)])['find']({'where':{'domain':{'id':_0x3fa924['id']},'entity':{'id':_0x5a2601['id']}}});let {name:_0x4d74d4=''}=_0x5a2601||{},_0x31b704=kebabCase(_0x4d74d4),_0x193cd1=modelTemplate[_0x2e9976(0x1aa)](/{{pascalCase name}}/g,startCase(camelCase(_0x4d74d4))[_0x2e9976(0x1aa)](/ /g,''))[_0x2e9976(0x1aa)](/{{camelCase name}}/g,camelCase(_0x4d74d4))['replace'](/{{snakeCase name}}/g,snakeCase(_0x4d74d4))[_0x2e9976(0x1aa)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x4d74d4)))['replace'](/ /g,''))['replace'](/{{pluralCamelCase name}}/g,camelCase(plural(_0x4d74d4)))['replace'](/{{name}}/g,_0x4d74d4),_0x2e21f2='';_0x2e9976(0x1ba)==_0x5a2601[_0x2e9976(0x1c5)]?_0x2e21f2=_0x2e9976(0x1d2):_0x2e9976(0x17a)==_0x5a2601[_0x2e9976(0x1c5)]&&(_0x2e21f2='\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'),_0x193cd1=_0x193cd1['replace'](/{{HistoryButton}}/g,_0x2e21f2);let _0x41e7b4=this['createSortCols'](_0x484514);_0x193cd1=_0x193cd1[_0x2e9976(0x1aa)](/{{SortColumns}}/g,_0x41e7b4[_0x2e9976(0x197)](','));let _0x1fc8fb=this[_0x2e9976(0x1cb)](_0x484514);_0x193cd1=_0x193cd1[_0x2e9976(0x1aa)](/{{SearchColumns}}/g,_0x1fc8fb[_0x2e9976(0x197)](','));let _0x406474=this[_0x2e9976(0x1ae)](_0x484514);return _0x193cd1=_0x193cd1[_0x2e9976(0x1aa)](/{{GridColumns}}/g,_0x406474[_0x2e9976(0x197)](',')),_0x193cd1=this[_0x2e9976(0x1b7)](_0x193cd1),await this[_0x2e9976(0x1b5)](_0x432557,_0x3fa924,_0x1ac21f,_0x15492b,_0x31b704,_0x193cd1),!0x0;}[a0_0x255749(0x1ae)](_0xd88168){const _0x335848=a0_0x255749;return _0xd88168[_0x335848(0x183)](_0x29c965=>'id'!=_0x29c965[_0x335848(0x1bb)]&&_0x29c965[_0x335848(0x1b0)]>0x0)[_0x335848(0x188)](function(_0x2d65ad,_0x5d1a75){const _0x1f5ae0=_0x335848;return _0x2d65ad[_0x1f5ae0(0x1b0)]-_0x5d1a75['gridRank'];})[_0x335848(0x1f5)](_0x5bf476=>{const _0x4aa7b3=_0x335848;let {gridEditor:_0x4f6d6a=_0x4aa7b3(0x181),name:_0x3c877d,term:_0x569669,gridWidth:_0x342c78=0x0,gridAlign:_0x582a6b=_0x4aa7b3(0x18a),nullable:_0x3dc71b=!0x1}=_0x5bf476;if(null==_0x4f6d6a&&(_0x4f6d6a=_0x4aa7b3(0x181)),null==_0x582a6b&&(_0x582a6b=_0x4aa7b3(0x18a)),'updater_id'==_0x3c877d||'creator_id'==_0x3c877d)return _0x3c877d=_0x4aa7b3(0x195)==_0x3c877d?_0x4aa7b3(0x1b9):'creator',_0x4aa7b3(0x19e)+_0x3c877d+_0x4aa7b3(0x1c4)+_0x3c877d+_0x4aa7b3(0x1b4);if(_0x4aa7b3(0x1b2)==_0x3c877d||_0x4aa7b3(0x196)==_0x3c877d)return _0x4aa7b3(0x187)+(_0x4aa7b3(0x1b2)==_0x3c877d?_0x4aa7b3(0x1df):_0x4aa7b3(0x1e9))+_0x4aa7b3(0x1c4)+_0x3c877d+_0x4aa7b3(0x1a6);let _0x11e6c0=_0x4aa7b3(0x1d3)!=_0x4f6d6a&&'hidden'!=_0x4f6d6a,_0x135818='hidden'==_0x4f6d6a;0x1!=_0x135818&&0x0!=_0x11e6c0||(_0x4f6d6a='string');let _0x43dd5c=_0x4aa7b3(0x1ab)+_0x4f6d6a+_0x4aa7b3(0x1a3)+camelCase(_0x3c877d)+_0x4aa7b3(0x1c4)+_0x569669+'\x22,\x22hidden\x22:'+_0x135818+_0x4aa7b3(0x1e7)+_0x11e6c0+',\x22mandatory\x22:\x20'+!_0x3dc71b+_0x4aa7b3(0x1e8)+_0x582a6b+_0x4aa7b3(0x1de)+_0x342c78+'\x20,\x22exportable\x22:\x20true';return _0x4aa7b3(0x1f3)==_0x5bf476['refType']&&(_0x43dd5c+=_0x4aa7b3(0x1a1)+_0x5bf476[_0x4aa7b3(0x1e4)]+'\x22}'),_0x4aa7b3(0x1c3)==_0x5bf476[_0x4aa7b3(0x1b3)]&&(_0x43dd5c+=_0x4aa7b3(0x194)+_0x5bf476[_0x4aa7b3(0x1e4)]+'\x22}'),'entity'==_0x5bf476[_0x4aa7b3(0x1b3)]&&(_0x43dd5c+=_0x4aa7b3(0x18b)+camelCase(plural(_0x5bf476[_0x4aa7b3(0x1e4)]))+_0x4aa7b3(0x180)),_0x43dd5c+='}',_0x43dd5c;});}[a0_0x255749(0x1cb)](_0x1fa9d8){const _0x51cb1f=a0_0x255749;return _0x1fa9d8[_0x51cb1f(0x183)](_0x7ffd23=>_0x7ffd23[_0x51cb1f(0x1f0)]>0x0)[_0x51cb1f(0x188)](function(_0x4823ab,_0x2a99f8){const _0x10d35d=_0x51cb1f;return _0x4823ab[_0x10d35d(0x1f0)]-_0x2a99f8[_0x10d35d(0x1f0)];})[_0x51cb1f(0x1f5)](_0x481584=>{const _0x362ae4=_0x51cb1f;let _0x29028f=_0x481584[_0x362ae4(0x1b8)];return'filter'==_0x29028f?'\x22'+camelCase(_0x481584[_0x362ae4(0x1bb)])+'\x22':(_0x29028f||(_0x29028f='eq'),_0x362ae4(0x19f)+camelCase(_0x481584['name'])+_0x362ae4(0x17d)+_0x29028f+'\x22}');});}['createSortCols'](_0x1c608f){const _0x21628c=a0_0x255749;return _0x1c608f['filter'](_0x382637=>_0x382637['sortRank']>0x0)[_0x21628c(0x188)](function(_0x2814b8,_0x397f4e){const _0x4efdc3=_0x21628c;return _0x2814b8[_0x4efdc3(0x1c0)]-_0x397f4e[_0x4efdc3(0x1c0)];})[_0x21628c(0x1f5)](_0x104f31=>_0x21628c(0x1a4)+camelCase(_0x104f31[_0x21628c(0x1bb)])+_0x21628c(0x1d7)+_0x104f31[_0x21628c(0x1dd)]+'}');}async[a0_0x255749(0x1b5)](_0x54e7c9,_0x1a0b4a,_0x17fbe6,_0x33daaa,_0x242e9d,_0x2ec46d){const _0x3c76c8=a0_0x255749;let _0x5c5a60=await _0x54e7c9[_0x3c76c8(0x1ed)](menu_base_1[_0x3c76c8(0x1eb)])[_0x3c76c8(0x1bc)]({'where':{'domain':{'id':_0x1a0b4a['id']},'id':_0x33daaa}}),_0xba0a82=(await _0x54e7c9[_0x3c76c8(0x1ed)](menu_base_1[_0x3c76c8(0x1eb)])[_0x3c76c8(0x1bd)](_0x3c76c8(0x1ef)+_0x33daaa+_0x3c76c8(0x1f1)+_0x33daaa+'\x27'))[0x0][_0x3c76c8(0x193)]+0xa,_0xe27beb=new menu_base_1[(_0x3c76c8(0x1eb))]();_0xe27beb[_0x3c76c8(0x1bb)]=_0x242e9d,_0xe27beb['menuType']=_0x3c76c8(0x1ad),_0xe27beb[_0x3c76c8(0x1f2)]='meta-grist-page',_0xe27beb[_0x3c76c8(0x193)]=_0xba0a82,_0xe27beb[_0x3c76c8(0x1dc)]=!0x1,_0xe27beb[_0x3c76c8(0x1cc)]=_0x242e9d,_0xe27beb[_0x3c76c8(0x189)]=_0x2ec46d,_0xe27beb[_0x3c76c8(0x1cd)]='@things-factory/meta-ui/client/pages/meta-grist-page',_0xe27beb[_0x3c76c8(0x1e5)]=_0x5c5a60,await _0x54e7c9['getRepository'](menu_base_1[_0x3c76c8(0x1eb)])[_0x3c76c8(0x1d5)](Object[_0x3c76c8(0x182)](Object[_0x3c76c8(0x182)]({},_0xe27beb),{'domain':_0x1a0b4a,'creator':_0x17fbe6,'updater':_0x17fbe6}));}[a0_0x255749(0x1b7)](_0xbb1f3a){const _0x1af4db=a0_0x255749;let _0x1e6462=JSON[_0x1af4db(0x1ac)](_0xbb1f3a)[_0x1af4db(0x179)](/(.{100})/)[_0x1af4db(0x183)](_0x5ed4cc=>_0x5ed4cc),_0x4630a0=[_0x1af4db(0x1e3),_0x1af4db(0x1c2),_0x1af4db(0x190),'aes-256-cfb8',_0x1af4db(0x1a9),'aes-256-ofb',_0x1af4db(0x1db),_0x1af4db(0x1d1)],_0x549b02=crypto_1[_0x1af4db(0x198)][_0x1af4db(0x1d4)](0x20)[_0x1af4db(0x184)](_0x1af4db(0x1ec)),_0x5ced2a=Buffer[_0x1af4db(0x185)](_0x549b02,_0x1af4db(0x1ec)),_0x45e386=_0x549b02[_0x1af4db(0x18d)](0x0,0x10),_0x39d222=['',_0x45e386,_0x45e386,_0x45e386,_0x45e386,_0x45e386,_0x45e386,_0x45e386],_0x36d715=0x0,_0xde5216=[];_0xde5216[_0x1af4db(0x1a2)](_0x549b02);for(var _0x4004b9=0x0;_0x4004b9<_0x1e6462[_0x1af4db(0x199)];_0x4004b9++,_0x36d715++){_0x36d715==_0x4630a0['length']&&(_0x36d715=0x0);let _0x4cc310=crypto_1[_0x1af4db(0x198)][_0x1af4db(0x1a5)](_0x4630a0[_0x36d715],_0x5ced2a,_0x39d222[_0x36d715]),_0x3c3248=_0x4cc310['update'](_0x1e6462[_0x4004b9],_0x1af4db(0x1bf),_0x1af4db(0x1ec));_0x3c3248+=_0x4cc310[_0x1af4db(0x1c7)](_0x1af4db(0x1ec)),_0xde5216[_0x1af4db(0x1a2)](_0x3c3248);}return _0xde5216[_0x1af4db(0x197)](_0x1af4db(0x17c));}};function a0_0x450d(){const _0x3d5030=['__metadata','EntityColumn','createSearchCols','routing','resourceUrl','__param','Directive','Mutation','aes256','\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','readonly','randomBytes','save','@things-factory/menu-base','\x22,\x22desc\x22:','pluralize','@transaction','6444060GbXyFI','aes-256-ctr','hiddenFlag','reverseSort','\x22,\x22width\x22:','updatedAt','Entity','type-graphql','design:paramtypes','aes-256-ecb','refName','parent','__decorate','\x20,\x22editable\x22:\x20',',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22','createdAt','toolCreateMenu','Menu','hex','getRepository','Arg','select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27','searchRank','\x27\x20or\x20id\x20=\x20\x27','category','code','@things-factory/resource-base','map','split','COPY','673426DBWbnh','h1z0q9i9x7q6','\x22,\x22operator\x22:\x20\x22','1915596vaRieR','lodash','\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}','string','assign','filter','toString','from','OperatoToolCreateMenu','{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22','sort','template','left',',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22','1098145VxTagt','substring','\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','defineProperty','aes-256-cfb','402489bvnqrv','Ctx','rank',',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22','updater_id','created_at','join','default','length','7913096rzjcdI','crypto','design:type','Operato\x20Tool\x20Create\x20Menu','{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22','{\x22name\x22:\x20\x22','18OmtFoS',',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22','push','\x22,\x22name\x22:\x20\x22','{\x22name\x22:\x22','createCipheriv','\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}','tslib','__esModule','aes-256-cfb1','replace','{\x22type\x22:\x20\x22','stringify','SCREEN','createGridColumns','design:returntype','gridRank','1829514BUrXRG','updated_at','refType','\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}','createMenuData','prototype','enc','searchOper','updater','JSON','name','findOne','query','state','utf8','sortRank','checkStudioTemplateIsOverLimit','aes-256-cbc','scenario','\x22,\x22header\x22:\x20\x22','dataProp','Resolver','final','12MPMIWF'];a0_0x450d=function(){return _0x3d5030;};return a0_0x450d();}tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x255749(0x1cf)])(a0_0x255749(0x1d9)),(0x0,type_graphql_1[a0_0x255749(0x1d0)])(_0x220402=>Boolean,{'description':a0_0x255749(0x19d)}),tslib_1[a0_0x255749(0x1ce)](0x0,(0x0,type_graphql_1['Arg'])('id')),tslib_1[a0_0x255749(0x1ce)](0x1,(0x0,type_graphql_1[a0_0x255749(0x1ee)])('parent_menu_id')),tslib_1[a0_0x255749(0x1ce)](0x2,(0x0,type_graphql_1[a0_0x255749(0x192)])()),tslib_1[a0_0x255749(0x1c9)](a0_0x255749(0x19c),Function),tslib_1[a0_0x255749(0x1c9)](a0_0x255749(0x1e2),[String,String,Object]),tslib_1['__metadata'](a0_0x255749(0x1af),Promise)],OperatoToolCreateMenu[a0_0x255749(0x1b6)],a0_0x255749(0x1ea),null),OperatoToolCreateMenu=tslib_1[a0_0x255749(0x1e6)]([(0x0,type_graphql_1[a0_0x255749(0x1c6)])()],OperatoToolCreateMenu),exports[a0_0x255749(0x186)]=OperatoToolCreateMenu;const modelTemplate=a0_0x255749(0x18e);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x337684=a0_0x3ba4;(function(_0x5a02f1,_0x503aa1){const _0x479f8e=a0_0x3ba4,_0x27034c=_0x5a02f1();while(!![]){try{const _0x544185=parseInt(_0x479f8e(0x248))/0x1+parseInt(_0x479f8e(0x24f))/0x2*(parseInt(_0x479f8e(0x278))/0x3)+parseInt(_0x479f8e(0x239))/0x4+-parseInt(_0x479f8e(0x268))/0x5+-parseInt(_0x479f8e(0x1f4))/0x6*(-parseInt(_0x479f8e(0x253))/0x7)+-parseInt(_0x479f8e(0x20e))/0x8+parseInt(_0x479f8e(0x225))/0x9*(-parseInt(_0x479f8e(0x265))/0xa);if(_0x544185===_0x503aa1)break;else _0x27034c['push'](_0x27034c['shift']());}catch(_0x3f31f4){_0x27034c['push'](_0x27034c['shift']());}}}(a0_0x4712,0xbe4e5));function a0_0x4712(){const _0x596865=['getProjectRootPath','@things-factory/shell','index.ts','filter','7431496OBUqWY','readFileSync','EntitySubscribers\x20}\x20from\x20\x27./','pascalCaseName','Float','updater','\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','Arg','Int','-history-type.ts','join','@Field(','env','-mutation.ts','lodash','split','\x20})','getFieldType','\x0a\x20\x20','tableName','createDir','/service','includes','9pcmpid','utf8','updated_at','Resolvers,','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','double','pluralPascalCaseName','-history.ts','\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','\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','dataProp','tslib','-query.ts','bigint','OperatoToolCreateService','uniqRank','integer','updater_id','Query','design:type','2642472zRTWTe','mkdirSync','@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})','domain_id','length','colType','Resolver','pluralize','createNoHistoryServiceFiels','-type.ts','__param','replaceNamesMap','character\x20varying','columnToEntityColumn','datetime','1434794ZSMHKe','prototype','snakeCaseName','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201','existsPath','\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','390766ayFRGZ','import\x20{\x20entities\x20as\x20','EntityColumn','replace','8855SsKMuJ','indexOf','__esModule','string','/index.ts','createServiceFiles','camelCaseName','created_at','/*\x20ENTITIES\x20*/\x0a\x09...','Entities,','number','Entities,\x20resolvers\x20as\x20','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','Resolvers\x20}\x20from\x20\x27./','getRepository','-history\x27','JSON','createEntityText','16581170SQyUNJ','nullable','creator_id','1036465NUmaAY','createTypeText','createHistoryEntityText','type\x20=>','getColTxtType','__decorate','/server','writeFile','creator','Entity','state','map','export\x20*\x20from\x20\x27./','design:returntype','double\x20precision','Resolvers,\x20subscribers\x20as\x20','18BMwRFz','\x20{\x20nullable:\x20','writeFileSync','findOne','.ts','@things-factory/resource-base','Date','toolCreateService','\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','sort','1452OQsFuB','timestamp\x20without\x20time\x20zone','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','__metadata','push','float','/event-subscriber.ts','/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...','\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\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{\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','\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','COPY','design:paramtypes','\x27,\x20nullable:\x20','existsSync','long','name','createHistoryServiceFiles','\x0aimport\x20{\x20Resolver,\x20Mutation,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20In\x20}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20New{{pascalCase\x20name}},\x20{{pascalCase\x20name}}Patch\x20}\x20from\x20\x27./{{name}}-type\x27\x0aimport\x20{\x20getRepository\x20}\x20from\x20\x27@things-factory/shell\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Mutation\x20{\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20create\x20new\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20create{{pascalCase\x20name}}(@Arg(\x27{{camelCase\x20name}}\x27)\x20{{camelCase\x20name}}:\x20New{{pascalCase\x20name}},\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20return\x20await\x20tx.getRepository({{pascalCase\x20name}}).save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20modify\x20{{pascalCase\x20name}}\x20information\x27\x20})\x0a\x20\x20async\x20update{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27id\x27)\x20id:\x20string,\x0a\x20\x20\x20\x20@Arg(\x27patch\x27)\x20patch:\x20{{pascalCase\x20name}}Patch,\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20repository\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20repository.findOne(\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20)\x0a\x0a\x20\x20\x20\x20return\x20await\x20repository.save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20...patch,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20[{{pascalCase\x20name}}],\x20{\x20description:\x20\x22To\x20modify\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20information\x22\x20})\x0a\x20\x20async\x20updateMultiple{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27patches\x27,\x20type\x20=>\x20[{{pascalCase\x20name}}Patch])\x20patches:\x20{{pascalCase\x20name}}Patch[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}[]>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20results\x20=\x20[]\x0a\x20\x20\x20\x20const\x20_createRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27+\x27)\x0a\x20\x20\x20\x20const\x20_updateRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27M\x27)\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}Repo\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x0a\x20\x20\x20\x20if\x20(_createRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_createRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20newRecord\x20=\x20_createRecords[i]\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...newRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27+\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20if\x20(_updateRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_updateRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20updRecord\x20=\x20_updateRecords[i]\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20{{camelCase\x20name}}Repo.findOne({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id:updRecord.id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...updRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27M\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20return\x20results\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20delete{{pascalCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove({\x20domain,\x20id,\x20updater:user\x20})\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20multiple\x20{{camelCase\x20name}}s\x27\x20})\x0a\x20\x20async\x20delete{{pluralPascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27ids\x27,\x20type\x20=>\x20[String])\x20ids:\x20string[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20delEntitis\x20=\x20ids.map(id=>{\x0a\x20\x20\x20\x20\x20\x20return\x20{domain,id,updater:user}\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove(delEntitis)\x0a\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a}\x0a','-history-query.ts','rank','...'];a0_0x4712=function(){return _0x596865;};return a0_0x4712();}Object['defineProperty'](exports,a0_0x337684(0x255),{'value':!0x0}),exports[a0_0x337684(0x233)]=void 0x0;function a0_0x3ba4(_0x3bceb0,_0x1a2aaf){const _0x471244=a0_0x4712();return a0_0x3ba4=function(_0x3ba4cb,_0xd12a31){_0x3ba4cb=_0x3ba4cb-0x1ee;let _0xf61970=_0x471244[_0x3ba4cb];return _0xf61970;},a0_0x3ba4(_0x3bceb0,_0x1a2aaf);}const tslib_1=require(a0_0x337684(0x230)),type_graphql_1=require('type-graphql'),shell_1=require(a0_0x337684(0x20b)),resource_base_1=require(a0_0x337684(0x1ef)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x337684(0x21c)),{plural:plural}=require(a0_0x337684(0x240)),fs=require('fs');let OperatoToolCreateService=class{async[a0_0x337684(0x1f1)](_0x18bf02,_0x14adac){const _0x317b90=a0_0x337684,{domain:_0x118627}=_0x14adac[_0x317b90(0x272)],_0x467fb6=await(0x0,shell_1[_0x317b90(0x261)])(resource_base_1[_0x317b90(0x271)])[_0x317b90(0x27b)]({'where':{'id':_0x18bf02}}),_0x5119db=await(0x0,shell_1[_0x317b90(0x261)])(resource_base_1[_0x317b90(0x251)])['find']({'where':{'domain':{'id':_0x118627['id']},'entity':{'id':_0x467fb6['id']}}});let {name:_0x3a87c8='',bundle:_0x49ed27=''}=_0x467fb6||{},_0x4b6358=this['getProjectRootPath'](),_0x3f2b7e=kebabCase(_0x3a87c8);return await this['createServicePath'](_0x4b6358,_0x49ed27,_0x3f2b7e),await this[_0x317b90(0x258)](_0x4b6358,_0x49ed27,_0x3a87c8,_0x3f2b7e,_0x467fb6,_0x5119db),!0x0;}async[a0_0x337684(0x258)](_0x4f39c6,_0x349857,_0x56f7a5,_0x538dd3,_0x3143d6,_0x6177e1){const _0x257539=a0_0x337684;let _0x26a298={'name':_0x538dd3,'tableName':_0x3143d6[_0x257539(0x221)],'pascalCaseName':startCase(camelCase(_0x56f7a5))['replace'](/ /g,''),'camelCaseName':camelCase(_0x56f7a5),'snakeCaseName':snakeCase(_0x56f7a5),'pluralPascalCaseName':startCase(camelCase(plural(_0x56f7a5)))[_0x257539(0x252)](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x56f7a5))},_0x18ee7c=_0x4f39c6+'/packages/'+_0x349857+'/server/service/';[_0x257539(0x263),'COPY'][_0x257539(0x224)](_0x3143d6[_0x257539(0x22f)])?await this[_0x257539(0x205)](_0x18ee7c,_0x538dd3,_0x3143d6,_0x6177e1,_0x26a298):await this[_0x257539(0x241)](_0x18ee7c,_0x538dd3,_0x3143d6,_0x6177e1,_0x26a298);}async[a0_0x337684(0x205)](_0xe6a967,_0x2cbd30,_0x2d6ed2,_0xcfb107,_0x255413){const _0x2a0f7c=a0_0x337684;await this['writeFile'](_0xe6a967+(_0x2cbd30+_0x2a0f7c(0x257)),serviceHistoryIndex,_0x255413);let _0x1903d7=this[_0x2a0f7c(0x264)](_0x2d6ed2,_0xcfb107);await this['writeFile'](_0xe6a967+(_0x2cbd30+'/'+_0x2cbd30+_0x2a0f7c(0x1ee)),_0x1903d7,_0x255413),await this['writeFile'](_0xe6a967+(_0x2cbd30+'/'+_0x2cbd30+_0x2a0f7c(0x231)),serviceQuery,_0x255413),await this[_0x2a0f7c(0x26f)](_0xe6a967+(_0x2cbd30+'/'+_0x2cbd30+_0x2a0f7c(0x21b)),serviceMutation,_0x255413);let _0x145c5d=this[_0x2a0f7c(0x269)](_0xcfb107);await this['writeFile'](_0xe6a967+(_0x2cbd30+'/'+_0x2cbd30+_0x2a0f7c(0x242)),_0x145c5d,_0x255413);let _0x3b1875=this[_0x2a0f7c(0x26a)](_0x2d6ed2,_0xcfb107);await this[_0x2a0f7c(0x26f)](_0xe6a967+(_0x2cbd30+'/'+_0x2cbd30+_0x2a0f7c(0x22c)),_0x3b1875,_0x255413);let _0x59427c='';'JSON'==_0x2d6ed2['dataProp']?(_0x59427c=_0x2a0f7c(0x1f2),await this['writeFile'](_0xe6a967+(_0x2cbd30+_0x2a0f7c(0x1fa)),serviceEntitySubscriber,_0x255413)):_0x59427c='';let _0x5b25e2=serviceEntitySubscriber[_0x2a0f7c(0x252)](/{{entityToJson}}/g,_0x59427c);await this[_0x2a0f7c(0x26f)](_0xe6a967+(_0x2cbd30+_0x2a0f7c(0x1fa)),_0x5b25e2,_0x255413),await this[_0x2a0f7c(0x26f)](_0xe6a967+(_0x2cbd30+'/'+_0x2cbd30+_0x2a0f7c(0x207)),serviceHistoryQuery,_0x255413),await this['writeFile'](_0xe6a967+(_0x2cbd30+'/'+_0x2cbd30+_0x2a0f7c(0x217)),sereviceHistoryType,_0x255413);let _0x1e00c3=_0xe6a967+_0x2a0f7c(0x20c);0x0==await this[_0x2a0f7c(0x24d)](_0x1e00c3)&&await this[_0x2a0f7c(0x26f)](_0x1e00c3,allIndex,_0x255413);let _0x21ca6d=await fs[_0x2a0f7c(0x20f)](_0x1e00c3,'utf8');_0x21ca6d[_0x2a0f7c(0x254)](_0x2a0f7c(0x274)+_0x255413['name']+'/'+_0x255413['name']+_0x2a0f7c(0x262))<0x0&&(_0x21ca6d=_0x21ca6d[_0x2a0f7c(0x252)](/\/\* EXPORT ENTITY TYPES \*\//,_0x2a0f7c(0x229)+_0x255413[_0x2a0f7c(0x204)]+'/'+_0x255413[_0x2a0f7c(0x204)]+_0x2a0f7c(0x262))),_0x21ca6d['indexOf']('export\x20*\x20from\x20\x27./'+_0x255413[_0x2a0f7c(0x204)]+'/'+_0x255413['name']+'\x27')<0x0&&(_0x21ca6d=_0x21ca6d[_0x2a0f7c(0x252)](/\/\* EXPORT ENTITY TYPES \*\//,_0x2a0f7c(0x229)+_0x255413['name']+'/'+_0x255413[_0x2a0f7c(0x204)]+'\x27')),_0x21ca6d['indexOf']('import\x20{\x20entities\x20as\x20'+_0x255413[_0x2a0f7c(0x211)]+_0x2a0f7c(0x25e)+_0x255413[_0x2a0f7c(0x211)]+_0x2a0f7c(0x277)+_0x255413[_0x2a0f7c(0x211)]+_0x2a0f7c(0x210)+_0x255413[_0x2a0f7c(0x204)]+'\x27')<0x0&&(_0x21ca6d=_0x21ca6d[_0x2a0f7c(0x252)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x2a0f7c(0x24b)+_0x255413['pascalCaseName']+_0x2a0f7c(0x25e)+_0x255413[_0x2a0f7c(0x211)]+_0x2a0f7c(0x277)+_0x255413[_0x2a0f7c(0x211)]+_0x2a0f7c(0x210)+_0x255413[_0x2a0f7c(0x204)]+'\x27')),_0x21ca6d[_0x2a0f7c(0x254)](_0x2a0f7c(0x209)+_0x255413[_0x2a0f7c(0x211)]+_0x2a0f7c(0x25c))<0x0&&(_0x21ca6d=_0x21ca6d[_0x2a0f7c(0x252)](/\/\* ENTITIES \*\//,_0x2a0f7c(0x25b)+_0x255413[_0x2a0f7c(0x211)]+'Entities,')),_0x21ca6d[_0x2a0f7c(0x254)](_0x2a0f7c(0x209)+_0x255413[_0x2a0f7c(0x211)]+'Resolvers,')<0x0&&(_0x21ca6d=_0x21ca6d[_0x2a0f7c(0x252)](/\/\* RESOLVER CLASSES \*\//,_0x2a0f7c(0x1f6)+_0x255413[_0x2a0f7c(0x211)]+'Resolvers,')),_0x21ca6d['indexOf'](_0x2a0f7c(0x209)+_0x255413[_0x2a0f7c(0x211)]+'EntitySubscribers,')<0x0&&(_0x21ca6d=_0x21ca6d[_0x2a0f7c(0x252)](/\/\* SUBSCRIBERS \*\//,_0x2a0f7c(0x1fb)+_0x255413[_0x2a0f7c(0x211)]+'EntitySubscribers,')),await this[_0x2a0f7c(0x26f)](_0x1e00c3,_0x21ca6d,_0x255413);}async[a0_0x337684(0x241)](_0x5c6c75,_0xda0a71,_0x3279ff,_0x43ffdd,_0x30fef3){const _0x32501a=a0_0x337684;await this[_0x32501a(0x26f)](_0x5c6c75+(_0xda0a71+_0x32501a(0x257)),serviceIndex,_0x30fef3),await this[_0x32501a(0x26f)](_0x5c6c75+(_0xda0a71+'/'+_0xda0a71+'-query.ts'),serviceQuery,_0x30fef3),await this[_0x32501a(0x26f)](_0x5c6c75+(_0xda0a71+'/'+_0xda0a71+'-mutation.ts'),serviceMutation,_0x30fef3);let _0x3a8dea=this[_0x32501a(0x264)](_0x3279ff,_0x43ffdd);await this['writeFile'](_0x5c6c75+(_0xda0a71+'/'+_0xda0a71+_0x32501a(0x1ee)),_0x3a8dea,_0x30fef3);let _0x2c7fd5=this[_0x32501a(0x269)](_0x43ffdd);await this[_0x32501a(0x26f)](_0x5c6c75+(_0xda0a71+'/'+_0xda0a71+_0x32501a(0x242)),_0x2c7fd5,_0x30fef3);let _0x1bd54f=_0x5c6c75+_0x32501a(0x20c);0x0==await this[_0x32501a(0x24d)](_0x1bd54f)&&await this[_0x32501a(0x26f)](_0x1bd54f,allIndex,_0x30fef3);let _0x2260f2=await fs[_0x32501a(0x20f)](_0x1bd54f,_0x32501a(0x226));_0x2260f2[_0x32501a(0x254)](_0x32501a(0x274)+_0x30fef3[_0x32501a(0x204)]+'/'+_0x30fef3[_0x32501a(0x204)]+'\x27')<0x0&&(_0x2260f2=_0x2260f2[_0x32501a(0x252)](/\/\* EXPORT ENTITY TYPES \*\//,_0x32501a(0x229)+_0x30fef3[_0x32501a(0x204)]+'/'+_0x30fef3[_0x32501a(0x204)]+'\x27')),_0x2260f2[_0x32501a(0x254)](_0x32501a(0x250)+_0x30fef3[_0x32501a(0x211)]+_0x32501a(0x25e)+_0x30fef3[_0x32501a(0x211)]+_0x32501a(0x260)+_0x30fef3[_0x32501a(0x204)]+'\x27')<0x0&&(_0x2260f2=_0x2260f2[_0x32501a(0x252)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x32501a(0x24b)+_0x30fef3['pascalCaseName']+_0x32501a(0x25e)+_0x30fef3[_0x32501a(0x211)]+_0x32501a(0x260)+_0x30fef3[_0x32501a(0x204)]+'\x27')),_0x2260f2['indexOf'](_0x32501a(0x209)+_0x30fef3[_0x32501a(0x211)]+'Entities,')<0x0&&(_0x2260f2=_0x2260f2[_0x32501a(0x252)](/\/\* ENTITIES \*\//,_0x32501a(0x25b)+_0x30fef3['pascalCaseName']+_0x32501a(0x25c))),_0x2260f2[_0x32501a(0x254)]('...'+_0x30fef3[_0x32501a(0x211)]+_0x32501a(0x228))<0x0&&(_0x2260f2=_0x2260f2['replace'](/\/\* RESOLVER CLASSES \*\//,_0x32501a(0x1f6)+_0x30fef3[_0x32501a(0x211)]+_0x32501a(0x228))),await this['writeFile'](_0x1bd54f,_0x2260f2,_0x30fef3);}[a0_0x337684(0x269)](_0x5cd36e){const _0x39c803=a0_0x337684;let _0x2b55ab=sereviceType,_0x5de9e6=_0x5cd36e[_0x39c803(0x273)](_0x42ab7b=>{const _0x451808=_0x39c803;if('id'==_0x42ab7b['name'])return'';if(_0x451808(0x23c)==_0x42ab7b[_0x451808(0x204)])return'';if(_0x451808(0x25a)==_0x42ab7b[_0x451808(0x204)])return'';if('updated_at'==_0x42ab7b[_0x451808(0x204)])return'';if(_0x451808(0x267)==_0x42ab7b['name'])return'';if('updater_id'==_0x42ab7b[_0x451808(0x204)])return'';let _0xa06a11=this[_0x451808(0x21f)](_0x42ab7b),_0x222ee8=this['getColTxtType'](_0x42ab7b),_0x3fe64b=camelCase(_0x42ab7b[_0x451808(0x204)]);return'\x20\x20'+(_0x451808(0x219)+(0x0==_0xa06a11['length']?'':_0x451808(0x26b)+_0xa06a11+',')+_0x451808(0x279)+_0x42ab7b[_0x451808(0x266)]+_0x451808(0x21e))+'\x0a\x20\x20'+(''+_0x3fe64b+(_0x42ab7b[_0x451808(0x266)]?'?':'')+':\x20'+_0x222ee8)+'\x0a';});_0x2b55ab=_0x2b55ab[_0x39c803(0x252)](/{{newTypeColumns}}/g,_0x5de9e6[_0x39c803(0x218)]('\x0a'));let _0x49378d=_0x5cd36e[_0x39c803(0x273)](_0x15a5c5=>{const _0x2e9f91=_0x39c803;if('id'==_0x15a5c5[_0x2e9f91(0x204)])return'';if(_0x2e9f91(0x23c)==_0x15a5c5[_0x2e9f91(0x204)])return'';if(_0x2e9f91(0x25a)==_0x15a5c5['name'])return'';if(_0x2e9f91(0x227)==_0x15a5c5[_0x2e9f91(0x204)])return'';if(_0x2e9f91(0x267)==_0x15a5c5[_0x2e9f91(0x204)])return'';if('updater_id'==_0x15a5c5[_0x2e9f91(0x204)])return'';let _0x5ddd33=this[_0x2e9f91(0x21f)](_0x15a5c5),_0x784417=this[_0x2e9f91(0x26c)](_0x15a5c5);_0x15a5c5[_0x2e9f91(0x266)]=!0x0;let _0x25b69f=camelCase(_0x15a5c5[_0x2e9f91(0x204)]);return'\x20\x20'+(_0x2e9f91(0x219)+(0x0==_0x5ddd33['length']?'':_0x2e9f91(0x26b)+_0x5ddd33+',')+'\x20{\x20nullable:\x20'+_0x15a5c5[_0x2e9f91(0x266)]+_0x2e9f91(0x21e))+_0x2e9f91(0x220)+(''+_0x25b69f+(_0x15a5c5[_0x2e9f91(0x266)]?'?':'')+':\x20'+_0x784417)+'\x0a';});return _0x2b55ab=_0x2b55ab[_0x39c803(0x252)](/{{patchTypeColumns}}/g,_0x49378d[_0x39c803(0x218)]('\x0a')),_0x2b55ab;}[a0_0x337684(0x264)](_0x4bcb58,_0x4aa447){const _0x268f72=a0_0x337684;let _0x46e5d4=serviceEntity,_0x5a7b33=_0x4aa447['sort'](function(_0x4bd707,_0x5852c4){const _0x5791ed=a0_0x3ba4;return _0x4bd707[_0x5791ed(0x208)]-_0x5852c4[_0x5791ed(0x208)];})[_0x268f72(0x273)](_0x90d56e=>this['columnToEntityColumn'](_0x90d56e));[_0x268f72(0x1ff),'JSON']['includes'](_0x4bcb58[_0x268f72(0x22f)])&&_0x5a7b33[_0x268f72(0x1f8)](_0x268f72(0x24c)),_0x46e5d4=_0x46e5d4[_0x268f72(0x252)](/{{entityColumns}}/g,_0x5a7b33[_0x268f72(0x218)]('\x0a'));let _0x1baf0f='',_0x9dbddd=_0x4aa447[_0x268f72(0x20d)](_0x20faab=>_0x20faab[_0x268f72(0x234)]&&_0x20faab['uniqRank']>0x0)[_0x268f72(0x1f3)](function(_0x3e8beb,_0x49dfbc){const _0x5d0e19=_0x268f72;return _0x3e8beb[_0x5d0e19(0x234)]-_0x49dfbc[_0x5d0e19(0x234)];});if(_0x9dbddd['length']>0x0){_0x1baf0f=_0x268f72(0x23b);let _0x17fee4=_0x9dbddd[_0x268f72(0x273)](_0x2585d3=>{const _0x46985a=_0x268f72;let _0x147de0=_0x2585d3[_0x46985a(0x204)];return _0x46985a(0x23c)==_0x2585d3['name']&&(_0x147de0='domain'),'creator_id'==_0x2585d3['name']&&(_0x147de0=_0x46985a(0x270)),_0x46985a(0x236)==_0x2585d3['name']&&(_0x147de0=_0x46985a(0x213)),'{{camelCase\x20name}}.'+camelCase(_0x147de0);});_0x1baf0f=_0x1baf0f[_0x268f72(0x252)](/{{indexColumns}}/g,_0x17fee4['join'](','));}return _0x46e5d4=_0x46e5d4[_0x268f72(0x252)](/{{indexAnn}}/g,_0x1baf0f),_0x46e5d4;}[a0_0x337684(0x26a)](_0x53669c,_0x578729){const _0x2690e2=a0_0x337684;let _0x240eb6=_0x2690e2(0x263)==_0x53669c['dataProp']?serviceEntityHistJson:serviceEntityHistCopy,_0x419b4b=_0x578729[_0x2690e2(0x1f3)](function(_0x281a76,_0x430841){const _0x5c0546=_0x2690e2;return _0x281a76[_0x5c0546(0x208)]-_0x430841[_0x5c0546(0x208)];})['map'](_0x31b4f1=>this[_0x2690e2(0x246)](_0x31b4f1));return _0x240eb6=_0x240eb6[_0x2690e2(0x252)](/{{entityColumns}}/g,_0x419b4b[_0x2690e2(0x218)]('\x0a')),_0x240eb6;}[a0_0x337684(0x246)](_0x14eb9e){const _0x4d8e24=a0_0x337684;if('id'==_0x14eb9e[_0x4d8e24(0x204)])return'';if(_0x4d8e24(0x23c)==_0x14eb9e[_0x4d8e24(0x204)])return'';if('created_at'==_0x14eb9e[_0x4d8e24(0x204)])return'';if(_0x4d8e24(0x227)==_0x14eb9e[_0x4d8e24(0x204)])return'';if('creator_id'==_0x14eb9e[_0x4d8e24(0x204)])return'';if(_0x4d8e24(0x236)==_0x14eb9e[_0x4d8e24(0x204)])return'';let _0x3bd86f=_0x14eb9e[_0x4d8e24(0x23e)];_0x4d8e24(0x22a)==_0x14eb9e[_0x4d8e24(0x23e)]&&(_0x3bd86f=_0x4d8e24(0x276)),_0x4d8e24(0x203)==_0x14eb9e[_0x4d8e24(0x23e)]&&(_0x3bd86f=_0x4d8e24(0x232)),'string'==_0x14eb9e[_0x4d8e24(0x23e)]&&(_0x3bd86f=_0x4d8e24(0x245)),_0x4d8e24(0x247)==_0x14eb9e[_0x4d8e24(0x23e)]&&(_0x3bd86f=_0x4d8e24(0x1f5));let _0x4b0290='';'string'==_0x14eb9e[_0x4d8e24(0x23e)]&&(_0x4b0290=_0x14eb9e['colSize']);let _0x2ff9e6=this['getFieldType'](_0x14eb9e),_0x1b683b=this[_0x4d8e24(0x26c)](_0x14eb9e),_0x15ac9b=camelCase(_0x14eb9e['name']);return'\x20\x20'+('@Column({name:\x27'+_0x14eb9e[_0x4d8e24(0x204)]+'\x27,\x20type:\x20\x27'+_0x3bd86f+_0x4d8e24(0x201)+_0x14eb9e[_0x4d8e24(0x266)]+'\x20'+(0x0==_0x4b0290['length']?'':',length:'+_0x4b0290)+_0x4d8e24(0x21e))+_0x4d8e24(0x220)+(_0x4d8e24(0x219)+(0x0==_0x2ff9e6[_0x4d8e24(0x23d)]?'':_0x4d8e24(0x26b)+_0x2ff9e6+',')+_0x4d8e24(0x279)+_0x14eb9e[_0x4d8e24(0x266)]+_0x4d8e24(0x21e))+'\x0a\x20\x20'+(''+_0x15ac9b+(_0x14eb9e['nullable']?'?':'')+':\x20'+_0x1b683b)+'\x0a';}[a0_0x337684(0x21f)](_0x2231c6){const _0x120a2e=a0_0x337684;let _0x11ccab='';return'double'==_0x2231c6['colType']&&(_0x11ccab='Float'),_0x120a2e(0x1f9)==_0x2231c6['colType']&&(_0x11ccab=_0x120a2e(0x212)),_0x120a2e(0x203)==_0x2231c6[_0x120a2e(0x23e)]&&(_0x11ccab=_0x120a2e(0x216)),_0x120a2e(0x235)==_0x2231c6[_0x120a2e(0x23e)]&&(_0x11ccab=_0x120a2e(0x216)),_0x11ccab;}['getColTxtType'](_0x5f3ada){const _0x4d0d19=a0_0x337684;let _0x5cf6ad=_0x5f3ada['colType'];return'decimal'==_0x5f3ada[_0x4d0d19(0x23e)]&&(_0x5cf6ad=_0x4d0d19(0x25d)),_0x4d0d19(0x22a)==_0x5f3ada[_0x4d0d19(0x23e)]&&(_0x5cf6ad=_0x4d0d19(0x25d)),_0x4d0d19(0x1f9)==_0x5f3ada[_0x4d0d19(0x23e)]&&(_0x5cf6ad='number'),_0x4d0d19(0x235)==_0x5f3ada[_0x4d0d19(0x23e)]&&(_0x5cf6ad=_0x4d0d19(0x25d)),_0x4d0d19(0x203)==_0x5f3ada[_0x4d0d19(0x23e)]&&(_0x5cf6ad=_0x4d0d19(0x25d)),_0x4d0d19(0x247)==_0x5f3ada['colType']&&(_0x5cf6ad=_0x4d0d19(0x1f0)),'date'==_0x5f3ada[_0x4d0d19(0x23e)]&&(_0x5cf6ad=_0x4d0d19(0x1f0)),'text'==_0x5f3ada['colType']&&(_0x5cf6ad=_0x4d0d19(0x256)),_0x5cf6ad;}async['writeFile'](_0x174411,_0x458967,_0x666f75){const _0x2a379c=a0_0x337684;await fs[_0x2a379c(0x27a)](_0x174411,this[_0x2a379c(0x244)](_0x458967,_0x666f75),_0x2a379c(0x226));}[a0_0x337684(0x244)](_0xf400cb,_0x92759f){const _0x200c0b=a0_0x337684;return _0xf400cb['replace'](/{{pascalCase name}}/g,_0x92759f['pascalCaseName'])['replace'](/{{camelCase name}}/g,_0x92759f[_0x200c0b(0x259)])[_0x200c0b(0x252)](/{{snakeCase name}}/g,_0x92759f[_0x200c0b(0x24a)])[_0x200c0b(0x252)](/{{pluralPascalCase name}}/g,_0x92759f[_0x200c0b(0x22b)])[_0x200c0b(0x252)](/{{pluralCamelCase name}}/g,_0x92759f['pluralCamelCaseName'])[_0x200c0b(0x252)](/{{tableName}}/g,_0x92759f[_0x200c0b(0x221)])[_0x200c0b(0x252)](/{{name}}/g,_0x92759f[_0x200c0b(0x204)]);}async['createServicePath'](_0x8f201c,_0x1e1764,_0x40cb14){const _0x1c4246=a0_0x337684;let _0x4346b4=_0x8f201c+'/packages';await this['createDir'](_0x4346b4),_0x4346b4=_0x4346b4+'/'+_0x1e1764,await this[_0x1c4246(0x222)](_0x4346b4),_0x4346b4+=_0x1c4246(0x26e),await this['createDir'](_0x4346b4),_0x4346b4+=_0x1c4246(0x223),await this['createDir'](_0x4346b4),_0x4346b4=_0x4346b4+'/'+_0x40cb14,await this['createDir'](_0x4346b4);}[a0_0x337684(0x20a)](){const _0x34048d=a0_0x337684;let _0x4cad72=process[_0x34048d(0x21a)]['PWD'][_0x34048d(0x21d)]('/'),_0x205733=[];for(let _0x28e186=0x0;_0x28e186<_0x4cad72[_0x34048d(0x23d)]&&'packages'!=_0x4cad72[_0x28e186];_0x28e186++)_0x205733[_0x34048d(0x1f8)](_0x4cad72[_0x28e186]);return _0x205733['join']('/');}async['createDir'](_0x1987f4){const _0x97009a=a0_0x337684;0x0==await this[_0x97009a(0x24d)](_0x1987f4)&&fs[_0x97009a(0x23a)](_0x1987f4);}async[a0_0x337684(0x24d)](_0x5101ac){const _0x2aa05e=a0_0x337684;return await fs[_0x2aa05e(0x202)](_0x5101ac);}};tslib_1[a0_0x337684(0x26d)]([(0x0,type_graphql_1[a0_0x337684(0x237)])(_0x59a8e5=>Boolean,{'description':'Operato\x20Tool\x20Create\x20Service'}),tslib_1[a0_0x337684(0x243)](0x0,(0x0,type_graphql_1[a0_0x337684(0x215)])('id')),tslib_1[a0_0x337684(0x243)](0x1,(0x0,type_graphql_1['Ctx'])()),tslib_1[a0_0x337684(0x1f7)](a0_0x337684(0x238),Function),tslib_1[a0_0x337684(0x1f7)](a0_0x337684(0x200),[String,Object]),tslib_1[a0_0x337684(0x1f7)](a0_0x337684(0x275),Promise)],OperatoToolCreateService[a0_0x337684(0x249)],a0_0x337684(0x1f1),null),OperatoToolCreateService=tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x337684(0x23f)])()],OperatoToolCreateService),exports[a0_0x337684(0x233)]=OperatoToolCreateService;const allIndex=a0_0x337684(0x22e),serviceIndex='\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}}]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}Mutation]\x0a',serviceHistoryIndex=a0_0x337684(0x24e),serviceQuery=a0_0x337684(0x1fc),serviceHistoryQuery='\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryList\x20}\x20from\x20\x27./{{name}}-history-type\x27\x0a\x0a@Resolver({{pascalCase\x20name}}History)\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryQuery\x20{\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}History,\x20{\x20description:\x20\x27To\x20fetch\x20a\x20{{pascalCase\x20name}}History\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}History(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}History>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20return\x20await\x20getRepository({{pascalCase\x20name}}History).findOne({\x0a\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20}\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}HistoryList,\x20{\x20description:\x20\x27To\x20fetch\x20multiple\x20{{pluralPascalCase\x20name}}History\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}Histories(@Args()\x20params:\x20ListParam,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}HistoryList>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20queryBuilder\x20=\x20getQueryBuilderFromListParams({\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20params,\x0a\x20\x20\x20\x20\x20\x20repository:\x20await\x20getRepository({{pascalCase\x20name}}History)\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20const\x20[items,\x20total]\x20=\x20await\x20queryBuilder.getManyAndCount()\x0a\x0a\x20\x20\x20\x20return\x20{\x20items,\x20total\x20}\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20Domain)\x0a\x20\x20async\x20domain(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<Domain>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(Domain).findOneBy({id:{{camelCase\x20name}}History.domainId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20updater(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}History.updaterId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20creator(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}History.creatorId})\x0a\x20\x20}\x0a}\x0a',serviceMutation=a0_0x337684(0x206),sereviceType=a0_0x337684(0x1fd),sereviceHistoryType=a0_0x337684(0x214),serviceEntity='\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20Domain\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0a@Entity(\x27{{tableName}}\x27)\x0a{{indexAnn}}\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}\x20{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a',serviceEntityHistCopy=a0_0x337684(0x25f),serviceEntityHistJson=a0_0x337684(0x1fe),serviceEntitySubscriber=a0_0x337684(0x22d);
|
|
1
|
+
'use strict';const a0_0x18bbb4=a0_0x58a5;(function(_0x25c328,_0x3319e5){const _0x356c85=a0_0x58a5,_0x157802=_0x25c328();while(!![]){try{const _0x29d780=parseInt(_0x356c85(0x87))/0x1+parseInt(_0x356c85(0x96))/0x2+-parseInt(_0x356c85(0x8c))/0x3*(-parseInt(_0x356c85(0xaf))/0x4)+parseInt(_0x356c85(0x98))/0x5*(-parseInt(_0x356c85(0xc7))/0x6)+parseInt(_0x356c85(0xb8))/0x7+-parseInt(_0x356c85(0xba))/0x8+-parseInt(_0x356c85(0xc3))/0x9*(parseInt(_0x356c85(0x8b))/0xa);if(_0x29d780===_0x3319e5)break;else _0x157802['push'](_0x157802['shift']());}catch(_0x1b007b){_0x157802['push'](_0x157802['shift']());}}}(a0_0x1a49,0x99539));function a0_0x1a49(){const _0x3ba708=['snakeCaseName','EntityColumn','packages','-history-query.ts','createNoHistoryServiceFiels','defineProperty','writeFileSync','integer','Resolver','camelCaseName','import\x20{\x20entities\x20as\x20','Resolvers,','string','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','findOne','/service','.ts','@Column({name:\x27','colType','created_at','/event-subscriber.ts','find','filter','\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','pluralCamelCaseName','@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})','sort','\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','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','\x27,\x20type:\x20\x27','long','replace','design:returntype','state','\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','1163163nhxBmd','tslib','\x0a\x20\x20','bigint','6810EwxCDI','3359994tsnYtI','Float','Entity','\x0a/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0a\x0a/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0a\x0aexport\x20const\x20entities\x20=\x20[\x20\x20\x0a\x20\x20/*\x20ENTITIES\x20*/\x0a]\x20\x0a\x0a\x0aexport\x20const\x20schema\x20=\x20{\x0a\x20\x20resolverClasses:\x20[\x0a\x20\x20\x20\x20/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x20\x20]\x20\x0a}\x0a\x0aexport\x20const\x20subscribers\x20=\x20[\x0a\x20\x20/*\x20SUBSCRIBERS\x20*/\x0a]\x0a','\x20{\x20nullable:\x20','updater_id','design:paramtypes','\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','getProjectRootPath','dataProp','1992636sgaWeb','domain_id','5jnzkTR','number','\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201','name','env','\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','\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','COPY','-history\x27','__esModule','existsSync','domain','nullable','Query','\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','-mutation.ts','Operato\x20Tool\x20Create\x20Service','__metadata','mkdirSync','/packages/','design:type','map','/*\x20ENTITIES\x20*/\x0a\x09...','4bUIeVi','Entities,\x20resolvers\x20as\x20','pascalCaseName','type-graphql','Date','float','text','createHistoryServiceFiles','split','7747789ejJtSB','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','9208184hyBMms','includes','indexOf','/packages','createHistoryEntityText','-query.ts','uniqRank','Arg','createServicePath','19611MYHZJY','createDir','\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','OperatoToolCreateService','6740154SqxSBb','-history-type.ts','writeFile','createTypeText','JSON','character\x20varying','\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','__decorate','pluralPascalCaseName','\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','Resolvers,\x20subscribers\x20as\x20','Entities,','toolCreateService','EntitySubscribers\x20}\x20from\x20\x27./','tableName','/index.ts','@things-factory/resource-base','@Field(','\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','getFieldType','...','creator','length','EntitySubscribers,','double','creator_id','createServiceFiles','prototype','\x20})',',length:','columnToEntityColumn','getRepository','getColTxtType','{{camelCase\x20name}}.','pluralize','decimal','existsPath','export\x20*\x20from\x20\x27./','index.ts','utf8','join','type\x20=>','Int','createEntityText','@things-factory/shell','rank','updater','updated_at','-history.ts','\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','\x27,\x20nullable:\x20','push'];a0_0x1a49=function(){return _0x3ba708;};return a0_0x1a49();}Object[a0_0x18bbb4(0x101)](exports,a0_0x18bbb4(0xa1),{'value':!0x0}),exports['OperatoToolCreateService']=void 0x0;const tslib_1=require(a0_0x18bbb4(0x88)),type_graphql_1=require(a0_0x18bbb4(0xb2)),shell_1=require(a0_0x18bbb4(0xf4)),resource_base_1=require(a0_0x18bbb4(0xd8)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require('lodash'),{plural:plural}=require(a0_0x18bbb4(0xea)),fs=require('fs');function a0_0x58a5(_0x1f8009,_0x1b8fd1){const _0x1a49eb=a0_0x1a49();return a0_0x58a5=function(_0x58a5ef,_0x4c31ed){_0x58a5ef=_0x58a5ef-0x80;let _0x1b8146=_0x1a49eb[_0x58a5ef];return _0x1b8146;},a0_0x58a5(_0x1f8009,_0x1b8fd1);}let OperatoToolCreateService=class{async[a0_0x18bbb4(0xd4)](_0x5db211,_0x45344e){const _0x58d9a4=a0_0x18bbb4,{domain:_0x44ea19}=_0x45344e[_0x58d9a4(0x85)],_0x31abc7=await(0x0,shell_1['getRepository'])(resource_base_1[_0x58d9a4(0x8e)])[_0x58d9a4(0x10a)]({'where':{'id':_0x5db211}}),_0x3839a5=await(0x0,shell_1[_0x58d9a4(0xe7)])(resource_base_1[_0x58d9a4(0xfd)])[_0x58d9a4(0x111)]({'where':{'domain':{'id':_0x44ea19['id']},'entity':{'id':_0x31abc7['id']}}});let {name:_0x964546='',bundle:_0x4b425c=''}=_0x31abc7||{},_0x33da23=this[_0x58d9a4(0x94)](),_0x16271d=kebabCase(_0x964546);return await this[_0x58d9a4(0xc2)](_0x33da23,_0x4b425c,_0x16271d),await this[_0x58d9a4(0xe2)](_0x33da23,_0x4b425c,_0x964546,_0x16271d,_0x31abc7,_0x3839a5),!0x0;}async[a0_0x18bbb4(0xe2)](_0x1dee87,_0xa54d9,_0x576398,_0x2e9812,_0x190e90,_0x20b878){const _0x51850e=a0_0x18bbb4;let _0x1c3592={'name':_0x2e9812,'tableName':_0x190e90[_0x51850e(0xd6)],'pascalCaseName':startCase(camelCase(_0x576398))[_0x51850e(0x83)](/ /g,''),'camelCaseName':camelCase(_0x576398),'snakeCaseName':snakeCase(_0x576398),'pluralPascalCaseName':startCase(camelCase(plural(_0x576398)))[_0x51850e(0x83)](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x576398))},_0x5d1cbf=_0x1dee87+_0x51850e(0xab)+_0xa54d9+'/server/service/';[_0x51850e(0xcb),_0x51850e(0x9f)][_0x51850e(0xbb)](_0x190e90[_0x51850e(0x95)])?await this[_0x51850e(0xb6)](_0x5d1cbf,_0x2e9812,_0x190e90,_0x20b878,_0x1c3592):await this[_0x51850e(0x100)](_0x5d1cbf,_0x2e9812,_0x190e90,_0x20b878,_0x1c3592);}async[a0_0x18bbb4(0xb6)](_0xe45f15,_0x159dd6,_0x68ed73,_0x2a6571,_0x48b8e3){const _0x467071=a0_0x18bbb4;await this[_0x467071(0xc9)](_0xe45f15+(_0x159dd6+_0x467071(0xd7)),serviceHistoryIndex,_0x48b8e3);let _0x254214=this[_0x467071(0xf3)](_0x68ed73,_0x2a6571);await this[_0x467071(0xc9)](_0xe45f15+(_0x159dd6+'/'+_0x159dd6+_0x467071(0x10c)),_0x254214,_0x48b8e3),await this[_0x467071(0xc9)](_0xe45f15+(_0x159dd6+'/'+_0x159dd6+_0x467071(0xbf)),serviceQuery,_0x48b8e3),await this[_0x467071(0xc9)](_0xe45f15+(_0x159dd6+'/'+_0x159dd6+_0x467071(0xa7)),serviceMutation,_0x48b8e3);let _0x36d540=this[_0x467071(0xca)](_0x2a6571);await this[_0x467071(0xc9)](_0xe45f15+(_0x159dd6+'/'+_0x159dd6+'-type.ts'),_0x36d540,_0x48b8e3);let _0x5c11a2=this[_0x467071(0xbe)](_0x68ed73,_0x2a6571);await this[_0x467071(0xc9)](_0xe45f15+(_0x159dd6+'/'+_0x159dd6+_0x467071(0xf8)),_0x5c11a2,_0x48b8e3);let _0x57f7c8='';'JSON'==_0x68ed73[_0x467071(0x95)]?(_0x57f7c8=_0x467071(0x9e),await this[_0x467071(0xc9)](_0xe45f15+(_0x159dd6+_0x467071(0x110)),serviceEntitySubscriber,_0x48b8e3)):_0x57f7c8='';let _0x30e48b=serviceEntitySubscriber[_0x467071(0x83)](/{{entityToJson}}/g,_0x57f7c8);await this['writeFile'](_0xe45f15+(_0x159dd6+_0x467071(0x110)),_0x30e48b,_0x48b8e3),await this[_0x467071(0xc9)](_0xe45f15+(_0x159dd6+'/'+_0x159dd6+_0x467071(0xff)),serviceHistoryQuery,_0x48b8e3),await this[_0x467071(0xc9)](_0xe45f15+(_0x159dd6+'/'+_0x159dd6+_0x467071(0xc8)),sereviceHistoryType,_0x48b8e3);let _0x55812f=_0xe45f15+_0x467071(0xee);0x0==await this['existsPath'](_0x55812f)&&await this[_0x467071(0xc9)](_0x55812f,allIndex,_0x48b8e3);let _0x404856=await fs['readFileSync'](_0x55812f,_0x467071(0xef));_0x404856[_0x467071(0xbc)](_0x467071(0xed)+_0x48b8e3[_0x467071(0x9b)]+'/'+_0x48b8e3[_0x467071(0x9b)]+'-history\x27')<0x0&&(_0x404856=_0x404856[_0x467071(0x83)](/\/\* EXPORT ENTITY TYPES \*\//,'/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./'+_0x48b8e3[_0x467071(0x9b)]+'/'+_0x48b8e3[_0x467071(0x9b)]+_0x467071(0xa0))),_0x404856[_0x467071(0xbc)](_0x467071(0xed)+_0x48b8e3[_0x467071(0x9b)]+'/'+_0x48b8e3['name']+'\x27')<0x0&&(_0x404856=_0x404856[_0x467071(0x83)](/\/\* EXPORT ENTITY TYPES \*\//,_0x467071(0x80)+_0x48b8e3['name']+'/'+_0x48b8e3[_0x467071(0x9b)]+'\x27')),_0x404856[_0x467071(0xbc)](_0x467071(0x106)+_0x48b8e3[_0x467071(0xb1)]+_0x467071(0xb0)+_0x48b8e3[_0x467071(0xb1)]+_0x467071(0xd2)+_0x48b8e3[_0x467071(0xb1)]+_0x467071(0xd5)+_0x48b8e3[_0x467071(0x9b)]+'\x27')<0x0&&(_0x404856=_0x404856[_0x467071(0x83)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,'/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20'+_0x48b8e3[_0x467071(0xb1)]+_0x467071(0xb0)+_0x48b8e3[_0x467071(0xb1)]+_0x467071(0xd2)+_0x48b8e3[_0x467071(0xb1)]+_0x467071(0xd5)+_0x48b8e3[_0x467071(0x9b)]+'\x27')),_0x404856[_0x467071(0xbc)](_0x467071(0xdc)+_0x48b8e3[_0x467071(0xb1)]+_0x467071(0xd3))<0x0&&(_0x404856=_0x404856['replace'](/\/\* ENTITIES \*\//,_0x467071(0xae)+_0x48b8e3['pascalCaseName']+'Entities,')),_0x404856['indexOf']('...'+_0x48b8e3[_0x467071(0xb1)]+_0x467071(0x107))<0x0&&(_0x404856=_0x404856[_0x467071(0x83)](/\/\* RESOLVER CLASSES \*\//,_0x467071(0xb9)+_0x48b8e3[_0x467071(0xb1)]+_0x467071(0x107))),_0x404856['indexOf'](_0x467071(0xdc)+_0x48b8e3['pascalCaseName']+_0x467071(0xdf))<0x0&&(_0x404856=_0x404856[_0x467071(0x83)](/\/\* SUBSCRIBERS \*\//,'/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...'+_0x48b8e3[_0x467071(0xb1)]+_0x467071(0xdf))),await this[_0x467071(0xc9)](_0x55812f,_0x404856,_0x48b8e3);}async[a0_0x18bbb4(0x100)](_0x156787,_0x5482a0,_0x2524cb,_0x5bb2a0,_0x1d0f58){const _0x11d757=a0_0x18bbb4;await this[_0x11d757(0xc9)](_0x156787+(_0x5482a0+_0x11d757(0xd7)),serviceIndex,_0x1d0f58),await this[_0x11d757(0xc9)](_0x156787+(_0x5482a0+'/'+_0x5482a0+_0x11d757(0xbf)),serviceQuery,_0x1d0f58),await this['writeFile'](_0x156787+(_0x5482a0+'/'+_0x5482a0+_0x11d757(0xa7)),serviceMutation,_0x1d0f58);let _0x21c174=this[_0x11d757(0xf3)](_0x2524cb,_0x5bb2a0);await this[_0x11d757(0xc9)](_0x156787+(_0x5482a0+'/'+_0x5482a0+_0x11d757(0x10c)),_0x21c174,_0x1d0f58);let _0x16088b=this[_0x11d757(0xca)](_0x5bb2a0);await this[_0x11d757(0xc9)](_0x156787+(_0x5482a0+'/'+_0x5482a0+'-type.ts'),_0x16088b,_0x1d0f58);let _0x4f8d2a=_0x156787+'index.ts';0x0==await this[_0x11d757(0xec)](_0x4f8d2a)&&await this[_0x11d757(0xc9)](_0x4f8d2a,allIndex,_0x1d0f58);let _0x2c603e=await fs['readFileSync'](_0x4f8d2a,_0x11d757(0xef));_0x2c603e[_0x11d757(0xbc)](_0x11d757(0xed)+_0x1d0f58[_0x11d757(0x9b)]+'/'+_0x1d0f58['name']+'\x27')<0x0&&(_0x2c603e=_0x2c603e[_0x11d757(0x83)](/\/\* EXPORT ENTITY TYPES \*\//,_0x11d757(0x80)+_0x1d0f58['name']+'/'+_0x1d0f58[_0x11d757(0x9b)]+'\x27')),_0x2c603e[_0x11d757(0xbc)](_0x11d757(0x106)+_0x1d0f58[_0x11d757(0xb1)]+_0x11d757(0xb0)+_0x1d0f58['pascalCaseName']+'Resolvers\x20}\x20from\x20\x27./'+_0x1d0f58['name']+'\x27')<0x0&&(_0x2c603e=_0x2c603e[_0x11d757(0x83)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x11d757(0x109)+_0x1d0f58[_0x11d757(0xb1)]+_0x11d757(0xb0)+_0x1d0f58[_0x11d757(0xb1)]+'Resolvers\x20}\x20from\x20\x27./'+_0x1d0f58[_0x11d757(0x9b)]+'\x27')),_0x2c603e[_0x11d757(0xbc)](_0x11d757(0xdc)+_0x1d0f58[_0x11d757(0xb1)]+_0x11d757(0xd3))<0x0&&(_0x2c603e=_0x2c603e[_0x11d757(0x83)](/\/\* ENTITIES \*\//,_0x11d757(0xae)+_0x1d0f58[_0x11d757(0xb1)]+_0x11d757(0xd3))),_0x2c603e[_0x11d757(0xbc)](_0x11d757(0xdc)+_0x1d0f58['pascalCaseName']+'Resolvers,')<0x0&&(_0x2c603e=_0x2c603e[_0x11d757(0x83)](/\/\* RESOLVER CLASSES \*\//,_0x11d757(0xb9)+_0x1d0f58[_0x11d757(0xb1)]+_0x11d757(0x107))),await this['writeFile'](_0x4f8d2a,_0x2c603e,_0x1d0f58);}[a0_0x18bbb4(0xca)](_0x368506){const _0x24335b=a0_0x18bbb4;let _0x4dc5ee=sereviceType,_0x52f4ec=_0x368506[_0x24335b(0xad)](_0x5dc03c=>{const _0x1ec3f6=_0x24335b;if('id'==_0x5dc03c[_0x1ec3f6(0x9b)])return'';if(_0x1ec3f6(0x97)==_0x5dc03c[_0x1ec3f6(0x9b)])return'';if(_0x1ec3f6(0x10f)==_0x5dc03c[_0x1ec3f6(0x9b)])return'';if(_0x1ec3f6(0xf7)==_0x5dc03c[_0x1ec3f6(0x9b)])return'';if(_0x1ec3f6(0xe1)==_0x5dc03c[_0x1ec3f6(0x9b)])return'';if(_0x1ec3f6(0x91)==_0x5dc03c['name'])return'';let _0x1379f8=this['getFieldType'](_0x5dc03c),_0x1734f2=this[_0x1ec3f6(0xe8)](_0x5dc03c),_0x52726b=camelCase(_0x5dc03c[_0x1ec3f6(0x9b)]);return'\x20\x20'+(_0x1ec3f6(0xd9)+(0x0==_0x1379f8[_0x1ec3f6(0xde)]?'':_0x1ec3f6(0xf1)+_0x1379f8+',')+_0x1ec3f6(0x90)+_0x5dc03c[_0x1ec3f6(0xa4)]+_0x1ec3f6(0xe4))+_0x1ec3f6(0x89)+(''+_0x52726b+(_0x5dc03c[_0x1ec3f6(0xa4)]?'?':'')+':\x20'+_0x1734f2)+'\x0a';});_0x4dc5ee=_0x4dc5ee[_0x24335b(0x83)](/{{newTypeColumns}}/g,_0x52f4ec[_0x24335b(0xf0)]('\x0a'));let _0x3420be=_0x368506[_0x24335b(0xad)](_0x31de06=>{const _0x18d4c6=_0x24335b;if('id'==_0x31de06[_0x18d4c6(0x9b)])return'';if(_0x18d4c6(0x97)==_0x31de06[_0x18d4c6(0x9b)])return'';if(_0x18d4c6(0x10f)==_0x31de06['name'])return'';if(_0x18d4c6(0xf7)==_0x31de06['name'])return'';if('creator_id'==_0x31de06[_0x18d4c6(0x9b)])return'';if(_0x18d4c6(0x91)==_0x31de06[_0x18d4c6(0x9b)])return'';let _0x2298bd=this[_0x18d4c6(0xdb)](_0x31de06),_0x552812=this['getColTxtType'](_0x31de06);_0x31de06[_0x18d4c6(0xa4)]=!0x0;let _0xd86964=camelCase(_0x31de06[_0x18d4c6(0x9b)]);return'\x20\x20'+(_0x18d4c6(0xd9)+(0x0==_0x2298bd[_0x18d4c6(0xde)]?'':_0x18d4c6(0xf1)+_0x2298bd+',')+'\x20{\x20nullable:\x20'+_0x31de06['nullable']+_0x18d4c6(0xe4))+_0x18d4c6(0x89)+(''+_0xd86964+(_0x31de06['nullable']?'?':'')+':\x20'+_0x552812)+'\x0a';});return _0x4dc5ee=_0x4dc5ee[_0x24335b(0x83)](/{{patchTypeColumns}}/g,_0x3420be[_0x24335b(0xf0)]('\x0a')),_0x4dc5ee;}['createEntityText'](_0x555e8a,_0x140d13){const _0x540e3f=a0_0x18bbb4;let _0x4fd8ad=serviceEntity,_0xc01831=_0x140d13[_0x540e3f(0x116)](function(_0xf4dfdb,_0x284526){const _0x1e3f8a=_0x540e3f;return _0xf4dfdb[_0x1e3f8a(0xf5)]-_0x284526['rank'];})['map'](_0x1d675c=>this['columnToEntityColumn'](_0x1d675c));[_0x540e3f(0x9f),_0x540e3f(0xcb)][_0x540e3f(0xbb)](_0x555e8a[_0x540e3f(0x95)])&&_0xc01831['push'](_0x540e3f(0x9a)),_0x4fd8ad=_0x4fd8ad[_0x540e3f(0x83)](/{{entityColumns}}/g,_0xc01831[_0x540e3f(0xf0)]('\x0a'));let _0x18fae9='',_0x35d655=_0x140d13[_0x540e3f(0x112)](_0x18ed9f=>_0x18ed9f['uniqRank']&&_0x18ed9f['uniqRank']>0x0)[_0x540e3f(0x116)](function(_0x2db0b9,_0x1153fd){const _0x253d25=_0x540e3f;return _0x2db0b9[_0x253d25(0xc0)]-_0x1153fd['uniqRank'];});if(_0x35d655[_0x540e3f(0xde)]>0x0){_0x18fae9=_0x540e3f(0x115);let _0x59f2eb=_0x35d655[_0x540e3f(0xad)](_0x2dddb2=>{const _0x187807=_0x540e3f;let _0x6965b3=_0x2dddb2[_0x187807(0x9b)];return'domain_id'==_0x2dddb2[_0x187807(0x9b)]&&(_0x6965b3=_0x187807(0xa3)),_0x187807(0xe1)==_0x2dddb2[_0x187807(0x9b)]&&(_0x6965b3=_0x187807(0xdd)),_0x187807(0x91)==_0x2dddb2['name']&&(_0x6965b3=_0x187807(0xf6)),_0x187807(0xe9)+camelCase(_0x6965b3);});_0x18fae9=_0x18fae9[_0x540e3f(0x83)](/{{indexColumns}}/g,_0x59f2eb['join'](','));}return _0x4fd8ad=_0x4fd8ad[_0x540e3f(0x83)](/{{indexAnn}}/g,_0x18fae9),_0x4fd8ad;}[a0_0x18bbb4(0xbe)](_0x60916b,_0x36a720){const _0x22a3cd=a0_0x18bbb4;let _0x2c71e3='JSON'==_0x60916b[_0x22a3cd(0x95)]?serviceEntityHistJson:serviceEntityHistCopy,_0x546dd4=_0x36a720[_0x22a3cd(0x116)](function(_0x26e624,_0xb41a34){const _0x5e2e5e=_0x22a3cd;return _0x26e624['rank']-_0xb41a34[_0x5e2e5e(0xf5)];})[_0x22a3cd(0xad)](_0x3fe4f0=>this[_0x22a3cd(0xe6)](_0x3fe4f0));return _0x2c71e3=_0x2c71e3[_0x22a3cd(0x83)](/{{entityColumns}}/g,_0x546dd4[_0x22a3cd(0xf0)]('\x0a')),_0x2c71e3;}[a0_0x18bbb4(0xe6)](_0xfe0d89){const _0x2734d6=a0_0x18bbb4;if('id'==_0xfe0d89[_0x2734d6(0x9b)])return'';if(_0x2734d6(0x97)==_0xfe0d89[_0x2734d6(0x9b)])return'';if(_0x2734d6(0x10f)==_0xfe0d89[_0x2734d6(0x9b)])return'';if(_0x2734d6(0xf7)==_0xfe0d89[_0x2734d6(0x9b)])return'';if(_0x2734d6(0xe1)==_0xfe0d89[_0x2734d6(0x9b)])return'';if(_0x2734d6(0x91)==_0xfe0d89[_0x2734d6(0x9b)])return'';let _0x49e358=_0xfe0d89['colType'];_0x2734d6(0xe0)==_0xfe0d89[_0x2734d6(0x10e)]&&(_0x49e358='double\x20precision'),_0x2734d6(0x82)==_0xfe0d89[_0x2734d6(0x10e)]&&(_0x49e358=_0x2734d6(0x8a)),_0x2734d6(0x108)==_0xfe0d89[_0x2734d6(0x10e)]&&(_0x49e358=_0x2734d6(0xcc)),'datetime'==_0xfe0d89[_0x2734d6(0x10e)]&&(_0x49e358='timestamp\x20without\x20time\x20zone');let _0x3d755a='';_0x2734d6(0x108)==_0xfe0d89['colType']&&(_0x3d755a=_0xfe0d89['colSize']);let _0x3037e6=this['getFieldType'](_0xfe0d89),_0x3f043e=this[_0x2734d6(0xe8)](_0xfe0d89),_0x27b6a2=camelCase(_0xfe0d89[_0x2734d6(0x9b)]);return'\x20\x20'+(_0x2734d6(0x10d)+_0xfe0d89[_0x2734d6(0x9b)]+_0x2734d6(0x81)+_0x49e358+_0x2734d6(0xfa)+_0xfe0d89[_0x2734d6(0xa4)]+'\x20'+(0x0==_0x3d755a[_0x2734d6(0xde)]?'':_0x2734d6(0xe5)+_0x3d755a)+_0x2734d6(0xe4))+_0x2734d6(0x89)+('@Field('+(0x0==_0x3037e6['length']?'':_0x2734d6(0xf1)+_0x3037e6+',')+_0x2734d6(0x90)+_0xfe0d89[_0x2734d6(0xa4)]+_0x2734d6(0xe4))+_0x2734d6(0x89)+(''+_0x27b6a2+(_0xfe0d89[_0x2734d6(0xa4)]?'?':'')+':\x20'+_0x3f043e)+'\x0a';}[a0_0x18bbb4(0xdb)](_0x2a7f9c){const _0x4b418b=a0_0x18bbb4;let _0x1f9450='';return _0x4b418b(0xe0)==_0x2a7f9c['colType']&&(_0x1f9450=_0x4b418b(0x8d)),'float'==_0x2a7f9c[_0x4b418b(0x10e)]&&(_0x1f9450=_0x4b418b(0x8d)),_0x4b418b(0x82)==_0x2a7f9c['colType']&&(_0x1f9450='Int'),_0x4b418b(0x103)==_0x2a7f9c[_0x4b418b(0x10e)]&&(_0x1f9450=_0x4b418b(0xf2)),_0x1f9450;}[a0_0x18bbb4(0xe8)](_0x558dba){const _0x221bc4=a0_0x18bbb4;let _0x535cbc=_0x558dba[_0x221bc4(0x10e)];return _0x221bc4(0xeb)==_0x558dba[_0x221bc4(0x10e)]&&(_0x535cbc=_0x221bc4(0x99)),_0x221bc4(0xe0)==_0x558dba['colType']&&(_0x535cbc=_0x221bc4(0x99)),_0x221bc4(0xb4)==_0x558dba['colType']&&(_0x535cbc=_0x221bc4(0x99)),_0x221bc4(0x103)==_0x558dba[_0x221bc4(0x10e)]&&(_0x535cbc=_0x221bc4(0x99)),_0x221bc4(0x82)==_0x558dba[_0x221bc4(0x10e)]&&(_0x535cbc=_0x221bc4(0x99)),'datetime'==_0x558dba['colType']&&(_0x535cbc=_0x221bc4(0xb3)),'date'==_0x558dba['colType']&&(_0x535cbc='Date'),_0x221bc4(0xb5)==_0x558dba[_0x221bc4(0x10e)]&&(_0x535cbc=_0x221bc4(0x108)),_0x535cbc;}async[a0_0x18bbb4(0xc9)](_0x235847,_0x5d1931,_0x4e7db5){const _0x2d1f54=a0_0x18bbb4;await fs[_0x2d1f54(0x102)](_0x235847,this['replaceNamesMap'](_0x5d1931,_0x4e7db5),_0x2d1f54(0xef));}['replaceNamesMap'](_0xcf6484,_0x5de19f){const _0x6a54b1=a0_0x18bbb4;return _0xcf6484['replace'](/{{pascalCase name}}/g,_0x5de19f[_0x6a54b1(0xb1)])[_0x6a54b1(0x83)](/{{camelCase name}}/g,_0x5de19f[_0x6a54b1(0x105)])[_0x6a54b1(0x83)](/{{snakeCase name}}/g,_0x5de19f[_0x6a54b1(0xfc)])[_0x6a54b1(0x83)](/{{pluralPascalCase name}}/g,_0x5de19f[_0x6a54b1(0xd0)])[_0x6a54b1(0x83)](/{{pluralCamelCase name}}/g,_0x5de19f[_0x6a54b1(0x114)])['replace'](/{{tableName}}/g,_0x5de19f[_0x6a54b1(0xd6)])[_0x6a54b1(0x83)](/{{name}}/g,_0x5de19f[_0x6a54b1(0x9b)]);}async[a0_0x18bbb4(0xc2)](_0x305d21,_0x157000,_0x46bd3c){const _0x1524e7=a0_0x18bbb4;let _0x252d65=_0x305d21+_0x1524e7(0xbd);await this[_0x1524e7(0xc4)](_0x252d65),_0x252d65=_0x252d65+'/'+_0x157000,await this[_0x1524e7(0xc4)](_0x252d65),_0x252d65+=_0x1524e7(0xce),await this['createDir'](_0x252d65),_0x252d65+=_0x1524e7(0x10b),await this['createDir'](_0x252d65),_0x252d65=_0x252d65+'/'+_0x46bd3c,await this[_0x1524e7(0xc4)](_0x252d65);}[a0_0x18bbb4(0x94)](){const _0xf00170=a0_0x18bbb4;let _0x2944b8=process[_0xf00170(0x9c)]['PWD'][_0xf00170(0xb7)]('/'),_0x25aafc=[];for(let _0x1cc185=0x0;_0x1cc185<_0x2944b8['length']&&_0xf00170(0xfe)!=_0x2944b8[_0x1cc185];_0x1cc185++)_0x25aafc[_0xf00170(0xfb)](_0x2944b8[_0x1cc185]);return _0x25aafc['join']('/');}async['createDir'](_0x1af62c){const _0x1aafb9=a0_0x18bbb4;0x0==await this[_0x1aafb9(0xec)](_0x1af62c)&&fs[_0x1aafb9(0xaa)](_0x1af62c);}async['existsPath'](_0x4f6645){const _0x21dbc1=a0_0x18bbb4;return await fs[_0x21dbc1(0xa2)](_0x4f6645);}};tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x18bbb4(0xa5)])(_0x4103cf=>Boolean,{'description':a0_0x18bbb4(0xa8)}),tslib_1['__param'](0x0,(0x0,type_graphql_1[a0_0x18bbb4(0xc1)])('id')),tslib_1['__param'](0x1,(0x0,type_graphql_1['Ctx'])()),tslib_1[a0_0x18bbb4(0xa9)](a0_0x18bbb4(0xac),Function),tslib_1[a0_0x18bbb4(0xa9)](a0_0x18bbb4(0x92),[String,Object]),tslib_1[a0_0x18bbb4(0xa9)](a0_0x18bbb4(0x84),Promise)],OperatoToolCreateService[a0_0x18bbb4(0xe3)],a0_0x18bbb4(0xd4),null),OperatoToolCreateService=tslib_1[a0_0x18bbb4(0xcf)]([(0x0,type_graphql_1[a0_0x18bbb4(0x104)])()],OperatoToolCreateService),exports[a0_0x18bbb4(0xc6)]=OperatoToolCreateService;const allIndex=a0_0x18bbb4(0x8f),serviceIndex=a0_0x18bbb4(0x86),serviceHistoryIndex=a0_0x18bbb4(0x9d),serviceQuery=a0_0x18bbb4(0xc5),serviceHistoryQuery=a0_0x18bbb4(0x113),serviceMutation=a0_0x18bbb4(0xda),sereviceType=a0_0x18bbb4(0xa6),sereviceHistoryType=a0_0x18bbb4(0x117),serviceEntity=a0_0x18bbb4(0x93),serviceEntityHistCopy=a0_0x18bbb4(0xcd),serviceEntityHistJson=a0_0x18bbb4(0xd1),serviceEntitySubscriber=a0_0x18bbb4(0xf9);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x4fc372=a0_0x2659;(function(_0x5987f8,_0x39de5f){const _0x57e287=a0_0x2659,_0x4011ff=_0x5987f8();while(!![]){try{const _0x85f92a=parseInt(_0x57e287(0x8f))/0x1*(parseInt(_0x57e287(0x89))/0x2)+-parseInt(_0x57e287(0xa0))/0x3*(parseInt(_0x57e287(0x92))/0x4)+-parseInt(_0x57e287(0x9b))/0x5*(parseInt(_0x57e287(0x9f))/0x6)+parseInt(_0x57e287(0x8a))/0x7+parseInt(_0x57e287(0x95))/0x8+-parseInt(_0x57e287(0x93))/0x9*(-parseInt(_0x57e287(0x96))/0xa)+-parseInt(_0x57e287(0x9a))/0xb*(parseInt(_0x57e287(0x9e))/0xc);if(_0x85f92a===_0x39de5f)break;else _0x4011ff['push'](_0x4011ff['shift']());}catch(_0x334b06){_0x4011ff['push'](_0x4011ff['shift']());}}}(a0_0x5953,0xa8b9d));function a0_0x2659(_0x535855,_0x522640){const _0x595372=a0_0x5953();return a0_0x2659=function(_0x26594e,_0x1e34a2){_0x26594e=_0x26594e-0x82;let _0x6ce90f=_0x595372[_0x26594e];return _0x6ce90f;},a0_0x2659(_0x535855,_0x522640);}Object[a0_0x4fc372(0xa2)](exports,a0_0x4fc372(0x94),{'value':!0x0}),exports['checkStudioTemplateIsOverLimit']=exports[a0_0x4fc372(0x98)]=void 0x0;function a0_0x5953(){const _0x52d3dd=['450AooELz','1530921FBHPzO','where','Permissions\x20For\x20Tailor\x20Tool','checkTarget','getPermission','5641uKqPwf','ERROR_CODES','LicenseError','1795492DPRgQS','32904BwImmD','__esModule','6284056cNGpdg','1640XUlySo','includes','checkStudioPermission','Menu','33vFpbmi','1163145NbrPjv','manager','andWhere','2410680uskFrN','6dmUqyE','9rlyGxb','Studio','defineProperty','getCount','menu','split','@things-factory/menu-base','id\x20!=\x20:id','@things-factory/operato-license-checker','INVALID_LICENSE','../../errors/license-error','getRepository','(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)','forEach','from','checkStudioTemplateIsOverLimit','@things-factory/shell'];a0_0x5953=function(){return _0x52d3dd;};return a0_0x5953();}const operato_license_checker_1=require(a0_0x4fc372(0xa8)),shell_1=require(a0_0x4fc372(0x88)),menu_base_1=require(a0_0x4fc372(0xa6)),license_error_1=require(a0_0x4fc372(0x82));async function checkStudioPermission(){const _0x27bbf2=a0_0x4fc372;let _0x48e77c=((0x0,operato_license_checker_1[_0x27bbf2(0x8e)])(_0x27bbf2(0x8c))||',')[_0x27bbf2(0xa5)](',')['map'](_0x2844a7=>_0x2844a7['trim']()),_0x548437=!0x1;return _0x48e77c[_0x27bbf2(0x85)](_0x2c8e4a=>{const _0x37fe2e=_0x27bbf2;_0x2c8e4a[_0x37fe2e(0x97)](_0x37fe2e(0xa1))&&(_0x548437=!0x0);}),_0x548437;}async function checkStudioTemplateIsOverLimit(_0x4bba1a,_0x3d60ea){const _0x2cf288=a0_0x4fc372;if(0x0==await checkStudioPermission())throw new license_error_1['LicenseError']({'errorCode':_0x3d60ea['t'](license_error_1[_0x2cf288(0x91)][_0x2cf288(0x90)][_0x2cf288(0xa9)])});var _0x10cbb5=0x0;if(_0x10cbb5=_0x4bba1a&&''!=_0x4bba1a?await(0x0,shell_1[_0x2cf288(0x83)])(menu_base_1[_0x2cf288(0x99)])['manager']['createQueryBuilder']()['select'](_0x2cf288(0xa4))[_0x2cf288(0x86)](menu_base_1[_0x2cf288(0x99)],_0x2cf288(0xa4))[_0x2cf288(0x8b)](_0x2cf288(0xa7),{'id':_0x4bba1a})[_0x2cf288(0x9d)]('(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)')['getCount']()+0x1:await(0x0,shell_1[_0x2cf288(0x83)])(menu_base_1[_0x2cf288(0x99)])[_0x2cf288(0x9c)]['createQueryBuilder']()['select'](_0x2cf288(0xa4))[_0x2cf288(0x86)](menu_base_1['Menu'],_0x2cf288(0xa4))[_0x2cf288(0x8b)](_0x2cf288(0x84))[_0x2cf288(0xa3)]()+0x1,!(0x0,operato_license_checker_1[_0x2cf288(0x8d)])(_0x10cbb5))throw new license_error_1['LicenseError']({'errorCode':_0x3d60ea['t'](license_error_1[_0x2cf288(0x91)]['ERROR_CODES']['OVER_LIMIT'])});return!0x0;}exports['checkStudioPermission']=checkStudioPermission,exports[a0_0x4fc372(0x87)]=checkStudioTemplateIsOverLimit;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x5aedbf=a0_0x5a23;(function(_0x16e2f7,_0x1b1cac){const _0x306ad7=a0_0x5a23,_0x14496c=_0x16e2f7();while(!![]){try{const _0x5b4d6c=-parseInt(_0x306ad7(0x19d))/0x1+parseInt(_0x306ad7(0x19f))/0x2*(parseInt(_0x306ad7(0x183))/0x3)+-parseInt(_0x306ad7(0x18e))/0x4+-parseInt(_0x306ad7(0x18a))/0x5+-parseInt(_0x306ad7(0x19c))/0x6*(-parseInt(_0x306ad7(0x19a))/0x7)+-parseInt(_0x306ad7(0x192))/0x8+parseInt(_0x306ad7(0x188))/0x9*(parseInt(_0x306ad7(0x189))/0xa);if(_0x5b4d6c===_0x1b1cac)break;else _0x14496c['push'](_0x14496c['shift']());}catch(_0x479dcd){_0x14496c['push'](_0x14496c['shift']());}}}(a0_0x28a2,0xc2888));function a0_0x5a23(_0x33966d,_0x41aa85){const _0x28a20a=a0_0x28a2();return a0_0x5a23=function(_0x5a23ca,_0x41944e){_0x5a23ca=_0x5a23ca-0x180;let _0x47d985=_0x28a20a[_0x5a23ca];return _0x47d985;},a0_0x5a23(_0x33966d,_0x41aa85);}Object[a0_0x5aedbf(0x18c)](exports,a0_0x5aedbf(0x18d),{'value':!0x0}),exports[a0_0x5aedbf(0x193)]=void 0x0;function a0_0x28a2(){const _0x488d9a=['OperatoToolResolver','design:returntype','Query','Ctx','design:type','__decorate','Operato\x20Tool\x20Studio\x20Limit\x20check','19796uvdigd','Arg','1188hGpcTP','229750diOEUs','prototype','26FqjdMc','studioTemplateIsOverLimit','checkStudioTemplateIsOverLimit','__param','92541tbWXRE','studioPermission','Operato\x20Tool\x20Studio\x20Usage\x20Permissions','./tool-permission','type-graphql','9zAtBsq','21425230kApVrl','927955MDVQhc','Resolver','defineProperty','__esModule','5029780ZsqWNO','design:paramtypes','checkStudioPermission','__metadata','5071072hrVhie'];a0_0x28a2=function(){return _0x488d9a;};return a0_0x28a2();}const tslib_1=require('tslib'),type_graphql_1=require(a0_0x5aedbf(0x187)),tool_permission_1=require(a0_0x5aedbf(0x186));let OperatoToolResolver=class{async[a0_0x5aedbf(0x184)](_0x536d0f){const _0x107285=a0_0x5aedbf;return(0x0,tool_permission_1[_0x107285(0x190)])();}async[a0_0x5aedbf(0x180)](_0x3fc77b,_0x745855){const _0x2f4c39=a0_0x5aedbf;return(0x0,tool_permission_1[_0x2f4c39(0x181)])(_0x3fc77b,_0x745855);}};tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x5aedbf(0x195)])(_0x450cc0=>Boolean,{'description':a0_0x5aedbf(0x185)}),tslib_1[a0_0x5aedbf(0x182)](0x0,(0x0,type_graphql_1[a0_0x5aedbf(0x196)])()),tslib_1['__metadata'](a0_0x5aedbf(0x197),Function),tslib_1['__metadata']('design:paramtypes',[Object]),tslib_1['__metadata'](a0_0x5aedbf(0x194),Promise)],OperatoToolResolver[a0_0x5aedbf(0x19e)],a0_0x5aedbf(0x184),null),tslib_1[a0_0x5aedbf(0x198)]([(0x0,type_graphql_1['Query'])(_0x1b4b91=>Boolean,{'description':a0_0x5aedbf(0x199)}),tslib_1['__param'](0x0,(0x0,type_graphql_1[a0_0x5aedbf(0x19b)])('id')),tslib_1[a0_0x5aedbf(0x182)](0x1,(0x0,type_graphql_1['Ctx'])()),tslib_1[a0_0x5aedbf(0x191)](a0_0x5aedbf(0x197),Function),tslib_1[a0_0x5aedbf(0x191)](a0_0x5aedbf(0x18f),[String,Object]),tslib_1[a0_0x5aedbf(0x191)](a0_0x5aedbf(0x194),Promise)],OperatoToolResolver['prototype'],a0_0x5aedbf(0x180),null),OperatoToolResolver=tslib_1[a0_0x5aedbf(0x198)]([(0x0,type_graphql_1[a0_0x5aedbf(0x18b)])()],OperatoToolResolver),exports['OperatoToolResolver']=OperatoToolResolver;
|