@things-factory/operato-tools 6.0.107 → 6.0.109

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 +1 @@
1
- 'use strict';const a0_0x13d331=a0_0x1823;(function(_0x3eb4d8,_0x564cfb){const _0x46136b=a0_0x1823,_0x3e24c3=_0x3eb4d8();while(!![]){try{const _0x199188=-parseInt(_0x46136b(0x79))/0x1+parseInt(_0x46136b(0x7f))/0x2+parseInt(_0x46136b(0x77))/0x3*(parseInt(_0x46136b(0x75))/0x4)+parseInt(_0x46136b(0x72))/0x5*(-parseInt(_0x46136b(0x80))/0x6)+-parseInt(_0x46136b(0x82))/0x7*(parseInt(_0x46136b(0x73))/0x8)+-parseInt(_0x46136b(0x81))/0x9*(-parseInt(_0x46136b(0x78))/0xa)+-parseInt(_0x46136b(0x7a))/0xb*(-parseInt(_0x46136b(0x74))/0xc);if(_0x199188===_0x564cfb)break;else _0x3e24c3['push'](_0x3e24c3['shift']());}catch(_0x6055bd){_0x3e24c3['push'](_0x3e24c3['shift']());}}}(a0_0x4b59,0x3020f));function a0_0x1823(_0x42e32d,_0x5c6201){const _0x4b5910=a0_0x4b59();return a0_0x1823=function(_0x182398,_0x18b2f9){_0x182398=_0x182398-0x71;let _0x4655ed=_0x4b5910[_0x182398];return _0x4655ed;},a0_0x1823(_0x42e32d,_0x5c6201);}function a0_0x4b59(){const _0x3944b1=['173906wEkEyP','12pfoTol','207KIBOfm','28ahCrdX','assign','__importStar','865550PIbWxC','675568GUSEmM','1484688YvNxyH','380DXEaiC','ERROR_CODES','8961uFwdGM','9730TQqYNp','130578nTTaFK','55dEaaez','name','__esModule','defineProperty','errorCode'];a0_0x4b59=function(){return _0x3944b1;};return a0_0x4b59();}Object[a0_0x13d331(0x7d)](exports,a0_0x13d331(0x7c),{'value':!0x0}),exports['LicenseError']=void 0x0;const tslib_1=require('tslib'),ERROR_CODES=tslib_1[a0_0x13d331(0x71)](require('../constants/error-code'));class LicenseError extends Error{static get[a0_0x13d331(0x76)](){const _0x25eb72=a0_0x13d331;return Object[_0x25eb72(0x83)]({},ERROR_CODES);}constructor({errorCode:_0xf8fd94,detail:_0x1ff064}){const _0x301abc=a0_0x13d331;super(_0xf8fd94),this[_0x301abc(0x7b)]='license-error',this[_0x301abc(0x7e)]=_0xf8fd94,this['detail']=_0x1ff064;}}exports['LicenseError']=LicenseError;
1
+ 'use strict';const a0_0x3590ba=a0_0x2106;(function(_0x23b1ca,_0x24e0a2){const _0x3d299c=a0_0x2106,_0x822826=_0x23b1ca();while(!![]){try{const _0x5157d7=-parseInt(_0x3d299c(0x15e))/0x1*(-parseInt(_0x3d299c(0x15b))/0x2)+parseInt(_0x3d299c(0x156))/0x3*(parseInt(_0x3d299c(0x15d))/0x4)+-parseInt(_0x3d299c(0x164))/0x5*(-parseInt(_0x3d299c(0x166))/0x6)+parseInt(_0x3d299c(0x155))/0x7*(parseInt(_0x3d299c(0x157))/0x8)+-parseInt(_0x3d299c(0x154))/0x9*(parseInt(_0x3d299c(0x160))/0xa)+-parseInt(_0x3d299c(0x158))/0xb*(parseInt(_0x3d299c(0x16a))/0xc)+parseInt(_0x3d299c(0x159))/0xd*(-parseInt(_0x3d299c(0x15f))/0xe);if(_0x5157d7===_0x24e0a2)break;else _0x822826['push'](_0x822826['shift']());}catch(_0x2cb6e9){_0x822826['push'](_0x822826['shift']());}}}(a0_0xc599,0x3f4a0));function a0_0xc599(){const _0x666fa0=['476AHSbtI','10280nauMRw','28THzidc','10mCuFja','LicenseError','detail','name','172505twracd','defineProperty','6hsOPrP','__esModule','errorCode','assign','24LypnOI','995517EHzuGh','7YwPXUV','7950xRZfFs','483232IcsfaW','1038477FRwqbW','238134ywAJbi','license-error','36ggkafG','tslib'];a0_0xc599=function(){return _0x666fa0;};return a0_0xc599();}Object[a0_0x3590ba(0x165)](exports,a0_0x3590ba(0x167),{'value':!0x0}),exports[a0_0x3590ba(0x161)]=void 0x0;function a0_0x2106(_0x2767ac,_0x3e937a){const _0xc59999=a0_0xc599();return a0_0x2106=function(_0x210691,_0x42e418){_0x210691=_0x210691-0x154;let _0x3fb452=_0xc59999[_0x210691];return _0x3fb452;},a0_0x2106(_0x2767ac,_0x3e937a);}const tslib_1=require(a0_0x3590ba(0x15c)),ERROR_CODES=tslib_1['__importStar'](require('../constants/error-code'));class LicenseError extends Error{static get['ERROR_CODES'](){const _0x2c265b=a0_0x3590ba;return Object[_0x2c265b(0x169)]({},ERROR_CODES);}constructor({errorCode:_0x3d948f,detail:_0x3ded3d}){const _0x57dd3f=a0_0x3590ba;super(_0x3d948f),this[_0x57dd3f(0x163)]=_0x57dd3f(0x15a),this[_0x57dd3f(0x168)]=_0x3d948f,this[_0x57dd3f(0x162)]=_0x3ded3d;}}exports[a0_0x3590ba(0x161)]=LicenseError;
package/server/routes.js CHANGED
@@ -1 +1 @@
1
- function a0_0x3137(){const _0x39520e=['things-factory:operato-tools:routes','29732tsCsmJ','bootstrap-module-global-private-route','3625461xJXZQb','453LCemoU','2758115CsJStc','1603590iLWbjl','2959383dCxWlZ','bootstrap-module-domain-public-route','bootstrap-module-global-public-route','4PaIdGm','bootstrap-module-domain-private-route','421918juTzQZ','6OQPEuh','debug','5296170pKWUDB','8lZAgzc'];a0_0x3137=function(){return _0x39520e;};return a0_0x3137();}const a0_0x573019=a0_0x4b77;(function(_0x3abd88,_0x36f001){const _0x9b4995=a0_0x4b77,_0x5e49a5=_0x3abd88();while(!![]){try{const _0x38463d=parseInt(_0x9b4995(0x132))/0x1*(parseInt(_0x9b4995(0x134))/0x2)+-parseInt(_0x9b4995(0x12c))/0x3*(parseInt(_0x9b4995(0x129))/0x4)+-parseInt(_0x9b4995(0x12d))/0x5*(-parseInt(_0x9b4995(0x135))/0x6)+parseInt(_0x9b4995(0x12f))/0x7+-parseInt(_0x9b4995(0x138))/0x8*(parseInt(_0x9b4995(0x12b))/0x9)+-parseInt(_0x9b4995(0x12e))/0xa+parseInt(_0x9b4995(0x137))/0xb;if(_0x38463d===_0x36f001)break;else _0x5e49a5['push'](_0x5e49a5['shift']());}catch(_0x40b84d){_0x5e49a5['push'](_0x5e49a5['shift']());}}}(a0_0x3137,0x95eef));function a0_0x4b77(_0x18e414,_0x36b4fa){const _0x313795=a0_0x3137();return a0_0x4b77=function(_0x4b77a4,_0x168c1f){_0x4b77a4=_0x4b77a4-0x129;let _0x327887=_0x313795[_0x4b77a4];return _0x327887;},a0_0x4b77(_0x18e414,_0x36b4fa);}const debug=require(a0_0x573019(0x136))(a0_0x573019(0x139));process['on'](a0_0x573019(0x131),(_0x3056c4,_0x5c9e70)=>{}),process['on'](a0_0x573019(0x12a),(_0x554a88,_0x2cd490)=>{}),process['on'](a0_0x573019(0x130),(_0x3a971d,_0x324b55)=>{}),process['on'](a0_0x573019(0x133),(_0x54f1b6,_0x28f5b7)=>{});
1
+ function a0_0x5076(){const _0x181647=['things-factory:operato-tools:routes','bootstrap-module-domain-private-route','8751314DuepOP','3841152cklflF','bootstrap-module-global-public-route','bootstrap-module-global-private-route','15pvffnp','7rIIqQv','1804550lPKTur','bootstrap-module-domain-public-route','659348TqnGQZ','1470768RDGPoN','101294hoBJiB','debug','1736hukqjr','9HHuAGJ','23135JyUzph'];a0_0x5076=function(){return _0x181647;};return a0_0x5076();}function a0_0x1c25(_0x3f8f75,_0x399f3a){const _0x507684=a0_0x5076();return a0_0x1c25=function(_0x1c25d6,_0x56ed1e){_0x1c25d6=_0x1c25d6-0xf0;let _0x201df8=_0x507684[_0x1c25d6];return _0x201df8;},a0_0x1c25(_0x3f8f75,_0x399f3a);}const a0_0x384df8=a0_0x1c25;(function(_0x571205,_0x1b3950){const _0x1b47ba=a0_0x1c25,_0x15504e=_0x571205();while(!![]){try{const _0x28b110=parseInt(_0x1b47ba(0xf5))/0x1*(parseInt(_0x1b47ba(0xfa))/0x2)+parseInt(_0x1b47ba(0xf9))/0x3+-parseInt(_0x1b47ba(0xf8))/0x4*(-parseInt(_0x1b47ba(0xf4))/0x5)+-parseInt(_0x1b47ba(0xf1))/0x6+-parseInt(_0x1b47ba(0xfe))/0x7*(-parseInt(_0x1b47ba(0xfc))/0x8)+-parseInt(_0x1b47ba(0xfd))/0x9*(parseInt(_0x1b47ba(0xf6))/0xa)+-parseInt(_0x1b47ba(0xf0))/0xb;if(_0x28b110===_0x1b3950)break;else _0x15504e['push'](_0x15504e['shift']());}catch(_0x4c2f43){_0x15504e['push'](_0x15504e['shift']());}}}(a0_0x5076,0x6b7c4));const debug=require(a0_0x384df8(0xfb))(a0_0x384df8(0xff));process['on'](a0_0x384df8(0xf2),(_0x48a3e0,_0x2b2eae)=>{}),process['on'](a0_0x384df8(0xf3),(_0x4079c9,_0x5e5194)=>{}),process['on'](a0_0x384df8(0xf7),(_0x11c265,_0x1f9caa)=>{}),process['on'](a0_0x384df8(0x100),(_0x2cec97,_0x377672)=>{});
@@ -1 +1 @@
1
- 'use strict';const a0_0x96c89d=a0_0x42a6;function a0_0x42a6(_0x33a483,_0x4491f8){const _0x1b00e7=a0_0x1b00();return a0_0x42a6=function(_0x42a6d9,_0x5b7b0){_0x42a6d9=_0x42a6d9-0xc7;let _0x396b5f=_0x1b00e7[_0x42a6d9];return _0x396b5f;},a0_0x42a6(_0x33a483,_0x4491f8);}(function(_0x3f5f73,_0x4f0c92){const _0x1e01cc=a0_0x42a6,_0x1dd612=_0x3f5f73();while(!![]){try{const _0x2d2d60=parseInt(_0x1e01cc(0x135))/0x1+-parseInt(_0x1e01cc(0x12c))/0x2*(-parseInt(_0x1e01cc(0x10f))/0x3)+parseInt(_0x1e01cc(0xdb))/0x4*(parseInt(_0x1e01cc(0xef))/0x5)+-parseInt(_0x1e01cc(0x108))/0x6*(-parseInt(_0x1e01cc(0xd7))/0x7)+parseInt(_0x1e01cc(0xda))/0x8+parseInt(_0x1e01cc(0xf6))/0x9+-parseInt(_0x1e01cc(0x139))/0xa*(parseInt(_0x1e01cc(0xf2))/0xb);if(_0x2d2d60===_0x4f0c92)break;else _0x1dd612['push'](_0x1dd612['shift']());}catch(_0x2db9a3){_0x1dd612['push'](_0x1dd612['shift']());}}}(a0_0x1b00,0x2283c));Object[a0_0x96c89d(0x118)](exports,a0_0x96c89d(0x10b),{'value':!0x0}),exports['OperatoToolCreateMenu']=void 0x0;function a0_0x1b00(){const _0x328e08=['dataProp','select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27','Ctx','\x20,\x22exportable\x22:\x20true','aes256','createSortCols','readonly','1459446bKmDnH','randomBytes',',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22','__esModule','__param','default','createMenuData','462249asWEpA','{\x22name\x22:\x20\x22','h1z0q9i9x7q6','push','updater_id','refName','createSearchCols','update','searchRank','defineProperty','assign','toString','aes-256-ofb','updatedAt','createCipheriv','parent','\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','state',',\x22mandatory\x22:\x20','__metadata','tslib','\x27\x20or\x20id\x20=\x20\x27','prototype','save','Arg','aes-256-cfb8',',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22','map','COPY','2edNamL','JSON','template','stringify','creator','filter','string','crypto','code','262711urnXoX','meta-grist-page','final','hex','3390ywJTRP','getRepository','created_at','pluralize',',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22','toolCreateMenu','design:paramtypes','./../tool-secret/tool-permission','@things-factory/resource-base','menuType','\x22,\x22hidden\x22:','\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}','EntityColumn','Directive','rank','updated_at','enc','find','join','sort','7XGfScz','\x22,\x22desc\x22:','query','386648YkBeBJ','9372iKTteH','Mutation','sortRank','routing','substring','split','replace','Menu','createdAt','\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','name','{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22','gridRank','Operato\x20Tool\x20Create\x20Menu','aes-256-cfb1','left','reverseSort','resourceUrl','aes-256-cfb','type-graphql','95KywWhY','\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}','createGridColumns','23001EckSfC','hidden','{\x22type\x22:\x20\x22','length','876042rtvhBU','\x22,\x22name\x22:\x20\x22','findOne','\x22,\x22header\x22:\x20\x22','Entity',',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22','refType','design:returntype','utf8','{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22','scenario'];a0_0x1b00=function(){return _0x328e08;};return a0_0x1b00();}const tslib_1=require(a0_0x96c89d(0x123)),type_graphql_1=require(a0_0x96c89d(0xee)),resource_base_1=require(a0_0x96c89d(0xcb)),menu_base_1=require('@things-factory/menu-base'),tool_permission_1=require(a0_0x96c89d(0xca)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require('lodash'),{plural:plural}=require(a0_0x96c89d(0x13c)),crypto_1=tslib_1['__importDefault'](require(a0_0x96c89d(0x133)));let OperatoToolCreateMenu=class{async[a0_0x96c89d(0xc8)](_0x5e8137,_0x391556,_0x4a0976){const _0x4bb5f3=a0_0x96c89d,{domain:_0x3bda18,user:_0xf651d8,tx:_0x472643}=_0x4a0976[_0x4bb5f3(0x120)];await(0x0,tool_permission_1['checkStudioTemplateIsOverLimit'])('',_0x4a0976);const _0x37c19d=await _0x472643['getRepository'](resource_base_1[_0x4bb5f3(0xfa)])[_0x4bb5f3(0xf8)]({'where':{'domain':{'id':_0x3bda18['id']},'id':_0x5e8137}}),_0x670b08=await _0x472643[_0x4bb5f3(0x13a)](resource_base_1[_0x4bb5f3(0xcf)])[_0x4bb5f3(0xd4)]({'where':{'domain':{'id':_0x3bda18['id']},'entity':{'id':_0x37c19d['id']}}});let {name:_0x5db6d5=''}=_0x37c19d||{},_0x300c91=kebabCase(_0x5db6d5),_0x183691=modelTemplate[_0x4bb5f3(0xe1)](/{{pascalCase name}}/g,startCase(camelCase(_0x5db6d5))[_0x4bb5f3(0xe1)](/ /g,''))[_0x4bb5f3(0xe1)](/{{camelCase name}}/g,camelCase(_0x5db6d5))['replace'](/{{snakeCase name}}/g,snakeCase(_0x5db6d5))[_0x4bb5f3(0xe1)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x5db6d5)))['replace'](/ /g,''))[_0x4bb5f3(0xe1)](/{{pluralCamelCase name}}/g,camelCase(plural(_0x5db6d5)))['replace'](/{{name}}/g,_0x5db6d5),_0xe7c714='';_0x4bb5f3(0x12d)==_0x37c19d['dataProp']?_0xe7c714='\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':_0x4bb5f3(0x12b)==_0x37c19d[_0x4bb5f3(0x101)]&&(_0xe7c714=_0x4bb5f3(0x11f)),_0x183691=_0x183691['replace'](/{{HistoryButton}}/g,_0xe7c714);let _0x1fa72a=this['createSortCols'](_0x670b08);_0x183691=_0x183691[_0x4bb5f3(0xe1)](/{{SortColumns}}/g,_0x1fa72a['join'](','));let _0x3b6475=this['createSearchCols'](_0x670b08);_0x183691=_0x183691[_0x4bb5f3(0xe1)](/{{SearchColumns}}/g,_0x3b6475[_0x4bb5f3(0xd5)](','));let _0x1601ac=this[_0x4bb5f3(0xf1)](_0x670b08);return _0x183691=_0x183691[_0x4bb5f3(0xe1)](/{{GridColumns}}/g,_0x1601ac['join'](',')),_0x183691=this['enc'](_0x183691),await this[_0x4bb5f3(0x10e)](_0x472643,_0x3bda18,_0xf651d8,_0x391556,_0x300c91,_0x183691),!0x0;}[a0_0x96c89d(0xf1)](_0x1b679e){const _0x5d0e29=a0_0x96c89d;return _0x1b679e[_0x5d0e29(0x131)](_0x4d2ddd=>'id'!=_0x4d2ddd['name']&&_0x4d2ddd['gridRank']>0x0)[_0x5d0e29(0xd6)](function(_0x20efd3,_0x3fcea6){const _0x2c6be6=_0x5d0e29;return _0x20efd3[_0x2c6be6(0xe7)]-_0x3fcea6[_0x2c6be6(0xe7)];})[_0x5d0e29(0x12a)](_0x4ba24e=>{const _0x1ad622=_0x5d0e29;let {gridEditor:_0x371326='string',name:_0x201dc6,term:_0x2325da,gridWidth:_0x430ed3=0x0,gridAlign:_0x267181=_0x1ad622(0xea),nullable:_0x3ae4d1=!0x1}=_0x4ba24e;if(null==_0x371326&&(_0x371326='string'),null==_0x267181&&(_0x267181=_0x1ad622(0xea)),_0x1ad622(0x113)==_0x201dc6||'creator_id'==_0x201dc6)return _0x201dc6=_0x1ad622(0x113)==_0x201dc6?'updater':_0x1ad622(0x130),_0x1ad622(0xe6)+_0x201dc6+_0x1ad622(0xf9)+_0x201dc6+_0x1ad622(0xce);if(_0x1ad622(0xd2)==_0x201dc6||_0x1ad622(0x13b)==_0x201dc6)return _0x1ad622(0xff)+(_0x1ad622(0xd2)==_0x201dc6?_0x1ad622(0x11c):_0x1ad622(0xe3))+_0x1ad622(0xf9)+_0x201dc6+_0x1ad622(0xf0);let _0x42b4d8=_0x1ad622(0x107)!=_0x371326&&_0x1ad622(0xf3)!=_0x371326,_0x1f1d0f='hidden'==_0x371326;0x1!=_0x1f1d0f&&0x0!=_0x42b4d8||(_0x371326=_0x1ad622(0x132));let _0x422131=_0x1ad622(0xf4)+_0x371326+_0x1ad622(0xf7)+camelCase(_0x201dc6)+'\x22,\x22header\x22:\x20\x22'+_0x2325da+_0x1ad622(0xcd)+_0x1f1d0f+'\x20,\x22editable\x22:\x20'+_0x42b4d8+_0x1ad622(0x121)+!_0x3ae4d1+_0x1ad622(0xfb)+_0x267181+'\x22,\x22width\x22:'+_0x430ed3+_0x1ad622(0x104);return _0x1ad622(0x134)==_0x4ba24e[_0x1ad622(0xfc)]&&(_0x422131+=_0x1ad622(0xc7)+_0x4ba24e[_0x1ad622(0x114)]+'\x22}'),_0x1ad622(0x100)==_0x4ba24e[_0x1ad622(0xfc)]&&(_0x422131+=_0x1ad622(0x10a)+_0x4ba24e[_0x1ad622(0x114)]+'\x22}'),'entity'==_0x4ba24e[_0x1ad622(0xfc)]&&(_0x422131+=_0x1ad622(0x129)+camelCase(plural(_0x4ba24e[_0x1ad622(0x114)]))+'\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}'),_0x422131+='}',_0x422131;});}[a0_0x96c89d(0x115)](_0x2dbc8f){const _0x159ba5=a0_0x96c89d;return _0x2dbc8f[_0x159ba5(0x131)](_0x563ba5=>_0x563ba5['searchRank']>0x0)[_0x159ba5(0xd6)](function(_0xe1e388,_0x14d6a1){const _0x353768=_0x159ba5;return _0xe1e388[_0x353768(0x117)]-_0x14d6a1[_0x353768(0x117)];})['map'](_0x2e2239=>{const _0x5a3b12=_0x159ba5;let _0x1a989d=_0x2e2239['searchOper'];return'filter'==_0x1a989d?'\x22'+camelCase(_0x2e2239[_0x5a3b12(0xe5)])+'\x22':(_0x1a989d||(_0x1a989d='eq'),_0x5a3b12(0x110)+camelCase(_0x2e2239[_0x5a3b12(0xe5)])+'\x22,\x22operator\x22:\x20\x22'+_0x1a989d+'\x22}');});}[a0_0x96c89d(0x106)](_0x283488){const _0x126180=a0_0x96c89d;return _0x283488[_0x126180(0x131)](_0x22968c=>_0x22968c[_0x126180(0xdd)]>0x0)[_0x126180(0xd6)](function(_0x492e6d,_0xa13393){const _0x221f42=_0x126180;return _0x492e6d['sortRank']-_0xa13393[_0x221f42(0xdd)];})['map'](_0x111d5a=>'{\x22name\x22:\x22'+camelCase(_0x111d5a[_0x126180(0xe5)])+_0x126180(0xd8)+_0x111d5a[_0x126180(0xeb)]+'}');}async[a0_0x96c89d(0x10e)](_0xd8b17a,_0x4bb7e7,_0x5cfbd2,_0x205bc0,_0x57be82,_0x1fb588){const _0x3b9674=a0_0x96c89d;let _0x4af9a0=await _0xd8b17a[_0x3b9674(0x13a)](menu_base_1['Menu'])[_0x3b9674(0xf8)]({'where':{'domain':{'id':_0x4bb7e7['id']},'id':_0x205bc0}}),_0x5c4b45=(await _0xd8b17a[_0x3b9674(0x13a)](menu_base_1[_0x3b9674(0xe2)])[_0x3b9674(0xd9)](_0x3b9674(0x102)+_0x205bc0+_0x3b9674(0x124)+_0x205bc0+'\x27'))[0x0][_0x3b9674(0xd1)]+0xa,_0x227194=new menu_base_1[(_0x3b9674(0xe2))]();_0x227194[_0x3b9674(0xe5)]=_0x57be82,_0x227194[_0x3b9674(0xcc)]='SCREEN',_0x227194['category']=_0x3b9674(0x136),_0x227194[_0x3b9674(0xd1)]=_0x5c4b45,_0x227194['hiddenFlag']=!0x1,_0x227194[_0x3b9674(0xde)]=_0x57be82,_0x227194[_0x3b9674(0x12e)]=_0x1fb588,_0x227194[_0x3b9674(0xec)]='@things-factory/meta-ui/client/pages/meta-grist-page',_0x227194[_0x3b9674(0x11e)]=_0x4af9a0,await _0xd8b17a[_0x3b9674(0x13a)](menu_base_1[_0x3b9674(0xe2)])[_0x3b9674(0x126)](Object[_0x3b9674(0x119)](Object[_0x3b9674(0x119)]({},_0x227194),{'domain':_0x4bb7e7,'creator':_0x5cfbd2,'updater':_0x5cfbd2}));}[a0_0x96c89d(0xd3)](_0xf31c25){const _0x356f2a=a0_0x96c89d;let _0x1fa6f9=JSON[_0x356f2a(0x12f)](_0xf31c25)[_0x356f2a(0xe0)](/(.{100})/)['filter'](_0x34097d=>_0x34097d),_0x1969e9=['aes-256-ecb','aes-256-cbc',_0x356f2a(0xed),_0x356f2a(0x128),_0x356f2a(0xe9),_0x356f2a(0x11b),'aes-256-ctr',_0x356f2a(0x105)],_0x83579c=crypto_1['default'][_0x356f2a(0x109)](0x20)[_0x356f2a(0x11a)](_0x356f2a(0x138)),_0x1de8c6=Buffer['from'](_0x83579c,'hex'),_0x1e5058=_0x83579c[_0x356f2a(0xdf)](0x0,0x10),_0x4801ae=['',_0x1e5058,_0x1e5058,_0x1e5058,_0x1e5058,_0x1e5058,_0x1e5058,_0x1e5058],_0x63310e=0x0,_0x12b2ca=[];_0x12b2ca[_0x356f2a(0x112)](_0x83579c);for(var _0x433e11=0x0;_0x433e11<_0x1fa6f9[_0x356f2a(0xf5)];_0x433e11++,_0x63310e++){_0x63310e==_0x1969e9['length']&&(_0x63310e=0x0);let _0x21052b=crypto_1[_0x356f2a(0x10d)][_0x356f2a(0x11d)](_0x1969e9[_0x63310e],_0x1de8c6,_0x4801ae[_0x63310e]),_0x51e39f=_0x21052b[_0x356f2a(0x116)](_0x1fa6f9[_0x433e11],_0x356f2a(0xfe),'hex');_0x51e39f+=_0x21052b[_0x356f2a(0x137)](_0x356f2a(0x138)),_0x12b2ca[_0x356f2a(0x112)](_0x51e39f);}return _0x12b2ca['join'](_0x356f2a(0x111));}};tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x96c89d(0xd0)])('@transaction'),(0x0,type_graphql_1[a0_0x96c89d(0xdc)])(_0x4aa713=>Boolean,{'description':a0_0x96c89d(0xe8)}),tslib_1[a0_0x96c89d(0x10c)](0x0,(0x0,type_graphql_1[a0_0x96c89d(0x127)])('id')),tslib_1[a0_0x96c89d(0x10c)](0x1,(0x0,type_graphql_1[a0_0x96c89d(0x127)])('parent_menu_id')),tslib_1[a0_0x96c89d(0x10c)](0x2,(0x0,type_graphql_1[a0_0x96c89d(0x103)])()),tslib_1[a0_0x96c89d(0x122)]('design:type',Function),tslib_1['__metadata'](a0_0x96c89d(0xc9),[String,String,Object]),tslib_1['__metadata'](a0_0x96c89d(0xfd),Promise)],OperatoToolCreateMenu[a0_0x96c89d(0x125)],'toolCreateMenu',null),OperatoToolCreateMenu=tslib_1['__decorate']([(0x0,type_graphql_1['Resolver'])()],OperatoToolCreateMenu),exports['OperatoToolCreateMenu']=OperatoToolCreateMenu;const modelTemplate=a0_0x96c89d(0xe4);
1
+ 'use strict';function a0_0x58c1(){const _0x1d14fe=['EntityColumn','createGridColumns','push','stringify','9IxmJPo','Directive','Entity','string','state','3169752TVynBR','final','checkStudioTemplateIsOverLimit','6579640XzZeol','\x22,\x22hidden\x22:','creator',',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22','assign','from','5678442puBnSa','updater','createSortCols','createMenuData','7RsvTVZ','getRepository','defineProperty','\x22,\x22desc\x22:','searchRank','\x27\x20or\x20id\x20=\x20\x27',',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22','toString','sort','filter','createCipheriv','default','searchOper','JSON','__param','design:type','@things-factory/meta-ui/client/pages/meta-grist-page','276lCHPVi','\x22,\x22width\x22:','template','meta-grist-page','\x20,\x22exportable\x22:\x20true','refType','118707jXYUev','category','Ctx','randomBytes','created_at','map','COPY','\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}','aes-256-cfb','findOne','\x20,\x22editable\x22:\x20','4EMyvpA','Resolver','readonly','split','creator_id','{\x22type\x22:\x20\x22','aes-256-cfb1','crypto','Mutation','dataProp','createSearchCols','__esModule','replace','119995Zsqztu','__decorate','__metadata','hiddenFlag','menuType','select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27','updated_at','\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}','entity','type-graphql','resourceUrl','__importDefault','aes256','Arg','Menu','design:returntype','join','length','gridRank','\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','prototype','@things-factory/menu-base','\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','\x0a{\x0a\x20\x20\x22menu\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x22title\x22:\x20\x22{{name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22\x22,\x0a\x20\x20\x20\x20\x20\x20\x22desc\x22:\x20\x22\x22\x0a\x20\x20},\x0a\x20\x20\x22gql\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x22query\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22list_func\x22:\x20\x22{{pluralCamelCase\x20name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22find_one_func\x22:\x22{{camelCase\x20name}}\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x22mutation\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22multiple\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22func\x22:\x22updateMultiple{{pascalCase\x20name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22{{pascalCase\x20name}}Patch\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22delete\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22func\x22:\x22delete{{pluralPascalCase\x20name}}\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20},\x0a\x20\x20\x22button\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22export\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22add\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22delete\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22save\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20],\x0a\x20\x20\x22grid_column\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22string\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22id\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22header\x22:\x20\x22id\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22hidden\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22editable\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22mandatory\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22sortable\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22align\x22:\x20\x22left\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22width\x22:\x200,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22exportable\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20},\x0a{{GridColumns}}\x0a\x20\x20],\x0a\x20\x20\x22grid\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22button\x22:[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{{HistoryButton}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22option\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22mobile_mode\x22:\x20\x22LIST\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22desk_mode\x22:\x20\x22GRID\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22use_row_checker\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22pages\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2020,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2050,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20100,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20300\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22view_mode\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22GRID\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22LIST\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22CARD\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22sorters\x22:\x20[\x0a{{SortColumns}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20]\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x22row\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22multiple_select\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22click\x22:\x20\x22select-row-toggle\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20},\x0a\x20\x20\x22search\x22:\x20[\x0a{{SearchColumns}}\x0a\x20\x20]\x0a}\x0a','utf8','{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22','./../tool-secret/tool-permission','lodash','@transaction','find','63725JAjZSX','substring','\x22,\x22header\x22:\x20\x22','@things-factory/resource-base','SCREEN','design:paramtypes','aes-256-ctr',',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22','name','parent_menu_id','refName','updater_id',',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22','\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}','sortRank','\x22,\x22name\x22:\x20\x22','hex','left','OperatoToolCreateMenu','toolCreateMenu','181030VSrmSy'];a0_0x58c1=function(){return _0x1d14fe;};return a0_0x58c1();}const a0_0x3a4c2e=a0_0x26da;(function(_0x1889de,_0x210104){const _0x59a737=a0_0x26da,_0x243f7e=_0x1889de();while(!![]){try{const _0x115ecc=-parseInt(_0x59a737(0x127))/0x1+parseInt(_0x59a737(0x11a))/0x2*(-parseInt(_0x59a737(0x10f))/0x3)+-parseInt(_0x59a737(0x109))/0x4*(-parseInt(_0x59a737(0xcd))/0x5)+-parseInt(_0x59a737(0xeb))/0x6+parseInt(_0x59a737(0xf8))/0x7*(parseInt(_0x59a737(0xee))/0x8)+-parseInt(_0x59a737(0xe6))/0x9*(parseInt(_0x59a737(0xe1))/0xa)+-parseInt(_0x59a737(0xf4))/0xb;if(_0x115ecc===_0x210104)break;else _0x243f7e['push'](_0x243f7e['shift']());}catch(_0x3a6575){_0x243f7e['push'](_0x243f7e['shift']());}}}(a0_0x58c1,0x6b72e));function a0_0x26da(_0x9c4468,_0x6f8566){const _0x58c13e=a0_0x58c1();return a0_0x26da=function(_0x26da32,_0x4ada11){_0x26da32=_0x26da32-0xba;let _0x5150ba=_0x58c13e[_0x26da32];return _0x5150ba;},a0_0x26da(_0x9c4468,_0x6f8566);}Object[a0_0x3a4c2e(0xfa)](exports,a0_0x3a4c2e(0x125),{'value':!0x0}),exports[a0_0x3a4c2e(0xdf)]=void 0x0;const tslib_1=require('tslib'),type_graphql_1=require(a0_0x3a4c2e(0x130)),resource_base_1=require(a0_0x3a4c2e(0xd0)),menu_base_1=require(a0_0x3a4c2e(0xc4)),tool_permission_1=require(a0_0x3a4c2e(0xc9)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x3a4c2e(0xca)),{plural:plural}=require('pluralize'),crypto_1=tslib_1[a0_0x3a4c2e(0xba)](require(a0_0x3a4c2e(0x121)));let OperatoToolCreateMenu=class{async['toolCreateMenu'](_0x1f4c29,_0x4c5fb9,_0x54b72d){const _0x3b6db0=a0_0x3a4c2e,{domain:_0x4f734d,user:_0x5cac2d,tx:_0x43265c}=_0x54b72d[_0x3b6db0(0xea)];await(0x0,tool_permission_1[_0x3b6db0(0xed)])('',_0x54b72d);const _0x5809fa=await _0x43265c[_0x3b6db0(0xf9)](resource_base_1[_0x3b6db0(0xe8)])[_0x3b6db0(0x118)]({'where':{'domain':{'id':_0x4f734d['id']},'id':_0x1f4c29}}),_0x343378=await _0x43265c[_0x3b6db0(0xf9)](resource_base_1[_0x3b6db0(0xe2)])[_0x3b6db0(0xcc)]({'where':{'domain':{'id':_0x4f734d['id']},'entity':{'id':_0x5809fa['id']}}});let {name:_0x18b2d3=''}=_0x5809fa||{},_0x4dad59=kebabCase(_0x18b2d3),_0x3c6dc0=modelTemplate[_0x3b6db0(0x126)](/{{pascalCase name}}/g,startCase(camelCase(_0x18b2d3))[_0x3b6db0(0x126)](/ /g,''))[_0x3b6db0(0x126)](/{{camelCase name}}/g,camelCase(_0x18b2d3))[_0x3b6db0(0x126)](/{{snakeCase name}}/g,snakeCase(_0x18b2d3))[_0x3b6db0(0x126)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x18b2d3)))[_0x3b6db0(0x126)](/ /g,''))['replace'](/{{pluralCamelCase name}}/g,camelCase(plural(_0x18b2d3)))[_0x3b6db0(0x126)](/{{name}}/g,_0x18b2d3),_0x525d65='';_0x3b6db0(0x105)==_0x5809fa[_0x3b6db0(0x123)]?_0x525d65=_0x3b6db0(0xc5):_0x3b6db0(0x115)==_0x5809fa[_0x3b6db0(0x123)]&&(_0x525d65=_0x3b6db0(0xc2)),_0x3c6dc0=_0x3c6dc0[_0x3b6db0(0x126)](/{{HistoryButton}}/g,_0x525d65);let _0x2adbc2=this[_0x3b6db0(0xf6)](_0x343378);_0x3c6dc0=_0x3c6dc0[_0x3b6db0(0x126)](/{{SortColumns}}/g,_0x2adbc2[_0x3b6db0(0xbf)](','));let _0xa9cac7=this[_0x3b6db0(0x124)](_0x343378);_0x3c6dc0=_0x3c6dc0[_0x3b6db0(0x126)](/{{SearchColumns}}/g,_0xa9cac7['join'](','));let _0x2d2438=this[_0x3b6db0(0xe3)](_0x343378);return _0x3c6dc0=_0x3c6dc0[_0x3b6db0(0x126)](/{{GridColumns}}/g,_0x2d2438[_0x3b6db0(0xbf)](',')),_0x3c6dc0=this['enc'](_0x3c6dc0),await this[_0x3b6db0(0xf7)](_0x43265c,_0x4f734d,_0x5cac2d,_0x4c5fb9,_0x4dad59,_0x3c6dc0),!0x0;}[a0_0x3a4c2e(0xe3)](_0x366747){const _0x5af188=a0_0x3a4c2e;return _0x366747[_0x5af188(0x101)](_0x4b2216=>'id'!=_0x4b2216[_0x5af188(0xd5)]&&_0x4b2216['gridRank']>0x0)[_0x5af188(0x100)](function(_0x205302,_0x3747a0){const _0x4ebca7=_0x5af188;return _0x205302[_0x4ebca7(0xc1)]-_0x3747a0['gridRank'];})['map'](_0x8a0e0=>{const _0x3b7c40=_0x5af188;let {gridEditor:_0x52644e=_0x3b7c40(0xe9),name:_0x1d57c3,term:_0x10e364,gridWidth:_0x3b27fc=0x0,gridAlign:_0x22cd36='left',nullable:_0x46cc4e=!0x1}=_0x8a0e0;if(null==_0x52644e&&(_0x52644e='string'),null==_0x22cd36&&(_0x22cd36=_0x3b7c40(0xde)),_0x3b7c40(0xd8)==_0x1d57c3||_0x3b7c40(0x11e)==_0x1d57c3)return _0x1d57c3=_0x3b7c40(0xd8)==_0x1d57c3?_0x3b7c40(0xf5):_0x3b7c40(0xf0),'{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22'+_0x1d57c3+'\x22,\x22header\x22:\x20\x22'+_0x1d57c3+_0x3b7c40(0xda);if(_0x3b7c40(0x12d)==_0x1d57c3||_0x3b7c40(0x113)==_0x1d57c3)return _0x3b7c40(0xc8)+('updated_at'==_0x1d57c3?'updatedAt':'createdAt')+'\x22,\x22header\x22:\x20\x22'+_0x1d57c3+_0x3b7c40(0x12e);let _0x35725e=_0x3b7c40(0x11c)!=_0x52644e&&'hidden'!=_0x52644e,_0x2f19ab='hidden'==_0x52644e;0x1!=_0x2f19ab&&0x0!=_0x35725e||(_0x52644e='string');let _0x1ac061=_0x3b7c40(0x11f)+_0x52644e+_0x3b7c40(0xdc)+camelCase(_0x1d57c3)+_0x3b7c40(0xcf)+_0x10e364+_0x3b7c40(0xef)+_0x2f19ab+_0x3b7c40(0x119)+_0x35725e+',\x22mandatory\x22:\x20'+!_0x46cc4e+_0x3b7c40(0xd4)+_0x22cd36+_0x3b7c40(0x10a)+_0x3b27fc+_0x3b7c40(0x10d);return'code'==_0x8a0e0['refType']&&(_0x1ac061+=_0x3b7c40(0xfe)+_0x8a0e0[_0x3b7c40(0xd7)]+'\x22}'),'scenario'==_0x8a0e0[_0x3b7c40(0x10e)]&&(_0x1ac061+=_0x3b7c40(0xd9)+_0x8a0e0[_0x3b7c40(0xd7)]+'\x22}'),_0x3b7c40(0x12f)==_0x8a0e0[_0x3b7c40(0x10e)]&&(_0x1ac061+=_0x3b7c40(0xf1)+camelCase(plural(_0x8a0e0[_0x3b7c40(0xd7)]))+_0x3b7c40(0x116)),_0x1ac061+='}',_0x1ac061;});}[a0_0x3a4c2e(0x124)](_0x5b613c){const _0x1470e8=a0_0x3a4c2e;return _0x5b613c[_0x1470e8(0x101)](_0x4a4da2=>_0x4a4da2[_0x1470e8(0xfc)]>0x0)[_0x1470e8(0x100)](function(_0x3e3c2f,_0x2c846c){const _0x54a4a1=_0x1470e8;return _0x3e3c2f['searchRank']-_0x2c846c[_0x54a4a1(0xfc)];})[_0x1470e8(0x114)](_0x2f4a73=>{const _0x69f1cf=_0x1470e8;let _0x2b9425=_0x2f4a73[_0x69f1cf(0x104)];return'filter'==_0x2b9425?'\x22'+camelCase(_0x2f4a73[_0x69f1cf(0xd5)])+'\x22':(_0x2b9425||(_0x2b9425='eq'),'{\x22name\x22:\x20\x22'+camelCase(_0x2f4a73['name'])+'\x22,\x22operator\x22:\x20\x22'+_0x2b9425+'\x22}');});}['createSortCols'](_0x43945b){const _0x333d5f=a0_0x3a4c2e;return _0x43945b[_0x333d5f(0x101)](_0x23846c=>_0x23846c[_0x333d5f(0xdb)]>0x0)['sort'](function(_0x35db47,_0x38f192){const _0x1899a0=_0x333d5f;return _0x35db47[_0x1899a0(0xdb)]-_0x38f192[_0x1899a0(0xdb)];})['map'](_0x157d4e=>'{\x22name\x22:\x22'+camelCase(_0x157d4e[_0x333d5f(0xd5)])+_0x333d5f(0xfb)+_0x157d4e['reverseSort']+'}');}async[a0_0x3a4c2e(0xf7)](_0x104d37,_0x5de446,_0x349ce5,_0x7b4536,_0x27f74f,_0x22ddd1){const _0x308a31=a0_0x3a4c2e;let _0x3891ec=await _0x104d37['getRepository'](menu_base_1[_0x308a31(0xbd)])[_0x308a31(0x118)]({'where':{'domain':{'id':_0x5de446['id']},'id':_0x7b4536}}),_0x2c5ada=(await _0x104d37[_0x308a31(0xf9)](menu_base_1['Menu'])['query'](_0x308a31(0x12c)+_0x7b4536+_0x308a31(0xfd)+_0x7b4536+'\x27'))[0x0]['rank']+0xa,_0x16d08c=new menu_base_1[(_0x308a31(0xbd))]();_0x16d08c['name']=_0x27f74f,_0x16d08c[_0x308a31(0x12b)]=_0x308a31(0xd1),_0x16d08c[_0x308a31(0x110)]=_0x308a31(0x10c),_0x16d08c['rank']=_0x2c5ada,_0x16d08c[_0x308a31(0x12a)]=!0x1,_0x16d08c['routing']=_0x27f74f,_0x16d08c[_0x308a31(0x10b)]=_0x22ddd1,_0x16d08c[_0x308a31(0x131)]=_0x308a31(0x108),_0x16d08c['parent']=_0x3891ec,await _0x104d37[_0x308a31(0xf9)](menu_base_1[_0x308a31(0xbd)])['save'](Object[_0x308a31(0xf2)](Object[_0x308a31(0xf2)]({},_0x16d08c),{'domain':_0x5de446,'creator':_0x349ce5,'updater':_0x349ce5}));}['enc'](_0x475bdd){const _0x27ed35=a0_0x3a4c2e;let _0xd98cde=JSON[_0x27ed35(0xe5)](_0x475bdd)[_0x27ed35(0x11d)](/(.{100})/)[_0x27ed35(0x101)](_0x1bba73=>_0x1bba73),_0x39a646=['aes-256-ecb','aes-256-cbc',_0x27ed35(0x117),'aes-256-cfb8',_0x27ed35(0x120),'aes-256-ofb',_0x27ed35(0xd3),_0x27ed35(0xbb)],_0x5d235b=crypto_1[_0x27ed35(0x103)][_0x27ed35(0x112)](0x20)[_0x27ed35(0xff)](_0x27ed35(0xdd)),_0x16c838=Buffer[_0x27ed35(0xf3)](_0x5d235b,_0x27ed35(0xdd)),_0x16a4b9=_0x5d235b[_0x27ed35(0xce)](0x0,0x10),_0x119939=['',_0x16a4b9,_0x16a4b9,_0x16a4b9,_0x16a4b9,_0x16a4b9,_0x16a4b9,_0x16a4b9],_0x14dac2=0x0,_0x84550c=[];_0x84550c['push'](_0x5d235b);for(var _0x4cd3d2=0x0;_0x4cd3d2<_0xd98cde[_0x27ed35(0xc0)];_0x4cd3d2++,_0x14dac2++){_0x14dac2==_0x39a646[_0x27ed35(0xc0)]&&(_0x14dac2=0x0);let _0x25f1bf=crypto_1[_0x27ed35(0x103)][_0x27ed35(0x102)](_0x39a646[_0x14dac2],_0x16c838,_0x119939[_0x14dac2]),_0x2d7e6d=_0x25f1bf['update'](_0xd98cde[_0x4cd3d2],_0x27ed35(0xc7),_0x27ed35(0xdd));_0x2d7e6d+=_0x25f1bf[_0x27ed35(0xec)]('hex'),_0x84550c[_0x27ed35(0xe4)](_0x2d7e6d);}return _0x84550c['join']('h1z0q9i9x7q6');}};tslib_1[a0_0x3a4c2e(0x128)]([(0x0,type_graphql_1[a0_0x3a4c2e(0xe7)])(a0_0x3a4c2e(0xcb)),(0x0,type_graphql_1[a0_0x3a4c2e(0x122)])(_0x204171=>Boolean,{'description':'Operato\x20Tool\x20Create\x20Menu'}),tslib_1[a0_0x3a4c2e(0x106)](0x0,(0x0,type_graphql_1[a0_0x3a4c2e(0xbc)])('id')),tslib_1[a0_0x3a4c2e(0x106)](0x1,(0x0,type_graphql_1[a0_0x3a4c2e(0xbc)])(a0_0x3a4c2e(0xd6))),tslib_1[a0_0x3a4c2e(0x106)](0x2,(0x0,type_graphql_1[a0_0x3a4c2e(0x111)])()),tslib_1[a0_0x3a4c2e(0x129)](a0_0x3a4c2e(0x107),Function),tslib_1[a0_0x3a4c2e(0x129)](a0_0x3a4c2e(0xd2),[String,String,Object]),tslib_1[a0_0x3a4c2e(0x129)](a0_0x3a4c2e(0xbe),Promise)],OperatoToolCreateMenu[a0_0x3a4c2e(0xc3)],a0_0x3a4c2e(0xe0),null),OperatoToolCreateMenu=tslib_1[a0_0x3a4c2e(0x128)]([(0x0,type_graphql_1[a0_0x3a4c2e(0x11b)])()],OperatoToolCreateMenu),exports['OperatoToolCreateMenu']=OperatoToolCreateMenu;const modelTemplate=a0_0x3a4c2e(0xc6);
@@ -1 +1 @@
1
- 'use strict';function a0_0x3ed3(){const _0x14a5d0=['includes','push','Resolvers,\x20subscribers\x20as\x20','type-graphql','13604YZgwkW','\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','lodash','decimal','PWD','createTypeText','design:returntype','number','/server','state','colType','__metadata','domain_id','export\x20*\x20from\x20\x27./','-type.ts','-history-query.ts','creator_id','updated_at','.ts','toolCreateService','5BZIvmK','bigint','\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','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','createHistoryServiceFiles','/server/service/','sort','Float','JSON','\x20})','writeFile','created_at','...','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','getFieldType','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','createServiceFiles','/*\x20ENTITIES\x20*/\x0a\x09...','__param','findOne','Int','__esModule','string','15645333LDpkfN','replace','/packages','updater_id','\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','createNoHistoryServiceFiels','length','@things-factory/shell','-mutation.ts','6465534BeOEdm','COPY','existsSync','Resolvers,','\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','Date','createHistoryEntityText','map','pascalCaseName','find','tableName','tslib','colSize','pluralize','defineProperty','\x0a\x20\x20','indexOf','uniqRank','character\x20varying','getRepository','\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','-history\x27','packages','@Column({name:\x27','domain','__decorate','\x20{\x20nullable:\x20','-query.ts','Resolvers\x20}\x20from\x20\x27./','9GTnRDj','replaceNamesMap','\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201','writeFileSync','Query','createDir','date','utf8','camelCaseName','join','rank','datetime','@Field(','env','text','-history.ts','@things-factory/resource-base','/index.ts','EntityColumn','/packages/','import\x20{\x20entities\x20as\x20','index.ts','3848ZSoUBZ','462ItETmP','1652666YYgvvv','379007tAghCP','updater','name','EntitySubscribers\x20}\x20from\x20\x27./','/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...','Ctx','/service','EntitySubscribers,','nullable','double\x20precision','design:type','createEntityText','integer','existsPath','19733mvfZpZ','filter','376300HDDEfv','long','getColTxtType','type\x20=>','pluralPascalCaseName','dataProp','readFileSync','float','\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','columnToEntityColumn','timestamp\x20without\x20time\x20zone','double','getProjectRootPath','Entities,\x20resolvers\x20as\x20','createServicePath','/event-subscriber.ts','OperatoToolCreateService','\x27,\x20nullable:\x20',',length:','Entities,','\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'];a0_0x3ed3=function(){return _0x14a5d0;};return a0_0x3ed3();}const a0_0x4710ff=a0_0x3e4e;(function(_0x5aabb9,_0x3e6fae){const _0x89ffe1=a0_0x3e4e,_0x25bba0=_0x5aabb9();while(!![]){try{const _0x2595af=-parseInt(_0x89ffe1(0x139))/0x1+-parseInt(_0x89ffe1(0x138))/0x2+parseInt(_0x89ffe1(0x137))/0x3*(parseInt(_0x89ffe1(0x162))/0x4)+parseInt(_0x89ffe1(0x176))/0x5*(-parseInt(_0x89ffe1(0x196))/0x6)+parseInt(_0x89ffe1(0x147))/0x7*(parseInt(_0x89ffe1(0x136))/0x8)+parseInt(_0x89ffe1(0x120))/0x9*(-parseInt(_0x89ffe1(0x149))/0xa)+parseInt(_0x89ffe1(0x18d))/0xb;if(_0x2595af===_0x3e6fae)break;else _0x25bba0['push'](_0x25bba0['shift']());}catch(_0x506221){_0x25bba0['push'](_0x25bba0['shift']());}}}(a0_0x3ed3,0xef9bd));Object[a0_0x4710ff(0x111)](exports,a0_0x4710ff(0x18b),{'value':!0x0}),exports['OperatoToolCreateService']=void 0x0;function a0_0x3e4e(_0x48a570,_0x3385fe){const _0x3ed3ed=a0_0x3ed3();return a0_0x3e4e=function(_0x3e4e86,_0x72922c){_0x3e4e86=_0x3e4e86-0x10f;let _0x2af251=_0x3ed3ed[_0x3e4e86];return _0x2af251;},a0_0x3e4e(_0x48a570,_0x3385fe);}const tslib_1=require(a0_0x4710ff(0x1a1)),type_graphql_1=require(a0_0x4710ff(0x161)),shell_1=require(a0_0x4710ff(0x194)),resource_base_1=require(a0_0x4710ff(0x130)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x4710ff(0x164)),{plural:plural}=require(a0_0x4710ff(0x110)),fs=require('fs');let OperatoToolCreateService=class{async[a0_0x4710ff(0x175)](_0x3cc9f7,_0x398349){const _0x5e9a50=a0_0x4710ff,{domain:_0x380af9}=_0x398349[_0x5e9a50(0x16b)],_0x55496b=await(0x0,shell_1[_0x5e9a50(0x116)])(resource_base_1['Entity'])[_0x5e9a50(0x189)]({'where':{'id':_0x3cc9f7}}),_0x317d63=await(0x0,shell_1[_0x5e9a50(0x116)])(resource_base_1[_0x5e9a50(0x132)])[_0x5e9a50(0x19f)]({'where':{'domain':{'id':_0x380af9['id']},'entity':{'id':_0x55496b['id']}}});let {name:_0x376d6d='',bundle:_0x1252b7=''}=_0x55496b||{},_0x224d64=this[_0x5e9a50(0x155)](),_0x267cce=kebabCase(_0x376d6d);return await this[_0x5e9a50(0x157)](_0x224d64,_0x1252b7,_0x267cce),await this[_0x5e9a50(0x186)](_0x224d64,_0x1252b7,_0x376d6d,_0x267cce,_0x55496b,_0x317d63),!0x0;}async[a0_0x4710ff(0x186)](_0x576402,_0x28fd32,_0x4959b8,_0x1c574e,_0x52e825,_0x3f183b){const _0x8a3401=a0_0x4710ff;let _0x515529={'name':_0x1c574e,'tableName':_0x52e825[_0x8a3401(0x1a0)],'pascalCaseName':startCase(camelCase(_0x4959b8))[_0x8a3401(0x18e)](/ /g,''),'camelCaseName':camelCase(_0x4959b8),'snakeCaseName':snakeCase(_0x4959b8),'pluralPascalCaseName':startCase(camelCase(plural(_0x4959b8)))[_0x8a3401(0x18e)](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x4959b8))},_0x264943=_0x576402+_0x8a3401(0x133)+_0x28fd32+_0x8a3401(0x17b);['JSON','COPY'][_0x8a3401(0x15e)](_0x52e825[_0x8a3401(0x14e)])?await this[_0x8a3401(0x17a)](_0x264943,_0x1c574e,_0x52e825,_0x3f183b,_0x515529):await this['createNoHistoryServiceFiels'](_0x264943,_0x1c574e,_0x52e825,_0x3f183b,_0x515529);}async[a0_0x4710ff(0x17a)](_0x33d92a,_0x3a7630,_0x560a8d,_0x129ed7,_0x3649c4){const _0x5bb31d=a0_0x4710ff;await this['writeFile'](_0x33d92a+(_0x3a7630+_0x5bb31d(0x131)),serviceHistoryIndex,_0x3649c4);let _0x51e06d=this['createEntityText'](_0x560a8d,_0x129ed7);await this['writeFile'](_0x33d92a+(_0x3a7630+'/'+_0x3a7630+_0x5bb31d(0x174)),_0x51e06d,_0x3649c4),await this[_0x5bb31d(0x180)](_0x33d92a+(_0x3a7630+'/'+_0x3a7630+_0x5bb31d(0x11e)),serviceQuery,_0x3649c4),await this['writeFile'](_0x33d92a+(_0x3a7630+'/'+_0x3a7630+_0x5bb31d(0x195)),serviceMutation,_0x3649c4);let _0x330835=this['createTypeText'](_0x129ed7);await this['writeFile'](_0x33d92a+(_0x3a7630+'/'+_0x3a7630+_0x5bb31d(0x170)),_0x330835,_0x3649c4);let _0x499965=this['createHistoryEntityText'](_0x560a8d,_0x129ed7);await this['writeFile'](_0x33d92a+(_0x3a7630+'/'+_0x3a7630+_0x5bb31d(0x12f)),_0x499965,_0x3649c4);let _0x58199f='';_0x5bb31d(0x17e)==_0x560a8d[_0x5bb31d(0x14e)]?(_0x58199f=_0x5bb31d(0x178),await this[_0x5bb31d(0x180)](_0x33d92a+(_0x3a7630+_0x5bb31d(0x158)),serviceEntitySubscriber,_0x3649c4)):_0x58199f='';let _0x31f84b=serviceEntitySubscriber['replace'](/{{entityToJson}}/g,_0x58199f);await this['writeFile'](_0x33d92a+(_0x3a7630+_0x5bb31d(0x158)),_0x31f84b,_0x3649c4),await this[_0x5bb31d(0x180)](_0x33d92a+(_0x3a7630+'/'+_0x3a7630+_0x5bb31d(0x171)),serviceHistoryQuery,_0x3649c4),await this[_0x5bb31d(0x180)](_0x33d92a+(_0x3a7630+'/'+_0x3a7630+'-history-type.ts'),sereviceHistoryType,_0x3649c4);let _0x88d853=_0x33d92a+_0x5bb31d(0x135);0x0==await this[_0x5bb31d(0x146)](_0x88d853)&&await this['writeFile'](_0x88d853,allIndex,_0x3649c4);let _0x342dc5=await fs['readFileSync'](_0x88d853,_0x5bb31d(0x127));_0x342dc5['indexOf'](_0x5bb31d(0x16f)+_0x3649c4[_0x5bb31d(0x13b)]+'/'+_0x3649c4[_0x5bb31d(0x13b)]+_0x5bb31d(0x118))<0x0&&(_0x342dc5=_0x342dc5['replace'](/\/\* EXPORT ENTITY TYPES \*\//,_0x5bb31d(0x183)+_0x3649c4[_0x5bb31d(0x13b)]+'/'+_0x3649c4[_0x5bb31d(0x13b)]+_0x5bb31d(0x118))),_0x342dc5[_0x5bb31d(0x113)]('export\x20*\x20from\x20\x27./'+_0x3649c4[_0x5bb31d(0x13b)]+'/'+_0x3649c4[_0x5bb31d(0x13b)]+'\x27')<0x0&&(_0x342dc5=_0x342dc5[_0x5bb31d(0x18e)](/\/\* EXPORT ENTITY TYPES \*\//,_0x5bb31d(0x183)+_0x3649c4[_0x5bb31d(0x13b)]+'/'+_0x3649c4[_0x5bb31d(0x13b)]+'\x27')),_0x342dc5[_0x5bb31d(0x113)]('import\x20{\x20entities\x20as\x20'+_0x3649c4[_0x5bb31d(0x19e)]+_0x5bb31d(0x156)+_0x3649c4[_0x5bb31d(0x19e)]+_0x5bb31d(0x160)+_0x3649c4[_0x5bb31d(0x19e)]+_0x5bb31d(0x13c)+_0x3649c4['name']+'\x27')<0x0&&(_0x342dc5=_0x342dc5[_0x5bb31d(0x18e)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x5bb31d(0x185)+_0x3649c4[_0x5bb31d(0x19e)]+'Entities,\x20resolvers\x20as\x20'+_0x3649c4['pascalCaseName']+_0x5bb31d(0x160)+_0x3649c4[_0x5bb31d(0x19e)]+'EntitySubscribers\x20}\x20from\x20\x27./'+_0x3649c4['name']+'\x27')),_0x342dc5[_0x5bb31d(0x113)](_0x5bb31d(0x182)+_0x3649c4[_0x5bb31d(0x19e)]+_0x5bb31d(0x15c))<0x0&&(_0x342dc5=_0x342dc5[_0x5bb31d(0x18e)](/\/\* ENTITIES \*\//,_0x5bb31d(0x187)+_0x3649c4['pascalCaseName']+'Entities,')),_0x342dc5[_0x5bb31d(0x113)]('...'+_0x3649c4['pascalCaseName']+'Resolvers,')<0x0&&(_0x342dc5=_0x342dc5[_0x5bb31d(0x18e)](/\/\* RESOLVER CLASSES \*\//,_0x5bb31d(0x179)+_0x3649c4['pascalCaseName']+_0x5bb31d(0x199))),_0x342dc5[_0x5bb31d(0x113)](_0x5bb31d(0x182)+_0x3649c4['pascalCaseName']+_0x5bb31d(0x140))<0x0&&(_0x342dc5=_0x342dc5[_0x5bb31d(0x18e)](/\/\* SUBSCRIBERS \*\//,_0x5bb31d(0x13d)+_0x3649c4[_0x5bb31d(0x19e)]+_0x5bb31d(0x140))),await this[_0x5bb31d(0x180)](_0x88d853,_0x342dc5,_0x3649c4);}async[a0_0x4710ff(0x192)](_0x842f1b,_0x51d126,_0xc68174,_0x4cf6d6,_0x2ec8da){const _0x39a91e=a0_0x4710ff;await this[_0x39a91e(0x180)](_0x842f1b+(_0x51d126+'/index.ts'),serviceIndex,_0x2ec8da),await this[_0x39a91e(0x180)](_0x842f1b+(_0x51d126+'/'+_0x51d126+_0x39a91e(0x11e)),serviceQuery,_0x2ec8da),await this[_0x39a91e(0x180)](_0x842f1b+(_0x51d126+'/'+_0x51d126+_0x39a91e(0x195)),serviceMutation,_0x2ec8da);let _0x400fce=this[_0x39a91e(0x144)](_0xc68174,_0x4cf6d6);await this[_0x39a91e(0x180)](_0x842f1b+(_0x51d126+'/'+_0x51d126+_0x39a91e(0x174)),_0x400fce,_0x2ec8da);let _0xda0f94=this[_0x39a91e(0x167)](_0x4cf6d6);await this['writeFile'](_0x842f1b+(_0x51d126+'/'+_0x51d126+_0x39a91e(0x170)),_0xda0f94,_0x2ec8da);let _0x1c5288=_0x842f1b+_0x39a91e(0x135);0x0==await this['existsPath'](_0x1c5288)&&await this[_0x39a91e(0x180)](_0x1c5288,allIndex,_0x2ec8da);let _0x4579c3=await fs[_0x39a91e(0x14f)](_0x1c5288,_0x39a91e(0x127));_0x4579c3['indexOf']('export\x20*\x20from\x20\x27./'+_0x2ec8da['name']+'/'+_0x2ec8da[_0x39a91e(0x13b)]+'\x27')<0x0&&(_0x4579c3=_0x4579c3[_0x39a91e(0x18e)](/\/\* EXPORT ENTITY TYPES \*\//,_0x39a91e(0x183)+_0x2ec8da['name']+'/'+_0x2ec8da[_0x39a91e(0x13b)]+'\x27')),_0x4579c3[_0x39a91e(0x113)](_0x39a91e(0x134)+_0x2ec8da[_0x39a91e(0x19e)]+_0x39a91e(0x156)+_0x2ec8da[_0x39a91e(0x19e)]+'Resolvers\x20}\x20from\x20\x27./'+_0x2ec8da[_0x39a91e(0x13b)]+'\x27')<0x0&&(_0x4579c3=_0x4579c3[_0x39a91e(0x18e)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x39a91e(0x185)+_0x2ec8da['pascalCaseName']+_0x39a91e(0x156)+_0x2ec8da['pascalCaseName']+_0x39a91e(0x11f)+_0x2ec8da[_0x39a91e(0x13b)]+'\x27')),_0x4579c3[_0x39a91e(0x113)](_0x39a91e(0x182)+_0x2ec8da['pascalCaseName']+'Entities,')<0x0&&(_0x4579c3=_0x4579c3[_0x39a91e(0x18e)](/\/\* ENTITIES \*\//,_0x39a91e(0x187)+_0x2ec8da[_0x39a91e(0x19e)]+_0x39a91e(0x15c))),_0x4579c3[_0x39a91e(0x113)]('...'+_0x2ec8da['pascalCaseName']+'Resolvers,')<0x0&&(_0x4579c3=_0x4579c3['replace'](/\/\* RESOLVER CLASSES \*\//,'/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...'+_0x2ec8da[_0x39a91e(0x19e)]+_0x39a91e(0x199))),await this[_0x39a91e(0x180)](_0x1c5288,_0x4579c3,_0x2ec8da);}[a0_0x4710ff(0x167)](_0x53add0){const _0x5d02b1=a0_0x4710ff;let _0x347e35=sereviceType,_0x1b47f8=_0x53add0['map'](_0x1f29da=>{const _0x49a307=a0_0x3e4e;if('id'==_0x1f29da[_0x49a307(0x13b)])return'';if(_0x49a307(0x16e)==_0x1f29da[_0x49a307(0x13b)])return'';if(_0x49a307(0x181)==_0x1f29da[_0x49a307(0x13b)])return'';if(_0x49a307(0x173)==_0x1f29da[_0x49a307(0x13b)])return'';if(_0x49a307(0x172)==_0x1f29da[_0x49a307(0x13b)])return'';if('updater_id'==_0x1f29da[_0x49a307(0x13b)])return'';let _0x11e830=this[_0x49a307(0x184)](_0x1f29da),_0x3c0ad1=this[_0x49a307(0x14b)](_0x1f29da),_0x46d961=camelCase(_0x1f29da[_0x49a307(0x13b)]);return'\x20\x20'+(_0x49a307(0x12c)+(0x0==_0x11e830[_0x49a307(0x193)]?'':_0x49a307(0x14c)+_0x11e830+',')+_0x49a307(0x11d)+_0x1f29da[_0x49a307(0x141)]+_0x49a307(0x17f))+_0x49a307(0x112)+(''+_0x46d961+(_0x1f29da[_0x49a307(0x141)]?'?':'')+':\x20'+_0x3c0ad1)+'\x0a';});_0x347e35=_0x347e35[_0x5d02b1(0x18e)](/{{newTypeColumns}}/g,_0x1b47f8[_0x5d02b1(0x129)]('\x0a'));let _0x18b3b4=_0x53add0[_0x5d02b1(0x19d)](_0x296726=>{const _0x4223fe=_0x5d02b1;if('id'==_0x296726[_0x4223fe(0x13b)])return'';if(_0x4223fe(0x16e)==_0x296726[_0x4223fe(0x13b)])return'';if(_0x4223fe(0x181)==_0x296726['name'])return'';if(_0x4223fe(0x173)==_0x296726[_0x4223fe(0x13b)])return'';if(_0x4223fe(0x172)==_0x296726[_0x4223fe(0x13b)])return'';if(_0x4223fe(0x190)==_0x296726[_0x4223fe(0x13b)])return'';let _0x581e33=this[_0x4223fe(0x184)](_0x296726),_0x3a64fa=this[_0x4223fe(0x14b)](_0x296726);_0x296726['nullable']=!0x0;let _0x4a46f5=camelCase(_0x296726[_0x4223fe(0x13b)]);return'\x20\x20'+(_0x4223fe(0x12c)+(0x0==_0x581e33[_0x4223fe(0x193)]?'':_0x4223fe(0x14c)+_0x581e33+',')+_0x4223fe(0x11d)+_0x296726[_0x4223fe(0x141)]+'\x20})')+_0x4223fe(0x112)+(''+_0x4a46f5+(_0x296726[_0x4223fe(0x141)]?'?':'')+':\x20'+_0x3a64fa)+'\x0a';});return _0x347e35=_0x347e35[_0x5d02b1(0x18e)](/{{patchTypeColumns}}/g,_0x18b3b4[_0x5d02b1(0x129)]('\x0a')),_0x347e35;}[a0_0x4710ff(0x144)](_0x1430cb,_0x55a35b){const _0x33fd4e=a0_0x4710ff;let _0x34a754=serviceEntity,_0x1407a8=_0x55a35b['sort'](function(_0x4c4edb,_0x262422){const _0x3aff9c=a0_0x3e4e;return _0x4c4edb[_0x3aff9c(0x12a)]-_0x262422[_0x3aff9c(0x12a)];})[_0x33fd4e(0x19d)](_0x4f3a54=>this[_0x33fd4e(0x152)](_0x4f3a54));[_0x33fd4e(0x197),'JSON']['includes'](_0x1430cb['dataProp'])&&_0x1407a8[_0x33fd4e(0x15f)](_0x33fd4e(0x122)),_0x34a754=_0x34a754[_0x33fd4e(0x18e)](/{{entityColumns}}/g,_0x1407a8[_0x33fd4e(0x129)]('\x0a'));let _0x30f70b='',_0x5e523d=_0x55a35b[_0x33fd4e(0x148)](_0x31e343=>_0x31e343[_0x33fd4e(0x114)]&&_0x31e343[_0x33fd4e(0x114)]>0x0)[_0x33fd4e(0x17c)](function(_0x35e7f3,_0x5ae83){const _0x54b867=_0x33fd4e;return _0x35e7f3[_0x54b867(0x114)]-_0x5ae83['uniqRank'];});if(_0x5e523d[_0x33fd4e(0x193)]>0x0){_0x30f70b='@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})';let _0xf7dac8=_0x5e523d[_0x33fd4e(0x19d)](_0x3f4567=>{const _0x11bbb7=_0x33fd4e;let _0x195c99=_0x3f4567[_0x11bbb7(0x13b)];return'domain_id'==_0x3f4567[_0x11bbb7(0x13b)]&&(_0x195c99=_0x11bbb7(0x11b)),_0x11bbb7(0x172)==_0x3f4567['name']&&(_0x195c99='creator'),_0x11bbb7(0x190)==_0x3f4567[_0x11bbb7(0x13b)]&&(_0x195c99=_0x11bbb7(0x13a)),'{{camelCase\x20name}}.'+camelCase(_0x195c99);});_0x30f70b=_0x30f70b[_0x33fd4e(0x18e)](/{{indexColumns}}/g,_0xf7dac8['join'](','));}return _0x34a754=_0x34a754[_0x33fd4e(0x18e)](/{{indexAnn}}/g,_0x30f70b),_0x34a754;}[a0_0x4710ff(0x19c)](_0xe80cb9,_0x34bc95){const _0x94dc82=a0_0x4710ff;let _0x590673=_0x94dc82(0x17e)==_0xe80cb9[_0x94dc82(0x14e)]?serviceEntityHistJson:serviceEntityHistCopy,_0x40df87=_0x34bc95[_0x94dc82(0x17c)](function(_0x718a2d,_0x39c35e){const _0x197df7=_0x94dc82;return _0x718a2d[_0x197df7(0x12a)]-_0x39c35e[_0x197df7(0x12a)];})[_0x94dc82(0x19d)](_0x4e897c=>this[_0x94dc82(0x152)](_0x4e897c));return _0x590673=_0x590673[_0x94dc82(0x18e)](/{{entityColumns}}/g,_0x40df87['join']('\x0a')),_0x590673;}[a0_0x4710ff(0x152)](_0x963f10){const _0x1976bf=a0_0x4710ff;if('id'==_0x963f10[_0x1976bf(0x13b)])return'';if(_0x1976bf(0x16e)==_0x963f10[_0x1976bf(0x13b)])return'';if(_0x1976bf(0x181)==_0x963f10[_0x1976bf(0x13b)])return'';if(_0x1976bf(0x173)==_0x963f10['name'])return'';if(_0x1976bf(0x172)==_0x963f10['name'])return'';if(_0x1976bf(0x190)==_0x963f10[_0x1976bf(0x13b)])return'';let _0x266fd5=_0x963f10['colType'];_0x1976bf(0x154)==_0x963f10[_0x1976bf(0x16c)]&&(_0x266fd5=_0x1976bf(0x142)),'long'==_0x963f10[_0x1976bf(0x16c)]&&(_0x266fd5=_0x1976bf(0x177)),'string'==_0x963f10[_0x1976bf(0x16c)]&&(_0x266fd5=_0x1976bf(0x115)),_0x1976bf(0x12b)==_0x963f10[_0x1976bf(0x16c)]&&(_0x266fd5=_0x1976bf(0x153));let _0x2ce3a9='';'string'==_0x963f10[_0x1976bf(0x16c)]&&(_0x2ce3a9=_0x963f10[_0x1976bf(0x10f)]);let _0x4324f8=this[_0x1976bf(0x184)](_0x963f10),_0x3fcd52=this[_0x1976bf(0x14b)](_0x963f10),_0x6be08d=camelCase(_0x963f10['name']);return'\x20\x20'+(_0x1976bf(0x11a)+_0x963f10[_0x1976bf(0x13b)]+'\x27,\x20type:\x20\x27'+_0x266fd5+_0x1976bf(0x15a)+_0x963f10[_0x1976bf(0x141)]+'\x20'+(0x0==_0x2ce3a9[_0x1976bf(0x193)]?'':_0x1976bf(0x15b)+_0x2ce3a9)+_0x1976bf(0x17f))+_0x1976bf(0x112)+(_0x1976bf(0x12c)+(0x0==_0x4324f8[_0x1976bf(0x193)]?'':_0x1976bf(0x14c)+_0x4324f8+',')+'\x20{\x20nullable:\x20'+_0x963f10[_0x1976bf(0x141)]+_0x1976bf(0x17f))+'\x0a\x20\x20'+(''+_0x6be08d+(_0x963f10[_0x1976bf(0x141)]?'?':'')+':\x20'+_0x3fcd52)+'\x0a';}[a0_0x4710ff(0x184)](_0x55c0dc){const _0x5a72c5=a0_0x4710ff;let _0x5ce11e='';return _0x5a72c5(0x154)==_0x55c0dc[_0x5a72c5(0x16c)]&&(_0x5ce11e='Float'),_0x5a72c5(0x150)==_0x55c0dc['colType']&&(_0x5ce11e=_0x5a72c5(0x17d)),_0x5a72c5(0x14a)==_0x55c0dc['colType']&&(_0x5ce11e=_0x5a72c5(0x18a)),_0x5a72c5(0x145)==_0x55c0dc[_0x5a72c5(0x16c)]&&(_0x5ce11e=_0x5a72c5(0x18a)),_0x5ce11e;}[a0_0x4710ff(0x14b)](_0x279f34){const _0x295e28=a0_0x4710ff;let _0x36dc47=_0x279f34['colType'];return _0x295e28(0x165)==_0x279f34['colType']&&(_0x36dc47='number'),_0x295e28(0x154)==_0x279f34['colType']&&(_0x36dc47=_0x295e28(0x169)),'float'==_0x279f34['colType']&&(_0x36dc47=_0x295e28(0x169)),_0x295e28(0x145)==_0x279f34[_0x295e28(0x16c)]&&(_0x36dc47=_0x295e28(0x169)),_0x295e28(0x14a)==_0x279f34[_0x295e28(0x16c)]&&(_0x36dc47=_0x295e28(0x169)),'datetime'==_0x279f34[_0x295e28(0x16c)]&&(_0x36dc47=_0x295e28(0x19b)),_0x295e28(0x126)==_0x279f34[_0x295e28(0x16c)]&&(_0x36dc47=_0x295e28(0x19b)),_0x295e28(0x12e)==_0x279f34[_0x295e28(0x16c)]&&(_0x36dc47=_0x295e28(0x18c)),_0x36dc47;}async[a0_0x4710ff(0x180)](_0x870236,_0x1a8a5e,_0xe57e77){const _0x54e200=a0_0x4710ff;await fs[_0x54e200(0x123)](_0x870236,this['replaceNamesMap'](_0x1a8a5e,_0xe57e77),_0x54e200(0x127));}[a0_0x4710ff(0x121)](_0x341a67,_0x337dd9){const _0x1c3fe1=a0_0x4710ff;return _0x341a67['replace'](/{{pascalCase name}}/g,_0x337dd9[_0x1c3fe1(0x19e)])[_0x1c3fe1(0x18e)](/{{camelCase name}}/g,_0x337dd9[_0x1c3fe1(0x128)])[_0x1c3fe1(0x18e)](/{{snakeCase name}}/g,_0x337dd9['snakeCaseName'])[_0x1c3fe1(0x18e)](/{{pluralPascalCase name}}/g,_0x337dd9[_0x1c3fe1(0x14d)])[_0x1c3fe1(0x18e)](/{{pluralCamelCase name}}/g,_0x337dd9['pluralCamelCaseName'])[_0x1c3fe1(0x18e)](/{{tableName}}/g,_0x337dd9[_0x1c3fe1(0x1a0)])[_0x1c3fe1(0x18e)](/{{name}}/g,_0x337dd9[_0x1c3fe1(0x13b)]);}async[a0_0x4710ff(0x157)](_0xcdce35,_0x4b1cea,_0x1bff7a){const _0x4b43cf=a0_0x4710ff;let _0x5cb14c=_0xcdce35+_0x4b43cf(0x18f);await this[_0x4b43cf(0x125)](_0x5cb14c),_0x5cb14c=_0x5cb14c+'/'+_0x4b1cea,await this[_0x4b43cf(0x125)](_0x5cb14c),_0x5cb14c+=_0x4b43cf(0x16a),await this[_0x4b43cf(0x125)](_0x5cb14c),_0x5cb14c+=_0x4b43cf(0x13f),await this[_0x4b43cf(0x125)](_0x5cb14c),_0x5cb14c=_0x5cb14c+'/'+_0x1bff7a,await this['createDir'](_0x5cb14c);}[a0_0x4710ff(0x155)](){const _0x19eb6a=a0_0x4710ff;let _0x14ef9a=process[_0x19eb6a(0x12d)][_0x19eb6a(0x166)]['split']('/'),_0x5d1f32=[];for(let _0x4cc5f5=0x0;_0x4cc5f5<_0x14ef9a['length']&&_0x19eb6a(0x119)!=_0x14ef9a[_0x4cc5f5];_0x4cc5f5++)_0x5d1f32[_0x19eb6a(0x15f)](_0x14ef9a[_0x4cc5f5]);return _0x5d1f32[_0x19eb6a(0x129)]('/');}async[a0_0x4710ff(0x125)](_0x1b09b7){const _0x5cfa02=a0_0x4710ff;0x0==await this[_0x5cfa02(0x146)](_0x1b09b7)&&fs['mkdirSync'](_0x1b09b7);}async[a0_0x4710ff(0x146)](_0x235674){const _0x26571e=a0_0x4710ff;return await fs[_0x26571e(0x198)](_0x235674);}};tslib_1[a0_0x4710ff(0x11c)]([(0x0,type_graphql_1[a0_0x4710ff(0x124)])(_0x191d02=>Boolean,{'description':'Operato\x20Tool\x20Create\x20Service'}),tslib_1['__param'](0x0,(0x0,type_graphql_1['Arg'])('id')),tslib_1[a0_0x4710ff(0x188)](0x1,(0x0,type_graphql_1[a0_0x4710ff(0x13e)])()),tslib_1[a0_0x4710ff(0x16d)](a0_0x4710ff(0x143),Function),tslib_1[a0_0x4710ff(0x16d)]('design:paramtypes',[String,Object]),tslib_1['__metadata'](a0_0x4710ff(0x168),Promise)],OperatoToolCreateService['prototype'],a0_0x4710ff(0x175),null),OperatoToolCreateService=tslib_1[a0_0x4710ff(0x11c)]([(0x0,type_graphql_1['Resolver'])()],OperatoToolCreateService),exports[a0_0x4710ff(0x159)]=OperatoToolCreateService;const allIndex=a0_0x4710ff(0x15d),serviceIndex='\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}}]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}Mutation]\x0a',serviceHistoryIndex='\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryQuery\x20}\x20from\x20\x27./{{name}}-history-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryEntitySubscriber\x20}\x20from\x20\x27./event-subscriber\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}},\x20{{pascalCase\x20name}}History]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}HistoryQuery,\x20{{pascalCase\x20name}}Mutation]\x0aexport\x20const\x20subscribers\x20=\x20[{{pascalCase\x20name}}HistoryEntitySubscriber]\x0a\x0a',serviceQuery=a0_0x4710ff(0x163),serviceHistoryQuery=a0_0x4710ff(0x151),serviceMutation='\x0aimport\x20{\x20Resolver,\x20Mutation,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20In\x20}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20New{{pascalCase\x20name}},\x20{{pascalCase\x20name}}Patch\x20}\x20from\x20\x27./{{name}}-type\x27\x0aimport\x20{\x20getRepository\x20}\x20from\x20\x27@things-factory/shell\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Mutation\x20{\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20create\x20new\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20create{{pascalCase\x20name}}(@Arg(\x27{{camelCase\x20name}}\x27)\x20{{camelCase\x20name}}:\x20New{{pascalCase\x20name}},\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20return\x20await\x20tx.getRepository({{pascalCase\x20name}}).save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20modify\x20{{pascalCase\x20name}}\x20information\x27\x20})\x0a\x20\x20async\x20update{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27id\x27)\x20id:\x20string,\x0a\x20\x20\x20\x20@Arg(\x27patch\x27)\x20patch:\x20{{pascalCase\x20name}}Patch,\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20repository\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20repository.findOne(\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20)\x0a\x0a\x20\x20\x20\x20return\x20await\x20repository.save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20...patch,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20[{{pascalCase\x20name}}],\x20{\x20description:\x20\x22To\x20modify\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20information\x22\x20})\x0a\x20\x20async\x20updateMultiple{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27patches\x27,\x20type\x20=>\x20[{{pascalCase\x20name}}Patch])\x20patches:\x20{{pascalCase\x20name}}Patch[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}[]>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20results\x20=\x20[]\x0a\x20\x20\x20\x20const\x20_createRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27+\x27)\x0a\x20\x20\x20\x20const\x20_updateRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27M\x27)\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}Repo\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x0a\x20\x20\x20\x20if\x20(_createRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_createRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20newRecord\x20=\x20_createRecords[i]\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...newRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27+\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20if\x20(_updateRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_updateRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20updRecord\x20=\x20_updateRecords[i]\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20{{camelCase\x20name}}Repo.findOne({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id:updRecord.id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...updRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27M\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20return\x20results\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20delete{{pascalCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove({\x20domain,\x20id,\x20updater:user\x20})\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20multiple\x20{{camelCase\x20name}}s\x27\x20})\x0a\x20\x20async\x20delete{{pluralPascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27ids\x27,\x20type\x20=>\x20[String])\x20ids:\x20string[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20delEntitis\x20=\x20ids.map(id=>{\x0a\x20\x20\x20\x20\x20\x20return\x20{domain,id,updater:user}\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove(delEntitis)\x0a\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a}\x0a',sereviceType=a0_0x4710ff(0x117),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_0x4710ff(0x19a),serviceEntityHistCopy='\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',serviceEntityHistJson='\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a\x20\x20@Column(\x27simple-json\x27,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20@Field(type\x20=>\x20ScalarObject,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20historyJson?:\x20any\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a',serviceEntitySubscriber=a0_0x4710ff(0x191);
1
+ 'use strict';const a0_0x270043=a0_0x55cf;(function(_0x3d8c5e,_0x2acda6){const _0x5701cc=a0_0x55cf,_0x13c778=_0x3d8c5e();while(!![]){try{const _0x320aa2=-parseInt(_0x5701cc(0x188))/0x1*(-parseInt(_0x5701cc(0x19c))/0x2)+parseInt(_0x5701cc(0x1b8))/0x3*(parseInt(_0x5701cc(0x18b))/0x4)+parseInt(_0x5701cc(0x191))/0x5+parseInt(_0x5701cc(0x198))/0x6*(-parseInt(_0x5701cc(0x1c0))/0x7)+-parseInt(_0x5701cc(0x1f8))/0x8*(-parseInt(_0x5701cc(0x19a))/0x9)+-parseInt(_0x5701cc(0x1b4))/0xa+-parseInt(_0x5701cc(0x1ae))/0xb;if(_0x320aa2===_0x2acda6)break;else _0x13c778['push'](_0x13c778['shift']());}catch(_0x35e6c5){_0x13c778['push'](_0x13c778['shift']());}}}(a0_0x42f9,0xefe9b));Object[a0_0x270043(0x1f1)](exports,a0_0x270043(0x178),{'value':!0x0}),exports[a0_0x270043(0x199)]=void 0x0;const tslib_1=require(a0_0x270043(0x1b9)),type_graphql_1=require(a0_0x270043(0x1b2)),shell_1=require(a0_0x270043(0x1e0)),resource_base_1=require(a0_0x270043(0x1fd)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x270043(0x1c4)),{plural:plural}=require(a0_0x270043(0x17b)),fs=require('fs');function a0_0x55cf(_0x4adc5f,_0x1728a7){const _0x42f969=a0_0x42f9();return a0_0x55cf=function(_0x55cf2d,_0x101ccc){_0x55cf2d=_0x55cf2d-0x16a;let _0x207c91=_0x42f969[_0x55cf2d];return _0x207c91;},a0_0x55cf(_0x4adc5f,_0x1728a7);}function a0_0x42f9(){const _0x4cac85=['...','defineProperty','Resolvers,\x20subscribers\x20as\x20','design:paramtypes','\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','colType','Float','\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201','16792gpElYd','map','design:type','-history-query.ts','Date','@things-factory/resource-base','getProjectRootPath','/index.ts','state','\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}}]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}Mutation]\x0a','replace','index.ts','__param','indexOf','@Field(','-query.ts','EntityColumn','\x20})','\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}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','\x20{\x20nullable:\x20','createServicePath','__esModule','\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','existsPath','pluralize','prototype','mkdirSync','/service','includes','export\x20*\x20from\x20\x27./','dataProp','replaceNamesMap','updated_at','\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','__decorate','creator_id','/event-subscriber.ts','637947LqjeGi','toolCreateService','\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','14228oGCLUp','-mutation.ts','readFileSync','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','updater','integer','4043065wVgQQT','\x0a\x20\x20','creator','decimal','writeFile','pluralPascalCaseName','uniqRank','42cfNYFg','OperatoToolCreateService','315rEZLSj','Entity','6xCabPy','JSON','{{camelCase\x20name}}.','split','nullable','rank','text','bigint','pascalCaseName','packages','@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})','updater_id','createTypeText','Operato\x20Tool\x20Create\x20Service','datetime','Entities,','Entities,\x20resolvers\x20as\x20','\x0aimport\x20{\x20EventSubscriber\x20}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20HistoryEntitySubscriber\x20}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20getRepository\x20}\x20from\x20\x27@things-factory/shell\x27\x0a\x0a@EventSubscriber()\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryEntitySubscriber\x20extends\x20HistoryEntitySubscriber<{{pascalCase\x20name}},{{pascalCase\x20name}}History>\x20{\x0a\x20\x20public\x20get\x20entity()\x20{\x0a\x20\x20\x20\x20return\x20{{pascalCase\x20name}}\x0a\x20\x20}\x0a\x0a\x20\x20public\x20get\x20historyEntity()\x20{\x0a\x20\x20\x20\x20return\x20{{pascalCase\x20name}}History\x0a\x20\x20}\x0a\x0a\x20\x20{{entityToJson}}\x0a\x0a\x20\x20async\x20beforeRemoveHistory(history:{{pascalCase\x20name}}History,entity:{{pascalCase\x20name}}){\x0a\x20\x20\x20\x20let\x20repo\x20=\x20getRepository({{pascalCase\x20name}}History);\x0a\x20\x20\x20\x20const\x20revNo\x20=\x20await\x20repo.createQueryBuilder()\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.select(\x27max(data_revision_no)\x27,\x20\x27rev_no\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.where(\x27domain_id\x20=\x20:domainId\x27,\x20{\x20domainId:\x20entity.domain.id\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.andWhere(\x27original_id\x20=\x20:originalId\x27,\x20{\x20originalId:\x20entity.id\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.getRawOne()\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20history.dataRevisionNo\x20=\x20revNo\x20?\x20revNo.rev_no\x20+\x201\x20:\x201;\x0a\x20\x20\x20\x20return\x20history;\x0a\x20\x20}\x0a}\x0a','36174072dmUrQz','@Column({name:\x27','columnToEntityColumn','env','type-graphql','join','1245440YvaKaQ','created_at','.ts','PWD','1563UqoTOj','tslib','createDir','\x27,\x20type:\x20\x27','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20Domain\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0a@Entity(\x27{{tableName}}\x27)\x0a{{indexAnn}}\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}\x20{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','\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','getColTxtType','createHistoryServiceFiles','253337pSUGxw','double\x20precision','/packages/','number','lodash','name','type\x20=>','double','pluralCamelCaseName','find','float','-history\x27','createServiceFiles','\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','sort','push','createEntityText','Resolvers,','EntitySubscribers\x20}\x20from\x20\x27./','Resolvers\x20}\x20from\x20\x27./','domain_id','Resolver',',length:','-type.ts','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','/packages','string','import\x20{\x20entities\x20as\x20','filter','COPY','long','getRepository','@things-factory/shell','utf8','length','\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','design:returntype','__metadata','EntitySubscribers,','createHistoryEntityText','writeFileSync','/server/service/','getFieldType','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','Int','tableName','-history-type.ts','camelCaseName'];a0_0x42f9=function(){return _0x4cac85;};return a0_0x42f9();}let OperatoToolCreateService=class{async[a0_0x270043(0x189)](_0x1ef4b7,_0xc2fb3f){const _0x20ce86=a0_0x270043,{domain:_0x2b48b9}=_0xc2fb3f[_0x20ce86(0x16b)],_0x163c77=await(0x0,shell_1[_0x20ce86(0x1df)])(resource_base_1[_0x20ce86(0x19b)])['findOne']({'where':{'id':_0x1ef4b7}}),_0x160cc2=await(0x0,shell_1['getRepository'])(resource_base_1[_0x20ce86(0x173)])[_0x20ce86(0x1c9)]({'where':{'domain':{'id':_0x2b48b9['id']},'entity':{'id':_0x163c77['id']}}});let {name:_0x45050f='',bundle:_0x17b0f1=''}=_0x163c77||{},_0x29d127=this[_0x20ce86(0x1fe)](),_0xba6563=kebabCase(_0x45050f);return await this[_0x20ce86(0x177)](_0x29d127,_0x17b0f1,_0xba6563),await this[_0x20ce86(0x1cc)](_0x29d127,_0x17b0f1,_0x45050f,_0xba6563,_0x163c77,_0x160cc2),!0x0;}async[a0_0x270043(0x1cc)](_0x35d85c,_0x281f35,_0x2b455c,_0x23bdef,_0x223eb7,_0x3bfd64){const _0x28e915=a0_0x270043;let _0x399ac6={'name':_0x23bdef,'tableName':_0x223eb7['tableName'],'pascalCaseName':startCase(camelCase(_0x2b455c))['replace'](/ /g,''),'camelCaseName':camelCase(_0x2b455c),'snakeCaseName':snakeCase(_0x2b455c),'pluralPascalCaseName':startCase(camelCase(plural(_0x2b455c)))[_0x28e915(0x16d)](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x2b455c))},_0x2b7487=_0x35d85c+_0x28e915(0x1c2)+_0x281f35+_0x28e915(0x1e9);[_0x28e915(0x19d),_0x28e915(0x1dd)][_0x28e915(0x17f)](_0x223eb7[_0x28e915(0x181)])?await this[_0x28e915(0x1bf)](_0x2b7487,_0x23bdef,_0x223eb7,_0x3bfd64,_0x399ac6):await this['createNoHistoryServiceFiels'](_0x2b7487,_0x23bdef,_0x223eb7,_0x3bfd64,_0x399ac6);}async['createHistoryServiceFiles'](_0x17b46c,_0x3ebfb7,_0x2f594c,_0x3558be,_0x1a63b3){const _0x3160ff=a0_0x270043;await this[_0x3160ff(0x195)](_0x17b46c+(_0x3ebfb7+'/index.ts'),serviceHistoryIndex,_0x1a63b3);let _0x390be8=this[_0x3160ff(0x1d0)](_0x2f594c,_0x3558be);await this[_0x3160ff(0x195)](_0x17b46c+(_0x3ebfb7+'/'+_0x3ebfb7+_0x3160ff(0x1b6)),_0x390be8,_0x1a63b3),await this[_0x3160ff(0x195)](_0x17b46c+(_0x3ebfb7+'/'+_0x3ebfb7+_0x3160ff(0x172)),serviceQuery,_0x1a63b3),await this[_0x3160ff(0x195)](_0x17b46c+(_0x3ebfb7+'/'+_0x3ebfb7+_0x3160ff(0x18c)),serviceMutation,_0x1a63b3);let _0x3b871b=this[_0x3160ff(0x1a8)](_0x3558be);await this[_0x3160ff(0x195)](_0x17b46c+(_0x3ebfb7+'/'+_0x3ebfb7+_0x3160ff(0x1d7)),_0x3b871b,_0x1a63b3);let _0x3e5dae=this[_0x3160ff(0x1e7)](_0x2f594c,_0x3558be);await this[_0x3160ff(0x195)](_0x17b46c+(_0x3ebfb7+'/'+_0x3ebfb7+'-history.ts'),_0x3e5dae,_0x1a63b3);let _0x14af71='';_0x3160ff(0x19d)==_0x2f594c[_0x3160ff(0x181)]?(_0x14af71=_0x3160ff(0x1bd),await this[_0x3160ff(0x195)](_0x17b46c+(_0x3ebfb7+_0x3160ff(0x187)),serviceEntitySubscriber,_0x1a63b3)):_0x14af71='';let _0x4bd1e6=serviceEntitySubscriber[_0x3160ff(0x16d)](/{{entityToJson}}/g,_0x14af71);await this[_0x3160ff(0x195)](_0x17b46c+(_0x3ebfb7+_0x3160ff(0x187)),_0x4bd1e6,_0x1a63b3),await this[_0x3160ff(0x195)](_0x17b46c+(_0x3ebfb7+'/'+_0x3ebfb7+_0x3160ff(0x1fb)),serviceHistoryQuery,_0x1a63b3),await this[_0x3160ff(0x195)](_0x17b46c+(_0x3ebfb7+'/'+_0x3ebfb7+_0x3160ff(0x1ee)),sereviceHistoryType,_0x1a63b3);let _0x5e47da=_0x17b46c+_0x3160ff(0x16e);0x0==await this['existsPath'](_0x5e47da)&&await this[_0x3160ff(0x195)](_0x5e47da,allIndex,_0x1a63b3);let _0x4ad75d=await fs[_0x3160ff(0x18d)](_0x5e47da,_0x3160ff(0x1e1));_0x4ad75d[_0x3160ff(0x170)](_0x3160ff(0x180)+_0x1a63b3[_0x3160ff(0x1c5)]+'/'+_0x1a63b3[_0x3160ff(0x1c5)]+_0x3160ff(0x1cb))<0x0&&(_0x4ad75d=_0x4ad75d['replace'](/\/\* EXPORT ENTITY TYPES \*\//,_0x3160ff(0x1d8)+_0x1a63b3[_0x3160ff(0x1c5)]+'/'+_0x1a63b3[_0x3160ff(0x1c5)]+'-history\x27')),_0x4ad75d['indexOf']('export\x20*\x20from\x20\x27./'+_0x1a63b3[_0x3160ff(0x1c5)]+'/'+_0x1a63b3[_0x3160ff(0x1c5)]+'\x27')<0x0&&(_0x4ad75d=_0x4ad75d[_0x3160ff(0x16d)](/\/\* EXPORT ENTITY TYPES \*\//,_0x3160ff(0x1d8)+_0x1a63b3[_0x3160ff(0x1c5)]+'/'+_0x1a63b3[_0x3160ff(0x1c5)]+'\x27')),_0x4ad75d[_0x3160ff(0x170)](_0x3160ff(0x1db)+_0x1a63b3['pascalCaseName']+'Entities,\x20resolvers\x20as\x20'+_0x1a63b3[_0x3160ff(0x1a4)]+_0x3160ff(0x1f2)+_0x1a63b3[_0x3160ff(0x1a4)]+_0x3160ff(0x1d2)+_0x1a63b3[_0x3160ff(0x1c5)]+'\x27')<0x0&&(_0x4ad75d=_0x4ad75d[_0x3160ff(0x16d)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x3160ff(0x1eb)+_0x1a63b3['pascalCaseName']+_0x3160ff(0x1ac)+_0x1a63b3[_0x3160ff(0x1a4)]+_0x3160ff(0x1f2)+_0x1a63b3['pascalCaseName']+_0x3160ff(0x1d2)+_0x1a63b3['name']+'\x27')),_0x4ad75d[_0x3160ff(0x170)]('...'+_0x1a63b3[_0x3160ff(0x1a4)]+_0x3160ff(0x1ab))<0x0&&(_0x4ad75d=_0x4ad75d['replace'](/\/\* ENTITIES \*\//,'/*\x20ENTITIES\x20*/\x0a\x09...'+_0x1a63b3[_0x3160ff(0x1a4)]+'Entities,')),_0x4ad75d[_0x3160ff(0x170)](_0x3160ff(0x1f0)+_0x1a63b3[_0x3160ff(0x1a4)]+'Resolvers,')<0x0&&(_0x4ad75d=_0x4ad75d[_0x3160ff(0x16d)](/\/\* RESOLVER CLASSES \*\//,_0x3160ff(0x18e)+_0x1a63b3[_0x3160ff(0x1a4)]+_0x3160ff(0x1d1))),_0x4ad75d[_0x3160ff(0x170)](_0x3160ff(0x1f0)+_0x1a63b3[_0x3160ff(0x1a4)]+_0x3160ff(0x1e6))<0x0&&(_0x4ad75d=_0x4ad75d['replace'](/\/\* SUBSCRIBERS \*\//,'/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...'+_0x1a63b3[_0x3160ff(0x1a4)]+_0x3160ff(0x1e6))),await this[_0x3160ff(0x195)](_0x5e47da,_0x4ad75d,_0x1a63b3);}async['createNoHistoryServiceFiels'](_0xfe77bd,_0x208174,_0x44ce1c,_0x138b10,_0x5304d8){const _0x2cf66a=a0_0x270043;await this[_0x2cf66a(0x195)](_0xfe77bd+(_0x208174+_0x2cf66a(0x16a)),serviceIndex,_0x5304d8),await this[_0x2cf66a(0x195)](_0xfe77bd+(_0x208174+'/'+_0x208174+_0x2cf66a(0x172)),serviceQuery,_0x5304d8),await this['writeFile'](_0xfe77bd+(_0x208174+'/'+_0x208174+'-mutation.ts'),serviceMutation,_0x5304d8);let _0x5ac41a=this[_0x2cf66a(0x1d0)](_0x44ce1c,_0x138b10);await this[_0x2cf66a(0x195)](_0xfe77bd+(_0x208174+'/'+_0x208174+_0x2cf66a(0x1b6)),_0x5ac41a,_0x5304d8);let _0x53687c=this[_0x2cf66a(0x1a8)](_0x138b10);await this[_0x2cf66a(0x195)](_0xfe77bd+(_0x208174+'/'+_0x208174+'-type.ts'),_0x53687c,_0x5304d8);let _0x124d7b=_0xfe77bd+'index.ts';0x0==await this[_0x2cf66a(0x17a)](_0x124d7b)&&await this[_0x2cf66a(0x195)](_0x124d7b,allIndex,_0x5304d8);let _0xa3cc62=await fs[_0x2cf66a(0x18d)](_0x124d7b,_0x2cf66a(0x1e1));_0xa3cc62[_0x2cf66a(0x170)](_0x2cf66a(0x180)+_0x5304d8['name']+'/'+_0x5304d8[_0x2cf66a(0x1c5)]+'\x27')<0x0&&(_0xa3cc62=_0xa3cc62[_0x2cf66a(0x16d)](/\/\* EXPORT ENTITY TYPES \*\//,'/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./'+_0x5304d8[_0x2cf66a(0x1c5)]+'/'+_0x5304d8[_0x2cf66a(0x1c5)]+'\x27')),_0xa3cc62['indexOf'](_0x2cf66a(0x1db)+_0x5304d8[_0x2cf66a(0x1a4)]+'Entities,\x20resolvers\x20as\x20'+_0x5304d8['pascalCaseName']+'Resolvers\x20}\x20from\x20\x27./'+_0x5304d8[_0x2cf66a(0x1c5)]+'\x27')<0x0&&(_0xa3cc62=_0xa3cc62['replace'](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x2cf66a(0x1eb)+_0x5304d8[_0x2cf66a(0x1a4)]+'Entities,\x20resolvers\x20as\x20'+_0x5304d8['pascalCaseName']+_0x2cf66a(0x1d3)+_0x5304d8[_0x2cf66a(0x1c5)]+'\x27')),_0xa3cc62[_0x2cf66a(0x170)](_0x2cf66a(0x1f0)+_0x5304d8[_0x2cf66a(0x1a4)]+_0x2cf66a(0x1ab))<0x0&&(_0xa3cc62=_0xa3cc62[_0x2cf66a(0x16d)](/\/\* ENTITIES \*\//,'/*\x20ENTITIES\x20*/\x0a\x09...'+_0x5304d8[_0x2cf66a(0x1a4)]+'Entities,')),_0xa3cc62[_0x2cf66a(0x170)](_0x2cf66a(0x1f0)+_0x5304d8[_0x2cf66a(0x1a4)]+_0x2cf66a(0x1d1))<0x0&&(_0xa3cc62=_0xa3cc62[_0x2cf66a(0x16d)](/\/\* RESOLVER CLASSES \*\//,_0x2cf66a(0x18e)+_0x5304d8[_0x2cf66a(0x1a4)]+'Resolvers,')),await this['writeFile'](_0x124d7b,_0xa3cc62,_0x5304d8);}[a0_0x270043(0x1a8)](_0x52266f){const _0x3b482d=a0_0x270043;let _0x5a9fed=sereviceType,_0x28fb62=_0x52266f['map'](_0x9546e=>{const _0x5c8361=a0_0x55cf;if('id'==_0x9546e['name'])return'';if(_0x5c8361(0x1d4)==_0x9546e[_0x5c8361(0x1c5)])return'';if(_0x5c8361(0x1b5)==_0x9546e[_0x5c8361(0x1c5)])return'';if(_0x5c8361(0x183)==_0x9546e['name'])return'';if(_0x5c8361(0x186)==_0x9546e['name'])return'';if(_0x5c8361(0x1a7)==_0x9546e['name'])return'';let _0x335392=this[_0x5c8361(0x1ea)](_0x9546e),_0x39cde0=this['getColTxtType'](_0x9546e),_0x64a7a2=camelCase(_0x9546e[_0x5c8361(0x1c5)]);return'\x20\x20'+(_0x5c8361(0x171)+(0x0==_0x335392[_0x5c8361(0x1e2)]?'':_0x5c8361(0x1c6)+_0x335392+',')+_0x5c8361(0x176)+_0x9546e[_0x5c8361(0x1a0)]+_0x5c8361(0x174))+_0x5c8361(0x192)+(''+_0x64a7a2+(_0x9546e[_0x5c8361(0x1a0)]?'?':'')+':\x20'+_0x39cde0)+'\x0a';});_0x5a9fed=_0x5a9fed[_0x3b482d(0x16d)](/{{newTypeColumns}}/g,_0x28fb62[_0x3b482d(0x1b3)]('\x0a'));let _0x217d66=_0x52266f[_0x3b482d(0x1f9)](_0x19cab1=>{const _0x236d63=_0x3b482d;if('id'==_0x19cab1[_0x236d63(0x1c5)])return'';if(_0x236d63(0x1d4)==_0x19cab1[_0x236d63(0x1c5)])return'';if('created_at'==_0x19cab1[_0x236d63(0x1c5)])return'';if(_0x236d63(0x183)==_0x19cab1['name'])return'';if('creator_id'==_0x19cab1['name'])return'';if(_0x236d63(0x1a7)==_0x19cab1['name'])return'';let _0x591ca6=this[_0x236d63(0x1ea)](_0x19cab1),_0x1cece5=this['getColTxtType'](_0x19cab1);_0x19cab1['nullable']=!0x0;let _0xacfd68=camelCase(_0x19cab1[_0x236d63(0x1c5)]);return'\x20\x20'+(_0x236d63(0x171)+(0x0==_0x591ca6[_0x236d63(0x1e2)]?'':_0x236d63(0x1c6)+_0x591ca6+',')+_0x236d63(0x176)+_0x19cab1[_0x236d63(0x1a0)]+_0x236d63(0x174))+'\x0a\x20\x20'+(''+_0xacfd68+(_0x19cab1[_0x236d63(0x1a0)]?'?':'')+':\x20'+_0x1cece5)+'\x0a';});return _0x5a9fed=_0x5a9fed[_0x3b482d(0x16d)](/{{patchTypeColumns}}/g,_0x217d66[_0x3b482d(0x1b3)]('\x0a')),_0x5a9fed;}['createEntityText'](_0x161588,_0x1aeb53){const _0x4b4660=a0_0x270043;let _0x39bd48=serviceEntity,_0x5de146=_0x1aeb53[_0x4b4660(0x1ce)](function(_0x5d87b3,_0x2906de){const _0xbc5ff7=_0x4b4660;return _0x5d87b3['rank']-_0x2906de[_0xbc5ff7(0x1a1)];})[_0x4b4660(0x1f9)](_0x1e2f52=>this[_0x4b4660(0x1b0)](_0x1e2f52));['COPY',_0x4b4660(0x19d)][_0x4b4660(0x17f)](_0x161588[_0x4b4660(0x181)])&&_0x5de146[_0x4b4660(0x1cf)](_0x4b4660(0x1f7)),_0x39bd48=_0x39bd48[_0x4b4660(0x16d)](/{{entityColumns}}/g,_0x5de146[_0x4b4660(0x1b3)]('\x0a'));let _0x493f38='',_0x510169=_0x1aeb53[_0x4b4660(0x1dc)](_0x1f906b=>_0x1f906b[_0x4b4660(0x197)]&&_0x1f906b[_0x4b4660(0x197)]>0x0)[_0x4b4660(0x1ce)](function(_0x4d3b07,_0x29e84c){const _0x11e239=_0x4b4660;return _0x4d3b07[_0x11e239(0x197)]-_0x29e84c[_0x11e239(0x197)];});if(_0x510169[_0x4b4660(0x1e2)]>0x0){_0x493f38=_0x4b4660(0x1a6);let _0x5f4c19=_0x510169[_0x4b4660(0x1f9)](_0x3eaade=>{const _0x5bf669=_0x4b4660;let _0x370d92=_0x3eaade[_0x5bf669(0x1c5)];return _0x5bf669(0x1d4)==_0x3eaade[_0x5bf669(0x1c5)]&&(_0x370d92='domain'),_0x5bf669(0x186)==_0x3eaade[_0x5bf669(0x1c5)]&&(_0x370d92=_0x5bf669(0x193)),_0x5bf669(0x1a7)==_0x3eaade[_0x5bf669(0x1c5)]&&(_0x370d92=_0x5bf669(0x18f)),_0x5bf669(0x19e)+camelCase(_0x370d92);});_0x493f38=_0x493f38['replace'](/{{indexColumns}}/g,_0x5f4c19[_0x4b4660(0x1b3)](','));}return _0x39bd48=_0x39bd48[_0x4b4660(0x16d)](/{{indexAnn}}/g,_0x493f38),_0x39bd48;}['createHistoryEntityText'](_0x35af5a,_0x266916){const _0x13d48a=a0_0x270043;let _0x214da8=_0x13d48a(0x19d)==_0x35af5a[_0x13d48a(0x181)]?serviceEntityHistJson:serviceEntityHistCopy,_0x3339c0=_0x266916[_0x13d48a(0x1ce)](function(_0x391fd1,_0x14ed26){const _0x31e638=_0x13d48a;return _0x391fd1['rank']-_0x14ed26[_0x31e638(0x1a1)];})[_0x13d48a(0x1f9)](_0x2d112b=>this[_0x13d48a(0x1b0)](_0x2d112b));return _0x214da8=_0x214da8[_0x13d48a(0x16d)](/{{entityColumns}}/g,_0x3339c0[_0x13d48a(0x1b3)]('\x0a')),_0x214da8;}['columnToEntityColumn'](_0x268ac5){const _0x166445=a0_0x270043;if('id'==_0x268ac5[_0x166445(0x1c5)])return'';if('domain_id'==_0x268ac5[_0x166445(0x1c5)])return'';if(_0x166445(0x1b5)==_0x268ac5[_0x166445(0x1c5)])return'';if(_0x166445(0x183)==_0x268ac5[_0x166445(0x1c5)])return'';if(_0x166445(0x186)==_0x268ac5[_0x166445(0x1c5)])return'';if(_0x166445(0x1a7)==_0x268ac5['name'])return'';let _0x4b7a93=_0x268ac5['colType'];_0x166445(0x1c7)==_0x268ac5[_0x166445(0x1f5)]&&(_0x4b7a93=_0x166445(0x1c1)),_0x166445(0x1de)==_0x268ac5[_0x166445(0x1f5)]&&(_0x4b7a93=_0x166445(0x1a3)),_0x166445(0x1da)==_0x268ac5[_0x166445(0x1f5)]&&(_0x4b7a93='character\x20varying'),_0x166445(0x1aa)==_0x268ac5[_0x166445(0x1f5)]&&(_0x4b7a93='timestamp\x20without\x20time\x20zone');let _0x29419b='';_0x166445(0x1da)==_0x268ac5[_0x166445(0x1f5)]&&(_0x29419b=_0x268ac5['colSize']);let _0x3b10f2=this[_0x166445(0x1ea)](_0x268ac5),_0x27228c=this[_0x166445(0x1be)](_0x268ac5),_0x3d2c52=camelCase(_0x268ac5[_0x166445(0x1c5)]);return'\x20\x20'+(_0x166445(0x1af)+_0x268ac5[_0x166445(0x1c5)]+_0x166445(0x1bb)+_0x4b7a93+'\x27,\x20nullable:\x20'+_0x268ac5['nullable']+'\x20'+(0x0==_0x29419b[_0x166445(0x1e2)]?'':_0x166445(0x1d6)+_0x29419b)+_0x166445(0x174))+_0x166445(0x192)+('@Field('+(0x0==_0x3b10f2[_0x166445(0x1e2)]?'':_0x166445(0x1c6)+_0x3b10f2+',')+'\x20{\x20nullable:\x20'+_0x268ac5[_0x166445(0x1a0)]+_0x166445(0x174))+'\x0a\x20\x20'+(''+_0x3d2c52+(_0x268ac5[_0x166445(0x1a0)]?'?':'')+':\x20'+_0x27228c)+'\x0a';}[a0_0x270043(0x1ea)](_0x400e50){const _0x23dbdb=a0_0x270043;let _0xb1b9c0='';return _0x23dbdb(0x1c7)==_0x400e50[_0x23dbdb(0x1f5)]&&(_0xb1b9c0=_0x23dbdb(0x1f6)),_0x23dbdb(0x1ca)==_0x400e50['colType']&&(_0xb1b9c0='Float'),_0x23dbdb(0x1de)==_0x400e50[_0x23dbdb(0x1f5)]&&(_0xb1b9c0=_0x23dbdb(0x1ec)),'integer'==_0x400e50['colType']&&(_0xb1b9c0=_0x23dbdb(0x1ec)),_0xb1b9c0;}[a0_0x270043(0x1be)](_0x276724){const _0x23696=a0_0x270043;let _0x1e449a=_0x276724[_0x23696(0x1f5)];return _0x23696(0x194)==_0x276724[_0x23696(0x1f5)]&&(_0x1e449a=_0x23696(0x1c3)),_0x23696(0x1c7)==_0x276724['colType']&&(_0x1e449a=_0x23696(0x1c3)),'float'==_0x276724[_0x23696(0x1f5)]&&(_0x1e449a='number'),_0x23696(0x190)==_0x276724['colType']&&(_0x1e449a=_0x23696(0x1c3)),_0x23696(0x1de)==_0x276724['colType']&&(_0x1e449a='number'),_0x23696(0x1aa)==_0x276724[_0x23696(0x1f5)]&&(_0x1e449a=_0x23696(0x1fc)),'date'==_0x276724['colType']&&(_0x1e449a='Date'),_0x23696(0x1a2)==_0x276724['colType']&&(_0x1e449a=_0x23696(0x1da)),_0x1e449a;}async[a0_0x270043(0x195)](_0x87223f,_0xbe4295,_0x432074){const _0x3acfde=a0_0x270043;await fs[_0x3acfde(0x1e8)](_0x87223f,this[_0x3acfde(0x182)](_0xbe4295,_0x432074),_0x3acfde(0x1e1));}[a0_0x270043(0x182)](_0x58e1ef,_0x5e68ed){const _0x16d253=a0_0x270043;return _0x58e1ef[_0x16d253(0x16d)](/{{pascalCase name}}/g,_0x5e68ed['pascalCaseName'])[_0x16d253(0x16d)](/{{camelCase name}}/g,_0x5e68ed[_0x16d253(0x1ef)])[_0x16d253(0x16d)](/{{snakeCase name}}/g,_0x5e68ed['snakeCaseName'])[_0x16d253(0x16d)](/{{pluralPascalCase name}}/g,_0x5e68ed[_0x16d253(0x196)])['replace'](/{{pluralCamelCase name}}/g,_0x5e68ed[_0x16d253(0x1c8)])[_0x16d253(0x16d)](/{{tableName}}/g,_0x5e68ed[_0x16d253(0x1ed)])[_0x16d253(0x16d)](/{{name}}/g,_0x5e68ed[_0x16d253(0x1c5)]);}async[a0_0x270043(0x177)](_0x1a9c47,_0x4de087,_0x12f98c){const _0x3ec22b=a0_0x270043;let _0x1f8620=_0x1a9c47+_0x3ec22b(0x1d9);await this['createDir'](_0x1f8620),_0x1f8620=_0x1f8620+'/'+_0x4de087,await this[_0x3ec22b(0x1ba)](_0x1f8620),_0x1f8620+='/server',await this['createDir'](_0x1f8620),_0x1f8620+=_0x3ec22b(0x17e),await this[_0x3ec22b(0x1ba)](_0x1f8620),_0x1f8620=_0x1f8620+'/'+_0x12f98c,await this[_0x3ec22b(0x1ba)](_0x1f8620);}[a0_0x270043(0x1fe)](){const _0x54b4da=a0_0x270043;let _0x1e971d=process[_0x54b4da(0x1b1)][_0x54b4da(0x1b7)][_0x54b4da(0x19f)]('/'),_0x4ef2fd=[];for(let _0x5983af=0x0;_0x5983af<_0x1e971d[_0x54b4da(0x1e2)]&&_0x54b4da(0x1a5)!=_0x1e971d[_0x5983af];_0x5983af++)_0x4ef2fd[_0x54b4da(0x1cf)](_0x1e971d[_0x5983af]);return _0x4ef2fd[_0x54b4da(0x1b3)]('/');}async[a0_0x270043(0x1ba)](_0x17bcad){const _0x5806e8=a0_0x270043;0x0==await this[_0x5806e8(0x17a)](_0x17bcad)&&fs[_0x5806e8(0x17d)](_0x17bcad);}async[a0_0x270043(0x17a)](_0x5e206d){return await fs['existsSync'](_0x5e206d);}};tslib_1[a0_0x270043(0x185)]([(0x0,type_graphql_1['Query'])(_0x32bf1f=>Boolean,{'description':a0_0x270043(0x1a9)}),tslib_1[a0_0x270043(0x16f)](0x0,(0x0,type_graphql_1['Arg'])('id')),tslib_1[a0_0x270043(0x16f)](0x1,(0x0,type_graphql_1['Ctx'])()),tslib_1[a0_0x270043(0x1e5)](a0_0x270043(0x1fa),Function),tslib_1[a0_0x270043(0x1e5)](a0_0x270043(0x1f3),[String,Object]),tslib_1[a0_0x270043(0x1e5)](a0_0x270043(0x1e4),Promise)],OperatoToolCreateService[a0_0x270043(0x17c)],a0_0x270043(0x189),null),OperatoToolCreateService=tslib_1[a0_0x270043(0x185)]([(0x0,type_graphql_1[a0_0x270043(0x1d5)])()],OperatoToolCreateService),exports['OperatoToolCreateService']=OperatoToolCreateService;const allIndex=a0_0x270043(0x1f4),serviceIndex=a0_0x270043(0x16c),serviceHistoryIndex=a0_0x270043(0x175),serviceQuery=a0_0x270043(0x18a),serviceHistoryQuery=a0_0x270043(0x179),serviceMutation='\x0aimport\x20{\x20Resolver,\x20Mutation,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20In\x20}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20New{{pascalCase\x20name}},\x20{{pascalCase\x20name}}Patch\x20}\x20from\x20\x27./{{name}}-type\x27\x0aimport\x20{\x20getRepository\x20}\x20from\x20\x27@things-factory/shell\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Mutation\x20{\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20create\x20new\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20create{{pascalCase\x20name}}(@Arg(\x27{{camelCase\x20name}}\x27)\x20{{camelCase\x20name}}:\x20New{{pascalCase\x20name}},\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20return\x20await\x20tx.getRepository({{pascalCase\x20name}}).save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20modify\x20{{pascalCase\x20name}}\x20information\x27\x20})\x0a\x20\x20async\x20update{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27id\x27)\x20id:\x20string,\x0a\x20\x20\x20\x20@Arg(\x27patch\x27)\x20patch:\x20{{pascalCase\x20name}}Patch,\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20repository\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20repository.findOne(\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20)\x0a\x0a\x20\x20\x20\x20return\x20await\x20repository.save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20...patch,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20[{{pascalCase\x20name}}],\x20{\x20description:\x20\x22To\x20modify\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20information\x22\x20})\x0a\x20\x20async\x20updateMultiple{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27patches\x27,\x20type\x20=>\x20[{{pascalCase\x20name}}Patch])\x20patches:\x20{{pascalCase\x20name}}Patch[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}[]>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20results\x20=\x20[]\x0a\x20\x20\x20\x20const\x20_createRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27+\x27)\x0a\x20\x20\x20\x20const\x20_updateRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27M\x27)\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}Repo\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x0a\x20\x20\x20\x20if\x20(_createRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_createRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20newRecord\x20=\x20_createRecords[i]\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...newRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27+\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20if\x20(_updateRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_updateRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20updRecord\x20=\x20_updateRecords[i]\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20{{camelCase\x20name}}Repo.findOne({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id:updRecord.id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...updRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27M\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20return\x20results\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20delete{{pascalCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove({\x20domain,\x20id,\x20updater:user\x20})\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20multiple\x20{{camelCase\x20name}}s\x27\x20})\x0a\x20\x20async\x20delete{{pluralPascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27ids\x27,\x20type\x20=>\x20[String])\x20ids:\x20string[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20delEntitis\x20=\x20ids.map(id=>{\x0a\x20\x20\x20\x20\x20\x20return\x20{domain,id,updater:user}\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove(delEntitis)\x0a\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a}\x0a',sereviceType=a0_0x270043(0x1e3),sereviceHistoryType=a0_0x270043(0x1cd),serviceEntity=a0_0x270043(0x1bc),serviceEntityHistCopy=a0_0x270043(0x184),serviceEntityHistJson='\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a\x20\x20@Column(\x27simple-json\x27,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20@Field(type\x20=>\x20ScalarObject,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20historyJson?:\x20any\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a',serviceEntitySubscriber=a0_0x270043(0x1ad);
@@ -1 +1 @@
1
- 'use strict';function a0_0x56c1(_0x56abef,_0x3d2e17){const _0x32c72e=a0_0x32c7();return a0_0x56c1=function(_0x56c179,_0x2b6d49){_0x56c179=_0x56c179-0xe6;let _0x3ae0f2=_0x32c72e[_0x56c179];return _0x3ae0f2;},a0_0x56c1(_0x56abef,_0x3d2e17);}const a0_0x16af74=a0_0x56c1;(function(_0x302f70,_0x212f1d){const _0x4ca2c2=a0_0x56c1,_0x5cbe6e=_0x302f70();while(!![]){try{const _0x5264ad=-parseInt(_0x4ca2c2(0xf2))/0x1*(parseInt(_0x4ca2c2(0x10b))/0x2)+parseInt(_0x4ca2c2(0x101))/0x3*(-parseInt(_0x4ca2c2(0xe9))/0x4)+parseInt(_0x4ca2c2(0xed))/0x5*(parseInt(_0x4ca2c2(0xfc))/0x6)+-parseInt(_0x4ca2c2(0xf7))/0x7*(parseInt(_0x4ca2c2(0x106))/0x8)+parseInt(_0x4ca2c2(0x10d))/0x9*(parseInt(_0x4ca2c2(0x10a))/0xa)+parseInt(_0x4ca2c2(0x100))/0xb+parseInt(_0x4ca2c2(0xf0))/0xc;if(_0x5264ad===_0x212f1d)break;else _0x5cbe6e['push'](_0x5cbe6e['shift']());}catch(_0x2f400a){_0x5cbe6e['push'](_0x5cbe6e['shift']());}}}(a0_0x32c7,0x29357));Object[a0_0x16af74(0xfd)](exports,a0_0x16af74(0xf5),{'value':!0x0}),exports[a0_0x16af74(0x107)]=exports[a0_0x16af74(0xfe)]=void 0x0;const operato_license_checker_1=require(a0_0x16af74(0xee)),shell_1=require('@things-factory/shell'),menu_base_1=require(a0_0x16af74(0xff)),license_error_1=require(a0_0x16af74(0x10e));async function checkStudioPermission(){const _0x225a26=a0_0x16af74;let _0x9c21a4=((0x0,operato_license_checker_1['getPermission'])(_0x225a26(0xe6))||',')['split'](',')[_0x225a26(0xf4)](_0x2f1ec6=>_0x2f1ec6[_0x225a26(0xef)]()),_0x16a944=!0x1;return _0x9c21a4[_0x225a26(0xf8)](_0x2f3d23=>{const _0x185dba=_0x225a26;_0x2f3d23[_0x185dba(0xf1)](_0x185dba(0x108))&&(_0x16a944=!0x0);}),_0x16a944;}async function checkStudioTemplateIsOverLimit(_0xfe55d7,_0x111dee){const _0x58135e=a0_0x16af74;if(0x0==await checkStudioPermission())throw new license_error_1[(_0x58135e(0x104))]({'errorCode':_0x111dee['t'](license_error_1[_0x58135e(0x104)][_0x58135e(0x103)][_0x58135e(0x102)])});var _0x289266=0x0;if(_0x289266=_0xfe55d7&&''!=_0xfe55d7?await(0x0,shell_1[_0x58135e(0xe7)])(menu_base_1[_0x58135e(0xe8)])['manager']['createQueryBuilder']()[_0x58135e(0xfb)](_0x58135e(0x109))['from'](menu_base_1[_0x58135e(0xe8)],_0x58135e(0x109))[_0x58135e(0xeb)](_0x58135e(0xf3),{'id':_0xfe55d7})[_0x58135e(0xea)](_0x58135e(0xec))[_0x58135e(0xf9)]()+0x1:await(0x0,shell_1['getRepository'])(menu_base_1[_0x58135e(0xe8)])[_0x58135e(0x10c)]['createQueryBuilder']()[_0x58135e(0xfb)](_0x58135e(0x109))[_0x58135e(0xf6)](menu_base_1[_0x58135e(0xe8)],_0x58135e(0x109))[_0x58135e(0xeb)](_0x58135e(0xec))['getCount']()+0x1,!(0x0,operato_license_checker_1[_0x58135e(0xfa)])(_0x289266))throw new license_error_1['LicenseError']({'errorCode':_0x111dee['t'](license_error_1[_0x58135e(0x104)][_0x58135e(0x103)][_0x58135e(0x105)])});return!0x0;}function a0_0x32c7(){const _0x49b022=['6lEpRyk','defineProperty','checkStudioPermission','@things-factory/menu-base','1088923iEClaP','25008tUvuTz','INVALID_LICENSE','ERROR_CODES','LicenseError','OVER_LIMIT','842216CuXBtn','checkStudioTemplateIsOverLimit','Studio','menu','510GXdsaV','288188omMKvd','manager','45xbmygl','../../errors/license-error','Permissions\x20For\x20Tailor\x20Tool','getRepository','Menu','52hQFygA','andWhere','where','(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)','1173365aNsDeN','@things-factory/operato-license-checker','trim','2311308KlQrzG','includes','1srOFOk','id\x20!=\x20:id','map','__esModule','from','7AyJGUp','forEach','getCount','checkTarget','select'];a0_0x32c7=function(){return _0x49b022;};return a0_0x32c7();}exports['checkStudioPermission']=checkStudioPermission,exports[a0_0x16af74(0x107)]=checkStudioTemplateIsOverLimit;
1
+ 'use strict';function a0_0x2594(_0x62fc52,_0x4e150e){const _0x583d36=a0_0x583d();return a0_0x2594=function(_0x259443,_0x56f391){_0x259443=_0x259443-0x8e;let _0x5dc8ca=_0x583d36[_0x259443];return _0x5dc8ca;},a0_0x2594(_0x62fc52,_0x4e150e);}const a0_0x5d8587=a0_0x2594;(function(_0x80d244,_0x2230f1){const _0x1d2187=a0_0x2594,_0x31e82f=_0x80d244();while(!![]){try{const _0x1514eb=-parseInt(_0x1d2187(0x97))/0x1*(parseInt(_0x1d2187(0x90))/0x2)+-parseInt(_0x1d2187(0x91))/0x3*(-parseInt(_0x1d2187(0xa9))/0x4)+parseInt(_0x1d2187(0x95))/0x5+-parseInt(_0x1d2187(0x98))/0x6*(parseInt(_0x1d2187(0xa6))/0x7)+parseInt(_0x1d2187(0xae))/0x8+parseInt(_0x1d2187(0x99))/0x9+-parseInt(_0x1d2187(0xa1))/0xa*(parseInt(_0x1d2187(0xa8))/0xb);if(_0x1514eb===_0x2230f1)break;else _0x31e82f['push'](_0x31e82f['shift']());}catch(_0x56e0f3){_0x31e82f['push'](_0x31e82f['shift']());}}}(a0_0x583d,0xe83d1));Object['defineProperty'](exports,a0_0x5d8587(0xa3),{'value':!0x0}),exports[a0_0x5d8587(0xa4)]=exports[a0_0x5d8587(0x8e)]=void 0x0;function a0_0x583d(){const _0x378bf8=['10410408VbTwIb','includes','(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)','andWhere','@things-factory/operato-license-checker','ERROR_CODES','getRepository','Menu','10FCqccA','trim','__esModule','checkStudioTemplateIsOverLimit','LicenseError','7SOGUAc','split','19080424vCOKMg','5443700olbTaZ','checkTarget','from','menu','@things-factory/shell','7973248fEVlNo','INVALID_LICENSE','getCount','OVER_LIMIT','Studio','select','../../errors/license-error','manager','checkStudioPermission','forEach','62UbzPew','3HEmuyy','where','createQueryBuilder','id\x20!=\x20:id','3152900YiIivC','@things-factory/menu-base','30379xzRExD','3103746cYoQcA'];a0_0x583d=function(){return _0x378bf8;};return a0_0x583d();}const operato_license_checker_1=require(a0_0x5d8587(0x9d)),shell_1=require(a0_0x5d8587(0xad)),menu_base_1=require(a0_0x5d8587(0x96)),license_error_1=require(a0_0x5d8587(0xb4));async function checkStudioPermission(){const _0x321e91=a0_0x5d8587;let _0x334595=((0x0,operato_license_checker_1['getPermission'])('Permissions\x20For\x20Tailor\x20Tool')||',')[_0x321e91(0xa7)](',')['map'](_0x43683b=>_0x43683b[_0x321e91(0xa2)]()),_0xa1e298=!0x1;return _0x334595[_0x321e91(0x8f)](_0x3aefb4=>{const _0x21bcdf=_0x321e91;_0x3aefb4[_0x21bcdf(0x9a)](_0x21bcdf(0xb2))&&(_0xa1e298=!0x0);}),_0xa1e298;}async function checkStudioTemplateIsOverLimit(_0x4e140e,_0x468b0c){const _0x3ab93a=a0_0x5d8587;if(0x0==await checkStudioPermission())throw new license_error_1['LicenseError']({'errorCode':_0x468b0c['t'](license_error_1['LicenseError'][_0x3ab93a(0x9e)][_0x3ab93a(0xaf)])});var _0x1052fc=0x0;if(_0x1052fc=_0x4e140e&&''!=_0x4e140e?await(0x0,shell_1['getRepository'])(menu_base_1[_0x3ab93a(0xa0)])[_0x3ab93a(0xb5)][_0x3ab93a(0x93)]()['select'](_0x3ab93a(0xac))[_0x3ab93a(0xab)](menu_base_1[_0x3ab93a(0xa0)],_0x3ab93a(0xac))[_0x3ab93a(0x92)](_0x3ab93a(0x94),{'id':_0x4e140e})[_0x3ab93a(0x9c)](_0x3ab93a(0x9b))[_0x3ab93a(0xb0)]()+0x1:await(0x0,shell_1[_0x3ab93a(0x9f)])(menu_base_1[_0x3ab93a(0xa0)])[_0x3ab93a(0xb5)][_0x3ab93a(0x93)]()[_0x3ab93a(0xb3)](_0x3ab93a(0xac))['from'](menu_base_1[_0x3ab93a(0xa0)],'menu')['where'](_0x3ab93a(0x9b))[_0x3ab93a(0xb0)]()+0x1,!(0x0,operato_license_checker_1[_0x3ab93a(0xaa)])(_0x1052fc))throw new license_error_1[(_0x3ab93a(0xa5))]({'errorCode':_0x468b0c['t'](license_error_1['LicenseError'][_0x3ab93a(0x9e)][_0x3ab93a(0xb1)])});return!0x0;}exports[a0_0x5d8587(0x8e)]=checkStudioPermission,exports[a0_0x5d8587(0xa4)]=checkStudioTemplateIsOverLimit;
@@ -1 +1 @@
1
- 'use strict';function a0_0xbfd8(){const _0x46b089=['Operato\x20Tool\x20Studio\x20Usage\x20Permissions','__param','design:type','defineProperty','checkStudioTemplateIsOverLimit','__metadata','OperatoToolResolver','60592vpnSCC','Query','5911829OxQntD','design:paramtypes','Operato\x20Tool\x20Studio\x20Limit\x20check','Resolver','1LhySBC','__esModule','6uXBCte','2892537RLwSwp','639819dqxqjY','./tool-permission','1204974jucfJO','studioTemplateIsOverLimit','prototype','tslib','Ctx','__decorate','design:returntype','852815XIffVF','studioPermission','397176DtFVKJ','Arg'];a0_0xbfd8=function(){return _0x46b089;};return a0_0xbfd8();}const a0_0xd741bd=a0_0x27e3;(function(_0x3c7541,_0x2b039f){const _0x1db7cd=a0_0x27e3,_0x1e8508=_0x3c7541();while(!![]){try{const _0x338975=-parseInt(_0x1db7cd(0x1fb))/0x1*(-parseInt(_0x1db7cd(0x201))/0x2)+parseInt(_0x1db7cd(0x1ff))/0x3+parseInt(_0x1db7cd(0x1f5))/0x4+parseInt(_0x1db7cd(0x1ea))/0x5+parseInt(_0x1db7cd(0x1fd))/0x6*(-parseInt(_0x1db7cd(0x1f7))/0x7)+-parseInt(_0x1db7cd(0x1ec))/0x8+parseInt(_0x1db7cd(0x1fe))/0x9;if(_0x338975===_0x2b039f)break;else _0x1e8508['push'](_0x1e8508['shift']());}catch(_0x269332){_0x1e8508['push'](_0x1e8508['shift']());}}}(a0_0xbfd8,0x68a7e));function a0_0x27e3(_0xb2e3b9,_0x195023){const _0xbfd880=a0_0xbfd8();return a0_0x27e3=function(_0x27e3d3,_0x57728c){_0x27e3d3=_0x27e3d3-0x1e8;let _0xd7bab4=_0xbfd880[_0x27e3d3];return _0xd7bab4;},a0_0x27e3(_0xb2e3b9,_0x195023);}Object[a0_0xd741bd(0x1f1)](exports,a0_0xd741bd(0x1fc),{'value':!0x0}),exports[a0_0xd741bd(0x1f4)]=void 0x0;const tslib_1=require(a0_0xd741bd(0x204)),type_graphql_1=require('type-graphql'),tool_permission_1=require(a0_0xd741bd(0x200));let OperatoToolResolver=class{async[a0_0xd741bd(0x1eb)](_0x2c921){return(0x0,tool_permission_1['checkStudioPermission'])();}async[a0_0xd741bd(0x202)](_0x1869c0,_0x2d0459){const _0x259be8=a0_0xd741bd;return(0x0,tool_permission_1[_0x259be8(0x1f2)])(_0x1869c0,_0x2d0459);}};tslib_1[a0_0xd741bd(0x1e8)]([(0x0,type_graphql_1[a0_0xd741bd(0x1f6)])(_0x3baa10=>Boolean,{'description':a0_0xd741bd(0x1ee)}),tslib_1[a0_0xd741bd(0x1ef)](0x0,(0x0,type_graphql_1[a0_0xd741bd(0x205)])()),tslib_1['__metadata'](a0_0xd741bd(0x1f0),Function),tslib_1[a0_0xd741bd(0x1f3)](a0_0xd741bd(0x1f8),[Object]),tslib_1[a0_0xd741bd(0x1f3)](a0_0xd741bd(0x1e9),Promise)],OperatoToolResolver[a0_0xd741bd(0x203)],'studioPermission',null),tslib_1['__decorate']([(0x0,type_graphql_1[a0_0xd741bd(0x1f6)])(_0x27b003=>Boolean,{'description':a0_0xd741bd(0x1f9)}),tslib_1[a0_0xd741bd(0x1ef)](0x0,(0x0,type_graphql_1[a0_0xd741bd(0x1ed)])('id')),tslib_1[a0_0xd741bd(0x1ef)](0x1,(0x0,type_graphql_1[a0_0xd741bd(0x205)])()),tslib_1[a0_0xd741bd(0x1f3)](a0_0xd741bd(0x1f0),Function),tslib_1['__metadata'](a0_0xd741bd(0x1f8),[String,Object]),tslib_1[a0_0xd741bd(0x1f3)](a0_0xd741bd(0x1e9),Promise)],OperatoToolResolver['prototype'],'studioTemplateIsOverLimit',null),OperatoToolResolver=tslib_1[a0_0xd741bd(0x1e8)]([(0x0,type_graphql_1[a0_0xd741bd(0x1fa)])()],OperatoToolResolver),exports[a0_0xd741bd(0x1f4)]=OperatoToolResolver;
1
+ 'use strict';const a0_0x5eae24=a0_0x2bbf;function a0_0x2bbf(_0x580af9,_0x26b732){const _0x1b4fbc=a0_0x1b4f();return a0_0x2bbf=function(_0x2bbfa9,_0x3dd455){_0x2bbfa9=_0x2bbfa9-0x7a;let _0x2ecacb=_0x1b4fbc[_0x2bbfa9];return _0x2ecacb;},a0_0x2bbf(_0x580af9,_0x26b732);}(function(_0x3bcebe,_0x30859c){const _0x195c65=a0_0x2bbf,_0x202ad5=_0x3bcebe();while(!![]){try{const _0x2b8baa=-parseInt(_0x195c65(0x87))/0x1*(-parseInt(_0x195c65(0x8c))/0x2)+parseInt(_0x195c65(0x84))/0x3*(parseInt(_0x195c65(0x81))/0x4)+parseInt(_0x195c65(0x94))/0x5*(-parseInt(_0x195c65(0x7c))/0x6)+-parseInt(_0x195c65(0x82))/0x7+parseInt(_0x195c65(0x90))/0x8+parseInt(_0x195c65(0x91))/0x9*(parseInt(_0x195c65(0x8f))/0xa)+parseInt(_0x195c65(0x98))/0xb*(-parseInt(_0x195c65(0x92))/0xc);if(_0x2b8baa===_0x30859c)break;else _0x202ad5['push'](_0x202ad5['shift']());}catch(_0x561c8a){_0x202ad5['push'](_0x202ad5['shift']());}}}(a0_0x1b4f,0xa40a4));Object[a0_0x5eae24(0x89)](exports,a0_0x5eae24(0x93),{'value':!0x0}),exports[a0_0x5eae24(0x7b)]=void 0x0;const tslib_1=require('tslib'),type_graphql_1=require(a0_0x5eae24(0x7f)),tool_permission_1=require(a0_0x5eae24(0x99));let OperatoToolResolver=class{async[a0_0x5eae24(0x86)](_0x3a8e89){return(0x0,tool_permission_1['checkStudioPermission'])();}async[a0_0x5eae24(0x85)](_0xb0eec6,_0x161898){const _0x35d906=a0_0x5eae24;return(0x0,tool_permission_1[_0x35d906(0x96)])(_0xb0eec6,_0x161898);}};tslib_1[a0_0x5eae24(0x7d)]([(0x0,type_graphql_1[a0_0x5eae24(0x8e)])(_0x154b8f=>Boolean,{'description':a0_0x5eae24(0x7a)}),tslib_1[a0_0x5eae24(0x88)](0x0,(0x0,type_graphql_1[a0_0x5eae24(0x97)])()),tslib_1['__metadata'](a0_0x5eae24(0x83),Function),tslib_1[a0_0x5eae24(0x95)](a0_0x5eae24(0x80),[Object]),tslib_1[a0_0x5eae24(0x95)](a0_0x5eae24(0x7e),Promise)],OperatoToolResolver[a0_0x5eae24(0x8b)],a0_0x5eae24(0x86),null),tslib_1[a0_0x5eae24(0x7d)]([(0x0,type_graphql_1[a0_0x5eae24(0x8e)])(_0x3634f4=>Boolean,{'description':a0_0x5eae24(0x8a)}),tslib_1['__param'](0x0,(0x0,type_graphql_1[a0_0x5eae24(0x8d)])('id')),tslib_1['__param'](0x1,(0x0,type_graphql_1[a0_0x5eae24(0x97)])()),tslib_1[a0_0x5eae24(0x95)](a0_0x5eae24(0x83),Function),tslib_1['__metadata']('design:paramtypes',[String,Object]),tslib_1[a0_0x5eae24(0x95)](a0_0x5eae24(0x7e),Promise)],OperatoToolResolver[a0_0x5eae24(0x8b)],'studioTemplateIsOverLimit',null),OperatoToolResolver=tslib_1[a0_0x5eae24(0x7d)]([(0x0,type_graphql_1['Resolver'])()],OperatoToolResolver),exports['OperatoToolResolver']=OperatoToolResolver;function a0_0x1b4f(){const _0x5a3760=['48Viyjhc','7396655wtkHfN','design:type','264324snMDFW','studioTemplateIsOverLimit','studioPermission','2qVRQRb','__param','defineProperty','Operato\x20Tool\x20Studio\x20Limit\x20check','prototype','1106506UjZuqt','Arg','Query','1810aXuNGf','5275784NyLuSk','36261lsJSby','6174624aEMZQd','__esModule','65Kaslry','__metadata','checkStudioTemplateIsOverLimit','Ctx','11plhbJJ','./tool-permission','Operato\x20Tool\x20Studio\x20Usage\x20Permissions','OperatoToolResolver','604338rBtWof','__decorate','design:returntype','type-graphql','design:paramtypes'];a0_0x1b4f=function(){return _0x5a3760;};return a0_0x1b4f();}