@lovrabet/lovrabet-cli 2.1.0 → 2.1.1-beta.1
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/index.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.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_0x15308d=a0_0x1cdb;(function(_0x56a307,_0x121148){const _0x13f78e=a0_0x1cdb,_0x303387=_0x56a307();while(!![]){try{const _0x35a922=-parseInt(_0x13f78e(0x1c9))/0x1+parseInt(_0x13f78e(0x1c6))/0x2*(-parseInt(_0x13f78e(0x1d0))/0x3)+-parseInt(_0x13f78e(0x1d5))/0x4+parseInt(_0x13f78e(0x1ad))/0x5+parseInt(_0x13f78e(0x1ca))/0x6*(-parseInt(_0x13f78e(0x1bd))/0x7)+parseInt(_0x13f78e(0x1b0))/0x8*(parseInt(_0x13f78e(0x1c2))/0x9)+parseInt(_0x13f78e(0x1c0))/0xa*(parseInt(_0x13f78e(0x1b4))/0xb);if(_0x35a922===_0x121148)break;else _0x303387['push'](_0x303387['shift']());}catch(_0x553b62){_0x303387['push'](_0x303387['shift']());}}}(a0_0x2937,0xd81fb));import{jsx as a0_0x2d869d}from'react/jsx-runtime';import a0_0x56881e 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';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_0x56881e(helpText,{'importMeta':import.meta,'flags':buildMeowFlags(),'version':getCliVersionDisplay()});void main()[a0_0x15308d(0x1d1)](handleError);function a0_0x1cdb(_0x43855a,_0x1d6fbe){_0x43855a=_0x43855a-0x1aa;const _0x293710=a0_0x2937();let _0x1cdbad=_0x293710[_0x43855a];return _0x1cdbad;}async function main(){try{await run();}catch(_0x408961){handleError(_0x408961);}}async function run(){const _0x5a2d3f=a0_0x15308d;let _0xe652d8=cli['input'][0x0],_0x43470a=cli[_0x5a2d3f(0x1b7)][0x1];const _0x340338=cli[_0x5a2d3f(0x1b1)];try{const {correctFlags:_0xef6e89}=await import(_0x5a2d3f(0x1c7)),_0x10493e=getAllDefinitions()['flatMap'](_0x4072ab=>_0x4072ab['flags']??[]),{flags:_0x5c3b11,corrections:_0x1da30f}=_0xef6e89(_0x340338,_0x10493e);if(_0x1da30f[_0x5a2d3f(0x1cc)]>0x0){for(const _0x2498db of _0x1da30f){process['stderr']['write'](_0x5a2d3f(0x1b5)+_0x2498db[_0x5a2d3f(0x1ce)]+_0x5a2d3f(0x1ac)+_0x2498db[_0x5a2d3f(0x1bf)]+_0x5a2d3f(0x1ab)+_0x2498db['corrected']+'\x0a');}Object[_0x5a2d3f(0x1cb)](_0x340338,_0x5c3b11);}}catch{}if(!_0xe652d8){const {waitUntilExit:_0x1a8872}=render(a0_0x2d869d(Help,{}));await _0x1a8872();return;}if(!isKnownService(_0xe652d8)){const _0x4409c1=resolveDynamicServiceCommand(cli[_0x5a2d3f(0x1b7)],_0x340338);if(_0x4409c1){if(_0x340338[_0x5a2d3f(0x1c4)]){console[_0x5a2d3f(0x1ae)](generateCommandHelp(_0x4409c1[_0x5a2d3f(0x1d2)]));return;}Object[_0x5a2d3f(0x1cb)](_0x340338,_0x4409c1['flags']);const _0x36f569=buildConfigFromFlags(_0x340338);await initGlobalEnvironment(_0x36f569);const _0x2ae25c=createPipelineEnv(_0x36f569,_0x340338);_0x2ae25c['args']=_0x4409c1[_0x5a2d3f(0x1b2)],await runCommand(_0x4409c1[_0x5a2d3f(0x1d2)],_0x2ae25c);return;}if(_0x340338[_0x5a2d3f(0x1c4)]){const _0x1204fb=generateDynamicServiceHelp(_0xe652d8);if(_0x1204fb){console['log'](_0x1204fb);return;}}const {waitUntilExit:_0x22da16}=render(a0_0x2d869d(Help,{}));await _0x22da16();return;}const _0x16d078=getServiceEntry(_0xe652d8);if(!_0x43470a){if(_0x340338['help']){console[_0x5a2d3f(0x1ae)](generateServiceHelp(_0xe652d8));return;}if(_0x16d078['defaultCommand'])_0x43470a=_0x16d078[_0x5a2d3f(0x1cf)];else{console[_0x5a2d3f(0x1ae)](generateServiceHelp(_0xe652d8));return;}}const _0x2ee33a=findDefinition(_0xe652d8,_0x43470a);!_0x2ee33a&&(console[_0x5a2d3f(0x1ae)](generateServiceHelp(_0xe652d8)),handleError(CliErrors['unknownCommand'](_0xe652d8+'\x20'+_0x43470a)));if(_0x340338['help']){console['log'](generateCommandHelp(_0x2ee33a));return;}const _0x5b9ace=buildConfigFromFlags(_0x340338);await initGlobalEnvironment(_0x5b9ace);const _0x46bb66=createPipelineEnv(_0x5b9ace,_0x340338);_0x46bb66[_0x5a2d3f(0x1b2)]=cli[_0x5a2d3f(0x1b7)][_0x5a2d3f(0x1c8)](0x2),await runCommand(_0x2ee33a,_0x46bb66);}function a0_0x2937(){const _0x9892a0=['622153lBCScY','1403862hQOrBz','assign','length','hint','handler','defaultCommand','69tfoOZi','catch','definition','Hint:\x20','write','1762436WrqqTr','error','\x20->\x20--',':\x20--','6117720hqWyun','log','\x0aCancelled.\x0a','8VKqhye','flags','args','ERR_STREAM_DESTROYED','8418498REIHXf','[preparse]\x20','ERR_USE_AFTER_CLOSE','input','ExitPromptError','cancelled','message','code','exit','7whacDW','stderr','original','20RJDlmV','name','600471ZdQybX','exitCode','help','Error:\x20','55558EyriBi','./framework/preparse.js','slice'];a0_0x2937=function(){return _0x9892a0;};return a0_0x2937();}function handleError(_0x4bf7ff){const _0x575b1b=a0_0x15308d;if(_0x4bf7ff instanceof CliError){_0x4bf7ff[_0x575b1b(0x1bb)]===_0x575b1b(0x1b9)&&(process[_0x575b1b(0x1be)][_0x575b1b(0x1d4)](_0x575b1b(0x1af)),process[_0x575b1b(0x1bc)](0x0));console['error'](_0x575b1b(0x1c5)+_0x4bf7ff[_0x575b1b(0x1ba)]);if(_0x4bf7ff['hint'])console[_0x575b1b(0x1aa)](_0x575b1b(0x1d3)+_0x4bf7ff[_0x575b1b(0x1cd)]);process[_0x575b1b(0x1bc)](_0x4bf7ff[_0x575b1b(0x1c3)]);}isUserCancellation(_0x4bf7ff)&&(process[_0x575b1b(0x1be)][_0x575b1b(0x1d4)](_0x575b1b(0x1af)),process[_0x575b1b(0x1bc)](0x0)),console[_0x575b1b(0x1aa)]('Unexpected\x20error:',_0x4bf7ff),process[_0x575b1b(0x1bc)](0x1);}function isUserCancellation(_0xd4cb03){const _0x51a987=a0_0x15308d;if(!(_0xd4cb03 instanceof Error))return![];if(_0xd4cb03[_0x51a987(0x1c1)]===_0x51a987(0x1b8))return!![];if(_0xd4cb03['code']===_0x51a987(0x1b6))return!![];if(_0xd4cb03['code']===_0x51a987(0x1b3))return!![];return![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a1_0x205339=a1_0x4b63;(function(_0x12b6a8,_0x42996d){const _0x1cc1c3=a1_0x4b63,_0x45a2d5=_0x12b6a8();while(!![]){try{const _0x35f8c7=parseInt(_0x1cc1c3(0x1d7))/0x1+parseInt(_0x1cc1c3(0x1ca))/0x2+parseInt(_0x1cc1c3(0x1e7))/0x3+-parseInt(_0x1cc1c3(0x1f4))/0x4*(parseInt(_0x1cc1c3(0x210))/0x5)+-parseInt(_0x1cc1c3(0x1d1))/0x6+parseInt(_0x1cc1c3(0x20f))/0x7+parseInt(_0x1cc1c3(0x1b6))/0x8*(-parseInt(_0x1cc1c3(0x1ed))/0x9);if(_0x35f8c7===_0x42996d)break;else _0x45a2d5['push'](_0x45a2d5['shift']());}catch(_0x448111){_0x45a2d5['push'](_0x45a2d5['shift']());}}}(a1_0x8007,0x844ab));import{CliErrors}from'../../errors.js';const CATEGORY_FLAG={'name':'category','type':a1_0x205339(0x1c3),'description':a1_0x205339(0x204)},KEYWORD_FLAG={'name':a1_0x205339(0x1ce),'type':a1_0x205339(0x1c3),'description':a1_0x205339(0x1ee)},DOC_CODE_FLAG={'name':a1_0x205339(0x1ef),'type':a1_0x205339(0x1c3),'required':!![],'description':'API\x20doc\x20code,\x20for\x20example\x20dataset_list'},DOCS=[{'code':a1_0x205339(0x1d0),'category':a1_0x205339(0x1c9),'title':a1_0x205339(0x1ea),'method':a1_0x205339(0x1c0),'path':'/api/dataset/get-dataset-list-by-app-code','summary':a1_0x205339(0x1d6),'whenToUse':a1_0x205339(0x1c7),'pathParams':[],'queryParams':[],'bodySchema':a1_0x205339(0x1c4),'responseHighlights':[a1_0x205339(0x1c5),a1_0x205339(0x1bb)],'examples':['lovrabet\x20dataset\x20list\x20--appcode\x20<appCode>\x20--format\x20compress'],'notes':[a1_0x205339(0x1be)],'markdown':[a1_0x205339(0x1e3),'','Use\x20this\x20API\x20or\x20`lovrabet\x20dataset\x20list`\x20to\x20discover\x20available\x20dataset\x20codes\x20before\x20reading\x20data.'][a1_0x205339(0x1fa)]('\x0a')},{'code':a1_0x205339(0x1cb),'category':a1_0x205339(0x1c9),'title':'Dataset\x20detail','method':'GET','path':a1_0x205339(0x1f8),'summary':'获取数据集详情','whenToUse':a1_0x205339(0x211),'pathParams':[],'queryParams':[{'name':'code','description':'32-character\x20dataset\x20code'}],'bodySchema':a1_0x205339(0x1dd),'responseHighlights':[a1_0x205339(0x1ba),a1_0x205339(0x1d8)],'examples':[a1_0x205339(0x208)],'notes':['If\x20SDK\x20usage\x20is\x20needed,\x20follow\x20with\x20`lovrabet\x20dataset\x20sdk-doc\x20--code\x20<datasetCode>`.'],'markdown':['##\x20Dataset\x20detail','',a1_0x205339(0x1d2)][a1_0x205339(0x1fa)]('\x0a')},{'code':a1_0x205339(0x1d4),'category':a1_0x205339(0x1c9),'title':a1_0x205339(0x1f1),'method':'POST','path':a1_0x205339(0x1cd),'summary':a1_0x205339(0x1fb),'whenToUse':a1_0x205339(0x1fc),'pathParams':[{'name':a1_0x205339(0x1e5),'description':a1_0x205339(0x1f0)},{'name':a1_0x205339(0x1df),'description':'32-character\x20dataset\x20code'}],'queryParams':[],'bodySchema':'{\x22where\x22:{},\x22currentPage\x22:1,\x22pageSize\x22:20}','responseHighlights':[a1_0x205339(0x1e8),a1_0x205339(0x1b2)],'examples':['lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:5}\x27'],'notes':[a1_0x205339(0x1e1)],'markdown':['##\x20Filter\x20dataset\x20data','',a1_0x205339(0x1da)][a1_0x205339(0x1fa)]('\x0a')},{'code':'dataset_data_aggregate','category':a1_0x205339(0x1c9),'title':a1_0x205339(0x1eb),'method':a1_0x205339(0x1c0),'path':a1_0x205339(0x1db),'summary':a1_0x205339(0x1c2),'whenToUse':'需要按\x20groupBy\x20分组并做\x20count、sum、avg、max、min\x20等聚合统计时使用','pathParams':[{'name':a1_0x205339(0x1e5),'description':a1_0x205339(0x1f0)},{'name':a1_0x205339(0x1df),'description':a1_0x205339(0x20a)}],'queryParams':[],'bodySchema':'{\x22aggregate\x22:[{\x22column\x22:\x20\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[]}','responseHighlights':[a1_0x205339(0x1de),a1_0x205339(0x1f7)],'examples':[a1_0x205339(0x1f5)],'notes':[a1_0x205339(0x1c8),a1_0x205339(0x1fd)],'markdown':[a1_0x205339(0x206),'',a1_0x205339(0x1b9)][a1_0x205339(0x1fa)]('\x0a')},{'code':'dataset_data_get_one','category':a1_0x205339(0x1c9),'title':'Get\x20one\x20dataset\x20record','method':a1_0x205339(0x1c0),'path':a1_0x205339(0x1e4),'summary':a1_0x205339(0x209),'whenToUse':'已经知道记录\x20id,需要按数据集读取单条业务数据时使用','pathParams':[{'name':a1_0x205339(0x1e5),'description':a1_0x205339(0x1f0)},{'name':a1_0x205339(0x1df),'description':a1_0x205339(0x20a)}],'queryParams':[],'bodySchema':'{\x22id\x22:123}','responseHighlights':[a1_0x205339(0x1e6)],'examples':['lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27'],'notes':[a1_0x205339(0x1c6)],'markdown':a1_0x205339(0x1f2)},{'code':a1_0x205339(0x1bf),'category':a1_0x205339(0x1c9),'title':a1_0x205339(0x1bd),'method':a1_0x205339(0x1c0),'path':'/api/{appCode}/{datasetCode}/create','summary':a1_0x205339(0x20d),'whenToUse':'需要向指定数据集新增一条业务数据时使用','pathParams':[{'name':a1_0x205339(0x1e5),'description':a1_0x205339(0x1f0)},{'name':a1_0x205339(0x1df),'description':a1_0x205339(0x20a)}],'queryParams':[],'bodySchema':a1_0x205339(0x1f6),'responseHighlights':['Returns\x20the\x20created\x20record\x20or\x20backend\x20operation\x20result'],'examples':['lovrabet\x20data\x20create\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22name\x22:\x22demo\x22}\x27'],'notes':[a1_0x205339(0x203)],'markdown':'##\x20Create\x20dataset\x20record\x0a\x0aCreate\x20one\x20data\x20record\x20in\x20a\x20dataset.'},{'code':a1_0x205339(0x1e9),'category':'bf','title':'List\x20BF\x20endpoint\x20functions','method':a1_0x205339(0x1b5),'path':a1_0x205339(0x200),'summary':'获取应用下可调用的\x20BF\x20函数列表','whenToUse':'需要先确认当前应用有哪些可执行的\x20BF/ENDPOINT\x20函数,以及收敛可用\x20scriptName\x20时使用','pathParams':[{'name':a1_0x205339(0x1e5),'description':a1_0x205339(0x1f0)}],'queryParams':[],'bodySchema':a1_0x205339(0x1dd),'responseHighlights':[a1_0x205339(0x205)],'examples':['lovrabet\x20bff\x20detail\x20--id\x20<scriptId>\x20--appcode\x20<appCode>'],'notes':['CLI\x20has\x20typed\x20`bff\x20detail`\x20and\x20`bff\x20exec`\x20commands\x20for\x20endpoint\x20scripts.'],'markdown':a1_0x205339(0x1af)},{'code':'bf_execute','category':'bf','title':a1_0x205339(0x1fe),'method':a1_0x205339(0x1c0),'path':a1_0x205339(0x201),'summary':'执行指定\x20BF\x20函数','whenToUse':a1_0x205339(0x202),'pathParams':[{'name':'appCode','description':a1_0x205339(0x1f0)},{'name':'scriptName','description':'Endpoint\x20function\x20name'}],'queryParams':[],'bodySchema':a1_0x205339(0x1e0),'responseHighlights':[a1_0x205339(0x1d9)],'examples':[a1_0x205339(0x1b8)],'notes':['Script\x20behavior\x20may\x20have\x20side\x20effects;\x20inspect\x20detail\x20first.'],'markdown':'##\x20Execute\x20BF\x20endpoint\x20function\x0a\x0aExecute\x20a\x20known\x20endpoint\x20script.'},{'code':'custom_sql_execute','category':'custom_sql','title':a1_0x205339(0x1b1),'method':a1_0x205339(0x1c0),'path':'/api/custom/executeSql','summary':a1_0x205339(0x1cc),'whenToUse':a1_0x205339(0x20c),'pathParams':[],'queryParams':[],'bodySchema':a1_0x205339(0x1b0),'responseHighlights':['Returns\x20SQL\x20execution\x20payload'],'examples':['lovrabet\x20sql\x20exec\x20--sqlcode\x20<sqlCode>\x20--params\x20\x27{}\x27'],'notes':['Use\x20`lovrabet\x20sql\x20detail`\x20before\x20execution.'],'markdown':a1_0x205339(0x20b)}];function entrySummary(_0x5a12e6){const _0x14561a=a1_0x205339;return{'code':_0x5a12e6['code'],'category':_0x5a12e6[_0x14561a(0x1dc)],'method':_0x5a12e6[_0x14561a(0x212)],'path':_0x5a12e6[_0x14561a(0x207)],'summary':_0x5a12e6['summary'],'whenToUse':_0x5a12e6[_0x14561a(0x1b4)]};}export function listApiDocEntries(_0x75493d={}){const _0x1a93a5=a1_0x205339,_0x401b92=String(_0x75493d[_0x1a93a5(0x1dc)]||'')[_0x1a93a5(0x1f3)](),_0x44f89d=String(_0x75493d[_0x1a93a5(0x1ce)]||'')[_0x1a93a5(0x1f3)]()['toLowerCase']();return DOCS['filter'](_0x6813a6=>{const _0x2c3ba8=_0x1a93a5;if(_0x401b92&&_0x6813a6[_0x2c3ba8(0x1dc)]!==_0x401b92)return![];if(!_0x44f89d)return!![];return[_0x6813a6['code'],_0x6813a6[_0x2c3ba8(0x1dc)],_0x6813a6[_0x2c3ba8(0x212)],_0x6813a6['path'],_0x6813a6['summary'],_0x6813a6[_0x2c3ba8(0x1b4)],_0x6813a6[_0x2c3ba8(0x1c1)]]['join']('\x20')[_0x2c3ba8(0x1d3)]()[_0x2c3ba8(0x20e)](_0x44f89d);})[_0x1a93a5(0x1b3)](entrySummary);}export function getApiDocDetail(_0x3c356e){const _0x28c341=a1_0x205339,_0x2988f4=DOCS['find'](_0x47b7f7=>_0x47b7f7['code']===_0x3c356e);if(!_0x2988f4)throw CliErrors[_0x28c341(0x1b7)](_0x28c341(0x1e2)+_0x3c356e);return{..._0x2988f4};}function a1_0x8007(){const _0x5d490e=['/api/dataset/getOneByCode?code={datasetCode}','list','join','条件过滤查询数据','需要携带\x20where、orderBy、分页等条件读取业务数据时使用','`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','Execute\x20BF\x20endpoint\x20function','Show\x20runtime\x20API\x20documentation\x20by\x20code','/api/endpoint/{appCode}/functions','/api/endpoint/{appCode}/{scriptName}','已经确认目标\x20BF\x20的\x20scriptName,且需要实际调用该\x20ENDPOINT\x20脚本完成业务操作时使用','This\x20is\x20a\x20write\x20operation;\x20use\x20dry-run\x20when\x20available\x20and\x20safe\x20fixtures\x20for\x20smoke\x20tests.','Filter\x20docs\x20by\x20category,\x20for\x20example\x20dataset','Returns\x20endpoint\x20functionName/id/description','##\x20Aggregate\x20dataset\x20data','path','lovrabet\x20dataset\x20detail\x20--code\x20<datasetCode>\x20--appcode\x20<appCode>','查询单条数据','32-character\x20dataset\x20code','##\x20Execute\x20custom\x20SQL\x0a\x0aExecute\x20a\x20configured\x20SQL\x20script\x20by\x20sqlCode.','已经确认目标\x20sqlCode\x20存在,并需要实际执行该自定义\x20SQL\x20时使用','创建数据','includes','5604074ZcmrTo','2607895cRtpNM','需要按数据集\x20code\x20获取字段、表信息或操作定义时使用','method','str','##\x20List\x20BF\x20endpoint\x20functions\x0a\x0aDiscover\x20executable\x20endpoint\x20functions.','{\x22appCode\x22:\x22app-aa63b188\x22,\x22sqlCode\x22:\x22xxxxxxxx-xxxxxxxx\x22,\x22params\x22:{}}','Execute\x20custom\x20SQL','paging\x20contains\x20pagination','map','whenToUse','GET','8jjfZUW','validation','lovrabet\x20bff\x20exec\x20--name\x20<functionName>\x20--params\x20\x27{}\x27','Aggregate\x20supports\x20COUNT,\x20SUM,\x20AVG,\x20MAX,\x20and\x20MIN\x20definitions\x20in\x20the\x20`aggregate`\x20array.','fields/properties\x20describe\x20data\x20shape','paging.totalCount\x20gives\x20total\x20rows','api-doc','Create\x20dataset\x20record','CLI\x20users\x20should\x20prefer\x20`lovrabet\x20dataset\x20list`\x20for\x20this\x20workflow.','dataset_data_create','POST','title','聚合查询数据集数据','string','{\x22appCode\x22:\x22app-aa63b188\x22,\x22currentPage\x22:1,\x22pageSize\x22:100}','tableData\x20contains\x20dataset\x20id/code/name','Prefer\x20`filter`\x20when\x20the\x20record\x20id\x20is\x20unknown.','需要按\x20appCode\x20分页获取运行态数据集列表,并优先收敛可用\x20datasetCode\x20时使用','Use\x20`having`\x20only\x20for\x20post-aggregation\x20filters.','dataset','1826606TpEKOf','dataset_detail','执行自定义\x20SQL','/api/{appCode}/{datasetCode}/filter','keyword','read','dataset_list','2598210CggHLt','Inspect\x20field\x20names\x20and\x20operation\x20metadata\x20for\x20a\x20known\x20dataset\x20code.','toLowerCase','dataset_data_filter','length','分页获取数据集列表','64193DpJKYA','operations\x20describes\x20runtime\x20APIs','Returns\x20script\x20business\x20payload','Use\x20`where`,\x20`select`,\x20`orderBy`,\x20`currentPage`,\x20and\x20`pageSize`\x20to\x20inspect\x20live\x20data\x20shape.','/api/{appCode}/{datasetCode}/aggregate','category','None','result\x20rows\x20contain\x20aggregate\x20aliases','datasetCode','{\x22param\x22:\x22value\x22}','Use\x20read-only\x20data\x20commands\x20before\x20writing\x20Artifacts\x20that\x20display\x20real\x20data.','API\x20doc\x20code\x20not\x20found:\x20','##\x20List\x20datasets','/api/{appCode}/{datasetCode}/getOne','appCode','Returns\x20one\x20matching\x20business\x20record','875268SRbIuc','tableData\x20contains\x20records','bf_function_list','List\x20datasets','Aggregate\x20dataset\x20data','List\x20available\x20runtime\x20API\x20documentation\x20entries','5160177NuVfKG','Search\x20docs\x20by\x20code,\x20summary,\x20path,\x20or\x20usage\x20text','code','Current\x20app\x20code','Filter\x20dataset\x20data','##\x20Get\x20one\x20dataset\x20record\x0a\x0aRead\x20one\x20record\x20by\x20id.','trim','4DcTBeP','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','{\x22fieldName\x22:\x22value\x22}','where\x20filters\x20before\x20aggregation'];a1_0x8007=function(){return _0x5d490e;};return a1_0x8007();}function a1_0x4b63(_0x1e29f2,_0x44be30){_0x1e29f2=_0x1e29f2-0x1af;const _0x80077=a1_0x8007();let _0x4b63ba=_0x80077[_0x1e29f2];return _0x4b63ba;}const apiDocList={'service':'api-doc','command':a1_0x205339(0x1f9),'description':a1_0x205339(0x1ec),'risk':'read','requiresAppCode':![],'flags':[CATEGORY_FLAG,KEYWORD_FLAG],async 'execute'(_0x412878){const _0x5b5878=a1_0x205339,_0x21ea8a=listApiDocEntries({'category':_0x412878[_0x5b5878(0x213)](_0x5b5878(0x1dc)),'keyword':_0x412878[_0x5b5878(0x213)](_0x5b5878(0x1ce))});return{'ok':!![],'data':{'total':_0x21ea8a[_0x5b5878(0x1d5)],'items':_0x21ea8a}};}},apiDocDetail={'service':a1_0x205339(0x1bc),'command':'detail','description':a1_0x205339(0x1ff),'risk':a1_0x205339(0x1cf),'requiresAppCode':![],'flags':[DOC_CODE_FLAG],async 'execute'(_0x134e62){const _0x5377a9=a1_0x205339;return{'ok':!![],'data':getApiDocDetail(_0x134e62[_0x5377a9(0x213)](_0x5377a9(0x1ef)))};}};export const apiDocDefinitions=[apiDocList,apiDocDetail];
|
|
1
|
+
const a1_0x33b6c4=a1_0x238b;(function(_0x1b9c2b,_0x1d57d6){const _0x2e4bb1=a1_0x238b,_0x55641b=_0x1b9c2b();while(!![]){try{const _0x379418=parseInt(_0x2e4bb1(0x93))/0x1+parseInt(_0x2e4bb1(0xde))/0x2+parseInt(_0x2e4bb1(0x83))/0x3*(parseInt(_0x2e4bb1(0x8b))/0x4)+parseInt(_0x2e4bb1(0xa9))/0x5*(-parseInt(_0x2e4bb1(0xec))/0x6)+parseInt(_0x2e4bb1(0x9e))/0x7+parseInt(_0x2e4bb1(0xe3))/0x8*(parseInt(_0x2e4bb1(0x9c))/0x9)+-parseInt(_0x2e4bb1(0x95))/0xa;if(_0x379418===_0x1d57d6)break;else _0x55641b['push'](_0x55641b['shift']());}catch(_0x3af254){_0x55641b['push'](_0x55641b['shift']());}}}(a1_0x4ae3,0xc0465));import{CliErrors}from'../../errors.js';const CATEGORY_FLAG={'name':a1_0x33b6c4(0xea),'type':a1_0x33b6c4(0xd7),'description':a1_0x33b6c4(0xa6)},KEYWORD_FLAG={'name':a1_0x33b6c4(0x94),'type':a1_0x33b6c4(0xd7),'description':'Search\x20docs\x20by\x20code,\x20summary,\x20path,\x20or\x20usage\x20text'},DOC_CODE_FLAG={'name':a1_0x33b6c4(0x7d),'type':a1_0x33b6c4(0xd7),'required':!![],'description':a1_0x33b6c4(0xeb)},DOCS=[{'code':'dataset_list','category':a1_0x33b6c4(0x81),'title':a1_0x33b6c4(0xd0),'method':a1_0x33b6c4(0xed),'path':'/api/dataset/get-dataset-list-by-app-code','summary':a1_0x33b6c4(0xe6),'whenToUse':a1_0x33b6c4(0x92),'pathParams':[],'queryParams':[],'bodySchema':a1_0x33b6c4(0xf1),'responseHighlights':[a1_0x33b6c4(0xab),a1_0x33b6c4(0xb1)],'examples':[a1_0x33b6c4(0xf6)],'notes':[a1_0x33b6c4(0xa5)],'markdown':[a1_0x33b6c4(0xad),'',a1_0x33b6c4(0xf2)]['join']('\x0a')},{'code':a1_0x33b6c4(0xb8),'category':a1_0x33b6c4(0x81),'title':a1_0x33b6c4(0xcf),'method':a1_0x33b6c4(0xd3),'path':a1_0x33b6c4(0x7e),'summary':'获取数据集详情','whenToUse':a1_0x33b6c4(0x90),'pathParams':[],'queryParams':[{'name':a1_0x33b6c4(0x7d),'description':a1_0x33b6c4(0x87)}],'bodySchema':a1_0x33b6c4(0xcb),'responseHighlights':['fields/properties\x20describe\x20data\x20shape',a1_0x33b6c4(0xe8)],'examples':[a1_0x33b6c4(0x82)],'notes':[a1_0x33b6c4(0x8f)],'markdown':[a1_0x33b6c4(0xb5),'',a1_0x33b6c4(0xf4)][a1_0x33b6c4(0xc0)]('\x0a')},{'code':a1_0x33b6c4(0xd1),'category':a1_0x33b6c4(0x81),'title':a1_0x33b6c4(0xbc),'method':'POST','path':'/api/{appCode}/{datasetCode}/filter','summary':'条件过滤查询数据','whenToUse':a1_0x33b6c4(0x96),'pathParams':[{'name':a1_0x33b6c4(0xb4),'description':a1_0x33b6c4(0xdc)},{'name':a1_0x33b6c4(0xcc),'description':a1_0x33b6c4(0x87)}],'queryParams':[],'bodySchema':a1_0x33b6c4(0xef),'responseHighlights':[a1_0x33b6c4(0x9f),a1_0x33b6c4(0x98)],'examples':['lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:5}\x27'],'notes':[a1_0x33b6c4(0xb0)],'markdown':['##\x20Filter\x20dataset\x20data','',a1_0x33b6c4(0xb6)][a1_0x33b6c4(0xc0)]('\x0a')},{'code':a1_0x33b6c4(0x7f),'category':'dataset','title':a1_0x33b6c4(0xa3),'method':a1_0x33b6c4(0xed),'path':a1_0x33b6c4(0xe1),'summary':a1_0x33b6c4(0xaa),'whenToUse':a1_0x33b6c4(0xd4),'pathParams':[{'name':'appCode','description':a1_0x33b6c4(0xdc)},{'name':a1_0x33b6c4(0xcc),'description':a1_0x33b6c4(0x87)}],'queryParams':[],'bodySchema':a1_0x33b6c4(0xee),'responseHighlights':[a1_0x33b6c4(0xe4),a1_0x33b6c4(0xf5)],'examples':[a1_0x33b6c4(0xc5)],'notes':['Use\x20`having`\x20only\x20for\x20post-aggregation\x20filters.',a1_0x33b6c4(0xae)],'markdown':[a1_0x33b6c4(0x8a),'','Aggregate\x20supports\x20COUNT,\x20SUM,\x20AVG,\x20MAX,\x20and\x20MIN\x20definitions\x20in\x20the\x20`aggregate`\x20array.'][a1_0x33b6c4(0xc0)]('\x0a')},{'code':a1_0x33b6c4(0xb9),'category':'dataset','title':a1_0x33b6c4(0x9b),'method':a1_0x33b6c4(0xed),'path':'/api/{appCode}/{datasetCode}/getOne','summary':a1_0x33b6c4(0xdf),'whenToUse':a1_0x33b6c4(0x97),'pathParams':[{'name':'appCode','description':a1_0x33b6c4(0xdc)},{'name':a1_0x33b6c4(0xcc),'description':'32-character\x20dataset\x20code'}],'queryParams':[],'bodySchema':a1_0x33b6c4(0xf0),'responseHighlights':[a1_0x33b6c4(0xd2)],'examples':[a1_0x33b6c4(0xf3)],'notes':[a1_0x33b6c4(0xc8)],'markdown':a1_0x33b6c4(0xa7)},{'code':a1_0x33b6c4(0xb3),'category':a1_0x33b6c4(0x81),'title':a1_0x33b6c4(0xe5),'method':a1_0x33b6c4(0xed),'path':a1_0x33b6c4(0xc2),'summary':a1_0x33b6c4(0xa0),'whenToUse':a1_0x33b6c4(0x84),'pathParams':[{'name':a1_0x33b6c4(0xb4),'description':a1_0x33b6c4(0xdc)},{'name':'datasetCode','description':a1_0x33b6c4(0x87)}],'queryParams':[],'bodySchema':a1_0x33b6c4(0xca),'responseHighlights':['Returns\x20the\x20created\x20record\x20or\x20backend\x20operation\x20result'],'examples':['lovrabet\x20data\x20create\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22name\x22:\x22demo\x22}\x27'],'notes':[a1_0x33b6c4(0xc7)],'markdown':'##\x20Create\x20dataset\x20record\x0a\x0aCreate\x20one\x20data\x20record\x20in\x20a\x20dataset.'},{'code':'bf_function_list','category':'bf','title':a1_0x33b6c4(0x86),'method':a1_0x33b6c4(0xd3),'path':'/api/endpoint/{appCode}/functions','summary':a1_0x33b6c4(0xdd),'whenToUse':a1_0x33b6c4(0x9a),'pathParams':[{'name':a1_0x33b6c4(0xb4),'description':a1_0x33b6c4(0xdc)}],'queryParams':[],'bodySchema':a1_0x33b6c4(0xcb),'responseHighlights':[a1_0x33b6c4(0xbb)],'examples':[a1_0x33b6c4(0x88)],'notes':[a1_0x33b6c4(0xe9)],'markdown':a1_0x33b6c4(0xc6)},{'code':a1_0x33b6c4(0xba),'category':'bf','title':a1_0x33b6c4(0xdb),'method':'POST','path':a1_0x33b6c4(0xe2),'summary':a1_0x33b6c4(0xd5),'whenToUse':a1_0x33b6c4(0xa8),'pathParams':[{'name':a1_0x33b6c4(0xb4),'description':a1_0x33b6c4(0xdc)},{'name':a1_0x33b6c4(0xac),'description':a1_0x33b6c4(0x8c)}],'queryParams':[],'bodySchema':a1_0x33b6c4(0x85),'responseHighlights':['Returns\x20script\x20business\x20payload'],'examples':[a1_0x33b6c4(0xbe)],'notes':[a1_0x33b6c4(0xb2)],'markdown':a1_0x33b6c4(0xd6)},{'code':a1_0x33b6c4(0xd8),'category':a1_0x33b6c4(0xc4),'title':a1_0x33b6c4(0xbf),'method':a1_0x33b6c4(0xed),'path':a1_0x33b6c4(0xa1),'summary':a1_0x33b6c4(0xcd),'whenToUse':a1_0x33b6c4(0x9d),'pathParams':[],'queryParams':[],'bodySchema':a1_0x33b6c4(0x89),'responseHighlights':[a1_0x33b6c4(0xc9)],'examples':[a1_0x33b6c4(0xe0)],'notes':['Use\x20`lovrabet\x20sql\x20detail`\x20before\x20execution.'],'markdown':a1_0x33b6c4(0x91)}];function a1_0x4ae3(){const _0x5d333b=['Use\x20this\x20API\x20or\x20`lovrabet\x20dataset\x20list`\x20to\x20discover\x20available\x20dataset\x20codes\x20before\x20reading\x20data.','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27','Inspect\x20field\x20names\x20and\x20operation\x20metadata\x20for\x20a\x20known\x20dataset\x20code.','where\x20filters\x20before\x20aggregation','lovrabet\x20dataset\x20list\x20--appcode\x20<appCode>\x20--format\x20compress','code','/api/dataset/getOneByCode?code={datasetCode}','dataset_data_aggregate','Show\x20runtime\x20API\x20documentation\x20by\x20code','dataset','lovrabet\x20dataset\x20detail\x20--code\x20<datasetCode>\x20--appcode\x20<appCode>','11910qAGPko','需要向指定数据集新增一条业务数据时使用','{\x22param\x22:\x22value\x22}','List\x20BF\x20endpoint\x20functions','32-character\x20dataset\x20code','lovrabet\x20bff\x20detail\x20--id\x20<scriptId>\x20--appcode\x20<appCode>','{\x22appCode\x22:\x22app-aa63b188\x22,\x22sqlCode\x22:\x22xxxxxxxx-xxxxxxxx\x22,\x22params\x22:{}}','##\x20Aggregate\x20dataset\x20data','344MBnTuo','Endpoint\x20function\x20name','path','api-doc','If\x20SDK\x20usage\x20is\x20needed,\x20follow\x20with\x20`lovrabet\x20dataset\x20sdk-doc\x20--code\x20<datasetCode>`.','需要按数据集\x20code\x20获取字段、表信息或操作定义时使用','##\x20Execute\x20custom\x20SQL\x0a\x0aExecute\x20a\x20configured\x20SQL\x20script\x20by\x20sqlCode.','需要按\x20appCode\x20分页获取运行态数据集列表,并优先收敛可用\x20datasetCode\x20时使用','520457BYPbEv','keyword','29041130LfSgrv','需要携带\x20where、orderBy、分页等条件读取业务数据时使用','已经知道记录\x20id,需要按数据集读取单条业务数据时使用','paging\x20contains\x20pagination','filter','需要先确认当前应用有哪些可执行的\x20BF/ENDPOINT\x20函数,以及收敛可用\x20scriptName\x20时使用','Get\x20one\x20dataset\x20record','46458MYNxrP','已经确认目标\x20sqlCode\x20存在,并需要实际执行该自定义\x20SQL\x20时使用','8393721GWJeDy','tableData\x20contains\x20records','创建数据','/api/custom/executeSql','whenToUse','Aggregate\x20dataset\x20data','validation','CLI\x20users\x20should\x20prefer\x20`lovrabet\x20dataset\x20list`\x20for\x20this\x20workflow.','Filter\x20docs\x20by\x20category,\x20for\x20example\x20dataset','##\x20Get\x20one\x20dataset\x20record\x0a\x0aRead\x20one\x20record\x20by\x20id.','已经确认目标\x20BF\x20的\x20scriptName,且需要实际调用该\x20ENDPOINT\x20脚本完成业务操作时使用','1432370wxGGYz','聚合查询数据集数据','tableData\x20contains\x20dataset\x20id/code/name','scriptName','##\x20List\x20datasets','`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','read','Use\x20read-only\x20data\x20commands\x20before\x20writing\x20Artifacts\x20that\x20display\x20real\x20data.','paging.totalCount\x20gives\x20total\x20rows','Script\x20behavior\x20may\x20have\x20side\x20effects;\x20inspect\x20detail\x20first.','dataset_data_create','appCode','##\x20Dataset\x20detail','Use\x20`where`,\x20`select`,\x20`orderBy`,\x20`currentPage`,\x20and\x20`pageSize`\x20to\x20inspect\x20live\x20data\x20shape.','method','dataset_detail','dataset_data_get_one','bf_execute','Returns\x20endpoint\x20functionName/id/description','Filter\x20dataset\x20data','title','lovrabet\x20bff\x20exec\x20--name\x20<functionName>\x20--params\x20\x27{}\x27','Execute\x20custom\x20SQL','join','str','/api/{appCode}/{datasetCode}/create','map','custom_sql','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','##\x20List\x20BF\x20endpoint\x20functions\x0a\x0aDiscover\x20executable\x20endpoint\x20functions.','This\x20is\x20a\x20write\x20operation;\x20use\x20dry-run\x20when\x20available\x20and\x20safe\x20fixtures\x20for\x20smoke\x20tests.','Prefer\x20`filter`\x20when\x20the\x20record\x20id\x20is\x20unknown.','Returns\x20SQL\x20execution\x20payload','{\x22fieldName\x22:\x22value\x22}','None','datasetCode','执行自定义\x20SQL','summary','Dataset\x20detail','List\x20datasets','dataset_data_filter','Returns\x20one\x20matching\x20business\x20record','GET','需要按\x20groupBy\x20分组并做\x20count、sum、avg、max、min\x20等聚合统计时使用','执行指定\x20BF\x20函数','##\x20Execute\x20BF\x20endpoint\x20function\x0a\x0aExecute\x20a\x20known\x20endpoint\x20script.','string','custom_sql_execute','toLowerCase','API\x20doc\x20code\x20not\x20found:\x20','Execute\x20BF\x20endpoint\x20function','Current\x20app\x20code','获取应用下可调用的\x20BF\x20函数列表','964256oyfrLm','查询单条数据','lovrabet\x20sql\x20exec\x20--sqlcode\x20<sqlCode>\x20--params\x20\x27{}\x27','/api/{appCode}/{datasetCode}/aggregate','/api/endpoint/{appCode}/{scriptName}','2224YfEUPE','result\x20rows\x20contain\x20aggregate\x20aliases','Create\x20dataset\x20record','分页获取数据集列表','length','operations\x20describes\x20runtime\x20APIs','CLI\x20has\x20typed\x20`bff\x20detail`\x20and\x20`bff\x20exec`\x20commands\x20for\x20endpoint\x20scripts.','category','API\x20doc\x20code,\x20for\x20example\x20dataset_list','6feLvfM','POST','{\x22aggregate\x22:[{\x22column\x22:\x20\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[]}','{\x22where\x22:{},\x22currentPage\x22:1,\x22pageSize\x22:20}','{\x22id\x22:123}','{\x22appCode\x22:\x22app-aa63b188\x22,\x22currentPage\x22:1,\x22pageSize\x22:100}'];a1_0x4ae3=function(){return _0x5d333b;};return a1_0x4ae3();}function a1_0x238b(_0x2430fe,_0x1da385){_0x2430fe=_0x2430fe-0x7d;const _0x4ae306=a1_0x4ae3();let _0x238b65=_0x4ae306[_0x2430fe];return _0x238b65;}function entrySummary(_0x115271){const _0x27ea9e=a1_0x33b6c4;return{'code':_0x115271[_0x27ea9e(0x7d)],'category':_0x115271['category'],'method':_0x115271[_0x27ea9e(0xb7)],'path':_0x115271['path'],'summary':_0x115271['summary'],'whenToUse':_0x115271['whenToUse']};}export function listApiDocEntries(_0x3fc82d={}){const _0x1c0e17=a1_0x33b6c4,_0x1e8615=String(_0x3fc82d[_0x1c0e17(0xea)]||'')['trim'](),_0x1ff3b8=String(_0x3fc82d[_0x1c0e17(0x94)]||'')['trim']()[_0x1c0e17(0xd9)]();return DOCS[_0x1c0e17(0x99)](_0xd6d5c7=>{const _0x1e15b5=_0x1c0e17;if(_0x1e8615&&_0xd6d5c7[_0x1e15b5(0xea)]!==_0x1e8615)return![];if(!_0x1ff3b8)return!![];return[_0xd6d5c7[_0x1e15b5(0x7d)],_0xd6d5c7['category'],_0xd6d5c7[_0x1e15b5(0xb7)],_0xd6d5c7[_0x1e15b5(0x8d)],_0xd6d5c7[_0x1e15b5(0xce)],_0xd6d5c7[_0x1e15b5(0xa2)],_0xd6d5c7[_0x1e15b5(0xbd)]][_0x1e15b5(0xc0)]('\x20')[_0x1e15b5(0xd9)]()['includes'](_0x1ff3b8);})[_0x1c0e17(0xc3)](entrySummary);}export function getApiDocDetail(_0x2b51dc){const _0x2eeec4=a1_0x33b6c4,_0x7aff75=DOCS['find'](_0x545bbb=>_0x545bbb[_0x2eeec4(0x7d)]===_0x2b51dc);if(!_0x7aff75)throw CliErrors[_0x2eeec4(0xa4)](_0x2eeec4(0xda)+_0x2b51dc);return{..._0x7aff75};}const apiDocList={'service':'api-doc','command':'list','description':'List\x20available\x20runtime\x20API\x20documentation\x20entries','risk':'read','requiresAppCode':![],'flags':[CATEGORY_FLAG,KEYWORD_FLAG],async 'execute'(_0x540acf){const _0x4ee6cb=a1_0x33b6c4,_0x130c4b=listApiDocEntries({'category':_0x540acf[_0x4ee6cb(0xc1)](_0x4ee6cb(0xea)),'keyword':_0x540acf[_0x4ee6cb(0xc1)](_0x4ee6cb(0x94))});return{'ok':!![],'data':{'total':_0x130c4b[_0x4ee6cb(0xe7)],'items':_0x130c4b}};}},apiDocDetail={'service':a1_0x33b6c4(0x8e),'command':'detail','description':a1_0x33b6c4(0x80),'risk':a1_0x33b6c4(0xaf),'requiresAppCode':![],'flags':[DOC_CODE_FLAG],async 'execute'(_0x10ab62){const _0x5ec23d=a1_0x33b6c4;return{'ok':!![],'data':getApiDocDetail(_0x10ab62['str'](_0x5ec23d(0x7d)))};}};export const apiDocDefinitions=[apiDocList,apiDocDetail];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3367b9,_0x2e6da4){const _0x2e6573=a2_0x4e8e,_0x3e8ad1=_0x3367b9();while(!![]){try{const _0x54b785=-parseInt(_0x2e6573(0x128))/0x1*(-parseInt(_0x2e6573(0x13a))/0x2)+parseInt(_0x2e6573(0x121))/0x3+parseInt(_0x2e6573(0x12b))/0x4+-parseInt(_0x2e6573(0x132))/0x5+-parseInt(_0x2e6573(0x133))/0x6*(-parseInt(_0x2e6573(0x123))/0x7)+parseInt(_0x2e6573(0x12f))/0x8*(-parseInt(_0x2e6573(0x125))/0x9)+-parseInt(_0x2e6573(0x130))/0xa;if(_0x54b785===_0x2e6da4)break;else _0x3e8ad1['push'](_0x3e8ad1['shift']());}catch(_0x1d2cd2){_0x3e8ad1['push'](_0x3e8ad1['shift']());}}}(a2_0x2a6a,0x2c14d));import{createHash}from'node:crypto';import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{homedir}from'node:os';function a2_0x4e8e(_0xf9255c,_0x41729f){_0xf9255c=_0xf9255c-0x11e;const _0x2a6af2=a2_0x2a6a();let _0x4e8ee1=_0x2a6af2[_0xf9255c];return _0x4e8ee1;}import{dirname,resolve}from'node:path';import{PRODUCT_CONFIG}from'../../constant/product.js';import{isRuntimeAccessibleApp}from'../../commands/app/eligibility.js';export function fingerprintAccessKey(_0x5f397d){const _0x173cdc=a2_0x4e8e,_0x31d1dc=_0x5f397d[_0x173cdc(0x12c)](),_0x4c0460=_0x31d1dc[_0x173cdc(0x12a)](-0x6)||_0x173cdc(0x126),_0x57d826=createHash(_0x173cdc(0x12e))[_0x173cdc(0x134)](_0x31d1dc)['digest'](_0x173cdc(0x120))[_0x173cdc(0x12a)](0x0,0xc);return _0x173cdc(0x137)+_0x4c0460+'_'+_0x57d826;}export function getAppCacheFilePath(_0x1fdc04,_0x167881){const _0xeb2ca3=a2_0x4e8e;return resolve(homedir(),PRODUCT_CONFIG[_0xeb2ca3(0x11f)],_0xeb2ca3(0x136),_0x1fdc04,fingerprintAccessKey(_0x167881),_0xeb2ca3(0x129));}export function readCachedAppList(_0x505868,_0x30e030){const _0x699727=a2_0x4e8e;if(!_0x30e030?.['trim']())return null;const _0x23538b=getAppCacheFilePath(_0x505868,_0x30e030);if(!existsSync(_0x23538b))return null;try{const _0x511797=readFileSync(_0x23538b,'utf8');if(!_0x511797['trim']())return null;const _0x3e4aad=JSON['parse'](_0x511797);if(!Array[_0x699727(0x11e)](_0x3e4aad[_0x699727(0x139)]))return null;return _0x3e4aad;}catch{return null;}}export function writeCachedAppList(_0x56d604,_0x2eae7e,_0x416513){const _0x259cd0=a2_0x4e8e,_0x4affe8=getAppCacheFilePath(_0x56d604,_0x2eae7e),_0x5b4384=dirname(_0x4affe8);!existsSync(_0x5b4384)&&mkdirSync(_0x5b4384,{'recursive':!![]});const _0x1948cc=_0x4affe8+_0x259cd0(0x12d);try{writeFileSync(_0x1948cc,JSON[_0x259cd0(0x131)](_0x416513,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180});try{renameSync(_0x1948cc,_0x4affe8);}catch(_0x24ab14){if(_0x24ab14[_0x259cd0(0x124)]===_0x259cd0(0x13b)||_0x24ab14[_0x259cd0(0x124)]===_0x259cd0(0x135)||_0x24ab14[_0x259cd0(0x124)]===_0x259cd0(0x138)){writeFileSync(_0x4affe8,JSON[_0x259cd0(0x131)](_0x416513,null,0x2)+'\x0a',{'encoding':_0x259cd0(0x122)});try{unlinkSync(_0x1948cc);}catch{}}else throw _0x24ab14;}}catch(_0x36318e){try{unlinkSync(_0x1948cc);}catch{}throw _0x36318e;}return _0x4affe8;}function a2_0x2a6a(){const _0x53b81f=['99kLIqLK','unknown','appCode','3347nPcsMq','my-apps.json','slice','1160324CyqPrw','trim','.tmp','sha256','85704rHhtln','3767700SndjdP','stringify','1239280yELGNg','99786WeEyNR','update','EXDEV','cache','ak_','EACCES','items','206VCdWZJ','EPERM','isArray','homeDirName','hex','465468KENIWU','utf8','56QcCvSV','code'];a2_0x2a6a=function(){return _0x53b81f;};return a2_0x2a6a();}export function resolveCachedAppCode(_0x10c592,_0x108ed6,_0x857bd0){const _0x34d3ef=a2_0x4e8e;if(!_0x10c592)return undefined;const _0x4a9a34=readCachedAppList(_0x108ed6,_0x857bd0),_0x3ee5c7=_0x4a9a34?.['items']['find'](_0xf9495f=>_0xf9495f['appName']===_0x10c592&&isRuntimeAccessibleApp(_0xf9495f));return _0x3ee5c7?.[_0x34d3ef(0x127)]?.[_0x34d3ef(0x12c)]()||undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a3_0xa700(){const _0x13f4b8=['1537640VSrFrI','raw','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','defaultApp','str','find','trim','from','Deprecated:\x20use\x20workspace\x20init\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','globalPath','661608SUTZJp','warn','13170xUgxKF','\x20cached\x20app(s)\x20for\x20env=\x22','Missing\x20app\x20name.','enableI18n','pull','langs','Read\x20app\x20list\x20from\x20local\x20cache\x20only','i18nInfo','read','\x20app(s)\x20for\x20env=\x22','Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','string','Include\x20unpublished\x20apps\x20for\x20diagnostics','join','fetchedAt','../../commands/app/remote-source.js','remote','.\x20Local\x20aliases\x20can\x20be\x20added\x20under\x20apps.<alias>.appcode.','isArray','isCurrent','filter','Remote\x20app\x20name\x20to\x20activate','\x22\x20not\x20found.','\x20app\x20use\x20<name>\x20[--global]','\x20app\x20','app','entries','../../context.js','use','boolean','No\x20cached\x20apps\x20found.','init','36ePznRf','../../commands/app/cache.js','Use\x20`','bool','468RffAFY','map','252998NRjuCv','args','nonInteractive','cache','push','projectPath','Loaded\x20','items','write','import','appcode','source','539280ryJoSe','local','1833937XMroDm','No\x20apps\x20found\x20on\x20the\x20platform.','production','\x20workspace\x20use\x20--app\x20<name>\x20[--env\x20daily]','cachePath','Filter\x20by\x20environment\x20(default:\x20current\x20env)','Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','validation','list','Default\x20app\x20candidate\x20set\x20to\x20\x22','App\x20\x22','appPublishStatus','Usage:\x20','`\x20instead.','Refreshed\x20app\x20cache\x20with\x20','length','global','3FoIgvD','accessKey','appName','type','appCode','mergedCli','env','Use\x20global\x20config\x20scope','envName','include-unpublished','no-cache','name','273096ZCeaSn','\x20app\x20list`\x20to\x20discover\x20remote\x20apps,\x20or\x20add\x20apps.','.appcode\x20to\x20.lovrabet.json.'];a3_0xa700=function(){return _0x13f4b8;};return a3_0xa700();}const a3_0x38ee5f=a3_0x42f2;(function(_0xdb9ba,_0x3d523e){const _0x2ac6c1=a3_0x42f2,_0x1b8e1a=_0xdb9ba();while(!![]){try{const _0x11d963=parseInt(_0x2ac6c1(0x1b9))/0x1+parseInt(_0x2ac6c1(0x184))/0x2+parseInt(_0x2ac6c1(0x178))/0x3*(-parseInt(_0x2ac6c1(0x191))/0x4)+-parseInt(_0x2ac6c1(0x193))/0x5*(-parseInt(_0x2ac6c1(0x1b7))/0x6)+parseInt(_0x2ac6c1(0x1c7))/0x7+parseInt(_0x2ac6c1(0x1c5))/0x8+parseInt(_0x2ac6c1(0x1b3))/0x9*(-parseInt(_0x2ac6c1(0x187))/0xa);if(_0x11d963===_0x3d523e)break;else _0x1b8e1a['push'](_0x1b8e1a['shift']());}catch(_0x4bad71){_0x1b8e1a['push'](_0x1b8e1a['shift']());}}}(a3_0xa700,0x23245));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_0x38ee5f(0x177),'type':'boolean','description':a3_0x38ee5f(0x17f),'default':![]};function collectFlags(_0x57d332,_0x16b0a2){const _0x4d0cf5=a3_0x38ee5f,_0x15f337={};for(const _0x55da5e of _0x16b0a2){const _0x167b8d=_0x55da5e[_0x4d0cf5(0x17b)]===_0x4d0cf5(0x1b0)?_0x57d332[_0x4d0cf5(0x1b6)](_0x55da5e[_0x4d0cf5(0x183)]):_0x57d332['str'](_0x55da5e[_0x4d0cf5(0x183)]);if(_0x167b8d!==''&&_0x167b8d!==![])_0x15f337[_0x55da5e[_0x4d0cf5(0x183)]]=_0x167b8d;}if(_0x57d332[_0x4d0cf5(0x1bb)])_0x15f337['nonInteractive']=!![];return _0x15f337;}function a3_0x42f2(_0x48f71c,_0x3fffa5){_0x48f71c=_0x48f71c-0x16d;const _0xa7000c=a3_0xa700();let _0x42f2cf=_0xa7000c[_0x48f71c];return _0x42f2cf;}function normalizeLanguages(_0x4c2342){const _0x2b3e2c=a3_0x38ee5f;if(!Array[_0x2b3e2c(0x1a5)](_0x4c2342))return[];return _0x4c2342['filter'](_0x42f7c4=>typeof _0x42f7c4==='string')[_0x2b3e2c(0x1b8)](_0x11f485=>_0x11f485['trim']())[_0x2b3e2c(0x1a7)](Boolean);}function buildRemoteAppI18nFields(_0x31d40a){const _0x4a0cec=a3_0x38ee5f,_0x528489=normalizeLanguages(_0x31d40a[_0x4a0cec(0x19a)]?.[_0x4a0cec(0x198)]);return{'enableI18n':typeof _0x31d40a[_0x4a0cec(0x196)]===_0x4a0cec(0x1b0)?_0x31d40a[_0x4a0cec(0x196)]:null,'languages':_0x528489,'i18nInfo':_0x31d40a['i18nInfo']?{..._0x31d40a['i18nInfo'],'langs':_0x528489['length']?_0x528489:null}:null};}const initDef={'service':a3_0x38ee5f(0x1ac),'command':a3_0x38ee5f(0x1b2),'description':a3_0x38ee5f(0x18f),'risk':a3_0x38ee5f(0x1c1),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initCreateFlagDefs,async 'execute'(_0x48f4b7){const _0x2e0c30=a3_0x38ee5f;return warnDeprecatedAppCommand(_0x2e0c30(0x1b2),CLI_BIN_NAME+'\x20workspace\x20init\x20--appcode\x20<code>\x20[--env\x20daily]'),await runInit(collectFlags(_0x48f4b7,initCreateFlagDefs)),{'ok':!![]};}},listDef={'service':a3_0x38ee5f(0x1ac),'command':a3_0x38ee5f(0x16f),'description':'List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','risk':a3_0x38ee5f(0x19b),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':a3_0x38ee5f(0x17e),'type':a3_0x38ee5f(0x19e),'description':a3_0x38ee5f(0x1cc),'enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0x38ee5f(0x1c6),'type':a3_0x38ee5f(0x1b0),'description':a3_0x38ee5f(0x199),'default':![]},{'name':a3_0x38ee5f(0x182),'type':'boolean','description':a3_0x38ee5f(0x189),'default':![]},{'name':a3_0x38ee5f(0x181),'type':a3_0x38ee5f(0x1b0),'description':a3_0x38ee5f(0x19f),'default':![]}],async 'execute'(_0x234605){const _0x6485f4=a3_0x38ee5f,_0x1e37a3=_0x234605[_0x6485f4(0x18b)](_0x6485f4(0x17e))||_0x234605[_0x6485f4(0x180)]||getEnv()||_0x6485f4(0x1c9),_0x3aa2dc=_0x234605[_0x6485f4(0x1b6)](_0x6485f4(0x1c6)),_0x93c870=_0x234605[_0x6485f4(0x1b6)]('no-cache'),_0x4d5872=_0x234605[_0x6485f4(0x1b6)](_0x6485f4(0x181)),{readRawConfigWithLayers:_0x20be1f,resolveDefaultAppSource:_0x424d03,getLocalAppAliases:_0x124358}=await import(_0x6485f4(0x1ae)),{getRemoteAppList:_0x93edee}=await import(_0x6485f4(0x1a2)),{config:_0x17feff,layers:_0x40a220}=_0x20be1f(),_0x321bdc=_0x424d03(_0x40a220),{defaultApp:_0x2920ac}=_0x17feff,_0x5e2f38=await _0x93edee({'env':_0x1e37a3,'accessKey':_0x234605[_0x6485f4(0x179)],'localOnly':_0x3aa2dc,'noCache':_0x93c870}),_0x50c42e=_0x4d5872?_0x5e2f38[_0x6485f4(0x1c0)]:filterRuntimeAccessibleApps(_0x5e2f38[_0x6485f4(0x1c0)]),_0x1c73f4=_0x5e2f38[_0x6485f4(0x1c0)][_0x6485f4(0x176)]-_0x50c42e[_0x6485f4(0x176)],_0x50b805=_0x50c42e[_0x6485f4(0x1b8)](_0x2329e8=>{const _0x1698f2=_0x6485f4;return{'name':_0x2329e8[_0x1698f2(0x17a)],'appcode':_0x2329e8[_0x1698f2(0x17c)],'named':!![],'definedIn':_0x1698f2(0x1a3),'isDefault':_0x2329e8['appName']===_0x2920ac,...buildAppProfileListFields(_0x1e37a3),...buildRemoteAppI18nFields(_0x2329e8),'source':_0x5e2f38['source'],'owner':_0x2329e8['appOwnerName']??null,'status':_0x2329e8[_0x1698f2(0x172)]??null,'cachedAt':_0x5e2f38[_0x1698f2(0x1a1)]};}),_0x3905a4=_0x124358(_0x17feff);let _0x450401=0x0;for(const [_0x58f560,_0x40d600]of Object[_0x6485f4(0x1ad)](_0x3905a4)){const _0x34433=typeof _0x40d600['appcode']===_0x6485f4(0x19e)?_0x40d600[_0x6485f4(0x1c3)][_0x6485f4(0x18d)]():'';if(!_0x34433)continue;const _0x251ea=findAppByCode(_0x5e2f38['items'],_0x34433);if(!_0x4d5872&&_0x251ea&&!isRuntimeAccessibleApp(_0x251ea))continue;_0x450401+=0x1,_0x50b805[_0x6485f4(0x1bd)]({'name':_0x58f560,'appcode':_0x34433,'named':!![],'definedIn':'local','isDefault':_0x58f560===_0x2920ac,...buildAppProfileListFields(_0x1e37a3),'source':'config','owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0x50b805,_0x234605[_0x6485f4(0x17d)]);const _0x2f4298=_0x50b805[_0x6485f4(0x18c)](_0xf44153=>_0xf44153[_0x6485f4(0x1a6)]===!![]),_0x2ba383=_0x2920ac??_0x2f4298?.[_0x6485f4(0x183)]??null,_0x3ce6b5={'env':_0x1e37a3,'source':_0x5e2f38['source'],'fetchedAt':_0x5e2f38[_0x6485f4(0x1a1)],'cachePath':_0x5e2f38[_0x6485f4(0x1cb)],'globalPath':_0x40a220[_0x6485f4(0x190)]??null,'projectPath':_0x40a220[_0x6485f4(0x1be)]??null,'defaultApp':_0x2ba383,'defaultAppSource':_0x2920ac!=null?_0x321bdc:null,'localAliasCount':_0x450401,'remoteTotal':_0x5e2f38[_0x6485f4(0x1c0)][_0x6485f4(0x176)],'hiddenUnpublishedCount':_0x1c73f4,'includeUnpublished':_0x4d5872};if(_0x50b805[_0x6485f4(0x176)]===0x0)return{'ok':!![],'data':{'items':_0x50b805,'meta':_0x3ce6b5},'message':_0x5e2f38[_0x6485f4(0x1c4)]===_0x6485f4(0x1bc)?_0x6485f4(0x1b1):_0x6485f4(0x1c8)};return{'ok':!![],'data':{'items':_0x50b805,'meta':_0x3ce6b5}};}},pullDef={'service':a3_0x38ee5f(0x1ac),'command':a3_0x38ee5f(0x197),'description':a3_0x38ee5f(0x19d),'risk':a3_0x38ee5f(0x1c1),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'env','type':'string','description':'Target\x20environment\x20(default:\x20current\x20env)','enum':[...RUNTIME_ENV_VALUES]},{'name':'local','type':'boolean','description':'Read\x20from\x20local\x20cache\x20only','default':![]},{'name':a3_0x38ee5f(0x182),'type':a3_0x38ee5f(0x1b0),'description':a3_0x38ee5f(0x189),'default':![]}],async 'execute'(_0x3b1291){const _0x5966f8=a3_0x38ee5f,_0x312588=_0x3b1291[_0x5966f8(0x18b)]('env')||_0x3b1291['envName']||getEnv()||_0x5966f8(0x1c9),_0x8a14a4=_0x3b1291[_0x5966f8(0x1b6)](_0x5966f8(0x1c6)),_0x56afee=_0x3b1291[_0x5966f8(0x1b6)](_0x5966f8(0x182)),{getRemoteAppList:_0x216489}=await import(_0x5966f8(0x1a2)),_0x47b296=await _0x216489({'env':_0x312588,'accessKey':_0x3b1291[_0x5966f8(0x179)],'localOnly':_0x8a14a4,'noCache':_0x56afee});return{'ok':!![],'data':{'total':_0x47b296[_0x5966f8(0x1c0)][_0x5966f8(0x176)],'env':_0x312588,'source':_0x47b296[_0x5966f8(0x1c4)],'fetchedAt':_0x47b296[_0x5966f8(0x1a1)],'cachePath':_0x47b296['cachePath']},'message':_0x47b296[_0x5966f8(0x1c4)]===_0x5966f8(0x1bc)?_0x5966f8(0x1bf)+_0x47b296['items'][_0x5966f8(0x176)]+_0x5966f8(0x194)+_0x312588+'\x22.':_0x5966f8(0x175)+_0x47b296[_0x5966f8(0x1c0)][_0x5966f8(0x176)]+_0x5966f8(0x19c)+_0x312588+'\x22.'};}},useDef={'service':a3_0x38ee5f(0x1ac),'command':a3_0x38ee5f(0x1af),'description':'Deprecated:\x20use\x20workspace\x20use\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','risk':a3_0x38ee5f(0x1c1),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'name','description':a3_0x38ee5f(0x1a8),'required':!![]}],'flags':[GLOBAL_FLAG],async 'validate'(_0x16b10f){const _0x856ca9=a3_0x38ee5f;if(!_0x16b10f[_0x856ca9(0x1ba)][0x0])throw CliErrors['validation'](_0x856ca9(0x195),_0x856ca9(0x173)+CLI_BIN_NAME+_0x856ca9(0x1aa));},async 'execute'(_0x4ee1a0){const _0x4feb0b=a3_0x38ee5f;warnDeprecatedAppCommand(_0x4feb0b(0x1af),CLI_BIN_NAME+_0x4feb0b(0x1ca));const _0x421031=_0x4ee1a0[_0x4feb0b(0x1ba)][0x0];if(!_0x421031)throw CliErrors['validation'](_0x4feb0b(0x195),_0x4feb0b(0x173)+CLI_BIN_NAME+'\x20app\x20use\x20<name>\x20[--global]');const {buildConfigFromFlags:_0x96c605,resolveLocalAppAliasCode:_0x41f2fa}=await import(_0x4feb0b(0x1ae)),{readCachedAppList:_0x1fca66}=await import(_0x4feb0b(0x1b4)),_0x7e120f=_0x4ee1a0[_0x4feb0b(0x18b)](_0x4feb0b(0x17e)),_0x3b509f=_0x96c605(_0x7e120f?{'env':_0x7e120f}:{}),_0x5b77df=_0x1fca66(_0x3b509f['env'],_0x3b509f[_0x4feb0b(0x179)]),_0x4d3e87=_0x5b77df?.['items'][_0x4feb0b(0x18c)](_0x5264d0=>_0x5264d0[_0x4feb0b(0x17a)]===_0x421031),_0x28198c=_0x41f2fa(_0x3b509f[_0x4feb0b(0x188)]??{},_0x421031);if(_0x4d3e87&&!isRuntimeAccessibleApp(_0x4d3e87))throw runtimeInaccessibleAppError(_0x4d3e87,'\x22'+_0x421031+'\x22');if(_0x28198c){const _0x29851f=_0x5b77df?.[_0x4feb0b(0x1c0)][_0x4feb0b(0x18c)](_0x348090=>_0x348090[_0x4feb0b(0x17c)]?.[_0x4feb0b(0x18d)]()===_0x28198c);if(_0x29851f&&!isRuntimeAccessibleApp(_0x29851f))throw runtimeInaccessibleAppError(_0x29851f,'\x22'+_0x421031+'\x22');}if(!_0x4d3e87&&!_0x28198c&&_0x3b509f[_0x4feb0b(0x18a)]!==_0x421031){const _0x371b9f=[..._0x5b77df?.[_0x4feb0b(0x1c0)][_0x4feb0b(0x1b8)](_0x5165f2=>_0x5165f2[_0x4feb0b(0x17a)])??[]],_0xb09b39=_0x371b9f['length']===0x0?_0x4feb0b(0x1b5)+CLI_BIN_NAME+_0x4feb0b(0x185)+_0x421031+_0x4feb0b(0x186):'Available\x20remote\x20apps:\x20'+Array[_0x4feb0b(0x18e)](new Set(_0x371b9f))[_0x4feb0b(0x1a0)](',\x20')+_0x4feb0b(0x1a4);throw CliErrors[_0x4feb0b(0x16e)](_0x4feb0b(0x171)+_0x421031+_0x4feb0b(0x1a9),_0xb09b39);}const _0xb67b21=_0x4ee1a0[_0x4feb0b(0x1b6)](_0x4feb0b(0x177));let _0x5f0d32;if(_0xb67b21)_0x5f0d32={'global':!![]};else{const {isInProject:_0x86bf31}=await import(_0x4feb0b(0x1ae)),_0x40c7f8=_0x86bf31();_0x5f0d32=toScopeFlags(resolveConfigScope({'explicitGlobal':![],'policy':'project-default','inProject':_0x40c7f8}));}const _0x4addd4=readConfig(_0x5f0d32);return _0x4addd4[_0x4feb0b(0x18a)]=_0x421031,writeConfig(_0x4addd4,_0x5f0d32),{'ok':!![],'message':_0x4feb0b(0x170)+_0x421031+'\x22'+scopeLabel(_0x5f0d32)+'.'};}};function warnDeprecatedAppCommand(_0x1eb3fa,_0x59902a){const _0x332800=a3_0x38ee5f;console[_0x332800(0x192)](CLI_BIN_NAME+_0x332800(0x1ab)+_0x1eb3fa+'\x20is\x20deprecated.\x20Use\x20`'+_0x59902a+_0x332800(0x174));}const importDef={'service':a3_0x38ee5f(0x1ac),'command':a3_0x38ee5f(0x1c2),'description':a3_0x38ee5f(0x16d),'risk':a3_0x38ee5f(0x1c1),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initImportFlagDefs,async 'execute'(_0x23ed2f){return await runInitImport(collectFlags(_0x23ed2f,initImportFlagDefs)),{'ok':!![]};}};export const appDefinitions=[initDef,listDef,pullDef,useDef,importDef];
|
|
1
|
+
const a3_0x35a1dc=a3_0x56c5;(function(_0x5ce721,_0x4b9b30){const _0x33096e=a3_0x56c5,_0x33fb04=_0x5ce721();while(!![]){try{const _0x52008a=-parseInt(_0x33096e(0x137))/0x1+-parseInt(_0x33096e(0x17c))/0x2+parseInt(_0x33096e(0x17d))/0x3*(parseInt(_0x33096e(0x172))/0x4)+parseInt(_0x33096e(0x181))/0x5+parseInt(_0x33096e(0x168))/0x6+parseInt(_0x33096e(0x18d))/0x7+-parseInt(_0x33096e(0x14e))/0x8*(-parseInt(_0x33096e(0x18b))/0x9);if(_0x52008a===_0x4b9b30)break;else _0x33fb04['push'](_0x33fb04['shift']());}catch(_0x20d46f){_0x33fb04['push'](_0x33fb04['shift']());}}}(a3_0x5ab1,0x8e2f3));import{CliErrors}from'../../errors.js';import{initCreateFlagDefs,initImportFlagDefs,runInit,runInitImport}from'../../commands/init.js';import{getEnv,RUNTIME_ENV_VALUES}from'../../constant/env.js';function a3_0x5ab1(){const _0x589249=['Read\x20app\x20list\x20from\x20local\x20cache\x20only','1751912jszAAH','from','args','boolean','accessKey','envName','env','Remote\x20app\x20name\x20to\x20activate','no-cache','cache','raw','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','../../context.js','appPublishStatus','Available\x20remote\x20apps:\x20','\x20app\x20','warn','Missing\x20app\x20name.','List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','defaultApp','enableI18n','\x20app\x20use\x20<name>\x20[--global]','.\x20Local\x20aliases\x20can\x20be\x20added\x20under\x20apps.<alias>.appcode.','production','i18nInfo','Use\x20`','1606962XMTAnA','fetchedAt','filter','local','cachePath','items','globalPath','\x20workspace\x20use\x20--app\x20<name>\x20[--env\x20daily]','Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','remote','12cfwPNO','Filter\x20by\x20environment\x20(default:\x20current\x20env)','init','global','source','No\x20apps\x20found\x20on\x20the\x20platform.','langs','.appcode\x20to\x20.lovrabet.json.','write','entries','1042142GNemmQ','357531SeDMkD','appOwnerName','isArray','include-unpublished','5352425WQbDtZ','Include\x20unpublished\x20apps\x20for\x20diagnostics','No\x20cached\x20apps\x20found.','Refreshed\x20app\x20cache\x20with\x20','list','\x20is\x20deprecated.\x20Use\x20`','\x20workspace\x20init\x20--appcode\x20<code>\x20[--env\x20daily]','mergedCli','projectPath','project-default','9deOOfL','isCurrent','1032703BjesVy','appName','../../commands/app/remote-source.js','trim','958903MdLNjd','validation','Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','name','bool','join','config','appcode','Use\x20global\x20config\x20scope','type','app','map','Deprecated:\x20use\x20workspace\x20use\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','import','use','find','Usage:\x20','str','length','Default\x20app\x20candidate\x20set\x20to\x20\x22','App\x20\x22','string'];a3_0x5ab1=function(){return _0x589249;};return a3_0x5ab1();}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_0x35a1dc(0x175),'type':'boolean','description':a3_0x35a1dc(0x13f),'default':![]};function collectFlags(_0x2fb3a0,_0x39eaf6){const _0x32674f=a3_0x35a1dc,_0x3ec0f7={};for(const _0x296e60 of _0x39eaf6){const _0x8a9a57=_0x296e60[_0x32674f(0x140)]===_0x32674f(0x151)?_0x2fb3a0[_0x32674f(0x13b)](_0x296e60[_0x32674f(0x13a)]):_0x2fb3a0['str'](_0x296e60['name']);if(_0x8a9a57!==''&&_0x8a9a57!==![])_0x3ec0f7[_0x296e60[_0x32674f(0x13a)]]=_0x8a9a57;}if(_0x2fb3a0['nonInteractive'])_0x3ec0f7['nonInteractive']=!![];return _0x3ec0f7;}function a3_0x56c5(_0x102ad1,_0x40a280){_0x102ad1=_0x102ad1-0x137;const _0x5ab156=a3_0x5ab1();let _0x56c596=_0x5ab156[_0x102ad1];return _0x56c596;}function normalizeLanguages(_0x287110){const _0x27513b=a3_0x35a1dc;if(!Array[_0x27513b(0x17f)](_0x287110))return[];return _0x287110[_0x27513b(0x16a)](_0x6f1423=>typeof _0x6f1423==='string')['map'](_0x451547=>_0x451547['trim']())[_0x27513b(0x16a)](Boolean);}function buildRemoteAppI18nFields(_0x3fc816){const _0x1d7bf3=a3_0x35a1dc,_0xa8ad23=normalizeLanguages(_0x3fc816[_0x1d7bf3(0x166)]?.[_0x1d7bf3(0x178)]);return{'enableI18n':typeof _0x3fc816[_0x1d7bf3(0x162)]===_0x1d7bf3(0x151)?_0x3fc816[_0x1d7bf3(0x162)]:null,'languages':_0xa8ad23,'i18nInfo':_0x3fc816[_0x1d7bf3(0x166)]?{..._0x3fc816[_0x1d7bf3(0x166)],'langs':_0xa8ad23[_0x1d7bf3(0x149)]?_0xa8ad23:null}:null};}const initDef={'service':'app','command':a3_0x35a1dc(0x174),'description':'Deprecated:\x20use\x20workspace\x20init\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','risk':a3_0x35a1dc(0x17a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initCreateFlagDefs,async 'execute'(_0x2c74c5){const _0x13d5e4=a3_0x35a1dc;return warnDeprecatedAppCommand(_0x13d5e4(0x174),CLI_BIN_NAME+_0x13d5e4(0x187)),await runInit(collectFlags(_0x2c74c5,initCreateFlagDefs)),{'ok':!![]};}},listDef={'service':'app','command':a3_0x35a1dc(0x185),'description':a3_0x35a1dc(0x160),'risk':'read','requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':a3_0x35a1dc(0x154),'type':a3_0x35a1dc(0x14c),'description':a3_0x35a1dc(0x173),'enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0x35a1dc(0x16b),'type':a3_0x35a1dc(0x151),'description':a3_0x35a1dc(0x14d),'default':![]},{'name':'no-cache','type':a3_0x35a1dc(0x151),'description':a3_0x35a1dc(0x159),'default':![]},{'name':a3_0x35a1dc(0x180),'type':a3_0x35a1dc(0x151),'description':a3_0x35a1dc(0x182),'default':![]}],async 'execute'(_0x5c0e97){const _0x43805e=a3_0x35a1dc,_0x449f22=_0x5c0e97['str']('env')||_0x5c0e97[_0x43805e(0x153)]||getEnv()||_0x43805e(0x165),_0x261f35=_0x5c0e97[_0x43805e(0x13b)]('local'),_0x46fd4b=_0x5c0e97[_0x43805e(0x13b)](_0x43805e(0x156)),_0x2fc541=_0x5c0e97[_0x43805e(0x13b)](_0x43805e(0x180)),{readRawConfigWithLayers:_0x28fda6,resolveDefaultAppSource:_0x1963df,getLocalAppAliases:_0x441ac5}=await import('../../context.js'),{getRemoteAppList:_0x2d1878}=await import(_0x43805e(0x18f)),{config:_0x3da62c,layers:_0x4418b5}=_0x28fda6(),_0x51c975=_0x1963df(_0x4418b5),{defaultApp:_0x55823b}=_0x3da62c,_0x37ef21=await _0x2d1878({'env':_0x449f22,'accessKey':_0x5c0e97['accessKey'],'localOnly':_0x261f35,'noCache':_0x46fd4b}),_0xfaca49=_0x2fc541?_0x37ef21[_0x43805e(0x16d)]:filterRuntimeAccessibleApps(_0x37ef21[_0x43805e(0x16d)]),_0x5ee5a5=_0x37ef21[_0x43805e(0x16d)][_0x43805e(0x149)]-_0xfaca49[_0x43805e(0x149)],_0x565c6b=_0xfaca49[_0x43805e(0x142)](_0x260a97=>{const _0x1c7433=_0x43805e;return{'name':_0x260a97['appName'],'appcode':_0x260a97['appCode'],'named':!![],'definedIn':_0x1c7433(0x171),'isDefault':_0x260a97[_0x1c7433(0x18e)]===_0x55823b,...buildAppProfileListFields(_0x449f22),...buildRemoteAppI18nFields(_0x260a97),'source':_0x37ef21[_0x1c7433(0x176)],'owner':_0x260a97[_0x1c7433(0x17e)]??null,'status':_0x260a97[_0x1c7433(0x15b)]??null,'cachedAt':_0x37ef21[_0x1c7433(0x169)]};}),_0x91e362=_0x441ac5(_0x3da62c);let _0x4121d3=0x0;for(const [_0x37accf,_0x57ed3e]of Object[_0x43805e(0x17b)](_0x91e362)){const _0x1e5595=typeof _0x57ed3e[_0x43805e(0x13e)]===_0x43805e(0x14c)?_0x57ed3e[_0x43805e(0x13e)][_0x43805e(0x190)]():'';if(!_0x1e5595)continue;const _0x3170d3=findAppByCode(_0x37ef21['items'],_0x1e5595);if(!_0x2fc541&&_0x3170d3&&!isRuntimeAccessibleApp(_0x3170d3))continue;_0x4121d3+=0x1,_0x565c6b['push']({'name':_0x37accf,'appcode':_0x1e5595,'named':!![],'definedIn':_0x43805e(0x16b),'isDefault':_0x37accf===_0x55823b,...buildAppProfileListFields(_0x449f22),'source':_0x43805e(0x13d),'owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0x565c6b,_0x5c0e97[_0x43805e(0x188)]);const _0x117f5f=_0x565c6b[_0x43805e(0x146)](_0x21e6d7=>_0x21e6d7[_0x43805e(0x18c)]===!![]),_0x1edc3b=_0x55823b??_0x117f5f?.['name']??null,_0x584ab9={'env':_0x449f22,'source':_0x37ef21[_0x43805e(0x176)],'fetchedAt':_0x37ef21[_0x43805e(0x169)],'cachePath':_0x37ef21[_0x43805e(0x16c)],'globalPath':_0x4418b5[_0x43805e(0x16e)]??null,'projectPath':_0x4418b5[_0x43805e(0x189)]??null,'defaultApp':_0x1edc3b,'defaultAppSource':_0x55823b!=null?_0x51c975:null,'localAliasCount':_0x4121d3,'remoteTotal':_0x37ef21['items'][_0x43805e(0x149)],'hiddenUnpublishedCount':_0x5ee5a5,'includeUnpublished':_0x2fc541};if(_0x565c6b['length']===0x0)return{'ok':!![],'data':{'items':_0x565c6b,'meta':_0x584ab9},'message':_0x37ef21['source']===_0x43805e(0x157)?_0x43805e(0x183):_0x43805e(0x177)};return{'ok':!![],'data':{'items':_0x565c6b,'meta':_0x584ab9}};}},pullDef={'service':a3_0x35a1dc(0x141),'command':'pull','description':a3_0x35a1dc(0x170),'risk':a3_0x35a1dc(0x17a),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'env','type':a3_0x35a1dc(0x14c),'description':'Target\x20environment\x20(default:\x20current\x20env)','enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0x35a1dc(0x16b),'type':a3_0x35a1dc(0x151),'description':'Read\x20from\x20local\x20cache\x20only','default':![]},{'name':a3_0x35a1dc(0x156),'type':a3_0x35a1dc(0x151),'description':a3_0x35a1dc(0x159),'default':![]}],async 'execute'(_0x4be7e8){const _0x1afdf3=a3_0x35a1dc,_0x53c4f3=_0x4be7e8[_0x1afdf3(0x148)](_0x1afdf3(0x154))||_0x4be7e8['envName']||getEnv()||'production',_0x3f5086=_0x4be7e8[_0x1afdf3(0x13b)](_0x1afdf3(0x16b)),_0x551d48=_0x4be7e8[_0x1afdf3(0x13b)](_0x1afdf3(0x156)),{getRemoteAppList:_0x1bfcd0}=await import(_0x1afdf3(0x18f)),_0x544514=await _0x1bfcd0({'env':_0x53c4f3,'accessKey':_0x4be7e8['accessKey'],'localOnly':_0x3f5086,'noCache':_0x551d48});return{'ok':!![],'data':{'total':_0x544514[_0x1afdf3(0x16d)]['length'],'env':_0x53c4f3,'source':_0x544514[_0x1afdf3(0x176)],'fetchedAt':_0x544514[_0x1afdf3(0x169)],'cachePath':_0x544514['cachePath']},'message':_0x544514[_0x1afdf3(0x176)]===_0x1afdf3(0x157)?'Loaded\x20'+_0x544514[_0x1afdf3(0x16d)]['length']+'\x20cached\x20app(s)\x20for\x20env=\x22'+_0x53c4f3+'\x22.':_0x1afdf3(0x184)+_0x544514[_0x1afdf3(0x16d)][_0x1afdf3(0x149)]+'\x20app(s)\x20for\x20env=\x22'+_0x53c4f3+'\x22.'};}},useDef={'service':a3_0x35a1dc(0x141),'command':a3_0x35a1dc(0x145),'description':a3_0x35a1dc(0x143),'risk':a3_0x35a1dc(0x17a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a3_0x35a1dc(0x13a),'description':a3_0x35a1dc(0x155),'required':!![]}],'flags':[GLOBAL_FLAG],async 'validate'(_0x514ef7){const _0x5b9719=a3_0x35a1dc;if(!_0x514ef7[_0x5b9719(0x150)][0x0])throw CliErrors[_0x5b9719(0x138)](_0x5b9719(0x15f),_0x5b9719(0x147)+CLI_BIN_NAME+'\x20app\x20use\x20<name>\x20[--global]');},async 'execute'(_0x5b7121){const _0x5e9256=a3_0x35a1dc;warnDeprecatedAppCommand('use',CLI_BIN_NAME+_0x5e9256(0x16f));const _0x2c54a1=_0x5b7121[_0x5e9256(0x150)][0x0];if(!_0x2c54a1)throw CliErrors['validation'](_0x5e9256(0x15f),_0x5e9256(0x147)+CLI_BIN_NAME+_0x5e9256(0x163));const {buildConfigFromFlags:_0x13607c,resolveLocalAppAliasCode:_0x40b97e}=await import(_0x5e9256(0x15a)),{readCachedAppList:_0x11c6a2}=await import('../../commands/app/cache.js'),_0x32cd99=_0x5b7121['str'](_0x5e9256(0x154)),_0x22daaf=_0x13607c(_0x32cd99?{'env':_0x32cd99}:{}),_0x1d4837=_0x11c6a2(_0x22daaf[_0x5e9256(0x154)],_0x22daaf[_0x5e9256(0x152)]),_0x2b6c63=_0x1d4837?.[_0x5e9256(0x16d)][_0x5e9256(0x146)](_0x3d485e=>_0x3d485e[_0x5e9256(0x18e)]===_0x2c54a1),_0x169a3a=_0x40b97e(_0x22daaf[_0x5e9256(0x158)]??{},_0x2c54a1);if(_0x2b6c63&&!isRuntimeAccessibleApp(_0x2b6c63))throw runtimeInaccessibleAppError(_0x2b6c63,'\x22'+_0x2c54a1+'\x22');if(_0x169a3a){const _0x40c099=_0x1d4837?.[_0x5e9256(0x16d)][_0x5e9256(0x146)](_0x9951d8=>_0x9951d8['appCode']?.[_0x5e9256(0x190)]()===_0x169a3a);if(_0x40c099&&!isRuntimeAccessibleApp(_0x40c099))throw runtimeInaccessibleAppError(_0x40c099,'\x22'+_0x2c54a1+'\x22');}if(!_0x2b6c63&&!_0x169a3a&&_0x22daaf[_0x5e9256(0x161)]!==_0x2c54a1){const _0xf8321a=[..._0x1d4837?.[_0x5e9256(0x16d)][_0x5e9256(0x142)](_0x686bff=>_0x686bff[_0x5e9256(0x18e)])??[]],_0x82a9fc=_0xf8321a[_0x5e9256(0x149)]===0x0?_0x5e9256(0x167)+CLI_BIN_NAME+'\x20app\x20list`\x20to\x20discover\x20remote\x20apps,\x20or\x20add\x20apps.'+_0x2c54a1+_0x5e9256(0x179):_0x5e9256(0x15c)+Array[_0x5e9256(0x14f)](new Set(_0xf8321a))[_0x5e9256(0x13c)](',\x20')+_0x5e9256(0x164);throw CliErrors[_0x5e9256(0x138)](_0x5e9256(0x14b)+_0x2c54a1+'\x22\x20not\x20found.',_0x82a9fc);}const _0x46377d=_0x5b7121[_0x5e9256(0x13b)](_0x5e9256(0x175));let _0x4d9231;if(_0x46377d)_0x4d9231={'global':!![]};else{const {isInProject:_0x14cb43}=await import(_0x5e9256(0x15a)),_0x3aeeee=_0x14cb43();_0x4d9231=toScopeFlags(resolveConfigScope({'explicitGlobal':![],'policy':_0x5e9256(0x18a),'inProject':_0x3aeeee}));}const _0x5a0714=readConfig(_0x4d9231);return _0x5a0714[_0x5e9256(0x161)]=_0x2c54a1,writeConfig(_0x5a0714,_0x4d9231),{'ok':!![],'message':_0x5e9256(0x14a)+_0x2c54a1+'\x22'+scopeLabel(_0x4d9231)+'.'};}};function warnDeprecatedAppCommand(_0xeec197,_0x52ad5d){const _0x3e5e64=a3_0x35a1dc;console[_0x3e5e64(0x15e)](CLI_BIN_NAME+_0x3e5e64(0x15d)+_0xeec197+_0x3e5e64(0x186)+_0x52ad5d+'`\x20instead.');}const importDef={'service':'app','command':a3_0x35a1dc(0x144),'description':a3_0x35a1dc(0x139),'risk':a3_0x35a1dc(0x17a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initImportFlagDefs,async 'execute'(_0x4d9383){return await runInitImport(collectFlags(_0x4d9383,initImportFlagDefs)),{'ok':!![]};}};export const appDefinitions=[initDef,listDef,pullDef,useDef,importDef];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5d55cd,_0x4d6675){const _0x5e0229=a4_0x4f44,_0x10f630=_0x5d55cd();while(!![]){try{const _0x32cc64=-parseInt(_0x5e0229(0x143))/0x1*(parseInt(_0x5e0229(0x14d))/0x2)+-parseInt(_0x5e0229(0x157))/0x3+-parseInt(_0x5e0229(0x153))/0x4*(-parseInt(_0x5e0229(0x15a))/0x5)+-parseInt(_0x5e0229(0x159))/0x6+parseInt(_0x5e0229(0x14a))/0x7*(parseInt(_0x5e0229(0x14f))/0x8)+-parseInt(_0x5e0229(0x155))/0x9*(-parseInt(_0x5e0229(0x151))/0xa)+-parseInt(_0x5e0229(0x146))/0xb;if(_0x32cc64===_0x4d6675)break;else _0x10f630['push'](_0x10f630['shift']());}catch(_0x4652cb){_0x10f630['push'](_0x10f630['shift']());}}}(a4_0x19aa,0xd8e1d));import{CLI_BIN_NAME}from'../../constant/cli.js';function a4_0x19aa(){const _0x72a7ec=['trim','8RyIfWn','validation','1600390MIyHsx','filter','2252yqjjJZ','\x20is\x20not\x20available\x20for\x20runtime\x20AI\x20access.','72MpcpSG','string','259530jfWJHH','Current\x20status:\x20','6355476bGCuhE','4805qfgKvV','1505jurcRv','toUpperCase','appName','1827595YomKSp','.\x20Publish\x20the\x20app\x20before\x20using\x20','appPublishStatus','\x20dataset/data/sql/bff\x20commands,\x20or\x20choose\x20a\x20published\x20app.','7951370OeVULZ','find','appCode','1006HaDSkM'];a4_0x19aa=function(){return _0x72a7ec;};return a4_0x19aa();}import{RUNTIME_ACCESSIBLE_APP_STATUS}from'../../constant/app.js';import{CliErrors}from'../../errors.js';export function normalizeAppPublishStatus(_0x29fd2a){const _0x14645d=a4_0x4f44;if(typeof _0x29fd2a!==_0x14645d(0x156))return null;const _0x1c56c3=_0x29fd2a['trim']();return _0x1c56c3?_0x1c56c3[_0x14645d(0x144)]():null;}export function isRuntimeAccessibleApp(_0x1ab0e7){const _0xd2e157=a4_0x4f44;return normalizeAppPublishStatus(_0x1ab0e7[_0xd2e157(0x148)])===RUNTIME_ACCESSIBLE_APP_STATUS;}function a4_0x4f44(_0x827223,_0x3da16b){_0x827223=_0x827223-0x143;const _0x19aaff=a4_0x19aa();let _0x4f44fb=_0x19aaff[_0x827223];return _0x4f44fb;}export function filterRuntimeAccessibleApps(_0x2a2d67){const _0x24bbd5=a4_0x4f44;return _0x2a2d67[_0x24bbd5(0x152)](isRuntimeAccessibleApp);}export function findAppByName(_0x132740,_0x394fab){const _0x365d1a=a4_0x4f44;return _0x132740[_0x365d1a(0x14b)](_0x51f312=>_0x51f312[_0x365d1a(0x145)]===_0x394fab);}export function findAppByCode(_0x14d65d,_0x5c0fa8){const _0x338982=a4_0x4f44,_0x2630b8=_0x5c0fa8[_0x338982(0x14e)]();if(!_0x2630b8)return undefined;return _0x14d65d['find'](_0x2691e9=>_0x2691e9[_0x338982(0x14c)]?.[_0x338982(0x14e)]()===_0x2630b8);}export function runtimeInaccessibleAppError(_0x1aaa0a,_0x528d50){const _0x3e445e=a4_0x4f44,_0x29e7fb=normalizeAppPublishStatus(_0x1aaa0a[_0x3e445e(0x148)])??'UNKNOWN';return CliErrors[_0x3e445e(0x150)]('App\x20'+_0x528d50+_0x3e445e(0x154),_0x3e445e(0x158)+_0x29e7fb+_0x3e445e(0x147)+CLI_BIN_NAME+_0x3e445e(0x149));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2ee69c,_0x4b89c8){const _0x3c335d=a5_0x333a,_0x197e90=_0x2ee69c();while(!![]){try{const _0x311397=parseInt(_0x3c335d(0x1e5))/0x1*(parseInt(_0x3c335d(0x1e0))/0x2)+parseInt(_0x3c335d(0x1de))/0x3*(-parseInt(_0x3c335d(0x1e7))/0x4)+parseInt(_0x3c335d(0x1e6))/0x5*(-parseInt(_0x3c335d(0x1db))/0x6)+-parseInt(_0x3c335d(0x1e8))/0x7+-parseInt(_0x3c335d(0x1d8))/0x8*(-parseInt(_0x3c335d(0x1da))/0x9)+-parseInt(_0x3c335d(0x1df))/0xa+parseInt(_0x3c335d(0x1d7))/0xb;if(_0x311397===_0x4b89c8)break;else _0x197e90['push'](_0x197e90['shift']());}catch(_0x3d3383){_0x197e90['push'](_0x197e90['shift']());}}}(a5_0x4e54,0x5daf6));import{fileURLToPath}from'url';import{dirname,join}from'path';function a5_0x333a(_0x3c2242,_0x70a899){_0x3c2242=_0x3c2242-0x1d7;const _0x4e5424=a5_0x4e54();let _0x333a3d=_0x4e5424[_0x3c2242];return _0x333a3d;}import{readFileSync}from'fs';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function loadMockAppList(){const _0x3ffc11=a5_0x333a,_0x315bed=join(__dirname,_0x3ffc11(0x1dd)),_0x4244d5=readFileSync(_0x315bed,_0x3ffc11(0x1e4));return JSON[_0x3ffc11(0x1d9)](_0x4244d5);}function a5_0x4e54(){const _0x35f5d1=['4493496XaJxxM','19888286pGkpqH','1208BfxSQx','parse','22329SZQyed','18QVjOZQ','tableData','../../../mock/app-list.json','9ZEfdTj','5822530cScWoE','16qxQlqL','errorCode','data','success','utf-8','6170cQszmz','337975kcVuyC','561756bmcSfH'];a5_0x4e54=function(){return _0x35f5d1;};return a5_0x4e54();}let _cached=null;export function getMockAppList(){return!_cached&&(_cached=loadMockAppList()),_cached;}export function getMockRemoteAppItems(){const _0x42660a=a5_0x333a,_0x47ec4c=getMockAppList();if(!_0x47ec4c[_0x42660a(0x1e3)])throw new Error('Mock\x20API\x20error:\x20'+_0x47ec4c['errorMsg']+'\x20('+_0x47ec4c[_0x42660a(0x1e1)]+')');return _0x47ec4c[_0x42660a(0x1e2)][_0x42660a(0x1dc)];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3cfa08,_0x25121f){const _0x4c7eb0=a6_0x2db2,_0x45de3f=_0x3cfa08();while(!![]){try{const _0x500007=-parseInt(_0x4c7eb0(0x174))/0x1*(-parseInt(_0x4c7eb0(0x16c))/0x2)+parseInt(_0x4c7eb0(0x16f))/0x3*(parseInt(_0x4c7eb0(0x176))/0x4)+parseInt(_0x4c7eb0(0x178))/0x5*(parseInt(_0x4c7eb0(0x179))/0x6)+-parseInt(_0x4c7eb0(0x175))/0x7+parseInt(_0x4c7eb0(0x173))/0x8+parseInt(_0x4c7eb0(0x17a))/0x9+-parseInt(_0x4c7eb0(0x177))/0xa;if(_0x500007===_0x25121f)break;else _0x45de3f['push'](_0x45de3f['shift']());}catch(_0x385c4e){_0x45de3f['push'](_0x45de3f['shift']());}}}(a6_0x12dc,0xc961f));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';function a6_0x2db2(_0x52eb91,_0xfc3dbe){_0x52eb91=_0x52eb91-0x16b;const _0x12dc90=a6_0x12dc();let _0x2db2bc=_0x12dc90[_0x52eb91];return _0x2db2bc;}export function shouldUseMockRemoteApps(){const _0x41b742=a6_0x2db2,_0x397640=(productEnv('APP_LIST_SOURCE')||'')[_0x41b742(0x171)]()['toLowerCase']();return _0x397640==='mock';}export async function getRemoteAppItems(){if(shouldUseMockRemoteApps())return getMockRemoteAppItems();return getMyApps();}export async function getRemoteAppList(_0x32cc32){const _0x278509=a6_0x2db2,{env:_0x1972d2,accessKey:_0xdf9f92,localOnly:localOnly=![],noCache:noCache=![]}=_0x32cc32,_0x36060e=readCachedAppList(_0x1972d2,_0xdf9f92),_0x5a6dc6=_0xdf9f92?.[_0x278509(0x171)]()?getAppCacheFilePath(_0x1972d2,_0xdf9f92):null;if(localOnly)return{'items':_0x36060e?.[_0x278509(0x16e)]??[],'source':_0x278509(0x16d),'fetchedAt':_0x36060e?.[_0x278509(0x170)]??null,'cachePath':_0x5a6dc6};try{const _0x5894ab=await getRemoteAppItems(),_0x4c5014=shouldUseMockRemoteApps()?_0x278509(0x16b):'remote',_0x429639=new Date()[_0x278509(0x172)](),_0x4e6fd6=_0xdf9f92?.['trim']()?writeCachedAppList(_0x1972d2,_0xdf9f92,{'env':_0x1972d2,'fetchedAt':_0x429639,'source':_0x4c5014,'items':_0x5894ab}):null;return{'items':_0x5894ab,'source':_0x4c5014,'fetchedAt':_0x429639,'cachePath':_0x4e6fd6};}catch(_0x1c56db){if(!noCache&&_0x36060e)return{'items':_0x36060e[_0x278509(0x16e)],'source':_0x278509(0x16d),'fetchedAt':_0x36060e['fetchedAt'],'cachePath':_0x5a6dc6};throw _0x1c56db;}}function a6_0x12dc(){const _0x28a7be=['mock','975878hqRkOo','cache','items','2877207NwwDVP','fetchedAt','trim','toISOString','10375848bLhKEG','3BBrVtc','4657296oaBubS','4jXbSlu','51699160ZyOeCN','3881165hIOHkY','12MRlMah','12489966GzOKHq'];a6_0x12dc=function(){return _0x28a7be;};return a6_0x12dc();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2bb205,_0x5a409d){const _0x1299f7=a7_0x5eff,_0x16ef39=_0x2bb205();while(!![]){try{const _0x5400cb=parseInt(_0x1299f7(0xdf))/0x1*(parseInt(_0x1299f7(0xe7))/0x2)+parseInt(_0x1299f7(0xe3))/0x3+parseInt(_0x1299f7(0xe5))/0x4+-parseInt(_0x1299f7(0xe8))/0x5*(-parseInt(_0x1299f7(0xeb))/0x6)+-parseInt(_0x1299f7(0xd8))/0x7+-parseInt(_0x1299f7(0xe1))/0x8*(parseInt(_0x1299f7(0xea))/0x9)+-parseInt(_0x1299f7(0xe9))/0xa*(parseInt(_0x1299f7(0xdb))/0xb);if(_0x5400cb===_0x5a409d)break;else _0x16ef39['push'](_0x16ef39['shift']());}catch(_0x2cfc04){_0x16ef39['push'](_0x16ef39['shift']());}}}(a7_0x1219,0xbdafb));import{CLI_BIN_NAME}from'../../constant/cli.js';import{formatScopeLabel}from'../../commands/common/config-policy.js';function a7_0x5eff(_0x2b986d,_0x12f372){_0x2b986d=_0x2b986d-0xd8;const _0x1219ef=a7_0x1219();let _0x5eff7c=_0x1219ef[_0x2b986d];return _0x5eff7c;}export{CLI_BIN_NAME};export function enrichAppListItemsWithMergedSelection(_0x391272,_0x3f46a2){const _0x1f434d=a7_0x5eff;if(!_0x3f46a2)return;const _0x58a90a=!!(_0x3f46a2['currentApp']??_0x3f46a2[_0x1f434d(0xe6)]);for(const _0x2255ac of _0x391272){_0x2255ac['isCurrent']=![];}const _0x56546d=_0x3f46a2['appCode']!=null?String(_0x3f46a2[_0x1f434d(0xdd)])[_0x1f434d(0xe2)]():'';if(_0x58a90a){const _0x4d415f=_0x3f46a2[_0x1f434d(0xed)]??_0x3f46a2[_0x1f434d(0xe6)];if(_0x4d415f){const _0x12e916=_0x391272[_0x1f434d(0xdc)](_0x4094cb=>_0x4094cb['named']===!![]&&_0x4094cb['name']===_0x4d415f&&_0x4094cb[_0x1f434d(0xec)]===_0x1f434d(0xe0)),_0x1bbc02=_0x12e916??_0x391272[_0x1f434d(0xdc)](_0x1f95fe=>_0x1f95fe[_0x1f434d(0xe4)]===!![]&&_0x1f95fe[_0x1f434d(0xd9)]===_0x4d415f);_0x1bbc02&&(_0x1bbc02['isCurrent']=!![]);}return;}if(!_0x56546d)return;for(const _0x2e7f8a of _0x391272){String(_0x2e7f8a['appcode']??'')['trim']()===_0x56546d&&(_0x2e7f8a[_0x1f434d(0xde)]=!![]);}}function a7_0x1219(){const _0x3c7db6=['5715283ssQSjp','name','project','2145913KPHjES','find','appCode','isCurrent','616079EBvkxG','local','2332536rZyBNQ','trim','3119232kSQQoQ','named','1289300NCMIGf','defaultApp','4aGtZUG','2095xkuHUn','50kqNFAX','27ZzaYAs','12162ZSAewZ','definedIn','currentApp'];a7_0x1219=function(){return _0x3c7db6;};return a7_0x1219();}export{readScopedConfig as readConfig,writeScopedConfig as writeConfig,isInProject}from'../../context.js';export function scopeLabel(_0x254cf6){const _0x53c80f=a7_0x5eff;return formatScopeLabel(_0x254cf6['global']?'global':_0x53c80f(0xda));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a8_0x4acb(_0xcc9bab,_0x37cae0){_0xcc9bab=_0xcc9bab-0x6a;const _0x8702d9=a8_0x8702();let _0x4acbbe=_0x8702d9[_0xcc9bab];return _0x4acbbe;}const a8_0x42edf8=a8_0x4acb;(function(_0x714de,_0x257004){const _0x5fcbf4=a8_0x4acb,_0x6fade7=_0x714de();while(!![]){try{const _0x4e33b8=parseInt(_0x5fcbf4(0x7a))/0x1*(parseInt(_0x5fcbf4(0x9e))/0x2)+parseInt(_0x5fcbf4(0xa8))/0x3*(parseInt(_0x5fcbf4(0x9b))/0x4)+parseInt(_0x5fcbf4(0x8c))/0x5*(-parseInt(_0x5fcbf4(0xac))/0x6)+-parseInt(_0x5fcbf4(0x95))/0x7+parseInt(_0x5fcbf4(0x8a))/0x8*(-parseInt(_0x5fcbf4(0x89))/0x9)+-parseInt(_0x5fcbf4(0xa3))/0xa+-parseInt(_0x5fcbf4(0xb0))/0xb*(-parseInt(_0x5fcbf4(0x91))/0xc);if(_0x4e33b8===_0x257004)break;else _0x6fade7['push'](_0x6fade7['shift']());}catch(_0x5b4bf3){_0x6fade7['push'](_0x6fade7['shift']());}}}(a8_0x8702,0x189a2));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=a8_0x42edf8(0x87),ARTIFACT_SOURCE_AGENT='AGENT',ALLOWED_REACT_MODULE_IMPORTS=[a8_0x42edf8(0x9a),a8_0x42edf8(0x8d),a8_0x42edf8(0x90),a8_0x42edf8(0x6c),'antd',a8_0x42edf8(0x6a)];export const ALLOWED_REACT_MODULE_IMPORTS_TEXT=ALLOWED_REACT_MODULE_IMPORTS[a8_0x42edf8(0xb3)](',\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_0x42edf8(0x6e),'type':'string','required':!![],'description':a8_0x42edf8(0xa0)},ARTIFACT_NAME_FLAG={'name':a8_0x42edf8(0x98),'type':a8_0x42edf8(0xb9),'description':'Artifact\x20display\x20name'},METADATA_FLAG={'name':a8_0x42edf8(0xad),'type':a8_0x42edf8(0xb9),'description':a8_0x42edf8(0x88)};function isPlainObject(_0x3f1a62){const _0x35b814=a8_0x42edf8;return typeof _0x3f1a62===_0x35b814(0x7f)&&_0x3f1a62!==null&&!Array[_0x35b814(0x8f)](_0x3f1a62);}function readSourceFile(_0x4f6d3b){const _0x456722=a8_0x42edf8;if(!_0x4f6d3b)throw CliErrors[_0x456722(0x80)](_0x456722(0x84));if(!existsSync(_0x4f6d3b))throw CliErrors[_0x456722(0x80)]('File\x20not\x20found:\x20'+_0x4f6d3b);if(!statSync(_0x4f6d3b)[_0x456722(0x6b)]())throw CliErrors[_0x456722(0x80)](_0x456722(0x7c)+_0x4f6d3b);const _0x1772c5=readFileSync(_0x4f6d3b,_0x456722(0xb5));return validateReactModuleSource(_0x1772c5),_0x1772c5;}function parseMetadata(_0x374e17){const _0x1570ad=a8_0x42edf8;if(!_0x374e17)return undefined;let _0x43d3c4;try{_0x43d3c4=JSON['parse'](_0x374e17);}catch{throw CliErrors[_0x1570ad(0x80)]('Invalid\x20JSON\x20for\x20--metadata:\x20'+_0x374e17);}if(!isPlainObject(_0x43d3c4))throw CliErrors[_0x1570ad(0x80)](_0x1570ad(0xaf));const _0x2edc85={..._0x43d3c4};return delete _0x2edc85[_0x1570ad(0xab)],_0x2edc85;}function getPackageName(_0x271d8d){const _0x25bd65=a8_0x42edf8;if(_0x271d8d[_0x25bd65(0x6d)]('@')){const [_0xf3d5c8,_0x13af00]=_0x271d8d[_0x25bd65(0x82)]('/');return _0xf3d5c8&&_0x13af00?_0xf3d5c8+'/'+_0x13af00:_0x271d8d;}return _0x271d8d[_0x25bd65(0x82)]('/')[0x0]||_0x271d8d;}function validateAllowedImports(_0x31908c){const _0x177cdf=a8_0x42edf8,_0x55a110=new Set();for(const _0x5256b6 of IMPORT_SOURCE_PATTERNS){_0x5256b6[_0x177cdf(0x93)]=0x0;let _0x4a7a81;while((_0x4a7a81=_0x5256b6[_0x177cdf(0x7d)](_0x31908c))!==null){const _0x464b56=_0x4a7a81[0x1]?.[_0x177cdf(0xa2)]();_0x464b56&&_0x55a110[_0x177cdf(0x96)](_0x464b56);}}const _0x1ff67c=[..._0x55a110][_0x177cdf(0x72)](getPackageName)[_0x177cdf(0x79)](_0x39d8d7=>!ALLOWED_REACT_MODULE_IMPORTS[_0x177cdf(0x8e)](_0x39d8d7));if(_0x1ff67c['length']>0x0)throw CliErrors[_0x177cdf(0x80)](_0x177cdf(0xa1)+ALLOWED_REACT_MODULE_IMPORTS_TEXT+'.\x20Unsupported:\x20'+[...new Set(_0x1ff67c)]['join'](',\x20'));}export function validateReactModuleSource(_0xb7951c){const _0x5da79f=a8_0x42edf8;if(!_0xb7951c[_0x5da79f(0xa2)]())throw CliErrors['validation']('Artifact\x20source\x20file\x20is\x20blank.');if(PAGE_LEVEL_PATTERNS[_0x5da79f(0xa5)](_0x1a038f=>_0x1a038f[_0x5da79f(0xb8)](_0xb7951c)))throw CliErrors['validation'](_0x5da79f(0x78));validateAllowedImports(_0xb7951c);}function buildArtifactInput(_0x41e336){const _0x33f264=a8_0x42edf8,_0x3dbcb7=readSourceFile(_0x41e336[_0x33f264(0x7b)](_0x33f264(0x6e))),_0x348705=_0x41e336['str'](_0x33f264(0x98))[_0x33f264(0xa2)](),_0x4a12c3=parseMetadata(_0x41e336[_0x33f264(0x7b)](_0x33f264(0xad)));return{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x348705?{'name':_0x348705}:{},'content':_0x3dbcb7,..._0x4a12c3?{'metadata':_0x4a12c3}:{},'source':ARTIFACT_SOURCE_AGENT};}function summarizeArtifact(_0x4f47df){const _0x3a3463=a8_0x42edf8;return{'id':_0x4f47df['id'],'name':_0x4f47df[_0x3a3463(0x98)],'artifactType':_0x4f47df[_0x3a3463(0x75)],'source':_0x4f47df[_0x3a3463(0xb7)],'favorite':_0x4f47df[_0x3a3463(0xa6)],'deleted':_0x4f47df['deleted'],'createTime':_0x4f47df[_0x3a3463(0x77)],'updateTime':_0x4f47df[_0x3a3463(0x92)]};}function detailArtifact(_0x5879a9){const _0x4d5bd4=a8_0x42edf8;return{'id':_0x5879a9['id'],'appCode':_0x5879a9[_0x4d5bd4(0xa7)],'name':_0x5879a9[_0x4d5bd4(0x98)],'artifactType':_0x5879a9[_0x4d5bd4(0x75)],'source':_0x5879a9['source'],'favorite':_0x5879a9['favorite'],'deleted':_0x5879a9[_0x4d5bd4(0xb4)],'content':_0x5879a9[_0x4d5bd4(0xb2)]??'','compiledContent':_0x5879a9[_0x4d5bd4(0xab)],'metadata':_0x5879a9['metadata']??{},'createTime':_0x5879a9[_0x4d5bd4(0x77)],'updateTime':_0x5879a9[_0x4d5bd4(0x92)]};}function readFavoriteFlag(_0x5e4000){const _0x529b51=a8_0x42edf8,_0x4c96ca=_0x5e4000[_0x529b51(0x85)](_0x529b51(0xa6));return _0x4c96ca===undefined||_0x4c96ca===null||_0x4c96ca===''?undefined:_0x5e4000[_0x529b51(0xb6)]('favorite');}function a8_0x8702(){const _0x18487a=['num','split','build','File\x20path\x20is\x20required.','flag','detail','react_module','Artifact\x20metadata\x20as\x20JSON\x20object;\x20compiledContent\x20is\x20stripped','18ySNjEF','408368qxlgGI','Updated\x20Artifact\x20','5UYyPQT','react-dom','includes','isArray','lodash','204QcbJuh','updateTime','lastIndex','boolean','1390214UfIEYF','add','update','name','Created\x20Artifact\x20','react','60yxaeaL','read','Update\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','17482vBvhne','List\x20current-app\x20react_module\x20Artifacts','Path\x20to\x20a\x20local\x20UTF-8\x20React\x20module\x20source\x20file','react_module\x20imports\x20are\x20limited\x20to:\x20','trim','1667600aRHYAR','Preview:\x20update\x20react_module\x20Artifact\x20','some','favorite','appCode','2523pTHpqC','/update','artifact','compiledContent','1182024gDJLcg','metadata','/client/artifact/','--metadata\x20must\x20be\x20a\x20JSON\x20object.','475673CcPItL','Artifact\x20ID','content','join','deleted','utf8','bool','source','test','string','Optional\x20favorite-state\x20filter','Preview:\x20create\x20react_module\x20Artifact','@ant-design/icons','isFile','dayjs','startsWith','file','description','/client/artifact/create','verbose','map','Optional\x20source\x20filter,\x20for\x20example\x20AGENT','write','artifactType','POST','createTime','react_module\x20must\x20be\x20an\x20embeddable\x20React\x20module,\x20not\x20full\x20HTML\x20or\x20a\x20ReactDOM/createRoot\x20mount\x20entry.','filter','2FKFPqV','str','File\x20is\x20not\x20a\x20regular\x20file:\x20','exec','Create\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','object','validation'];a8_0x8702=function(){return _0x18487a;};return a8_0x8702();}const artifactList={'service':a8_0x42edf8(0xaa),'command':'list','description':a8_0x42edf8(0x9f),'risk':'read','flags':[{'name':a8_0x42edf8(0xb7),'type':a8_0x42edf8(0xb9),'description':a8_0x42edf8(0x73)},{'name':a8_0x42edf8(0xa6),'type':a8_0x42edf8(0x94),'description':a8_0x42edf8(0xba)},VERBOSE_FLAG],async 'execute'(_0x36be52){const _0x4d2747=a8_0x42edf8,_0x300c20=await listRuntimeArtifacts(_0x36be52[_0x4d2747(0xa7)],{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x36be52[_0x4d2747(0x7b)]('source')?{'source':_0x36be52[_0x4d2747(0x7b)](_0x4d2747(0xb7))}:{},...readFavoriteFlag(_0x36be52)!==undefined?{'favorite':readFavoriteFlag(_0x36be52)}:{}});return{'ok':!![],'data':{'total':_0x300c20['length'],'items':_0x36be52[_0x4d2747(0xb6)](_0x4d2747(0x71))?_0x300c20:_0x300c20[_0x4d2747(0x72)](summarizeArtifact)}};}},artifactDetail={'service':a8_0x42edf8(0xaa),'command':a8_0x42edf8(0x86),'description':'Show\x20one\x20Artifact\x20by\x20id','risk':a8_0x42edf8(0x9c),'flags':[{...ID_FLAG,'description':a8_0x42edf8(0xb1)}],async 'execute'(_0x4be941){const _0x37dd49=a8_0x42edf8,_0x1e194e=await getRuntimeArtifact(_0x4be941['num']('id'),_0x4be941[_0x37dd49(0xa7)]);return{'ok':!![],'data':detailArtifact(_0x1e194e)};}},artifactCreate={'service':'artifact','command':'create','description':a8_0x42edf8(0x7e),'risk':a8_0x42edf8(0x74),'flags':[FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x18e065){const _0x42b347=a8_0x42edf8,_0x329a70=buildArtifactInput(_0x18e065),_0x42aa33=await createRuntimeArtifact(_0x18e065[_0x42b347(0xa7)],_0x329a70);return{'ok':!![],'data':detailArtifact(_0x42aa33),'message':_0x42b347(0x99)+_0x42aa33['id']+(_0x42aa33[_0x42b347(0x98)]?'\x20('+_0x42aa33[_0x42b347(0x98)]+')':'')};},async 'dryRun'(_0xb7e4f9){const _0x2cbf8d=a8_0x42edf8,_0x59364f=buildArtifactInput(_0xb7e4f9);return dryRun(_0x2cbf8d(0x76),_0x2cbf8d(0x70))['body']({'appCode':_0xb7e4f9[_0x2cbf8d(0xa7)],..._0x59364f})[_0x2cbf8d(0x6f)](_0x2cbf8d(0xbb))['build']();}},artifactUpdate={'service':a8_0x42edf8(0xaa),'command':a8_0x42edf8(0x97),'description':a8_0x42edf8(0x9d),'risk':a8_0x42edf8(0x74),'flags':[{...ID_FLAG,'description':'Artifact\x20ID'},FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x62fe73){const _0x54a81c=a8_0x42edf8,_0x473883=_0x62fe73[_0x54a81c(0x81)]('id'),_0x55f555=buildArtifactInput(_0x62fe73),_0x59a169=await updateRuntimeArtifact(_0x473883,_0x62fe73[_0x54a81c(0xa7)],_0x55f555);return{'ok':!![],'data':detailArtifact(_0x59a169),'message':_0x54a81c(0x8b)+_0x59a169['id']+(_0x59a169[_0x54a81c(0x98)]?'\x20('+_0x59a169[_0x54a81c(0x98)]+')':'')};},async 'dryRun'(_0x598df4){const _0x32522c=a8_0x42edf8,_0x4f4c93=_0x598df4['num']('id'),_0x394a9f=buildArtifactInput(_0x598df4);return dryRun(_0x32522c(0x76),_0x32522c(0xae)+_0x4f4c93+_0x32522c(0xa9))['body']({'appCode':_0x598df4[_0x32522c(0xa7)],..._0x394a9f})['description'](_0x32522c(0xa4)+_0x4f4c93)[_0x32522c(0x83)]();}};export const artifactDefinitions=[artifactList,artifactDetail,artifactCreate,artifactUpdate];
|
|
1
|
+
const a8_0x39bccb=a8_0x2559;(function(_0x1f38f8,_0x419a03){const _0x1517a6=a8_0x2559,_0x5dddc8=_0x1f38f8();while(!![]){try{const _0x1d1d92=-parseInt(_0x1517a6(0xc4))/0x1*(parseInt(_0x1517a6(0x10b))/0x2)+parseInt(_0x1517a6(0x10a))/0x3*(parseInt(_0x1517a6(0x107))/0x4)+-parseInt(_0x1517a6(0xc9))/0x5*(parseInt(_0x1517a6(0xd5))/0x6)+-parseInt(_0x1517a6(0xe4))/0x7+parseInt(_0x1517a6(0xc0))/0x8+-parseInt(_0x1517a6(0xbc))/0x9+-parseInt(_0x1517a6(0x100))/0xa*(-parseInt(_0x1517a6(0xed))/0xb);if(_0x1d1d92===_0x419a03)break;else _0x5dddc8['push'](_0x5dddc8['shift']());}catch(_0x2dd3a6){_0x5dddc8['push'](_0x5dddc8['shift']());}}}(a8_0x20bd,0x3a7a0));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=a8_0x39bccb(0xd8),ARTIFACT_SOURCE_AGENT='AGENT',ALLOWED_REACT_MODULE_IMPORTS=[a8_0x39bccb(0xf1),a8_0x39bccb(0xbd),a8_0x39bccb(0xbf),a8_0x39bccb(0x101),a8_0x39bccb(0xc6),a8_0x39bccb(0xe7)];export const ALLOWED_REACT_MODULE_IMPORTS_TEXT=ALLOWED_REACT_MODULE_IMPORTS[a8_0x39bccb(0xe3)](',\x20');const IMPORT_SOURCE_PATTERNS=[/\bimport\s+(?:type\s+)?(?:[^'";]*?\s+from\s+)?["']([^"']+)["']/g,/\bexport\s+(?:type\s+)?[^'";]*?\s+from\s+["']([^"']+)["']/g,/\bimport\s*\(\s*["']([^"']+)["']\s*\)/g,/\brequire\s*\(\s*["']([^"']+)["']\s*\)/g],PAGE_LEVEL_PATTERNS=[/<!doctype\s+html/i,/<\s*html\b/i,/\bcreateRoot\s*\(/,/\bReactDOM\s*\.\s*render\s*\(/,/\bReactDOM\s*\.\s*createRoot\s*\(/],FILE_FLAG={'name':'file','type':a8_0x39bccb(0xd7),'required':!![],'description':a8_0x39bccb(0xc5)},ARTIFACT_NAME_FLAG={'name':'name','type':a8_0x39bccb(0xd7),'description':a8_0x39bccb(0x103)},METADATA_FLAG={'name':'metadata','type':'string','description':a8_0x39bccb(0xdd)};function isPlainObject(_0x283ec9){const _0x4fbe13=a8_0x39bccb;return typeof _0x283ec9===_0x4fbe13(0x105)&&_0x283ec9!==null&&!Array[_0x4fbe13(0xea)](_0x283ec9);}function readSourceFile(_0x2d5268){const _0x2b001a=a8_0x39bccb;if(!_0x2d5268)throw CliErrors['validation']('File\x20path\x20is\x20required.');if(!existsSync(_0x2d5268))throw CliErrors['validation'](_0x2b001a(0xc7)+_0x2d5268);if(!statSync(_0x2d5268)[_0x2b001a(0xfc)]())throw CliErrors[_0x2b001a(0xd9)](_0x2b001a(0xd1)+_0x2d5268);const _0x5b217f=readFileSync(_0x2d5268,_0x2b001a(0xf8));return validateReactModuleSource(_0x5b217f),_0x5b217f;}function parseMetadata(_0x5666b4){const _0x258708=a8_0x39bccb;if(!_0x5666b4)return undefined;let _0x5678fc;try{_0x5678fc=JSON[_0x258708(0xd3)](_0x5666b4);}catch{throw CliErrors[_0x258708(0xd9)]('Invalid\x20JSON\x20for\x20--metadata:\x20'+_0x5666b4);}if(!isPlainObject(_0x5678fc))throw CliErrors[_0x258708(0xd9)]('--metadata\x20must\x20be\x20a\x20JSON\x20object.');const _0x22527f={..._0x5678fc};return delete _0x22527f[_0x258708(0x109)],_0x22527f;}function getPackageName(_0x2332e1){const _0x5ed445=a8_0x39bccb;if(_0x2332e1[_0x5ed445(0xbb)]('@')){const [_0x56500a,_0x10142f]=_0x2332e1[_0x5ed445(0xc8)]('/');return _0x56500a&&_0x10142f?_0x56500a+'/'+_0x10142f:_0x2332e1;}return _0x2332e1[_0x5ed445(0xc8)]('/')[0x0]||_0x2332e1;}function validateAllowedImports(_0x5318f0){const _0x36fdf8=a8_0x39bccb,_0x5cdbcd=new Set();for(const _0x1e73cf of IMPORT_SOURCE_PATTERNS){_0x1e73cf[_0x36fdf8(0xe2)]=0x0;let _0x3f5718;while((_0x3f5718=_0x1e73cf[_0x36fdf8(0xfe)](_0x5318f0))!==null){const _0x42dc44=_0x3f5718[0x1]?.[_0x36fdf8(0xc1)]();_0x42dc44&&_0x5cdbcd[_0x36fdf8(0x104)](_0x42dc44);}}const _0x386bfb=[..._0x5cdbcd][_0x36fdf8(0xbe)](getPackageName)[_0x36fdf8(0xef)](_0x4253f7=>!ALLOWED_REACT_MODULE_IMPORTS[_0x36fdf8(0xf2)](_0x4253f7));if(_0x386bfb[_0x36fdf8(0xe8)]>0x0)throw CliErrors[_0x36fdf8(0xd9)](_0x36fdf8(0xec)+ALLOWED_REACT_MODULE_IMPORTS_TEXT+_0x36fdf8(0xe0)+[...new Set(_0x386bfb)][_0x36fdf8(0xe3)](',\x20'));}function a8_0x2559(_0x5a1498,_0x433f2e){_0x5a1498=_0x5a1498-0xbb;const _0x20bd0c=a8_0x20bd();let _0x255943=_0x20bd0c[_0x5a1498];return _0x255943;}function a8_0x20bd(){const _0xf91e3c=['exec','flag','5128130VCigds','dayjs','POST','Artifact\x20display\x20name','add','object','updateTime','464oShwFF','Optional\x20favorite-state\x20filter','compiledContent','9021tVfROj','6spsFtM','Preview:\x20create\x20react_module\x20Artifact','startsWith','3177639swgHKR','react-dom','map','lodash','2986024aZcKOM','trim','some','artifact','17606SMmAwT','Path\x20to\x20a\x20local\x20UTF-8\x20React\x20module\x20source\x20file','antd','File\x20not\x20found:\x20','split','20ysuyLB','Create\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','deleted','Updated\x20Artifact\x20','list','body','/client/artifact/create','favorite','File\x20is\x20not\x20a\x20regular\x20file:\x20','artifactType','parse','Update\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','404346fJbUtc','content','string','react_module','validation','/update','List\x20current-app\x20react_module\x20Artifacts','Artifact\x20source\x20file\x20is\x20blank.','Artifact\x20metadata\x20as\x20JSON\x20object;\x20compiledContent\x20is\x20stripped','Created\x20Artifact\x20','write','.\x20Unsupported:\x20','create','lastIndex','join','2239335lVLViX','boolean','Artifact\x20ID','@ant-design/icons','length','build','isArray','metadata','react_module\x20imports\x20are\x20limited\x20to:\x20','11MdJksZ','source','filter','appCode','react','includes','/client/artifact/','bool','name','Show\x20one\x20Artifact\x20by\x20id','verbose','utf8','num','file','createTime','isFile','str'];a8_0x20bd=function(){return _0xf91e3c;};return a8_0x20bd();}export function validateReactModuleSource(_0x120ea3){const _0x117f72=a8_0x39bccb;if(!_0x120ea3[_0x117f72(0xc1)]())throw CliErrors[_0x117f72(0xd9)](_0x117f72(0xdc));if(PAGE_LEVEL_PATTERNS[_0x117f72(0xc2)](_0x179c1d=>_0x179c1d['test'](_0x120ea3)))throw CliErrors[_0x117f72(0xd9)]('react_module\x20must\x20be\x20an\x20embeddable\x20React\x20module,\x20not\x20full\x20HTML\x20or\x20a\x20ReactDOM/createRoot\x20mount\x20entry.');validateAllowedImports(_0x120ea3);}function buildArtifactInput(_0x1edf75){const _0x11d954=a8_0x39bccb,_0x1317c4=readSourceFile(_0x1edf75[_0x11d954(0xfd)](_0x11d954(0xfa))),_0x398d67=_0x1edf75[_0x11d954(0xfd)]('name')['trim'](),_0x1354b6=parseMetadata(_0x1edf75[_0x11d954(0xfd)](_0x11d954(0xeb)));return{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x398d67?{'name':_0x398d67}:{},'content':_0x1317c4,..._0x1354b6?{'metadata':_0x1354b6}:{},'source':ARTIFACT_SOURCE_AGENT};}function summarizeArtifact(_0xc49344){const _0xb8b3e3=a8_0x39bccb;return{'id':_0xc49344['id'],'name':_0xc49344[_0xb8b3e3(0xf5)],'artifactType':_0xc49344[_0xb8b3e3(0xd2)],'source':_0xc49344[_0xb8b3e3(0xee)],'favorite':_0xc49344[_0xb8b3e3(0xd0)],'deleted':_0xc49344['deleted'],'createTime':_0xc49344[_0xb8b3e3(0xfb)],'updateTime':_0xc49344[_0xb8b3e3(0x106)]};}function detailArtifact(_0x298988){const _0x36bd7e=a8_0x39bccb;return{'id':_0x298988['id'],'appCode':_0x298988[_0x36bd7e(0xf0)],'name':_0x298988[_0x36bd7e(0xf5)],'artifactType':_0x298988[_0x36bd7e(0xd2)],'source':_0x298988[_0x36bd7e(0xee)],'favorite':_0x298988[_0x36bd7e(0xd0)],'deleted':_0x298988[_0x36bd7e(0xcb)],'content':_0x298988[_0x36bd7e(0xd6)]??'','compiledContent':_0x298988[_0x36bd7e(0x109)],'metadata':_0x298988[_0x36bd7e(0xeb)]??{},'createTime':_0x298988[_0x36bd7e(0xfb)],'updateTime':_0x298988[_0x36bd7e(0x106)]};}function readFavoriteFlag(_0x151546){const _0x5a4399=a8_0x39bccb,_0x1f6d18=_0x151546[_0x5a4399(0xff)](_0x5a4399(0xd0));return _0x1f6d18===undefined||_0x1f6d18===null||_0x1f6d18===''?undefined:_0x151546[_0x5a4399(0xf4)]('favorite');}const artifactList={'service':a8_0x39bccb(0xc3),'command':a8_0x39bccb(0xcd),'description':a8_0x39bccb(0xdb),'risk':'read','flags':[{'name':a8_0x39bccb(0xee),'type':a8_0x39bccb(0xd7),'description':'Optional\x20source\x20filter,\x20for\x20example\x20AGENT'},{'name':a8_0x39bccb(0xd0),'type':a8_0x39bccb(0xe5),'description':a8_0x39bccb(0x108)},VERBOSE_FLAG],async 'execute'(_0x1b24f5){const _0x5c66e8=a8_0x39bccb,_0x2db9b2=await listRuntimeArtifacts(_0x1b24f5[_0x5c66e8(0xf0)],{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x1b24f5[_0x5c66e8(0xfd)]('source')?{'source':_0x1b24f5[_0x5c66e8(0xfd)]('source')}:{},...readFavoriteFlag(_0x1b24f5)!==undefined?{'favorite':readFavoriteFlag(_0x1b24f5)}:{}});return{'ok':!![],'data':{'total':_0x2db9b2[_0x5c66e8(0xe8)],'items':_0x1b24f5[_0x5c66e8(0xf4)](_0x5c66e8(0xf7))?_0x2db9b2:_0x2db9b2[_0x5c66e8(0xbe)](summarizeArtifact)}};}},artifactDetail={'service':a8_0x39bccb(0xc3),'command':'detail','description':a8_0x39bccb(0xf6),'risk':'read','flags':[{...ID_FLAG,'description':a8_0x39bccb(0xe6)}],async 'execute'(_0x1b0b3f){const _0x3e9292=a8_0x39bccb,_0x4f9dbe=await getRuntimeArtifact(_0x1b0b3f[_0x3e9292(0xf9)]('id'),_0x1b0b3f[_0x3e9292(0xf0)]);return{'ok':!![],'data':detailArtifact(_0x4f9dbe)};}},artifactCreate={'service':a8_0x39bccb(0xc3),'command':a8_0x39bccb(0xe1),'description':a8_0x39bccb(0xca),'risk':a8_0x39bccb(0xdf),'flags':[FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x385f98){const _0x4fda68=a8_0x39bccb,_0x465ef8=buildArtifactInput(_0x385f98),_0x12bd6a=await createRuntimeArtifact(_0x385f98['appCode'],_0x465ef8);return{'ok':!![],'data':detailArtifact(_0x12bd6a),'message':_0x4fda68(0xde)+_0x12bd6a['id']+(_0x12bd6a['name']?'\x20('+_0x12bd6a[_0x4fda68(0xf5)]+')':'')};},async 'dryRun'(_0x57eec9){const _0x4f8b06=a8_0x39bccb,_0xb01ced=buildArtifactInput(_0x57eec9);return dryRun('POST',_0x4f8b06(0xcf))[_0x4f8b06(0xce)]({'appCode':_0x57eec9[_0x4f8b06(0xf0)],..._0xb01ced})['description'](_0x4f8b06(0x10c))[_0x4f8b06(0xe9)]();}},artifactUpdate={'service':a8_0x39bccb(0xc3),'command':'update','description':a8_0x39bccb(0xd4),'risk':a8_0x39bccb(0xdf),'flags':[{...ID_FLAG,'description':a8_0x39bccb(0xe6)},FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x140712){const _0xb21654=a8_0x39bccb,_0x14d0e2=_0x140712['num']('id'),_0x1adda3=buildArtifactInput(_0x140712),_0x547793=await updateRuntimeArtifact(_0x14d0e2,_0x140712[_0xb21654(0xf0)],_0x1adda3);return{'ok':!![],'data':detailArtifact(_0x547793),'message':_0xb21654(0xcc)+_0x547793['id']+(_0x547793[_0xb21654(0xf5)]?'\x20('+_0x547793[_0xb21654(0xf5)]+')':'')};},async 'dryRun'(_0x396156){const _0xb5507c=a8_0x39bccb,_0x3dc200=_0x396156[_0xb5507c(0xf9)]('id'),_0x5ece7d=buildArtifactInput(_0x396156);return dryRun(_0xb5507c(0x102),_0xb5507c(0xf3)+_0x3dc200+_0xb5507c(0xda))[_0xb5507c(0xce)]({'appCode':_0x396156[_0xb5507c(0xf0)],..._0x5ece7d})['description']('Preview:\x20update\x20react_module\x20Artifact\x20'+_0x3dc200)['build']();}};export const artifactDefinitions=[artifactList,artifactDetail,artifactCreate,artifactUpdate];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a9_0x1976e1=a9_0x279a;(function(_0x3a9e09,_0x1b85b2){const _0x14c040=a9_0x279a,_0x387655=_0x3a9e09();while(!![]){try{const _0x15ce54=-parseInt(_0x14c040(0x14f))/0x1+parseInt(_0x14c040(0x156))/0x2+parseInt(_0x14c040(0x184))/0x3*(parseInt(_0x14c040(0x13c))/0x4)+-parseInt(_0x14c040(0x133))/0x5+parseInt(_0x14c040(0x172))/0x6+parseInt(_0x14c040(0x159))/0x7*(-parseInt(_0x14c040(0x155))/0x8)+-parseInt(_0x14c040(0x15c))/0x9;if(_0x15ce54===_0x1b85b2)break;else _0x387655['push'](_0x387655['shift']());}catch(_0x439e13){_0x387655['push'](_0x387655['shift']());}}}(a9_0x378a,0x38e16));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';function a9_0x378a(){const _0x110492=['\x20Current\x20env:\x20','bool','write','Clear\x20accessKey\x20from\x20config','validation','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','yes','isTTY','repeat','login','Shorthand\x20for\x20--access-key','Option\x20B:\x20apps\x20config\x20(','AccessKey:\x20','AccessKey\x20saved\x20to\x20','3PGHUeV','cancelled','\x20scope.','`auth\x20login`\x20does\x20not\x20support\x20--yes.','init','AccessKey\x20cleared\x20from\x20','newConfigFileName','boolean','project','834595NVPpdH','\x20env\x20var','push','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','read','userCenterDisplayName','Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config','production','envName','1066028BtXtbe','\x20config.\x20Nothing\x20to\x20clear.','No\x20AccessKey\x20found\x20in\x20','Option\x20A:\x20','\x20\x20export\x20','\x20config.','\x20auth\x20status','Then\x20verify\x20with:\x20','nonInteractive','join','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','info','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','accessKey','str','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','\x20auth\x20login\x20--access-key\x20<ak_xxx>','\x20config','ClientAk','286205AstUmx','access-key','string','length','Show\x20current\x20authentication\x20status','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','2144FinZKt','706136gvFmrm','status','ACCESS_KEY','4606FSeiZL','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','Clear\x20from\x20global\x20config\x20(default)','1964223sxTKIz','development','Use\x20`','global','Write\x20to\x20global\x20config\x20(default)','Auth\x20config\x20reinitialized\x20in\x20','env','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','auth','stdin','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','daily','Invalid\x20accessKey\x20format:\x20\x22','AccessKey\x20(ak_xxx...)','=ak_xxx','Auth\x20mode:\x20','trim','\x20doctor','stdout','Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','Read\x20from\x20global\x20config\x20(default)','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','2766732vNPcQA','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','\x20(via\x20'];a9_0x378a=function(){return _0x110492;};return a9_0x378a();}import{normalizeEnv,isDaily,isDev}from'../../constant/env.js';function a9_0x279a(_0x94e5a2,_0x3a5cfd){_0x94e5a2=_0x94e5a2-0x133;const _0x378ac4=a9_0x378a();let _0x279ae7=_0x378ac4[_0x94e5a2];return _0x279ae7;}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 _0x3782bf=a9_0x279a;writeCliSideChannelLine(_0x3782bf(0x166)+PRODUCT_CONFIG[_0x3782bf(0x138)]+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine('Tip:\x20you\x20can\x20also\x20run:'),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x3782bf(0x14c));}function buildAccessKeySetupGuide(){const _0x42e7bd=a9_0x279a;return['AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20'+PRODUCT_CONFIG[_0x42e7bd(0x138)]+':',USER_ACCESS_KEY_CREATE_URL,_0x42e7bd(0x171)+CLI_BIN_NAME+'\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]']['join']('\x0a');}function canPromptForAccessKey(_0x33a979){const _0x3cd96b=a9_0x279a;return!_0x33a979[_0x3cd96b(0x144)]&&process[_0x3cd96b(0x165)]['isTTY']!==![]&&process[_0x3cd96b(0x16e)][_0x3cd96b(0x17d)]!==![];}function resolveAuthScopeFlags(_0x59134c){const _0x50d041=a9_0x279a;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x59134c[_0x50d041(0x177)]('global'),'explicitProject':_0x59134c[_0x50d041(0x177)]('project'),'policy':'global-default'}));}async function resolveAuthWriteInput(_0x3e93f1){const _0xb3934c=a9_0x279a;let _0x4d8fb8=(_0x3e93f1[_0xb3934c(0x14a)](_0xb3934c(0x150))||_0x3e93f1[_0xb3934c(0x14a)]('ak')||'')[_0xb3934c(0x16c)]();const _0x1cb072=(_0x3e93f1['str'](_0xb3934c(0x162))||'')['trim']();if(!_0x4d8fb8&&canPromptForAccessKey(_0x3e93f1))try{showAccessKeyCreateHint(),_0x4d8fb8=await promptAccessKey('');}catch(_0xb037b){if(isAbortPrompt(_0xb037b))throw CliErrors[_0xb3934c(0x185)]();throw _0xb037b;}if(!_0x4d8fb8)throw CliErrors['validation']('Missing\x20accessKey.',buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN['test'](_0x4d8fb8))throw CliErrors[_0xb3934c(0x17a)](_0xb3934c(0x168)+_0x4d8fb8+'\x22',_0xb3934c(0x14b));if(!_0x1cb072)return{'accessKey':_0x4d8fb8};const _0x3cdbbc=normalizeEnv(_0x1cb072);return{'accessKey':_0x4d8fb8,'env':isDaily(_0x3cdbbc)?_0xb3934c(0x167):isDev(_0x3cdbbc)?_0xb3934c(0x15d):_0xb3934c(0x13a)};}export const authDefinitions=[{'service':a9_0x1976e1(0x164),'command':a9_0x1976e1(0x17f),'description':'Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','risk':a9_0x1976e1(0x178),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a9_0x1976e1(0x150),'type':a9_0x1976e1(0x151),'description':a9_0x1976e1(0x169)},{'name':'ak','type':'string','description':a9_0x1976e1(0x180)},{'name':a9_0x1976e1(0x15f),'type':'boolean','description':a9_0x1976e1(0x160),'default':!![]},{'name':a9_0x1976e1(0x18c),'type':'boolean','description':a9_0x1976e1(0x17b),'default':![]}],async 'execute'(_0x4ff93c){const _0x19681b=a9_0x1976e1;if(_0x4ff93c[_0x19681b(0x177)](_0x19681b(0x17c)))throw CliErrors[_0x19681b(0x17a)](_0x19681b(0x187),_0x19681b(0x15e)+CLI_BIN_NAME+_0x19681b(0x173)+CLI_BIN_NAME+_0x19681b(0x136));const _0x44012c=(_0x4ff93c[_0x19681b(0x14a)](_0x19681b(0x150))||_0x4ff93c[_0x19681b(0x14a)]('ak')||'')[_0x19681b(0x16c)]();if(!_0x44012c&&_0x4ff93c[_0x19681b(0x144)])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0x4179b1=await resolveAuthWriteInput(_0x4ff93c),_0xc8b298=resolveAuthScopeFlags(_0x4ff93c),_0x4b10ed=readScopedConfig(_0xc8b298);_0x4b10ed['accessKey']=_0x4179b1[_0x19681b(0x149)];_0x4179b1[_0x19681b(0x162)]&&(_0x4b10ed[_0x19681b(0x162)]=_0x4179b1['env']);writeScopedConfig(_0x4b10ed,_0xc8b298);const _0xfd25e7=_0xc8b298[_0x19681b(0x15f)]?_0x19681b(0x15f):_0x19681b(0x18c),_0x1b986a=_0x4b10ed[_0x19681b(0x162)]?_0x19681b(0x176)+_0x4b10ed['env']+'.':'';return{'ok':!![],'message':_0x19681b(0x183)+_0xfd25e7+'\x20config.'+_0x1b986a+'\x20Verify:\x20'+CLI_BIN_NAME+_0x19681b(0x142)};}},{'service':'auth','command':a9_0x1976e1(0x188),'description':a9_0x1976e1(0x16f),'risk':a9_0x1976e1(0x178),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'access-key','type':a9_0x1976e1(0x151),'description':'AccessKey\x20(ak_xxx...)'},{'name':'ak','type':a9_0x1976e1(0x151),'description':a9_0x1976e1(0x180)},{'name':a9_0x1976e1(0x162),'type':a9_0x1976e1(0x151),'description':a9_0x1976e1(0x139)},{'name':a9_0x1976e1(0x15f),'type':a9_0x1976e1(0x18b),'description':a9_0x1976e1(0x160),'default':!![]},{'name':'project','type':'boolean','description':a9_0x1976e1(0x17b),'default':![]}],async 'execute'(_0x7b2dcf){const _0xa06491=a9_0x1976e1,_0x344fd0=await resolveAuthWriteInput(_0x7b2dcf),_0x3df19d=resolveAuthScopeFlags(_0x7b2dcf),_0x3e9a4d={'accessKey':_0x344fd0[_0xa06491(0x149)]};_0x344fd0['env']&&(_0x3e9a4d['env']=_0x344fd0[_0xa06491(0x162)]);writeScopedConfig(_0x3e9a4d,_0x3df19d);const _0x3de2b6=_0x3df19d[_0xa06491(0x15f)]?_0xa06491(0x15f):'project',_0x1012ed=_0x3e9a4d['env']?'\x20Current\x20env:\x20'+_0x3e9a4d[_0xa06491(0x162)]+'.':'';return{'ok':!![],'message':_0xa06491(0x161)+_0x3de2b6+_0xa06491(0x186)+_0x1012ed+'\x20Verify:\x20'+CLI_BIN_NAME+'\x20auth\x20status'};}},{'service':a9_0x1976e1(0x164),'command':'logout','description':a9_0x1976e1(0x179),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a9_0x1976e1(0x15f),'type':'boolean','description':a9_0x1976e1(0x15b),'default':!![]},{'name':'project','type':a9_0x1976e1(0x18b),'description':a9_0x1976e1(0x163),'default':![]}],async 'execute'(_0xe4c063){const _0x403ecf=a9_0x1976e1,_0x5a0206=resolveAuthScopeFlags(_0xe4c063),_0x5a8cfd=readScopedConfig(_0x5a0206),_0x2bd2ed=!!_0x5a8cfd[_0x403ecf(0x149)];delete _0x5a8cfd[_0x403ecf(0x149)],writeScopedConfig(_0x5a8cfd,_0x5a0206);const _0x5afbbe=_0x5a0206['global']?_0x403ecf(0x15f):_0x403ecf(0x18c);if(_0x2bd2ed)return{'ok':!![],'message':_0x403ecf(0x189)+_0x5afbbe+_0x403ecf(0x141)};return{'ok':!![],'message':_0x403ecf(0x13e)+_0x5afbbe+_0x403ecf(0x13d)};}},{'service':a9_0x1976e1(0x164),'command':a9_0x1976e1(0x157),'description':a9_0x1976e1(0x153),'risk':a9_0x1976e1(0x137),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a9_0x1976e1(0x15f),'type':'boolean','description':a9_0x1976e1(0x170),'default':!![]},{'name':a9_0x1976e1(0x18c),'type':a9_0x1976e1(0x18b),'description':a9_0x1976e1(0x15a),'default':![]}],async 'execute'(_0x4b25f9){const _0x3e6701=a9_0x1976e1,_0x5e69f6=resolveAuthScopeFlags(_0x4b25f9),_0xa3609d=readScopedConfig(_0x5e69f6),_0x3f34aa=productEnvName(_0x3e6701(0x158)),_0xfecc98=productEnv('ACCESS_KEY')||undefined,_0x2b871e=_0xa3609d[_0x3e6701(0x149)]||undefined,_0x497473=_0xfecc98||_0x2b871e,_0x50992a=_0xfecc98?_0x3f34aa+_0x3e6701(0x134):_0x2b871e?(_0x5e69f6[_0x3e6701(0x15f)]?'global':_0x3e6701(0x18c))+_0x3e6701(0x14d):null,_0x311a3f=[_0x3e6701(0x16b)+AUTH_MODE[_0x3e6701(0x14e)]];if(_0x497473){const _0xadaa87=_0x497473[_0x3e6701(0x152)]>0x8?''+_0x497473['slice'](0x0,0x8)+'*'[_0x3e6701(0x17e)](_0x497473[_0x3e6701(0x152)]-0x8):_0x497473;_0x311a3f[_0x3e6701(0x135)](_0x3e6701(0x182)+_0xadaa87+(_0x50992a?_0x3e6701(0x175)+_0x50992a+')':''));}return!_0x497473&&(_0x311a3f[_0x3e6701(0x135)](''),_0x311a3f[_0x3e6701(0x135)]('No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:'),_0x311a3f[_0x3e6701(0x135)](''),_0x311a3f[_0x3e6701(0x135)](_0x3e6701(0x13f)+CLI_BIN_NAME+_0x3e6701(0x146)),_0x311a3f[_0x3e6701(0x135)](''),_0x311a3f[_0x3e6701(0x135)](_0x3e6701(0x181)+PRODUCT_CONFIG[_0x3e6701(0x18a)]+')'),_0x311a3f['push'](_0x3e6701(0x174)),_0x311a3f['push'](''),_0x311a3f['push']('Option\x20C:\x20environment\x20variable'),_0x311a3f[_0x3e6701(0x135)](_0x3e6701(0x140)+_0x3f34aa+_0x3e6701(0x16a)),_0x311a3f['push'](''),_0x311a3f[_0x3e6701(0x135)](_0x3e6701(0x143)+CLI_BIN_NAME+_0x3e6701(0x142)),_0x311a3f[_0x3e6701(0x135)](_0x3e6701(0x154)+CLI_BIN_NAME+_0x3e6701(0x16d))),{'ok':!![],'message':_0x311a3f[_0x3e6701(0x145)]('\x0a')};}},{'service':a9_0x1976e1(0x164),'command':a9_0x1976e1(0x147),'description':a9_0x1976e1(0x148),'risk':a9_0x1976e1(0x137),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x49a80e){const _0x282bfb=a9_0x1976e1,_0x3bbbac=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x3bbbac,'meta':{'env':_0x49a80e[_0x282bfb(0x13b)]??'production'}}};}}];
|
|
1
|
+
const a9_0x4e15c2=a9_0x4e88;(function(_0x36c148,_0xdec057){const _0x33bcdd=a9_0x4e88,_0x3fb5c2=_0x36c148();while(!![]){try{const _0x5b405f=-parseInt(_0x33bcdd(0x135))/0x1*(-parseInt(_0x33bcdd(0xe6))/0x2)+-parseInt(_0x33bcdd(0x11d))/0x3*(parseInt(_0x33bcdd(0xf8))/0x4)+parseInt(_0x33bcdd(0x108))/0x5*(parseInt(_0x33bcdd(0x10b))/0x6)+parseInt(_0x33bcdd(0xec))/0x7+parseInt(_0x33bcdd(0xea))/0x8+parseInt(_0x33bcdd(0x10a))/0x9+-parseInt(_0x33bcdd(0x100))/0xa*(parseInt(_0x33bcdd(0x103))/0xb);if(_0x5b405f===_0xdec057)break;else _0x3fb5c2['push'](_0x3fb5c2['shift']());}catch(_0x44c568){_0x3fb5c2['push'](_0x3fb5c2['shift']());}}}(a9_0x1920,0xde5fa));import{readScopedConfig,writeScopedConfig}from'../../context.js';function a9_0x4e88(_0x5e13b8,_0x303346){_0x5e13b8=_0x5e13b8-0xe6;const _0x192004=a9_0x1920();let _0x4e8806=_0x192004[_0x5e13b8];return _0x4e8806;}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_0x1920(){const _0x11cdae=['cancelled','ClientAk','Auth\x20config\x20reinitialized\x20in\x20','25niUDho','\x20(via\x20','4864383TEsnxj','1518792mqfqxr','AccessKey\x20(ak_xxx...)','repeat','project','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','Missing\x20accessKey.','envName','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','production','Then\x20verify\x20with:\x20','Clear\x20accessKey\x20from\x20config','Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','AccessKey\x20cleared\x20from\x20','\x20auth\x20status','\x20config.\x20Nothing\x20to\x20clear.','logout','Option\x20B:\x20apps\x20config\x20(','\x20\x20export\x20','22947OPgzgw','\x20Verify:\x20','=ak_xxx','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','Option\x20A:\x20','\x20config','\x20config.','Use\x20`','trim','ACCESS_KEY','\x20auth\x20login\x20--access-key\x20<ak_xxx>','yes','userCenterDisplayName','No\x20AccessKey\x20found\x20in\x20','global','AccessKey\x20saved\x20to\x20','test','isTTY','Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','validation','stdout','\x20env\x20var','push','1JBDPrH','bool','str','init','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','Shorthand\x20for\x20--access-key','Clear\x20from\x20global\x20config\x20(default)','status','1964374TonSaW','read','accessKey','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','379912RzRCaP','join','1968491fRCqMG','Show\x20current\x20authentication\x20status','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','stdin','\x20Current\x20env:\x20','access-key','Auth\x20mode:\x20','daily','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','Read\x20from\x20global\x20config\x20(default)','Write\x20to\x20global\x20config\x20(default)','auth','548UCLprw','global-default','env','string','nonInteractive','login','write','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','11582810XLGuhD','length','boolean','11zGsMIr','Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config'];a9_0x1920=function(){return _0x11cdae;};return a9_0x1920();}function showAccessKeyCreateHint(){const _0x582e4e=a9_0x4e88;writeCliSideChannelLine(_0x582e4e(0x10f)+PRODUCT_CONFIG[_0x582e4e(0x12a)]+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine('Tip:\x20you\x20can\x20also\x20run:'),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x582e4e(0x128));}function buildAccessKeySetupGuide(){const _0x3212eb=a9_0x4e88;return['AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20'+PRODUCT_CONFIG[_0x3212eb(0x12a)]+':',USER_ACCESS_KEY_CREATE_URL,_0x3212eb(0x121)+CLI_BIN_NAME+_0x3212eb(0xff)]['join']('\x0a');}function canPromptForAccessKey(_0x41a99d){const _0x579cd1=a9_0x4e88;return!_0x41a99d[_0x579cd1(0xfc)]&&process[_0x579cd1(0xef)][_0x579cd1(0x12f)]!==![]&&process[_0x579cd1(0x132)]['isTTY']!==![];}function resolveAuthScopeFlags(_0x5442ce){const _0x22eca2=a9_0x4e88;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x5442ce[_0x22eca2(0x136)](_0x22eca2(0x12c)),'explicitProject':_0x5442ce[_0x22eca2(0x136)]('project'),'policy':_0x22eca2(0xf9)}));}async function resolveAuthWriteInput(_0x3a1188){const _0x4b69c9=a9_0x4e88;let _0x184835=(_0x3a1188['str'](_0x4b69c9(0xf1))||_0x3a1188['str']('ak')||'')[_0x4b69c9(0x126)]();const _0x16b5af=(_0x3a1188[_0x4b69c9(0x137)](_0x4b69c9(0xfa))||'')[_0x4b69c9(0x126)]();if(!_0x184835&&canPromptForAccessKey(_0x3a1188))try{showAccessKeyCreateHint(),_0x184835=await promptAccessKey('');}catch(_0x381f7c){if(isAbortPrompt(_0x381f7c))throw CliErrors[_0x4b69c9(0x105)]();throw _0x381f7c;}if(!_0x184835)throw CliErrors[_0x4b69c9(0x131)](_0x4b69c9(0x110),buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN[_0x4b69c9(0x12e)](_0x184835))throw CliErrors['validation']('Invalid\x20accessKey\x20format:\x20\x22'+_0x184835+'\x22',_0x4b69c9(0x112));if(!_0x16b5af)return{'accessKey':_0x184835};const _0x48b960=normalizeEnv(_0x16b5af);return{'accessKey':_0x184835,'env':isDaily(_0x48b960)?_0x4b69c9(0xf3):isDev(_0x48b960)?'development':_0x4b69c9(0x113)};}export const authDefinitions=[{'service':a9_0x4e15c2(0xf7),'command':a9_0x4e15c2(0xfd),'description':a9_0x4e15c2(0x116),'risk':a9_0x4e15c2(0xfe),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'access-key','type':a9_0x4e15c2(0xfb),'description':a9_0x4e15c2(0x10c)},{'name':'ak','type':a9_0x4e15c2(0xfb),'description':a9_0x4e15c2(0x13a)},{'name':a9_0x4e15c2(0x12c),'type':a9_0x4e15c2(0x102),'description':'Write\x20to\x20global\x20config\x20(default)','default':!![]},{'name':a9_0x4e15c2(0x10e),'type':a9_0x4e15c2(0x102),'description':a9_0x4e15c2(0x120),'default':![]}],async 'execute'(_0x1bac4b){const _0x5362c8=a9_0x4e15c2;if(_0x1bac4b[_0x5362c8(0x136)](_0x5362c8(0x129)))throw CliErrors['validation']('`auth\x20login`\x20does\x20not\x20support\x20--yes.',_0x5362c8(0x125)+CLI_BIN_NAME+_0x5362c8(0xe9)+CLI_BIN_NAME+'\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.');const _0x8ce983=(_0x1bac4b['str'](_0x5362c8(0xf1))||_0x1bac4b[_0x5362c8(0x137)]('ak')||'')[_0x5362c8(0x126)]();if(!_0x8ce983&&_0x1bac4b['nonInteractive'])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0x4b8b29=await resolveAuthWriteInput(_0x1bac4b),_0x164c72=resolveAuthScopeFlags(_0x1bac4b),_0x4251f7=readScopedConfig(_0x164c72);_0x4251f7['accessKey']=_0x4b8b29[_0x5362c8(0xe8)];_0x4b8b29[_0x5362c8(0xfa)]&&(_0x4251f7[_0x5362c8(0xfa)]=_0x4b8b29[_0x5362c8(0xfa)]);writeScopedConfig(_0x4251f7,_0x164c72);const _0x5d43c8=_0x164c72['global']?_0x5362c8(0x12c):_0x5362c8(0x10e),_0x216510=_0x4251f7['env']?_0x5362c8(0xf0)+_0x4251f7[_0x5362c8(0xfa)]+'.':'';return{'ok':!![],'message':_0x5362c8(0x12d)+_0x5d43c8+_0x5362c8(0x124)+_0x216510+_0x5362c8(0x11e)+CLI_BIN_NAME+_0x5362c8(0x118)};}},{'service':a9_0x4e15c2(0xf7),'command':a9_0x4e15c2(0x138),'description':a9_0x4e15c2(0x130),'risk':a9_0x4e15c2(0xfe),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a9_0x4e15c2(0xf1),'type':'string','description':a9_0x4e15c2(0x10c)},{'name':'ak','type':a9_0x4e15c2(0xfb),'description':a9_0x4e15c2(0x13a)},{'name':a9_0x4e15c2(0xfa),'type':'string','description':a9_0x4e15c2(0x104)},{'name':a9_0x4e15c2(0x12c),'type':a9_0x4e15c2(0x102),'description':a9_0x4e15c2(0xf6),'default':!![]},{'name':a9_0x4e15c2(0x10e),'type':'boolean','description':'Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x4dd9a5){const _0x24239b=a9_0x4e15c2,_0x2e661f=await resolveAuthWriteInput(_0x4dd9a5),_0x10865b=resolveAuthScopeFlags(_0x4dd9a5),_0x173a0e={'accessKey':_0x2e661f[_0x24239b(0xe8)]};_0x2e661f[_0x24239b(0xfa)]&&(_0x173a0e[_0x24239b(0xfa)]=_0x2e661f[_0x24239b(0xfa)]);writeScopedConfig(_0x173a0e,_0x10865b);const _0x581c09=_0x10865b['global']?_0x24239b(0x12c):_0x24239b(0x10e),_0x3a6907=_0x173a0e[_0x24239b(0xfa)]?_0x24239b(0xf0)+_0x173a0e[_0x24239b(0xfa)]+'.':'';return{'ok':!![],'message':_0x24239b(0x107)+_0x581c09+'\x20scope.'+_0x3a6907+'\x20Verify:\x20'+CLI_BIN_NAME+'\x20auth\x20status'};}},{'service':a9_0x4e15c2(0xf7),'command':a9_0x4e15c2(0x11a),'description':a9_0x4e15c2(0x115),'risk':a9_0x4e15c2(0xfe),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a9_0x4e15c2(0x12c),'type':a9_0x4e15c2(0x102),'description':a9_0x4e15c2(0x13b),'default':!![]},{'name':a9_0x4e15c2(0x10e),'type':a9_0x4e15c2(0x102),'description':'Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x52a7cb){const _0x445ac2=a9_0x4e15c2,_0x4c2a4a=resolveAuthScopeFlags(_0x52a7cb),_0x451b62=readScopedConfig(_0x4c2a4a),_0x6d9b24=!!_0x451b62['accessKey'];delete _0x451b62['accessKey'],writeScopedConfig(_0x451b62,_0x4c2a4a);const _0x1337a9=_0x4c2a4a[_0x445ac2(0x12c)]?_0x445ac2(0x12c):'project';if(_0x6d9b24)return{'ok':!![],'message':_0x445ac2(0x117)+_0x1337a9+_0x445ac2(0x124)};return{'ok':!![],'message':_0x445ac2(0x12b)+_0x1337a9+_0x445ac2(0x119)};}},{'service':a9_0x4e15c2(0xf7),'command':a9_0x4e15c2(0x13c),'description':a9_0x4e15c2(0xed),'risk':a9_0x4e15c2(0xe7),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a9_0x4e15c2(0x12c),'type':a9_0x4e15c2(0x102),'description':a9_0x4e15c2(0xf5),'default':!![]},{'name':a9_0x4e15c2(0x10e),'type':a9_0x4e15c2(0x102),'description':'Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x5f3cd4){const _0x54aaad=a9_0x4e15c2,_0x343910=resolveAuthScopeFlags(_0x5f3cd4),_0x125aac=readScopedConfig(_0x343910),_0x3ba977=productEnvName(_0x54aaad(0x127)),_0x2f9062=productEnv(_0x54aaad(0x127))||undefined,_0x36374e=_0x125aac[_0x54aaad(0xe8)]||undefined,_0xaf89ed=_0x2f9062||_0x36374e,_0x542cfc=_0x2f9062?_0x3ba977+_0x54aaad(0x133):_0x36374e?(_0x343910[_0x54aaad(0x12c)]?_0x54aaad(0x12c):_0x54aaad(0x10e))+_0x54aaad(0x123):null,_0x55f214=[_0x54aaad(0xf2)+AUTH_MODE[_0x54aaad(0x106)]];if(_0xaf89ed){const _0x863d88=_0xaf89ed['length']>0x8?''+_0xaf89ed['slice'](0x0,0x8)+'*'[_0x54aaad(0x10d)](_0xaf89ed[_0x54aaad(0x101)]-0x8):_0xaf89ed;_0x55f214[_0x54aaad(0x134)]('AccessKey:\x20'+_0x863d88+(_0x542cfc?_0x54aaad(0x109)+_0x542cfc+')':''));}return!_0xaf89ed&&(_0x55f214[_0x54aaad(0x134)](''),_0x55f214[_0x54aaad(0x134)](_0x54aaad(0xf4)),_0x55f214[_0x54aaad(0x134)](''),_0x55f214[_0x54aaad(0x134)](_0x54aaad(0x122)+CLI_BIN_NAME+_0x54aaad(0xee)),_0x55f214['push'](''),_0x55f214[_0x54aaad(0x134)](_0x54aaad(0x11b)+PRODUCT_CONFIG['newConfigFileName']+')'),_0x55f214[_0x54aaad(0x134)](_0x54aaad(0x139)),_0x55f214[_0x54aaad(0x134)](''),_0x55f214[_0x54aaad(0x134)]('Option\x20C:\x20environment\x20variable'),_0x55f214['push'](_0x54aaad(0x11c)+_0x3ba977+_0x54aaad(0x11f)),_0x55f214[_0x54aaad(0x134)](''),_0x55f214[_0x54aaad(0x134)](_0x54aaad(0x114)+CLI_BIN_NAME+_0x54aaad(0x118)),_0x55f214['push']('If\x20command\x20execution\x20still\x20fails,\x20run:\x20'+CLI_BIN_NAME+'\x20doctor')),{'ok':!![],'message':_0x55f214[_0x54aaad(0xeb)]('\x0a')};}},{'service':'auth','command':'info','description':'Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','risk':a9_0x4e15c2(0xe7),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x1330e6){const _0xca4c8f=a9_0x4e15c2,_0x4ad564=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x4ad564,'meta':{'env':_0x1330e6[_0xca4c8f(0x111)]??_0xca4c8f(0x113)}}};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x143856,_0x413cba){const _0x34ff68=a10_0xe7da,_0x2f7022=_0x143856();while(!![]){try{const _0x3ba6b4=-parseInt(_0x34ff68(0x149))/0x1+parseInt(_0x34ff68(0x142))/0x2*(-parseInt(_0x34ff68(0x14c))/0x3)+-parseInt(_0x34ff68(0x14a))/0x4+parseInt(_0x34ff68(0x13f))/0x5*(parseInt(_0x34ff68(0x153))/0x6)+-parseInt(_0x34ff68(0x154))/0x7+parseInt(_0x34ff68(0x148))/0x8+parseInt(_0x34ff68(0x152))/0x9*(-parseInt(_0x34ff68(0x14f))/0xa);if(_0x3ba6b4===_0x413cba)break;else _0x2f7022['push'](_0x2f7022['shift']());}catch(_0x235822){_0x2f7022['push'](_0x2f7022['shift']());}}}(a10_0x5a65,0xa265d));import{createInterface}from'node:readline';class AbortPrompt extends Error{constructor(){const _0x422bed=a10_0xe7da;super(_0x422bed(0x150)),this[_0x422bed(0x14b)]=_0x422bed(0x146);}}function a10_0xe7da(_0x454437,_0x43ead5){_0x454437=_0x454437-0x13d;const _0x5a65f1=a10_0x5a65();let _0xe7da=_0x5a65f1[_0x454437];return _0xe7da;}function createSafeRl(){const _0x4942c2=a10_0xe7da,_0xe8a6f0=createInterface({'input':process[_0x4942c2(0x140)],'output':process[_0x4942c2(0x13e)]});let _0x2e4b21;const _0xb1ebd=new Promise((_0x26b449,_0x5152ef)=>{const _0x29cf2c=_0x4942c2;_0x2e4b21=()=>{const _0x4b0ade=a10_0xe7da;_0x2e4b21&&(_0xe8a6f0[_0x4b0ade(0x14d)](_0x4b0ade(0x151),_0x2e4b21),_0x2e4b21=undefined);try{_0xe8a6f0[_0x4b0ade(0x143)]();}catch{}_0x5152ef(new AbortPrompt());},_0xe8a6f0[_0x29cf2c(0x141)](_0x29cf2c(0x151),_0x2e4b21);}),_0x21bb57=()=>{const _0x27cac7=_0x4942c2;_0x2e4b21&&(_0xe8a6f0['removeListener'](_0x27cac7(0x151),_0x2e4b21),_0x2e4b21=undefined);try{_0xe8a6f0['close']();}catch{}};return{'rl':_0xe8a6f0,'abortPromise':_0xb1ebd,'disposeSuccess':_0x21bb57};}export async function promptAccessKey(_0xace87c=''){const _0x59286b=a10_0xe7da,{rl:_0x4628e7,abortPromise:_0x24ac90,disposeSuccess:_0x4f3133}=createSafeRl(),_0x42c9f=new Promise(_0x4ca387=>{const _0x4d2d60=a10_0xe7da,_0x3dbfb0=_0xace87c?_0x4d2d60(0x144)+_0xace87c+'):\x20':_0x4d2d60(0x147);_0x4628e7[_0x4d2d60(0x145)](_0x3dbfb0,_0x3418ba=>{const _0x48bd71=_0x4d2d60;_0x4f3133(),_0x4ca387(_0x3418ba[_0x48bd71(0x14e)]()||_0xace87c);});});return Promise[_0x59286b(0x13d)]([_0x42c9f,_0x24ac90]);}export function isAbortPrompt(_0x316081){const _0x1af2d8=a10_0xe7da;return _0x316081 instanceof Error&&_0x316081[_0x1af2d8(0x14b)]===_0x1af2d8(0x146);}function a10_0x5a65(){const _0xb7799c=['AccessKey\x20(','question','AbortPrompt','AccessKey\x20(paste\x20ak_...):\x20','10221344lsmGfw','608266fdhZKt','564460yRrOeg','name','990789DThtSh','removeListener','trim','160vWrlSc','User\x20aborted\x20prompt','SIGINT','240804qgyXXk','6bAjoPe','2160963riDMgT','race','stdout','6019810xqWyrV','stdin','once','2zFAOry','close'];a10_0x5a65=function(){return _0xb7799c;};return a10_0x5a65();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a11_0x1c66e6=a11_0x4ac9;(function(_0x44f224,_0x518333){const _0x53437d=a11_0x4ac9,_0x412193=_0x44f224();while(!![]){try{const _0x28fea6=-parseInt(_0x53437d(0xbe))/0x1+-parseInt(_0x53437d(0xc6))/0x2+parseInt(_0x53437d(0xc4))/0x3*(-parseInt(_0x53437d(0xc7))/0x4)+parseInt(_0x53437d(0xcb))/0x5+parseInt(_0x53437d(0xc0))/0x6+-parseInt(_0x53437d(0xc2))/0x7+-parseInt(_0x53437d(0xca))/0x8*(-parseInt(_0x53437d(0xcc))/0x9);if(_0x28fea6===_0x518333)break;else _0x412193['push'](_0x412193['shift']());}catch(_0x37dea0){_0x412193['push'](_0x412193['shift']());}}}(a11_0x4151,0xaed39));function a11_0x4151(){const _0xed67fb=['num','verbose','182608zujZzF','3484130jLjeiz','342waJaNu','read','detail','Get\x20BFF\x20script\x20details\x20by\x20ID','functionName','(none)','323374xeacYo','appCode','6174036lEphgX','bff','3660825QyvVdN','updatedTime','753exYKgS','bool','87198tDwYfN','15732dprtzg'];a11_0x4151=function(){return _0xed67fb;};return a11_0x4151();}function a11_0x4ac9(_0x22d8eb,_0x3f4e56){_0x22d8eb=_0x22d8eb-0xbb;const _0x415155=a11_0x4151();let _0x4ac954=_0x415155[_0x22d8eb];return _0x4ac954;}import{getBffScriptInfo}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';export const bffDetail={'service':a11_0x1c66e6(0xc1),'command':a11_0x1c66e6(0xce),'description':a11_0x1c66e6(0xbb),'risk':a11_0x1c66e6(0xcd),'flags':[{...ID_FLAG,'description':'Script\x20ID'},VERBOSE_FLAG],async 'execute'(_0x5be52c){const _0x27a47b=a11_0x1c66e6,_0x3170f2=await getBffScriptInfo(_0x5be52c[_0x27a47b(0xc8)]('id')),_0xec6cd4=_0x5be52c[_0x27a47b(0xc5)](_0x27a47b(0xc9));if(_0xec6cd4)return{'ok':!![],'data':_0x3170f2};return{'ok':!![],'data':{'id':_0x3170f2['id'],'appCode':_0x3170f2[_0x27a47b(0xbf)],'functionName':_0x3170f2[_0x27a47b(0xbc)]??'','scriptType':_0x3170f2['scriptType'],'description':_0x3170f2['description']||_0x27a47b(0xbd),'createdTime':_0x3170f2['createdTime']??'','updatedTime':_0x3170f2[_0x27a47b(0xc3)]??''}};}};
|
package/lib/commands/bff/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a12_0x55fa69=a12_0x5478;(function(_0x20a649,_0x18ad78){const _0x5f1dbd=a12_0x5478,_0x3465d1=_0x20a649();while(!![]){try{const _0x27309f=parseInt(_0x5f1dbd(0x10b))/0x1+-parseInt(_0x5f1dbd(0x114))/0x2*(-parseInt(_0x5f1dbd(0x10a))/0x3)+parseInt(_0x5f1dbd(0x116))/0x4+-parseInt(_0x5f1dbd(0x10e))/0x5*(parseInt(_0x5f1dbd(0x117))/0x6)+-parseInt(_0x5f1dbd(0x107))/0x7+parseInt(_0x5f1dbd(0x115))/0x8*(parseInt(_0x5f1dbd(0x111))/0x9)+-parseInt(_0x5f1dbd(0x109))/0xa;if(_0x27309f===_0x18ad78)break;else _0x3465d1['push'](_0x3465d1['shift']());}catch(_0x3e5d6d){_0x3465d1['push'](_0x3465d1['shift']());}}}(a12_0x3bfd,0x84135));function a12_0x5478(_0x1631df,_0x3880db){_0x1631df=_0x1631df-0x105;const _0x3bfdab=a12_0x3bfd();let _0x5478b4=_0x3bfdab[_0x1631df];return _0x5478b4;}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_0x55fa69(0x113),'description':a12_0x55fa69(0x10d),'risk':a12_0x55fa69(0x10f),'flags':[{...NAME_FLAG,'required':!![],'description':a12_0x55fa69(0x10c)},PARAMS_FLAG],async 'execute'(_0x5b6c4e){const _0x111adb=a12_0x55fa69,_0x4c398b=parseJsonParams(_0x5b6c4e[_0x111adb(0x106)](_0x111adb(0x110))),_0x36f1ed=Date[_0x111adb(0x105)](),_0x5eebaf=await executeSdkBff(_0x5b6c4e[_0x111adb(0x106)](_0x111adb(0x112)),_0x4c398b),_0xaf616e=Date['now']()-_0x36f1ed;return{'ok':!![],'data':{'result':_0x5eebaf,'elapsed':_0xaf616e},'message':_0x111adb(0x108)+_0xaf616e+'ms'};}};function a12_0x3bfd(){const _0x4bf16e=['36408VMaJxg','2415424BZrMmb','886326nOPOxU','now','str','4337347vXbaqd','BFF\x20executed\x20in\x20','9284880FCEIuH','1716jRdZlo','622818WsufTp','BFF\x20function\x20name\x20to\x20execute','Execute\x20a\x20BFF\x20script\x20by\x20function\x20name','5Qnfnro','read','params','1035YKxFGq','name','exec','1702VImNDi'];a12_0x3bfd=function(){return _0x4bf16e;};return a12_0x3bfd();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xcc8bf2,_0x8082f6){const _0x5eb206=a13_0x4ff0,_0x191564=_0xcc8bf2();while(!![]){try{const _0x4e9ef8=parseInt(_0x5eb206(0x1bc))/0x1*(-parseInt(_0x5eb206(0x1bb))/0x2)+parseInt(_0x5eb206(0x1b5))/0x3+-parseInt(_0x5eb206(0x1ba))/0x4+-parseInt(_0x5eb206(0x1b9))/0x5+-parseInt(_0x5eb206(0x1bd))/0x6*(-parseInt(_0x5eb206(0x1b7))/0x7)+-parseInt(_0x5eb206(0x1b6))/0x8+parseInt(_0x5eb206(0x1b8))/0x9;if(_0x4e9ef8===_0x8082f6)break;else _0x191564['push'](_0x191564['shift']());}catch(_0x3a1d34){_0x191564['push'](_0x191564['shift']());}}}(a13_0x4344,0xf36c0));function a13_0x4344(){const _0xe3f4d8=['46dJpFpz','44651ljzJhD','5886222YbaHEx','731412qMPtMY','8972248JFjKUB','7ElsrGE','26861634Bctbmt','3097800iOOMHh','1777388fxtvCt'];a13_0x4344=function(){return _0xe3f4d8;};return a13_0x4344();}import{bffDetail}from'../../commands/bff/detail.js';import{bffExec}from'../../commands/bff/exec.js';function a13_0x4ff0(_0x4c43c4,_0x799fea){_0x4c43c4=_0x4c43c4-0x1b5;const _0x434440=a13_0x4344();let _0x4ff079=_0x434440[_0x4c43c4];return _0x4ff079;}export const bffDefinitions=[bffDetail,bffExec];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a14_0x33decc=a14_0x3089;(function(_0x4badaf,_0x24fa30){const _0x437c06=a14_0x3089,_0x434a61=_0x4badaf();while(!![]){try{const _0x5a8196=-parseInt(_0x437c06(0x12d))/0x1+-parseInt(_0x437c06(0x13d))/0x2+parseInt(_0x437c06(0x13c))/0x3*(-parseInt(_0x437c06(0x135))/0x4)+-parseInt(_0x437c06(0x130))/0x5*(parseInt(_0x437c06(0x141))/0x6)+parseInt(_0x437c06(0x142))/0x7+-parseInt(_0x437c06(0x12f))/0x8*(-parseInt(_0x437c06(0x13e))/0x9)+parseInt(_0x437c06(0x145))/0xa*(parseInt(_0x437c06(0x127))/0xb);if(_0x5a8196===_0x24fa30)break;else _0x434a61['push'](_0x434a61['shift']());}catch(_0x44bc8e){_0x434a61['push'](_0x434a61['shift']());}}}(a14_0x23d1,0xb360b));import{CliErrors}from'../../errors.js';function a14_0x3089(_0x351f4d,_0xce274d){_0x351f4d=_0x351f4d-0x127;const _0x23d18f=a14_0x23d1();let _0x308915=_0x23d18f[_0x351f4d];return _0x308915;}function a14_0x23d1(){const _0x5d939d=['268475sqQraB','cli-skill-install','=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.','log','apiError','20472ZgmWTp','setLogPath','inherit','skipped','install','../../skills/npx-skills-add.js','cwd','663XfZTMH','509348YZLVYy','117PrzjTx','cli-skill','pipe','18zXPAQA','6736198BQWvLK','\x20-g\x20-y)...','Install\x20the\x20CLI\x20Built-in\x20Skill\x20required\x20by\x20Lovrabet\x20runtime','1983010WbpCIV','121lzNAbh','Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20npx\x20skills\x20add\x20','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20(npx\x20skills\x20add\x20','write','Skipped\x20npx\x20(','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.','1359268iakjXr','nonInteractive','305976vbhRWF'];a14_0x23d1=function(){return _0x5d939d;};return a14_0x23d1();}import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a14_0x33decc(0x13f),'command':a14_0x33decc(0x139),'description':a14_0x33decc(0x144),'risk':a14_0x33decc(0x12a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x1841cc){const _0xe94c1a=a14_0x33decc;logger[_0xe94c1a(0x136)](process[_0xe94c1a(0x13b)]()),logger['info'](_0xe94c1a(0x131),_0xe94c1a(0x12c));const {LOVRABET_SKILL_SOURCE:_0x2b9998,LOVRABET_SKIP_NPX_SKILLS_ENV:_0x2e5259,runNpxSkillsAddGlobal:_0x1a20c6}=await import(_0xe94c1a(0x13a)),_0x13496a=_0x1841cc[_0xe94c1a(0x12e)]?_0xe94c1a(0x140):_0xe94c1a(0x137);console[_0xe94c1a(0x133)](_0xe94c1a(0x129)+_0x2b9998+_0xe94c1a(0x143));const _0x2dcd8c=_0x1a20c6(process['cwd'](),_0x2b9998,{'stdio':_0x13496a});if(_0x2dcd8c[_0xe94c1a(0x138)])console[_0xe94c1a(0x133)](_0xe94c1a(0x12b)+_0x2e5259+_0xe94c1a(0x132));else{if(_0x2dcd8c['ok'])console[_0xe94c1a(0x133)]('CLI\x20Built-in\x20Skill\x20installed');else throw CliErrors[_0xe94c1a(0x134)]('npx\x20skills\x20add\x20failed:\x20'+(_0x2dcd8c['error']||'unknown'),_0xe94c1a(0x128)+_0x2b9998+'\x20-g\x20-y');}return{'ok':!![]};}}];
|