@things-factory/operato-tools 6.1.21 → 6.1.22

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.
@@ -1,4 +1,4 @@
1
- var a0_0x338b12=a0_0x53b9;function a0_0x53b9(_0x2113e9,_0x5b00c1){var _0x1e64ba=a0_0x1e64();return a0_0x53b9=function(_0x53b974,_0x3227b1){_0x53b974=_0x53b974-0x1f0;var _0x54493c=_0x1e64ba[_0x53b974];return _0x54493c;},a0_0x53b9(_0x2113e9,_0x5b00c1);}(function(_0x1b4465,_0x4100fa){var _0x7db5c8=a0_0x53b9,_0x19bfcf=_0x1b4465();while(!![]){try{var _0x1847d5=parseInt(_0x7db5c8(0x1fd))/0x1+parseInt(_0x7db5c8(0x1f8))/0x2+parseInt(_0x7db5c8(0x1f4))/0x3+parseInt(_0x7db5c8(0x1f6))/0x4+-parseInt(_0x7db5c8(0x1f9))/0x5+parseInt(_0x7db5c8(0x1fb))/0x6+-parseInt(_0x7db5c8(0x1f2))/0x7*(parseInt(_0x7db5c8(0x1fe))/0x8);if(_0x1847d5===_0x4100fa)break;else _0x19bfcf['push'](_0x19bfcf['shift']());}catch(_0x2a5c22){_0x19bfcf['push'](_0x19bfcf['shift']());}}}(a0_0x1e64,0xc75a6));import{html,css}from'lit-element';import{connect}from'pwa-helpers/connect-mixin.js';function a0_0x1e64(){var _0x364911=['customElements','21XybPid','context','2403060qonksh','operato-tools-main','4127092rDbwmJ','render','2821990TIyIvU','4389165jvFWRZ','tool\x20start\x20msg','4468722cObHBI','define','1541818kYiSLe','10229360EzbEGO','styles','Operato\x20Tools'];a0_0x1e64=function(){return _0x364911;};return a0_0x1e64();}import{store,PageView}from'@things-factory/shell';import{TermsUtil}from'@things-factory/meta-ui';class OperatoToolsMain extends connect(store)(PageView){static get[a0_0x338b12(0x1ff)](){return[css`
1
+ function a0_0x232a(){var _0x26b7a6=['8020FlQxJA','272692iiHYLF','styles','99146IIDwuA','2065270heDHlt','12IqMyQP','239856QYCcuP','define','112949PhpHWn','126kedeOv','30568XfhRmc','108YHYplu','Operato\x20Tools','render','context','operato-tools-main','customElements'];a0_0x232a=function(){return _0x26b7a6;};return a0_0x232a();}var a0_0x395f43=a0_0xb7da;(function(_0xca0082,_0x4cb2cb){var _0x3dd1ba=a0_0xb7da,_0x2b6e21=_0xca0082();while(!![]){try{var _0x2379fa=parseInt(_0x3dd1ba(0x1f6))/0x1+-parseInt(_0x3dd1ba(0x1f1))/0x2*(parseInt(_0x3dd1ba(0x1f3))/0x3)+-parseInt(_0x3dd1ba(0x1f4))/0x4+parseInt(_0x3dd1ba(0x1ee))/0x5*(parseInt(_0x3dd1ba(0x1f7))/0x6)+-parseInt(_0x3dd1ba(0x1ef))/0x7+-parseInt(_0x3dd1ba(0x1f8))/0x8*(-parseInt(_0x3dd1ba(0x1f9))/0x9)+parseInt(_0x3dd1ba(0x1f2))/0xa;if(_0x2379fa===_0x4cb2cb)break;else _0x2b6e21['push'](_0x2b6e21['shift']());}catch(_0x3d0edf){_0x2b6e21['push'](_0x2b6e21['shift']());}}}(a0_0x232a,0x18da8));import{html,css}from'lit-element';import{connect}from'pwa-helpers/connect-mixin.js';function a0_0xb7da(_0x16a0f3,_0x1f0b6b){var _0x232ae8=a0_0x232a();return a0_0xb7da=function(_0xb7da3,_0x16cb09){_0xb7da3=_0xb7da3-0x1ed;var _0x54f16d=_0x232ae8[_0xb7da3];return _0x54f16d;},a0_0xb7da(_0x16a0f3,_0x1f0b6b);}import{store,PageView}from'@things-factory/shell';import{TermsUtil}from'@things-factory/meta-ui';class OperatoToolsMain extends connect(store)(PageView){static get[a0_0x395f43(0x1f0)](){return[css`
2
2
  :host {
3
3
  display: block;
4
4
  background-color: var(--main-section-background-color);
@@ -41,11 +41,11 @@ var a0_0x338b12=a0_0x53b9;function a0_0x53b9(_0x2113e9,_0x5b00c1){var _0x1e64ba=
41
41
  display: none;
42
42
  }
43
43
  }
44
- `];}get[a0_0x338b12(0x1f3)](){var _0x57efb5=a0_0x338b12;return{'title':_0x57efb5(0x1f0),'actions':[]};}[a0_0x338b12(0x1f7)](){var _0x2dbb6a=a0_0x338b12;return html`
44
+ `];}get[a0_0x395f43(0x1fc)](){var _0x4f33e2=a0_0x395f43;return{'title':_0x4f33e2(0x1fa),'actions':[]};}[a0_0x395f43(0x1fb)](){return html`
45
45
  <h2>Operato Tools</h2>
46
46
  <p page-description>
47
- ${TermsUtil['tText'](_0x2dbb6a(0x1fa))}
47
+ ${TermsUtil['tText']('tool\x20start\x20msg')}
48
48
  </p>
49
49
 
50
50
  <img src="/assets/images/operato-tools.png" />
51
- `;}}window[a0_0x338b12(0x1f1)][a0_0x338b12(0x1fc)](a0_0x338b12(0x1f5),OperatoToolsMain);
51
+ `;}}window[a0_0x395f43(0x1ed)][a0_0x395f43(0x1f5)](a0_0x395f43(0x1fd),OperatoToolsMain);
@@ -1 +1 @@
1
- function a0_0x4be6(){const _0x4649bb=['studioPermission','dispatch','query','8759MaAkbo','4463901pGDtSp','UPDATE_OPERATO_TOOLS_PERMISSION','state','96OBvLTk','2YlsRSw','47700ggrtAS','2743116lvewqv','9343030YofEKw','60XpUnXA','815328wKVgVs','69510tXnoZp'];a0_0x4be6=function(){return _0x4649bb;};return a0_0x4be6();}const a0_0x5a9153=a0_0x1717;function a0_0x1717(_0x4d4327,_0x5ac3ba){const _0x4be673=a0_0x4be6();return a0_0x1717=function(_0x171745,_0x421f25){_0x171745=_0x171745-0x90;let _0x2b9314=_0x4be673[_0x171745];return _0x2b9314;},a0_0x1717(_0x4d4327,_0x5ac3ba);}(function(_0x15e871,_0x5dd06c){const _0x212932=a0_0x1717,_0x54c87e=_0x15e871();while(!![]){try{const _0x31d5db=parseInt(_0x212932(0x96))/0x1*(-parseInt(_0x212932(0x9b))/0x2)+parseInt(_0x212932(0x91))/0x3+parseInt(_0x212932(0x9c))/0x4*(parseInt(_0x212932(0x90))/0x5)+parseInt(_0x212932(0x9d))/0x6+-parseInt(_0x212932(0x92))/0x7*(parseInt(_0x212932(0x9a))/0x8)+parseInt(_0x212932(0x97))/0x9+-parseInt(_0x212932(0x9e))/0xa;if(_0x31d5db===_0x5dd06c)break;else _0x54c87e['push'](_0x54c87e['shift']());}catch(_0x12430c){_0x54c87e['push'](_0x54c87e['shift']());}}}(a0_0x4be6,0x4aaa5));import a0_0x194691 from'graphql-tag';import{i18next}from'@operato/i18n';import{store}from'@operato/shell';import{client,gqlContext}from'@operato/graphql';import{UPDATE_OPERATO_TOOLS}from'../actions/main';const INITIAL_STATE={'operatoTools':'ABC','studioPermission':!0x1};export const UPDATE_OPERATO_TOOLS_PERMISSION=a0_0x5a9153(0x98);((async()=>{const _0x46576e=a0_0x5a9153;var _0x228b1f=await client[_0x46576e(0x95)]({'query':a0_0x194691`{studioPermission}`});let _0x1f38b1=!0x1;_0x228b1f['errors']||(_0x1f38b1=_0x228b1f['data'][_0x46576e(0x93)]),store[_0x46576e(0x94)]({'type':UPDATE_OPERATO_TOOLS_PERMISSION,'state':{'studioPermission':_0x1f38b1}});})());const operatoTools=(_0x28ee97=INITIAL_STATE,_0x4a27da)=>{const _0x5bd3df=a0_0x5a9153;switch(_0x4a27da['type']){case UPDATE_OPERATO_TOOLS:return{..._0x28ee97};case UPDATE_OPERATO_TOOLS_PERMISSION:return{...INITIAL_STATE,..._0x4a27da[_0x5bd3df(0x99)]};default:return _0x28ee97;}};export default operatoTools;
1
+ function a0_0x508f(){const _0x1fadec=['2280464NfDMsk','type','4573135wzVxob','dispatch','query','UPDATE_OPERATO_TOOLS_PERMISSION','2686239WsCguk','38ypzZBG','749AKRVKk','studioPermission','184584nIUfKj','251509ANUNkB','79776fGYikY','14580jkGmqi'];a0_0x508f=function(){return _0x1fadec;};return a0_0x508f();}const a0_0x8e34ac=a0_0x402a;(function(_0x37acca,_0x15105f){const _0x14ed28=a0_0x402a,_0x133306=_0x37acca();while(!![]){try{const _0x3130e0=-parseInt(_0x14ed28(0x118))/0x1+parseInt(_0x14ed28(0x114))/0x2*(-parseInt(_0x14ed28(0x119))/0x3)+parseInt(_0x14ed28(0x117))/0x4+parseInt(_0x14ed28(0x10f))/0x5+-parseInt(_0x14ed28(0x11a))/0x6*(parseInt(_0x14ed28(0x115))/0x7)+parseInt(_0x14ed28(0x11b))/0x8+parseInt(_0x14ed28(0x113))/0x9;if(_0x3130e0===_0x15105f)break;else _0x133306['push'](_0x133306['shift']());}catch(_0x1e7a65){_0x133306['push'](_0x133306['shift']());}}}(a0_0x508f,0x80caf));import a0_0x473d47 from'graphql-tag';function a0_0x402a(_0x7edc79,_0x351e51){const _0x508f5b=a0_0x508f();return a0_0x402a=function(_0x402a0e,_0x5199dd){_0x402a0e=_0x402a0e-0x10f;let _0x1e2210=_0x508f5b[_0x402a0e];return _0x1e2210;},a0_0x402a(_0x7edc79,_0x351e51);}import{i18next}from'@operato/i18n';import{store}from'@operato/shell';import{client,gqlContext}from'@operato/graphql';import{UPDATE_OPERATO_TOOLS}from'../actions/main';const INITIAL_STATE={'operatoTools':'ABC','studioPermission':!0x1};export const UPDATE_OPERATO_TOOLS_PERMISSION=a0_0x8e34ac(0x112);((async()=>{const _0x351151=a0_0x8e34ac;var _0xc64331=await client[_0x351151(0x111)]({'query':a0_0x473d47`{studioPermission}`});let _0x588273=!0x1;_0xc64331['errors']||(_0x588273=_0xc64331['data'][_0x351151(0x116)]),store[_0x351151(0x110)]({'type':UPDATE_OPERATO_TOOLS_PERMISSION,'state':{'studioPermission':_0x588273}});})());const operatoTools=(_0x210cf3=INITIAL_STATE,_0x14f51f)=>{const _0x1b6b75=a0_0x8e34ac;switch(_0x14f51f[_0x1b6b75(0x11c)]){case UPDATE_OPERATO_TOOLS:return{..._0x210cf3};case UPDATE_OPERATO_TOOLS_PERMISSION:return{...INITIAL_STATE,..._0x14f51f['state']};default:return _0x210cf3;}};export default operatoTools;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/operato-tools",
3
- "version": "6.1.21",
3
+ "version": "6.1.22",
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.21",
32
+ "@things-factory/meta-ui": "^6.1.22",
33
33
  "@things-factory/operato-license-checker": "^3.1.0"
34
34
  },
35
35
  "devDependencies": {
36
- "@things-factory/builder": "^6.1.18",
36
+ "@things-factory/builder": "^6.1.22",
37
37
  "@things-factory/meta-ui": "^6.0.0-alpha.6"
38
38
  },
39
- "gitHead": "f7daba255a423d7a47f636a13e417750cbbaf232"
39
+ "gitHead": "b745ff277f5bd9359d74201edb88bc88c9392508"
40
40
  }
