@lovrabet/lovrabet-cli 2.1.5 → 2.1.6-beta.2
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
|
-
const
|
|
2
|
+
const a0_0x5ae806=a0_0x3183;(function(_0x430831,_0x435674){const _0x57afaa=a0_0x3183,_0x20cd0d=_0x430831();while(!![]){try{const _0x2e0727=-parseInt(_0x57afaa(0xd1))/0x1*(-parseInt(_0x57afaa(0xc8))/0x2)+parseInt(_0x57afaa(0xe6))/0x3+parseInt(_0x57afaa(0xd0))/0x4*(-parseInt(_0x57afaa(0xd4))/0x5)+parseInt(_0x57afaa(0xf0))/0x6+parseInt(_0x57afaa(0xcc))/0x7*(-parseInt(_0x57afaa(0xeb))/0x8)+parseInt(_0x57afaa(0xda))/0x9*(parseInt(_0x57afaa(0xcd))/0xa)+-parseInt(_0x57afaa(0xce))/0xb*(parseInt(_0x57afaa(0xd6))/0xc);if(_0x2e0727===_0x435674)break;else _0x20cd0d['push'](_0x20cd0d['shift']());}catch(_0x433b74){_0x20cd0d['push'](_0x20cd0d['shift']());}}}(a0_0x51a6,0xcd3ad));function a0_0x51a6(){const _0x3e1735=['hint','\x20->\x20--','2225382hagbMb','args',':\x20--','length','Error:\x20','2143454LXzNem','input','Unexpected\x20error:','\x0aCancelled.\x0a','259JOukNw','8770outmmT','4543HDDnDl','stderr','140oChzMH','1UPrmFQ','flatMap','ERR_USE_AFTER_CLOSE','29885WfIGmL','definition','43920KOyYOq','message','handler','help','13779ocNpKY','name','Hint:\x20','unknownCommand','error','assign','log','catch','exit','flags','original','[preparse]\x20','245892dwXUXZ','exitCode','write','ExitPromptError','code','66136pNFmuL','ERR_STREAM_DESTROYED','defaultCommand'];a0_0x51a6=function(){return _0x3e1735;};return a0_0x51a6();}import{jsx as a0_0x54173c}from'react/jsx-runtime';import a0_0x144414 from'meow';import{render}from'ink';import{Help}from'./help.js';import{CliError,CliErrors}from'./errors.js';import{buildConfigFromFlags,initGlobalEnvironment}from'./context.js';import{isKnownService,getServiceEntry,findDefinition,getAllDefinitions}from'./commands/registry.js';import{generateDynamicServiceHelp,resolveDynamicServiceCommand}from'./commands/service/dynamic.js';function a0_0x3183(_0x27781d,_0x3dca2b){_0x27781d=_0x27781d-0xc5;const _0x51a661=a0_0x51a6();let _0x318345=_0x51a661[_0x27781d];return _0x318345;}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_0x144414(helpText,{'importMeta':import.meta,'flags':buildMeowFlags(),'version':getCliVersionDisplay()});void main()[a0_0x5ae806(0xe1)](handleError);async function main(){try{await run();}catch(_0x461b04){handleError(_0x461b04);}}async function run(){const _0x206828=a0_0x5ae806;let _0x34e0ed=cli[_0x206828(0xc9)][0x0],_0x259c82=cli[_0x206828(0xc9)][0x1];const _0x5c82fe=cli[_0x206828(0xe3)];try{const {correctFlags:_0x55b058}=await import('./framework/preparse.js'),_0x288d74=getAllDefinitions()[_0x206828(0xd2)](_0x5c7570=>_0x5c7570[_0x206828(0xe3)]??[]),{flags:_0x203e17,corrections:_0x442735}=_0x55b058(_0x5c82fe,_0x288d74);if(_0x442735[_0x206828(0xc6)]>0x0){for(const _0x5946cd of _0x442735){process[_0x206828(0xcf)][_0x206828(0xe8)](_0x206828(0xe5)+_0x5946cd[_0x206828(0xd8)]+_0x206828(0xc5)+_0x5946cd[_0x206828(0xe4)]+_0x206828(0xef)+_0x5946cd['corrected']+'\x0a');}Object[_0x206828(0xdf)](_0x5c82fe,_0x203e17);}}catch{}if(!_0x34e0ed){const {waitUntilExit:_0x52209d}=render(a0_0x54173c(Help,{}));await _0x52209d();return;}if(!isKnownService(_0x34e0ed)){const _0x3e69c3=resolveDynamicServiceCommand(cli[_0x206828(0xc9)],_0x5c82fe);if(_0x3e69c3){if(_0x5c82fe['help']){console[_0x206828(0xe0)](generateCommandHelp(_0x3e69c3[_0x206828(0xd5)]));return;}Object['assign'](_0x5c82fe,_0x3e69c3[_0x206828(0xe3)]);const _0x121ff3=buildConfigFromFlags(_0x5c82fe);await initGlobalEnvironment(_0x121ff3);const _0x1d3da3=createPipelineEnv(_0x121ff3,_0x5c82fe);_0x1d3da3['args']=_0x3e69c3['args'],await runCommand(_0x3e69c3[_0x206828(0xd5)],_0x1d3da3);return;}if(_0x5c82fe[_0x206828(0xd9)]){const _0x556986=generateDynamicServiceHelp(_0x34e0ed);if(_0x556986){console[_0x206828(0xe0)](_0x556986);return;}}const {waitUntilExit:_0x4e53f3}=render(a0_0x54173c(Help,{}));await _0x4e53f3();return;}const _0x5c1d34=getServiceEntry(_0x34e0ed);if(!_0x259c82){if(_0x5c82fe[_0x206828(0xd9)]){console[_0x206828(0xe0)](generateServiceHelp(_0x34e0ed));return;}if(_0x5c1d34[_0x206828(0xed)])_0x259c82=_0x5c1d34['defaultCommand'];else{console[_0x206828(0xe0)](generateServiceHelp(_0x34e0ed));return;}}const _0x49d819=findDefinition(_0x34e0ed,_0x259c82);!_0x49d819&&(console[_0x206828(0xe0)](generateServiceHelp(_0x34e0ed)),handleError(CliErrors[_0x206828(0xdd)](_0x34e0ed+'\x20'+_0x259c82)));if(_0x5c82fe[_0x206828(0xd9)]){console[_0x206828(0xe0)](generateCommandHelp(_0x49d819));return;}const _0x51fd8e=buildConfigFromFlags(_0x5c82fe);await initGlobalEnvironment(_0x51fd8e);const _0x50c24c=createPipelineEnv(_0x51fd8e,_0x5c82fe);_0x50c24c[_0x206828(0xf1)]=cli[_0x206828(0xc9)]['slice'](0x2),await runCommand(_0x49d819,_0x50c24c);}function handleError(_0x1a5d3f){const _0xb8e3b3=a0_0x5ae806;if(_0x1a5d3f instanceof CliError){_0x1a5d3f[_0xb8e3b3(0xea)]==='cancelled'&&(process['stderr'][_0xb8e3b3(0xe8)](_0xb8e3b3(0xcb)),process[_0xb8e3b3(0xe2)](0x0));console[_0xb8e3b3(0xde)](_0xb8e3b3(0xc7)+_0x1a5d3f[_0xb8e3b3(0xd7)]);if(_0x1a5d3f[_0xb8e3b3(0xee)])console[_0xb8e3b3(0xde)](_0xb8e3b3(0xdc)+_0x1a5d3f['hint']);process[_0xb8e3b3(0xe2)](_0x1a5d3f[_0xb8e3b3(0xe7)]);}isUserCancellation(_0x1a5d3f)&&(process['stderr'][_0xb8e3b3(0xe8)](_0xb8e3b3(0xcb)),process['exit'](0x0)),console[_0xb8e3b3(0xde)](_0xb8e3b3(0xca),_0x1a5d3f),process[_0xb8e3b3(0xe2)](0x1);}function isUserCancellation(_0x262674){const _0x54d90a=a0_0x5ae806;if(!(_0x262674 instanceof Error))return![];if(_0x262674[_0x54d90a(0xdb)]===_0x54d90a(0xe9))return!![];if(_0x262674['code']===_0x54d90a(0xd3))return!![];if(_0x262674[_0x54d90a(0xea)]===_0x54d90a(0xec))return!![];return![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a1_0x2a6b(){const _0x23886a=['Script\x20behavior\x20may\x20have\x20side\x20effects;\x20inspect\x20detail\x20first.','dataset_detail','32-character\x20dataset\x20code','已经知道记录\x20id,需要按数据集读取单条业务数据时使用','7836QkQQlA','bf_execute','method','tableData\x20contains\x20records','custom_sql_execute','length','Show\x20runtime\x20API\x20documentation\x20by\x20code','Execute\x20custom\x20SQL','{\x22id\x22:123}','56qXaviG','read','lovrabet\x20dataset\x20detail\x20--code\x20<datasetCode>\x20--appcode\x20<appCode>','/api/endpoint/{appCode}/{scriptName}','join','This\x20is\x20a\x20write\x20operation;\x20use\x20dry-run\x20when\x20available\x20and\x20safe\x20fixtures\x20for\x20smoke\x20tests.','Endpoint\x20function\x20name','dataset','/api/{appCode}/{datasetCode}/filter','聚合查询数据集数据','执行自定义\x20SQL','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:5}\x27','List\x20available\x20runtime\x20API\x20documentation\x20entries','GET','code','10juSJEQ','需要先确认当前应用有哪些可执行的\x20BF/ENDPOINT\x20函数,以及收敛可用\x20scriptName\x20时使用','custom_sql','已经确认目标\x20sqlCode\x20存在,并需要实际执行该自定义\x20SQL\x20时使用','268261vHELwv','fields/properties\x20describe\x20data\x20shape','Use\x20`lovrabet\x20sql\x20detail`\x20before\x20execution.','Filter\x20dataset\x20data','Aggregate\x20dataset\x20data','需要按\x20appCode\x20分页获取运行态数据集列表,并优先收敛可用\x20datasetCode\x20时使用','##\x20Create\x20dataset\x20record\x0a\x0aCreate\x20one\x20data\x20record\x20in\x20a\x20dataset.','Returns\x20one\x20matching\x20business\x20record','需要按\x20groupBy\x20分组并做\x20count、sum、avg、max、min\x20等聚合统计时使用','{\x22appCode\x22:\x22app-aa63b188\x22,\x22currentPage\x22:1,\x22pageSize\x22:100}','POST','path','dataset_list','operations\x20describes\x20runtime\x20APIs','{\x22where\x22:{},\x22currentPage\x22:1,\x22pageSize\x22:20}','2122122jlweyk','Use\x20this\x20API\x20or\x20`lovrabet\x20dataset\x20list`\x20to\x20discover\x20available\x20dataset\x20codes\x20before\x20reading\x20data.','API\x20doc\x20code\x20not\x20found:\x20','获取数据集详情','string','116mCJkho','If\x20SDK\x20usage\x20is\x20needed,\x20follow\x20with\x20`lovrabet\x20dataset\x20sdk-doc\x20--code\x20<datasetCode>`.','category','5grsppA','Create\x20dataset\x20record','/api/{appCode}/{datasetCode}/getOne','CLI\x20has\x20typed\x20`bff\x20detail`\x20and\x20`bff\x20exec`\x20commands\x20for\x20endpoint\x20scripts.','List\x20datasets','已经确认目标\x20BF\x20的\x20scriptName,且需要实际调用该\x20ENDPOINT\x20脚本完成业务操作时使用','includes','bf_function_list','tableData\x20contains\x20dataset\x20id/code/name','Current\x20app\x20code','toLowerCase','list','##\x20Get\x20one\x20dataset\x20record\x0a\x0aRead\x20one\x20record\x20by\x20id.','str','301992qDeCFA','`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','{\x22aggregate\x22:[{\x22column\x22:\x20\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[]}','/api/{appCode}/{datasetCode}/aggregate','None','where\x20filters\x20before\x20aggregation','lovrabet\x20bff\x20detail\x20--id\x20<scriptId>\x20--appcode\x20<appCode>','Returns\x20the\x20created\x20record\x20or\x20backend\x20operation\x20result','##\x20List\x20datasets','dataset_data_get_one','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','1iKNjDa','scriptName','/api/dataset/getOneByCode?code={datasetCode}','9063dJEYqe','whenToUse','执行指定\x20BF\x20函数','Execute\x20BF\x20endpoint\x20function','API\x20doc\x20code,\x20for\x20example\x20dataset_list','查询单条数据','##\x20Execute\x20custom\x20SQL\x0a\x0aExecute\x20a\x20configured\x20SQL\x20script\x20by\x20sqlCode.','result\x20rows\x20contain\x20aggregate\x20aliases','CLI\x20users\x20should\x20prefer\x20`lovrabet\x20dataset\x20list`\x20for\x20this\x20workflow.','Get\x20one\x20dataset\x20record','appCode','summary','/api/endpoint/{appCode}/functions','条件过滤查询数据','detail','4230754znngsw','lovrabet\x20sql\x20exec\x20--sqlcode\x20<sqlCode>\x20--params\x20\x27{}\x27','trim','api-doc','##\x20Aggregate\x20dataset\x20data','171364ARoZCl','keyword','{\x22param\x22:\x22value\x22}','find','validation','map','dataset_data_filter','datasetCode','Use\x20`having`\x20only\x20for\x20post-aggregation\x20filters.','Filter\x20docs\x20by\x20category,\x20for\x20example\x20dataset','lovrabet\x20bff\x20exec\x20--name\x20<functionName>\x20--params\x20\x27{}\x27','Use\x20read-only\x20data\x20commands\x20before\x20writing\x20Artifacts\x20that\x20display\x20real\x20data.','/api/custom/executeSql','lovrabet\x20dataset\x20list\x20--appcode\x20<appCode>\x20--format\x20compress','分页获取数据集列表','创建数据','lovrabet\x20data\x20create\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22name\x22:\x22demo\x22}\x27'];a1_0x2a6b=function(){return _0x23886a;};return a1_0x2a6b();}const a1_0x7b9f83=a1_0xe7e5;(function(_0x349798,_0x4d3e16){const _0x4a8c0a=a1_0xe7e5,_0x5f25a5=_0x349798();while(!![]){try{const _0x39c356=-parseInt(_0x4a8c0a(0x18b))/0x1*(parseInt(_0x4a8c0a(0x1a2))/0x2)+parseInt(_0x4a8c0a(0x1b7))/0x3*(parseInt(_0x4a8c0a(0x16f))/0x4)+parseInt(_0x4a8c0a(0x172))/0x5*(parseInt(_0x4a8c0a(0x16a))/0x6)+parseInt(_0x4a8c0a(0x15b))/0x7*(parseInt(_0x4a8c0a(0x1c0))/0x8)+-parseInt(_0x4a8c0a(0x18e))/0x9+parseInt(_0x4a8c0a(0x157))/0xa*(-parseInt(_0x4a8c0a(0x19d))/0xb)+parseInt(_0x4a8c0a(0x180))/0xc;if(_0x39c356===_0x4d3e16)break;else _0x5f25a5['push'](_0x5f25a5['shift']());}catch(_0xb655b0){_0x5f25a5['push'](_0x5f25a5['shift']());}}}(a1_0x2a6b,0x3d6a7));import{CliErrors}from'../../errors.js';const CATEGORY_FLAG={'name':'category','type':'string','description':a1_0x7b9f83(0x1ab)},KEYWORD_FLAG={'name':a1_0x7b9f83(0x1a3),'type':a1_0x7b9f83(0x16e),'description':'Search\x20docs\x20by\x20code,\x20summary,\x20path,\x20or\x20usage\x20text'},DOC_CODE_FLAG={'name':'code','type':'string','required':!![],'description':a1_0x7b9f83(0x192)},DOCS=[{'code':a1_0x7b9f83(0x167),'category':a1_0x7b9f83(0x14f),'title':a1_0x7b9f83(0x176),'method':a1_0x7b9f83(0x165),'path':'/api/dataset/get-dataset-list-by-app-code','summary':a1_0x7b9f83(0x1b0),'whenToUse':a1_0x7b9f83(0x160),'pathParams':[],'queryParams':[],'bodySchema':a1_0x7b9f83(0x164),'responseHighlights':[a1_0x7b9f83(0x17a),'paging.totalCount\x20gives\x20total\x20rows'],'examples':[a1_0x7b9f83(0x1af)],'notes':[a1_0x7b9f83(0x196)],'markdown':[a1_0x7b9f83(0x188),'',a1_0x7b9f83(0x16b)][a1_0x7b9f83(0x1c4)]('\x0a')},{'code':a1_0x7b9f83(0x1b4),'category':a1_0x7b9f83(0x14f),'title':'Dataset\x20detail','method':a1_0x7b9f83(0x155),'path':a1_0x7b9f83(0x18d),'summary':a1_0x7b9f83(0x16d),'whenToUse':'需要按数据集\x20code\x20获取字段、表信息或操作定义时使用','pathParams':[],'queryParams':[{'name':'code','description':a1_0x7b9f83(0x1b5)}],'bodySchema':a1_0x7b9f83(0x184),'responseHighlights':[a1_0x7b9f83(0x15c),a1_0x7b9f83(0x168)],'examples':[a1_0x7b9f83(0x1c2)],'notes':[a1_0x7b9f83(0x170)],'markdown':['##\x20Dataset\x20detail','','Inspect\x20field\x20names\x20and\x20operation\x20metadata\x20for\x20a\x20known\x20dataset\x20code.'][a1_0x7b9f83(0x1c4)]('\x0a')},{'code':a1_0x7b9f83(0x1a8),'category':a1_0x7b9f83(0x14f),'title':a1_0x7b9f83(0x15e),'method':a1_0x7b9f83(0x165),'path':a1_0x7b9f83(0x150),'summary':a1_0x7b9f83(0x19b),'whenToUse':'需要携带\x20where、orderBy、分页等条件读取业务数据时使用','pathParams':[{'name':a1_0x7b9f83(0x198),'description':a1_0x7b9f83(0x17b)},{'name':'datasetCode','description':a1_0x7b9f83(0x1b5)}],'queryParams':[],'bodySchema':a1_0x7b9f83(0x169),'responseHighlights':[a1_0x7b9f83(0x1ba),'paging\x20contains\x20pagination'],'examples':[a1_0x7b9f83(0x153)],'notes':[a1_0x7b9f83(0x1ad)],'markdown':['##\x20Filter\x20dataset\x20data','','Use\x20`where`,\x20`select`,\x20`orderBy`,\x20`currentPage`,\x20and\x20`pageSize`\x20to\x20inspect\x20live\x20data\x20shape.'][a1_0x7b9f83(0x1c4)]('\x0a')},{'code':'dataset_data_aggregate','category':a1_0x7b9f83(0x14f),'title':a1_0x7b9f83(0x15f),'method':a1_0x7b9f83(0x165),'path':a1_0x7b9f83(0x183),'summary':a1_0x7b9f83(0x151),'whenToUse':a1_0x7b9f83(0x163),'pathParams':[{'name':'appCode','description':'Current\x20app\x20code'},{'name':a1_0x7b9f83(0x1a9),'description':a1_0x7b9f83(0x1b5)}],'queryParams':[],'bodySchema':a1_0x7b9f83(0x182),'responseHighlights':[a1_0x7b9f83(0x195),a1_0x7b9f83(0x185)],'examples':[a1_0x7b9f83(0x18a)],'notes':[a1_0x7b9f83(0x1aa),a1_0x7b9f83(0x181)],'markdown':[a1_0x7b9f83(0x1a1),'','Aggregate\x20supports\x20COUNT,\x20SUM,\x20AVG,\x20MAX,\x20and\x20MIN\x20definitions\x20in\x20the\x20`aggregate`\x20array.'][a1_0x7b9f83(0x1c4)]('\x0a')},{'code':a1_0x7b9f83(0x189),'category':a1_0x7b9f83(0x14f),'title':a1_0x7b9f83(0x197),'method':'POST','path':a1_0x7b9f83(0x174),'summary':a1_0x7b9f83(0x193),'whenToUse':a1_0x7b9f83(0x1b6),'pathParams':[{'name':a1_0x7b9f83(0x198),'description':a1_0x7b9f83(0x17b)},{'name':a1_0x7b9f83(0x1a9),'description':a1_0x7b9f83(0x1b5)}],'queryParams':[],'bodySchema':a1_0x7b9f83(0x1bf),'responseHighlights':[a1_0x7b9f83(0x162)],'examples':['lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27'],'notes':['Prefer\x20`filter`\x20when\x20the\x20record\x20id\x20is\x20unknown.'],'markdown':a1_0x7b9f83(0x17e)},{'code':'dataset_data_create','category':'dataset','title':a1_0x7b9f83(0x173),'method':'POST','path':'/api/{appCode}/{datasetCode}/create','summary':a1_0x7b9f83(0x1b1),'whenToUse':'需要向指定数据集新增一条业务数据时使用','pathParams':[{'name':a1_0x7b9f83(0x198),'description':'Current\x20app\x20code'},{'name':a1_0x7b9f83(0x1a9),'description':a1_0x7b9f83(0x1b5)}],'queryParams':[],'bodySchema':'{\x22fieldName\x22:\x22value\x22}','responseHighlights':[a1_0x7b9f83(0x187)],'examples':[a1_0x7b9f83(0x1b2)],'notes':[a1_0x7b9f83(0x1c5)],'markdown':a1_0x7b9f83(0x161)},{'code':a1_0x7b9f83(0x179),'category':'bf','title':'List\x20BF\x20endpoint\x20functions','method':a1_0x7b9f83(0x155),'path':a1_0x7b9f83(0x19a),'summary':'获取应用下可调用的\x20BF\x20函数列表','whenToUse':a1_0x7b9f83(0x158),'pathParams':[{'name':a1_0x7b9f83(0x198),'description':'Current\x20app\x20code'}],'queryParams':[],'bodySchema':a1_0x7b9f83(0x184),'responseHighlights':['Returns\x20endpoint\x20functionName/id/description'],'examples':[a1_0x7b9f83(0x186)],'notes':[a1_0x7b9f83(0x175)],'markdown':'##\x20List\x20BF\x20endpoint\x20functions\x0a\x0aDiscover\x20executable\x20endpoint\x20functions.'},{'code':a1_0x7b9f83(0x1b8),'category':'bf','title':a1_0x7b9f83(0x191),'method':'POST','path':a1_0x7b9f83(0x1c3),'summary':a1_0x7b9f83(0x190),'whenToUse':a1_0x7b9f83(0x177),'pathParams':[{'name':a1_0x7b9f83(0x198),'description':'Current\x20app\x20code'},{'name':a1_0x7b9f83(0x18c),'description':a1_0x7b9f83(0x14e)}],'queryParams':[],'bodySchema':a1_0x7b9f83(0x1a4),'responseHighlights':['Returns\x20script\x20business\x20payload'],'examples':[a1_0x7b9f83(0x1ac)],'notes':[a1_0x7b9f83(0x1b3)],'markdown':'##\x20Execute\x20BF\x20endpoint\x20function\x0a\x0aExecute\x20a\x20known\x20endpoint\x20script.'},{'code':a1_0x7b9f83(0x1bb),'category':a1_0x7b9f83(0x159),'title':a1_0x7b9f83(0x1be),'method':a1_0x7b9f83(0x165),'path':a1_0x7b9f83(0x1ae),'summary':a1_0x7b9f83(0x152),'whenToUse':a1_0x7b9f83(0x15a),'pathParams':[],'queryParams':[],'bodySchema':'{\x22appCode\x22:\x22app-aa63b188\x22,\x22sqlCode\x22:\x22xxxxxxxx-xxxxxxxx\x22,\x22params\x22:{}}','responseHighlights':['Returns\x20SQL\x20execution\x20payload'],'examples':[a1_0x7b9f83(0x19e)],'notes':[a1_0x7b9f83(0x15d)],'markdown':a1_0x7b9f83(0x194)}];function entrySummary(_0xfa4c6){const _0x3dd2b7=a1_0x7b9f83;return{'code':_0xfa4c6[_0x3dd2b7(0x156)],'category':_0xfa4c6[_0x3dd2b7(0x171)],'method':_0xfa4c6[_0x3dd2b7(0x1b9)],'path':_0xfa4c6[_0x3dd2b7(0x166)],'summary':_0xfa4c6[_0x3dd2b7(0x199)],'whenToUse':_0xfa4c6[_0x3dd2b7(0x18f)]};}export function listApiDocEntries(_0x5a9668={}){const _0x53ebcd=a1_0x7b9f83,_0x1422d0=String(_0x5a9668[_0x53ebcd(0x171)]||'')[_0x53ebcd(0x19f)](),_0xd3c9c5=String(_0x5a9668['keyword']||'')[_0x53ebcd(0x19f)]()[_0x53ebcd(0x17c)]();return DOCS['filter'](_0x4647d3=>{const _0x4f2005=_0x53ebcd;if(_0x1422d0&&_0x4647d3[_0x4f2005(0x171)]!==_0x1422d0)return![];if(!_0xd3c9c5)return!![];return[_0x4647d3['code'],_0x4647d3[_0x4f2005(0x171)],_0x4647d3[_0x4f2005(0x1b9)],_0x4647d3['path'],_0x4647d3[_0x4f2005(0x199)],_0x4647d3[_0x4f2005(0x18f)],_0x4647d3['title']]['join']('\x20')[_0x4f2005(0x17c)]()[_0x4f2005(0x178)](_0xd3c9c5);})[_0x53ebcd(0x1a7)](entrySummary);}function a1_0xe7e5(_0x2e1530,_0x5da75d){_0x2e1530=_0x2e1530-0x14e;const _0x2a6b0f=a1_0x2a6b();let _0xe7e5a3=_0x2a6b0f[_0x2e1530];return _0xe7e5a3;}export function getApiDocDetail(_0x1d2448){const _0x13e758=a1_0x7b9f83,_0x238eeb=DOCS[_0x13e758(0x1a5)](_0x1bafd7=>_0x1bafd7[_0x13e758(0x156)]===_0x1d2448);if(!_0x238eeb)throw CliErrors[_0x13e758(0x1a6)](_0x13e758(0x16c)+_0x1d2448);return{..._0x238eeb};}const apiDocList={'service':a1_0x7b9f83(0x1a0),'command':a1_0x7b9f83(0x17d),'description':a1_0x7b9f83(0x154),'risk':a1_0x7b9f83(0x1c1),'requiresAppCode':![],'flags':[CATEGORY_FLAG,KEYWORD_FLAG],async 'execute'(_0x8a82f5){const _0x5e3251=a1_0x7b9f83,_0x5ae43d=listApiDocEntries({'category':_0x8a82f5[_0x5e3251(0x17f)](_0x5e3251(0x171)),'keyword':_0x8a82f5[_0x5e3251(0x17f)](_0x5e3251(0x1a3))});return{'ok':!![],'data':{'total':_0x5ae43d[_0x5e3251(0x1bc)],'items':_0x5ae43d}};}},apiDocDetail={'service':a1_0x7b9f83(0x1a0),'command':a1_0x7b9f83(0x19c),'description':a1_0x7b9f83(0x1bd),'risk':'read','requiresAppCode':![],'flags':[DOC_CODE_FLAG],async 'execute'(_0xb587d7){const _0x357b21=a1_0x7b9f83;return{'ok':!![],'data':getApiDocDetail(_0xb587d7[_0x357b21(0x17f)](_0x357b21(0x156)))};}};export const apiDocDefinitions=[apiDocList,apiDocDetail];
|
|
1
|
+
const a1_0x1ec696=a1_0x2b91;(function(_0x4e956c,_0x2a55da){const _0x1ffa31=a1_0x2b91,_0x148576=_0x4e956c();while(!![]){try{const _0x118a5b=parseInt(_0x1ffa31(0x222))/0x1+-parseInt(_0x1ffa31(0x236))/0x2+parseInt(_0x1ffa31(0x1f1))/0x3*(parseInt(_0x1ffa31(0x1cd))/0x4)+parseInt(_0x1ffa31(0x234))/0x5+-parseInt(_0x1ffa31(0x1e6))/0x6+parseInt(_0x1ffa31(0x21a))/0x7*(-parseInt(_0x1ffa31(0x239))/0x8)+-parseInt(_0x1ffa31(0x1fe))/0x9*(-parseInt(_0x1ffa31(0x235))/0xa);if(_0x118a5b===_0x2a55da)break;else _0x148576['push'](_0x148576['shift']());}catch(_0x421d79){_0x148576['push'](_0x148576['shift']());}}}(a1_0x2b31,0x90296));import{CliErrors}from'../../errors.js';function a1_0x2b91(_0x4c85e5,_0x2fb392){_0x4c85e5=_0x4c85e5-0x1cd;const _0x2b31bb=a1_0x2b31();let _0x2b915f=_0x2b31bb[_0x4c85e5];return _0x2b915f;}const CATEGORY_FLAG={'name':a1_0x1ec696(0x1d8),'type':a1_0x1ec696(0x1f8),'description':'Filter\x20docs\x20by\x20category,\x20for\x20example\x20dataset'},KEYWORD_FLAG={'name':a1_0x1ec696(0x1d1),'type':a1_0x1ec696(0x1f8),'description':a1_0x1ec696(0x219)},DOC_CODE_FLAG={'name':'code','type':a1_0x1ec696(0x1f8),'required':!![],'description':a1_0x1ec696(0x224)},DOCS=[{'code':a1_0x1ec696(0x1e7),'category':a1_0x1ec696(0x22f),'title':a1_0x1ec696(0x229),'method':'POST','path':a1_0x1ec696(0x203),'summary':a1_0x1ec696(0x1f9),'whenToUse':'需要按\x20appCode\x20分页获取运行态数据集列表,并优先收敛可用\x20datasetCode\x20时使用','pathParams':[],'queryParams':[],'bodySchema':a1_0x1ec696(0x1ef),'responseHighlights':[a1_0x1ec696(0x201),'paging.totalCount\x20gives\x20total\x20rows'],'examples':[a1_0x1ec696(0x210)],'notes':[a1_0x1ec696(0x218)],'markdown':['##\x20List\x20datasets','','Use\x20this\x20API\x20or\x20`lovrabet\x20dataset\x20list`\x20to\x20discover\x20available\x20dataset\x20codes\x20before\x20reading\x20data.']['join']('\x0a')},{'code':a1_0x1ec696(0x21d),'category':'dataset','title':a1_0x1ec696(0x1e4),'method':a1_0x1ec696(0x231),'path':a1_0x1ec696(0x1d6),'summary':a1_0x1ec696(0x1e8),'whenToUse':a1_0x1ec696(0x1e3),'pathParams':[],'queryParams':[{'name':a1_0x1ec696(0x209),'description':a1_0x1ec696(0x204)}],'bodySchema':a1_0x1ec696(0x233),'responseHighlights':[a1_0x1ec696(0x206),a1_0x1ec696(0x1dc),'operations\x20describes\x20runtime\x20APIs'],'examples':['lovrabet\x20dataset\x20detail\x20--code\x20<datasetCode>\x20--appcode\x20<appCode>'],'notes':[a1_0x1ec696(0x223)],'markdown':[a1_0x1ec696(0x1fa),'','Inspect\x20field\x20names,\x20relations,\x20and\x20operation\x20metadata\x20for\x20a\x20known\x20dataset\x20code.']['join']('\x0a')},{'code':a1_0x1ec696(0x1ed),'category':'dataset','title':a1_0x1ec696(0x1d9),'method':a1_0x1ec696(0x1dd),'path':a1_0x1ec696(0x1ce),'summary':a1_0x1ec696(0x212),'whenToUse':a1_0x1ec696(0x1f0),'pathParams':[{'name':'appCode','description':a1_0x1ec696(0x1df)},{'name':'datasetCode','description':'32-character\x20dataset\x20code'}],'queryParams':[],'bodySchema':a1_0x1ec696(0x220),'responseHighlights':['tableData\x20contains\x20records',a1_0x1ec696(0x226)],'examples':[a1_0x1ec696(0x1eb)],'notes':[a1_0x1ec696(0x237)],'markdown':[a1_0x1ec696(0x208),'','Use\x20`where`,\x20`select`,\x20`orderBy`,\x20`currentPage`,\x20and\x20`pageSize`\x20to\x20inspect\x20live\x20data\x20shape.']['join']('\x0a')},{'code':a1_0x1ec696(0x20b),'category':a1_0x1ec696(0x22f),'title':a1_0x1ec696(0x1d0),'method':a1_0x1ec696(0x1dd),'path':'/api/{appCode}/{datasetCode}/aggregate','summary':a1_0x1ec696(0x1e0),'whenToUse':a1_0x1ec696(0x23a),'pathParams':[{'name':a1_0x1ec696(0x1d5),'description':a1_0x1ec696(0x1df)},{'name':'datasetCode','description':'32-character\x20dataset\x20code'}],'queryParams':[],'bodySchema':a1_0x1ec696(0x1e9),'responseHighlights':['result\x20rows\x20contain\x20aggregate\x20aliases',a1_0x1ec696(0x1cf)],'examples':[a1_0x1ec696(0x238)],'notes':['Use\x20`having`\x20only\x20for\x20post-aggregation\x20filters.','`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.'],'markdown':[a1_0x1ec696(0x1f3),'','Aggregate\x20supports\x20COUNT,\x20SUM,\x20AVG,\x20MAX,\x20and\x20MIN\x20definitions\x20in\x20the\x20`aggregate`\x20array.']['join']('\x0a')},{'code':a1_0x1ec696(0x207),'category':a1_0x1ec696(0x22f),'title':a1_0x1ec696(0x20a),'method':a1_0x1ec696(0x1dd),'path':a1_0x1ec696(0x21b),'summary':a1_0x1ec696(0x202),'whenToUse':'已经知道记录\x20id,需要按数据集读取单条业务数据时使用','pathParams':[{'name':a1_0x1ec696(0x1d5),'description':a1_0x1ec696(0x1df)},{'name':a1_0x1ec696(0x1fd),'description':a1_0x1ec696(0x204)}],'queryParams':[],'bodySchema':a1_0x1ec696(0x1ff),'responseHighlights':[a1_0x1ec696(0x232)],'examples':[a1_0x1ec696(0x1f6)],'notes':[a1_0x1ec696(0x1e1)],'markdown':a1_0x1ec696(0x228)},{'code':a1_0x1ec696(0x214),'category':a1_0x1ec696(0x22f),'title':a1_0x1ec696(0x1ea),'method':a1_0x1ec696(0x1dd),'path':a1_0x1ec696(0x21c),'summary':'创建数据','whenToUse':a1_0x1ec696(0x22e),'pathParams':[{'name':a1_0x1ec696(0x1d5),'description':a1_0x1ec696(0x1df)},{'name':'datasetCode','description':'32-character\x20dataset\x20code'}],'queryParams':[],'bodySchema':a1_0x1ec696(0x213),'responseHighlights':[a1_0x1ec696(0x1db)],'examples':['lovrabet\x20data\x20create\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22name\x22:\x22demo\x22}\x27'],'notes':[a1_0x1ec696(0x200)],'markdown':'##\x20Create\x20dataset\x20record\x0a\x0aCreate\x20one\x20data\x20record\x20in\x20a\x20dataset.'},{'code':'bf_function_list','category':'bf','title':'List\x20BF\x20endpoint\x20functions','method':a1_0x1ec696(0x231),'path':a1_0x1ec696(0x1d2),'summary':'获取应用下可调用的\x20BF\x20函数列表','whenToUse':a1_0x1ec696(0x221),'pathParams':[{'name':a1_0x1ec696(0x1d5),'description':'Current\x20app\x20code'}],'queryParams':[],'bodySchema':'None','responseHighlights':['Returns\x20endpoint\x20functionName/id/description'],'examples':[a1_0x1ec696(0x22c)],'notes':[a1_0x1ec696(0x225)],'markdown':a1_0x1ec696(0x227)},{'code':a1_0x1ec696(0x22b),'category':'bf','title':'Execute\x20BF\x20endpoint\x20function','method':a1_0x1ec696(0x1dd),'path':'/api/endpoint/{appCode}/{scriptName}','summary':'执行指定\x20BF\x20函数','whenToUse':'已经确认目标\x20BF\x20的\x20scriptName,且需要实际调用该\x20ENDPOINT\x20脚本完成业务操作时使用','pathParams':[{'name':a1_0x1ec696(0x1d5),'description':a1_0x1ec696(0x1df)},{'name':'scriptName','description':a1_0x1ec696(0x1fc)}],'queryParams':[],'bodySchema':a1_0x1ec696(0x1f4),'responseHighlights':[a1_0x1ec696(0x23b)],'examples':[a1_0x1ec696(0x216)],'notes':[a1_0x1ec696(0x20c)],'markdown':a1_0x1ec696(0x217)},{'code':a1_0x1ec696(0x1f2),'category':a1_0x1ec696(0x21e),'title':a1_0x1ec696(0x1d4),'method':a1_0x1ec696(0x1dd),'path':a1_0x1ec696(0x211),'summary':a1_0x1ec696(0x21f),'whenToUse':'已经确认目标\x20sqlCode\x20存在,并需要实际执行该自定义\x20SQL\x20时使用','pathParams':[],'queryParams':[],'bodySchema':'{\x22appCode\x22:\x22app-aa63b188\x22,\x22sqlCode\x22:\x22xxxxxxxx-xxxxxxxx\x22,\x22params\x22:{}}','responseHighlights':[a1_0x1ec696(0x1e5)],'examples':[a1_0x1ec696(0x22a)],'notes':[a1_0x1ec696(0x1da)],'markdown':a1_0x1ec696(0x20e)}];function entrySummary(_0x33700a){const _0x383417=a1_0x1ec696;return{'code':_0x33700a['code'],'category':_0x33700a[_0x383417(0x1d8)],'method':_0x33700a['method'],'path':_0x33700a[_0x383417(0x215)],'summary':_0x33700a[_0x383417(0x1fb)],'whenToUse':_0x33700a[_0x383417(0x1de)]};}export function listApiDocEntries(_0x1aaf0d={}){const _0x480a6b=a1_0x1ec696,_0x2834bf=String(_0x1aaf0d[_0x480a6b(0x1d8)]||'')[_0x480a6b(0x1d3)](),_0x4a7e5b=String(_0x1aaf0d[_0x480a6b(0x1d1)]||'')['trim']()[_0x480a6b(0x20d)]();return DOCS[_0x480a6b(0x22d)](_0x22fd7b=>{const _0x1974c8=_0x480a6b;if(_0x2834bf&&_0x22fd7b['category']!==_0x2834bf)return![];if(!_0x4a7e5b)return!![];return[_0x22fd7b[_0x1974c8(0x209)],_0x22fd7b[_0x1974c8(0x1d8)],_0x22fd7b['method'],_0x22fd7b[_0x1974c8(0x215)],_0x22fd7b[_0x1974c8(0x1fb)],_0x22fd7b['whenToUse'],_0x22fd7b['title']][_0x1974c8(0x1e2)]('\x20')[_0x1974c8(0x20d)]()['includes'](_0x4a7e5b);})['map'](entrySummary);}export function getApiDocDetail(_0x468ecc){const _0xfc2920=a1_0x1ec696,_0x56403b=DOCS['find'](_0x56c6be=>_0x56c6be[_0xfc2920(0x209)]===_0x468ecc);if(!_0x56403b)throw CliErrors[_0xfc2920(0x1d7)]('API\x20doc\x20code\x20not\x20found:\x20'+_0x468ecc);return{..._0x56403b};}const apiDocList={'service':a1_0x1ec696(0x1ec),'command':a1_0x1ec696(0x1ee),'description':a1_0x1ec696(0x1f7),'risk':a1_0x1ec696(0x1f5),'requiresAppCode':![],'flags':[CATEGORY_FLAG,KEYWORD_FLAG],async 'execute'(_0x2d02a9){const _0x1a48f8=a1_0x1ec696,_0x168718=listApiDocEntries({'category':_0x2d02a9[_0x1a48f8(0x230)](_0x1a48f8(0x1d8)),'keyword':_0x2d02a9['str'](_0x1a48f8(0x1d1))});return{'ok':!![],'data':{'total':_0x168718['length'],'items':_0x168718}};}},apiDocDetail={'service':a1_0x1ec696(0x1ec),'command':a1_0x1ec696(0x20f),'description':a1_0x1ec696(0x205),'risk':a1_0x1ec696(0x1f5),'requiresAppCode':![],'flags':[DOC_CODE_FLAG],async 'execute'(_0x23c222){const _0x4361bf=a1_0x1ec696;return{'ok':!![],'data':getApiDocDetail(_0x23c222[_0x4361bf(0x230)](_0x4361bf(0x209)))};}};function a1_0x2b31(){const _0x4eb559=['32-character\x20dataset\x20code','Show\x20runtime\x20API\x20documentation\x20by\x20code','fields/properties\x20describe\x20data\x20shape','dataset_data_get_one','##\x20Filter\x20dataset\x20data','code','Get\x20one\x20dataset\x20record','dataset_data_aggregate','Script\x20behavior\x20may\x20have\x20side\x20effects;\x20inspect\x20detail\x20first.','toLowerCase','##\x20Execute\x20custom\x20SQL\x0a\x0aExecute\x20a\x20configured\x20SQL\x20script\x20by\x20sqlCode.','detail','lovrabet\x20dataset\x20list\x20--appcode\x20<appCode>\x20--format\x20compress','/api/custom/executeSql','条件过滤查询数据','{\x22fieldName\x22:\x22value\x22}','dataset_data_create','path','lovrabet\x20bff\x20exec\x20--name\x20<functionName>\x20--params\x20\x27{}\x27','##\x20Execute\x20BF\x20endpoint\x20function\x0a\x0aExecute\x20a\x20known\x20endpoint\x20script.','CLI\x20users\x20should\x20prefer\x20`lovrabet\x20dataset\x20list`\x20for\x20this\x20workflow.','Search\x20docs\x20by\x20code,\x20summary,\x20path,\x20or\x20usage\x20text','7tfFJLw','/api/{appCode}/{datasetCode}/getOne','/api/{appCode}/{datasetCode}/create','dataset_detail','custom_sql','执行自定义\x20SQL','{\x22where\x22:{},\x22currentPage\x22:1,\x22pageSize\x22:20}','需要先确认当前应用有哪些可执行的\x20BF/ENDPOINT\x20函数,以及收敛可用\x20scriptName\x20时使用','922282VBjcjA','If\x20SDK\x20usage\x20is\x20needed,\x20follow\x20with\x20`lovrabet\x20dataset\x20sdk-doc\x20--code\x20<datasetCode>`.','API\x20doc\x20code,\x20for\x20example\x20dataset_list','CLI\x20has\x20typed\x20`bff\x20detail`\x20and\x20`bff\x20exec`\x20commands\x20for\x20endpoint\x20scripts.','paging\x20contains\x20pagination','##\x20List\x20BF\x20endpoint\x20functions\x0a\x0aDiscover\x20executable\x20endpoint\x20functions.','##\x20Get\x20one\x20dataset\x20record\x0a\x0aRead\x20one\x20record\x20by\x20id.','List\x20datasets','lovrabet\x20sql\x20exec\x20--sqlcode\x20<sqlCode>\x20--params\x20\x27{}\x27','bf_execute','lovrabet\x20bff\x20detail\x20--id\x20<scriptId>\x20--appcode\x20<appCode>','filter','需要向指定数据集新增一条业务数据时使用','dataset','str','GET','Returns\x20one\x20matching\x20business\x20record','None','2747925uRoQIh','996680UasFMM','817476bcDECt','Use\x20read-only\x20data\x20commands\x20before\x20writing\x20Artifacts\x20that\x20display\x20real\x20data.','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','8831008PrRXiL','需要按\x20groupBy\x20分组并做\x20count、sum、avg、max、min\x20等聚合统计时使用','Returns\x20script\x20business\x20payload','668XRavqv','/api/{appCode}/{datasetCode}/filter','where\x20filters\x20before\x20aggregation','Aggregate\x20dataset\x20data','keyword','/api/endpoint/{appCode}/functions','trim','Execute\x20custom\x20SQL','appCode','/api/dataset/getOneByCode?code={datasetCode}','validation','category','Filter\x20dataset\x20data','Use\x20`lovrabet\x20sql\x20detail`\x20before\x20execution.','Returns\x20the\x20created\x20record\x20or\x20backend\x20operation\x20result','relations\x20contains\x20the\x20object-shaped\x20API\x20relations\x20value\x20when\x20returned','POST','whenToUse','Current\x20app\x20code','聚合查询数据集数据','Prefer\x20`filter`\x20when\x20the\x20record\x20id\x20is\x20unknown.','join','需要按数据集\x20code\x20获取字段、表信息、关联关系(relations)或操作定义时使用','Dataset\x20detail','Returns\x20SQL\x20execution\x20payload','1678212IpXauH','dataset_list','获取数据集详情','{\x22aggregate\x22:[{\x22column\x22:\x20\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[]}','Create\x20dataset\x20record','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:5}\x27','api-doc','dataset_data_filter','list','{\x22appCode\x22:\x22app-aa63b188\x22,\x22currentPage\x22:1,\x22pageSize\x22:100}','需要携带\x20where、orderBy、分页等条件读取业务数据时使用','3831PbTxAD','custom_sql_execute','##\x20Aggregate\x20dataset\x20data','{\x22param\x22:\x22value\x22}','read','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27','List\x20available\x20runtime\x20API\x20documentation\x20entries','string','分页获取数据集列表','##\x20Dataset\x20detail','summary','Endpoint\x20function\x20name','datasetCode','63uRENJS','{\x22id\x22:123}','This\x20is\x20a\x20write\x20operation;\x20use\x20dry-run\x20when\x20available\x20and\x20safe\x20fixtures\x20for\x20smoke\x20tests.','tableData\x20contains\x20dataset\x20id/code/name','查询单条数据','/api/dataset/get-dataset-list-by-app-code'];a1_0x2b31=function(){return _0x4eb559;};return a1_0x2b31();}export const apiDocDefinitions=[apiDocList,apiDocDetail];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a2_0x5e74(){const _0x698ea0=['EACCES','unknown','309283LwsLHZ','23220zZfqcu','ak_','.tmp','8vxcwpT','trim','digest','items','265818DQiqHK','45SHLUhT','cache','35589CsKeIu','stringify','20XxiwMB','update','24ygMGdy','my-apps.json','931541GbnERV','sha256','utf8','isArray','620883paDImN','homeDirName','18IXZYCX','appName','appCode','code','parse','7spEBbT','170423uhmqoP','slice'];a2_0x5e74=function(){return _0x698ea0;};return a2_0x5e74();}(function(_0x1a9f3e,_0x1e9d90){const _0x13faa6=a2_0x2f3a,_0x338648=_0x1a9f3e();while(!![]){try{const _0x59db1d=parseInt(_0x13faa6(0xdb))/0x1+-parseInt(_0x13faa6(0xd1))/0x2*(parseInt(_0x13faa6(0xe6))/0x3)+-parseInt(_0x13faa6(0xdc))/0x4*(-parseInt(_0x13faa6(0xe4))/0x5)+-parseInt(_0x13faa6(0xe3))/0x6*(parseInt(_0x13faa6(0xd6))/0x7)+-parseInt(_0x13faa6(0xdf))/0x8*(-parseInt(_0x13faa6(0xcf))/0x9)+-parseInt(_0x13faa6(0xe8))/0xa*(-parseInt(_0x13faa6(0xd7))/0xb)+-parseInt(_0x13faa6(0xea))/0xc*(parseInt(_0x13faa6(0xcb))/0xd);if(_0x59db1d===_0x1e9d90)break;else _0x338648['push'](_0x338648['shift']());}catch(_0x1b65a5){_0x338648['push'](_0x338648['shift']());}}}(a2_0x5e74,0x28ccd));import{createHash}from'node:crypto';import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';function a2_0x2f3a(_0x3b5c0f,_0x4c8fd6){_0x3b5c0f=_0x3b5c0f-0xcb;const _0x5e7490=a2_0x5e74();let _0x2f3ae6=_0x5e7490[_0x3b5c0f];return _0x2f3ae6;}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(_0x5c5cbe){const _0x550a13=a2_0x2f3a,_0x11ba29=_0x5c5cbe[_0x550a13(0xe0)](),_0x2573be=_0x11ba29[_0x550a13(0xd8)](-0x6)||_0x550a13(0xda),_0x3c3fa5=createHash(_0x550a13(0xcc))[_0x550a13(0xe9)](_0x11ba29)[_0x550a13(0xe1)]('hex')['slice'](0x0,0xc);return _0x550a13(0xdd)+_0x2573be+'_'+_0x3c3fa5;}export function getAppCacheFilePath(_0x37bd30,_0x2ea135){const _0x52bdbd=a2_0x2f3a;return resolve(homedir(),PRODUCT_CONFIG[_0x52bdbd(0xd0)],_0x52bdbd(0xe5),_0x37bd30,fingerprintAccessKey(_0x2ea135),_0x52bdbd(0xeb));}export function readCachedAppList(_0x5da317,_0x25c5e2){const _0xc67fa7=a2_0x2f3a;if(!_0x25c5e2?.[_0xc67fa7(0xe0)]())return null;const _0x1426f3=getAppCacheFilePath(_0x5da317,_0x25c5e2);if(!existsSync(_0x1426f3))return null;try{const _0x37767d=readFileSync(_0x1426f3,_0xc67fa7(0xcd));if(!_0x37767d[_0xc67fa7(0xe0)]())return null;const _0x3e2e15=JSON[_0xc67fa7(0xd5)](_0x37767d);if(!Array[_0xc67fa7(0xce)](_0x3e2e15[_0xc67fa7(0xe2)]))return null;return _0x3e2e15;}catch{return null;}}export function writeCachedAppList(_0x5f0586,_0x16123d,_0x237108){const _0x1aa5e0=a2_0x2f3a,_0x488b0f=getAppCacheFilePath(_0x5f0586,_0x16123d),_0x49d2d0=dirname(_0x488b0f);!existsSync(_0x49d2d0)&&mkdirSync(_0x49d2d0,{'recursive':!![]});const _0x533702=_0x488b0f+_0x1aa5e0(0xde);try{writeFileSync(_0x533702,JSON['stringify'](_0x237108,null,0x2)+'\x0a',{'encoding':_0x1aa5e0(0xcd),'mode':0x180});try{renameSync(_0x533702,_0x488b0f);}catch(_0x2d316f){if(_0x2d316f[_0x1aa5e0(0xd4)]==='EPERM'||_0x2d316f[_0x1aa5e0(0xd4)]==='EXDEV'||_0x2d316f[_0x1aa5e0(0xd4)]===_0x1aa5e0(0xd9)){writeFileSync(_0x488b0f,JSON[_0x1aa5e0(0xe7)](_0x237108,null,0x2)+'\x0a',{'encoding':_0x1aa5e0(0xcd)});try{unlinkSync(_0x533702);}catch{}}else throw _0x2d316f;}}catch(_0x4e9789){try{unlinkSync(_0x533702);}catch{}throw _0x4e9789;}return _0x488b0f;}export function resolveCachedAppCode(_0x5f2337,_0x3ee37e,_0x5d6a49){const _0x2971cc=a2_0x2f3a;if(!_0x5f2337)return undefined;const _0x8b9684=readCachedAppList(_0x3ee37e,_0x5d6a49),_0x2270af=_0x8b9684?.[_0x2971cc(0xe2)]['find'](_0x4a1ecc=>_0x4a1ecc[_0x2971cc(0xd2)]===_0x5f2337&&isRuntimeAccessibleApp(_0x4a1ecc));return _0x2270af?.[_0x2971cc(0xd3)]?.[_0x2971cc(0xe0)]()||undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a3_0xf5ce(_0x35210b,_0x529e7f){_0x35210b=_0x35210b-0xb9;const _0xacff0f=a3_0xacff();let _0xf5ce53=_0xacff0f[_0x35210b];return _0xf5ce53;}function a3_0xacff(){const _0x21720c=['projectPath','App\x20\x22','map','string','appcode','171448lKcPcH','\x20is\x20deprecated.\x20Use\x20`','fetchedAt','Deprecated:\x20use\x20workspace\x20init\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','`\x20instead.','find','appCode','486321gRBUOM','project-default','.appcode\x20to\x20.lovrabet.json.','import','\x20cached\x20app(s)\x20for\x20env=\x22','pull','local','str','cache','No\x20apps\x20found\x20on\x20the\x20platform.','defaultApp','app','../../context.js','global','774648Qtudgd','bool','96047eKvKFs','No\x20cached\x20apps\x20found.','init','Filter\x20by\x20environment\x20(default:\x20current\x20env)','remote','include-unpublished','6JfHcOO','../../commands/app/remote-source.js','Loaded\x20','\x22\x20not\x20found.','3495780biabeu','use','filter','Remote\x20app\x20name\x20to\x20activate','name','Usage:\x20','raw','push','appName','\x20workspace\x20use\x20--app\x20<name>\x20[--env\x20daily]','Use\x20`','boolean','Target\x20environment\x20(default:\x20current\x20env)','join','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','from','Include\x20unpublished\x20apps\x20for\x20diagnostics','items','List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','langs','production','isArray','Read\x20app\x20list\x20from\x20local\x20cache\x20only','envName','25628157jgkngF','accessKey','enableI18n','list','isCurrent','688JhpPpW','i18nInfo','Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','validation','warn','trim','mergedCli','\x20workspace\x20init\x20--appcode\x20<code>\x20[--env\x20daily]','env','length','1119500FwmSMG','no-cache','globalPath','Refreshed\x20app\x20cache\x20with\x20','\x20app\x20list`\x20to\x20discover\x20remote\x20apps,\x20or\x20add\x20apps.','write','appPublishStatus','type','source','\x20app\x20use\x20<name>\x20[--global]'];a3_0xacff=function(){return _0x21720c;};return a3_0xacff();}const a3_0x34963c=a3_0xf5ce;(function(_0x5316a7,_0x5d0ba5){const _0x1bb3bd=a3_0xf5ce,_0x2e3ee9=_0x5316a7();while(!![]){try{const _0x599bb6=-parseInt(_0x1bb3bd(0xbd))/0x1+parseInt(_0x1bb3bd(0xd2))/0x2+-parseInt(_0x1bb3bd(0xc4))/0x3+-parseInt(_0x1bb3bd(0xde))/0x4+-parseInt(_0x1bb3bd(0x105))/0x5*(parseInt(_0x1bb3bd(0xda))/0x6)+parseInt(_0x1bb3bd(0xd4))/0x7*(-parseInt(_0x1bb3bd(0xfb))/0x8)+parseInt(_0x1bb3bd(0xf6))/0x9;if(_0x599bb6===_0x5d0ba5)break;else _0x2e3ee9['push'](_0x2e3ee9['shift']());}catch(_0x85317b){_0x2e3ee9['push'](_0x2e3ee9['shift']());}}}(a3_0xacff,0x98383));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_0x34963c(0xd1),'type':'boolean','description':'Use\x20global\x20config\x20scope','default':![]};function collectFlags(_0x22b8c9,_0x463767){const _0x28c3fd=a3_0x34963c,_0x367824={};for(const _0x5a6011 of _0x463767){const _0x4f04c7=_0x5a6011[_0x28c3fd(0x10c)]===_0x28c3fd(0xe9)?_0x22b8c9[_0x28c3fd(0xd3)](_0x5a6011[_0x28c3fd(0xe2)]):_0x22b8c9[_0x28c3fd(0xcb)](_0x5a6011[_0x28c3fd(0xe2)]);if(_0x4f04c7!==''&&_0x4f04c7!==![])_0x367824[_0x5a6011[_0x28c3fd(0xe2)]]=_0x4f04c7;}if(_0x22b8c9['nonInteractive'])_0x367824['nonInteractive']=!![];return _0x367824;}function normalizeLanguages(_0x5ac4bb){const _0x5cf8ff=a3_0x34963c;if(!Array[_0x5cf8ff(0xf3)](_0x5ac4bb))return[];return _0x5ac4bb[_0x5cf8ff(0xe0)](_0x17eeb8=>typeof _0x17eeb8===_0x5cf8ff(0xbb))['map'](_0x222cb9=>_0x222cb9[_0x5cf8ff(0x100)]())['filter'](Boolean);}function buildRemoteAppI18nFields(_0x308f5){const _0x481e15=a3_0x34963c,_0x276376=normalizeLanguages(_0x308f5['i18nInfo']?.[_0x481e15(0xf1)]);return{'enableI18n':typeof _0x308f5['enableI18n']===_0x481e15(0xe9)?_0x308f5[_0x481e15(0xf8)]:null,'languages':_0x276376,'i18nInfo':_0x308f5[_0x481e15(0xfc)]?{..._0x308f5[_0x481e15(0xfc)],'langs':_0x276376[_0x481e15(0x104)]?_0x276376:null}:null};}const initDef={'service':a3_0x34963c(0xcf),'command':a3_0x34963c(0xd6),'description':a3_0x34963c(0xc0),'risk':a3_0x34963c(0x10a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initCreateFlagDefs,async 'execute'(_0x4ea855){const _0x502449=a3_0x34963c;return warnDeprecatedAppCommand(_0x502449(0xd6),CLI_BIN_NAME+_0x502449(0x102)),await runInit(collectFlags(_0x4ea855,initCreateFlagDefs)),{'ok':!![]};}},listDef={'service':'app','command':a3_0x34963c(0xf9),'description':a3_0x34963c(0xf0),'risk':'read','requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':a3_0x34963c(0x103),'type':'string','description':a3_0x34963c(0xd7),'enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0x34963c(0xca),'type':a3_0x34963c(0xe9),'description':a3_0x34963c(0xf4),'default':![]},{'name':a3_0x34963c(0x106),'type':a3_0x34963c(0xe9),'description':a3_0x34963c(0xec),'default':![]},{'name':a3_0x34963c(0xd9),'type':a3_0x34963c(0xe9),'description':a3_0x34963c(0xee),'default':![]}],async 'execute'(_0x1d7c98){const _0x28e0df=a3_0x34963c,_0x1fffdd=_0x1d7c98[_0x28e0df(0xcb)](_0x28e0df(0x103))||_0x1d7c98['envName']||getEnv()||_0x28e0df(0xf2),_0x199143=_0x1d7c98[_0x28e0df(0xd3)](_0x28e0df(0xca)),_0x724e7b=_0x1d7c98[_0x28e0df(0xd3)](_0x28e0df(0x106)),_0x507e20=_0x1d7c98['bool'](_0x28e0df(0xd9)),{readRawConfigWithLayers:_0x4fb4ed,resolveDefaultAppSource:_0x5e4dea,getLocalAppAliases:_0x7c2907}=await import(_0x28e0df(0xd0)),{getRemoteAppList:_0x47f23f}=await import(_0x28e0df(0xdb)),{config:_0x209178,layers:_0x46f48c}=_0x4fb4ed(),_0x40fc06=_0x5e4dea(_0x46f48c),{defaultApp:_0x140ace}=_0x209178,_0x4ae7bd=await _0x47f23f({'env':_0x1fffdd,'accessKey':_0x1d7c98[_0x28e0df(0xf7)],'localOnly':_0x199143,'noCache':_0x724e7b}),_0x496550=_0x507e20?_0x4ae7bd[_0x28e0df(0xef)]:filterRuntimeAccessibleApps(_0x4ae7bd[_0x28e0df(0xef)]),_0x38a78b=_0x4ae7bd[_0x28e0df(0xef)][_0x28e0df(0x104)]-_0x496550[_0x28e0df(0x104)],_0x1b432d=_0x496550['map'](_0x124158=>{const _0x302a17=_0x28e0df;return{'name':_0x124158[_0x302a17(0xe6)],'appcode':_0x124158[_0x302a17(0xc3)],'named':!![],'definedIn':_0x302a17(0xd8),'isDefault':_0x124158['appName']===_0x140ace,...buildAppProfileListFields(_0x1fffdd),...buildRemoteAppI18nFields(_0x124158),'source':_0x4ae7bd['source'],'owner':_0x124158['appOwnerName']??null,'status':_0x124158[_0x302a17(0x10b)]??null,'cachedAt':_0x4ae7bd[_0x302a17(0xbf)]};}),_0x3857e1=_0x7c2907(_0x209178);let _0x1706b8=0x0;for(const [_0x2873ff,_0x40cc8d]of Object['entries'](_0x3857e1)){const _0x277475=typeof _0x40cc8d[_0x28e0df(0xbc)]===_0x28e0df(0xbb)?_0x40cc8d[_0x28e0df(0xbc)][_0x28e0df(0x100)]():'';if(!_0x277475)continue;const _0x5b82a0=findAppByCode(_0x4ae7bd['items'],_0x277475);if(!_0x507e20&&_0x5b82a0&&!isRuntimeAccessibleApp(_0x5b82a0))continue;_0x1706b8+=0x1,_0x1b432d[_0x28e0df(0xe5)]({'name':_0x2873ff,'appcode':_0x277475,'named':!![],'definedIn':_0x28e0df(0xca),'isDefault':_0x2873ff===_0x140ace,...buildAppProfileListFields(_0x1fffdd),'source':'config','owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0x1b432d,_0x1d7c98[_0x28e0df(0x101)]);const _0x400114=_0x1b432d[_0x28e0df(0xc2)](_0x4fd570=>_0x4fd570[_0x28e0df(0xfa)]===!![]),_0x57267d=_0x140ace??_0x400114?.[_0x28e0df(0xe2)]??null,_0x1fc69a={'env':_0x1fffdd,'source':_0x4ae7bd[_0x28e0df(0x10d)],'fetchedAt':_0x4ae7bd['fetchedAt'],'cachePath':_0x4ae7bd['cachePath'],'globalPath':_0x46f48c[_0x28e0df(0x107)]??null,'projectPath':_0x46f48c[_0x28e0df(0x10f)]??null,'defaultApp':_0x57267d,'defaultAppSource':_0x140ace!=null?_0x40fc06:null,'localAliasCount':_0x1706b8,'remoteTotal':_0x4ae7bd[_0x28e0df(0xef)][_0x28e0df(0x104)],'hiddenUnpublishedCount':_0x38a78b,'includeUnpublished':_0x507e20};if(_0x1b432d[_0x28e0df(0x104)]===0x0)return{'ok':!![],'data':{'items':_0x1b432d,'meta':_0x1fc69a},'message':_0x4ae7bd['source']==='cache'?_0x28e0df(0xd5):_0x28e0df(0xcd)};return{'ok':!![],'data':{'items':_0x1b432d,'meta':_0x1fc69a}};}},pullDef={'service':'app','command':a3_0x34963c(0xc9),'description':a3_0x34963c(0xfd),'risk':'write','requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'env','type':a3_0x34963c(0xbb),'description':a3_0x34963c(0xea),'enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0x34963c(0xca),'type':'boolean','description':'Read\x20from\x20local\x20cache\x20only','default':![]},{'name':a3_0x34963c(0x106),'type':a3_0x34963c(0xe9),'description':a3_0x34963c(0xec),'default':![]}],async 'execute'(_0x5495da){const _0x246938=a3_0x34963c,_0x135ed6=_0x5495da[_0x246938(0xcb)](_0x246938(0x103))||_0x5495da[_0x246938(0xf5)]||getEnv()||_0x246938(0xf2),_0x34cc4f=_0x5495da['bool'](_0x246938(0xca)),_0x1c5b73=_0x5495da[_0x246938(0xd3)](_0x246938(0x106)),{getRemoteAppList:_0x3e952e}=await import(_0x246938(0xdb)),_0x378e6b=await _0x3e952e({'env':_0x135ed6,'accessKey':_0x5495da[_0x246938(0xf7)],'localOnly':_0x34cc4f,'noCache':_0x1c5b73});return{'ok':!![],'data':{'total':_0x378e6b['items']['length'],'env':_0x135ed6,'source':_0x378e6b[_0x246938(0x10d)],'fetchedAt':_0x378e6b[_0x246938(0xbf)],'cachePath':_0x378e6b['cachePath']},'message':_0x378e6b[_0x246938(0x10d)]===_0x246938(0xcc)?_0x246938(0xdc)+_0x378e6b[_0x246938(0xef)][_0x246938(0x104)]+_0x246938(0xc8)+_0x135ed6+'\x22.':_0x246938(0x108)+_0x378e6b[_0x246938(0xef)][_0x246938(0x104)]+'\x20app(s)\x20for\x20env=\x22'+_0x135ed6+'\x22.'};}},useDef={'service':a3_0x34963c(0xcf),'command':a3_0x34963c(0xdf),'description':'Deprecated:\x20use\x20workspace\x20use\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','risk':a3_0x34963c(0x10a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a3_0x34963c(0xe2),'description':a3_0x34963c(0xe1),'required':!![]}],'flags':[GLOBAL_FLAG],async 'validate'(_0x3e96ef){const _0x550b5f=a3_0x34963c;if(!_0x3e96ef['args'][0x0])throw CliErrors[_0x550b5f(0xfe)]('Missing\x20app\x20name.','Usage:\x20'+CLI_BIN_NAME+_0x550b5f(0x10e));},async 'execute'(_0x15ab13){const _0xf41449=a3_0x34963c;warnDeprecatedAppCommand(_0xf41449(0xdf),CLI_BIN_NAME+_0xf41449(0xe7));const _0x3e86fd=_0x15ab13['args'][0x0];if(!_0x3e86fd)throw CliErrors['validation']('Missing\x20app\x20name.',_0xf41449(0xe3)+CLI_BIN_NAME+'\x20app\x20use\x20<name>\x20[--global]');const {buildConfigFromFlags:_0x3d03d6,resolveLocalAppAliasCode:_0x1bf9e7}=await import('../../context.js'),{readCachedAppList:_0x798ea5}=await import('../../commands/app/cache.js'),_0x9a17ac=_0x15ab13[_0xf41449(0xcb)](_0xf41449(0x103)),_0x488a0e=_0x3d03d6(_0x9a17ac?{'env':_0x9a17ac}:{}),_0x52bf05=_0x798ea5(_0x488a0e[_0xf41449(0x103)],_0x488a0e[_0xf41449(0xf7)]),_0xffc13c=_0x52bf05?.[_0xf41449(0xef)][_0xf41449(0xc2)](_0x17ddb0=>_0x17ddb0[_0xf41449(0xe6)]===_0x3e86fd),_0x1e916c=_0x1bf9e7(_0x488a0e[_0xf41449(0xe4)]??{},_0x3e86fd);if(_0xffc13c&&!isRuntimeAccessibleApp(_0xffc13c))throw runtimeInaccessibleAppError(_0xffc13c,'\x22'+_0x3e86fd+'\x22');if(_0x1e916c){const _0xbe6c76=_0x52bf05?.['items'][_0xf41449(0xc2)](_0x3efcf8=>_0x3efcf8[_0xf41449(0xc3)]?.[_0xf41449(0x100)]()===_0x1e916c);if(_0xbe6c76&&!isRuntimeAccessibleApp(_0xbe6c76))throw runtimeInaccessibleAppError(_0xbe6c76,'\x22'+_0x3e86fd+'\x22');}if(!_0xffc13c&&!_0x1e916c&&_0x488a0e[_0xf41449(0xce)]!==_0x3e86fd){const _0x2731a8=[..._0x52bf05?.[_0xf41449(0xef)][_0xf41449(0xba)](_0x1ecb55=>_0x1ecb55[_0xf41449(0xe6)])??[]],_0x4b5079=_0x2731a8['length']===0x0?_0xf41449(0xe8)+CLI_BIN_NAME+_0xf41449(0x109)+_0x3e86fd+_0xf41449(0xc6):'Available\x20remote\x20apps:\x20'+Array[_0xf41449(0xed)](new Set(_0x2731a8))[_0xf41449(0xeb)](',\x20')+'.\x20Local\x20aliases\x20can\x20be\x20added\x20under\x20apps.<alias>.appcode.';throw CliErrors[_0xf41449(0xfe)](_0xf41449(0xb9)+_0x3e86fd+_0xf41449(0xdd),_0x4b5079);}const _0x2d0d00=_0x15ab13[_0xf41449(0xd3)]('global');let _0x62be67;if(_0x2d0d00)_0x62be67={'global':!![]};else{const {isInProject:_0x3743b4}=await import(_0xf41449(0xd0)),_0x1b26e5=_0x3743b4();_0x62be67=toScopeFlags(resolveConfigScope({'explicitGlobal':![],'policy':_0xf41449(0xc5),'inProject':_0x1b26e5}));}const _0x15a7af=readConfig(_0x62be67);return _0x15a7af[_0xf41449(0xce)]=_0x3e86fd,writeConfig(_0x15a7af,_0x62be67),{'ok':!![],'message':'Default\x20app\x20candidate\x20set\x20to\x20\x22'+_0x3e86fd+'\x22'+scopeLabel(_0x62be67)+'.'};}};function warnDeprecatedAppCommand(_0x3429ba,_0x67527b){const _0x12467e=a3_0x34963c;console[_0x12467e(0xff)](CLI_BIN_NAME+'\x20app\x20'+_0x3429ba+_0x12467e(0xbe)+_0x67527b+_0x12467e(0xc1));}const importDef={'service':a3_0x34963c(0xcf),'command':a3_0x34963c(0xc7),'description':'Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','risk':a3_0x34963c(0x10a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initImportFlagDefs,async 'execute'(_0x4b3eee){return await runInitImport(collectFlags(_0x4b3eee,initImportFlagDefs)),{'ok':!![]};}};export const appDefinitions=[initDef,listDef,pullDef,useDef,importDef];
|
|
1
|
+
const a3_0x7fb95=a3_0x5c27;(function(_0x249cf5,_0x4f7b1e){const _0x3bc865=a3_0x5c27,_0x2046db=_0x249cf5();while(!![]){try{const _0x42b867=-parseInt(_0x3bc865(0x162))/0x1+-parseInt(_0x3bc865(0x165))/0x2+parseInt(_0x3bc865(0x136))/0x3*(-parseInt(_0x3bc865(0x129))/0x4)+parseInt(_0x3bc865(0x14f))/0x5+-parseInt(_0x3bc865(0x151))/0x6+parseInt(_0x3bc865(0x12e))/0x7*(parseInt(_0x3bc865(0x15a))/0x8)+-parseInt(_0x3bc865(0x134))/0x9*(-parseInt(_0x3bc865(0x15b))/0xa);if(_0x42b867===_0x4f7b1e)break;else _0x2046db['push'](_0x2046db['shift']());}catch(_0x54327b){_0x2046db['push'](_0x2046db['shift']());}}}(a3_0x4974,0xc1f20));import{CliErrors}from'../../errors.js';function a3_0x4974(){const _0x16ff9f=['Include\x20unpublished\x20apps\x20for\x20diagnostics','join','Refreshed\x20app\x20cache\x20with\x20','globalPath','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','Default\x20app\x20candidate\x20set\x20to\x20\x22','remote','cache','Target\x20environment\x20(default:\x20current\x20env)','env','\x20cached\x20app(s)\x20for\x20env=\x22','envName','local','appName','../../context.js','appOwnerName','Remote\x20app\x20name\x20to\x20activate','push','cachePath','items','appCode','Missing\x20app\x20name.','from','Read\x20from\x20local\x20cache\x20only','trim','str','isCurrent','import','16540wBwumY','args','../../commands/app/cache.js','Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','find','301vFBbDm','include-unpublished','length','langs','app','global','23147082vBUIxz','init','162kZFInh','source','appPublishStatus','appcode','Deprecated:\x20use\x20workspace\x20use\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','i18nInfo','accessKey','entries','read','pull','name','boolean','isArray','.appcode\x20to\x20.lovrabet.json.','\x20workspace\x20use\x20--app\x20<name>\x20[--env\x20daily]','nonInteractive','../../commands/app/remote-source.js','`\x20instead.','filter','bool','\x20app\x20','\x22\x20not\x20found.','fetchedAt','projectPath','.\x20Local\x20aliases\x20can\x20be\x20added\x20under\x20apps.<alias>.appcode.','4497510nGEsQk','Usage:\x20','5530722aJzbzG','mergedCli','\x20is\x20deprecated.\x20Use\x20`','map','App\x20\x22','enableI18n','validation','production','raw','49624gueJuP','10YwFMKc','\x20workspace\x20init\x20--appcode\x20<code>\x20[--env\x20daily]','defaultApp','write','No\x20apps\x20found\x20on\x20the\x20platform.','use','\x20app\x20use\x20<name>\x20[--global]','1535511OONJFG','Read\x20app\x20list\x20from\x20local\x20cache\x20only','no-cache','526282fsNLRY','Loaded\x20','Filter\x20by\x20environment\x20(default:\x20current\x20env)','Use\x20global\x20config\x20scope','warn','Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','string'];a3_0x4974=function(){return _0x16ff9f;};return a3_0x4974();}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';function a3_0x5c27(_0x23ecb0,_0x4a7567){_0x23ecb0=_0x23ecb0-0x116;const _0x4974a0=a3_0x4974();let _0x5c2735=_0x4974a0[_0x23ecb0];return _0x5c2735;}import{filterRuntimeAccessibleApps,findAppByCode,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../../commands/app/eligibility.js';const GLOBAL_FLAG={'name':'global','type':a3_0x7fb95(0x141),'description':a3_0x7fb95(0x168),'default':![]};function collectFlags(_0x16f99b,_0x40dd2b){const _0x1b6b27=a3_0x7fb95,_0x9a162c={};for(const _0x1c2e9a of _0x40dd2b){const _0x46de56=_0x1c2e9a['type']===_0x1b6b27(0x141)?_0x16f99b[_0x1b6b27(0x149)](_0x1c2e9a[_0x1b6b27(0x140)]):_0x16f99b['str'](_0x1c2e9a[_0x1b6b27(0x140)]);if(_0x46de56!==''&&_0x46de56!==![])_0x9a162c[_0x1c2e9a[_0x1b6b27(0x140)]]=_0x46de56;}if(_0x16f99b[_0x1b6b27(0x145)])_0x9a162c[_0x1b6b27(0x145)]=!![];return _0x9a162c;}function normalizeLanguages(_0x84b924){const _0x3bfc5b=a3_0x7fb95;if(!Array[_0x3bfc5b(0x142)](_0x84b924))return[];return _0x84b924[_0x3bfc5b(0x148)](_0x6ba296=>typeof _0x6ba296===_0x3bfc5b(0x16b))[_0x3bfc5b(0x154)](_0x567045=>_0x567045['trim']())[_0x3bfc5b(0x148)](Boolean);}function buildRemoteAppI18nFields(_0x546ab9){const _0x4b44de=a3_0x7fb95,_0x2d61df=normalizeLanguages(_0x546ab9[_0x4b44de(0x13b)]?.[_0x4b44de(0x131)]);return{'enableI18n':typeof _0x546ab9['enableI18n']==='boolean'?_0x546ab9[_0x4b44de(0x156)]:null,'languages':_0x2d61df,'i18nInfo':_0x546ab9[_0x4b44de(0x13b)]?{..._0x546ab9[_0x4b44de(0x13b)],'langs':_0x2d61df[_0x4b44de(0x130)]?_0x2d61df:null}:null};}const initDef={'service':a3_0x7fb95(0x132),'command':'init','description':'Deprecated:\x20use\x20workspace\x20init\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initCreateFlagDefs,async 'execute'(_0x49e762){const _0x679c25=a3_0x7fb95;return warnDeprecatedAppCommand(_0x679c25(0x135),CLI_BIN_NAME+_0x679c25(0x15c)),await runInit(collectFlags(_0x49e762,initCreateFlagDefs)),{'ok':!![]};}},listDef={'service':a3_0x7fb95(0x132),'command':'list','description':'List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','risk':a3_0x7fb95(0x13e),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':a3_0x7fb95(0x116),'type':a3_0x7fb95(0x16b),'description':a3_0x7fb95(0x167),'enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0x7fb95(0x119),'type':'boolean','description':a3_0x7fb95(0x163),'default':![]},{'name':a3_0x7fb95(0x164),'type':a3_0x7fb95(0x141),'description':a3_0x7fb95(0x170),'default':![]},{'name':'include-unpublished','type':'boolean','description':a3_0x7fb95(0x16c),'default':![]}],async 'execute'(_0x2ff71f){const _0xbb9b90=a3_0x7fb95,_0xe7f915=_0x2ff71f['str']('env')||_0x2ff71f[_0xbb9b90(0x118)]||getEnv()||_0xbb9b90(0x158),_0x2a6a77=_0x2ff71f['bool'](_0xbb9b90(0x119)),_0x376160=_0x2ff71f[_0xbb9b90(0x149)](_0xbb9b90(0x164)),_0x292b2c=_0x2ff71f[_0xbb9b90(0x149)](_0xbb9b90(0x12f)),{readRawConfigWithLayers:_0x59e7fe,resolveDefaultAppSource:_0x3047f5,getLocalAppAliases:_0x7a5358}=await import(_0xbb9b90(0x11b)),{getRemoteAppList:_0x41f143}=await import(_0xbb9b90(0x146)),{config:_0x5c8e20,layers:_0x75a772}=_0x59e7fe(),_0x2f36d2=_0x3047f5(_0x75a772),{defaultApp:_0x420031}=_0x5c8e20,_0x5ddda7=await _0x41f143({'env':_0xe7f915,'accessKey':_0x2ff71f[_0xbb9b90(0x13c)],'localOnly':_0x2a6a77,'noCache':_0x376160}),_0x5da0a5=_0x292b2c?_0x5ddda7[_0xbb9b90(0x120)]:filterRuntimeAccessibleApps(_0x5ddda7[_0xbb9b90(0x120)]),_0xd5bd87=_0x5ddda7[_0xbb9b90(0x120)]['length']-_0x5da0a5[_0xbb9b90(0x130)],_0x3a7f78=_0x5da0a5['map'](_0x4c8725=>{const _0x51e119=_0xbb9b90;return{'name':_0x4c8725[_0x51e119(0x11a)],'appcode':_0x4c8725[_0x51e119(0x121)],'named':!![],'definedIn':_0x51e119(0x172),'isDefault':_0x4c8725[_0x51e119(0x11a)]===_0x420031,...buildAppProfileListFields(_0xe7f915),...buildRemoteAppI18nFields(_0x4c8725),'source':_0x5ddda7[_0x51e119(0x137)],'owner':_0x4c8725[_0x51e119(0x11c)]??null,'status':_0x4c8725[_0x51e119(0x138)]??null,'cachedAt':_0x5ddda7[_0x51e119(0x14c)]};}),_0x3cccdb=_0x7a5358(_0x5c8e20);let _0x41bfa6=0x0;for(const [_0x46c90f,_0xfaa690]of Object[_0xbb9b90(0x13d)](_0x3cccdb)){const _0x250019=typeof _0xfaa690[_0xbb9b90(0x139)]===_0xbb9b90(0x16b)?_0xfaa690[_0xbb9b90(0x139)][_0xbb9b90(0x125)]():'';if(!_0x250019)continue;const _0xcbf1d4=findAppByCode(_0x5ddda7[_0xbb9b90(0x120)],_0x250019);if(!_0x292b2c&&_0xcbf1d4&&!isRuntimeAccessibleApp(_0xcbf1d4))continue;_0x41bfa6+=0x1,_0x3a7f78[_0xbb9b90(0x11e)]({'name':_0x46c90f,'appcode':_0x250019,'named':!![],'definedIn':_0xbb9b90(0x119),'isDefault':_0x46c90f===_0x420031,...buildAppProfileListFields(_0xe7f915),'source':'config','owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0x3a7f78,_0x2ff71f[_0xbb9b90(0x152)]);const _0x48cc28=_0x3a7f78[_0xbb9b90(0x12d)](_0x4b8ca0=>_0x4b8ca0[_0xbb9b90(0x127)]===!![]),_0x2b62b7=_0x420031??_0x48cc28?.[_0xbb9b90(0x140)]??null,_0x2b57a2={'env':_0xe7f915,'source':_0x5ddda7[_0xbb9b90(0x137)],'fetchedAt':_0x5ddda7[_0xbb9b90(0x14c)],'cachePath':_0x5ddda7[_0xbb9b90(0x11f)],'globalPath':_0x75a772[_0xbb9b90(0x16f)]??null,'projectPath':_0x75a772[_0xbb9b90(0x14d)]??null,'defaultApp':_0x2b62b7,'defaultAppSource':_0x420031!=null?_0x2f36d2:null,'localAliasCount':_0x41bfa6,'remoteTotal':_0x5ddda7[_0xbb9b90(0x120)][_0xbb9b90(0x130)],'hiddenUnpublishedCount':_0xd5bd87,'includeUnpublished':_0x292b2c};if(_0x3a7f78[_0xbb9b90(0x130)]===0x0)return{'ok':!![],'data':{'items':_0x3a7f78,'meta':_0x2b57a2},'message':_0x5ddda7[_0xbb9b90(0x137)]===_0xbb9b90(0x173)?'No\x20cached\x20apps\x20found.':_0xbb9b90(0x15f)};return{'ok':!![],'data':{'items':_0x3a7f78,'meta':_0x2b57a2}};}},pullDef={'service':a3_0x7fb95(0x132),'command':a3_0x7fb95(0x13f),'description':a3_0x7fb95(0x12c),'risk':'write','requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a3_0x7fb95(0x116),'type':'string','description':a3_0x7fb95(0x174),'enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0x7fb95(0x119),'type':a3_0x7fb95(0x141),'description':a3_0x7fb95(0x124),'default':![]},{'name':a3_0x7fb95(0x164),'type':a3_0x7fb95(0x141),'description':a3_0x7fb95(0x170),'default':![]}],async 'execute'(_0xd3157d){const _0x28d0ba=a3_0x7fb95,_0x3ff6f0=_0xd3157d['str'](_0x28d0ba(0x116))||_0xd3157d[_0x28d0ba(0x118)]||getEnv()||_0x28d0ba(0x158),_0x50bedb=_0xd3157d[_0x28d0ba(0x149)]('local'),_0x1da2d3=_0xd3157d['bool'](_0x28d0ba(0x164)),{getRemoteAppList:_0x48d18f}=await import(_0x28d0ba(0x146)),_0x4c8a09=await _0x48d18f({'env':_0x3ff6f0,'accessKey':_0xd3157d[_0x28d0ba(0x13c)],'localOnly':_0x50bedb,'noCache':_0x1da2d3});return{'ok':!![],'data':{'total':_0x4c8a09[_0x28d0ba(0x120)]['length'],'env':_0x3ff6f0,'source':_0x4c8a09['source'],'fetchedAt':_0x4c8a09[_0x28d0ba(0x14c)],'cachePath':_0x4c8a09[_0x28d0ba(0x11f)]},'message':_0x4c8a09[_0x28d0ba(0x137)]===_0x28d0ba(0x173)?_0x28d0ba(0x166)+_0x4c8a09['items']['length']+_0x28d0ba(0x117)+_0x3ff6f0+'\x22.':_0x28d0ba(0x16e)+_0x4c8a09['items']['length']+'\x20app(s)\x20for\x20env=\x22'+_0x3ff6f0+'\x22.'};}},useDef={'service':a3_0x7fb95(0x132),'command':a3_0x7fb95(0x160),'description':a3_0x7fb95(0x13a),'risk':a3_0x7fb95(0x15e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'name','description':a3_0x7fb95(0x11d),'required':!![]}],'flags':[GLOBAL_FLAG],async 'validate'(_0x34f354){const _0x3a2c49=a3_0x7fb95;if(!_0x34f354[_0x3a2c49(0x12a)][0x0])throw CliErrors['validation'](_0x3a2c49(0x122),'Usage:\x20'+CLI_BIN_NAME+'\x20app\x20use\x20<name>\x20[--global]');},async 'execute'(_0x41988a){const _0x573d7c=a3_0x7fb95;warnDeprecatedAppCommand(_0x573d7c(0x160),CLI_BIN_NAME+_0x573d7c(0x144));const _0x3ba6da=_0x41988a[_0x573d7c(0x12a)][0x0];if(!_0x3ba6da)throw CliErrors[_0x573d7c(0x157)](_0x573d7c(0x122),_0x573d7c(0x150)+CLI_BIN_NAME+_0x573d7c(0x161));const {buildConfigFromFlags:_0x436188,resolveLocalAppAliasCode:_0x183430}=await import(_0x573d7c(0x11b)),{readCachedAppList:_0x40aa84}=await import(_0x573d7c(0x12b)),_0x63615=_0x41988a[_0x573d7c(0x126)](_0x573d7c(0x116)),_0x4dc88b=_0x436188(_0x63615?{'env':_0x63615}:{}),_0x8b5f1a=_0x40aa84(_0x4dc88b[_0x573d7c(0x116)],_0x4dc88b['accessKey']),_0x5e5780=_0x8b5f1a?.['items'][_0x573d7c(0x12d)](_0x456802=>_0x456802[_0x573d7c(0x11a)]===_0x3ba6da),_0x346872=_0x183430(_0x4dc88b[_0x573d7c(0x159)]??{},_0x3ba6da);if(_0x5e5780&&!isRuntimeAccessibleApp(_0x5e5780))throw runtimeInaccessibleAppError(_0x5e5780,'\x22'+_0x3ba6da+'\x22');if(_0x346872){const _0x30bf47=_0x8b5f1a?.[_0x573d7c(0x120)][_0x573d7c(0x12d)](_0x2c06c1=>_0x2c06c1[_0x573d7c(0x121)]?.['trim']()===_0x346872);if(_0x30bf47&&!isRuntimeAccessibleApp(_0x30bf47))throw runtimeInaccessibleAppError(_0x30bf47,'\x22'+_0x3ba6da+'\x22');}if(!_0x5e5780&&!_0x346872&&_0x4dc88b[_0x573d7c(0x15d)]!==_0x3ba6da){const _0x5d29d9=[..._0x8b5f1a?.[_0x573d7c(0x120)][_0x573d7c(0x154)](_0x44d35c=>_0x44d35c['appName'])??[]],_0x2ecd58=_0x5d29d9[_0x573d7c(0x130)]===0x0?'Use\x20`'+CLI_BIN_NAME+'\x20app\x20list`\x20to\x20discover\x20remote\x20apps,\x20or\x20add\x20apps.'+_0x3ba6da+_0x573d7c(0x143):'Available\x20remote\x20apps:\x20'+Array[_0x573d7c(0x123)](new Set(_0x5d29d9))[_0x573d7c(0x16d)](',\x20')+_0x573d7c(0x14e);throw CliErrors[_0x573d7c(0x157)](_0x573d7c(0x155)+_0x3ba6da+_0x573d7c(0x14b),_0x2ecd58);}const _0x335461=_0x41988a[_0x573d7c(0x149)](_0x573d7c(0x133));let _0x3b3210;if(_0x335461)_0x3b3210={'global':!![]};else{const {isInProject:_0x1f4953}=await import(_0x573d7c(0x11b)),_0x5660c6=_0x1f4953();_0x3b3210=toScopeFlags(resolveConfigScope({'explicitGlobal':![],'policy':'project-default','inProject':_0x5660c6}));}const _0x2feb14=readConfig(_0x3b3210);return _0x2feb14[_0x573d7c(0x15d)]=_0x3ba6da,writeConfig(_0x2feb14,_0x3b3210),{'ok':!![],'message':_0x573d7c(0x171)+_0x3ba6da+'\x22'+scopeLabel(_0x3b3210)+'.'};}};function warnDeprecatedAppCommand(_0x5a3aa3,_0x355873){const _0x12b6db=a3_0x7fb95;console[_0x12b6db(0x169)](CLI_BIN_NAME+_0x12b6db(0x14a)+_0x5a3aa3+_0x12b6db(0x153)+_0x355873+_0x12b6db(0x147));}const importDef={'service':'app','command':a3_0x7fb95(0x128),'description':a3_0x7fb95(0x16a),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initImportFlagDefs,async 'execute'(_0x28d5b2){return await runInitImport(collectFlags(_0x28d5b2,initImportFlagDefs)),{'ok':!![]};}};export const appDefinitions=[initDef,listDef,pullDef,useDef,importDef];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x23173e,_0x1ac62a){const _0x37c015=a4_0x2ad9,_0x4f6680=_0x23173e();while(!![]){try{const _0x1d3f6f=-parseInt(_0x37c015(0xd5))/0x1*(-parseInt(_0x37c015(0xd0))/0x2)+-parseInt(_0x37c015(0xd4))/0x3*(-parseInt(_0x37c015(0xdd))/0x4)+-parseInt(_0x37c015(0xde))/0x5*(-parseInt(_0x37c015(0xdb))/0x6)+-parseInt(_0x37c015(0xe2))/0x7*(-parseInt(_0x37c015(0xd1))/0x8)+-parseInt(_0x37c015(0xea))/0x9*(parseInt(_0x37c015(0xe1))/0xa)+parseInt(_0x37c015(0xdc))/0xb*(parseInt(_0x37c015(0xe6))/0xc)+-parseInt(_0x37c015(0xd3))/0xd;if(_0x1d3f6f===_0x1ac62a)break;else _0x4f6680['push'](_0x4f6680['shift']());}catch(_0x9fca91){_0x4f6680['push'](_0x4f6680['shift']());}}}(a4_0x24ac,0xc9c07));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(_0x54131a){const _0x262688=a4_0x2ad9;if(typeof _0x54131a!==_0x262688(0xda))return null;const _0x388210=_0x54131a[_0x262688(0xe5)]();return _0x388210?_0x388210[_0x262688(0xd9)]():null;}function a4_0x2ad9(_0x5f3a3e,_0x582028){_0x5f3a3e=_0x5f3a3e-0xd0;const _0x24ac1c=a4_0x24ac();let _0x2ad95e=_0x24ac1c[_0x5f3a3e];return _0x2ad95e;}export function isRuntimeAccessibleApp(_0x33cb18){const _0x782094=a4_0x2ad9;return normalizeAppPublishStatus(_0x33cb18[_0x782094(0xd8)])===RUNTIME_ACCESSIBLE_APP_STATUS;}export function filterRuntimeAccessibleApps(_0x1803d3){const _0x13b97a=a4_0x2ad9;return _0x1803d3[_0x13b97a(0xe4)](isRuntimeAccessibleApp);}export function findAppByName(_0x125d9a,_0x4f5461){const _0x14a950=a4_0x2ad9;return _0x125d9a[_0x14a950(0xe7)](_0x36ef7e=>_0x36ef7e[_0x14a950(0xe0)]===_0x4f5461);}export function findAppByCode(_0x21d1df,_0x450729){const _0x2b06ca=a4_0x2ad9,_0x229b8e=_0x450729[_0x2b06ca(0xe5)]();if(!_0x229b8e)return undefined;return _0x21d1df['find'](_0x399f37=>_0x399f37[_0x2b06ca(0xd6)]?.[_0x2b06ca(0xe5)]()===_0x229b8e);}function a4_0x24ac(){const _0x547ae5=['UNKNOWN','App\x20','3076191uindIo','6nBLAJt','5122424hfpsHa','\x20dataset/data/sql/bff\x20commands,\x20or\x20choose\x20a\x20published\x20app.','30783545TSjJdm','24agePED','186163PsKWrc','appCode','validation','appPublishStatus','toUpperCase','string','1130682oymTFN','154ENLOTQ','264508ZfWwmb','25iknojZ','.\x20Publish\x20the\x20app\x20before\x20using\x20','appName','10SYedzZ','7GEqYwh','Current\x20status:\x20','filter','trim','742368qCPLPJ','find'];a4_0x24ac=function(){return _0x547ae5;};return a4_0x24ac();}export function runtimeInaccessibleAppError(_0x286a51,_0x5a7d82){const _0x441bb9=a4_0x2ad9,_0x28c464=normalizeAppPublishStatus(_0x286a51[_0x441bb9(0xd8)])??_0x441bb9(0xe8);return CliErrors[_0x441bb9(0xd7)](_0x441bb9(0xe9)+_0x5a7d82+'\x20is\x20not\x20available\x20for\x20runtime\x20AI\x20access.',_0x441bb9(0xe3)+_0x28c464+_0x441bb9(0xdf)+CLI_BIN_NAME+_0x441bb9(0xd2));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x27513f,_0x5f53e8){const _0x52cf78=a5_0x1acc,_0x3bf7ac=_0x27513f();while(!![]){try{const _0x2f6d88=-parseInt(_0x52cf78(0x7d))/0x1+parseInt(_0x52cf78(0x84))/0x2*(-parseInt(_0x52cf78(0x87))/0x3)+-parseInt(_0x52cf78(0x85))/0x4+-parseInt(_0x52cf78(0x89))/0x5+-parseInt(_0x52cf78(0x86))/0x6+parseInt(_0x52cf78(0x88))/0x7+-parseInt(_0x52cf78(0x82))/0x8*(-parseInt(_0x52cf78(0x79))/0x9);if(_0x2f6d88===_0x5f53e8)break;else _0x3bf7ac['push'](_0x3bf7ac['shift']());}catch(_0x1a5ad8){_0x3bf7ac['push'](_0x3bf7ac['shift']());}}}(a5_0x3f78,0xd8122));function a5_0x1acc(_0x11832f,_0x17f90e){_0x11832f=_0x11832f-0x78;const _0x3f78f1=a5_0x3f78();let _0x1accba=_0x3f78f1[_0x11832f];return _0x1accba;}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 _0x54c494=a5_0x1acc,_0x554dfc=join(__dirname,_0x54c494(0x81)),_0x416354=readFileSync(_0x554dfc,_0x54c494(0x7a));return JSON[_0x54c494(0x7e)](_0x416354);}function a5_0x3f78(){const _0x117315=['1826937SpvAHv','utf-8','success','errorMsg','947973osEUoP','parse','errorCode','data','../../../mock/app-list.json','232jdrKQE','Mock\x20API\x20error:\x20','22vNuEot','4725644xaJEgj','4055238jpSJwY','324966OmbEzI','3172841jkBeTh','7291175epEmJG','tableData'];a5_0x3f78=function(){return _0x117315;};return a5_0x3f78();}let _cached=null;export function getMockAppList(){return!_cached&&(_cached=loadMockAppList()),_cached;}export function getMockRemoteAppItems(){const _0x20c1fb=a5_0x1acc,_0x5e2261=getMockAppList();if(!_0x5e2261[_0x20c1fb(0x7b)])throw new Error(_0x20c1fb(0x83)+_0x5e2261[_0x20c1fb(0x7c)]+'\x20('+_0x5e2261[_0x20c1fb(0x7f)]+')');return _0x5e2261[_0x20c1fb(0x80)][_0x20c1fb(0x78)];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x321831,_0x17b885){const _0x259a12=a6_0x13a8,_0x1a9341=_0x321831();while(!![]){try{const _0x48a65b=-parseInt(_0x259a12(0x142))/0x1*(-parseInt(_0x259a12(0x13f))/0x2)+-parseInt(_0x259a12(0x146))/0x3*(-parseInt(_0x259a12(0x14d))/0x4)+parseInt(_0x259a12(0x141))/0x5+-parseInt(_0x259a12(0x145))/0x6+parseInt(_0x259a12(0x140))/0x7+-parseInt(_0x259a12(0x148))/0x8+-parseInt(_0x259a12(0x13d))/0x9;if(_0x48a65b===_0x17b885)break;else _0x1a9341['push'](_0x1a9341['shift']());}catch(_0x37af2a){_0x1a9341['push'](_0x1a9341['shift']());}}}(a6_0x465b,0xba600));import{getMyApps}from'../../core/api-client.js';import{getMockRemoteAppItems}from'../../commands/app/mock-loader.js';import{getAppCacheFilePath,readCachedAppList,writeCachedAppList}from'../../commands/app/cache.js';import{productEnv}from'../../constant/product.js';export function shouldUseMockRemoteApps(){const _0x1e8b26=a6_0x13a8,_0x398a3c=(productEnv(_0x1e8b26(0x144))||'')[_0x1e8b26(0x14b)]()['toLowerCase']();return _0x398a3c===_0x1e8b26(0x149);}export async function getRemoteAppItems(){if(shouldUseMockRemoteApps())return getMockRemoteAppItems();return getMyApps();}function a6_0x13a8(_0x33c568,_0x464547){_0x33c568=_0x33c568-0x13d;const _0x465b06=a6_0x465b();let _0x13a800=_0x465b06[_0x33c568];return _0x13a800;}export async function getRemoteAppList(_0x3f54c3){const _0x38570e=a6_0x13a8,{env:_0x3e8b7e,accessKey:_0x27c11b,localOnly:localOnly=![],noCache:noCache=![]}=_0x3f54c3,_0x14fbfe=readCachedAppList(_0x3e8b7e,_0x27c11b),_0x418d97=_0x27c11b?.['trim']()?getAppCacheFilePath(_0x3e8b7e,_0x27c11b):null;if(localOnly)return{'items':_0x14fbfe?.[_0x38570e(0x143)]??[],'source':'cache','fetchedAt':_0x14fbfe?.[_0x38570e(0x13e)]??null,'cachePath':_0x418d97};try{const _0x1cafce=await getRemoteAppItems(),_0x5e38b2=shouldUseMockRemoteApps()?_0x38570e(0x149):_0x38570e(0x14a),_0x4ff0db=new Date()[_0x38570e(0x147)](),_0x5a1573=_0x27c11b?.[_0x38570e(0x14b)]()?writeCachedAppList(_0x3e8b7e,_0x27c11b,{'env':_0x3e8b7e,'fetchedAt':_0x4ff0db,'source':_0x5e38b2,'items':_0x1cafce}):null;return{'items':_0x1cafce,'source':_0x5e38b2,'fetchedAt':_0x4ff0db,'cachePath':_0x5a1573};}catch(_0x4ebd8d){if(!noCache&&_0x14fbfe)return{'items':_0x14fbfe['items'],'source':_0x38570e(0x14c),'fetchedAt':_0x14fbfe[_0x38570e(0x13e)],'cachePath':_0x418d97};throw _0x4ebd8d;}}function a6_0x465b(){const _0x3ab477=['fetchedAt','35618zLADdc','10579450EgwhRT','3119150Ahdjna','27hCpNgC','items','APP_LIST_SOURCE','5486598PBsmza','274269BadvqL','toISOString','2379688yLfUae','mock','remote','trim','cache','8doGBrd','7412247kLGzqn'];a6_0x465b=function(){return _0x3ab477;};return a6_0x465b();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1fcaec,_0x214369){const _0x2451a8=a7_0x5176,_0x57773c=_0x1fcaec();while(!![]){try{const _0x1b8928=parseInt(_0x2451a8(0x8a))/0x1*(-parseInt(_0x2451a8(0x86))/0x2)+-parseInt(_0x2451a8(0x7c))/0x3+-parseInt(_0x2451a8(0x81))/0x4*(-parseInt(_0x2451a8(0x7b))/0x5)+parseInt(_0x2451a8(0x88))/0x6*(parseInt(_0x2451a8(0x7d))/0x7)+-parseInt(_0x2451a8(0x82))/0x8+parseInt(_0x2451a8(0x87))/0x9+parseInt(_0x2451a8(0x8c))/0xa*(-parseInt(_0x2451a8(0x84))/0xb);if(_0x1b8928===_0x214369)break;else _0x57773c['push'](_0x57773c['shift']());}catch(_0x36155b){_0x57773c['push'](_0x57773c['shift']());}}}(a7_0x46d6,0xcd8b1));function a7_0x5176(_0x4172ef,_0xf22f2f){_0x4172ef=_0x4172ef-0x7a;const _0x46d6f1=a7_0x46d6();let _0x5176c6=_0x46d6f1[_0x4172ef];return _0x5176c6;}function a7_0x46d6(){const _0x15e452=['currentApp','global','4VXAiWY','1683040cLWozg','named','51293CFwVhW','definedIn','2LqbqrJ','2429433vaPGvr','5272368pwUkSs','find','1163298vGLNrS','isCurrent','220ekVKeK','appcode','defaultApp','local','name','8393370wtPwdP','1527510TuRqKk','7JTgKoa','trim'];a7_0x46d6=function(){return _0x15e452;};return a7_0x46d6();}import{CLI_BIN_NAME}from'../../constant/cli.js';import{formatScopeLabel}from'../../commands/common/config-policy.js';export{CLI_BIN_NAME};export function enrichAppListItemsWithMergedSelection(_0x4676a5,_0x35c9e1){const _0x477870=a7_0x5176;if(!_0x35c9e1)return;const _0x77cfa4=!!(_0x35c9e1[_0x477870(0x7f)]??_0x35c9e1[_0x477870(0x8e)]);for(const _0x364a78 of _0x4676a5){_0x364a78[_0x477870(0x8b)]=![];}const _0x4fedc8=_0x35c9e1['appCode']!=null?String(_0x35c9e1['appCode'])['trim']():'';if(_0x77cfa4){const _0x5ddd5c=_0x35c9e1['currentApp']??_0x35c9e1[_0x477870(0x8e)];if(_0x5ddd5c){const _0x2cc9a5=_0x4676a5[_0x477870(0x89)](_0x3154d2=>_0x3154d2[_0x477870(0x83)]===!![]&&_0x3154d2[_0x477870(0x7a)]===_0x5ddd5c&&_0x3154d2[_0x477870(0x85)]===_0x477870(0x8f)),_0x5597c8=_0x2cc9a5??_0x4676a5[_0x477870(0x89)](_0x450f3c=>_0x450f3c[_0x477870(0x83)]===!![]&&_0x450f3c[_0x477870(0x7a)]===_0x5ddd5c);_0x5597c8&&(_0x5597c8['isCurrent']=!![]);}return;}if(!_0x4fedc8)return;for(const _0x25e148 of _0x4676a5){String(_0x25e148[_0x477870(0x8d)]??'')[_0x477870(0x7e)]()===_0x4fedc8&&(_0x25e148[_0x477870(0x8b)]=!![]);}}export{readScopedConfig as readConfig,writeScopedConfig as writeConfig,isInProject}from'../../context.js';export function scopeLabel(_0x1395d4){const _0x536822=a7_0x5176;return formatScopeLabel(_0x1395d4[_0x536822(0x80)]?_0x536822(0x80):'project');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a8_0xd935f7=a8_0x2faf;function a8_0x18b1(){const _0x570136=['boolean','favorite','metadata','includes','react_module\x20imports\x20are\x20limited\x20to:\x20','Preview:\x20update\x20react_module\x20Artifact\x20','join','artifactType','Preview:\x20create\x20react_module\x20Artifact','Artifact\x20source\x20file\x20is\x20blank.','Artifact\x20metadata\x20as\x20JSON\x20object;\x20compiledContent\x20is\x20stripped','Optional\x20source\x20filter,\x20for\x20example\x20AGENT','14aHSIjK','filter','source','updateTime','name','1304924OTNwlL','num','startsWith','524802PLPBhW','str','compiledContent','2502UBGRDM','artifact','lastIndex','61091kvivBa','some','appCode','deleted','--metadata\x20must\x20be\x20a\x20JSON\x20object.','4923610nsGIIE','create','createTime','/client/artifact/create','parse','read','File\x20path\x20is\x20required.','content','map','add','flag','AGENT','react-dom','Invalid\x20JSON\x20for\x20--metadata:\x20','3235VPmgiV','validation','/update','Update\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','bool','object','File\x20not\x20found:\x20','react_module\x20must\x20be\x20an\x20embeddable\x20React\x20module,\x20not\x20full\x20HTML\x20or\x20a\x20ReactDOM/createRoot\x20mount\x20entry.','description','Updated\x20Artifact\x20','764368AZeujy','exec','utf8','Artifact\x20display\x20name','file','POST','string','1743903WgJdZb','trim','build','antd','detail','verbose','Path\x20to\x20a\x20local\x20UTF-8\x20React\x20module\x20source\x20file','4iMWxoA','write','Artifact\x20ID','Create\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','list','File\x20is\x20not\x20a\x20regular\x20file:\x20','length','isArray','isFile','List\x20current-app\x20react_module\x20Artifacts','body'];a8_0x18b1=function(){return _0x570136;};return a8_0x18b1();}(function(_0x222a4c,_0x3dad5){const _0x48215b=a8_0x2faf,_0x13285a=_0x222a4c();while(!![]){try{const _0xe43990=parseInt(_0x48215b(0x12f))/0x1+-parseInt(_0x48215b(0x10a))/0x2*(parseInt(_0x48215b(0x129))/0x3)+parseInt(_0x48215b(0x126))/0x4+-parseInt(_0x48215b(0x142))/0x5*(parseInt(_0x48215b(0x12c))/0x6)+-parseInt(_0x48215b(0x121))/0x7*(-parseInt(_0x48215b(0xfc))/0x8)+-parseInt(_0x48215b(0x103))/0x9+parseInt(_0x48215b(0x134))/0xa;if(_0xe43990===_0x3dad5)break;else _0x13285a['push'](_0x13285a['shift']());}catch(_0x5c6806){_0x13285a['push'](_0x13285a['shift']());}}}(a8_0x18b1,0x3ed3d));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';import{dryRun}from'../../framework/dryrun.js';const ARTIFACT_TYPE_REACT_MODULE='react_module',ARTIFACT_SOURCE_AGENT=a8_0xd935f7(0x13f),ALLOWED_REACT_MODULE_IMPORTS=['react',a8_0xd935f7(0x140),'lodash','dayjs',a8_0xd935f7(0x106),'@ant-design/icons'];export const ALLOWED_REACT_MODULE_IMPORTS_TEXT=ALLOWED_REACT_MODULE_IMPORTS[a8_0xd935f7(0x11b)](',\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_0xd935f7(0x100),'type':a8_0xd935f7(0x102),'required':!![],'description':a8_0xd935f7(0x109)},ARTIFACT_NAME_FLAG={'name':a8_0xd935f7(0x125),'type':a8_0xd935f7(0x102),'description':a8_0xd935f7(0xff)},METADATA_FLAG={'name':'metadata','type':a8_0xd935f7(0x102),'description':a8_0xd935f7(0x11f)};function isPlainObject(_0x23cce3){const _0x332754=a8_0xd935f7;return typeof _0x23cce3===_0x332754(0xf7)&&_0x23cce3!==null&&!Array[_0x332754(0x111)](_0x23cce3);}function readSourceFile(_0x3565c7){const _0x194875=a8_0xd935f7;if(!_0x3565c7)throw CliErrors[_0x194875(0x143)](_0x194875(0x13a));if(!existsSync(_0x3565c7))throw CliErrors['validation'](_0x194875(0xf8)+_0x3565c7);if(!statSync(_0x3565c7)[_0x194875(0x112)]())throw CliErrors[_0x194875(0x143)](_0x194875(0x10f)+_0x3565c7);const _0x1dac91=readFileSync(_0x3565c7,_0x194875(0xfe));return validateReactModuleSource(_0x1dac91),_0x1dac91;}function parseMetadata(_0x3fac5b){const _0x1677f4=a8_0xd935f7;if(!_0x3fac5b)return undefined;let _0x127a1c;try{_0x127a1c=JSON[_0x1677f4(0x138)](_0x3fac5b);}catch{throw CliErrors[_0x1677f4(0x143)](_0x1677f4(0x141)+_0x3fac5b);}if(!isPlainObject(_0x127a1c))throw CliErrors['validation'](_0x1677f4(0x133));const _0x1f2a5b={..._0x127a1c};return delete _0x1f2a5b[_0x1677f4(0x12b)],_0x1f2a5b;}function getPackageName(_0x47295f){const _0x19e2fb=a8_0xd935f7;if(_0x47295f[_0x19e2fb(0x128)]('@')){const [_0x506826,_0x454a0b]=_0x47295f['split']('/');return _0x506826&&_0x454a0b?_0x506826+'/'+_0x454a0b:_0x47295f;}return _0x47295f['split']('/')[0x0]||_0x47295f;}function validateAllowedImports(_0x22f14b){const _0x2ee482=a8_0xd935f7,_0x5ef99b=new Set();for(const _0x50bc32 of IMPORT_SOURCE_PATTERNS){_0x50bc32[_0x2ee482(0x12e)]=0x0;let _0x1efa9d;while((_0x1efa9d=_0x50bc32[_0x2ee482(0xfd)](_0x22f14b))!==null){const _0x14ae12=_0x1efa9d[0x1]?.[_0x2ee482(0x104)]();_0x14ae12&&_0x5ef99b[_0x2ee482(0x13d)](_0x14ae12);}}const _0x5f8fd=[..._0x5ef99b][_0x2ee482(0x13c)](getPackageName)[_0x2ee482(0x122)](_0x3b4083=>!ALLOWED_REACT_MODULE_IMPORTS[_0x2ee482(0x118)](_0x3b4083));if(_0x5f8fd[_0x2ee482(0x110)]>0x0)throw CliErrors[_0x2ee482(0x143)](_0x2ee482(0x119)+ALLOWED_REACT_MODULE_IMPORTS_TEXT+'.\x20Unsupported:\x20'+[...new Set(_0x5f8fd)][_0x2ee482(0x11b)](',\x20'));}export function validateReactModuleSource(_0x446abe){const _0x3af95c=a8_0xd935f7;if(!_0x446abe[_0x3af95c(0x104)]())throw CliErrors[_0x3af95c(0x143)](_0x3af95c(0x11e));if(PAGE_LEVEL_PATTERNS[_0x3af95c(0x130)](_0x368927=>_0x368927['test'](_0x446abe)))throw CliErrors[_0x3af95c(0x143)](_0x3af95c(0xf9));validateAllowedImports(_0x446abe);}function buildArtifactInput(_0x2941d9){const _0x10c2e1=a8_0xd935f7,_0x51ddb7=readSourceFile(_0x2941d9[_0x10c2e1(0x12a)](_0x10c2e1(0x100))),_0x3bf6d0=_0x2941d9['str'](_0x10c2e1(0x125))[_0x10c2e1(0x104)](),_0x24f02d=parseMetadata(_0x2941d9[_0x10c2e1(0x12a)](_0x10c2e1(0x117)));return{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x3bf6d0?{'name':_0x3bf6d0}:{},'content':_0x51ddb7,..._0x24f02d?{'metadata':_0x24f02d}:{},'source':ARTIFACT_SOURCE_AGENT};}function summarizeArtifact(_0x5289c1){const _0x2a26d7=a8_0xd935f7;return{'id':_0x5289c1['id'],'name':_0x5289c1[_0x2a26d7(0x125)],'artifactType':_0x5289c1[_0x2a26d7(0x11c)],'source':_0x5289c1[_0x2a26d7(0x123)],'favorite':_0x5289c1['favorite'],'deleted':_0x5289c1['deleted'],'createTime':_0x5289c1[_0x2a26d7(0x136)],'updateTime':_0x5289c1[_0x2a26d7(0x124)]};}function a8_0x2faf(_0x4b1adf,_0x355caf){_0x4b1adf=_0x4b1adf-0xf5;const _0x18b16c=a8_0x18b1();let _0x2fafa3=_0x18b16c[_0x4b1adf];return _0x2fafa3;}function detailArtifact(_0x5cc712){const _0x1721e7=a8_0xd935f7;return{'id':_0x5cc712['id'],'appCode':_0x5cc712[_0x1721e7(0x131)],'name':_0x5cc712[_0x1721e7(0x125)],'artifactType':_0x5cc712[_0x1721e7(0x11c)],'source':_0x5cc712['source'],'favorite':_0x5cc712[_0x1721e7(0x116)],'deleted':_0x5cc712[_0x1721e7(0x132)],'content':_0x5cc712[_0x1721e7(0x13b)]??'','compiledContent':_0x5cc712[_0x1721e7(0x12b)],'metadata':_0x5cc712[_0x1721e7(0x117)]??{},'createTime':_0x5cc712['createTime'],'updateTime':_0x5cc712[_0x1721e7(0x124)]};}function readFavoriteFlag(_0x3f1d36){const _0x1873d3=a8_0xd935f7,_0x2eb568=_0x3f1d36[_0x1873d3(0x13e)]('favorite');return _0x2eb568===undefined||_0x2eb568===null||_0x2eb568===''?undefined:_0x3f1d36[_0x1873d3(0xf6)](_0x1873d3(0x116));}const artifactList={'service':a8_0xd935f7(0x12d),'command':a8_0xd935f7(0x10e),'description':a8_0xd935f7(0x113),'risk':a8_0xd935f7(0x139),'flags':[{'name':'source','type':a8_0xd935f7(0x102),'description':a8_0xd935f7(0x120)},{'name':a8_0xd935f7(0x116),'type':a8_0xd935f7(0x115),'description':'Optional\x20favorite-state\x20filter'},VERBOSE_FLAG],async 'execute'(_0x2dba0d){const _0x213690=a8_0xd935f7,_0x41009b=await listRuntimeArtifacts(_0x2dba0d[_0x213690(0x131)],{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x2dba0d[_0x213690(0x12a)](_0x213690(0x123))?{'source':_0x2dba0d[_0x213690(0x12a)](_0x213690(0x123))}:{},...readFavoriteFlag(_0x2dba0d)!==undefined?{'favorite':readFavoriteFlag(_0x2dba0d)}:{}});return{'ok':!![],'data':{'total':_0x41009b[_0x213690(0x110)],'items':_0x2dba0d['bool'](_0x213690(0x108))?_0x41009b:_0x41009b[_0x213690(0x13c)](summarizeArtifact)}};}},artifactDetail={'service':a8_0xd935f7(0x12d),'command':a8_0xd935f7(0x107),'description':'Show\x20one\x20Artifact\x20by\x20id','risk':'read','flags':[{...ID_FLAG,'description':a8_0xd935f7(0x10c)}],async 'execute'(_0x278ded){const _0x436a52=a8_0xd935f7,_0x4da32f=await getRuntimeArtifact(_0x278ded[_0x436a52(0x127)]('id'),_0x278ded['appCode']);return{'ok':!![],'data':detailArtifact(_0x4da32f)};}},artifactCreate={'service':a8_0xd935f7(0x12d),'command':a8_0xd935f7(0x135),'description':a8_0xd935f7(0x10d),'risk':a8_0xd935f7(0x10b),'flags':[FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x49b0b5){const _0x3c2176=a8_0xd935f7,_0x2f33b5=buildArtifactInput(_0x49b0b5),_0x54c6ec=await createRuntimeArtifact(_0x49b0b5[_0x3c2176(0x131)],_0x2f33b5);return{'ok':!![],'data':detailArtifact(_0x54c6ec),'message':'Created\x20Artifact\x20'+_0x54c6ec['id']+(_0x54c6ec[_0x3c2176(0x125)]?'\x20('+_0x54c6ec[_0x3c2176(0x125)]+')':'')};},async 'dryRun'(_0x21f348){const _0x289dc3=a8_0xd935f7,_0x34c28d=buildArtifactInput(_0x21f348);return dryRun(_0x289dc3(0x101),_0x289dc3(0x137))[_0x289dc3(0x114)]({'appCode':_0x21f348[_0x289dc3(0x131)],..._0x34c28d})[_0x289dc3(0xfa)](_0x289dc3(0x11d))['build']();}},artifactUpdate={'service':a8_0xd935f7(0x12d),'command':'update','description':a8_0xd935f7(0xf5),'risk':a8_0xd935f7(0x10b),'flags':[{...ID_FLAG,'description':a8_0xd935f7(0x10c)},FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x16b93b){const _0x2e5642=a8_0xd935f7,_0x1ebe6d=_0x16b93b['num']('id'),_0x486ce1=buildArtifactInput(_0x16b93b),_0x204550=await updateRuntimeArtifact(_0x1ebe6d,_0x16b93b[_0x2e5642(0x131)],_0x486ce1);return{'ok':!![],'data':detailArtifact(_0x204550),'message':_0x2e5642(0xfb)+_0x204550['id']+(_0x204550[_0x2e5642(0x125)]?'\x20('+_0x204550[_0x2e5642(0x125)]+')':'')};},async 'dryRun'(_0x572349){const _0x4271a9=a8_0xd935f7,_0x198c3e=_0x572349[_0x4271a9(0x127)]('id'),_0xce0107=buildArtifactInput(_0x572349);return dryRun(_0x4271a9(0x101),'/client/artifact/'+_0x198c3e+_0x4271a9(0x144))[_0x4271a9(0x114)]({'appCode':_0x572349['appCode'],..._0xce0107})['description'](_0x4271a9(0x11a)+_0x198c3e)[_0x4271a9(0x105)]();}};export const artifactDefinitions=[artifactList,artifactDetail,artifactCreate,artifactUpdate];
|
|
1
|
+
const a8_0x51295c=a8_0x5096;function a8_0x1cb6(){const _0x24c965=['read','Optional\x20source\x20filter,\x20for\x20example\x20AGENT','join','6079248jJglRn','Update\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','dayjs','list','content','File\x20is\x20not\x20a\x20regular\x20file:\x20','object','/client/artifact/','List\x20current-app\x20react_module\x20Artifacts','deleted','metadata','compiledContent','--metadata\x20must\x20be\x20a\x20JSON\x20object.','Path\x20to\x20a\x20local\x20UTF-8\x20React\x20module\x20source\x20file','appCode','11726960aZBJCq','react_module\x20imports\x20are\x20limited\x20to:\x20','some','bool','Preview:\x20create\x20react_module\x20Artifact','artifactType','verbose','1719kkkmRf','8kQrPPl','528918rnVAbX','map','createTime','/update','artifact','startsWith','utf8','isFile','isArray','Created\x20Artifact\x20','Optional\x20favorite-state\x20filter','Artifact\x20source\x20file\x20is\x20blank.','trim','body','exec','string','updateTime','Create\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','Updated\x20Artifact\x20','parse','File\x20path\x20is\x20required.','update','validation','flag','name','file','POST','source','favorite','lodash','581161VJLddr','react','/client/artifact/create','2372rHSMmt','Artifact\x20metadata\x20as\x20JSON\x20object;\x20compiledContent\x20is\x20stripped','write','react-dom','Artifact\x20display\x20name','split','lastIndex','description','Artifact\x20ID','length','10blLuIF','1308000HYLdHy','num','antd','3433052DXqwXP','detail','build','str'];a8_0x1cb6=function(){return _0x24c965;};return a8_0x1cb6();}(function(_0xed7d8,_0x40deee){const _0x5bb193=a8_0x5096,_0x2899a5=_0xed7d8();while(!![]){try{const _0x4ba57c=parseInt(_0x5bb193(0x13c))/0x1+parseInt(_0x5bb193(0x13f))/0x2*(-parseInt(_0x5bb193(0x11c))/0x3)+-parseInt(_0x5bb193(0x14a))/0x4+-parseInt(_0x5bb193(0x149))/0x5*(parseInt(_0x5bb193(0x11e))/0x6)+parseInt(_0x5bb193(0x14d))/0x7*(parseInt(_0x5bb193(0x11d))/0x8)+-parseInt(_0x5bb193(0x154))/0x9+parseInt(_0x5bb193(0x163))/0xa;if(_0x4ba57c===_0x40deee)break;else _0x2899a5['push'](_0x2899a5['shift']());}catch(_0x22efce){_0x2899a5['push'](_0x2899a5['shift']());}}}(a8_0x1cb6,0x5e391));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';import{dryRun}from'../../framework/dryrun.js';const ARTIFACT_TYPE_REACT_MODULE='react_module',ARTIFACT_SOURCE_AGENT='AGENT',ALLOWED_REACT_MODULE_IMPORTS=[a8_0x51295c(0x13d),a8_0x51295c(0x142),a8_0x51295c(0x13b),a8_0x51295c(0x156),a8_0x51295c(0x14c),'@ant-design/icons'];export const ALLOWED_REACT_MODULE_IMPORTS_TEXT=ALLOWED_REACT_MODULE_IMPORTS[a8_0x51295c(0x153)](',\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_0x51295c(0x137),'type':a8_0x51295c(0x12d),'required':!![],'description':a8_0x51295c(0x161)},ARTIFACT_NAME_FLAG={'name':a8_0x51295c(0x136),'type':a8_0x51295c(0x12d),'description':a8_0x51295c(0x143)},METADATA_FLAG={'name':a8_0x51295c(0x15e),'type':a8_0x51295c(0x12d),'description':a8_0x51295c(0x140)};function isPlainObject(_0x9e1bdc){const _0x44bccb=a8_0x51295c;return typeof _0x9e1bdc===_0x44bccb(0x15a)&&_0x9e1bdc!==null&&!Array[_0x44bccb(0x126)](_0x9e1bdc);}function readSourceFile(_0x43fd1b){const _0x27a54c=a8_0x51295c;if(!_0x43fd1b)throw CliErrors['validation'](_0x27a54c(0x132));if(!existsSync(_0x43fd1b))throw CliErrors[_0x27a54c(0x134)]('File\x20not\x20found:\x20'+_0x43fd1b);if(!statSync(_0x43fd1b)[_0x27a54c(0x125)]())throw CliErrors[_0x27a54c(0x134)](_0x27a54c(0x159)+_0x43fd1b);const _0x5d2e8e=readFileSync(_0x43fd1b,_0x27a54c(0x124));return validateReactModuleSource(_0x5d2e8e),_0x5d2e8e;}function parseMetadata(_0x575a5a){const _0x4283e7=a8_0x51295c;if(!_0x575a5a)return undefined;let _0x2149cf;try{_0x2149cf=JSON[_0x4283e7(0x131)](_0x575a5a);}catch{throw CliErrors['validation']('Invalid\x20JSON\x20for\x20--metadata:\x20'+_0x575a5a);}if(!isPlainObject(_0x2149cf))throw CliErrors[_0x4283e7(0x134)](_0x4283e7(0x160));const _0x507db0={..._0x2149cf};return delete _0x507db0[_0x4283e7(0x15f)],_0x507db0;}function getPackageName(_0x5b042c){const _0x346620=a8_0x51295c;if(_0x5b042c[_0x346620(0x123)]('@')){const [_0x3b153f,_0xaadc3]=_0x5b042c[_0x346620(0x144)]('/');return _0x3b153f&&_0xaadc3?_0x3b153f+'/'+_0xaadc3:_0x5b042c;}return _0x5b042c['split']('/')[0x0]||_0x5b042c;}function validateAllowedImports(_0x352510){const _0x4fa370=a8_0x51295c,_0x15b4b4=new Set();for(const _0x2e4c42 of IMPORT_SOURCE_PATTERNS){_0x2e4c42[_0x4fa370(0x145)]=0x0;let _0x2c7700;while((_0x2c7700=_0x2e4c42[_0x4fa370(0x12c)](_0x352510))!==null){const _0x591c93=_0x2c7700[0x1]?.[_0x4fa370(0x12a)]();_0x591c93&&_0x15b4b4['add'](_0x591c93);}}const _0x5f2c34=[..._0x15b4b4][_0x4fa370(0x11f)](getPackageName)['filter'](_0x4593d3=>!ALLOWED_REACT_MODULE_IMPORTS['includes'](_0x4593d3));if(_0x5f2c34[_0x4fa370(0x148)]>0x0)throw CliErrors['validation'](_0x4fa370(0x164)+ALLOWED_REACT_MODULE_IMPORTS_TEXT+'.\x20Unsupported:\x20'+[...new Set(_0x5f2c34)]['join'](',\x20'));}export function validateReactModuleSource(_0xcde4c5){const _0x5e736f=a8_0x51295c;if(!_0xcde4c5[_0x5e736f(0x12a)]())throw CliErrors[_0x5e736f(0x134)](_0x5e736f(0x129));if(PAGE_LEVEL_PATTERNS[_0x5e736f(0x165)](_0x1f9e8a=>_0x1f9e8a['test'](_0xcde4c5)))throw CliErrors[_0x5e736f(0x134)]('react_module\x20must\x20be\x20an\x20embeddable\x20React\x20module,\x20not\x20full\x20HTML\x20or\x20a\x20ReactDOM/createRoot\x20mount\x20entry.');validateAllowedImports(_0xcde4c5);}function buildArtifactInput(_0x327236){const _0x115fb6=a8_0x51295c,_0x9d552c=readSourceFile(_0x327236[_0x115fb6(0x150)](_0x115fb6(0x137))),_0x5207a7=_0x327236[_0x115fb6(0x150)]('name')[_0x115fb6(0x12a)](),_0x550443=parseMetadata(_0x327236[_0x115fb6(0x150)]('metadata'));return{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x5207a7?{'name':_0x5207a7}:{},'content':_0x9d552c,..._0x550443?{'metadata':_0x550443}:{},'source':ARTIFACT_SOURCE_AGENT};}function summarizeArtifact(_0x2b643a){const _0x16840e=a8_0x51295c;return{'id':_0x2b643a['id'],'name':_0x2b643a['name'],'artifactType':_0x2b643a[_0x16840e(0x11a)],'source':_0x2b643a['source'],'favorite':_0x2b643a[_0x16840e(0x13a)],'deleted':_0x2b643a['deleted'],'createTime':_0x2b643a[_0x16840e(0x120)],'updateTime':_0x2b643a[_0x16840e(0x12e)]};}function detailArtifact(_0x33be49){const _0x30f6ff=a8_0x51295c;return{'id':_0x33be49['id'],'appCode':_0x33be49[_0x30f6ff(0x162)],'name':_0x33be49[_0x30f6ff(0x136)],'artifactType':_0x33be49[_0x30f6ff(0x11a)],'source':_0x33be49['source'],'favorite':_0x33be49['favorite'],'deleted':_0x33be49[_0x30f6ff(0x15d)],'content':_0x33be49[_0x30f6ff(0x158)]??'','compiledContent':_0x33be49[_0x30f6ff(0x15f)],'metadata':_0x33be49[_0x30f6ff(0x15e)]??{},'createTime':_0x33be49[_0x30f6ff(0x120)],'updateTime':_0x33be49['updateTime']};}function readFavoriteFlag(_0x3db310){const _0x1031cc=a8_0x51295c,_0x47c6ad=_0x3db310[_0x1031cc(0x135)](_0x1031cc(0x13a));return _0x47c6ad===undefined||_0x47c6ad===null||_0x47c6ad===''?undefined:_0x3db310[_0x1031cc(0x166)]('favorite');}function a8_0x5096(_0x43c670,_0x2afe7d){_0x43c670=_0x43c670-0x119;const _0x1cb625=a8_0x1cb6();let _0x50965e=_0x1cb625[_0x43c670];return _0x50965e;}const artifactList={'service':a8_0x51295c(0x122),'command':a8_0x51295c(0x157),'description':a8_0x51295c(0x15c),'risk':a8_0x51295c(0x151),'flags':[{'name':a8_0x51295c(0x139),'type':'string','description':a8_0x51295c(0x152)},{'name':a8_0x51295c(0x13a),'type':'boolean','description':a8_0x51295c(0x128)},VERBOSE_FLAG],async 'execute'(_0x1d5e83){const _0x504947=a8_0x51295c,_0x51897d=await listRuntimeArtifacts(_0x1d5e83[_0x504947(0x162)],{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x1d5e83[_0x504947(0x150)](_0x504947(0x139))?{'source':_0x1d5e83['str'](_0x504947(0x139))}:{},...readFavoriteFlag(_0x1d5e83)!==undefined?{'favorite':readFavoriteFlag(_0x1d5e83)}:{}});return{'ok':!![],'data':{'total':_0x51897d[_0x504947(0x148)],'items':_0x1d5e83[_0x504947(0x166)](_0x504947(0x11b))?_0x51897d:_0x51897d[_0x504947(0x11f)](summarizeArtifact)}};}},artifactDetail={'service':a8_0x51295c(0x122),'command':a8_0x51295c(0x14e),'description':'Show\x20one\x20Artifact\x20by\x20id','risk':a8_0x51295c(0x151),'flags':[{...ID_FLAG,'description':a8_0x51295c(0x147)}],async 'execute'(_0x3c5cb7){const _0x13b1f0=a8_0x51295c,_0x179771=await getRuntimeArtifact(_0x3c5cb7['num']('id'),_0x3c5cb7[_0x13b1f0(0x162)]);return{'ok':!![],'data':detailArtifact(_0x179771)};}},artifactCreate={'service':a8_0x51295c(0x122),'command':'create','description':a8_0x51295c(0x12f),'risk':a8_0x51295c(0x141),'flags':[FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x108662){const _0x5b43e1=a8_0x51295c,_0x513516=buildArtifactInput(_0x108662),_0x3693f9=await createRuntimeArtifact(_0x108662[_0x5b43e1(0x162)],_0x513516);return{'ok':!![],'data':detailArtifact(_0x3693f9),'message':_0x5b43e1(0x127)+_0x3693f9['id']+(_0x3693f9[_0x5b43e1(0x136)]?'\x20('+_0x3693f9[_0x5b43e1(0x136)]+')':'')};},async 'dryRun'(_0x5b9a82){const _0x58cdaf=a8_0x51295c,_0x323afb=buildArtifactInput(_0x5b9a82);return dryRun(_0x58cdaf(0x138),_0x58cdaf(0x13e))[_0x58cdaf(0x12b)]({'appCode':_0x5b9a82[_0x58cdaf(0x162)],..._0x323afb})[_0x58cdaf(0x146)](_0x58cdaf(0x119))[_0x58cdaf(0x14f)]();}},artifactUpdate={'service':a8_0x51295c(0x122),'command':a8_0x51295c(0x133),'description':a8_0x51295c(0x155),'risk':a8_0x51295c(0x141),'flags':[{...ID_FLAG,'description':a8_0x51295c(0x147)},FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x265f88){const _0x449174=a8_0x51295c,_0x28901a=_0x265f88[_0x449174(0x14b)]('id'),_0x1a4e91=buildArtifactInput(_0x265f88),_0x6f7380=await updateRuntimeArtifact(_0x28901a,_0x265f88[_0x449174(0x162)],_0x1a4e91);return{'ok':!![],'data':detailArtifact(_0x6f7380),'message':_0x449174(0x130)+_0x6f7380['id']+(_0x6f7380[_0x449174(0x136)]?'\x20('+_0x6f7380[_0x449174(0x136)]+')':'')};},async 'dryRun'(_0x401fbe){const _0x4563f9=a8_0x51295c,_0x551e7=_0x401fbe[_0x4563f9(0x14b)]('id'),_0x4313d2=buildArtifactInput(_0x401fbe);return dryRun(_0x4563f9(0x138),_0x4563f9(0x15b)+_0x551e7+_0x4563f9(0x121))['body']({'appCode':_0x401fbe[_0x4563f9(0x162)],..._0x4313d2})['description']('Preview:\x20update\x20react_module\x20Artifact\x20'+_0x551e7)[_0x4563f9(0x14f)]();}};export const artifactDefinitions=[artifactList,artifactDetail,artifactCreate,artifactUpdate];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a9_0x3e31fd=a9_0x206d;(function(_0xf1837f,_0xf0efa6){const _0x1e2bf7=a9_0x206d,_0x53e526=_0xf1837f();while(!![]){try{const _0x5bc1af=parseInt(_0x1e2bf7(0xac))/0x1+-parseInt(_0x1e2bf7(0xda))/0x2*(-parseInt(_0x1e2bf7(0xab))/0x3)+-parseInt(_0x1e2bf7(0xa8))/0x4*(parseInt(_0x1e2bf7(0xaf))/0x5)+-parseInt(_0x1e2bf7(0xd6))/0x6+parseInt(_0x1e2bf7(0xd7))/0x7+-parseInt(_0x1e2bf7(0xc5))/0x8*(parseInt(_0x1e2bf7(0xdf))/0x9)+-parseInt(_0x1e2bf7(0x9f))/0xa*(parseInt(_0x1e2bf7(0x93))/0xb);if(_0x5bc1af===_0xf0efa6)break;else _0x53e526['push'](_0x53e526['shift']());}catch(_0x5a05ad){_0x53e526['push'](_0x53e526['shift']());}}}(a9_0x3fe2,0x901d6));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 _0x4b2948=a9_0x206d;writeCliSideChannelLine(_0x4b2948(0x87)+PRODUCT_CONFIG[_0x4b2948(0xb8)]+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine(_0x4b2948(0xd0)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x4b2948(0xaa));}function a9_0x206d(_0x163aae,_0x4ebaff){_0x163aae=_0x163aae-0x83;const _0x3fe22c=a9_0x3fe2();let _0x206d99=_0x3fe22c[_0x163aae];return _0x206d99;}function buildAccessKeySetupGuide(){const _0x58e06f=a9_0x206d;return[_0x58e06f(0x87)+PRODUCT_CONFIG[_0x58e06f(0xb8)]+':',USER_ACCESS_KEY_CREATE_URL,_0x58e06f(0xd1)+CLI_BIN_NAME+_0x58e06f(0xc8)][_0x58e06f(0x8f)]('\x0a');}function canPromptForAccessKey(_0x1b655d){const _0x1d9d48=a9_0x206d;return!_0x1b655d[_0x1d9d48(0xc1)]&&process[_0x1d9d48(0xb7)]['isTTY']!==![]&&process[_0x1d9d48(0x99)][_0x1d9d48(0xc6)]!==![];}function resolveAuthScopeFlags(_0x5402be){const _0x1b72a3=a9_0x206d;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x5402be[_0x1b72a3(0xb4)](_0x1b72a3(0xd8)),'explicitProject':_0x5402be[_0x1b72a3(0xb4)]('project'),'policy':_0x1b72a3(0x8e)}));}async function resolveAuthWriteInput(_0x43cbf4){const _0x3f10fa=a9_0x206d;let _0x4ea492=(_0x43cbf4[_0x3f10fa(0xa5)]('access-key')||_0x43cbf4[_0x3f10fa(0xa5)]('ak')||'')[_0x3f10fa(0xa6)]();const _0x46ecc8=(_0x43cbf4['str'](_0x3f10fa(0xbb))||'')[_0x3f10fa(0xa6)]();if(!_0x4ea492&&canPromptForAccessKey(_0x43cbf4))try{showAccessKeyCreateHint(),_0x4ea492=await promptAccessKey('');}catch(_0x3b197a){if(isAbortPrompt(_0x3b197a))throw CliErrors[_0x3f10fa(0xa3)]();throw _0x3b197a;}if(!_0x4ea492)throw CliErrors['validation'](_0x3f10fa(0x8c),buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN['test'](_0x4ea492))throw CliErrors[_0x3f10fa(0xc7)](_0x3f10fa(0xc0)+_0x4ea492+'\x22',_0x3f10fa(0x98));if(!_0x46ecc8)return{'accessKey':_0x4ea492};const _0x23cb02=normalizeEnv(_0x46ecc8);return{'accessKey':_0x4ea492,'env':isDaily(_0x23cb02)?_0x3f10fa(0xce):isDev(_0x23cb02)?'development':_0x3f10fa(0xdb)};}function a9_0x3fe2(){const _0xceab5f=['isTTY','validation','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','\x20Verify:\x20','Option\x20B:\x20apps\x20config\x20(','boolean','daily','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','Tip:\x20you\x20can\x20also\x20run:','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','repeat','Auth\x20config\x20reinitialized\x20in\x20','access-key','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','1461402lPpLQb','6338115YieFla','global','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','2wdknos','production','Use\x20`','AccessKey:\x20','Then\x20verify\x20with:\x20','5441427vctYjs','length','ClientAk','Option\x20C:\x20environment\x20variable','\x20config.','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','auth','\x20config.\x20Nothing\x20to\x20clear.','Shorthand\x20for\x20--access-key','push','Missing\x20accessKey.','\x20scope.','global-default','join','read','\x20Current\x20env:\x20','\x20\x20export\x20','198BhfrvJ','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','Option\x20A:\x20','envName','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','stdout','\x20doctor','=ak_xxx','ACCESS_KEY','\x20env\x20var','newConfigFileName','30910DCJDNI','Clear\x20accessKey\x20from\x20config','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','login','cancelled','init','str','trim','yes','124WzzLTN','project','\x20auth\x20login\x20--access-key\x20<ak_xxx>','1865883QVZNMG','55263CENGrW','logout','Clear\x20from\x20global\x20config\x20(default)','14285Ijaqtg','Auth\x20mode:\x20','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','string','AccessKey\x20saved\x20to\x20','bool','Show\x20current\x20authentication\x20status','Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','stdin','userCenterDisplayName','accessKey','status','env','No\x20AccessKey\x20found\x20in\x20','`auth\x20login`\x20does\x20not\x20support\x20--yes.','\x20auth\x20status','AccessKey\x20(ak_xxx...)','Invalid\x20accessKey\x20format:\x20\x22','nonInteractive','Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config','write','\x20(via\x20','8AGULSv'];a9_0x3fe2=function(){return _0xceab5f;};return a9_0x3fe2();}export const authDefinitions=[{'service':a9_0x3e31fd(0x88),'command':a9_0x3e31fd(0xa2),'description':a9_0x3e31fd(0xb6),'risk':a9_0x3e31fd(0xc3),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a9_0x3e31fd(0xd4),'type':a9_0x3e31fd(0xb2),'description':a9_0x3e31fd(0xbf)},{'name':'ak','type':a9_0x3e31fd(0xb2),'description':'Shorthand\x20for\x20--access-key'},{'name':a9_0x3e31fd(0xd8),'type':'boolean','description':'Write\x20to\x20global\x20config\x20(default)','default':!![]},{'name':a9_0x3e31fd(0xa9),'type':a9_0x3e31fd(0xcd),'description':'Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x1cc653){const _0x34e8a9=a9_0x3e31fd;if(_0x1cc653['bool'](_0x34e8a9(0xa7)))throw CliErrors[_0x34e8a9(0xc7)](_0x34e8a9(0xbd),_0x34e8a9(0xdc)+CLI_BIN_NAME+_0x34e8a9(0x94)+CLI_BIN_NAME+_0x34e8a9(0xa1));const _0x4acd8c=(_0x1cc653[_0x34e8a9(0xa5)](_0x34e8a9(0xd4))||_0x1cc653['str']('ak')||'')['trim']();if(!_0x4acd8c&&_0x1cc653[_0x34e8a9(0xc1)])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0x586ec7=await resolveAuthWriteInput(_0x1cc653),_0xd6d41d=resolveAuthScopeFlags(_0x1cc653),_0x2c4b2b=readScopedConfig(_0xd6d41d);_0x2c4b2b['accessKey']=_0x586ec7[_0x34e8a9(0xb9)];_0x586ec7['env']&&(_0x2c4b2b['env']=_0x586ec7[_0x34e8a9(0xbb)]);writeScopedConfig(_0x2c4b2b,_0xd6d41d);const _0x4f2add=_0xd6d41d['global']?_0x34e8a9(0xd8):_0x34e8a9(0xa9),_0x2f2532=_0x2c4b2b['env']?_0x34e8a9(0x91)+_0x2c4b2b[_0x34e8a9(0xbb)]+'.':'';return{'ok':!![],'message':_0x34e8a9(0xb3)+_0x4f2add+_0x34e8a9(0x86)+_0x2f2532+_0x34e8a9(0xcb)+CLI_BIN_NAME+'\x20auth\x20status'};}},{'service':a9_0x3e31fd(0x88),'command':a9_0x3e31fd(0xa4),'description':'Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a9_0x3e31fd(0xd4),'type':'string','description':a9_0x3e31fd(0xbf)},{'name':'ak','type':a9_0x3e31fd(0xb2),'description':a9_0x3e31fd(0x8a)},{'name':a9_0x3e31fd(0xbb),'type':a9_0x3e31fd(0xb2),'description':a9_0x3e31fd(0xc2)},{'name':a9_0x3e31fd(0xd8),'type':a9_0x3e31fd(0xcd),'description':'Write\x20to\x20global\x20config\x20(default)','default':!![]},{'name':a9_0x3e31fd(0xa9),'type':a9_0x3e31fd(0xcd),'description':'Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x392a82){const _0x4e67ad=a9_0x3e31fd,_0x2eb214=await resolveAuthWriteInput(_0x392a82),_0x27c3da=resolveAuthScopeFlags(_0x392a82),_0x32b24c={'accessKey':_0x2eb214[_0x4e67ad(0xb9)]};_0x2eb214[_0x4e67ad(0xbb)]&&(_0x32b24c[_0x4e67ad(0xbb)]=_0x2eb214[_0x4e67ad(0xbb)]);writeScopedConfig(_0x32b24c,_0x27c3da);const _0x5d62a4=_0x27c3da['global']?_0x4e67ad(0xd8):_0x4e67ad(0xa9),_0x27e271=_0x32b24c[_0x4e67ad(0xbb)]?_0x4e67ad(0x91)+_0x32b24c[_0x4e67ad(0xbb)]+'.':'';return{'ok':!![],'message':_0x4e67ad(0xd3)+_0x5d62a4+_0x4e67ad(0x8d)+_0x27e271+_0x4e67ad(0xcb)+CLI_BIN_NAME+_0x4e67ad(0xbe)};}},{'service':a9_0x3e31fd(0x88),'command':a9_0x3e31fd(0xad),'description':a9_0x3e31fd(0xa0),'risk':a9_0x3e31fd(0xc3),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'global','type':a9_0x3e31fd(0xcd),'description':a9_0x3e31fd(0xae),'default':!![]},{'name':'project','type':a9_0x3e31fd(0xcd),'description':a9_0x3e31fd(0x97),'default':![]}],async 'execute'(_0x4e2d11){const _0x38b742=a9_0x3e31fd,_0x37ff8b=resolveAuthScopeFlags(_0x4e2d11),_0x3a1ab9=readScopedConfig(_0x37ff8b),_0x43147b=!!_0x3a1ab9[_0x38b742(0xb9)];delete _0x3a1ab9[_0x38b742(0xb9)],writeScopedConfig(_0x3a1ab9,_0x37ff8b);const _0x130883=_0x37ff8b[_0x38b742(0xd8)]?_0x38b742(0xd8):_0x38b742(0xa9);if(_0x43147b)return{'ok':!![],'message':'AccessKey\x20cleared\x20from\x20'+_0x130883+_0x38b742(0x86)};return{'ok':!![],'message':_0x38b742(0xbc)+_0x130883+_0x38b742(0x89)};}},{'service':a9_0x3e31fd(0x88),'command':a9_0x3e31fd(0xba),'description':a9_0x3e31fd(0xb5),'risk':a9_0x3e31fd(0x90),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a9_0x3e31fd(0xd8),'type':'boolean','description':'Read\x20from\x20global\x20config\x20(default)','default':!![]},{'name':a9_0x3e31fd(0xa9),'type':'boolean','description':a9_0x3e31fd(0xb1),'default':![]}],async 'execute'(_0x2ee03d){const _0x211688=a9_0x3e31fd,_0x12ae04=resolveAuthScopeFlags(_0x2ee03d),_0x3e965d=readScopedConfig(_0x12ae04),_0x55a299=productEnvName(_0x211688(0x9c)),_0x337827=productEnv(_0x211688(0x9c))||undefined,_0x47f75e=_0x3e965d[_0x211688(0xb9)]||undefined,_0x24ad51=_0x337827||_0x47f75e,_0x3250b9=_0x337827?_0x55a299+_0x211688(0x9d):_0x47f75e?(_0x12ae04['global']?_0x211688(0xd8):_0x211688(0xa9))+'\x20config':null,_0xad1c96=[_0x211688(0xb0)+AUTH_MODE[_0x211688(0x84)]];if(_0x24ad51){const _0x46c489=_0x24ad51[_0x211688(0x83)]>0x8?''+_0x24ad51['slice'](0x0,0x8)+'*'[_0x211688(0xd2)](_0x24ad51[_0x211688(0x83)]-0x8):_0x24ad51;_0xad1c96[_0x211688(0x8b)](_0x211688(0xdd)+_0x46c489+(_0x3250b9?_0x211688(0xc4)+_0x3250b9+')':''));}return!_0x24ad51&&(_0xad1c96[_0x211688(0x8b)](''),_0xad1c96[_0x211688(0x8b)](_0x211688(0xcf)),_0xad1c96[_0x211688(0x8b)](''),_0xad1c96[_0x211688(0x8b)](_0x211688(0x95)+CLI_BIN_NAME+_0x211688(0xd5)),_0xad1c96['push'](''),_0xad1c96[_0x211688(0x8b)](_0x211688(0xcc)+PRODUCT_CONFIG[_0x211688(0x9e)]+')'),_0xad1c96[_0x211688(0x8b)](_0x211688(0xc9)),_0xad1c96['push'](''),_0xad1c96[_0x211688(0x8b)](_0x211688(0x85)),_0xad1c96[_0x211688(0x8b)](_0x211688(0x92)+_0x55a299+_0x211688(0x9b)),_0xad1c96[_0x211688(0x8b)](''),_0xad1c96[_0x211688(0x8b)](_0x211688(0xde)+CLI_BIN_NAME+'\x20auth\x20status'),_0xad1c96['push'](_0x211688(0xca)+CLI_BIN_NAME+_0x211688(0x9a))),{'ok':!![],'message':_0xad1c96[_0x211688(0x8f)]('\x0a')};}},{'service':a9_0x3e31fd(0x88),'command':'info','description':a9_0x3e31fd(0xd9),'risk':a9_0x3e31fd(0x90),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x4f4d3b){const _0xe4663e=a9_0x3e31fd,_0x14392d=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x14392d,'meta':{'env':_0x4f4d3b[_0xe4663e(0x96)]??_0xe4663e(0xdb)}}};}}];
|
|
1
|
+
const a9_0x4ae2b1=a9_0x1c95;(function(_0x185bd4,_0x5bc23f){const _0xd965a=a9_0x1c95,_0xee4516=_0x185bd4();while(!![]){try{const _0x4614ef=-parseInt(_0xd965a(0xd6))/0x1*(parseInt(_0xd965a(0xd8))/0x2)+parseInt(_0xd965a(0x125))/0x3+parseInt(_0xd965a(0xfc))/0x4*(-parseInt(_0xd965a(0xe6))/0x5)+-parseInt(_0xd965a(0xed))/0x6*(-parseInt(_0xd965a(0x100))/0x7)+parseInt(_0xd965a(0xe2))/0x8*(parseInt(_0xd965a(0xe5))/0x9)+-parseInt(_0xd965a(0xe4))/0xa*(-parseInt(_0xd965a(0xeb))/0xb)+-parseInt(_0xd965a(0x11b))/0xc;if(_0x4614ef===_0x5bc23f)break;else _0xee4516['push'](_0xee4516['shift']());}catch(_0x4bb479){_0xee4516['push'](_0xee4516['shift']());}}}(a9_0xae96,0x3b713));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 a9_0x1c95(_0x4e2672,_0x8ddb5b){_0x4e2672=_0x4e2672-0xd4;const _0xae9606=a9_0xae96();let _0x1c9574=_0xae9606[_0x4e2672];return _0x1c9574;}function showAccessKeyCreateHint(){const _0x18a4a5=a9_0x1c95;writeCliSideChannelLine(_0x18a4a5(0xf5)+PRODUCT_CONFIG[_0x18a4a5(0x126)]+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine(_0x18a4a5(0xdc)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x18a4a5(0x10b));}function buildAccessKeySetupGuide(){const _0x3b8652=a9_0x1c95;return[_0x3b8652(0xf5)+PRODUCT_CONFIG[_0x3b8652(0x126)]+':',USER_ACCESS_KEY_CREATE_URL,_0x3b8652(0xe9)+CLI_BIN_NAME+_0x3b8652(0xda)]['join']('\x0a');}function canPromptForAccessKey(_0x3b91ff){const _0x49d486=a9_0x1c95;return!_0x3b91ff[_0x49d486(0x12d)]&&process[_0x49d486(0x11c)][_0x49d486(0xd4)]!==![]&&process['stdout'][_0x49d486(0xd4)]!==![];}function resolveAuthScopeFlags(_0x1cee32){const _0x54376a=a9_0x1c95;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x1cee32['bool']('global'),'explicitProject':_0x1cee32[_0x54376a(0x117)](_0x54376a(0x116)),'policy':_0x54376a(0xf0)}));}async function resolveAuthWriteInput(_0x23a5ac){const _0xf01fb9=a9_0x1c95;let _0x251f89=(_0x23a5ac['str'](_0xf01fb9(0xdb))||_0x23a5ac[_0xf01fb9(0xfa)]('ak')||'')['trim']();const _0x316503=(_0x23a5ac['str']('env')||'')[_0xf01fb9(0xd7)]();if(!_0x251f89&&canPromptForAccessKey(_0x23a5ac))try{showAccessKeyCreateHint(),_0x251f89=await promptAccessKey('');}catch(_0x267893){if(isAbortPrompt(_0x267893))throw CliErrors['cancelled']();throw _0x267893;}if(!_0x251f89)throw CliErrors[_0xf01fb9(0xee)](_0xf01fb9(0x11e),buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN[_0xf01fb9(0x11f)](_0x251f89))throw CliErrors[_0xf01fb9(0xee)](_0xf01fb9(0x12a)+_0x251f89+'\x22',_0xf01fb9(0xf4));if(!_0x316503)return{'accessKey':_0x251f89};const _0x40ee50=normalizeEnv(_0x316503);return{'accessKey':_0x251f89,'env':isDaily(_0x40ee50)?_0xf01fb9(0xfb):isDev(_0x40ee50)?'development':'production'};}export const authDefinitions=[{'service':a9_0x4ae2b1(0x110),'command':a9_0x4ae2b1(0x10d),'description':a9_0x4ae2b1(0x113),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a9_0x4ae2b1(0xdb),'type':a9_0x4ae2b1(0x121),'description':a9_0x4ae2b1(0xf8)},{'name':'ak','type':a9_0x4ae2b1(0x121),'description':a9_0x4ae2b1(0x115)},{'name':'global','type':a9_0x4ae2b1(0x10e),'description':a9_0x4ae2b1(0xe1),'default':!![]},{'name':a9_0x4ae2b1(0x116),'type':a9_0x4ae2b1(0x10e),'description':a9_0x4ae2b1(0x12c),'default':![]}],async 'execute'(_0x44e84d){const _0x51f771=a9_0x4ae2b1;if(_0x44e84d[_0x51f771(0x117)]('yes'))throw CliErrors['validation'](_0x51f771(0x109),_0x51f771(0xff)+CLI_BIN_NAME+_0x51f771(0xf9)+CLI_BIN_NAME+'\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.');const _0x16ee74=(_0x44e84d[_0x51f771(0xfa)](_0x51f771(0xdb))||_0x44e84d[_0x51f771(0xfa)]('ak')||'')['trim']();if(!_0x16ee74&&_0x44e84d[_0x51f771(0x12d)])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0x414eda=await resolveAuthWriteInput(_0x44e84d),_0x551894=resolveAuthScopeFlags(_0x44e84d),_0x5b3b41=readScopedConfig(_0x551894);_0x5b3b41[_0x51f771(0x122)]=_0x414eda['accessKey'];_0x414eda[_0x51f771(0xe7)]&&(_0x5b3b41[_0x51f771(0xe7)]=_0x414eda[_0x51f771(0xe7)]);writeScopedConfig(_0x5b3b41,_0x551894);const _0x349d51=_0x551894[_0x51f771(0x118)]?'global':'project',_0x2faf69=_0x5b3b41[_0x51f771(0xe7)]?_0x51f771(0x123)+_0x5b3b41[_0x51f771(0xe7)]+'.':'';return{'ok':!![],'message':_0x51f771(0xef)+_0x349d51+_0x51f771(0x101)+_0x2faf69+_0x51f771(0x105)+CLI_BIN_NAME+'\x20auth\x20status'};}},{'service':a9_0x4ae2b1(0x110),'command':a9_0x4ae2b1(0xe0),'description':a9_0x4ae2b1(0x112),'risk':a9_0x4ae2b1(0xe8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a9_0x4ae2b1(0xdb),'type':a9_0x4ae2b1(0x121),'description':a9_0x4ae2b1(0xf8)},{'name':'ak','type':a9_0x4ae2b1(0x121),'description':a9_0x4ae2b1(0x115)},{'name':'env','type':a9_0x4ae2b1(0x121),'description':a9_0x4ae2b1(0x119)},{'name':a9_0x4ae2b1(0x118),'type':a9_0x4ae2b1(0x10e),'description':a9_0x4ae2b1(0xe1),'default':!![]},{'name':a9_0x4ae2b1(0x116),'type':a9_0x4ae2b1(0x10e),'description':a9_0x4ae2b1(0x12c),'default':![]}],async 'execute'(_0x5d7666){const _0x2aa2ab=a9_0x4ae2b1,_0x114f7f=await resolveAuthWriteInput(_0x5d7666),_0x57eebc=resolveAuthScopeFlags(_0x5d7666),_0x5cdb46={'accessKey':_0x114f7f[_0x2aa2ab(0x122)]};_0x114f7f[_0x2aa2ab(0xe7)]&&(_0x5cdb46['env']=_0x114f7f[_0x2aa2ab(0xe7)]);writeScopedConfig(_0x5cdb46,_0x57eebc);const _0x1e704c=_0x57eebc[_0x2aa2ab(0x118)]?_0x2aa2ab(0x118):_0x2aa2ab(0x116),_0x1c76d1=_0x5cdb46['env']?_0x2aa2ab(0x123)+_0x5cdb46[_0x2aa2ab(0xe7)]+'.':'';return{'ok':!![],'message':_0x2aa2ab(0x120)+_0x1e704c+_0x2aa2ab(0xdd)+_0x1c76d1+_0x2aa2ab(0x105)+CLI_BIN_NAME+_0x2aa2ab(0x106)};}},{'service':a9_0x4ae2b1(0x110),'command':a9_0x4ae2b1(0x127),'description':'Clear\x20accessKey\x20from\x20config','risk':a9_0x4ae2b1(0xe8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a9_0x4ae2b1(0x118),'type':a9_0x4ae2b1(0x10e),'description':'Clear\x20from\x20global\x20config\x20(default)','default':!![]},{'name':a9_0x4ae2b1(0x116),'type':a9_0x4ae2b1(0x10e),'description':a9_0x4ae2b1(0xd9),'default':![]}],async 'execute'(_0x497d5e){const _0x5dc7df=a9_0x4ae2b1,_0x141586=resolveAuthScopeFlags(_0x497d5e),_0x149420=readScopedConfig(_0x141586),_0x262b8f=!!_0x149420[_0x5dc7df(0x122)];delete _0x149420[_0x5dc7df(0x122)],writeScopedConfig(_0x149420,_0x141586);const _0x482e2e=_0x141586[_0x5dc7df(0x118)]?_0x5dc7df(0x118):_0x5dc7df(0x116);if(_0x262b8f)return{'ok':!![],'message':_0x5dc7df(0x102)+_0x482e2e+_0x5dc7df(0x101)};return{'ok':!![],'message':_0x5dc7df(0x11a)+_0x482e2e+_0x5dc7df(0xec)};}},{'service':a9_0x4ae2b1(0x110),'command':a9_0x4ae2b1(0x107),'description':a9_0x4ae2b1(0x128),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a9_0x4ae2b1(0x118),'type':'boolean','description':a9_0x4ae2b1(0xf1),'default':!![]},{'name':'project','type':'boolean','description':'Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x14fb46){const _0x297450=a9_0x4ae2b1,_0x1cad7c=resolveAuthScopeFlags(_0x14fb46),_0x5bcfef=readScopedConfig(_0x1cad7c),_0x233a64=productEnvName('ACCESS_KEY'),_0x5aaeca=productEnv(_0x297450(0xdf))||undefined,_0x115e51=_0x5bcfef[_0x297450(0x122)]||undefined,_0xf8fbe7=_0x5aaeca||_0x115e51,_0x2522a4=_0x5aaeca?_0x233a64+'\x20env\x20var':_0x115e51?(_0x1cad7c['global']?_0x297450(0x118):_0x297450(0x116))+_0x297450(0xea):null,_0x583aa4=[_0x297450(0xfd)+AUTH_MODE[_0x297450(0x124)]];if(_0xf8fbe7){const _0xaf9a83=_0xf8fbe7[_0x297450(0xf6)]>0x8?''+_0xf8fbe7[_0x297450(0x10a)](0x0,0x8)+'*'[_0x297450(0xf7)](_0xf8fbe7[_0x297450(0xf6)]-0x8):_0xf8fbe7;_0x583aa4['push'](_0x297450(0x114)+_0xaf9a83+(_0x2522a4?_0x297450(0x11d)+_0x2522a4+')':''));}return!_0xf8fbe7&&(_0x583aa4[_0x297450(0xd5)](''),_0x583aa4[_0x297450(0xd5)]('No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:'),_0x583aa4[_0x297450(0xd5)](''),_0x583aa4[_0x297450(0xd5)](_0x297450(0x129)+CLI_BIN_NAME+_0x297450(0x10c)),_0x583aa4[_0x297450(0xd5)](''),_0x583aa4[_0x297450(0xd5)](_0x297450(0x103)+PRODUCT_CONFIG[_0x297450(0x111)]+')'),_0x583aa4['push'](_0x297450(0xde)),_0x583aa4[_0x297450(0xd5)](''),_0x583aa4[_0x297450(0xd5)](_0x297450(0xfe)),_0x583aa4[_0x297450(0xd5)](_0x297450(0x108)+_0x233a64+_0x297450(0xf3)),_0x583aa4[_0x297450(0xd5)](''),_0x583aa4[_0x297450(0xd5)](_0x297450(0xf2)+CLI_BIN_NAME+'\x20auth\x20status'),_0x583aa4[_0x297450(0xd5)](_0x297450(0x10f)+CLI_BIN_NAME+'\x20doctor')),{'ok':!![],'message':_0x583aa4[_0x297450(0x12b)]('\x0a')};}},{'service':a9_0x4ae2b1(0x110),'command':'info','description':'Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','risk':'read','requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x2ed5ab){const _0x428013=a9_0x4ae2b1,_0x1e0e12=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x1e0e12,'meta':{'env':_0x2ed5ab[_0x428013(0xe3)]??_0x428013(0x104)}}};}}];function a9_0xae96(){const _0x202417=['auth','newConfigFileName','Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','AccessKey:\x20','Shorthand\x20for\x20--access-key','project','bool','global','Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config','No\x20AccessKey\x20found\x20in\x20','5705460pDanSl','stdin','\x20(via\x20','Missing\x20accessKey.','test','Auth\x20config\x20reinitialized\x20in\x20','string','accessKey','\x20Current\x20env:\x20','ClientAk','1358436VfzxHz','userCenterDisplayName','logout','Show\x20current\x20authentication\x20status','Option\x20A:\x20','Invalid\x20accessKey\x20format:\x20\x22','join','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','nonInteractive','isTTY','push','201573szDfTS','trim','4uJisJg','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','access-key','Tip:\x20you\x20can\x20also\x20run:','\x20scope.','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','ACCESS_KEY','init','Write\x20to\x20global\x20config\x20(default)','34792nkwVun','envName','3822240dxxefa','990pEOago','30tTYsvc','env','write','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','\x20config','11XOZIdh','\x20config.\x20Nothing\x20to\x20clear.','1350156SJqFoT','validation','AccessKey\x20saved\x20to\x20','global-default','Read\x20from\x20global\x20config\x20(default)','Then\x20verify\x20with:\x20','=ak_xxx','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','length','repeat','AccessKey\x20(ak_xxx...)','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','str','daily','277584KhfcVM','Auth\x20mode:\x20','Option\x20C:\x20environment\x20variable','Use\x20`','7MQwJEK','\x20config.','AccessKey\x20cleared\x20from\x20','Option\x20B:\x20apps\x20config\x20(','production','\x20Verify:\x20','\x20auth\x20status','status','\x20\x20export\x20','`auth\x20login`\x20does\x20not\x20support\x20--yes.','slice','\x20auth\x20login\x20--access-key\x20<ak_xxx>','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','login','boolean','If\x20command\x20execution\x20still\x20fails,\x20run:\x20'];a9_0xae96=function(){return _0x202417;};return a9_0xae96();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5162a7,_0xb3d25f){const _0x19a105=a10_0x1079,_0x5f4c74=_0x5162a7();while(!![]){try{const _0xbaabff=parseInt(_0x19a105(0xd4))/0x1+-parseInt(_0x19a105(0xce))/0x2*(parseInt(_0x19a105(0xc7))/0x3)+-parseInt(_0x19a105(0xbe))/0x4*(parseInt(_0x19a105(0xc9))/0x5)+parseInt(_0x19a105(0xbd))/0x6+parseInt(_0x19a105(0xc0))/0x7*(parseInt(_0x19a105(0xc2))/0x8)+-parseInt(_0x19a105(0xbf))/0x9+-parseInt(_0x19a105(0xd0))/0xa*(parseInt(_0x19a105(0xcb))/0xb);if(_0xbaabff===_0xb3d25f)break;else _0x5f4c74['push'](_0x5f4c74['shift']());}catch(_0x5a7efd){_0x5f4c74['push'](_0x5f4c74['shift']());}}}(a10_0xf500,0x8a188));import{createInterface}from'node:readline';class AbortPrompt extends Error{constructor(){const _0x172630=a10_0x1079;super(_0x172630(0xcc)),this['name']=_0x172630(0xc8);}}function createSafeRl(){const _0x1cf7fa=a10_0x1079,_0x49ac97=createInterface({'input':process[_0x1cf7fa(0xc1)],'output':process['stdout']});let _0x34432c;const _0x164e60=new Promise((_0x58667b,_0x147fd8)=>{const _0x1f3dd8=_0x1cf7fa;_0x34432c=()=>{const _0x2e202f=a10_0x1079;_0x34432c&&(_0x49ac97[_0x2e202f(0xca)](_0x2e202f(0xd2),_0x34432c),_0x34432c=undefined);try{_0x49ac97['close']();}catch{}_0x147fd8(new AbortPrompt());},_0x49ac97[_0x1f3dd8(0xc4)](_0x1f3dd8(0xd2),_0x34432c);}),_0x278b5f=()=>{const _0x4f0e19=_0x1cf7fa;_0x34432c&&(_0x49ac97[_0x4f0e19(0xca)](_0x4f0e19(0xd2),_0x34432c),_0x34432c=undefined);try{_0x49ac97[_0x4f0e19(0xc5)]();}catch{}};return{'rl':_0x49ac97,'abortPromise':_0x164e60,'disposeSuccess':_0x278b5f};}function a10_0x1079(_0x437474,_0x206273){_0x437474=_0x437474-0xbd;const _0xf50060=a10_0xf500();let _0x10794b=_0xf50060[_0x437474];return _0x10794b;}function a10_0xf500(){const _0x13a3b3=['238024sQCiGR','AccessKey\x20(paste\x20ak_...):\x20','once','close','name','123OmRoaY','AbortPrompt','4200535Thufvv','removeListener','344377gttEyX','User\x20aborted\x20prompt','trim','25512NSmcqQ','):\x20','10tSThtz','race','SIGINT','AccessKey\x20(','576159CcJiaS','6225762rfteof','4tIiGyk','1435833DlGmNX','119YhPpTK','stdin'];a10_0xf500=function(){return _0x13a3b3;};return a10_0xf500();}export async function promptAccessKey(_0x153ebc=''){const _0x5bd6c8=a10_0x1079,{rl:_0x241477,abortPromise:_0x8a765b,disposeSuccess:_0x5caa70}=createSafeRl(),_0x115f45=new Promise(_0xbe6606=>{const _0xcf7b81=a10_0x1079,_0x253145=_0x153ebc?_0xcf7b81(0xd3)+_0x153ebc+_0xcf7b81(0xcf):_0xcf7b81(0xc3);_0x241477['question'](_0x253145,_0x47fec7=>{const _0x522713=_0xcf7b81;_0x5caa70(),_0xbe6606(_0x47fec7[_0x522713(0xcd)]()||_0x153ebc);});});return Promise[_0x5bd6c8(0xd1)]([_0x115f45,_0x8a765b]);}export function isAbortPrompt(_0x2bb5ce){const _0x2b9844=a10_0x1079;return _0x2bb5ce instanceof Error&&_0x2bb5ce[_0x2b9844(0xc6)]===_0x2b9844(0xc8);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a11_0x4868e4=a11_0x1cd9;(function(_0xb01a67,_0x46705d){const _0x3445e8=a11_0x1cd9,_0x494132=_0xb01a67();while(!![]){try{const _0x3cb169=parseInt(_0x3445e8(0x71))/0x1*(parseInt(_0x3445e8(0x7d))/0x2)+parseInt(_0x3445e8(0x7c))/0x3*(-parseInt(_0x3445e8(0x70))/0x4)+-parseInt(_0x3445e8(0x7f))/0x5*(-parseInt(_0x3445e8(0x75))/0x6)+-parseInt(_0x3445e8(0x78))/0x7+parseInt(_0x3445e8(0x7a))/0x8+parseInt(_0x3445e8(0x6d))/0x9*(-parseInt(_0x3445e8(0x82))/0xa)+parseInt(_0x3445e8(0x7e))/0xb*(parseInt(_0x3445e8(0x83))/0xc);if(_0x3cb169===_0x46705d)break;else _0x494132['push'](_0x494132['shift']());}catch(_0x21b232){_0x494132['push'](_0x494132['shift']());}}}(a11_0x111b,0x9a593));function a11_0x111b(){const _0x33c226=['Get\x20BFF\x20script\x20details\x20by\x20ID','3qakbYA','2PaXDeE','96525PKMELc','805mORvuZ','(none)','num','290uxCHGe','3396PeTmNE','functionName','description','348255syfUPg','appCode','bff','3981284QTohIs','98011pxssvs','bool','Script\x20ID','verbose','9468BrRNBK','scriptType','read','5006505QEfDpQ','detail','5036064kZzwLQ'];a11_0x111b=function(){return _0x33c226;};return a11_0x111b();}import{getBffScriptInfo}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';function a11_0x1cd9(_0xbc325e,_0x41d002){_0xbc325e=_0xbc325e-0x6b;const _0x111b9f=a11_0x111b();let _0x1cd99d=_0x111b9f[_0xbc325e];return _0x1cd99d;}export const bffDetail={'service':a11_0x4868e4(0x6f),'command':a11_0x4868e4(0x79),'description':a11_0x4868e4(0x7b),'risk':a11_0x4868e4(0x77),'flags':[{...ID_FLAG,'description':a11_0x4868e4(0x73)},VERBOSE_FLAG],async 'execute'(_0x304ec4){const _0x193384=a11_0x4868e4,_0x2ede4a=await getBffScriptInfo(_0x304ec4[_0x193384(0x81)]('id')),_0x204ebd=_0x304ec4[_0x193384(0x72)](_0x193384(0x74));if(_0x204ebd)return{'ok':!![],'data':_0x2ede4a};return{'ok':!![],'data':{'id':_0x2ede4a['id'],'appCode':_0x2ede4a[_0x193384(0x6e)],'functionName':_0x2ede4a[_0x193384(0x6b)]??'','scriptType':_0x2ede4a[_0x193384(0x76)],'description':_0x2ede4a[_0x193384(0x6c)]||_0x193384(0x80),'createdTime':_0x2ede4a['createdTime']??'','updatedTime':_0x2ede4a['updatedTime']??''}};}};
|
package/lib/commands/bff/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a12_0x5e3937=a12_0xa625;function a12_0x6d66(){const _0x1a62bf=['25FtwImM','2211741JoqqhZ','356422fZJIgn','exec','18708KwnpuP','6673736UumNzn','994964bGGQfR','str','name','81kznGSY','7216212IdAwCh','90140ltdkeL','now','318MwocZf'];a12_0x6d66=function(){return _0x1a62bf;};return a12_0x6d66();}(function(_0x67ea90,_0x4031a8){const _0x2bbc26=a12_0xa625,_0x3c9696=_0x67ea90();while(!![]){try{const _0x3881d1=parseInt(_0x2bbc26(0x152))/0x1+-parseInt(_0x2bbc26(0x14f))/0x2*(parseInt(_0x2bbc26(0x154))/0x3)+-parseInt(_0x2bbc26(0x148))/0x4*(-parseInt(_0x2bbc26(0x150))/0x5)+-parseInt(_0x2bbc26(0x14c))/0x6+parseInt(_0x2bbc26(0x151))/0x7+parseInt(_0x2bbc26(0x155))/0x8+parseInt(_0x2bbc26(0x14b))/0x9*(parseInt(_0x2bbc26(0x14d))/0xa);if(_0x3881d1===_0x4031a8)break;else _0x3c9696['push'](_0x3c9696['shift']());}catch(_0x39b19d){_0x3c9696['push'](_0x3c9696['shift']());}}}(a12_0x6d66,0x9b917));function a12_0xa625(_0x432662,_0x16509f){_0x432662=_0x432662-0x148;const _0x6d6620=a12_0x6d66();let _0xa625cc=_0x6d6620[_0x432662];return _0xa625cc;}import{executeSdkBff}from'../../core/sdk-client.js';import{parseJsonParams}from'../../utils/params.js';import{NAME_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';export const bffExec={'service':'bff','command':a12_0x5e3937(0x153),'description':'Execute\x20a\x20BFF\x20script\x20by\x20function\x20name','risk':'read','flags':[{...NAME_FLAG,'required':!![],'description':'BFF\x20function\x20name\x20to\x20execute'},PARAMS_FLAG],async 'execute'(_0x454e19){const _0x54e556=a12_0x5e3937,_0x196999=parseJsonParams(_0x454e19[_0x54e556(0x149)]('params')),_0x37cf2a=Date['now'](),_0x116d7a=await executeSdkBff(_0x454e19['str'](_0x54e556(0x14a)),_0x196999),_0xe8de3a=Date[_0x54e556(0x14e)]()-_0x37cf2a;return{'ok':!![],'data':{'result':_0x116d7a,'elapsed':_0xe8de3a},'message':'BFF\x20executed\x20in\x20'+_0xe8de3a+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a13_0x38cc(_0x55dd00,_0x1d8e15){_0x55dd00=_0x55dd00-0x65;const _0x53b6ee=a13_0x53b6();let _0x38ccc8=_0x53b6ee[_0x55dd00];return _0x38ccc8;}(function(_0x3c3807,_0x285a8f){const _0x3c647a=a13_0x38cc,_0x13e44c=_0x3c3807();while(!![]){try{const _0x349dd1=parseInt(_0x3c647a(0x66))/0x1+parseInt(_0x3c647a(0x6c))/0x2+parseInt(_0x3c647a(0x69))/0x3*(parseInt(_0x3c647a(0x6b))/0x4)+parseInt(_0x3c647a(0x6a))/0x5+-parseInt(_0x3c647a(0x65))/0x6+-parseInt(_0x3c647a(0x6d))/0x7+parseInt(_0x3c647a(0x67))/0x8*(-parseInt(_0x3c647a(0x68))/0x9);if(_0x349dd1===_0x285a8f)break;else _0x13e44c['push'](_0x13e44c['shift']());}catch(_0x3ccf09){_0x13e44c['push'](_0x13e44c['shift']());}}}(a13_0x53b6,0x7509a));import{bffDetail}from'../../commands/bff/detail.js';function a13_0x53b6(){const _0x26ecb0=['776HshAzy','1557dJYWzk','3HHgGzo','3172240BdWyqU','819276ZCiWZb','946072cEdqqY','5980184dSbCYo','3566070jmqUiW','632521tzaJdj'];a13_0x53b6=function(){return _0x26ecb0;};return a13_0x53b6();}import{bffExec}from'../../commands/bff/exec.js';export const bffDefinitions=[bffDetail,bffExec];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a14_0x31e9c6=a14_0x4da0;(function(_0x753c23,_0x3c4199){const _0x17b2e4=a14_0x4da0,_0xfbdac7=_0x753c23();while(!![]){try{const _0x3b17f6=parseInt(_0x17b2e4(0x139))/0x1*(-parseInt(_0x17b2e4(0x142))/0x2)+parseInt(_0x17b2e4(0x126))/0x3*(parseInt(_0x17b2e4(0x127))/0x4)+-parseInt(_0x17b2e4(0x141))/0x5+-parseInt(_0x17b2e4(0x134))/0x6+parseInt(_0x17b2e4(0x13d))/0x7+-parseInt(_0x17b2e4(0x12e))/0x8*(-parseInt(_0x17b2e4(0x136))/0x9)+parseInt(_0x17b2e4(0x138))/0xa*(parseInt(_0x17b2e4(0x13a))/0xb);if(_0x3b17f6===_0x3c4199)break;else _0xfbdac7['push'](_0xfbdac7['shift']());}catch(_0x4a8d90){_0xfbdac7['push'](_0xfbdac7['shift']());}}}(a14_0x46f7,0xab390));import{CliErrors}from'../../errors.js';import{logger}from'../../utils/logger.js';function a14_0x46f7(){const _0x40a423=['install','skipped','log','../../skills/npx-skills-add.js','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20(npx\x20skills\x20add\x20','nonInteractive','248GrhuLz','Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20npx\x20skills\x20add\x20','\x20-g\x20-y','\x20-g\x20-y)...','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.','CLI\x20Built-in\x20Skill\x20installed','2253996sCFwHJ','cwd','350937bmsiVT','error','100rdBEEI','66517UfqqIy','261470uByBOq','Install\x20the\x20CLI\x20Built-in\x20Skill\x20required\x20by\x20Lovrabet\x20runtime','pipe','1273566nYamKg','info','inherit','apiError','3803615KcZBfJ','14Pyycml','1041tiVHpj','7780GiIJIG'];a14_0x46f7=function(){return _0x40a423;};return a14_0x46f7();}function a14_0x4da0(_0x1d8a8b,_0x269286){_0x1d8a8b=_0x1d8a8b-0x126;const _0x46f7d0=a14_0x46f7();let _0x4da068=_0x46f7d0[_0x1d8a8b];return _0x4da068;}export const cliSkillDefinitions=[{'service':'cli-skill','command':a14_0x31e9c6(0x128),'description':a14_0x31e9c6(0x13b),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x3f86e2){const _0xc952a5=a14_0x31e9c6;logger['setLogPath'](process[_0xc952a5(0x135)]()),logger[_0xc952a5(0x13e)]('cli-skill-install',_0xc952a5(0x132));const {LOVRABET_SKILL_SOURCE:_0x510bb3,LOVRABET_SKIP_NPX_SKILLS_ENV:_0x95f15c,runNpxSkillsAddGlobal:_0x22723e}=await import(_0xc952a5(0x12b)),_0x3542e6=_0x3f86e2[_0xc952a5(0x12d)]?_0xc952a5(0x13c):_0xc952a5(0x13f);console[_0xc952a5(0x12a)](_0xc952a5(0x12c)+_0x510bb3+_0xc952a5(0x131));const _0x4ffb2e=_0x22723e(process['cwd'](),_0x510bb3,{'stdio':_0x3542e6});if(_0x4ffb2e[_0xc952a5(0x129)])console[_0xc952a5(0x12a)]('Skipped\x20npx\x20('+_0x95f15c+'=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.');else{if(_0x4ffb2e['ok'])console[_0xc952a5(0x12a)](_0xc952a5(0x133));else throw CliErrors[_0xc952a5(0x140)]('npx\x20skills\x20add\x20failed:\x20'+(_0x4ffb2e[_0xc952a5(0x137)]||'unknown'),_0xc952a5(0x12f)+_0x510bb3+_0xc952a5(0x130));}return{'ok':!![]};}}];
|