@lovrabet/lovrabet-cli 2.0.5-beta.2 → 2.0.7
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/lib/cli.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -0
- package/lib/config/schema.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -0
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -0
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a17_0xdd1ff4=a17_0xf127;(function(_0x1e9092,_0xdd2fea){const _0x5db436=a17_0xf127,_0x36d18c=_0x1e9092();while(!![]){try{const _0x4ec3ff=parseInt(_0x5db436(0x143))/0x1*(-parseInt(_0x5db436(0x133))/0x2)+-parseInt(_0x5db436(0x175))/0x3*(-parseInt(_0x5db436(0x165))/0x4)+parseInt(_0x5db436(0x15e))/0x5*(-parseInt(_0x5db436(0x15b))/0x6)+parseInt(_0x5db436(0x135))/0x7+-parseInt(_0x5db436(0x168))/0x8*(-parseInt(_0x5db436(0x154))/0x9)+-parseInt(_0x5db436(0x172))/0xa*(parseInt(_0x5db436(0x16c))/0xb)+-parseInt(_0x5db436(0x14e))/0xc;if(_0x4ec3ff===_0xdd2fea)break;else _0x36d18c['push'](_0x36d18c['shift']());}catch(_0x1a69fc){_0x36d18c['push'](_0x36d18c['shift']());}}}(a17_0x1710,0x5ec27));import{getDatasetDetail}from'../../core/api-client.js';function a17_0x1710(){const _0x4fd587=['dbId','map','parse','doVersion','sourceType','toFieldLabel','required','fields','deleted','responseFields','23OIlHrL','datasetKey','doType','str','creatorIdField','labelField','code','fromField','detail','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','source','1528716jzfSNo','responseBody','toDatasetCode','requestFields','options','relations','4764681dOpmyz','type','path','displayName','afterScriptId','pkField','dataType','18IWidhl','tableComment','modifierIdField','678525bJBMKw','filter','allFieldNames','dataset','tableName','relatedPageInfoList','toField','87028QiHmBK','indexes','read','8CNStym','requestBody','string','host','2574vpsZUI','allFields','dbName','entries','name','isArray','12400seZQPB','columnCodeListWithDeleted','dblinkInfoDTO','27lcSzlU','validateRules','object','operations','split','method','push','properties','extend','toTableName','description','beforeScriptId','dbType','logicField','dbtableConfig','length','formatRules','3374DnNNET','toDatasetName','3684674mKIvhx','modifierNameField','creatorNameField','createTimeField'];a17_0x1710=function(){return _0x4fd587;};return a17_0x1710();}function a17_0xf127(_0x137f02,_0x47536a){_0x137f02=_0x137f02-0x12b;const _0x171002=a17_0x1710();let _0xf127f7=_0x171002[_0x137f02];return _0xf127f7;}import{CODE_FLAG}from'../../commands/common/flags.js';function normalizeField(_0x481f41){const _0x19431d=a17_0xf127;if(_0x481f41[_0x19431d(0x141)])return null;const _0x483701=Boolean(_0x481f41[_0x19431d(0x157)]!==undefined||_0x481f41[_0x19431d(0x145)]!==undefined);let _0x5e3d44={};if(!_0x483701&&typeof _0x481f41[_0x19431d(0x17d)]===_0x19431d(0x16a))try{_0x5e3d44=JSON[_0x19431d(0x13b)](_0x481f41[_0x19431d(0x17d)]);}catch{}const _0x21408a=_0x483701?_0x481f41[_0x19431d(0x170)]:_0x481f41[_0x19431d(0x149)],_0x577dec=_0x483701?_0x481f41['displayName']:_0x481f41[_0x19431d(0x170)],_0x5e4c94=_0x483701?_0x481f41[_0x19431d(0x145)]:_0x481f41[_0x19431d(0x155)]||_0x481f41[_0x19431d(0x15a)],_0x1be00b=_0x483701?_0x481f41[_0x19431d(0x159)]===!![]:_0x5e3d44['pkField']===!![],_0x30eb85=_0x483701?_0x481f41[_0x19431d(0x13f)]===!![]:_0x5e3d44[_0x19431d(0x13f)]===!![],_0x21ad89=_0x483701?_0x481f41[_0x19431d(0x152)]??null:_0x5e3d44['options']??null,_0x52f051={'name':_0x21408a,'displayName':_0x577dec||_0x21408a,'type':_0x5e4c94,'dbType':_0x481f41[_0x19431d(0x12e)],'pk':_0x1be00b,'required':_0x30eb85,'description':_0x481f41[_0x19431d(0x12c)]||undefined};return Array[_0x19431d(0x171)](_0x21ad89)&&_0x21ad89[_0x19431d(0x131)]>0x0&&(_0x52f051[_0x19431d(0x152)]=_0x21ad89),_0x52f051;}function parseJsonMaybe(_0x3bccfe){const _0x55391d=a17_0xf127;if(typeof _0x3bccfe!==_0x55391d(0x16a))return _0x3bccfe;try{return JSON[_0x55391d(0x13b)](_0x3bccfe);}catch{return _0x3bccfe;}}function normalizeOperationEntry(_0x4c874d,_0x56b432){const _0x422b22=a17_0xf127;if(!_0x56b432||typeof _0x56b432!==_0x422b22(0x177))return null;if(!_0x56b432[_0x422b22(0x17a)]||!_0x56b432[_0x422b22(0x156)])return null;const _0x4fff8a={'name':_0x4c874d,'method':_0x56b432[_0x422b22(0x17a)],'path':_0x56b432[_0x422b22(0x156)]};if(_0x56b432[_0x422b22(0x16b)])_0x4fff8a['host']=_0x56b432[_0x422b22(0x16b)];if(_0x56b432[_0x422b22(0x169)]!=null)_0x4fff8a[_0x422b22(0x169)]=parseJsonMaybe(_0x56b432[_0x422b22(0x169)]);if(_0x56b432['responseBody']!=null)_0x4fff8a[_0x422b22(0x14f)]=parseJsonMaybe(_0x56b432[_0x422b22(0x14f)]);if(_0x56b432[_0x422b22(0x12d)]!=null)_0x4fff8a[_0x422b22(0x12d)]=_0x56b432['beforeScriptId'];if(_0x56b432[_0x422b22(0x158)]!=null)_0x4fff8a[_0x422b22(0x158)]=_0x56b432[_0x422b22(0x158)];if(Array[_0x422b22(0x171)](_0x56b432[_0x422b22(0x151)]))_0x4fff8a[_0x422b22(0x151)]=_0x56b432['requestFields'];if(Array[_0x422b22(0x171)](_0x56b432['responseFields']))_0x4fff8a[_0x422b22(0x142)]=_0x56b432['responseFields'];return _0x4fff8a;}function summarizeDbtable(_0x27dd88){const _0x2f6aec=a17_0xf127,_0x1ba40a={},_0x3b327b=[_0x2f6aec(0x139),_0x2f6aec(0x16e),_0x2f6aec(0x162),_0x2f6aec(0x144),_0x2f6aec(0x159),_0x2f6aec(0x16d),_0x2f6aec(0x12f),_0x2f6aec(0x138),'updateTimeField',_0x2f6aec(0x147),_0x2f6aec(0x137),_0x2f6aec(0x15d),_0x2f6aec(0x136),_0x2f6aec(0x148),_0x2f6aec(0x174)];for(const _0x27fc1c of _0x3b327b){if(_0x27dd88[_0x27fc1c]!==undefined)_0x1ba40a[_0x27fc1c]=_0x27dd88[_0x27fc1c];}return typeof _0x1ba40a[_0x2f6aec(0x16d)]===_0x2f6aec(0x16a)&&_0x1ba40a[_0x2f6aec(0x16d)][_0x2f6aec(0x131)]>0x0&&(_0x1ba40a[_0x2f6aec(0x160)]=_0x1ba40a[_0x2f6aec(0x16d)][_0x2f6aec(0x179)](',')[_0x2f6aec(0x13a)](_0x34510c=>_0x34510c['trim']())[_0x2f6aec(0x15f)](Boolean)),_0x1ba40a;}function normalizeRelatedPages(_0x2c5d1d){const _0x2272b7=a17_0xf127;if(!Array[_0x2272b7(0x171)](_0x2c5d1d))return[];return _0x2c5d1d[_0x2272b7(0x15f)](_0x170683=>_0x170683&&typeof _0x170683===_0x2272b7(0x177))[_0x2272b7(0x13a)](_0x496c0d=>({'id':_0x496c0d['id'],'type':_0x496c0d[_0x2272b7(0x155)],'code':_0x496c0d[_0x2272b7(0x149)],'title':_0x496c0d['title'],'deleted':_0x496c0d[_0x2272b7(0x141)]===!![]}));}export const datasetDetail={'service':'dataset','command':a17_0xdd1ff4(0x14b),'description':a17_0xdd1ff4(0x14c),'risk':a17_0xdd1ff4(0x167),'flags':[CODE_FLAG],async 'execute'(_0x59fef0){const _0xd057cc=a17_0xdd1ff4,_0x3b6109=await getDatasetDetail(_0x59fef0[_0xd057cc(0x146)]('code')),_0x2232f4=Array[_0xd057cc(0x171)](_0x3b6109[_0xd057cc(0x140)])?_0x3b6109[_0xd057cc(0x140)]:Array['isArray'](_0x3b6109[_0xd057cc(0x17c)])?_0x3b6109['properties']:[],_0xbebdf9=_0x2232f4[_0xd057cc(0x13a)](_0x1cdb3c=>normalizeField(_0x1cdb3c))[_0xd057cc(0x15f)](_0x88bca3=>_0x88bca3!==null),_0x27f066=_0x3b6109[_0xd057cc(0x178)]??{},_0x1fc43e=[];for(const [_0x599e6c,_0x1dcf41]of Object[_0xd057cc(0x16f)](_0x27f066)){const _0x23a0a4=normalizeOperationEntry(_0x599e6c,_0x1dcf41);if(_0x23a0a4)_0x1fc43e[_0xd057cc(0x17b)](_0x23a0a4);}const _0x3b7a6e=_0x3b6109[_0xd057cc(0x130)]??{},_0x5e68fe=_0x3b6109[_0xd057cc(0x161)]??{},_0x5f2aef=_0x3b7a6e[_0xd057cc(0x139)]!=null?{'id':_0x3b7a6e[_0xd057cc(0x139)],'name':_0x3b7a6e['dbName']??null}:undefined;let _0x4d7f79;return typeof _0x3b6109[_0xd057cc(0x17d)]===_0xd057cc(0x16a)&&(_0x4d7f79=parseJsonMaybe(_0x3b6109[_0xd057cc(0x17d)])),{'ok':!![],'data':{'id':_0x3b6109['modelId']??_0x3b6109['id'],'name':_0x3b6109[_0xd057cc(0x170)],'code':_0x3b6109['modelCode']||_0x3b6109[_0xd057cc(0x149)],'doVersion':_0x3b6109[_0xd057cc(0x13c)],'description':_0x3b6109['description']||_0x5e68fe[_0xd057cc(0x15c)]||undefined,'source':_0x3b6109[_0xd057cc(0x14d)]||_0x5e68fe[_0xd057cc(0x13d)],'table':_0x3b7a6e[_0xd057cc(0x162)]||_0x5e68fe[_0xd057cc(0x162)],'datasetKey':_0x3b7a6e[_0xd057cc(0x144)],'pk':_0x3b7a6e[_0xd057cc(0x159)],'db':_0x5f2aef,'dbtable':summarizeDbtable(_0x3b7a6e),'fields':_0xbebdf9,'operations':_0x1fc43e,'indexes':Array[_0xd057cc(0x171)](_0x5e68fe[_0xd057cc(0x166)])?_0x5e68fe[_0xd057cc(0x166)]:[],'relations':Array['isArray'](_0x3b6109[_0xd057cc(0x153)])?_0x3b6109[_0xd057cc(0x153)][_0xd057cc(0x13a)](_0x4f3119=>({'fromField':_0x4f3119[_0xd057cc(0x14a)],'toDataset':_0x4f3119[_0xd057cc(0x134)],'toCode':_0x4f3119[_0xd057cc(0x150)],'toTable':_0x4f3119[_0xd057cc(0x12b)],'toField':_0x4f3119[_0xd057cc(0x164)],'labelField':_0x4f3119[_0xd057cc(0x13e)]||undefined})):[],'relatedPages':normalizeRelatedPages(_0x3b6109[_0xd057cc(0x163)]),...Array[_0xd057cc(0x171)](_0x3b6109[_0xd057cc(0x173)])?{'columnCodeListWithDeleted':_0x3b6109[_0xd057cc(0x173)]}:{},'formatRules':Array[_0xd057cc(0x171)](_0x3b6109[_0xd057cc(0x132)])?_0x3b6109[_0xd057cc(0x132)]:[],'validateRules':Array[_0xd057cc(0x171)](_0x3b6109[_0xd057cc(0x176)])?_0x3b6109[_0xd057cc(0x176)]:[],..._0x4d7f79!==undefined?{'extend':_0x4d7f79}:{},'stats':{'fieldCount':_0xbebdf9['length'],'operationCount':_0x1fc43e[_0xd057cc(0x131)]}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a18_0x243e(_0x145b2a,_0x3856b6){_0x145b2a=_0x145b2a-0xcc;const _0x380dcc=a18_0x380d();let _0x243e5a=_0x380dcc[_0x145b2a];return _0x243e5a;}function a18_0x380d(){const _0x4eac53=['5919IBYaer','2292171mgadqs','213410RoGhKX','398FBVUtV','117200IUfJzz','535485LvWwDl','3029874QEyyhM','1590896KJzyeY'];a18_0x380d=function(){return _0x4eac53;};return a18_0x380d();}(function(_0xe8c794,_0x254ed2){const _0x4531b2=a18_0x243e,_0x14bd8e=_0xe8c794();while(!![]){try{const _0x489838=parseInt(_0x4531b2(0xd3))/0x1+-parseInt(_0x4531b2(0xcc))/0x2*(parseInt(_0x4531b2(0xd1))/0x3)+-parseInt(_0x4531b2(0xcd))/0x4+parseInt(_0x4531b2(0xce))/0x5+parseInt(_0x4531b2(0xcf))/0x6+parseInt(_0x4531b2(0xd2))/0x7+-parseInt(_0x4531b2(0xd0))/0x8;if(_0x489838===_0x254ed2)break;else _0x14bd8e['push'](_0x14bd8e['shift']());}catch(_0x3fb976){_0x14bd8e['push'](_0x14bd8e['shift']());}}}(a18_0x380d,0x81eb6));import{datasetList}from'../../commands/dataset/list.js';import{datasetDetail}from'../../commands/dataset/detail.js';export const datasetDefinitions=[datasetList,datasetDetail];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a19_0xe61f95=a19_0x9c41;function a19_0x9c41(_0xf8c378,_0x508ccf){_0xf8c378=_0xf8c378-0x1e3;const _0x48dce2=a19_0x48dc();let _0x9c41df=_0x48dce2[_0xf8c378];return _0x9c41df;}(function(_0x1e7b6e,_0x151b05){const _0x52210e=a19_0x9c41,_0x4fe306=_0x1e7b6e();while(!![]){try{const _0x413aa5=parseInt(_0x52210e(0x1fb))/0x1+parseInt(_0x52210e(0x1f3))/0x2+-parseInt(_0x52210e(0x1f0))/0x3*(parseInt(_0x52210e(0x1f7))/0x4)+-parseInt(_0x52210e(0x1f6))/0x5+parseInt(_0x52210e(0x1fa))/0x6+parseInt(_0x52210e(0x1ec))/0x7*(-parseInt(_0x52210e(0x1ea))/0x8)+parseInt(_0x52210e(0x1f2))/0x9;if(_0x413aa5===_0x151b05)break;else _0x4fe306['push'](_0x4fe306['shift']());}catch(_0x4f1bce){_0x4fe306['push'](_0x4fe306['shift']());}}}(a19_0x48dc,0xe73e1));import{listDatasets}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';function a19_0x48dc(){const _0x2c9de7=['name','trim','3TRCQfD','datasetKey','13779LjfpKC','468080daGihB','List\x20datasets\x20in\x20the\x20app\x20(supports\x20server-side\x20name/code\x20filtering)','Filter\x20by\x20dataset\x20name\x20(server-side\x20fuzzy\x20match)','3717005OFuEga','3857308sHWxhK','length','tableName','6097878RNcZfE','1711261RXtGLC','string','dataset','dbtableConfig','allFields','list','description','Filter\x20by\x20dataset\x20code\x20(server-side\x20exact\x20match)','code','map','3392yjhlfq','read','5089bhKqmB','pkField'];a19_0x48dc=function(){return _0x2c9de7;};return a19_0x48dc();}export const datasetList={'service':a19_0xe61f95(0x1fd),'command':a19_0xe61f95(0x1e5),'description':a19_0xe61f95(0x1f4),'risk':a19_0xe61f95(0x1eb),'flags':[{'name':a19_0xe61f95(0x1ee),'type':a19_0xe61f95(0x1fc),'description':a19_0xe61f95(0x1f5)},{...CODE_FLAG,'required':![],'description':a19_0xe61f95(0x1e7)}],async 'execute'(_0x2fc935){const _0x5846a0=a19_0xe61f95,_0x52964b=_0x2fc935['str']('name'),_0x500187=_0x2fc935['str'](_0x5846a0(0x1e8)),_0xc74ed7=await listDatasets(_0x2fc935['appCode'],{..._0x52964b&&{'name':_0x52964b},..._0x500187&&{'code':_0x500187}});return{'ok':!![],'data':{'total':_0xc74ed7[_0x5846a0(0x1f8)],'datasets':_0xc74ed7[_0x5846a0(0x1e9)](_0x5f3913=>{const _0x2ecdc0=_0x5846a0,_0x281f63=_0x5f3913[_0x2ecdc0(0x1e3)]??{};return{'id':_0x5f3913['id'],'code':_0x5f3913[_0x2ecdc0(0x1e8)],'name':_0x5f3913[_0x2ecdc0(0x1ee)],'source':_0x5f3913['source'],'description':_0x5f3913[_0x2ecdc0(0x1e6)],'table':_0x281f63[_0x2ecdc0(0x1f9)],'datasetKey':_0x281f63[_0x2ecdc0(0x1f1)],'pk':_0x281f63[_0x2ecdc0(0x1ed)],'fields':_0x281f63[_0x2ecdc0(0x1e4)]?_0x281f63[_0x2ecdc0(0x1e4)]['split'](',')['map'](_0x29abe4=>_0x29abe4[_0x2ecdc0(0x1ef)]()):[]};})}};}};
|
package/lib/commands/doctor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a20_0x2d35(_0x5c2bfc,_0x32f6f8){_0x5c2bfc=_0x5c2bfc-0x17f;const _0xfb6fa5=a20_0xfb6f();let _0x2d35c7=_0xfb6fa5[_0x5c2bfc];return _0x2d35c7;}const a20_0x581f97=a20_0x2d35;(function(_0x101f3c,_0x15a1df){const _0x5c55e4=a20_0x2d35,_0x4dcf3b=_0x101f3c();while(!![]){try{const _0x362e0f=-parseInt(_0x5c55e4(0x1ab))/0x1+parseInt(_0x5c55e4(0x17f))/0x2+-parseInt(_0x5c55e4(0x1bf))/0x3+parseInt(_0x5c55e4(0x1b1))/0x4*(parseInt(_0x5c55e4(0x182))/0x5)+parseInt(_0x5c55e4(0x1bd))/0x6*(parseInt(_0x5c55e4(0x18c))/0x7)+-parseInt(_0x5c55e4(0x1b2))/0x8+parseInt(_0x5c55e4(0x19c))/0x9;if(_0x362e0f===_0x15a1df)break;else _0x4dcf3b['push'](_0x4dcf3b['shift']());}catch(_0x568bda){_0x4dcf3b['push'](_0x4dcf3b['shift']());}}}(a20_0xfb6f,0x688af));import a20_0x187d43 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{getCliVersion}from'../utils/version.js';import{getApiDomain,getRuntimeDomain,getUserDomain}from'../constant/domain.js';import{buildConfigFromFlags,initGlobalEnvironment,getProjectConfigPath,getGlobalConfigPath,inspectCliConfigJsonFile}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';function a20_0xfb6f(){const _0x1eb921=['appCode','repeat','\x20\x20auth\x20(effective):\x20','pageSize','format','missing','check','14WxJThW','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','red','\x20\x20Config\x20JSON','⚠\x20Empty\x20(treated\x20as\x20{})','bold','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','status','\x20\x20─','(default:\x20','(not\x20found)','ClientAk','\x20\x20API\x20Endpoints','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','✗\x20Invalid\x20JSON','\x20\x20runtimeDomain:\x20\x20\x20','133443ESlozR','\x20doctor','✓\x20Valid\x20JSON','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','platform','(removed\x20—\x20cookie\x20auth\x20disabled)','riskLevel','(missing)','verbose','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Config\x20Files','(none)','Diagnose\x20CLI\x20configuration\x20and\x20environment','yellow','padEnd','223701XSxmHY','arch','(default)','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','48sYlVvj','1811488xNjpKy','\x20\x20Session\x20check:\x20\x20\x20','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','currentApp','Project','log','env','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(not\x20set)','1156206uISnJF','message','2463507LYCXji','accessKey','988960XlRkRO','locale','\x20\x20Auth','335335UuoumK','gray','green'];a20_0xfb6f=function(){return _0x1eb921;};return a20_0xfb6f();}import{isLegacyCompatConfigKey}from'../config/schema.js';async function execute(_0x4fcc10){const _0x2cd3b7=a20_0x2d35,_0xba9c18=getCliVersion(),_0x640965=buildConfigFromFlags({});await initGlobalEnvironment(_0x640965),console['log'](),console[_0x2cd3b7(0x1b7)](a20_0x187d43[_0x2cd3b7(0x191)](CLI_BIN_NAME+_0x2cd3b7(0x19d))),console[_0x2cd3b7(0x1b7)](a20_0x187d43[_0x2cd3b7(0x183)]('─'[_0x2cd3b7(0x186)](0x32))),console[_0x2cd3b7(0x1b7)]('\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20'+_0xba9c18),console['log'](_0x2cd3b7(0x192)+process['version']),console[_0x2cd3b7(0x1b7)]('\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0x2cd3b7(0x1a0)]+'\x20'+process[_0x2cd3b7(0x1ac)]),console[_0x2cd3b7(0x1b7)](),console[_0x2cd3b7(0x1b7)](a20_0x187d43[_0x2cd3b7(0x191)](_0x2cd3b7(0x1a6))),console[_0x2cd3b7(0x1b7)](a20_0x187d43[_0x2cd3b7(0x183)](_0x2cd3b7(0x194)['repeat'](0x1e)));const _0x4a098e=getGlobalConfigPath(),_0x3f5903=getProjectConfigPath();console[_0x2cd3b7(0x1b7)](_0x2cd3b7(0x1b0)+(_0x4a098e||a20_0x187d43[_0x2cd3b7(0x183)](_0x2cd3b7(0x196)))),console[_0x2cd3b7(0x1b7)](_0x2cd3b7(0x19f)+(_0x3f5903||a20_0x187d43[_0x2cd3b7(0x183)](_0x2cd3b7(0x196)))),console[_0x2cd3b7(0x1b7)](),console['log'](a20_0x187d43[_0x2cd3b7(0x191)](_0x2cd3b7(0x18f))),console[_0x2cd3b7(0x1b7)](a20_0x187d43[_0x2cd3b7(0x183)](_0x2cd3b7(0x194)['repeat'](0x1e)));const _0x440a29=(_0x26b0c2,_0x33c488)=>{const _0x4c9faf=_0x2cd3b7;if(!_0x33c488){console['log']('\x20\x20'+_0x26b0c2[_0x4c9faf(0x1aa)](0x11)+'\x20'+a20_0x187d43['gray']('(no\x20file)'));return;}const _0x4943c7=inspectCliConfigJsonFile(_0x33c488);if(_0x4943c7[_0x4c9faf(0x193)]==='ok')console[_0x4c9faf(0x1b7)]('\x20\x20'+_0x26b0c2[_0x4c9faf(0x1aa)](0x11)+'\x20'+a20_0x187d43[_0x4c9faf(0x184)](_0x4c9faf(0x19e)));else{if(_0x4943c7['status']==='empty')console[_0x4c9faf(0x1b7)]('\x20\x20'+_0x26b0c2[_0x4c9faf(0x1aa)](0x11)+'\x20'+a20_0x187d43[_0x4c9faf(0x1a9)](_0x4c9faf(0x190)));else _0x4943c7[_0x4c9faf(0x193)]===_0x4c9faf(0x18a)?console[_0x4c9faf(0x1b7)]('\x20\x20'+_0x26b0c2[_0x4c9faf(0x1aa)](0x11)+'\x20'+a20_0x187d43[_0x4c9faf(0x183)](_0x4c9faf(0x1a3))):(console[_0x4c9faf(0x1b7)]('\x20\x20'+_0x26b0c2[_0x4c9faf(0x1aa)](0x11)+'\x20'+a20_0x187d43['red'](_0x4c9faf(0x19a))),console[_0x4c9faf(0x1b7)]('\x20\x20'+''[_0x4c9faf(0x1aa)](0x11)+'\x20'+a20_0x187d43[_0x4c9faf(0x18e)](_0x4943c7[_0x4c9faf(0x1be)])));}};_0x440a29('Global',_0x4a098e),_0x440a29(_0x2cd3b7(0x1b6),_0x3f5903),console['log'](),console[_0x2cd3b7(0x1b7)](a20_0x187d43[_0x2cd3b7(0x191)]('\x20\x20Merged\x20Config')),console[_0x2cd3b7(0x1b7)](a20_0x187d43['gray'](_0x2cd3b7(0x194)['repeat'](0x1e))),console['log']('\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x640965[_0x2cd3b7(0x185)]||a20_0x187d43[_0x2cd3b7(0x18e)](_0x2cd3b7(0x1bc)))),console[_0x2cd3b7(0x1b7)](_0x2cd3b7(0x1ae)+_0x640965[_0x2cd3b7(0x1b8)]);const _0x49ebbe=isLegacyCompatConfigKey('locale')?a20_0x187d43[_0x2cd3b7(0x183)](_0x640965[_0x2cd3b7(0x180)]+'\x20(legacy/compat\x20only)'):_0x640965[_0x2cd3b7(0x180)];return console[_0x2cd3b7(0x1b7)](_0x2cd3b7(0x1a5)+_0x49ebbe),console[_0x2cd3b7(0x1b7)]('\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20'+(_0x640965['defaultApp']||a20_0x187d43[_0x2cd3b7(0x183)]('(none)'))),console[_0x2cd3b7(0x1b7)](_0x2cd3b7(0x1b4)+(_0x640965[_0x2cd3b7(0x1b5)]||a20_0x187d43['gray']('(none)'))),console[_0x2cd3b7(0x1b7)](_0x2cd3b7(0x1af)+(_0x640965['format']||a20_0x187d43['gray'](_0x2cd3b7(0x195)+DEFAULT_CONFIG_VALUES[_0x2cd3b7(0x189)]+')'))),console[_0x2cd3b7(0x1b7)](_0x2cd3b7(0x199)+(_0x640965[_0x2cd3b7(0x188)]??a20_0x187d43[_0x2cd3b7(0x183)](_0x2cd3b7(0x1ad)))),console['log'](_0x2cd3b7(0x1b9)+_0x640965[_0x2cd3b7(0x1a2)]),console[_0x2cd3b7(0x1b7)](_0x2cd3b7(0x1ba)+_0x640965[_0x2cd3b7(0x1a4)]),console[_0x2cd3b7(0x1b7)](_0x2cd3b7(0x187)+AUTH_MODE[_0x2cd3b7(0x197)]),console[_0x2cd3b7(0x1b7)]('\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20'+(_0x640965[_0x2cd3b7(0x1c0)]?a20_0x187d43[_0x2cd3b7(0x184)]('(set,\x20length='+_0x640965[_0x2cd3b7(0x1c0)]['length']+')'):a20_0x187d43['gray'](_0x2cd3b7(0x1a7)))),console[_0x2cd3b7(0x1b7)](),console['log'](a20_0x187d43[_0x2cd3b7(0x191)](_0x2cd3b7(0x198))),console[_0x2cd3b7(0x1b7)](a20_0x187d43[_0x2cd3b7(0x183)]('\x20\x20─'['repeat'](0x1e))),console[_0x2cd3b7(0x1b7)](_0x2cd3b7(0x18d)+getApiDomain()),console[_0x2cd3b7(0x1b7)]('\x20\x20userDomain:\x20\x20\x20\x20\x20\x20'+getUserDomain()),console['log'](_0x2cd3b7(0x19b)+getRuntimeDomain()),console[_0x2cd3b7(0x1b7)](),console[_0x2cd3b7(0x1b7)](a20_0x187d43['bold'](_0x2cd3b7(0x181))),console[_0x2cd3b7(0x1b7)](a20_0x187d43[_0x2cd3b7(0x183)]('\x20\x20─'[_0x2cd3b7(0x186)](0x1e))),console[_0x2cd3b7(0x1b7)](_0x2cd3b7(0x1bb)+a20_0x187d43[_0x2cd3b7(0x184)](AUTH_MODE[_0x2cd3b7(0x197)]+'\x20(accessKey)')),console[_0x2cd3b7(0x1b7)](_0x2cd3b7(0x1b3)+a20_0x187d43[_0x2cd3b7(0x183)](_0x2cd3b7(0x1a1))),console[_0x2cd3b7(0x1b7)](),{'ok':!![]};}export const doctorDefinition={'service':'doctor','command':a20_0x581f97(0x18b),'description':a20_0x581f97(0x1a8),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
package/lib/commands/init.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a21_0x1955c0=a21_0x541f;(function(_0x715fcb,_0x34cd69){const _0x1c6478=a21_0x541f,_0x4e5d4b=_0x715fcb();while(!![]){try{const _0x2ac4a8=-parseInt(_0x1c6478(0x230))/0x1*(-parseInt(_0x1c6478(0x22a))/0x2)+parseInt(_0x1c6478(0x226))/0x3+parseInt(_0x1c6478(0x1f4))/0x4*(parseInt(_0x1c6478(0x1ff))/0x5)+-parseInt(_0x1c6478(0x225))/0x6*(-parseInt(_0x1c6478(0x22b))/0x7)+-parseInt(_0x1c6478(0x221))/0x8*(parseInt(_0x1c6478(0x20c))/0x9)+-parseInt(_0x1c6478(0x228))/0xa+parseInt(_0x1c6478(0x223))/0xb*(-parseInt(_0x1c6478(0x21b))/0xc);if(_0x2ac4a8===_0x34cd69)break;else _0x4e5d4b['push'](_0x4e5d4b['shift']());}catch(_0x382eae){_0x4e5d4b['push'](_0x4e5d4b['shift']());}}}(a21_0x18f1,0x7d111));import{existsSync,readFileSync}from'node:fs';import{resolve,isAbsolute}from'node:path';import{createInterface}from'node:readline';import{CliErrors}from'../errors.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{IMPORTABLE_RUNTIME_CONFIG_KEYS}from'../config/schema.js';function a21_0x541f(_0x20e550,_0x5af749){_0x20e550=_0x20e550-0x1f3;const _0x18f1b3=a21_0x18f1();let _0x541f69=_0x18f1b3[_0x20e550];return _0x541f69;}import{resolveWriteConfigPath,readConfigFile,writeConfigFile,isNonInteractiveMode}from'../context.js';import{CLI_BIN_NAME}from'../constant/cli.js';export const initCreateFlagDefs=[{'name':'appcode','type':a21_0x1955c0(0x219),'description':a21_0x1955c0(0x20b)},{'name':'env','type':a21_0x1955c0(0x219),'description':'Target\x20environment\x20(default\x20'+DEFAULT_CONFIG_VALUES[a21_0x1955c0(0x1f5)]+')','enum':[...RUNTIME_ENV_VALUES]},{'name':'global','type':a21_0x1955c0(0x1fa),'description':a21_0x1955c0(0x200),'default':![]},{'name':'yes','type':a21_0x1955c0(0x1fa),'description':'Skip\x20confirmation\x20when\x20overwriting','default':![]}];export const initImportFlagDefs=[{'name':a21_0x1955c0(0x211),'type':a21_0x1955c0(0x219),'description':'Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','required':!![]},{'name':a21_0x1955c0(0x218),'type':a21_0x1955c0(0x219),'description':a21_0x1955c0(0x1f3)},{'name':a21_0x1955c0(0x1f5),'type':a21_0x1955c0(0x219),'description':a21_0x1955c0(0x20f),'enum':[...RUNTIME_ENV_VALUES]},{'name':'global','type':a21_0x1955c0(0x1fa),'description':a21_0x1955c0(0x200),'default':![]},{'name':'yes','type':a21_0x1955c0(0x1fa),'description':a21_0x1955c0(0x1f9),'default':![]}];export async function runInit(_0x57f9b9){const _0x1d175e=a21_0x1955c0,_0x24a782=isNonInteractiveMode(_0x57f9b9),_0x309411=_0x57f9b9[_0x1d175e(0x1f6)]?_0x1d175e(0x1f6):'project',_0x491de3=resolveWriteConfigPath(_0x309411);try{_0x24a782?await runNonInteractive(_0x57f9b9,_0x491de3):await runInteractive(_0x57f9b9,_0x491de3);}catch(_0xa0d3a7){if(_0xa0d3a7 instanceof AbortPrompt)throw CliErrors[_0x1d175e(0x208)]();throw _0xa0d3a7;}}export async function runInitImport(_0x373475){const _0x3e5bbf=a21_0x1955c0,_0x215598=_0x373475['global']?'global':_0x3e5bbf(0x201),_0x502ca8=resolveWriteConfigPath(_0x215598);await runFromImport(_0x373475,_0x502ca8);}const RUNTIME_IRRELEVANT_KEYS=new Set(['apiDir']);function a21_0x18f1(){const _0xe79316=['21QUdUsm','SIGINT','\x20\x20default:\x20','\x20already\x20exists.\x20Overwrite?','\x20\x20config:\x20\x20','3HvKvbp','User\x20aborted\x20prompt','apps','stdin','object','Override\x20imported\x20default\x20appcode','15340yNgdfq','env','global','race','name','Skip\x20confirmation\x20when\x20overwriting','boolean','question','App\x20code','app','defaultApp','125CcAcmz','Write\x20to\x20global\x20(~/.lovrabet.json)\x20instead\x20of\x20project','project','Imported\x20from\x20','\x22.\x20Allowed:\x20','\x20\x20env:\x20\x20\x20\x20\x20','App\x20code\x20cannot\x20be\x20empty.','\x20init\x20—\x20Create\x20.lovrabet.json\x0a','close','cancelled','join','parse','App\x20code\x20for\x20the\x20project','342nJgISl','Failed\x20to\x20parse\x20source\x20file:\x20','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','Override\x20imported\x20default\x20env','Usage:\x20','file','validation','\x20app\x20init\x20--appcode\x20<code>\x20[--env\x20daily]\x20[--global]','trim','Invalid\x20env\x20\x22','message','[y/N]','appcode','string','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','36lbkUee','\x20\x20appcode:\x20','\x0aInitialized\x20','File\x20','log','AbortPrompt','92488gJFzcd','yes','3209118bbdQEl','riskLevel','1858470BHqtbg','2207469hmuWzs','stdout','5767790NXOQuQ','removeListener','428434CoQvBk'];a21_0x18f1=function(){return _0xe79316;};return a21_0x18f1();}async function runFromImport(_0x18f2a4,_0x176b1d){const _0x1a14c4=a21_0x1955c0,_0x4646f0=resolveFilePath(_0x18f2a4['file']);if(!existsSync(_0x4646f0))throw CliErrors[_0x1a14c4(0x212)]('Source\x20file\x20not\x20found:\x20'+_0x4646f0);const _0x50cd09=readSourceFile(_0x4646f0),_0x50e049=convertToRuntimeConfig(_0x50cd09);_0x18f2a4[_0x1a14c4(0x218)]&&(_0x50e049['appcode']=String(_0x18f2a4['appcode']));_0x18f2a4[_0x1a14c4(0x1f5)]&&(_0x50e049[_0x1a14c4(0x1f5)]=resolveInitEnv(_0x18f2a4));if(!_0x50e049[_0x1a14c4(0x218)])throw CliErrors['validation'](_0x1a14c4(0x21a),'Provide\x20--appcode\x20<code>\x20or\x20use\x20an\x20upgraded\x20.rabetbase.json\x20with\x20top-level\x20appcode.\x20Legacy\x20files\x20must\x20be\x20upgraded\x20first\x20with\x20`rabetbase\x20project\x20upgrade`.');await writeInitConfig(_0x176b1d,_0x50e049,_0x18f2a4),console[_0x1a14c4(0x21f)](_0x1a14c4(0x202)+_0x4646f0),console['log'](_0x1a14c4(0x22f)+_0x176b1d),console[_0x1a14c4(0x21f)]('\x20\x20appcode:\x20'+_0x50e049['appcode']);if(_0x50e049['defaultApp'])console['log'](_0x1a14c4(0x22d)+_0x50e049[_0x1a14c4(0x1fe)]);}function convertToRuntimeConfig(_0x2e3466){const _0xbb2e89=a21_0x1955c0;if(_0x2e3466[_0xbb2e89(0x232)]&&typeof _0x2e3466[_0xbb2e89(0x232)]===_0xbb2e89(0x234))throw CliErrors[_0xbb2e89(0x212)]('Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.',_0xbb2e89(0x20e));const _0x249008={};for(const _0x4184c8 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x2e3466[_0x4184c8]!==undefined&&(_0x249008[_0x4184c8]=_0x2e3466[_0x4184c8]);}return!_0x249008[_0xbb2e89(0x224)]&&(_0x249008[_0xbb2e89(0x224)]=DEFAULT_CONFIG_VALUES[_0xbb2e89(0x224)]),_0x249008;}async function runNonInteractive(_0x151b9b,_0x28dd11){const _0x3f9690=a21_0x1955c0,_0x5c5e27=_0x151b9b[_0x3f9690(0x218)];if(!_0x5c5e27)throw CliErrors['flagMissing']('appcode',_0x3f9690(0x210)+CLI_BIN_NAME+_0x3f9690(0x213));const _0x401b1a=resolveInitEnv(_0x151b9b);await writeInitConfig(_0x28dd11,{'appcode':_0x5c5e27,'env':_0x401b1a},_0x151b9b),console[_0x3f9690(0x21f)]('Initialized\x20'+_0x28dd11),console[_0x3f9690(0x21f)](_0x3f9690(0x21c)+_0x5c5e27),console[_0x3f9690(0x21f)](_0x3f9690(0x204)+_0x401b1a);}async function runInteractive(_0x42dd06,_0xe431){const _0x1b45f9=a21_0x1955c0,_0x4d34ce=loadExisting(_0xe431),_0x583e03=typeof _0x4d34ce?.[_0x1b45f9(0x218)]==='string'?_0x4d34ce[_0x1b45f9(0x218)]:'',_0x5450f9=resolveInitEnv(_0x42dd06);console[_0x1b45f9(0x21f)](CLI_BIN_NAME+_0x1b45f9(0x206));if(existsSync(_0xe431)&&!_0x42dd06[_0x1b45f9(0x222)]){const _0x46a910=await promptYesNo(_0x1b45f9(0x21e)+_0xe431+_0x1b45f9(0x22e),![]);if(!_0x46a910){console[_0x1b45f9(0x21f)]('Aborted.');return;}}const _0x3134c5=typeof _0x42dd06[_0x1b45f9(0x218)]===_0x1b45f9(0x219)?_0x42dd06['appcode']['trim']():'';let _0x1948e7=_0x3134c5;!_0x1948e7&&(_0x1948e7=await promptInput(_0x1b45f9(0x1fc),_0x583e03));if(!_0x1948e7['trim']())throw CliErrors[_0x1b45f9(0x212)](_0x1b45f9(0x205));await writeInitConfig(_0xe431,{'appcode':_0x1948e7['trim'](),'env':_0x5450f9},_0x42dd06),console[_0x1b45f9(0x21f)](_0x1b45f9(0x21d)+_0xe431),console[_0x1b45f9(0x21f)](_0x1b45f9(0x21c)+_0x1948e7[_0x1b45f9(0x214)]()),console[_0x1b45f9(0x21f)](_0x1b45f9(0x204)+_0x5450f9);}async function writeInitConfig(_0x9b0b93,_0x5acd7d,_0xbcdd1b){const _0x567e6b=a21_0x1955c0;let _0x9fd556={};existsSync(_0x9b0b93)&&!_0xbcdd1b[_0x567e6b(0x222)]&&(_0x9fd556=readConfigFile(_0x9b0b93));for(const [_0x451071,_0x39dc89]of Object['entries'](_0x5acd7d)){_0x39dc89!==undefined&&(_0x9fd556[_0x451071]=_0x39dc89);}if(_0x9fd556[_0x567e6b(0x1fd)])delete _0x9fd556['app'];writeConfigFile(_0x9b0b93,_0x9fd556);}class AbortPrompt extends Error{constructor(){const _0x3effa3=a21_0x1955c0;super(_0x3effa3(0x231)),this[_0x3effa3(0x1f8)]=_0x3effa3(0x220);}}function createSafeRl(){const _0x36a3b5=a21_0x1955c0,_0x1db187=createInterface({'input':process[_0x36a3b5(0x233)],'output':process[_0x36a3b5(0x227)]});let _0x5aebc6;const _0xab3081=new Promise((_0x523331,_0x3ac92c)=>{_0x5aebc6=()=>{const _0x50c677=a21_0x541f;_0x5aebc6&&(_0x1db187[_0x50c677(0x229)](_0x50c677(0x22c),_0x5aebc6),_0x5aebc6=undefined);try{_0x1db187['close']();}catch{}_0x3ac92c(new AbortPrompt());},_0x1db187['once']('SIGINT',_0x5aebc6);}),_0x2b214e=()=>{const _0x53c9b3=_0x36a3b5;_0x5aebc6&&(_0x1db187[_0x53c9b3(0x229)]('SIGINT',_0x5aebc6),_0x5aebc6=undefined);try{_0x1db187[_0x53c9b3(0x207)]();}catch{}};return{'rl':_0x1db187,'abortPromise':_0xab3081,'disposeSuccess':_0x2b214e};}async function promptInput(_0x164e80,_0x2edb19){const _0x253103=a21_0x1955c0,{rl:_0x4524f3,abortPromise:_0x567b8f,disposeSuccess:_0x53ab53}=createSafeRl(),_0x24bc3e=new Promise(_0x4de22a=>{const _0x16303b=a21_0x541f,_0x46e73a=_0x2edb19?'\x20\x20'+_0x164e80+'\x20('+_0x2edb19+'):\x20':'\x20\x20'+_0x164e80+':\x20';_0x4524f3[_0x16303b(0x1fb)](_0x46e73a,_0x24f783=>{const _0x292f86=_0x16303b;_0x53ab53(),_0x4de22a(_0x24f783[_0x292f86(0x214)]()||_0x2edb19);});});return Promise[_0x253103(0x1f7)]([_0x24bc3e,_0x567b8f]);}async function promptYesNo(_0x2c3287,_0x1c03b1){const _0x496cdf=a21_0x1955c0,{rl:_0x44139d,abortPromise:_0xed244f,disposeSuccess:_0x1bfb14}=createSafeRl(),_0x42be39=new Promise(_0x543f73=>{const _0x31dba0=a21_0x541f,_0xa70817=_0x1c03b1?'[Y/n]':_0x31dba0(0x217);_0x44139d['question']('\x20\x20'+_0x2c3287+'\x20'+_0xa70817+':\x20',_0x152556=>{_0x1bfb14();const _0x212a43=_0x152556['trim']()['toLowerCase']();if(_0x212a43==='y'||_0x212a43==='yes')_0x543f73(!![]);else{if(_0x212a43==='n'||_0x212a43==='no')_0x543f73(![]);else _0x543f73(_0x1c03b1);}});});return Promise[_0x496cdf(0x1f7)]([_0x42be39,_0xed244f]);}function loadExisting(_0x340076){if(!existsSync(_0x340076))return null;return readConfigFile(_0x340076);}function resolveFilePath(_0x265ceb){return isAbsolute(_0x265ceb)?_0x265ceb:resolve(process['cwd'](),_0x265ceb);}function readSourceFile(_0x36ced9){const _0x5c6eba=a21_0x1955c0;try{const _0x28c094=readFileSync(_0x36ced9,{'encoding':'utf8'});return JSON[_0x5c6eba(0x20a)](_0x28c094);}catch(_0x59c9c9){throw CliErrors['validation'](_0x5c6eba(0x20d)+_0x59c9c9[_0x5c6eba(0x216)]);}}function resolveInitEnv(_0x4b9e3f){const _0x1b642d=a21_0x1955c0,_0x23ddf0=_0x4b9e3f[_0x1b642d(0x1f5)];if(_0x23ddf0===undefined||_0x23ddf0==='')return DEFAULT_CONFIG_VALUES['env'];if(!RUNTIME_ENV_VALUES['includes'](_0x23ddf0))throw CliErrors[_0x1b642d(0x212)](_0x1b642d(0x215)+_0x23ddf0+_0x1b642d(0x203)+RUNTIME_ENV_VALUES[_0x1b642d(0x209)](',\x20'));return _0x23ddf0;}
|
|
1
|
+
const a21_0x4cbd69=a21_0x8939;(function(_0x5811ed,_0x1012f2){const _0x312873=a21_0x8939,_0x252901=_0x5811ed();while(!![]){try{const _0x270792=-parseInt(_0x312873(0x19a))/0x1+parseInt(_0x312873(0x186))/0x2+-parseInt(_0x312873(0x189))/0x3*(parseInt(_0x312873(0x193))/0x4)+-parseInt(_0x312873(0x17b))/0x5+-parseInt(_0x312873(0x16e))/0x6+parseInt(_0x312873(0x177))/0x7*(parseInt(_0x312873(0x192))/0x8)+parseInt(_0x312873(0x15c))/0x9;if(_0x270792===_0x1012f2)break;else _0x252901['push'](_0x252901['shift']());}catch(_0x434a50){_0x252901['push'](_0x252901['shift']());}}}(a21_0x4e41,0x507d2));import{existsSync,readFileSync}from'node:fs';import{resolve,isAbsolute}from'node:path';import{createInterface}from'node:readline';function a21_0x8939(_0x3af7ff,_0x4020c4){_0x3af7ff=_0x3af7ff-0x15c;const _0x4e4188=a21_0x4e41();let _0x89399d=_0x4e4188[_0x3af7ff];return _0x89399d;}import{CliErrors}from'../errors.js';function a21_0x4e41(){const _0x2214ed=['flagMissing','Failed\x20to\x20parse\x20source\x20file:\x20','apps','object','validation','8rPaJuo','1915896sktDRP','name','Usage:\x20','project','cancelled','app','Override\x20imported\x20default\x20appcode','460151LqxUeU','log','[Y/n]','utf8','App\x20code\x20for\x20the\x20project','App\x20code\x20cannot\x20be\x20empty.','12211272kpQaAY','Aborted.','Write\x20to\x20global\x20(~/','file','stdin','removeListener','File\x20','App\x20code','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','\x20\x20appcode:\x20','race','message','Override\x20imported\x20default\x20env','Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','env','yes','Initialized\x20','string','1503516RUFDbi','Skip\x20confirmation\x20when\x20overwriting','entries','apiDir','[y/N]','appcode','Imported\x20from\x20','includes','once','2915521fHcKVo','SIGINT','trim','join','1530980dsMjio','riskLevel','question','User\x20aborted\x20prompt','stdout','boolean',')\x20instead\x20of\x20project','global','\x20init\x20—\x20Create\x20','newConfigFileName','Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','104556OWpXFy','parse','\x20app\x20init\x20--appcode\x20<code>\x20[--env\x20daily]\x20[--global]','3NXlzFk','close','\x20\x20env:\x20\x20\x20\x20\x20','Invalid\x20env\x20\x22'];a21_0x4e41=function(){return _0x2214ed;};return a21_0x4e41();}import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{IMPORTABLE_RUNTIME_CONFIG_KEYS}from'../config/schema.js';import{resolveWriteConfigPath,readConfigFile,writeConfigFile,isNonInteractiveMode}from'../context.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{PRODUCT_CONFIG}from'../constant/product.js';export const initCreateFlagDefs=[{'name':a21_0x4cbd69(0x173),'type':a21_0x4cbd69(0x16d),'description':a21_0x4cbd69(0x19e)},{'name':a21_0x4cbd69(0x16a),'type':'string','description':'Target\x20environment\x20(default\x20'+DEFAULT_CONFIG_VALUES[a21_0x4cbd69(0x16a)]+')','enum':[...RUNTIME_ENV_VALUES]},{'name':a21_0x4cbd69(0x182),'type':a21_0x4cbd69(0x180),'description':a21_0x4cbd69(0x15e)+PRODUCT_CONFIG[a21_0x4cbd69(0x184)]+a21_0x4cbd69(0x181),'default':![]},{'name':a21_0x4cbd69(0x16b),'type':a21_0x4cbd69(0x180),'description':a21_0x4cbd69(0x16f),'default':![]}];export const initImportFlagDefs=[{'name':'file','type':a21_0x4cbd69(0x16d),'description':a21_0x4cbd69(0x185),'required':!![]},{'name':a21_0x4cbd69(0x173),'type':'string','description':a21_0x4cbd69(0x199)},{'name':a21_0x4cbd69(0x16a),'type':a21_0x4cbd69(0x16d),'description':a21_0x4cbd69(0x168),'enum':[...RUNTIME_ENV_VALUES]},{'name':'global','type':a21_0x4cbd69(0x180),'description':a21_0x4cbd69(0x15e)+PRODUCT_CONFIG[a21_0x4cbd69(0x184)]+a21_0x4cbd69(0x181),'default':![]},{'name':a21_0x4cbd69(0x16b),'type':a21_0x4cbd69(0x180),'description':a21_0x4cbd69(0x16f),'default':![]}];export async function runInit(_0x4632f8){const _0x13b986=a21_0x4cbd69,_0x14e54e=isNonInteractiveMode(_0x4632f8),_0x317fbb=_0x4632f8[_0x13b986(0x182)]?_0x13b986(0x182):_0x13b986(0x196),_0x346c79=resolveWriteConfigPath(_0x317fbb);try{_0x14e54e?await runNonInteractive(_0x4632f8,_0x346c79):await runInteractive(_0x4632f8,_0x346c79);}catch(_0x9769ed){if(_0x9769ed instanceof AbortPrompt)throw CliErrors[_0x13b986(0x197)]();throw _0x9769ed;}}export async function runInitImport(_0x2e5966){const _0x2e0baa=a21_0x4cbd69,_0x18d9ba=_0x2e5966[_0x2e0baa(0x182)]?_0x2e0baa(0x182):_0x2e0baa(0x196),_0x5b9a6=resolveWriteConfigPath(_0x18d9ba);await runFromImport(_0x2e5966,_0x5b9a6);}const RUNTIME_IRRELEVANT_KEYS=new Set([a21_0x4cbd69(0x171)]);async function runFromImport(_0x480806,_0x2c0c81){const _0x59c88d=a21_0x4cbd69,_0x529d79=resolveFilePath(_0x480806[_0x59c88d(0x15f)]);if(!existsSync(_0x529d79))throw CliErrors[_0x59c88d(0x191)]('Source\x20file\x20not\x20found:\x20'+_0x529d79);const _0x740844=readSourceFile(_0x529d79),_0x504d3a=convertToRuntimeConfig(_0x740844);_0x480806['appcode']&&(_0x504d3a[_0x59c88d(0x173)]=String(_0x480806[_0x59c88d(0x173)]));_0x480806[_0x59c88d(0x16a)]&&(_0x504d3a[_0x59c88d(0x16a)]=resolveInitEnv(_0x480806));if(!_0x504d3a[_0x59c88d(0x173)])throw CliErrors[_0x59c88d(0x191)](_0x59c88d(0x164),'Provide\x20--appcode\x20<code>\x20or\x20use\x20an\x20upgraded\x20.rabetbase.json\x20with\x20top-level\x20appcode.\x20Legacy\x20files\x20must\x20be\x20upgraded\x20first\x20with\x20`rabetbase\x20project\x20upgrade`.');await writeInitConfig(_0x2c0c81,_0x504d3a,_0x480806),console[_0x59c88d(0x19b)](_0x59c88d(0x174)+_0x529d79),console[_0x59c88d(0x19b)]('\x20\x20config:\x20\x20'+_0x2c0c81),console[_0x59c88d(0x19b)](_0x59c88d(0x165)+_0x504d3a['appcode']);if(_0x504d3a['defaultApp'])console[_0x59c88d(0x19b)]('\x20\x20default:\x20'+_0x504d3a['defaultApp']);}function convertToRuntimeConfig(_0x2cad81){const _0x5ada12=a21_0x4cbd69;if(_0x2cad81[_0x5ada12(0x18f)]&&typeof _0x2cad81[_0x5ada12(0x18f)]===_0x5ada12(0x190))throw CliErrors['validation'](_0x5ada12(0x169),'Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.');const _0x5d51e7={};for(const _0x30c4a7 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x2cad81[_0x30c4a7]!==undefined&&(_0x5d51e7[_0x30c4a7]=_0x2cad81[_0x30c4a7]);}return!_0x5d51e7[_0x5ada12(0x17c)]&&(_0x5d51e7[_0x5ada12(0x17c)]=DEFAULT_CONFIG_VALUES[_0x5ada12(0x17c)]),_0x5d51e7;}async function runNonInteractive(_0x48fb0b,_0x46a84a){const _0x3dacc3=a21_0x4cbd69,_0x520a48=_0x48fb0b[_0x3dacc3(0x173)];if(!_0x520a48)throw CliErrors[_0x3dacc3(0x18d)](_0x3dacc3(0x173),_0x3dacc3(0x195)+CLI_BIN_NAME+_0x3dacc3(0x188));const _0x23e1ae=resolveInitEnv(_0x48fb0b);await writeInitConfig(_0x46a84a,{'appcode':_0x520a48,'env':_0x23e1ae},_0x48fb0b),console[_0x3dacc3(0x19b)](_0x3dacc3(0x16c)+_0x46a84a),console['log']('\x20\x20appcode:\x20'+_0x520a48),console[_0x3dacc3(0x19b)](_0x3dacc3(0x18b)+_0x23e1ae);}async function runInteractive(_0x5135e1,_0xf7cea5){const _0x50c7e1=a21_0x4cbd69,_0x17c545=loadExisting(_0xf7cea5),_0x5478c1=typeof _0x17c545?.['appcode']===_0x50c7e1(0x16d)?_0x17c545['appcode']:'',_0xb52b05=resolveInitEnv(_0x5135e1);console[_0x50c7e1(0x19b)](CLI_BIN_NAME+_0x50c7e1(0x183)+PRODUCT_CONFIG[_0x50c7e1(0x184)]+'\x0a');if(existsSync(_0xf7cea5)&&!_0x5135e1[_0x50c7e1(0x16b)]){const _0x26cd3b=await promptYesNo(_0x50c7e1(0x162)+_0xf7cea5+'\x20already\x20exists.\x20Overwrite?',![]);if(!_0x26cd3b){console[_0x50c7e1(0x19b)](_0x50c7e1(0x15d));return;}}const _0x583fb6=typeof _0x5135e1['appcode']===_0x50c7e1(0x16d)?_0x5135e1['appcode'][_0x50c7e1(0x179)]():'';let _0x394b48=_0x583fb6;!_0x394b48&&(_0x394b48=await promptInput(_0x50c7e1(0x163),_0x5478c1));if(!_0x394b48[_0x50c7e1(0x179)]())throw CliErrors[_0x50c7e1(0x191)](_0x50c7e1(0x19f));await writeInitConfig(_0xf7cea5,{'appcode':_0x394b48['trim'](),'env':_0xb52b05},_0x5135e1),console[_0x50c7e1(0x19b)]('\x0aInitialized\x20'+_0xf7cea5),console['log']('\x20\x20appcode:\x20'+_0x394b48[_0x50c7e1(0x179)]()),console[_0x50c7e1(0x19b)]('\x20\x20env:\x20\x20\x20\x20\x20'+_0xb52b05);}async function writeInitConfig(_0xc8c07f,_0x4caa18,_0x3a080d){const _0x3626c8=a21_0x4cbd69;let _0x89b9da={};existsSync(_0xc8c07f)&&!_0x3a080d[_0x3626c8(0x16b)]&&(_0x89b9da=readConfigFile(_0xc8c07f));for(const [_0x1b5ea4,_0x4e7285]of Object[_0x3626c8(0x170)](_0x4caa18)){_0x4e7285!==undefined&&(_0x89b9da[_0x1b5ea4]=_0x4e7285);}if(_0x89b9da[_0x3626c8(0x198)])delete _0x89b9da[_0x3626c8(0x198)];writeConfigFile(_0xc8c07f,_0x89b9da);}class AbortPrompt extends Error{constructor(){const _0x213859=a21_0x4cbd69;super(_0x213859(0x17e)),this[_0x213859(0x194)]='AbortPrompt';}}function createSafeRl(){const _0x4b5ded=a21_0x4cbd69,_0x55d944=createInterface({'input':process[_0x4b5ded(0x160)],'output':process[_0x4b5ded(0x17f)]});let _0x10a104;const _0x5ab252=new Promise((_0x2e13ce,_0x320801)=>{const _0x11e0be=_0x4b5ded;_0x10a104=()=>{const _0x3cb52b=a21_0x8939;_0x10a104&&(_0x55d944['removeListener'](_0x3cb52b(0x178),_0x10a104),_0x10a104=undefined);try{_0x55d944[_0x3cb52b(0x18a)]();}catch{}_0x320801(new AbortPrompt());},_0x55d944[_0x11e0be(0x176)](_0x11e0be(0x178),_0x10a104);}),_0x5d6543=()=>{const _0x1172ca=_0x4b5ded;_0x10a104&&(_0x55d944[_0x1172ca(0x161)](_0x1172ca(0x178),_0x10a104),_0x10a104=undefined);try{_0x55d944[_0x1172ca(0x18a)]();}catch{}};return{'rl':_0x55d944,'abortPromise':_0x5ab252,'disposeSuccess':_0x5d6543};}async function promptInput(_0x26a4c1,_0x1aa0ac){const {rl:_0x2bf77d,abortPromise:_0x14d709,disposeSuccess:_0x5a2d5b}=createSafeRl(),_0x5d747c=new Promise(_0x89ec90=>{const _0x335fb7=a21_0x8939,_0x4ad33d=_0x1aa0ac?'\x20\x20'+_0x26a4c1+'\x20('+_0x1aa0ac+'):\x20':'\x20\x20'+_0x26a4c1+':\x20';_0x2bf77d[_0x335fb7(0x17d)](_0x4ad33d,_0xb1197a=>{const _0x3f8c2c=_0x335fb7;_0x5a2d5b(),_0x89ec90(_0xb1197a[_0x3f8c2c(0x179)]()||_0x1aa0ac);});});return Promise['race']([_0x5d747c,_0x14d709]);}async function promptYesNo(_0x646720,_0x2f66e9){const _0x5b0c52=a21_0x4cbd69,{rl:_0x3da0fb,abortPromise:_0x3d6965,disposeSuccess:_0xd632f5}=createSafeRl(),_0x5a0870=new Promise(_0x55441f=>{const _0x339bda=a21_0x8939,_0x2c8bef=_0x2f66e9?_0x339bda(0x19c):_0x339bda(0x172);_0x3da0fb[_0x339bda(0x17d)]('\x20\x20'+_0x646720+'\x20'+_0x2c8bef+':\x20',_0x5dbc54=>{const _0x3477b7=_0x339bda;_0xd632f5();const _0x610e75=_0x5dbc54['trim']()['toLowerCase']();if(_0x610e75==='y'||_0x610e75===_0x3477b7(0x16b))_0x55441f(!![]);else{if(_0x610e75==='n'||_0x610e75==='no')_0x55441f(![]);else _0x55441f(_0x2f66e9);}});});return Promise[_0x5b0c52(0x166)]([_0x5a0870,_0x3d6965]);}function loadExisting(_0x4a937d){if(!existsSync(_0x4a937d))return null;return readConfigFile(_0x4a937d);}function resolveFilePath(_0x196c08){return isAbsolute(_0x196c08)?_0x196c08:resolve(process['cwd'](),_0x196c08);}function readSourceFile(_0x1a32d2){const _0x39b404=a21_0x4cbd69;try{const _0x197166=readFileSync(_0x1a32d2,{'encoding':_0x39b404(0x19d)});return JSON[_0x39b404(0x187)](_0x197166);}catch(_0x38998b){throw CliErrors[_0x39b404(0x191)](_0x39b404(0x18e)+_0x38998b[_0x39b404(0x167)]);}}function resolveInitEnv(_0x1a991e){const _0x2c642b=a21_0x4cbd69,_0x2413e7=_0x1a991e['env'];if(_0x2413e7===undefined||_0x2413e7==='')return DEFAULT_CONFIG_VALUES[_0x2c642b(0x16a)];if(!RUNTIME_ENV_VALUES[_0x2c642b(0x175)](_0x2413e7))throw CliErrors[_0x2c642b(0x191)](_0x2c642b(0x18c)+_0x2413e7+'\x22.\x20Allowed:\x20'+RUNTIME_ENV_VALUES[_0x2c642b(0x17a)](',\x20'));return _0x2413e7;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a22_0xc2d17a=a22_0xdd20;function a22_0x3ed4(){const _0x5aba70=['duration','length','timestamp','clearLogs','\x20\x20\x20Time:\x20','keys','error','*\x20No\x20logs\x20found','message','1661030ZaLhhW','1032856AVguAT','6koFdIa','readLogs','2bnJSte','40ucrLnJ','command','6719200cLyJXR','stringify','2295801taLSqw','3338812SzEAUz','10WARoIp','\x20logs:\x0a','logs','read','5058251qtCFAE','1440558fRLUwy','level','log','Clear\x20command\x20history\x20logs','success','View\x20command\x20history\x20logs','clear','details'];a22_0x3ed4=function(){return _0x5aba70;};return a22_0x3ed4();}(function(_0x4c4e46,_0x456db1){const _0x41bb4f=a22_0xdd20,_0x420498=_0x4c4e46();while(!![]){try{const _0x33cb60=parseInt(_0x41bb4f(0xe9))/0x1+-parseInt(_0x41bb4f(0xec))/0x2*(parseInt(_0x41bb4f(0xf1))/0x3)+-parseInt(_0x41bb4f(0xf2))/0x4+parseInt(_0x41bb4f(0xef))/0x5+-parseInt(_0x41bb4f(0xea))/0x6*(-parseInt(_0x41bb4f(0xe8))/0x7)+-parseInt(_0x41bb4f(0xed))/0x8*(parseInt(_0x41bb4f(0xd7))/0x9)+parseInt(_0x41bb4f(0xd2))/0xa*(parseInt(_0x41bb4f(0xd6))/0xb);if(_0x33cb60===_0x456db1)break;else _0x420498['push'](_0x420498['shift']());}catch(_0x55c73f){_0x420498['push'](_0x420498['shift']());}}}(a22_0x3ed4,0xa470b));import{logger}from'../../utils/logger.js';import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function a22_0xdd20(_0x402668,_0x1b614a){_0x402668=_0x402668-0xd2;const _0x3ed488=a22_0x3ed4();let _0xdd209a=_0x3ed488[_0x402668];return _0xdd209a;}function printLogs(_0x3f2638){const _0x54d6ad=a22_0xdd20;if(_0x3f2638[_0x54d6ad(0xe0)]===0x0){console[_0x54d6ad(0xd9)](_0x54d6ad(0xe6));return;}console[_0x54d6ad(0xd9)]('*\x20'+CLI_DISPLAY_NAME+_0x54d6ad(0xd3)),_0x3f2638['forEach']((_0xc49d22,_0x288343)=>{const _0x5c831f=_0x54d6ad,_0x3b275c=new Date(_0xc49d22[_0x5c831f(0xe1)])['toLocaleString']('en-US'),_0x481d75=_0xc49d22['level']===_0x5c831f(0xdb)?'√':_0xc49d22['level']===_0x5c831f(0xe5)?'×':_0xc49d22[_0x5c831f(0xd8)]==='warn'?'!':'i';console['log'](_0x288343+0x1+'.\x20'+_0x481d75+'\x20['+_0xc49d22[_0x5c831f(0xee)]+']\x20'+_0xc49d22[_0x5c831f(0xe7)]),console[_0x5c831f(0xd9)](_0x5c831f(0xe3)+_0x3b275c),_0xc49d22[_0x5c831f(0xdf)]&&console[_0x5c831f(0xd9)]('\x20\x20\x20Duration:\x20'+_0xc49d22['duration']+'ms'),_0xc49d22['details']&&Object[_0x5c831f(0xe4)](_0xc49d22[_0x5c831f(0xde)])[_0x5c831f(0xe0)]>0x0&&console[_0x5c831f(0xd9)]('\x20\x20\x20Details:\x20'+JSON[_0x5c831f(0xf0)](_0xc49d22[_0x5c831f(0xde)],null,0x2)),console[_0x5c831f(0xd9)]('');});}export const logsDefinitions=[{'service':a22_0xc2d17a(0xd4),'command':'show','description':a22_0xc2d17a(0xdc),'risk':a22_0xc2d17a(0xd5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x580cbc){const _0x3d3b0c=a22_0xc2d17a;return printLogs(logger[_0x3d3b0c(0xeb)]()),{'ok':!![]};}},{'service':'logs','command':a22_0xc2d17a(0xdd),'description':a22_0xc2d17a(0xda),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x23399c){const _0x4d64ae=a22_0xc2d17a;return logger[_0x4d64ae(0xe2)](),console[_0x4d64ae(0xd9)]('*\x20Logs\x20cleared'),{'ok':!![]};}}];
|
package/lib/commands/registry.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a23_0x312692=a23_0x17ed;(function(_0x526f65,_0x443826){const _0x426c84=a23_0x17ed,_0x3a9f07=_0x526f65();while(!![]){try{const _0x3f3293=-parseInt(_0x426c84(0xa1))/0x1+parseInt(_0x426c84(0xaa))/0x2*(parseInt(_0x426c84(0xa5))/0x3)+-parseInt(_0x426c84(0x95))/0x4*(parseInt(_0x426c84(0x98))/0x5)+parseInt(_0x426c84(0x99))/0x6*(-parseInt(_0x426c84(0xab))/0x7)+parseInt(_0x426c84(0x8e))/0x8+parseInt(_0x426c84(0x9b))/0x9+parseInt(_0x426c84(0x96))/0xa;if(_0x3f3293===_0x443826)break;else _0x3a9f07['push'](_0x3a9f07['shift']());}catch(_0x11e736){_0x3a9f07['push'](_0x3a9f07['shift']());}}}(a23_0x1e88,0xbe7db));import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{skillDefinitions}from'../commands/skill/index.js';import{updateDefinition}from'../commands/update.js';import{doctorDefinition}from'../commands/doctor.js';import{schemaDefinition}from'../commands/schema.js';import{appDefinitions}from'../commands/app/definitions.js';function a23_0x17ed(_0x26f1f7,_0x58b7f2){_0x26f1f7=_0x26f1f7-0x86;const _0x1e8883=a23_0x1e88();let _0x17ed34=_0x1e8883[_0x26f1f7];return _0x17ed34;}import{configDefinitions}from'../commands/config/definitions.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{dataDefinitions}from'../commands/data/index.js';function a23_0x1e88(){const _0x1b698a=['\x20\x20[write]','read','push','806076SJumzp','from','\x20\x20[high-risk-write]','show','39EVEwvE','SQL\x20Queries','login','isSingleCommand','Diagnostics','9886EHCJSJ','21ptdSyp','install','write','service','list','values','risk','Datasets','BFF\x20Scripts','description','defaultCommand','3228320GhYRvZ','Authentication','App\x20Management','run','command','Configuration','get','342140fZufAp','12290350LGAmvt','Instant\x20API','5onNCbJ','978474oyjaix','set','4178385ArjTxj','has','map'];a23_0x1e88=function(){return _0x1b698a;};return a23_0x1e88();}export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x2588f8){const _0x3b3c96=a23_0x17ed;for(const _0x525505 of _0x2588f8){definitions[_0x3b3c96(0x9a)](_0x525505[_0x3b3c96(0x86)]+':'+_0x525505[_0x3b3c96(0x92)],_0x525505);let _0xe47572=serviceGroups[_0x3b3c96(0x94)](_0x525505['service']);!_0xe47572&&(_0xe47572=[],serviceGroups['set'](_0x525505['service'],_0xe47572)),_0xe47572['push'](_0x525505);}}function registerService(_0x260ed2,_0x40300c,_0x5511f4){const _0x330b35=a23_0x17ed;registerDefinitions(_0x40300c);const _0x13098a=_0x382e7d=>_0x382e7d===_0x330b35(0x9f)?'':_0x382e7d===_0x330b35(0xad)?_0x330b35(0x9e):_0x330b35(0xa3),_0x203cd6={'service':_0x40300c[0x0][_0x330b35(0x86)],'label':_0x260ed2,'commands':_0x40300c[_0x330b35(0x9d)](_0x33d10f=>({'command':_0x33d10f['command'],'description':_0x33d10f[_0x330b35(0x8c)],'tag':_0x13098a(_0x33d10f[_0x330b35(0x89)])})),'defaultCommand':_0x5511f4?.[_0x330b35(0x8d)]??(_0x5511f4?.[_0x330b35(0xa8)]?_0x40300c[0x0][_0x330b35(0x92)]:undefined),'isSingleCommand':_0x5511f4?.[_0x330b35(0xa8)]};serviceRegistry[_0x330b35(0xa0)](_0x203cd6),serviceByName[_0x330b35(0x9a)](_0x203cd6[_0x330b35(0x86)],_0x203cd6);}registerService(a23_0x312692(0x8f),authDefinitions,{'defaultCommand':a23_0x312692(0xa7)}),registerService(a23_0x312692(0x8a),datasetDefinitions),registerService(a23_0x312692(0x97),dataDefinitions),registerService(a23_0x312692(0xa6),sqlDefinitions),registerService(a23_0x312692(0x8b),bffDefinitions),registerService(a23_0x312692(0x90),appDefinitions,{'defaultCommand':a23_0x312692(0x87)}),registerService(a23_0x312692(0x93),configDefinitions,{'defaultCommand':a23_0x312692(0x87)}),registerService('Skills',skillDefinitions,{'defaultCommand':a23_0x312692(0xac)}),registerService('Self\x20Update',[updateDefinition],{'defaultCommand':a23_0x312692(0x91),'isSingleCommand':!![]}),registerService(a23_0x312692(0xa9),[doctorDefinition],{'isSingleCommand':!![]}),registerService('Schema',[schemaDefinition],{'isSingleCommand':!![]}),registerService('Logs',logsDefinitions,{'defaultCommand':a23_0x312692(0xa4)});export function findDefinition(_0x5b1966,_0x936ed){return definitions['get'](_0x5b1966+':'+_0x936ed);}export function isKnownService(_0x37d754){const _0x9a6dd3=a23_0x312692;return serviceByName[_0x9a6dd3(0x9c)](_0x37d754);}export function getServiceEntry(_0x234b5c){const _0x2b1e54=a23_0x312692;return serviceByName[_0x2b1e54(0x94)](_0x234b5c);}export function getAllDefinitions(){const _0x33213a=a23_0x312692;return Array[_0x33213a(0xa2)](definitions[_0x33213a(0x88)]());}
|
package/lib/commands/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a24_0x2a02(_0x27b848,_0x7d746b){_0x27b848=_0x27b848-0x1a2;const _0x5a7d09=a24_0x5a7d();let _0x2a0247=_0x5a7d09[_0x27b848];return _0x2a0247;}const a24_0x6ebfc7=a24_0x2a02;(function(_0x5777e6,_0x503708){const _0x335fe5=a24_0x2a02,_0x80a546=_0x5777e6();while(!![]){try{const _0x49c374=parseInt(_0x335fe5(0x1a3))/0x1+parseInt(_0x335fe5(0x1a5))/0x2*(-parseInt(_0x335fe5(0x1aa))/0x3)+parseInt(_0x335fe5(0x1a2))/0x4+parseInt(_0x335fe5(0x1a7))/0x5*(-parseInt(_0x335fe5(0x1ad))/0x6)+-parseInt(_0x335fe5(0x1ab))/0x7+parseInt(_0x335fe5(0x1ac))/0x8*(parseInt(_0x335fe5(0x1a8))/0x9)+parseInt(_0x335fe5(0x1ae))/0xa;if(_0x49c374===_0x503708)break;else _0x80a546['push'](_0x80a546['shift']());}catch(_0x576d0f){_0x80a546['push'](_0x80a546['shift']());}}}(a24_0x5a7d,0xc0907));import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x10f070){const _0x12f7f5=await buildSchemaPayload();return{'ok':!![],'data':_0x12f7f5};}function a24_0x5a7d(){const _0x3507d5=['15839430dMbaMM','116780vJGypr','1150175YmJqFt','Export\x20machine-readable\x20command\x20schema\x20(JSON)','303978QLSlSF','read','772370VzCexv','135UVXWHP','schema','27wAFnUC','8341228ulzmSZ','723896RezQab','30jMXGPp'];a24_0x5a7d=function(){return _0x3507d5;};return a24_0x5a7d();}export const schemaDefinition={'service':a24_0x6ebfc7(0x1a9),'command':'export','description':a24_0x6ebfc7(0x1a4),'risk':a24_0x6ebfc7(0x1a6),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a25_0x2960c2=a25_0x1122;(function(_0x22d850,_0x4ef56a){const _0x35a42f=a25_0x1122,_0x1f879f=_0x22d850();while(!![]){try{const _0x239088=parseInt(_0x35a42f(0x1e0))/0x1+-parseInt(_0x35a42f(0x1ef))/0x2*(parseInt(_0x35a42f(0x1f7))/0x3)+parseInt(_0x35a42f(0x1e7))/0x4+parseInt(_0x35a42f(0x1f3))/0x5+parseInt(_0x35a42f(0x1ed))/0x6+parseInt(_0x35a42f(0x1e6))/0x7+-parseInt(_0x35a42f(0x1e2))/0x8;if(_0x239088===_0x4ef56a)break;else _0x1f879f['push'](_0x1f879f['shift']());}catch(_0x35c321){_0x1f879f['push'](_0x1f879f['shift']());}}}(a25_0x5d91,0x8052c));function a25_0x5d91(){const _0x506745=['Install\x20the\x20published\x20','3120810RzYxOW','Installing\x20official\x20skill\x20via\x20npx\x20(npx\x20skills\x20add\x20','\x20skill\x20via\x20npx.','npx\x20skills\x20add\x20failed:\x20','447qqKrFy','write','log','inherit','unknown','nonInteractive','983659TatSRm','skill','19946024ZWpyZm','install','apiError','\x20developer\x20skill','6285979AxSFtz','3318280ABWWdQ','\x20skill\x20installed','cwd','../../skills/npx-skills-add.js','Installing\x20published\x20','skipped','3803688oDIrsQ','skill-install','12758pTGkgV','=1);\x20assuming\x20skill\x20is\x20already\x20present.','Skipped\x20npx\x20('];a25_0x5d91=function(){return _0x506745;};return a25_0x5d91();}import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';function a25_0x1122(_0x395aa9,_0x487fe1){_0x395aa9=_0x395aa9-0x1dd;const _0x5d9182=a25_0x5d91();let _0x1122c7=_0x5d9182[_0x395aa9];return _0x1122c7;}import{logger}from'../../utils/logger.js';export const skillDefinitions=[{'service':a25_0x2960c2(0x1e1),'command':a25_0x2960c2(0x1e3),'description':a25_0x2960c2(0x1f2)+CLI_BIN_NAME+a25_0x2960c2(0x1e5),'risk':a25_0x2960c2(0x1f8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x2f56f8){const _0x6ce78d=a25_0x2960c2;logger['setLogPath'](process[_0x6ce78d(0x1e9)]()),logger['info'](_0x6ce78d(0x1ee),_0x6ce78d(0x1eb)+CLI_DISPLAY_NAME+_0x6ce78d(0x1f5));const {LOVRABET_SKILL_SOURCE:_0xe230ce,LOVRABET_SKIP_NPX_SKILLS_ENV:_0x3fb0ee,runNpxSkillsAddGlobal:_0x5d35b6}=await import(_0x6ce78d(0x1ea)),_0x3362f4=_0x2f56f8[_0x6ce78d(0x1df)]?'pipe':_0x6ce78d(0x1dd);console[_0x6ce78d(0x1f9)](_0x6ce78d(0x1f4)+_0xe230ce+'\x20-g\x20-y)...');const _0x80960e=_0x5d35b6(process['cwd'](),_0xe230ce,{'stdio':_0x3362f4});if(_0x80960e[_0x6ce78d(0x1ec)])console[_0x6ce78d(0x1f9)](_0x6ce78d(0x1f1)+_0x3fb0ee+_0x6ce78d(0x1f0));else{if(_0x80960e['ok'])console[_0x6ce78d(0x1f9)](CLI_BIN_NAME+_0x6ce78d(0x1e8));else throw CliErrors[_0x6ce78d(0x1e4)](_0x6ce78d(0x1f6)+(_0x80960e['error']||_0x6ce78d(0x1de)),'Check\x20network\x20connectivity\x20and\x20try\x20again.');}return{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a26_0x48f6a5=a26_0x1a66;function a26_0x1a66(_0x19599d,_0x10f0cb){_0x19599d=_0x19599d-0xe1;const _0x5aa3be=a26_0x5aa3();let _0x1a66a7=_0x5aa3be[_0x19599d];return _0x1a66a7;}(function(_0x5d2f25,_0x2d2a42){const _0x2f2b70=a26_0x1a66,_0x330d58=_0x5d2f25();while(!![]){try{const _0x17b7a5=-parseInt(_0x2f2b70(0xf2))/0x1+-parseInt(_0x2f2b70(0xf4))/0x2*(-parseInt(_0x2f2b70(0xed))/0x3)+parseInt(_0x2f2b70(0xe5))/0x4*(parseInt(_0x2f2b70(0xef))/0x5)+parseInt(_0x2f2b70(0xe2))/0x6+-parseInt(_0x2f2b70(0xeb))/0x7+-parseInt(_0x2f2b70(0xee))/0x8*(parseInt(_0x2f2b70(0xe3))/0x9)+parseInt(_0x2f2b70(0xea))/0xa;if(_0x17b7a5===_0x2d2a42)break;else _0x330d58['push'](_0x330d58['shift']());}catch(_0x333361){_0x330d58['push'](_0x330d58['shift']());}}}(a26_0x5aa3,0x673c7));import{getSqlQueryInfo}from'../../core/api-client.js';import{getDbName}from'../../core/db-resolver.js';import{SQLCODE_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';export const sqlDetail={'service':a26_0x48f6a5(0xf5),'command':a26_0x48f6a5(0xe4),'description':a26_0x48f6a5(0xe9),'risk':'read','flags':[SQLCODE_FLAG,VERBOSE_FLAG],async 'execute'(_0x1626d8){const _0x1bc7bb=a26_0x48f6a5,_0x1a9454=await getSqlQueryInfo(_0x1626d8[_0x1bc7bb(0xf3)],_0x1626d8[_0x1bc7bb(0xf0)](_0x1bc7bb(0xe8))),_0x3e7652=_0x1626d8[_0x1bc7bb(0xf6)](_0x1bc7bb(0xe1));if(_0x3e7652)return{'ok':!![],'data':_0x1a9454};const _0x513cd7=_0x1a9454[_0x1bc7bb(0xe7)]?await getDbName(_0x1626d8[_0x1bc7bb(0xf3)],_0x1a9454[_0x1bc7bb(0xe7)]):undefined;return{'ok':!![],'data':{'sqlCode':_0x1a9454[_0x1bc7bb(0xe6)],'sqlName':_0x1a9454[_0x1bc7bb(0xec)],'db':_0x513cd7?_0x513cd7+'\x20('+_0x1a9454['dbId']+')':_0x1a9454['dbId']??'','description':_0x1a9454[_0x1bc7bb(0xf1)]??'','sqlContent':_0x1a9454[_0x1bc7bb(0xf7)]??''}};}};function a26_0x5aa3(){const _0x41c2bd=['description','11417oBSNmg','appCode','293638pDehbo','sql','bool','sqlContent','verbose','1962996BXwOes','9MkVFwJ','detail','8PkVMcg','sqlCode','dbId','sqlcode','Get\x20custom\x20SQL\x20query\x20details\x20by\x20sqlCode','8441860tckqWR','4712687NzUxzU','sqlName','6kGBhmy','5031448BdnPsq','678635tAWwkj','str'];a26_0x5aa3=function(){return _0x41c2bd;};return a26_0x5aa3();}
|
package/lib/commands/sql/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a27_0x3ce4e0=a27_0x4631;(function(_0x5a0a9f,_0x2d5492){const _0x6b4e3f=a27_0x4631,_0x2fce85=_0x5a0a9f();while(!![]){try{const _0x52c81a=parseInt(_0x6b4e3f(0xea))/0x1*(parseInt(_0x6b4e3f(0xe9))/0x2)+-parseInt(_0x6b4e3f(0xec))/0x3*(parseInt(_0x6b4e3f(0xee))/0x4)+parseInt(_0x6b4e3f(0xe5))/0x5+parseInt(_0x6b4e3f(0xeb))/0x6+parseInt(_0x6b4e3f(0xf0))/0x7*(parseInt(_0x6b4e3f(0xe4))/0x8)+parseInt(_0x6b4e3f(0xe1))/0x9*(-parseInt(_0x6b4e3f(0xe0))/0xa)+parseInt(_0x6b4e3f(0xef))/0xb*(parseInt(_0x6b4e3f(0xe6))/0xc);if(_0x52c81a===_0x2d5492)break;else _0x2fce85['push'](_0x2fce85['shift']());}catch(_0x293dac){_0x2fce85['push'](_0x2fce85['shift']());}}}(a27_0x318e,0xf2da3));function a27_0x4631(_0x1ba720,_0x381b2f){_0x1ba720=_0x1ba720-0xd9;const _0x318ec5=a27_0x318e();let _0x463174=_0x318ec5[_0x1ba720];return _0x463174;}import{executeSdkSql}from'../../core/sdk-client.js';import{SQLCODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';function a27_0x318e(){const _0xa4516b=['execSuccess','isArray','5308gxBMLP','254gZxiuk','2612976iedMYH','10239yXRNSi','str','1332VDlcjf','22yFYadE','421197ePPFKV','length','SQL\x20execution\x20failed','execResult','params','Returned\x20','Execute\x20a\x20custom\x20SQL\x20query\x20by\x20sqlCode','sql','\x20row(s)\x20in\x20','7052720SQibgu','18YRmRrp','sqlcode','exec','176UEsGvi','74820hImkVq','6560748AGVjTE'];a27_0x318e=function(){return _0xa4516b;};return a27_0x318e();}import{parseJsonParams}from'../../utils/params.js';export const sqlExec={'service':a27_0x3ce4e0(0xde),'command':a27_0x3ce4e0(0xe3),'description':a27_0x3ce4e0(0xdd),'risk':'read','flags':[SQLCODE_FLAG,PARAMS_FLAG],async 'execute'(_0x11f642){const _0x5f1faa=a27_0x3ce4e0,_0x5daa41=parseJsonParams(_0x11f642[_0x5f1faa(0xed)](_0x5f1faa(0xdb))),_0x25b656=Date['now'](),_0x5224aa=await executeSdkSql(_0x11f642[_0x5f1faa(0xed)](_0x5f1faa(0xe2)),_0x5daa41),_0x38bfc1=Date['now']()-_0x25b656,_0x36d732=_0x5224aa?.[_0x5f1faa(0xda)]??_0x5224aa,_0x41e8fc=_0x5224aa?.[_0x5f1faa(0xe7)]??!![];if(!_0x41e8fc)return{'ok':![],'data':{'error':_0x5224aa?.['execError']||_0x5f1faa(0xd9),'elapsed':_0x38bfc1},'message':_0x5f1faa(0xd9)};const _0x4ab1af=Array[_0x5f1faa(0xe8)](_0x36d732)?_0x36d732:[];return{'ok':!![],'data':{'rows':_0x4ab1af,'rowCount':_0x4ab1af[_0x5f1faa(0xf1)],'elapsed':_0x38bfc1},'message':_0x5f1faa(0xdc)+_0x4ab1af[_0x5f1faa(0xf1)]+_0x5f1faa(0xdf)+_0x38bfc1+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a28_0x1641(_0x53e714,_0x488583){_0x53e714=_0x53e714-0x166;const _0x4c1361=a28_0x4c13();let _0x16410f=_0x4c1361[_0x53e714];return _0x16410f;}(function(_0x153920,_0x4dde3b){const _0x21060c=a28_0x1641,_0x5cdafb=_0x153920();while(!![]){try{const _0xbd24fc=-parseInt(_0x21060c(0x16d))/0x1*(parseInt(_0x21060c(0x166))/0x2)+-parseInt(_0x21060c(0x16c))/0x3+-parseInt(_0x21060c(0x16a))/0x4*(-parseInt(_0x21060c(0x16e))/0x5)+parseInt(_0x21060c(0x16f))/0x6*(-parseInt(_0x21060c(0x171))/0x7)+-parseInt(_0x21060c(0x168))/0x8*(parseInt(_0x21060c(0x170))/0x9)+-parseInt(_0x21060c(0x16b))/0xa*(-parseInt(_0x21060c(0x167))/0xb)+parseInt(_0x21060c(0x169))/0xc;if(_0xbd24fc===_0x4dde3b)break;else _0x5cdafb['push'](_0x5cdafb['shift']());}catch(_0x282cd8){_0x5cdafb['push'](_0x5cdafb['shift']());}}}(a28_0x4c13,0xcba91));import{sqlDetail}from'../../commands/sql/detail.js';import{sqlExec}from'../../commands/sql/exec.js';export const sqlDefinitions=[sqlDetail,sqlExec];function a28_0x4c13(){const _0xff92fb=['4399179YzVXhk','76157XmoluV','670vUNaWW','18StvEyx','179865RsDkhR','2713137klrtXU','2jMDLlu','1738qdpTbI','88pSbJuA','18003900bSSDaV','36692nmhRue','65180illQpv'];a28_0x4c13=function(){return _0xff92fb;};return a28_0x4c13();}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a29_0x29eae7=a29_0x19ce;(function(_0x437ebf,_0x4b4d16){const _0x5923f9=a29_0x19ce,_0x41ce26=_0x437ebf();while(!![]){try{const _0x52633b=parseInt(_0x5923f9(0x19d))/0x1+-parseInt(_0x5923f9(0x15a))/0x2+parseInt(_0x5923f9(0x17a))/0x3+parseInt(_0x5923f9(0x185))/0x4+-parseInt(_0x5923f9(0x177))/0x5*(-parseInt(_0x5923f9(0x179))/0x6)+-parseInt(_0x5923f9(0x16c))/0x7+parseInt(_0x5923f9(0x176))/0x8*(-parseInt(_0x5923f9(0x151))/0x9);if(_0x52633b===_0x4b4d16)break;else _0x41ce26['push'](_0x41ce26['shift']());}catch(_0x402275){_0x41ce26['push'](_0x41ce26['shift']());}}}(a29_0x5b3f,0x40a67));import{spawnSync}from'node:child_process';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{LOVRABET_NPM_PACKAGE_NAME,LOVRABET_SKILL_SOURCE,NPM_REGISTRY_BASE_URL}from'../constant/distribution.js';import{resolveNpmBin}from'../utils/platform.js';import{getCliVersion}from'../utils/version.js';import{LOVRABET_SKIP_NPX_SKILLS_ENV,runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';const updateFlags=[{'name':a29_0x29eae7(0x17c),'type':a29_0x29eae7(0x150),'description':a29_0x29eae7(0x171),'default':![]},{'name':a29_0x29eae7(0x166),'type':'boolean','description':'Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','default':![]},{'name':a29_0x29eae7(0x156),'type':a29_0x29eae7(0x188),'description':a29_0x29eae7(0x196)},{'name':a29_0x29eae7(0x174),'type':'boolean','description':'Skip\x20official\x20skill\x20package\x20refresh\x20after\x20updating','default':![]},{'name':'skills','type':'boolean','description':a29_0x29eae7(0x182),'default':!![],'hidden':!![]}];function a29_0x19ce(_0x548a2b,_0x403f90){_0x548a2b=_0x548a2b-0x150;const _0x5b3fd7=a29_0x5b3f();let _0x19ce06=_0x5b3fd7[_0x548a2b];return _0x19ce06;}function parseSemver(_0x3616c0){const _0x1b6d87=a29_0x29eae7,_0x418485=_0x3616c0[_0x1b6d87(0x186)]()[_0x1b6d87(0x189)](/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);if(!_0x418485)return null;return{'major':Number(_0x418485[0x1]),'minor':Number(_0x418485[0x2]),'patch':Number(_0x418485[0x3]),'prerelease':_0x418485[0x4]};}function a29_0x5b3f(){const _0x5449da=['bool','install','Refresh\x20official\x20skill\x20package\x20after\x20updating','npm','\x20\x20Official\x20skill\x20update\x20failed:\x20','1556204vlbgLM','trim','patch','string','match','Use\x20full\x20semver\x20versions\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.','\x20\x20Skipped\x20skill\x20install\x20(','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','toString','Unable\x20to\x20resolve\x20','nonInteractive','pipe','skills','skipped','join','str','Invalid\x20version:\x20','Install\x20a\x20specific\x20CLI\x20version','length','unknown','fromEntries','object','inherit','major','460149bXHkcY','prerelease','boolean','9WxvNnK','Already\x20on\x20requested\x20version\x20(v','exit\x20','status','\x20-g\x20-y','version','Version\x20comparison\x20failed.','cwd','\x20\x20Official\x20skill\x20package\x20is\x20up\x20to\x20date.','995636BIBqmo','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','source','flag','Already\x20up\x20to\x20date\x20(v','Current\x20version:\x20','entries','Choose\x20exactly\x20one\x20target:\x20--latest,\x20--beta,\x20or\x20--version\x20<version>.','--latest,\x20--beta,\x20and\x20version\x20cannot\x20be\x20used\x20together.','validation','json','stdout','beta','\x20\x20Try\x20manually:\x20npm\x20install\x20-g\x20','\x20->\x20','filter','map','warn','832265pQSZOn','Checking\x20official\x20skill\x20package...','error','=1).','Checking\x20npm\x20dist-tags...','Install\x20the\x20version\x20from\x20npm\x20latest\x20dist-tag','Update\x20failed:\x20','\x20CLI\x20from\x20npm','no-skills','stderr','6604328CLZkvt','878335bBGeup','args','18uHErYe','992580UChMcB','log','latest','Use\x20a\x20full\x20semver\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.','Updated\x20to\x20v','timeout'];a29_0x5b3f=function(){return _0x5449da;};return a29_0x5b3f();}function compareSemver(_0x196e2a,_0x29bcf0){const _0x51f03f=a29_0x29eae7,_0x316d9d=parseSemver(_0x196e2a),_0x195ca9=parseSemver(_0x29bcf0);if(!_0x316d9d||!_0x195ca9)throw CliErrors[_0x51f03f(0x163)](_0x51f03f(0x157),_0x51f03f(0x18a));for(const _0xb979bf of[_0x51f03f(0x19c),'minor',_0x51f03f(0x187)]){if(_0x316d9d[_0xb979bf]<_0x195ca9[_0xb979bf])return-0x1;if(_0x316d9d[_0xb979bf]>_0x195ca9[_0xb979bf])return 0x1;}if(!_0x316d9d[_0x51f03f(0x19e)]&&!_0x195ca9[_0x51f03f(0x19e)])return 0x0;if(!_0x316d9d['prerelease'])return 0x1;if(!_0x195ca9[_0x51f03f(0x19e)])return-0x1;if(_0x316d9d[_0x51f03f(0x19e)]===_0x195ca9[_0x51f03f(0x19e)])return 0x0;return _0x316d9d[_0x51f03f(0x19e)]<_0x195ca9['prerelease']?-0x1:0x1;}function getRequestedVersion(_0x596de9){const _0x42ab83=a29_0x29eae7,_0x43b589=_0x596de9[_0x42ab83(0x194)](_0x42ab83(0x156))['trim']();if(_0x43b589)return _0x43b589;return String(_0x596de9[_0x42ab83(0x178)]?.[0x0]??'')['trim']();}function shouldSkipOfficialSkill(_0x44867e){const _0x3b9870=a29_0x29eae7;return _0x44867e['bool'](_0x3b9870(0x174))||_0x44867e[_0x3b9870(0x15d)](_0x3b9870(0x191))===![];}async function validateUpdateFlags(_0x1c5549){const _0x139b9b=a29_0x29eae7,_0x3f0bf1=getRequestedVersion(_0x1c5549),_0x339718=[_0x1c5549[_0x139b9b(0x180)]('latest')?_0x139b9b(0x17c):'',_0x1c5549['bool']('beta')?_0x139b9b(0x166):'',_0x3f0bf1?_0x139b9b(0x156):'']['filter'](Boolean);if(_0x339718[_0x139b9b(0x197)]>0x1)throw CliErrors['validation'](_0x139b9b(0x162),_0x139b9b(0x161));if(_0x3f0bf1&&!parseSemver(_0x3f0bf1))throw CliErrors[_0x139b9b(0x163)](_0x139b9b(0x195)+_0x3f0bf1,_0x139b9b(0x17d));}async function fetchNpmDistTags(){const _0x454f01=a29_0x29eae7;try{const _0x1d4b40=NPM_REGISTRY_BASE_URL+'/-/package/'+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+'/dist-tags',_0x5e21b3=await fetch(_0x1d4b40,{'signal':AbortSignal[_0x454f01(0x17f)](0x2710)});if(!_0x5e21b3['ok'])return null;const _0x1af852=await _0x5e21b3[_0x454f01(0x164)]();if(!_0x1af852||typeof _0x1af852!==_0x454f01(0x19a))return null;return Object[_0x454f01(0x199)](Object[_0x454f01(0x160)](_0x1af852)[_0x454f01(0x169)](([,_0x17370b])=>typeof _0x17370b===_0x454f01(0x188)&&_0x17370b[_0x454f01(0x186)]())[_0x454f01(0x16a)](([_0x1d14d6,_0x1c862e])=>[_0x1d14d6,String(_0x1c862e)['trim']()]));}catch{return null;}}async function resolveTargetVersion(_0xfa1ca0){const _0x5edd5e=a29_0x29eae7,_0x2a2171=getRequestedVersion(_0xfa1ca0);if(_0x2a2171)return{'version':_0x2a2171,'source':_0x5edd5e(0x156)};const _0x41db0b=_0xfa1ca0[_0x5edd5e(0x180)](_0x5edd5e(0x166))?_0x5edd5e(0x166):'latest',_0x5664c5=await fetchNpmDistTags(),_0x44ff4c=_0x5664c5?.[_0x41db0b];if(!_0x44ff4c)return null;return{'version':_0x44ff4c,'source':_0x41db0b};}function shouldInstallTarget(_0x57b7a2,_0x2e60ed){const _0x1c5062=a29_0x29eae7,_0xd9478a=compareSemver(_0x57b7a2,_0x2e60ed['version']);if(_0x2e60ed[_0x1c5062(0x15c)]===_0x1c5062(0x156))return _0xd9478a!==0x0;return _0xd9478a<0x0;}function installCliPackage(_0x4f43a1,_0x2aa921){const _0x13f4eb=a29_0x29eae7,_0x270a16=resolveNpmBin(_0x13f4eb(0x183)),_0x55b063=[_0x13f4eb(0x181),'-g',LOVRABET_NPM_PACKAGE_NAME+'@'+_0x4f43a1];console[_0x13f4eb(0x17b)]('*\x20'+[_0x270a16,..._0x55b063][_0x13f4eb(0x193)]('\x20'));const _0x41e298=spawnSync(_0x270a16,_0x55b063,{'cwd':process[_0x13f4eb(0x158)](),'stdio':_0x2aa921?'pipe':_0x13f4eb(0x19b),'env':process.env,'shell':![]});if(_0x41e298['status']===0x0)return{'ok':!![]};let _0x33d80b=_0x41e298[_0x13f4eb(0x16e)]?.['message']||_0x13f4eb(0x153)+(_0x41e298[_0x13f4eb(0x154)]??_0x13f4eb(0x198));if(_0x2aa921){const _0xcf6490=_0x41e298[_0x13f4eb(0x175)]?_0x41e298[_0x13f4eb(0x175)]['toString']()[_0x13f4eb(0x186)]():'',_0x582d07=_0x41e298[_0x13f4eb(0x165)]?_0x41e298[_0x13f4eb(0x165)][_0x13f4eb(0x18d)]()[_0x13f4eb(0x186)]():'';if(_0xcf6490)_0x33d80b=_0xcf6490;else{if(_0x582d07)_0x33d80b=_0x582d07;}}return{'ok':![],'error':_0x33d80b};}async function installOfficialSkill(_0x9a7736){const _0x3c332f=a29_0x29eae7;console[_0x3c332f(0x17b)](_0x3c332f(0x16d));const _0x466be2=runNpxSkillsAddGlobal(process[_0x3c332f(0x158)](),LOVRABET_SKILL_SOURCE,{'stdio':_0x9a7736?_0x3c332f(0x190):_0x3c332f(0x19b)});if(_0x466be2[_0x3c332f(0x192)]){console['log'](_0x3c332f(0x18b)+LOVRABET_SKIP_NPX_SKILLS_ENV+_0x3c332f(0x16f));return;}if(_0x466be2['ok']){console[_0x3c332f(0x17b)](_0x3c332f(0x159));return;}console['warn'](_0x3c332f(0x184)+(_0x466be2[_0x3c332f(0x16e)]||_0x3c332f(0x198))),console[_0x3c332f(0x17b)]('\x20\x20Run\x20manually:\x20npx\x20skills\x20add\x20'+LOVRABET_SKILL_SOURCE+_0x3c332f(0x155));}async function execute(_0x37114b){const _0x1bf263=a29_0x29eae7;await validateUpdateFlags(_0x37114b);const _0x1bab05=getCliVersion();console[_0x1bf263(0x17b)](_0x1bf263(0x15f)+_0x1bab05),console[_0x1bf263(0x17b)](_0x1bf263(0x170));const _0x24ada2=await resolveTargetVersion(_0x37114b);if(!_0x24ada2){const _0x1187bf=_0x37114b[_0x1bf263(0x180)](_0x1bf263(0x166))?_0x1bf263(0x166):'latest',_0x35b7d8=_0x1bf263(0x18e)+_0x1187bf+'\x20version\x20from\x20npm.';return console[_0x1bf263(0x16b)](_0x35b7d8),console[_0x1bf263(0x17b)](_0x1bf263(0x18c)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x1187bf),{'ok':![]};}if(!shouldInstallTarget(_0x1bab05,_0x24ada2)){const _0x158a00=_0x24ada2[_0x1bf263(0x15c)]===_0x1bf263(0x156)?_0x1bf263(0x152)+_0x24ada2[_0x1bf263(0x156)]+').':_0x1bf263(0x15e)+_0x24ada2[_0x1bf263(0x156)]+').';return console[_0x1bf263(0x17b)](_0x158a00),shouldSkipOfficialSkill(_0x37114b)?console['log']('Skipping\x20official\x20skill\x20package\x20(--no-skills).'):await installOfficialSkill(_0x37114b[_0x1bf263(0x18f)]),{'ok':!![]};}console[_0x1bf263(0x17b)]('Updating\x20'+LOVRABET_NPM_PACKAGE_NAME+':\x20'+_0x1bab05+_0x1bf263(0x168)+_0x24ada2['version']);const _0x282058=installCliPackage(_0x24ada2[_0x1bf263(0x156)],_0x37114b[_0x1bf263(0x18f)]);if(!_0x282058['ok']){const _0x1e1784=_0x1bf263(0x172)+(_0x282058[_0x1bf263(0x16e)]||_0x1bf263(0x198));return console[_0x1bf263(0x16e)](_0x1e1784),console[_0x1bf263(0x17b)](_0x1bf263(0x167)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x24ada2['version']),{'ok':![]};}return console[_0x1bf263(0x17b)](_0x1bf263(0x17e)+_0x24ada2['version']+'.'),console[_0x1bf263(0x17b)](_0x1bf263(0x15b)),shouldSkipOfficialSkill(_0x37114b)?console[_0x1bf263(0x17b)]('Skipping\x20official\x20skill\x20package\x20(--no-skills).'):await installOfficialSkill(_0x37114b['nonInteractive']),{'ok':!![]};}export const updateDefinition={'service':'update','command':'run','description':'Update\x20'+CLI_BIN_NAME+a29_0x29eae7(0x173),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
package/lib/config/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a30_0x1ea0b4=a30_0x1e0a;(function(_0x579cdb,_0x1b19be){const _0x18680b=a30_0x1e0a,_0x2df52c=_0x579cdb();while(!![]){try{const _0x81e03e=parseInt(_0x18680b(0x1af))/0x1+parseInt(_0x18680b(0x1a0))/0x2*(parseInt(_0x18680b(0x1a2))/0x3)+parseInt(_0x18680b(0x1b3))/0x4+-parseInt(_0x18680b(0x1ae))/0x5*(parseInt(_0x18680b(0x1b2))/0x6)+-parseInt(_0x18680b(0x1b8))/0x7+-parseInt(_0x18680b(0x1ba))/0x8+parseInt(_0x18680b(0x1b5))/0x9;if(_0x81e03e===_0x1b19be)break;else _0x2df52c['push'](_0x2df52c['shift']());}catch(_0x513514){_0x2df52c['push'](_0x2df52c['shift']());}}}(a30_0x48af,0x2a3a2));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{OUTPUT_FORMAT_VALUES}from'../constant/output.js';export const CONFIG_FIELD_SCHEMAS={'env':{'description':a30_0x1ea0b4(0x1b7),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':RUNTIME_ENV_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES['env'],'importable':!![]},'format':{'description':'Default\x20output\x20format','topLevel':!![],'cliSettableTopLevel':!![],'enumValues':OUTPUT_FORMAT_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES[a30_0x1ea0b4(0x1a4)],'importable':!![]},'pageSize':{'description':'Default\x20page\x20size','topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'apiDomain':{'description':'Override\x20API\x20domain','topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'userDomain':{'description':a30_0x1ea0b4(0x1a9),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'runtimeDomain':{'description':a30_0x1ea0b4(0x1b4),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'accessKey':{'description':a30_0x1ea0b4(0x1a3),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'riskLevel':{'description':a30_0x1ea0b4(0x1ab),'topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a30_0x1ea0b4(0x1a7)],'importable':!![]},'locale':{'description':a30_0x1ea0b4(0x1ac),'topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a30_0x1ea0b4(0x1b0)],'importable':!![],'legacyCompatOnly':!![]}};function a30_0x48af(){const _0x5c139d=['Access\x20key\x20(client-ak\x20auth)','format','filter','importable','riskLevel','has','Override\x20user\x20domain','fromEntries','Risk\x20level','Locale','enumValues','314105nibBXS','117623JLcBHG','locale',';\x20local\x20alias:\x20apps.<alias>.appcode','18yREqOB','651736oBVSAh','Override\x20runtime\x20domain','284400POBQhH','cliSettableTopLevel','Target\x20environment','233184pDMfoI','entries','851848LMsRfx','defaultValue','map','2XjqLBE','Config\x20key.\x20Top-level:\x20','567183YwEhDL'];a30_0x48af=function(){return _0x5c139d;};return a30_0x48af();}export const TOP_LEVEL_CONFIG_KEYS=new Set(Object[a30_0x1ea0b4(0x1b9)](CONFIG_FIELD_SCHEMAS)['filter'](([,_0x37d7bd])=>_0x37d7bd[a30_0x1ea0b4(0x1b6)])[a30_0x1ea0b4(0x19f)](([_0x2d3d7c])=>_0x2d3d7c));export const CONFIG_ENUM_VALUES=Object[a30_0x1ea0b4(0x1aa)](Object[a30_0x1ea0b4(0x1b9)](CONFIG_FIELD_SCHEMAS)[a30_0x1ea0b4(0x1a5)](([,_0x3dc6c3])=>_0x3dc6c3[a30_0x1ea0b4(0x1ad)])[a30_0x1ea0b4(0x19f)](([_0x147c47,_0x4a3d69])=>[_0x147c47,[..._0x4a3d69[a30_0x1ea0b4(0x1ad)]||[]]]));export const IMPORTABLE_RUNTIME_CONFIG_KEYS=Object[a30_0x1ea0b4(0x1b9)](CONFIG_FIELD_SCHEMAS)[a30_0x1ea0b4(0x1a5)](([,_0x2efed1])=>_0x2efed1[a30_0x1ea0b4(0x1a6)])[a30_0x1ea0b4(0x19f)](([_0x45979a])=>_0x45979a);export function getConfigFieldSchema(_0x34af44){return CONFIG_FIELD_SCHEMAS[_0x34af44];}export function getConfigEnumValues(_0x2ed55e){const _0x18b0ef=a30_0x1ea0b4;return getConfigFieldSchema(_0x2ed55e)?.[_0x18b0ef(0x1ad)];}export function getConfigDefaultValue(_0x544fd7){const _0x4c2267=a30_0x1ea0b4;return getConfigFieldSchema(_0x544fd7)?.[_0x4c2267(0x1bb)];}export function isTopLevelConfigKey(_0x4af83e){const _0x46b509=a30_0x1ea0b4;return TOP_LEVEL_CONFIG_KEYS[_0x46b509(0x1a8)](_0x4af83e);}export function isLegacyCompatConfigKey(_0x1093b1){return getConfigFieldSchema(_0x1093b1)?.['legacyCompatOnly']===!![];}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function formatConfigKeyList(_0x3f495c){return[..._0x3f495c]['join'](',\x20');}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}function a30_0x1e0a(_0x4bc42d,_0x410a71){_0x4bc42d=_0x4bc42d-0x19f;const _0x48afd1=a30_0x48af();let _0x1e0ab6=_0x48afd1[_0x4bc42d];return _0x1e0ab6;}export function getConfigCommandKeyDescription(){const _0x5ca381=a30_0x1ea0b4;return _0x5ca381(0x1a1)+getTopLevelConfigKeySummary()+_0x5ca381(0x1b1);}export function buildAppProfileListFields(_0x48ddde){return{'env':_0x48ddde,'hasAccessKey':![],'format':null,'pageSize':null,'riskLevel':null,'locale':null};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a31_0x557a(_0x570831,_0x3a0a31){_0x570831=_0x570831-0x17b;const _0x5616a2=a31_0x5616();let _0x557a08=_0x5616a2[_0x570831];return _0x557a08;}(function(_0x131835,_0x296777){const _0x5d4588=a31_0x557a,_0x23b994=_0x131835();while(!![]){try{const _0x55a8d2=-parseInt(_0x5d4588(0x183))/0x1+-parseInt(_0x5d4588(0x17b))/0x2+-parseInt(_0x5d4588(0x17e))/0x3+parseInt(_0x5d4588(0x17f))/0x4+-parseInt(_0x5d4588(0x182))/0x5+parseInt(_0x5d4588(0x180))/0x6+-parseInt(_0x5d4588(0x17c))/0x7*(-parseInt(_0x5d4588(0x17d))/0x8);if(_0x55a8d2===_0x296777)break;else _0x23b994['push'](_0x23b994['shift']());}catch(_0x88030c){_0x23b994['push'](_0x23b994['shift']());}}}(a31_0x5616,0x44a98));export const AUTH_MODE={'ClientAk':'client-ak'};function a31_0x5616(){const _0x4a4ec3=['119511QlikkT','839786goGEMv','4149985bSXeKG','16JdFHfp','204540jAUxhj','512784vgoFRX','669726zYYkhe','ClientAk','2683515TIEClr'];a31_0x5616=function(){return _0x4a4ec3;};return a31_0x5616();}export function isAuthMode(_0x568eab){const _0x5d28e6=a31_0x557a;return _0x568eab===AUTH_MODE[_0x5d28e6(0x181)];}
|
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a32_0x3750b8=a32_0x2cef;(function(_0x17b4f5,_0x40cb91){const _0x235a7f=a32_0x2cef,_0x4bd74b=_0x17b4f5();while(!![]){try{const _0x338295=parseInt(_0x235a7f(0x92))/0x1*(-parseInt(_0x235a7f(0xb1))/0x2)+parseInt(_0x235a7f(0x8d))/0x3+-parseInt(_0x235a7f(0xa8))/0x4+parseInt(_0x235a7f(0x90))/0x5+parseInt(_0x235a7f(0xaa))/0x6*(parseInt(_0x235a7f(0x99))/0x7)+parseInt(_0x235a7f(0xb0))/0x8+-parseInt(_0x235a7f(0x8a))/0x9*(parseInt(_0x235a7f(0xab))/0xa);if(_0x338295===_0x40cb91)break;else _0x4bd74b['push'](_0x4bd74b['shift']());}catch(_0x1e5ef2){_0x4bd74b['push'](_0x4bd74b['shift']());}}}(a32_0x65af,0xddef1));import{PRODUCT_CONFIG}from'../constant/product.js';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';export const CLI_BIN_NAME=PRODUCT_CONFIG[a32_0x3750b8(0xb4)];export const CLI_DISPLAY_NAME=PRODUCT_CONFIG[a32_0x3750b8(0x9d)];function a32_0x65af(){const _0x17c032=['string','env','format','dry-run','<code>','production\x20|\x20development\x20|\x20daily','map','sqlcode','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20implies\x20--format\x20json\x20when\x20current\x20format\x20is\x20pretty)','1456484EcgWBs','non-interactive','234174DdBykE','20GoWBMK','params','Force\x20non-interactive\x20mode\x20(CI)','Record\x20ID','appcode','314544xYhNLq','9988GOjcPl','Show\x20help','app','cliBinName','type','json\x20|\x20pretty\x20|\x20compress','Name\x20filter','name','1070559CuEoGp','Verbose\x20output','fromEntries','5132655vfwHsy','<expr>','SQL\x20query\x20code','1064380fXTJMT','global','239kljDti','meowKey','boolean','Environment','Alias\x20for\x20--non-interactive','Preview\x20operation\x20without\x20executing','nonInteractive','133GqvuqH','Select\x20app\x20profile\x20by\x20name','verbose','clear','cliDisplayName','yes'];a32_0x65af=function(){return _0x17c032;};return a32_0x65af();}function a32_0x2cef(_0xde5399,_0x480070){_0xde5399=_0xde5399-0x88;const _0x65af94=a32_0x65af();let _0x2cef8f=_0x65af94[_0xde5399];return _0x2cef8f;}export const NPM_PACKAGE_NAME=LOVRABET_NPM_PACKAGE_NAME;export const GLOBAL_FLAGS=[{'name':a32_0x3750b8(0xaf),'meowKey':a32_0x3750b8(0xaf),'type':'string','description':'Override\x20appcode','hint':a32_0x3750b8(0xa3)},{'name':a32_0x3750b8(0xb3),'meowKey':a32_0x3750b8(0xb3),'type':a32_0x3750b8(0x9f),'description':a32_0x3750b8(0x9a),'hint':'<name>'},{'name':'env','meowKey':a32_0x3750b8(0xa0),'type':a32_0x3750b8(0x9f),'description':a32_0x3750b8(0x95),'hint':a32_0x3750b8(0xa4)},{'name':a32_0x3750b8(0xa1),'meowKey':a32_0x3750b8(0xa1),'type':'string','description':'Output\x20format','hint':a32_0x3750b8(0xb6)},{'name':'jq','meowKey':'jq','type':a32_0x3750b8(0x9f),'description':a32_0x3750b8(0xa7),'hint':a32_0x3750b8(0x8e)},{'name':a32_0x3750b8(0xa2),'meowKey':'dryRun','type':a32_0x3750b8(0x94),'description':a32_0x3750b8(0x97)},{'name':a32_0x3750b8(0x9e),'meowKey':a32_0x3750b8(0x9e),'type':a32_0x3750b8(0x94),'description':'Skip\x20confirmation\x20for\x20high-risk\x20writes'},{'name':'non-interactive','meowKey':a32_0x3750b8(0x98),'type':a32_0x3750b8(0x94),'description':a32_0x3750b8(0xad)},{'name':a32_0x3750b8(0x91),'meowKey':a32_0x3750b8(0x91),'type':a32_0x3750b8(0x94),'description':'Use\x20global\x20config\x20scope'},{'name':'ci','meowKey':'ci','type':a32_0x3750b8(0x94),'description':a32_0x3750b8(0x96),'hidden':!![]},{'name':'help','meowKey':'help','type':a32_0x3750b8(0x94),'description':a32_0x3750b8(0xb2)},{'name':'id','meowKey':'id','type':a32_0x3750b8(0x9f),'description':a32_0x3750b8(0xae),'hidden':!![]},{'name':a32_0x3750b8(0x89),'meowKey':a32_0x3750b8(0x89),'type':a32_0x3750b8(0x9f),'description':a32_0x3750b8(0x88),'hidden':!![]},{'name':a32_0x3750b8(0xa6),'meowKey':a32_0x3750b8(0xa6),'type':a32_0x3750b8(0x9f),'description':a32_0x3750b8(0x8f),'hidden':!![]},{'name':a32_0x3750b8(0xac),'meowKey':'params','type':'string','description':'JSON\x20params\x20for\x20execute\x20commands','hidden':!![]},{'name':'verbose','meowKey':a32_0x3750b8(0x9b),'type':a32_0x3750b8(0x94),'description':a32_0x3750b8(0x8b),'hidden':!![]},{'name':a32_0x3750b8(0x9c),'meowKey':a32_0x3750b8(0x9c),'type':a32_0x3750b8(0x94),'description':'Clear\x20output','hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set(['appcode',a32_0x3750b8(0xb3),a32_0x3750b8(0xa0),a32_0x3750b8(0xa1),'jq','dry-run',a32_0x3750b8(0x9e),a32_0x3750b8(0xa9),'ci']);export function buildMeowFlags(){const _0x1c800e=a32_0x3750b8;return Object[_0x1c800e(0x8c)](GLOBAL_FLAGS[_0x1c800e(0xa5)](_0xcf39f5=>[_0xcf39f5[_0x1c800e(0x93)],{'type':_0xcf39f5[_0x1c800e(0xb5)]}]));}
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a33_0x4a24ad=a33_0x156f;function a33_0x2742(){const _0x554efa=['1618635Whpipk','5169663dKALyZ','production','475583xPsnMF','18LEPyGM','write','2hTtRFv','8763075CCRKQj','main','16vfesxg','34530300HEwddf','4156775ccQQWB','5720sbiTaj','compress'];a33_0x2742=function(){return _0x554efa;};return a33_0x2742();}function a33_0x156f(_0x5b7597,_0x2e9c05){_0x5b7597=_0x5b7597-0x71;const _0x2742c8=a33_0x2742();let _0x156f2f=_0x2742c8[_0x5b7597];return _0x156f2f;}(function(_0x4bfec6,_0x51ae0e){const _0x123507=a33_0x156f,_0xce4567=_0x4bfec6();while(!![]){try{const _0x14e788=-parseInt(_0x123507(0x77))/0x1*(parseInt(_0x123507(0x7a))/0x2)+parseInt(_0x123507(0x75))/0x3+parseInt(_0x123507(0x72))/0x4+parseInt(_0x123507(0x74))/0x5*(parseInt(_0x123507(0x78))/0x6)+-parseInt(_0x123507(0x71))/0x7*(-parseInt(_0x123507(0x7d))/0x8)+parseInt(_0x123507(0x7b))/0x9+-parseInt(_0x123507(0x7e))/0xa;if(_0x14e788===_0x51ae0e)break;else _0xce4567['push'](_0xce4567['shift']());}catch(_0x531034){_0xce4567['push'](_0xce4567['shift']());}}}(a33_0x2742,0xe2b20));export const DEFAULT_APP_PROFILE_NAME=a33_0x4a24ad(0x7c);export const DEFAULT_CONFIG_VALUES={'env':a33_0x4a24ad(0x76),'format':a33_0x4a24ad(0x73),'locale':'en-US','riskLevel':a33_0x4a24ad(0x79)};export const DEFAULT_COMMAND_OUTPUT_FORMAT=a33_0x4a24ad(0x73);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a34_0xd126b2=a34_0x1f5c;(function(_0x1be09d,_0x19e6a0){const _0x5210fb=a34_0x1f5c,_0x23b494=_0x1be09d();while(!![]){try{const _0x1d73ea=-parseInt(_0x5210fb(0x6b))/0x1*(-parseInt(_0x5210fb(0x76))/0x2)+parseInt(_0x5210fb(0x71))/0x3*(-parseInt(_0x5210fb(0x73))/0x4)+parseInt(_0x5210fb(0x77))/0x5+-parseInt(_0x5210fb(0x6f))/0x6*(parseInt(_0x5210fb(0x78))/0x7)+-parseInt(_0x5210fb(0x6a))/0x8*(parseInt(_0x5210fb(0x74))/0x9)+-parseInt(_0x5210fb(0x72))/0xa+parseInt(_0x5210fb(0x75))/0xb*(parseInt(_0x5210fb(0x6d))/0xc);if(_0x1d73ea===_0x19e6a0)break;else _0x23b494['push'](_0x23b494['shift']());}catch(_0x3b52b1){_0x23b494['push'](_0x23b494['shift']());}}}(a34_0x1774,0xe0914));function a34_0x1774(){const _0x4e5fad=['skillSource','6qjEhvw','239980NkRYzt','1765596lSnKlx','1306863VEVXVz','7513tJiAOG','58qbqrgc','3420570NyfdTX','7lxyrcg','8ZaLJQm','51185pLkpbG','npmRegistryBaseUrl','9708CYNAGn','npmPackageName','4495170DcNSOe'];a34_0x1774=function(){return _0x4e5fad;};return a34_0x1774();}function a34_0x1f5c(_0x142673,_0x487f23){_0x142673=_0x142673-0x6a;const _0x177454=a34_0x1774();let _0x1f5c5e=_0x177454[_0x142673];return _0x1f5c5e;}import{PRODUCT_CONFIG}from'../constant/product.js';export const LOVRABET_NPM_PACKAGE_NAME=PRODUCT_CONFIG[a34_0xd126b2(0x6e)];export const LOVRABET_SKILL_SOURCE=PRODUCT_CONFIG[a34_0xd126b2(0x70)];export const NPM_REGISTRY_BASE_URL=PRODUCT_CONFIG[a34_0xd126b2(0x6c)];
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a35_0x3439a6=a35_0x21a4;function a35_0xaa03(){const _0x578033=['runtime','3424083URVSzP','userDomain','332oSkUen','domains','208VXpnOW','31272iAfvGy','29326340dehmtn','apiDomain','nonProduction','user','api','production','637BNyHfk','7076yqjQlQ','8983917pegGZT','runtimeDomain','43385aIivFR','5547042ofybTe'];a35_0xaa03=function(){return _0x578033;};return a35_0xaa03();}(function(_0x462e36,_0x5e5e9e){const _0x35832a=a35_0x21a4,_0x2765e2=_0x462e36();while(!![]){try{const _0x373b95=parseInt(_0x35832a(0x120))/0x1*(-parseInt(_0x35832a(0x129))/0x2)+-parseInt(_0x35832a(0x12f))/0x3+parseInt(_0x35832a(0x131))/0x4*(-parseInt(_0x35832a(0x12c))/0x5)+parseInt(_0x35832a(0x12d))/0x6+-parseInt(_0x35832a(0x128))/0x7*(-parseInt(_0x35832a(0x121))/0x8)+-parseInt(_0x35832a(0x12a))/0x9+parseInt(_0x35832a(0x122))/0xa;if(_0x373b95===_0x5e5e9e)break;else _0x2765e2['push'](_0x2765e2['shift']());}catch(_0x5791dc){_0x2765e2['push'](_0x2765e2['shift']());}}}(a35_0xaa03,0x96ae7));import{getEnv,isProduction}from'../constant/env.js';function a35_0x21a4(_0x403005,_0x59dd7d){_0x403005=_0x403005-0x11f;const _0xaa039=a35_0xaa03();let _0x21a461=_0xaa039[_0x403005];return _0x21a461;}import{PRODUCT_CONFIG}from'../constant/product.js';let customApiDomain,customUserDomain,customRuntimeDomain;export function initDomains(_0x78be70){const _0x2850cd=a35_0x21a4;customApiDomain=_0x78be70?.[_0x2850cd(0x123)],customUserDomain=_0x78be70?.[_0x2850cd(0x130)],customRuntimeDomain=_0x78be70?.[_0x2850cd(0x12b)];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a35_0x3439a6(0x11f)][a35_0x3439a6(0x127)][a35_0x3439a6(0x125)]:PRODUCT_CONFIG[a35_0x3439a6(0x11f)]['nonProduction']['user']);export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a35_0x3439a6(0x11f)][a35_0x3439a6(0x127)][a35_0x3439a6(0x126)]:PRODUCT_CONFIG[a35_0x3439a6(0x11f)][a35_0x3439a6(0x124)][a35_0x3439a6(0x126)]);export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a35_0x3439a6(0x11f)][a35_0x3439a6(0x127)][a35_0x3439a6(0x12e)]:PRODUCT_CONFIG[a35_0x3439a6(0x11f)][a35_0x3439a6(0x124)][a35_0x3439a6(0x12e)]);
|