@@ -1 +1 @@
1
- 'use strict';var a0_0x18ed3e=a0_0x65f9;(function(_0x204680,_0x3c3278){var _0x4d2790=a0_0x65f9,_0x179ecf=_0x204680();while(!![]){try{var _0x2108d2=-parseInt(_0x4d2790(0x1e1))/0x1*(parseInt(_0x4d2790(0x1d8))/0x2)+-parseInt(_0x4d2790(0x1da))/0x3*(parseInt(_0x4d2790(0x1d5))/0x4)+-parseInt(_0x4d2790(0x1db))/0x5+-parseInt(_0x4d2790(0x1d7))/0x6+-parseInt(_0x4d2790(0x1df))/0x7+parseInt(_0x4d2790(0x1de))/0x8*(-parseInt(_0x4d2790(0x1dc))/0x9)+parseInt(_0x4d2790(0x1dd))/0xa;if(_0x2108d2===_0x3c3278)break;else _0x179ecf['push'](_0x179ecf['shift']());}catch(_0x48d428){_0x179ecf['push'](_0x179ecf['shift']());}}}(a0_0x5f2d,0xf2625));function a0_0x65f9(_0x905c7,_0x2c8db1){var _0x5f2d08=a0_0x5f2d();return a0_0x65f9=function(_0x65f921,_0x43a661){_0x65f921=_0x65f921-0x1d2;var _0x162781=_0x5f2d08[_0x65f921];return _0x162781;},a0_0x65f9(_0x905c7,_0x2c8db1);}function a0_0x5f2d(){var _0x505caf=['4ZfTOGP','INVALID_LICENSE','9712176fdBwAq','2jKHoeJ','error.invalid\x20license\x20key','3426108LKTmfl','8923620yPvZqA','33246BkGRZB','75624520iVOvTD','56qmkWvN','13572664SoBJkA','defineProperty','59381rqoqNF','OVER_LIMIT','__esModule','error.page\x20count\x20over\x20license\x20limit'];a0_0x5f2d=function(){return _0x505caf;};return a0_0x5f2d();}Object[a0_0x18ed3e(0x1e0)](exports,a0_0x18ed3e(0x1d3),{'value':!0x0}),exports[a0_0x18ed3e(0x1d2)]=exports['INVALID_LICENSE']=void 0x0,exports[a0_0x18ed3e(0x1d6)]=a0_0x18ed3e(0x1d9),exports['OVER_LIMIT']=a0_0x18ed3e(0x1d4);
1
+ 'use strict';var a0_0xb58fd7=a0_0x145e;(function(_0x165767,_0x3a5a55){var _0x3f75ab=a0_0x145e,_0x23543d=_0x165767();while(!![]){try{var _0x492b37=-parseInt(_0x3f75ab(0x139))/0x1*(-parseInt(_0x3f75ab(0x12e))/0x2)+parseInt(_0x3f75ab(0x136))/0x3+-parseInt(_0x3f75ab(0x132))/0x4*(-parseInt(_0x3f75ab(0x12f))/0x5)+-parseInt(_0x3f75ab(0x137))/0x6+-parseInt(_0x3f75ab(0x130))/0x7*(-parseInt(_0x3f75ab(0x131))/0x8)+parseInt(_0x3f75ab(0x133))/0x9+-parseInt(_0x3f75ab(0x138))/0xa;if(_0x492b37===_0x3a5a55)break;else _0x23543d['push'](_0x23543d['shift']());}catch(_0x1de7fc){_0x23543d['push'](_0x23543d['shift']());}}}(a0_0x3804,0x9e1ce));function a0_0x3804(){var _0x26e3e1=['1450806ynJHvB','29914260xrqcyC','558280NZQRCg','INVALID_LICENSE','OVER_LIMIT','4bEvDCj','3307105SvEdjm','63tQAASQ','727336ketDHg','4lZluWh','8417061liRzAx','error.page\x20count\x20over\x20license\x20limit','__esModule','1048182CnNJmc'];a0_0x3804=function(){return _0x26e3e1;};return a0_0x3804();}function a0_0x145e(_0x333ac0,_0x13b997){var _0x3804f9=a0_0x3804();return a0_0x145e=function(_0x145e89,_0x2d4036){_0x145e89=_0x145e89-0x12c;var _0x1d26bd=_0x3804f9[_0x145e89];return _0x1d26bd;},a0_0x145e(_0x333ac0,_0x13b997);}Object['defineProperty'](exports,a0_0xb58fd7(0x135),{'value':!0x0}),exports[a0_0xb58fd7(0x12d)]=exports[a0_0xb58fd7(0x12c)]=void 0x0,exports[a0_0xb58fd7(0x12c)]='error.invalid\x20license\x20key',exports[a0_0xb58fd7(0x12d)]=a0_0xb58fd7(0x134);
@@ -1 +1 @@
1
- 'use strict';const a0_0x50236d=a0_0x304c;function a0_0x304c(_0x48f09a,_0x10970b){const _0x290fb7=a0_0x290f();return a0_0x304c=function(_0x304cba,_0x286533){_0x304cba=_0x304cba-0x109;let _0x1b88de=_0x290fb7[_0x304cba];return _0x1b88de;},a0_0x304c(_0x48f09a,_0x10970b);}(function(_0x52bd5f,_0x2afc1a){const _0x486ef5=a0_0x304c,_0x28d611=_0x52bd5f();while(!![]){try{const _0x4aec8f=parseInt(_0x486ef5(0x10e))/0x1+-parseInt(_0x486ef5(0x11a))/0x2*(parseInt(_0x486ef5(0x10f))/0x3)+-parseInt(_0x486ef5(0x10b))/0x4+parseInt(_0x486ef5(0x118))/0x5*(-parseInt(_0x486ef5(0x11b))/0x6)+parseInt(_0x486ef5(0x110))/0x7+parseInt(_0x486ef5(0x109))/0x8*(parseInt(_0x486ef5(0x117))/0x9)+-parseInt(_0x486ef5(0x116))/0xa*(-parseInt(_0x486ef5(0x111))/0xb);if(_0x4aec8f===_0x2afc1a)break;else _0x28d611['push'](_0x28d611['shift']());}catch(_0xba853b){_0x28d611['push'](_0x28d611['shift']());}}}(a0_0x290f,0x61687));Object[a0_0x50236d(0x119)](exports,a0_0x50236d(0x10a),{'value':!0x0}),exports[a0_0x50236d(0x113)]=void 0x0;const tslib_1=require(a0_0x50236d(0x11c)),ERROR_CODES=tslib_1[a0_0x50236d(0x112)](require(a0_0x50236d(0x10c)));class LicenseError extends Error{static get[a0_0x50236d(0x115)](){const _0x47a2d3=a0_0x50236d;return Object[_0x47a2d3(0x114)]({},ERROR_CODES);}constructor({errorCode:_0x231951,detail:_0x45a49f}){const _0xaaad1d=a0_0x50236d;super(_0x231951),this[_0xaaad1d(0x10d)]='license-error',this[_0xaaad1d(0x11d)]=_0x231951,this['detail']=_0x45a49f;}}exports['LicenseError']=LicenseError;function a0_0x290f(){const _0x5764e4=['649eIvruz','__importStar','LicenseError','assign','ERROR_CODES','57670Hkfzst','9KZEdTm','553835TsqKLw','defineProperty','8DjlLjB','6SXgVYe','tslib','errorCode','1302056LEsPBj','__esModule','1043956nYkIVY','../constants/error-code','name','725182lpwlpa','554226kPlZRB','1970605iNdzjL'];a0_0x290f=function(){return _0x5764e4;};return a0_0x290f();}
1
+ 'use strict';const a0_0x45bf55=a0_0x6430;function a0_0x6430(_0x3f30ba,_0x242ec1){const _0x1789c1=a0_0x1789();return a0_0x6430=function(_0x64303c,_0x61fc07){_0x64303c=_0x64303c-0x9d;let _0x1ca5d5=_0x1789c1[_0x64303c];return _0x1ca5d5;},a0_0x6430(_0x3f30ba,_0x242ec1);}(function(_0x1837ef,_0x419e98){const _0x3408a4=a0_0x6430,_0x490517=_0x1837ef();while(!![]){try{const _0x46dc20=parseInt(_0x3408a4(0xa5))/0x1*(parseInt(_0x3408a4(0xa7))/0x2)+parseInt(_0x3408a4(0xac))/0x3*(parseInt(_0x3408a4(0xab))/0x4)+parseInt(_0x3408a4(0xad))/0x5*(-parseInt(_0x3408a4(0xae))/0x6)+-parseInt(_0x3408a4(0xb2))/0x7*(-parseInt(_0x3408a4(0xa4))/0x8)+parseInt(_0x3408a4(0xa8))/0x9+-parseInt(_0x3408a4(0xa6))/0xa+-parseInt(_0x3408a4(0x9d))/0xb;if(_0x46dc20===_0x419e98)break;else _0x490517['push'](_0x490517['shift']());}catch(_0x429fd5){_0x490517['push'](_0x490517['shift']());}}}(a0_0x1789,0xcadb2));function a0_0x1789(){const _0x3417a6=['defineProperty','errorCode','908761ylfCpF','28085420JOfOKO','LicenseError','assign','../constants/error-code','__esModule','__importStar','tslib','72NztpkS','1557289UcgLNm','811890HvMEzV','2FrlKeP','7625529FuCbUe','detail','name','252JSwsJz','60501NpVUQH','5zrZipT','8269146lcqVgU','license-error'];a0_0x1789=function(){return _0x3417a6;};return a0_0x1789();}Object[a0_0x45bf55(0xb0)](exports,a0_0x45bf55(0xa1),{'value':!0x0}),exports[a0_0x45bf55(0x9e)]=void 0x0;const tslib_1=require(a0_0x45bf55(0xa3)),ERROR_CODES=tslib_1[a0_0x45bf55(0xa2)](require(a0_0x45bf55(0xa0)));class LicenseError extends Error{static get['ERROR_CODES'](){const _0x19cd64=a0_0x45bf55;return Object[_0x19cd64(0x9f)]({},ERROR_CODES);}constructor({errorCode:_0x34fe90,detail:_0x4c86f0}){const _0x8b9b75=a0_0x45bf55;super(_0x34fe90),this[_0x8b9b75(0xaa)]=_0x8b9b75(0xaf),this[_0x8b9b75(0xb1)]=_0x34fe90,this[_0x8b9b75(0xa9)]=_0x4c86f0;}}exports['LicenseError']=LicenseError;
package/server/routes.js CHANGED
@@ -1 +1 @@
1
- const a0_0x1a5384=a0_0x330d;(function(_0x15a48e,_0x30a103){const _0x4ff5a2=a0_0x330d,_0x38f516=_0x15a48e();while(!![]){try{const _0x22f88b=parseInt(_0x4ff5a2(0x19c))/0x1+-parseInt(_0x4ff5a2(0x1a2))/0x2*(parseInt(_0x4ff5a2(0x19e))/0x3)+-parseInt(_0x4ff5a2(0x1a6))/0x4*(parseInt(_0x4ff5a2(0x19f))/0x5)+parseInt(_0x4ff5a2(0x1a8))/0x6*(parseInt(_0x4ff5a2(0x1a7))/0x7)+-parseInt(_0x4ff5a2(0x1a1))/0x8*(parseInt(_0x4ff5a2(0x1aa))/0x9)+-parseInt(_0x4ff5a2(0x1a0))/0xa+parseInt(_0x4ff5a2(0x1a3))/0xb;if(_0x22f88b===_0x30a103)break;else _0x38f516['push'](_0x38f516['shift']());}catch(_0x34a651){_0x38f516['push'](_0x38f516['shift']());}}}(a0_0x3f9e,0x36ec6));const debug=require(a0_0x1a5384(0x1ab))(a0_0x1a5384(0x1a9));function a0_0x330d(_0x205ceb,_0x42ea56){const _0x3f9ecc=a0_0x3f9e();return a0_0x330d=function(_0x330d25,_0x1f0b7e){_0x330d25=_0x330d25-0x19c;let _0x381e0e=_0x3f9ecc[_0x330d25];return _0x381e0e;},a0_0x330d(_0x205ceb,_0x42ea56);}function a0_0x3f9e(){const _0x4b0180=['4ezhewf','8385091alZGGH','bootstrap-module-domain-private-route','bootstrap-module-domain-public-route','136852jvwmEt','7YtCiEK','534120CTDzzb','things-factory:operato-tools:routes','9pdOPdm','debug','247003bUnwME','bootstrap-module-global-public-route','110172orhioz','5ISnbXH','3472480IIeyRM','3347432UKpnct'];a0_0x3f9e=function(){return _0x4b0180;};return a0_0x3f9e();}process['on'](a0_0x1a5384(0x19d),(_0x44d282,_0x3fde7d)=>{}),process['on']('bootstrap-module-global-private-route',(_0x3fbe2e,_0x4954fc)=>{}),process['on'](a0_0x1a5384(0x1a5),(_0x3c3c49,_0x53796e)=>{}),process['on'](a0_0x1a5384(0x1a4),(_0x1b9d11,_0x49784f)=>{});
1
+ const a0_0x13e508=a0_0x49c6;function a0_0x59c8(){const _0x598821=['bootstrap-module-domain-public-route','2624085BEyKka','bootstrap-module-global-private-route','things-factory:operato-tools:routes','90bxPOpL','debug','107022djzHuh','586YyFDDd','7773mrNxel','4774608LBvnSV','215gShboI','185161HQdDmR','bootstrap-module-global-public-route','1892068NmwLtL','4298308cmiYEk'];a0_0x59c8=function(){return _0x598821;};return a0_0x59c8();}(function(_0x72d27f,_0x46a0f0){const _0x23f8a3=a0_0x49c6,_0x2f7956=_0x72d27f();while(!![]){try{const _0x44f3ea=-parseInt(_0x23f8a3(0x108))/0x1+parseInt(_0x23f8a3(0x104))/0x2*(-parseInt(_0x23f8a3(0x105))/0x3)+-parseInt(_0x23f8a3(0x10a))/0x4+-parseInt(_0x23f8a3(0x107))/0x5*(parseInt(_0x23f8a3(0x103))/0x6)+-parseInt(_0x23f8a3(0x10b))/0x7+parseInt(_0x23f8a3(0x106))/0x8+parseInt(_0x23f8a3(0x10d))/0x9*(parseInt(_0x23f8a3(0x101))/0xa);if(_0x44f3ea===_0x46a0f0)break;else _0x2f7956['push'](_0x2f7956['shift']());}catch(_0x3f7f73){_0x2f7956['push'](_0x2f7956['shift']());}}}(a0_0x59c8,0x67287));function a0_0x49c6(_0x242c67,_0x3f3b61){const _0x59c8b9=a0_0x59c8();return a0_0x49c6=function(_0x49c610,_0x59f60c){_0x49c610=_0x49c610-0x100;let _0x277c34=_0x59c8b9[_0x49c610];return _0x277c34;},a0_0x49c6(_0x242c67,_0x3f3b61);}const debug=require(a0_0x13e508(0x102))(a0_0x13e508(0x100));process['on'](a0_0x13e508(0x109),(_0x2f92b5,_0x4fdef4)=>{}),process['on'](a0_0x13e508(0x10e),(_0x10c47f,_0x1e33dc)=>{}),process['on'](a0_0x13e508(0x10c),(_0x87930c,_0x5f3e33)=>{}),process['on']('bootstrap-module-domain-private-route',(_0x1eedb2,_0xc8119)=>{});
@@ -1 +1 @@
1
- 'use strict';function a0_0x1980(_0x45ba52,_0x24bea2){const _0x591ef7=a0_0x591e();return a0_0x1980=function(_0x198040,_0x1db866){_0x198040=_0x198040-0xd2;let _0x400870=_0x591ef7[_0x198040];return _0x400870;},a0_0x1980(_0x45ba52,_0x24bea2);}const a0_0x22d4fd=a0_0x1980;(function(_0x13a7d2,_0x239556){const _0x793cbd=a0_0x1980,_0x10ebd0=_0x13a7d2();while(!![]){try{const _0x34aab4=parseInt(_0x793cbd(0xdc))/0x1*(-parseInt(_0x793cbd(0x129))/0x2)+parseInt(_0x793cbd(0xdf))/0x3*(-parseInt(_0x793cbd(0xf5))/0x4)+parseInt(_0x793cbd(0x101))/0x5+parseInt(_0x793cbd(0x120))/0x6+parseInt(_0x793cbd(0x126))/0x7*(parseInt(_0x793cbd(0xe8))/0x8)+-parseInt(_0x793cbd(0xdb))/0x9*(-parseInt(_0x793cbd(0x125))/0xa)+-parseInt(_0x793cbd(0x102))/0xb*(parseInt(_0x793cbd(0x112))/0xc);if(_0x34aab4===_0x239556)break;else _0x10ebd0['push'](_0x10ebd0['shift']());}catch(_0x33a1b7){_0x10ebd0['push'](_0x10ebd0['shift']());}}}(a0_0x591e,0xc498b));function a0_0x591e(){const _0x306fe3=['aes-256-cfb8','toolCreateMenu','sort','substring','find','utf8','532809eloxms','1cnHpPH','push','select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27','38181ZzKvsI','./../tool-secret/tool-permission','@things-factory/resource-base','\x22,\x22desc\x22:','\x20,\x22exportable\x22:\x20true','\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','getRepository','refName','createGridColumns','10926568fUDOSm','default','__decorate','refType','searchOper','pluralize','hiddenFlag','creator','\x22,\x22operator\x22:\x20\x22','string','Ctx','Arg','randomBytes','288TKGcIJ','\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','COPY',',\x22mandatory\x22:\x20','EntityColumn','type-graphql','hidden','aes-256-ctr','h1z0q9i9x7q6','createSortCols','created_at','\x20,\x22editable\x22:\x20','1808880CRryCw','7218398sQMVyU','dataProp','\x22,\x22width\x22:','\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22basic\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22label\x22:\x20\x22data_history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22icon\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22logic\x22:\x20\x22history_copy\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20','toString',',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22','createMenuData','\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}','__metadata','left','findOne','replace','reverseSort','name','code','\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}','36AZyWsq','__importDefault','\x27\x20or\x20id\x20=\x20\x27','searchRank','\x22,\x22header\x22:\x20\x22','lodash','\x22,\x22hidden\x22:','assign','Menu','creator_id','routing','gridRank','stringify','Operato\x20Tool\x20Create\x20Menu','6179124QidqMJ','sortRank','{\x22name\x22:\x22','rank','entity','190gEpeza','7agZWqD','updatedAt','OperatoToolCreateMenu','384026yUhBXn','split','design:paramtypes','join','enc','Mutation','aes-256-cfb','__param',',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22','map','SCREEN','parent_menu_id','{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22','template','aes-256-ofb','defineProperty','category','JSON','hex','createSearchCols','{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22','resourceUrl','filter','aes256','Resolver','design:returntype','tslib','length','crypto','updated_at','checkStudioTemplateIsOverLimit','prototype','aes-256-ecb','state','{\x22name\x22:\x20\x22','\x22,\x22name\x22:\x20\x22'];a0_0x591e=function(){return _0x306fe3;};return a0_0x591e();}Object[a0_0x22d4fd(0x138)](exports,'__esModule',{'value':!0x0}),exports[a0_0x22d4fd(0x128)]=void 0x0;const tslib_1=require(a0_0x22d4fd(0x143)),type_graphql_1=require(a0_0x22d4fd(0xfa)),resource_base_1=require(a0_0x22d4fd(0xe1)),menu_base_1=require('@things-factory/menu-base'),tool_permission_1=require(a0_0x22d4fd(0xe0)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x22d4fd(0x117)),{plural:plural}=require(a0_0x22d4fd(0xed)),crypto_1=tslib_1[a0_0x22d4fd(0x113)](require(a0_0x22d4fd(0x145)));let OperatoToolCreateMenu=class{async[a0_0x22d4fd(0xd6)](_0x5dc753,_0x580b1a,_0x26b75b){const _0x2892bc=a0_0x22d4fd,{domain:_0x2c5b56,user:_0x4baf6c,tx:_0x21a36a}=_0x26b75b[_0x2892bc(0xd2)];await(0x0,tool_permission_1[_0x2892bc(0x147)])('',_0x26b75b);const _0x1177c6=await _0x21a36a['getRepository'](resource_base_1['Entity'])[_0x2892bc(0x10c)]({'where':{'domain':{'id':_0x2c5b56['id']},'id':_0x5dc753}}),_0x46200b=await _0x21a36a['getRepository'](resource_base_1[_0x2892bc(0xf9)])[_0x2892bc(0xd9)]({'where':{'domain':{'id':_0x2c5b56['id']},'entity':{'id':_0x1177c6['id']}}});let {name:_0x5b085f=''}=_0x1177c6||{},_0x4cfb25=kebabCase(_0x5b085f),_0x31d6e6=modelTemplate[_0x2892bc(0x10d)](/{{pascalCase name}}/g,startCase(camelCase(_0x5b085f))['replace'](/ /g,''))[_0x2892bc(0x10d)](/{{camelCase name}}/g,camelCase(_0x5b085f))[_0x2892bc(0x10d)](/{{snakeCase name}}/g,snakeCase(_0x5b085f))[_0x2892bc(0x10d)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x5b085f)))['replace'](/ /g,''))[_0x2892bc(0x10d)](/{{pluralCamelCase name}}/g,camelCase(plural(_0x5b085f)))['replace'](/{{name}}/g,_0x5b085f),_0x54fafb='';_0x2892bc(0x13a)==_0x1177c6['dataProp']?_0x54fafb=_0x2892bc(0xf6):_0x2892bc(0xf7)==_0x1177c6[_0x2892bc(0x103)]&&(_0x54fafb=_0x2892bc(0x105)),_0x31d6e6=_0x31d6e6['replace'](/{{HistoryButton}}/g,_0x54fafb);let _0x46481f=this[_0x2892bc(0xfe)](_0x46200b);_0x31d6e6=_0x31d6e6[_0x2892bc(0x10d)](/{{SortColumns}}/g,_0x46481f['join'](','));let _0x2b8682=this[_0x2892bc(0x13c)](_0x46200b);_0x31d6e6=_0x31d6e6[_0x2892bc(0x10d)](/{{SearchColumns}}/g,_0x2b8682[_0x2892bc(0x12c)](','));let _0x1cd2f3=this[_0x2892bc(0xe7)](_0x46200b);return _0x31d6e6=_0x31d6e6[_0x2892bc(0x10d)](/{{GridColumns}}/g,_0x1cd2f3[_0x2892bc(0x12c)](',')),_0x31d6e6=this[_0x2892bc(0x12d)](_0x31d6e6),await this['createMenuData'](_0x21a36a,_0x2c5b56,_0x4baf6c,_0x580b1a,_0x4cfb25,_0x31d6e6),!0x0;}['createGridColumns'](_0x4ac858){const _0x2b556b=a0_0x22d4fd;return _0x4ac858[_0x2b556b(0x13f)](_0x350d46=>'id'!=_0x350d46[_0x2b556b(0x10f)]&&_0x350d46[_0x2b556b(0x11d)]>0x0)['sort'](function(_0x1b7273,_0x57cd93){const _0x40e0e2=_0x2b556b;return _0x1b7273[_0x40e0e2(0x11d)]-_0x57cd93[_0x40e0e2(0x11d)];})[_0x2b556b(0x132)](_0x53fd62=>{const _0xfc4524=_0x2b556b;let {gridEditor:_0x5df02c=_0xfc4524(0xf1),name:_0x4b36a3,term:_0x15643d,gridWidth:_0x50ef0a=0x0,gridAlign:_0x4241ed=_0xfc4524(0x10b),nullable:_0x2110c1=!0x1}=_0x53fd62;if(null==_0x5df02c&&(_0x5df02c=_0xfc4524(0xf1)),null==_0x4241ed&&(_0x4241ed=_0xfc4524(0x10b)),'updater_id'==_0x4b36a3||_0xfc4524(0x11b)==_0x4b36a3)return _0x4b36a3='updater_id'==_0x4b36a3?'updater':_0xfc4524(0xef),_0xfc4524(0x135)+_0x4b36a3+'\x22,\x22header\x22:\x20\x22'+_0x4b36a3+'\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}';if('updated_at'==_0x4b36a3||_0xfc4524(0xff)==_0x4b36a3)return _0xfc4524(0x13d)+(_0xfc4524(0x146)==_0x4b36a3?_0xfc4524(0x127):'createdAt')+_0xfc4524(0x116)+_0x4b36a3+_0xfc4524(0x111);let _0x148beb='readonly'!=_0x5df02c&&_0xfc4524(0xfb)!=_0x5df02c,_0x3d38ca=_0xfc4524(0xfb)==_0x5df02c;0x1!=_0x3d38ca&&0x0!=_0x148beb||(_0x5df02c=_0xfc4524(0xf1));let _0x138c09='{\x22type\x22:\x20\x22'+_0x5df02c+_0xfc4524(0xd4)+camelCase(_0x4b36a3)+_0xfc4524(0x116)+_0x15643d+_0xfc4524(0x118)+_0x3d38ca+_0xfc4524(0x100)+_0x148beb+_0xfc4524(0xf8)+!_0x2110c1+',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22'+_0x4241ed+_0xfc4524(0x104)+_0x50ef0a+_0xfc4524(0xe3);return _0xfc4524(0x110)==_0x53fd62[_0xfc4524(0xeb)]&&(_0x138c09+=_0xfc4524(0x107)+_0x53fd62['refName']+'\x22}'),'scenario'==_0x53fd62[_0xfc4524(0xeb)]&&(_0x138c09+=',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22'+_0x53fd62[_0xfc4524(0xe6)]+'\x22}'),_0xfc4524(0x124)==_0x53fd62[_0xfc4524(0xeb)]&&(_0x138c09+=_0xfc4524(0x131)+camelCase(plural(_0x53fd62[_0xfc4524(0xe6)]))+_0xfc4524(0x109)),_0x138c09+='}',_0x138c09;});}[a0_0x22d4fd(0x13c)](_0x2f977b){const _0x348d67=a0_0x22d4fd;return _0x2f977b[_0x348d67(0x13f)](_0x19c7bd=>_0x19c7bd[_0x348d67(0x115)]>0x0)[_0x348d67(0xd7)](function(_0xa60b92,_0x454d05){const _0x16b599=_0x348d67;return _0xa60b92[_0x16b599(0x115)]-_0x454d05[_0x16b599(0x115)];})[_0x348d67(0x132)](_0x56261f=>{const _0x4015d2=_0x348d67;let _0x328da8=_0x56261f[_0x4015d2(0xec)];return _0x4015d2(0x13f)==_0x328da8?'\x22'+camelCase(_0x56261f[_0x4015d2(0x10f)])+'\x22':(_0x328da8||(_0x328da8='eq'),_0x4015d2(0xd3)+camelCase(_0x56261f['name'])+_0x4015d2(0xf0)+_0x328da8+'\x22}');});}[a0_0x22d4fd(0xfe)](_0x10d923){const _0x34618f=a0_0x22d4fd;return _0x10d923['filter'](_0x29a3ab=>_0x29a3ab[_0x34618f(0x121)]>0x0)[_0x34618f(0xd7)](function(_0x433aea,_0x2f66fd){const _0x105e37=_0x34618f;return _0x433aea[_0x105e37(0x121)]-_0x2f66fd['sortRank'];})[_0x34618f(0x132)](_0x50db8a=>_0x34618f(0x122)+camelCase(_0x50db8a[_0x34618f(0x10f)])+_0x34618f(0xe2)+_0x50db8a[_0x34618f(0x10e)]+'}');}async[a0_0x22d4fd(0x108)](_0xa610bc,_0x45c44b,_0x88efa,_0x353c5a,_0x586e28,_0x35c6aa){const _0x3496bf=a0_0x22d4fd;let _0x10e56a=await _0xa610bc[_0x3496bf(0xe5)](menu_base_1[_0x3496bf(0x11a)])[_0x3496bf(0x10c)]({'where':{'domain':{'id':_0x45c44b['id']},'id':_0x353c5a}}),_0x1a935b=(await _0xa610bc[_0x3496bf(0xe5)](menu_base_1['Menu'])['query'](_0x3496bf(0xde)+_0x353c5a+_0x3496bf(0x114)+_0x353c5a+'\x27'))[0x0][_0x3496bf(0x123)]+0xa,_0x4e1a10=new menu_base_1[(_0x3496bf(0x11a))]();_0x4e1a10['name']=_0x586e28,_0x4e1a10['menuType']=_0x3496bf(0x133),_0x4e1a10[_0x3496bf(0x139)]='meta-grist-page',_0x4e1a10[_0x3496bf(0x123)]=_0x1a935b,_0x4e1a10[_0x3496bf(0xee)]=!0x1,_0x4e1a10[_0x3496bf(0x11c)]=_0x586e28,_0x4e1a10[_0x3496bf(0x136)]=_0x35c6aa,_0x4e1a10[_0x3496bf(0x13e)]='@things-factory/meta-ui/client/pages/meta-grist-page',_0x4e1a10['parent']=_0x10e56a,await _0xa610bc[_0x3496bf(0xe5)](menu_base_1[_0x3496bf(0x11a)])['save'](Object[_0x3496bf(0x119)](Object[_0x3496bf(0x119)]({},_0x4e1a10),{'domain':_0x45c44b,'creator':_0x88efa,'updater':_0x88efa}));}[a0_0x22d4fd(0x12d)](_0x5e8b83){const _0x20b0c8=a0_0x22d4fd;let _0x33d3f1=JSON[_0x20b0c8(0x11e)](_0x5e8b83)[_0x20b0c8(0x12a)](/(.{100})/)[_0x20b0c8(0x13f)](_0x140ac3=>_0x140ac3),_0xd869bb=[_0x20b0c8(0x149),'aes-256-cbc',_0x20b0c8(0x12f),_0x20b0c8(0xd5),'aes-256-cfb1',_0x20b0c8(0x137),_0x20b0c8(0xfc),_0x20b0c8(0x140)],_0x498d38=crypto_1[_0x20b0c8(0xe9)][_0x20b0c8(0xf4)](0x20)[_0x20b0c8(0x106)](_0x20b0c8(0x13b)),_0x47a536=Buffer['from'](_0x498d38,_0x20b0c8(0x13b)),_0x4a5a24=_0x498d38[_0x20b0c8(0xd8)](0x0,0x10),_0x273717=['',_0x4a5a24,_0x4a5a24,_0x4a5a24,_0x4a5a24,_0x4a5a24,_0x4a5a24,_0x4a5a24],_0x2dbe54=0x0,_0x19391b=[];_0x19391b[_0x20b0c8(0xdd)](_0x498d38);for(var _0x232044=0x0;_0x232044<_0x33d3f1[_0x20b0c8(0x144)];_0x232044++,_0x2dbe54++){_0x2dbe54==_0xd869bb[_0x20b0c8(0x144)]&&(_0x2dbe54=0x0);let _0x52dc6b=crypto_1[_0x20b0c8(0xe9)]['createCipheriv'](_0xd869bb[_0x2dbe54],_0x47a536,_0x273717[_0x2dbe54]),_0x20a6c9=_0x52dc6b['update'](_0x33d3f1[_0x232044],_0x20b0c8(0xda),_0x20b0c8(0x13b));_0x20a6c9+=_0x52dc6b['final'](_0x20b0c8(0x13b)),_0x19391b['push'](_0x20a6c9);}return _0x19391b[_0x20b0c8(0x12c)](_0x20b0c8(0xfd));}};tslib_1['__decorate']([(0x0,type_graphql_1['Directive'])('@transaction'),(0x0,type_graphql_1[a0_0x22d4fd(0x12e)])(_0x549d9b=>Boolean,{'description':a0_0x22d4fd(0x11f)}),tslib_1[a0_0x22d4fd(0x130)](0x0,(0x0,type_graphql_1[a0_0x22d4fd(0xf3)])('id')),tslib_1[a0_0x22d4fd(0x130)](0x1,(0x0,type_graphql_1[a0_0x22d4fd(0xf3)])(a0_0x22d4fd(0x134))),tslib_1[a0_0x22d4fd(0x130)](0x2,(0x0,type_graphql_1[a0_0x22d4fd(0xf2)])()),tslib_1[a0_0x22d4fd(0x10a)]('design:type',Function),tslib_1['__metadata'](a0_0x22d4fd(0x12b),[String,String,Object]),tslib_1[a0_0x22d4fd(0x10a)](a0_0x22d4fd(0x142),Promise)],OperatoToolCreateMenu[a0_0x22d4fd(0x148)],a0_0x22d4fd(0xd6),null),OperatoToolCreateMenu=tslib_1[a0_0x22d4fd(0xea)]([(0x0,type_graphql_1[a0_0x22d4fd(0x141)])()],OperatoToolCreateMenu),exports[a0_0x22d4fd(0x128)]=OperatoToolCreateMenu;const modelTemplate=a0_0x22d4fd(0xe4);
1
+ 'use strict';const a0_0x1ca5c9=a0_0x1021;(function(_0x510dd4,_0x2d7289){const _0x4b22a3=a0_0x1021,_0x155653=_0x510dd4();while(!![]){try{const _0x3dd98a=parseInt(_0x4b22a3(0xd9))/0x1*(-parseInt(_0x4b22a3(0x13f))/0x2)+-parseInt(_0x4b22a3(0x107))/0x3*(-parseInt(_0x4b22a3(0xd0))/0x4)+-parseInt(_0x4b22a3(0xe1))/0x5*(parseInt(_0x4b22a3(0x119))/0x6)+parseInt(_0x4b22a3(0x11b))/0x7+-parseInt(_0x4b22a3(0x108))/0x8*(parseInt(_0x4b22a3(0x115))/0x9)+parseInt(_0x4b22a3(0xc7))/0xa+parseInt(_0x4b22a3(0x105))/0xb;if(_0x3dd98a===_0x2d7289)break;else _0x155653['push'](_0x155653['shift']());}catch(_0x19af32){_0x155653['push'](_0x155653['shift']());}}}(a0_0x22c1,0x2f0ba));Object[a0_0x1ca5c9(0xe4)](exports,a0_0x1ca5c9(0x10a),{'value':!0x0}),exports[a0_0x1ca5c9(0xfe)]=void 0x0;function a0_0x1021(_0x544c92,_0x21b9b0){const _0x22c1ff=a0_0x22c1();return a0_0x1021=function(_0x102175,_0x29f161){_0x102175=_0x102175-0xc7;let _0x8c11d5=_0x22c1ff[_0x102175];return _0x8c11d5;},a0_0x1021(_0x544c92,_0x21b9b0);}const tslib_1=require(a0_0x1ca5c9(0xd7)),type_graphql_1=require(a0_0x1ca5c9(0xd3)),resource_base_1=require(a0_0x1ca5c9(0x10b)),menu_base_1=require(a0_0x1ca5c9(0xd6)),tool_permission_1=require('./../tool-secret/tool-permission'),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require('lodash'),{plural:plural}=require('pluralize'),crypto_1=tslib_1[a0_0x1ca5c9(0xf7)](require(a0_0x1ca5c9(0xe5)));let OperatoToolCreateMenu=class{async[a0_0x1ca5c9(0xf4)](_0x249c4f,_0x11b3f2,_0x2651b4){const _0xaad95=a0_0x1ca5c9,{domain:_0x1d94c5,user:_0x2990c0,tx:_0xff5f09}=_0x2651b4[_0xaad95(0x132)];await(0x0,tool_permission_1['checkStudioTemplateIsOverLimit'])('',_0x2651b4);const _0x5e82fb=await _0xff5f09[_0xaad95(0xde)](resource_base_1[_0xaad95(0xf2)])[_0xaad95(0xe0)]({'where':{'domain':{'id':_0x1d94c5['id']},'id':_0x249c4f}}),_0x334509=await _0xff5f09[_0xaad95(0xde)](resource_base_1[_0xaad95(0x100)])[_0xaad95(0xc9)]({'where':{'domain':{'id':_0x1d94c5['id']},'entity':{'id':_0x5e82fb['id']}}});let {name:_0xe34dc5=''}=_0x5e82fb||{},_0x2ca8ad=kebabCase(_0xe34dc5),_0x4efb74=modelTemplate[_0xaad95(0xdd)](/{{pascalCase name}}/g,startCase(camelCase(_0xe34dc5))['replace'](/ /g,''))[_0xaad95(0xdd)](/{{camelCase name}}/g,camelCase(_0xe34dc5))[_0xaad95(0xdd)](/{{snakeCase name}}/g,snakeCase(_0xe34dc5))[_0xaad95(0xdd)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0xe34dc5)))['replace'](/ /g,''))[_0xaad95(0xdd)](/{{pluralCamelCase name}}/g,camelCase(plural(_0xe34dc5)))['replace'](/{{name}}/g,_0xe34dc5),_0x4363f6='';'JSON'==_0x5e82fb[_0xaad95(0x129)]?_0x4363f6=_0xaad95(0xe6):_0xaad95(0xda)==_0x5e82fb[_0xaad95(0x129)]&&(_0x4363f6='\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'),_0x4efb74=_0x4efb74[_0xaad95(0xdd)](/{{HistoryButton}}/g,_0x4363f6);let _0x7662a0=this[_0xaad95(0x121)](_0x334509);_0x4efb74=_0x4efb74['replace'](/{{SortColumns}}/g,_0x7662a0[_0xaad95(0x102)](','));let _0x2b40e9=this[_0xaad95(0x113)](_0x334509);_0x4efb74=_0x4efb74[_0xaad95(0xdd)](/{{SearchColumns}}/g,_0x2b40e9['join'](','));let _0x19a135=this[_0xaad95(0xf3)](_0x334509);return _0x4efb74=_0x4efb74[_0xaad95(0xdd)](/{{GridColumns}}/g,_0x19a135[_0xaad95(0x102)](',')),_0x4efb74=this[_0xaad95(0x104)](_0x4efb74),await this[_0xaad95(0x11f)](_0xff5f09,_0x1d94c5,_0x2990c0,_0x11b3f2,_0x2ca8ad,_0x4efb74),!0x0;}[a0_0x1ca5c9(0xf3)](_0x259f0a){const _0x538618=a0_0x1ca5c9;return _0x259f0a[_0x538618(0xc8)](_0x5e9a21=>'id'!=_0x5e9a21[_0x538618(0x13d)]&&_0x5e9a21[_0x538618(0x137)]>0x0)[_0x538618(0x139)](function(_0x3d78d5,_0x20ca91){return _0x3d78d5['gridRank']-_0x20ca91['gridRank'];})[_0x538618(0x117)](_0x5aa0e1=>{const _0x58c136=_0x538618;let {gridEditor:_0x447a1c=_0x58c136(0xef),name:_0x13ef8f,term:_0x19a51e,gridWidth:_0x592f43=0x0,gridAlign:_0x48cdad=_0x58c136(0x10d),nullable:_0x1638ac=!0x1}=_0x5aa0e1;if(null==_0x447a1c&&(_0x447a1c=_0x58c136(0xef)),null==_0x48cdad&&(_0x48cdad=_0x58c136(0x10d)),_0x58c136(0x127)==_0x13ef8f||_0x58c136(0xec)==_0x13ef8f)return _0x13ef8f=_0x58c136(0x127)==_0x13ef8f?_0x58c136(0x111):'creator',_0x58c136(0xcc)+_0x13ef8f+_0x58c136(0xd5)+_0x13ef8f+_0x58c136(0x124);if(_0x58c136(0xe2)==_0x13ef8f||_0x58c136(0x103)==_0x13ef8f)return'{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22'+(_0x58c136(0xe2)==_0x13ef8f?_0x58c136(0xdf):'createdAt')+_0x58c136(0xd5)+_0x13ef8f+_0x58c136(0x134);let _0x3d57b8=_0x58c136(0xd1)!=_0x447a1c&&_0x58c136(0x136)!=_0x447a1c,_0x40919e=_0x58c136(0x136)==_0x447a1c;0x1!=_0x40919e&&0x0!=_0x3d57b8||(_0x447a1c=_0x58c136(0xef));let _0xa09d2a=_0x58c136(0x10f)+_0x447a1c+_0x58c136(0x10c)+camelCase(_0x13ef8f)+_0x58c136(0xd5)+_0x19a51e+_0x58c136(0xf5)+_0x40919e+'\x20,\x22editable\x22:\x20'+_0x3d57b8+_0x58c136(0xd2)+!_0x1638ac+_0x58c136(0x135)+_0x48cdad+'\x22,\x22width\x22:'+_0x592f43+_0x58c136(0xf0);return'code'==_0x5aa0e1[_0x58c136(0x12c)]&&(_0xa09d2a+=_0x58c136(0x122)+_0x5aa0e1[_0x58c136(0xdc)]+'\x22}'),'scenario'==_0x5aa0e1[_0x58c136(0x12c)]&&(_0xa09d2a+=_0x58c136(0x11d)+_0x5aa0e1['refName']+'\x22}'),_0x58c136(0x12a)==_0x5aa0e1[_0x58c136(0x12c)]&&(_0xa09d2a+=_0x58c136(0xe3)+camelCase(plural(_0x5aa0e1['refName']))+_0x58c136(0xf6)),_0xa09d2a+='}',_0xa09d2a;});}[a0_0x1ca5c9(0x113)](_0x5cb3c3){const _0x11e4a4=a0_0x1ca5c9;return _0x5cb3c3[_0x11e4a4(0xc8)](_0x14bd99=>_0x14bd99[_0x11e4a4(0x12b)]>0x0)[_0x11e4a4(0x139)](function(_0xbde5cb,_0x305d7e){const _0x513b87=_0x11e4a4;return _0xbde5cb[_0x513b87(0x12b)]-_0x305d7e[_0x513b87(0x12b)];})['map'](_0x284ecd=>{const _0x30c359=_0x11e4a4;let _0x320848=_0x284ecd['searchOper'];return _0x30c359(0xc8)==_0x320848?'\x22'+camelCase(_0x284ecd[_0x30c359(0x13d)])+'\x22':(_0x320848||(_0x320848='eq'),_0x30c359(0x126)+camelCase(_0x284ecd[_0x30c359(0x13d)])+_0x30c359(0x114)+_0x320848+'\x22}');});}[a0_0x1ca5c9(0x121)](_0x31ccaf){const _0x288e19=a0_0x1ca5c9;return _0x31ccaf[_0x288e19(0xc8)](_0x57ec1e=>_0x57ec1e[_0x288e19(0xfb)]>0x0)[_0x288e19(0x139)](function(_0x581cfe,_0x15a615){const _0x204894=_0x288e19;return _0x581cfe[_0x204894(0xfb)]-_0x15a615[_0x204894(0xfb)];})[_0x288e19(0x117)](_0x442c3e=>_0x288e19(0xce)+camelCase(_0x442c3e[_0x288e19(0x13d)])+_0x288e19(0xfd)+_0x442c3e[_0x288e19(0x13e)]+'}');}async[a0_0x1ca5c9(0x11f)](_0x39c4f5,_0x42010c,_0x31bfed,_0x5ca2ff,_0x27324f,_0x26f03a){const _0x5e742b=a0_0x1ca5c9;let _0x43df4f=await _0x39c4f5[_0x5e742b(0xde)](menu_base_1['Menu'])[_0x5e742b(0xe0)]({'where':{'domain':{'id':_0x42010c['id']},'id':_0x5ca2ff}}),_0x8cb60=(await _0x39c4f5['getRepository'](menu_base_1['Menu'])[_0x5e742b(0x109)](_0x5e742b(0x11a)+_0x5ca2ff+_0x5e742b(0x123)+_0x5ca2ff+'\x27'))[0x0][_0x5e742b(0x118)]+0xa,_0x4f22b4=new menu_base_1[(_0x5e742b(0xff))]();_0x4f22b4[_0x5e742b(0x13d)]=_0x27324f,_0x4f22b4[_0x5e742b(0x12e)]=_0x5e742b(0xfc),_0x4f22b4['category']=_0x5e742b(0xee),_0x4f22b4[_0x5e742b(0x118)]=_0x8cb60,_0x4f22b4[_0x5e742b(0xd8)]=!0x1,_0x4f22b4[_0x5e742b(0x120)]=_0x27324f,_0x4f22b4[_0x5e742b(0x13c)]=_0x26f03a,_0x4f22b4['resourceUrl']=_0x5e742b(0xcb),_0x4f22b4['parent']=_0x43df4f,await _0x39c4f5[_0x5e742b(0xde)](menu_base_1[_0x5e742b(0xff)])[_0x5e742b(0xea)](Object[_0x5e742b(0xed)](Object[_0x5e742b(0xed)]({},_0x4f22b4),{'domain':_0x42010c,'creator':_0x31bfed,'updater':_0x31bfed}));}[a0_0x1ca5c9(0x104)](_0x47255e){const _0x31f43=a0_0x1ca5c9;let _0x11c203=JSON[_0x31f43(0x131)](_0x47255e)[_0x31f43(0x112)](/(.{100})/)[_0x31f43(0xc8)](_0x416ce8=>_0x416ce8),_0x8da6f6=[_0x31f43(0x13b),_0x31f43(0x12f),_0x31f43(0x133),_0x31f43(0xf1),_0x31f43(0x116),_0x31f43(0x106),_0x31f43(0x110),_0x31f43(0xe8)],_0xe20227=crypto_1[_0x31f43(0xeb)]['randomBytes'](0x20)[_0x31f43(0x128)](_0x31f43(0xfa)),_0x5aaece=Buffer[_0x31f43(0xe7)](_0xe20227,_0x31f43(0xfa)),_0x5d52d6=_0xe20227['substring'](0x0,0x10),_0x20d5eb=['',_0x5d52d6,_0x5d52d6,_0x5d52d6,_0x5d52d6,_0x5d52d6,_0x5d52d6,_0x5d52d6],_0x917e3c=0x0,_0x268dd4=[];_0x268dd4['push'](_0xe20227);for(var _0x4c5a9c=0x0;_0x4c5a9c<_0x11c203[_0x31f43(0x138)];_0x4c5a9c++,_0x917e3c++){_0x917e3c==_0x8da6f6['length']&&(_0x917e3c=0x0);let _0x434ead=crypto_1[_0x31f43(0xeb)]['createCipheriv'](_0x8da6f6[_0x917e3c],_0x5aaece,_0x20d5eb[_0x917e3c]),_0x3c21e3=_0x434ead[_0x31f43(0xf9)](_0x11c203[_0x4c5a9c],_0x31f43(0xdb),_0x31f43(0xfa));_0x3c21e3+=_0x434ead[_0x31f43(0x13a)]('hex'),_0x268dd4[_0x31f43(0xcf)](_0x3c21e3);}return _0x268dd4[_0x31f43(0x102)]('h1z0q9i9x7q6');}};tslib_1[a0_0x1ca5c9(0xe9)]([(0x0,type_graphql_1['Directive'])('@transaction'),(0x0,type_graphql_1[a0_0x1ca5c9(0x12d)])(_0x581985=>Boolean,{'description':a0_0x1ca5c9(0x101)}),tslib_1[a0_0x1ca5c9(0xca)](0x0,(0x0,type_graphql_1[a0_0x1ca5c9(0x130)])('id')),tslib_1[a0_0x1ca5c9(0xca)](0x1,(0x0,type_graphql_1[a0_0x1ca5c9(0x130)])(a0_0x1ca5c9(0x11c))),tslib_1[a0_0x1ca5c9(0xca)](0x2,(0x0,type_graphql_1[a0_0x1ca5c9(0xd4)])()),tslib_1['__metadata'](a0_0x1ca5c9(0xcd),Function),tslib_1[a0_0x1ca5c9(0xf8)](a0_0x1ca5c9(0x10e),[String,String,Object]),tslib_1['__metadata']('design:returntype',Promise)],OperatoToolCreateMenu[a0_0x1ca5c9(0x125)],a0_0x1ca5c9(0xf4),null),OperatoToolCreateMenu=tslib_1[a0_0x1ca5c9(0xe9)]([(0x0,type_graphql_1[a0_0x1ca5c9(0x11e)])()],OperatoToolCreateMenu),exports[a0_0x1ca5c9(0xfe)]=OperatoToolCreateMenu;function a0_0x22c1(){const _0x5b6f61=['aes-256-ofb','6tjdAwY','77384EybTHx','query','__esModule','@things-factory/resource-base','\x22,\x22name\x22:\x20\x22','left','design:paramtypes','{\x22type\x22:\x20\x22','aes-256-ctr','updater','split','createSearchCols','\x22,\x22operator\x22:\x20\x22','261ACmAJA','aes-256-cfb1','map','rank','17574FAuxaj','select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27','1884155eCJWjE','parent_menu_id',',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22','Resolver','createMenuData','routing','createSortCols',',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22','\x27\x20or\x20id\x20=\x20\x27','\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}','prototype','{\x22name\x22:\x20\x22','updater_id','toString','dataProp','entity','searchRank','refType','Mutation','menuType','aes-256-cbc','Arg','stringify','state','aes-256-cfb','\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}',',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22','hidden','gridRank','length','sort','final','aes-256-ecb','template','name','reverseSort','928cekNbT','2255340OhbEPV','filter','find','__param','@things-factory/meta-ui/client/pages/meta-grist-page','{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22','design:type','{\x22name\x22:\x22','push','184732EZFadf','readonly',',\x22mandatory\x22:\x20','type-graphql','Ctx','\x22,\x22header\x22:\x20\x22','@things-factory/menu-base','tslib','hiddenFlag','577AtYNki','COPY','utf8','refName','replace','getRepository','updatedAt','findOne','5abrJzF','updated_at',',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22','defineProperty','crypto','\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','from','aes256','__decorate','save','default','creator_id','assign','meta-grist-page','string','\x20,\x22exportable\x22:\x20true','aes-256-cfb8','Entity','createGridColumns','toolCreateMenu','\x22,\x22hidden\x22:','\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}','__importDefault','__metadata','update','hex','sortRank','SCREEN','\x22,\x22desc\x22:','OperatoToolCreateMenu','Menu','EntityColumn','Operato\x20Tool\x20Create\x20Menu','join','created_at','enc','1724877EMWIUQ'];a0_0x22c1=function(){return _0x5b6f61;};return a0_0x22c1();}const modelTemplate='\x0a{\x0a\x20\x20\x22menu\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x22title\x22:\x20\x22{{name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22\x22,\x0a\x20\x20\x20\x20\x20\x20\x22desc\x22:\x20\x22\x22\x0a\x20\x20},\x0a\x20\x20\x22gql\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x22query\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22list_func\x22:\x20\x22{{pluralCamelCase\x20name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22find_one_func\x22:\x22{{camelCase\x20name}}\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x22mutation\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22multiple\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22func\x22:\x22updateMultiple{{pascalCase\x20name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22{{pascalCase\x20name}}Patch\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22delete\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22func\x22:\x22delete{{pluralPascalCase\x20name}}\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20},\x0a\x20\x20\x22button\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22export\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22add\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22delete\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22save\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20],\x0a\x20\x20\x22grid_column\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22string\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22id\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22header\x22:\x20\x22id\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22hidden\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22editable\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22mandatory\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22sortable\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22align\x22:\x20\x22left\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22width\x22:\x200,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22exportable\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20},\x0a{{GridColumns}}\x0a\x20\x20],\x0a\x20\x20\x22grid\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22button\x22:[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{{HistoryButton}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22option\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22mobile_mode\x22:\x20\x22LIST\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22desk_mode\x22:\x20\x22GRID\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22use_row_checker\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22pages\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2020,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2050,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20100,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20300\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22view_mode\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22GRID\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22LIST\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22CARD\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22sorters\x22:\x20[\x0a{{SortColumns}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20]\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x22row\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22multiple_select\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22click\x22:\x20\x22select-row-toggle\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20},\x0a\x20\x20\x22search\x22:\x20[\x0a{{SearchColumns}}\x0a\x20\x20]\x0a}\x0a';
@@ -1 +1 @@
1
- 'use strict';const a0_0x3ce6d0=a0_0x308d;(function(_0x36404f,_0x53ecf4){const _0x3e737e=a0_0x308d,_0x4a379d=_0x36404f();while(!![]){try{const _0x2449a7=-parseInt(_0x3e737e(0xde))/0x1*(parseInt(_0x3e737e(0xd0))/0x2)+parseInt(_0x3e737e(0xf6))/0x3+-parseInt(_0x3e737e(0x110))/0x4*(parseInt(_0x3e737e(0x115))/0x5)+-parseInt(_0x3e737e(0x111))/0x6+-parseInt(_0x3e737e(0x94))/0x7+-parseInt(_0x3e737e(0xdc))/0x8*(parseInt(_0x3e737e(0xfd))/0x9)+parseInt(_0x3e737e(0xfb))/0xa;if(_0x2449a7===_0x53ecf4)break;else _0x4a379d['push'](_0x4a379d['shift']());}catch(_0x34419e){_0x4a379d['push'](_0x4a379d['shift']());}}}(a0_0x6113,0xe5f05));function a0_0x6113(){const _0x20440c=['\x27,\x20nullable:\x20','writeFile','Date','columnToEntityColumn','2549178fAEWuO','camelCaseName','join','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','updater_id','64288580yTkPdN','EntitySubscribers,','369WkjSAi','includes','domain_id','pascalCaseName','\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','snakeCaseName','\x27,\x20type:\x20\x27','/*\x20ENTITIES\x20*/\x0a\x09...','/packages/','decimal','split','\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','Query','/packages','getColTxtType','indexOf','name','replaceNamesMap','creator_id','388yElaMT','10702110nxWpIP','\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','writeFileSync','\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','54955JLSufm','number','Resolver','@Column({name:\x27','@things-factory/resource-base','Int','\x20})','length','dataProp','utf8','createDir','defineProperty','\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','pluralCamelCaseName','\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','EntityColumn','findOne','colSize','4395377eDclAC','find','nullable','long','type\x20=>','timestamp\x20without\x20time\x20zone','JSON','double','\x0a\x20\x20','Arg','rank','\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','Resolvers,\x20subscribers\x20as\x20','createHistoryServiceFiles','design:returntype','export\x20*\x20from\x20\x27./','uniqRank','env','createServiceFiles','OperatoToolCreateService','-history\x27','getRepository','existsPath','/server','date','.ts','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','index.ts','colType','__metadata','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','createServicePath','-type.ts','\x0aimport\x20{\x20ObjectType,\x20Field,\x20InputType,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@InputType()\x0aexport\x20class\x20New{{pascalCase\x20name}}\x20{\x0a{{newTypeColumns}}\x0a}\x0a\x0a@InputType()\x0aexport\x20class\x20{{pascalCase\x20name}}Patch\x20{\x0a\x20\x20@Field(type\x20=>\x20ID,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20id?:\x20string\x0a\x0a{{patchTypeColumns}}\x0a\x0a\x20\x20@Field()\x0a\x20\x20cuFlag:\x20string\x0a}\x0a\x0a@ObjectType()\x0aexport\x20class\x20{{pascalCase\x20name}}List\x20{\x0a\x20\x20@Field(type\x20=>\x20[{{pascalCase\x20name}}])\x0a\x20\x20items:\x20{{pascalCase\x20name}}[]\x0a\x0a\x20\x20@Field(type\x20=>\x20Int)\x0a\x20\x20total:\x20number\x0a}\x0a','__esModule','Entities,\x20resolvers\x20as\x20','float','getProjectRootPath','createHistoryEntityText','datetime','Operato\x20Tool\x20Create\x20Service','pluralPascalCaseName','@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})','\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','-history-query.ts','updated_at','replace','@Field(','created_at','__param','getFieldType','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a\x20\x20@Column(\x27simple-json\x27,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20@Field(type\x20=>\x20ScalarObject,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20historyJson?:\x20any\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','tslib','packages',',length:','design:paramtypes','\x20{\x20nullable:\x20','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20Domain\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0a@Entity(\x27{{tableName}}\x27)\x0a{{indexAnn}}\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}\x20{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','Resolvers\x20}\x20from\x20\x27./','double\x20precision','655166FuvVWC','...','integer','string','createNoHistoryServiceFiels','createEntityText','Resolvers,','bigint','domain','EntitySubscribers\x20}\x20from\x20\x27./','-mutation.ts','updater','366104dSHukZ','createTypeText','3vSbzSt','__decorate','/service','/event-subscriber.ts','-history-type.ts','existsSync','map','push','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','sort','/index.ts','Float','filter','Entity','prototype','Entities,','character\x20varying','readFileSync','toolCreateService','COPY'];a0_0x6113=function(){return _0x20440c;};return a0_0x6113();}Object[a0_0x3ce6d0(0x8d)](exports,a0_0x3ce6d0(0xb6),{'value':!0x0}),exports[a0_0x3ce6d0(0xa7)]=void 0x0;const tslib_1=require(a0_0x3ce6d0(0xc8)),type_graphql_1=require('type-graphql'),shell_1=require('@things-factory/shell'),resource_base_1=require(a0_0x3ce6d0(0x86)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require('lodash'),{plural:plural}=require('pluralize'),fs=require('fs');let OperatoToolCreateService=class{async[a0_0x3ce6d0(0xf0)](_0x374af7,_0x47562b){const _0x5c4a94=a0_0x3ce6d0,{domain:_0x10f6a8}=_0x47562b['state'],_0x37b4c9=await(0x0,shell_1[_0x5c4a94(0xa9)])(resource_base_1[_0x5c4a94(0xeb)])[_0x5c4a94(0x92)]({'where':{'id':_0x374af7}}),_0x547aaa=await(0x0,shell_1[_0x5c4a94(0xa9)])(resource_base_1[_0x5c4a94(0x91)])[_0x5c4a94(0x95)]({'where':{'domain':{'id':_0x10f6a8['id']},'entity':{'id':_0x37b4c9['id']}}});let {name:_0x593476='',bundle:_0x572a17=''}=_0x37b4c9||{},_0x21980e=this['getProjectRootPath'](),_0x4bfad3=kebabCase(_0x593476);return await this['createServicePath'](_0x21980e,_0x572a17,_0x4bfad3),await this[_0x5c4a94(0xa6)](_0x21980e,_0x572a17,_0x593476,_0x4bfad3,_0x37b4c9,_0x547aaa),!0x0;}async[a0_0x3ce6d0(0xa6)](_0xfa0d8b,_0x5163a9,_0x4467cf,_0x2bab65,_0x57ace8,_0x2de13f){const _0x348544=a0_0x3ce6d0;let _0x3ccc48={'name':_0x2bab65,'tableName':_0x57ace8['tableName'],'pascalCaseName':startCase(camelCase(_0x4467cf))['replace'](/ /g,''),'camelCaseName':camelCase(_0x4467cf),'snakeCaseName':snakeCase(_0x4467cf),'pluralPascalCaseName':startCase(camelCase(plural(_0x4467cf)))[_0x348544(0xc2)](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x4467cf))},_0x3b8b92=_0xfa0d8b+_0x348544(0x105)+_0x5163a9+'/server/service/';[_0x348544(0x9a),'COPY'][_0x348544(0xfe)](_0x57ace8[_0x348544(0x8a)])?await this['createHistoryServiceFiles'](_0x3b8b92,_0x2bab65,_0x57ace8,_0x2de13f,_0x3ccc48):await this[_0x348544(0xd4)](_0x3b8b92,_0x2bab65,_0x57ace8,_0x2de13f,_0x3ccc48);}async[a0_0x3ce6d0(0xa1)](_0x438d4e,_0x5337f0,_0x43e303,_0x5e7cbe,_0x518fa5){const _0x3c766b=a0_0x3ce6d0;await this['writeFile'](_0x438d4e+(_0x5337f0+'/index.ts'),serviceHistoryIndex,_0x518fa5);let _0x489780=this[_0x3c766b(0xd5)](_0x43e303,_0x5e7cbe);await this[_0x3c766b(0xf3)](_0x438d4e+(_0x5337f0+'/'+_0x5337f0+_0x3c766b(0xad)),_0x489780,_0x518fa5),await this[_0x3c766b(0xf3)](_0x438d4e+(_0x5337f0+'/'+_0x5337f0+'-query.ts'),serviceQuery,_0x518fa5),await this[_0x3c766b(0xf3)](_0x438d4e+(_0x5337f0+'/'+_0x5337f0+_0x3c766b(0xda)),serviceMutation,_0x518fa5);let _0x55ee61=this[_0x3c766b(0xdd)](_0x5e7cbe);await this[_0x3c766b(0xf3)](_0x438d4e+(_0x5337f0+'/'+_0x5337f0+_0x3c766b(0xb4)),_0x55ee61,_0x518fa5);let _0x47d0fc=this[_0x3c766b(0xba)](_0x43e303,_0x5e7cbe);await this['writeFile'](_0x438d4e+(_0x5337f0+'/'+_0x5337f0+'-history.ts'),_0x47d0fc,_0x518fa5);let _0x18d835='';_0x3c766b(0x9a)==_0x43e303[_0x3c766b(0x8a)]?(_0x18d835=_0x3c766b(0x101),await this[_0x3c766b(0xf3)](_0x438d4e+(_0x5337f0+_0x3c766b(0xe1)),serviceEntitySubscriber,_0x518fa5)):_0x18d835='';let _0x81e3e9=serviceEntitySubscriber[_0x3c766b(0xc2)](/{{entityToJson}}/g,_0x18d835);await this[_0x3c766b(0xf3)](_0x438d4e+(_0x5337f0+_0x3c766b(0xe1)),_0x81e3e9,_0x518fa5),await this['writeFile'](_0x438d4e+(_0x5337f0+'/'+_0x5337f0+_0x3c766b(0xc0)),serviceHistoryQuery,_0x518fa5),await this[_0x3c766b(0xf3)](_0x438d4e+(_0x5337f0+'/'+_0x5337f0+_0x3c766b(0xe2)),sereviceHistoryType,_0x518fa5);let _0x37b1e9=_0x438d4e+_0x3c766b(0xaf);0x0==await this[_0x3c766b(0xaa)](_0x37b1e9)&&await this[_0x3c766b(0xf3)](_0x37b1e9,allIndex,_0x518fa5);let _0x70a283=await fs['readFileSync'](_0x37b1e9,_0x3c766b(0x8b));_0x70a283[_0x3c766b(0x10c)]('export\x20*\x20from\x20\x27./'+_0x518fa5[_0x3c766b(0x10d)]+'/'+_0x518fa5[_0x3c766b(0x10d)]+_0x3c766b(0xa8))<0x0&&(_0x70a283=_0x70a283[_0x3c766b(0xc2)](/\/\* EXPORT ENTITY TYPES \*\//,_0x3c766b(0xf9)+_0x518fa5[_0x3c766b(0x10d)]+'/'+_0x518fa5['name']+_0x3c766b(0xa8))),_0x70a283[_0x3c766b(0x10c)](_0x3c766b(0xa3)+_0x518fa5[_0x3c766b(0x10d)]+'/'+_0x518fa5['name']+'\x27')<0x0&&(_0x70a283=_0x70a283[_0x3c766b(0xc2)](/\/\* EXPORT ENTITY TYPES \*\//,_0x3c766b(0xf9)+_0x518fa5[_0x3c766b(0x10d)]+'/'+_0x518fa5['name']+'\x27')),_0x70a283[_0x3c766b(0x10c)]('import\x20{\x20entities\x20as\x20'+_0x518fa5['pascalCaseName']+_0x3c766b(0xb7)+_0x518fa5['pascalCaseName']+'Resolvers,\x20subscribers\x20as\x20'+_0x518fa5[_0x3c766b(0x100)]+_0x3c766b(0xd9)+_0x518fa5[_0x3c766b(0x10d)]+'\x27')<0x0&&(_0x70a283=_0x70a283['replace'](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,'/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20'+_0x518fa5[_0x3c766b(0x100)]+_0x3c766b(0xb7)+_0x518fa5[_0x3c766b(0x100)]+_0x3c766b(0xa0)+_0x518fa5[_0x3c766b(0x100)]+_0x3c766b(0xd9)+_0x518fa5[_0x3c766b(0x10d)]+'\x27')),_0x70a283[_0x3c766b(0x10c)](_0x3c766b(0xd1)+_0x518fa5[_0x3c766b(0x100)]+_0x3c766b(0xed))<0x0&&(_0x70a283=_0x70a283[_0x3c766b(0xc2)](/\/\* ENTITIES \*\//,_0x3c766b(0x104)+_0x518fa5[_0x3c766b(0x100)]+_0x3c766b(0xed))),_0x70a283[_0x3c766b(0x10c)]('...'+_0x518fa5[_0x3c766b(0x100)]+_0x3c766b(0xd6))<0x0&&(_0x70a283=_0x70a283[_0x3c766b(0xc2)](/\/\* RESOLVER CLASSES \*\//,_0x3c766b(0xb2)+_0x518fa5[_0x3c766b(0x100)]+'Resolvers,')),_0x70a283[_0x3c766b(0x10c)](_0x3c766b(0xd1)+_0x518fa5['pascalCaseName']+_0x3c766b(0xfc))<0x0&&(_0x70a283=_0x70a283[_0x3c766b(0xc2)](/\/\* SUBSCRIBERS \*\//,'/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...'+_0x518fa5[_0x3c766b(0x100)]+_0x3c766b(0xfc))),await this[_0x3c766b(0xf3)](_0x37b1e9,_0x70a283,_0x518fa5);}async['createNoHistoryServiceFiels'](_0x42d66e,_0x23f0bc,_0x2297eb,_0xb7ff78,_0xe02fdc){const _0xc59a97=a0_0x3ce6d0;await this[_0xc59a97(0xf3)](_0x42d66e+(_0x23f0bc+_0xc59a97(0xe8)),serviceIndex,_0xe02fdc),await this[_0xc59a97(0xf3)](_0x42d66e+(_0x23f0bc+'/'+_0x23f0bc+'-query.ts'),serviceQuery,_0xe02fdc),await this[_0xc59a97(0xf3)](_0x42d66e+(_0x23f0bc+'/'+_0x23f0bc+_0xc59a97(0xda)),serviceMutation,_0xe02fdc);let _0x2fd7a3=this[_0xc59a97(0xd5)](_0x2297eb,_0xb7ff78);await this[_0xc59a97(0xf3)](_0x42d66e+(_0x23f0bc+'/'+_0x23f0bc+'.ts'),_0x2fd7a3,_0xe02fdc);let _0x575e11=this[_0xc59a97(0xdd)](_0xb7ff78);await this['writeFile'](_0x42d66e+(_0x23f0bc+'/'+_0x23f0bc+_0xc59a97(0xb4)),_0x575e11,_0xe02fdc);let _0x5eb57c=_0x42d66e+'index.ts';0x0==await this[_0xc59a97(0xaa)](_0x5eb57c)&&await this[_0xc59a97(0xf3)](_0x5eb57c,allIndex,_0xe02fdc);let _0x3f53c0=await fs[_0xc59a97(0xef)](_0x5eb57c,_0xc59a97(0x8b));_0x3f53c0[_0xc59a97(0x10c)](_0xc59a97(0xa3)+_0xe02fdc['name']+'/'+_0xe02fdc[_0xc59a97(0x10d)]+'\x27')<0x0&&(_0x3f53c0=_0x3f53c0['replace'](/\/\* EXPORT ENTITY TYPES \*\//,_0xc59a97(0xf9)+_0xe02fdc['name']+'/'+_0xe02fdc[_0xc59a97(0x10d)]+'\x27')),_0x3f53c0[_0xc59a97(0x10c)]('import\x20{\x20entities\x20as\x20'+_0xe02fdc[_0xc59a97(0x100)]+_0xc59a97(0xb7)+_0xe02fdc[_0xc59a97(0x100)]+_0xc59a97(0xce)+_0xe02fdc['name']+'\x27')<0x0&&(_0x3f53c0=_0x3f53c0['replace'](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0xc59a97(0xe6)+_0xe02fdc[_0xc59a97(0x100)]+'Entities,\x20resolvers\x20as\x20'+_0xe02fdc[_0xc59a97(0x100)]+'Resolvers\x20}\x20from\x20\x27./'+_0xe02fdc[_0xc59a97(0x10d)]+'\x27')),_0x3f53c0[_0xc59a97(0x10c)](_0xc59a97(0xd1)+_0xe02fdc[_0xc59a97(0x100)]+_0xc59a97(0xed))<0x0&&(_0x3f53c0=_0x3f53c0[_0xc59a97(0xc2)](/\/\* ENTITIES \*\//,'/*\x20ENTITIES\x20*/\x0a\x09...'+_0xe02fdc[_0xc59a97(0x100)]+_0xc59a97(0xed))),_0x3f53c0[_0xc59a97(0x10c)](_0xc59a97(0xd1)+_0xe02fdc[_0xc59a97(0x100)]+_0xc59a97(0xd6))<0x0&&(_0x3f53c0=_0x3f53c0[_0xc59a97(0xc2)](/\/\* RESOLVER CLASSES \*\//,_0xc59a97(0xb2)+_0xe02fdc[_0xc59a97(0x100)]+_0xc59a97(0xd6))),await this[_0xc59a97(0xf3)](_0x5eb57c,_0x3f53c0,_0xe02fdc);}[a0_0x3ce6d0(0xdd)](_0x58bb18){const _0x329af6=a0_0x3ce6d0;let _0xbd4308=sereviceType,_0x3032bd=_0x58bb18[_0x329af6(0xe4)](_0x16fe44=>{const _0x4ebe2b=_0x329af6;if('id'==_0x16fe44[_0x4ebe2b(0x10d)])return'';if(_0x4ebe2b(0xff)==_0x16fe44[_0x4ebe2b(0x10d)])return'';if('created_at'==_0x16fe44[_0x4ebe2b(0x10d)])return'';if('updated_at'==_0x16fe44['name'])return'';if('creator_id'==_0x16fe44[_0x4ebe2b(0x10d)])return'';if(_0x4ebe2b(0xfa)==_0x16fe44['name'])return'';let _0x256e16=this['getFieldType'](_0x16fe44),_0x4da8ec=this[_0x4ebe2b(0x10b)](_0x16fe44),_0x233a51=camelCase(_0x16fe44[_0x4ebe2b(0x10d)]);return'\x20\x20'+('@Field('+(0x0==_0x256e16[_0x4ebe2b(0x89)]?'':_0x4ebe2b(0x98)+_0x256e16+',')+_0x4ebe2b(0xcc)+_0x16fe44[_0x4ebe2b(0x96)]+_0x4ebe2b(0x88))+'\x0a\x20\x20'+(''+_0x233a51+(_0x16fe44[_0x4ebe2b(0x96)]?'?':'')+':\x20'+_0x4da8ec)+'\x0a';});_0xbd4308=_0xbd4308['replace'](/{{newTypeColumns}}/g,_0x3032bd[_0x329af6(0xf8)]('\x0a'));let _0x5d9c50=_0x58bb18[_0x329af6(0xe4)](_0x44f6b7=>{const _0x5de640=_0x329af6;if('id'==_0x44f6b7[_0x5de640(0x10d)])return'';if(_0x5de640(0xff)==_0x44f6b7[_0x5de640(0x10d)])return'';if('created_at'==_0x44f6b7[_0x5de640(0x10d)])return'';if('updated_at'==_0x44f6b7[_0x5de640(0x10d)])return'';if('creator_id'==_0x44f6b7[_0x5de640(0x10d)])return'';if(_0x5de640(0xfa)==_0x44f6b7[_0x5de640(0x10d)])return'';let _0x5357e5=this[_0x5de640(0xc6)](_0x44f6b7),_0x8dc3c=this[_0x5de640(0x10b)](_0x44f6b7);_0x44f6b7[_0x5de640(0x96)]=!0x0;let _0x4a66e6=camelCase(_0x44f6b7[_0x5de640(0x10d)]);return'\x20\x20'+(_0x5de640(0xc3)+(0x0==_0x5357e5[_0x5de640(0x89)]?'':_0x5de640(0x98)+_0x5357e5+',')+_0x5de640(0xcc)+_0x44f6b7[_0x5de640(0x96)]+'\x20})')+_0x5de640(0x9c)+(''+_0x4a66e6+(_0x44f6b7[_0x5de640(0x96)]?'?':'')+':\x20'+_0x8dc3c)+'\x0a';});return _0xbd4308=_0xbd4308['replace'](/{{patchTypeColumns}}/g,_0x5d9c50[_0x329af6(0xf8)]('\x0a')),_0xbd4308;}[a0_0x3ce6d0(0xd5)](_0x4fde39,_0x1436e4){const _0x5a87b2=a0_0x3ce6d0;let _0xabe7d4=serviceEntity,_0x420e37=_0x1436e4[_0x5a87b2(0xe7)](function(_0x1da360,_0x1c4b7d){const _0x592e09=_0x5a87b2;return _0x1da360[_0x592e09(0x9e)]-_0x1c4b7d[_0x592e09(0x9e)];})[_0x5a87b2(0xe4)](_0xa29d9f=>this['columnToEntityColumn'](_0xa29d9f));[_0x5a87b2(0xf1),_0x5a87b2(0x9a)]['includes'](_0x4fde39[_0x5a87b2(0x8a)])&&_0x420e37[_0x5a87b2(0xe5)]('\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201'),_0xabe7d4=_0xabe7d4[_0x5a87b2(0xc2)](/{{entityColumns}}/g,_0x420e37['join']('\x0a'));let _0xbfc521='',_0x4e1f3d=_0x1436e4[_0x5a87b2(0xea)](_0x28829b=>_0x28829b[_0x5a87b2(0xa4)]&&_0x28829b[_0x5a87b2(0xa4)]>0x0)['sort'](function(_0x4b27ea,_0x4af5b6){const _0x5457ee=_0x5a87b2;return _0x4b27ea[_0x5457ee(0xa4)]-_0x4af5b6['uniqRank'];});if(_0x4e1f3d[_0x5a87b2(0x89)]>0x0){_0xbfc521=_0x5a87b2(0xbe);let _0x16543b=_0x4e1f3d[_0x5a87b2(0xe4)](_0x436a49=>{const _0x3c787d=_0x5a87b2;let _0x693b44=_0x436a49['name'];return _0x3c787d(0xff)==_0x436a49[_0x3c787d(0x10d)]&&(_0x693b44=_0x3c787d(0xd8)),_0x3c787d(0x10f)==_0x436a49[_0x3c787d(0x10d)]&&(_0x693b44='creator'),_0x3c787d(0xfa)==_0x436a49[_0x3c787d(0x10d)]&&(_0x693b44=_0x3c787d(0xdb)),'{{camelCase\x20name}}.'+camelCase(_0x693b44);});_0xbfc521=_0xbfc521[_0x5a87b2(0xc2)](/{{indexColumns}}/g,_0x16543b[_0x5a87b2(0xf8)](','));}return _0xabe7d4=_0xabe7d4[_0x5a87b2(0xc2)](/{{indexAnn}}/g,_0xbfc521),_0xabe7d4;}[a0_0x3ce6d0(0xba)](_0x2cd8fc,_0x42d908){const _0x2a1b9f=a0_0x3ce6d0;let _0x45ef97='JSON'==_0x2cd8fc['dataProp']?serviceEntityHistJson:serviceEntityHistCopy,_0x2b5520=_0x42d908['sort'](function(_0x2d47b5,_0x3c2fcd){const _0x33e8a5=a0_0x308d;return _0x2d47b5[_0x33e8a5(0x9e)]-_0x3c2fcd['rank'];})['map'](_0x5b7ce3=>this[_0x2a1b9f(0xf5)](_0x5b7ce3));return _0x45ef97=_0x45ef97['replace'](/{{entityColumns}}/g,_0x2b5520[_0x2a1b9f(0xf8)]('\x0a')),_0x45ef97;}[a0_0x3ce6d0(0xf5)](_0x5492da){const _0x199df6=a0_0x3ce6d0;if('id'==_0x5492da['name'])return'';if(_0x199df6(0xff)==_0x5492da['name'])return'';if(_0x199df6(0xc4)==_0x5492da[_0x199df6(0x10d)])return'';if(_0x199df6(0xc1)==_0x5492da['name'])return'';if(_0x199df6(0x10f)==_0x5492da[_0x199df6(0x10d)])return'';if(_0x199df6(0xfa)==_0x5492da[_0x199df6(0x10d)])return'';let _0xa7dcbe=_0x5492da['colType'];_0x199df6(0x9b)==_0x5492da[_0x199df6(0xb0)]&&(_0xa7dcbe=_0x199df6(0xcf)),'long'==_0x5492da['colType']&&(_0xa7dcbe=_0x199df6(0xd7)),_0x199df6(0xd3)==_0x5492da[_0x199df6(0xb0)]&&(_0xa7dcbe=_0x199df6(0xee)),_0x199df6(0xbb)==_0x5492da['colType']&&(_0xa7dcbe=_0x199df6(0x99));let _0x1a4ccd='';'string'==_0x5492da[_0x199df6(0xb0)]&&(_0x1a4ccd=_0x5492da[_0x199df6(0x93)]);let _0xc70b3a=this[_0x199df6(0xc6)](_0x5492da),_0x3406b4=this['getColTxtType'](_0x5492da),_0x4ae451=camelCase(_0x5492da['name']);return'\x20\x20'+(_0x199df6(0x85)+_0x5492da['name']+_0x199df6(0x103)+_0xa7dcbe+_0x199df6(0xf2)+_0x5492da[_0x199df6(0x96)]+'\x20'+(0x0==_0x1a4ccd[_0x199df6(0x89)]?'':_0x199df6(0xca)+_0x1a4ccd)+_0x199df6(0x88))+'\x0a\x20\x20'+(_0x199df6(0xc3)+(0x0==_0xc70b3a[_0x199df6(0x89)]?'':_0x199df6(0x98)+_0xc70b3a+',')+_0x199df6(0xcc)+_0x5492da[_0x199df6(0x96)]+_0x199df6(0x88))+_0x199df6(0x9c)+(''+_0x4ae451+(_0x5492da[_0x199df6(0x96)]?'?':'')+':\x20'+_0x3406b4)+'\x0a';}[a0_0x3ce6d0(0xc6)](_0x33242d){const _0xe32b4=a0_0x3ce6d0;let _0x47adee='';return'double'==_0x33242d[_0xe32b4(0xb0)]&&(_0x47adee=_0xe32b4(0xe9)),_0xe32b4(0xb8)==_0x33242d[_0xe32b4(0xb0)]&&(_0x47adee='Float'),_0xe32b4(0x97)==_0x33242d['colType']&&(_0x47adee='Int'),_0xe32b4(0xd2)==_0x33242d[_0xe32b4(0xb0)]&&(_0x47adee=_0xe32b4(0x87)),_0x47adee;}['getColTxtType'](_0x447693){const _0x26e769=a0_0x3ce6d0;let _0x5ad4f2=_0x447693['colType'];return _0x26e769(0x106)==_0x447693[_0x26e769(0xb0)]&&(_0x5ad4f2=_0x26e769(0x116)),_0x26e769(0x9b)==_0x447693[_0x26e769(0xb0)]&&(_0x5ad4f2=_0x26e769(0x116)),_0x26e769(0xb8)==_0x447693[_0x26e769(0xb0)]&&(_0x5ad4f2=_0x26e769(0x116)),_0x26e769(0xd2)==_0x447693[_0x26e769(0xb0)]&&(_0x5ad4f2=_0x26e769(0x116)),_0x26e769(0x97)==_0x447693['colType']&&(_0x5ad4f2=_0x26e769(0x116)),_0x26e769(0xbb)==_0x447693[_0x26e769(0xb0)]&&(_0x5ad4f2=_0x26e769(0xf4)),_0x26e769(0xac)==_0x447693[_0x26e769(0xb0)]&&(_0x5ad4f2=_0x26e769(0xf4)),'text'==_0x447693['colType']&&(_0x5ad4f2=_0x26e769(0xd3)),_0x5ad4f2;}async[a0_0x3ce6d0(0xf3)](_0x5ab765,_0x1a42db,_0x2e402b){const _0x5be9bc=a0_0x3ce6d0;await fs[_0x5be9bc(0x113)](_0x5ab765,this[_0x5be9bc(0x10e)](_0x1a42db,_0x2e402b),_0x5be9bc(0x8b));}[a0_0x3ce6d0(0x10e)](_0x15681c,_0x2d0e7f){const _0x4f547d=a0_0x3ce6d0;return _0x15681c[_0x4f547d(0xc2)](/{{pascalCase name}}/g,_0x2d0e7f['pascalCaseName'])[_0x4f547d(0xc2)](/{{camelCase name}}/g,_0x2d0e7f[_0x4f547d(0xf7)])[_0x4f547d(0xc2)](/{{snakeCase name}}/g,_0x2d0e7f[_0x4f547d(0x102)])['replace'](/{{pluralPascalCase name}}/g,_0x2d0e7f[_0x4f547d(0xbd)])['replace'](/{{pluralCamelCase name}}/g,_0x2d0e7f[_0x4f547d(0x8f)])['replace'](/{{tableName}}/g,_0x2d0e7f['tableName'])['replace'](/{{name}}/g,_0x2d0e7f[_0x4f547d(0x10d)]);}async[a0_0x3ce6d0(0xb3)](_0x44a0e8,_0x3ba2b8,_0x4e7342){const _0x59374b=a0_0x3ce6d0;let _0x386933=_0x44a0e8+_0x59374b(0x10a);await this[_0x59374b(0x8c)](_0x386933),_0x386933=_0x386933+'/'+_0x3ba2b8,await this['createDir'](_0x386933),_0x386933+=_0x59374b(0xab),await this['createDir'](_0x386933),_0x386933+=_0x59374b(0xe0),await this[_0x59374b(0x8c)](_0x386933),_0x386933=_0x386933+'/'+_0x4e7342,await this[_0x59374b(0x8c)](_0x386933);}[a0_0x3ce6d0(0xb9)](){const _0x4b9a15=a0_0x3ce6d0;let _0x5b70c8=process[_0x4b9a15(0xa5)]['PWD'][_0x4b9a15(0x107)]('/'),_0x332880=[];for(let _0x13f1b3=0x0;_0x13f1b3<_0x5b70c8[_0x4b9a15(0x89)]&&_0x4b9a15(0xc9)!=_0x5b70c8[_0x13f1b3];_0x13f1b3++)_0x332880[_0x4b9a15(0xe5)](_0x5b70c8[_0x13f1b3]);return _0x332880[_0x4b9a15(0xf8)]('/');}async[a0_0x3ce6d0(0x8c)](_0x3ebf51){const _0xa1653d=a0_0x3ce6d0;0x0==await this[_0xa1653d(0xaa)](_0x3ebf51)&&fs['mkdirSync'](_0x3ebf51);}async[a0_0x3ce6d0(0xaa)](_0x80aae2){const _0x56d78a=a0_0x3ce6d0;return await fs[_0x56d78a(0xe3)](_0x80aae2);}};tslib_1[a0_0x3ce6d0(0xdf)]([(0x0,type_graphql_1[a0_0x3ce6d0(0x109)])(_0x1cd20b=>Boolean,{'description':a0_0x3ce6d0(0xbc)}),tslib_1[a0_0x3ce6d0(0xc5)](0x0,(0x0,type_graphql_1[a0_0x3ce6d0(0x9d)])('id')),tslib_1[a0_0x3ce6d0(0xc5)](0x1,(0x0,type_graphql_1['Ctx'])()),tslib_1['__metadata']('design:type',Function),tslib_1['__metadata'](a0_0x3ce6d0(0xcb),[String,Object]),tslib_1[a0_0x3ce6d0(0xb1)](a0_0x3ce6d0(0xa2),Promise)],OperatoToolCreateService[a0_0x3ce6d0(0xec)],a0_0x3ce6d0(0xf0),null),OperatoToolCreateService=tslib_1[a0_0x3ce6d0(0xdf)]([(0x0,type_graphql_1[a0_0x3ce6d0(0x117)])()],OperatoToolCreateService),exports[a0_0x3ce6d0(0xa7)]=OperatoToolCreateService;function a0_0x308d(_0x25bb4a,_0x4c43d1){const _0x611364=a0_0x6113();return a0_0x308d=function(_0x308da0,_0xdcba85){_0x308da0=_0x308da0-0x85;let _0x14ccd6=_0x611364[_0x308da0];return _0x14ccd6;},a0_0x308d(_0x25bb4a,_0x4c43d1);}const allIndex=a0_0x3ce6d0(0x112),serviceIndex=a0_0x3ce6d0(0x8e),serviceHistoryIndex=a0_0x3ce6d0(0x114),serviceQuery=a0_0x3ce6d0(0xbf),serviceHistoryQuery=a0_0x3ce6d0(0x90),serviceMutation=a0_0x3ce6d0(0x108),sereviceType=a0_0x3ce6d0(0xb5),sereviceHistoryType='\x0aimport\x20{\x20ObjectType,\x20Field,\x20InputType,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0a\x0a@ObjectType()\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryList\x20{\x0a\x20\x20@Field(type\x20=>\x20[{{pascalCase\x20name}}History])\x0a\x20\x20items:\x20{{pascalCase\x20name}}History[]\x0a\x0a\x20\x20@Field(type\x20=>\x20Int)\x0a\x20\x20total:\x20number\x0a}\x0a',serviceEntity=a0_0x3ce6d0(0xcd),serviceEntityHistCopy=a0_0x3ce6d0(0xae),serviceEntityHistJson=a0_0x3ce6d0(0xc7),serviceEntitySubscriber=a0_0x3ce6d0(0x9f);
1
+ 'use strict';const a0_0xc2c71f=a0_0x30e8;(function(_0x2a72ae,_0x3c41e2){const _0x6695d8=a0_0x30e8,_0x1b2aac=_0x2a72ae();while(!![]){try{const _0x5c4f75=-parseInt(_0x6695d8(0x150))/0x1*(-parseInt(_0x6695d8(0x13a))/0x2)+parseInt(_0x6695d8(0x108))/0x3*(-parseInt(_0x6695d8(0x106))/0x4)+parseInt(_0x6695d8(0x141))/0x5+-parseInt(_0x6695d8(0x135))/0x6*(parseInt(_0x6695d8(0x124))/0x7)+-parseInt(_0x6695d8(0x146))/0x8+parseInt(_0x6695d8(0x14e))/0x9*(-parseInt(_0x6695d8(0x121))/0xa)+-parseInt(_0x6695d8(0x127))/0xb*(-parseInt(_0x6695d8(0x12e))/0xc);if(_0x5c4f75===_0x3c41e2)break;else _0x1b2aac['push'](_0x1b2aac['shift']());}catch(_0x2b41d6){_0x1b2aac['push'](_0x1b2aac['shift']());}}}(a0_0x2f0a,0x7e63e));Object[a0_0xc2c71f(0x154)](exports,a0_0xc2c71f(0x148),{'value':!0x0}),exports[a0_0xc2c71f(0x149)]=void 0x0;function a0_0x30e8(_0x590728,_0x4e8c8d){const _0x2f0a05=a0_0x2f0a();return a0_0x30e8=function(_0x30e8a9,_0x57cc46){_0x30e8a9=_0x30e8a9-0xd2;let _0x5c2908=_0x2f0a05[_0x30e8a9];return _0x5c2908;},a0_0x30e8(_0x590728,_0x4e8c8d);}function a0_0x2f0a(){const _0x148b90=['__param','529725nOYFHU','length','rank','1518LbTVuG','@Column({name:\x27','{{camelCase\x20name}}.','design:type','-type.ts','\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201','import\x20{\x20entities\x20as\x20','214152AHgVet','\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','filter','Resolvers\x20}\x20from\x20\x27./','find','dataProp','getColTxtType','78nIexFB','Operato\x20Tool\x20Create\x20Service','/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...','EntitySubscribers\x20}\x20from\x20\x27./','domain_id','38KlsyuY','design:paramtypes','-history\x27','pluralCamelCaseName','pascalCaseName','\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','join','961285HMxKYx','updated_at','camelCaseName','\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','existsPath','6992712DVneMH','\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','__esModule','OperatoToolCreateService','existsSync','-history.ts','toolCreateService','EntitySubscribers,','9DHccLo','timestamp\x20without\x20time\x20zone','22663GqDAKE','type-graphql','COPY','datetime','defineProperty','/*\x20ENTITIES\x20*/\x0a\x09...','__decorate','createNoHistoryServiceFiels','integer','nullable','writeFile','packages','export\x20*\x20from\x20\x27./','getFieldType','columnToEntityColumn','Ctx','/server','PWD','pluralize','tableName','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','\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','Entity','type\x20=>','\x20})','number','\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','createHistoryEntityText','uniqRank','\x0a\x20\x20','/event-subscriber.ts','lodash','createDir','string','creator','findOne','tslib','writeFileSync','readFileSync','includes','\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,\x20subscribers\x20as\x20','indexOf','utf8','getRepository','Int','Entities,','double\x20precision',',length:','__metadata','Entities,\x20resolvers\x20as\x20','createServiceFiles','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','Float','-history-query.ts','creator_id','float','getProjectRootPath','\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','/server/service/','prototype','index.ts','\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','double','map','\x27,\x20nullable:\x20','-query.ts','bigint','colType','createServicePath','long','JSON','createHistoryServiceFiles','split','createTypeText','pluralPascalCaseName','replaceNamesMap','/index.ts','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','-mutation.ts','push','4YakINa','/packages','1302981mgpUCa','\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','decimal','env','Resolvers,','Query','Date','.ts','\x20{\x20nullable:\x20','name','@things-factory/shell','createEntityText','created_at','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','updater','\x27,\x20type:\x20\x27','-history-type.ts','updater_id','mkdirSync','\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}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','replace','Resolver','design:returntype','...','@Field(','2757170BBSlrS','@things-factory/resource-base'];a0_0x2f0a=function(){return _0x148b90;};return a0_0x2f0a();}const tslib_1=require(a0_0xc2c71f(0xd8)),type_graphql_1=require(a0_0xc2c71f(0x151)),shell_1=require(a0_0xc2c71f(0x112)),resource_base_1=require(a0_0xc2c71f(0x122)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0xc2c71f(0xd3)),{plural:plural}=require(a0_0xc2c71f(0x162)),fs=require('fs');let OperatoToolCreateService=class{async[a0_0xc2c71f(0x14c)](_0x2a5934,_0x1cddb5){const _0x752008=a0_0xc2c71f,{domain:_0x3d37ba}=_0x1cddb5['state'],_0x542756=await(0x0,shell_1['getRepository'])(resource_base_1[_0x752008(0x166)])[_0x752008(0xd7)]({'where':{'id':_0x2a5934}}),_0x150722=await(0x0,shell_1[_0x752008(0xe0)])(resource_base_1['EntityColumn'])[_0x752008(0x132)]({'where':{'domain':{'id':_0x3d37ba['id']},'entity':{'id':_0x542756['id']}}});let {name:_0x45f034='',bundle:_0x13fb69=''}=_0x542756||{},_0x3919df=this[_0x752008(0xed)](),_0x38d24f=kebabCase(_0x45f034);return await this['createServicePath'](_0x3919df,_0x13fb69,_0x38d24f),await this['createServiceFiles'](_0x3919df,_0x13fb69,_0x45f034,_0x38d24f,_0x542756,_0x150722),!0x0;}async[a0_0xc2c71f(0xe7)](_0x544d21,_0x10dcae,_0x2418e3,_0x5794cb,_0x154cd8,_0x27e62a){const _0x1f67cd=a0_0xc2c71f;let _0x528ab0={'name':_0x5794cb,'tableName':_0x154cd8['tableName'],'pascalCaseName':startCase(camelCase(_0x2418e3))[_0x1f67cd(0x11c)](/ /g,''),'camelCaseName':camelCase(_0x2418e3),'snakeCaseName':snakeCase(_0x2418e3),'pluralPascalCaseName':startCase(camelCase(plural(_0x2418e3)))['replace'](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x2418e3))},_0x3a9427=_0x544d21+'/packages/'+_0x10dcae+_0x1f67cd(0xef);['JSON',_0x1f67cd(0x152)][_0x1f67cd(0xdb)](_0x154cd8[_0x1f67cd(0x133)])?await this[_0x1f67cd(0xfc)](_0x3a9427,_0x5794cb,_0x154cd8,_0x27e62a,_0x528ab0):await this[_0x1f67cd(0x157)](_0x3a9427,_0x5794cb,_0x154cd8,_0x27e62a,_0x528ab0);}async[a0_0xc2c71f(0xfc)](_0xcd1687,_0x4102af,_0x2100b3,_0x10b714,_0x25d13a){const _0x1748f0=a0_0xc2c71f;await this[_0x1748f0(0x15a)](_0xcd1687+(_0x4102af+_0x1748f0(0x101)),serviceHistoryIndex,_0x25d13a);let _0x126c51=this[_0x1748f0(0x113)](_0x2100b3,_0x10b714);await this[_0x1748f0(0x15a)](_0xcd1687+(_0x4102af+'/'+_0x4102af+_0x1748f0(0x10f)),_0x126c51,_0x25d13a),await this['writeFile'](_0xcd1687+(_0x4102af+'/'+_0x4102af+_0x1748f0(0xf6)),serviceQuery,_0x25d13a),await this[_0x1748f0(0x15a)](_0xcd1687+(_0x4102af+'/'+_0x4102af+_0x1748f0(0x104)),serviceMutation,_0x25d13a);let _0x179967=this[_0x1748f0(0xfe)](_0x10b714);await this[_0x1748f0(0x15a)](_0xcd1687+(_0x4102af+'/'+_0x4102af+_0x1748f0(0x12b)),_0x179967,_0x25d13a);let _0x5553cb=this['createHistoryEntityText'](_0x2100b3,_0x10b714);await this[_0x1748f0(0x15a)](_0xcd1687+(_0x4102af+'/'+_0x4102af+_0x1748f0(0x14b)),_0x5553cb,_0x25d13a);let _0x5547e7='';_0x1748f0(0xfb)==_0x2100b3[_0x1748f0(0x133)]?(_0x5547e7=_0x1748f0(0x13f),await this[_0x1748f0(0x15a)](_0xcd1687+(_0x4102af+_0x1748f0(0xd2)),serviceEntitySubscriber,_0x25d13a)):_0x5547e7='';let _0x35ba7d=serviceEntitySubscriber[_0x1748f0(0x11c)](/{{entityToJson}}/g,_0x5547e7);await this[_0x1748f0(0x15a)](_0xcd1687+(_0x4102af+'/event-subscriber.ts'),_0x35ba7d,_0x25d13a),await this[_0x1748f0(0x15a)](_0xcd1687+(_0x4102af+'/'+_0x4102af+_0x1748f0(0xea)),serviceHistoryQuery,_0x25d13a),await this[_0x1748f0(0x15a)](_0xcd1687+(_0x4102af+'/'+_0x4102af+_0x1748f0(0x118)),sereviceHistoryType,_0x25d13a);let _0x3fa6f8=_0xcd1687+_0x1748f0(0xf1);0x0==await this[_0x1748f0(0x145)](_0x3fa6f8)&&await this[_0x1748f0(0x15a)](_0x3fa6f8,allIndex,_0x25d13a);let _0x3a3881=await fs['readFileSync'](_0x3fa6f8,_0x1748f0(0xdf));_0x3a3881['indexOf']('export\x20*\x20from\x20\x27./'+_0x25d13a[_0x1748f0(0x111)]+'/'+_0x25d13a[_0x1748f0(0x111)]+_0x1748f0(0x13c))<0x0&&(_0x3a3881=_0x3a3881[_0x1748f0(0x11c)](/\/\* EXPORT ENTITY TYPES \*\//,_0x1748f0(0xe8)+_0x25d13a[_0x1748f0(0x111)]+'/'+_0x25d13a[_0x1748f0(0x111)]+_0x1748f0(0x13c))),_0x3a3881[_0x1748f0(0xde)]('export\x20*\x20from\x20\x27./'+_0x25d13a[_0x1748f0(0x111)]+'/'+_0x25d13a[_0x1748f0(0x111)]+'\x27')<0x0&&(_0x3a3881=_0x3a3881[_0x1748f0(0x11c)](/\/\* EXPORT ENTITY TYPES \*\//,'/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./'+_0x25d13a['name']+'/'+_0x25d13a['name']+'\x27')),_0x3a3881[_0x1748f0(0xde)](_0x1748f0(0x12d)+_0x25d13a[_0x1748f0(0x13e)]+'Entities,\x20resolvers\x20as\x20'+_0x25d13a[_0x1748f0(0x13e)]+_0x1748f0(0xdd)+_0x25d13a[_0x1748f0(0x13e)]+_0x1748f0(0x138)+_0x25d13a[_0x1748f0(0x111)]+'\x27')<0x0&&(_0x3a3881=_0x3a3881['replace'](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x1748f0(0x164)+_0x25d13a[_0x1748f0(0x13e)]+_0x1748f0(0xe6)+_0x25d13a['pascalCaseName']+_0x1748f0(0xdd)+_0x25d13a[_0x1748f0(0x13e)]+_0x1748f0(0x138)+_0x25d13a['name']+'\x27')),_0x3a3881[_0x1748f0(0xde)](_0x1748f0(0x11f)+_0x25d13a[_0x1748f0(0x13e)]+_0x1748f0(0xe2))<0x0&&(_0x3a3881=_0x3a3881['replace'](/\/\* ENTITIES \*\//,'/*\x20ENTITIES\x20*/\x0a\x09...'+_0x25d13a['pascalCaseName']+_0x1748f0(0xe2))),_0x3a3881['indexOf']('...'+_0x25d13a[_0x1748f0(0x13e)]+_0x1748f0(0x10c))<0x0&&(_0x3a3881=_0x3a3881[_0x1748f0(0x11c)](/\/\* RESOLVER CLASSES \*\//,_0x1748f0(0x115)+_0x25d13a['pascalCaseName']+_0x1748f0(0x10c))),_0x3a3881[_0x1748f0(0xde)](_0x1748f0(0x11f)+_0x25d13a['pascalCaseName']+_0x1748f0(0x14d))<0x0&&(_0x3a3881=_0x3a3881['replace'](/\/\* SUBSCRIBERS \*\//,_0x1748f0(0x137)+_0x25d13a[_0x1748f0(0x13e)]+_0x1748f0(0x14d))),await this[_0x1748f0(0x15a)](_0x3fa6f8,_0x3a3881,_0x25d13a);}async[a0_0xc2c71f(0x157)](_0x237420,_0xa09bdd,_0x25263d,_0x54e01e,_0xa2a128){const _0x1b85c6=a0_0xc2c71f;await this[_0x1b85c6(0x15a)](_0x237420+(_0xa09bdd+_0x1b85c6(0x101)),serviceIndex,_0xa2a128),await this[_0x1b85c6(0x15a)](_0x237420+(_0xa09bdd+'/'+_0xa09bdd+_0x1b85c6(0xf6)),serviceQuery,_0xa2a128),await this[_0x1b85c6(0x15a)](_0x237420+(_0xa09bdd+'/'+_0xa09bdd+_0x1b85c6(0x104)),serviceMutation,_0xa2a128);let _0x3f634e=this['createEntityText'](_0x25263d,_0x54e01e);await this[_0x1b85c6(0x15a)](_0x237420+(_0xa09bdd+'/'+_0xa09bdd+_0x1b85c6(0x10f)),_0x3f634e,_0xa2a128);let _0x3e2cc8=this[_0x1b85c6(0xfe)](_0x54e01e);await this['writeFile'](_0x237420+(_0xa09bdd+'/'+_0xa09bdd+_0x1b85c6(0x12b)),_0x3e2cc8,_0xa2a128);let _0x4dbf9c=_0x237420+_0x1b85c6(0xf1);0x0==await this[_0x1b85c6(0x145)](_0x4dbf9c)&&await this[_0x1b85c6(0x15a)](_0x4dbf9c,allIndex,_0xa2a128);let _0x35c230=await fs[_0x1b85c6(0xda)](_0x4dbf9c,_0x1b85c6(0xdf));_0x35c230[_0x1b85c6(0xde)](_0x1b85c6(0x15c)+_0xa2a128['name']+'/'+_0xa2a128['name']+'\x27')<0x0&&(_0x35c230=_0x35c230[_0x1b85c6(0x11c)](/\/\* EXPORT ENTITY TYPES \*\//,'/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./'+_0xa2a128['name']+'/'+_0xa2a128[_0x1b85c6(0x111)]+'\x27')),_0x35c230[_0x1b85c6(0xde)](_0x1b85c6(0x12d)+_0xa2a128[_0x1b85c6(0x13e)]+_0x1b85c6(0xe6)+_0xa2a128[_0x1b85c6(0x13e)]+_0x1b85c6(0x131)+_0xa2a128[_0x1b85c6(0x111)]+'\x27')<0x0&&(_0x35c230=_0x35c230[_0x1b85c6(0x11c)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x1b85c6(0x164)+_0xa2a128['pascalCaseName']+_0x1b85c6(0xe6)+_0xa2a128[_0x1b85c6(0x13e)]+'Resolvers\x20}\x20from\x20\x27./'+_0xa2a128[_0x1b85c6(0x111)]+'\x27')),_0x35c230[_0x1b85c6(0xde)](_0x1b85c6(0x11f)+_0xa2a128[_0x1b85c6(0x13e)]+_0x1b85c6(0xe2))<0x0&&(_0x35c230=_0x35c230[_0x1b85c6(0x11c)](/\/\* ENTITIES \*\//,_0x1b85c6(0x155)+_0xa2a128[_0x1b85c6(0x13e)]+_0x1b85c6(0xe2))),_0x35c230[_0x1b85c6(0xde)](_0x1b85c6(0x11f)+_0xa2a128[_0x1b85c6(0x13e)]+_0x1b85c6(0x10c))<0x0&&(_0x35c230=_0x35c230[_0x1b85c6(0x11c)](/\/\* RESOLVER CLASSES \*\//,_0x1b85c6(0x115)+_0xa2a128[_0x1b85c6(0x13e)]+_0x1b85c6(0x10c))),await this[_0x1b85c6(0x15a)](_0x4dbf9c,_0x35c230,_0xa2a128);}[a0_0xc2c71f(0xfe)](_0x4cdfcf){const _0x3e40f4=a0_0xc2c71f;let _0x2606dc=sereviceType,_0x51c68d=_0x4cdfcf['map'](_0x3bbf73=>{const _0x1a056e=a0_0x30e8;if('id'==_0x3bbf73[_0x1a056e(0x111)])return'';if(_0x1a056e(0x139)==_0x3bbf73[_0x1a056e(0x111)])return'';if('created_at'==_0x3bbf73[_0x1a056e(0x111)])return'';if('updated_at'==_0x3bbf73['name'])return'';if(_0x1a056e(0xeb)==_0x3bbf73['name'])return'';if(_0x1a056e(0x119)==_0x3bbf73[_0x1a056e(0x111)])return'';let _0x4d87c9=this['getFieldType'](_0x3bbf73),_0x1f5c51=this[_0x1a056e(0x134)](_0x3bbf73),_0xb348fb=camelCase(_0x3bbf73[_0x1a056e(0x111)]);return'\x20\x20'+(_0x1a056e(0x120)+(0x0==_0x4d87c9[_0x1a056e(0x125)]?'':_0x1a056e(0x167)+_0x4d87c9+',')+_0x1a056e(0x110)+_0x3bbf73[_0x1a056e(0x159)]+_0x1a056e(0x168))+_0x1a056e(0x16d)+(''+_0xb348fb+(_0x3bbf73['nullable']?'?':'')+':\x20'+_0x1f5c51)+'\x0a';});_0x2606dc=_0x2606dc[_0x3e40f4(0x11c)](/{{newTypeColumns}}/g,_0x51c68d[_0x3e40f4(0x140)]('\x0a'));let _0x12ccbe=_0x4cdfcf[_0x3e40f4(0xf4)](_0x3def76=>{const _0x7a51af=_0x3e40f4;if('id'==_0x3def76['name'])return'';if(_0x7a51af(0x139)==_0x3def76['name'])return'';if(_0x7a51af(0x114)==_0x3def76[_0x7a51af(0x111)])return'';if(_0x7a51af(0x142)==_0x3def76[_0x7a51af(0x111)])return'';if(_0x7a51af(0xeb)==_0x3def76[_0x7a51af(0x111)])return'';if(_0x7a51af(0x119)==_0x3def76['name'])return'';let _0x4d2ded=this[_0x7a51af(0x15d)](_0x3def76),_0x15cee7=this[_0x7a51af(0x134)](_0x3def76);_0x3def76[_0x7a51af(0x159)]=!0x0;let _0xf86191=camelCase(_0x3def76[_0x7a51af(0x111)]);return'\x20\x20'+(_0x7a51af(0x120)+(0x0==_0x4d2ded['length']?'':'type\x20=>'+_0x4d2ded+',')+_0x7a51af(0x110)+_0x3def76['nullable']+_0x7a51af(0x168))+_0x7a51af(0x16d)+(''+_0xf86191+(_0x3def76['nullable']?'?':'')+':\x20'+_0x15cee7)+'\x0a';});return _0x2606dc=_0x2606dc[_0x3e40f4(0x11c)](/{{patchTypeColumns}}/g,_0x12ccbe[_0x3e40f4(0x140)]('\x0a')),_0x2606dc;}[a0_0xc2c71f(0x113)](_0x4d3da8,_0x36bd87){const _0x408cf7=a0_0xc2c71f;let _0x27215a=serviceEntity,_0x494b15=_0x36bd87[_0x408cf7(0x102)](function(_0x4f88e4,_0x9084c4){const _0x372200=_0x408cf7;return _0x4f88e4[_0x372200(0x126)]-_0x9084c4['rank'];})[_0x408cf7(0xf4)](_0x48ba6f=>this[_0x408cf7(0x15e)](_0x48ba6f));['COPY','JSON'][_0x408cf7(0xdb)](_0x4d3da8['dataProp'])&&_0x494b15[_0x408cf7(0x105)](_0x408cf7(0x12c)),_0x27215a=_0x27215a[_0x408cf7(0x11c)](/{{entityColumns}}/g,_0x494b15[_0x408cf7(0x140)]('\x0a'));let _0x52e134='',_0x2f82f1=_0x36bd87[_0x408cf7(0x130)](_0x56e172=>_0x56e172[_0x408cf7(0x16c)]&&_0x56e172['uniqRank']>0x0)[_0x408cf7(0x102)](function(_0x2ee47f,_0xa3954d){const _0x5b130e=_0x408cf7;return _0x2ee47f[_0x5b130e(0x16c)]-_0xa3954d['uniqRank'];});if(_0x2f82f1['length']>0x0){_0x52e134='@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})';let _0x3b3ae1=_0x2f82f1[_0x408cf7(0xf4)](_0x474381=>{const _0x30a858=_0x408cf7;let _0x21e53a=_0x474381['name'];return'domain_id'==_0x474381[_0x30a858(0x111)]&&(_0x21e53a='domain'),_0x30a858(0xeb)==_0x474381[_0x30a858(0x111)]&&(_0x21e53a=_0x30a858(0xd6)),_0x30a858(0x119)==_0x474381[_0x30a858(0x111)]&&(_0x21e53a=_0x30a858(0x116)),_0x30a858(0x129)+camelCase(_0x21e53a);});_0x52e134=_0x52e134[_0x408cf7(0x11c)](/{{indexColumns}}/g,_0x3b3ae1[_0x408cf7(0x140)](','));}return _0x27215a=_0x27215a['replace'](/{{indexAnn}}/g,_0x52e134),_0x27215a;}[a0_0xc2c71f(0x16b)](_0x417ab1,_0x494406){const _0xc36992=a0_0xc2c71f;let _0xd3cefc='JSON'==_0x417ab1[_0xc36992(0x133)]?serviceEntityHistJson:serviceEntityHistCopy,_0x4b29cc=_0x494406[_0xc36992(0x102)](function(_0x199c64,_0x3af660){const _0x1aef59=_0xc36992;return _0x199c64[_0x1aef59(0x126)]-_0x3af660[_0x1aef59(0x126)];})[_0xc36992(0xf4)](_0x561e64=>this['columnToEntityColumn'](_0x561e64));return _0xd3cefc=_0xd3cefc['replace'](/{{entityColumns}}/g,_0x4b29cc['join']('\x0a')),_0xd3cefc;}[a0_0xc2c71f(0x15e)](_0x3fbe5b){const _0x233967=a0_0xc2c71f;if('id'==_0x3fbe5b[_0x233967(0x111)])return'';if('domain_id'==_0x3fbe5b[_0x233967(0x111)])return'';if(_0x233967(0x114)==_0x3fbe5b['name'])return'';if(_0x233967(0x142)==_0x3fbe5b[_0x233967(0x111)])return'';if(_0x233967(0xeb)==_0x3fbe5b[_0x233967(0x111)])return'';if(_0x233967(0x119)==_0x3fbe5b[_0x233967(0x111)])return'';let _0xb8cb3=_0x3fbe5b[_0x233967(0xf8)];'double'==_0x3fbe5b[_0x233967(0xf8)]&&(_0xb8cb3=_0x233967(0xe3)),_0x233967(0xfa)==_0x3fbe5b['colType']&&(_0xb8cb3=_0x233967(0xf7)),_0x233967(0xd5)==_0x3fbe5b['colType']&&(_0xb8cb3='character\x20varying'),'datetime'==_0x3fbe5b[_0x233967(0xf8)]&&(_0xb8cb3=_0x233967(0x14f));let _0xb33638='';_0x233967(0xd5)==_0x3fbe5b[_0x233967(0xf8)]&&(_0xb33638=_0x3fbe5b['colSize']);let _0x4533b3=this['getFieldType'](_0x3fbe5b),_0x55ff34=this['getColTxtType'](_0x3fbe5b),_0x48f267=camelCase(_0x3fbe5b['name']);return'\x20\x20'+(_0x233967(0x128)+_0x3fbe5b[_0x233967(0x111)]+_0x233967(0x117)+_0xb8cb3+_0x233967(0xf5)+_0x3fbe5b['nullable']+'\x20'+(0x0==_0xb33638[_0x233967(0x125)]?'':_0x233967(0xe4)+_0xb33638)+'\x20})')+_0x233967(0x16d)+(_0x233967(0x120)+(0x0==_0x4533b3[_0x233967(0x125)]?'':_0x233967(0x167)+_0x4533b3+',')+_0x233967(0x110)+_0x3fbe5b[_0x233967(0x159)]+'\x20})')+_0x233967(0x16d)+(''+_0x48f267+(_0x3fbe5b[_0x233967(0x159)]?'?':'')+':\x20'+_0x55ff34)+'\x0a';}[a0_0xc2c71f(0x15d)](_0x3da5a8){const _0x489d98=a0_0xc2c71f;let _0x4d42f2='';return'double'==_0x3da5a8[_0x489d98(0xf8)]&&(_0x4d42f2=_0x489d98(0xe9)),'float'==_0x3da5a8['colType']&&(_0x4d42f2=_0x489d98(0xe9)),_0x489d98(0xfa)==_0x3da5a8[_0x489d98(0xf8)]&&(_0x4d42f2=_0x489d98(0xe1)),_0x489d98(0x158)==_0x3da5a8[_0x489d98(0xf8)]&&(_0x4d42f2=_0x489d98(0xe1)),_0x4d42f2;}[a0_0xc2c71f(0x134)](_0x109dea){const _0x103ee7=a0_0xc2c71f;let _0x2e0753=_0x109dea[_0x103ee7(0xf8)];return _0x103ee7(0x10a)==_0x109dea['colType']&&(_0x2e0753='number'),_0x103ee7(0xf3)==_0x109dea[_0x103ee7(0xf8)]&&(_0x2e0753=_0x103ee7(0x169)),_0x103ee7(0xec)==_0x109dea['colType']&&(_0x2e0753=_0x103ee7(0x169)),_0x103ee7(0x158)==_0x109dea[_0x103ee7(0xf8)]&&(_0x2e0753=_0x103ee7(0x169)),'long'==_0x109dea[_0x103ee7(0xf8)]&&(_0x2e0753=_0x103ee7(0x169)),_0x103ee7(0x153)==_0x109dea['colType']&&(_0x2e0753=_0x103ee7(0x10e)),'date'==_0x109dea[_0x103ee7(0xf8)]&&(_0x2e0753='Date'),'text'==_0x109dea[_0x103ee7(0xf8)]&&(_0x2e0753='string'),_0x2e0753;}async[a0_0xc2c71f(0x15a)](_0x2b3d3b,_0x3913e3,_0x4323bc){const _0x4e7f75=a0_0xc2c71f;await fs[_0x4e7f75(0xd9)](_0x2b3d3b,this[_0x4e7f75(0x100)](_0x3913e3,_0x4323bc),_0x4e7f75(0xdf));}['replaceNamesMap'](_0x5665b5,_0x28d20a){const _0x21beb3=a0_0xc2c71f;return _0x5665b5[_0x21beb3(0x11c)](/{{pascalCase name}}/g,_0x28d20a[_0x21beb3(0x13e)])[_0x21beb3(0x11c)](/{{camelCase name}}/g,_0x28d20a[_0x21beb3(0x143)])[_0x21beb3(0x11c)](/{{snakeCase name}}/g,_0x28d20a['snakeCaseName'])[_0x21beb3(0x11c)](/{{pluralPascalCase name}}/g,_0x28d20a[_0x21beb3(0xff)])[_0x21beb3(0x11c)](/{{pluralCamelCase name}}/g,_0x28d20a[_0x21beb3(0x13d)])[_0x21beb3(0x11c)](/{{tableName}}/g,_0x28d20a[_0x21beb3(0x163)])[_0x21beb3(0x11c)](/{{name}}/g,_0x28d20a[_0x21beb3(0x111)]);}async[a0_0xc2c71f(0xf9)](_0x2dcae0,_0x3c70c3,_0x4b5efb){const _0x3fcf0e=a0_0xc2c71f;let _0x2966e7=_0x2dcae0+_0x3fcf0e(0x107);await this['createDir'](_0x2966e7),_0x2966e7=_0x2966e7+'/'+_0x3c70c3,await this[_0x3fcf0e(0xd4)](_0x2966e7),_0x2966e7+=_0x3fcf0e(0x160),await this['createDir'](_0x2966e7),_0x2966e7+='/service',await this[_0x3fcf0e(0xd4)](_0x2966e7),_0x2966e7=_0x2966e7+'/'+_0x4b5efb,await this[_0x3fcf0e(0xd4)](_0x2966e7);}['getProjectRootPath'](){const _0x5b2bc0=a0_0xc2c71f;let _0x1e4ba4=process[_0x5b2bc0(0x10b)][_0x5b2bc0(0x161)][_0x5b2bc0(0xfd)]('/'),_0x1a51a0=[];for(let _0x5bd709=0x0;_0x5bd709<_0x1e4ba4[_0x5b2bc0(0x125)]&&_0x5b2bc0(0x15b)!=_0x1e4ba4[_0x5bd709];_0x5bd709++)_0x1a51a0['push'](_0x1e4ba4[_0x5bd709]);return _0x1a51a0['join']('/');}async[a0_0xc2c71f(0xd4)](_0x417b5d){const _0x429348=a0_0xc2c71f;0x0==await this[_0x429348(0x145)](_0x417b5d)&&fs[_0x429348(0x11a)](_0x417b5d);}async[a0_0xc2c71f(0x145)](_0x44512b){const _0x10ba7d=a0_0xc2c71f;return await fs[_0x10ba7d(0x14a)](_0x44512b);}};tslib_1[a0_0xc2c71f(0x156)]([(0x0,type_graphql_1[a0_0xc2c71f(0x10d)])(_0x17f9a2=>Boolean,{'description':a0_0xc2c71f(0x136)}),tslib_1[a0_0xc2c71f(0x123)](0x0,(0x0,type_graphql_1['Arg'])('id')),tslib_1['__param'](0x1,(0x0,type_graphql_1[a0_0xc2c71f(0x15f)])()),tslib_1[a0_0xc2c71f(0xe5)](a0_0xc2c71f(0x12a),Function),tslib_1[a0_0xc2c71f(0xe5)](a0_0xc2c71f(0x13b),[String,Object]),tslib_1[a0_0xc2c71f(0xe5)](a0_0xc2c71f(0x11e),Promise)],OperatoToolCreateService[a0_0xc2c71f(0xf0)],a0_0xc2c71f(0x14c),null),OperatoToolCreateService=tslib_1['__decorate']([(0x0,type_graphql_1[a0_0xc2c71f(0x11d)])()],OperatoToolCreateService),exports[a0_0xc2c71f(0x149)]=OperatoToolCreateService;const allIndex=a0_0xc2c71f(0x12f),serviceIndex=a0_0xc2c71f(0x11b),serviceHistoryIndex=a0_0xc2c71f(0x147),serviceQuery=a0_0xc2c71f(0xf2),serviceHistoryQuery=a0_0xc2c71f(0x16a),serviceMutation=a0_0xc2c71f(0x165),sereviceType=a0_0xc2c71f(0x144),sereviceHistoryType=a0_0xc2c71f(0x103),serviceEntity=a0_0xc2c71f(0x109),serviceEntityHistCopy=a0_0xc2c71f(0xdc),serviceEntityHistJson=a0_0xc2c71f(0xee),serviceEntitySubscriber='\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';
@@ -1 +1 @@
1
- 'use strict';const a0_0x34ba94=a0_0xbe7f;function a0_0x46ae(){const _0x32df90=['ERROR_CODES','includes','createQueryBuilder','map','48slUDej','@things-factory/shell','menu','1027585JlFwtz','4KZMlCq','andWhere','4796696bsZpdZ','LicenseError','getCount','@things-factory/operato-license-checker','Menu','INVALID_LICENSE','(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)','1185801UFmuGw','trim','defineProperty','getPermission','getRepository','1495278EKxfmt','manager','110RNJKns','532028LOxKnq','87828Wezian','Permissions\x20For\x20Tailor\x20Tool','checkStudioPermission','forEach','__esModule','from','1550037sQYJPe','Studio','../../errors/license-error','OVER_LIMIT','id\x20!=\x20:id'];a0_0x46ae=function(){return _0x32df90;};return a0_0x46ae();}function a0_0xbe7f(_0x98b863,_0x5006ab){const _0x46ae15=a0_0x46ae();return a0_0xbe7f=function(_0xbe7f9a,_0x142c5c){_0xbe7f9a=_0xbe7f9a-0x197;let _0x58c765=_0x46ae15[_0xbe7f9a];return _0x58c765;},a0_0xbe7f(_0x98b863,_0x5006ab);}(function(_0x2535b8,_0x1ec651){const _0xf8f352=a0_0xbe7f,_0xce91fe=_0x2535b8();while(!![]){try{const _0x3fd781=-parseInt(_0xf8f352(0x1ad))/0x1+parseInt(_0xf8f352(0x1a4))/0x2*(-parseInt(_0xf8f352(0x197))/0x3)+parseInt(_0xf8f352(0x1b6))/0x4+-parseInt(_0xf8f352(0x1a3))/0x5+parseInt(_0xf8f352(0x1a0))/0x6*(parseInt(_0xf8f352(0x1b5))/0x7)+parseInt(_0xf8f352(0x1a6))/0x8+parseInt(_0xf8f352(0x1b2))/0x9*(parseInt(_0xf8f352(0x1b4))/0xa);if(_0x3fd781===_0x1ec651)break;else _0xce91fe['push'](_0xce91fe['shift']());}catch(_0x17eee7){_0xce91fe['push'](_0xce91fe['shift']());}}}(a0_0x46ae,0x9a68e));Object[a0_0x34ba94(0x1af)](exports,a0_0x34ba94(0x1ba),{'value':!0x0}),exports['checkStudioTemplateIsOverLimit']=exports[a0_0x34ba94(0x1b8)]=void 0x0;const operato_license_checker_1=require(a0_0x34ba94(0x1a9)),shell_1=require(a0_0x34ba94(0x1a1)),menu_base_1=require('@things-factory/menu-base'),license_error_1=require(a0_0x34ba94(0x199));async function checkStudioPermission(){const _0x5c1a3e=a0_0x34ba94;let _0x20db20=((0x0,operato_license_checker_1[_0x5c1a3e(0x1b0)])(_0x5c1a3e(0x1b7))||',')['split'](',')[_0x5c1a3e(0x19f)](_0x457eb6=>_0x457eb6[_0x5c1a3e(0x1ae)]()),_0x3524c9=!0x1;return _0x20db20[_0x5c1a3e(0x1b9)](_0x1f167f=>{const _0x26ed26=_0x5c1a3e;_0x1f167f[_0x26ed26(0x19d)](_0x26ed26(0x198))&&(_0x3524c9=!0x0);}),_0x3524c9;}async function checkStudioTemplateIsOverLimit(_0x46a2db,_0x524d05){const _0x552ba4=a0_0x34ba94;if(0x0==await checkStudioPermission())throw new license_error_1[(_0x552ba4(0x1a7))]({'errorCode':_0x524d05['t'](license_error_1[_0x552ba4(0x1a7)][_0x552ba4(0x19c)][_0x552ba4(0x1ab)])});var _0x733280=0x0;if(_0x733280=_0x46a2db&&''!=_0x46a2db?await(0x0,shell_1['getRepository'])(menu_base_1[_0x552ba4(0x1aa)])[_0x552ba4(0x1b3)][_0x552ba4(0x19e)]()['select'](_0x552ba4(0x1a2))[_0x552ba4(0x1bb)](menu_base_1['Menu'],_0x552ba4(0x1a2))['where'](_0x552ba4(0x19b),{'id':_0x46a2db})[_0x552ba4(0x1a5)](_0x552ba4(0x1ac))['getCount']()+0x1:await(0x0,shell_1[_0x552ba4(0x1b1)])(menu_base_1[_0x552ba4(0x1aa)])['manager'][_0x552ba4(0x19e)]()['select'](_0x552ba4(0x1a2))[_0x552ba4(0x1bb)](menu_base_1['Menu'],'menu')['where'](_0x552ba4(0x1ac))[_0x552ba4(0x1a8)]()+0x1,!(0x0,operato_license_checker_1['checkTarget'])(_0x733280))throw new license_error_1['LicenseError']({'errorCode':_0x524d05['t'](license_error_1['LicenseError'][_0x552ba4(0x19c)][_0x552ba4(0x19a)])});return!0x0;}exports[a0_0x34ba94(0x1b8)]=checkStudioPermission,exports['checkStudioTemplateIsOverLimit']=checkStudioTemplateIsOverLimit;
1
+ 'use strict';const a0_0x1aa298=a0_0x3692;(function(_0x4e06bc,_0x34eafc){const _0x6de6c5=a0_0x3692,_0x33da15=_0x4e06bc();while(!![]){try{const _0xe1c9ba=parseInt(_0x6de6c5(0xe8))/0x1+parseInt(_0x6de6c5(0xd3))/0x2*(parseInt(_0x6de6c5(0xcd))/0x3)+-parseInt(_0x6de6c5(0xee))/0x4*(parseInt(_0x6de6c5(0xe0))/0x5)+-parseInt(_0x6de6c5(0xe7))/0x6*(-parseInt(_0x6de6c5(0xe4))/0x7)+-parseInt(_0x6de6c5(0xe9))/0x8*(-parseInt(_0x6de6c5(0xe3))/0x9)+-parseInt(_0x6de6c5(0xdd))/0xa*(-parseInt(_0x6de6c5(0xed))/0xb)+-parseInt(_0x6de6c5(0xd2))/0xc;if(_0xe1c9ba===_0x34eafc)break;else _0x33da15['push'](_0x33da15['shift']());}catch(_0x374a00){_0x33da15['push'](_0x33da15['shift']());}}}(a0_0x1c3d,0x9b5ea));Object[a0_0x1aa298(0xd0)](exports,'__esModule',{'value':!0x0}),exports['checkStudioTemplateIsOverLimit']=exports[a0_0x1aa298(0xea)]=void 0x0;const operato_license_checker_1=require(a0_0x1aa298(0xe5)),shell_1=require('@things-factory/shell'),menu_base_1=require(a0_0x1aa298(0xeb)),license_error_1=require(a0_0x1aa298(0xe6));async function checkStudioPermission(){const _0x10cd8a=a0_0x1aa298;let _0x5eede4=((0x0,operato_license_checker_1[_0x10cd8a(0xef)])(_0x10cd8a(0xd6))||',')['split'](',')['map'](_0x2e8777=>_0x2e8777['trim']()),_0x50ea55=!0x1;return _0x5eede4[_0x10cd8a(0xdc)](_0x19081e=>{_0x19081e['includes']('Studio')&&(_0x50ea55=!0x0);}),_0x50ea55;}function a0_0x3692(_0x37f00b,_0x123754){const _0x1c3d1e=a0_0x1c3d();return a0_0x3692=function(_0x3692ca,_0x4757f2){_0x3692ca=_0x3692ca-0xcd;let _0x1caf26=_0x1c3d1e[_0x3692ca];return _0x1caf26;},a0_0x3692(_0x37f00b,_0x123754);}function a0_0x1c3d(){const _0x4a75ca=['@things-factory/operato-license-checker','../../errors/license-error','18QMGIDI','411553yUQlef','646584kaTyvg','checkStudioPermission','@things-factory/menu-base','INVALID_LICENSE','56023ARUGpv','51676dekqyJ','getPermission','290112BoyaUR','checkStudioTemplateIsOverLimit','OVER_LIMIT','defineProperty','LicenseError','13038804VZIoKB','2yDGdXx','id\x20!=\x20:id','getCount','Permissions\x20For\x20Tailor\x20Tool','Menu','(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)','where','ERROR_CODES','menu','forEach','1110RofZUc','checkTarget','manager','265syigPm','from','getRepository','108eNitqk','849828aVPfly'];a0_0x1c3d=function(){return _0x4a75ca;};return a0_0x1c3d();}async function checkStudioTemplateIsOverLimit(_0x4ebd71,_0x172906){const _0x111f19=a0_0x1aa298;if(0x0==await checkStudioPermission())throw new license_error_1[(_0x111f19(0xd1))]({'errorCode':_0x172906['t'](license_error_1['LicenseError'][_0x111f19(0xda)][_0x111f19(0xec)])});var _0x419318=0x0;if(_0x419318=_0x4ebd71&&''!=_0x4ebd71?await(0x0,shell_1[_0x111f19(0xe2)])(menu_base_1[_0x111f19(0xd7)])['manager']['createQueryBuilder']()['select'](_0x111f19(0xdb))['from'](menu_base_1[_0x111f19(0xd7)],_0x111f19(0xdb))[_0x111f19(0xd9)](_0x111f19(0xd4),{'id':_0x4ebd71})['andWhere']('(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)')[_0x111f19(0xd5)]()+0x1:await(0x0,shell_1[_0x111f19(0xe2)])(menu_base_1[_0x111f19(0xd7)])[_0x111f19(0xdf)]['createQueryBuilder']()['select'](_0x111f19(0xdb))[_0x111f19(0xe1)](menu_base_1[_0x111f19(0xd7)],'menu')['where'](_0x111f19(0xd8))[_0x111f19(0xd5)]()+0x1,!(0x0,operato_license_checker_1[_0x111f19(0xde)])(_0x419318))throw new license_error_1[(_0x111f19(0xd1))]({'errorCode':_0x172906['t'](license_error_1[_0x111f19(0xd1)][_0x111f19(0xda)][_0x111f19(0xcf)])});return!0x0;}exports[a0_0x1aa298(0xea)]=checkStudioPermission,exports[a0_0x1aa298(0xce)]=checkStudioTemplateIsOverLimit;
@@ -1 +1 @@
1
- 'use strict';const a0_0x1d68e0=a0_0x1473;function a0_0x2865(){const _0x2e14d7=['Resolver','prototype','Query','studioPermission','42gMLukB','__param','studioTemplateIsOverLimit','defineProperty','Operato\x20Tool\x20Studio\x20Usage\x20Permissions','403716wwstEW','tslib','110778hgwlBC','4167342aKWsIS','1228750ybHdoc','12sUZQbw','2856720xUhJNg','design:type','checkStudioTemplateIsOverLimit','checkStudioPermission','OperatoToolResolver','2593743QjweUD','136415BPGiGi','design:paramtypes','Ctx','./tool-permission','__decorate','design:returntype','Arg','__metadata'];a0_0x2865=function(){return _0x2e14d7;};return a0_0x2865();}(function(_0x13ae92,_0x5704cc){const _0x5b7752=a0_0x1473,_0x4ff1f5=_0x13ae92();while(!![]){try{const _0x35a6f9=parseInt(_0x5b7752(0x14f))/0x1+parseInt(_0x5b7752(0x153))/0x2+-parseInt(_0x5b7752(0x15a))/0x3+parseInt(_0x5b7752(0x154))/0x4*(parseInt(_0x5b7752(0x15b))/0x5)+parseInt(_0x5b7752(0x151))/0x6*(parseInt(_0x5b7752(0x167))/0x7)+-parseInt(_0x5b7752(0x155))/0x8+parseInt(_0x5b7752(0x152))/0x9;if(_0x35a6f9===_0x5704cc)break;else _0x4ff1f5['push'](_0x4ff1f5['shift']());}catch(_0x593377){_0x4ff1f5['push'](_0x4ff1f5['shift']());}}}(a0_0x2865,0x6e5f5));Object[a0_0x1d68e0(0x14d)](exports,'__esModule',{'value':!0x0}),exports[a0_0x1d68e0(0x159)]=void 0x0;function a0_0x1473(_0x1555ae,_0x113062){const _0x286561=a0_0x2865();return a0_0x1473=function(_0x1473ea,_0x1ac6fd){_0x1473ea=_0x1473ea-0x14d;let _0x35d980=_0x286561[_0x1473ea];return _0x35d980;},a0_0x1473(_0x1555ae,_0x113062);}const tslib_1=require(a0_0x1d68e0(0x150)),type_graphql_1=require('type-graphql'),tool_permission_1=require(a0_0x1d68e0(0x15e));let OperatoToolResolver=class{async[a0_0x1d68e0(0x166)](_0x2afaac){const _0x4c879c=a0_0x1d68e0;return(0x0,tool_permission_1[_0x4c879c(0x158)])();}async[a0_0x1d68e0(0x169)](_0x348980,_0x4439ca){const _0x3f75f2=a0_0x1d68e0;return(0x0,tool_permission_1[_0x3f75f2(0x157)])(_0x348980,_0x4439ca);}};tslib_1[a0_0x1d68e0(0x15f)]([(0x0,type_graphql_1[a0_0x1d68e0(0x165)])(_0xa537f2=>Boolean,{'description':a0_0x1d68e0(0x14e)}),tslib_1['__param'](0x0,(0x0,type_graphql_1[a0_0x1d68e0(0x15d)])()),tslib_1['__metadata'](a0_0x1d68e0(0x156),Function),tslib_1[a0_0x1d68e0(0x162)](a0_0x1d68e0(0x15c),[Object]),tslib_1[a0_0x1d68e0(0x162)](a0_0x1d68e0(0x160),Promise)],OperatoToolResolver['prototype'],'studioPermission',null),tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x1d68e0(0x165)])(_0x5491f5=>Boolean,{'description':'Operato\x20Tool\x20Studio\x20Limit\x20check'}),tslib_1[a0_0x1d68e0(0x168)](0x0,(0x0,type_graphql_1[a0_0x1d68e0(0x161)])('id')),tslib_1[a0_0x1d68e0(0x168)](0x1,(0x0,type_graphql_1[a0_0x1d68e0(0x15d)])()),tslib_1['__metadata']('design:type',Function),tslib_1[a0_0x1d68e0(0x162)](a0_0x1d68e0(0x15c),[String,Object]),tslib_1[a0_0x1d68e0(0x162)](a0_0x1d68e0(0x160),Promise)],OperatoToolResolver[a0_0x1d68e0(0x164)],a0_0x1d68e0(0x169),null),OperatoToolResolver=tslib_1[a0_0x1d68e0(0x15f)]([(0x0,type_graphql_1[a0_0x1d68e0(0x163)])()],OperatoToolResolver),exports['OperatoToolResolver']=OperatoToolResolver;
1
+ 'use strict';const a0_0x1f8b04=a0_0x32b5;(function(_0x1b6a2b,_0x3cb571){const _0x2e8e0b=a0_0x32b5,_0x3823ed=_0x1b6a2b();while(!![]){try{const _0x154899=-parseInt(_0x2e8e0b(0x130))/0x1*(-parseInt(_0x2e8e0b(0x129))/0x2)+parseInt(_0x2e8e0b(0x141))/0x3+parseInt(_0x2e8e0b(0x13c))/0x4*(parseInt(_0x2e8e0b(0x140))/0x5)+-parseInt(_0x2e8e0b(0x122))/0x6*(parseInt(_0x2e8e0b(0x127))/0x7)+-parseInt(_0x2e8e0b(0x142))/0x8*(parseInt(_0x2e8e0b(0x13d))/0x9)+parseInt(_0x2e8e0b(0x12c))/0xa*(-parseInt(_0x2e8e0b(0x137))/0xb)+-parseInt(_0x2e8e0b(0x12e))/0xc*(parseInt(_0x2e8e0b(0x138))/0xd);if(_0x154899===_0x3cb571)break;else _0x3823ed['push'](_0x3823ed['shift']());}catch(_0x3a405f){_0x3823ed['push'](_0x3823ed['shift']());}}}(a0_0x278a,0xa849e));function a0_0x278a(){const _0xd4d846=['61812zufWSI','__decorate','21523RfqnfH','design:returntype','__param','Operato\x20Tool\x20Studio\x20Limit\x20check','checkStudioTemplateIsOverLimit','Resolver','OperatoToolResolver','33bZwPSg','104hnKphc','__esModule','type-graphql','studioPermission','1196mmCqHF','272223IPNcEZ','studioTemplateIsOverLimit','design:paramtypes','9670DaKQfF','2418018MpGMYy','16zLnfei','Arg','__metadata','6159414IoOfcG','Operato\x20Tool\x20Studio\x20Usage\x20Permissions','tslib','./tool-permission','Query','7VquBZr','checkStudioPermission','80jIzIhj','defineProperty','Ctx','1425370RpoHBV','design:type'];a0_0x278a=function(){return _0xd4d846;};return a0_0x278a();}Object[a0_0x1f8b04(0x12a)](exports,a0_0x1f8b04(0x139),{'value':!0x0}),exports[a0_0x1f8b04(0x136)]=void 0x0;const tslib_1=require(a0_0x1f8b04(0x124)),type_graphql_1=require(a0_0x1f8b04(0x13a)),tool_permission_1=require(a0_0x1f8b04(0x125));let OperatoToolResolver=class{async[a0_0x1f8b04(0x13b)](_0x5339b2){const _0x233f59=a0_0x1f8b04;return(0x0,tool_permission_1[_0x233f59(0x128)])();}async[a0_0x1f8b04(0x13e)](_0x372147,_0x190875){const _0x5116a1=a0_0x1f8b04;return(0x0,tool_permission_1[_0x5116a1(0x134)])(_0x372147,_0x190875);}};function a0_0x32b5(_0x13b6f7,_0x5228af){const _0x278a36=a0_0x278a();return a0_0x32b5=function(_0x32b5f3,_0x446ed9){_0x32b5f3=_0x32b5f3-0x120;let _0x1d18f2=_0x278a36[_0x32b5f3];return _0x1d18f2;},a0_0x32b5(_0x13b6f7,_0x5228af);}tslib_1[a0_0x1f8b04(0x12f)]([(0x0,type_graphql_1[a0_0x1f8b04(0x126)])(_0xa51d3=>Boolean,{'description':a0_0x1f8b04(0x123)}),tslib_1['__param'](0x0,(0x0,type_graphql_1['Ctx'])()),tslib_1[a0_0x1f8b04(0x121)](a0_0x1f8b04(0x12d),Function),tslib_1[a0_0x1f8b04(0x121)](a0_0x1f8b04(0x13f),[Object]),tslib_1[a0_0x1f8b04(0x121)](a0_0x1f8b04(0x131),Promise)],OperatoToolResolver['prototype'],a0_0x1f8b04(0x13b),null),tslib_1[a0_0x1f8b04(0x12f)]([(0x0,type_graphql_1['Query'])(_0x563ad0=>Boolean,{'description':a0_0x1f8b04(0x133)}),tslib_1[a0_0x1f8b04(0x132)](0x0,(0x0,type_graphql_1[a0_0x1f8b04(0x120)])('id')),tslib_1[a0_0x1f8b04(0x132)](0x1,(0x0,type_graphql_1[a0_0x1f8b04(0x12b)])()),tslib_1['__metadata'](a0_0x1f8b04(0x12d),Function),tslib_1['__metadata']('design:paramtypes',[String,Object]),tslib_1[a0_0x1f8b04(0x121)]('design:returntype',Promise)],OperatoToolResolver['prototype'],a0_0x1f8b04(0x13e),null),OperatoToolResolver=tslib_1[a0_0x1f8b04(0x12f)]([(0x0,type_graphql_1[a0_0x1f8b04(0x135)])()],OperatoToolResolver),exports[a0_0x1f8b04(0x136)]=OperatoToolResolver;