@things-factory/operato-tools 6.0.133 → 6.0.135

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_0x1c39df=a0_0x537c;(function(_0x58aebb,_0xac59){const _0x480afd=a0_0x537c,_0x14208c=_0x58aebb();while(!![]){try{const _0x42f97d=parseInt(_0x480afd(0x15b))/0x1*(parseInt(_0x480afd(0x15a))/0x2)+-parseInt(_0x480afd(0x15c))/0x3+parseInt(_0x480afd(0x165))/0x4*(-parseInt(_0x480afd(0x156))/0x5)+parseInt(_0x480afd(0x157))/0x6*(-parseInt(_0x480afd(0x160))/0x7)+-parseInt(_0x480afd(0x161))/0x8*(parseInt(_0x480afd(0x159))/0x9)+-parseInt(_0x480afd(0x15d))/0xa+parseInt(_0x480afd(0x153))/0xb*(parseInt(_0x480afd(0x154))/0xc);if(_0x42f97d===_0xac59)break;else _0x14208c['push'](_0x14208c['shift']());}catch(_0x2bd75c){_0x14208c['push'](_0x14208c['shift']());}}}(a0_0x3737,0x80633));Object['defineProperty'](exports,'__esModule',{'value':!0x0}),exports[a0_0x1c39df(0x15f)]=void 0x0;const tslib_1=require('tslib'),ERROR_CODES=tslib_1[a0_0x1c39df(0x155)](require('../constants/error-code'));class LicenseError extends Error{static get['ERROR_CODES'](){const _0x541d46=a0_0x1c39df;return Object[_0x541d46(0x158)]({},ERROR_CODES);}constructor({errorCode:_0x323a1a,detail:_0x476663}){const _0x2532b9=a0_0x1c39df;super(_0x323a1a),this[_0x2532b9(0x164)]=_0x2532b9(0x163),this[_0x2532b9(0x15e)]=_0x323a1a,this[_0x2532b9(0x162)]=_0x476663;}}exports[a0_0x1c39df(0x15f)]=LicenseError;function a0_0x537c(_0x368113,_0x2c3ff2){const _0x37371d=a0_0x3737();return a0_0x537c=function(_0x537c6e,_0xf93a43){_0x537c6e=_0x537c6e-0x153;let _0x59c6a9=_0x37371d[_0x537c6e];return _0x59c6a9;},a0_0x537c(_0x368113,_0x2c3ff2);}function a0_0x3737(){const _0x53566e=['name','123864vtAHsQ','11lyqPJk','27265908DQtmwW','__importStar','10NcJMNB','60XHFsPv','assign','159174wEvTRf','1407722KSyonu','1CVmBXF','2310726dlUzqZ','9199530HcBaIj','errorCode','LicenseError','265769pWdvfb','144FZLDKQ','detail','license-error'];a0_0x3737=function(){return _0x53566e;};return a0_0x3737();}
1
+ 'use strict';const a0_0x3f4340=a0_0x6aa3;function a0_0x6aa3(_0x148d83,_0x416b0b){const _0x21d8ba=a0_0x21d8();return a0_0x6aa3=function(_0x6aa3e9,_0x2dcde4){_0x6aa3e9=_0x6aa3e9-0x105;let _0x4eb9cd=_0x21d8ba[_0x6aa3e9];return _0x4eb9cd;},a0_0x6aa3(_0x148d83,_0x416b0b);}(function(_0x234370,_0x26f8f7){const _0x25bd7b=a0_0x6aa3,_0x56f070=_0x234370();while(!![]){try{const _0x4e00e8=-parseInt(_0x25bd7b(0x111))/0x1*(parseInt(_0x25bd7b(0x109))/0x2)+parseInt(_0x25bd7b(0x108))/0x3+parseInt(_0x25bd7b(0x10f))/0x4+-parseInt(_0x25bd7b(0x105))/0x5+parseInt(_0x25bd7b(0x110))/0x6*(-parseInt(_0x25bd7b(0x112))/0x7)+-parseInt(_0x25bd7b(0x10c))/0x8*(parseInt(_0x25bd7b(0x107))/0x9)+parseInt(_0x25bd7b(0x10d))/0xa;if(_0x4e00e8===_0x26f8f7)break;else _0x56f070['push'](_0x56f070['shift']());}catch(_0x3c6d70){_0x56f070['push'](_0x56f070['shift']());}}}(a0_0x21d8,0xea267));function a0_0x21d8(){const _0x4de849=['LicenseError','__esModule','23416cJwtsv','39645180uXQIjr','license-error','2024892OvcOPD','18162LQGuZh','2QEvede','1799zuVCrm','../constants/error-code','defineProperty','name','7601470FspKlS','__importStar','4221NoeyfA','3178836jRsQft','900278xDJNyr'];a0_0x21d8=function(){return _0x4de849;};return a0_0x21d8();}Object[a0_0x3f4340(0x114)](exports,a0_0x3f4340(0x10b),{'value':!0x0}),exports[a0_0x3f4340(0x10a)]=void 0x0;const tslib_1=require('tslib'),ERROR_CODES=tslib_1[a0_0x3f4340(0x106)](require(a0_0x3f4340(0x113)));class LicenseError extends Error{static get['ERROR_CODES'](){return Object['assign']({},ERROR_CODES);}constructor({errorCode:_0x4dfc8d,detail:_0x292793}){const _0x818108=a0_0x3f4340;super(_0x4dfc8d),this[_0x818108(0x115)]=_0x818108(0x10e),this['errorCode']=_0x4dfc8d,this['detail']=_0x292793;}}exports[a0_0x3f4340(0x10a)]=LicenseError;
package/server/routes.js CHANGED
@@ -1 +1 @@
1
- function a0_0x1aea(){const _0x584b30=['961913zWZjXf','4703433QkDCts','debug','39396SZjBgn','bootstrap-module-domain-private-route','1476808lbcFjP','6StYCKV','bootstrap-module-domain-public-route','bootstrap-module-global-public-route','9935262atLFjB','2dNzxXt','5058890qMDBqx','bootstrap-module-global-private-route','things-factory:operato-tools:routes','13605724FzoLJq','10TToDlh','272CAaSHH'];a0_0x1aea=function(){return _0x584b30;};return a0_0x1aea();}const a0_0x4bda7f=a0_0x57a3;(function(_0xfd372e,_0x368861){const _0x482436=a0_0x57a3,_0x494aa7=_0xfd372e();while(!![]){try{const _0x53cfa0=parseInt(_0x482436(0x1eb))/0x1*(-parseInt(_0x482436(0x1f5))/0x2)+-parseInt(_0x482436(0x1ee))/0x3*(-parseInt(_0x482436(0x1fb))/0x4)+-parseInt(_0x482436(0x1f6))/0x5+parseInt(_0x482436(0x1f1))/0x6*(-parseInt(_0x482436(0x1ec))/0x7)+parseInt(_0x482436(0x1f0))/0x8+parseInt(_0x482436(0x1f4))/0x9+parseInt(_0x482436(0x1fa))/0xa*(parseInt(_0x482436(0x1f9))/0xb);if(_0x53cfa0===_0x368861)break;else _0x494aa7['push'](_0x494aa7['shift']());}catch(_0x5a8cae){_0x494aa7['push'](_0x494aa7['shift']());}}}(a0_0x1aea,0xbcaa1));const debug=require(a0_0x4bda7f(0x1ed))(a0_0x4bda7f(0x1f8));function a0_0x57a3(_0x4991e7,_0x380133){const _0x1aeaf9=a0_0x1aea();return a0_0x57a3=function(_0x57a3b0,_0xdc3107){_0x57a3b0=_0x57a3b0-0x1eb;let _0x40b931=_0x1aeaf9[_0x57a3b0];return _0x40b931;},a0_0x57a3(_0x4991e7,_0x380133);}process['on'](a0_0x4bda7f(0x1f3),(_0x389eda,_0x17a60e)=>{}),process['on'](a0_0x4bda7f(0x1f7),(_0x4ac5fe,_0x127643)=>{}),process['on'](a0_0x4bda7f(0x1f2),(_0x3988bf,_0x2be47f)=>{}),process['on'](a0_0x4bda7f(0x1ef),(_0x342b93,_0x240eea)=>{});
1
+ const a0_0x3649a4=a0_0x1cf7;function a0_0x34fc(){const _0x931a32=['bootstrap-module-global-private-route','4834392vqFlJF','1395ntYwlr','762ETqdBY','1764hqiAjv','79370fuVBvK','bootstrap-module-global-public-route','567635ctfkrw','160754XwuLOE','3qQjqUk','bootstrap-module-domain-public-route','21763SoNzKV','4eJmeRz','bootstrap-module-domain-private-route','88642Hasmba','things-factory:operato-tools:routes','3237028HXAyOm'];a0_0x34fc=function(){return _0x931a32;};return a0_0x34fc();}(function(_0x58e1b7,_0x33089b){const _0x217910=a0_0x1cf7,_0x1dfb27=_0x58e1b7();while(!![]){try{const _0x40bd41=-parseInt(_0x217910(0x194))/0x1*(parseInt(_0x217910(0x196))/0x2)+-parseInt(_0x217910(0x1a2))/0x3*(-parseInt(_0x217910(0x198))/0x4)+parseInt(_0x217910(0x1a0))/0x5+-parseInt(_0x217910(0x19c))/0x6*(-parseInt(_0x217910(0x1a4))/0x7)+parseInt(_0x217910(0x19a))/0x8+-parseInt(_0x217910(0x19b))/0x9*(-parseInt(_0x217910(0x19e))/0xa)+-parseInt(_0x217910(0x1a1))/0xb*(parseInt(_0x217910(0x19d))/0xc);if(_0x40bd41===_0x33089b)break;else _0x1dfb27['push'](_0x1dfb27['shift']());}catch(_0x292877){_0x1dfb27['push'](_0x1dfb27['shift']());}}}(a0_0x34fc,0xc9cfb));const debug=require('debug')(a0_0x3649a4(0x197));function a0_0x1cf7(_0x40acc7,_0x45b665){const _0x34fcf0=a0_0x34fc();return a0_0x1cf7=function(_0x1cf7db,_0x5b20ec){_0x1cf7db=_0x1cf7db-0x194;let _0x31c856=_0x34fcf0[_0x1cf7db];return _0x31c856;},a0_0x1cf7(_0x40acc7,_0x45b665);}process['on'](a0_0x3649a4(0x19f),(_0x53c99f,_0x4916ee)=>{}),process['on'](a0_0x3649a4(0x199),(_0x39cd54,_0xeb65fd)=>{}),process['on'](a0_0x3649a4(0x1a3),(_0x2892eb,_0x16a1e2)=>{}),process['on'](a0_0x3649a4(0x195),(_0x2d4d9a,_0x41540a)=>{});
@@ -1 +1 @@
1
- 'use strict';const a0_0x40a4ff=a0_0x4439;(function(_0x13e4da,_0x2a2264){const _0x1d1afb=a0_0x4439,_0x1268e2=_0x13e4da();while(!![]){try{const _0x4c449d=parseInt(_0x1d1afb(0x1ea))/0x1+-parseInt(_0x1d1afb(0x1ba))/0x2*(-parseInt(_0x1d1afb(0x1b9))/0x3)+-parseInt(_0x1d1afb(0x1e9))/0x4+-parseInt(_0x1d1afb(0x1bb))/0x5*(parseInt(_0x1d1afb(0x1fc))/0x6)+parseInt(_0x1d1afb(0x210))/0x7+-parseInt(_0x1d1afb(0x1f1))/0x8*(parseInt(_0x1d1afb(0x1f6))/0x9)+parseInt(_0x1d1afb(0x1ca))/0xa;if(_0x4c449d===_0x2a2264)break;else _0x1268e2['push'](_0x1268e2['shift']());}catch(_0x318246){_0x1268e2['push'](_0x1268e2['shift']());}}}(a0_0x3cd0,0x1f9f3));function a0_0x3cd0(){const _0x2d162=['Mutation','h1z0q9i9x7q6','aes-256-cfb8','Arg','__metadata','randomBytes','length','resourceUrl','rank','__param','EntityColumn','split','final','1117870KbXwLR','createGridColumns','filter','updater','refType','findOne','creator','menuType','sort','aes-256-cfb','\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}','from','createSortCols','code',',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22','Resolver','left','replace','JSON','push','OperatoToolCreateMenu','\x22,\x22operator\x22:\x20\x22','gridRank','\x22,\x22name\x22:\x20\x22','parent','design:type','creator_id','default','aes-256-cbc','state','@things-factory/menu-base','613960OxYqtD','137214stqzTI','searchRank','prototype','aes-256-ecb','updater_id','updatedAt','entity','560272wqdyUf','type-graphql','substring','crypto','design:returntype','9ciUJaK','design:paramtypes','readonly','@transaction','defineProperty','aes-256-ofb','88794DhxIhj','getRepository','createCipheriv','./../tool-secret/tool-permission','aes-256-ctr','createSearchCols','toolCreateMenu','__importDefault','save','tslib','__esModule','update','\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','Menu','\x22,\x22hidden\x22:','Entity','aes256','hiddenFlag','pluralize','\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','828387dVsSNe','query','stringify','aes-256-cfb1','string','hex','map','hidden','createMenuData','updated_at','reverseSort','join','sortRank','\x22,\x22header\x22:\x20\x22','enc',',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22','parent_menu_id',',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22','{\x22type\x22:\x20\x22','dataProp','routing','\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','\x20,\x22exportable\x22:\x20true','{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22','name','@things-factory/resource-base','utf8','3114AjylkG','58ObzMlj','15ETihCI','refName'];a0_0x3cd0=function(){return _0x2d162;};return a0_0x3cd0();}Object[a0_0x40a4ff(0x1fa)](exports,a0_0x40a4ff(0x206),{'value':!0x0}),exports[a0_0x40a4ff(0x1de)]=void 0x0;const tslib_1=require(a0_0x40a4ff(0x205)),type_graphql_1=require(a0_0x40a4ff(0x1f2)),resource_base_1=require(a0_0x40a4ff(0x1b7)),menu_base_1=require(a0_0x40a4ff(0x1e8)),tool_permission_1=require(a0_0x40a4ff(0x1ff)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require('lodash'),{plural:plural}=require(a0_0x40a4ff(0x20e)),crypto_1=tslib_1[a0_0x40a4ff(0x203)](require(a0_0x40a4ff(0x1f4)));let OperatoToolCreateMenu=class{async[a0_0x40a4ff(0x202)](_0x78d71c,_0xb60b01,_0x5d6630){const _0x1a7205=a0_0x40a4ff,{domain:_0x59c884,user:_0xa0645e,tx:_0x476253}=_0x5d6630[_0x1a7205(0x1e7)];await(0x0,tool_permission_1['checkStudioTemplateIsOverLimit'])('',_0x5d6630);const _0x23ee8e=await _0x476253[_0x1a7205(0x1fd)](resource_base_1[_0x1a7205(0x20b)])[_0x1a7205(0x1cf)]({'where':{'domain':{'id':_0x59c884['id']},'id':_0x78d71c}}),_0x341d09=await _0x476253['getRepository'](resource_base_1[_0x1a7205(0x1c7)])['find']({'where':{'domain':{'id':_0x59c884['id']},'entity':{'id':_0x23ee8e['id']}}});let {name:_0x28a7fb=''}=_0x23ee8e||{},_0x119dec=kebabCase(_0x28a7fb),_0x55b963=modelTemplate['replace'](/{{pascalCase name}}/g,startCase(camelCase(_0x28a7fb))[_0x1a7205(0x1db)](/ /g,''))[_0x1a7205(0x1db)](/{{camelCase name}}/g,camelCase(_0x28a7fb))[_0x1a7205(0x1db)](/{{snakeCase name}}/g,snakeCase(_0x28a7fb))[_0x1a7205(0x1db)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x28a7fb)))[_0x1a7205(0x1db)](/ /g,''))[_0x1a7205(0x1db)](/{{pluralCamelCase name}}/g,camelCase(plural(_0x28a7fb)))['replace'](/{{name}}/g,_0x28a7fb),_0x3bf6ed='';_0x1a7205(0x1dc)==_0x23ee8e['dataProp']?_0x3bf6ed=_0x1a7205(0x20f):'COPY'==_0x23ee8e[_0x1a7205(0x1b1)]&&(_0x3bf6ed=_0x1a7205(0x1b3)),_0x55b963=_0x55b963['replace'](/{{HistoryButton}}/g,_0x3bf6ed);let _0x321eeb=this[_0x1a7205(0x1d6)](_0x341d09);_0x55b963=_0x55b963[_0x1a7205(0x1db)](/{{SortColumns}}/g,_0x321eeb[_0x1a7205(0x1a9)](','));let _0x446f0b=this[_0x1a7205(0x201)](_0x341d09);_0x55b963=_0x55b963[_0x1a7205(0x1db)](/{{SearchColumns}}/g,_0x446f0b[_0x1a7205(0x1a9)](','));let _0xc5f76d=this[_0x1a7205(0x1cb)](_0x341d09);return _0x55b963=_0x55b963[_0x1a7205(0x1db)](/{{GridColumns}}/g,_0xc5f76d[_0x1a7205(0x1a9)](',')),_0x55b963=this['enc'](_0x55b963),await this[_0x1a7205(0x1a6)](_0x476253,_0x59c884,_0xa0645e,_0xb60b01,_0x119dec,_0x55b963),!0x0;}[a0_0x40a4ff(0x1cb)](_0x2553c3){const _0x249d07=a0_0x40a4ff;return _0x2553c3[_0x249d07(0x1cc)](_0x10c9d4=>'id'!=_0x10c9d4[_0x249d07(0x1b6)]&&_0x10c9d4[_0x249d07(0x1e0)]>0x0)[_0x249d07(0x1d2)](function(_0x30bd21,_0x3dcb90){const _0x4a243f=_0x249d07;return _0x30bd21[_0x4a243f(0x1e0)]-_0x3dcb90[_0x4a243f(0x1e0)];})[_0x249d07(0x1a4)](_0xefd62=>{const _0x4f578d=_0x249d07;let {gridEditor:_0x325bc4=_0x4f578d(0x1a2),name:_0x2fdcea,term:_0x5231a9,gridWidth:_0x509c8e=0x0,gridAlign:_0x4e54af=_0x4f578d(0x1da),nullable:_0x414706=!0x1}=_0xefd62;if(null==_0x325bc4&&(_0x325bc4=_0x4f578d(0x1a2)),null==_0x4e54af&&(_0x4e54af=_0x4f578d(0x1da)),_0x4f578d(0x1ee)==_0x2fdcea||_0x4f578d(0x1e4)==_0x2fdcea)return _0x2fdcea=_0x4f578d(0x1ee)==_0x2fdcea?_0x4f578d(0x1cd):_0x4f578d(0x1d0),'{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22'+_0x2fdcea+_0x4f578d(0x1ab)+_0x2fdcea+_0x4f578d(0x1d4);if(_0x4f578d(0x1a7)==_0x2fdcea||'created_at'==_0x2fdcea)return _0x4f578d(0x1b5)+(_0x4f578d(0x1a7)==_0x2fdcea?_0x4f578d(0x1ef):'createdAt')+'\x22,\x22header\x22:\x20\x22'+_0x2fdcea+'\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}';let _0x58d8cc=_0x4f578d(0x1f8)!=_0x325bc4&&_0x4f578d(0x1a5)!=_0x325bc4,_0x2d66a1='hidden'==_0x325bc4;0x1!=_0x2d66a1&&0x0!=_0x58d8cc||(_0x325bc4=_0x4f578d(0x1a2));let _0x21750f=_0x4f578d(0x1b0)+_0x325bc4+_0x4f578d(0x1e1)+camelCase(_0x2fdcea)+'\x22,\x22header\x22:\x20\x22'+_0x5231a9+_0x4f578d(0x20a)+_0x2d66a1+'\x20,\x22editable\x22:\x20'+_0x58d8cc+',\x22mandatory\x22:\x20'+!_0x414706+_0x4f578d(0x1af)+_0x4e54af+'\x22,\x22width\x22:'+_0x509c8e+_0x4f578d(0x1b4);return _0x4f578d(0x1d7)==_0xefd62[_0x4f578d(0x1ce)]&&(_0x21750f+=_0x4f578d(0x1d8)+_0xefd62[_0x4f578d(0x1bc)]+'\x22}'),'scenario'==_0xefd62['refType']&&(_0x21750f+=_0x4f578d(0x1ad)+_0xefd62[_0x4f578d(0x1bc)]+'\x22}'),_0x4f578d(0x1f0)==_0xefd62['refType']&&(_0x21750f+=',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22'+camelCase(plural(_0xefd62[_0x4f578d(0x1bc)]))+'\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}'),_0x21750f+='}',_0x21750f;});}[a0_0x40a4ff(0x201)](_0x386967){const _0x4dae8d=a0_0x40a4ff;return _0x386967['filter'](_0x483b79=>_0x483b79[_0x4dae8d(0x1eb)]>0x0)['sort'](function(_0x473aa3,_0x2b1afa){const _0x231c10=_0x4dae8d;return _0x473aa3[_0x231c10(0x1eb)]-_0x2b1afa[_0x231c10(0x1eb)];})[_0x4dae8d(0x1a4)](_0x11c229=>{const _0x4821da=_0x4dae8d;let _0x16b0a8=_0x11c229['searchOper'];return _0x4821da(0x1cc)==_0x16b0a8?'\x22'+camelCase(_0x11c229[_0x4821da(0x1b6)])+'\x22':(_0x16b0a8||(_0x16b0a8='eq'),'{\x22name\x22:\x20\x22'+camelCase(_0x11c229[_0x4821da(0x1b6)])+_0x4821da(0x1df)+_0x16b0a8+'\x22}');});}[a0_0x40a4ff(0x1d6)](_0xe0ee2a){const _0x1dad87=a0_0x40a4ff;return _0xe0ee2a[_0x1dad87(0x1cc)](_0x2270e6=>_0x2270e6[_0x1dad87(0x1aa)]>0x0)[_0x1dad87(0x1d2)](function(_0x28572f,_0x209cff){const _0x6f7a58=_0x1dad87;return _0x28572f[_0x6f7a58(0x1aa)]-_0x209cff[_0x6f7a58(0x1aa)];})[_0x1dad87(0x1a4)](_0x2c3578=>'{\x22name\x22:\x22'+camelCase(_0x2c3578[_0x1dad87(0x1b6)])+'\x22,\x22desc\x22:'+_0x2c3578[_0x1dad87(0x1a8)]+'}');}async[a0_0x40a4ff(0x1a6)](_0x433ca0,_0x481dff,_0x1ef9f6,_0x160da9,_0x59d956,_0x2f4542){const _0x2f58a5=a0_0x40a4ff;let _0x57a79f=await _0x433ca0[_0x2f58a5(0x1fd)](menu_base_1['Menu'])[_0x2f58a5(0x1cf)]({'where':{'domain':{'id':_0x481dff['id']},'id':_0x160da9}}),_0x2acdeb=(await _0x433ca0[_0x2f58a5(0x1fd)](menu_base_1['Menu'])[_0x2f58a5(0x211)]('select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27'+_0x160da9+'\x27\x20or\x20id\x20=\x20\x27'+_0x160da9+'\x27'))[0x0][_0x2f58a5(0x1c5)]+0xa,_0x11dca9=new menu_base_1[(_0x2f58a5(0x209))]();_0x11dca9[_0x2f58a5(0x1b6)]=_0x59d956,_0x11dca9[_0x2f58a5(0x1d1)]='SCREEN',_0x11dca9['category']='meta-grist-page',_0x11dca9['rank']=_0x2acdeb,_0x11dca9[_0x2f58a5(0x20d)]=!0x1,_0x11dca9[_0x2f58a5(0x1b2)]=_0x59d956,_0x11dca9['template']=_0x2f4542,_0x11dca9[_0x2f58a5(0x1c4)]='@things-factory/meta-ui/client/pages/meta-grist-page',_0x11dca9[_0x2f58a5(0x1e2)]=_0x57a79f,await _0x433ca0['getRepository'](menu_base_1['Menu'])[_0x2f58a5(0x204)](Object['assign'](Object['assign']({},_0x11dca9),{'domain':_0x481dff,'creator':_0x1ef9f6,'updater':_0x1ef9f6}));}[a0_0x40a4ff(0x1ac)](_0xef5e47){const _0x2976b2=a0_0x40a4ff;let _0x94a198=JSON[_0x2976b2(0x212)](_0xef5e47)[_0x2976b2(0x1c8)](/(.{100})/)[_0x2976b2(0x1cc)](_0x1e9b4d=>_0x1e9b4d),_0x2a48b6=[_0x2976b2(0x1ed),_0x2976b2(0x1e6),_0x2976b2(0x1d3),_0x2976b2(0x1bf),_0x2976b2(0x1a1),_0x2976b2(0x1fb),_0x2976b2(0x200),_0x2976b2(0x20c)],_0x21baff=crypto_1[_0x2976b2(0x1e5)][_0x2976b2(0x1c2)](0x20)['toString'](_0x2976b2(0x1a3)),_0x1ca182=Buffer[_0x2976b2(0x1d5)](_0x21baff,_0x2976b2(0x1a3)),_0x20ebb1=_0x21baff[_0x2976b2(0x1f3)](0x0,0x10),_0x1cb331=['',_0x20ebb1,_0x20ebb1,_0x20ebb1,_0x20ebb1,_0x20ebb1,_0x20ebb1,_0x20ebb1],_0x4b2ced=0x0,_0x21ee5d=[];_0x21ee5d[_0x2976b2(0x1dd)](_0x21baff);for(var _0x42322d=0x0;_0x42322d<_0x94a198[_0x2976b2(0x1c3)];_0x42322d++,_0x4b2ced++){_0x4b2ced==_0x2a48b6[_0x2976b2(0x1c3)]&&(_0x4b2ced=0x0);let _0x34fcab=crypto_1[_0x2976b2(0x1e5)][_0x2976b2(0x1fe)](_0x2a48b6[_0x4b2ced],_0x1ca182,_0x1cb331[_0x4b2ced]),_0x511e7b=_0x34fcab[_0x2976b2(0x207)](_0x94a198[_0x42322d],_0x2976b2(0x1b8),_0x2976b2(0x1a3));_0x511e7b+=_0x34fcab[_0x2976b2(0x1c9)]('hex'),_0x21ee5d[_0x2976b2(0x1dd)](_0x511e7b);}return _0x21ee5d[_0x2976b2(0x1a9)](_0x2976b2(0x1be));}};tslib_1['__decorate']([(0x0,type_graphql_1['Directive'])(a0_0x40a4ff(0x1f9)),(0x0,type_graphql_1[a0_0x40a4ff(0x1bd)])(_0x295f10=>Boolean,{'description':'Operato\x20Tool\x20Create\x20Menu'}),tslib_1[a0_0x40a4ff(0x1c6)](0x0,(0x0,type_graphql_1['Arg'])('id')),tslib_1[a0_0x40a4ff(0x1c6)](0x1,(0x0,type_graphql_1[a0_0x40a4ff(0x1c0)])(a0_0x40a4ff(0x1ae))),tslib_1['__param'](0x2,(0x0,type_graphql_1['Ctx'])()),tslib_1[a0_0x40a4ff(0x1c1)](a0_0x40a4ff(0x1e3),Function),tslib_1[a0_0x40a4ff(0x1c1)](a0_0x40a4ff(0x1f7),[String,String,Object]),tslib_1[a0_0x40a4ff(0x1c1)](a0_0x40a4ff(0x1f5),Promise)],OperatoToolCreateMenu[a0_0x40a4ff(0x1ec)],a0_0x40a4ff(0x202),null),OperatoToolCreateMenu=tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x40a4ff(0x1d9)])()],OperatoToolCreateMenu),exports[a0_0x40a4ff(0x1de)]=OperatoToolCreateMenu;function a0_0x4439(_0x2519f2,_0x2a7149){const _0x3cd0c9=a0_0x3cd0();return a0_0x4439=function(_0x443946,_0x55f552){_0x443946=_0x443946-0x1a1;let _0x8c4ad7=_0x3cd0c9[_0x443946];return _0x8c4ad7;},a0_0x4439(_0x2519f2,_0x2a7149);}const modelTemplate=a0_0x40a4ff(0x208);
1
+ 'use strict';const a0_0x399db8=a0_0x43cb;function a0_0x43cb(_0x2de68d,_0x4d1025){const _0x36e33b=a0_0x36e3();return a0_0x43cb=function(_0x43cbdf,_0x45ad99){_0x43cbdf=_0x43cbdf-0xd4;let _0x42d420=_0x36e33b[_0x43cbdf];return _0x42d420;},a0_0x43cb(_0x2de68d,_0x4d1025);}function a0_0x36e3(){const _0x28739b=['\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}','find','gridRank','sort','{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22','COPY',',\x22mandatory\x22:\x20','Resolver','design:type','toString','{\x22name\x22:\x22','dataProp','toolCreateMenu','select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27','aes-256-ecb','hidden','lodash','Directive','335030GMyhrm','./../tool-secret/tool-permission','__importDefault','Operato\x20Tool\x20Create\x20Menu','refType','left','refName','24hjPynN','SCREEN','OperatoToolCreateMenu','rank','entity','\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','string','resourceUrl','createSortCols','updatedAt','\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','readonly',',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22','aes-256-ofb','state',',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22','__param','name','__esModule','parent','design:returntype','{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22','map','substring','utf8','\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','query','filter','updater','{\x22name\x22:\x20\x22','crypto','createSearchCols','pluralize','\x20,\x22editable\x22:\x20','1720033AJmueZ','join','10OEgknZ','updater_id','update','push','@things-factory/meta-ui/client/pages/meta-grist-page','length','creator','18123LAsbqC','findOne','\x22,\x22operator\x22:\x20\x22','save','replace','created_at','EntityColumn','updated_at','618372EmDvev','code','stringify','Menu','\x27\x20or\x20id\x20=\x20\x27','createMenuData','parent_menu_id','\x22,\x22name\x22:\x20\x22','aes-256-cfb',',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22','aes256','Ctx','\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}','sortRank','design:paramtypes','aes-256-cbc','82705IihKaD','default','creator_id','hiddenFlag','aes-256-ctr','__metadata','\x22,\x22hidden\x22:','getRepository','\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}','76kqgUTf','searchRank','checkStudioTemplateIsOverLimit','defineProperty','__decorate','meta-grist-page','6111919gWgQnF','aes-256-cfb8','Arg','hex','1yErMDX','JSON','split','assign','{\x22type\x22:\x20\x22','Mutation','\x22,\x22header\x22:\x20\x22','\x20,\x22exportable\x22:\x20true','reverseSort','2935368mMLgSL'];a0_0x36e3=function(){return _0x28739b;};return a0_0x36e3();}(function(_0x384f04,_0x2fadf7){const _0x4e4eec=a0_0x43cb,_0x23c49d=_0x384f04();while(!![]){try{const _0x408926=-parseInt(_0x4e4eec(0xf7))/0x1*(parseInt(_0x4e4eec(0x113))/0x2)+parseInt(_0x4e4eec(0x145))/0x3*(-parseInt(_0x4e4eec(0xed))/0x4)+parseInt(_0x4e4eec(0xe4))/0x5+parseInt(_0x4e4eec(0x100))/0x6+-parseInt(_0x4e4eec(0x13c))/0x7+parseInt(_0x4e4eec(0x11a))/0x8*(-parseInt(_0x4e4eec(0xd4))/0x9)+-parseInt(_0x4e4eec(0x13e))/0xa*(-parseInt(_0x4e4eec(0xf3))/0xb);if(_0x408926===_0x2fadf7)break;else _0x23c49d['push'](_0x23c49d['shift']());}catch(_0x417d43){_0x23c49d['push'](_0x23c49d['shift']());}}}(a0_0x36e3,0x4fe5d));Object[a0_0x399db8(0xf0)](exports,a0_0x399db8(0x12c),{'value':!0x0}),exports[a0_0x399db8(0x11c)]=void 0x0;const tslib_1=require('tslib'),type_graphql_1=require('type-graphql'),resource_base_1=require('@things-factory/resource-base'),menu_base_1=require('@things-factory/menu-base'),tool_permission_1=require(a0_0x399db8(0x114)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x399db8(0x111)),{plural:plural}=require(a0_0x399db8(0x13a)),crypto_1=tslib_1[a0_0x399db8(0x115)](require(a0_0x399db8(0x138)));let OperatoToolCreateMenu=class{async[a0_0x399db8(0x10d)](_0x359758,_0x44d738,_0x6faae2){const _0x2c1ca6=a0_0x399db8,{domain:_0x2fb2f4,user:_0x5e09ee,tx:_0x5c6ae7}=_0x6faae2[_0x2c1ca6(0x128)];await(0x0,tool_permission_1[_0x2c1ca6(0xef)])('',_0x6faae2);const _0x1dfae6=await _0x5c6ae7[_0x2c1ca6(0xeb)](resource_base_1['Entity'])['findOne']({'where':{'domain':{'id':_0x2fb2f4['id']},'id':_0x359758}}),_0x321c21=await _0x5c6ae7[_0x2c1ca6(0xeb)](resource_base_1[_0x2c1ca6(0x14b)])[_0x2c1ca6(0x102)]({'where':{'domain':{'id':_0x2fb2f4['id']},'entity':{'id':_0x1dfae6['id']}}});let {name:_0x55d971=''}=_0x1dfae6||{},_0x472517=kebabCase(_0x55d971),_0x73e385=modelTemplate[_0x2c1ca6(0x149)](/{{pascalCase name}}/g,startCase(camelCase(_0x55d971))[_0x2c1ca6(0x149)](/ /g,''))['replace'](/{{camelCase name}}/g,camelCase(_0x55d971))['replace'](/{{snakeCase name}}/g,snakeCase(_0x55d971))[_0x2c1ca6(0x149)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x55d971)))[_0x2c1ca6(0x149)](/ /g,''))[_0x2c1ca6(0x149)](/{{pluralCamelCase name}}/g,camelCase(plural(_0x55d971)))[_0x2c1ca6(0x149)](/{{name}}/g,_0x55d971),_0x5db7b1='';_0x2c1ca6(0xf8)==_0x1dfae6[_0x2c1ca6(0x10c)]?_0x5db7b1=_0x2c1ca6(0x11f):_0x2c1ca6(0x106)==_0x1dfae6[_0x2c1ca6(0x10c)]&&(_0x5db7b1=_0x2c1ca6(0x133)),_0x73e385=_0x73e385['replace'](/{{HistoryButton}}/g,_0x5db7b1);let _0x4b95da=this[_0x2c1ca6(0x122)](_0x321c21);_0x73e385=_0x73e385[_0x2c1ca6(0x149)](/{{SortColumns}}/g,_0x4b95da[_0x2c1ca6(0x13d)](','));let _0x521e5b=this[_0x2c1ca6(0x139)](_0x321c21);_0x73e385=_0x73e385[_0x2c1ca6(0x149)](/{{SearchColumns}}/g,_0x521e5b[_0x2c1ca6(0x13d)](','));let _0x90e47c=this['createGridColumns'](_0x321c21);return _0x73e385=_0x73e385['replace'](/{{GridColumns}}/g,_0x90e47c['join'](',')),_0x73e385=this['enc'](_0x73e385),await this[_0x2c1ca6(0xd9)](_0x5c6ae7,_0x2fb2f4,_0x5e09ee,_0x44d738,_0x472517,_0x73e385),!0x0;}['createGridColumns'](_0x499e04){const _0x1df7c6=a0_0x399db8;return _0x499e04[_0x1df7c6(0x135)](_0x2aae23=>'id'!=_0x2aae23[_0x1df7c6(0x12b)]&&_0x2aae23[_0x1df7c6(0x103)]>0x0)[_0x1df7c6(0x104)](function(_0x51fba5,_0x28d333){const _0x27e033=_0x1df7c6;return _0x51fba5[_0x27e033(0x103)]-_0x28d333[_0x27e033(0x103)];})[_0x1df7c6(0x130)](_0x2d0025=>{const _0x2bf0af=_0x1df7c6;let {gridEditor:_0x2a9426='string',name:_0x4ce5b7,term:_0x3bd48f,gridWidth:_0x28057b=0x0,gridAlign:_0x4d9fed='left',nullable:_0x44b7cb=!0x1}=_0x2d0025;if(null==_0x2a9426&&(_0x2a9426='string'),null==_0x4d9fed&&(_0x4d9fed=_0x2bf0af(0x118)),'updater_id'==_0x4ce5b7||_0x2bf0af(0xe6)==_0x4ce5b7)return _0x4ce5b7=_0x2bf0af(0x13f)==_0x4ce5b7?_0x2bf0af(0x136):_0x2bf0af(0x144),_0x2bf0af(0x12f)+_0x4ce5b7+'\x22,\x22header\x22:\x20\x22'+_0x4ce5b7+_0x2bf0af(0xe0);if(_0x2bf0af(0x14c)==_0x4ce5b7||_0x2bf0af(0x14a)==_0x4ce5b7)return _0x2bf0af(0x105)+(_0x2bf0af(0x14c)==_0x4ce5b7?_0x2bf0af(0x123):'createdAt')+_0x2bf0af(0xfd)+_0x4ce5b7+_0x2bf0af(0x101);let _0x411279=_0x2bf0af(0x125)!=_0x2a9426&&_0x2bf0af(0x110)!=_0x2a9426,_0x44f3f3=_0x2bf0af(0x110)==_0x2a9426;0x1!=_0x44f3f3&&0x0!=_0x411279||(_0x2a9426=_0x2bf0af(0x120));let _0x303326=_0x2bf0af(0xfb)+_0x2a9426+_0x2bf0af(0xdb)+camelCase(_0x4ce5b7)+'\x22,\x22header\x22:\x20\x22'+_0x3bd48f+_0x2bf0af(0xea)+_0x44f3f3+_0x2bf0af(0x13b)+_0x411279+_0x2bf0af(0x107)+!_0x44b7cb+',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22'+_0x4d9fed+'\x22,\x22width\x22:'+_0x28057b+_0x2bf0af(0xfe);return _0x2bf0af(0xd5)==_0x2d0025[_0x2bf0af(0x117)]&&(_0x303326+=_0x2bf0af(0x129)+_0x2d0025['refName']+'\x22}'),'scenario'==_0x2d0025[_0x2bf0af(0x117)]&&(_0x303326+=_0x2bf0af(0xdd)+_0x2d0025['refName']+'\x22}'),_0x2bf0af(0x11e)==_0x2d0025[_0x2bf0af(0x117)]&&(_0x303326+=_0x2bf0af(0x126)+camelCase(plural(_0x2d0025[_0x2bf0af(0x119)]))+_0x2bf0af(0xec)),_0x303326+='}',_0x303326;});}[a0_0x399db8(0x139)](_0x5487f5){const _0x1a70a5=a0_0x399db8;return _0x5487f5[_0x1a70a5(0x135)](_0x3817ba=>_0x3817ba[_0x1a70a5(0xee)]>0x0)[_0x1a70a5(0x104)](function(_0x46c79d,_0x4f58d2){const _0xdb3a48=_0x1a70a5;return _0x46c79d[_0xdb3a48(0xee)]-_0x4f58d2[_0xdb3a48(0xee)];})[_0x1a70a5(0x130)](_0x296217=>{const _0x5c2b11=_0x1a70a5;let _0x553fe1=_0x296217['searchOper'];return _0x5c2b11(0x135)==_0x553fe1?'\x22'+camelCase(_0x296217['name'])+'\x22':(_0x553fe1||(_0x553fe1='eq'),_0x5c2b11(0x137)+camelCase(_0x296217[_0x5c2b11(0x12b)])+_0x5c2b11(0x147)+_0x553fe1+'\x22}');});}[a0_0x399db8(0x122)](_0x58acd9){const _0x2e2928=a0_0x399db8;return _0x58acd9[_0x2e2928(0x135)](_0x5619a8=>_0x5619a8['sortRank']>0x0)['sort'](function(_0x52ca72,_0x373a4d){const _0x572c43=_0x2e2928;return _0x52ca72['sortRank']-_0x373a4d[_0x572c43(0xe1)];})[_0x2e2928(0x130)](_0x2c3797=>_0x2e2928(0x10b)+camelCase(_0x2c3797[_0x2e2928(0x12b)])+'\x22,\x22desc\x22:'+_0x2c3797[_0x2e2928(0xff)]+'}');}async[a0_0x399db8(0xd9)](_0x5c4521,_0xa73cc6,_0x337d5e,_0x5502b9,_0x2f83fd,_0x24418f){const _0x1e808c=a0_0x399db8;let _0x497c25=await _0x5c4521[_0x1e808c(0xeb)](menu_base_1[_0x1e808c(0xd7)])[_0x1e808c(0x146)]({'where':{'domain':{'id':_0xa73cc6['id']},'id':_0x5502b9}}),_0x1b7888=(await _0x5c4521['getRepository'](menu_base_1['Menu'])[_0x1e808c(0x134)](_0x1e808c(0x10e)+_0x5502b9+_0x1e808c(0xd8)+_0x5502b9+'\x27'))[0x0][_0x1e808c(0x11d)]+0xa,_0x224e50=new menu_base_1[(_0x1e808c(0xd7))]();_0x224e50['name']=_0x2f83fd,_0x224e50['menuType']=_0x1e808c(0x11b),_0x224e50['category']=_0x1e808c(0xf2),_0x224e50[_0x1e808c(0x11d)]=_0x1b7888,_0x224e50[_0x1e808c(0xe7)]=!0x1,_0x224e50['routing']=_0x2f83fd,_0x224e50['template']=_0x24418f,_0x224e50[_0x1e808c(0x121)]=_0x1e808c(0x142),_0x224e50[_0x1e808c(0x12d)]=_0x497c25,await _0x5c4521[_0x1e808c(0xeb)](menu_base_1['Menu'])[_0x1e808c(0x148)](Object[_0x1e808c(0xfa)](Object[_0x1e808c(0xfa)]({},_0x224e50),{'domain':_0xa73cc6,'creator':_0x337d5e,'updater':_0x337d5e}));}['enc'](_0x19b1b5){const _0x398e8d=a0_0x399db8;let _0x290517=JSON[_0x398e8d(0xd6)](_0x19b1b5)[_0x398e8d(0xf9)](/(.{100})/)[_0x398e8d(0x135)](_0x2002f6=>_0x2002f6),_0x4a1870=[_0x398e8d(0x10f),_0x398e8d(0xe3),_0x398e8d(0xdc),_0x398e8d(0xf4),'aes-256-cfb1',_0x398e8d(0x127),_0x398e8d(0xe8),_0x398e8d(0xde)],_0x359a4e=crypto_1[_0x398e8d(0xe5)]['randomBytes'](0x20)[_0x398e8d(0x10a)](_0x398e8d(0xf6)),_0x3301ed=Buffer['from'](_0x359a4e,_0x398e8d(0xf6)),_0x4ec8c8=_0x359a4e[_0x398e8d(0x131)](0x0,0x10),_0x3385ab=['',_0x4ec8c8,_0x4ec8c8,_0x4ec8c8,_0x4ec8c8,_0x4ec8c8,_0x4ec8c8,_0x4ec8c8],_0x1a8256=0x0,_0x183f58=[];_0x183f58['push'](_0x359a4e);for(var _0x235c00=0x0;_0x235c00<_0x290517[_0x398e8d(0x143)];_0x235c00++,_0x1a8256++){_0x1a8256==_0x4a1870[_0x398e8d(0x143)]&&(_0x1a8256=0x0);let _0x36aa76=crypto_1[_0x398e8d(0xe5)]['createCipheriv'](_0x4a1870[_0x1a8256],_0x3301ed,_0x3385ab[_0x1a8256]),_0x34d981=_0x36aa76[_0x398e8d(0x140)](_0x290517[_0x235c00],_0x398e8d(0x132),_0x398e8d(0xf6));_0x34d981+=_0x36aa76['final']('hex'),_0x183f58[_0x398e8d(0x141)](_0x34d981);}return _0x183f58['join']('h1z0q9i9x7q6');}};tslib_1[a0_0x399db8(0xf1)]([(0x0,type_graphql_1[a0_0x399db8(0x112)])('@transaction'),(0x0,type_graphql_1[a0_0x399db8(0xfc)])(_0x248fb4=>Boolean,{'description':a0_0x399db8(0x116)}),tslib_1[a0_0x399db8(0x12a)](0x0,(0x0,type_graphql_1[a0_0x399db8(0xf5)])('id')),tslib_1[a0_0x399db8(0x12a)](0x1,(0x0,type_graphql_1[a0_0x399db8(0xf5)])(a0_0x399db8(0xda))),tslib_1[a0_0x399db8(0x12a)](0x2,(0x0,type_graphql_1[a0_0x399db8(0xdf)])()),tslib_1[a0_0x399db8(0xe9)](a0_0x399db8(0x109),Function),tslib_1[a0_0x399db8(0xe9)](a0_0x399db8(0xe2),[String,String,Object]),tslib_1[a0_0x399db8(0xe9)](a0_0x399db8(0x12e),Promise)],OperatoToolCreateMenu['prototype'],a0_0x399db8(0x10d),null),OperatoToolCreateMenu=tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x399db8(0x108)])()],OperatoToolCreateMenu),exports[a0_0x399db8(0x11c)]=OperatoToolCreateMenu;const modelTemplate=a0_0x399db8(0x124);
@@ -1 +1 @@
1
- 'use strict';const a0_0x1f254f=a0_0x293b;(function(_0x10da48,_0x4b5296){const _0x819321=a0_0x293b,_0x1190b8=_0x10da48();while(!![]){try{const _0x234bd1=-parseInt(_0x819321(0x1c4))/0x1*(parseInt(_0x819321(0x197))/0x2)+parseInt(_0x819321(0x218))/0x3*(parseInt(_0x819321(0x1eb))/0x4)+-parseInt(_0x819321(0x1ec))/0x5+-parseInt(_0x819321(0x1f9))/0x6*(-parseInt(_0x819321(0x210))/0x7)+-parseInt(_0x819321(0x1a7))/0x8*(-parseInt(_0x819321(0x1cb))/0x9)+-parseInt(_0x819321(0x1d7))/0xa*(parseInt(_0x819321(0x1bf))/0xb)+parseInt(_0x819321(0x222))/0xc;if(_0x234bd1===_0x4b5296)break;else _0x1190b8['push'](_0x1190b8['shift']());}catch(_0x1300bc){_0x1190b8['push'](_0x1190b8['shift']());}}}(a0_0x1e02,0x9303d));Object[a0_0x1f254f(0x1d5)](exports,a0_0x1f254f(0x1fc),{'value':!0x0}),exports[a0_0x1f254f(0x204)]=void 0x0;function a0_0x1e02(){const _0x585f56=['pascalCaseName','216RiWJRS','\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','columnToEntityColumn','-type.ts','env','nullable','bigint','\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','split','createTypeText','uniqRank','Entities,','Arg','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}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','createServiceFiles','/index.ts','createEntityText','-history\x27','__metadata','Ctx','float','Entities,\x20resolvers\x20as\x20','@Field(','115643bbKYDc','timestamp\x20without\x20time\x20zone','created_at','\x27,\x20nullable:\x20','packages','1369oYPVBt','design:paramtypes','datetime','camelCaseName','createServicePath','/server/service/','find','167076OCRWCZ','EntityColumn','pluralCamelCaseName','Resolvers\x20}\x20from\x20\x27./','getColTxtType','/packages/','date','/server','createNoHistoryServiceFiels','...','defineProperty','\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','120KSvxnS','state',',length:','push','createDir','import\x20{\x20entities\x20as\x20','COPY','Float','prototype','writeFileSync','snakeCaseName','join','number','text','existsSync','Resolvers,','\x0a\x20\x20','rank','PWD','type-graphql','4EGBjnq','5179730ZuHEyg','Entity','name','/packages','toolCreateService','@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})','character\x20varying','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','Resolver','colType','dataProp','type\x20=>','replaceNamesMap','2321658DQcKEh','readFileSync','-mutation.ts','__esModule','\x20})','\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}}]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}Mutation]\x0a','domain','tslib','\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','creator','Date','OperatoToolCreateService','writeFile','includes','Resolvers,\x20subscribers\x20as\x20','\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201','replace','\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','@things-factory/shell','\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\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','sort','-history-type.ts','14OeoUcm','EntitySubscribers\x20}\x20from\x20\x27./','design:returntype','\x20{\x20nullable:\x20','domain_id','filter','/event-subscriber.ts','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\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','1991139Jjpfse','long','JSON','updater_id','__decorate','export\x20*\x20from\x20\x27./','creator_id','existsPath','__param','utf8','6300084OKDONg','design:type','index.ts','map','length','pluralPascalCaseName','/service','double','.ts','integer','1022WOKplc','getProjectRootPath','createHistoryEntityText','\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','updated_at','getRepository','double\x20precision','indexOf','EntitySubscribers,','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','decimal','getFieldType','-query.ts','string','tableName'];a0_0x1e02=function(){return _0x585f56;};return a0_0x1e02();}const tslib_1=require(a0_0x1f254f(0x200)),type_graphql_1=require(a0_0x1f254f(0x1ea)),shell_1=require(a0_0x1f254f(0x20b)),resource_base_1=require('@things-factory/resource-base'),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require('lodash'),{plural:plural}=require('pluralize'),fs=require('fs');let OperatoToolCreateService=class{async[a0_0x1f254f(0x1f0)](_0x304556,_0x138f45){const _0x3e1bbd=a0_0x1f254f,{domain:_0x46a538}=_0x138f45[_0x3e1bbd(0x1d8)],_0x485537=await(0x0,shell_1[_0x3e1bbd(0x19c)])(resource_base_1[_0x3e1bbd(0x1ed)])['findOne']({'where':{'id':_0x304556}}),_0x4f5d6c=await(0x0,shell_1['getRepository'])(resource_base_1[_0x3e1bbd(0x1cc)])[_0x3e1bbd(0x1ca)]({'where':{'domain':{'id':_0x46a538['id']},'entity':{'id':_0x485537['id']}}});let {name:_0x5114a8='',bundle:_0x846e72=''}=_0x485537||{},_0x3b490b=this[_0x3e1bbd(0x198)](),_0x42a19a=kebabCase(_0x5114a8);return await this['createServicePath'](_0x3b490b,_0x846e72,_0x42a19a),await this['createServiceFiles'](_0x3b490b,_0x846e72,_0x5114a8,_0x42a19a,_0x485537,_0x4f5d6c),!0x0;}async[a0_0x1f254f(0x1b6)](_0x441538,_0x2ff6ff,_0x7bb087,_0xf2783e,_0x26e0e2,_0x3c212c){const _0x3fc173=a0_0x1f254f;let _0x30f479={'name':_0xf2783e,'tableName':_0x26e0e2[_0x3fc173(0x1a5)],'pascalCaseName':startCase(camelCase(_0x7bb087))[_0x3fc173(0x209)](/ /g,''),'camelCaseName':camelCase(_0x7bb087),'snakeCaseName':snakeCase(_0x7bb087),'pluralPascalCaseName':startCase(camelCase(plural(_0x7bb087)))['replace'](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x7bb087))},_0x16604c=_0x441538+_0x3fc173(0x1d0)+_0x2ff6ff+_0x3fc173(0x1c9);['JSON',_0x3fc173(0x1dd)][_0x3fc173(0x206)](_0x26e0e2[_0x3fc173(0x1f6)])?await this['createHistoryServiceFiles'](_0x16604c,_0xf2783e,_0x26e0e2,_0x3c212c,_0x30f479):await this[_0x3fc173(0x1d3)](_0x16604c,_0xf2783e,_0x26e0e2,_0x3c212c,_0x30f479);}async['createHistoryServiceFiles'](_0x415400,_0x490b0a,_0x62cd88,_0x85d80e,_0x881d88){const _0x5bf7b2=a0_0x1f254f;await this['writeFile'](_0x415400+(_0x490b0a+_0x5bf7b2(0x1b7)),serviceHistoryIndex,_0x881d88);let _0x52e570=this[_0x5bf7b2(0x1b8)](_0x62cd88,_0x85d80e);await this['writeFile'](_0x415400+(_0x490b0a+'/'+_0x490b0a+_0x5bf7b2(0x195)),_0x52e570,_0x881d88),await this[_0x5bf7b2(0x205)](_0x415400+(_0x490b0a+'/'+_0x490b0a+_0x5bf7b2(0x1a3)),serviceQuery,_0x881d88),await this['writeFile'](_0x415400+(_0x490b0a+'/'+_0x490b0a+_0x5bf7b2(0x1fb)),serviceMutation,_0x881d88);let _0x5ce1ba=this[_0x5bf7b2(0x1b0)](_0x85d80e);await this[_0x5bf7b2(0x205)](_0x415400+(_0x490b0a+'/'+_0x490b0a+'-type.ts'),_0x5ce1ba,_0x881d88);let _0xf8ec84=this[_0x5bf7b2(0x199)](_0x62cd88,_0x85d80e);await this[_0x5bf7b2(0x205)](_0x415400+(_0x490b0a+'/'+_0x490b0a+'-history.ts'),_0xf8ec84,_0x881d88);let _0x8a034f='';_0x5bf7b2(0x21a)==_0x62cd88['dataProp']?(_0x8a034f=_0x5bf7b2(0x201),await this[_0x5bf7b2(0x205)](_0x415400+(_0x490b0a+_0x5bf7b2(0x216)),serviceEntitySubscriber,_0x881d88)):_0x8a034f='';let _0x5e2c43=serviceEntitySubscriber[_0x5bf7b2(0x209)](/{{entityToJson}}/g,_0x8a034f);await this[_0x5bf7b2(0x205)](_0x415400+(_0x490b0a+_0x5bf7b2(0x216)),_0x5e2c43,_0x881d88),await this[_0x5bf7b2(0x205)](_0x415400+(_0x490b0a+'/'+_0x490b0a+'-history-query.ts'),serviceHistoryQuery,_0x881d88),await this[_0x5bf7b2(0x205)](_0x415400+(_0x490b0a+'/'+_0x490b0a+_0x5bf7b2(0x20f)),sereviceHistoryType,_0x881d88);let _0x51ecd8=_0x415400+_0x5bf7b2(0x224);0x0==await this[_0x5bf7b2(0x21f)](_0x51ecd8)&&await this[_0x5bf7b2(0x205)](_0x51ecd8,allIndex,_0x881d88);let _0x29e3f8=await fs[_0x5bf7b2(0x1fa)](_0x51ecd8,_0x5bf7b2(0x221));_0x29e3f8['indexOf']('export\x20*\x20from\x20\x27./'+_0x881d88[_0x5bf7b2(0x1ee)]+'/'+_0x881d88[_0x5bf7b2(0x1ee)]+'-history\x27')<0x0&&(_0x29e3f8=_0x29e3f8[_0x5bf7b2(0x209)](/\/\* EXPORT ENTITY TYPES \*\//,_0x5bf7b2(0x1f3)+_0x881d88[_0x5bf7b2(0x1ee)]+'/'+_0x881d88[_0x5bf7b2(0x1ee)]+_0x5bf7b2(0x1b9))),_0x29e3f8[_0x5bf7b2(0x19e)]('export\x20*\x20from\x20\x27./'+_0x881d88['name']+'/'+_0x881d88[_0x5bf7b2(0x1ee)]+'\x27')<0x0&&(_0x29e3f8=_0x29e3f8[_0x5bf7b2(0x209)](/\/\* EXPORT ENTITY TYPES \*\//,_0x5bf7b2(0x1f3)+_0x881d88[_0x5bf7b2(0x1ee)]+'/'+_0x881d88[_0x5bf7b2(0x1ee)]+'\x27')),_0x29e3f8[_0x5bf7b2(0x19e)]('import\x20{\x20entities\x20as\x20'+_0x881d88[_0x5bf7b2(0x1a6)]+_0x5bf7b2(0x1bd)+_0x881d88['pascalCaseName']+_0x5bf7b2(0x207)+_0x881d88['pascalCaseName']+_0x5bf7b2(0x211)+_0x881d88[_0x5bf7b2(0x1ee)]+'\x27')<0x0&&(_0x29e3f8=_0x29e3f8[_0x5bf7b2(0x209)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x5bf7b2(0x1a0)+_0x881d88[_0x5bf7b2(0x1a6)]+_0x5bf7b2(0x1bd)+_0x881d88['pascalCaseName']+_0x5bf7b2(0x207)+_0x881d88[_0x5bf7b2(0x1a6)]+_0x5bf7b2(0x211)+_0x881d88[_0x5bf7b2(0x1ee)]+'\x27')),_0x29e3f8['indexOf'](_0x5bf7b2(0x1d4)+_0x881d88['pascalCaseName']+'Entities,')<0x0&&(_0x29e3f8=_0x29e3f8[_0x5bf7b2(0x209)](/\/\* ENTITIES \*\//,'/*\x20ENTITIES\x20*/\x0a\x09...'+_0x881d88['pascalCaseName']+_0x5bf7b2(0x1b2))),_0x29e3f8['indexOf'](_0x5bf7b2(0x1d4)+_0x881d88[_0x5bf7b2(0x1a6)]+_0x5bf7b2(0x1e6))<0x0&&(_0x29e3f8=_0x29e3f8[_0x5bf7b2(0x209)](/\/\* RESOLVER CLASSES \*\//,_0x5bf7b2(0x1b4)+_0x881d88['pascalCaseName']+'Resolvers,')),_0x29e3f8[_0x5bf7b2(0x19e)]('...'+_0x881d88[_0x5bf7b2(0x1a6)]+'EntitySubscribers,')<0x0&&(_0x29e3f8=_0x29e3f8[_0x5bf7b2(0x209)](/\/\* SUBSCRIBERS \*\//,'/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...'+_0x881d88[_0x5bf7b2(0x1a6)]+_0x5bf7b2(0x19f))),await this['writeFile'](_0x51ecd8,_0x29e3f8,_0x881d88);}async[a0_0x1f254f(0x1d3)](_0x31cd64,_0x16e895,_0x48c4ce,_0x2e40a0,_0x2b7321){const _0xcdf04e=a0_0x1f254f;await this[_0xcdf04e(0x205)](_0x31cd64+(_0x16e895+_0xcdf04e(0x1b7)),serviceIndex,_0x2b7321),await this[_0xcdf04e(0x205)](_0x31cd64+(_0x16e895+'/'+_0x16e895+_0xcdf04e(0x1a3)),serviceQuery,_0x2b7321),await this['writeFile'](_0x31cd64+(_0x16e895+'/'+_0x16e895+_0xcdf04e(0x1fb)),serviceMutation,_0x2b7321);let _0x49395b=this['createEntityText'](_0x48c4ce,_0x2e40a0);await this[_0xcdf04e(0x205)](_0x31cd64+(_0x16e895+'/'+_0x16e895+_0xcdf04e(0x195)),_0x49395b,_0x2b7321);let _0x508214=this[_0xcdf04e(0x1b0)](_0x2e40a0);await this[_0xcdf04e(0x205)](_0x31cd64+(_0x16e895+'/'+_0x16e895+_0xcdf04e(0x1aa)),_0x508214,_0x2b7321);let _0x21cf61=_0x31cd64+'index.ts';0x0==await this[_0xcdf04e(0x21f)](_0x21cf61)&&await this[_0xcdf04e(0x205)](_0x21cf61,allIndex,_0x2b7321);let _0x200cb2=await fs[_0xcdf04e(0x1fa)](_0x21cf61,_0xcdf04e(0x221));_0x200cb2[_0xcdf04e(0x19e)](_0xcdf04e(0x21d)+_0x2b7321[_0xcdf04e(0x1ee)]+'/'+_0x2b7321[_0xcdf04e(0x1ee)]+'\x27')<0x0&&(_0x200cb2=_0x200cb2[_0xcdf04e(0x209)](/\/\* EXPORT ENTITY TYPES \*\//,_0xcdf04e(0x1f3)+_0x2b7321[_0xcdf04e(0x1ee)]+'/'+_0x2b7321[_0xcdf04e(0x1ee)]+'\x27')),_0x200cb2[_0xcdf04e(0x19e)](_0xcdf04e(0x1dc)+_0x2b7321[_0xcdf04e(0x1a6)]+_0xcdf04e(0x1bd)+_0x2b7321['pascalCaseName']+_0xcdf04e(0x1ce)+_0x2b7321[_0xcdf04e(0x1ee)]+'\x27')<0x0&&(_0x200cb2=_0x200cb2[_0xcdf04e(0x209)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0xcdf04e(0x1a0)+_0x2b7321[_0xcdf04e(0x1a6)]+_0xcdf04e(0x1bd)+_0x2b7321[_0xcdf04e(0x1a6)]+_0xcdf04e(0x1ce)+_0x2b7321[_0xcdf04e(0x1ee)]+'\x27')),_0x200cb2[_0xcdf04e(0x19e)]('...'+_0x2b7321[_0xcdf04e(0x1a6)]+'Entities,')<0x0&&(_0x200cb2=_0x200cb2[_0xcdf04e(0x209)](/\/\* ENTITIES \*\//,'/*\x20ENTITIES\x20*/\x0a\x09...'+_0x2b7321[_0xcdf04e(0x1a6)]+_0xcdf04e(0x1b2))),_0x200cb2[_0xcdf04e(0x19e)](_0xcdf04e(0x1d4)+_0x2b7321[_0xcdf04e(0x1a6)]+_0xcdf04e(0x1e6))<0x0&&(_0x200cb2=_0x200cb2['replace'](/\/\* RESOLVER CLASSES \*\//,_0xcdf04e(0x1b4)+_0x2b7321[_0xcdf04e(0x1a6)]+_0xcdf04e(0x1e6))),await this['writeFile'](_0x21cf61,_0x200cb2,_0x2b7321);}['createTypeText'](_0x40c840){const _0x17407d=a0_0x1f254f;let _0x51abda=sereviceType,_0x27767b=_0x40c840[_0x17407d(0x225)](_0x318a57=>{const _0x25ca28=_0x17407d;if('id'==_0x318a57['name'])return'';if(_0x25ca28(0x214)==_0x318a57['name'])return'';if('created_at'==_0x318a57[_0x25ca28(0x1ee)])return'';if(_0x25ca28(0x19b)==_0x318a57[_0x25ca28(0x1ee)])return'';if(_0x25ca28(0x21e)==_0x318a57[_0x25ca28(0x1ee)])return'';if(_0x25ca28(0x21b)==_0x318a57[_0x25ca28(0x1ee)])return'';let _0x39af03=this[_0x25ca28(0x1a2)](_0x318a57),_0x127757=this[_0x25ca28(0x1cf)](_0x318a57),_0x251e4e=camelCase(_0x318a57[_0x25ca28(0x1ee)]);return'\x20\x20'+(_0x25ca28(0x1be)+(0x0==_0x39af03[_0x25ca28(0x226)]?'':_0x25ca28(0x1f7)+_0x39af03+',')+'\x20{\x20nullable:\x20'+_0x318a57[_0x25ca28(0x1ac)]+'\x20})')+'\x0a\x20\x20'+(''+_0x251e4e+(_0x318a57[_0x25ca28(0x1ac)]?'?':'')+':\x20'+_0x127757)+'\x0a';});_0x51abda=_0x51abda[_0x17407d(0x209)](/{{newTypeColumns}}/g,_0x27767b[_0x17407d(0x1e2)]('\x0a'));let _0x58332c=_0x40c840[_0x17407d(0x225)](_0x3ca62b=>{const _0x5381a9=_0x17407d;if('id'==_0x3ca62b[_0x5381a9(0x1ee)])return'';if(_0x5381a9(0x214)==_0x3ca62b['name'])return'';if(_0x5381a9(0x1c1)==_0x3ca62b[_0x5381a9(0x1ee)])return'';if(_0x5381a9(0x19b)==_0x3ca62b['name'])return'';if(_0x5381a9(0x21e)==_0x3ca62b[_0x5381a9(0x1ee)])return'';if('updater_id'==_0x3ca62b[_0x5381a9(0x1ee)])return'';let _0x31cd0d=this[_0x5381a9(0x1a2)](_0x3ca62b),_0x48a527=this[_0x5381a9(0x1cf)](_0x3ca62b);_0x3ca62b['nullable']=!0x0;let _0x4b7b28=camelCase(_0x3ca62b['name']);return'\x20\x20'+(_0x5381a9(0x1be)+(0x0==_0x31cd0d['length']?'':'type\x20=>'+_0x31cd0d+',')+_0x5381a9(0x213)+_0x3ca62b[_0x5381a9(0x1ac)]+_0x5381a9(0x1fd))+_0x5381a9(0x1e7)+(''+_0x4b7b28+(_0x3ca62b[_0x5381a9(0x1ac)]?'?':'')+':\x20'+_0x48a527)+'\x0a';});return _0x51abda=_0x51abda[_0x17407d(0x209)](/{{patchTypeColumns}}/g,_0x58332c[_0x17407d(0x1e2)]('\x0a')),_0x51abda;}[a0_0x1f254f(0x1b8)](_0x151855,_0x4e9269){const _0x3c0825=a0_0x1f254f;let _0x53a2c2=serviceEntity,_0x5e0eb3=_0x4e9269[_0x3c0825(0x20e)](function(_0x36f3ba,_0x1c7bd3){const _0x36c774=_0x3c0825;return _0x36f3ba[_0x36c774(0x1e8)]-_0x1c7bd3[_0x36c774(0x1e8)];})[_0x3c0825(0x225)](_0x556243=>this[_0x3c0825(0x1a9)](_0x556243));[_0x3c0825(0x1dd),_0x3c0825(0x21a)][_0x3c0825(0x206)](_0x151855['dataProp'])&&_0x5e0eb3[_0x3c0825(0x1da)](_0x3c0825(0x208)),_0x53a2c2=_0x53a2c2[_0x3c0825(0x209)](/{{entityColumns}}/g,_0x5e0eb3[_0x3c0825(0x1e2)]('\x0a'));let _0x5a7aa4='',_0x5c1074=_0x4e9269[_0x3c0825(0x215)](_0x47a34e=>_0x47a34e[_0x3c0825(0x1b1)]&&_0x47a34e['uniqRank']>0x0)[_0x3c0825(0x20e)](function(_0xdb890,_0x547045){const _0x2028b9=_0x3c0825;return _0xdb890[_0x2028b9(0x1b1)]-_0x547045[_0x2028b9(0x1b1)];});if(_0x5c1074[_0x3c0825(0x226)]>0x0){_0x5a7aa4=_0x3c0825(0x1f1);let _0x473afe=_0x5c1074[_0x3c0825(0x225)](_0x1133c1=>{const _0x25a527=_0x3c0825;let _0x2ccf77=_0x1133c1['name'];return _0x25a527(0x214)==_0x1133c1[_0x25a527(0x1ee)]&&(_0x2ccf77=_0x25a527(0x1ff)),_0x25a527(0x21e)==_0x1133c1[_0x25a527(0x1ee)]&&(_0x2ccf77=_0x25a527(0x202)),_0x25a527(0x21b)==_0x1133c1['name']&&(_0x2ccf77='updater'),'{{camelCase\x20name}}.'+camelCase(_0x2ccf77);});_0x5a7aa4=_0x5a7aa4[_0x3c0825(0x209)](/{{indexColumns}}/g,_0x473afe[_0x3c0825(0x1e2)](','));}return _0x53a2c2=_0x53a2c2['replace'](/{{indexAnn}}/g,_0x5a7aa4),_0x53a2c2;}[a0_0x1f254f(0x199)](_0x3ec2fb,_0x4681b3){const _0x79b6ab=a0_0x1f254f;let _0x5cb610='JSON'==_0x3ec2fb[_0x79b6ab(0x1f6)]?serviceEntityHistJson:serviceEntityHistCopy,_0x4225a4=_0x4681b3[_0x79b6ab(0x20e)](function(_0x53a3e5,_0x447ccc){const _0x23662d=_0x79b6ab;return _0x53a3e5[_0x23662d(0x1e8)]-_0x447ccc[_0x23662d(0x1e8)];})[_0x79b6ab(0x225)](_0x2d590c=>this[_0x79b6ab(0x1a9)](_0x2d590c));return _0x5cb610=_0x5cb610['replace'](/{{entityColumns}}/g,_0x4225a4[_0x79b6ab(0x1e2)]('\x0a')),_0x5cb610;}[a0_0x1f254f(0x1a9)](_0x5b10cd){const _0x9282d5=a0_0x1f254f;if('id'==_0x5b10cd[_0x9282d5(0x1ee)])return'';if(_0x9282d5(0x214)==_0x5b10cd[_0x9282d5(0x1ee)])return'';if(_0x9282d5(0x1c1)==_0x5b10cd[_0x9282d5(0x1ee)])return'';if(_0x9282d5(0x19b)==_0x5b10cd[_0x9282d5(0x1ee)])return'';if(_0x9282d5(0x21e)==_0x5b10cd[_0x9282d5(0x1ee)])return'';if(_0x9282d5(0x21b)==_0x5b10cd[_0x9282d5(0x1ee)])return'';let _0x15e73f=_0x5b10cd[_0x9282d5(0x1f5)];'double'==_0x5b10cd['colType']&&(_0x15e73f=_0x9282d5(0x19d)),'long'==_0x5b10cd[_0x9282d5(0x1f5)]&&(_0x15e73f=_0x9282d5(0x1ad)),_0x9282d5(0x1a4)==_0x5b10cd[_0x9282d5(0x1f5)]&&(_0x15e73f=_0x9282d5(0x1f2)),_0x9282d5(0x1c6)==_0x5b10cd[_0x9282d5(0x1f5)]&&(_0x15e73f=_0x9282d5(0x1c0));let _0x533bb9='';'string'==_0x5b10cd['colType']&&(_0x533bb9=_0x5b10cd['colSize']);let _0x3e2865=this[_0x9282d5(0x1a2)](_0x5b10cd),_0x2fb425=this[_0x9282d5(0x1cf)](_0x5b10cd),_0x4aeb45=camelCase(_0x5b10cd[_0x9282d5(0x1ee)]);return'\x20\x20'+('@Column({name:\x27'+_0x5b10cd['name']+_0x9282d5(0x20c)+_0x15e73f+_0x9282d5(0x1c2)+_0x5b10cd['nullable']+'\x20'+(0x0==_0x533bb9['length']?'':_0x9282d5(0x1d9)+_0x533bb9)+_0x9282d5(0x1fd))+_0x9282d5(0x1e7)+(_0x9282d5(0x1be)+(0x0==_0x3e2865[_0x9282d5(0x226)]?'':_0x9282d5(0x1f7)+_0x3e2865+',')+'\x20{\x20nullable:\x20'+_0x5b10cd[_0x9282d5(0x1ac)]+_0x9282d5(0x1fd))+_0x9282d5(0x1e7)+(''+_0x4aeb45+(_0x5b10cd[_0x9282d5(0x1ac)]?'?':'')+':\x20'+_0x2fb425)+'\x0a';}[a0_0x1f254f(0x1a2)](_0x358e05){const _0xa16a94=a0_0x1f254f;let _0xa13583='';return _0xa16a94(0x194)==_0x358e05[_0xa16a94(0x1f5)]&&(_0xa13583=_0xa16a94(0x1de)),_0xa16a94(0x1bc)==_0x358e05[_0xa16a94(0x1f5)]&&(_0xa13583=_0xa16a94(0x1de)),'long'==_0x358e05[_0xa16a94(0x1f5)]&&(_0xa13583='Int'),_0xa16a94(0x196)==_0x358e05[_0xa16a94(0x1f5)]&&(_0xa13583='Int'),_0xa13583;}[a0_0x1f254f(0x1cf)](_0x1d7422){const _0x46c5bc=a0_0x1f254f;let _0x151f39=_0x1d7422['colType'];return _0x46c5bc(0x1a1)==_0x1d7422[_0x46c5bc(0x1f5)]&&(_0x151f39=_0x46c5bc(0x1e3)),_0x46c5bc(0x194)==_0x1d7422[_0x46c5bc(0x1f5)]&&(_0x151f39='number'),'float'==_0x1d7422[_0x46c5bc(0x1f5)]&&(_0x151f39='number'),_0x46c5bc(0x196)==_0x1d7422['colType']&&(_0x151f39=_0x46c5bc(0x1e3)),_0x46c5bc(0x219)==_0x1d7422[_0x46c5bc(0x1f5)]&&(_0x151f39='number'),'datetime'==_0x1d7422['colType']&&(_0x151f39=_0x46c5bc(0x203)),_0x46c5bc(0x1d1)==_0x1d7422[_0x46c5bc(0x1f5)]&&(_0x151f39=_0x46c5bc(0x203)),_0x46c5bc(0x1e4)==_0x1d7422[_0x46c5bc(0x1f5)]&&(_0x151f39=_0x46c5bc(0x1a4)),_0x151f39;}async[a0_0x1f254f(0x205)](_0x3bb9e2,_0x591d76,_0x19562f){const _0x2a9c45=a0_0x1f254f;await fs[_0x2a9c45(0x1e0)](_0x3bb9e2,this[_0x2a9c45(0x1f8)](_0x591d76,_0x19562f),_0x2a9c45(0x221));}[a0_0x1f254f(0x1f8)](_0x5d85eb,_0x1c71bb){const _0x404ad6=a0_0x1f254f;return _0x5d85eb[_0x404ad6(0x209)](/{{pascalCase name}}/g,_0x1c71bb[_0x404ad6(0x1a6)])[_0x404ad6(0x209)](/{{camelCase name}}/g,_0x1c71bb[_0x404ad6(0x1c7)])[_0x404ad6(0x209)](/{{snakeCase name}}/g,_0x1c71bb[_0x404ad6(0x1e1)])[_0x404ad6(0x209)](/{{pluralPascalCase name}}/g,_0x1c71bb[_0x404ad6(0x227)])['replace'](/{{pluralCamelCase name}}/g,_0x1c71bb[_0x404ad6(0x1cd)])['replace'](/{{tableName}}/g,_0x1c71bb[_0x404ad6(0x1a5)])['replace'](/{{name}}/g,_0x1c71bb[_0x404ad6(0x1ee)]);}async[a0_0x1f254f(0x1c8)](_0x3811fa,_0x222853,_0x16b95d){const _0x42c56c=a0_0x1f254f;let _0x360bc7=_0x3811fa+_0x42c56c(0x1ef);await this[_0x42c56c(0x1db)](_0x360bc7),_0x360bc7=_0x360bc7+'/'+_0x222853,await this[_0x42c56c(0x1db)](_0x360bc7),_0x360bc7+=_0x42c56c(0x1d2),await this['createDir'](_0x360bc7),_0x360bc7+=_0x42c56c(0x228),await this[_0x42c56c(0x1db)](_0x360bc7),_0x360bc7=_0x360bc7+'/'+_0x16b95d,await this[_0x42c56c(0x1db)](_0x360bc7);}[a0_0x1f254f(0x198)](){const _0x13c123=a0_0x1f254f;let _0x3a7816=process[_0x13c123(0x1ab)][_0x13c123(0x1e9)][_0x13c123(0x1af)]('/'),_0x2fe182=[];for(let _0x4a7ab3=0x0;_0x4a7ab3<_0x3a7816['length']&&_0x13c123(0x1c3)!=_0x3a7816[_0x4a7ab3];_0x4a7ab3++)_0x2fe182[_0x13c123(0x1da)](_0x3a7816[_0x4a7ab3]);return _0x2fe182[_0x13c123(0x1e2)]('/');}async['createDir'](_0x3bc83d){0x0==await this['existsPath'](_0x3bc83d)&&fs['mkdirSync'](_0x3bc83d);}async['existsPath'](_0x2f8a39){const _0x258a71=a0_0x1f254f;return await fs[_0x258a71(0x1e5)](_0x2f8a39);}};function a0_0x293b(_0x5c59bb,_0xdf25f9){const _0x1e02c3=a0_0x1e02();return a0_0x293b=function(_0x293ba0,_0x4befdb){_0x293ba0=_0x293ba0-0x194;let _0x1bb620=_0x1e02c3[_0x293ba0];return _0x1bb620;},a0_0x293b(_0x5c59bb,_0xdf25f9);}tslib_1[a0_0x1f254f(0x21c)]([(0x0,type_graphql_1['Query'])(_0x37b805=>Boolean,{'description':'Operato\x20Tool\x20Create\x20Service'}),tslib_1[a0_0x1f254f(0x220)](0x0,(0x0,type_graphql_1[a0_0x1f254f(0x1b3)])('id')),tslib_1[a0_0x1f254f(0x220)](0x1,(0x0,type_graphql_1[a0_0x1f254f(0x1bb)])()),tslib_1['__metadata'](a0_0x1f254f(0x223),Function),tslib_1['__metadata'](a0_0x1f254f(0x1c5),[String,Object]),tslib_1[a0_0x1f254f(0x1ba)](a0_0x1f254f(0x212),Promise)],OperatoToolCreateService[a0_0x1f254f(0x1df)],a0_0x1f254f(0x1f0),null),OperatoToolCreateService=tslib_1[a0_0x1f254f(0x21c)]([(0x0,type_graphql_1[a0_0x1f254f(0x1f4)])()],OperatoToolCreateService),exports[a0_0x1f254f(0x204)]=OperatoToolCreateService;const allIndex='\x0a/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0a\x0a/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0a\x0aexport\x20const\x20entities\x20=\x20[\x20\x20\x0a\x20\x20/*\x20ENTITIES\x20*/\x0a]\x20\x0a\x0a\x0aexport\x20const\x20schema\x20=\x20{\x0a\x20\x20resolverClasses:\x20[\x0a\x20\x20\x20\x20/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x20\x20]\x20\x0a}\x0a\x0aexport\x20const\x20subscribers\x20=\x20[\x0a\x20\x20/*\x20SUBSCRIBERS\x20*/\x0a]\x0a',serviceIndex=a0_0x1f254f(0x1fe),serviceHistoryIndex=a0_0x1f254f(0x1ae),serviceQuery=a0_0x1f254f(0x1a8),serviceHistoryQuery=a0_0x1f254f(0x1b5),serviceMutation=a0_0x1f254f(0x20a),sereviceType='\x0aimport\x20{\x20ObjectType,\x20Field,\x20InputType,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@InputType()\x0aexport\x20class\x20New{{pascalCase\x20name}}\x20{\x0a{{newTypeColumns}}\x0a}\x0a\x0a@InputType()\x0aexport\x20class\x20{{pascalCase\x20name}}Patch\x20{\x0a\x20\x20@Field(type\x20=>\x20ID,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20id?:\x20string\x0a\x0a{{patchTypeColumns}}\x0a\x0a\x20\x20@Field()\x0a\x20\x20cuFlag:\x20string\x0a}\x0a\x0a@ObjectType()\x0aexport\x20class\x20{{pascalCase\x20name}}List\x20{\x0a\x20\x20@Field(type\x20=>\x20[{{pascalCase\x20name}}])\x0a\x20\x20items:\x20{{pascalCase\x20name}}[]\x0a\x0a\x20\x20@Field(type\x20=>\x20Int)\x0a\x20\x20total:\x20number\x0a}\x0a',sereviceHistoryType=a0_0x1f254f(0x19a),serviceEntity='\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20Domain\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0a@Entity(\x27{{tableName}}\x27)\x0a{{indexAnn}}\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}\x20{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a',serviceEntityHistCopy=a0_0x1f254f(0x20d),serviceEntityHistJson=a0_0x1f254f(0x217),serviceEntitySubscriber=a0_0x1f254f(0x1d6);
1
+ 'use strict';function a0_0x9b62(){const _0x3d0d66=['length','double','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','createServiceFiles','/server/service/','4oSxiFL','1259106mWREtf','Int','updater','184012mJMIDY','Ctx','pluralPascalCaseName','-history\x27','/server','push','390717yInNJf','.ts','@things-factory/resource-base','Entity','decimal','datetime','createHistoryServiceFiles','mkdirSync','snakeCaseName','createNoHistoryServiceFiels','-history-type.ts','includes','Resolvers,\x20subscribers\x20as\x20','rank','timestamp\x20without\x20time\x20zone','long','198666xzanPG','EntitySubscribers,','\x0a\x20\x20','10qTszMQ','findOne','OperatoToolCreateService','EntityColumn','@Field(','getColTxtType','getRepository','createServicePath','Operato\x20Tool\x20Create\x20Service','nullable','-history.ts','created_at','__metadata','lodash','__param','replaceNamesMap','existsSync','Resolvers,','join','existsPath','creator_id','\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}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','design:paramtypes','@things-factory/shell','columnToEntityColumn',',length:','createHistoryEntityText','packages','\x20})','Float','createTypeText','type-graphql','Date','\x27,\x20nullable:\x20','writeFile','dataProp','\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','state','getFieldType','-mutation.ts','-type.ts','readFileSync','getProjectRootPath','-history-query.ts','domain','map','replace','export\x20*\x20from\x20\x27./','env','{{camelCase\x20name}}.','integer','\x20{\x20nullable:\x20','\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}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','\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','text','EntitySubscribers\x20}\x20from\x20\x27./','colType','pascalCaseName','/*\x20ENTITIES\x20*/\x0a\x09...','\x0aimport\x20{\x20ObjectType,\x20Field,\x20InputType,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@InputType()\x0aexport\x20class\x20New{{pascalCase\x20name}}\x20{\x0a{{newTypeColumns}}\x0a}\x0a\x0a@InputType()\x0aexport\x20class\x20{{pascalCase\x20name}}Patch\x20{\x0a\x20\x20@Field(type\x20=>\x20ID,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20id?:\x20string\x0a\x0a{{patchTypeColumns}}\x0a\x0a\x20\x20@Field()\x0a\x20\x20cuFlag:\x20string\x0a}\x0a\x0a@ObjectType()\x0aexport\x20class\x20{{pascalCase\x20name}}List\x20{\x0a\x20\x20@Field(type\x20=>\x20[{{pascalCase\x20name}}])\x0a\x20\x20items:\x20{{pascalCase\x20name}}[]\x0a\x0a\x20\x20@Field(type\x20=>\x20Int)\x0a\x20\x20total:\x20number\x0a}\x0a','\x0aimport\x20{\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','split','toolCreateService','uniqRank','5752itVUbf','__decorate','@Column({name:\x27','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','bigint','double\x20precision','Resolvers\x20}\x20from\x20\x27./','-query.ts','tableName','\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','number','COPY','Entities,\x20resolvers\x20as\x20','sort','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','name','prototype','pluralCamelCaseName','design:returntype','Query','...','createDir','/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...','JSON','domain_id','PWD','writeFileSync','3664030ssjhnp','updated_at','updater_id','utf8','Arg','type\x20=>','\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201','indexOf','/service','index.ts','2653OHDoNC','pluralize','1215009ahObUR','float','createEntityText','Entities,'];a0_0x9b62=function(){return _0x3d0d66;};return a0_0x9b62();}const a0_0x2aa544=a0_0x1e0e;function a0_0x1e0e(_0x153649,_0x2c9c36){const _0x9b62a6=a0_0x9b62();return a0_0x1e0e=function(_0x1e0e8d,_0x24c47c){_0x1e0e8d=_0x1e0e8d-0x1ef;let _0x1e15f1=_0x9b62a6[_0x1e0e8d];return _0x1e15f1;},a0_0x1e0e(_0x153649,_0x2c9c36);}(function(_0x2db941,_0xf67545){const _0x30b0c9=a0_0x1e0e,_0x5da6b7=_0x2db941();while(!![]){try{const _0x2a652d=parseInt(_0x30b0c9(0x26c))/0x1+parseInt(_0x30b0c9(0x256))/0x2+parseInt(_0x30b0c9(0x25c))/0x3*(parseInt(_0x30b0c9(0x252))/0x4)+parseInt(_0x30b0c9(0x26f))/0x5*(-parseInt(_0x30b0c9(0x253))/0x6)+parseInt(_0x30b0c9(0x247))/0x7*(-parseInt(_0x30b0c9(0x222))/0x8)+parseInt(_0x30b0c9(0x249))/0x9+parseInt(_0x30b0c9(0x23d))/0xa;if(_0x2a652d===_0xf67545)break;else _0x5da6b7['push'](_0x5da6b7['shift']());}catch(_0x383c3f){_0x5da6b7['push'](_0x5da6b7['shift']());}}}(a0_0x9b62,0x382e0));Object['defineProperty'](exports,'__esModule',{'value':!0x0}),exports[a0_0x2aa544(0x271)]=void 0x0;const tslib_1=require('tslib'),type_graphql_1=require(a0_0x2aa544(0x201)),shell_1=require(a0_0x2aa544(0x1f9)),resource_base_1=require(a0_0x2aa544(0x25e)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x2aa544(0x1ef)),{plural:plural}=require(a0_0x2aa544(0x248)),fs=require('fs');let OperatoToolCreateService=class{async[a0_0x2aa544(0x220)](_0x2fb3e1,_0xf5f2b7){const _0x16a950=a0_0x2aa544,{domain:_0x58c050}=_0xf5f2b7[_0x16a950(0x207)],_0xc61881=await(0x0,shell_1['getRepository'])(resource_base_1[_0x16a950(0x25f)])[_0x16a950(0x270)]({'where':{'id':_0x2fb3e1}}),_0x4faee9=await(0x0,shell_1[_0x16a950(0x275)])(resource_base_1[_0x16a950(0x272)])['find']({'where':{'domain':{'id':_0x58c050['id']},'entity':{'id':_0xc61881['id']}}});let {name:_0x3c84f5='',bundle:_0x183bbb=''}=_0xc61881||{},_0x36da92=this[_0x16a950(0x20c)](),_0x3b330f=kebabCase(_0x3c84f5);return await this[_0x16a950(0x276)](_0x36da92,_0x183bbb,_0x3b330f),await this['createServiceFiles'](_0x36da92,_0x183bbb,_0x3c84f5,_0x3b330f,_0xc61881,_0x4faee9),!0x0;}async[a0_0x2aa544(0x250)](_0x1e8f02,_0x4e4625,_0x40b243,_0x13200b,_0x383613,_0x133602){const _0x14c19f=a0_0x2aa544;let _0x57a0eb={'name':_0x13200b,'tableName':_0x383613[_0x14c19f(0x22a)],'pascalCaseName':startCase(camelCase(_0x40b243))[_0x14c19f(0x210)](/ /g,''),'camelCaseName':camelCase(_0x40b243),'snakeCaseName':snakeCase(_0x40b243),'pluralPascalCaseName':startCase(camelCase(plural(_0x40b243)))[_0x14c19f(0x210)](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x40b243))},_0x4583a8=_0x1e8f02+'/packages/'+_0x4e4625+_0x14c19f(0x251);[_0x14c19f(0x239),_0x14c19f(0x22d)]['includes'](_0x383613['dataProp'])?await this[_0x14c19f(0x262)](_0x4583a8,_0x13200b,_0x383613,_0x133602,_0x57a0eb):await this[_0x14c19f(0x265)](_0x4583a8,_0x13200b,_0x383613,_0x133602,_0x57a0eb);}async[a0_0x2aa544(0x262)](_0x4459a3,_0x105fd0,_0x599cff,_0x3b7db3,_0x59dd00){const _0x153714=a0_0x2aa544;await this[_0x153714(0x204)](_0x4459a3+(_0x105fd0+'/index.ts'),serviceHistoryIndex,_0x59dd00);let _0x2e6220=this[_0x153714(0x24b)](_0x599cff,_0x3b7db3);await this['writeFile'](_0x4459a3+(_0x105fd0+'/'+_0x105fd0+_0x153714(0x25d)),_0x2e6220,_0x59dd00),await this[_0x153714(0x204)](_0x4459a3+(_0x105fd0+'/'+_0x105fd0+_0x153714(0x229)),serviceQuery,_0x59dd00),await this[_0x153714(0x204)](_0x4459a3+(_0x105fd0+'/'+_0x105fd0+_0x153714(0x209)),serviceMutation,_0x59dd00);let _0x1ef4b4=this['createTypeText'](_0x3b7db3);await this[_0x153714(0x204)](_0x4459a3+(_0x105fd0+'/'+_0x105fd0+_0x153714(0x20a)),_0x1ef4b4,_0x59dd00);let _0x4961ae=this[_0x153714(0x1fc)](_0x599cff,_0x3b7db3);await this[_0x153714(0x204)](_0x4459a3+(_0x105fd0+'/'+_0x105fd0+_0x153714(0x279)),_0x4961ae,_0x59dd00);let _0x3f620b='';_0x153714(0x239)==_0x599cff[_0x153714(0x205)]?(_0x3f620b=_0x153714(0x217),await this[_0x153714(0x204)](_0x4459a3+(_0x105fd0+'/event-subscriber.ts'),serviceEntitySubscriber,_0x59dd00)):_0x3f620b='';let _0x577b66=serviceEntitySubscriber[_0x153714(0x210)](/{{entityToJson}}/g,_0x3f620b);await this[_0x153714(0x204)](_0x4459a3+(_0x105fd0+'/event-subscriber.ts'),_0x577b66,_0x59dd00),await this[_0x153714(0x204)](_0x4459a3+(_0x105fd0+'/'+_0x105fd0+_0x153714(0x20d)),serviceHistoryQuery,_0x59dd00),await this[_0x153714(0x204)](_0x4459a3+(_0x105fd0+'/'+_0x105fd0+_0x153714(0x266)),sereviceHistoryType,_0x59dd00);let _0x472cbc=_0x4459a3+_0x153714(0x246);0x0==await this[_0x153714(0x1f5)](_0x472cbc)&&await this[_0x153714(0x204)](_0x472cbc,allIndex,_0x59dd00);let _0xc8bce6=await fs['readFileSync'](_0x472cbc,_0x153714(0x240));_0xc8bce6['indexOf']('export\x20*\x20from\x20\x27./'+_0x59dd00['name']+'/'+_0x59dd00[_0x153714(0x231)]+_0x153714(0x259))<0x0&&(_0xc8bce6=_0xc8bce6[_0x153714(0x210)](/\/\* EXPORT ENTITY TYPES \*\//,_0x153714(0x230)+_0x59dd00['name']+'/'+_0x59dd00[_0x153714(0x231)]+_0x153714(0x259))),_0xc8bce6[_0x153714(0x244)](_0x153714(0x211)+_0x59dd00[_0x153714(0x231)]+'/'+_0x59dd00['name']+'\x27')<0x0&&(_0xc8bce6=_0xc8bce6[_0x153714(0x210)](/\/\* EXPORT ENTITY TYPES \*\//,_0x153714(0x230)+_0x59dd00['name']+'/'+_0x59dd00[_0x153714(0x231)]+'\x27')),_0xc8bce6[_0x153714(0x244)]('import\x20{\x20entities\x20as\x20'+_0x59dd00[_0x153714(0x21b)]+_0x153714(0x22e)+_0x59dd00['pascalCaseName']+'Resolvers,\x20subscribers\x20as\x20'+_0x59dd00['pascalCaseName']+_0x153714(0x219)+_0x59dd00['name']+'\x27')<0x0&&(_0xc8bce6=_0xc8bce6[_0x153714(0x210)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x153714(0x24f)+_0x59dd00[_0x153714(0x21b)]+'Entities,\x20resolvers\x20as\x20'+_0x59dd00[_0x153714(0x21b)]+_0x153714(0x268)+_0x59dd00[_0x153714(0x21b)]+_0x153714(0x219)+_0x59dd00[_0x153714(0x231)]+'\x27')),_0xc8bce6[_0x153714(0x244)](_0x153714(0x236)+_0x59dd00[_0x153714(0x21b)]+_0x153714(0x24c))<0x0&&(_0xc8bce6=_0xc8bce6[_0x153714(0x210)](/\/\* ENTITIES \*\//,_0x153714(0x21c)+_0x59dd00[_0x153714(0x21b)]+'Entities,')),_0xc8bce6['indexOf'](_0x153714(0x236)+_0x59dd00[_0x153714(0x21b)]+_0x153714(0x1f3))<0x0&&(_0xc8bce6=_0xc8bce6[_0x153714(0x210)](/\/\* RESOLVER CLASSES \*\//,'/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...'+_0x59dd00['pascalCaseName']+'Resolvers,')),_0xc8bce6[_0x153714(0x244)](_0x153714(0x236)+_0x59dd00['pascalCaseName']+_0x153714(0x26d))<0x0&&(_0xc8bce6=_0xc8bce6[_0x153714(0x210)](/\/\* SUBSCRIBERS \*\//,_0x153714(0x238)+_0x59dd00[_0x153714(0x21b)]+_0x153714(0x26d))),await this[_0x153714(0x204)](_0x472cbc,_0xc8bce6,_0x59dd00);}async[a0_0x2aa544(0x265)](_0x4ac0c4,_0x5f3eb4,_0x430e16,_0x2c5e9c,_0x22c66b){const _0x1ae4e2=a0_0x2aa544;await this['writeFile'](_0x4ac0c4+(_0x5f3eb4+'/index.ts'),serviceIndex,_0x22c66b),await this[_0x1ae4e2(0x204)](_0x4ac0c4+(_0x5f3eb4+'/'+_0x5f3eb4+_0x1ae4e2(0x229)),serviceQuery,_0x22c66b),await this[_0x1ae4e2(0x204)](_0x4ac0c4+(_0x5f3eb4+'/'+_0x5f3eb4+'-mutation.ts'),serviceMutation,_0x22c66b);let _0x211ea7=this[_0x1ae4e2(0x24b)](_0x430e16,_0x2c5e9c);await this[_0x1ae4e2(0x204)](_0x4ac0c4+(_0x5f3eb4+'/'+_0x5f3eb4+'.ts'),_0x211ea7,_0x22c66b);let _0x3fc01e=this[_0x1ae4e2(0x200)](_0x2c5e9c);await this[_0x1ae4e2(0x204)](_0x4ac0c4+(_0x5f3eb4+'/'+_0x5f3eb4+_0x1ae4e2(0x20a)),_0x3fc01e,_0x22c66b);let _0x4e9d21=_0x4ac0c4+_0x1ae4e2(0x246);0x0==await this['existsPath'](_0x4e9d21)&&await this['writeFile'](_0x4e9d21,allIndex,_0x22c66b);let _0x2b3820=await fs[_0x1ae4e2(0x20b)](_0x4e9d21,_0x1ae4e2(0x240));_0x2b3820[_0x1ae4e2(0x244)](_0x1ae4e2(0x211)+_0x22c66b[_0x1ae4e2(0x231)]+'/'+_0x22c66b[_0x1ae4e2(0x231)]+'\x27')<0x0&&(_0x2b3820=_0x2b3820[_0x1ae4e2(0x210)](/\/\* EXPORT ENTITY TYPES \*\//,_0x1ae4e2(0x230)+_0x22c66b[_0x1ae4e2(0x231)]+'/'+_0x22c66b[_0x1ae4e2(0x231)]+'\x27')),_0x2b3820[_0x1ae4e2(0x244)]('import\x20{\x20entities\x20as\x20'+_0x22c66b['pascalCaseName']+_0x1ae4e2(0x22e)+_0x22c66b[_0x1ae4e2(0x21b)]+'Resolvers\x20}\x20from\x20\x27./'+_0x22c66b[_0x1ae4e2(0x231)]+'\x27')<0x0&&(_0x2b3820=_0x2b3820[_0x1ae4e2(0x210)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x1ae4e2(0x24f)+_0x22c66b[_0x1ae4e2(0x21b)]+_0x1ae4e2(0x22e)+_0x22c66b[_0x1ae4e2(0x21b)]+_0x1ae4e2(0x228)+_0x22c66b[_0x1ae4e2(0x231)]+'\x27')),_0x2b3820[_0x1ae4e2(0x244)]('...'+_0x22c66b[_0x1ae4e2(0x21b)]+_0x1ae4e2(0x24c))<0x0&&(_0x2b3820=_0x2b3820['replace'](/\/\* ENTITIES \*\//,_0x1ae4e2(0x21c)+_0x22c66b[_0x1ae4e2(0x21b)]+_0x1ae4e2(0x24c))),_0x2b3820[_0x1ae4e2(0x244)](_0x1ae4e2(0x236)+_0x22c66b[_0x1ae4e2(0x21b)]+_0x1ae4e2(0x1f3))<0x0&&(_0x2b3820=_0x2b3820[_0x1ae4e2(0x210)](/\/\* RESOLVER CLASSES \*\//,_0x1ae4e2(0x225)+_0x22c66b[_0x1ae4e2(0x21b)]+_0x1ae4e2(0x1f3))),await this[_0x1ae4e2(0x204)](_0x4e9d21,_0x2b3820,_0x22c66b);}[a0_0x2aa544(0x200)](_0x522331){const _0x4db1da=a0_0x2aa544;let _0x51155a=sereviceType,_0x13b96f=_0x522331['map'](_0x23a485=>{const _0x4f649f=a0_0x1e0e;if('id'==_0x23a485[_0x4f649f(0x231)])return'';if('domain_id'==_0x23a485[_0x4f649f(0x231)])return'';if(_0x4f649f(0x27a)==_0x23a485[_0x4f649f(0x231)])return'';if(_0x4f649f(0x23e)==_0x23a485[_0x4f649f(0x231)])return'';if('creator_id'==_0x23a485[_0x4f649f(0x231)])return'';if('updater_id'==_0x23a485[_0x4f649f(0x231)])return'';let _0x273de1=this[_0x4f649f(0x208)](_0x23a485),_0xcd948=this['getColTxtType'](_0x23a485),_0x111c28=camelCase(_0x23a485[_0x4f649f(0x231)]);return'\x20\x20'+(_0x4f649f(0x273)+(0x0==_0x273de1[_0x4f649f(0x24d)]?'':_0x4f649f(0x242)+_0x273de1+',')+_0x4f649f(0x215)+_0x23a485[_0x4f649f(0x278)]+_0x4f649f(0x1fe))+_0x4f649f(0x26e)+(''+_0x111c28+(_0x23a485[_0x4f649f(0x278)]?'?':'')+':\x20'+_0xcd948)+'\x0a';});_0x51155a=_0x51155a[_0x4db1da(0x210)](/{{newTypeColumns}}/g,_0x13b96f[_0x4db1da(0x1f4)]('\x0a'));let _0x31fa5b=_0x522331['map'](_0x272d81=>{const _0x4aa2f5=_0x4db1da;if('id'==_0x272d81[_0x4aa2f5(0x231)])return'';if(_0x4aa2f5(0x23a)==_0x272d81[_0x4aa2f5(0x231)])return'';if(_0x4aa2f5(0x27a)==_0x272d81[_0x4aa2f5(0x231)])return'';if(_0x4aa2f5(0x23e)==_0x272d81[_0x4aa2f5(0x231)])return'';if(_0x4aa2f5(0x1f6)==_0x272d81[_0x4aa2f5(0x231)])return'';if(_0x4aa2f5(0x23f)==_0x272d81[_0x4aa2f5(0x231)])return'';let _0x2a3f17=this[_0x4aa2f5(0x208)](_0x272d81),_0x4b4304=this[_0x4aa2f5(0x274)](_0x272d81);_0x272d81['nullable']=!0x0;let _0x55e64f=camelCase(_0x272d81[_0x4aa2f5(0x231)]);return'\x20\x20'+(_0x4aa2f5(0x273)+(0x0==_0x2a3f17[_0x4aa2f5(0x24d)]?'':_0x4aa2f5(0x242)+_0x2a3f17+',')+'\x20{\x20nullable:\x20'+_0x272d81[_0x4aa2f5(0x278)]+_0x4aa2f5(0x1fe))+_0x4aa2f5(0x26e)+(''+_0x55e64f+(_0x272d81[_0x4aa2f5(0x278)]?'?':'')+':\x20'+_0x4b4304)+'\x0a';});return _0x51155a=_0x51155a['replace'](/{{patchTypeColumns}}/g,_0x31fa5b[_0x4db1da(0x1f4)]('\x0a')),_0x51155a;}[a0_0x2aa544(0x24b)](_0x43f95a,_0x3cabc4){const _0x22960d=a0_0x2aa544;let _0xfd7dbb=serviceEntity,_0x260572=_0x3cabc4[_0x22960d(0x22f)](function(_0x344164,_0x2f946c){const _0x198758=_0x22960d;return _0x344164[_0x198758(0x269)]-_0x2f946c[_0x198758(0x269)];})['map'](_0x410093=>this[_0x22960d(0x1fa)](_0x410093));[_0x22960d(0x22d),_0x22960d(0x239)][_0x22960d(0x267)](_0x43f95a[_0x22960d(0x205)])&&_0x260572[_0x22960d(0x25b)](_0x22960d(0x243)),_0xfd7dbb=_0xfd7dbb['replace'](/{{entityColumns}}/g,_0x260572[_0x22960d(0x1f4)]('\x0a'));let _0x4cc39d='',_0x31a01c=_0x3cabc4['filter'](_0x3f7793=>_0x3f7793[_0x22960d(0x221)]&&_0x3f7793[_0x22960d(0x221)]>0x0)[_0x22960d(0x22f)](function(_0x240870,_0x1b4db9){const _0x18bbea=_0x22960d;return _0x240870[_0x18bbea(0x221)]-_0x1b4db9['uniqRank'];});if(_0x31a01c[_0x22960d(0x24d)]>0x0){_0x4cc39d='@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})';let _0x162d88=_0x31a01c[_0x22960d(0x20f)](_0x45b49b=>{const _0x5b1519=_0x22960d;let _0x5c1fc7=_0x45b49b['name'];return _0x5b1519(0x23a)==_0x45b49b['name']&&(_0x5c1fc7=_0x5b1519(0x20e)),_0x5b1519(0x1f6)==_0x45b49b['name']&&(_0x5c1fc7='creator'),_0x5b1519(0x23f)==_0x45b49b[_0x5b1519(0x231)]&&(_0x5c1fc7=_0x5b1519(0x255)),_0x5b1519(0x213)+camelCase(_0x5c1fc7);});_0x4cc39d=_0x4cc39d[_0x22960d(0x210)](/{{indexColumns}}/g,_0x162d88[_0x22960d(0x1f4)](','));}return _0xfd7dbb=_0xfd7dbb['replace'](/{{indexAnn}}/g,_0x4cc39d),_0xfd7dbb;}[a0_0x2aa544(0x1fc)](_0x1e7c91,_0x28df40){const _0x2410ee=a0_0x2aa544;let _0x5d3b73=_0x2410ee(0x239)==_0x1e7c91['dataProp']?serviceEntityHistJson:serviceEntityHistCopy,_0x6931d5=_0x28df40[_0x2410ee(0x22f)](function(_0x2b6e6b,_0x110c87){const _0x4c1b62=_0x2410ee;return _0x2b6e6b['rank']-_0x110c87[_0x4c1b62(0x269)];})[_0x2410ee(0x20f)](_0x491022=>this[_0x2410ee(0x1fa)](_0x491022));return _0x5d3b73=_0x5d3b73[_0x2410ee(0x210)](/{{entityColumns}}/g,_0x6931d5[_0x2410ee(0x1f4)]('\x0a')),_0x5d3b73;}[a0_0x2aa544(0x1fa)](_0x4a1be6){const _0x5509c5=a0_0x2aa544;if('id'==_0x4a1be6['name'])return'';if(_0x5509c5(0x23a)==_0x4a1be6[_0x5509c5(0x231)])return'';if(_0x5509c5(0x27a)==_0x4a1be6[_0x5509c5(0x231)])return'';if(_0x5509c5(0x23e)==_0x4a1be6[_0x5509c5(0x231)])return'';if(_0x5509c5(0x1f6)==_0x4a1be6[_0x5509c5(0x231)])return'';if(_0x5509c5(0x23f)==_0x4a1be6[_0x5509c5(0x231)])return'';let _0xe1856f=_0x4a1be6[_0x5509c5(0x21a)];_0x5509c5(0x24e)==_0x4a1be6[_0x5509c5(0x21a)]&&(_0xe1856f=_0x5509c5(0x227)),_0x5509c5(0x26b)==_0x4a1be6[_0x5509c5(0x21a)]&&(_0xe1856f=_0x5509c5(0x226)),'string'==_0x4a1be6[_0x5509c5(0x21a)]&&(_0xe1856f='character\x20varying'),_0x5509c5(0x261)==_0x4a1be6[_0x5509c5(0x21a)]&&(_0xe1856f=_0x5509c5(0x26a));let _0x4b6d6d='';'string'==_0x4a1be6[_0x5509c5(0x21a)]&&(_0x4b6d6d=_0x4a1be6['colSize']);let _0x26060f=this[_0x5509c5(0x208)](_0x4a1be6),_0x22a8e2=this['getColTxtType'](_0x4a1be6),_0x167f41=camelCase(_0x4a1be6[_0x5509c5(0x231)]);return'\x20\x20'+(_0x5509c5(0x224)+_0x4a1be6[_0x5509c5(0x231)]+'\x27,\x20type:\x20\x27'+_0xe1856f+_0x5509c5(0x203)+_0x4a1be6[_0x5509c5(0x278)]+'\x20'+(0x0==_0x4b6d6d[_0x5509c5(0x24d)]?'':_0x5509c5(0x1fb)+_0x4b6d6d)+_0x5509c5(0x1fe))+_0x5509c5(0x26e)+(_0x5509c5(0x273)+(0x0==_0x26060f[_0x5509c5(0x24d)]?'':_0x5509c5(0x242)+_0x26060f+',')+_0x5509c5(0x215)+_0x4a1be6[_0x5509c5(0x278)]+_0x5509c5(0x1fe))+_0x5509c5(0x26e)+(''+_0x167f41+(_0x4a1be6['nullable']?'?':'')+':\x20'+_0x22a8e2)+'\x0a';}[a0_0x2aa544(0x208)](_0x400286){const _0x3eacd7=a0_0x2aa544;let _0x21d578='';return'double'==_0x400286[_0x3eacd7(0x21a)]&&(_0x21d578='Float'),_0x3eacd7(0x24a)==_0x400286[_0x3eacd7(0x21a)]&&(_0x21d578=_0x3eacd7(0x1ff)),_0x3eacd7(0x26b)==_0x400286[_0x3eacd7(0x21a)]&&(_0x21d578=_0x3eacd7(0x254)),'integer'==_0x400286[_0x3eacd7(0x21a)]&&(_0x21d578=_0x3eacd7(0x254)),_0x21d578;}['getColTxtType'](_0x1d047f){const _0x1c4d9a=a0_0x2aa544;let _0x19e36d=_0x1d047f[_0x1c4d9a(0x21a)];return _0x1c4d9a(0x260)==_0x1d047f[_0x1c4d9a(0x21a)]&&(_0x19e36d=_0x1c4d9a(0x22c)),_0x1c4d9a(0x24e)==_0x1d047f['colType']&&(_0x19e36d=_0x1c4d9a(0x22c)),_0x1c4d9a(0x24a)==_0x1d047f[_0x1c4d9a(0x21a)]&&(_0x19e36d=_0x1c4d9a(0x22c)),_0x1c4d9a(0x214)==_0x1d047f[_0x1c4d9a(0x21a)]&&(_0x19e36d=_0x1c4d9a(0x22c)),_0x1c4d9a(0x26b)==_0x1d047f['colType']&&(_0x19e36d=_0x1c4d9a(0x22c)),'datetime'==_0x1d047f[_0x1c4d9a(0x21a)]&&(_0x19e36d='Date'),'date'==_0x1d047f['colType']&&(_0x19e36d=_0x1c4d9a(0x202)),_0x1c4d9a(0x218)==_0x1d047f[_0x1c4d9a(0x21a)]&&(_0x19e36d='string'),_0x19e36d;}async[a0_0x2aa544(0x204)](_0x5236f6,_0x53389f,_0x415b06){const _0x4232ff=a0_0x2aa544;await fs[_0x4232ff(0x23c)](_0x5236f6,this['replaceNamesMap'](_0x53389f,_0x415b06),_0x4232ff(0x240));}[a0_0x2aa544(0x1f1)](_0x1337d4,_0x3ba899){const _0x348fc8=a0_0x2aa544;return _0x1337d4[_0x348fc8(0x210)](/{{pascalCase name}}/g,_0x3ba899[_0x348fc8(0x21b)])['replace'](/{{camelCase name}}/g,_0x3ba899['camelCaseName'])[_0x348fc8(0x210)](/{{snakeCase name}}/g,_0x3ba899[_0x348fc8(0x264)])[_0x348fc8(0x210)](/{{pluralPascalCase name}}/g,_0x3ba899[_0x348fc8(0x258)])['replace'](/{{pluralCamelCase name}}/g,_0x3ba899[_0x348fc8(0x233)])[_0x348fc8(0x210)](/{{tableName}}/g,_0x3ba899[_0x348fc8(0x22a)])[_0x348fc8(0x210)](/{{name}}/g,_0x3ba899[_0x348fc8(0x231)]);}async[a0_0x2aa544(0x276)](_0x216f47,_0x5611c5,_0x18a807){const _0x201112=a0_0x2aa544;let _0x1476c4=_0x216f47+'/packages';await this[_0x201112(0x237)](_0x1476c4),_0x1476c4=_0x1476c4+'/'+_0x5611c5,await this[_0x201112(0x237)](_0x1476c4),_0x1476c4+=_0x201112(0x25a),await this[_0x201112(0x237)](_0x1476c4),_0x1476c4+=_0x201112(0x245),await this[_0x201112(0x237)](_0x1476c4),_0x1476c4=_0x1476c4+'/'+_0x18a807,await this['createDir'](_0x1476c4);}[a0_0x2aa544(0x20c)](){const _0x158bd4=a0_0x2aa544;let _0x19549c=process[_0x158bd4(0x212)][_0x158bd4(0x23b)][_0x158bd4(0x21f)]('/'),_0xbe66f6=[];for(let _0x2fd6ae=0x0;_0x2fd6ae<_0x19549c[_0x158bd4(0x24d)]&&_0x158bd4(0x1fd)!=_0x19549c[_0x2fd6ae];_0x2fd6ae++)_0xbe66f6['push'](_0x19549c[_0x2fd6ae]);return _0xbe66f6[_0x158bd4(0x1f4)]('/');}async[a0_0x2aa544(0x237)](_0x1a08ca){const _0x5525b0=a0_0x2aa544;0x0==await this[_0x5525b0(0x1f5)](_0x1a08ca)&&fs[_0x5525b0(0x263)](_0x1a08ca);}async[a0_0x2aa544(0x1f5)](_0x5b7def){const _0x204f3e=a0_0x2aa544;return await fs[_0x204f3e(0x1f2)](_0x5b7def);}};tslib_1[a0_0x2aa544(0x223)]([(0x0,type_graphql_1[a0_0x2aa544(0x235)])(_0x51611a=>Boolean,{'description':a0_0x2aa544(0x277)}),tslib_1[a0_0x2aa544(0x1f0)](0x0,(0x0,type_graphql_1[a0_0x2aa544(0x241)])('id')),tslib_1[a0_0x2aa544(0x1f0)](0x1,(0x0,type_graphql_1[a0_0x2aa544(0x257)])()),tslib_1[a0_0x2aa544(0x27b)]('design:type',Function),tslib_1[a0_0x2aa544(0x27b)](a0_0x2aa544(0x1f8),[String,Object]),tslib_1['__metadata'](a0_0x2aa544(0x234),Promise)],OperatoToolCreateService[a0_0x2aa544(0x232)],a0_0x2aa544(0x220),null),OperatoToolCreateService=tslib_1[a0_0x2aa544(0x223)]([(0x0,type_graphql_1['Resolver'])()],OperatoToolCreateService),exports['OperatoToolCreateService']=OperatoToolCreateService;const allIndex='\x0a/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0a\x0a/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0a\x0aexport\x20const\x20entities\x20=\x20[\x20\x20\x0a\x20\x20/*\x20ENTITIES\x20*/\x0a]\x20\x0a\x0a\x0aexport\x20const\x20schema\x20=\x20{\x0a\x20\x20resolverClasses:\x20[\x0a\x20\x20\x20\x20/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x20\x20]\x20\x0a}\x0a\x0aexport\x20const\x20subscribers\x20=\x20[\x0a\x20\x20/*\x20SUBSCRIBERS\x20*/\x0a]\x0a',serviceIndex='\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}}]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}Mutation]\x0a',serviceHistoryIndex=a0_0x2aa544(0x1f7),serviceQuery='\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',serviceHistoryQuery=a0_0x2aa544(0x216),serviceMutation=a0_0x2aa544(0x22b),sereviceType=a0_0x2aa544(0x21d),sereviceHistoryType='\x0aimport\x20{\x20ObjectType,\x20Field,\x20InputType,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0a\x0a@ObjectType()\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryList\x20{\x0a\x20\x20@Field(type\x20=>\x20[{{pascalCase\x20name}}History])\x0a\x20\x20items:\x20{{pascalCase\x20name}}History[]\x0a\x0a\x20\x20@Field(type\x20=>\x20Int)\x0a\x20\x20total:\x20number\x0a}\x0a',serviceEntity='\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20Domain\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0a@Entity(\x27{{tableName}}\x27)\x0a{{indexAnn}}\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}\x20{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a',serviceEntityHistCopy=a0_0x2aa544(0x206),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_0x2aa544(0x21e);
@@ -1 +1 @@
1
- 'use strict';function a0_0x29e4(){const _0x187495=['4829LWSujf','1144269TYUtYX','1768830zTsHBU','55917HmNcEg','select','750398BXqXCC','checkStudioPermission','INVALID_LICENSE','112CSEmEn','(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)','manager','menu','Studio','LicenseError','includes','121970BqfdmA','map','checkTarget','430971tpRCuO','14556NZiDOh','getRepository','ERROR_CODES','andWhere','where','@things-factory/shell','../../errors/license-error','8lrWJPg','trim','createQueryBuilder','from','getPermission','Menu','defineProperty','342PLEsXZ','@things-factory/operato-license-checker','5IcPjRC','getCount'];a0_0x29e4=function(){return _0x187495;};return a0_0x29e4();}const a0_0xfffa76=a0_0x41f2;function a0_0x41f2(_0x412c9e,_0x558bbe){const _0x29e4e8=a0_0x29e4();return a0_0x41f2=function(_0x41f280,_0x4f8b8f){_0x41f280=_0x41f280-0xf4;let _0x588926=_0x29e4e8[_0x41f280];return _0x588926;},a0_0x41f2(_0x412c9e,_0x558bbe);}(function(_0x3fb2f1,_0x5c0164){const _0x537afb=a0_0x41f2,_0x10151f=_0x3fb2f1();while(!![]){try{const _0x14113a=-parseInt(_0x537afb(0xf5))/0x1+parseInt(_0x537afb(0x10d))/0x2+-parseInt(_0x537afb(0x10b))/0x3*(-parseInt(_0x537afb(0x110))/0x4)+-parseInt(_0x537afb(0x106))/0x5*(parseInt(_0x537afb(0x10a))/0x6)+-parseInt(_0x537afb(0x109))/0x7*(-parseInt(_0x537afb(0xfd))/0x8)+-parseInt(_0x537afb(0x104))/0x9*(parseInt(_0x537afb(0x117))/0xa)+parseInt(_0x537afb(0x108))/0xb*(parseInt(_0x537afb(0xf6))/0xc);if(_0x14113a===_0x5c0164)break;else _0x10151f['push'](_0x10151f['shift']());}catch(_0x59d6b4){_0x10151f['push'](_0x10151f['shift']());}}}(a0_0x29e4,0x6295b));Object[a0_0xfffa76(0x103)](exports,'__esModule',{'value':!0x0}),exports['checkStudioTemplateIsOverLimit']=exports[a0_0xfffa76(0x10e)]=void 0x0;const operato_license_checker_1=require(a0_0xfffa76(0x105)),shell_1=require(a0_0xfffa76(0xfb)),menu_base_1=require('@things-factory/menu-base'),license_error_1=require(a0_0xfffa76(0xfc));async function checkStudioPermission(){const _0x523274=a0_0xfffa76;let _0x5324d6=((0x0,operato_license_checker_1[_0x523274(0x101)])('Permissions\x20For\x20Tailor\x20Tool')||',')['split'](',')[_0x523274(0x118)](_0x1d3994=>_0x1d3994[_0x523274(0xfe)]()),_0x3df30e=!0x1;return _0x5324d6['forEach'](_0x434aa1=>{const _0x18df22=_0x523274;_0x434aa1[_0x18df22(0x116)](_0x18df22(0x114))&&(_0x3df30e=!0x0);}),_0x3df30e;}async function checkStudioTemplateIsOverLimit(_0x16e318,_0x3aca37){const _0x361a49=a0_0xfffa76;if(0x0==await checkStudioPermission())throw new license_error_1['LicenseError']({'errorCode':_0x3aca37['t'](license_error_1[_0x361a49(0x115)][_0x361a49(0xf8)][_0x361a49(0x10f)])});var _0x7f4dfc=0x0;if(_0x7f4dfc=_0x16e318&&''!=_0x16e318?await(0x0,shell_1[_0x361a49(0xf7)])(menu_base_1[_0x361a49(0x102)])[_0x361a49(0x112)]['createQueryBuilder']()[_0x361a49(0x10c)](_0x361a49(0x113))[_0x361a49(0x100)](menu_base_1['Menu'],_0x361a49(0x113))[_0x361a49(0xfa)]('id\x20!=\x20:id',{'id':_0x16e318})[_0x361a49(0xf9)](_0x361a49(0x111))[_0x361a49(0x107)]()+0x1:await(0x0,shell_1[_0x361a49(0xf7)])(menu_base_1['Menu'])[_0x361a49(0x112)][_0x361a49(0xff)]()['select'](_0x361a49(0x113))['from'](menu_base_1['Menu'],_0x361a49(0x113))[_0x361a49(0xfa)](_0x361a49(0x111))[_0x361a49(0x107)]()+0x1,!(0x0,operato_license_checker_1[_0x361a49(0xf4)])(_0x7f4dfc))throw new license_error_1[(_0x361a49(0x115))]({'errorCode':_0x3aca37['t'](license_error_1[_0x361a49(0x115)][_0x361a49(0xf8)]['OVER_LIMIT'])});return!0x0;}exports['checkStudioPermission']=checkStudioPermission,exports['checkStudioTemplateIsOverLimit']=checkStudioTemplateIsOverLimit;
1
+ 'use strict';function a0_0x44d5(_0x4090d4,_0x1ec586){const _0xd8905d=a0_0xd890();return a0_0x44d5=function(_0x44d5d5,_0x2d30c9){_0x44d5d5=_0x44d5d5-0x97;let _0x54feb1=_0xd8905d[_0x44d5d5];return _0x54feb1;},a0_0x44d5(_0x4090d4,_0x1ec586);}const a0_0x5b61c4=a0_0x44d5;(function(_0x4fa871,_0xbe925a){const _0x5ce2d0=a0_0x44d5,_0x382f71=_0x4fa871();while(!![]){try{const _0x4877c8=-parseInt(_0x5ce2d0(0xaa))/0x1*(parseInt(_0x5ce2d0(0xac))/0x2)+-parseInt(_0x5ce2d0(0xb2))/0x3+-parseInt(_0x5ce2d0(0xaf))/0x4*(parseInt(_0x5ce2d0(0x98))/0x5)+-parseInt(_0x5ce2d0(0xb5))/0x6*(-parseInt(_0x5ce2d0(0xa0))/0x7)+-parseInt(_0x5ce2d0(0x9d))/0x8+-parseInt(_0x5ce2d0(0xb8))/0x9*(-parseInt(_0x5ce2d0(0xa6))/0xa)+parseInt(_0x5ce2d0(0xa9))/0xb;if(_0x4877c8===_0xbe925a)break;else _0x382f71['push'](_0x382f71['shift']());}catch(_0xe74f6d){_0x382f71['push'](_0x382f71['shift']());}}}(a0_0xd890,0x5fe16));Object[a0_0x5b61c4(0xbe)](exports,a0_0x5b61c4(0xb3),{'value':!0x0}),exports[a0_0x5b61c4(0xa8)]=exports['checkStudioPermission']=void 0x0;const operato_license_checker_1=require('@things-factory/operato-license-checker'),shell_1=require(a0_0x5b61c4(0xb9)),menu_base_1=require('@things-factory/menu-base'),license_error_1=require(a0_0x5b61c4(0xa4));async function checkStudioPermission(){const _0x39c018=a0_0x5b61c4;let _0x30d7da=((0x0,operato_license_checker_1[_0x39c018(0xa1)])(_0x39c018(0xa5))||',')[_0x39c018(0x9b)](',')[_0x39c018(0x9c)](_0x1b6881=>_0x1b6881[_0x39c018(0xb6)]()),_0x397013=!0x1;return _0x30d7da['forEach'](_0xb85cb1=>{const _0x51333c=_0x39c018;_0xb85cb1[_0x51333c(0x97)]('Studio')&&(_0x397013=!0x0);}),_0x397013;}async function checkStudioTemplateIsOverLimit(_0x814060,_0x1653d9){const _0x2c3f4d=a0_0x5b61c4;if(0x0==await checkStudioPermission())throw new license_error_1[(_0x2c3f4d(0xba))]({'errorCode':_0x1653d9['t'](license_error_1[_0x2c3f4d(0xba)][_0x2c3f4d(0xab)][_0x2c3f4d(0xb1)])});var _0x4de931=0x0;if(_0x4de931=_0x814060&&''!=_0x814060?await(0x0,shell_1[_0x2c3f4d(0xad)])(menu_base_1[_0x2c3f4d(0xa3)])['manager'][_0x2c3f4d(0xb7)]()['select'](_0x2c3f4d(0xa2))[_0x2c3f4d(0xa7)](menu_base_1[_0x2c3f4d(0xa3)],_0x2c3f4d(0xa2))[_0x2c3f4d(0x9e)](_0x2c3f4d(0xbc),{'id':_0x814060})[_0x2c3f4d(0x99)](_0x2c3f4d(0xae))[_0x2c3f4d(0xb0)]()+0x1:await(0x0,shell_1['getRepository'])(menu_base_1['Menu'])[_0x2c3f4d(0xbb)][_0x2c3f4d(0xb7)]()[_0x2c3f4d(0x9f)](_0x2c3f4d(0xa2))[_0x2c3f4d(0xa7)](menu_base_1[_0x2c3f4d(0xa3)],_0x2c3f4d(0xa2))[_0x2c3f4d(0x9e)]('(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)')['getCount']()+0x1,!(0x0,operato_license_checker_1[_0x2c3f4d(0x9a)])(_0x4de931))throw new license_error_1['LicenseError']({'errorCode':_0x1653d9['t'](license_error_1['LicenseError']['ERROR_CODES'][_0x2c3f4d(0xb4)])});return!0x0;}exports[a0_0x5b61c4(0xbd)]=checkStudioPermission,exports['checkStudioTemplateIsOverLimit']=checkStudioTemplateIsOverLimit;function a0_0xd890(){const _0x56daf3=['split','map','3000024KBUESF','where','select','163023lkvcpA','getPermission','menu','Menu','../../errors/license-error','Permissions\x20For\x20Tailor\x20Tool','83890rtxxes','from','checkStudioTemplateIsOverLimit','11454476ZneQaA','2GKemBD','ERROR_CODES','393282erNSCp','getRepository','(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)','380XVpkUa','getCount','INVALID_LICENSE','30018rCyFQp','__esModule','OVER_LIMIT','6UKZhgH','trim','createQueryBuilder','387EGzDTC','@things-factory/shell','LicenseError','manager','id\x20!=\x20:id','checkStudioPermission','defineProperty','includes','13385gBhsGA','andWhere','checkTarget'];a0_0xd890=function(){return _0x56daf3;};return a0_0xd890();}
@@ -1 +1 @@
1
- 'use strict';const a0_0x3b50e2=a0_0x5357;(function(_0x1ef52d,_0x592a96){const _0x54531b=a0_0x5357,_0x2ee02a=_0x1ef52d();while(!![]){try{const _0x503a88=parseInt(_0x54531b(0x1df))/0x1+parseInt(_0x54531b(0x1ef))/0x2*(parseInt(_0x54531b(0x1dd))/0x3)+parseInt(_0x54531b(0x1f1))/0x4+-parseInt(_0x54531b(0x1eb))/0x5*(-parseInt(_0x54531b(0x1e7))/0x6)+-parseInt(_0x54531b(0x1ee))/0x7+parseInt(_0x54531b(0x1f4))/0x8*(parseInt(_0x54531b(0x1e6))/0x9)+-parseInt(_0x54531b(0x1f2))/0xa;if(_0x503a88===_0x592a96)break;else _0x2ee02a['push'](_0x2ee02a['shift']());}catch(_0x172b07){_0x2ee02a['push'](_0x2ee02a['shift']());}}}(a0_0x4482,0xab12a));function a0_0x4482(){const _0x34fc9c=['2394964jTMtIX','28539120MFEURr','type-graphql','4712StSmKz','__param','Query','__decorate','design:returntype','studioPermission','2592OmZkoD','checkStudioPermission','874240wJchhf','OperatoToolResolver','__metadata','tslib','design:paramtypes','prototype','Resolver','20898PaMqXC','6SHFnVQ','studioTemplateIsOverLimit','Operato\x20Tool\x20Studio\x20Limit\x20check','checkStudioTemplateIsOverLimit','4394090xINDrp','design:type','./tool-permission','2944025GuMTRY','592SEoPSR','Ctx'];a0_0x4482=function(){return _0x34fc9c;};return a0_0x4482();}Object['defineProperty'](exports,'__esModule',{'value':!0x0}),exports['OperatoToolResolver']=void 0x0;const tslib_1=require(a0_0x3b50e2(0x1e2)),type_graphql_1=require(a0_0x3b50e2(0x1f3)),tool_permission_1=require(a0_0x3b50e2(0x1ed));function a0_0x5357(_0x35bca7,_0x2edf7e){const _0x4482b1=a0_0x4482();return a0_0x5357=function(_0x53571f,_0x459323){_0x53571f=_0x53571f-0x1dd;let _0x2f5ce0=_0x4482b1[_0x53571f];return _0x2f5ce0;},a0_0x5357(_0x35bca7,_0x2edf7e);}let OperatoToolResolver=class{async[a0_0x3b50e2(0x1f9)](_0x3709bd){const _0x831dd9=a0_0x3b50e2;return(0x0,tool_permission_1[_0x831dd9(0x1de)])();}async['studioTemplateIsOverLimit'](_0x23375e,_0x54c070){const _0x1f0418=a0_0x3b50e2;return(0x0,tool_permission_1[_0x1f0418(0x1ea)])(_0x23375e,_0x54c070);}};tslib_1[a0_0x3b50e2(0x1f7)]([(0x0,type_graphql_1[a0_0x3b50e2(0x1f6)])(_0xb12c95=>Boolean,{'description':'Operato\x20Tool\x20Studio\x20Usage\x20Permissions'}),tslib_1['__param'](0x0,(0x0,type_graphql_1['Ctx'])()),tslib_1['__metadata'](a0_0x3b50e2(0x1ec),Function),tslib_1[a0_0x3b50e2(0x1e1)]('design:paramtypes',[Object]),tslib_1[a0_0x3b50e2(0x1e1)](a0_0x3b50e2(0x1f8),Promise)],OperatoToolResolver['prototype'],a0_0x3b50e2(0x1f9),null),tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x3b50e2(0x1f6)])(_0x3a76f5=>Boolean,{'description':a0_0x3b50e2(0x1e9)}),tslib_1[a0_0x3b50e2(0x1f5)](0x0,(0x0,type_graphql_1['Arg'])('id')),tslib_1[a0_0x3b50e2(0x1f5)](0x1,(0x0,type_graphql_1[a0_0x3b50e2(0x1f0)])()),tslib_1[a0_0x3b50e2(0x1e1)](a0_0x3b50e2(0x1ec),Function),tslib_1['__metadata'](a0_0x3b50e2(0x1e3),[String,Object]),tslib_1['__metadata']('design:returntype',Promise)],OperatoToolResolver[a0_0x3b50e2(0x1e4)],a0_0x3b50e2(0x1e8),null),OperatoToolResolver=tslib_1[a0_0x3b50e2(0x1f7)]([(0x0,type_graphql_1[a0_0x3b50e2(0x1e5)])()],OperatoToolResolver),exports[a0_0x3b50e2(0x1e0)]=OperatoToolResolver;
1
+ 'use strict';const a0_0x92855c=a0_0x1938;function a0_0x1938(_0x1ef758,_0x26b01d){const _0x15ea09=a0_0x15ea();return a0_0x1938=function(_0x19389c,_0x556850){_0x19389c=_0x19389c-0x1bf;let _0x48627c=_0x15ea09[_0x19389c];return _0x48627c;},a0_0x1938(_0x1ef758,_0x26b01d);}(function(_0x2a3643,_0x4ef606){const _0x5f27ce=a0_0x1938,_0x495a86=_0x2a3643();while(!![]){try{const _0x5eb5c8=-parseInt(_0x5f27ce(0x1c2))/0x1*(parseInt(_0x5f27ce(0x1d5))/0x2)+parseInt(_0x5f27ce(0x1bf))/0x3+parseInt(_0x5f27ce(0x1d1))/0x4+-parseInt(_0x5f27ce(0x1c1))/0x5+parseInt(_0x5f27ce(0x1d2))/0x6*(parseInt(_0x5f27ce(0x1c5))/0x7)+parseInt(_0x5f27ce(0x1d0))/0x8+-parseInt(_0x5f27ce(0x1d4))/0x9;if(_0x5eb5c8===_0x4ef606)break;else _0x495a86['push'](_0x495a86['shift']());}catch(_0x507a5e){_0x495a86['push'](_0x495a86['shift']());}}}(a0_0x15ea,0xa971f));Object[a0_0x92855c(0x1ca)](exports,a0_0x92855c(0x1cb),{'value':!0x0}),exports[a0_0x92855c(0x1c6)]=void 0x0;const tslib_1=require('tslib'),type_graphql_1=require('type-graphql'),tool_permission_1=require(a0_0x92855c(0x1ce));let OperatoToolResolver=class{async[a0_0x92855c(0x1d7)](_0x4e61a5){return(0x0,tool_permission_1['checkStudioPermission'])();}async[a0_0x92855c(0x1cf)](_0x4b7e5b,_0x4e8913){const _0xd23a7a=a0_0x92855c;return(0x0,tool_permission_1[_0xd23a7a(0x1d8)])(_0x4b7e5b,_0x4e8913);}};function a0_0x15ea(){const _0x4d83f7=['760154ZvxfvK','__decorate','studioPermission','checkStudioTemplateIsOverLimit','2796375bkmHfU','design:returntype','5020105PBDffn','3zklSaN','design:paramtypes','prototype','7338562isOBbL','OperatoToolResolver','Arg','__param','__metadata','defineProperty','__esModule','design:type','Operato\x20Tool\x20Studio\x20Limit\x20check','./tool-permission','studioTemplateIsOverLimit','6614992JWUolh','2749380gCvqaJ','6afItEB','Query','5907699REwtwi'];a0_0x15ea=function(){return _0x4d83f7;};return a0_0x15ea();}tslib_1[a0_0x92855c(0x1d6)]([(0x0,type_graphql_1[a0_0x92855c(0x1d3)])(_0x1c5346=>Boolean,{'description':'Operato\x20Tool\x20Studio\x20Usage\x20Permissions'}),tslib_1['__param'](0x0,(0x0,type_graphql_1['Ctx'])()),tslib_1['__metadata'](a0_0x92855c(0x1cc),Function),tslib_1[a0_0x92855c(0x1c9)]('design:paramtypes',[Object]),tslib_1[a0_0x92855c(0x1c9)](a0_0x92855c(0x1c0),Promise)],OperatoToolResolver[a0_0x92855c(0x1c4)],a0_0x92855c(0x1d7),null),tslib_1[a0_0x92855c(0x1d6)]([(0x0,type_graphql_1['Query'])(_0x3473ca=>Boolean,{'description':a0_0x92855c(0x1cd)}),tslib_1[a0_0x92855c(0x1c8)](0x0,(0x0,type_graphql_1[a0_0x92855c(0x1c7)])('id')),tslib_1['__param'](0x1,(0x0,type_graphql_1['Ctx'])()),tslib_1[a0_0x92855c(0x1c9)](a0_0x92855c(0x1cc),Function),tslib_1[a0_0x92855c(0x1c9)](a0_0x92855c(0x1c3),[String,Object]),tslib_1['__metadata']('design:returntype',Promise)],OperatoToolResolver['prototype'],a0_0x92855c(0x1cf),null),OperatoToolResolver=tslib_1[a0_0x92855c(0x1d6)]([(0x0,type_graphql_1['Resolver'])()],OperatoToolResolver),exports[a0_0x92855c(0x1c6)]=OperatoToolResolver;