@things-factory/operato-tools 6.1.20 → 6.1.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/actions/main.js +1 -1
- package/client/pages/generator/button-config-tab-mixin.js +4 -4
- package/client/pages/generator/column-config-tab-mixin.js +4 -4
- package/client/pages/generator/etc-config-tab-mixin.js +4 -4
- package/client/pages/generator/form-config-tab-mixin.js +4 -4
- package/client/pages/generator/graphql-config-tab-mixin.js +24 -24
- package/client/pages/generator/grid-config-tab-mixin.js +22 -22
- package/client/pages/generator/grid-emphasized-config-tab-mixin.js +18 -0
- package/client/pages/generator/menu-config-tab-mixin.js +11 -11
- package/client/pages/generator/meta-generator-page.js +11 -11
- package/client/pages/generator/search-config-tab-mixin.js +4 -4
- package/client/pages/generator/tab-config-tab-mixin.js +4 -4
- package/client/pages/main.js +4 -4
- package/client/reducers/main.js +1 -1
- package/package.json +3 -3
- package/server/constants/error-code.js +1 -1
- package/server/errors/license-error.js +1 -1
- package/server/routes.js +1 -1
- package/server/service/tool-entity/create-menu.js +1 -1
- package/server/service/tool-entity/create-service.js +1 -1
- package/server/service/tool-secret/tool-permission.js +1 -1
- package/server/service/tool-secret/tool-resolver.js +1 -1
- package/translations/en.json +4 -1
- package/translations/ko.json +4 -1
- package/translations/ms.json +4 -1
- package/translations/zh.json +4 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/operato-tools",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.21",
|
|
4
4
|
"main": "server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -29,12 +29,12 @@
|
|
|
29
29
|
"docker:run": "docker run -it -p 4000:3000 hatiolab/operato-tools:latest"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@things-factory/meta-ui": "^6.1.
|
|
32
|
+
"@things-factory/meta-ui": "^6.1.21",
|
|
33
33
|
"@things-factory/operato-license-checker": "^3.1.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@things-factory/builder": "^6.1.18",
|
|
37
37
|
"@things-factory/meta-ui": "^6.0.0-alpha.6"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "f7daba255a423d7a47f636a13e417750cbbaf232"
|
|
40
40
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a0_0x18ed3e=a0_0x65f9;(function(_0x204680,_0x3c3278){var _0x4d2790=a0_0x65f9,_0x179ecf=_0x204680();while(!![]){try{var _0x2108d2=-parseInt(_0x4d2790(0x1e1))/0x1*(parseInt(_0x4d2790(0x1d8))/0x2)+-parseInt(_0x4d2790(0x1da))/0x3*(parseInt(_0x4d2790(0x1d5))/0x4)+-parseInt(_0x4d2790(0x1db))/0x5+-parseInt(_0x4d2790(0x1d7))/0x6+-parseInt(_0x4d2790(0x1df))/0x7+parseInt(_0x4d2790(0x1de))/0x8*(-parseInt(_0x4d2790(0x1dc))/0x9)+parseInt(_0x4d2790(0x1dd))/0xa;if(_0x2108d2===_0x3c3278)break;else _0x179ecf['push'](_0x179ecf['shift']());}catch(_0x48d428){_0x179ecf['push'](_0x179ecf['shift']());}}}(a0_0x5f2d,0xf2625));function a0_0x65f9(_0x905c7,_0x2c8db1){var _0x5f2d08=a0_0x5f2d();return a0_0x65f9=function(_0x65f921,_0x43a661){_0x65f921=_0x65f921-0x1d2;var _0x162781=_0x5f2d08[_0x65f921];return _0x162781;},a0_0x65f9(_0x905c7,_0x2c8db1);}function a0_0x5f2d(){var _0x505caf=['4ZfTOGP','INVALID_LICENSE','9712176fdBwAq','2jKHoeJ','error.invalid\x20license\x20key','3426108LKTmfl','8923620yPvZqA','33246BkGRZB','75624520iVOvTD','56qmkWvN','13572664SoBJkA','defineProperty','59381rqoqNF','OVER_LIMIT','__esModule','error.page\x20count\x20over\x20license\x20limit'];a0_0x5f2d=function(){return _0x505caf;};return a0_0x5f2d();}Object[a0_0x18ed3e(0x1e0)](exports,a0_0x18ed3e(0x1d3),{'value':!0x0}),exports[a0_0x18ed3e(0x1d2)]=exports['INVALID_LICENSE']=void 0x0,exports[a0_0x18ed3e(0x1d6)]=a0_0x18ed3e(0x1d9),exports['OVER_LIMIT']=a0_0x18ed3e(0x1d4);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';const a0_0x50236d=a0_0x304c;function a0_0x304c(_0x48f09a,_0x10970b){const _0x290fb7=a0_0x290f();return a0_0x304c=function(_0x304cba,_0x286533){_0x304cba=_0x304cba-0x109;let _0x1b88de=_0x290fb7[_0x304cba];return _0x1b88de;},a0_0x304c(_0x48f09a,_0x10970b);}(function(_0x52bd5f,_0x2afc1a){const _0x486ef5=a0_0x304c,_0x28d611=_0x52bd5f();while(!![]){try{const _0x4aec8f=parseInt(_0x486ef5(0x10e))/0x1+-parseInt(_0x486ef5(0x11a))/0x2*(parseInt(_0x486ef5(0x10f))/0x3)+-parseInt(_0x486ef5(0x10b))/0x4+parseInt(_0x486ef5(0x118))/0x5*(-parseInt(_0x486ef5(0x11b))/0x6)+parseInt(_0x486ef5(0x110))/0x7+parseInt(_0x486ef5(0x109))/0x8*(parseInt(_0x486ef5(0x117))/0x9)+-parseInt(_0x486ef5(0x116))/0xa*(-parseInt(_0x486ef5(0x111))/0xb);if(_0x4aec8f===_0x2afc1a)break;else _0x28d611['push'](_0x28d611['shift']());}catch(_0xba853b){_0x28d611['push'](_0x28d611['shift']());}}}(a0_0x290f,0x61687));Object[a0_0x50236d(0x119)](exports,a0_0x50236d(0x10a),{'value':!0x0}),exports[a0_0x50236d(0x113)]=void 0x0;const tslib_1=require(a0_0x50236d(0x11c)),ERROR_CODES=tslib_1[a0_0x50236d(0x112)](require(a0_0x50236d(0x10c)));class LicenseError extends Error{static get[a0_0x50236d(0x115)](){const _0x47a2d3=a0_0x50236d;return Object[_0x47a2d3(0x114)]({},ERROR_CODES);}constructor({errorCode:_0x231951,detail:_0x45a49f}){const _0xaaad1d=a0_0x50236d;super(_0x231951),this[_0xaaad1d(0x10d)]='license-error',this[_0xaaad1d(0x11d)]=_0x231951,this['detail']=_0x45a49f;}}exports['LicenseError']=LicenseError;function a0_0x290f(){const _0x5764e4=['649eIvruz','__importStar','LicenseError','assign','ERROR_CODES','57670Hkfzst','9KZEdTm','553835TsqKLw','defineProperty','8DjlLjB','6SXgVYe','tslib','errorCode','1302056LEsPBj','__esModule','1043956nYkIVY','../constants/error-code','name','725182lpwlpa','554226kPlZRB','1970605iNdzjL'];a0_0x290f=function(){return _0x5764e4;};return a0_0x290f();}
|
package/server/routes.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a0_0x1a5384=a0_0x330d;(function(_0x15a48e,_0x30a103){const _0x4ff5a2=a0_0x330d,_0x38f516=_0x15a48e();while(!![]){try{const _0x22f88b=parseInt(_0x4ff5a2(0x19c))/0x1+-parseInt(_0x4ff5a2(0x1a2))/0x2*(parseInt(_0x4ff5a2(0x19e))/0x3)+-parseInt(_0x4ff5a2(0x1a6))/0x4*(parseInt(_0x4ff5a2(0x19f))/0x5)+parseInt(_0x4ff5a2(0x1a8))/0x6*(parseInt(_0x4ff5a2(0x1a7))/0x7)+-parseInt(_0x4ff5a2(0x1a1))/0x8*(parseInt(_0x4ff5a2(0x1aa))/0x9)+-parseInt(_0x4ff5a2(0x1a0))/0xa+parseInt(_0x4ff5a2(0x1a3))/0xb;if(_0x22f88b===_0x30a103)break;else _0x38f516['push'](_0x38f516['shift']());}catch(_0x34a651){_0x38f516['push'](_0x38f516['shift']());}}}(a0_0x3f9e,0x36ec6));const debug=require(a0_0x1a5384(0x1ab))(a0_0x1a5384(0x1a9));function a0_0x330d(_0x205ceb,_0x42ea56){const _0x3f9ecc=a0_0x3f9e();return a0_0x330d=function(_0x330d25,_0x1f0b7e){_0x330d25=_0x330d25-0x19c;let _0x381e0e=_0x3f9ecc[_0x330d25];return _0x381e0e;},a0_0x330d(_0x205ceb,_0x42ea56);}function a0_0x3f9e(){const _0x4b0180=['4ezhewf','8385091alZGGH','bootstrap-module-domain-private-route','bootstrap-module-domain-public-route','136852jvwmEt','7YtCiEK','534120CTDzzb','things-factory:operato-tools:routes','9pdOPdm','debug','247003bUnwME','bootstrap-module-global-public-route','110172orhioz','5ISnbXH','3472480IIeyRM','3347432UKpnct'];a0_0x3f9e=function(){return _0x4b0180;};return a0_0x3f9e();}process['on'](a0_0x1a5384(0x19d),(_0x44d282,_0x3fde7d)=>{}),process['on']('bootstrap-module-global-private-route',(_0x3fbe2e,_0x4954fc)=>{}),process['on'](a0_0x1a5384(0x1a5),(_0x3c3c49,_0x53796e)=>{}),process['on'](a0_0x1a5384(0x1a4),(_0x1b9d11,_0x49784f)=>{});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x468622=a0_0x53f3;function a0_0x53f3(_0x2d68e1,_0x1f1c94){const _0x12b4ad=a0_0x12b4();return a0_0x53f3=function(_0x53f322,_0x1f65bd){_0x53f322=_0x53f322-0x10c;let _0x9eaf75=_0x12b4ad[_0x53f322];return _0x9eaf75;},a0_0x53f3(_0x2d68e1,_0x1f1c94);}(function(_0x503a05,_0x1f4026){const _0x16605e=a0_0x53f3,_0x3f36c3=_0x503a05();while(!![]){try{const _0x30c1a7=parseInt(_0x16605e(0x182))/0x1*(parseInt(_0x16605e(0x148))/0x2)+-parseInt(_0x16605e(0x110))/0x3+parseInt(_0x16605e(0x14b))/0x4+-parseInt(_0x16605e(0x125))/0x5*(parseInt(_0x16605e(0x134))/0x6)+-parseInt(_0x16605e(0x161))/0x7+parseInt(_0x16605e(0x152))/0x8*(-parseInt(_0x16605e(0x14a))/0x9)+-parseInt(_0x16605e(0x15a))/0xa*(-parseInt(_0x16605e(0x15d))/0xb);if(_0x30c1a7===_0x1f4026)break;else _0x3f36c3['push'](_0x3f36c3['shift']());}catch(_0x4bc8da){_0x3f36c3['push'](_0x3f36c3['shift']());}}}(a0_0x12b4,0xcb327));Object['defineProperty'](exports,a0_0x468622(0x12d),{'value':!0x0}),exports[a0_0x468622(0x16a)]=void 0x0;function a0_0x12b4(){const _0x43417f=['find','\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}','\x22,\x22name\x22:\x20\x22','scenario','gridRank','getRepository','crypto','4446490VukLod','./../tool-secret/tool-permission','readonly','aes-256-ofb','searchOper','filter','prototype','assign','__esModule','template','\x22,\x22desc\x22:',',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22','hex','type-graphql','push','6ePDihB',',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22','select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27','Arg','name','updater_id','design:type','\x20,\x22editable\x22:\x20','entity','randomBytes','__importDefault','string','pluralize','length','{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22','searchRank','findOne','aes-256-cfb','updated_at','refType','14OnEZjJ','sortRank','5310fnULqh','3438400XwAMvz','aes-256-cfb1','parent','updater','design:returntype','createGridColumns','reverseSort','20912yXgCfW','aes-256-cfb8','{\x22type\x22:\x20\x22','replace','aes-256-ecb','final',',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22','h1z0q9i9x7q6','15342490dWWhhD','category','from','22qTdGBM','query','refName','Menu','1968568RvQDNp','hidden','\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}','menuType','utf8','aes-256-ctr','aes256','Resolver','__metadata','OperatoToolCreateMenu','default','Directive','created_at','createMenuData','dataProp','JSON','left','parent_menu_id','split','@things-factory/resource-base','{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22','createSortCols','SCREEN','Operato\x20Tool\x20Create\x20Menu','\x22,\x22header\x22:\x20\x22','@things-factory/meta-ui/client/pages/meta-grist-page','design:paramtypes','__param','\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',',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22','toString','join','\x20,\x22exportable\x22:\x20true','24533twusNU','map','aes-256-cbc','Mutation','createSearchCols','createdAt','1664256JkpAxd','\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}','\x22,\x22hidden\x22:','rank','\x22,\x22operator\x22:\x20\x22','{\x22name\x22:\x22','sort','\x22,\x22width\x22:','creator','createCipheriv','enc','{\x22name\x22:\x20\x22','Ctx','__decorate'];a0_0x12b4=function(){return _0x43417f;};return a0_0x12b4();}const tslib_1=require('tslib'),type_graphql_1=require(a0_0x468622(0x132)),resource_base_1=require(a0_0x468622(0x174)),menu_base_1=require('@things-factory/menu-base'),tool_permission_1=require(a0_0x468622(0x126)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require('lodash'),{plural:plural}=require(a0_0x468622(0x140)),crypto_1=tslib_1[a0_0x468622(0x13e)](require(a0_0x468622(0x124)));let OperatoToolCreateMenu=class{async['toolCreateMenu'](_0x2e802b,_0x1d8b92,_0x102df8){const _0x3c12d8=a0_0x468622,{domain:_0x15fc1c,user:_0x1bbe25,tx:_0x1f41b9}=_0x102df8['state'];await(0x0,tool_permission_1['checkStudioTemplateIsOverLimit'])('',_0x102df8);const _0x15a9d1=await _0x1f41b9['getRepository'](resource_base_1['Entity'])['findOne']({'where':{'domain':{'id':_0x15fc1c['id']},'id':_0x2e802b}}),_0x3d319d=await _0x1f41b9[_0x3c12d8(0x123)](resource_base_1['EntityColumn'])[_0x3c12d8(0x11e)]({'where':{'domain':{'id':_0x15fc1c['id']},'entity':{'id':_0x15a9d1['id']}}});let {name:_0x4e3083=''}=_0x15a9d1||{},_0x49c61f=kebabCase(_0x4e3083),_0x2a7409=modelTemplate[_0x3c12d8(0x155)](/{{pascalCase name}}/g,startCase(camelCase(_0x4e3083))[_0x3c12d8(0x155)](/ /g,''))[_0x3c12d8(0x155)](/{{camelCase name}}/g,camelCase(_0x4e3083))[_0x3c12d8(0x155)](/{{snakeCase name}}/g,snakeCase(_0x4e3083))[_0x3c12d8(0x155)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x4e3083)))[_0x3c12d8(0x155)](/ /g,''))['replace'](/{{pluralCamelCase name}}/g,camelCase(plural(_0x4e3083)))['replace'](/{{name}}/g,_0x4e3083),_0x451f2d='';_0x3c12d8(0x170)==_0x15a9d1['dataProp']?_0x451f2d='\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22basic\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22label\x22:\x20\x22data_history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22icon\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22logic\x22:\x20\x22history_json\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20':'COPY'==_0x15a9d1[_0x3c12d8(0x16f)]&&(_0x451f2d=_0x3c12d8(0x17d)),_0x2a7409=_0x2a7409[_0x3c12d8(0x155)](/{{HistoryButton}}/g,_0x451f2d);let _0x44241f=this[_0x3c12d8(0x176)](_0x3d319d);_0x2a7409=_0x2a7409[_0x3c12d8(0x155)](/{{SortColumns}}/g,_0x44241f[_0x3c12d8(0x180)](','));let _0x3c8555=this[_0x3c12d8(0x10e)](_0x3d319d);_0x2a7409=_0x2a7409[_0x3c12d8(0x155)](/{{SearchColumns}}/g,_0x3c8555['join'](','));let _0x5132a0=this[_0x3c12d8(0x150)](_0x3d319d);return _0x2a7409=_0x2a7409[_0x3c12d8(0x155)](/{{GridColumns}}/g,_0x5132a0['join'](',')),_0x2a7409=this[_0x3c12d8(0x11a)](_0x2a7409),await this[_0x3c12d8(0x16e)](_0x1f41b9,_0x15fc1c,_0x1bbe25,_0x1d8b92,_0x49c61f,_0x2a7409),!0x0;}['createGridColumns'](_0x23e0d4){const _0xdaa187=a0_0x468622;return _0x23e0d4['filter'](_0x9c58a0=>'id'!=_0x9c58a0['name']&&_0x9c58a0[_0xdaa187(0x122)]>0x0)['sort'](function(_0x175d85,_0x58b6f4){const _0x38f2fa=_0xdaa187;return _0x175d85[_0x38f2fa(0x122)]-_0x58b6f4[_0x38f2fa(0x122)];})[_0xdaa187(0x183)](_0x42309c=>{const _0x1ab52c=_0xdaa187;let {gridEditor:_0x1f4c1f=_0x1ab52c(0x13f),name:_0x2e9a3f,term:_0x84b646,gridWidth:_0x38f16f=0x0,gridAlign:_0x5394ec=_0x1ab52c(0x171),nullable:_0x3a61f=!0x1}=_0x42309c;if(null==_0x1f4c1f&&(_0x1f4c1f=_0x1ab52c(0x13f)),null==_0x5394ec&&(_0x5394ec=_0x1ab52c(0x171)),'updater_id'==_0x2e9a3f||'creator_id'==_0x2e9a3f)return _0x2e9a3f=_0x1ab52c(0x139)==_0x2e9a3f?_0x1ab52c(0x14e):_0x1ab52c(0x118),_0x1ab52c(0x142)+_0x2e9a3f+_0x1ab52c(0x179)+_0x2e9a3f+_0x1ab52c(0x11f);if(_0x1ab52c(0x146)==_0x2e9a3f||_0x1ab52c(0x16d)==_0x2e9a3f)return _0x1ab52c(0x175)+('updated_at'==_0x2e9a3f?'updatedAt':_0x1ab52c(0x10f))+_0x1ab52c(0x179)+_0x2e9a3f+_0x1ab52c(0x163);let _0x271dec=_0x1ab52c(0x127)!=_0x1f4c1f&&_0x1ab52c(0x162)!=_0x1f4c1f,_0x315193=_0x1ab52c(0x162)==_0x1f4c1f;0x1!=_0x315193&&0x0!=_0x271dec||(_0x1f4c1f=_0x1ab52c(0x13f));let _0x2022dd=_0x1ab52c(0x154)+_0x1f4c1f+_0x1ab52c(0x120)+camelCase(_0x2e9a3f)+'\x22,\x22header\x22:\x20\x22'+_0x84b646+_0x1ab52c(0x112)+_0x315193+_0x1ab52c(0x13b)+_0x271dec+',\x22mandatory\x22:\x20'+!_0x3a61f+_0x1ab52c(0x158)+_0x5394ec+_0x1ab52c(0x117)+_0x38f16f+_0x1ab52c(0x181);return'code'==_0x42309c[_0x1ab52c(0x147)]&&(_0x2022dd+=_0x1ab52c(0x135)+_0x42309c[_0x1ab52c(0x15f)]+'\x22}'),_0x1ab52c(0x121)==_0x42309c[_0x1ab52c(0x147)]&&(_0x2022dd+=_0x1ab52c(0x130)+_0x42309c[_0x1ab52c(0x15f)]+'\x22}'),_0x1ab52c(0x13c)==_0x42309c[_0x1ab52c(0x147)]&&(_0x2022dd+=_0x1ab52c(0x17e)+camelCase(plural(_0x42309c[_0x1ab52c(0x15f)]))+_0x1ab52c(0x111)),_0x2022dd+='}',_0x2022dd;});}[a0_0x468622(0x10e)](_0x5e1f5b){const _0x54c870=a0_0x468622;return _0x5e1f5b[_0x54c870(0x12a)](_0x2358f7=>_0x2358f7[_0x54c870(0x143)]>0x0)[_0x54c870(0x116)](function(_0x52f279,_0x14b670){const _0x5b6cd8=_0x54c870;return _0x52f279[_0x5b6cd8(0x143)]-_0x14b670[_0x5b6cd8(0x143)];})[_0x54c870(0x183)](_0x379aa8=>{const _0x17cc75=_0x54c870;let _0x38133c=_0x379aa8[_0x17cc75(0x129)];return _0x17cc75(0x12a)==_0x38133c?'\x22'+camelCase(_0x379aa8['name'])+'\x22':(_0x38133c||(_0x38133c='eq'),_0x17cc75(0x11b)+camelCase(_0x379aa8[_0x17cc75(0x138)])+_0x17cc75(0x114)+_0x38133c+'\x22}');});}[a0_0x468622(0x176)](_0x49dff6){const _0x1745dd=a0_0x468622;return _0x49dff6[_0x1745dd(0x12a)](_0x4ede1a=>_0x4ede1a[_0x1745dd(0x149)]>0x0)[_0x1745dd(0x116)](function(_0x1cc492,_0x4cd97f){return _0x1cc492['sortRank']-_0x4cd97f['sortRank'];})['map'](_0x137607=>_0x1745dd(0x115)+camelCase(_0x137607[_0x1745dd(0x138)])+_0x1745dd(0x12f)+_0x137607[_0x1745dd(0x151)]+'}');}async[a0_0x468622(0x16e)](_0x477bde,_0x25691a,_0x6b016f,_0x3deb23,_0x46c437,_0x237958){const _0x20a0ac=a0_0x468622;let _0x7876fa=await _0x477bde[_0x20a0ac(0x123)](menu_base_1['Menu'])[_0x20a0ac(0x144)]({'where':{'domain':{'id':_0x25691a['id']},'id':_0x3deb23}}),_0x3e1b46=(await _0x477bde['getRepository'](menu_base_1['Menu'])[_0x20a0ac(0x15e)](_0x20a0ac(0x136)+_0x3deb23+'\x27\x20or\x20id\x20=\x20\x27'+_0x3deb23+'\x27'))[0x0][_0x20a0ac(0x113)]+0xa,_0xdca336=new menu_base_1[(_0x20a0ac(0x160))]();_0xdca336[_0x20a0ac(0x138)]=_0x46c437,_0xdca336[_0x20a0ac(0x164)]=_0x20a0ac(0x177),_0xdca336[_0x20a0ac(0x15b)]='meta-grist-page',_0xdca336[_0x20a0ac(0x113)]=_0x3e1b46,_0xdca336['hiddenFlag']=!0x1,_0xdca336['routing']=_0x46c437,_0xdca336[_0x20a0ac(0x12e)]=_0x237958,_0xdca336['resourceUrl']=_0x20a0ac(0x17a),_0xdca336[_0x20a0ac(0x14d)]=_0x7876fa,await _0x477bde[_0x20a0ac(0x123)](menu_base_1['Menu'])['save'](Object[_0x20a0ac(0x12c)](Object['assign']({},_0xdca336),{'domain':_0x25691a,'creator':_0x6b016f,'updater':_0x6b016f}));}[a0_0x468622(0x11a)](_0x62c60b){const _0x42168c=a0_0x468622;let _0x1c02d9=JSON['stringify'](_0x62c60b)[_0x42168c(0x173)](/(.{100})/)['filter'](_0x391f05=>_0x391f05),_0x1fb232=[_0x42168c(0x156),_0x42168c(0x10c),_0x42168c(0x145),_0x42168c(0x153),_0x42168c(0x14c),_0x42168c(0x128),_0x42168c(0x166),_0x42168c(0x167)],_0x6c4278=crypto_1[_0x42168c(0x16b)][_0x42168c(0x13d)](0x20)[_0x42168c(0x17f)]('hex'),_0x13a872=Buffer[_0x42168c(0x15c)](_0x6c4278,_0x42168c(0x131)),_0x73267e=_0x6c4278['substring'](0x0,0x10),_0x30101f=['',_0x73267e,_0x73267e,_0x73267e,_0x73267e,_0x73267e,_0x73267e,_0x73267e],_0x255126=0x0,_0x794617=[];_0x794617[_0x42168c(0x133)](_0x6c4278);for(var _0x5cf77b=0x0;_0x5cf77b<_0x1c02d9[_0x42168c(0x141)];_0x5cf77b++,_0x255126++){_0x255126==_0x1fb232[_0x42168c(0x141)]&&(_0x255126=0x0);let _0x4b4af7=crypto_1[_0x42168c(0x16b)][_0x42168c(0x119)](_0x1fb232[_0x255126],_0x13a872,_0x30101f[_0x255126]),_0x594413=_0x4b4af7['update'](_0x1c02d9[_0x5cf77b],_0x42168c(0x165),_0x42168c(0x131));_0x594413+=_0x4b4af7[_0x42168c(0x157)](_0x42168c(0x131)),_0x794617[_0x42168c(0x133)](_0x594413);}return _0x794617[_0x42168c(0x180)](_0x42168c(0x159));}};tslib_1[a0_0x468622(0x11d)]([(0x0,type_graphql_1[a0_0x468622(0x16c)])('@transaction'),(0x0,type_graphql_1[a0_0x468622(0x10d)])(_0x8cac9b=>Boolean,{'description':a0_0x468622(0x178)}),tslib_1[a0_0x468622(0x17c)](0x0,(0x0,type_graphql_1[a0_0x468622(0x137)])('id')),tslib_1[a0_0x468622(0x17c)](0x1,(0x0,type_graphql_1[a0_0x468622(0x137)])(a0_0x468622(0x172))),tslib_1[a0_0x468622(0x17c)](0x2,(0x0,type_graphql_1[a0_0x468622(0x11c)])()),tslib_1[a0_0x468622(0x169)](a0_0x468622(0x13a),Function),tslib_1[a0_0x468622(0x169)](a0_0x468622(0x17b),[String,String,Object]),tslib_1[a0_0x468622(0x169)](a0_0x468622(0x14f),Promise)],OperatoToolCreateMenu[a0_0x468622(0x12b)],'toolCreateMenu',null),OperatoToolCreateMenu=tslib_1[a0_0x468622(0x11d)]([(0x0,type_graphql_1[a0_0x468622(0x168)])()],OperatoToolCreateMenu),exports[a0_0x468622(0x16a)]=OperatoToolCreateMenu;const modelTemplate='\x0a{\x0a\x20\x20\x22menu\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x22title\x22:\x20\x22{{name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22\x22,\x0a\x20\x20\x20\x20\x20\x20\x22desc\x22:\x20\x22\x22\x0a\x20\x20},\x0a\x20\x20\x22gql\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x22query\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22list_func\x22:\x20\x22{{pluralCamelCase\x20name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22find_one_func\x22:\x22{{camelCase\x20name}}\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x22mutation\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22multiple\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22func\x22:\x22updateMultiple{{pascalCase\x20name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22{{pascalCase\x20name}}Patch\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22delete\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22func\x22:\x22delete{{pluralPascalCase\x20name}}\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20},\x0a\x20\x20\x22button\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22export\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22add\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22delete\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22save\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20],\x0a\x20\x20\x22grid_column\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22string\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22id\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22header\x22:\x20\x22id\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22hidden\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22editable\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22mandatory\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22sortable\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22align\x22:\x20\x22left\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22width\x22:\x200,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22exportable\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20},\x0a{{GridColumns}}\x0a\x20\x20],\x0a\x20\x20\x22grid\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22button\x22:[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{{HistoryButton}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22option\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22mobile_mode\x22:\x20\x22LIST\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22desk_mode\x22:\x20\x22GRID\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22use_row_checker\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22pages\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2020,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2050,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20100,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20300\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22view_mode\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22GRID\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22LIST\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22CARD\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22sorters\x22:\x20[\x0a{{SortColumns}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20]\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x22row\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22multiple_select\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22click\x22:\x20\x22select-row-toggle\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20},\x0a\x20\x20\x22search\x22:\x20[\x0a{{SearchColumns}}\x0a\x20\x20]\x0a}\x0a';
|
|
1
|
+
'use strict';function a0_0x1980(_0x45ba52,_0x24bea2){const _0x591ef7=a0_0x591e();return a0_0x1980=function(_0x198040,_0x1db866){_0x198040=_0x198040-0xd2;let _0x400870=_0x591ef7[_0x198040];return _0x400870;},a0_0x1980(_0x45ba52,_0x24bea2);}const a0_0x22d4fd=a0_0x1980;(function(_0x13a7d2,_0x239556){const _0x793cbd=a0_0x1980,_0x10ebd0=_0x13a7d2();while(!![]){try{const _0x34aab4=parseInt(_0x793cbd(0xdc))/0x1*(-parseInt(_0x793cbd(0x129))/0x2)+parseInt(_0x793cbd(0xdf))/0x3*(-parseInt(_0x793cbd(0xf5))/0x4)+parseInt(_0x793cbd(0x101))/0x5+parseInt(_0x793cbd(0x120))/0x6+parseInt(_0x793cbd(0x126))/0x7*(parseInt(_0x793cbd(0xe8))/0x8)+-parseInt(_0x793cbd(0xdb))/0x9*(-parseInt(_0x793cbd(0x125))/0xa)+-parseInt(_0x793cbd(0x102))/0xb*(parseInt(_0x793cbd(0x112))/0xc);if(_0x34aab4===_0x239556)break;else _0x10ebd0['push'](_0x10ebd0['shift']());}catch(_0x33a1b7){_0x10ebd0['push'](_0x10ebd0['shift']());}}}(a0_0x591e,0xc498b));function a0_0x591e(){const _0x306fe3=['aes-256-cfb8','toolCreateMenu','sort','substring','find','utf8','532809eloxms','1cnHpPH','push','select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27','38181ZzKvsI','./../tool-secret/tool-permission','@things-factory/resource-base','\x22,\x22desc\x22:','\x20,\x22exportable\x22:\x20true','\x0a{\x0a\x20\x20\x22menu\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x22title\x22:\x20\x22{{name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22\x22,\x0a\x20\x20\x20\x20\x20\x20\x22desc\x22:\x20\x22\x22\x0a\x20\x20},\x0a\x20\x20\x22gql\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x22query\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22list_func\x22:\x20\x22{{pluralCamelCase\x20name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22find_one_func\x22:\x22{{camelCase\x20name}}\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x22mutation\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22multiple\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22func\x22:\x22updateMultiple{{pascalCase\x20name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22{{pascalCase\x20name}}Patch\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22delete\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22func\x22:\x22delete{{pluralPascalCase\x20name}}\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20},\x0a\x20\x20\x22button\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22export\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22add\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22delete\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22save\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20],\x0a\x20\x20\x22grid_column\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22string\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22id\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22header\x22:\x20\x22id\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22hidden\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22editable\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22mandatory\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22sortable\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22align\x22:\x20\x22left\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22width\x22:\x200,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22exportable\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20},\x0a{{GridColumns}}\x0a\x20\x20],\x0a\x20\x20\x22grid\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22button\x22:[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{{HistoryButton}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22option\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22mobile_mode\x22:\x20\x22LIST\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22desk_mode\x22:\x20\x22GRID\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22use_row_checker\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22pages\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2020,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2050,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20100,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20300\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22view_mode\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22GRID\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22LIST\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22CARD\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22sorters\x22:\x20[\x0a{{SortColumns}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20]\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x22row\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22multiple_select\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22click\x22:\x20\x22select-row-toggle\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20},\x0a\x20\x20\x22search\x22:\x20[\x0a{{SearchColumns}}\x0a\x20\x20]\x0a}\x0a','getRepository','refName','createGridColumns','10926568fUDOSm','default','__decorate','refType','searchOper','pluralize','hiddenFlag','creator','\x22,\x22operator\x22:\x20\x22','string','Ctx','Arg','randomBytes','288TKGcIJ','\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22basic\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22label\x22:\x20\x22data_history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22icon\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22logic\x22:\x20\x22history_json\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20','COPY',',\x22mandatory\x22:\x20','EntityColumn','type-graphql','hidden','aes-256-ctr','h1z0q9i9x7q6','createSortCols','created_at','\x20,\x22editable\x22:\x20','1808880CRryCw','7218398sQMVyU','dataProp','\x22,\x22width\x22:','\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22basic\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22label\x22:\x20\x22data_history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22icon\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22logic\x22:\x20\x22history_copy\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20','toString',',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22','createMenuData','\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}','__metadata','left','findOne','replace','reverseSort','name','code','\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}','36AZyWsq','__importDefault','\x27\x20or\x20id\x20=\x20\x27','searchRank','\x22,\x22header\x22:\x20\x22','lodash','\x22,\x22hidden\x22:','assign','Menu','creator_id','routing','gridRank','stringify','Operato\x20Tool\x20Create\x20Menu','6179124QidqMJ','sortRank','{\x22name\x22:\x22','rank','entity','190gEpeza','7agZWqD','updatedAt','OperatoToolCreateMenu','384026yUhBXn','split','design:paramtypes','join','enc','Mutation','aes-256-cfb','__param',',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22','map','SCREEN','parent_menu_id','{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22','template','aes-256-ofb','defineProperty','category','JSON','hex','createSearchCols','{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22','resourceUrl','filter','aes256','Resolver','design:returntype','tslib','length','crypto','updated_at','checkStudioTemplateIsOverLimit','prototype','aes-256-ecb','state','{\x22name\x22:\x20\x22','\x22,\x22name\x22:\x20\x22'];a0_0x591e=function(){return _0x306fe3;};return a0_0x591e();}Object[a0_0x22d4fd(0x138)](exports,'__esModule',{'value':!0x0}),exports[a0_0x22d4fd(0x128)]=void 0x0;const tslib_1=require(a0_0x22d4fd(0x143)),type_graphql_1=require(a0_0x22d4fd(0xfa)),resource_base_1=require(a0_0x22d4fd(0xe1)),menu_base_1=require('@things-factory/menu-base'),tool_permission_1=require(a0_0x22d4fd(0xe0)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x22d4fd(0x117)),{plural:plural}=require(a0_0x22d4fd(0xed)),crypto_1=tslib_1[a0_0x22d4fd(0x113)](require(a0_0x22d4fd(0x145)));let OperatoToolCreateMenu=class{async[a0_0x22d4fd(0xd6)](_0x5dc753,_0x580b1a,_0x26b75b){const _0x2892bc=a0_0x22d4fd,{domain:_0x2c5b56,user:_0x4baf6c,tx:_0x21a36a}=_0x26b75b[_0x2892bc(0xd2)];await(0x0,tool_permission_1[_0x2892bc(0x147)])('',_0x26b75b);const _0x1177c6=await _0x21a36a['getRepository'](resource_base_1['Entity'])[_0x2892bc(0x10c)]({'where':{'domain':{'id':_0x2c5b56['id']},'id':_0x5dc753}}),_0x46200b=await _0x21a36a['getRepository'](resource_base_1[_0x2892bc(0xf9)])[_0x2892bc(0xd9)]({'where':{'domain':{'id':_0x2c5b56['id']},'entity':{'id':_0x1177c6['id']}}});let {name:_0x5b085f=''}=_0x1177c6||{},_0x4cfb25=kebabCase(_0x5b085f),_0x31d6e6=modelTemplate[_0x2892bc(0x10d)](/{{pascalCase name}}/g,startCase(camelCase(_0x5b085f))['replace'](/ /g,''))[_0x2892bc(0x10d)](/{{camelCase name}}/g,camelCase(_0x5b085f))[_0x2892bc(0x10d)](/{{snakeCase name}}/g,snakeCase(_0x5b085f))[_0x2892bc(0x10d)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x5b085f)))['replace'](/ /g,''))[_0x2892bc(0x10d)](/{{pluralCamelCase name}}/g,camelCase(plural(_0x5b085f)))['replace'](/{{name}}/g,_0x5b085f),_0x54fafb='';_0x2892bc(0x13a)==_0x1177c6['dataProp']?_0x54fafb=_0x2892bc(0xf6):_0x2892bc(0xf7)==_0x1177c6[_0x2892bc(0x103)]&&(_0x54fafb=_0x2892bc(0x105)),_0x31d6e6=_0x31d6e6['replace'](/{{HistoryButton}}/g,_0x54fafb);let _0x46481f=this[_0x2892bc(0xfe)](_0x46200b);_0x31d6e6=_0x31d6e6[_0x2892bc(0x10d)](/{{SortColumns}}/g,_0x46481f['join'](','));let _0x2b8682=this[_0x2892bc(0x13c)](_0x46200b);_0x31d6e6=_0x31d6e6[_0x2892bc(0x10d)](/{{SearchColumns}}/g,_0x2b8682[_0x2892bc(0x12c)](','));let _0x1cd2f3=this[_0x2892bc(0xe7)](_0x46200b);return _0x31d6e6=_0x31d6e6[_0x2892bc(0x10d)](/{{GridColumns}}/g,_0x1cd2f3[_0x2892bc(0x12c)](',')),_0x31d6e6=this[_0x2892bc(0x12d)](_0x31d6e6),await this['createMenuData'](_0x21a36a,_0x2c5b56,_0x4baf6c,_0x580b1a,_0x4cfb25,_0x31d6e6),!0x0;}['createGridColumns'](_0x4ac858){const _0x2b556b=a0_0x22d4fd;return _0x4ac858[_0x2b556b(0x13f)](_0x350d46=>'id'!=_0x350d46[_0x2b556b(0x10f)]&&_0x350d46[_0x2b556b(0x11d)]>0x0)['sort'](function(_0x1b7273,_0x57cd93){const _0x40e0e2=_0x2b556b;return _0x1b7273[_0x40e0e2(0x11d)]-_0x57cd93[_0x40e0e2(0x11d)];})[_0x2b556b(0x132)](_0x53fd62=>{const _0xfc4524=_0x2b556b;let {gridEditor:_0x5df02c=_0xfc4524(0xf1),name:_0x4b36a3,term:_0x15643d,gridWidth:_0x50ef0a=0x0,gridAlign:_0x4241ed=_0xfc4524(0x10b),nullable:_0x2110c1=!0x1}=_0x53fd62;if(null==_0x5df02c&&(_0x5df02c=_0xfc4524(0xf1)),null==_0x4241ed&&(_0x4241ed=_0xfc4524(0x10b)),'updater_id'==_0x4b36a3||_0xfc4524(0x11b)==_0x4b36a3)return _0x4b36a3='updater_id'==_0x4b36a3?'updater':_0xfc4524(0xef),_0xfc4524(0x135)+_0x4b36a3+'\x22,\x22header\x22:\x20\x22'+_0x4b36a3+'\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}';if('updated_at'==_0x4b36a3||_0xfc4524(0xff)==_0x4b36a3)return _0xfc4524(0x13d)+(_0xfc4524(0x146)==_0x4b36a3?_0xfc4524(0x127):'createdAt')+_0xfc4524(0x116)+_0x4b36a3+_0xfc4524(0x111);let _0x148beb='readonly'!=_0x5df02c&&_0xfc4524(0xfb)!=_0x5df02c,_0x3d38ca=_0xfc4524(0xfb)==_0x5df02c;0x1!=_0x3d38ca&&0x0!=_0x148beb||(_0x5df02c=_0xfc4524(0xf1));let _0x138c09='{\x22type\x22:\x20\x22'+_0x5df02c+_0xfc4524(0xd4)+camelCase(_0x4b36a3)+_0xfc4524(0x116)+_0x15643d+_0xfc4524(0x118)+_0x3d38ca+_0xfc4524(0x100)+_0x148beb+_0xfc4524(0xf8)+!_0x2110c1+',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22'+_0x4241ed+_0xfc4524(0x104)+_0x50ef0a+_0xfc4524(0xe3);return _0xfc4524(0x110)==_0x53fd62[_0xfc4524(0xeb)]&&(_0x138c09+=_0xfc4524(0x107)+_0x53fd62['refName']+'\x22}'),'scenario'==_0x53fd62[_0xfc4524(0xeb)]&&(_0x138c09+=',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22'+_0x53fd62[_0xfc4524(0xe6)]+'\x22}'),_0xfc4524(0x124)==_0x53fd62[_0xfc4524(0xeb)]&&(_0x138c09+=_0xfc4524(0x131)+camelCase(plural(_0x53fd62[_0xfc4524(0xe6)]))+_0xfc4524(0x109)),_0x138c09+='}',_0x138c09;});}[a0_0x22d4fd(0x13c)](_0x2f977b){const _0x348d67=a0_0x22d4fd;return _0x2f977b[_0x348d67(0x13f)](_0x19c7bd=>_0x19c7bd[_0x348d67(0x115)]>0x0)[_0x348d67(0xd7)](function(_0xa60b92,_0x454d05){const _0x16b599=_0x348d67;return _0xa60b92[_0x16b599(0x115)]-_0x454d05[_0x16b599(0x115)];})[_0x348d67(0x132)](_0x56261f=>{const _0x4015d2=_0x348d67;let _0x328da8=_0x56261f[_0x4015d2(0xec)];return _0x4015d2(0x13f)==_0x328da8?'\x22'+camelCase(_0x56261f[_0x4015d2(0x10f)])+'\x22':(_0x328da8||(_0x328da8='eq'),_0x4015d2(0xd3)+camelCase(_0x56261f['name'])+_0x4015d2(0xf0)+_0x328da8+'\x22}');});}[a0_0x22d4fd(0xfe)](_0x10d923){const _0x34618f=a0_0x22d4fd;return _0x10d923['filter'](_0x29a3ab=>_0x29a3ab[_0x34618f(0x121)]>0x0)[_0x34618f(0xd7)](function(_0x433aea,_0x2f66fd){const _0x105e37=_0x34618f;return _0x433aea[_0x105e37(0x121)]-_0x2f66fd['sortRank'];})[_0x34618f(0x132)](_0x50db8a=>_0x34618f(0x122)+camelCase(_0x50db8a[_0x34618f(0x10f)])+_0x34618f(0xe2)+_0x50db8a[_0x34618f(0x10e)]+'}');}async[a0_0x22d4fd(0x108)](_0xa610bc,_0x45c44b,_0x88efa,_0x353c5a,_0x586e28,_0x35c6aa){const _0x3496bf=a0_0x22d4fd;let _0x10e56a=await _0xa610bc[_0x3496bf(0xe5)](menu_base_1[_0x3496bf(0x11a)])[_0x3496bf(0x10c)]({'where':{'domain':{'id':_0x45c44b['id']},'id':_0x353c5a}}),_0x1a935b=(await _0xa610bc[_0x3496bf(0xe5)](menu_base_1['Menu'])['query'](_0x3496bf(0xde)+_0x353c5a+_0x3496bf(0x114)+_0x353c5a+'\x27'))[0x0][_0x3496bf(0x123)]+0xa,_0x4e1a10=new menu_base_1[(_0x3496bf(0x11a))]();_0x4e1a10['name']=_0x586e28,_0x4e1a10['menuType']=_0x3496bf(0x133),_0x4e1a10[_0x3496bf(0x139)]='meta-grist-page',_0x4e1a10[_0x3496bf(0x123)]=_0x1a935b,_0x4e1a10[_0x3496bf(0xee)]=!0x1,_0x4e1a10[_0x3496bf(0x11c)]=_0x586e28,_0x4e1a10[_0x3496bf(0x136)]=_0x35c6aa,_0x4e1a10[_0x3496bf(0x13e)]='@things-factory/meta-ui/client/pages/meta-grist-page',_0x4e1a10['parent']=_0x10e56a,await _0xa610bc[_0x3496bf(0xe5)](menu_base_1[_0x3496bf(0x11a)])['save'](Object[_0x3496bf(0x119)](Object[_0x3496bf(0x119)]({},_0x4e1a10),{'domain':_0x45c44b,'creator':_0x88efa,'updater':_0x88efa}));}[a0_0x22d4fd(0x12d)](_0x5e8b83){const _0x20b0c8=a0_0x22d4fd;let _0x33d3f1=JSON[_0x20b0c8(0x11e)](_0x5e8b83)[_0x20b0c8(0x12a)](/(.{100})/)[_0x20b0c8(0x13f)](_0x140ac3=>_0x140ac3),_0xd869bb=[_0x20b0c8(0x149),'aes-256-cbc',_0x20b0c8(0x12f),_0x20b0c8(0xd5),'aes-256-cfb1',_0x20b0c8(0x137),_0x20b0c8(0xfc),_0x20b0c8(0x140)],_0x498d38=crypto_1[_0x20b0c8(0xe9)][_0x20b0c8(0xf4)](0x20)[_0x20b0c8(0x106)](_0x20b0c8(0x13b)),_0x47a536=Buffer['from'](_0x498d38,_0x20b0c8(0x13b)),_0x4a5a24=_0x498d38[_0x20b0c8(0xd8)](0x0,0x10),_0x273717=['',_0x4a5a24,_0x4a5a24,_0x4a5a24,_0x4a5a24,_0x4a5a24,_0x4a5a24,_0x4a5a24],_0x2dbe54=0x0,_0x19391b=[];_0x19391b[_0x20b0c8(0xdd)](_0x498d38);for(var _0x232044=0x0;_0x232044<_0x33d3f1[_0x20b0c8(0x144)];_0x232044++,_0x2dbe54++){_0x2dbe54==_0xd869bb[_0x20b0c8(0x144)]&&(_0x2dbe54=0x0);let _0x52dc6b=crypto_1[_0x20b0c8(0xe9)]['createCipheriv'](_0xd869bb[_0x2dbe54],_0x47a536,_0x273717[_0x2dbe54]),_0x20a6c9=_0x52dc6b['update'](_0x33d3f1[_0x232044],_0x20b0c8(0xda),_0x20b0c8(0x13b));_0x20a6c9+=_0x52dc6b['final'](_0x20b0c8(0x13b)),_0x19391b['push'](_0x20a6c9);}return _0x19391b[_0x20b0c8(0x12c)](_0x20b0c8(0xfd));}};tslib_1['__decorate']([(0x0,type_graphql_1['Directive'])('@transaction'),(0x0,type_graphql_1[a0_0x22d4fd(0x12e)])(_0x549d9b=>Boolean,{'description':a0_0x22d4fd(0x11f)}),tslib_1[a0_0x22d4fd(0x130)](0x0,(0x0,type_graphql_1[a0_0x22d4fd(0xf3)])('id')),tslib_1[a0_0x22d4fd(0x130)](0x1,(0x0,type_graphql_1[a0_0x22d4fd(0xf3)])(a0_0x22d4fd(0x134))),tslib_1[a0_0x22d4fd(0x130)](0x2,(0x0,type_graphql_1[a0_0x22d4fd(0xf2)])()),tslib_1[a0_0x22d4fd(0x10a)]('design:type',Function),tslib_1['__metadata'](a0_0x22d4fd(0x12b),[String,String,Object]),tslib_1[a0_0x22d4fd(0x10a)](a0_0x22d4fd(0x142),Promise)],OperatoToolCreateMenu[a0_0x22d4fd(0x148)],a0_0x22d4fd(0xd6),null),OperatoToolCreateMenu=tslib_1[a0_0x22d4fd(0xea)]([(0x0,type_graphql_1[a0_0x22d4fd(0x141)])()],OperatoToolCreateMenu),exports[a0_0x22d4fd(0x128)]=OperatoToolCreateMenu;const modelTemplate=a0_0x22d4fd(0xe4);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x6d765a=a0_0xc6d7;function a0_0x4b10(){const _0x53b15d=['getRepository','PWD','snakeCaseName','Resolvers,','type\x20=>','\x20})',',length:','join','Float','tableName','datetime','map','utf8','EntitySubscribers\x20}\x20from\x20\x27./','\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','7PLrBlF','creator_id','\x27,\x20type:\x20\x27','__param','createNoHistoryServiceFiels','nullable','lodash','camelCaseName','getColTxtType','tslib','colSize','uniqRank','\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','-history\x27','.ts','Entities,\x20resolvers\x20as\x20','createServiceFiles','EntitySubscribers,','@things-factory/resource-base','type-graphql','-mutation.ts','\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}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','__decorate','__metadata','createTypeText','character\x20varying','updated_at','552MIMxmG','/packages','writeFile','defineProperty','double','pluralize','createServicePath','creator','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','/packages/','1hSnDpd','/server','JSON','domain_id','findOne','filter','\x0aimport\x20{\x20EventSubscriber\x20}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20HistoryEntitySubscriber\x20}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20getRepository\x20}\x20from\x20\x27@things-factory/shell\x27\x0a\x0a@EventSubscriber()\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryEntitySubscriber\x20extends\x20HistoryEntitySubscriber<{{pascalCase\x20name}},{{pascalCase\x20name}}History>\x20{\x0a\x20\x20public\x20get\x20entity()\x20{\x0a\x20\x20\x20\x20return\x20{{pascalCase\x20name}}\x0a\x20\x20}\x0a\x0a\x20\x20public\x20get\x20historyEntity()\x20{\x0a\x20\x20\x20\x20return\x20{{pascalCase\x20name}}History\x0a\x20\x20}\x0a\x0a\x20\x20{{entityToJson}}\x0a\x0a\x20\x20async\x20beforeRemoveHistory(history:{{pascalCase\x20name}}History,entity:{{pascalCase\x20name}}){\x0a\x20\x20\x20\x20let\x20repo\x20=\x20getRepository({{pascalCase\x20name}}History);\x0a\x20\x20\x20\x20const\x20revNo\x20=\x20await\x20repo.createQueryBuilder()\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.select(\x27max(data_revision_no)\x27,\x20\x27rev_no\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.where(\x27domain_id\x20=\x20:domainId\x27,\x20{\x20domainId:\x20entity.domain.id\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.andWhere(\x27original_id\x20=\x20:originalId\x27,\x20{\x20originalId:\x20entity.id\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.getRawOne()\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20history.dataRevisionNo\x20=\x20revNo\x20?\x20revNo.rev_no\x20+\x201\x20:\x201;\x0a\x20\x20\x20\x20return\x20history;\x0a\x20\x20}\x0a}\x0a','getProjectRootPath','createHistoryEntityText','Resolvers\x20}\x20from\x20\x27./','prototype','float','createDir','30455HsXqiT','bigint','COPY','date','colType','Resolvers,\x20subscribers\x20as\x20','18XnpWpQ','toolCreateService','createEntityText','{{camelCase\x20name}}.','17445296LpZfZC','double\x20precision','state','\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','\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','pascalCaseName','dataProp','Entities,','string','92056KovMQE','columnToEntityColumn','Int','getFieldType','readFileSync','long','includes','updater_id','mkdirSync','\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}}]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}Mutation]\x0a','-history-type.ts','indexOf','\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','5453034sVhySn','Operato\x20Tool\x20Create\x20Service','packages','rank','744358EILNbQ','\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','length','index.ts','writeFileSync','find','/*\x20ENTITIES\x20*/\x0a\x09...','decimal','Ctx','/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...','@things-factory/shell','env','created_at','sort','OperatoToolCreateService','design:returntype','\x20{\x20nullable:\x20','\x27,\x20nullable:\x20','push','number','...','design:paramtypes','@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})','Date','existsPath','-type.ts','-query.ts','integer','\x0a\x20\x20','Entity','updater','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','name','440673gzuMQw','timestamp\x20without\x20time\x20zone','\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','/event-subscriber.ts','text','/index.ts','existsSync','export\x20*\x20from\x20\x27./','Query','replace','createHistoryServiceFiles','pluralCamelCaseName','8769290lFJFsC','@Field(','import\x20{\x20entities\x20as\x20'];a0_0x4b10=function(){return _0x53b15d;};return a0_0x4b10();}(function(_0x29c4e1,_0x1e6b98){const _0x56c70c=a0_0xc6d7,_0x4bde86=_0x29c4e1();while(!![]){try{const _0x47670d=parseInt(_0x56c70c(0x1b5))/0x1*(-parseInt(_0x56c70c(0x151))/0x2)+parseInt(_0x56c70c(0x172))/0x3+-parseInt(_0x56c70c(0x1ab))/0x4*(parseInt(_0x56c70c(0x12d))/0x5)+-parseInt(_0x56c70c(0x14d))/0x6*(parseInt(_0x56c70c(0x190))/0x7)+parseInt(_0x56c70c(0x140))/0x8*(parseInt(_0x56c70c(0x133))/0x9)+parseInt(_0x56c70c(0x17e))/0xa+parseInt(_0x56c70c(0x137))/0xb;if(_0x47670d===_0x1e6b98)break;else _0x4bde86['push'](_0x4bde86['shift']());}catch(_0x24861e){_0x4bde86['push'](_0x4bde86['shift']());}}}(a0_0x4b10,0x7ccda));Object[a0_0x6d765a(0x1ae)](exports,'__esModule',{'value':!0x0}),exports['OperatoToolCreateService']=void 0x0;const tslib_1=require(a0_0x6d765a(0x199)),type_graphql_1=require(a0_0x6d765a(0x1a3)),shell_1=require(a0_0x6d765a(0x15b)),resource_base_1=require(a0_0x6d765a(0x1a2)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x6d765a(0x196)),{plural:plural}=require(a0_0x6d765a(0x1b0)),fs=require('fs');let OperatoToolCreateService=class{async[a0_0x6d765a(0x134)](_0x223c95,_0x5d7a5c){const _0x74e44a=a0_0x6d765a,{domain:_0x53aa04}=_0x5d7a5c[_0x74e44a(0x139)],_0x213899=await(0x0,shell_1[_0x74e44a(0x181)])(resource_base_1[_0x74e44a(0x16e)])[_0x74e44a(0x124)]({'where':{'id':_0x223c95}}),_0x59b774=await(0x0,shell_1[_0x74e44a(0x181)])(resource_base_1['EntityColumn'])[_0x74e44a(0x156)]({'where':{'domain':{'id':_0x53aa04['id']},'entity':{'id':_0x213899['id']}}});let {name:_0x456640='',bundle:_0x38f8a9=''}=_0x213899||{},_0x44214f=this['getProjectRootPath'](),_0x35ac5b=kebabCase(_0x456640);return await this[_0x74e44a(0x1b1)](_0x44214f,_0x38f8a9,_0x35ac5b),await this[_0x74e44a(0x1a0)](_0x44214f,_0x38f8a9,_0x456640,_0x35ac5b,_0x213899,_0x59b774),!0x0;}async[a0_0x6d765a(0x1a0)](_0x344d21,_0x424ad4,_0x4ac8f8,_0x335487,_0x44d204,_0x2e0818){const _0x207e88=a0_0x6d765a;let _0x2dced6={'name':_0x335487,'tableName':_0x44d204[_0x207e88(0x18a)],'pascalCaseName':startCase(camelCase(_0x4ac8f8))[_0x207e88(0x17b)](/ /g,''),'camelCaseName':camelCase(_0x4ac8f8),'snakeCaseName':snakeCase(_0x4ac8f8),'pluralPascalCaseName':startCase(camelCase(plural(_0x4ac8f8)))['replace'](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x4ac8f8))},_0x584803=_0x344d21+_0x207e88(0x1b4)+_0x424ad4+'/server/service/';[_0x207e88(0x122),'COPY'][_0x207e88(0x146)](_0x44d204['dataProp'])?await this[_0x207e88(0x17c)](_0x584803,_0x335487,_0x44d204,_0x2e0818,_0x2dced6):await this['createNoHistoryServiceFiels'](_0x584803,_0x335487,_0x44d204,_0x2e0818,_0x2dced6);}async[a0_0x6d765a(0x17c)](_0x3acdf3,_0x5d068c,_0xe5d73a,_0x31dbae,_0xad57c1){const _0x20c89f=a0_0x6d765a;await this[_0x20c89f(0x1ad)](_0x3acdf3+(_0x5d068c+'/index.ts'),serviceHistoryIndex,_0xad57c1);let _0x4b66ce=this[_0x20c89f(0x135)](_0xe5d73a,_0x31dbae);await this[_0x20c89f(0x1ad)](_0x3acdf3+(_0x5d068c+'/'+_0x5d068c+'.ts'),_0x4b66ce,_0xad57c1),await this[_0x20c89f(0x1ad)](_0x3acdf3+(_0x5d068c+'/'+_0x5d068c+_0x20c89f(0x16b)),serviceQuery,_0xad57c1),await this[_0x20c89f(0x1ad)](_0x3acdf3+(_0x5d068c+'/'+_0x5d068c+_0x20c89f(0x1a4)),serviceMutation,_0xad57c1);let _0x246f47=this['createTypeText'](_0x31dbae);await this[_0x20c89f(0x1ad)](_0x3acdf3+(_0x5d068c+'/'+_0x5d068c+_0x20c89f(0x16a)),_0x246f47,_0xad57c1);let _0x513761=this['createHistoryEntityText'](_0xe5d73a,_0x31dbae);await this['writeFile'](_0x3acdf3+(_0x5d068c+'/'+_0x5d068c+'-history.ts'),_0x513761,_0xad57c1);let _0x379cf4='';'JSON'==_0xe5d73a[_0x20c89f(0x13d)]?(_0x379cf4=_0x20c89f(0x13b),await this[_0x20c89f(0x1ad)](_0x3acdf3+(_0x5d068c+_0x20c89f(0x175)),serviceEntitySubscriber,_0xad57c1)):_0x379cf4='';let _0x221f3b=serviceEntitySubscriber[_0x20c89f(0x17b)](/{{entityToJson}}/g,_0x379cf4);await this[_0x20c89f(0x1ad)](_0x3acdf3+(_0x5d068c+_0x20c89f(0x175)),_0x221f3b,_0xad57c1),await this[_0x20c89f(0x1ad)](_0x3acdf3+(_0x5d068c+'/'+_0x5d068c+'-history-query.ts'),serviceHistoryQuery,_0xad57c1),await this[_0x20c89f(0x1ad)](_0x3acdf3+(_0x5d068c+'/'+_0x5d068c+_0x20c89f(0x14a)),sereviceHistoryType,_0xad57c1);let _0x344521=_0x3acdf3+'index.ts';0x0==await this[_0x20c89f(0x169)](_0x344521)&&await this[_0x20c89f(0x1ad)](_0x344521,allIndex,_0xad57c1);let _0x403ff1=await fs[_0x20c89f(0x144)](_0x344521,'utf8');_0x403ff1[_0x20c89f(0x14b)](_0x20c89f(0x179)+_0xad57c1[_0x20c89f(0x171)]+'/'+_0xad57c1[_0x20c89f(0x171)]+_0x20c89f(0x19d))<0x0&&(_0x403ff1=_0x403ff1['replace'](/\/\* EXPORT ENTITY TYPES \*\//,_0x20c89f(0x170)+_0xad57c1[_0x20c89f(0x171)]+'/'+_0xad57c1[_0x20c89f(0x171)]+_0x20c89f(0x19d))),_0x403ff1['indexOf'](_0x20c89f(0x179)+_0xad57c1['name']+'/'+_0xad57c1[_0x20c89f(0x171)]+'\x27')<0x0&&(_0x403ff1=_0x403ff1[_0x20c89f(0x17b)](/\/\* EXPORT ENTITY TYPES \*\//,_0x20c89f(0x170)+_0xad57c1['name']+'/'+_0xad57c1[_0x20c89f(0x171)]+'\x27')),_0x403ff1[_0x20c89f(0x14b)](_0x20c89f(0x180)+_0xad57c1[_0x20c89f(0x13c)]+_0x20c89f(0x19f)+_0xad57c1[_0x20c89f(0x13c)]+_0x20c89f(0x132)+_0xad57c1[_0x20c89f(0x13c)]+_0x20c89f(0x18e)+_0xad57c1[_0x20c89f(0x171)]+'\x27')<0x0&&(_0x403ff1=_0x403ff1[_0x20c89f(0x17b)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,'/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20'+_0xad57c1[_0x20c89f(0x13c)]+_0x20c89f(0x19f)+_0xad57c1[_0x20c89f(0x13c)]+_0x20c89f(0x132)+_0xad57c1['pascalCaseName']+_0x20c89f(0x18e)+_0xad57c1[_0x20c89f(0x171)]+'\x27')),_0x403ff1[_0x20c89f(0x14b)](_0x20c89f(0x165)+_0xad57c1[_0x20c89f(0x13c)]+_0x20c89f(0x13e))<0x0&&(_0x403ff1=_0x403ff1[_0x20c89f(0x17b)](/\/\* ENTITIES \*\//,_0x20c89f(0x157)+_0xad57c1['pascalCaseName']+_0x20c89f(0x13e))),_0x403ff1['indexOf']('...'+_0xad57c1['pascalCaseName']+'Resolvers,')<0x0&&(_0x403ff1=_0x403ff1[_0x20c89f(0x17b)](/\/\* RESOLVER CLASSES \*\//,'/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...'+_0xad57c1[_0x20c89f(0x13c)]+'Resolvers,')),_0x403ff1[_0x20c89f(0x14b)]('...'+_0xad57c1['pascalCaseName']+_0x20c89f(0x1a1))<0x0&&(_0x403ff1=_0x403ff1[_0x20c89f(0x17b)](/\/\* SUBSCRIBERS \*\//,_0x20c89f(0x15a)+_0xad57c1['pascalCaseName']+_0x20c89f(0x1a1))),await this[_0x20c89f(0x1ad)](_0x344521,_0x403ff1,_0xad57c1);}async[a0_0x6d765a(0x194)](_0x50de92,_0xd318cb,_0x4f633f,_0x613109,_0x1b95d4){const _0x799a5=a0_0x6d765a;await this[_0x799a5(0x1ad)](_0x50de92+(_0xd318cb+_0x799a5(0x177)),serviceIndex,_0x1b95d4),await this['writeFile'](_0x50de92+(_0xd318cb+'/'+_0xd318cb+_0x799a5(0x16b)),serviceQuery,_0x1b95d4),await this[_0x799a5(0x1ad)](_0x50de92+(_0xd318cb+'/'+_0xd318cb+_0x799a5(0x1a4)),serviceMutation,_0x1b95d4);let _0x5130a7=this[_0x799a5(0x135)](_0x4f633f,_0x613109);await this[_0x799a5(0x1ad)](_0x50de92+(_0xd318cb+'/'+_0xd318cb+_0x799a5(0x19e)),_0x5130a7,_0x1b95d4);let _0x16df3f=this[_0x799a5(0x1a8)](_0x613109);await this[_0x799a5(0x1ad)](_0x50de92+(_0xd318cb+'/'+_0xd318cb+_0x799a5(0x16a)),_0x16df3f,_0x1b95d4);let _0x5e2e5d=_0x50de92+_0x799a5(0x154);0x0==await this['existsPath'](_0x5e2e5d)&&await this[_0x799a5(0x1ad)](_0x5e2e5d,allIndex,_0x1b95d4);let _0x7eb920=await fs['readFileSync'](_0x5e2e5d,_0x799a5(0x18d));_0x7eb920[_0x799a5(0x14b)](_0x799a5(0x179)+_0x1b95d4['name']+'/'+_0x1b95d4['name']+'\x27')<0x0&&(_0x7eb920=_0x7eb920['replace'](/\/\* EXPORT ENTITY TYPES \*\//,_0x799a5(0x170)+_0x1b95d4[_0x799a5(0x171)]+'/'+_0x1b95d4[_0x799a5(0x171)]+'\x27')),_0x7eb920[_0x799a5(0x14b)]('import\x20{\x20entities\x20as\x20'+_0x1b95d4['pascalCaseName']+'Entities,\x20resolvers\x20as\x20'+_0x1b95d4[_0x799a5(0x13c)]+_0x799a5(0x129)+_0x1b95d4[_0x799a5(0x171)]+'\x27')<0x0&&(_0x7eb920=_0x7eb920[_0x799a5(0x17b)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,'/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20'+_0x1b95d4[_0x799a5(0x13c)]+_0x799a5(0x19f)+_0x1b95d4['pascalCaseName']+'Resolvers\x20}\x20from\x20\x27./'+_0x1b95d4[_0x799a5(0x171)]+'\x27')),_0x7eb920[_0x799a5(0x14b)]('...'+_0x1b95d4[_0x799a5(0x13c)]+_0x799a5(0x13e))<0x0&&(_0x7eb920=_0x7eb920[_0x799a5(0x17b)](/\/\* ENTITIES \*\//,_0x799a5(0x157)+_0x1b95d4[_0x799a5(0x13c)]+'Entities,')),_0x7eb920[_0x799a5(0x14b)](_0x799a5(0x165)+_0x1b95d4[_0x799a5(0x13c)]+_0x799a5(0x184))<0x0&&(_0x7eb920=_0x7eb920[_0x799a5(0x17b)](/\/\* RESOLVER CLASSES \*\//,_0x799a5(0x1b3)+_0x1b95d4[_0x799a5(0x13c)]+_0x799a5(0x184))),await this['writeFile'](_0x5e2e5d,_0x7eb920,_0x1b95d4);}['createTypeText'](_0xe87d45){const _0x7c6b9b=a0_0x6d765a;let _0x13686f=sereviceType,_0x5928f7=_0xe87d45[_0x7c6b9b(0x18c)](_0x22c497=>{const _0x475408=_0x7c6b9b;if('id'==_0x22c497['name'])return'';if(_0x475408(0x123)==_0x22c497['name'])return'';if('created_at'==_0x22c497['name'])return'';if(_0x475408(0x1aa)==_0x22c497[_0x475408(0x171)])return'';if('creator_id'==_0x22c497[_0x475408(0x171)])return'';if('updater_id'==_0x22c497[_0x475408(0x171)])return'';let _0x4ecb40=this['getFieldType'](_0x22c497),_0xdc3323=this[_0x475408(0x198)](_0x22c497),_0x1b90fa=camelCase(_0x22c497[_0x475408(0x171)]);return'\x20\x20'+(_0x475408(0x17f)+(0x0==_0x4ecb40[_0x475408(0x153)]?'':_0x475408(0x185)+_0x4ecb40+',')+'\x20{\x20nullable:\x20'+_0x22c497[_0x475408(0x195)]+_0x475408(0x186))+_0x475408(0x16d)+(''+_0x1b90fa+(_0x22c497[_0x475408(0x195)]?'?':'')+':\x20'+_0xdc3323)+'\x0a';});_0x13686f=_0x13686f[_0x7c6b9b(0x17b)](/{{newTypeColumns}}/g,_0x5928f7[_0x7c6b9b(0x188)]('\x0a'));let _0x5c3f87=_0xe87d45['map'](_0xf7b7cf=>{const _0x5337d7=_0x7c6b9b;if('id'==_0xf7b7cf['name'])return'';if('domain_id'==_0xf7b7cf['name'])return'';if(_0x5337d7(0x15d)==_0xf7b7cf[_0x5337d7(0x171)])return'';if(_0x5337d7(0x1aa)==_0xf7b7cf['name'])return'';if('creator_id'==_0xf7b7cf[_0x5337d7(0x171)])return'';if(_0x5337d7(0x147)==_0xf7b7cf['name'])return'';let _0x16cc53=this[_0x5337d7(0x143)](_0xf7b7cf),_0x55beb5=this[_0x5337d7(0x198)](_0xf7b7cf);_0xf7b7cf[_0x5337d7(0x195)]=!0x0;let _0x10dfe4=camelCase(_0xf7b7cf['name']);return'\x20\x20'+('@Field('+(0x0==_0x16cc53['length']?'':'type\x20=>'+_0x16cc53+',')+'\x20{\x20nullable:\x20'+_0xf7b7cf[_0x5337d7(0x195)]+_0x5337d7(0x186))+_0x5337d7(0x16d)+(''+_0x10dfe4+(_0xf7b7cf[_0x5337d7(0x195)]?'?':'')+':\x20'+_0x55beb5)+'\x0a';});return _0x13686f=_0x13686f[_0x7c6b9b(0x17b)](/{{patchTypeColumns}}/g,_0x5c3f87[_0x7c6b9b(0x188)]('\x0a')),_0x13686f;}[a0_0x6d765a(0x135)](_0xb04da0,_0x445303){const _0x413125=a0_0x6d765a;let _0x13a5ea=serviceEntity,_0x30ff74=_0x445303[_0x413125(0x15e)](function(_0x3f721d,_0x1efde4){const _0x2dd2c4=_0x413125;return _0x3f721d[_0x2dd2c4(0x150)]-_0x1efde4['rank'];})[_0x413125(0x18c)](_0x5bf813=>this['columnToEntityColumn'](_0x5bf813));[_0x413125(0x12f),_0x413125(0x122)][_0x413125(0x146)](_0xb04da0[_0x413125(0x13d)])&&_0x30ff74[_0x413125(0x163)]('\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201'),_0x13a5ea=_0x13a5ea[_0x413125(0x17b)](/{{entityColumns}}/g,_0x30ff74['join']('\x0a'));let _0x1a2361='',_0x3827e0=_0x445303[_0x413125(0x125)](_0x5143b5=>_0x5143b5[_0x413125(0x19b)]&&_0x5143b5['uniqRank']>0x0)['sort'](function(_0xa1374e,_0x5ccc20){const _0x4f3025=_0x413125;return _0xa1374e[_0x4f3025(0x19b)]-_0x5ccc20[_0x4f3025(0x19b)];});if(_0x3827e0['length']>0x0){_0x1a2361=_0x413125(0x167);let _0x374fd4=_0x3827e0[_0x413125(0x18c)](_0x47b77d=>{const _0x497d2c=_0x413125;let _0x48d0ee=_0x47b77d['name'];return'domain_id'==_0x47b77d[_0x497d2c(0x171)]&&(_0x48d0ee='domain'),_0x497d2c(0x191)==_0x47b77d[_0x497d2c(0x171)]&&(_0x48d0ee=_0x497d2c(0x1b2)),_0x497d2c(0x147)==_0x47b77d[_0x497d2c(0x171)]&&(_0x48d0ee=_0x497d2c(0x16f)),_0x497d2c(0x136)+camelCase(_0x48d0ee);});_0x1a2361=_0x1a2361[_0x413125(0x17b)](/{{indexColumns}}/g,_0x374fd4[_0x413125(0x188)](','));}return _0x13a5ea=_0x13a5ea['replace'](/{{indexAnn}}/g,_0x1a2361),_0x13a5ea;}[a0_0x6d765a(0x128)](_0x2923da,_0x5373bd){const _0x39a49a=a0_0x6d765a;let _0x50c1ac='JSON'==_0x2923da[_0x39a49a(0x13d)]?serviceEntityHistJson:serviceEntityHistCopy,_0x5c2dc8=_0x5373bd[_0x39a49a(0x15e)](function(_0x45e40,_0x25c83b){const _0x28fc85=_0x39a49a;return _0x45e40[_0x28fc85(0x150)]-_0x25c83b[_0x28fc85(0x150)];})['map'](_0x6c49f6=>this[_0x39a49a(0x141)](_0x6c49f6));return _0x50c1ac=_0x50c1ac['replace'](/{{entityColumns}}/g,_0x5c2dc8[_0x39a49a(0x188)]('\x0a')),_0x50c1ac;}[a0_0x6d765a(0x141)](_0x341b95){const _0x13f423=a0_0x6d765a;if('id'==_0x341b95['name'])return'';if(_0x13f423(0x123)==_0x341b95['name'])return'';if('created_at'==_0x341b95['name'])return'';if(_0x13f423(0x1aa)==_0x341b95[_0x13f423(0x171)])return'';if(_0x13f423(0x191)==_0x341b95['name'])return'';if(_0x13f423(0x147)==_0x341b95[_0x13f423(0x171)])return'';let _0x582dd6=_0x341b95[_0x13f423(0x131)];_0x13f423(0x1af)==_0x341b95[_0x13f423(0x131)]&&(_0x582dd6=_0x13f423(0x138)),'long'==_0x341b95[_0x13f423(0x131)]&&(_0x582dd6=_0x13f423(0x12e)),_0x13f423(0x13f)==_0x341b95['colType']&&(_0x582dd6=_0x13f423(0x1a9)),_0x13f423(0x18b)==_0x341b95[_0x13f423(0x131)]&&(_0x582dd6=_0x13f423(0x173));let _0x1c631b='';_0x13f423(0x13f)==_0x341b95['colType']&&(_0x1c631b=_0x341b95[_0x13f423(0x19a)]);let _0x43f0d9=this[_0x13f423(0x143)](_0x341b95),_0x49cee1=this[_0x13f423(0x198)](_0x341b95),_0x214866=camelCase(_0x341b95[_0x13f423(0x171)]);return'\x20\x20'+('@Column({name:\x27'+_0x341b95['name']+_0x13f423(0x192)+_0x582dd6+_0x13f423(0x162)+_0x341b95[_0x13f423(0x195)]+'\x20'+(0x0==_0x1c631b['length']?'':_0x13f423(0x187)+_0x1c631b)+_0x13f423(0x186))+'\x0a\x20\x20'+('@Field('+(0x0==_0x43f0d9[_0x13f423(0x153)]?'':_0x13f423(0x185)+_0x43f0d9+',')+_0x13f423(0x161)+_0x341b95[_0x13f423(0x195)]+'\x20})')+'\x0a\x20\x20'+(''+_0x214866+(_0x341b95[_0x13f423(0x195)]?'?':'')+':\x20'+_0x49cee1)+'\x0a';}['getFieldType'](_0x454145){const _0x20aa82=a0_0x6d765a;let _0x4954af='';return _0x20aa82(0x1af)==_0x454145['colType']&&(_0x4954af=_0x20aa82(0x189)),_0x20aa82(0x12b)==_0x454145[_0x20aa82(0x131)]&&(_0x4954af='Float'),'long'==_0x454145[_0x20aa82(0x131)]&&(_0x4954af=_0x20aa82(0x142)),_0x20aa82(0x16c)==_0x454145[_0x20aa82(0x131)]&&(_0x4954af=_0x20aa82(0x142)),_0x4954af;}[a0_0x6d765a(0x198)](_0x3e7668){const _0x2b103a=a0_0x6d765a;let _0x41a048=_0x3e7668[_0x2b103a(0x131)];return _0x2b103a(0x158)==_0x3e7668[_0x2b103a(0x131)]&&(_0x41a048=_0x2b103a(0x164)),_0x2b103a(0x1af)==_0x3e7668[_0x2b103a(0x131)]&&(_0x41a048=_0x2b103a(0x164)),'float'==_0x3e7668['colType']&&(_0x41a048=_0x2b103a(0x164)),_0x2b103a(0x16c)==_0x3e7668[_0x2b103a(0x131)]&&(_0x41a048=_0x2b103a(0x164)),_0x2b103a(0x145)==_0x3e7668[_0x2b103a(0x131)]&&(_0x41a048=_0x2b103a(0x164)),_0x2b103a(0x18b)==_0x3e7668[_0x2b103a(0x131)]&&(_0x41a048='Date'),_0x2b103a(0x130)==_0x3e7668[_0x2b103a(0x131)]&&(_0x41a048=_0x2b103a(0x168)),_0x2b103a(0x176)==_0x3e7668[_0x2b103a(0x131)]&&(_0x41a048='string'),_0x41a048;}async[a0_0x6d765a(0x1ad)](_0x17afb0,_0x58450e,_0x17efaa){const _0x50141b=a0_0x6d765a;await fs[_0x50141b(0x155)](_0x17afb0,this['replaceNamesMap'](_0x58450e,_0x17efaa),'utf8');}['replaceNamesMap'](_0x2560eb,_0x5af592){const _0x3ea911=a0_0x6d765a;return _0x2560eb['replace'](/{{pascalCase name}}/g,_0x5af592[_0x3ea911(0x13c)])[_0x3ea911(0x17b)](/{{camelCase name}}/g,_0x5af592[_0x3ea911(0x197)])[_0x3ea911(0x17b)](/{{snakeCase name}}/g,_0x5af592[_0x3ea911(0x183)])[_0x3ea911(0x17b)](/{{pluralPascalCase name}}/g,_0x5af592['pluralPascalCaseName'])[_0x3ea911(0x17b)](/{{pluralCamelCase name}}/g,_0x5af592[_0x3ea911(0x17d)])[_0x3ea911(0x17b)](/{{tableName}}/g,_0x5af592[_0x3ea911(0x18a)])[_0x3ea911(0x17b)](/{{name}}/g,_0x5af592[_0x3ea911(0x171)]);}async[a0_0x6d765a(0x1b1)](_0xe0a322,_0x2dbf43,_0x582621){const _0x5394ad=a0_0x6d765a;let _0x4c9d31=_0xe0a322+_0x5394ad(0x1ac);await this[_0x5394ad(0x12c)](_0x4c9d31),_0x4c9d31=_0x4c9d31+'/'+_0x2dbf43,await this[_0x5394ad(0x12c)](_0x4c9d31),_0x4c9d31+=_0x5394ad(0x121),await this[_0x5394ad(0x12c)](_0x4c9d31),_0x4c9d31+='/service',await this[_0x5394ad(0x12c)](_0x4c9d31),_0x4c9d31=_0x4c9d31+'/'+_0x582621,await this[_0x5394ad(0x12c)](_0x4c9d31);}[a0_0x6d765a(0x127)](){const _0x24411f=a0_0x6d765a;let _0x3a990c=process[_0x24411f(0x15c)][_0x24411f(0x182)]['split']('/'),_0x503e68=[];for(let _0xed2737=0x0;_0xed2737<_0x3a990c[_0x24411f(0x153)]&&_0x24411f(0x14f)!=_0x3a990c[_0xed2737];_0xed2737++)_0x503e68[_0x24411f(0x163)](_0x3a990c[_0xed2737]);return _0x503e68[_0x24411f(0x188)]('/');}async[a0_0x6d765a(0x12c)](_0x18f87e){const _0x36d1dc=a0_0x6d765a;0x0==await this[_0x36d1dc(0x169)](_0x18f87e)&&fs[_0x36d1dc(0x148)](_0x18f87e);}async[a0_0x6d765a(0x169)](_0x288b79){const _0x281021=a0_0x6d765a;return await fs[_0x281021(0x178)](_0x288b79);}};tslib_1[a0_0x6d765a(0x1a6)]([(0x0,type_graphql_1[a0_0x6d765a(0x17a)])(_0x32755e=>Boolean,{'description':a0_0x6d765a(0x14e)}),tslib_1[a0_0x6d765a(0x193)](0x0,(0x0,type_graphql_1['Arg'])('id')),tslib_1['__param'](0x1,(0x0,type_graphql_1[a0_0x6d765a(0x159)])()),tslib_1['__metadata']('design:type',Function),tslib_1[a0_0x6d765a(0x1a7)](a0_0x6d765a(0x166),[String,Object]),tslib_1['__metadata'](a0_0x6d765a(0x160),Promise)],OperatoToolCreateService[a0_0x6d765a(0x12a)],a0_0x6d765a(0x134),null),OperatoToolCreateService=tslib_1[a0_0x6d765a(0x1a6)]([(0x0,type_graphql_1['Resolver'])()],OperatoToolCreateService),exports[a0_0x6d765a(0x15f)]=OperatoToolCreateService;function a0_0xc6d7(_0x5a58ac,_0x3bd962){const _0x4b10e6=a0_0x4b10();return a0_0xc6d7=function(_0xc6d72,_0x1affca){_0xc6d72=_0xc6d72-0x121;let _0x18d630=_0x4b10e6[_0xc6d72];return _0x18d630;},a0_0xc6d7(_0x5a58ac,_0x3bd962);}const allIndex=a0_0x6d765a(0x19c),serviceIndex=a0_0x6d765a(0x149),serviceHistoryIndex=a0_0x6d765a(0x152),serviceQuery=a0_0x6d765a(0x18f),serviceHistoryQuery=a0_0x6d765a(0x1a5),serviceMutation='\x0aimport\x20{\x20Resolver,\x20Mutation,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20In\x20}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20New{{pascalCase\x20name}},\x20{{pascalCase\x20name}}Patch\x20}\x20from\x20\x27./{{name}}-type\x27\x0aimport\x20{\x20getRepository\x20}\x20from\x20\x27@things-factory/shell\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Mutation\x20{\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20create\x20new\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20create{{pascalCase\x20name}}(@Arg(\x27{{camelCase\x20name}}\x27)\x20{{camelCase\x20name}}:\x20New{{pascalCase\x20name}},\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20return\x20await\x20tx.getRepository({{pascalCase\x20name}}).save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20modify\x20{{pascalCase\x20name}}\x20information\x27\x20})\x0a\x20\x20async\x20update{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27id\x27)\x20id:\x20string,\x0a\x20\x20\x20\x20@Arg(\x27patch\x27)\x20patch:\x20{{pascalCase\x20name}}Patch,\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20repository\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20repository.findOne(\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20)\x0a\x0a\x20\x20\x20\x20return\x20await\x20repository.save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20...patch,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20[{{pascalCase\x20name}}],\x20{\x20description:\x20\x22To\x20modify\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20information\x22\x20})\x0a\x20\x20async\x20updateMultiple{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27patches\x27,\x20type\x20=>\x20[{{pascalCase\x20name}}Patch])\x20patches:\x20{{pascalCase\x20name}}Patch[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}[]>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20results\x20=\x20[]\x0a\x20\x20\x20\x20const\x20_createRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27+\x27)\x0a\x20\x20\x20\x20const\x20_updateRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27M\x27)\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}Repo\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x0a\x20\x20\x20\x20if\x20(_createRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_createRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20newRecord\x20=\x20_createRecords[i]\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...newRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27+\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20if\x20(_updateRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_updateRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20updRecord\x20=\x20_updateRecords[i]\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20{{camelCase\x20name}}Repo.findOne({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id:updRecord.id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...updRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27M\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20return\x20results\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20delete{{pascalCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove({\x20domain,\x20id,\x20updater:user\x20})\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20multiple\x20{{camelCase\x20name}}s\x27\x20})\x0a\x20\x20async\x20delete{{pluralPascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27ids\x27,\x20type\x20=>\x20[String])\x20ids:\x20string[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20delEntitis\x20=\x20ids.map(id=>{\x0a\x20\x20\x20\x20\x20\x20return\x20{domain,id,updater:user}\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove(delEntitis)\x0a\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a}\x0a',sereviceType='\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_0x6d765a(0x13a),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_0x6d765a(0x174),serviceEntityHistJson=a0_0x6d765a(0x14c),serviceEntitySubscriber=a0_0x6d765a(0x126);
|
|
1
|
+
'use strict';const a0_0x3ce6d0=a0_0x308d;(function(_0x36404f,_0x53ecf4){const _0x3e737e=a0_0x308d,_0x4a379d=_0x36404f();while(!![]){try{const _0x2449a7=-parseInt(_0x3e737e(0xde))/0x1*(parseInt(_0x3e737e(0xd0))/0x2)+parseInt(_0x3e737e(0xf6))/0x3+-parseInt(_0x3e737e(0x110))/0x4*(parseInt(_0x3e737e(0x115))/0x5)+-parseInt(_0x3e737e(0x111))/0x6+-parseInt(_0x3e737e(0x94))/0x7+-parseInt(_0x3e737e(0xdc))/0x8*(parseInt(_0x3e737e(0xfd))/0x9)+parseInt(_0x3e737e(0xfb))/0xa;if(_0x2449a7===_0x53ecf4)break;else _0x4a379d['push'](_0x4a379d['shift']());}catch(_0x34419e){_0x4a379d['push'](_0x4a379d['shift']());}}}(a0_0x6113,0xe5f05));function a0_0x6113(){const _0x20440c=['\x27,\x20nullable:\x20','writeFile','Date','columnToEntityColumn','2549178fAEWuO','camelCaseName','join','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','updater_id','64288580yTkPdN','EntitySubscribers,','369WkjSAi','includes','domain_id','pascalCaseName','\x0a\x20\x20public\x20createHistoryEntity(manager,\x20entity)\x20{\x0a\x20\x20\x20\x20let\x20history\x20=\x20manager.create(this.historyEntity,\x20entity);\x0a\x20\x20\x20\x20history.historyJson\x20=\x20JSON.stringify(entity);\x0a\x20\x20\x20\x20return\x20history;\x0a\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20','snakeCaseName','\x27,\x20type:\x20\x27','/*\x20ENTITIES\x20*/\x0a\x09...','/packages/','decimal','split','\x0aimport\x20{\x20Resolver,\x20Mutation,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20In\x20}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20New{{pascalCase\x20name}},\x20{{pascalCase\x20name}}Patch\x20}\x20from\x20\x27./{{name}}-type\x27\x0aimport\x20{\x20getRepository\x20}\x20from\x20\x27@things-factory/shell\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Mutation\x20{\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20create\x20new\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20create{{pascalCase\x20name}}(@Arg(\x27{{camelCase\x20name}}\x27)\x20{{camelCase\x20name}}:\x20New{{pascalCase\x20name}},\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20return\x20await\x20tx.getRepository({{pascalCase\x20name}}).save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20modify\x20{{pascalCase\x20name}}\x20information\x27\x20})\x0a\x20\x20async\x20update{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27id\x27)\x20id:\x20string,\x0a\x20\x20\x20\x20@Arg(\x27patch\x27)\x20patch:\x20{{pascalCase\x20name}}Patch,\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20repository\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20repository.findOne(\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20)\x0a\x0a\x20\x20\x20\x20return\x20await\x20repository.save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20...patch,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20[{{pascalCase\x20name}}],\x20{\x20description:\x20\x22To\x20modify\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20information\x22\x20})\x0a\x20\x20async\x20updateMultiple{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27patches\x27,\x20type\x20=>\x20[{{pascalCase\x20name}}Patch])\x20patches:\x20{{pascalCase\x20name}}Patch[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}[]>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20results\x20=\x20[]\x0a\x20\x20\x20\x20const\x20_createRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27+\x27)\x0a\x20\x20\x20\x20const\x20_updateRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27M\x27)\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}Repo\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x0a\x20\x20\x20\x20if\x20(_createRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_createRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20newRecord\x20=\x20_createRecords[i]\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...newRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27+\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20if\x20(_updateRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_updateRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20updRecord\x20=\x20_updateRecords[i]\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20{{camelCase\x20name}}Repo.findOne({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id:updRecord.id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...updRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27M\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20return\x20results\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20delete{{pascalCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove({\x20domain,\x20id,\x20updater:user\x20})\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20multiple\x20{{camelCase\x20name}}s\x27\x20})\x0a\x20\x20async\x20delete{{pluralPascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27ids\x27,\x20type\x20=>\x20[String])\x20ids:\x20string[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20delEntitis\x20=\x20ids.map(id=>{\x0a\x20\x20\x20\x20\x20\x20return\x20{domain,id,updater:user}\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove(delEntitis)\x0a\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a}\x0a','Query','/packages','getColTxtType','indexOf','name','replaceNamesMap','creator_id','388yElaMT','10702110nxWpIP','\x0a/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0a\x0a/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0a\x0aexport\x20const\x20entities\x20=\x20[\x20\x20\x0a\x20\x20/*\x20ENTITIES\x20*/\x0a]\x20\x0a\x0a\x0aexport\x20const\x20schema\x20=\x20{\x0a\x20\x20resolverClasses:\x20[\x0a\x20\x20\x20\x20/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x20\x20]\x20\x0a}\x0a\x0aexport\x20const\x20subscribers\x20=\x20[\x0a\x20\x20/*\x20SUBSCRIBERS\x20*/\x0a]\x0a','writeFileSync','\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryQuery\x20}\x20from\x20\x27./{{name}}-history-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryEntitySubscriber\x20}\x20from\x20\x27./event-subscriber\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}},\x20{{pascalCase\x20name}}History]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}HistoryQuery,\x20{{pascalCase\x20name}}Mutation]\x0aexport\x20const\x20subscribers\x20=\x20[{{pascalCase\x20name}}HistoryEntitySubscriber]\x0a\x0a','54955JLSufm','number','Resolver','@Column({name:\x27','@things-factory/resource-base','Int','\x20})','length','dataProp','utf8','createDir','defineProperty','\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}}]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}Mutation]\x0a','pluralCamelCaseName','\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryList\x20}\x20from\x20\x27./{{name}}-history-type\x27\x0a\x0a@Resolver({{pascalCase\x20name}}History)\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryQuery\x20{\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}History,\x20{\x20description:\x20\x27To\x20fetch\x20a\x20{{pascalCase\x20name}}History\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}History(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}History>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20return\x20await\x20getRepository({{pascalCase\x20name}}History).findOne({\x0a\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20}\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}HistoryList,\x20{\x20description:\x20\x27To\x20fetch\x20multiple\x20{{pluralPascalCase\x20name}}History\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}Histories(@Args()\x20params:\x20ListParam,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}HistoryList>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20queryBuilder\x20=\x20getQueryBuilderFromListParams({\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20params,\x0a\x20\x20\x20\x20\x20\x20repository:\x20await\x20getRepository({{pascalCase\x20name}}History)\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20const\x20[items,\x20total]\x20=\x20await\x20queryBuilder.getManyAndCount()\x0a\x0a\x20\x20\x20\x20return\x20{\x20items,\x20total\x20}\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20Domain)\x0a\x20\x20async\x20domain(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<Domain>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(Domain).findOneBy({id:{{camelCase\x20name}}History.domainId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20updater(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}History.updaterId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20creator(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}History.creatorId})\x0a\x20\x20}\x0a}\x0a','EntityColumn','findOne','colSize','4395377eDclAC','find','nullable','long','type\x20=>','timestamp\x20without\x20time\x20zone','JSON','double','\x0a\x20\x20','Arg','rank','\x0aimport\x20{\x20EventSubscriber\x20}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20HistoryEntitySubscriber\x20}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20getRepository\x20}\x20from\x20\x27@things-factory/shell\x27\x0a\x0a@EventSubscriber()\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryEntitySubscriber\x20extends\x20HistoryEntitySubscriber<{{pascalCase\x20name}},{{pascalCase\x20name}}History>\x20{\x0a\x20\x20public\x20get\x20entity()\x20{\x0a\x20\x20\x20\x20return\x20{{pascalCase\x20name}}\x0a\x20\x20}\x0a\x0a\x20\x20public\x20get\x20historyEntity()\x20{\x0a\x20\x20\x20\x20return\x20{{pascalCase\x20name}}History\x0a\x20\x20}\x0a\x0a\x20\x20{{entityToJson}}\x0a\x0a\x20\x20async\x20beforeRemoveHistory(history:{{pascalCase\x20name}}History,entity:{{pascalCase\x20name}}){\x0a\x20\x20\x20\x20let\x20repo\x20=\x20getRepository({{pascalCase\x20name}}History);\x0a\x20\x20\x20\x20const\x20revNo\x20=\x20await\x20repo.createQueryBuilder()\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.select(\x27max(data_revision_no)\x27,\x20\x27rev_no\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.where(\x27domain_id\x20=\x20:domainId\x27,\x20{\x20domainId:\x20entity.domain.id\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.andWhere(\x27original_id\x20=\x20:originalId\x27,\x20{\x20originalId:\x20entity.id\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.getRawOne()\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20history.dataRevisionNo\x20=\x20revNo\x20?\x20revNo.rev_no\x20+\x201\x20:\x201;\x0a\x20\x20\x20\x20return\x20history;\x0a\x20\x20}\x0a}\x0a','Resolvers,\x20subscribers\x20as\x20','createHistoryServiceFiles','design:returntype','export\x20*\x20from\x20\x27./','uniqRank','env','createServiceFiles','OperatoToolCreateService','-history\x27','getRepository','existsPath','/server','date','.ts','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','index.ts','colType','__metadata','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','createServicePath','-type.ts','\x0aimport\x20{\x20ObjectType,\x20Field,\x20InputType,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@InputType()\x0aexport\x20class\x20New{{pascalCase\x20name}}\x20{\x0a{{newTypeColumns}}\x0a}\x0a\x0a@InputType()\x0aexport\x20class\x20{{pascalCase\x20name}}Patch\x20{\x0a\x20\x20@Field(type\x20=>\x20ID,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20id?:\x20string\x0a\x0a{{patchTypeColumns}}\x0a\x0a\x20\x20@Field()\x0a\x20\x20cuFlag:\x20string\x0a}\x0a\x0a@ObjectType()\x0aexport\x20class\x20{{pascalCase\x20name}}List\x20{\x0a\x20\x20@Field(type\x20=>\x20[{{pascalCase\x20name}}])\x0a\x20\x20items:\x20{{pascalCase\x20name}}[]\x0a\x0a\x20\x20@Field(type\x20=>\x20Int)\x0a\x20\x20total:\x20number\x0a}\x0a','__esModule','Entities,\x20resolvers\x20as\x20','float','getProjectRootPath','createHistoryEntityText','datetime','Operato\x20Tool\x20Create\x20Service','pluralPascalCaseName','@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})','\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}List\x20}\x20from\x20\x27./{{name}}-type\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Query\x20{\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20fetch\x20a\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20return\x20await\x20getRepository({{pascalCase\x20name}}).findOne({\x0a\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20}\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}List,\x20{\x20description:\x20\x27To\x20fetch\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{pluralCamelCase\x20name}}(@Args()\x20params:\x20ListParam,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}List>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20queryBuilder\x20=\x20getQueryBuilderFromListParams({\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20params,\x0a\x20\x20\x20\x20\x20\x20repository:\x20await\x20getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20const\x20convertedParams\x20=\x20convertListParams(params,\x20domain.id)\x0a\x20\x20\x20\x20const\x20[items,\x20total]\x20=\x20await\x20queryBuilder.getManyAndCount()\x0a\x0a\x20\x20\x20\x20return\x20{\x20items,\x20total\x20}\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20Domain)\x0a\x20\x20async\x20domain(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<Domain>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(Domain).findOneBy({id:{{camelCase\x20name}}.domainId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20updater(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.updaterId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20creator(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.creatorId})\x0a\x20\x20}\x0a}\x0a','-history-query.ts','updated_at','replace','@Field(','created_at','__param','getFieldType','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a\x20\x20@Column(\x27simple-json\x27,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20@Field(type\x20=>\x20ScalarObject,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20historyJson?:\x20any\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','tslib','packages',',length:','design:paramtypes','\x20{\x20nullable:\x20','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20Domain\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0a@Entity(\x27{{tableName}}\x27)\x0a{{indexAnn}}\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}\x20{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','Resolvers\x20}\x20from\x20\x27./','double\x20precision','655166FuvVWC','...','integer','string','createNoHistoryServiceFiels','createEntityText','Resolvers,','bigint','domain','EntitySubscribers\x20}\x20from\x20\x27./','-mutation.ts','updater','366104dSHukZ','createTypeText','3vSbzSt','__decorate','/service','/event-subscriber.ts','-history-type.ts','existsSync','map','push','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','sort','/index.ts','Float','filter','Entity','prototype','Entities,','character\x20varying','readFileSync','toolCreateService','COPY'];a0_0x6113=function(){return _0x20440c;};return a0_0x6113();}Object[a0_0x3ce6d0(0x8d)](exports,a0_0x3ce6d0(0xb6),{'value':!0x0}),exports[a0_0x3ce6d0(0xa7)]=void 0x0;const tslib_1=require(a0_0x3ce6d0(0xc8)),type_graphql_1=require('type-graphql'),shell_1=require('@things-factory/shell'),resource_base_1=require(a0_0x3ce6d0(0x86)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require('lodash'),{plural:plural}=require('pluralize'),fs=require('fs');let OperatoToolCreateService=class{async[a0_0x3ce6d0(0xf0)](_0x374af7,_0x47562b){const _0x5c4a94=a0_0x3ce6d0,{domain:_0x10f6a8}=_0x47562b['state'],_0x37b4c9=await(0x0,shell_1[_0x5c4a94(0xa9)])(resource_base_1[_0x5c4a94(0xeb)])[_0x5c4a94(0x92)]({'where':{'id':_0x374af7}}),_0x547aaa=await(0x0,shell_1[_0x5c4a94(0xa9)])(resource_base_1[_0x5c4a94(0x91)])[_0x5c4a94(0x95)]({'where':{'domain':{'id':_0x10f6a8['id']},'entity':{'id':_0x37b4c9['id']}}});let {name:_0x593476='',bundle:_0x572a17=''}=_0x37b4c9||{},_0x21980e=this['getProjectRootPath'](),_0x4bfad3=kebabCase(_0x593476);return await this['createServicePath'](_0x21980e,_0x572a17,_0x4bfad3),await this[_0x5c4a94(0xa6)](_0x21980e,_0x572a17,_0x593476,_0x4bfad3,_0x37b4c9,_0x547aaa),!0x0;}async[a0_0x3ce6d0(0xa6)](_0xfa0d8b,_0x5163a9,_0x4467cf,_0x2bab65,_0x57ace8,_0x2de13f){const _0x348544=a0_0x3ce6d0;let _0x3ccc48={'name':_0x2bab65,'tableName':_0x57ace8['tableName'],'pascalCaseName':startCase(camelCase(_0x4467cf))['replace'](/ /g,''),'camelCaseName':camelCase(_0x4467cf),'snakeCaseName':snakeCase(_0x4467cf),'pluralPascalCaseName':startCase(camelCase(plural(_0x4467cf)))[_0x348544(0xc2)](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x4467cf))},_0x3b8b92=_0xfa0d8b+_0x348544(0x105)+_0x5163a9+'/server/service/';[_0x348544(0x9a),'COPY'][_0x348544(0xfe)](_0x57ace8[_0x348544(0x8a)])?await this['createHistoryServiceFiles'](_0x3b8b92,_0x2bab65,_0x57ace8,_0x2de13f,_0x3ccc48):await this[_0x348544(0xd4)](_0x3b8b92,_0x2bab65,_0x57ace8,_0x2de13f,_0x3ccc48);}async[a0_0x3ce6d0(0xa1)](_0x438d4e,_0x5337f0,_0x43e303,_0x5e7cbe,_0x518fa5){const _0x3c766b=a0_0x3ce6d0;await this['writeFile'](_0x438d4e+(_0x5337f0+'/index.ts'),serviceHistoryIndex,_0x518fa5);let _0x489780=this[_0x3c766b(0xd5)](_0x43e303,_0x5e7cbe);await this[_0x3c766b(0xf3)](_0x438d4e+(_0x5337f0+'/'+_0x5337f0+_0x3c766b(0xad)),_0x489780,_0x518fa5),await this[_0x3c766b(0xf3)](_0x438d4e+(_0x5337f0+'/'+_0x5337f0+'-query.ts'),serviceQuery,_0x518fa5),await this[_0x3c766b(0xf3)](_0x438d4e+(_0x5337f0+'/'+_0x5337f0+_0x3c766b(0xda)),serviceMutation,_0x518fa5);let _0x55ee61=this[_0x3c766b(0xdd)](_0x5e7cbe);await this[_0x3c766b(0xf3)](_0x438d4e+(_0x5337f0+'/'+_0x5337f0+_0x3c766b(0xb4)),_0x55ee61,_0x518fa5);let _0x47d0fc=this[_0x3c766b(0xba)](_0x43e303,_0x5e7cbe);await this['writeFile'](_0x438d4e+(_0x5337f0+'/'+_0x5337f0+'-history.ts'),_0x47d0fc,_0x518fa5);let _0x18d835='';_0x3c766b(0x9a)==_0x43e303[_0x3c766b(0x8a)]?(_0x18d835=_0x3c766b(0x101),await this[_0x3c766b(0xf3)](_0x438d4e+(_0x5337f0+_0x3c766b(0xe1)),serviceEntitySubscriber,_0x518fa5)):_0x18d835='';let _0x81e3e9=serviceEntitySubscriber[_0x3c766b(0xc2)](/{{entityToJson}}/g,_0x18d835);await this[_0x3c766b(0xf3)](_0x438d4e+(_0x5337f0+_0x3c766b(0xe1)),_0x81e3e9,_0x518fa5),await this['writeFile'](_0x438d4e+(_0x5337f0+'/'+_0x5337f0+_0x3c766b(0xc0)),serviceHistoryQuery,_0x518fa5),await this[_0x3c766b(0xf3)](_0x438d4e+(_0x5337f0+'/'+_0x5337f0+_0x3c766b(0xe2)),sereviceHistoryType,_0x518fa5);let _0x37b1e9=_0x438d4e+_0x3c766b(0xaf);0x0==await this[_0x3c766b(0xaa)](_0x37b1e9)&&await this[_0x3c766b(0xf3)](_0x37b1e9,allIndex,_0x518fa5);let _0x70a283=await fs['readFileSync'](_0x37b1e9,_0x3c766b(0x8b));_0x70a283[_0x3c766b(0x10c)]('export\x20*\x20from\x20\x27./'+_0x518fa5[_0x3c766b(0x10d)]+'/'+_0x518fa5[_0x3c766b(0x10d)]+_0x3c766b(0xa8))<0x0&&(_0x70a283=_0x70a283[_0x3c766b(0xc2)](/\/\* EXPORT ENTITY TYPES \*\//,_0x3c766b(0xf9)+_0x518fa5[_0x3c766b(0x10d)]+'/'+_0x518fa5['name']+_0x3c766b(0xa8))),_0x70a283[_0x3c766b(0x10c)](_0x3c766b(0xa3)+_0x518fa5[_0x3c766b(0x10d)]+'/'+_0x518fa5['name']+'\x27')<0x0&&(_0x70a283=_0x70a283[_0x3c766b(0xc2)](/\/\* EXPORT ENTITY TYPES \*\//,_0x3c766b(0xf9)+_0x518fa5[_0x3c766b(0x10d)]+'/'+_0x518fa5['name']+'\x27')),_0x70a283[_0x3c766b(0x10c)]('import\x20{\x20entities\x20as\x20'+_0x518fa5['pascalCaseName']+_0x3c766b(0xb7)+_0x518fa5['pascalCaseName']+'Resolvers,\x20subscribers\x20as\x20'+_0x518fa5[_0x3c766b(0x100)]+_0x3c766b(0xd9)+_0x518fa5[_0x3c766b(0x10d)]+'\x27')<0x0&&(_0x70a283=_0x70a283['replace'](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,'/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20'+_0x518fa5[_0x3c766b(0x100)]+_0x3c766b(0xb7)+_0x518fa5[_0x3c766b(0x100)]+_0x3c766b(0xa0)+_0x518fa5[_0x3c766b(0x100)]+_0x3c766b(0xd9)+_0x518fa5[_0x3c766b(0x10d)]+'\x27')),_0x70a283[_0x3c766b(0x10c)](_0x3c766b(0xd1)+_0x518fa5[_0x3c766b(0x100)]+_0x3c766b(0xed))<0x0&&(_0x70a283=_0x70a283[_0x3c766b(0xc2)](/\/\* ENTITIES \*\//,_0x3c766b(0x104)+_0x518fa5[_0x3c766b(0x100)]+_0x3c766b(0xed))),_0x70a283[_0x3c766b(0x10c)]('...'+_0x518fa5[_0x3c766b(0x100)]+_0x3c766b(0xd6))<0x0&&(_0x70a283=_0x70a283[_0x3c766b(0xc2)](/\/\* RESOLVER CLASSES \*\//,_0x3c766b(0xb2)+_0x518fa5[_0x3c766b(0x100)]+'Resolvers,')),_0x70a283[_0x3c766b(0x10c)](_0x3c766b(0xd1)+_0x518fa5['pascalCaseName']+_0x3c766b(0xfc))<0x0&&(_0x70a283=_0x70a283[_0x3c766b(0xc2)](/\/\* SUBSCRIBERS \*\//,'/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...'+_0x518fa5[_0x3c766b(0x100)]+_0x3c766b(0xfc))),await this[_0x3c766b(0xf3)](_0x37b1e9,_0x70a283,_0x518fa5);}async['createNoHistoryServiceFiels'](_0x42d66e,_0x23f0bc,_0x2297eb,_0xb7ff78,_0xe02fdc){const _0xc59a97=a0_0x3ce6d0;await this[_0xc59a97(0xf3)](_0x42d66e+(_0x23f0bc+_0xc59a97(0xe8)),serviceIndex,_0xe02fdc),await this[_0xc59a97(0xf3)](_0x42d66e+(_0x23f0bc+'/'+_0x23f0bc+'-query.ts'),serviceQuery,_0xe02fdc),await this[_0xc59a97(0xf3)](_0x42d66e+(_0x23f0bc+'/'+_0x23f0bc+_0xc59a97(0xda)),serviceMutation,_0xe02fdc);let _0x2fd7a3=this[_0xc59a97(0xd5)](_0x2297eb,_0xb7ff78);await this[_0xc59a97(0xf3)](_0x42d66e+(_0x23f0bc+'/'+_0x23f0bc+'.ts'),_0x2fd7a3,_0xe02fdc);let _0x575e11=this[_0xc59a97(0xdd)](_0xb7ff78);await this['writeFile'](_0x42d66e+(_0x23f0bc+'/'+_0x23f0bc+_0xc59a97(0xb4)),_0x575e11,_0xe02fdc);let _0x5eb57c=_0x42d66e+'index.ts';0x0==await this[_0xc59a97(0xaa)](_0x5eb57c)&&await this[_0xc59a97(0xf3)](_0x5eb57c,allIndex,_0xe02fdc);let _0x3f53c0=await fs[_0xc59a97(0xef)](_0x5eb57c,_0xc59a97(0x8b));_0x3f53c0[_0xc59a97(0x10c)](_0xc59a97(0xa3)+_0xe02fdc['name']+'/'+_0xe02fdc[_0xc59a97(0x10d)]+'\x27')<0x0&&(_0x3f53c0=_0x3f53c0['replace'](/\/\* EXPORT ENTITY TYPES \*\//,_0xc59a97(0xf9)+_0xe02fdc['name']+'/'+_0xe02fdc[_0xc59a97(0x10d)]+'\x27')),_0x3f53c0[_0xc59a97(0x10c)]('import\x20{\x20entities\x20as\x20'+_0xe02fdc[_0xc59a97(0x100)]+_0xc59a97(0xb7)+_0xe02fdc[_0xc59a97(0x100)]+_0xc59a97(0xce)+_0xe02fdc['name']+'\x27')<0x0&&(_0x3f53c0=_0x3f53c0['replace'](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0xc59a97(0xe6)+_0xe02fdc[_0xc59a97(0x100)]+'Entities,\x20resolvers\x20as\x20'+_0xe02fdc[_0xc59a97(0x100)]+'Resolvers\x20}\x20from\x20\x27./'+_0xe02fdc[_0xc59a97(0x10d)]+'\x27')),_0x3f53c0[_0xc59a97(0x10c)](_0xc59a97(0xd1)+_0xe02fdc[_0xc59a97(0x100)]+_0xc59a97(0xed))<0x0&&(_0x3f53c0=_0x3f53c0[_0xc59a97(0xc2)](/\/\* ENTITIES \*\//,'/*\x20ENTITIES\x20*/\x0a\x09...'+_0xe02fdc[_0xc59a97(0x100)]+_0xc59a97(0xed))),_0x3f53c0[_0xc59a97(0x10c)](_0xc59a97(0xd1)+_0xe02fdc[_0xc59a97(0x100)]+_0xc59a97(0xd6))<0x0&&(_0x3f53c0=_0x3f53c0[_0xc59a97(0xc2)](/\/\* RESOLVER CLASSES \*\//,_0xc59a97(0xb2)+_0xe02fdc[_0xc59a97(0x100)]+_0xc59a97(0xd6))),await this[_0xc59a97(0xf3)](_0x5eb57c,_0x3f53c0,_0xe02fdc);}[a0_0x3ce6d0(0xdd)](_0x58bb18){const _0x329af6=a0_0x3ce6d0;let _0xbd4308=sereviceType,_0x3032bd=_0x58bb18[_0x329af6(0xe4)](_0x16fe44=>{const _0x4ebe2b=_0x329af6;if('id'==_0x16fe44[_0x4ebe2b(0x10d)])return'';if(_0x4ebe2b(0xff)==_0x16fe44[_0x4ebe2b(0x10d)])return'';if('created_at'==_0x16fe44[_0x4ebe2b(0x10d)])return'';if('updated_at'==_0x16fe44['name'])return'';if('creator_id'==_0x16fe44[_0x4ebe2b(0x10d)])return'';if(_0x4ebe2b(0xfa)==_0x16fe44['name'])return'';let _0x256e16=this['getFieldType'](_0x16fe44),_0x4da8ec=this[_0x4ebe2b(0x10b)](_0x16fe44),_0x233a51=camelCase(_0x16fe44[_0x4ebe2b(0x10d)]);return'\x20\x20'+('@Field('+(0x0==_0x256e16[_0x4ebe2b(0x89)]?'':_0x4ebe2b(0x98)+_0x256e16+',')+_0x4ebe2b(0xcc)+_0x16fe44[_0x4ebe2b(0x96)]+_0x4ebe2b(0x88))+'\x0a\x20\x20'+(''+_0x233a51+(_0x16fe44[_0x4ebe2b(0x96)]?'?':'')+':\x20'+_0x4da8ec)+'\x0a';});_0xbd4308=_0xbd4308['replace'](/{{newTypeColumns}}/g,_0x3032bd[_0x329af6(0xf8)]('\x0a'));let _0x5d9c50=_0x58bb18[_0x329af6(0xe4)](_0x44f6b7=>{const _0x5de640=_0x329af6;if('id'==_0x44f6b7[_0x5de640(0x10d)])return'';if(_0x5de640(0xff)==_0x44f6b7[_0x5de640(0x10d)])return'';if('created_at'==_0x44f6b7[_0x5de640(0x10d)])return'';if('updated_at'==_0x44f6b7[_0x5de640(0x10d)])return'';if('creator_id'==_0x44f6b7[_0x5de640(0x10d)])return'';if(_0x5de640(0xfa)==_0x44f6b7[_0x5de640(0x10d)])return'';let _0x5357e5=this[_0x5de640(0xc6)](_0x44f6b7),_0x8dc3c=this[_0x5de640(0x10b)](_0x44f6b7);_0x44f6b7[_0x5de640(0x96)]=!0x0;let _0x4a66e6=camelCase(_0x44f6b7[_0x5de640(0x10d)]);return'\x20\x20'+(_0x5de640(0xc3)+(0x0==_0x5357e5[_0x5de640(0x89)]?'':_0x5de640(0x98)+_0x5357e5+',')+_0x5de640(0xcc)+_0x44f6b7[_0x5de640(0x96)]+'\x20})')+_0x5de640(0x9c)+(''+_0x4a66e6+(_0x44f6b7[_0x5de640(0x96)]?'?':'')+':\x20'+_0x8dc3c)+'\x0a';});return _0xbd4308=_0xbd4308['replace'](/{{patchTypeColumns}}/g,_0x5d9c50[_0x329af6(0xf8)]('\x0a')),_0xbd4308;}[a0_0x3ce6d0(0xd5)](_0x4fde39,_0x1436e4){const _0x5a87b2=a0_0x3ce6d0;let _0xabe7d4=serviceEntity,_0x420e37=_0x1436e4[_0x5a87b2(0xe7)](function(_0x1da360,_0x1c4b7d){const _0x592e09=_0x5a87b2;return _0x1da360[_0x592e09(0x9e)]-_0x1c4b7d[_0x592e09(0x9e)];})[_0x5a87b2(0xe4)](_0xa29d9f=>this['columnToEntityColumn'](_0xa29d9f));[_0x5a87b2(0xf1),_0x5a87b2(0x9a)]['includes'](_0x4fde39[_0x5a87b2(0x8a)])&&_0x420e37[_0x5a87b2(0xe5)]('\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201'),_0xabe7d4=_0xabe7d4[_0x5a87b2(0xc2)](/{{entityColumns}}/g,_0x420e37['join']('\x0a'));let _0xbfc521='',_0x4e1f3d=_0x1436e4[_0x5a87b2(0xea)](_0x28829b=>_0x28829b[_0x5a87b2(0xa4)]&&_0x28829b[_0x5a87b2(0xa4)]>0x0)['sort'](function(_0x4b27ea,_0x4af5b6){const _0x5457ee=_0x5a87b2;return _0x4b27ea[_0x5457ee(0xa4)]-_0x4af5b6['uniqRank'];});if(_0x4e1f3d[_0x5a87b2(0x89)]>0x0){_0xbfc521=_0x5a87b2(0xbe);let _0x16543b=_0x4e1f3d[_0x5a87b2(0xe4)](_0x436a49=>{const _0x3c787d=_0x5a87b2;let _0x693b44=_0x436a49['name'];return _0x3c787d(0xff)==_0x436a49[_0x3c787d(0x10d)]&&(_0x693b44=_0x3c787d(0xd8)),_0x3c787d(0x10f)==_0x436a49[_0x3c787d(0x10d)]&&(_0x693b44='creator'),_0x3c787d(0xfa)==_0x436a49[_0x3c787d(0x10d)]&&(_0x693b44=_0x3c787d(0xdb)),'{{camelCase\x20name}}.'+camelCase(_0x693b44);});_0xbfc521=_0xbfc521[_0x5a87b2(0xc2)](/{{indexColumns}}/g,_0x16543b[_0x5a87b2(0xf8)](','));}return _0xabe7d4=_0xabe7d4[_0x5a87b2(0xc2)](/{{indexAnn}}/g,_0xbfc521),_0xabe7d4;}[a0_0x3ce6d0(0xba)](_0x2cd8fc,_0x42d908){const _0x2a1b9f=a0_0x3ce6d0;let _0x45ef97='JSON'==_0x2cd8fc['dataProp']?serviceEntityHistJson:serviceEntityHistCopy,_0x2b5520=_0x42d908['sort'](function(_0x2d47b5,_0x3c2fcd){const _0x33e8a5=a0_0x308d;return _0x2d47b5[_0x33e8a5(0x9e)]-_0x3c2fcd['rank'];})['map'](_0x5b7ce3=>this[_0x2a1b9f(0xf5)](_0x5b7ce3));return _0x45ef97=_0x45ef97['replace'](/{{entityColumns}}/g,_0x2b5520[_0x2a1b9f(0xf8)]('\x0a')),_0x45ef97;}[a0_0x3ce6d0(0xf5)](_0x5492da){const _0x199df6=a0_0x3ce6d0;if('id'==_0x5492da['name'])return'';if(_0x199df6(0xff)==_0x5492da['name'])return'';if(_0x199df6(0xc4)==_0x5492da[_0x199df6(0x10d)])return'';if(_0x199df6(0xc1)==_0x5492da['name'])return'';if(_0x199df6(0x10f)==_0x5492da[_0x199df6(0x10d)])return'';if(_0x199df6(0xfa)==_0x5492da[_0x199df6(0x10d)])return'';let _0xa7dcbe=_0x5492da['colType'];_0x199df6(0x9b)==_0x5492da[_0x199df6(0xb0)]&&(_0xa7dcbe=_0x199df6(0xcf)),'long'==_0x5492da['colType']&&(_0xa7dcbe=_0x199df6(0xd7)),_0x199df6(0xd3)==_0x5492da[_0x199df6(0xb0)]&&(_0xa7dcbe=_0x199df6(0xee)),_0x199df6(0xbb)==_0x5492da['colType']&&(_0xa7dcbe=_0x199df6(0x99));let _0x1a4ccd='';'string'==_0x5492da[_0x199df6(0xb0)]&&(_0x1a4ccd=_0x5492da[_0x199df6(0x93)]);let _0xc70b3a=this[_0x199df6(0xc6)](_0x5492da),_0x3406b4=this['getColTxtType'](_0x5492da),_0x4ae451=camelCase(_0x5492da['name']);return'\x20\x20'+(_0x199df6(0x85)+_0x5492da['name']+_0x199df6(0x103)+_0xa7dcbe+_0x199df6(0xf2)+_0x5492da[_0x199df6(0x96)]+'\x20'+(0x0==_0x1a4ccd[_0x199df6(0x89)]?'':_0x199df6(0xca)+_0x1a4ccd)+_0x199df6(0x88))+'\x0a\x20\x20'+(_0x199df6(0xc3)+(0x0==_0xc70b3a[_0x199df6(0x89)]?'':_0x199df6(0x98)+_0xc70b3a+',')+_0x199df6(0xcc)+_0x5492da[_0x199df6(0x96)]+_0x199df6(0x88))+_0x199df6(0x9c)+(''+_0x4ae451+(_0x5492da[_0x199df6(0x96)]?'?':'')+':\x20'+_0x3406b4)+'\x0a';}[a0_0x3ce6d0(0xc6)](_0x33242d){const _0xe32b4=a0_0x3ce6d0;let _0x47adee='';return'double'==_0x33242d[_0xe32b4(0xb0)]&&(_0x47adee=_0xe32b4(0xe9)),_0xe32b4(0xb8)==_0x33242d[_0xe32b4(0xb0)]&&(_0x47adee='Float'),_0xe32b4(0x97)==_0x33242d['colType']&&(_0x47adee='Int'),_0xe32b4(0xd2)==_0x33242d[_0xe32b4(0xb0)]&&(_0x47adee=_0xe32b4(0x87)),_0x47adee;}['getColTxtType'](_0x447693){const _0x26e769=a0_0x3ce6d0;let _0x5ad4f2=_0x447693['colType'];return _0x26e769(0x106)==_0x447693[_0x26e769(0xb0)]&&(_0x5ad4f2=_0x26e769(0x116)),_0x26e769(0x9b)==_0x447693[_0x26e769(0xb0)]&&(_0x5ad4f2=_0x26e769(0x116)),_0x26e769(0xb8)==_0x447693[_0x26e769(0xb0)]&&(_0x5ad4f2=_0x26e769(0x116)),_0x26e769(0xd2)==_0x447693[_0x26e769(0xb0)]&&(_0x5ad4f2=_0x26e769(0x116)),_0x26e769(0x97)==_0x447693['colType']&&(_0x5ad4f2=_0x26e769(0x116)),_0x26e769(0xbb)==_0x447693[_0x26e769(0xb0)]&&(_0x5ad4f2=_0x26e769(0xf4)),_0x26e769(0xac)==_0x447693[_0x26e769(0xb0)]&&(_0x5ad4f2=_0x26e769(0xf4)),'text'==_0x447693['colType']&&(_0x5ad4f2=_0x26e769(0xd3)),_0x5ad4f2;}async[a0_0x3ce6d0(0xf3)](_0x5ab765,_0x1a42db,_0x2e402b){const _0x5be9bc=a0_0x3ce6d0;await fs[_0x5be9bc(0x113)](_0x5ab765,this[_0x5be9bc(0x10e)](_0x1a42db,_0x2e402b),_0x5be9bc(0x8b));}[a0_0x3ce6d0(0x10e)](_0x15681c,_0x2d0e7f){const _0x4f547d=a0_0x3ce6d0;return _0x15681c[_0x4f547d(0xc2)](/{{pascalCase name}}/g,_0x2d0e7f['pascalCaseName'])[_0x4f547d(0xc2)](/{{camelCase name}}/g,_0x2d0e7f[_0x4f547d(0xf7)])[_0x4f547d(0xc2)](/{{snakeCase name}}/g,_0x2d0e7f[_0x4f547d(0x102)])['replace'](/{{pluralPascalCase name}}/g,_0x2d0e7f[_0x4f547d(0xbd)])['replace'](/{{pluralCamelCase name}}/g,_0x2d0e7f[_0x4f547d(0x8f)])['replace'](/{{tableName}}/g,_0x2d0e7f['tableName'])['replace'](/{{name}}/g,_0x2d0e7f[_0x4f547d(0x10d)]);}async[a0_0x3ce6d0(0xb3)](_0x44a0e8,_0x3ba2b8,_0x4e7342){const _0x59374b=a0_0x3ce6d0;let _0x386933=_0x44a0e8+_0x59374b(0x10a);await this[_0x59374b(0x8c)](_0x386933),_0x386933=_0x386933+'/'+_0x3ba2b8,await this['createDir'](_0x386933),_0x386933+=_0x59374b(0xab),await this['createDir'](_0x386933),_0x386933+=_0x59374b(0xe0),await this[_0x59374b(0x8c)](_0x386933),_0x386933=_0x386933+'/'+_0x4e7342,await this[_0x59374b(0x8c)](_0x386933);}[a0_0x3ce6d0(0xb9)](){const _0x4b9a15=a0_0x3ce6d0;let _0x5b70c8=process[_0x4b9a15(0xa5)]['PWD'][_0x4b9a15(0x107)]('/'),_0x332880=[];for(let _0x13f1b3=0x0;_0x13f1b3<_0x5b70c8[_0x4b9a15(0x89)]&&_0x4b9a15(0xc9)!=_0x5b70c8[_0x13f1b3];_0x13f1b3++)_0x332880[_0x4b9a15(0xe5)](_0x5b70c8[_0x13f1b3]);return _0x332880[_0x4b9a15(0xf8)]('/');}async[a0_0x3ce6d0(0x8c)](_0x3ebf51){const _0xa1653d=a0_0x3ce6d0;0x0==await this[_0xa1653d(0xaa)](_0x3ebf51)&&fs['mkdirSync'](_0x3ebf51);}async[a0_0x3ce6d0(0xaa)](_0x80aae2){const _0x56d78a=a0_0x3ce6d0;return await fs[_0x56d78a(0xe3)](_0x80aae2);}};tslib_1[a0_0x3ce6d0(0xdf)]([(0x0,type_graphql_1[a0_0x3ce6d0(0x109)])(_0x1cd20b=>Boolean,{'description':a0_0x3ce6d0(0xbc)}),tslib_1[a0_0x3ce6d0(0xc5)](0x0,(0x0,type_graphql_1[a0_0x3ce6d0(0x9d)])('id')),tslib_1[a0_0x3ce6d0(0xc5)](0x1,(0x0,type_graphql_1['Ctx'])()),tslib_1['__metadata']('design:type',Function),tslib_1['__metadata'](a0_0x3ce6d0(0xcb),[String,Object]),tslib_1[a0_0x3ce6d0(0xb1)](a0_0x3ce6d0(0xa2),Promise)],OperatoToolCreateService[a0_0x3ce6d0(0xec)],a0_0x3ce6d0(0xf0),null),OperatoToolCreateService=tslib_1[a0_0x3ce6d0(0xdf)]([(0x0,type_graphql_1[a0_0x3ce6d0(0x117)])()],OperatoToolCreateService),exports[a0_0x3ce6d0(0xa7)]=OperatoToolCreateService;function a0_0x308d(_0x25bb4a,_0x4c43d1){const _0x611364=a0_0x6113();return a0_0x308d=function(_0x308da0,_0xdcba85){_0x308da0=_0x308da0-0x85;let _0x14ccd6=_0x611364[_0x308da0];return _0x14ccd6;},a0_0x308d(_0x25bb4a,_0x4c43d1);}const allIndex=a0_0x3ce6d0(0x112),serviceIndex=a0_0x3ce6d0(0x8e),serviceHistoryIndex=a0_0x3ce6d0(0x114),serviceQuery=a0_0x3ce6d0(0xbf),serviceHistoryQuery=a0_0x3ce6d0(0x90),serviceMutation=a0_0x3ce6d0(0x108),sereviceType=a0_0x3ce6d0(0xb5),sereviceHistoryType='\x0aimport\x20{\x20ObjectType,\x20Field,\x20InputType,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0a\x0a@ObjectType()\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryList\x20{\x0a\x20\x20@Field(type\x20=>\x20[{{pascalCase\x20name}}History])\x0a\x20\x20items:\x20{{pascalCase\x20name}}History[]\x0a\x0a\x20\x20@Field(type\x20=>\x20Int)\x0a\x20\x20total:\x20number\x0a}\x0a',serviceEntity=a0_0x3ce6d0(0xcd),serviceEntityHistCopy=a0_0x3ce6d0(0xae),serviceEntityHistJson=a0_0x3ce6d0(0xc7),serviceEntitySubscriber=a0_0x3ce6d0(0x9f);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x34ba94=a0_0xbe7f;function a0_0x46ae(){const _0x32df90=['ERROR_CODES','includes','createQueryBuilder','map','48slUDej','@things-factory/shell','menu','1027585JlFwtz','4KZMlCq','andWhere','4796696bsZpdZ','LicenseError','getCount','@things-factory/operato-license-checker','Menu','INVALID_LICENSE','(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)','1185801UFmuGw','trim','defineProperty','getPermission','getRepository','1495278EKxfmt','manager','110RNJKns','532028LOxKnq','87828Wezian','Permissions\x20For\x20Tailor\x20Tool','checkStudioPermission','forEach','__esModule','from','1550037sQYJPe','Studio','../../errors/license-error','OVER_LIMIT','id\x20!=\x20:id'];a0_0x46ae=function(){return _0x32df90;};return a0_0x46ae();}function a0_0xbe7f(_0x98b863,_0x5006ab){const _0x46ae15=a0_0x46ae();return a0_0xbe7f=function(_0xbe7f9a,_0x142c5c){_0xbe7f9a=_0xbe7f9a-0x197;let _0x58c765=_0x46ae15[_0xbe7f9a];return _0x58c765;},a0_0xbe7f(_0x98b863,_0x5006ab);}(function(_0x2535b8,_0x1ec651){const _0xf8f352=a0_0xbe7f,_0xce91fe=_0x2535b8();while(!![]){try{const _0x3fd781=-parseInt(_0xf8f352(0x1ad))/0x1+parseInt(_0xf8f352(0x1a4))/0x2*(-parseInt(_0xf8f352(0x197))/0x3)+parseInt(_0xf8f352(0x1b6))/0x4+-parseInt(_0xf8f352(0x1a3))/0x5+parseInt(_0xf8f352(0x1a0))/0x6*(parseInt(_0xf8f352(0x1b5))/0x7)+parseInt(_0xf8f352(0x1a6))/0x8+parseInt(_0xf8f352(0x1b2))/0x9*(parseInt(_0xf8f352(0x1b4))/0xa);if(_0x3fd781===_0x1ec651)break;else _0xce91fe['push'](_0xce91fe['shift']());}catch(_0x17eee7){_0xce91fe['push'](_0xce91fe['shift']());}}}(a0_0x46ae,0x9a68e));Object[a0_0x34ba94(0x1af)](exports,a0_0x34ba94(0x1ba),{'value':!0x0}),exports['checkStudioTemplateIsOverLimit']=exports[a0_0x34ba94(0x1b8)]=void 0x0;const operato_license_checker_1=require(a0_0x34ba94(0x1a9)),shell_1=require(a0_0x34ba94(0x1a1)),menu_base_1=require('@things-factory/menu-base'),license_error_1=require(a0_0x34ba94(0x199));async function checkStudioPermission(){const _0x5c1a3e=a0_0x34ba94;let _0x20db20=((0x0,operato_license_checker_1[_0x5c1a3e(0x1b0)])(_0x5c1a3e(0x1b7))||',')['split'](',')[_0x5c1a3e(0x19f)](_0x457eb6=>_0x457eb6[_0x5c1a3e(0x1ae)]()),_0x3524c9=!0x1;return _0x20db20[_0x5c1a3e(0x1b9)](_0x1f167f=>{const _0x26ed26=_0x5c1a3e;_0x1f167f[_0x26ed26(0x19d)](_0x26ed26(0x198))&&(_0x3524c9=!0x0);}),_0x3524c9;}async function checkStudioTemplateIsOverLimit(_0x46a2db,_0x524d05){const _0x552ba4=a0_0x34ba94;if(0x0==await checkStudioPermission())throw new license_error_1[(_0x552ba4(0x1a7))]({'errorCode':_0x524d05['t'](license_error_1[_0x552ba4(0x1a7)][_0x552ba4(0x19c)][_0x552ba4(0x1ab)])});var _0x733280=0x0;if(_0x733280=_0x46a2db&&''!=_0x46a2db?await(0x0,shell_1['getRepository'])(menu_base_1[_0x552ba4(0x1aa)])[_0x552ba4(0x1b3)][_0x552ba4(0x19e)]()['select'](_0x552ba4(0x1a2))[_0x552ba4(0x1bb)](menu_base_1['Menu'],_0x552ba4(0x1a2))['where'](_0x552ba4(0x19b),{'id':_0x46a2db})[_0x552ba4(0x1a5)](_0x552ba4(0x1ac))['getCount']()+0x1:await(0x0,shell_1[_0x552ba4(0x1b1)])(menu_base_1[_0x552ba4(0x1aa)])['manager'][_0x552ba4(0x19e)]()['select'](_0x552ba4(0x1a2))[_0x552ba4(0x1bb)](menu_base_1['Menu'],'menu')['where'](_0x552ba4(0x1ac))[_0x552ba4(0x1a8)]()+0x1,!(0x0,operato_license_checker_1['checkTarget'])(_0x733280))throw new license_error_1['LicenseError']({'errorCode':_0x524d05['t'](license_error_1['LicenseError'][_0x552ba4(0x19c)][_0x552ba4(0x19a)])});return!0x0;}exports[a0_0x34ba94(0x1b8)]=checkStudioPermission,exports['checkStudioTemplateIsOverLimit']=checkStudioTemplateIsOverLimit;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x1d68e0=a0_0x1473;function a0_0x2865(){const _0x2e14d7=['Resolver','prototype','Query','studioPermission','42gMLukB','__param','studioTemplateIsOverLimit','defineProperty','Operato\x20Tool\x20Studio\x20Usage\x20Permissions','403716wwstEW','tslib','110778hgwlBC','4167342aKWsIS','1228750ybHdoc','12sUZQbw','2856720xUhJNg','design:type','checkStudioTemplateIsOverLimit','checkStudioPermission','OperatoToolResolver','2593743QjweUD','136415BPGiGi','design:paramtypes','Ctx','./tool-permission','__decorate','design:returntype','Arg','__metadata'];a0_0x2865=function(){return _0x2e14d7;};return a0_0x2865();}(function(_0x13ae92,_0x5704cc){const _0x5b7752=a0_0x1473,_0x4ff1f5=_0x13ae92();while(!![]){try{const _0x35a6f9=parseInt(_0x5b7752(0x14f))/0x1+parseInt(_0x5b7752(0x153))/0x2+-parseInt(_0x5b7752(0x15a))/0x3+parseInt(_0x5b7752(0x154))/0x4*(parseInt(_0x5b7752(0x15b))/0x5)+parseInt(_0x5b7752(0x151))/0x6*(parseInt(_0x5b7752(0x167))/0x7)+-parseInt(_0x5b7752(0x155))/0x8+parseInt(_0x5b7752(0x152))/0x9;if(_0x35a6f9===_0x5704cc)break;else _0x4ff1f5['push'](_0x4ff1f5['shift']());}catch(_0x593377){_0x4ff1f5['push'](_0x4ff1f5['shift']());}}}(a0_0x2865,0x6e5f5));Object[a0_0x1d68e0(0x14d)](exports,'__esModule',{'value':!0x0}),exports[a0_0x1d68e0(0x159)]=void 0x0;function a0_0x1473(_0x1555ae,_0x113062){const _0x286561=a0_0x2865();return a0_0x1473=function(_0x1473ea,_0x1ac6fd){_0x1473ea=_0x1473ea-0x14d;let _0x35d980=_0x286561[_0x1473ea];return _0x35d980;},a0_0x1473(_0x1555ae,_0x113062);}const tslib_1=require(a0_0x1d68e0(0x150)),type_graphql_1=require('type-graphql'),tool_permission_1=require(a0_0x1d68e0(0x15e));let OperatoToolResolver=class{async[a0_0x1d68e0(0x166)](_0x2afaac){const _0x4c879c=a0_0x1d68e0;return(0x0,tool_permission_1[_0x4c879c(0x158)])();}async[a0_0x1d68e0(0x169)](_0x348980,_0x4439ca){const _0x3f75f2=a0_0x1d68e0;return(0x0,tool_permission_1[_0x3f75f2(0x157)])(_0x348980,_0x4439ca);}};tslib_1[a0_0x1d68e0(0x15f)]([(0x0,type_graphql_1[a0_0x1d68e0(0x165)])(_0xa537f2=>Boolean,{'description':a0_0x1d68e0(0x14e)}),tslib_1['__param'](0x0,(0x0,type_graphql_1[a0_0x1d68e0(0x15d)])()),tslib_1['__metadata'](a0_0x1d68e0(0x156),Function),tslib_1[a0_0x1d68e0(0x162)](a0_0x1d68e0(0x15c),[Object]),tslib_1[a0_0x1d68e0(0x162)](a0_0x1d68e0(0x160),Promise)],OperatoToolResolver['prototype'],'studioPermission',null),tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x1d68e0(0x165)])(_0x5491f5=>Boolean,{'description':'Operato\x20Tool\x20Studio\x20Limit\x20check'}),tslib_1[a0_0x1d68e0(0x168)](0x0,(0x0,type_graphql_1[a0_0x1d68e0(0x161)])('id')),tslib_1[a0_0x1d68e0(0x168)](0x1,(0x0,type_graphql_1[a0_0x1d68e0(0x15d)])()),tslib_1['__metadata']('design:type',Function),tslib_1[a0_0x1d68e0(0x162)](a0_0x1d68e0(0x15c),[String,Object]),tslib_1[a0_0x1d68e0(0x162)](a0_0x1d68e0(0x160),Promise)],OperatoToolResolver[a0_0x1d68e0(0x164)],a0_0x1d68e0(0x169),null),OperatoToolResolver=tslib_1[a0_0x1d68e0(0x15f)]([(0x0,type_graphql_1[a0_0x1d68e0(0x163)])()],OperatoToolResolver),exports['OperatoToolResolver']=OperatoToolResolver;
|
package/translations/en.json
CHANGED
|
@@ -82,5 +82,8 @@
|
|
|
82
82
|
"label.logic": "로직",
|
|
83
83
|
"label.column_cnt": "열 수",
|
|
84
84
|
"label.grid_column_list": "컬럼 리스트",
|
|
85
|
-
"label.change-event-handler": "변경 이벤트 핸들러"
|
|
85
|
+
"label.change-event-handler": "변경 이벤트 핸들러",
|
|
86
|
+
"label.grid_emphasized_config": "그리드 강조 설정",
|
|
87
|
+
"label.grid_row_emphasized_config": "행 강조 설정",
|
|
88
|
+
"label.grid_column_emphasized_config": "컬럼 강조 설정"
|
|
86
89
|
}
|
package/translations/ko.json
CHANGED
|
@@ -82,5 +82,8 @@
|
|
|
82
82
|
"label.logic": "로직",
|
|
83
83
|
"label.column_cnt": "열 수",
|
|
84
84
|
"label.grid_column_list": "컬럼 리스트",
|
|
85
|
-
"label.change-event-handler": "변경 이벤트 핸들러"
|
|
85
|
+
"label.change-event-handler": "변경 이벤트 핸들러",
|
|
86
|
+
"label.grid_emphasized_config": "그리드 강조 설정",
|
|
87
|
+
"label.grid_row_emphasized_config": "행 강조 설정",
|
|
88
|
+
"label.grid_column_emphasized_config": "컬럼 강조 설정"
|
|
86
89
|
}
|
package/translations/ms.json
CHANGED
|
@@ -82,5 +82,8 @@
|
|
|
82
82
|
"label.logic": "로직",
|
|
83
83
|
"label.column_cnt": "열 수",
|
|
84
84
|
"label.grid_column_list": "컬럼 리스트",
|
|
85
|
-
"label.change-event-handler": "변경 이벤트 핸들러"
|
|
85
|
+
"label.change-event-handler": "변경 이벤트 핸들러",
|
|
86
|
+
"label.grid_emphasized_config": "그리드 강조 설정",
|
|
87
|
+
"label.grid_row_emphasized_config": "행 강조 설정",
|
|
88
|
+
"label.grid_column_emphasized_config": "컬럼 강조 설정"
|
|
86
89
|
}
|
package/translations/zh.json
CHANGED
|
@@ -82,5 +82,8 @@
|
|
|
82
82
|
"label.logic": "로직",
|
|
83
83
|
"label.column_cnt": "열 수",
|
|
84
84
|
"label.grid_column_list": "컬럼 리스트",
|
|
85
|
-
"label.change-event-handler": "변경 이벤트 핸들러"
|
|
85
|
+
"label.change-event-handler": "변경 이벤트 핸들러",
|
|
86
|
+
"label.grid_emphasized_config": "그리드 강조 설정",
|
|
87
|
+
"label.grid_row_emphasized_config": "행 강조 설정",
|
|
88
|
+
"label.grid_column_emphasized_config": "컬럼 강조 설정"
|
|
86
89
|
}
|