@lovrabet/lovrabet-cli 2.0.6 → 2.0.8
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
|
-
|
|
1
|
+
const a17_0x153c8a=a17_0x2f31;(function(_0x177dba,_0x574959){const _0xb2a96=a17_0x2f31,_0x408f9b=_0x177dba();while(!![]){try{const _0x35baa0=parseInt(_0xb2a96(0x187))/0x1+-parseInt(_0xb2a96(0x18b))/0x2+-parseInt(_0xb2a96(0x184))/0x3*(parseInt(_0xb2a96(0x1b6))/0x4)+parseInt(_0xb2a96(0x1bc))/0x5+-parseInt(_0xb2a96(0x18e))/0x6+-parseInt(_0xb2a96(0x18c))/0x7*(-parseInt(_0xb2a96(0x1b5))/0x8)+parseInt(_0xb2a96(0x1ab))/0x9;if(_0x35baa0===_0x574959)break;else _0x408f9b['push'](_0x408f9b['shift']());}catch(_0x5bc7c9){_0x408f9b['push'](_0x408f9b['shift']());}}}(a17_0xa857,0xbe364));function a17_0x2f31(_0x1c4d8f,_0x3d8bd2){_0x1c4d8f=_0x1c4d8f-0x174;const _0xa8577f=a17_0xa857();let _0x2f31d9=_0xa8577f[_0x1c4d8f];return _0x2f31d9;}import{getDatasetDetail}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';function normalizeField(_0x2e44ce){const _0x4681c5=a17_0x2f31;if(_0x2e44ce['deleted'])return null;const _0x366304=Boolean(_0x2e44ce[_0x4681c5(0x182)]!==undefined||_0x2e44ce[_0x4681c5(0x1a2)]!==undefined);let _0x3fd1ae={};if(!_0x366304&&typeof _0x2e44ce[_0x4681c5(0x1a0)]===_0x4681c5(0x19a))try{_0x3fd1ae=JSON[_0x4681c5(0x191)](_0x2e44ce[_0x4681c5(0x1a0)]);}catch{}const _0x52d4b6=_0x366304?_0x2e44ce[_0x4681c5(0x180)]:_0x2e44ce[_0x4681c5(0x1a6)],_0x19c3af=_0x366304?_0x2e44ce['displayName']:_0x2e44ce[_0x4681c5(0x180)],_0x35f125=_0x366304?_0x2e44ce[_0x4681c5(0x1a2)]:_0x2e44ce[_0x4681c5(0x175)]||_0x2e44ce['dataType'],_0x2919b7=_0x366304?_0x2e44ce['pkField']===!![]:_0x3fd1ae[_0x4681c5(0x1ac)]===!![],_0x144edf=_0x366304?_0x2e44ce['required']===!![]:_0x3fd1ae[_0x4681c5(0x194)]===!![],_0x14927c=_0x366304?_0x2e44ce[_0x4681c5(0x186)]??null:_0x3fd1ae[_0x4681c5(0x186)]??null,_0x458ca7={'name':_0x52d4b6,'displayName':_0x19c3af||_0x52d4b6,'type':_0x35f125,'dbType':_0x2e44ce[_0x4681c5(0x1b4)],'pk':_0x2919b7,'required':_0x144edf,'description':_0x2e44ce[_0x4681c5(0x1a7)]||undefined};return Array['isArray'](_0x14927c)&&_0x14927c[_0x4681c5(0x17b)]>0x0&&(_0x458ca7[_0x4681c5(0x186)]=_0x14927c),_0x458ca7;}function parseJsonMaybe(_0x4066cb){const _0x100b42=a17_0x2f31;if(typeof _0x4066cb!==_0x100b42(0x19a))return _0x4066cb;try{return JSON[_0x100b42(0x191)](_0x4066cb);}catch{return _0x4066cb;}}function normalizeOperationEntry(_0x50e9ca,_0xb7ecb5){const _0x4dd6cf=a17_0x2f31;if(!_0xb7ecb5||typeof _0xb7ecb5!==_0x4dd6cf(0x199))return null;if(!_0xb7ecb5['method']||!_0xb7ecb5[_0x4dd6cf(0x17f)])return null;const _0x309366={'name':_0x50e9ca,'method':_0xb7ecb5[_0x4dd6cf(0x1aa)],'path':_0xb7ecb5[_0x4dd6cf(0x17f)]};if(_0xb7ecb5[_0x4dd6cf(0x17c)])_0x309366['host']=_0xb7ecb5['host'];if(_0xb7ecb5['requestBody']!=null)_0x309366[_0x4dd6cf(0x176)]=parseJsonMaybe(_0xb7ecb5[_0x4dd6cf(0x176)]);if(_0xb7ecb5[_0x4dd6cf(0x177)]!=null)_0x309366[_0x4dd6cf(0x177)]=parseJsonMaybe(_0xb7ecb5[_0x4dd6cf(0x177)]);if(_0xb7ecb5[_0x4dd6cf(0x1ba)]!=null)_0x309366[_0x4dd6cf(0x1ba)]=_0xb7ecb5[_0x4dd6cf(0x1ba)];if(_0xb7ecb5[_0x4dd6cf(0x1b9)]!=null)_0x309366[_0x4dd6cf(0x1b9)]=_0xb7ecb5['afterScriptId'];if(Array[_0x4dd6cf(0x17e)](_0xb7ecb5[_0x4dd6cf(0x198)]))_0x309366[_0x4dd6cf(0x198)]=_0xb7ecb5[_0x4dd6cf(0x198)];if(Array['isArray'](_0xb7ecb5[_0x4dd6cf(0x1b7)]))_0x309366[_0x4dd6cf(0x1b7)]=_0xb7ecb5['responseFields'];return _0x309366;}function a17_0xa857(){const _0x2a08fc=['dataset','dbId','toDatasetCode','modifierNameField','dbType','8tjfaao','6019516domYAk','responseFields','allFields','afterScriptId','beforeScriptId','properties','7684840HYdNWW','sourceType','toField','type','requestBody','responseBody','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','toTableName','str','length','host','createTimeField','isArray','path','name','map','displayName','dbName','3XPHVKg','logicField','options','37434OtQHTF','read','creatorNameField','entries','564842BZLuSl','5020113CgFHay','modelId','7353498DBPKEM','operations','split','parse','formatRules','toFieldLabel','required','labelField','modifierIdField','dbtableConfig','requestFields','object','string','validateRules','title','allFieldNames','toDatasetName','indexes','extend','detail','doType','filter','fromField','creatorIdField','code','description','fields','tableName','method','13503870GKMeDU','pkField','relations','deleted','modelCode'];a17_0xa857=function(){return _0x2a08fc;};return a17_0xa857();}function summarizeDbtable(_0x5f2e9b){const _0x297ceb=a17_0x2f31,_0x1f4328={},_0x2fe05b=[_0x297ceb(0x1b1),'dbName','tableName','datasetKey','pkField',_0x297ceb(0x1b8),_0x297ceb(0x185),_0x297ceb(0x17d),'updateTimeField',_0x297ceb(0x1a5),_0x297ceb(0x189),_0x297ceb(0x196),_0x297ceb(0x1b3),_0x297ceb(0x195),'dblinkInfoDTO'];for(const _0x23f1b0 of _0x2fe05b){if(_0x5f2e9b[_0x23f1b0]!==undefined)_0x1f4328[_0x23f1b0]=_0x5f2e9b[_0x23f1b0];}return typeof _0x1f4328[_0x297ceb(0x1b8)]==='string'&&_0x1f4328[_0x297ceb(0x1b8)][_0x297ceb(0x17b)]>0x0&&(_0x1f4328[_0x297ceb(0x19d)]=_0x1f4328['allFields'][_0x297ceb(0x190)](',')[_0x297ceb(0x181)](_0xaaea1d=>_0xaaea1d['trim']())[_0x297ceb(0x1a3)](Boolean)),_0x1f4328;}function normalizeRelatedPages(_0x301635){const _0x293391=a17_0x2f31;if(!Array[_0x293391(0x17e)](_0x301635))return[];return _0x301635[_0x293391(0x1a3)](_0x5cbdfa=>_0x5cbdfa&&typeof _0x5cbdfa===_0x293391(0x199))[_0x293391(0x181)](_0x3ba39e=>({'id':_0x3ba39e['id'],'type':_0x3ba39e[_0x293391(0x175)],'code':_0x3ba39e[_0x293391(0x1a6)],'title':_0x3ba39e[_0x293391(0x19c)],'deleted':_0x3ba39e[_0x293391(0x1ae)]===!![]}));}export const datasetDetail={'service':a17_0x153c8a(0x1b0),'command':a17_0x153c8a(0x1a1),'description':a17_0x153c8a(0x178),'risk':a17_0x153c8a(0x188),'flags':[CODE_FLAG],async 'execute'(_0x1f6170){const _0x46478d=a17_0x153c8a,_0x29d7e2=await getDatasetDetail(_0x1f6170[_0x46478d(0x17a)](_0x46478d(0x1a6))),_0x13ec28=Array['isArray'](_0x29d7e2[_0x46478d(0x1a8)])?_0x29d7e2[_0x46478d(0x1a8)]:Array[_0x46478d(0x17e)](_0x29d7e2[_0x46478d(0x1bb)])?_0x29d7e2['properties']:[],_0x5a0f96=_0x13ec28['map'](_0x3770fd=>normalizeField(_0x3770fd))[_0x46478d(0x1a3)](_0x5207cf=>_0x5207cf!==null),_0x65db2b=_0x29d7e2[_0x46478d(0x18f)]??{},_0x4051af=[];for(const [_0x133417,_0x4f3f1f]of Object[_0x46478d(0x18a)](_0x65db2b)){const _0x105449=normalizeOperationEntry(_0x133417,_0x4f3f1f);if(_0x105449)_0x4051af['push'](_0x105449);}const _0x12fcda=_0x29d7e2[_0x46478d(0x197)]??{},_0x27b118=_0x29d7e2[_0x46478d(0x1b0)]??{},_0x164d19=_0x12fcda[_0x46478d(0x1b1)]!=null?{'id':_0x12fcda[_0x46478d(0x1b1)],'name':_0x12fcda[_0x46478d(0x183)]??null}:undefined;let _0x304498;return typeof _0x29d7e2[_0x46478d(0x1a0)]===_0x46478d(0x19a)&&(_0x304498=parseJsonMaybe(_0x29d7e2[_0x46478d(0x1a0)])),{'ok':!![],'data':{'id':_0x29d7e2[_0x46478d(0x18d)]??_0x29d7e2['id'],'name':_0x29d7e2[_0x46478d(0x180)],'code':_0x29d7e2[_0x46478d(0x1af)]||_0x29d7e2[_0x46478d(0x1a6)],'doVersion':_0x29d7e2['doVersion'],'description':_0x29d7e2[_0x46478d(0x1a7)]||_0x27b118['tableComment']||undefined,'source':_0x29d7e2['source']||_0x27b118[_0x46478d(0x1bd)],'table':_0x12fcda[_0x46478d(0x1a9)]||_0x27b118['tableName'],'datasetKey':_0x12fcda['datasetKey'],'pk':_0x12fcda[_0x46478d(0x1ac)],'db':_0x164d19,'dbtable':summarizeDbtable(_0x12fcda),'fields':_0x5a0f96,'operations':_0x4051af,'indexes':Array[_0x46478d(0x17e)](_0x27b118['indexes'])?_0x27b118[_0x46478d(0x19f)]:[],'relations':Array['isArray'](_0x29d7e2[_0x46478d(0x1ad)])?_0x29d7e2[_0x46478d(0x1ad)][_0x46478d(0x181)](_0x90bb35=>({'fromField':_0x90bb35[_0x46478d(0x1a4)],'toDataset':_0x90bb35[_0x46478d(0x19e)],'toCode':_0x90bb35[_0x46478d(0x1b2)],'toTable':_0x90bb35[_0x46478d(0x179)],'toField':_0x90bb35[_0x46478d(0x174)],'labelField':_0x90bb35[_0x46478d(0x193)]||undefined})):[],'relatedPages':normalizeRelatedPages(_0x29d7e2['relatedPageInfoList']),...Array[_0x46478d(0x17e)](_0x29d7e2['columnCodeListWithDeleted'])?{'columnCodeListWithDeleted':_0x29d7e2['columnCodeListWithDeleted']}:{},'formatRules':Array['isArray'](_0x29d7e2[_0x46478d(0x192)])?_0x29d7e2['formatRules']:[],'validateRules':Array['isArray'](_0x29d7e2[_0x46478d(0x19b)])?_0x29d7e2[_0x46478d(0x19b)]:[],..._0x304498!==undefined?{'extend':_0x304498}:{},'stats':{'fieldCount':_0x5a0f96[_0x46478d(0x17b)],'operationCount':_0x4051af[_0x46478d(0x17b)]}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5db4cb,_0x25f76e){const _0x1416da=a18_0x33e2,_0x18fe0d=_0x5db4cb();while(!![]){try{const _0xf76ada=-parseInt(_0x1416da(0x10e))/0x1*(-parseInt(_0x1416da(0x10f))/0x2)+parseInt(_0x1416da(0x10d))/0x3*(-parseInt(_0x1416da(0x110))/0x4)+parseInt(_0x1416da(0x112))/0x5+-parseInt(_0x1416da(0x113))/0x6+parseInt(_0x1416da(0x10c))/0x7*(-parseInt(_0x1416da(0x111))/0x8)+-parseInt(_0x1416da(0x10a))/0x9+parseInt(_0x1416da(0x10b))/0xa;if(_0xf76ada===_0x25f76e)break;else _0x18fe0d['push'](_0x18fe0d['shift']());}catch(_0x4343cf){_0x18fe0d['push'](_0x18fe0d['shift']());}}}(a18_0x1f0b,0xe04b6));function a18_0x1f0b(){const _0x5c637b=['41911feumlI','2JXCzzp','4SUwymC','3944OPoyiT','3103765TeyxWK','9774804FTqzfJ','2173932WyEmmp','32217430MiqGgp','1974FWZrXn','2867967LnBedn'];a18_0x1f0b=function(){return _0x5c637b;};return a18_0x1f0b();}import{datasetList}from'../../commands/dataset/list.js';function a18_0x33e2(_0xa4a8dd,_0x125218){_0xa4a8dd=_0xa4a8dd-0x10a;const _0x1f0b65=a18_0x1f0b();let _0x33e2c2=_0x1f0b65[_0xa4a8dd];return _0x33e2c2;}import{datasetDetail}from'../../commands/dataset/detail.js';export const datasetDefinitions=[datasetList,datasetDetail];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a19_0x182c0f=a19_0x4ea4;function a19_0x5390(){const _0x11361f=['Filter\x20by\x20dataset\x20code\x20(server-side\x20exact\x20match)','52snsitx','description','string','dataset','dbtableConfig','source','6626AwkzCn','6243wZdxqL','810261PfnqfN','trim','length','160rjcvpu','allFields','pkField','map','6492250xyZeIA','12860kAWvaf','name','split','Filter\x20by\x20dataset\x20name\x20(server-side\x20fuzzy\x20match)','3468bYLEBl','476980HLjNPw','appCode','List\x20datasets\x20in\x20the\x20app\x20(supports\x20server-side\x20name/code\x20filtering)','str','74zDaecz','1869670CyiiOB','list','code','tableName'];a19_0x5390=function(){return _0x11361f;};return a19_0x5390();}function a19_0x4ea4(_0x140eeb,_0x245bc1){_0x140eeb=_0x140eeb-0x12c;const _0x53909f=a19_0x5390();let _0x4ea44d=_0x53909f[_0x140eeb];return _0x4ea44d;}(function(_0x51317a,_0xe60f2f){const _0x4b4a47=a19_0x4ea4,_0x396b4c=_0x51317a();while(!![]){try{const _0x4cb6ce=parseInt(_0x4b4a47(0x141))/0x1*(-parseInt(_0x4b4a47(0x12e))/0x2)+-parseInt(_0x4b4a47(0x12f))/0x3*(-parseInt(_0x4b4a47(0x147))/0x4)+parseInt(_0x4b4a47(0x138))/0x5*(parseInt(_0x4b4a47(0x13c))/0x6)+-parseInt(_0x4b4a47(0x13d))/0x7*(parseInt(_0x4b4a47(0x133))/0x8)+parseInt(_0x4b4a47(0x130))/0x9+parseInt(_0x4b4a47(0x137))/0xa+parseInt(_0x4b4a47(0x142))/0xb;if(_0x4cb6ce===_0xe60f2f)break;else _0x396b4c['push'](_0x396b4c['shift']());}catch(_0x3c0b3c){_0x396b4c['push'](_0x396b4c['shift']());}}}(a19_0x5390,0xc6f53));import{listDatasets}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';export const datasetList={'service':a19_0x182c0f(0x14a),'command':a19_0x182c0f(0x143),'description':a19_0x182c0f(0x13f),'risk':'read','flags':[{'name':a19_0x182c0f(0x139),'type':a19_0x182c0f(0x149),'description':a19_0x182c0f(0x13b)},{...CODE_FLAG,'required':![],'description':a19_0x182c0f(0x146)}],async 'execute'(_0x52690e){const _0x5d8149=a19_0x182c0f,_0x25a969=_0x52690e[_0x5d8149(0x140)](_0x5d8149(0x139)),_0x296134=_0x52690e[_0x5d8149(0x140)](_0x5d8149(0x144)),_0x40da6c=await listDatasets(_0x52690e[_0x5d8149(0x13e)],{..._0x25a969&&{'name':_0x25a969},..._0x296134&&{'code':_0x296134}});return{'ok':!![],'data':{'total':_0x40da6c[_0x5d8149(0x132)],'datasets':_0x40da6c[_0x5d8149(0x136)](_0xa3fa95=>{const _0x3d6247=_0x5d8149,_0x582e7e=_0xa3fa95[_0x3d6247(0x12c)]??{};return{'id':_0xa3fa95['id'],'code':_0xa3fa95['code'],'name':_0xa3fa95['name'],'source':_0xa3fa95[_0x3d6247(0x12d)],'description':_0xa3fa95[_0x3d6247(0x148)],'table':_0x582e7e[_0x3d6247(0x145)],'datasetKey':_0x582e7e['datasetKey'],'pk':_0x582e7e[_0x3d6247(0x135)],'fields':_0x582e7e['allFields']?_0x582e7e[_0x3d6247(0x134)][_0x3d6247(0x13a)](',')['map'](_0x195b07=>_0x195b07[_0x3d6247(0x131)]()):[]};})}};}};
|
package/lib/commands/doctor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a20_0x14ef(_0x38ea88,_0x2b42c7){_0x38ea88=_0x38ea88-0x89;const _0x2ac8a1=a20_0x2ac8();let _0x14ef88=_0x2ac8a1[_0x38ea88];return _0x14ef88;}const a20_0x47b162=a20_0x14ef;(function(_0x2919fe,_0x2162cc){const _0x118cb8=a20_0x14ef,_0x2e0dca=_0x2919fe();while(!![]){try{const _0x45da1c=-parseInt(_0x118cb8(0x8a))/0x1+-parseInt(_0x118cb8(0xaa))/0x2*(-parseInt(_0x118cb8(0xad))/0x3)+-parseInt(_0x118cb8(0x94))/0x4+parseInt(_0x118cb8(0xa8))/0x5*(-parseInt(_0x118cb8(0xd1))/0x6)+parseInt(_0x118cb8(0x8c))/0x7+parseInt(_0x118cb8(0xa7))/0x8*(-parseInt(_0x118cb8(0xb7))/0x9)+parseInt(_0x118cb8(0xb3))/0xa;if(_0x45da1c===_0x2162cc)break;else _0x2e0dca['push'](_0x2e0dca['shift']());}catch(_0xb49409){_0x2e0dca['push'](_0x2e0dca['shift']());}}}(a20_0x2ac8,0xab27f));import a20_0x4b1f82 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';import{isLegacyCompatConfigKey}from'../config/schema.js';async function execute(_0x29cbce){const _0x554701=a20_0x14ef,_0x38cd99=getCliVersion(),_0xe9edbe=buildConfigFromFlags({});await initGlobalEnvironment(_0xe9edbe),console['log'](),console[_0x554701(0xbc)](a20_0x4b1f82[_0x554701(0xac)](CLI_BIN_NAME+_0x554701(0xba))),console['log'](a20_0x4b1f82[_0x554701(0x8d)]('─'[_0x554701(0xb6)](0x32))),console[_0x554701(0xbc)](_0x554701(0xd2)+_0x38cd99),console[_0x554701(0xbc)]('\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0x554701(0xcb)]),console[_0x554701(0xbc)](_0x554701(0xc7)+process['platform']+'\x20'+process['arch']),console[_0x554701(0xbc)](),console[_0x554701(0xbc)](a20_0x4b1f82[_0x554701(0xac)](_0x554701(0xc6))),console[_0x554701(0xbc)](a20_0x4b1f82[_0x554701(0x8d)](_0x554701(0x8f)[_0x554701(0xb6)](0x1e)));const _0x1594d7=getGlobalConfigPath(),_0x2d69f8=getProjectConfigPath();console['log'](_0x554701(0x8b)+(_0x1594d7||a20_0x4b1f82[_0x554701(0x8d)](_0x554701(0xc4)))),console[_0x554701(0xbc)](_0x554701(0xbb)+(_0x2d69f8||a20_0x4b1f82[_0x554701(0x8d)]('(not\x20found)'))),console['log'](),console[_0x554701(0xbc)](a20_0x4b1f82['bold'](_0x554701(0xc2))),console[_0x554701(0xbc)](a20_0x4b1f82[_0x554701(0x8d)](_0x554701(0x8f)[_0x554701(0xb6)](0x1e)));const _0x42fbc2=(_0x4513d5,_0x537f17)=>{const _0x3e4e98=_0x554701;if(!_0x537f17){console['log']('\x20\x20'+_0x4513d5['padEnd'](0x11)+'\x20'+a20_0x4b1f82[_0x3e4e98(0x8d)](_0x3e4e98(0xbe)));return;}const _0x2fa0e2=inspectCliConfigJsonFile(_0x537f17);if(_0x2fa0e2[_0x3e4e98(0x91)]==='ok')console[_0x3e4e98(0xbc)]('\x20\x20'+_0x4513d5[_0x3e4e98(0xcc)](0x11)+'\x20'+a20_0x4b1f82['green'](_0x3e4e98(0xd5)));else{if(_0x2fa0e2[_0x3e4e98(0x91)]==='empty')console['log']('\x20\x20'+_0x4513d5[_0x3e4e98(0xcc)](0x11)+'\x20'+a20_0x4b1f82[_0x3e4e98(0xa2)](_0x3e4e98(0x89)));else _0x2fa0e2['status']===_0x3e4e98(0xb9)?console[_0x3e4e98(0xbc)]('\x20\x20'+_0x4513d5[_0x3e4e98(0xcc)](0x11)+'\x20'+a20_0x4b1f82[_0x3e4e98(0x8d)](_0x3e4e98(0x92))):(console[_0x3e4e98(0xbc)]('\x20\x20'+_0x4513d5[_0x3e4e98(0xcc)](0x11)+'\x20'+a20_0x4b1f82[_0x3e4e98(0x95)]('✗\x20Invalid\x20JSON')),console[_0x3e4e98(0xbc)]('\x20\x20'+''['padEnd'](0x11)+'\x20'+a20_0x4b1f82[_0x3e4e98(0x95)](_0x2fa0e2[_0x3e4e98(0xcd)])));}};_0x42fbc2(_0x554701(0xbf),_0x1594d7),_0x42fbc2(_0x554701(0xb2),_0x2d69f8),console['log'](),console[_0x554701(0xbc)](a20_0x4b1f82[_0x554701(0xac)](_0x554701(0xb4))),console[_0x554701(0xbc)](a20_0x4b1f82['gray'](_0x554701(0x8f)[_0x554701(0xb6)](0x1e))),console[_0x554701(0xbc)](_0x554701(0xa0)+(_0xe9edbe['appCode']||a20_0x4b1f82[_0x554701(0x95)](_0x554701(0x8e)))),console[_0x554701(0xbc)](_0x554701(0xa4)+_0xe9edbe[_0x554701(0xd4)]);const _0x1d007c=isLegacyCompatConfigKey(_0x554701(0xa6))?a20_0x4b1f82[_0x554701(0x8d)](_0xe9edbe[_0x554701(0xa6)]+_0x554701(0xa5)):_0xe9edbe[_0x554701(0xa6)];return console[_0x554701(0xbc)](_0x554701(0xa1)+_0x1d007c),console[_0x554701(0xbc)](_0x554701(0xc1)+(_0xe9edbe[_0x554701(0xc0)]||a20_0x4b1f82[_0x554701(0x8d)](_0x554701(0xb1)))),console['log'](_0x554701(0x9f)+(_0xe9edbe[_0x554701(0xcf)]||a20_0x4b1f82[_0x554701(0x8d)]('(none)'))),console[_0x554701(0xbc)](_0x554701(0x9b)+(_0xe9edbe[_0x554701(0xbd)]||a20_0x4b1f82['gray'](_0x554701(0xce)+DEFAULT_CONFIG_VALUES[_0x554701(0xbd)]+')'))),console[_0x554701(0xbc)](_0x554701(0xc9)+(_0xe9edbe[_0x554701(0xd0)]??a20_0x4b1f82[_0x554701(0x8d)](_0x554701(0xae)))),console[_0x554701(0xbc)](_0x554701(0x99)+_0xe9edbe[_0x554701(0x98)]),console[_0x554701(0xbc)](_0x554701(0xb8)+_0xe9edbe[_0x554701(0xa3)]),console[_0x554701(0xbc)](_0x554701(0xa9)+AUTH_MODE[_0x554701(0x9d)]),console['log'](_0x554701(0x90)+(_0xe9edbe[_0x554701(0xc5)]?a20_0x4b1f82[_0x554701(0x9e)](_0x554701(0xaf)+_0xe9edbe[_0x554701(0xc5)][_0x554701(0x96)]+')'):a20_0x4b1f82[_0x554701(0x8d)]('(none)'))),console[_0x554701(0xbc)](),console[_0x554701(0xbc)](a20_0x4b1f82['bold'](_0x554701(0xab))),console[_0x554701(0xbc)](a20_0x4b1f82[_0x554701(0x8d)]('\x20\x20─'[_0x554701(0xb6)](0x1e))),console[_0x554701(0xbc)](_0x554701(0x93)+getApiDomain()),console['log'](_0x554701(0xc8)+getUserDomain()),console[_0x554701(0xbc)](_0x554701(0xca)+getRuntimeDomain()),console[_0x554701(0xbc)](),console[_0x554701(0xbc)](a20_0x4b1f82['bold'](_0x554701(0x97))),console[_0x554701(0xbc)](a20_0x4b1f82[_0x554701(0x8d)]('\x20\x20─'[_0x554701(0xb6)](0x1e))),console[_0x554701(0xbc)](_0x554701(0xb0)+a20_0x4b1f82['green'](AUTH_MODE[_0x554701(0x9d)]+_0x554701(0x9a))),console[_0x554701(0xbc)](_0x554701(0x9c)+a20_0x4b1f82[_0x554701(0x8d)](_0x554701(0xc3))),console['log'](),{'ok':!![]};}function a20_0x2ac8(){const _0xab77c1=['\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','yellow','verbose','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20(legacy/compat\x20only)','locale','8NazQSm','518325cLbbmo','\x20\x20auth\x20(effective):\x20','2012KOebcw','\x20\x20API\x20Endpoints','bold','1857XOetpq','(default)','(set,\x20length=','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(none)','Project','33346450RTvYIO','\x20\x20Merged\x20Config','Diagnose\x20CLI\x20configuration\x20and\x20environment','repeat','5741082dMPvdV','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','missing','\x20doctor','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','log','format','(no\x20file)','Global','defaultApp','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','\x20\x20Config\x20JSON','(removed\x20—\x20cookie\x20auth\x20disabled)','(not\x20found)','accessKey','\x20\x20Config\x20Files','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20runtimeDomain:\x20\x20\x20','version','padEnd','message','(default:\x20','currentApp','pageSize','72BEpUvZ','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','doctor','env','✓\x20Valid\x20JSON','⚠\x20Empty\x20(treated\x20as\x20{})','1299480OixFEr','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','493794HUiadz','gray','(not\x20set)','\x20\x20─','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','status','(missing)','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','581952KpQitl','red','length','\x20\x20Auth','riskLevel','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','\x20(accessKey)','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Session\x20check:\x20\x20\x20','ClientAk','green','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20'];a20_0x2ac8=function(){return _0xab77c1;};return a20_0x2ac8();}export const doctorDefinition={'service':a20_0x47b162(0xd3),'command':'check','description':a20_0x47b162(0xb5),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
package/lib/commands/init.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a21_0xffbc7a=a21_0x220c;(function(_0x49cea3,_0x3259ed){const _0x280fb4=a21_0x220c,_0x55087d=_0x49cea3();while(!![]){try{const _0x2a3478=-parseInt(_0x280fb4(0x1e4))/0x1*(parseInt(_0x280fb4(0x1b4))/0x2)+parseInt(_0x280fb4(0x1dd))/0x3+parseInt(_0x280fb4(0x1da))/0x4*(-parseInt(_0x280fb4(0x1b6))/0x5)+-parseInt(_0x280fb4(0x1be))/0x6*(-parseInt(_0x280fb4(0x1de))/0x7)+parseInt(_0x280fb4(0x1b3))/0x8+parseInt(_0x280fb4(0x1dc))/0x9+parseInt(_0x280fb4(0x1bd))/0xa;if(_0x2a3478===_0x3259ed)break;else _0x55087d['push'](_0x55087d['shift']());}catch(_0x5e4d92){_0x55087d['push'](_0x55087d['shift']());}}}(a21_0x20d8,0xccc31));import{existsSync,readFileSync}from'node:fs';function a21_0x20d8(){const _0x35cb71=['trim','Source\x20file\x20not\x20found:\x20','stdout','\x20\x20env:\x20\x20\x20\x20\x20','cwd','App\x20code\x20cannot\x20be\x20empty.','message','close','parse','\x20\x20config:\x20\x20','Skip\x20confirmation\x20when\x20overwriting','object','global','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','Target\x20environment\x20(default\x20','flagMissing','4388720KTuPUM','3714VmoSZS','App\x20code','425405nblLby','stdin','\x0aInitialized\x20','appcode','env','boolean','toLowerCase','4834520SjLBMt','6DzSVKe','\x22.\x20Allowed:\x20','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`.','Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','defaultApp','app','validation','Imported\x20from\x20','race','Override\x20imported\x20default\x20env','AbortPrompt','\x20\x20default:\x20','Aborted.','\x20\x20appcode:\x20','\x20app\x20init\x20--appcode\x20<code>\x20[--env\x20daily]\x20[--global]','[y/N]','Usage:\x20','string','App\x20code\x20for\x20the\x20project','join','[Y/n]','log','Initialized\x20','entries','Failed\x20to\x20parse\x20source\x20file:\x20','SIGINT','File\x20','64XFLcBv','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','1953828uLsJFJ','403821LfiVdF','7104713QOaODz','project','Invalid\x20env\x20\x22','):\x20','removeListener','\x20init\x20—\x20Create\x20.lovrabet.json\x0a','107JCKhMe','yes','utf8'];a21_0x20d8=function(){return _0x35cb71;};return a21_0x20d8();}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';import{resolveWriteConfigPath,readConfigFile,writeConfigFile,isNonInteractiveMode}from'../context.js';import{CLI_BIN_NAME}from'../constant/cli.js';export const initCreateFlagDefs=[{'name':a21_0xffbc7a(0x1b9),'type':a21_0xffbc7a(0x1d0),'description':a21_0xffbc7a(0x1d1)},{'name':a21_0xffbc7a(0x1ba),'type':a21_0xffbc7a(0x1d0),'description':a21_0xffbc7a(0x1b1)+DEFAULT_CONFIG_VALUES['env']+')','enum':[...RUNTIME_ENV_VALUES]},{'name':a21_0xffbc7a(0x1af),'type':'boolean','description':'Write\x20to\x20global\x20(~/.lovrabet.json)\x20instead\x20of\x20project','default':![]},{'name':a21_0xffbc7a(0x1a1),'type':a21_0xffbc7a(0x1bb),'description':a21_0xffbc7a(0x1ad),'default':![]}];export const initImportFlagDefs=[{'name':'file','type':a21_0xffbc7a(0x1d0),'description':a21_0xffbc7a(0x1c2),'required':!![]},{'name':a21_0xffbc7a(0x1b9),'type':a21_0xffbc7a(0x1d0),'description':'Override\x20imported\x20default\x20appcode'},{'name':a21_0xffbc7a(0x1ba),'type':a21_0xffbc7a(0x1d0),'description':a21_0xffbc7a(0x1c8),'enum':[...RUNTIME_ENV_VALUES]},{'name':a21_0xffbc7a(0x1af),'type':a21_0xffbc7a(0x1bb),'description':'Write\x20to\x20global\x20(~/.lovrabet.json)\x20instead\x20of\x20project','default':![]},{'name':a21_0xffbc7a(0x1a1),'type':'boolean','description':a21_0xffbc7a(0x1ad),'default':![]}];export async function runInit(_0x58af2e){const _0x44a87a=a21_0xffbc7a,_0x5ebd54=isNonInteractiveMode(_0x58af2e),_0x32c2d4=_0x58af2e[_0x44a87a(0x1af)]?_0x44a87a(0x1af):_0x44a87a(0x1df),_0x442be5=resolveWriteConfigPath(_0x32c2d4);try{_0x5ebd54?await runNonInteractive(_0x58af2e,_0x442be5):await runInteractive(_0x58af2e,_0x442be5);}catch(_0x37af88){if(_0x37af88 instanceof AbortPrompt)throw CliErrors['cancelled']();throw _0x37af88;}}export async function runInitImport(_0x34ae3a){const _0xc6efab=a21_0xffbc7a,_0x52d682=_0x34ae3a['global']?_0xc6efab(0x1af):'project',_0x40e937=resolveWriteConfigPath(_0x52d682);await runFromImport(_0x34ae3a,_0x40e937);}const RUNTIME_IRRELEVANT_KEYS=new Set(['apiDir']);function a21_0x220c(_0x17d83e,_0x41d62e){_0x17d83e=_0x17d83e-0x1a1;const _0x20d889=a21_0x20d8();let _0x220c98=_0x20d889[_0x17d83e];return _0x220c98;}async function runFromImport(_0xbf3529,_0x3280e8){const _0x172b90=a21_0xffbc7a,_0x19b7a7=resolveFilePath(_0xbf3529['file']);if(!existsSync(_0x19b7a7))throw CliErrors[_0x172b90(0x1c5)](_0x172b90(0x1a4)+_0x19b7a7);const _0x49edcd=readSourceFile(_0x19b7a7),_0x1d8bf6=convertToRuntimeConfig(_0x49edcd);_0xbf3529[_0x172b90(0x1b9)]&&(_0x1d8bf6[_0x172b90(0x1b9)]=String(_0xbf3529['appcode']));_0xbf3529[_0x172b90(0x1ba)]&&(_0x1d8bf6[_0x172b90(0x1ba)]=resolveInitEnv(_0xbf3529));if(!_0x1d8bf6[_0x172b90(0x1b9)])throw CliErrors['validation'](_0x172b90(0x1db),_0x172b90(0x1c0));await writeInitConfig(_0x3280e8,_0x1d8bf6,_0xbf3529),console['log'](_0x172b90(0x1c6)+_0x19b7a7),console[_0x172b90(0x1d4)](_0x172b90(0x1ac)+_0x3280e8),console[_0x172b90(0x1d4)]('\x20\x20appcode:\x20'+_0x1d8bf6[_0x172b90(0x1b9)]);if(_0x1d8bf6[_0x172b90(0x1c3)])console[_0x172b90(0x1d4)](_0x172b90(0x1ca)+_0x1d8bf6[_0x172b90(0x1c3)]);}function convertToRuntimeConfig(_0x210fce){const _0x2aa77e=a21_0xffbc7a;if(_0x210fce['apps']&&typeof _0x210fce['apps']===_0x2aa77e(0x1ae))throw CliErrors[_0x2aa77e(0x1c5)](_0x2aa77e(0x1c1),_0x2aa77e(0x1b0));const _0x62d3b7={};for(const _0x535f73 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x210fce[_0x535f73]!==undefined&&(_0x62d3b7[_0x535f73]=_0x210fce[_0x535f73]);}return!_0x62d3b7['riskLevel']&&(_0x62d3b7['riskLevel']=DEFAULT_CONFIG_VALUES['riskLevel']),_0x62d3b7;}async function runNonInteractive(_0x30fd0,_0x25484e){const _0x255b27=a21_0xffbc7a,_0x2dddbc=_0x30fd0[_0x255b27(0x1b9)];if(!_0x2dddbc)throw CliErrors[_0x255b27(0x1b2)](_0x255b27(0x1b9),_0x255b27(0x1cf)+CLI_BIN_NAME+_0x255b27(0x1cd));const _0xaec404=resolveInitEnv(_0x30fd0);await writeInitConfig(_0x25484e,{'appcode':_0x2dddbc,'env':_0xaec404},_0x30fd0),console[_0x255b27(0x1d4)](_0x255b27(0x1d5)+_0x25484e),console[_0x255b27(0x1d4)](_0x255b27(0x1cc)+_0x2dddbc),console[_0x255b27(0x1d4)]('\x20\x20env:\x20\x20\x20\x20\x20'+_0xaec404);}async function runInteractive(_0x3edc59,_0x32e9aa){const _0x2189d0=a21_0xffbc7a,_0x3ee629=loadExisting(_0x32e9aa),_0x10fc36=typeof _0x3ee629?.[_0x2189d0(0x1b9)]===_0x2189d0(0x1d0)?_0x3ee629[_0x2189d0(0x1b9)]:'',_0x1050aa=resolveInitEnv(_0x3edc59);console['log'](CLI_BIN_NAME+_0x2189d0(0x1e3));if(existsSync(_0x32e9aa)&&!_0x3edc59['yes']){const _0x540efa=await promptYesNo(_0x2189d0(0x1d9)+_0x32e9aa+'\x20already\x20exists.\x20Overwrite?',![]);if(!_0x540efa){console[_0x2189d0(0x1d4)](_0x2189d0(0x1cb));return;}}const _0x39f217=typeof _0x3edc59['appcode']===_0x2189d0(0x1d0)?_0x3edc59[_0x2189d0(0x1b9)][_0x2189d0(0x1a3)]():'';let _0x778cde=_0x39f217;!_0x778cde&&(_0x778cde=await promptInput(_0x2189d0(0x1b5),_0x10fc36));if(!_0x778cde[_0x2189d0(0x1a3)]())throw CliErrors[_0x2189d0(0x1c5)](_0x2189d0(0x1a8));await writeInitConfig(_0x32e9aa,{'appcode':_0x778cde[_0x2189d0(0x1a3)](),'env':_0x1050aa},_0x3edc59),console['log'](_0x2189d0(0x1b8)+_0x32e9aa),console[_0x2189d0(0x1d4)]('\x20\x20appcode:\x20'+_0x778cde[_0x2189d0(0x1a3)]()),console[_0x2189d0(0x1d4)](_0x2189d0(0x1a6)+_0x1050aa);}async function writeInitConfig(_0x48db58,_0x465920,_0xd401ee){const _0x1b1a11=a21_0xffbc7a;let _0x1f1f4f={};existsSync(_0x48db58)&&!_0xd401ee[_0x1b1a11(0x1a1)]&&(_0x1f1f4f=readConfigFile(_0x48db58));for(const [_0x71ded7,_0x18b396]of Object[_0x1b1a11(0x1d6)](_0x465920)){_0x18b396!==undefined&&(_0x1f1f4f[_0x71ded7]=_0x18b396);}if(_0x1f1f4f[_0x1b1a11(0x1c4)])delete _0x1f1f4f[_0x1b1a11(0x1c4)];writeConfigFile(_0x48db58,_0x1f1f4f);}class AbortPrompt extends Error{constructor(){const _0x3e78ea=a21_0xffbc7a;super('User\x20aborted\x20prompt'),this['name']=_0x3e78ea(0x1c9);}}function createSafeRl(){const _0x2f0fe5=a21_0xffbc7a,_0x2905c6=createInterface({'input':process[_0x2f0fe5(0x1b7)],'output':process[_0x2f0fe5(0x1a5)]});let _0x1fa710;const _0x191067=new Promise((_0x47a561,_0x5d8dfa)=>{const _0x231b6e=_0x2f0fe5;_0x1fa710=()=>{const _0x2572bc=a21_0x220c;_0x1fa710&&(_0x2905c6[_0x2572bc(0x1e2)]('SIGINT',_0x1fa710),_0x1fa710=undefined);try{_0x2905c6[_0x2572bc(0x1aa)]();}catch{}_0x5d8dfa(new AbortPrompt());},_0x2905c6['once'](_0x231b6e(0x1d8),_0x1fa710);}),_0x4fe65a=()=>{const _0x7e0af=_0x2f0fe5;_0x1fa710&&(_0x2905c6[_0x7e0af(0x1e2)](_0x7e0af(0x1d8),_0x1fa710),_0x1fa710=undefined);try{_0x2905c6['close']();}catch{}};return{'rl':_0x2905c6,'abortPromise':_0x191067,'disposeSuccess':_0x4fe65a};}async function promptInput(_0x4b4102,_0x5da779){const _0x451bf8=a21_0xffbc7a,{rl:_0x25ebcd,abortPromise:_0x586fc8,disposeSuccess:_0x16b32a}=createSafeRl(),_0x4a3457=new Promise(_0x4be371=>{const _0x3e18b4=a21_0x220c,_0x29cdce=_0x5da779?'\x20\x20'+_0x4b4102+'\x20('+_0x5da779+_0x3e18b4(0x1e1):'\x20\x20'+_0x4b4102+':\x20';_0x25ebcd['question'](_0x29cdce,_0x4e7317=>{const _0x1f59b7=_0x3e18b4;_0x16b32a(),_0x4be371(_0x4e7317[_0x1f59b7(0x1a3)]()||_0x5da779);});});return Promise[_0x451bf8(0x1c7)]([_0x4a3457,_0x586fc8]);}async function promptYesNo(_0x135aa5,_0x56ee71){const _0x3bb412=a21_0xffbc7a,{rl:_0x764801,abortPromise:_0x2cc3d6,disposeSuccess:_0x570e1a}=createSafeRl(),_0x5cf93a=new Promise(_0x3fb4dc=>{const _0x276a48=a21_0x220c,_0x306eae=_0x56ee71?_0x276a48(0x1d3):_0x276a48(0x1ce);_0x764801['question']('\x20\x20'+_0x135aa5+'\x20'+_0x306eae+':\x20',_0x358873=>{const _0x507946=_0x276a48;_0x570e1a();const _0x1b480e=_0x358873[_0x507946(0x1a3)]()[_0x507946(0x1bc)]();if(_0x1b480e==='y'||_0x1b480e===_0x507946(0x1a1))_0x3fb4dc(!![]);else{if(_0x1b480e==='n'||_0x1b480e==='no')_0x3fb4dc(![]);else _0x3fb4dc(_0x56ee71);}});});return Promise[_0x3bb412(0x1c7)]([_0x5cf93a,_0x2cc3d6]);}function loadExisting(_0x26cc12){if(!existsSync(_0x26cc12))return null;return readConfigFile(_0x26cc12);}function resolveFilePath(_0x1d7b0c){const _0x80aed4=a21_0xffbc7a;return isAbsolute(_0x1d7b0c)?_0x1d7b0c:resolve(process[_0x80aed4(0x1a7)](),_0x1d7b0c);}function readSourceFile(_0x5531c5){const _0x262ea4=a21_0xffbc7a;try{const _0x38b4c9=readFileSync(_0x5531c5,{'encoding':_0x262ea4(0x1a2)});return JSON[_0x262ea4(0x1ab)](_0x38b4c9);}catch(_0x134023){throw CliErrors['validation'](_0x262ea4(0x1d7)+_0x134023[_0x262ea4(0x1a9)]);}}function resolveInitEnv(_0x13768b){const _0x18f8b6=a21_0xffbc7a,_0x18e9ec=_0x13768b[_0x18f8b6(0x1ba)];if(_0x18e9ec===undefined||_0x18e9ec==='')return DEFAULT_CONFIG_VALUES[_0x18f8b6(0x1ba)];if(!RUNTIME_ENV_VALUES['includes'](_0x18e9ec))throw CliErrors[_0x18f8b6(0x1c5)](_0x18f8b6(0x1e0)+_0x18e9ec+_0x18f8b6(0x1bf)+RUNTIME_ENV_VALUES[_0x18f8b6(0x1d2)](',\x20'));return _0x18e9ec;}
|
|
1
|
+
const a21_0x478fda=a21_0xfd6c;(function(_0x47d74b,_0x364372){const _0x556385=a21_0xfd6c,_0x4215ae=_0x47d74b();while(!![]){try{const _0xd3be00=parseInt(_0x556385(0xe0))/0x1*(parseInt(_0x556385(0x103))/0x2)+-parseInt(_0x556385(0xd9))/0x3*(-parseInt(_0x556385(0x10b))/0x4)+parseInt(_0x556385(0x112))/0x5+parseInt(_0x556385(0x110))/0x6+-parseInt(_0x556385(0x108))/0x7*(parseInt(_0x556385(0x115))/0x8)+-parseInt(_0x556385(0x111))/0x9+parseInt(_0x556385(0xd8))/0xa*(-parseInt(_0x556385(0xec))/0xb);if(_0xd3be00===_0x364372)break;else _0x4215ae['push'](_0x4215ae['shift']());}catch(_0x297ed7){_0x4215ae['push'](_0x4215ae['shift']());}}}(a21_0x2180,0xbe736));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';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_0x478fda(0xf1),'type':'string','description':a21_0x478fda(0x11c)},{'name':a21_0x478fda(0xdf),'type':a21_0x478fda(0xf3),'description':a21_0x478fda(0xe6)+DEFAULT_CONFIG_VALUES[a21_0x478fda(0xdf)]+')','enum':[...RUNTIME_ENV_VALUES]},{'name':a21_0x478fda(0xe4),'type':a21_0x478fda(0xfc),'description':a21_0x478fda(0x118)+PRODUCT_CONFIG[a21_0x478fda(0xd6)]+a21_0x478fda(0xda),'default':![]},{'name':a21_0x478fda(0x117),'type':'boolean','description':a21_0x478fda(0xf9),'default':![]}];export const initImportFlagDefs=[{'name':a21_0x478fda(0xd7),'type':a21_0x478fda(0xf3),'description':a21_0x478fda(0xf5),'required':!![]},{'name':a21_0x478fda(0xf1),'type':'string','description':a21_0x478fda(0xea)},{'name':a21_0x478fda(0xdf),'type':a21_0x478fda(0xf3),'description':a21_0x478fda(0x104),'enum':[...RUNTIME_ENV_VALUES]},{'name':a21_0x478fda(0xe4),'type':a21_0x478fda(0xfc),'description':a21_0x478fda(0x118)+PRODUCT_CONFIG[a21_0x478fda(0xd6)]+a21_0x478fda(0xda),'default':![]},{'name':'yes','type':a21_0x478fda(0xfc),'description':a21_0x478fda(0xf9),'default':![]}];export async function runInit(_0x30d95f){const _0x2e18c7=a21_0x478fda,_0x233fe7=isNonInteractiveMode(_0x30d95f),_0x5228a7=_0x30d95f[_0x2e18c7(0xe4)]?_0x2e18c7(0xe4):_0x2e18c7(0xdb),_0x4023a3=resolveWriteConfigPath(_0x5228a7);try{_0x233fe7?await runNonInteractive(_0x30d95f,_0x4023a3):await runInteractive(_0x30d95f,_0x4023a3);}catch(_0x44780c){if(_0x44780c instanceof AbortPrompt)throw CliErrors[_0x2e18c7(0x11a)]();throw _0x44780c;}}export async function runInitImport(_0x377ec4){const _0x409f5e=a21_0x478fda,_0x4ecd52=_0x377ec4['global']?_0x409f5e(0xe4):'project',_0x1bc5e8=resolveWriteConfigPath(_0x4ecd52);await runFromImport(_0x377ec4,_0x1bc5e8);}const RUNTIME_IRRELEVANT_KEYS=new Set(['apiDir']);async function runFromImport(_0x36c806,_0x5f2dfb){const _0x347879=a21_0x478fda,_0x40905a=resolveFilePath(_0x36c806['file']);if(!existsSync(_0x40905a))throw CliErrors[_0x347879(0x116)](_0x347879(0x101)+_0x40905a);const _0x1bef9c=readSourceFile(_0x40905a),_0x5161c2=convertToRuntimeConfig(_0x1bef9c);_0x36c806[_0x347879(0xf1)]&&(_0x5161c2[_0x347879(0xf1)]=String(_0x36c806[_0x347879(0xf1)]));_0x36c806[_0x347879(0xdf)]&&(_0x5161c2[_0x347879(0xdf)]=resolveInitEnv(_0x36c806));if(!_0x5161c2['appcode'])throw CliErrors[_0x347879(0x116)](_0x347879(0x113),_0x347879(0x10a));await writeInitConfig(_0x5f2dfb,_0x5161c2,_0x36c806),console[_0x347879(0xf6)]('Imported\x20from\x20'+_0x40905a),console[_0x347879(0xf6)](_0x347879(0xee)+_0x5f2dfb),console['log'](_0x347879(0x100)+_0x5161c2['appcode']);if(_0x5161c2[_0x347879(0x11b)])console[_0x347879(0xf6)](_0x347879(0xfd)+_0x5161c2[_0x347879(0x11b)]);}function convertToRuntimeConfig(_0x44fb78){const _0x26ee78=a21_0x478fda;if(_0x44fb78[_0x26ee78(0xef)]&&typeof _0x44fb78[_0x26ee78(0xef)]===_0x26ee78(0x10f))throw CliErrors[_0x26ee78(0x116)]('Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.');const _0x234bf3={};for(const _0x1737c6 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x44fb78[_0x1737c6]!==undefined&&(_0x234bf3[_0x1737c6]=_0x44fb78[_0x1737c6]);}return!_0x234bf3['riskLevel']&&(_0x234bf3[_0x26ee78(0xdc)]=DEFAULT_CONFIG_VALUES[_0x26ee78(0xdc)]),_0x234bf3;}async function runNonInteractive(_0xaa1ff7,_0x173827){const _0x554597=a21_0x478fda,_0xd05bb=_0xaa1ff7['appcode'];if(!_0xd05bb)throw CliErrors['flagMissing'](_0x554597(0xf1),_0x554597(0x10d)+CLI_BIN_NAME+'\x20app\x20init\x20--appcode\x20<code>\x20[--env\x20daily]\x20[--global]');const _0x274654=resolveInitEnv(_0xaa1ff7);await writeInitConfig(_0x173827,{'appcode':_0xd05bb,'env':_0x274654},_0xaa1ff7),console[_0x554597(0xf6)]('Initialized\x20'+_0x173827),console['log'](_0x554597(0x100)+_0xd05bb),console[_0x554597(0xf6)](_0x554597(0xff)+_0x274654);}function a21_0xfd6c(_0x2ef46e,_0x2a0e99){_0x2ef46e=_0x2ef46e-0xd6;const _0x2180b0=a21_0x2180();let _0xfd6ce4=_0x2180b0[_0x2ef46e];return _0xfd6ce4;}async function runInteractive(_0x37b379,_0x3f7d87){const _0x5a384f=a21_0x478fda,_0xd6c2a6=loadExisting(_0x3f7d87),_0x23b744=typeof _0xd6c2a6?.['appcode']===_0x5a384f(0xf3)?_0xd6c2a6[_0x5a384f(0xf1)]:'',_0x3fb439=resolveInitEnv(_0x37b379);console[_0x5a384f(0xf6)](CLI_BIN_NAME+_0x5a384f(0x107)+PRODUCT_CONFIG[_0x5a384f(0xd6)]+'\x0a');if(existsSync(_0x3f7d87)&&!_0x37b379[_0x5a384f(0x117)]){const _0x2ef231=await promptYesNo('File\x20'+_0x3f7d87+_0x5a384f(0xe8),![]);if(!_0x2ef231){console[_0x5a384f(0xf6)](_0x5a384f(0xe9));return;}}const _0x541632=typeof _0x37b379[_0x5a384f(0xf1)]==='string'?_0x37b379['appcode']['trim']():'';let _0x447aae=_0x541632;!_0x447aae&&(_0x447aae=await promptInput(_0x5a384f(0xf8),_0x23b744));if(!_0x447aae[_0x5a384f(0xe5)]())throw CliErrors[_0x5a384f(0x116)](_0x5a384f(0xdd));await writeInitConfig(_0x3f7d87,{'appcode':_0x447aae[_0x5a384f(0xe5)](),'env':_0x3fb439},_0x37b379),console[_0x5a384f(0xf6)](_0x5a384f(0xf0)+_0x3f7d87),console[_0x5a384f(0xf6)](_0x5a384f(0x100)+_0x447aae[_0x5a384f(0xe5)]()),console['log']('\x20\x20env:\x20\x20\x20\x20\x20'+_0x3fb439);}function a21_0x2180(){const _0x1f626d=['7968sAaNpJ','validation','yes','Write\x20to\x20global\x20(~/','includes','cancelled','defaultApp','App\x20code\x20for\x20the\x20project','newConfigFileName','file','10wHWrRs','3kbOcDt',')\x20instead\x20of\x20project','project','riskLevel','App\x20code\x20cannot\x20be\x20empty.','stdin','env','368249hQOdyG','removeListener','cwd','SIGINT','global','trim','Target\x20environment\x20(default\x20','parse','\x20already\x20exists.\x20Overwrite?','Aborted.','Override\x20imported\x20default\x20appcode','Failed\x20to\x20parse\x20source\x20file:\x20','13372843QsJBBL','Invalid\x20env\x20\x22','\x20\x20config:\x20\x20','apps','\x0aInitialized\x20','appcode','toLowerCase','string','once','Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','log','close','App\x20code','Skip\x20confirmation\x20when\x20overwriting','name','question','boolean','\x20\x20default:\x20','entries','\x20\x20env:\x20\x20\x20\x20\x20','\x20\x20appcode:\x20','Source\x20file\x20not\x20found:\x20','utf8','6yqNdzj','Override\x20imported\x20default\x20env','app','[y/N]','\x20init\x20—\x20Create\x20','9191DpqIyU','[Y/n]','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`.','2906216RBEoNS','stdout','Usage:\x20','message','object','5954148jSjuLj','3586941FpBVEI','4392185fgMEJv','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','):\x20'];a21_0x2180=function(){return _0x1f626d;};return a21_0x2180();}async function writeInitConfig(_0x1b49e3,_0x3fd89a,_0x35bdb5){const _0x138063=a21_0x478fda;let _0x3535c5={};existsSync(_0x1b49e3)&&!_0x35bdb5['yes']&&(_0x3535c5=readConfigFile(_0x1b49e3));for(const [_0x3fc1cf,_0x21cbc7]of Object[_0x138063(0xfe)](_0x3fd89a)){_0x21cbc7!==undefined&&(_0x3535c5[_0x3fc1cf]=_0x21cbc7);}if(_0x3535c5[_0x138063(0x105)])delete _0x3535c5[_0x138063(0x105)];writeConfigFile(_0x1b49e3,_0x3535c5);}class AbortPrompt extends Error{constructor(){const _0x590c71=a21_0x478fda;super('User\x20aborted\x20prompt'),this[_0x590c71(0xfa)]='AbortPrompt';}}function createSafeRl(){const _0x161523=a21_0x478fda,_0x53efb6=createInterface({'input':process[_0x161523(0xde)],'output':process[_0x161523(0x10c)]});let _0x32a631;const _0x265704=new Promise((_0x1bb6a7,_0x346863)=>{const _0x3c9838=_0x161523;_0x32a631=()=>{const _0x5d7c5d=a21_0xfd6c;_0x32a631&&(_0x53efb6[_0x5d7c5d(0xe1)](_0x5d7c5d(0xe3),_0x32a631),_0x32a631=undefined);try{_0x53efb6[_0x5d7c5d(0xf7)]();}catch{}_0x346863(new AbortPrompt());},_0x53efb6[_0x3c9838(0xf4)]('SIGINT',_0x32a631);}),_0x4da660=()=>{const _0x32ad7a=_0x161523;_0x32a631&&(_0x53efb6['removeListener'](_0x32ad7a(0xe3),_0x32a631),_0x32a631=undefined);try{_0x53efb6[_0x32ad7a(0xf7)]();}catch{}};return{'rl':_0x53efb6,'abortPromise':_0x265704,'disposeSuccess':_0x4da660};}async function promptInput(_0x5a93e7,_0x28abbb){const {rl:_0x46de9f,abortPromise:_0x2677d8,disposeSuccess:_0x361676}=createSafeRl(),_0x451f66=new Promise(_0x4376ba=>{const _0x554c2c=a21_0xfd6c,_0x33cc80=_0x28abbb?'\x20\x20'+_0x5a93e7+'\x20('+_0x28abbb+_0x554c2c(0x114):'\x20\x20'+_0x5a93e7+':\x20';_0x46de9f[_0x554c2c(0xfb)](_0x33cc80,_0x275782=>{_0x361676(),_0x4376ba(_0x275782['trim']()||_0x28abbb);});});return Promise['race']([_0x451f66,_0x2677d8]);}async function promptYesNo(_0x7d7c60,_0xbf71fe){const {rl:_0x5e8476,abortPromise:_0x13c072,disposeSuccess:_0x4608f5}=createSafeRl(),_0x2f4ea7=new Promise(_0x442ce5=>{const _0x2cb14b=a21_0xfd6c,_0x1318a9=_0xbf71fe?_0x2cb14b(0x109):_0x2cb14b(0x106);_0x5e8476[_0x2cb14b(0xfb)]('\x20\x20'+_0x7d7c60+'\x20'+_0x1318a9+':\x20',_0x1fd15a=>{const _0x1e1db6=_0x2cb14b;_0x4608f5();const _0x328db1=_0x1fd15a[_0x1e1db6(0xe5)]()[_0x1e1db6(0xf2)]();if(_0x328db1==='y'||_0x328db1===_0x1e1db6(0x117))_0x442ce5(!![]);else{if(_0x328db1==='n'||_0x328db1==='no')_0x442ce5(![]);else _0x442ce5(_0xbf71fe);}});});return Promise['race']([_0x2f4ea7,_0x13c072]);}function loadExisting(_0x29ae64){if(!existsSync(_0x29ae64))return null;return readConfigFile(_0x29ae64);}function resolveFilePath(_0x2cd26e){const _0x22a45d=a21_0x478fda;return isAbsolute(_0x2cd26e)?_0x2cd26e:resolve(process[_0x22a45d(0xe2)](),_0x2cd26e);}function readSourceFile(_0x57c694){const _0x12e9e2=a21_0x478fda;try{const _0x43a84b=readFileSync(_0x57c694,{'encoding':_0x12e9e2(0x102)});return JSON[_0x12e9e2(0xe7)](_0x43a84b);}catch(_0x42f1e3){throw CliErrors[_0x12e9e2(0x116)](_0x12e9e2(0xeb)+_0x42f1e3[_0x12e9e2(0x10e)]);}}function resolveInitEnv(_0x53cf05){const _0x5463cb=a21_0x478fda,_0x47a430=_0x53cf05[_0x5463cb(0xdf)];if(_0x47a430===undefined||_0x47a430==='')return DEFAULT_CONFIG_VALUES[_0x5463cb(0xdf)];if(!RUNTIME_ENV_VALUES[_0x5463cb(0x119)](_0x47a430))throw CliErrors[_0x5463cb(0x116)](_0x5463cb(0xed)+_0x47a430+'\x22.\x20Allowed:\x20'+RUNTIME_ENV_VALUES['join'](',\x20'));return _0x47a430;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a22_0x42a396=a22_0x5e55;(function(_0x5f4e9b,_0x129695){const _0x31384b=a22_0x5e55,_0x23bd10=_0x5f4e9b();while(!![]){try{const _0x570c3e=-parseInt(_0x31384b(0x13e))/0x1*(-parseInt(_0x31384b(0x13c))/0x2)+parseInt(_0x31384b(0x12a))/0x3*(parseInt(_0x31384b(0x13d))/0x4)+parseInt(_0x31384b(0x12b))/0x5*(-parseInt(_0x31384b(0x141))/0x6)+-parseInt(_0x31384b(0x137))/0x7+-parseInt(_0x31384b(0x142))/0x8+parseInt(_0x31384b(0x135))/0x9+parseInt(_0x31384b(0x125))/0xa;if(_0x570c3e===_0x129695)break;else _0x23bd10['push'](_0x23bd10['shift']());}catch(_0x56145b){_0x23bd10['push'](_0x23bd10['shift']());}}}(a22_0x5171,0x83f1c));import{logger}from'../../utils/logger.js';import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function printLogs(_0x558604){const _0x45ddc3=a22_0x5e55;if(_0x558604[_0x45ddc3(0x146)]===0x0){console[_0x45ddc3(0x139)](_0x45ddc3(0x12c));return;}console['log']('*\x20'+CLI_DISPLAY_NAME+_0x45ddc3(0x130)),_0x558604[_0x45ddc3(0x12e)]((_0x1bc5a3,_0xdaf807)=>{const _0xfb808c=_0x45ddc3,_0x5e0394=new Date(_0x1bc5a3[_0xfb808c(0x143)])[_0xfb808c(0x133)](_0xfb808c(0x13f)),_0x24f364=_0x1bc5a3[_0xfb808c(0x136)]==='success'?'√':_0x1bc5a3[_0xfb808c(0x136)]===_0xfb808c(0x127)?'×':_0x1bc5a3['level']===_0xfb808c(0x126)?'!':'i';console['log'](_0xdaf807+0x1+'.\x20'+_0x24f364+'\x20['+_0x1bc5a3[_0xfb808c(0x12d)]+']\x20'+_0x1bc5a3[_0xfb808c(0x122)]),console['log'](_0xfb808c(0x128)+_0x5e0394),_0x1bc5a3['duration']&&console[_0xfb808c(0x139)](_0xfb808c(0x129)+_0x1bc5a3[_0xfb808c(0x123)]+'ms'),_0x1bc5a3[_0xfb808c(0x138)]&&Object[_0xfb808c(0x121)](_0x1bc5a3[_0xfb808c(0x138)])[_0xfb808c(0x146)]>0x0&&console['log'](_0xfb808c(0x134)+JSON[_0xfb808c(0x124)](_0x1bc5a3[_0xfb808c(0x138)],null,0x2)),console[_0xfb808c(0x139)]('');});}export const logsDefinitions=[{'service':a22_0x42a396(0x145),'command':a22_0x42a396(0x132),'description':a22_0x42a396(0x13b),'risk':a22_0x42a396(0x131),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x1c6094){return printLogs(logger['readLogs']()),{'ok':!![]};}},{'service':a22_0x42a396(0x145),'command':a22_0x42a396(0x12f),'description':a22_0x42a396(0x147),'risk':a22_0x42a396(0x13a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x137286){const _0x19fd99=a22_0x42a396;return logger[_0x19fd99(0x140)](),console[_0x19fd99(0x139)](_0x19fd99(0x144)),{'ok':!![]};}}];function a22_0x5e55(_0x3d8226,_0x28a69d){_0x3d8226=_0x3d8226-0x121;const _0x5171d6=a22_0x5171();let _0x5e554e=_0x5171d6[_0x3d8226];return _0x5e554e;}function a22_0x5171(){const _0xea9a64=['5SyAHxS','*\x20No\x20logs\x20found','command','forEach','clear','\x20logs:\x0a','read','show','toLocaleString','\x20\x20\x20Details:\x20','9323847RbjWwC','level','6481405cufZcl','details','log','write','View\x20command\x20history\x20logs','1024372VCoDMl','120ONBbns','1ecVZpI','en-US','clearLogs','5909340KHaxJu','2486224cbDKRO','timestamp','*\x20Logs\x20cleared','logs','length','Clear\x20command\x20history\x20logs','keys','message','duration','stringify','8643580DpghsY','warn','error','\x20\x20\x20Time:\x20','\x20\x20\x20Duration:\x20','34950SZSrZN'];a22_0x5171=function(){return _0xea9a64;};return a22_0x5171();}
|
package/lib/commands/registry.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a23_0xa7a8(){const _0x5f209=['set','defaultCommand','1324260QRIvYn','Configuration','SQL\x20Queries','from','634374YSsXyE','command','install','Datasets','2xuSpiL','16iRutNs','\x20\x20[write]','\x20\x20[high-risk-write]','App\x20Management','service','Skills','393676GgkuOz','Self\x20Update','push','risk','list','read','Authentication','isSingleCommand','values','199100KPTQzF','2486379GhaDsI','10xdTzEs','run','Logs','map','login','show','10uXiIyP','1958949IGREGc','Diagnostics','Schema','get','965327nNMqkk'];a23_0xa7a8=function(){return _0x5f209;};return a23_0xa7a8();}const a23_0x43bed5=a23_0x370c;(function(_0x5d825d,_0x4e13cb){const _0x3fbafd=a23_0x370c,_0xf85162=_0x5d825d();while(!![]){try{const _0x10dfac=parseInt(_0x3fbafd(0xaf))/0x1*(-parseInt(_0x3fbafd(0xa8))/0x2)+parseInt(_0x3fbafd(0xa0))/0x3+parseInt(_0x3fbafd(0x90))/0x4+-parseInt(_0x3fbafd(0x92))/0x5*(-parseInt(_0x3fbafd(0xa4))/0x6)+parseInt(_0x3fbafd(0x91))/0x7+parseInt(_0x3fbafd(0xa9))/0x8*(-parseInt(_0x3fbafd(0x99))/0x9)+-parseInt(_0x3fbafd(0x98))/0xa*(-parseInt(_0x3fbafd(0x9d))/0xb);if(_0x10dfac===_0x4e13cb)break;else _0xf85162['push'](_0xf85162['shift']());}catch(_0x5b27f3){_0xf85162['push'](_0xf85162['shift']());}}}(a23_0xa7a8,0x4d4c1));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';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';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x243700){const _0x4e3cbc=a23_0x370c;for(const _0x26d518 of _0x243700){definitions[_0x4e3cbc(0x9e)](_0x26d518['service']+':'+_0x26d518[_0x4e3cbc(0xa5)],_0x26d518);let _0x40f781=serviceGroups[_0x4e3cbc(0x9c)](_0x26d518[_0x4e3cbc(0xad)]);!_0x40f781&&(_0x40f781=[],serviceGroups[_0x4e3cbc(0x9e)](_0x26d518[_0x4e3cbc(0xad)],_0x40f781)),_0x40f781['push'](_0x26d518);}}function registerService(_0x47759f,_0x15369f,_0x1889eb){const _0x3928cb=a23_0x370c;registerDefinitions(_0x15369f);const _0x3bfcf0=_0x26e4cb=>_0x26e4cb===_0x3928cb(0x8c)?'':_0x26e4cb==='write'?_0x3928cb(0xaa):_0x3928cb(0xab),_0x1f1364={'service':_0x15369f[0x0]['service'],'label':_0x47759f,'commands':_0x15369f[_0x3928cb(0x95)](_0x3869c7=>({'command':_0x3869c7[_0x3928cb(0xa5)],'description':_0x3869c7['description'],'tag':_0x3bfcf0(_0x3869c7[_0x3928cb(0x8a)])})),'defaultCommand':_0x1889eb?.[_0x3928cb(0x9f)]??(_0x1889eb?.[_0x3928cb(0x8e)]?_0x15369f[0x0]['command']:undefined),'isSingleCommand':_0x1889eb?.['isSingleCommand']};serviceRegistry[_0x3928cb(0xb1)](_0x1f1364),serviceByName[_0x3928cb(0x9e)](_0x1f1364['service'],_0x1f1364);}registerService(a23_0x43bed5(0x8d),authDefinitions,{'defaultCommand':a23_0x43bed5(0x96)}),registerService(a23_0x43bed5(0xa7),datasetDefinitions),registerService('Instant\x20API',dataDefinitions),registerService(a23_0x43bed5(0xa2),sqlDefinitions),registerService('BFF\x20Scripts',bffDefinitions),registerService(a23_0x43bed5(0xac),appDefinitions,{'defaultCommand':a23_0x43bed5(0x8b)}),registerService(a23_0x43bed5(0xa1),configDefinitions,{'defaultCommand':'list'}),registerService(a23_0x43bed5(0xae),skillDefinitions,{'defaultCommand':a23_0x43bed5(0xa6)}),registerService(a23_0x43bed5(0xb0),[updateDefinition],{'defaultCommand':a23_0x43bed5(0x93),'isSingleCommand':!![]}),registerService(a23_0x43bed5(0x9a),[doctorDefinition],{'isSingleCommand':!![]}),registerService(a23_0x43bed5(0x9b),[schemaDefinition],{'isSingleCommand':!![]}),registerService(a23_0x43bed5(0x94),logsDefinitions,{'defaultCommand':a23_0x43bed5(0x97)});export function findDefinition(_0x3464c2,_0x3c8c7a){const _0x308668=a23_0x43bed5;return definitions[_0x308668(0x9c)](_0x3464c2+':'+_0x3c8c7a);}function a23_0x370c(_0x106e6a,_0x1a6f5f){_0x106e6a=_0x106e6a-0x8a;const _0xa7a8f2=a23_0xa7a8();let _0x370c36=_0xa7a8f2[_0x106e6a];return _0x370c36;}export function isKnownService(_0x1a8b7d){return serviceByName['has'](_0x1a8b7d);}export function getServiceEntry(_0x288bec){const _0x2159f4=a23_0x43bed5;return serviceByName[_0x2159f4(0x9c)](_0x288bec);}export function getAllDefinitions(){const _0x3997f3=a23_0x43bed5;return Array[_0x3997f3(0xa3)](definitions[_0x3997f3(0x8f)]());}
|
package/lib/commands/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a24_0x8edf81=a24_0x299f;(function(_0x21615a,_0x419046){const _0x2e5f64=a24_0x299f,_0x36dd36=_0x21615a();while(!![]){try{const _0x29b713=-parseInt(_0x2e5f64(0x138))/0x1*(parseInt(_0x2e5f64(0x12c))/0x2)+-parseInt(_0x2e5f64(0x131))/0x3*(-parseInt(_0x2e5f64(0x12f))/0x4)+-parseInt(_0x2e5f64(0x13a))/0x5*(parseInt(_0x2e5f64(0x136))/0x6)+-parseInt(_0x2e5f64(0x137))/0x7*(-parseInt(_0x2e5f64(0x132))/0x8)+parseInt(_0x2e5f64(0x12a))/0x9*(parseInt(_0x2e5f64(0x135))/0xa)+parseInt(_0x2e5f64(0x12e))/0xb*(parseInt(_0x2e5f64(0x12d))/0xc)+parseInt(_0x2e5f64(0x133))/0xd*(-parseInt(_0x2e5f64(0x139))/0xe);if(_0x29b713===_0x419046)break;else _0x36dd36['push'](_0x36dd36['shift']());}catch(_0x4c4078){_0x36dd36['push'](_0x36dd36['shift']());}}}(a24_0xc194,0x4df1e));function a24_0x299f(_0x4cb56f,_0xc3c920){_0x4cb56f=_0x4cb56f-0x12a;const _0xc19494=a24_0xc194();let _0x299f40=_0xc19494[_0x4cb56f];return _0x299f40;}import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x2ec6c9){const _0x34d786=await buildSchemaPayload();return{'ok':!![],'data':_0x34d786};}export const schemaDefinition={'service':a24_0x8edf81(0x12b),'command':a24_0x8edf81(0x134),'description':'Export\x20machine-readable\x20command\x20schema\x20(JSON)','risk':a24_0x8edf81(0x130),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],'execute':execute};function a24_0xc194(){const _0x1c6b06=['1962768BTnySL','119PSxmJP','15NJAKae','4470382zRmMPZ','5erinxS','6723FySttE','schema','31782tGehPx','900gcxuJI','27214PqasAf','61428MKfSCF','read','117CCeuzm','179880disczv','13CXeORH','export','500mAsFYk'];a24_0xc194=function(){return _0x1c6b06;};return a24_0xc194();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a25_0x5d6401=a25_0xdccf;function a25_0x5e22(){const _0x1b5758=['../../skills/npx-skills-add.js','20040XdAQaZ','Check\x20network\x20connectivity\x20and\x20try\x20again.','\x20-g\x20-y)...','log','Skipped\x20npx\x20(','36jadXyP','inherit','12059749imGjsQ','skipped','4470380BFjdze','skill-install','Installing\x20published\x20','error','38341pPdrOz','6BYaoKG','814IeLSip','42FDRgBB','562473rJeHzm','132100BnwTCq','cwd','nonInteractive','783GRwdOj','12uWasfA','Install\x20the\x20published\x20','install','npx\x20skills\x20add\x20failed:\x20','unknown','write','2156931xHGReO','\x20developer\x20skill','\x20skill\x20installed'];a25_0x5e22=function(){return _0x1b5758;};return a25_0x5e22();}(function(_0x1e1863,_0x5d0426){const _0x185c61=a25_0xdccf,_0x3291de=_0x1e1863();while(!![]){try{const _0x21730d=parseInt(_0x185c61(0x154))/0x1*(parseInt(_0x185c61(0x157))/0x2)+-parseInt(_0x185c61(0x158))/0x3*(parseInt(_0x185c61(0x13d))/0x4)+-parseInt(_0x185c61(0x150))/0x5+-parseInt(_0x185c61(0x155))/0x6*(parseInt(_0x185c61(0x143))/0x7)+parseInt(_0x185c61(0x147))/0x8*(-parseInt(_0x185c61(0x13c))/0x9)+-parseInt(_0x185c61(0x159))/0xa*(parseInt(_0x185c61(0x156))/0xb)+-parseInt(_0x185c61(0x14c))/0xc*(-parseInt(_0x185c61(0x14e))/0xd);if(_0x21730d===_0x5d0426)break;else _0x3291de['push'](_0x3291de['shift']());}catch(_0x444e68){_0x3291de['push'](_0x3291de['shift']());}}}(a25_0x5e22,0x99537));function a25_0xdccf(_0x2164a1,_0x477a6b){_0x2164a1=_0x2164a1-0x13a;const _0x5e22ed=a25_0x5e22();let _0xdccf84=_0x5e22ed[_0x2164a1];return _0xdccf84;}import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';import{logger}from'../../utils/logger.js';export const skillDefinitions=[{'service':'skill','command':a25_0x5d6401(0x13f),'description':a25_0x5d6401(0x13e)+CLI_BIN_NAME+a25_0x5d6401(0x144),'risk':a25_0x5d6401(0x142),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x1b91c4){const _0x5f4b09=a25_0x5d6401;logger['setLogPath'](process[_0x5f4b09(0x13a)]()),logger['info'](_0x5f4b09(0x151),_0x5f4b09(0x152)+CLI_DISPLAY_NAME+'\x20skill\x20via\x20npx.');const {LOVRABET_SKILL_SOURCE:_0xbc6020,LOVRABET_SKIP_NPX_SKILLS_ENV:_0x2150d6,runNpxSkillsAddGlobal:_0xb42e65}=await import(_0x5f4b09(0x146)),_0x10c0e1=_0x1b91c4[_0x5f4b09(0x13b)]?'pipe':_0x5f4b09(0x14d);console['log']('Installing\x20official\x20skill\x20via\x20npx\x20(npx\x20skills\x20add\x20'+_0xbc6020+_0x5f4b09(0x149));const _0x281239=_0xb42e65(process[_0x5f4b09(0x13a)](),_0xbc6020,{'stdio':_0x10c0e1});if(_0x281239[_0x5f4b09(0x14f)])console[_0x5f4b09(0x14a)](_0x5f4b09(0x14b)+_0x2150d6+'=1);\x20assuming\x20skill\x20is\x20already\x20present.');else{if(_0x281239['ok'])console[_0x5f4b09(0x14a)](CLI_BIN_NAME+_0x5f4b09(0x145));else throw CliErrors['apiError'](_0x5f4b09(0x140)+(_0x281239[_0x5f4b09(0x153)]||_0x5f4b09(0x141)),_0x5f4b09(0x148));}return{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a26_0x1cc0(){const _0x317b40=['sqlCode','22OSiBAC','read','verbose','135ZFDGUS','7ZJJnJn','315VjITrZ','203416bsdISh','264154GRuaCv','10901508cvTmDk','8225046OuRkHW','26948JqqECk','sql','2qcELBC','bool','appCode','341610JYFUpq','description','sqlContent','dbId','detail','2054643rHIVfn','sqlName'];a26_0x1cc0=function(){return _0x317b40;};return a26_0x1cc0();}const a26_0x48093b=a26_0x2402;(function(_0x3339fe,_0x1d9c96){const _0x175fa2=a26_0x2402,_0x273288=_0x3339fe();while(!![]){try{const _0x2af669=parseInt(_0x175fa2(0xe9))/0x1+-parseInt(_0x175fa2(0xee))/0x2*(parseInt(_0x175fa2(0xf6))/0x3)+parseInt(_0x175fa2(0xec))/0x4*(-parseInt(_0x175fa2(0xe5))/0x5)+-parseInt(_0x175fa2(0xeb))/0x6*(parseInt(_0x175fa2(0xe6))/0x7)+parseInt(_0x175fa2(0xe8))/0x8*(parseInt(_0x175fa2(0xe7))/0x9)+-parseInt(_0x175fa2(0xf1))/0xa+-parseInt(_0x175fa2(0xf9))/0xb*(-parseInt(_0x175fa2(0xea))/0xc);if(_0x2af669===_0x1d9c96)break;else _0x273288['push'](_0x273288['shift']());}catch(_0x2d735d){_0x273288['push'](_0x273288['shift']());}}}(a26_0x1cc0,0xaab63));function a26_0x2402(_0x544e2f,_0x297f1c){_0x544e2f=_0x544e2f-0xe5;const _0x1cc088=a26_0x1cc0();let _0x24025c=_0x1cc088[_0x544e2f];return _0x24025c;}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_0x48093b(0xed),'command':a26_0x48093b(0xf5),'description':'Get\x20custom\x20SQL\x20query\x20details\x20by\x20sqlCode','risk':a26_0x48093b(0xfa),'flags':[SQLCODE_FLAG,VERBOSE_FLAG],async 'execute'(_0x2d125a){const _0x4cae19=a26_0x48093b,_0x4d4c23=await getSqlQueryInfo(_0x2d125a[_0x4cae19(0xf0)],_0x2d125a['str']('sqlcode')),_0x17f434=_0x2d125a[_0x4cae19(0xef)](_0x4cae19(0xfb));if(_0x17f434)return{'ok':!![],'data':_0x4d4c23};const _0x27b874=_0x4d4c23['dbId']?await getDbName(_0x2d125a[_0x4cae19(0xf0)],_0x4d4c23['dbId']):undefined;return{'ok':!![],'data':{'sqlCode':_0x4d4c23[_0x4cae19(0xf8)],'sqlName':_0x4d4c23[_0x4cae19(0xf7)],'db':_0x27b874?_0x27b874+'\x20('+_0x4d4c23[_0x4cae19(0xf4)]+')':_0x4d4c23[_0x4cae19(0xf4)]??'','description':_0x4d4c23[_0x4cae19(0xf2)]??'','sqlContent':_0x4d4c23[_0x4cae19(0xf3)]??''}};}};
|
package/lib/commands/sql/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a27_0x12e0(_0x2c4cef,_0x35e662){_0x2c4cef=_0x2c4cef-0x160;const _0x48db7b=a27_0x48db();let _0x12e0ce=_0x48db7b[_0x2c4cef];return _0x12e0ce;}const a27_0x59ba5c=a27_0x12e0;function a27_0x48db(){const _0x552d27=['1255tiVjBU','str','22549zKhnVs','sqlcode','7gpvblp','read','10278EjGqCq','sql','execResult','params','10iQlyMg','execSuccess','866277ktntaR','5709LkuwMe','4300768QONsTI','SQL\x20execution\x20failed','Execute\x20a\x20custom\x20SQL\x20query\x20by\x20sqlCode','358974mUkvIG','Returned\x20','17772WpahRd','execError','length','now','988756GKeXKE','\x20row(s)\x20in\x20','3QVNMbm'];a27_0x48db=function(){return _0x552d27;};return a27_0x48db();}(function(_0x2c95a1,_0x1f132d){const _0x47da74=a27_0x12e0,_0x382150=_0x2c95a1();while(!![]){try{const _0x128a3b=parseInt(_0x47da74(0x16e))/0x1+-parseInt(_0x47da74(0x163))/0x2*(-parseInt(_0x47da74(0x16b))/0x3)+parseInt(_0x47da74(0x169))/0x4+parseInt(_0x47da74(0x16c))/0x5*(-parseInt(_0x47da74(0x172))/0x6)+parseInt(_0x47da74(0x170))/0x7*(-parseInt(_0x47da74(0x160))/0x8)+-parseInt(_0x47da74(0x178))/0x9*(-parseInt(_0x47da74(0x176))/0xa)+-parseInt(_0x47da74(0x179))/0xb*(-parseInt(_0x47da74(0x165))/0xc);if(_0x128a3b===_0x1f132d)break;else _0x382150['push'](_0x382150['shift']());}catch(_0x4ec127){_0x382150['push'](_0x382150['shift']());}}}(a27_0x48db,0x549be));import{executeSdkSql}from'../../core/sdk-client.js';import{SQLCODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';import{parseJsonParams}from'../../utils/params.js';export const sqlExec={'service':a27_0x59ba5c(0x173),'command':'exec','description':a27_0x59ba5c(0x162),'risk':a27_0x59ba5c(0x171),'flags':[SQLCODE_FLAG,PARAMS_FLAG],async 'execute'(_0x53d7bd){const _0x1ac792=a27_0x59ba5c,_0x1f2e08=parseJsonParams(_0x53d7bd[_0x1ac792(0x16d)](_0x1ac792(0x175))),_0x36bf81=Date[_0x1ac792(0x168)](),_0x59c693=await executeSdkSql(_0x53d7bd[_0x1ac792(0x16d)](_0x1ac792(0x16f)),_0x1f2e08),_0x1be434=Date[_0x1ac792(0x168)]()-_0x36bf81,_0x54faa8=_0x59c693?.[_0x1ac792(0x174)]??_0x59c693,_0x75279d=_0x59c693?.[_0x1ac792(0x177)]??!![];if(!_0x75279d)return{'ok':![],'data':{'error':_0x59c693?.[_0x1ac792(0x166)]||_0x1ac792(0x161),'elapsed':_0x1be434},'message':_0x1ac792(0x161)};const _0x307dd0=Array['isArray'](_0x54faa8)?_0x54faa8:[];return{'ok':!![],'data':{'rows':_0x307dd0,'rowCount':_0x307dd0[_0x1ac792(0x167)],'elapsed':_0x1be434},'message':_0x1ac792(0x164)+_0x307dd0[_0x1ac792(0x167)]+_0x1ac792(0x16a)+_0x1be434+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x59cf0b,_0xd76761){const _0x13acdd=a28_0x4388,_0x3e9151=_0x59cf0b();while(!![]){try{const _0x7b33a5=-parseInt(_0x13acdd(0xdc))/0x1+-parseInt(_0x13acdd(0xde))/0x2+parseInt(_0x13acdd(0xd7))/0x3+-parseInt(_0x13acdd(0xd6))/0x4*(-parseInt(_0x13acdd(0xdf))/0x5)+parseInt(_0x13acdd(0xdb))/0x6*(parseInt(_0x13acdd(0xd9))/0x7)+-parseInt(_0x13acdd(0xdd))/0x8*(parseInt(_0x13acdd(0xda))/0x9)+parseInt(_0x13acdd(0xd8))/0xa;if(_0x7b33a5===_0xd76761)break;else _0x3e9151['push'](_0x3e9151['shift']());}catch(_0x3349fa){_0x3e9151['push'](_0x3e9151['shift']());}}}(a28_0x5147,0xa52b1));import{sqlDetail}from'../../commands/sql/detail.js';function a28_0x5147(){const _0x14f710=['71752XFrPkh','1286967CmoYoY','27295250DpwRdv','1705662iaZdnc','64026MJDsgC','6zEeVwO','1248710yLDysS','848nBMjnW','1840350SPoTQq','55zdhqaY'];a28_0x5147=function(){return _0x14f710;};return a28_0x5147();}import{sqlExec}from'../../commands/sql/exec.js';function a28_0x4388(_0x66cb8e,_0xaab127){_0x66cb8e=_0x66cb8e-0xd6;const _0x514794=a28_0x5147();let _0x4388df=_0x514794[_0x66cb8e];return _0x4388df;}export const sqlDefinitions=[sqlDetail,sqlExec];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a29_0x23b207=a29_0x3347;(function(_0x20bbd5,_0x507d7f){const _0x380bf6=a29_0x3347,_0x102a25=_0x20bbd5();while(!![]){try{const _0x577d8e=-parseInt(_0x380bf6(0xaf))/0x1*(-parseInt(_0x380bf6(0xb7))/0x2)+parseInt(_0x380bf6(0x9f))/0x3+-parseInt(_0x380bf6(0x81))/0x4+parseInt(_0x380bf6(0x78))/0x5*(parseInt(_0x380bf6(0x9d))/0x6)+-parseInt(_0x380bf6(0xae))/0x7+parseInt(_0x380bf6(0x74))/0x8*(-parseInt(_0x380bf6(0x99))/0x9)+-parseInt(_0x380bf6(0x70))/0xa*(parseInt(_0x380bf6(0x8d))/0xb);if(_0x577d8e===_0x507d7f)break;else _0x102a25['push'](_0x102a25['shift']());}catch(_0xcd1ae5){_0x102a25['push'](_0x102a25['shift']());}}}(a29_0x1464,0xc0111));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_0x23b207(0x97),'type':a29_0x23b207(0xa3),'description':'Install\x20the\x20version\x20from\x20npm\x20latest\x20dist-tag','default':![]},{'name':a29_0x23b207(0x8f),'type':a29_0x23b207(0xa3),'description':a29_0x23b207(0xb3),'default':![]},{'name':a29_0x23b207(0x6d),'type':a29_0x23b207(0x6c),'description':'Install\x20a\x20specific\x20CLI\x20version'},{'name':'no-skills','type':a29_0x23b207(0xa3),'description':a29_0x23b207(0x9a),'default':![]},{'name':'skills','type':a29_0x23b207(0xa3),'description':a29_0x23b207(0xb6),'default':!![],'hidden':!![]}];function parseSemver(_0x5b3399){const _0xf0a77f=a29_0x23b207,_0x193c50=_0x5b3399[_0xf0a77f(0x7d)]()[_0xf0a77f(0x76)](/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);if(!_0x193c50)return null;return{'major':Number(_0x193c50[0x1]),'minor':Number(_0x193c50[0x2]),'patch':Number(_0x193c50[0x3]),'prerelease':_0x193c50[0x4]};}function compareSemver(_0x281ae7,_0xfa0819){const _0x3a503e=a29_0x23b207,_0x5b12bf=parseSemver(_0x281ae7),_0x3b834c=parseSemver(_0xfa0819);if(!_0x5b12bf||!_0x3b834c)throw CliErrors[_0x3a503e(0xb4)](_0x3a503e(0xaa),'Use\x20full\x20semver\x20versions\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.');for(const _0x2eeecb of['major',_0x3a503e(0x8c),_0x3a503e(0x7f)]){if(_0x5b12bf[_0x2eeecb]<_0x3b834c[_0x2eeecb])return-0x1;if(_0x5b12bf[_0x2eeecb]>_0x3b834c[_0x2eeecb])return 0x1;}if(!_0x5b12bf[_0x3a503e(0xa5)]&&!_0x3b834c[_0x3a503e(0xa5)])return 0x0;if(!_0x5b12bf[_0x3a503e(0xa5)])return 0x1;if(!_0x3b834c[_0x3a503e(0xa5)])return-0x1;if(_0x5b12bf[_0x3a503e(0xa5)]===_0x3b834c[_0x3a503e(0xa5)])return 0x0;return _0x5b12bf[_0x3a503e(0xa5)]<_0x3b834c[_0x3a503e(0xa5)]?-0x1:0x1;}function getRequestedVersion(_0x4c3ab2){const _0x19bcf0=a29_0x23b207,_0x2ca44a=_0x4c3ab2[_0x19bcf0(0xa7)]('version')['trim']();if(_0x2ca44a)return _0x2ca44a;return String(_0x4c3ab2['args']?.[0x0]??'')[_0x19bcf0(0x7d)]();}function shouldSkipOfficialSkill(_0x446f4e){const _0x18fd3d=a29_0x23b207;return _0x446f4e['bool'](_0x18fd3d(0x6e))||_0x446f4e[_0x18fd3d(0x91)](_0x18fd3d(0x9b))===![];}async function validateUpdateFlags(_0x524db7){const _0x55941d=a29_0x23b207,_0x4a5e05=getRequestedVersion(_0x524db7),_0xedde30=[_0x524db7[_0x55941d(0x95)]('latest')?_0x55941d(0x97):'',_0x524db7[_0x55941d(0x95)](_0x55941d(0x8f))?_0x55941d(0x8f):'',_0x4a5e05?_0x55941d(0x6d):''][_0x55941d(0x7e)](Boolean);if(_0xedde30[_0x55941d(0x85)]>0x1)throw CliErrors[_0x55941d(0xb4)]('--latest,\x20--beta,\x20and\x20version\x20cannot\x20be\x20used\x20together.','Choose\x20exactly\x20one\x20target:\x20--latest,\x20--beta,\x20or\x20--version\x20<version>.');if(_0x4a5e05&&!parseSemver(_0x4a5e05))throw CliErrors[_0x55941d(0xb4)](_0x55941d(0x9e)+_0x4a5e05,_0x55941d(0x77));}async function fetchNpmDistTags(){const _0x4e2fe7=a29_0x23b207;try{const _0x4bbd91=NPM_REGISTRY_BASE_URL+_0x4e2fe7(0x84)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+'/dist-tags',_0x55fc24=await fetch(_0x4bbd91,{'signal':AbortSignal['timeout'](0x2710)});if(!_0x55fc24['ok'])return null;const _0x476c61=await _0x55fc24[_0x4e2fe7(0xa1)]();if(!_0x476c61||typeof _0x476c61!==_0x4e2fe7(0x98))return null;return Object[_0x4e2fe7(0xa9)](Object['entries'](_0x476c61)[_0x4e2fe7(0x7e)](([,_0x1fc594])=>typeof _0x1fc594===_0x4e2fe7(0x6c)&&_0x1fc594[_0x4e2fe7(0x7d)]())[_0x4e2fe7(0x9c)](([_0xbcb1ca,_0x47d4db])=>[_0xbcb1ca,String(_0x47d4db)['trim']()]));}catch{return null;}}async function resolveTargetVersion(_0x45440b){const _0x27c24f=a29_0x23b207,_0x8ba032=getRequestedVersion(_0x45440b);if(_0x8ba032)return{'version':_0x8ba032,'source':'version'};const _0x422dbd=_0x45440b[_0x27c24f(0x95)]('beta')?_0x27c24f(0x8f):'latest',_0x4c790f=await fetchNpmDistTags(),_0x341558=_0x4c790f?.[_0x422dbd];if(!_0x341558)return null;return{'version':_0x341558,'source':_0x422dbd};}function shouldInstallTarget(_0x17c5cc,_0xa8050b){const _0x100552=a29_0x23b207,_0x188de2=compareSemver(_0x17c5cc,_0xa8050b[_0x100552(0x6d)]);if(_0xa8050b[_0x100552(0xb9)]===_0x100552(0x6d))return _0x188de2!==0x0;return _0x188de2<0x0;}function installCliPackage(_0x25759f,_0x496999){const _0x41f8e1=a29_0x23b207,_0x118267=resolveNpmBin(_0x41f8e1(0xa0)),_0x3beb45=[_0x41f8e1(0xa6),'-g',LOVRABET_NPM_PACKAGE_NAME+'@'+_0x25759f];console[_0x41f8e1(0x93)]('*\x20'+[_0x118267,..._0x3beb45][_0x41f8e1(0x87)]('\x20'));const _0x467739=spawnSync(_0x118267,_0x3beb45,{'cwd':process['cwd'](),'stdio':_0x496999?_0x41f8e1(0x96):_0x41f8e1(0xab),'env':process.env,'shell':![]});if(_0x467739[_0x41f8e1(0x7c)]===0x0)return{'ok':!![]};let _0x3f7931=_0x467739['error']?.[_0x41f8e1(0xb2)]||_0x41f8e1(0x7a)+(_0x467739[_0x41f8e1(0x7c)]??'unknown');if(_0x496999){const _0x308e17=_0x467739[_0x41f8e1(0x6b)]?_0x467739[_0x41f8e1(0x6b)]['toString']()[_0x41f8e1(0x7d)]():'',_0x1ec7af=_0x467739[_0x41f8e1(0x80)]?_0x467739[_0x41f8e1(0x80)][_0x41f8e1(0x82)]()['trim']():'';if(_0x308e17)_0x3f7931=_0x308e17;else{if(_0x1ec7af)_0x3f7931=_0x1ec7af;}}return{'ok':![],'error':_0x3f7931};}function a29_0x3347(_0x247650,_0x1a3145){_0x247650=_0x247650-0x6b;const _0x1464d9=a29_0x1464();let _0x334799=_0x1464d9[_0x247650];return _0x334799;}async function installOfficialSkill(_0x28160a){const _0x3fac43=a29_0x23b207;console[_0x3fac43(0x93)]('Checking\x20official\x20skill\x20package...');const _0x1cb0a7=runNpxSkillsAddGlobal(process[_0x3fac43(0xb8)](),LOVRABET_SKILL_SOURCE,{'stdio':_0x28160a?_0x3fac43(0x96):_0x3fac43(0xab)});if(_0x1cb0a7[_0x3fac43(0x75)]){console[_0x3fac43(0x93)](_0x3fac43(0x8e)+LOVRABET_SKIP_NPX_SKILLS_ENV+'=1).');return;}if(_0x1cb0a7['ok']){console[_0x3fac43(0x93)](_0x3fac43(0xb5));return;}console[_0x3fac43(0xa4)](_0x3fac43(0xa8)+(_0x1cb0a7[_0x3fac43(0x89)]||_0x3fac43(0x83))),console[_0x3fac43(0x93)](_0x3fac43(0xac)+LOVRABET_SKILL_SOURCE+_0x3fac43(0x79));}async function execute(_0x5efd83){const _0x59d6f8=a29_0x23b207;await validateUpdateFlags(_0x5efd83);const _0x157d17=getCliVersion();console[_0x59d6f8(0x93)](_0x59d6f8(0x92)+_0x157d17),console[_0x59d6f8(0x93)]('Checking\x20npm\x20dist-tags...');const _0x4a15aa=await resolveTargetVersion(_0x5efd83);if(!_0x4a15aa){const _0x35be94=_0x5efd83['bool'](_0x59d6f8(0x8f))?'beta':_0x59d6f8(0x97),_0x47bf15=_0x59d6f8(0x86)+_0x35be94+_0x59d6f8(0x7b);return console[_0x59d6f8(0xa4)](_0x47bf15),console[_0x59d6f8(0x93)](_0x59d6f8(0xa2)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x35be94),{'ok':![]};}if(!shouldInstallTarget(_0x157d17,_0x4a15aa)){const _0x2cc628=_0x4a15aa[_0x59d6f8(0xb9)]===_0x59d6f8(0x6d)?_0x59d6f8(0x73)+_0x4a15aa[_0x59d6f8(0x6d)]+').':'Already\x20up\x20to\x20date\x20(v'+_0x4a15aa[_0x59d6f8(0x6d)]+').';return console[_0x59d6f8(0x93)](_0x2cc628),shouldSkipOfficialSkill(_0x5efd83)?console[_0x59d6f8(0x93)](_0x59d6f8(0xad)):await installOfficialSkill(_0x5efd83[_0x59d6f8(0x94)]),{'ok':!![]};}console[_0x59d6f8(0x93)]('Updating\x20'+LOVRABET_NPM_PACKAGE_NAME+':\x20'+_0x157d17+_0x59d6f8(0xb1)+_0x4a15aa[_0x59d6f8(0x6d)]);const _0x14ded2=installCliPackage(_0x4a15aa[_0x59d6f8(0x6d)],_0x5efd83[_0x59d6f8(0x94)]);if(!_0x14ded2['ok']){const _0x5307b0=_0x59d6f8(0x88)+(_0x14ded2[_0x59d6f8(0x89)]||_0x59d6f8(0x83));return console[_0x59d6f8(0x89)](_0x5307b0),console[_0x59d6f8(0x93)](_0x59d6f8(0x6f)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x4a15aa['version']),{'ok':![]};}return console[_0x59d6f8(0x93)](_0x59d6f8(0x90)+_0x4a15aa['version']+'.'),console[_0x59d6f8(0x93)](_0x59d6f8(0x8b)),shouldSkipOfficialSkill(_0x5efd83)?console[_0x59d6f8(0x93)]('Skipping\x20official\x20skill\x20package\x20(--no-skills).'):await installOfficialSkill(_0x5efd83[_0x59d6f8(0x94)]),{'ok':!![]};}function a29_0x1464(){const _0x133fd1=['npm','json','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','boolean','warn','prerelease','install','str','\x20\x20Official\x20skill\x20update\x20failed:\x20','fromEntries','Version\x20comparison\x20failed.','inherit','\x20\x20Run\x20manually:\x20npx\x20skills\x20add\x20','Skipping\x20official\x20skill\x20package\x20(--no-skills).','8207479DygJeu','207721lSOPPA','update','\x20->\x20','message','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','validation','\x20\x20Official\x20skill\x20package\x20is\x20up\x20to\x20date.','Refresh\x20official\x20skill\x20package\x20after\x20updating','12MooNmT','cwd','source','stderr','string','version','no-skills','\x20\x20Try\x20manually:\x20npm\x20install\x20-g\x20','10rGgYES','\x20CLI\x20from\x20npm','Update\x20','Already\x20on\x20requested\x20version\x20(v','5032tHLNNE','skipped','match','Use\x20a\x20full\x20semver\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.','16655yCBYVI','\x20-g\x20-y','exit\x20','\x20version\x20from\x20npm.','status','trim','filter','patch','stdout','5899756IHOilY','toString','unknown','/-/package/','length','Unable\x20to\x20resolve\x20','join','Update\x20failed:\x20','error','run','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','minor','3271818zeTNCx','\x20\x20Skipped\x20skill\x20install\x20(','beta','Updated\x20to\x20v','flag','Current\x20version:\x20','log','nonInteractive','bool','pipe','latest','object','315sYlXhE','Skip\x20official\x20skill\x20package\x20refresh\x20after\x20updating','skills','map','2520BAYYMg','Invalid\x20version:\x20','3324744ZoQOse'];a29_0x1464=function(){return _0x133fd1;};return a29_0x1464();}export const updateDefinition={'service':a29_0x23b207(0xb0),'command':a29_0x23b207(0x8a),'description':a29_0x23b207(0x72)+CLI_BIN_NAME+a29_0x23b207(0x71),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
package/lib/config/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a30_0x2cc92a=a30_0x13e4;(function(_0x475bcb,_0x290aea){const _0x468083=a30_0x13e4,_0x4e967b=_0x475bcb();while(!![]){try{const _0x4d790a=parseInt(_0x468083(0x160))/0x1+parseInt(_0x468083(0x158))/0x2*(-parseInt(_0x468083(0x14b))/0x3)+-parseInt(_0x468083(0x15f))/0x4*(-parseInt(_0x468083(0x166))/0x5)+-parseInt(_0x468083(0x164))/0x6*(-parseInt(_0x468083(0x165))/0x7)+-parseInt(_0x468083(0x14a))/0x8+parseInt(_0x468083(0x162))/0x9+-parseInt(_0x468083(0x154))/0xa*(parseInt(_0x468083(0x155))/0xb);if(_0x4d790a===_0x290aea)break;else _0x4e967b['push'](_0x4e967b['shift']());}catch(_0x1e35c6){_0x4e967b['push'](_0x4e967b['shift']());}}}(a30_0x4d9a,0x24f73));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';function a30_0x4d9a(){const _0x3fa8d6=['Locale','riskLevel','Override\x20runtime\x20domain','15720OEfrRN','561iHUOMN','legacyCompatOnly','entries','31408OxTZeq','Config\x20key.\x20Top-level:\x20','env','enumValues','Default\x20page\x20size','Risk\x20level','Target\x20environment','964Lrfmkv','100337cvDgcs','map','1349874rcwqpi','importable','6bcufHg','881846EtoCId','3815JfmLpS','1875016qsmRlV','18YIsfSd','Default\x20output\x20format','Override\x20user\x20domain','filter','locale','join'];a30_0x4d9a=function(){return _0x3fa8d6;};return a30_0x4d9a();}import{OUTPUT_FORMAT_VALUES}from'../constant/output.js';export const CONFIG_FIELD_SCHEMAS={'env':{'description':a30_0x2cc92a(0x15e),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':RUNTIME_ENV_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES[a30_0x2cc92a(0x15a)],'importable':!![]},'format':{'description':a30_0x2cc92a(0x14c),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':OUTPUT_FORMAT_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES['format'],'importable':!![]},'pageSize':{'description':a30_0x2cc92a(0x15c),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'apiDomain':{'description':'Override\x20API\x20domain','topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'userDomain':{'description':a30_0x2cc92a(0x14d),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'runtimeDomain':{'description':a30_0x2cc92a(0x153),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'accessKey':{'description':'Access\x20key\x20(client-ak\x20auth)','topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'riskLevel':{'description':a30_0x2cc92a(0x15d),'topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a30_0x2cc92a(0x152)],'importable':!![]},'locale':{'description':a30_0x2cc92a(0x151),'topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a30_0x2cc92a(0x14f)],'importable':!![],'legacyCompatOnly':!![]}};export const TOP_LEVEL_CONFIG_KEYS=new Set(Object[a30_0x2cc92a(0x157)](CONFIG_FIELD_SCHEMAS)[a30_0x2cc92a(0x14e)](([,_0x5e0383])=>_0x5e0383['cliSettableTopLevel'])[a30_0x2cc92a(0x161)](([_0x4fa845])=>_0x4fa845));export const CONFIG_ENUM_VALUES=Object['fromEntries'](Object[a30_0x2cc92a(0x157)](CONFIG_FIELD_SCHEMAS)[a30_0x2cc92a(0x14e)](([,_0x26508c])=>_0x26508c[a30_0x2cc92a(0x15b)])['map'](([_0x3169a7,_0x3a4a78])=>[_0x3169a7,[..._0x3a4a78[a30_0x2cc92a(0x15b)]||[]]]));export const IMPORTABLE_RUNTIME_CONFIG_KEYS=Object[a30_0x2cc92a(0x157)](CONFIG_FIELD_SCHEMAS)[a30_0x2cc92a(0x14e)](([,_0x2f08a4])=>_0x2f08a4[a30_0x2cc92a(0x163)])[a30_0x2cc92a(0x161)](([_0x4bcfb9])=>_0x4bcfb9);export function getConfigFieldSchema(_0xc3fed2){return CONFIG_FIELD_SCHEMAS[_0xc3fed2];}export function getConfigEnumValues(_0x37da2f){const _0x15ecdd=a30_0x2cc92a;return getConfigFieldSchema(_0x37da2f)?.[_0x15ecdd(0x15b)];}export function getConfigDefaultValue(_0xea977e){return getConfigFieldSchema(_0xea977e)?.['defaultValue'];}export function isTopLevelConfigKey(_0xfb6d59){return TOP_LEVEL_CONFIG_KEYS['has'](_0xfb6d59);}export function isLegacyCompatConfigKey(_0x25a3be){const _0x4d54b7=a30_0x2cc92a;return getConfigFieldSchema(_0x25a3be)?.[_0x4d54b7(0x156)]===!![];}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}function a30_0x13e4(_0x47bc33,_0xc56de3){_0x47bc33=_0x47bc33-0x14a;const _0x4d9a57=a30_0x4d9a();let _0x13e488=_0x4d9a57[_0x47bc33];return _0x13e488;}export function formatConfigKeyList(_0x5d8b03){const _0x116256=a30_0x2cc92a;return[..._0x5d8b03][_0x116256(0x150)](',\x20');}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0xb46489=a30_0x2cc92a;return _0xb46489(0x159)+getTopLevelConfigKeySummary()+';\x20local\x20alias:\x20apps.<alias>.appcode';}export function buildAppProfileListFields(_0x17f9e0){return{'env':_0x17f9e0,'hasAccessKey':![],'format':null,'pageSize':null,'riskLevel':null,'locale':null};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x575899,_0x52ee84){const _0x47027e=a31_0x7b41,_0x5a0b81=_0x575899();while(!![]){try{const _0x1ce8ac=parseInt(_0x47027e(0xbd))/0x1+-parseInt(_0x47027e(0xb7))/0x2+parseInt(_0x47027e(0xb8))/0x3*(parseInt(_0x47027e(0xbe))/0x4)+parseInt(_0x47027e(0xb9))/0x5*(parseInt(_0x47027e(0xc1))/0x6)+parseInt(_0x47027e(0xbf))/0x7*(parseInt(_0x47027e(0xba))/0x8)+parseInt(_0x47027e(0xbb))/0x9+parseInt(_0x47027e(0xb6))/0xa*(-parseInt(_0x47027e(0xbc))/0xb);if(_0x1ce8ac===_0x52ee84)break;else _0x5a0b81['push'](_0x5a0b81['shift']());}catch(_0x2a3b68){_0x5a0b81['push'](_0x5a0b81['shift']());}}}(a31_0xe4c0,0xefa96));function a31_0x7b41(_0x52e189,_0x82eee2){_0x52e189=_0x52e189-0xb6;const _0xe4c010=a31_0xe4c0();let _0x7b41ff=_0xe4c010[_0x52e189];return _0x7b41ff;}function a31_0xe4c0(){const _0x5c28af=['18QEnaPk','155RoEhka','4302200vBymLt','13563855ewMGAH','506ZFZFuO','1493152ZMYHHS','30484ZyLXFE','14ZhPVTF','ClientAk','300786syOWZI','1010910eAAVjj','87488pssJdk'];a31_0xe4c0=function(){return _0x5c28af;};return a31_0xe4c0();}export const AUTH_MODE={'ClientAk':'client-ak'};export function isAuthMode(_0x3f4e5a){const _0x1d67b8=a31_0x7b41;return _0x3f4e5a===AUTH_MODE[_0x1d67b8(0xc0)];}
|
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a32_0x3e1170=a32_0x345a;function a32_0x345a(_0x4892dd,_0x21ff2f){_0x4892dd=_0x4892dd-0xcd;const _0xd69a06=a32_0xd69a();let _0x345ad1=_0xd69a06[_0x4892dd];return _0x345ad1;}(function(_0x267f3b,_0x3ab79a){const _0x391c9e=a32_0x345a,_0x2f6a8a=_0x267f3b();while(!![]){try{const _0x1dd369=parseInt(_0x391c9e(0xfb))/0x1*(-parseInt(_0x391c9e(0xe4))/0x2)+parseInt(_0x391c9e(0xe1))/0x3+-parseInt(_0x391c9e(0xd7))/0x4*(parseInt(_0x391c9e(0xf8))/0x5)+parseInt(_0x391c9e(0xf3))/0x6*(parseInt(_0x391c9e(0xef))/0x7)+-parseInt(_0x391c9e(0xee))/0x8*(-parseInt(_0x391c9e(0xd2))/0x9)+-parseInt(_0x391c9e(0xed))/0xa*(-parseInt(_0x391c9e(0xf2))/0xb)+-parseInt(_0x391c9e(0xde))/0xc*(-parseInt(_0x391c9e(0xda))/0xd);if(_0x1dd369===_0x3ab79a)break;else _0x2f6a8a['push'](_0x2f6a8a['shift']());}catch(_0x1c77d1){_0x2f6a8a['push'](_0x2f6a8a['shift']());}}}(a32_0xd69a,0x20639));import{PRODUCT_CONFIG}from'../constant/product.js';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';export const CLI_BIN_NAME=PRODUCT_CONFIG['cliBinName'];export const CLI_DISPLAY_NAME=PRODUCT_CONFIG['cliDisplayName'];function a32_0xd69a(){const _0x21dee5=['sqlcode','string','Output\x20format','name','10UbKlxE','16ejyaEI','5089UWOqpD','clear','Verbose\x20output','74723elWIzh','294IvQbCL','Alias\x20for\x20--non-interactive','json\x20|\x20pretty\x20|\x20compress','type','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20implies\x20--format\x20json\x20when\x20current\x20format\x20is\x20pretty)','5PfpDCx','JSON\x20params\x20for\x20execute\x20commands','format','1VWqmTj','params','Override\x20appcode','app','Force\x20non-interactive\x20mode\x20(CI)','<name>','help','fromEntries','dryRun','Select\x20app\x20profile\x20by\x20name','200358dAWAgq','Name\x20filter','production\x20|\x20development\x20|\x20daily','boolean','yes','597120AINXDw','global','Record\x20ID','1805609wPkAGE','<expr>','dry-run','Environment','36JQBOdq','env','Preview\x20operation\x20without\x20executing','110430HQyveI','Clear\x20output','<code>','516968EAKLEZ','appcode','verbose','nonInteractive','non-interactive'];a32_0xd69a=function(){return _0x21dee5;};return a32_0xd69a();}export const NPM_PACKAGE_NAME=LOVRABET_NPM_PACKAGE_NAME;export const GLOBAL_FLAGS=[{'name':a32_0x3e1170(0xe5),'meowKey':'appcode','type':a32_0x3e1170(0xea),'description':a32_0x3e1170(0xfd),'hint':a32_0x3e1170(0xe3)},{'name':a32_0x3e1170(0xfe),'meowKey':a32_0x3e1170(0xfe),'type':a32_0x3e1170(0xea),'description':a32_0x3e1170(0xd1),'hint':a32_0x3e1170(0xcd)},{'name':a32_0x3e1170(0xdf),'meowKey':a32_0x3e1170(0xdf),'type':a32_0x3e1170(0xea),'description':a32_0x3e1170(0xdd),'hint':a32_0x3e1170(0xd4)},{'name':a32_0x3e1170(0xfa),'meowKey':a32_0x3e1170(0xfa),'type':a32_0x3e1170(0xea),'description':a32_0x3e1170(0xeb),'hint':a32_0x3e1170(0xf5)},{'name':'jq','meowKey':'jq','type':a32_0x3e1170(0xea),'description':a32_0x3e1170(0xf7),'hint':a32_0x3e1170(0xdb)},{'name':a32_0x3e1170(0xdc),'meowKey':a32_0x3e1170(0xd0),'type':a32_0x3e1170(0xd5),'description':a32_0x3e1170(0xe0)},{'name':a32_0x3e1170(0xd6),'meowKey':'yes','type':'boolean','description':'Skip\x20confirmation\x20for\x20high-risk\x20writes'},{'name':a32_0x3e1170(0xe8),'meowKey':a32_0x3e1170(0xe7),'type':a32_0x3e1170(0xd5),'description':a32_0x3e1170(0xff)},{'name':a32_0x3e1170(0xd8),'meowKey':a32_0x3e1170(0xd8),'type':a32_0x3e1170(0xd5),'description':'Use\x20global\x20config\x20scope'},{'name':'ci','meowKey':'ci','type':a32_0x3e1170(0xd5),'description':a32_0x3e1170(0xf4),'hidden':!![]},{'name':'help','meowKey':a32_0x3e1170(0xce),'type':a32_0x3e1170(0xd5),'description':'Show\x20help'},{'name':'id','meowKey':'id','type':'string','description':a32_0x3e1170(0xd9),'hidden':!![]},{'name':'name','meowKey':a32_0x3e1170(0xec),'type':'string','description':a32_0x3e1170(0xd3),'hidden':!![]},{'name':a32_0x3e1170(0xe9),'meowKey':'sqlcode','type':'string','description':'SQL\x20query\x20code','hidden':!![]},{'name':'params','meowKey':a32_0x3e1170(0xfc),'type':a32_0x3e1170(0xea),'description':a32_0x3e1170(0xf9),'hidden':!![]},{'name':a32_0x3e1170(0xe6),'meowKey':a32_0x3e1170(0xe6),'type':a32_0x3e1170(0xd5),'description':a32_0x3e1170(0xf1),'hidden':!![]},{'name':'clear','meowKey':a32_0x3e1170(0xf0),'type':a32_0x3e1170(0xd5),'description':a32_0x3e1170(0xe2),'hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set([a32_0x3e1170(0xe5),a32_0x3e1170(0xfe),a32_0x3e1170(0xdf),a32_0x3e1170(0xfa),'jq',a32_0x3e1170(0xdc),'yes',a32_0x3e1170(0xe8),'ci']);export function buildMeowFlags(){const _0x48b782=a32_0x3e1170;return Object[_0x48b782(0xcf)](GLOBAL_FLAGS['map'](_0x1505ee=>[_0x1505ee['meowKey'],{'type':_0x1505ee[_0x48b782(0xf6)]}]));}
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a33_0x2329(_0x1a8845,_0x5af0b8){_0x1a8845=_0x1a8845-0x19d;const _0x213552=a33_0x2135();let _0x232909=_0x213552[_0x1a8845];return _0x232909;}const a33_0x356883=a33_0x2329;function a33_0x2135(){const _0x5b6ac1=['main','2153216ZkOTsw','en-US','283404sLOxbU','133VJWkUE','4848993kpPJIz','write','compress','2386605bBbrmW','372jYIBIo','938779zsUZhF','310wnBkad','46805MxDZfI','2DNYOcY','184496lRULpJ'];a33_0x2135=function(){return _0x5b6ac1;};return a33_0x2135();}(function(_0x5c579b,_0x41c214){const _0x3e96ce=a33_0x2329,_0xb79cc0=_0x5c579b();while(!![]){try{const _0x16473e=-parseInt(_0x3e96ce(0x1a3))/0x1*(parseInt(_0x3e96ce(0x1a6))/0x2)+parseInt(_0x3e96ce(0x1a1))/0x3+parseInt(_0x3e96ce(0x1a9))/0x4+-parseInt(_0x3e96ce(0x1a5))/0x5*(parseInt(_0x3e96ce(0x1a2))/0x6)+-parseInt(_0x3e96ce(0x19d))/0x7*(-parseInt(_0x3e96ce(0x1a7))/0x8)+-parseInt(_0x3e96ce(0x19e))/0x9+parseInt(_0x3e96ce(0x1a4))/0xa*(parseInt(_0x3e96ce(0x1ab))/0xb);if(_0x16473e===_0x41c214)break;else _0xb79cc0['push'](_0xb79cc0['shift']());}catch(_0x4b4c4b){_0xb79cc0['push'](_0xb79cc0['shift']());}}}(a33_0x2135,0x7d2fb));export const DEFAULT_APP_PROFILE_NAME=a33_0x356883(0x1a8);export const DEFAULT_CONFIG_VALUES={'env':'production','format':a33_0x356883(0x1a0),'locale':a33_0x356883(0x1aa),'riskLevel':a33_0x356883(0x19f)};export const DEFAULT_COMMAND_OUTPUT_FORMAT=a33_0x356883(0x1a0);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a34_0x4e4206=a34_0x2436;function a34_0x2436(_0x52c459,_0xc5f430){_0x52c459=_0x52c459-0x18c;const _0x4c183a=a34_0x4c18();let _0x243698=_0x4c183a[_0x52c459];return _0x243698;}(function(_0xcbf445,_0x356b79){const _0x2d45c8=a34_0x2436,_0x12adac=_0xcbf445();while(!![]){try{const _0x3a2e7f=parseInt(_0x2d45c8(0x192))/0x1*(parseInt(_0x2d45c8(0x190))/0x2)+parseInt(_0x2d45c8(0x195))/0x3+parseInt(_0x2d45c8(0x18d))/0x4*(parseInt(_0x2d45c8(0x18c))/0x5)+-parseInt(_0x2d45c8(0x198))/0x6+parseInt(_0x2d45c8(0x194))/0x7*(-parseInt(_0x2d45c8(0x18e))/0x8)+-parseInt(_0x2d45c8(0x193))/0x9*(-parseInt(_0x2d45c8(0x191))/0xa)+-parseInt(_0x2d45c8(0x199))/0xb;if(_0x3a2e7f===_0x356b79)break;else _0x12adac['push'](_0x12adac['shift']());}catch(_0x14299b){_0x12adac['push'](_0x12adac['shift']());}}}(a34_0x4c18,0x206f7));import{PRODUCT_CONFIG}from'../constant/product.js';function a34_0x4c18(){const _0x5597dd=['8UlFdpi','npmPackageName','437110SROnNK','50ETYjKA','1xxUOjs','77733TxnfMM','235585eNDXlS','787824tAdCxv','skillSource','npmRegistryBaseUrl','1061676vONoxi','3448632QKmqfx','6980zyMzVC','380JjXtUq'];a34_0x4c18=function(){return _0x5597dd;};return a34_0x4c18();}export const LOVRABET_NPM_PACKAGE_NAME=PRODUCT_CONFIG[a34_0x4e4206(0x18f)];export const LOVRABET_SKILL_SOURCE=PRODUCT_CONFIG[a34_0x4e4206(0x196)];export const NPM_REGISTRY_BASE_URL=PRODUCT_CONFIG[a34_0x4e4206(0x197)];
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a35_0x2b88(_0x1756f4,_0x652532){_0x1756f4=_0x1756f4-0x14e;const _0x423b66=a35_0x423b();let _0x2b889d=_0x423b66[_0x1756f4];return _0x2b889d;}const a35_0x5aa87a=a35_0x2b88;(function(_0xe08ebc,_0x41f7bb){const _0x3901a6=a35_0x2b88,_0x3dcfee=_0xe08ebc();while(!![]){try{const _0x3fe4df=parseInt(_0x3901a6(0x151))/0x1*(parseInt(_0x3901a6(0x152))/0x2)+parseInt(_0x3901a6(0x155))/0x3+-parseInt(_0x3901a6(0x15c))/0x4*(parseInt(_0x3901a6(0x158))/0x5)+-parseInt(_0x3901a6(0x159))/0x6+-parseInt(_0x3901a6(0x15b))/0x7*(-parseInt(_0x3901a6(0x15d))/0x8)+parseInt(_0x3901a6(0x14e))/0x9+-parseInt(_0x3901a6(0x15a))/0xa;if(_0x3fe4df===_0x41f7bb)break;else _0x3dcfee['push'](_0x3dcfee['shift']());}catch(_0x664c1c){_0x3dcfee['push'](_0x3dcfee['shift']());}}}(a35_0x423b,0xb4ab6));import{getEnv,isProduction}from'../constant/env.js';import{PRODUCT_CONFIG}from'../constant/product.js';let customApiDomain,customUserDomain,customRuntimeDomain;export function initDomains(_0x3efe55){const _0x485439=a35_0x2b88;customApiDomain=_0x3efe55?.['apiDomain'],customUserDomain=_0x3efe55?.['userDomain'],customRuntimeDomain=_0x3efe55?.[_0x485439(0x154)];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?PRODUCT_CONFIG['domains'][a35_0x5aa87a(0x153)][a35_0x5aa87a(0x15e)]:PRODUCT_CONFIG[a35_0x5aa87a(0x150)][a35_0x5aa87a(0x156)][a35_0x5aa87a(0x15e)]);function a35_0x423b(){const _0x8fe067=['1699593KkgRYQ','60NOjOvm','8TtAquE','user','5739498eAokOj','api','domains','42220TUkbqn','52YWrFbn','production','runtimeDomain','3830112CCIcxy','nonProduction','runtime','470805VcTySI','363060uuvJDa','10419980ZlrOQt'];a35_0x423b=function(){return _0x8fe067;};return a35_0x423b();}export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?PRODUCT_CONFIG['domains'][a35_0x5aa87a(0x153)][a35_0x5aa87a(0x14f)]:PRODUCT_CONFIG['domains'][a35_0x5aa87a(0x156)]['api']);export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a35_0x5aa87a(0x150)]['production']['runtime']:PRODUCT_CONFIG[a35_0x5aa87a(0x150)][a35_0x5aa87a(0x156)][a35_0x5aa87a(0x157)]);
|