@lovrabet/lovrabet-cli 2.1.6-beta.1 → 2.1.6-beta.3
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/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.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/artifact/index.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/cli-skill/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/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.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 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.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 -1
- 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 -1
- 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/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.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/update-notice.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
package/lib/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
2
|
+
(function(_0x28bfa4,_0xfdc24f){const _0x1aa540=a0_0x3634,_0x5d8d4a=_0x28bfa4();while(!![]){try{const _0x21a8f6=parseInt(_0x1aa540(0x100))/0x1+-parseInt(_0x1aa540(0x11b))/0x2*(parseInt(_0x1aa540(0x11a))/0x3)+parseInt(_0x1aa540(0x111))/0x4*(-parseInt(_0x1aa540(0x10a))/0x5)+parseInt(_0x1aa540(0x117))/0x6+parseInt(_0x1aa540(0x115))/0x7*(-parseInt(_0x1aa540(0xf9))/0x8)+-parseInt(_0x1aa540(0x10e))/0x9*(parseInt(_0x1aa540(0x11f))/0xa)+parseInt(_0x1aa540(0x10c))/0xb;if(_0x21a8f6===_0xfdc24f)break;else _0x5d8d4a['push'](_0x5d8d4a['shift']());}catch(_0x17dcdb){_0x5d8d4a['push'](_0x5d8d4a['shift']());}}}(a0_0x2094,0xe4deb));import{jsx as a0_0x3fca12}from'react/jsx-runtime';function a0_0x3634(_0x1e51c2,_0x390e04){_0x1e51c2=_0x1e51c2-0xf7;const _0x209490=a0_0x2094();let _0x363489=_0x209490[_0x1e51c2];return _0x363489;}import a0_0x4affb0 from'meow';import{render}from'ink';import{Help}from'./help.js';import{CliError,CliErrors}from'./errors.js';function a0_0x2094(){const _0x4ca0ce=['corrected','unknownCommand','original','\x0aCancelled.\x0a','definition','657235sTpKwD','exit','40896119tXLvLH','defaultCommand','52902ekkZOz','ERR_USE_AFTER_CLOSE','flatMap','44WCRCpJ','log','./framework/preparse.js','cancelled','42QuAqgR','assign','280644DjpzVn','stderr','help','84GyamKD','64012RkLGyO',':\x20--','Unexpected\x20error:','flags','1940MweJkw','code','args','ExitPromptError','message','224336Hthlwb','slice','write','error','name','hint','length','823517bBxnJx','[preparse]\x20','handler','input','Error:\x20'];a0_0x2094=function(){return _0x4ca0ce;};return a0_0x2094();}import{buildConfigFromFlags,initGlobalEnvironment}from'./context.js';import{isKnownService,getServiceEntry,findDefinition,getAllDefinitions}from'./commands/registry.js';import{generateDynamicServiceHelp,resolveDynamicServiceCommand}from'./commands/service/dynamic.js';import{runCommand,createPipelineEnv}from'./framework/runner.js';import{generateCommandHelp,generateServiceHelp,generateFullHelp}from'./framework/help.js';import{buildMeowFlags}from'./constant/cli.js';import{getCliVersionDisplay}from'./utils/version.js';const helpText=generateFullHelp(),cli=a0_0x4affb0(helpText,{'importMeta':import.meta,'flags':buildMeowFlags(),'version':getCliVersionDisplay()});void main()['catch'](handleError);async function main(){try{await run();}catch(_0x2ed937){handleError(_0x2ed937);}}async function run(){const _0x12bb01=a0_0x3634;let _0x57ef59=cli[_0x12bb01(0x103)][0x0],_0x3307b4=cli[_0x12bb01(0x103)][0x1];const _0x2c3917=cli[_0x12bb01(0x11e)];try{const {correctFlags:_0x289d18}=await import(_0x12bb01(0x113)),_0x8b5263=getAllDefinitions()[_0x12bb01(0x110)](_0x52e88b=>_0x52e88b[_0x12bb01(0x11e)]??[]),{flags:_0x505d8e,corrections:_0x435cfb}=_0x289d18(_0x2c3917,_0x8b5263);if(_0x435cfb[_0x12bb01(0xff)]>0x0){for(const _0x437151 of _0x435cfb){process[_0x12bb01(0x118)][_0x12bb01(0xfb)](_0x12bb01(0x101)+_0x437151[_0x12bb01(0x102)]+_0x12bb01(0x11c)+_0x437151[_0x12bb01(0x107)]+'\x20->\x20--'+_0x437151[_0x12bb01(0x105)]+'\x0a');}Object['assign'](_0x2c3917,_0x505d8e);}}catch{}if(!_0x57ef59){const {waitUntilExit:_0xb12644}=render(a0_0x3fca12(Help,{}));await _0xb12644();return;}if(!isKnownService(_0x57ef59)){const _0x25be76=resolveDynamicServiceCommand(cli[_0x12bb01(0x103)],_0x2c3917);if(_0x25be76){if(_0x2c3917[_0x12bb01(0x119)]){console[_0x12bb01(0x112)](generateCommandHelp(_0x25be76[_0x12bb01(0x109)]));return;}Object[_0x12bb01(0x116)](_0x2c3917,_0x25be76[_0x12bb01(0x11e)]);const _0x325b41=buildConfigFromFlags(_0x2c3917);await initGlobalEnvironment(_0x325b41);const _0x5c3fab=createPipelineEnv(_0x325b41,_0x2c3917);_0x5c3fab[_0x12bb01(0x121)]=_0x25be76['args'],await runCommand(_0x25be76[_0x12bb01(0x109)],_0x5c3fab);return;}if(_0x2c3917[_0x12bb01(0x119)]){const _0x44948a=generateDynamicServiceHelp(_0x57ef59);if(_0x44948a){console[_0x12bb01(0x112)](_0x44948a);return;}}const {waitUntilExit:_0x319fed}=render(a0_0x3fca12(Help,{}));await _0x319fed();return;}const _0x209e64=getServiceEntry(_0x57ef59);if(!_0x3307b4){if(_0x2c3917[_0x12bb01(0x119)]){console['log'](generateServiceHelp(_0x57ef59));return;}if(_0x209e64['defaultCommand'])_0x3307b4=_0x209e64[_0x12bb01(0x10d)];else{console[_0x12bb01(0x112)](generateServiceHelp(_0x57ef59));return;}}const _0x194588=findDefinition(_0x57ef59,_0x3307b4);!_0x194588&&(console[_0x12bb01(0x112)](generateServiceHelp(_0x57ef59)),handleError(CliErrors[_0x12bb01(0x106)](_0x57ef59+'\x20'+_0x3307b4)));if(_0x2c3917['help']){console['log'](generateCommandHelp(_0x194588));return;}const _0x5bdd15=buildConfigFromFlags(_0x2c3917);await initGlobalEnvironment(_0x5bdd15);const _0x433dea=createPipelineEnv(_0x5bdd15,_0x2c3917);_0x433dea[_0x12bb01(0x121)]=cli['input'][_0x12bb01(0xfa)](0x2),await runCommand(_0x194588,_0x433dea);}function handleError(_0x309b6d){const _0x4a2bfe=a0_0x3634;if(_0x309b6d instanceof CliError){_0x309b6d[_0x4a2bfe(0x120)]===_0x4a2bfe(0x114)&&(process[_0x4a2bfe(0x118)]['write']('\x0aCancelled.\x0a'),process[_0x4a2bfe(0x10b)](0x0));console[_0x4a2bfe(0xfc)](_0x4a2bfe(0x104)+_0x309b6d[_0x4a2bfe(0xf8)]);if(_0x309b6d[_0x4a2bfe(0xfe)])console[_0x4a2bfe(0xfc)]('Hint:\x20'+_0x309b6d[_0x4a2bfe(0xfe)]);process[_0x4a2bfe(0x10b)](_0x309b6d['exitCode']);}isUserCancellation(_0x309b6d)&&(process[_0x4a2bfe(0x118)][_0x4a2bfe(0xfb)](_0x4a2bfe(0x108)),process[_0x4a2bfe(0x10b)](0x0)),console[_0x4a2bfe(0xfc)](_0x4a2bfe(0x11d),_0x309b6d),process[_0x4a2bfe(0x10b)](0x1);}function isUserCancellation(_0x450356){const _0x301043=a0_0x3634;if(!(_0x450356 instanceof Error))return![];if(_0x450356[_0x301043(0xfd)]===_0x301043(0xf7))return!![];if(_0x450356[_0x301043(0x120)]===_0x301043(0x10f))return!![];if(_0x450356['code']==='ERR_STREAM_DESTROYED')return!![];return![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a1_0x109946=a1_0x3a62;function a1_0x3a62(_0xde5546,_0x4f008e){_0xde5546=_0xde5546-0x92;const _0x43e483=a1_0x43e4();let _0x3a6280=_0x43e483[_0xde5546];return _0x3a6280;}function a1_0x43e4(){const _0x34b3a1=['已经知道记录\x20id,需要按数据集读取单条业务数据时使用','分页获取数据集列表','result\x20rows\x20contain\x20aggregate\x20aliases','131836QNYbOC','Returns\x20script\x20business\x20payload','Use\x20`having`\x20only\x20for\x20post-aggregation\x20filters.','trim','Search\x20docs\x20by\x20code,\x20summary,\x20path,\x20or\x20usage\x20text','dataset_detail','List\x20BF\x20endpoint\x20functions','Get\x20one\x20dataset\x20record','创建数据','None','489986LNOefT','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27','length','datasetCode','10kalkkp','需要按\x20groupBy\x20分组并做\x20count、sum、avg、max、min\x20等聚合统计时使用','/api/{appCode}/{datasetCode}/create','Returns\x20endpoint\x20functionName/id/description','需要携带\x20where、orderBy、分页等条件读取业务数据时使用','dataset_data_create','str','/api/custom/executeSql','custom_sql','获取数据集详情','path','Filter\x20docs\x20by\x20category,\x20for\x20example\x20dataset','{\x22fieldName\x22:\x22value\x22}','operations\x20describes\x20runtime\x20APIs','API\x20doc\x20code,\x20for\x20example\x20dataset_list','summary','##\x20Dataset\x20detail','dataset','read','find','Returns\x20one\x20matching\x20business\x20record','条件过滤查询数据','/api/dataset/get-dataset-list-by-app-code','6114663EaYhnJ','keyword','Prefer\x20`filter`\x20when\x20the\x20record\x20id\x20is\x20unknown.','filter','dataset_data_aggregate','##\x20Filter\x20dataset\x20data','##\x20Execute\x20custom\x20SQL\x0a\x0aExecute\x20a\x20configured\x20SQL\x20script\x20by\x20sqlCode.','Use\x20read-only\x20data\x20commands\x20before\x20writing\x20Artifacts\x20that\x20display\x20real\x20data.','dataset_data_filter','title','Show\x20runtime\x20API\x20documentation\x20by\x20code','获取应用下可调用的\x20BF\x20函数列表','执行自定义\x20SQL','includes','detail','1TYnEWq','tableData\x20contains\x20dataset\x20id/code/name','32-character\x20dataset\x20code','dataset_list','code','Aggregate\x20supports\x20COUNT,\x20SUM,\x20AVG,\x20MAX,\x20and\x20MIN\x20definitions\x20in\x20the\x20`aggregate`\x20array.','category','POST','/api/{appCode}/{datasetCode}/filter','Execute\x20custom\x20SQL','whenToUse','需要按\x20appCode\x20分页获取运行态数据集列表,并优先收敛可用\x20datasetCode\x20时使用','map','{\x22where\x22:{},\x22currentPage\x22:1,\x22pageSize\x22:20}','/api/dataset/getOneByCode?code={datasetCode}','522744BvRKMB','Inspect\x20field\x20names\x20and\x20operation\x20metadata\x20for\x20a\x20known\x20dataset\x20code.','where\x20filters\x20before\x20aggregation','dataset_data_get_one','list','{\x22id\x22:123}','查询单条数据','Execute\x20BF\x20endpoint\x20function','##\x20Aggregate\x20dataset\x20data','api-doc','validation','874104SgpGgD','Filter\x20dataset\x20data','lovrabet\x20dataset\x20detail\x20--code\x20<datasetCode>\x20--appcode\x20<appCode>','Use\x20`lovrabet\x20sql\x20detail`\x20before\x20execution.','/api/{appCode}/{datasetCode}/getOne','CLI\x20has\x20typed\x20`bff\x20detail`\x20and\x20`bff\x20exec`\x20commands\x20for\x20endpoint\x20scripts.','method','1596770WMdHLs','633951qoNrXe','lovrabet\x20dataset\x20list\x20--appcode\x20<appCode>\x20--format\x20compress','appCode','This\x20is\x20a\x20write\x20operation;\x20use\x20dry-run\x20when\x20available\x20and\x20safe\x20fixtures\x20for\x20smoke\x20tests.','{\x22appCode\x22:\x22app-aa63b188\x22,\x22sqlCode\x22:\x22xxxxxxxx-xxxxxxxx\x22,\x22params\x22:{}}','join','Returns\x20SQL\x20execution\x20payload','Create\x20dataset\x20record','{\x22param\x22:\x22value\x22}','##\x20Get\x20one\x20dataset\x20record\x0a\x0aRead\x20one\x20record\x20by\x20id.','##\x20List\x20datasets','string','bf_function_list','List\x20datasets','fields/properties\x20describe\x20data\x20shape','##\x20Create\x20dataset\x20record\x0a\x0aCreate\x20one\x20data\x20record\x20in\x20a\x20dataset.','`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','Returns\x20the\x20created\x20record\x20or\x20backend\x20operation\x20result','scriptName','需要按数据集\x20code\x20获取字段、表信息或操作定义时使用','Dataset\x20detail','需要先确认当前应用有哪些可执行的\x20BF/ENDPOINT\x20函数,以及收敛可用\x20scriptName\x20时使用','{\x22aggregate\x22:[{\x22column\x22:\x20\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[]}','lovrabet\x20bff\x20exec\x20--name\x20<functionName>\x20--params\x20\x27{}\x27','lovrabet\x20data\x20aggregate\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}]}\x27','lovrabet\x20data\x20create\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22name\x22:\x22demo\x22}\x27','bf_execute','toLowerCase','已经确认目标\x20BF\x20的\x20scriptName,且需要实际调用该\x20ENDPOINT\x20脚本完成业务操作时使用','custom_sql_execute','lovrabet\x20sql\x20exec\x20--sqlcode\x20<sqlCode>\x20--params\x20\x27{}\x27','执行指定\x20BF\x20函数','Current\x20app\x20code','已经确认目标\x20sqlCode\x20存在,并需要实际执行该自定义\x20SQL\x20时使用','Script\x20behavior\x20may\x20have\x20side\x20effects;\x20inspect\x20detail\x20first.','/api/endpoint/{appCode}/functions','GET'];a1_0x43e4=function(){return _0x34b3a1;};return a1_0x43e4();}(function(_0x42bd02,_0x480b61){const _0x55a6e7=a1_0x3a62,_0x20236a=_0x42bd02();while(!![]){try{const _0x2f60f3=parseInt(_0x55a6e7(0xd3))/0x1*(-parseInt(_0x55a6e7(0xa9))/0x2)+-parseInt(_0x55a6e7(0xf5))/0x3+-parseInt(_0x55a6e7(0x9f))/0x4*(parseInt(_0x55a6e7(0xad))/0x5)+-parseInt(_0x55a6e7(0xed))/0x6+parseInt(_0x55a6e7(0xf4))/0x7+-parseInt(_0x55a6e7(0xe2))/0x8+parseInt(_0x55a6e7(0xc4))/0x9;if(_0x2f60f3===_0x480b61)break;else _0x20236a['push'](_0x20236a['shift']());}catch(_0x191d15){_0x20236a['push'](_0x20236a['shift']());}}}(a1_0x43e4,0x2a8b6));import{CliErrors}from'../../errors.js';const CATEGORY_FLAG={'name':a1_0x109946(0xd9),'type':'string','description':a1_0x109946(0xb8)},KEYWORD_FLAG={'name':a1_0x109946(0xc5),'type':a1_0x109946(0x100),'description':a1_0x109946(0xa3)},DOC_CODE_FLAG={'name':a1_0x109946(0xd7),'type':a1_0x109946(0x100),'required':!![],'description':a1_0x109946(0xbb)},DOCS=[{'code':a1_0x109946(0xd6),'category':'dataset','title':a1_0x109946(0x102),'method':a1_0x109946(0xda),'path':a1_0x109946(0xc3),'summary':a1_0x109946(0x9d),'whenToUse':a1_0x109946(0xde),'pathParams':[],'queryParams':[],'bodySchema':'{\x22appCode\x22:\x22app-aa63b188\x22,\x22currentPage\x22:1,\x22pageSize\x22:100}','responseHighlights':[a1_0x109946(0xd4),'paging.totalCount\x20gives\x20total\x20rows'],'examples':[a1_0x109946(0xf6)],'notes':['CLI\x20users\x20should\x20prefer\x20`lovrabet\x20dataset\x20list`\x20for\x20this\x20workflow.'],'markdown':[a1_0x109946(0xff),'','Use\x20this\x20API\x20or\x20`lovrabet\x20dataset\x20list`\x20to\x20discover\x20available\x20dataset\x20codes\x20before\x20reading\x20data.']['join']('\x0a')},{'code':a1_0x109946(0xa4),'category':a1_0x109946(0xbe),'title':a1_0x109946(0x109),'method':a1_0x109946(0x9b),'path':a1_0x109946(0xe1),'summary':a1_0x109946(0xb6),'whenToUse':a1_0x109946(0x108),'pathParams':[],'queryParams':[{'name':a1_0x109946(0xd7),'description':a1_0x109946(0xd5)}],'bodySchema':'None','responseHighlights':[a1_0x109946(0x103),a1_0x109946(0xba)],'examples':[a1_0x109946(0xef)],'notes':['If\x20SDK\x20usage\x20is\x20needed,\x20follow\x20with\x20`lovrabet\x20dataset\x20sdk-doc\x20--code\x20<datasetCode>`.'],'markdown':[a1_0x109946(0xbd),'',a1_0x109946(0xe3)][a1_0x109946(0xfa)]('\x0a')},{'code':a1_0x109946(0xcc),'category':a1_0x109946(0xbe),'title':a1_0x109946(0xee),'method':a1_0x109946(0xda),'path':a1_0x109946(0xdb),'summary':a1_0x109946(0xc2),'whenToUse':a1_0x109946(0xb1),'pathParams':[{'name':a1_0x109946(0xf7),'description':a1_0x109946(0x97)},{'name':'datasetCode','description':a1_0x109946(0xd5)}],'queryParams':[],'bodySchema':a1_0x109946(0xe0),'responseHighlights':['tableData\x20contains\x20records','paging\x20contains\x20pagination'],'examples':['lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:5}\x27'],'notes':[a1_0x109946(0xcb)],'markdown':[a1_0x109946(0xc9),'','Use\x20`where`,\x20`select`,\x20`orderBy`,\x20`currentPage`,\x20and\x20`pageSize`\x20to\x20inspect\x20live\x20data\x20shape.'][a1_0x109946(0xfa)]('\x0a')},{'code':a1_0x109946(0xc8),'category':a1_0x109946(0xbe),'title':'Aggregate\x20dataset\x20data','method':a1_0x109946(0xda),'path':'/api/{appCode}/{datasetCode}/aggregate','summary':'聚合查询数据集数据','whenToUse':a1_0x109946(0xae),'pathParams':[{'name':a1_0x109946(0xf7),'description':a1_0x109946(0x97)},{'name':a1_0x109946(0xac),'description':a1_0x109946(0xd5)}],'queryParams':[],'bodySchema':a1_0x109946(0x10b),'responseHighlights':[a1_0x109946(0x9e),a1_0x109946(0xe4)],'examples':[a1_0x109946(0x10d)],'notes':[a1_0x109946(0xa1),a1_0x109946(0x105)],'markdown':[a1_0x109946(0xea),'',a1_0x109946(0xd8)][a1_0x109946(0xfa)]('\x0a')},{'code':a1_0x109946(0xe5),'category':'dataset','title':a1_0x109946(0xa6),'method':a1_0x109946(0xda),'path':a1_0x109946(0xf1),'summary':a1_0x109946(0xe8),'whenToUse':a1_0x109946(0x9c),'pathParams':[{'name':a1_0x109946(0xf7),'description':a1_0x109946(0x97)},{'name':a1_0x109946(0xac),'description':a1_0x109946(0xd5)}],'queryParams':[],'bodySchema':a1_0x109946(0xe7),'responseHighlights':[a1_0x109946(0xc1)],'examples':[a1_0x109946(0xaa)],'notes':[a1_0x109946(0xc6)],'markdown':a1_0x109946(0xfe)},{'code':a1_0x109946(0xb2),'category':a1_0x109946(0xbe),'title':a1_0x109946(0xfc),'method':a1_0x109946(0xda),'path':a1_0x109946(0xaf),'summary':a1_0x109946(0xa7),'whenToUse':'需要向指定数据集新增一条业务数据时使用','pathParams':[{'name':a1_0x109946(0xf7),'description':'Current\x20app\x20code'},{'name':a1_0x109946(0xac),'description':a1_0x109946(0xd5)}],'queryParams':[],'bodySchema':a1_0x109946(0xb9),'responseHighlights':[a1_0x109946(0x106)],'examples':[a1_0x109946(0x10e)],'notes':[a1_0x109946(0xf8)],'markdown':a1_0x109946(0x104)},{'code':a1_0x109946(0x101),'category':'bf','title':a1_0x109946(0xa5),'method':a1_0x109946(0x9b),'path':a1_0x109946(0x9a),'summary':a1_0x109946(0xcf),'whenToUse':a1_0x109946(0x10a),'pathParams':[{'name':'appCode','description':a1_0x109946(0x97)}],'queryParams':[],'bodySchema':a1_0x109946(0xa8),'responseHighlights':[a1_0x109946(0xb0)],'examples':['lovrabet\x20bff\x20detail\x20--id\x20<scriptId>\x20--appcode\x20<appCode>'],'notes':[a1_0x109946(0xf2)],'markdown':'##\x20List\x20BF\x20endpoint\x20functions\x0a\x0aDiscover\x20executable\x20endpoint\x20functions.'},{'code':a1_0x109946(0x10f),'category':'bf','title':a1_0x109946(0xe9),'method':a1_0x109946(0xda),'path':'/api/endpoint/{appCode}/{scriptName}','summary':a1_0x109946(0x96),'whenToUse':a1_0x109946(0x93),'pathParams':[{'name':'appCode','description':a1_0x109946(0x97)},{'name':a1_0x109946(0x107),'description':'Endpoint\x20function\x20name'}],'queryParams':[],'bodySchema':a1_0x109946(0xfd),'responseHighlights':[a1_0x109946(0xa0)],'examples':[a1_0x109946(0x10c)],'notes':[a1_0x109946(0x99)],'markdown':'##\x20Execute\x20BF\x20endpoint\x20function\x0a\x0aExecute\x20a\x20known\x20endpoint\x20script.'},{'code':a1_0x109946(0x94),'category':a1_0x109946(0xb5),'title':a1_0x109946(0xdc),'method':a1_0x109946(0xda),'path':a1_0x109946(0xb4),'summary':a1_0x109946(0xd0),'whenToUse':a1_0x109946(0x98),'pathParams':[],'queryParams':[],'bodySchema':a1_0x109946(0xf9),'responseHighlights':[a1_0x109946(0xfb)],'examples':[a1_0x109946(0x95)],'notes':[a1_0x109946(0xf0)],'markdown':a1_0x109946(0xca)}];function entrySummary(_0x246966){const _0x5e5faa=a1_0x109946;return{'code':_0x246966['code'],'category':_0x246966[_0x5e5faa(0xd9)],'method':_0x246966[_0x5e5faa(0xf3)],'path':_0x246966[_0x5e5faa(0xb7)],'summary':_0x246966[_0x5e5faa(0xbc)],'whenToUse':_0x246966['whenToUse']};}export function listApiDocEntries(_0x5e1300={}){const _0xdb1134=a1_0x109946,_0x37c11b=String(_0x5e1300[_0xdb1134(0xd9)]||'')[_0xdb1134(0xa2)](),_0x45f931=String(_0x5e1300[_0xdb1134(0xc5)]||'')['trim']()[_0xdb1134(0x92)]();return DOCS[_0xdb1134(0xc7)](_0x303152=>{const _0x5a97e5=_0xdb1134;if(_0x37c11b&&_0x303152[_0x5a97e5(0xd9)]!==_0x37c11b)return![];if(!_0x45f931)return!![];return[_0x303152['code'],_0x303152['category'],_0x303152[_0x5a97e5(0xf3)],_0x303152[_0x5a97e5(0xb7)],_0x303152[_0x5a97e5(0xbc)],_0x303152[_0x5a97e5(0xdd)],_0x303152[_0x5a97e5(0xcd)]][_0x5a97e5(0xfa)]('\x20')[_0x5a97e5(0x92)]()[_0x5a97e5(0xd1)](_0x45f931);})[_0xdb1134(0xdf)](entrySummary);}export function getApiDocDetail(_0x457627){const _0xc3e8aa=a1_0x109946,_0x1ae86a=DOCS[_0xc3e8aa(0xc0)](_0x151041=>_0x151041[_0xc3e8aa(0xd7)]===_0x457627);if(!_0x1ae86a)throw CliErrors[_0xc3e8aa(0xec)]('API\x20doc\x20code\x20not\x20found:\x20'+_0x457627);return{..._0x1ae86a};}const apiDocList={'service':a1_0x109946(0xeb),'command':a1_0x109946(0xe6),'description':'List\x20available\x20runtime\x20API\x20documentation\x20entries','risk':'read','requiresAppCode':![],'flags':[CATEGORY_FLAG,KEYWORD_FLAG],async 'execute'(_0x3006bc){const _0x28e597=a1_0x109946,_0x27299a=listApiDocEntries({'category':_0x3006bc[_0x28e597(0xb3)]('category'),'keyword':_0x3006bc['str'](_0x28e597(0xc5))});return{'ok':!![],'data':{'total':_0x27299a[_0x28e597(0xab)],'items':_0x27299a}};}},apiDocDetail={'service':a1_0x109946(0xeb),'command':a1_0x109946(0xd2),'description':a1_0x109946(0xce),'risk':a1_0x109946(0xbf),'requiresAppCode':![],'flags':[DOC_CODE_FLAG],async 'execute'(_0x5a67c8){const _0x47f7c1=a1_0x109946;return{'ok':!![],'data':getApiDocDetail(_0x5a67c8[_0x47f7c1(0xb3)](_0x47f7c1(0xd7)))};}};export const apiDocDefinitions=[apiDocList,apiDocDetail];
|
|
1
|
+
const a1_0x598b1c=a1_0x5ea5;function a1_0x5ea5(_0x1c1ab9,_0x3da796){_0x1c1ab9=_0x1c1ab9-0x88;const _0x197b53=a1_0x197b();let _0x5ea5f0=_0x197b53[_0x1c1ab9];return _0x5ea5f0;}(function(_0x4ed977,_0xb66dbe){const _0x46d565=a1_0x5ea5,_0x18e021=_0x4ed977();while(!![]){try{const _0x57cc13=-parseInt(_0x46d565(0x8d))/0x1+-parseInt(_0x46d565(0xd2))/0x2+-parseInt(_0x46d565(0xa9))/0x3*(parseInt(_0x46d565(0xdf))/0x4)+-parseInt(_0x46d565(0x88))/0x5*(parseInt(_0x46d565(0xee))/0x6)+-parseInt(_0x46d565(0x90))/0x7*(-parseInt(_0x46d565(0xfd))/0x8)+-parseInt(_0x46d565(0xd1))/0x9*(-parseInt(_0x46d565(0xb0))/0xa)+parseInt(_0x46d565(0xc7))/0xb;if(_0x57cc13===_0xb66dbe)break;else _0x18e021['push'](_0x18e021['shift']());}catch(_0x5b6e0f){_0x18e021['push'](_0x18e021['shift']());}}}(a1_0x197b,0xbf40a));import{CliErrors}from'../../errors.js';const CATEGORY_FLAG={'name':a1_0x598b1c(0xcd),'type':a1_0x598b1c(0xf4),'description':a1_0x598b1c(0xb6)},KEYWORD_FLAG={'name':a1_0x598b1c(0xb3),'type':a1_0x598b1c(0xf4),'description':a1_0x598b1c(0x8a)},DOC_CODE_FLAG={'name':'code','type':a1_0x598b1c(0xf4),'required':!![],'description':a1_0x598b1c(0xed)},DOCS=[{'code':a1_0x598b1c(0x9e),'category':'dataset','title':'List\x20datasets','method':a1_0x598b1c(0xe7),'path':'/api/dataset/get-dataset-list-by-app-code','summary':a1_0x598b1c(0xe5),'whenToUse':a1_0x598b1c(0xc8),'pathParams':[],'queryParams':[],'bodySchema':a1_0x598b1c(0x9f),'responseHighlights':[a1_0x598b1c(0xe3),a1_0x598b1c(0xde)],'examples':['lovrabet\x20dataset\x20list\x20--appcode\x20<appCode>\x20--format\x20compress'],'notes':[a1_0x598b1c(0xbf)],'markdown':[a1_0x598b1c(0xe9),'',a1_0x598b1c(0x98)][a1_0x598b1c(0xab)]('\x0a')},{'code':a1_0x598b1c(0xe1),'category':a1_0x598b1c(0xff),'title':'Dataset\x20detail','method':a1_0x598b1c(0xbc),'path':a1_0x598b1c(0xd3),'summary':a1_0x598b1c(0xc6),'whenToUse':a1_0x598b1c(0xb8),'pathParams':[],'queryParams':[{'name':a1_0x598b1c(0xb9),'description':a1_0x598b1c(0xcc)}],'bodySchema':a1_0x598b1c(0xc1),'responseHighlights':['fields/properties\x20describe\x20data\x20shape','relations\x20contains\x20the\x20object-shaped\x20API\x20relations\x20value\x20when\x20returned',a1_0x598b1c(0xbd)],'examples':['lovrabet\x20dataset\x20detail\x20--code\x20<datasetCode>\x20--appcode\x20<appCode>'],'notes':[a1_0x598b1c(0x96)],'markdown':[a1_0x598b1c(0xc9),'',a1_0x598b1c(0xf5)][a1_0x598b1c(0xab)]('\x0a')},{'code':a1_0x598b1c(0x100),'category':'dataset','title':a1_0x598b1c(0xda),'method':a1_0x598b1c(0xe7),'path':a1_0x598b1c(0xea),'summary':a1_0x598b1c(0xe4),'whenToUse':a1_0x598b1c(0x94),'pathParams':[{'name':a1_0x598b1c(0xaf),'description':a1_0x598b1c(0x9c)},{'name':a1_0x598b1c(0xc5),'description':a1_0x598b1c(0xcc)}],'queryParams':[],'bodySchema':a1_0x598b1c(0xdc),'responseHighlights':['tableData\x20contains\x20records',a1_0x598b1c(0xb2)],'examples':[a1_0x598b1c(0xe6)],'notes':[a1_0x598b1c(0xa8)],'markdown':[a1_0x598b1c(0xf8),'',a1_0x598b1c(0x8c)]['join']('\x0a')},{'code':a1_0x598b1c(0xf3),'category':'dataset','title':'Aggregate\x20dataset\x20data','method':a1_0x598b1c(0xe7),'path':'/api/{appCode}/{datasetCode}/aggregate','summary':a1_0x598b1c(0xf6),'whenToUse':'需要按\x20groupBy\x20分组并做\x20count、sum、avg、max、min\x20等聚合统计时使用','pathParams':[{'name':a1_0x598b1c(0xaf),'description':'Current\x20app\x20code'},{'name':'datasetCode','description':a1_0x598b1c(0xcc)}],'queryParams':[],'bodySchema':'{\x22aggregate\x22:[{\x22column\x22:\x20\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[]}','responseHighlights':['result\x20rows\x20contain\x20aggregate\x20aliases',a1_0x598b1c(0xd9)],'examples':['lovrabet\x20data\x20aggregate\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}]}\x27'],'notes':[a1_0x598b1c(0xb4),a1_0x598b1c(0xcb)],'markdown':['##\x20Aggregate\x20dataset\x20data','','Aggregate\x20supports\x20COUNT,\x20SUM,\x20AVG,\x20MAX,\x20and\x20MIN\x20definitions\x20in\x20the\x20`aggregate`\x20array.'][a1_0x598b1c(0xab)]('\x0a')},{'code':a1_0x598b1c(0xc4),'category':a1_0x598b1c(0xff),'title':a1_0x598b1c(0x8e),'method':a1_0x598b1c(0xe7),'path':a1_0x598b1c(0x93),'summary':'查询单条数据','whenToUse':a1_0x598b1c(0xf1),'pathParams':[{'name':a1_0x598b1c(0xaf),'description':a1_0x598b1c(0x9c)},{'name':a1_0x598b1c(0xc5),'description':a1_0x598b1c(0xcc)}],'queryParams':[],'bodySchema':a1_0x598b1c(0xb5),'responseHighlights':[a1_0x598b1c(0xf2)],'examples':[a1_0x598b1c(0xa1)],'notes':[a1_0x598b1c(0xd6)],'markdown':a1_0x598b1c(0xec)},{'code':a1_0x598b1c(0x89),'category':'dataset','title':'Create\x20dataset\x20record','method':a1_0x598b1c(0xe7),'path':a1_0x598b1c(0x95),'summary':'创建数据','whenToUse':a1_0x598b1c(0xd7),'pathParams':[{'name':a1_0x598b1c(0xaf),'description':a1_0x598b1c(0x9c)},{'name':a1_0x598b1c(0xc5),'description':a1_0x598b1c(0xcc)}],'queryParams':[],'bodySchema':a1_0x598b1c(0x9d),'responseHighlights':[a1_0x598b1c(0xe2)],'examples':['lovrabet\x20data\x20create\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22name\x22:\x22demo\x22}\x27'],'notes':[a1_0x598b1c(0xc3)],'markdown':a1_0x598b1c(0xbb)},{'code':a1_0x598b1c(0xa4),'category':'bf','title':a1_0x598b1c(0x9a),'method':a1_0x598b1c(0xbc),'path':'/api/endpoint/{appCode}/functions','summary':a1_0x598b1c(0x92),'whenToUse':a1_0x598b1c(0xa5),'pathParams':[{'name':'appCode','description':a1_0x598b1c(0x9c)}],'queryParams':[],'bodySchema':'None','responseHighlights':[a1_0x598b1c(0xc2)],'examples':['lovrabet\x20bff\x20detail\x20--id\x20<scriptId>\x20--appcode\x20<appCode>'],'notes':[a1_0x598b1c(0xf9)],'markdown':a1_0x598b1c(0x9b)},{'code':a1_0x598b1c(0xef),'category':'bf','title':a1_0x598b1c(0x8f),'method':'POST','path':a1_0x598b1c(0xae),'summary':a1_0x598b1c(0xa0),'whenToUse':a1_0x598b1c(0xd0),'pathParams':[{'name':a1_0x598b1c(0xaf),'description':'Current\x20app\x20code'},{'name':a1_0x598b1c(0xa6),'description':a1_0x598b1c(0xdd)}],'queryParams':[],'bodySchema':a1_0x598b1c(0xeb),'responseHighlights':[a1_0x598b1c(0xfb)],'examples':[a1_0x598b1c(0xca)],'notes':['Script\x20behavior\x20may\x20have\x20side\x20effects;\x20inspect\x20detail\x20first.'],'markdown':a1_0x598b1c(0xa3)},{'code':'custom_sql_execute','category':'custom_sql','title':a1_0x598b1c(0xbe),'method':a1_0x598b1c(0xe7),'path':a1_0x598b1c(0xa7),'summary':a1_0x598b1c(0xce),'whenToUse':'已经确认目标\x20sqlCode\x20存在,并需要实际执行该自定义\x20SQL\x20时使用','pathParams':[],'queryParams':[],'bodySchema':a1_0x598b1c(0xfe),'responseHighlights':[a1_0x598b1c(0x99)],'examples':[a1_0x598b1c(0xe0)],'notes':[a1_0x598b1c(0xba)],'markdown':a1_0x598b1c(0xf0)}];function entrySummary(_0x4bcdb7){const _0x2230f2=a1_0x598b1c;return{'code':_0x4bcdb7[_0x2230f2(0xb9)],'category':_0x4bcdb7[_0x2230f2(0xcd)],'method':_0x4bcdb7[_0x2230f2(0xad)],'path':_0x4bcdb7['path'],'summary':_0x4bcdb7[_0x2230f2(0xb7)],'whenToUse':_0x4bcdb7[_0x2230f2(0xfa)]};}export function listApiDocEntries(_0x423edf={}){const _0x500fe1=a1_0x598b1c,_0xec086b=String(_0x423edf[_0x500fe1(0xcd)]||'')[_0x500fe1(0xc0)](),_0x3efb94=String(_0x423edf[_0x500fe1(0xb3)]||'')[_0x500fe1(0xc0)]()[_0x500fe1(0xf7)]();return DOCS[_0x500fe1(0xdb)](_0x96e36c=>{const _0x29924f=_0x500fe1;if(_0xec086b&&_0x96e36c['category']!==_0xec086b)return![];if(!_0x3efb94)return!![];return[_0x96e36c[_0x29924f(0xb9)],_0x96e36c['category'],_0x96e36c['method'],_0x96e36c[_0x29924f(0x8b)],_0x96e36c['summary'],_0x96e36c['whenToUse'],_0x96e36c['title']]['join']('\x20')[_0x29924f(0xf7)]()[_0x29924f(0xac)](_0x3efb94);})[_0x500fe1(0xa2)](entrySummary);}export function getApiDocDetail(_0x1781d1){const _0x8280b8=a1_0x598b1c,_0x3dfe6c=DOCS[_0x8280b8(0xaa)](_0x57f218=>_0x57f218[_0x8280b8(0xb9)]===_0x1781d1);if(!_0x3dfe6c)throw CliErrors[_0x8280b8(0xcf)]('API\x20doc\x20code\x20not\x20found:\x20'+_0x1781d1);return{..._0x3dfe6c};}const apiDocList={'service':a1_0x598b1c(0xe8),'command':a1_0x598b1c(0x91),'description':a1_0x598b1c(0xfc),'risk':a1_0x598b1c(0x97),'requiresAppCode':![],'flags':[CATEGORY_FLAG,KEYWORD_FLAG],async 'execute'(_0x44d56a){const _0x53f474=a1_0x598b1c,_0x24128c=listApiDocEntries({'category':_0x44d56a[_0x53f474(0xd5)](_0x53f474(0xcd)),'keyword':_0x44d56a[_0x53f474(0xd5)](_0x53f474(0xb3))});return{'ok':!![],'data':{'total':_0x24128c[_0x53f474(0xb1)],'items':_0x24128c}};}},apiDocDetail={'service':a1_0x598b1c(0xe8),'command':a1_0x598b1c(0xd4),'description':a1_0x598b1c(0xd8),'risk':'read','requiresAppCode':![],'flags':[DOC_CODE_FLAG],async 'execute'(_0x26a854){const _0x3cdbab=a1_0x598b1c;return{'ok':!![],'data':getApiDocDetail(_0x26a854[_0x3cdbab(0xd5)](_0x3cdbab(0xb9)))};}};export const apiDocDefinitions=[apiDocList,apiDocDetail];function a1_0x197b(){const _0x1bd222=['dataset_data_aggregate','string','Inspect\x20field\x20names,\x20relations,\x20and\x20operation\x20metadata\x20for\x20a\x20known\x20dataset\x20code.','聚合查询数据集数据','toLowerCase','##\x20Filter\x20dataset\x20data','CLI\x20has\x20typed\x20`bff\x20detail`\x20and\x20`bff\x20exec`\x20commands\x20for\x20endpoint\x20scripts.','whenToUse','Returns\x20script\x20business\x20payload','List\x20available\x20runtime\x20API\x20documentation\x20entries','558344yyLmGZ','{\x22appCode\x22:\x22app-aa63b188\x22,\x22sqlCode\x22:\x22xxxxxxxx-xxxxxxxx\x22,\x22params\x22:{}}','dataset','dataset_data_filter','45ilHrIw','dataset_data_create','Search\x20docs\x20by\x20code,\x20summary,\x20path,\x20or\x20usage\x20text','path','Use\x20`where`,\x20`select`,\x20`orderBy`,\x20`currentPage`,\x20and\x20`pageSize`\x20to\x20inspect\x20live\x20data\x20shape.','620829TKlEBz','Get\x20one\x20dataset\x20record','Execute\x20BF\x20endpoint\x20function','91miaYZS','list','获取应用下可调用的\x20BF\x20函数列表','/api/{appCode}/{datasetCode}/getOne','需要携带\x20where、orderBy、分页等条件读取业务数据时使用','/api/{appCode}/{datasetCode}/create','If\x20SDK\x20usage\x20is\x20needed,\x20follow\x20with\x20`lovrabet\x20dataset\x20sdk-doc\x20--code\x20<datasetCode>`.','read','Use\x20this\x20API\x20or\x20`lovrabet\x20dataset\x20list`\x20to\x20discover\x20available\x20dataset\x20codes\x20before\x20reading\x20data.','Returns\x20SQL\x20execution\x20payload','List\x20BF\x20endpoint\x20functions','##\x20List\x20BF\x20endpoint\x20functions\x0a\x0aDiscover\x20executable\x20endpoint\x20functions.','Current\x20app\x20code','{\x22fieldName\x22:\x22value\x22}','dataset_list','{\x22appCode\x22:\x22app-aa63b188\x22,\x22currentPage\x22:1,\x22pageSize\x22:100}','执行指定\x20BF\x20函数','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27','map','##\x20Execute\x20BF\x20endpoint\x20function\x0a\x0aExecute\x20a\x20known\x20endpoint\x20script.','bf_function_list','需要先确认当前应用有哪些可执行的\x20BF/ENDPOINT\x20函数,以及收敛可用\x20scriptName\x20时使用','scriptName','/api/custom/executeSql','Use\x20read-only\x20data\x20commands\x20before\x20writing\x20Artifacts\x20that\x20display\x20real\x20data.','3Gdvwzz','find','join','includes','method','/api/endpoint/{appCode}/{scriptName}','appCode','20UMnyfw','length','paging\x20contains\x20pagination','keyword','Use\x20`having`\x20only\x20for\x20post-aggregation\x20filters.','{\x22id\x22:123}','Filter\x20docs\x20by\x20category,\x20for\x20example\x20dataset','summary','需要按数据集\x20code\x20获取字段、表信息、关联关系(relations)或操作定义时使用','code','Use\x20`lovrabet\x20sql\x20detail`\x20before\x20execution.','##\x20Create\x20dataset\x20record\x0a\x0aCreate\x20one\x20data\x20record\x20in\x20a\x20dataset.','GET','operations\x20describes\x20runtime\x20APIs','Execute\x20custom\x20SQL','CLI\x20users\x20should\x20prefer\x20`lovrabet\x20dataset\x20list`\x20for\x20this\x20workflow.','trim','None','Returns\x20endpoint\x20functionName/id/description','This\x20is\x20a\x20write\x20operation;\x20use\x20dry-run\x20when\x20available\x20and\x20safe\x20fixtures\x20for\x20smoke\x20tests.','dataset_data_get_one','datasetCode','获取数据集详情','17743748kgiVTL','需要按\x20appCode\x20分页获取运行态数据集列表,并优先收敛可用\x20datasetCode\x20时使用','##\x20Dataset\x20detail','lovrabet\x20bff\x20exec\x20--name\x20<functionName>\x20--params\x20\x27{}\x27','`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','32-character\x20dataset\x20code','category','执行自定义\x20SQL','validation','已经确认目标\x20BF\x20的\x20scriptName,且需要实际调用该\x20ENDPOINT\x20脚本完成业务操作时使用','6775074GOAJyp','3038268WFVCDZ','/api/dataset/getOneByCode?code={datasetCode}','detail','str','Prefer\x20`filter`\x20when\x20the\x20record\x20id\x20is\x20unknown.','需要向指定数据集新增一条业务数据时使用','Show\x20runtime\x20API\x20documentation\x20by\x20code','where\x20filters\x20before\x20aggregation','Filter\x20dataset\x20data','filter','{\x22where\x22:{},\x22currentPage\x22:1,\x22pageSize\x22:20}','Endpoint\x20function\x20name','paging.totalCount\x20gives\x20total\x20rows','4011980qxQGnq','lovrabet\x20sql\x20exec\x20--sqlcode\x20<sqlCode>\x20--params\x20\x27{}\x27','dataset_detail','Returns\x20the\x20created\x20record\x20or\x20backend\x20operation\x20result','tableData\x20contains\x20dataset\x20id/code/name','条件过滤查询数据','分页获取数据集列表','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:5}\x27','POST','api-doc','##\x20List\x20datasets','/api/{appCode}/{datasetCode}/filter','{\x22param\x22:\x22value\x22}','##\x20Get\x20one\x20dataset\x20record\x0a\x0aRead\x20one\x20record\x20by\x20id.','API\x20doc\x20code,\x20for\x20example\x20dataset_list','66414yoDVnJ','bf_execute','##\x20Execute\x20custom\x20SQL\x0a\x0aExecute\x20a\x20configured\x20SQL\x20script\x20by\x20sqlCode.','已经知道记录\x20id,需要按数据集读取单条业务数据时使用','Returns\x20one\x20matching\x20business\x20record'];a1_0x197b=function(){return _0x1bd222;};return a1_0x197b();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x13872d,_0x310463){const _0x4b737d=a2_0x60c0,_0x1b1e52=_0x13872d();while(!![]){try{const _0x3fca0b=-parseInt(_0x4b737d(0x1ac))/0x1+parseInt(_0x4b737d(0x1a3))/0x2+parseInt(_0x4b737d(0x1b1))/0x3+-parseInt(_0x4b737d(0x1a5))/0x4+parseInt(_0x4b737d(0x1b2))/0x5*(parseInt(_0x4b737d(0x1a4))/0x6)+parseInt(_0x4b737d(0x19c))/0x7+-parseInt(_0x4b737d(0x1a2))/0x8*(parseInt(_0x4b737d(0x1b4))/0x9);if(_0x3fca0b===_0x310463)break;else _0x1b1e52['push'](_0x1b1e52['shift']());}catch(_0x3c3083){_0x1b1e52['push'](_0x1b1e52['shift']());}}}(a2_0x17fb,0x37ba9));import{createHash}from'node:crypto';import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{homedir}from'node:os';import{dirname,resolve}from'node:path';import{PRODUCT_CONFIG}from'../../constant/product.js';import{isRuntimeAccessibleApp}from'../../commands/app/eligibility.js';export function fingerprintAccessKey(_0x5e87e8){const _0x457008=a2_0x60c0,_0xcf2227=_0x5e87e8[_0x457008(0x1ae)](),_0x29b2ac=_0xcf2227[_0x457008(0x1a7)](-0x6)||_0x457008(0x19b),_0x4e58f5=createHash(_0x457008(0x19f))[_0x457008(0x1ad)](_0xcf2227)['digest'](_0x457008(0x1a8))['slice'](0x0,0xc);return _0x457008(0x19e)+_0x29b2ac+'_'+_0x4e58f5;}export function getAppCacheFilePath(_0x261f67,_0x53b036){const _0x219eff=a2_0x60c0;return resolve(homedir(),PRODUCT_CONFIG['homeDirName'],_0x219eff(0x1a6),_0x261f67,fingerprintAccessKey(_0x53b036),_0x219eff(0x1a0));}function a2_0x60c0(_0x2f337,_0x594ddc){_0x2f337=_0x2f337-0x19b;const _0x17fb0d=a2_0x17fb();let _0x60c0af=_0x17fb0d[_0x2f337];return _0x60c0af;}function a2_0x17fb(){const _0x16581a=['utf8','680312eszgMu','418016btCGym','20166OAdlYm','714812ApnzpB','cache','slice','hex','parse','EXDEV','stringify','172193kBLpbD','update','trim','code','items','1279236xyvUOK','275XvdJfi','find','63WJgtvh','unknown','2479113lQxlyW','appCode','ak_','sha256','my-apps.json'];a2_0x17fb=function(){return _0x16581a;};return a2_0x17fb();}export function readCachedAppList(_0x441bdf,_0x49e67b){const _0x835522=a2_0x60c0;if(!_0x49e67b?.['trim']())return null;const _0x1820cc=getAppCacheFilePath(_0x441bdf,_0x49e67b);if(!existsSync(_0x1820cc))return null;try{const _0x44b10b=readFileSync(_0x1820cc,_0x835522(0x1a1));if(!_0x44b10b[_0x835522(0x1ae)]())return null;const _0x334f4f=JSON[_0x835522(0x1a9)](_0x44b10b);if(!Array['isArray'](_0x334f4f[_0x835522(0x1b0)]))return null;return _0x334f4f;}catch{return null;}}export function writeCachedAppList(_0x4f51b0,_0x1d6599,_0x16e2c8){const _0x83da7e=a2_0x60c0,_0x235466=getAppCacheFilePath(_0x4f51b0,_0x1d6599),_0x2cf6a5=dirname(_0x235466);!existsSync(_0x2cf6a5)&&mkdirSync(_0x2cf6a5,{'recursive':!![]});const _0xa942f1=_0x235466+'.tmp';try{writeFileSync(_0xa942f1,JSON[_0x83da7e(0x1ab)](_0x16e2c8,null,0x2)+'\x0a',{'encoding':_0x83da7e(0x1a1),'mode':0x180});try{renameSync(_0xa942f1,_0x235466);}catch(_0x291c7f){if(_0x291c7f[_0x83da7e(0x1af)]==='EPERM'||_0x291c7f[_0x83da7e(0x1af)]===_0x83da7e(0x1aa)||_0x291c7f[_0x83da7e(0x1af)]==='EACCES'){writeFileSync(_0x235466,JSON['stringify'](_0x16e2c8,null,0x2)+'\x0a',{'encoding':_0x83da7e(0x1a1)});try{unlinkSync(_0xa942f1);}catch{}}else throw _0x291c7f;}}catch(_0xf21772){try{unlinkSync(_0xa942f1);}catch{}throw _0xf21772;}return _0x235466;}export function resolveCachedAppCode(_0x32d27e,_0x42231b,_0x525125){const _0x53a1ff=a2_0x60c0;if(!_0x32d27e)return undefined;const _0x5cb390=readCachedAppList(_0x42231b,_0x525125),_0x303084=_0x5cb390?.[_0x53a1ff(0x1b0)][_0x53a1ff(0x1b3)](_0x3e252b=>_0x3e252b['appName']===_0x32d27e&&isRuntimeAccessibleApp(_0x3e252b));return _0x303084?.[_0x53a1ff(0x19d)]?.['trim']()||undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a3_0x5912(_0x548240,_0x1cda80){_0x548240=_0x548240-0x65;const _0x32ac23=a3_0x32ac();let _0x5912f8=_0x32ac23[_0x548240];return _0x5912f8;}const a3_0xeb1358=a3_0x5912;(function(_0x876901,_0x1b8cf6){const _0x33a0c7=a3_0x5912,_0xcc52b3=_0x876901();while(!![]){try{const _0x1d2406=-parseInt(_0x33a0c7(0x6b))/0x1*(-parseInt(_0x33a0c7(0xb4))/0x2)+-parseInt(_0x33a0c7(0x6f))/0x3+-parseInt(_0x33a0c7(0x7d))/0x4*(parseInt(_0x33a0c7(0xb6))/0x5)+parseInt(_0x33a0c7(0x70))/0x6*(parseInt(_0x33a0c7(0x75))/0x7)+-parseInt(_0x33a0c7(0x6d))/0x8*(parseInt(_0x33a0c7(0x9d))/0x9)+-parseInt(_0x33a0c7(0xb7))/0xa*(-parseInt(_0x33a0c7(0x96))/0xb)+-parseInt(_0x33a0c7(0x66))/0xc*(-parseInt(_0x33a0c7(0x8b))/0xd);if(_0x1d2406===_0x1b8cf6)break;else _0xcc52b3['push'](_0xcc52b3['shift']());}catch(_0x417370){_0xcc52b3['push'](_0xcc52b3['shift']());}}}(a3_0x32ac,0xb80a4));import{CliErrors}from'../../errors.js';import{initCreateFlagDefs,initImportFlagDefs,runInit,runInitImport}from'../../commands/init.js';import{getEnv,RUNTIME_ENV_VALUES}from'../../constant/env.js';import{buildAppProfileListFields}from'../../config/schema.js';import{CLI_BIN_NAME,readConfig,writeConfig,scopeLabel,enrichAppListItemsWithMergedSelection}from'../../commands/app/shared.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{filterRuntimeAccessibleApps,findAppByCode,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../../commands/app/eligibility.js';const GLOBAL_FLAG={'name':a3_0xeb1358(0xa5),'type':a3_0xeb1358(0xb9),'description':'Use\x20global\x20config\x20scope','default':![]};function collectFlags(_0x57aa4f,_0x44344d){const _0xc100fa=a3_0xeb1358,_0x85082e={};for(const _0x2d7717 of _0x44344d){const _0x59e7e5=_0x2d7717[_0xc100fa(0x89)]===_0xc100fa(0xb9)?_0x57aa4f[_0xc100fa(0xc0)](_0x2d7717[_0xc100fa(0x93)]):_0x57aa4f['str'](_0x2d7717[_0xc100fa(0x93)]);if(_0x59e7e5!==''&&_0x59e7e5!==![])_0x85082e[_0x2d7717['name']]=_0x59e7e5;}if(_0x57aa4f[_0xc100fa(0x73)])_0x85082e[_0xc100fa(0x73)]=!![];return _0x85082e;}function normalizeLanguages(_0x5c3e0d){const _0x2a467c=a3_0xeb1358;if(!Array['isArray'](_0x5c3e0d))return[];return _0x5c3e0d[_0x2a467c(0xaf)](_0x4d43b8=>typeof _0x4d43b8===_0x2a467c(0x84))['map'](_0x58ec00=>_0x58ec00[_0x2a467c(0x90)]())[_0x2a467c(0xaf)](Boolean);}function buildRemoteAppI18nFields(_0x3f2ee9){const _0x41e272=a3_0xeb1358,_0x53da6e=normalizeLanguages(_0x3f2ee9[_0x41e272(0xa0)]?.[_0x41e272(0x88)]);return{'enableI18n':typeof _0x3f2ee9['enableI18n']===_0x41e272(0xb9)?_0x3f2ee9[_0x41e272(0x74)]:null,'languages':_0x53da6e,'i18nInfo':_0x3f2ee9[_0x41e272(0xa0)]?{..._0x3f2ee9[_0x41e272(0xa0)],'langs':_0x53da6e[_0x41e272(0xa6)]?_0x53da6e:null}:null};}const initDef={'service':a3_0xeb1358(0x91),'command':a3_0xeb1358(0xc2),'description':'Deprecated:\x20use\x20workspace\x20init\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','risk':a3_0xeb1358(0x8e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initCreateFlagDefs,async 'execute'(_0x5b39d7){const _0xd980f8=a3_0xeb1358;return warnDeprecatedAppCommand(_0xd980f8(0xc2),CLI_BIN_NAME+_0xd980f8(0x83)),await runInit(collectFlags(_0x5b39d7,initCreateFlagDefs)),{'ok':!![]};}},listDef={'service':a3_0xeb1358(0x91),'command':a3_0xeb1358(0xa7),'description':a3_0xeb1358(0xa3),'risk':'read','requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':a3_0xeb1358(0x72),'type':a3_0xeb1358(0x84),'description':a3_0xeb1358(0xbc),'enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0xeb1358(0x7b),'type':a3_0xeb1358(0xb9),'description':a3_0xeb1358(0x6c),'default':![]},{'name':a3_0xeb1358(0xa1),'type':a3_0xeb1358(0xb9),'description':'Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','default':![]},{'name':a3_0xeb1358(0x65),'type':a3_0xeb1358(0xb9),'description':a3_0xeb1358(0x79),'default':![]}],async 'execute'(_0x1dd95a){const _0x48049e=a3_0xeb1358,_0x26eb2e=_0x1dd95a[_0x48049e(0x8f)]('env')||_0x1dd95a[_0x48049e(0xbb)]||getEnv()||_0x48049e(0xa9),_0x36c811=_0x1dd95a[_0x48049e(0xc0)]('local'),_0x13b2ff=_0x1dd95a[_0x48049e(0xc0)](_0x48049e(0xa1)),_0x51206e=_0x1dd95a[_0x48049e(0xc0)](_0x48049e(0x65)),{readRawConfigWithLayers:_0x532c6c,resolveDefaultAppSource:_0x566b24,getLocalAppAliases:_0x43b4c7}=await import(_0x48049e(0xa2)),{getRemoteAppList:_0x4c5769}=await import(_0x48049e(0xad)),{config:_0x16da3d,layers:_0x2a7945}=_0x532c6c(),_0x64a648=_0x566b24(_0x2a7945),{defaultApp:_0x4ab0b7}=_0x16da3d,_0x12d814=await _0x4c5769({'env':_0x26eb2e,'accessKey':_0x1dd95a[_0x48049e(0x92)],'localOnly':_0x36c811,'noCache':_0x13b2ff}),_0x22b5f3=_0x51206e?_0x12d814[_0x48049e(0x9e)]:filterRuntimeAccessibleApps(_0x12d814['items']),_0x20ab44=_0x12d814['items'][_0x48049e(0xa6)]-_0x22b5f3[_0x48049e(0xa6)],_0x5f47c5=_0x22b5f3[_0x48049e(0x80)](_0x14bd6e=>{const _0x16b6d8=_0x48049e;return{'name':_0x14bd6e[_0x16b6d8(0xb0)],'appcode':_0x14bd6e['appCode'],'named':!![],'definedIn':_0x16b6d8(0x77),'isDefault':_0x14bd6e['appName']===_0x4ab0b7,...buildAppProfileListFields(_0x26eb2e),...buildRemoteAppI18nFields(_0x14bd6e),'source':_0x12d814[_0x16b6d8(0xb8)],'owner':_0x14bd6e[_0x16b6d8(0x9f)]??null,'status':_0x14bd6e[_0x16b6d8(0x82)]??null,'cachedAt':_0x12d814[_0x16b6d8(0x95)]};}),_0x30137a=_0x43b4c7(_0x16da3d);let _0x589fbc=0x0;for(const [_0xd8003c,_0x56ede3]of Object[_0x48049e(0x6e)](_0x30137a)){const _0x4dd6f9=typeof _0x56ede3[_0x48049e(0x71)]===_0x48049e(0x84)?_0x56ede3['appcode'][_0x48049e(0x90)]():'';if(!_0x4dd6f9)continue;const _0x1007b4=findAppByCode(_0x12d814['items'],_0x4dd6f9);if(!_0x51206e&&_0x1007b4&&!isRuntimeAccessibleApp(_0x1007b4))continue;_0x589fbc+=0x1,_0x5f47c5[_0x48049e(0x98)]({'name':_0xd8003c,'appcode':_0x4dd6f9,'named':!![],'definedIn':_0x48049e(0x7b),'isDefault':_0xd8003c===_0x4ab0b7,...buildAppProfileListFields(_0x26eb2e),'source':_0x48049e(0xa4),'owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0x5f47c5,_0x1dd95a[_0x48049e(0x9a)]);const _0x3814b8=_0x5f47c5[_0x48049e(0x9c)](_0x8726af=>_0x8726af[_0x48049e(0x7f)]===!![]),_0x5ba18d=_0x4ab0b7??_0x3814b8?.[_0x48049e(0x93)]??null,_0x420321={'env':_0x26eb2e,'source':_0x12d814['source'],'fetchedAt':_0x12d814['fetchedAt'],'cachePath':_0x12d814['cachePath'],'globalPath':_0x2a7945['globalPath']??null,'projectPath':_0x2a7945[_0x48049e(0x99)]??null,'defaultApp':_0x5ba18d,'defaultAppSource':_0x4ab0b7!=null?_0x64a648:null,'localAliasCount':_0x589fbc,'remoteTotal':_0x12d814[_0x48049e(0x9e)]['length'],'hiddenUnpublishedCount':_0x20ab44,'includeUnpublished':_0x51206e};if(_0x5f47c5[_0x48049e(0xa6)]===0x0)return{'ok':!![],'data':{'items':_0x5f47c5,'meta':_0x420321},'message':_0x12d814[_0x48049e(0xb8)]===_0x48049e(0x81)?_0x48049e(0x7a):_0x48049e(0x85)};return{'ok':!![],'data':{'items':_0x5f47c5,'meta':_0x420321}};}},pullDef={'service':a3_0xeb1358(0x91),'command':'pull','description':a3_0xeb1358(0xb3),'risk':a3_0xeb1358(0x8e),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a3_0xeb1358(0x72),'type':a3_0xeb1358(0x84),'description':a3_0xeb1358(0xb5),'enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0xeb1358(0x7b),'type':'boolean','description':a3_0xeb1358(0x6a),'default':![]},{'name':'no-cache','type':a3_0xeb1358(0xb9),'description':a3_0xeb1358(0x86),'default':![]}],async 'execute'(_0x5ef711){const _0x5ebc5e=a3_0xeb1358,_0x5b3488=_0x5ef711[_0x5ebc5e(0x8f)](_0x5ebc5e(0x72))||_0x5ef711[_0x5ebc5e(0xbb)]||getEnv()||_0x5ebc5e(0xa9),_0x536495=_0x5ef711[_0x5ebc5e(0xc0)](_0x5ebc5e(0x7b)),_0x40aea2=_0x5ef711[_0x5ebc5e(0xc0)](_0x5ebc5e(0xa1)),{getRemoteAppList:_0x220e64}=await import(_0x5ebc5e(0xad)),_0x36e32d=await _0x220e64({'env':_0x5b3488,'accessKey':_0x5ef711[_0x5ebc5e(0x92)],'localOnly':_0x536495,'noCache':_0x40aea2});return{'ok':!![],'data':{'total':_0x36e32d[_0x5ebc5e(0x9e)][_0x5ebc5e(0xa6)],'env':_0x5b3488,'source':_0x36e32d[_0x5ebc5e(0xb8)],'fetchedAt':_0x36e32d[_0x5ebc5e(0x95)],'cachePath':_0x36e32d['cachePath']},'message':_0x36e32d[_0x5ebc5e(0xb8)]===_0x5ebc5e(0x81)?_0x5ebc5e(0xc3)+_0x36e32d[_0x5ebc5e(0x9e)][_0x5ebc5e(0xa6)]+_0x5ebc5e(0xbd)+_0x5b3488+'\x22.':_0x5ebc5e(0xaa)+_0x36e32d[_0x5ebc5e(0x9e)][_0x5ebc5e(0xa6)]+'\x20app(s)\x20for\x20env=\x22'+_0x5b3488+'\x22.'};}},useDef={'service':'app','command':a3_0xeb1358(0x9b),'description':'Deprecated:\x20use\x20workspace\x20use\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','risk':a3_0xeb1358(0x8e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a3_0xeb1358(0x93),'description':a3_0xeb1358(0x8a),'required':!![]}],'flags':[GLOBAL_FLAG],async 'validate'(_0x563b31){const _0x385b10=a3_0xeb1358;if(!_0x563b31['args'][0x0])throw CliErrors[_0x385b10(0xb2)](_0x385b10(0x69),_0x385b10(0xba)+CLI_BIN_NAME+'\x20app\x20use\x20<name>\x20[--global]');},async 'execute'(_0x47fbac){const _0x37a262=a3_0xeb1358;warnDeprecatedAppCommand(_0x37a262(0x9b),CLI_BIN_NAME+_0x37a262(0x67));const _0x1e1423=_0x47fbac['args'][0x0];if(!_0x1e1423)throw CliErrors['validation'](_0x37a262(0x69),_0x37a262(0xba)+CLI_BIN_NAME+_0x37a262(0x94));const {buildConfigFromFlags:_0x494a3d,resolveLocalAppAliasCode:_0x4af5c8}=await import(_0x37a262(0xa2)),{readCachedAppList:_0x5bcdce}=await import(_0x37a262(0x7c)),_0x3c9c8b=_0x47fbac[_0x37a262(0x8f)](_0x37a262(0x72)),_0x1c4b05=_0x494a3d(_0x3c9c8b?{'env':_0x3c9c8b}:{}),_0x5fffeb=_0x5bcdce(_0x1c4b05[_0x37a262(0x72)],_0x1c4b05['accessKey']),_0x1a1801=_0x5fffeb?.[_0x37a262(0x9e)][_0x37a262(0x9c)](_0x32c091=>_0x32c091['appName']===_0x1e1423),_0x3979c1=_0x4af5c8(_0x1c4b05[_0x37a262(0xac)]??{},_0x1e1423);if(_0x1a1801&&!isRuntimeAccessibleApp(_0x1a1801))throw runtimeInaccessibleAppError(_0x1a1801,'\x22'+_0x1e1423+'\x22');if(_0x3979c1){const _0x4060df=_0x5fffeb?.[_0x37a262(0x9e)][_0x37a262(0x9c)](_0x5298e1=>_0x5298e1[_0x37a262(0x68)]?.[_0x37a262(0x90)]()===_0x3979c1);if(_0x4060df&&!isRuntimeAccessibleApp(_0x4060df))throw runtimeInaccessibleAppError(_0x4060df,'\x22'+_0x1e1423+'\x22');}if(!_0x1a1801&&!_0x3979c1&&_0x1c4b05[_0x37a262(0xc1)]!==_0x1e1423){const _0x1bac85=[..._0x5fffeb?.[_0x37a262(0x9e)][_0x37a262(0x80)](_0x235687=>_0x235687[_0x37a262(0xb0)])??[]],_0x59ca15=_0x1bac85[_0x37a262(0xa6)]===0x0?_0x37a262(0xbf)+CLI_BIN_NAME+_0x37a262(0x8c)+_0x1e1423+_0x37a262(0x76):_0x37a262(0x78)+Array[_0x37a262(0xa8)](new Set(_0x1bac85))[_0x37a262(0x8d)](',\x20')+'.\x20Local\x20aliases\x20can\x20be\x20added\x20under\x20apps.<alias>.appcode.';throw CliErrors[_0x37a262(0xb2)](_0x37a262(0xab)+_0x1e1423+'\x22\x20not\x20found.',_0x59ca15);}const _0x5d13d9=_0x47fbac[_0x37a262(0xc0)](_0x37a262(0xa5));let _0x528398;if(_0x5d13d9)_0x528398={'global':!![]};else{const {isInProject:_0x3d3649}=await import(_0x37a262(0xa2)),_0x1be22f=_0x3d3649();_0x528398=toScopeFlags(resolveConfigScope({'explicitGlobal':![],'policy':_0x37a262(0x87),'inProject':_0x1be22f}));}const _0x527001=readConfig(_0x528398);return _0x527001[_0x37a262(0xc1)]=_0x1e1423,writeConfig(_0x527001,_0x528398),{'ok':!![],'message':_0x37a262(0xbe)+_0x1e1423+'\x22'+scopeLabel(_0x528398)+'.'};}};function warnDeprecatedAppCommand(_0x1877e7,_0x383f16){const _0x25b15f=a3_0xeb1358;console[_0x25b15f(0x97)](CLI_BIN_NAME+_0x25b15f(0xae)+_0x1877e7+_0x25b15f(0x7e)+_0x383f16+_0x25b15f(0xb1));}function a3_0x32ac(){const _0x3a46bb=['name','\x20app\x20use\x20<name>\x20[--global]','fetchedAt','1397957cfBckK','warn','push','projectPath','mergedCli','use','find','288uZVAFf','items','appOwnerName','i18nInfo','no-cache','../../context.js','List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','config','global','length','list','from','production','Refreshed\x20app\x20cache\x20with\x20','App\x20\x22','raw','../../commands/app/remote-source.js','\x20app\x20','filter','appName','`\x20instead.','validation','Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','354qkPAhI','Target\x20environment\x20(default:\x20current\x20env)','90285UqavAh','50xKDcEw','source','boolean','Usage:\x20','envName','Filter\x20by\x20environment\x20(default:\x20current\x20env)','\x20cached\x20app(s)\x20for\x20env=\x22','Default\x20app\x20candidate\x20set\x20to\x20\x22','Use\x20`','bool','defaultApp','init','Loaded\x20','include-unpublished','12qFwUhQ','\x20workspace\x20use\x20--app\x20<name>\x20[--env\x20daily]','appCode','Missing\x20app\x20name.','Read\x20from\x20local\x20cache\x20only','7057liGlsi','Read\x20app\x20list\x20from\x20local\x20cache\x20only','196808oGXpaA','entries','4148592IPyVbF','2613864RkvpSm','appcode','env','nonInteractive','enableI18n','7IJeIYc','.appcode\x20to\x20.lovrabet.json.','remote','Available\x20remote\x20apps:\x20','Include\x20unpublished\x20apps\x20for\x20diagnostics','No\x20cached\x20apps\x20found.','local','../../commands/app/cache.js','36PnHEhZ','\x20is\x20deprecated.\x20Use\x20`','isCurrent','map','cache','appPublishStatus','\x20workspace\x20init\x20--appcode\x20<code>\x20[--env\x20daily]','string','No\x20apps\x20found\x20on\x20the\x20platform.','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','project-default','langs','type','Remote\x20app\x20name\x20to\x20activate','9961497ZUplvH','\x20app\x20list`\x20to\x20discover\x20remote\x20apps,\x20or\x20add\x20apps.','join','write','str','trim','app','accessKey'];a3_0x32ac=function(){return _0x3a46bb;};return a3_0x32ac();}const importDef={'service':'app','command':'import','description':'Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','risk':a3_0xeb1358(0x8e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initImportFlagDefs,async 'execute'(_0x2bf081){return await runInitImport(collectFlags(_0x2bf081,initImportFlagDefs)),{'ok':!![]};}};export const appDefinitions=[initDef,listDef,pullDef,useDef,importDef];
|
|
1
|
+
const a3_0x162cd6=a3_0x45fc;(function(_0x36ff3c,_0x48ba13){const _0x1d664a=a3_0x45fc,_0x30f742=_0x36ff3c();while(!![]){try{const _0xb9af08=-parseInt(_0x1d664a(0x1d1))/0x1+-parseInt(_0x1d664a(0x219))/0x2*(parseInt(_0x1d664a(0x1e0))/0x3)+parseInt(_0x1d664a(0x1d0))/0x4+parseInt(_0x1d664a(0x1de))/0x5+-parseInt(_0x1d664a(0x1cd))/0x6*(parseInt(_0x1d664a(0x1f0))/0x7)+-parseInt(_0x1d664a(0x1db))/0x8+parseInt(_0x1d664a(0x203))/0x9;if(_0xb9af08===_0x48ba13)break;else _0x30f742['push'](_0x30f742['shift']());}catch(_0x5891ef){_0x30f742['push'](_0x30f742['shift']());}}}(a3_0x3291,0xaf836));import{CliErrors}from'../../errors.js';import{initCreateFlagDefs,initImportFlagDefs,runInit,runInitImport}from'../../commands/init.js';function a3_0x45fc(_0x2f2f7a,_0x2f73f3){_0x2f2f7a=_0x2f2f7a-0x1c8;const _0x3291a6=a3_0x3291();let _0x45fcf7=_0x3291a6[_0x2f2f7a];return _0x45fcf7;}import{getEnv,RUNTIME_ENV_VALUES}from'../../constant/env.js';import{buildAppProfileListFields}from'../../config/schema.js';function a3_0x3291(){const _0x4503d9=['\x20workspace\x20init\x20--appcode\x20<code>\x20[--env\x20daily]','name','4859040BDPDoE','Include\x20unpublished\x20apps\x20for\x20diagnostics','15fkaOHu','projectPath','type','`\x20instead.','warn','\x20is\x20deprecated.\x20Use\x20`','join','items','appcode','init','../../commands/app/remote-source.js','str','write','length','Usage:\x20','trim','7TDrqAJ','push','Available\x20remote\x20apps:\x20','langs','map','.appcode\x20to\x20.lovrabet.json.','\x20app\x20list`\x20to\x20discover\x20remote\x20apps,\x20or\x20add\x20apps.','filter','list','production','../../context.js','raw','.\x20Local\x20aliases\x20can\x20be\x20added\x20under\x20apps.<alias>.appcode.','isCurrent','app','enableI18n','appCode','pull','mergedCli','14763258mZawQl','env','List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','Use\x20global\x20config\x20scope','bool','Deprecated:\x20use\x20workspace\x20init\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','no-cache','use','include-unpublished','Filter\x20by\x20environment\x20(default:\x20current\x20env)','source','\x20app\x20','Use\x20`','Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','boolean','Default\x20app\x20candidate\x20set\x20to\x20\x22','local','from','string','i18nInfo','Missing\x20app\x20name.','global','513244DpPYhB','appPublishStatus','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','nonInteractive','\x20workspace\x20use\x20--app\x20<name>\x20[--env\x20daily]','validation','envName','config','\x20app(s)\x20for\x20env=\x22','Refreshed\x20app\x20cache\x20with\x20','861078ZiPqKQ','find','accessKey','4047648fbwCez','655692lgPgRC','cachePath','defaultApp','Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','Deprecated:\x20use\x20workspace\x20use\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','appName','cache','App\x20\x22','import','fetchedAt','6582920dguntZ'];a3_0x3291=function(){return _0x4503d9;};return a3_0x3291();}import{CLI_BIN_NAME,readConfig,writeConfig,scopeLabel,enrichAppListItemsWithMergedSelection}from'../../commands/app/shared.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{filterRuntimeAccessibleApps,findAppByCode,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../../commands/app/eligibility.js';const GLOBAL_FLAG={'name':a3_0x162cd6(0x218),'type':a3_0x162cd6(0x211),'description':a3_0x162cd6(0x206),'default':![]};function collectFlags(_0x2d6c5e,_0x5cc343){const _0x2109c7=a3_0x162cd6,_0x76240d={};for(const _0x4ab521 of _0x5cc343){const _0xf2a1e7=_0x4ab521[_0x2109c7(0x1e2)]===_0x2109c7(0x211)?_0x2d6c5e[_0x2109c7(0x207)](_0x4ab521[_0x2109c7(0x1dd)]):_0x2d6c5e[_0x2109c7(0x1eb)](_0x4ab521[_0x2109c7(0x1dd)]);if(_0xf2a1e7!==''&&_0xf2a1e7!==![])_0x76240d[_0x4ab521[_0x2109c7(0x1dd)]]=_0xf2a1e7;}if(_0x2d6c5e['nonInteractive'])_0x76240d[_0x2109c7(0x21c)]=!![];return _0x76240d;}function normalizeLanguages(_0x2e5087){const _0x77fc53=a3_0x162cd6;if(!Array['isArray'](_0x2e5087))return[];return _0x2e5087[_0x77fc53(0x1f7)](_0xfa2853=>typeof _0xfa2853==='string')['map'](_0x40aad0=>_0x40aad0[_0x77fc53(0x1ef)]())[_0x77fc53(0x1f7)](Boolean);}function buildRemoteAppI18nFields(_0x4b0fe1){const _0x25914b=a3_0x162cd6,_0x341d82=normalizeLanguages(_0x4b0fe1['i18nInfo']?.[_0x25914b(0x1f3)]);return{'enableI18n':typeof _0x4b0fe1['enableI18n']==='boolean'?_0x4b0fe1[_0x25914b(0x1ff)]:null,'languages':_0x341d82,'i18nInfo':_0x4b0fe1[_0x25914b(0x216)]?{..._0x4b0fe1[_0x25914b(0x216)],'langs':_0x341d82[_0x25914b(0x1ed)]?_0x341d82:null}:null};}const initDef={'service':'app','command':a3_0x162cd6(0x1e9),'description':a3_0x162cd6(0x208),'risk':a3_0x162cd6(0x1ec),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initCreateFlagDefs,async 'execute'(_0x2d2210){const _0x139fbb=a3_0x162cd6;return warnDeprecatedAppCommand(_0x139fbb(0x1e9),CLI_BIN_NAME+_0x139fbb(0x1dc)),await runInit(collectFlags(_0x2d2210,initCreateFlagDefs)),{'ok':!![]};}},listDef={'service':a3_0x162cd6(0x1fe),'command':a3_0x162cd6(0x1f8),'description':a3_0x162cd6(0x205),'risk':'read','requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':a3_0x162cd6(0x204),'type':a3_0x162cd6(0x215),'description':a3_0x162cd6(0x20c),'enum':[...RUNTIME_ENV_VALUES]},{'name':'local','type':a3_0x162cd6(0x211),'description':'Read\x20app\x20list\x20from\x20local\x20cache\x20only','default':![]},{'name':a3_0x162cd6(0x209),'type':a3_0x162cd6(0x211),'description':a3_0x162cd6(0x21b),'default':![]},{'name':a3_0x162cd6(0x20b),'type':a3_0x162cd6(0x211),'description':a3_0x162cd6(0x1df),'default':![]}],async 'execute'(_0x196a1b){const _0x4878df=a3_0x162cd6,_0x39b1b4=_0x196a1b[_0x4878df(0x1eb)](_0x4878df(0x204))||_0x196a1b[_0x4878df(0x1c9)]||getEnv()||'production',_0x57bc95=_0x196a1b[_0x4878df(0x207)]('local'),_0x106775=_0x196a1b[_0x4878df(0x207)](_0x4878df(0x209)),_0x2f9c07=_0x196a1b['bool']('include-unpublished'),{readRawConfigWithLayers:_0x402963,resolveDefaultAppSource:_0x2cb88b,getLocalAppAliases:_0x2eb34e}=await import(_0x4878df(0x1fa)),{getRemoteAppList:_0x5e79be}=await import('../../commands/app/remote-source.js'),{config:_0x213760,layers:_0x4eb814}=_0x402963(),_0x27b1a0=_0x2cb88b(_0x4eb814),{defaultApp:_0x51626a}=_0x213760,_0x709a21=await _0x5e79be({'env':_0x39b1b4,'accessKey':_0x196a1b[_0x4878df(0x1cf)],'localOnly':_0x57bc95,'noCache':_0x106775}),_0x3c6634=_0x2f9c07?_0x709a21[_0x4878df(0x1e7)]:filterRuntimeAccessibleApps(_0x709a21['items']),_0x2b8c04=_0x709a21['items']['length']-_0x3c6634[_0x4878df(0x1ed)],_0x2388ba=_0x3c6634[_0x4878df(0x1f4)](_0x349225=>{const _0x5b4b1c=_0x4878df;return{'name':_0x349225[_0x5b4b1c(0x1d6)],'appcode':_0x349225[_0x5b4b1c(0x200)],'named':!![],'definedIn':'remote','isDefault':_0x349225['appName']===_0x51626a,...buildAppProfileListFields(_0x39b1b4),...buildRemoteAppI18nFields(_0x349225),'source':_0x709a21[_0x5b4b1c(0x20d)],'owner':_0x349225['appOwnerName']??null,'status':_0x349225[_0x5b4b1c(0x21a)]??null,'cachedAt':_0x709a21['fetchedAt']};}),_0x22a492=_0x2eb34e(_0x213760);let _0x2b80d5=0x0;for(const [_0x34ee5a,_0x17d0fe]of Object['entries'](_0x22a492)){const _0x51daaf=typeof _0x17d0fe['appcode']===_0x4878df(0x215)?_0x17d0fe[_0x4878df(0x1e8)][_0x4878df(0x1ef)]():'';if(!_0x51daaf)continue;const _0x45131e=findAppByCode(_0x709a21['items'],_0x51daaf);if(!_0x2f9c07&&_0x45131e&&!isRuntimeAccessibleApp(_0x45131e))continue;_0x2b80d5+=0x1,_0x2388ba[_0x4878df(0x1f1)]({'name':_0x34ee5a,'appcode':_0x51daaf,'named':!![],'definedIn':_0x4878df(0x213),'isDefault':_0x34ee5a===_0x51626a,...buildAppProfileListFields(_0x39b1b4),'source':_0x4878df(0x1ca),'owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0x2388ba,_0x196a1b[_0x4878df(0x202)]);const _0x29bb31=_0x2388ba[_0x4878df(0x1ce)](_0x382bce=>_0x382bce[_0x4878df(0x1fd)]===!![]),_0x1ed12c=_0x51626a??_0x29bb31?.['name']??null,_0x280e0e={'env':_0x39b1b4,'source':_0x709a21[_0x4878df(0x20d)],'fetchedAt':_0x709a21['fetchedAt'],'cachePath':_0x709a21[_0x4878df(0x1d2)],'globalPath':_0x4eb814['globalPath']??null,'projectPath':_0x4eb814[_0x4878df(0x1e1)]??null,'defaultApp':_0x1ed12c,'defaultAppSource':_0x51626a!=null?_0x27b1a0:null,'localAliasCount':_0x2b80d5,'remoteTotal':_0x709a21[_0x4878df(0x1e7)][_0x4878df(0x1ed)],'hiddenUnpublishedCount':_0x2b8c04,'includeUnpublished':_0x2f9c07};if(_0x2388ba[_0x4878df(0x1ed)]===0x0)return{'ok':!![],'data':{'items':_0x2388ba,'meta':_0x280e0e},'message':_0x709a21[_0x4878df(0x20d)]===_0x4878df(0x1d7)?'No\x20cached\x20apps\x20found.':'No\x20apps\x20found\x20on\x20the\x20platform.'};return{'ok':!![],'data':{'items':_0x2388ba,'meta':_0x280e0e}};}},pullDef={'service':a3_0x162cd6(0x1fe),'command':a3_0x162cd6(0x201),'description':a3_0x162cd6(0x1d4),'risk':a3_0x162cd6(0x1ec),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'env','type':a3_0x162cd6(0x215),'description':'Target\x20environment\x20(default:\x20current\x20env)','enum':[...RUNTIME_ENV_VALUES]},{'name':'local','type':a3_0x162cd6(0x211),'description':'Read\x20from\x20local\x20cache\x20only','default':![]},{'name':a3_0x162cd6(0x209),'type':'boolean','description':'Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','default':![]}],async 'execute'(_0x14c1d2){const _0x3f24ed=a3_0x162cd6,_0x5a7f6f=_0x14c1d2['str']('env')||_0x14c1d2[_0x3f24ed(0x1c9)]||getEnv()||_0x3f24ed(0x1f9),_0x4efcd4=_0x14c1d2[_0x3f24ed(0x207)](_0x3f24ed(0x213)),_0x27f828=_0x14c1d2['bool'](_0x3f24ed(0x209)),{getRemoteAppList:_0x46c9d8}=await import(_0x3f24ed(0x1ea)),_0xc34f30=await _0x46c9d8({'env':_0x5a7f6f,'accessKey':_0x14c1d2[_0x3f24ed(0x1cf)],'localOnly':_0x4efcd4,'noCache':_0x27f828});return{'ok':!![],'data':{'total':_0xc34f30[_0x3f24ed(0x1e7)][_0x3f24ed(0x1ed)],'env':_0x5a7f6f,'source':_0xc34f30[_0x3f24ed(0x20d)],'fetchedAt':_0xc34f30[_0x3f24ed(0x1da)],'cachePath':_0xc34f30['cachePath']},'message':_0xc34f30[_0x3f24ed(0x20d)]==='cache'?'Loaded\x20'+_0xc34f30['items']['length']+'\x20cached\x20app(s)\x20for\x20env=\x22'+_0x5a7f6f+'\x22.':_0x3f24ed(0x1cc)+_0xc34f30[_0x3f24ed(0x1e7)][_0x3f24ed(0x1ed)]+_0x3f24ed(0x1cb)+_0x5a7f6f+'\x22.'};}},useDef={'service':a3_0x162cd6(0x1fe),'command':a3_0x162cd6(0x20a),'description':a3_0x162cd6(0x1d5),'risk':a3_0x162cd6(0x1ec),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'name','description':'Remote\x20app\x20name\x20to\x20activate','required':!![]}],'flags':[GLOBAL_FLAG],async 'validate'(_0x14422c){const _0x45fe76=a3_0x162cd6;if(!_0x14422c['args'][0x0])throw CliErrors['validation'](_0x45fe76(0x217),_0x45fe76(0x1ee)+CLI_BIN_NAME+'\x20app\x20use\x20<name>\x20[--global]');},async 'execute'(_0x468162){const _0x164905=a3_0x162cd6;warnDeprecatedAppCommand(_0x164905(0x20a),CLI_BIN_NAME+_0x164905(0x21d));const _0x1242e7=_0x468162['args'][0x0];if(!_0x1242e7)throw CliErrors[_0x164905(0x1c8)]('Missing\x20app\x20name.','Usage:\x20'+CLI_BIN_NAME+'\x20app\x20use\x20<name>\x20[--global]');const {buildConfigFromFlags:_0x1b1bfa,resolveLocalAppAliasCode:_0x5393fe}=await import(_0x164905(0x1fa)),{readCachedAppList:_0x5823f3}=await import('../../commands/app/cache.js'),_0x3c23bb=_0x468162[_0x164905(0x1eb)](_0x164905(0x204)),_0x4e53bd=_0x1b1bfa(_0x3c23bb?{'env':_0x3c23bb}:{}),_0x5b6f53=_0x5823f3(_0x4e53bd[_0x164905(0x204)],_0x4e53bd['accessKey']),_0x43461d=_0x5b6f53?.['items']['find'](_0x32145c=>_0x32145c[_0x164905(0x1d6)]===_0x1242e7),_0x708deb=_0x5393fe(_0x4e53bd[_0x164905(0x1fb)]??{},_0x1242e7);if(_0x43461d&&!isRuntimeAccessibleApp(_0x43461d))throw runtimeInaccessibleAppError(_0x43461d,'\x22'+_0x1242e7+'\x22');if(_0x708deb){const _0x53e4e1=_0x5b6f53?.[_0x164905(0x1e7)]['find'](_0x3cb489=>_0x3cb489['appCode']?.[_0x164905(0x1ef)]()===_0x708deb);if(_0x53e4e1&&!isRuntimeAccessibleApp(_0x53e4e1))throw runtimeInaccessibleAppError(_0x53e4e1,'\x22'+_0x1242e7+'\x22');}if(!_0x43461d&&!_0x708deb&&_0x4e53bd[_0x164905(0x1d3)]!==_0x1242e7){const _0x8192b1=[..._0x5b6f53?.[_0x164905(0x1e7)]['map'](_0x2c6656=>_0x2c6656[_0x164905(0x1d6)])??[]],_0x391dc9=_0x8192b1[_0x164905(0x1ed)]===0x0?_0x164905(0x20f)+CLI_BIN_NAME+_0x164905(0x1f6)+_0x1242e7+_0x164905(0x1f5):_0x164905(0x1f2)+Array[_0x164905(0x214)](new Set(_0x8192b1))[_0x164905(0x1e6)](',\x20')+_0x164905(0x1fc);throw CliErrors['validation'](_0x164905(0x1d8)+_0x1242e7+'\x22\x20not\x20found.',_0x391dc9);}const _0x28727a=_0x468162['bool']('global');let _0x4adbfb;if(_0x28727a)_0x4adbfb={'global':!![]};else{const {isInProject:_0x5c82c6}=await import(_0x164905(0x1fa)),_0x3acd82=_0x5c82c6();_0x4adbfb=toScopeFlags(resolveConfigScope({'explicitGlobal':![],'policy':'project-default','inProject':_0x3acd82}));}const _0x5194a9=readConfig(_0x4adbfb);return _0x5194a9[_0x164905(0x1d3)]=_0x1242e7,writeConfig(_0x5194a9,_0x4adbfb),{'ok':!![],'message':_0x164905(0x212)+_0x1242e7+'\x22'+scopeLabel(_0x4adbfb)+'.'};}};function warnDeprecatedAppCommand(_0x507944,_0xd3963a){const _0x404f02=a3_0x162cd6;console[_0x404f02(0x1e4)](CLI_BIN_NAME+_0x404f02(0x20e)+_0x507944+_0x404f02(0x1e5)+_0xd3963a+_0x404f02(0x1e3));}const importDef={'service':'app','command':a3_0x162cd6(0x1d9),'description':a3_0x162cd6(0x210),'risk':a3_0x162cd6(0x1ec),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initImportFlagDefs,async 'execute'(_0x43e7f7){return await runInitImport(collectFlags(_0x43e7f7,initImportFlagDefs)),{'ok':!![]};}};export const appDefinitions=[initDef,listDef,pullDef,useDef,importDef];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x434c48,_0xa894e0){const _0x19cda9=a4_0x139c,_0x4ff40a=_0x434c48();while(!![]){try{const _0x250d63=-parseInt(_0x19cda9(0x1e7))/0x1+parseInt(_0x19cda9(0x1e5))/0x2*(-parseInt(_0x19cda9(0x1ee))/0x3)+parseInt(_0x19cda9(0x1f0))/0x4*(-parseInt(_0x19cda9(0x1e8))/0x5)+parseInt(_0x19cda9(0x1f3))/0x6+-parseInt(_0x19cda9(0x1e3))/0x7*(-parseInt(_0x19cda9(0x1ed))/0x8)+-parseInt(_0x19cda9(0x1e2))/0x9+parseInt(_0x19cda9(0x1e1))/0xa*(-parseInt(_0x19cda9(0x1e4))/0xb);if(_0x250d63===_0xa894e0)break;else _0x4ff40a['push'](_0x4ff40a['shift']());}catch(_0x18e263){_0x4ff40a['push'](_0x4ff40a['shift']());}}}(a4_0x1e70,0xa3451));function a4_0x1e70(){const _0x578bd2=['filter','3911312kFRsfc','93MkLNwt','UNKNOWN','29404HopfcK','\x20dataset/data/sql/bff\x20commands,\x20or\x20choose\x20a\x20published\x20app.','Current\x20status:\x20','7699068QwRIov','appCode','\x20is\x20not\x20available\x20for\x20runtime\x20AI\x20access.','appPublishStatus','1807430yBMNJq','4124628JiCNcn','14JrJELU','22lIuKIH','6794qKcxci','find','233459RkGqcr','295AGfFnp','trim','App\x20','validation'];a4_0x1e70=function(){return _0x578bd2;};return a4_0x1e70();}function a4_0x139c(_0x20af07,_0x22a7e1){_0x20af07=_0x20af07-0x1e0;const _0x1e70a9=a4_0x1e70();let _0x139c85=_0x1e70a9[_0x20af07];return _0x139c85;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{RUNTIME_ACCESSIBLE_APP_STATUS}from'../../constant/app.js';import{CliErrors}from'../../errors.js';export function normalizeAppPublishStatus(_0x22a18a){const _0x32659f=a4_0x139c;if(typeof _0x22a18a!=='string')return null;const _0x13c4f6=_0x22a18a[_0x32659f(0x1e9)]();return _0x13c4f6?_0x13c4f6['toUpperCase']():null;}export function isRuntimeAccessibleApp(_0x19c195){return normalizeAppPublishStatus(_0x19c195['appPublishStatus'])===RUNTIME_ACCESSIBLE_APP_STATUS;}export function filterRuntimeAccessibleApps(_0x2be986){const _0x3b25da=a4_0x139c;return _0x2be986[_0x3b25da(0x1ec)](isRuntimeAccessibleApp);}export function findAppByName(_0x100b09,_0x250a0b){const _0x187415=a4_0x139c;return _0x100b09[_0x187415(0x1e6)](_0x51d96f=>_0x51d96f['appName']===_0x250a0b);}export function findAppByCode(_0x55e929,_0x9f75dd){const _0x45d060=a4_0x139c,_0xd1a94a=_0x9f75dd[_0x45d060(0x1e9)]();if(!_0xd1a94a)return undefined;return _0x55e929[_0x45d060(0x1e6)](_0x3a5041=>_0x3a5041[_0x45d060(0x1f4)]?.[_0x45d060(0x1e9)]()===_0xd1a94a);}export function runtimeInaccessibleAppError(_0x22a1c6,_0x2d8727){const _0xcdca26=a4_0x139c,_0xc1cb1c=normalizeAppPublishStatus(_0x22a1c6[_0xcdca26(0x1e0)])??_0xcdca26(0x1ef);return CliErrors[_0xcdca26(0x1eb)](_0xcdca26(0x1ea)+_0x2d8727+_0xcdca26(0x1f5),_0xcdca26(0x1f2)+_0xc1cb1c+'.\x20Publish\x20the\x20app\x20before\x20using\x20'+CLI_BIN_NAME+_0xcdca26(0x1f1));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x14f83c,_0x345a81){const _0x2719f0=a5_0x24ae,_0x1eecfd=_0x14f83c();while(!![]){try{const _0x209ad4=parseInt(_0x2719f0(0x138))/0x1+parseInt(_0x2719f0(0x13f))/0x2*(parseInt(_0x2719f0(0x137))/0x3)+-parseInt(_0x2719f0(0x13c))/0x4*(parseInt(_0x2719f0(0x142))/0x5)+parseInt(_0x2719f0(0x136))/0x6*(-parseInt(_0x2719f0(0x141))/0x7)+parseInt(_0x2719f0(0x140))/0x8*(parseInt(_0x2719f0(0x13a))/0x9)+parseInt(_0x2719f0(0x143))/0xa+-parseInt(_0x2719f0(0x131))/0xb*(-parseInt(_0x2719f0(0x13d))/0xc);if(_0x209ad4===_0x345a81)break;else _0x1eecfd['push'](_0x1eecfd['shift']());}catch(_0x4d4572){_0x1eecfd['push'](_0x1eecfd['shift']());}}}(a5_0x5044,0x3b09c));import{fileURLToPath}from'url';import{dirname,join}from'path';import{readFileSync}from'fs';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function loadMockAppList(){const _0x8dfe82=a5_0x24ae,_0x3b5657=join(__dirname,_0x8dfe82(0x13e)),_0x2da6e4=readFileSync(_0x3b5657,_0x8dfe82(0x132));return JSON[_0x8dfe82(0x130)](_0x2da6e4);}function a5_0x5044(){const _0x2ee67e=['parse','453365PYvQIa','utf-8','errorMsg','success','data','2305482jAFdsr','243fWxdbJ','173019uNQVgn','errorCode','620820oDRIsm','Mock\x20API\x20error:\x20','9268ENhtxX','60RVtuca','../../../mock/app-list.json','11024ucKWfF','8HBtLlO','7yOrFOJ','985FpFSHH','1879700bkFhAr'];a5_0x5044=function(){return _0x2ee67e;};return a5_0x5044();}let _cached=null;export function getMockAppList(){return!_cached&&(_cached=loadMockAppList()),_cached;}function a5_0x24ae(_0x12220c,_0x1061d9){_0x12220c=_0x12220c-0x130;const _0x504477=a5_0x5044();let _0x24aeea=_0x504477[_0x12220c];return _0x24aeea;}export function getMockRemoteAppItems(){const _0x477e25=a5_0x24ae,_0x390b70=getMockAppList();if(!_0x390b70[_0x477e25(0x134)])throw new Error(_0x477e25(0x13b)+_0x390b70[_0x477e25(0x133)]+'\x20('+_0x390b70[_0x477e25(0x139)]+')');return _0x390b70[_0x477e25(0x135)]['tableData'];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x45678f,_0x5b2890){const _0x4ea5ad=a6_0x3436,_0x122c2a=_0x45678f();while(!![]){try{const _0x58b7e3=parseInt(_0x4ea5ad(0x101))/0x1+-parseInt(_0x4ea5ad(0x10b))/0x2*(-parseInt(_0x4ea5ad(0x108))/0x3)+parseInt(_0x4ea5ad(0x103))/0x4*(parseInt(_0x4ea5ad(0x100))/0x5)+-parseInt(_0x4ea5ad(0x109))/0x6+-parseInt(_0x4ea5ad(0x104))/0x7*(parseInt(_0x4ea5ad(0x10d))/0x8)+parseInt(_0x4ea5ad(0x105))/0x9*(-parseInt(_0x4ea5ad(0x10e))/0xa)+parseInt(_0x4ea5ad(0x102))/0xb;if(_0x58b7e3===_0x5b2890)break;else _0x122c2a['push'](_0x122c2a['shift']());}catch(_0x7b7b26){_0x122c2a['push'](_0x122c2a['shift']());}}}(a6_0x4a9b,0x4f7e9));import{getMyApps}from'../../core/api-client.js';import{getMockRemoteAppItems}from'../../commands/app/mock-loader.js';function a6_0x3436(_0x50df1b,_0x54457f){_0x50df1b=_0x50df1b-0xfd;const _0x4a9b73=a6_0x4a9b();let _0x3436fa=_0x4a9b73[_0x50df1b];return _0x3436fa;}import{getAppCacheFilePath,readCachedAppList,writeCachedAppList}from'../../commands/app/cache.js';import{productEnv}from'../../constant/product.js';export function shouldUseMockRemoteApps(){const _0x13d02d=a6_0x3436,_0x319602=(productEnv('APP_LIST_SOURCE')||'')[_0x13d02d(0x106)]()['toLowerCase']();return _0x319602===_0x13d02d(0xfd);}function a6_0x4a9b(){const _0x523b3a=['toISOString','fetchedAt','10SBsjrY','156200VWDxmk','2855908zkQsFW','386108UeckUZ','11347FRLRpO','1980ZYoHJX','trim','items','38016OajHzL','1572024VTmhqi','cache','94NPcWrX','remote','2344UXmuIZ','6450NLvrgh','mock'];a6_0x4a9b=function(){return _0x523b3a;};return a6_0x4a9b();}export async function getRemoteAppItems(){if(shouldUseMockRemoteApps())return getMockRemoteAppItems();return getMyApps();}export async function getRemoteAppList(_0xba19c4){const _0x53c992=a6_0x3436,{env:_0x4a15d8,accessKey:_0x499748,localOnly:localOnly=![],noCache:noCache=![]}=_0xba19c4,_0x47ead7=readCachedAppList(_0x4a15d8,_0x499748),_0x70b1e3=_0x499748?.[_0x53c992(0x106)]()?getAppCacheFilePath(_0x4a15d8,_0x499748):null;if(localOnly)return{'items':_0x47ead7?.[_0x53c992(0x107)]??[],'source':_0x53c992(0x10a),'fetchedAt':_0x47ead7?.[_0x53c992(0xff)]??null,'cachePath':_0x70b1e3};try{const _0x13eb8d=await getRemoteAppItems(),_0x51ba72=shouldUseMockRemoteApps()?_0x53c992(0xfd):_0x53c992(0x10c),_0xec9b7c=new Date()[_0x53c992(0xfe)](),_0x41ca9d=_0x499748?.[_0x53c992(0x106)]()?writeCachedAppList(_0x4a15d8,_0x499748,{'env':_0x4a15d8,'fetchedAt':_0xec9b7c,'source':_0x51ba72,'items':_0x13eb8d}):null;return{'items':_0x13eb8d,'source':_0x51ba72,'fetchedAt':_0xec9b7c,'cachePath':_0x41ca9d};}catch(_0x5f3993){if(!noCache&&_0x47ead7)return{'items':_0x47ead7[_0x53c992(0x107)],'source':'cache','fetchedAt':_0x47ead7[_0x53c992(0xff)],'cachePath':_0x70b1e3};throw _0x5f3993;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x361af2,_0x109c43){const _0x48bf1d=a7_0x1dde,_0x40909c=_0x361af2();while(!![]){try{const _0x322e37=parseInt(_0x48bf1d(0xdb))/0x1*(parseInt(_0x48bf1d(0xe0))/0x2)+-parseInt(_0x48bf1d(0xd1))/0x3+parseInt(_0x48bf1d(0xdf))/0x4+parseInt(_0x48bf1d(0xd2))/0x5+-parseInt(_0x48bf1d(0xdc))/0x6*(parseInt(_0x48bf1d(0xdd))/0x7)+-parseInt(_0x48bf1d(0xda))/0x8+-parseInt(_0x48bf1d(0xe1))/0x9;if(_0x322e37===_0x109c43)break;else _0x40909c['push'](_0x40909c['shift']());}catch(_0x101e3e){_0x40909c['push'](_0x40909c['shift']());}}}(a7_0x356a,0xa8c85));import{CLI_BIN_NAME}from'../../constant/cli.js';import{formatScopeLabel}from'../../commands/common/config-policy.js';export{CLI_BIN_NAME};function a7_0x1dde(_0x33666b,_0x5b4b98){_0x33666b=_0x33666b-0xcf;const _0x356a11=a7_0x356a();let _0x1dde0c=_0x356a11[_0x33666b];return _0x1dde0c;}export function enrichAppListItemsWithMergedSelection(_0x3e0b3e,_0x2d7707){const _0x153cd3=a7_0x1dde;if(!_0x2d7707)return;const _0x4d2f1a=!!(_0x2d7707[_0x153cd3(0xe2)]??_0x2d7707[_0x153cd3(0xd9)]);for(const _0x43893e of _0x3e0b3e){_0x43893e[_0x153cd3(0xd6)]=![];}const _0x43c759=_0x2d7707[_0x153cd3(0xd4)]!=null?String(_0x2d7707[_0x153cd3(0xd4)])[_0x153cd3(0xd5)]():'';if(_0x4d2f1a){const _0x206f08=_0x2d7707[_0x153cd3(0xe2)]??_0x2d7707[_0x153cd3(0xd9)];if(_0x206f08){const _0x548a4e=_0x3e0b3e[_0x153cd3(0xcf)](_0x58e46b=>_0x58e46b[_0x153cd3(0xd8)]===!![]&&_0x58e46b[_0x153cd3(0xd0)]===_0x206f08&&_0x58e46b[_0x153cd3(0xd7)]===_0x153cd3(0xde)),_0x2d697b=_0x548a4e??_0x3e0b3e[_0x153cd3(0xcf)](_0x42587c=>_0x42587c[_0x153cd3(0xd8)]===!![]&&_0x42587c['name']===_0x206f08);_0x2d697b&&(_0x2d697b['isCurrent']=!![]);}return;}if(!_0x43c759)return;for(const _0x21b76f of _0x3e0b3e){String(_0x21b76f['appcode']??'')['trim']()===_0x43c759&&(_0x21b76f['isCurrent']=!![]);}}export{readScopedConfig as readConfig,writeScopedConfig as writeConfig,isInProject}from'../../context.js';function a7_0x356a(){const _0x49df8c=['definedIn','named','defaultApp','3880984AcSHHw','1951ABzKdA','6MmbAOw','2267559jZdjue','local','4511496tfeVQd','334nJbVep','203526fliqjr','currentApp','find','name','1286808wZmswX','2491260EpoeGt','project','appCode','trim','isCurrent'];a7_0x356a=function(){return _0x49df8c;};return a7_0x356a();}export function scopeLabel(_0x4b4223){const _0x49a01e=a7_0x1dde;return formatScopeLabel(_0x4b4223['global']?'global':_0x49a01e(0xd3));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a8_0x4b6756=a8_0x24e9;(function(_0x437b08,_0x549788){const _0xbe1c0b=a8_0x24e9,_0x826a08=_0x437b08();while(!![]){try{const _0x3b0dad=-parseInt(_0xbe1c0b(0x198))/0x1+-parseInt(_0xbe1c0b(0x180))/0x2+-parseInt(_0xbe1c0b(0x188))/0x3+-parseInt(_0xbe1c0b(0x1ca))/0x4*(parseInt(_0xbe1c0b(0x1a6))/0x5)+-parseInt(_0xbe1c0b(0x19b))/0x6+parseInt(_0xbe1c0b(0x185))/0x7*(parseInt(_0xbe1c0b(0x1b1))/0x8)+parseInt(_0xbe1c0b(0x1b9))/0x9*(parseInt(_0xbe1c0b(0x18b))/0xa);if(_0x3b0dad===_0x549788)break;else _0x826a08['push'](_0x826a08['shift']());}catch(_0xbce0fd){_0x826a08['push'](_0x826a08['shift']());}}}(a8_0x4caf,0x53d6b));import{existsSync,readFileSync,statSync}from'node:fs';function a8_0x24e9(_0x4f240e,_0x1bedc0){_0x4f240e=_0x4f240e-0x17d;const _0x4cafe4=a8_0x4caf();let _0x24e9de=_0x4cafe4[_0x4f240e];return _0x24e9de;}import{createRuntimeArtifact,getRuntimeArtifact,listRuntimeArtifacts,updateRuntimeArtifact}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const ARTIFACT_TYPE_REACT_MODULE='react_module',ARTIFACT_SOURCE_AGENT='AGENT',ALLOWED_REACT_MODULE_IMPORTS=[a8_0x4b6756(0x186),a8_0x4b6756(0x18e),'lodash',a8_0x4b6756(0x1b7),a8_0x4b6756(0x187),a8_0x4b6756(0x19c)];export const ALLOWED_REACT_MODULE_IMPORTS_TEXT=ALLOWED_REACT_MODULE_IMPORTS[a8_0x4b6756(0x18a)](',\x20');const IMPORT_SOURCE_PATTERNS=[/\bimport\s+(?:type\s+)?(?:[^'";]*?\s+from\s+)?["']([^"']+)["']/g,/\bexport\s+(?:type\s+)?[^'";]*?\s+from\s+["']([^"']+)["']/g,/\bimport\s*\(\s*["']([^"']+)["']\s*\)/g,/\brequire\s*\(\s*["']([^"']+)["']\s*\)/g],PAGE_LEVEL_PATTERNS=[/<!doctype\s+html/i,/<\s*html\b/i,/\bcreateRoot\s*\(/,/\bReactDOM\s*\.\s*render\s*\(/,/\bReactDOM\s*\.\s*createRoot\s*\(/],FILE_FLAG={'name':a8_0x4b6756(0x197),'type':a8_0x4b6756(0x1b6),'required':!![],'description':a8_0x4b6756(0x1a9)},ARTIFACT_NAME_FLAG={'name':a8_0x4b6756(0x1ab),'type':a8_0x4b6756(0x1b6),'description':'Artifact\x20display\x20name'},METADATA_FLAG={'name':a8_0x4b6756(0x1aa),'type':'string','description':a8_0x4b6756(0x194)};function isPlainObject(_0x5ed5be){const _0x4e2711=a8_0x4b6756;return typeof _0x5ed5be==='object'&&_0x5ed5be!==null&&!Array[_0x4e2711(0x193)](_0x5ed5be);}function readSourceFile(_0x5e9984){const _0x59f2c7=a8_0x4b6756;if(!_0x5e9984)throw CliErrors[_0x59f2c7(0x17d)](_0x59f2c7(0x17f));if(!existsSync(_0x5e9984))throw CliErrors['validation'](_0x59f2c7(0x1ba)+_0x5e9984);if(!statSync(_0x5e9984)[_0x59f2c7(0x1b3)]())throw CliErrors['validation'](_0x59f2c7(0x182)+_0x5e9984);const _0x198f4c=readFileSync(_0x5e9984,_0x59f2c7(0x1b0));return validateReactModuleSource(_0x198f4c),_0x198f4c;}function parseMetadata(_0x1c6ef1){const _0x555b68=a8_0x4b6756;if(!_0x1c6ef1)return undefined;let _0x280790;try{_0x280790=JSON[_0x555b68(0x1a2)](_0x1c6ef1);}catch{throw CliErrors[_0x555b68(0x17d)]('Invalid\x20JSON\x20for\x20--metadata:\x20'+_0x1c6ef1);}if(!isPlainObject(_0x280790))throw CliErrors[_0x555b68(0x17d)](_0x555b68(0x1cb));const _0x10e4f3={..._0x280790};return delete _0x10e4f3[_0x555b68(0x18f)],_0x10e4f3;}function getPackageName(_0x427c7f){const _0xf2170f=a8_0x4b6756;if(_0x427c7f[_0xf2170f(0x199)]('@')){const [_0x15220e,_0x3529e8]=_0x427c7f[_0xf2170f(0x183)]('/');return _0x15220e&&_0x3529e8?_0x15220e+'/'+_0x3529e8:_0x427c7f;}return _0x427c7f['split']('/')[0x0]||_0x427c7f;}function validateAllowedImports(_0x105e58){const _0x120763=a8_0x4b6756,_0x49b410=new Set();for(const _0x507eb8 of IMPORT_SOURCE_PATTERNS){_0x507eb8[_0x120763(0x17e)]=0x0;let _0x1e9b4f;while((_0x1e9b4f=_0x507eb8[_0x120763(0x1a3)](_0x105e58))!==null){const _0x41fbdb=_0x1e9b4f[0x1]?.[_0x120763(0x19d)]();_0x41fbdb&&_0x49b410[_0x120763(0x1c3)](_0x41fbdb);}}const _0x2841ae=[..._0x49b410][_0x120763(0x181)](getPackageName)[_0x120763(0x19f)](_0x340c7b=>!ALLOWED_REACT_MODULE_IMPORTS[_0x120763(0x1bd)](_0x340c7b));if(_0x2841ae[_0x120763(0x1b5)]>0x0)throw CliErrors[_0x120763(0x17d)](_0x120763(0x1c7)+ALLOWED_REACT_MODULE_IMPORTS_TEXT+_0x120763(0x1b4)+[...new Set(_0x2841ae)][_0x120763(0x18a)](',\x20'));}function a8_0x4caf(){const _0x108635=['utf8','9448KoLWJU','read','isFile','.\x20Unsupported:\x20','length','string','dayjs','favorite','1071DbewOU','File\x20not\x20found:\x20','deleted','body','includes','list','source','/update','Optional\x20favorite-state\x20filter','/client/artifact/','add','flag','/client/artifact/create','Artifact\x20source\x20file\x20is\x20blank.','react_module\x20imports\x20are\x20limited\x20to:\x20','Update\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','List\x20current-app\x20react_module\x20Artifacts','4TlbdpL','--metadata\x20must\x20be\x20a\x20JSON\x20object.','validation','lastIndex','File\x20path\x20is\x20required.','277742ZHvuFX','map','File\x20is\x20not\x20a\x20regular\x20file:\x20','split','Create\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','3962ExaiSD','react','antd','1948509kEVWvN','Artifact\x20ID','join','109570fSClIh','content','POST','react-dom','compiledContent','num','str','appCode','isArray','Artifact\x20metadata\x20as\x20JSON\x20object;\x20compiledContent\x20is\x20stripped','Show\x20one\x20Artifact\x20by\x20id','test','file','67736pAQefm','startsWith','create','3098226sNQZvJ','@ant-design/icons','trim','description','filter','Optional\x20source\x20filter,\x20for\x20example\x20AGENT','bool','parse','exec','Updated\x20Artifact\x20','Preview:\x20update\x20react_module\x20Artifact\x20','1282225WpZYRr','write','detail','Path\x20to\x20a\x20local\x20UTF-8\x20React\x20module\x20source\x20file','metadata','name','artifact','updateTime','artifactType','react_module\x20must\x20be\x20an\x20embeddable\x20React\x20module,\x20not\x20full\x20HTML\x20or\x20a\x20ReactDOM/createRoot\x20mount\x20entry.'];a8_0x4caf=function(){return _0x108635;};return a8_0x4caf();}export function validateReactModuleSource(_0x30b82d){const _0x1bd3a2=a8_0x4b6756;if(!_0x30b82d[_0x1bd3a2(0x19d)]())throw CliErrors[_0x1bd3a2(0x17d)](_0x1bd3a2(0x1c6));if(PAGE_LEVEL_PATTERNS['some'](_0x521067=>_0x521067[_0x1bd3a2(0x196)](_0x30b82d)))throw CliErrors[_0x1bd3a2(0x17d)](_0x1bd3a2(0x1af));validateAllowedImports(_0x30b82d);}function buildArtifactInput(_0x2bfcd4){const _0x499091=a8_0x4b6756,_0x2699e5=readSourceFile(_0x2bfcd4[_0x499091(0x191)](_0x499091(0x197))),_0x2a81f1=_0x2bfcd4[_0x499091(0x191)](_0x499091(0x1ab))[_0x499091(0x19d)](),_0x11dbf8=parseMetadata(_0x2bfcd4[_0x499091(0x191)](_0x499091(0x1aa)));return{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x2a81f1?{'name':_0x2a81f1}:{},'content':_0x2699e5,..._0x11dbf8?{'metadata':_0x11dbf8}:{},'source':ARTIFACT_SOURCE_AGENT};}function summarizeArtifact(_0x16fe11){const _0xc84bad=a8_0x4b6756;return{'id':_0x16fe11['id'],'name':_0x16fe11[_0xc84bad(0x1ab)],'artifactType':_0x16fe11[_0xc84bad(0x1ae)],'source':_0x16fe11[_0xc84bad(0x1bf)],'favorite':_0x16fe11[_0xc84bad(0x1b8)],'deleted':_0x16fe11[_0xc84bad(0x1bb)],'createTime':_0x16fe11['createTime'],'updateTime':_0x16fe11[_0xc84bad(0x1ad)]};}function detailArtifact(_0x4c2688){const _0x25fb2d=a8_0x4b6756;return{'id':_0x4c2688['id'],'appCode':_0x4c2688[_0x25fb2d(0x192)],'name':_0x4c2688['name'],'artifactType':_0x4c2688['artifactType'],'source':_0x4c2688['source'],'favorite':_0x4c2688['favorite'],'deleted':_0x4c2688[_0x25fb2d(0x1bb)],'content':_0x4c2688[_0x25fb2d(0x18c)]??'','compiledContent':_0x4c2688[_0x25fb2d(0x18f)],'metadata':_0x4c2688[_0x25fb2d(0x1aa)]??{},'createTime':_0x4c2688['createTime'],'updateTime':_0x4c2688[_0x25fb2d(0x1ad)]};}function readFavoriteFlag(_0x27dc77){const _0x424e17=a8_0x4b6756,_0x43dbec=_0x27dc77[_0x424e17(0x1c4)](_0x424e17(0x1b8));return _0x43dbec===undefined||_0x43dbec===null||_0x43dbec===''?undefined:_0x27dc77[_0x424e17(0x1a1)](_0x424e17(0x1b8));}const artifactList={'service':a8_0x4b6756(0x1ac),'command':a8_0x4b6756(0x1be),'description':a8_0x4b6756(0x1c9),'risk':'read','flags':[{'name':a8_0x4b6756(0x1bf),'type':a8_0x4b6756(0x1b6),'description':a8_0x4b6756(0x1a0)},{'name':a8_0x4b6756(0x1b8),'type':'boolean','description':a8_0x4b6756(0x1c1)},VERBOSE_FLAG],async 'execute'(_0x3a5422){const _0x7c2ec7=a8_0x4b6756,_0x3588b4=await listRuntimeArtifacts(_0x3a5422[_0x7c2ec7(0x192)],{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x3a5422[_0x7c2ec7(0x191)](_0x7c2ec7(0x1bf))?{'source':_0x3a5422[_0x7c2ec7(0x191)](_0x7c2ec7(0x1bf))}:{},...readFavoriteFlag(_0x3a5422)!==undefined?{'favorite':readFavoriteFlag(_0x3a5422)}:{}});return{'ok':!![],'data':{'total':_0x3588b4[_0x7c2ec7(0x1b5)],'items':_0x3a5422[_0x7c2ec7(0x1a1)]('verbose')?_0x3588b4:_0x3588b4[_0x7c2ec7(0x181)](summarizeArtifact)}};}},artifactDetail={'service':a8_0x4b6756(0x1ac),'command':a8_0x4b6756(0x1a8),'description':a8_0x4b6756(0x195),'risk':a8_0x4b6756(0x1b2),'flags':[{...ID_FLAG,'description':a8_0x4b6756(0x189)}],async 'execute'(_0x26ec06){const _0xd90734=a8_0x4b6756,_0x133dc9=await getRuntimeArtifact(_0x26ec06[_0xd90734(0x190)]('id'),_0x26ec06['appCode']);return{'ok':!![],'data':detailArtifact(_0x133dc9)};}},artifactCreate={'service':'artifact','command':a8_0x4b6756(0x19a),'description':a8_0x4b6756(0x184),'risk':a8_0x4b6756(0x1a7),'flags':[FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0xa33b6f){const _0x20f24b=a8_0x4b6756,_0x4a9ce8=buildArtifactInput(_0xa33b6f),_0x2b600e=await createRuntimeArtifact(_0xa33b6f['appCode'],_0x4a9ce8);return{'ok':!![],'data':detailArtifact(_0x2b600e),'message':'Created\x20Artifact\x20'+_0x2b600e['id']+(_0x2b600e[_0x20f24b(0x1ab)]?'\x20('+_0x2b600e[_0x20f24b(0x1ab)]+')':'')};},async 'dryRun'(_0x2fdc5d){const _0x241b77=a8_0x4b6756,_0x2feec2=buildArtifactInput(_0x2fdc5d);return dryRun('POST',_0x241b77(0x1c5))[_0x241b77(0x1bc)]({'appCode':_0x2fdc5d[_0x241b77(0x192)],..._0x2feec2})[_0x241b77(0x19e)]('Preview:\x20create\x20react_module\x20Artifact')['build']();}},artifactUpdate={'service':a8_0x4b6756(0x1ac),'command':'update','description':a8_0x4b6756(0x1c8),'risk':'write','flags':[{...ID_FLAG,'description':'Artifact\x20ID'},FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x414107){const _0x3648a1=a8_0x4b6756,_0x450c2e=_0x414107[_0x3648a1(0x190)]('id'),_0x32b0ed=buildArtifactInput(_0x414107),_0x1d1d19=await updateRuntimeArtifact(_0x450c2e,_0x414107['appCode'],_0x32b0ed);return{'ok':!![],'data':detailArtifact(_0x1d1d19),'message':_0x3648a1(0x1a4)+_0x1d1d19['id']+(_0x1d1d19[_0x3648a1(0x1ab)]?'\x20('+_0x1d1d19[_0x3648a1(0x1ab)]+')':'')};},async 'dryRun'(_0x19234f){const _0x3b75ae=a8_0x4b6756,_0x3e9e89=_0x19234f[_0x3b75ae(0x190)]('id'),_0x4e76af=buildArtifactInput(_0x19234f);return dryRun(_0x3b75ae(0x18d),_0x3b75ae(0x1c2)+_0x3e9e89+_0x3b75ae(0x1c0))['body']({'appCode':_0x19234f[_0x3b75ae(0x192)],..._0x4e76af})[_0x3b75ae(0x19e)](_0x3b75ae(0x1a5)+_0x3e9e89)['build']();}};export const artifactDefinitions=[artifactList,artifactDetail,artifactCreate,artifactUpdate];
|
|
1
|
+
const a8_0x329ebd=a8_0x5c0d;(function(_0x164fee,_0xb637cd){const _0x1680e2=a8_0x5c0d,_0x36dea5=_0x164fee();while(!![]){try{const _0x20b450=parseInt(_0x1680e2(0x1ca))/0x1+-parseInt(_0x1680e2(0x1c1))/0x2+parseInt(_0x1680e2(0x1dc))/0x3+parseInt(_0x1680e2(0x1b7))/0x4+parseInt(_0x1680e2(0x1ef))/0x5*(parseInt(_0x1680e2(0x1cd))/0x6)+-parseInt(_0x1680e2(0x1f0))/0x7+-parseInt(_0x1680e2(0x1da))/0x8*(-parseInt(_0x1680e2(0x1fa))/0x9);if(_0x20b450===_0xb637cd)break;else _0x36dea5['push'](_0x36dea5['shift']());}catch(_0x5c59b3){_0x36dea5['push'](_0x36dea5['shift']());}}}(a8_0x52bf,0xcdc9e));import{existsSync,readFileSync,statSync}from'node:fs';import{createRuntimeArtifact,getRuntimeArtifact,listRuntimeArtifacts,updateRuntimeArtifact}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';function a8_0x52bf(){const _0x1faaad=['isFile','Artifact\x20display\x20name','Updated\x20Artifact\x20','trim','description','/client/artifact/','react_module','flag','Update\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','Optional\x20favorite-state\x20filter','3744500egpNPn','split','List\x20current-app\x20react_module\x20Artifacts','file','Preview:\x20create\x20react_module\x20Artifact','metadata','test','lodash','react','startsWith','2756860GvHOdQ','read','detail','artifactType','update','Preview:\x20update\x20react_module\x20Artifact\x20','.\x20Unsupported:\x20','write','react_module\x20imports\x20are\x20limited\x20to:\x20','305635wSgkah','appCode','bool','2102904DlfzQg','Path\x20to\x20a\x20local\x20UTF-8\x20React\x20module\x20source\x20file','includes','join','validation','list','parse','AGENT','Artifact\x20metadata\x20as\x20JSON\x20object;\x20compiledContent\x20is\x20stripped','react_module\x20must\x20be\x20an\x20embeddable\x20React\x20module,\x20not\x20full\x20HTML\x20or\x20a\x20ReactDOM/createRoot\x20mount\x20entry.','num','string','updateTime','8HBdjWy','/client/artifact/create','79167WAhFAj','favorite','build','deleted','utf8','Created\x20Artifact\x20','Invalid\x20JSON\x20for\x20--metadata:\x20','boolean','map','react-dom','Create\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','str','artifact','createTime','POST','content','exec','name','@ant-design/icons','10scWIIQ','9761451cdwAdu','File\x20not\x20found:\x20','compiledContent','dayjs','source','body','verbose','length','--metadata\x20must\x20be\x20a\x20JSON\x20object.','Artifact\x20ID','14820444LwQGmj'];a8_0x52bf=function(){return _0x1faaad;};return a8_0x52bf();}function a8_0x5c0d(_0x407423,_0x35fd41){_0x407423=_0x407423-0x1ae;const _0x52bfe2=a8_0x52bf();let _0x5c0d30=_0x52bfe2[_0x407423];return _0x5c0d30;}import{dryRun}from'../../framework/dryrun.js';const ARTIFACT_TYPE_REACT_MODULE=a8_0x329ebd(0x1b3),ARTIFACT_SOURCE_AGENT=a8_0x329ebd(0x1d4),ALLOWED_REACT_MODULE_IMPORTS=[a8_0x329ebd(0x1bf),a8_0x329ebd(0x1e5),a8_0x329ebd(0x1be),a8_0x329ebd(0x1f3),'antd',a8_0x329ebd(0x1ee)];export const ALLOWED_REACT_MODULE_IMPORTS_TEXT=ALLOWED_REACT_MODULE_IMPORTS['join'](',\x20');const IMPORT_SOURCE_PATTERNS=[/\bimport\s+(?:type\s+)?(?:[^'";]*?\s+from\s+)?["']([^"']+)["']/g,/\bexport\s+(?:type\s+)?[^'";]*?\s+from\s+["']([^"']+)["']/g,/\bimport\s*\(\s*["']([^"']+)["']\s*\)/g,/\brequire\s*\(\s*["']([^"']+)["']\s*\)/g],PAGE_LEVEL_PATTERNS=[/<!doctype\s+html/i,/<\s*html\b/i,/\bcreateRoot\s*\(/,/\bReactDOM\s*\.\s*render\s*\(/,/\bReactDOM\s*\.\s*createRoot\s*\(/],FILE_FLAG={'name':'file','type':a8_0x329ebd(0x1d8),'required':!![],'description':a8_0x329ebd(0x1ce)},ARTIFACT_NAME_FLAG={'name':a8_0x329ebd(0x1ed),'type':'string','description':a8_0x329ebd(0x1ae)},METADATA_FLAG={'name':a8_0x329ebd(0x1bc),'type':a8_0x329ebd(0x1d8),'description':a8_0x329ebd(0x1d5)};function isPlainObject(_0x1738c4){return typeof _0x1738c4==='object'&&_0x1738c4!==null&&!Array['isArray'](_0x1738c4);}function readSourceFile(_0x382045){const _0x5883f7=a8_0x329ebd;if(!_0x382045)throw CliErrors['validation']('File\x20path\x20is\x20required.');if(!existsSync(_0x382045))throw CliErrors[_0x5883f7(0x1d1)](_0x5883f7(0x1f1)+_0x382045);if(!statSync(_0x382045)[_0x5883f7(0x1fb)]())throw CliErrors['validation']('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x382045);const _0x3993e0=readFileSync(_0x382045,_0x5883f7(0x1e0));return validateReactModuleSource(_0x3993e0),_0x3993e0;}function parseMetadata(_0x14019f){const _0x5af15d=a8_0x329ebd;if(!_0x14019f)return undefined;let _0x2a6921;try{_0x2a6921=JSON[_0x5af15d(0x1d3)](_0x14019f);}catch{throw CliErrors[_0x5af15d(0x1d1)](_0x5af15d(0x1e2)+_0x14019f);}if(!isPlainObject(_0x2a6921))throw CliErrors[_0x5af15d(0x1d1)](_0x5af15d(0x1f8));const _0x5d690f={..._0x2a6921};return delete _0x5d690f[_0x5af15d(0x1f2)],_0x5d690f;}function getPackageName(_0x1bb407){const _0x3a596b=a8_0x329ebd;if(_0x1bb407[_0x3a596b(0x1c0)]('@')){const [_0x169413,_0x3ebcf1]=_0x1bb407[_0x3a596b(0x1b8)]('/');return _0x169413&&_0x3ebcf1?_0x169413+'/'+_0x3ebcf1:_0x1bb407;}return _0x1bb407[_0x3a596b(0x1b8)]('/')[0x0]||_0x1bb407;}function validateAllowedImports(_0x554ecd){const _0x2034f8=a8_0x329ebd,_0x561d62=new Set();for(const _0x26d6cb of IMPORT_SOURCE_PATTERNS){_0x26d6cb['lastIndex']=0x0;let _0xeac4b4;while((_0xeac4b4=_0x26d6cb[_0x2034f8(0x1ec)](_0x554ecd))!==null){const _0x28c214=_0xeac4b4[0x1]?.[_0x2034f8(0x1b0)]();_0x28c214&&_0x561d62['add'](_0x28c214);}}const _0x388e7c=[..._0x561d62][_0x2034f8(0x1e4)](getPackageName)['filter'](_0x52d6ff=>!ALLOWED_REACT_MODULE_IMPORTS[_0x2034f8(0x1cf)](_0x52d6ff));if(_0x388e7c[_0x2034f8(0x1f7)]>0x0)throw CliErrors[_0x2034f8(0x1d1)](_0x2034f8(0x1c9)+ALLOWED_REACT_MODULE_IMPORTS_TEXT+_0x2034f8(0x1c7)+[...new Set(_0x388e7c)][_0x2034f8(0x1d0)](',\x20'));}export function validateReactModuleSource(_0x273f3e){const _0x10e1a6=a8_0x329ebd;if(!_0x273f3e[_0x10e1a6(0x1b0)]())throw CliErrors[_0x10e1a6(0x1d1)]('Artifact\x20source\x20file\x20is\x20blank.');if(PAGE_LEVEL_PATTERNS['some'](_0xe3e30c=>_0xe3e30c[_0x10e1a6(0x1bd)](_0x273f3e)))throw CliErrors[_0x10e1a6(0x1d1)](_0x10e1a6(0x1d6));validateAllowedImports(_0x273f3e);}function buildArtifactInput(_0x19e7f7){const _0x30bd64=a8_0x329ebd,_0x185f5c=readSourceFile(_0x19e7f7[_0x30bd64(0x1e7)](_0x30bd64(0x1ba))),_0x417dcb=_0x19e7f7['str']('name')['trim'](),_0x366086=parseMetadata(_0x19e7f7[_0x30bd64(0x1e7)](_0x30bd64(0x1bc)));return{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x417dcb?{'name':_0x417dcb}:{},'content':_0x185f5c,..._0x366086?{'metadata':_0x366086}:{},'source':ARTIFACT_SOURCE_AGENT};}function summarizeArtifact(_0x341330){const _0x5e51ae=a8_0x329ebd;return{'id':_0x341330['id'],'name':_0x341330['name'],'artifactType':_0x341330[_0x5e51ae(0x1c4)],'source':_0x341330['source'],'favorite':_0x341330[_0x5e51ae(0x1dd)],'deleted':_0x341330[_0x5e51ae(0x1df)],'createTime':_0x341330[_0x5e51ae(0x1e9)],'updateTime':_0x341330[_0x5e51ae(0x1d9)]};}function detailArtifact(_0xd0b2be){const _0x1be49e=a8_0x329ebd;return{'id':_0xd0b2be['id'],'appCode':_0xd0b2be[_0x1be49e(0x1cb)],'name':_0xd0b2be[_0x1be49e(0x1ed)],'artifactType':_0xd0b2be[_0x1be49e(0x1c4)],'source':_0xd0b2be['source'],'favorite':_0xd0b2be[_0x1be49e(0x1dd)],'deleted':_0xd0b2be[_0x1be49e(0x1df)],'content':_0xd0b2be[_0x1be49e(0x1eb)]??'','compiledContent':_0xd0b2be[_0x1be49e(0x1f2)],'metadata':_0xd0b2be[_0x1be49e(0x1bc)]??{},'createTime':_0xd0b2be[_0x1be49e(0x1e9)],'updateTime':_0xd0b2be[_0x1be49e(0x1d9)]};}function readFavoriteFlag(_0x63e46f){const _0x5291ca=a8_0x329ebd,_0x3c6397=_0x63e46f[_0x5291ca(0x1b4)](_0x5291ca(0x1dd));return _0x3c6397===undefined||_0x3c6397===null||_0x3c6397===''?undefined:_0x63e46f[_0x5291ca(0x1cc)](_0x5291ca(0x1dd));}const artifactList={'service':a8_0x329ebd(0x1e8),'command':a8_0x329ebd(0x1d2),'description':a8_0x329ebd(0x1b9),'risk':a8_0x329ebd(0x1c2),'flags':[{'name':a8_0x329ebd(0x1f4),'type':a8_0x329ebd(0x1d8),'description':'Optional\x20source\x20filter,\x20for\x20example\x20AGENT'},{'name':a8_0x329ebd(0x1dd),'type':a8_0x329ebd(0x1e3),'description':a8_0x329ebd(0x1b6)},VERBOSE_FLAG],async 'execute'(_0x1f33b7){const _0x1ba949=a8_0x329ebd,_0x37a6dc=await listRuntimeArtifacts(_0x1f33b7['appCode'],{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x1f33b7[_0x1ba949(0x1e7)](_0x1ba949(0x1f4))?{'source':_0x1f33b7['str'](_0x1ba949(0x1f4))}:{},...readFavoriteFlag(_0x1f33b7)!==undefined?{'favorite':readFavoriteFlag(_0x1f33b7)}:{}});return{'ok':!![],'data':{'total':_0x37a6dc[_0x1ba949(0x1f7)],'items':_0x1f33b7[_0x1ba949(0x1cc)](_0x1ba949(0x1f6))?_0x37a6dc:_0x37a6dc['map'](summarizeArtifact)}};}},artifactDetail={'service':a8_0x329ebd(0x1e8),'command':a8_0x329ebd(0x1c3),'description':'Show\x20one\x20Artifact\x20by\x20id','risk':a8_0x329ebd(0x1c2),'flags':[{...ID_FLAG,'description':a8_0x329ebd(0x1f9)}],async 'execute'(_0x5133ef){const _0x15b227=a8_0x329ebd,_0x365c4d=await getRuntimeArtifact(_0x5133ef['num']('id'),_0x5133ef[_0x15b227(0x1cb)]);return{'ok':!![],'data':detailArtifact(_0x365c4d)};}},artifactCreate={'service':a8_0x329ebd(0x1e8),'command':'create','description':a8_0x329ebd(0x1e6),'risk':a8_0x329ebd(0x1c8),'flags':[FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x1e3389){const _0x5041c0=a8_0x329ebd,_0x3ae18a=buildArtifactInput(_0x1e3389),_0x36a038=await createRuntimeArtifact(_0x1e3389[_0x5041c0(0x1cb)],_0x3ae18a);return{'ok':!![],'data':detailArtifact(_0x36a038),'message':_0x5041c0(0x1e1)+_0x36a038['id']+(_0x36a038[_0x5041c0(0x1ed)]?'\x20('+_0x36a038['name']+')':'')};},async 'dryRun'(_0x46e6fe){const _0x4d5744=a8_0x329ebd,_0x708ca7=buildArtifactInput(_0x46e6fe);return dryRun(_0x4d5744(0x1ea),_0x4d5744(0x1db))[_0x4d5744(0x1f5)]({'appCode':_0x46e6fe[_0x4d5744(0x1cb)],..._0x708ca7})[_0x4d5744(0x1b1)](_0x4d5744(0x1bb))[_0x4d5744(0x1de)]();}},artifactUpdate={'service':a8_0x329ebd(0x1e8),'command':a8_0x329ebd(0x1c5),'description':a8_0x329ebd(0x1b5),'risk':'write','flags':[{...ID_FLAG,'description':a8_0x329ebd(0x1f9)},FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x215f39){const _0x40645b=a8_0x329ebd,_0x17a28b=_0x215f39['num']('id'),_0x59e137=buildArtifactInput(_0x215f39),_0x437d31=await updateRuntimeArtifact(_0x17a28b,_0x215f39[_0x40645b(0x1cb)],_0x59e137);return{'ok':!![],'data':detailArtifact(_0x437d31),'message':_0x40645b(0x1af)+_0x437d31['id']+(_0x437d31['name']?'\x20('+_0x437d31['name']+')':'')};},async 'dryRun'(_0x5d9398){const _0x38f123=a8_0x329ebd,_0x540f5d=_0x5d9398[_0x38f123(0x1d7)]('id'),_0x44117d=buildArtifactInput(_0x5d9398);return dryRun('POST',_0x38f123(0x1b2)+_0x540f5d+'/update')['body']({'appCode':_0x5d9398[_0x38f123(0x1cb)],..._0x44117d})[_0x38f123(0x1b1)](_0x38f123(0x1c6)+_0x540f5d)['build']();}};export const artifactDefinitions=[artifactList,artifactDetail,artifactCreate,artifactUpdate];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a9_0x5aeb6a=a9_0x75f5;(function(_0x32fccd,_0x653376){const _0x55d9aa=a9_0x75f5,_0x44edc7=_0x32fccd();while(!![]){try{const _0x37ad9e=-parseInt(_0x55d9aa(0x1f4))/0x1+-parseInt(_0x55d9aa(0x218))/0x2+-parseInt(_0x55d9aa(0x21d))/0x3+-parseInt(_0x55d9aa(0x1f6))/0x4*(parseInt(_0x55d9aa(0x1f5))/0x5)+parseInt(_0x55d9aa(0x1f7))/0x6*(-parseInt(_0x55d9aa(0x24e))/0x7)+-parseInt(_0x55d9aa(0x1fd))/0x8*(-parseInt(_0x55d9aa(0x204))/0x9)+parseInt(_0x55d9aa(0x238))/0xa*(parseInt(_0x55d9aa(0x20f))/0xb);if(_0x37ad9e===_0x653376)break;else _0x44edc7['push'](_0x44edc7['shift']());}catch(_0x2871da){_0x44edc7['push'](_0x44edc7['shift']());}}}(a9_0x3c4d,0xb8196));function a9_0x3c4d(){const _0x1736f6=['access-key','Clear\x20accessKey\x20from\x20config','length','stdout','ACCESS_KEY','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','10UGUEqF','envName','\x20Verify:\x20','Clear\x20from\x20global\x20config\x20(default)','join','auth','development','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','Use\x20`','\x20config.\x20Nothing\x20to\x20clear.','accessKey','\x20auth\x20status','string','ClientAk','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','Tip:\x20you\x20can\x20also\x20run:','Then\x20verify\x20with:\x20','AccessKey\x20cleared\x20from\x20','logout','Missing\x20accessKey.','1057noVcRa','884029HpqFMH','35AFlBeH','593252DNrXfb','55866DaljIK','`auth\x20login`\x20does\x20not\x20support\x20--yes.','newConfigFileName','\x20scope.','Write\x20to\x20global\x20config\x20(default)','env','1474248EmWbUO','Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','\x20doctor','daily','init','Read\x20from\x20global\x20config\x20(default)','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','9BHdIzr','trim','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','Auth\x20config\x20reinitialized\x20in\x20','push','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','\x20Current\x20env:\x20','\x20config.','test','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','\x20(via\x20','62861117MPwXas','Invalid\x20accessKey\x20format:\x20\x22','boolean','read','Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config','AccessKey\x20(ak_xxx...)','production','Option\x20A:\x20','project','638716kPngXh','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','Option\x20C:\x20environment\x20variable','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','cancelled','4491957aGZqUa','isTTY','\x20config','info','bool','login','validation','userCenterDisplayName','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','\x20\x20export\x20','status','global','write','Auth\x20mode:\x20','Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','Shorthand\x20for\x20--access-key','str','AccessKey\x20saved\x20to\x20','yes','AccessKey:\x20'];a9_0x3c4d=function(){return _0x1736f6;};return a9_0x3c4d();}import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../../constant/product.js';import{AUTH_MODE}from'../../constant/auth-mode.js';import{normalizeEnv,isDaily,isDev}from'../../constant/env.js';import{USER_ACCESS_KEY_CREATE_URL}from'../../constant/url.js';import{CliErrors}from'../../errors.js';import{promptAccessKey,isAbortPrompt}from'../../commands/auth/prompt.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{getLoginUserInfo}from'../../core/api-client.js';const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/;function showAccessKeyCreateHint(){const _0xdc6bf8=a9_0x75f5;writeCliSideChannelLine(_0xdc6bf8(0x219)+PRODUCT_CONFIG[_0xdc6bf8(0x224)]+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine(_0xdc6bf8(0x249)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+'\x20auth\x20login\x20--access-key\x20<ak_xxx>');}function buildAccessKeySetupGuide(){const _0x1c68dc=a9_0x75f5;return[_0x1c68dc(0x219)+PRODUCT_CONFIG['userCenterDisplayName']+':',USER_ACCESS_KEY_CREATE_URL,_0x1c68dc(0x21b)+CLI_BIN_NAME+_0x1c68dc(0x206)]['join']('\x0a');}function canPromptForAccessKey(_0x3718b3){const _0x572580=a9_0x75f5;return!_0x3718b3['nonInteractive']&&process['stdin']['isTTY']!==![]&&process[_0x572580(0x234)][_0x572580(0x21e)]!==![];}function resolveAuthScopeFlags(_0x4fbf77){const _0x30fb77=a9_0x75f5;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x4fbf77['bool']('global'),'explicitProject':_0x4fbf77[_0x30fb77(0x221)](_0x30fb77(0x217)),'policy':'global-default'}));}async function resolveAuthWriteInput(_0x2c6422){const _0x4f9070=a9_0x75f5;let _0x44f8a3=(_0x2c6422['str'](_0x4f9070(0x231))||_0x2c6422['str']('ak')||'')[_0x4f9070(0x205)]();const _0x354a1e=(_0x2c6422[_0x4f9070(0x22d)](_0x4f9070(0x1fc))||'')[_0x4f9070(0x205)]();if(!_0x44f8a3&&canPromptForAccessKey(_0x2c6422))try{showAccessKeyCreateHint(),_0x44f8a3=await promptAccessKey('');}catch(_0x3e8c4f){if(isAbortPrompt(_0x3e8c4f))throw CliErrors[_0x4f9070(0x21c)]();throw _0x3e8c4f;}if(!_0x44f8a3)throw CliErrors[_0x4f9070(0x223)](_0x4f9070(0x24d),buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN[_0x4f9070(0x20c)](_0x44f8a3))throw CliErrors[_0x4f9070(0x223)](_0x4f9070(0x210)+_0x44f8a3+'\x22',_0x4f9070(0x23f));if(!_0x354a1e)return{'accessKey':_0x44f8a3};const _0x152f5f=normalizeEnv(_0x354a1e);return{'accessKey':_0x44f8a3,'env':isDaily(_0x152f5f)?_0x4f9070(0x200):isDev(_0x152f5f)?_0x4f9070(0x23e):_0x4f9070(0x215)};}function a9_0x75f5(_0x3c4911,_0x1adc4f){_0x3c4911=_0x3c4911-0x1f4;const _0x3c4de4=a9_0x3c4d();let _0x75f5f4=_0x3c4de4[_0x3c4911];return _0x75f5f4;}export const authDefinitions=[{'service':'auth','command':a9_0x5aeb6a(0x222),'description':a9_0x5aeb6a(0x22b),'risk':a9_0x5aeb6a(0x229),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a9_0x5aeb6a(0x231),'type':a9_0x5aeb6a(0x245),'description':a9_0x5aeb6a(0x214)},{'name':'ak','type':'string','description':'Shorthand\x20for\x20--access-key'},{'name':a9_0x5aeb6a(0x228),'type':a9_0x5aeb6a(0x211),'description':a9_0x5aeb6a(0x1fb),'default':!![]},{'name':a9_0x5aeb6a(0x217),'type':a9_0x5aeb6a(0x211),'description':a9_0x5aeb6a(0x247),'default':![]}],async 'execute'(_0xbebe25){const _0x4d31f1=a9_0x5aeb6a;if(_0xbebe25[_0x4d31f1(0x221)](_0x4d31f1(0x22f)))throw CliErrors['validation'](_0x4d31f1(0x1f8),_0x4d31f1(0x241)+CLI_BIN_NAME+_0x4d31f1(0x209)+CLI_BIN_NAME+_0x4d31f1(0x20d));const _0x400b8b=(_0xbebe25[_0x4d31f1(0x22d)](_0x4d31f1(0x231))||_0xbebe25[_0x4d31f1(0x22d)]('ak')||'')[_0x4d31f1(0x205)]();if(!_0x400b8b&&_0xbebe25['nonInteractive'])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0x41bd34=await resolveAuthWriteInput(_0xbebe25),_0x5954d9=resolveAuthScopeFlags(_0xbebe25),_0x4a2356=readScopedConfig(_0x5954d9);_0x4a2356[_0x4d31f1(0x243)]=_0x41bd34['accessKey'];_0x41bd34['env']&&(_0x4a2356[_0x4d31f1(0x1fc)]=_0x41bd34['env']);writeScopedConfig(_0x4a2356,_0x5954d9);const _0x182e9a=_0x5954d9[_0x4d31f1(0x228)]?_0x4d31f1(0x228):'project',_0x3c5cb9=_0x4a2356['env']?_0x4d31f1(0x20a)+_0x4a2356['env']+'.':'';return{'ok':!![],'message':_0x4d31f1(0x22e)+_0x182e9a+_0x4d31f1(0x20b)+_0x3c5cb9+_0x4d31f1(0x23a)+CLI_BIN_NAME+_0x4d31f1(0x244)};}},{'service':a9_0x5aeb6a(0x23d),'command':a9_0x5aeb6a(0x201),'description':a9_0x5aeb6a(0x1fe),'risk':a9_0x5aeb6a(0x229),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a9_0x5aeb6a(0x231),'type':'string','description':a9_0x5aeb6a(0x214)},{'name':'ak','type':a9_0x5aeb6a(0x245),'description':a9_0x5aeb6a(0x22c)},{'name':a9_0x5aeb6a(0x1fc),'type':a9_0x5aeb6a(0x245),'description':a9_0x5aeb6a(0x213)},{'name':'global','type':'boolean','description':a9_0x5aeb6a(0x1fb),'default':!![]},{'name':a9_0x5aeb6a(0x217),'type':a9_0x5aeb6a(0x211),'description':a9_0x5aeb6a(0x247),'default':![]}],async 'execute'(_0x308e1f){const _0x59ea67=a9_0x5aeb6a,_0x53997e=await resolveAuthWriteInput(_0x308e1f),_0x57fa46=resolveAuthScopeFlags(_0x308e1f),_0x3a2c84={'accessKey':_0x53997e[_0x59ea67(0x243)]};_0x53997e[_0x59ea67(0x1fc)]&&(_0x3a2c84[_0x59ea67(0x1fc)]=_0x53997e[_0x59ea67(0x1fc)]);writeScopedConfig(_0x3a2c84,_0x57fa46);const _0x1599be=_0x57fa46[_0x59ea67(0x228)]?'global':_0x59ea67(0x217),_0xb9bffc=_0x3a2c84[_0x59ea67(0x1fc)]?_0x59ea67(0x20a)+_0x3a2c84[_0x59ea67(0x1fc)]+'.':'';return{'ok':!![],'message':_0x59ea67(0x207)+_0x1599be+_0x59ea67(0x1fa)+_0xb9bffc+_0x59ea67(0x23a)+CLI_BIN_NAME+_0x59ea67(0x244)};}},{'service':a9_0x5aeb6a(0x23d),'command':a9_0x5aeb6a(0x24c),'description':a9_0x5aeb6a(0x232),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a9_0x5aeb6a(0x228),'type':a9_0x5aeb6a(0x211),'description':a9_0x5aeb6a(0x23b),'default':!![]},{'name':a9_0x5aeb6a(0x217),'type':a9_0x5aeb6a(0x211),'description':a9_0x5aeb6a(0x203),'default':![]}],async 'execute'(_0x419e94){const _0x18ed67=a9_0x5aeb6a,_0x354f24=resolveAuthScopeFlags(_0x419e94),_0x3e9127=readScopedConfig(_0x354f24),_0x323653=!!_0x3e9127['accessKey'];delete _0x3e9127[_0x18ed67(0x243)],writeScopedConfig(_0x3e9127,_0x354f24);const _0x49f0dc=_0x354f24[_0x18ed67(0x228)]?_0x18ed67(0x228):'project';if(_0x323653)return{'ok':!![],'message':_0x18ed67(0x24b)+_0x49f0dc+_0x18ed67(0x20b)};return{'ok':!![],'message':'No\x20AccessKey\x20found\x20in\x20'+_0x49f0dc+_0x18ed67(0x242)};}},{'service':a9_0x5aeb6a(0x23d),'command':a9_0x5aeb6a(0x227),'description':'Show\x20current\x20authentication\x20status','risk':a9_0x5aeb6a(0x212),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a9_0x5aeb6a(0x228),'type':'boolean','description':a9_0x5aeb6a(0x202),'default':!![]},{'name':a9_0x5aeb6a(0x217),'type':a9_0x5aeb6a(0x211),'description':'Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x200ce1){const _0x527502=a9_0x5aeb6a,_0x1eb36c=resolveAuthScopeFlags(_0x200ce1),_0x42007e=readScopedConfig(_0x1eb36c),_0x510ae1=productEnvName('ACCESS_KEY'),_0x405971=productEnv(_0x527502(0x235))||undefined,_0x4969ff=_0x42007e['accessKey']||undefined,_0x2d6734=_0x405971||_0x4969ff,_0x50de3e=_0x405971?_0x510ae1+'\x20env\x20var':_0x4969ff?(_0x1eb36c[_0x527502(0x228)]?'global':'project')+_0x527502(0x21f):null,_0x15ff4c=[_0x527502(0x22a)+AUTH_MODE[_0x527502(0x246)]];if(_0x2d6734){const _0x422b5c=_0x2d6734[_0x527502(0x233)]>0x8?''+_0x2d6734['slice'](0x0,0x8)+'*'['repeat'](_0x2d6734[_0x527502(0x233)]-0x8):_0x2d6734;_0x15ff4c[_0x527502(0x208)](_0x527502(0x230)+_0x422b5c+(_0x50de3e?_0x527502(0x20e)+_0x50de3e+')':''));}return!_0x2d6734&&(_0x15ff4c['push'](''),_0x15ff4c['push'](_0x527502(0x237)),_0x15ff4c[_0x527502(0x208)](''),_0x15ff4c[_0x527502(0x208)](_0x527502(0x216)+CLI_BIN_NAME+_0x527502(0x236)),_0x15ff4c[_0x527502(0x208)](''),_0x15ff4c['push']('Option\x20B:\x20apps\x20config\x20('+PRODUCT_CONFIG[_0x527502(0x1f9)]+')'),_0x15ff4c[_0x527502(0x208)](_0x527502(0x240)),_0x15ff4c[_0x527502(0x208)](''),_0x15ff4c[_0x527502(0x208)](_0x527502(0x21a)),_0x15ff4c[_0x527502(0x208)](_0x527502(0x226)+_0x510ae1+'=ak_xxx'),_0x15ff4c[_0x527502(0x208)](''),_0x15ff4c[_0x527502(0x208)](_0x527502(0x24a)+CLI_BIN_NAME+'\x20auth\x20status'),_0x15ff4c[_0x527502(0x208)](_0x527502(0x225)+CLI_BIN_NAME+_0x527502(0x1ff))),{'ok':!![],'message':_0x15ff4c[_0x527502(0x23c)]('\x0a')};}},{'service':a9_0x5aeb6a(0x23d),'command':a9_0x5aeb6a(0x220),'description':a9_0x5aeb6a(0x248),'risk':'read','requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x213100){const _0x3f6fd5=a9_0x5aeb6a,_0x2303a9=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x2303a9,'meta':{'env':_0x213100[_0x3f6fd5(0x239)]??'production'}}};}}];
|
|
1
|
+
const a9_0x4602e2=a9_0x503f;(function(_0x17bc53,_0x352e8a){const _0x29eb07=a9_0x503f,_0x10f921=_0x17bc53();while(!![]){try{const _0x582020=-parseInt(_0x29eb07(0x1b3))/0x1*(-parseInt(_0x29eb07(0x180))/0x2)+parseInt(_0x29eb07(0x1ba))/0x3*(-parseInt(_0x29eb07(0x1c7))/0x4)+parseInt(_0x29eb07(0x1d9))/0x5*(-parseInt(_0x29eb07(0x1c8))/0x6)+-parseInt(_0x29eb07(0x1c3))/0x7*(-parseInt(_0x29eb07(0x1ae))/0x8)+parseInt(_0x29eb07(0x1c0))/0x9*(-parseInt(_0x29eb07(0x184))/0xa)+-parseInt(_0x29eb07(0x18b))/0xb+parseInt(_0x29eb07(0x18c))/0xc;if(_0x582020===_0x352e8a)break;else _0x10f921['push'](_0x10f921['shift']());}catch(_0x2a7c83){_0x10f921['push'](_0x10f921['shift']());}}}(a9_0x2480,0xce2d6));import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a9_0x2480(){const _0x4df85b=['auth','isTTY','\x20(via\x20','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','read','init','write','access-key','AccessKey\x20cleared\x20from\x20','env','Use\x20`','cancelled','5936bluwTf','AccessKey\x20saved\x20to\x20','newConfigFileName','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','logout','1136412GwjayA','validation','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','push','global-default','\x20auth\x20status','boolean','9CEPdVt','Option\x20A:\x20','daily','yes','Auth\x20mode:\x20','\x20config','14577039xMbIOO','project','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','12964BaTfib','Show\x20current\x20authentication\x20status','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','info','546484HsPIWx','30BdmiiQ','AccessKey:\x20','Shorthand\x20for\x20--access-key','trim','bool','\x20scope.','envName','Invalid\x20accessKey\x20format:\x20\x22','stdout','Option\x20C:\x20environment\x20variable','string','Tip:\x20you\x20can\x20also\x20run:','ACCESS_KEY','slice','stdin','production','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','1688365GuhXTV','2hAIPZU','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','\x20Current\x20env:\x20','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','10SumtJL','\x20doctor','ClientAk','\x20\x20export\x20','Clear\x20from\x20global\x20config\x20(default)','development','accessKey','13704130mULJXS','39571620gIQLpA','`auth\x20login`\x20does\x20not\x20support\x20--yes.','Option\x20B:\x20apps\x20config\x20(','\x20config.','Read\x20from\x20global\x20config\x20(default)','join','\x20env\x20var','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','str','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','global','length','Write\x20to\x20global\x20config\x20(default)','test','Then\x20verify\x20with:\x20','\x20auth\x20login\x20--access-key\x20<ak_xxx>','userCenterDisplayName'];a9_0x2480=function(){return _0x4df85b;};return a9_0x2480();}import{PRODUCT_CONFIG,productEnv,productEnvName}from'../../constant/product.js';function a9_0x503f(_0x8ebd36,_0x13402c){_0x8ebd36=_0x8ebd36-0x180;const _0x248042=a9_0x2480();let _0x503f29=_0x248042[_0x8ebd36];return _0x503f29;}import{AUTH_MODE}from'../../constant/auth-mode.js';import{normalizeEnv,isDaily,isDev}from'../../constant/env.js';import{USER_ACCESS_KEY_CREATE_URL}from'../../constant/url.js';import{CliErrors}from'../../errors.js';import{promptAccessKey,isAbortPrompt}from'../../commands/auth/prompt.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{getLoginUserInfo}from'../../core/api-client.js';const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/;function showAccessKeyCreateHint(){const _0x2a8b04=a9_0x503f;writeCliSideChannelLine(_0x2a8b04(0x193)+PRODUCT_CONFIG['userCenterDisplayName']+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine(_0x2a8b04(0x1d3)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x2a8b04(0x1a0));}function buildAccessKeySetupGuide(){const _0x428921=a9_0x503f;return[_0x428921(0x193)+PRODUCT_CONFIG[_0x428921(0x1a1)]+':',USER_ACCESS_KEY_CREATE_URL,_0x428921(0x1b5)+CLI_BIN_NAME+_0x428921(0x1d8)][_0x428921(0x191)]('\x0a');}function canPromptForAccessKey(_0x2a9af9){const _0x267d8a=a9_0x503f;return!_0x2a9af9['nonInteractive']&&process[_0x267d8a(0x1d6)]['isTTY']!==![]&&process[_0x267d8a(0x1d0)][_0x267d8a(0x1a3)]!==![];}function resolveAuthScopeFlags(_0x5c14f1){const _0x39da62=a9_0x503f;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x5c14f1[_0x39da62(0x1cc)](_0x39da62(0x19b)),'explicitProject':_0x5c14f1[_0x39da62(0x1cc)](_0x39da62(0x1c1)),'policy':_0x39da62(0x1b7)}));}async function resolveAuthWriteInput(_0x40610d){const _0x105cf3=a9_0x503f;let _0x5dd246=(_0x40610d['str'](_0x105cf3(0x1a9))||_0x40610d[_0x105cf3(0x199)]('ak')||'')[_0x105cf3(0x1cb)]();const _0x550d53=(_0x40610d[_0x105cf3(0x199)]('env')||'')[_0x105cf3(0x1cb)]();if(!_0x5dd246&&canPromptForAccessKey(_0x40610d))try{showAccessKeyCreateHint(),_0x5dd246=await promptAccessKey('');}catch(_0x348fa3){if(isAbortPrompt(_0x348fa3))throw CliErrors[_0x105cf3(0x1ad)]();throw _0x348fa3;}if(!_0x5dd246)throw CliErrors[_0x105cf3(0x1b4)]('Missing\x20accessKey.',buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN[_0x105cf3(0x19e)](_0x5dd246))throw CliErrors['validation'](_0x105cf3(0x1cf)+_0x5dd246+'\x22',_0x105cf3(0x1c2));if(!_0x550d53)return{'accessKey':_0x5dd246};const _0x11b617=normalizeEnv(_0x550d53);return{'accessKey':_0x5dd246,'env':isDaily(_0x11b617)?_0x105cf3(0x1bc):isDev(_0x11b617)?_0x105cf3(0x189):_0x105cf3(0x1d7)};}export const authDefinitions=[{'service':a9_0x4602e2(0x1a2),'command':'login','description':a9_0x4602e2(0x194),'risk':a9_0x4602e2(0x1a8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a9_0x4602e2(0x1a9),'type':'string','description':'AccessKey\x20(ak_xxx...)'},{'name':'ak','type':a9_0x4602e2(0x1d2),'description':a9_0x4602e2(0x1ca)},{'name':'global','type':a9_0x4602e2(0x1b9),'description':'Write\x20to\x20global\x20config\x20(default)','default':!![]},{'name':'project','type':'boolean','description':a9_0x4602e2(0x19a),'default':![]}],async 'execute'(_0x9e93c9){const _0x4de112=a9_0x4602e2;if(_0x9e93c9['bool'](_0x4de112(0x1bd)))throw CliErrors[_0x4de112(0x1b4)](_0x4de112(0x18d),_0x4de112(0x1ac)+CLI_BIN_NAME+_0x4de112(0x1c5)+CLI_BIN_NAME+'\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.');const _0x22b59b=(_0x9e93c9[_0x4de112(0x199)](_0x4de112(0x1a9))||_0x9e93c9[_0x4de112(0x199)]('ak')||'')[_0x4de112(0x1cb)]();if(!_0x22b59b&&_0x9e93c9['nonInteractive'])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0x517ae9=await resolveAuthWriteInput(_0x9e93c9),_0x3465a0=resolveAuthScopeFlags(_0x9e93c9),_0x156a0c=readScopedConfig(_0x3465a0);_0x156a0c[_0x4de112(0x18a)]=_0x517ae9['accessKey'];_0x517ae9[_0x4de112(0x1ab)]&&(_0x156a0c[_0x4de112(0x1ab)]=_0x517ae9[_0x4de112(0x1ab)]);writeScopedConfig(_0x156a0c,_0x3465a0);const _0x47eda3=_0x3465a0[_0x4de112(0x19b)]?_0x4de112(0x19b):_0x4de112(0x1c1),_0x599ad5=_0x156a0c[_0x4de112(0x1ab)]?_0x4de112(0x182)+_0x156a0c[_0x4de112(0x1ab)]+'.':'';return{'ok':!![],'message':_0x4de112(0x1af)+_0x47eda3+_0x4de112(0x18f)+_0x599ad5+'\x20Verify:\x20'+CLI_BIN_NAME+'\x20auth\x20status'};}},{'service':a9_0x4602e2(0x1a2),'command':a9_0x4602e2(0x1a7),'description':a9_0x4602e2(0x195),'risk':a9_0x4602e2(0x1a8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'access-key','type':a9_0x4602e2(0x1d2),'description':'AccessKey\x20(ak_xxx...)'},{'name':'ak','type':a9_0x4602e2(0x1d2),'description':a9_0x4602e2(0x1ca)},{'name':a9_0x4602e2(0x1ab),'type':a9_0x4602e2(0x1d2),'description':a9_0x4602e2(0x197)},{'name':a9_0x4602e2(0x19b),'type':a9_0x4602e2(0x1b9),'description':a9_0x4602e2(0x19d),'default':!![]},{'name':a9_0x4602e2(0x1c1),'type':a9_0x4602e2(0x1b9),'description':a9_0x4602e2(0x19a),'default':![]}],async 'execute'(_0x3031e1){const _0x2cdc73=a9_0x4602e2,_0x4daf3c=await resolveAuthWriteInput(_0x3031e1),_0x166f13=resolveAuthScopeFlags(_0x3031e1),_0x1a7f39={'accessKey':_0x4daf3c['accessKey']};_0x4daf3c[_0x2cdc73(0x1ab)]&&(_0x1a7f39[_0x2cdc73(0x1ab)]=_0x4daf3c['env']);writeScopedConfig(_0x1a7f39,_0x166f13);const _0x56153c=_0x166f13[_0x2cdc73(0x19b)]?_0x2cdc73(0x19b):_0x2cdc73(0x1c1),_0x541985=_0x1a7f39[_0x2cdc73(0x1ab)]?'\x20Current\x20env:\x20'+_0x1a7f39[_0x2cdc73(0x1ab)]+'.':'';return{'ok':!![],'message':'Auth\x20config\x20reinitialized\x20in\x20'+_0x56153c+_0x2cdc73(0x1cd)+_0x541985+'\x20Verify:\x20'+CLI_BIN_NAME+_0x2cdc73(0x1b8)};}},{'service':a9_0x4602e2(0x1a2),'command':a9_0x4602e2(0x1b2),'description':'Clear\x20accessKey\x20from\x20config','risk':a9_0x4602e2(0x1a8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'global','type':'boolean','description':a9_0x4602e2(0x188),'default':!![]},{'name':a9_0x4602e2(0x1c1),'type':a9_0x4602e2(0x1b9),'description':a9_0x4602e2(0x183),'default':![]}],async 'execute'(_0x5760d6){const _0x19921c=a9_0x4602e2,_0x534c53=resolveAuthScopeFlags(_0x5760d6),_0x1ddba5=readScopedConfig(_0x534c53),_0x3796e6=!!_0x1ddba5['accessKey'];delete _0x1ddba5[_0x19921c(0x18a)],writeScopedConfig(_0x1ddba5,_0x534c53);const _0x377963=_0x534c53[_0x19921c(0x19b)]?_0x19921c(0x19b):'project';if(_0x3796e6)return{'ok':!![],'message':_0x19921c(0x1aa)+_0x377963+'\x20config.'};return{'ok':!![],'message':'No\x20AccessKey\x20found\x20in\x20'+_0x377963+'\x20config.\x20Nothing\x20to\x20clear.'};}},{'service':a9_0x4602e2(0x1a2),'command':'status','description':a9_0x4602e2(0x1c4),'risk':a9_0x4602e2(0x1a6),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a9_0x4602e2(0x19b),'type':'boolean','description':a9_0x4602e2(0x190),'default':!![]},{'name':'project','type':a9_0x4602e2(0x1b9),'description':'Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x4f50d1){const _0x27fccc=a9_0x4602e2,_0x1a91e6=resolveAuthScopeFlags(_0x4f50d1),_0x27dc47=readScopedConfig(_0x1a91e6),_0x1af837=productEnvName(_0x27fccc(0x1d4)),_0x379c15=productEnv(_0x27fccc(0x1d4))||undefined,_0x1a006e=_0x27dc47[_0x27fccc(0x18a)]||undefined,_0x48ee54=_0x379c15||_0x1a006e,_0x4956cc=_0x379c15?_0x1af837+_0x27fccc(0x192):_0x1a006e?(_0x1a91e6[_0x27fccc(0x19b)]?_0x27fccc(0x19b):'project')+_0x27fccc(0x1bf):null,_0x222c26=[_0x27fccc(0x1be)+AUTH_MODE[_0x27fccc(0x186)]];if(_0x48ee54){const _0x3380e7=_0x48ee54[_0x27fccc(0x19c)]>0x8?''+_0x48ee54[_0x27fccc(0x1d5)](0x0,0x8)+'*'['repeat'](_0x48ee54[_0x27fccc(0x19c)]-0x8):_0x48ee54;_0x222c26[_0x27fccc(0x1b6)](_0x27fccc(0x1c9)+_0x3380e7+(_0x4956cc?_0x27fccc(0x1a4)+_0x4956cc+')':''));}return!_0x48ee54&&(_0x222c26[_0x27fccc(0x1b6)](''),_0x222c26[_0x27fccc(0x1b6)](_0x27fccc(0x196)),_0x222c26[_0x27fccc(0x1b6)](''),_0x222c26['push'](_0x27fccc(0x1bb)+CLI_BIN_NAME+_0x27fccc(0x181)),_0x222c26[_0x27fccc(0x1b6)](''),_0x222c26[_0x27fccc(0x1b6)](_0x27fccc(0x18e)+PRODUCT_CONFIG[_0x27fccc(0x1b0)]+')'),_0x222c26[_0x27fccc(0x1b6)](_0x27fccc(0x1a5)),_0x222c26[_0x27fccc(0x1b6)](''),_0x222c26[_0x27fccc(0x1b6)](_0x27fccc(0x1d1)),_0x222c26[_0x27fccc(0x1b6)](_0x27fccc(0x187)+_0x1af837+'=ak_xxx'),_0x222c26[_0x27fccc(0x1b6)](''),_0x222c26[_0x27fccc(0x1b6)](_0x27fccc(0x19f)+CLI_BIN_NAME+_0x27fccc(0x1b8)),_0x222c26[_0x27fccc(0x1b6)](_0x27fccc(0x198)+CLI_BIN_NAME+_0x27fccc(0x185))),{'ok':!![],'message':_0x222c26[_0x27fccc(0x191)]('\x0a')};}},{'service':a9_0x4602e2(0x1a2),'command':a9_0x4602e2(0x1c6),'description':a9_0x4602e2(0x1b1),'risk':a9_0x4602e2(0x1a6),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x36843d){const _0x264b06=a9_0x4602e2,_0x1c3e54=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x1c3e54,'meta':{'env':_0x36843d[_0x264b06(0x1ce)]??_0x264b06(0x1d7)}}};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5a2d91,_0x3e36a5){const _0x2afc95=a10_0x4617,_0x216f02=_0x5a2d91();while(!![]){try{const _0x303c78=-parseInt(_0x2afc95(0xc6))/0x1+-parseInt(_0x2afc95(0xc8))/0x2+-parseInt(_0x2afc95(0xbf))/0x3+parseInt(_0x2afc95(0xcd))/0x4+parseInt(_0x2afc95(0xcf))/0x5*(parseInt(_0x2afc95(0xc5))/0x6)+parseInt(_0x2afc95(0xd3))/0x7*(-parseInt(_0x2afc95(0xc7))/0x8)+parseInt(_0x2afc95(0xc0))/0x9;if(_0x303c78===_0x3e36a5)break;else _0x216f02['push'](_0x216f02['shift']());}catch(_0x27071d){_0x216f02['push'](_0x216f02['shift']());}}}(a10_0xd376,0xcf9cf));function a10_0x4617(_0x182227,_0x11bc8a){_0x182227=_0x182227-0xbf;const _0xd376f8=a10_0xd376();let _0x461798=_0xd376f8[_0x182227];return _0x461798;}import{createInterface}from'node:readline';class AbortPrompt extends Error{constructor(){const _0x3c1cfd=a10_0x4617;super(_0x3c1cfd(0xc2)),this[_0x3c1cfd(0xc4)]=_0x3c1cfd(0xc3);}}function createSafeRl(){const _0x1c88a9=a10_0x4617,_0x24dc9f=createInterface({'input':process[_0x1c88a9(0xc1)],'output':process[_0x1c88a9(0xce)]});let _0x31de8e;const _0x27fe5a=new Promise((_0x192eea,_0x325720)=>{const _0x13b524=_0x1c88a9;_0x31de8e=()=>{const _0x324ca4=a10_0x4617;_0x31de8e&&(_0x24dc9f['removeListener'](_0x324ca4(0xca),_0x31de8e),_0x31de8e=undefined);try{_0x24dc9f[_0x324ca4(0xc9)]();}catch{}_0x325720(new AbortPrompt());},_0x24dc9f['once'](_0x13b524(0xca),_0x31de8e);}),_0x1ae1c0=()=>{const _0x123784=_0x1c88a9;_0x31de8e&&(_0x24dc9f['removeListener'](_0x123784(0xca),_0x31de8e),_0x31de8e=undefined);try{_0x24dc9f[_0x123784(0xc9)]();}catch{}};return{'rl':_0x24dc9f,'abortPromise':_0x27fe5a,'disposeSuccess':_0x1ae1c0};}export async function promptAccessKey(_0x3a4fc9=''){const _0x48457b=a10_0x4617,{rl:_0x4f924e,abortPromise:_0xf1a428,disposeSuccess:_0x1254c}=createSafeRl(),_0x147b57=new Promise(_0x5260ae=>{const _0x32b903=a10_0x4617,_0x3b4b81=_0x3a4fc9?_0x32b903(0xcc)+_0x3a4fc9+'):\x20':_0x32b903(0xd1);_0x4f924e[_0x32b903(0xd0)](_0x3b4b81,_0x5b1c48=>{const _0x157761=_0x32b903;_0x1254c(),_0x5260ae(_0x5b1c48[_0x157761(0xcb)]()||_0x3a4fc9);});});return Promise[_0x48457b(0xd2)]([_0x147b57,_0xf1a428]);}function a10_0xd376(){const _0x4dfebd=['close','SIGINT','trim','AccessKey\x20(','2782480GfeHgf','stdout','5IBhOmG','question','AccessKey\x20(paste\x20ak_...):\x20','race','6895427LdOiAX','1265205DtHYEx','21457206OUEpdC','stdin','User\x20aborted\x20prompt','AbortPrompt','name','2975658NiqZBy','1176194WBUTvP','8VhhnVy','284648KmMERC'];a10_0xd376=function(){return _0x4dfebd;};return a10_0xd376();}export function isAbortPrompt(_0x403775){const _0x1b11e3=a10_0x4617;return _0x403775 instanceof Error&&_0x403775[_0x1b11e3(0xc4)]===_0x1b11e3(0xc3);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a11_0x5ada(_0x12dbc0,_0x2deba5){_0x12dbc0=_0x12dbc0-0x1a4;const _0x513b43=a11_0x513b();let _0x5ada21=_0x513b43[_0x12dbc0];return _0x5ada21;}function a11_0x513b(){const _0x3047d6=['updatedTime','verbose','16149wJCWDJ','2709760uTaPqE','bool','description','762345zcFkAP','functionName','appCode','12276ArBHCU','25623oEJXCy','894170OQpadZ','3520EiMHjN','(none)','bff','createdTime','96oPaZoP','77374XfjhRe','4djCCNw','2gnYkTy','Get\x20BFF\x20script\x20details\x20by\x20ID'];a11_0x513b=function(){return _0x3047d6;};return a11_0x513b();}const a11_0xd9964c=a11_0x5ada;(function(_0x2e4666,_0x334be5){const _0x3244c0=a11_0x5ada,_0x4ec306=_0x2e4666();while(!![]){try{const _0x57ffeb=-parseInt(_0x3244c0(0x1b6))/0x1*(parseInt(_0x3244c0(0x1b8))/0x2)+-parseInt(_0x3244c0(0x1ab))/0x3+parseInt(_0x3244c0(0x1b7))/0x4*(-parseInt(_0x3244c0(0x1b0))/0x5)+parseInt(_0x3244c0(0x1b5))/0x6*(-parseInt(_0x3244c0(0x1a7))/0x7)+parseInt(_0x3244c0(0x1a8))/0x8+parseInt(_0x3244c0(0x1af))/0x9+-parseInt(_0x3244c0(0x1b1))/0xa*(-parseInt(_0x3244c0(0x1ae))/0xb);if(_0x57ffeb===_0x334be5)break;else _0x4ec306['push'](_0x4ec306['shift']());}catch(_0x1dcb6d){_0x4ec306['push'](_0x4ec306['shift']());}}}(a11_0x513b,0x2db1c));import{getBffScriptInfo}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';export const bffDetail={'service':a11_0xd9964c(0x1b3),'command':'detail','description':a11_0xd9964c(0x1a4),'risk':'read','flags':[{...ID_FLAG,'description':'Script\x20ID'},VERBOSE_FLAG],async 'execute'(_0x2b99cd){const _0x2bb571=a11_0xd9964c,_0x37e82a=await getBffScriptInfo(_0x2b99cd['num']('id')),_0x4331c3=_0x2b99cd[_0x2bb571(0x1a9)](_0x2bb571(0x1a6));if(_0x4331c3)return{'ok':!![],'data':_0x37e82a};return{'ok':!![],'data':{'id':_0x37e82a['id'],'appCode':_0x37e82a[_0x2bb571(0x1ad)],'functionName':_0x37e82a[_0x2bb571(0x1ac)]??'','scriptType':_0x37e82a['scriptType'],'description':_0x37e82a[_0x2bb571(0x1aa)]||_0x2bb571(0x1b2),'createdTime':_0x37e82a[_0x2bb571(0x1b4)]??'','updatedTime':_0x37e82a[_0x2bb571(0x1a5)]??''}};}};
|
package/lib/commands/bff/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a12_0x1c2e94=a12_0x3061;(function(_0x3eaf1d,_0x3493dd){const _0x57a575=a12_0x3061,_0x2ca46c=_0x3eaf1d();while(!![]){try{const _0x3bc6c6=-parseInt(_0x57a575(0x140))/0x1*(-parseInt(_0x57a575(0x13a))/0x2)+-parseInt(_0x57a575(0x149))/0x3+parseInt(_0x57a575(0x144))/0x4+parseInt(_0x57a575(0x13c))/0x5*(-parseInt(_0x57a575(0x13d))/0x6)+-parseInt(_0x57a575(0x143))/0x7+-parseInt(_0x57a575(0x13e))/0x8*(-parseInt(_0x57a575(0x141))/0x9)+-parseInt(_0x57a575(0x13b))/0xa*(-parseInt(_0x57a575(0x146))/0xb);if(_0x3bc6c6===_0x3493dd)break;else _0x2ca46c['push'](_0x2ca46c['shift']());}catch(_0x3fd260){_0x2ca46c['push'](_0x2ca46c['shift']());}}}(a12_0x4a3b,0x26610));import{executeSdkBff}from'../../core/sdk-client.js';import{parseJsonParams}from'../../utils/params.js';import{NAME_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';function a12_0x3061(_0x5b25b2,_0x4aa283){_0x5b25b2=_0x5b25b2-0x13a;const _0x4a3b25=a12_0x4a3b();let _0x306160=_0x4a3b25[_0x5b25b2];return _0x306160;}function a12_0x4a3b(){const _0x14f62f=['10qxMrpn','180165nIiIbp','24VsnyCX','139352XwxbCh','params','28854DFqFne','45Mcwusn','read','1964305ndKgmF','818684yscPMN','now','4937581IzfxNh','BFF\x20executed\x20in\x20','Execute\x20a\x20BFF\x20script\x20by\x20function\x20name','649194ZoFUYo','str','4sdnUvU'];a12_0x4a3b=function(){return _0x14f62f;};return a12_0x4a3b();}export const bffExec={'service':'bff','command':'exec','description':a12_0x1c2e94(0x148),'risk':a12_0x1c2e94(0x142),'flags':[{...NAME_FLAG,'required':!![],'description':'BFF\x20function\x20name\x20to\x20execute'},PARAMS_FLAG],async 'execute'(_0x3e307c){const _0x11b576=a12_0x1c2e94,_0x238e49=parseJsonParams(_0x3e307c[_0x11b576(0x14a)](_0x11b576(0x13f))),_0x3ee6f3=Date[_0x11b576(0x145)](),_0x1a5cb1=await executeSdkBff(_0x3e307c['str']('name'),_0x238e49),_0x5f3159=Date[_0x11b576(0x145)]()-_0x3ee6f3;return{'ok':!![],'data':{'result':_0x1a5cb1,'elapsed':_0x5f3159},'message':_0x11b576(0x147)+_0x5f3159+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x284eab,_0x498948){const _0x554b84=a13_0x2a95,_0x52fda5=_0x284eab();while(!![]){try{const _0x3efe63=parseInt(_0x554b84(0x147))/0x1*(-parseInt(_0x554b84(0x145))/0x2)+-parseInt(_0x554b84(0x148))/0x3*(parseInt(_0x554b84(0x149))/0x4)+parseInt(_0x554b84(0x143))/0x5+-parseInt(_0x554b84(0x14a))/0x6+-parseInt(_0x554b84(0x14c))/0x7+-parseInt(_0x554b84(0x144))/0x8*(-parseInt(_0x554b84(0x14b))/0x9)+parseInt(_0x554b84(0x142))/0xa*(parseInt(_0x554b84(0x146))/0xb);if(_0x3efe63===_0x498948)break;else _0x52fda5['push'](_0x52fda5['shift']());}catch(_0x442223){_0x52fda5['push'](_0x52fda5['shift']());}}}(a13_0x2ada,0xe87cf));import{bffDetail}from'../../commands/bff/detail.js';function a13_0x2ada(){const _0x536409=['45gCmPKg','1536871hCUwyu','30641710lgOwXq','849985YAVbQR','1246904LQAjkO','10YPertv','11kUvZzs','194518YcNoOP','87YGElZk','54844rqbNpQ','8828700QycHox'];a13_0x2ada=function(){return _0x536409;};return a13_0x2ada();}import{bffExec}from'../../commands/bff/exec.js';function a13_0x2a95(_0x4fbcd4,_0x3034e8){_0x4fbcd4=_0x4fbcd4-0x142;const _0x2ada71=a13_0x2ada();let _0x2a956d=_0x2ada71[_0x4fbcd4];return _0x2a956d;}export const bffDefinitions=[bffDetail,bffExec];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a14_0x2beceb=a14_0x2369;(function(_0x5ca911,_0x2cfe6b){const _0xa2c1bd=a14_0x2369,_0x4489fc=_0x5ca911();while(!![]){try{const _0x131ee5=parseInt(_0xa2c1bd(0x1c2))/0x1*(-parseInt(_0xa2c1bd(0x1c5))/0x2)+-parseInt(_0xa2c1bd(0x1b6))/0x3*(-parseInt(_0xa2c1bd(0x1b7))/0x4)+-parseInt(_0xa2c1bd(0x1ba))/0x5+parseInt(_0xa2c1bd(0x1b1))/0x6*(-parseInt(_0xa2c1bd(0x1b0))/0x7)+-parseInt(_0xa2c1bd(0x1c7))/0x8*(parseInt(_0xa2c1bd(0x1c6))/0x9)+parseInt(_0xa2c1bd(0x1cc))/0xa*(-parseInt(_0xa2c1bd(0x1bc))/0xb)+parseInt(_0xa2c1bd(0x1c8))/0xc;if(_0x131ee5===_0x2cfe6b)break;else _0x4489fc['push'](_0x4489fc['shift']());}catch(_0x21e8af){_0x4489fc['push'](_0x4489fc['shift']());}}}(a14_0x2884,0xdd7e2));import{CliErrors}from'../../errors.js';function a14_0x2369(_0x4bde22,_0x2d4ecf){_0x4bde22=_0x4bde22-0x1ae;const _0x2884ae=a14_0x2884();let _0x236905=_0x2884ae[_0x4bde22];return _0x236905;}function a14_0x2884(){const _0x1c176a=['log','write','Install\x20the\x20CLI\x20Built-in\x20Skill\x20required\x20by\x20Lovrabet\x20runtime','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.','203234ZKVrqD','apiError','npx\x20skills\x20add\x20failed:\x20','4FECmvh','12615219peAPce','8BeKNOk','59836188tWOiWZ','cli-skill-install','CLI\x20Built-in\x20Skill\x20installed','install','13030HZWSYQ','cwd','error','Skipped\x20npx\x20(','7231jezoDs','8004OoYpVh','\x20-g\x20-y','unknown','pipe','cli-skill','5619yFjxbS','2384PHEpLH','setLogPath','inherit','8886540JMHKou','\x20-g\x20-y)...','1958PpvWJV','../../skills/npx-skills-add.js'];a14_0x2884=function(){return _0x1c176a;};return a14_0x2884();}import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a14_0x2beceb(0x1b5),'command':a14_0x2beceb(0x1cb),'description':a14_0x2beceb(0x1c0),'risk':a14_0x2beceb(0x1bf),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0xdb8ba5){const _0x349ca6=a14_0x2beceb;logger[_0x349ca6(0x1b8)](process[_0x349ca6(0x1cd)]()),logger['info'](_0x349ca6(0x1c9),_0x349ca6(0x1c1));const {LOVRABET_SKILL_SOURCE:_0x2ab301,LOVRABET_SKIP_NPX_SKILLS_ENV:_0x574cf8,runNpxSkillsAddGlobal:_0x5d54dd}=await import(_0x349ca6(0x1bd)),_0x1fd4a1=_0xdb8ba5['nonInteractive']?_0x349ca6(0x1b4):_0x349ca6(0x1b9);console[_0x349ca6(0x1be)]('Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20(npx\x20skills\x20add\x20'+_0x2ab301+_0x349ca6(0x1bb));const _0x17e954=_0x5d54dd(process[_0x349ca6(0x1cd)](),_0x2ab301,{'stdio':_0x1fd4a1});if(_0x17e954['skipped'])console['log'](_0x349ca6(0x1af)+_0x574cf8+'=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.');else{if(_0x17e954['ok'])console[_0x349ca6(0x1be)](_0x349ca6(0x1ca));else throw CliErrors[_0x349ca6(0x1c3)](_0x349ca6(0x1c4)+(_0x17e954[_0x349ca6(0x1ae)]||_0x349ca6(0x1b3)),'Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20npx\x20skills\x20add\x20'+_0x2ab301+_0x349ca6(0x1b2));}return{'ok':!![]};}}];
|